/* Compliance note: a readable long-form page in the same visual system. */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--ink);
}

.back-link .icon {
  transition: transform 0.2s var(--ease);
}

.back-link:hover .icon {
  transform: translateX(-2px);
}

.doc-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.doc-status .status-dot {
  width: 5px;
  height: 5px;
}

.doc-hero {
  position: relative;
  padding-block: clamp(64px, 8vw, 102px) clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.doc-ambient {
  position: absolute;
  inset: -30% -10% 0;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 82% 20%, rgba(53, 199, 154, 0.15), transparent 70%),
    radial-gradient(38% 50% at 12% 50%, rgba(61, 123, 240, 0.08), transparent 72%);
}

.doc-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(to right, rgba(22, 57, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 57, 42, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.doc-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.doc-hero h1 {
  margin-top: 20px;
  font-size: clamp(2.7rem, 5.4vw, 4.6rem);
  font-weight: 630;
  line-height: var(--heading-leading);
  letter-spacing: -0.045em;
  max-width: 18ch;
}

html[data-lang="zh"] .doc-hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
  letter-spacing: -0.01em;
  max-width: 12ch;
}

.doc-lede {
  max-width: 63ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.doc-meta code {
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.doc-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 760px);
  gap: clamp(36px, 7vw, 96px);
  justify-content: center;
  padding-block: clamp(48px, 7vw, 82px) clamp(76px, 10vw, 120px);
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 106px;
  padding-top: 4px;
}

.doc-toc-title {
  margin-bottom: 12px;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-toc nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.doc-toc nav a {
  padding: 7px 0 7px 13px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.doc-toc nav a:hover {
  color: var(--ink);
  border-left-color: var(--accent);
}

.doc-toc-note {
  max-width: 24ch;
  margin-top: 22px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.65;
}

.doc-body {
  min-width: 0;
}

.doc-body section {
  padding-top: clamp(30px, 4vw, 44px);
  margin-top: clamp(30px, 4vw, 44px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 104px;
}

.doc-body section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.doc-body h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 640;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

html[data-lang="zh"] .doc-body h2 {
  letter-spacing: -0.008em;
}

.doc-body h3 {
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.doc-body p {
  max-width: 69ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
}

.doc-body p a,
.doc-body dd a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(28, 119, 83, 0.28);
}

.doc-body ul {
  max-width: 69ch;
  margin-top: 14px;
  padding-left: 1.15em;
  list-style: disc;
}

.doc-body li {
  margin-top: 7px;
  padding-left: 0.25em;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.78;
}

.doc-body li::marker {
  color: var(--faint);
}

.doc-body code {
  font-size: 0.84em;
}

.doc-facts {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.doc-facts > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.doc-facts dt {
  color: var(--faint);
  font-size: 12.5px;
}

.doc-facts dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
}

.doc-facts dd a {
  color: var(--accent);
  text-decoration: none;
}

.table-scroll {
  margin-top: 18px;
  overflow-x: auto;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.6;
}

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

.doc-table thead th {
  padding-top: 0;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-table tbody th {
  width: 27%;
  padding-right: 18px;
  color: var(--ink);
  font-weight: 620;
  font-size: 12.5px;
}

.doc-table td {
  width: 47%;
  color: var(--muted);
}

.doc-table td:last-child {
  width: 26%;
  color: var(--faint);
}

.doc-optional {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.doc-note {
  color: var(--faint) !important;
  font-size: 12px !important;
  line-height: 1.7 !important;
}

.doc-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid rgba(28, 119, 83, 0.2);
  border-radius: 16px;
  background: var(--accent-soft-2);
}

.doc-callout-copy h3 {
  color: var(--ink);
}

.doc-callout-copy p {
  max-width: 48ch;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.7;
}

.doc-disclaimer {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
}

.doc-disclaimer .disclaimer-en {
  color: var(--ink);
}

.doc-disclaimer .disclaimer-zh {
  color: var(--muted);
}

.doc-disclaimer .footer-trademark {
  margin-top: 12px;
  color: var(--faint);
}

.site-footer--doc {
  padding-top: 48px;
}

.doc-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}

.doc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.doc-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #c8dbcf;
  font-size: 12px;
  text-decoration: none;
}

.doc-footer-links a:hover {
  color: #fff;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .doc-toc {
    position: static;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

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

  .doc-toc nav a {
    padding: 6px 0;
    border-left: 0;
  }

  .doc-toc nav a:hover {
    border-left-color: transparent;
  }

  .doc-toc-note {
    display: none;
  }

  .doc-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .back-link {
    margin-inline-start: 0;
  }

  .doc-status {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
  }

  .doc-meta {
    gap: 6px 16px;
    font-size: 9.5px;
  }

  .doc-facts > div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 11px 0;
  }

  .doc-facts dt {
    font-size: 11px;
  }

  .doc-facts dd {
    font-size: 13px;
  }

  .doc-body h2 {
    font-size: 1.55rem;
  }

  .doc-body p {
    font-size: 14.5px;
  }

  .doc-table thead {
    display: none;
  }

  .doc-table,
  .doc-table tbody,
  .doc-table tr,
  .doc-table th,
  .doc-table td {
    display: block;
    width: 100%;
  }

  .doc-table tr {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  .doc-table tbody th,
  .doc-table td {
    padding: 0;
    border: 0;
  }

  .doc-table tbody th {
    margin-bottom: 6px;
    font-size: 13px;
  }

  .doc-table td {
    margin-top: 4px;
    font-size: 12.5px;
  }

  .doc-table td::before {
    content: attr(data-label) "  ";
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 8.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .doc-callout {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px;
  }

  .doc-footer-links {
    gap: 12px 20px;
  }
}

@media (max-width: 420px) {
  .doc-toc nav {
    gap: 0 14px;
  }

  .brand-alpha {
    display: none;
  }
}
