:root {
  color-scheme: light;
  --ink: #12212b;
  --muted: #5e6c75;
  --paper: #fffdf8;
  --canvas: #eef1ed;
  --line: #d8ddd8;
  --accent: #006b62;
  --accent-soft: #dcefeb;
  --signal: #b75d19;
  --signal-soft: #fff0df;
  --shadow: 0 24px 70px rgb(18 33 43 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(18 33 43 / 4%) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(rgb(18 33 43 / 4%) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--canvas);
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: #004c46;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgb(183 93 25 / 35%);
  outline-offset: 3px;
}

.legal-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgb(18 33 43 / 12%);
  background: rgb(255 253 248 / 94%);
  backdrop-filter: blur(16px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: .02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  left: 5px;
  width: 22px;
  height: 7px;
  border: 2px solid var(--paper);
  border-right: 0;
  border-left: 0;
  border-radius: 50%;
  content: "";
  transform: rotate(-14deg);
}

.brand-mark::before {
  top: 7px;
}

.brand-mark::after {
  top: 17px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.peer-document {
  padding-right: 12px;
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.language-switch a {
  min-width: 48px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
}

.language-switch a[aria-current="true"] {
  color: #fff;
  background: var(--accent);
}

.legal-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--signal);
  font: 750 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 42px;
  height: 2px;
  background: currentColor;
  content: "";
}

.legal-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.legal-hero h1 span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: .42em;
  font-weight: 650;
  letter-spacing: -.02em;
}

.version-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.version-line strong {
  color: var(--ink);
}

.legal-shell {
  max-width: 1180px;
  margin: 0 auto 72px;
  padding: 0 24px;
}

.legal-document {
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 2px 32px 2px 2px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.legal-document + .legal-document {
  margin-top: 36px;
}

.legal-document[hidden] {
  display: none;
}

.document-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr);
  gap: 36px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--ink);
}

.document-heading h2 {
  margin: 0 0 14px;
  font-family: "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.16;
  letter-spacing: -.025em;
}

.document-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.document-facts {
  margin: 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
}

.document-facts div + div {
  margin-top: 10px;
}

.document-facts dt {
  color: var(--muted);
  font-weight: 650;
}

.document-facts dd {
  margin: 1px 0 0;
  font-weight: 750;
}

.notice {
  margin: 34px 0;
  padding: 20px 24px;
  border: 1px solid #efc59f;
  border-left: 5px solid var(--signal);
  background: var(--signal-soft);
}

.notice strong {
  display: block;
  margin-bottom: 4px;
}

.table-of-contents {
  margin: 34px 0 48px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: #f5f6f2;
}

.table-of-contents strong {
  display: block;
  margin-bottom: 12px;
  font: 750 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.table-of-contents ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 32px;
  margin: 0;
  padding-left: 20px;
}

.table-of-contents a {
  color: var(--ink);
  text-decoration-color: rgb(0 107 98 / 35%);
}

.legal-section {
  scroll-margin-top: 90px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.legal-section:first-of-type {
  border-top: 0;
}

.legal-section h3 {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  margin: 0 0 18px;
  font-family: "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.3;
}

.section-number {
  color: var(--accent);
  font: 800 14px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
}

.legal-section p,
.legal-section ul,
.legal-section ol {
  margin-top: 12px;
  margin-bottom: 12px;
}

.legal-section li + li {
  margin-top: 8px;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--line);
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  letter-spacing: .04em;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td:first-child {
  width: 19%;
  color: var(--accent);
  font-weight: 750;
}

.legal-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 52px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 800px) {
  .legal-topbar {
    position: static;
    align-items: flex-start;
    padding: 14px 18px;
  }

  .brand-link {
    font-size: 14px;
  }

  .peer-document {
    display: none;
  }

  .legal-hero {
    padding: 48px 20px 28px;
  }

  .legal-shell {
    padding: 0 12px;
  }

  .legal-document {
    padding: 26px 20px;
    border-radius: 2px 22px 2px 2px;
  }

  .document-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .table-of-contents ol {
    grid-template-columns: 1fr;
  }

  .legal-section h3 {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }

  .legal-topbar,
  .legal-hero,
  .table-of-contents,
  .legal-footer {
    display: none;
  }

  .legal-shell {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .legal-document {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .legal-document + .legal-document {
    page-break-before: always;
  }

  .legal-document[hidden] {
    display: block;
  }

  .legal-section {
    break-inside: avoid-page;
  }
}
