/* 跟上 · 法律说明。静态样式，无外部资源。 */
:root {
  color-scheme: light;
  --ink: #172c3b;
  --navy: #102f40;
  --teal: #087f78;
  --teal-dark: #06645f;
  --muted: #586d7b;
  --line: #dce6eb;
  --surface: #f3f8f9;
  --notice: #edf7f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

.legal-page {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

.legal-page a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.legal-page a:hover {
  color: var(--navy);
}

.legal-page a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
  border-radius: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--navy);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand img,
.brand svg {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0;
}

.legal-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}

.legal-nav a:hover {
  background: var(--surface);
}

.legal-nav a[aria-current="page"] {
  background: var(--notice);
  color: var(--teal-dark);
}

.document {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
  column-gap: 56px;
  row-gap: 28px;
  max-width: 1120px;
  margin: 48px auto 72px;
  padding: 0 32px;
}

.document-meta,
.document > .lead,
.document > .notice {
  grid-column: 1 / -1;
}

.document-meta {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.document-meta h1 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.document-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.document-meta time {
  font-variant-numeric: tabular-nums;
}

.lead {
  margin: 0;
  color: #344f5e;
  font-size: 17px;
  line-height: 1.9;
}

.notice {
  margin: 0;
  padding: 18px 22px;
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  background: var(--notice);
  color: #244b49;
  font-size: 15px;
}

.notice p {
  margin: 0;
}

.notice p + p {
  margin-top: 8px;
}

.toc {
  position: sticky;
  top: 24px;
  grid-column: 1;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 4px 20px 8px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}

.toc h2,
.toc > strong,
.toc > p {
  display: block;
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.toc ol,
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li + li {
  margin-top: 4px;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  text-decoration: none;
}

.toc a:hover,
.toc a[aria-current="location"] {
  color: var(--teal-dark);
  text-decoration: underline;
}

.document-body {
  grid-column: 2;
  min-width: 0;
  overflow-wrap: break-word;
}

.document-body section {
  scroll-margin-top: 24px;
}

.document-body section + section {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.document-body h2 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.document-body h3 {
  margin: 25px 0 10px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.6;
}

.document-body p {
  margin: 0 0 16px;
}

.document-body ul,
.document-body ol {
  margin: 12px 0 18px;
  padding-left: 1.5em;
}

.document-body li {
  padding-left: 3px;
}

.document-body li + li {
  margin-top: 8px;
}

.document-body li > p:last-child,
.document-body section > :last-child {
  margin-bottom: 0;
}

.document-body strong {
  color: var(--navy);
  font-weight: 700;
}

.document-body blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid #a8c7c3;
  background: var(--surface);
  color: #405c69;
}

.document-body blockquote > :last-child {
  margin-bottom: 0;
}

.document-body address {
  margin: 16px 0;
  font-style: normal;
}

.table-wrap {
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.document-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
}

.table-wrap table {
  min-width: 520px;
}

.document-body caption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.document-body th,
.document-body td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.document-body th {
  background: var(--surface);
  color: var(--navy);
  font-weight: 650;
}

.document-body tr:last-child td {
  border-bottom: 0;
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 5px;
}

@media (max-width: 900px) {
  .document {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    max-width: 800px;
    margin-top: 32px;
  }

  .toc,
  .document-body {
    grid-column: 1;
  }

  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }

  .toc ol,
  .toc ul {
    columns: 2;
    column-gap: 28px;
  }

  .toc li {
    break-inside: avoid;
  }
}

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .legal-nav {
    width: 100%;
    gap: 4px;
  }

  .legal-nav a {
    padding-right: 12px;
    padding-left: 12px;
  }

  .document {
    gap: 22px;
    margin: 28px auto 44px;
    padding: 0 20px;
  }

  .document-meta {
    padding-bottom: 18px;
  }

  .lead {
    font-size: 16px;
  }

  .notice {
    padding: 14px 16px;
  }

  .toc {
    padding: 16px;
  }

  .toc ol,
  .toc ul {
    columns: 1;
  }

  .toc a {
    padding: 7px 0;
  }

  .document-body h2 {
    font-size: 21px;
  }

  .document-body section + section {
    margin-top: 30px;
    padding-top: 24px;
  }

  .document-body th,
  .document-body td {
    padding: 11px 12px;
  }

  .site-footer {
    padding: 22px 20px 28px;
  }
}

@page {
  size: A4;
  margin: 18mm;
}

@media print {
  :root {
    --ink: #111;
    --navy: #111;
    --teal-dark: #111;
    --muted: #444;
    --line: #bbb;
    --surface: #f5f5f5;
    --notice: #f5f5f5;
  }

  html {
    scroll-padding-top: 0;
  }

  .legal-page {
    min-height: 0;
    background: #fff;
    font-size: 10pt;
    line-height: 1.7;
  }

  .site-header,
  .document,
  .site-footer {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .site-header {
    padding-bottom: 10pt;
    margin-bottom: 20pt;
  }

  .site-header .brand {
    font-size: 16pt;
  }

  .brand img,
  .brand svg {
    width: 28pt;
    height: 28pt;
    flex-basis: 28pt;
  }

  .legal-nav,
  .toc {
    display: none;
  }

  .document-meta {
    margin-bottom: 16pt;
    padding-bottom: 12pt;
  }

  .document-meta h1 {
    font-size: 24pt;
  }

  .document-meta p,
  .document-body table,
  .document-body caption {
    font-size: 9pt;
  }

  .lead {
    margin-bottom: 16pt;
    font-size: 11pt;
  }

  .notice {
    margin-bottom: 18pt;
    padding: 10pt 12pt;
    border-left-color: #555;
    font-size: 10pt;
  }

  .document-body h2 {
    font-size: 15pt;
  }

  .document-body h3 {
    font-size: 12pt;
  }

  .document-body h2,
  .document-body h3,
  .document-meta {
    break-after: avoid;
  }

  .document-body section + section {
    margin-top: 20pt;
    padding-top: 14pt;
  }

  .document-body p,
  .document-body li {
    orphans: 3;
    widows: 3;
  }

  .table-wrap {
    overflow: visible;
    border-radius: 0;
  }

  .table-wrap table {
    min-width: 0;
    table-layout: auto;
  }

  .document-body thead {
    display: table-header-group;
  }

  .document-body tr,
  .document-body blockquote {
    break-inside: avoid;
  }

  .document-body th,
  .document-body td {
    padding: 7pt;
  }

  .legal-page a {
    color: inherit;
    text-decoration: underline;
  }

  .site-footer {
    margin-top: 24pt;
    padding-top: 12pt;
    font-size: 8pt;
  }
}
