:root {
  --bg: #fff7fb;
  --bg2: #f7fbff;
  --card: rgba(255, 255, 255, .88);
  --text: #263238;
  --muted: #6b7280;
  --primary: #ff6b9a;
  --primary-dark: #e94f84;
  --accent: #7c4dff;
  --line: rgba(255, 107, 154, .18);
  --shadow: 0 20px 55px rgba(92, 50, 87, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.85;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 107, 154, .22), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(124, 77, 255, .16), transparent 30rem),
    linear-gradient(135deg, var(--bg), var(--bg2));
  min-height: 100vh;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 40px 42px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b9a 0%, #ff8f70 48%, #7c4dff 100%);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  font-size: 13px;
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.18;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, .9);
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 18px;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.toc-title {
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--primary-dark);
}

.toc a {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
}

.toc a:hover {
  background: rgba(255, 107, 154, .11);
  color: var(--primary-dark);
}

.content {
  display: grid;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  scroll-margin-top: 22px;
}

h2 {
  margin: 0 0 16px;
  padding-left: 13px;
  border-left: 5px solid var(--primary);
  font-size: 22px;
  line-height: 1.35;
}

p {
  margin: 0 0 12px;
  font-size: 16px;
  color: #374151;
  text-align: justify;
}

p:last-child {
  margin-bottom: 0;
}

.text-block {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  margin-bottom: 12px;
}

.text-block:last-child {
  margin-bottom: 0;
}

img {
  clear: both;
  display: block;
  margin: 14px auto;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(92, 50, 87, .10);
}

b,
strong {
  display: block;
  margin: 8px 0 12px;
  color: var(--primary-dark);
}

.clause-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.clause-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}

.num {
  color: var(--primary-dark);
  font-weight: 800;
  white-space: nowrap;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 24px;
}

.beian-link {
  color: var(--primary-dark);
  font-weight: 700;
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 30px rgba(124, 77, 255, .25);
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 22px, 720px);
    padding: 16px 0 42px;
  }

  .hero {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .layout {
    display: block;
  }

  .toc {
    position: relative;
    top: auto;
    margin-bottom: 16px;
  }

  .toc nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .toc a {
    background: rgba(255, 107, 154, .08);
  }

  .card {
    padding: 21px 17px;
    border-radius: 18px;
  }

  h2 {
    font-size: 19px;
  }

  p {
    font-size: 15px;
  }

  .clause-list li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 13px 14px;
  }

  .num {
    display: inline-block;
  }
}

@media (max-width: 420px) {
  .toc nav {
    grid-template-columns: 1fr;
  }

  body {
    line-height: 1.78;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .hero,
  .toc,
  .back-top {
    box-shadow: none;
  }

  .layout {
    display: block;
  }

  .toc,
  .back-top {
    display: none;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #eee;
  }
}
