/* Legal pages — same tokens as the home page (index.html :root) and /beta. Keep in sync. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/Geist-variable.woff2") format("woff2");
}
:root {
  --frame: #0d276d;
  --frame-dark: #071a4a;
  --page: #f5f8fd;
  --surface: #ffffff;
  --surface-blue: #eef4fc;
  --ink: #131f3f;
  --muted: #5b6b87;
  --line: #dbe4f1;
  --line-strong: #bfd0e6;
  --radius-card: 16px;
  --container: 1120px;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }

.nav { background: rgba(245, 248, 253, 0.82); border-bottom: 1px solid var(--line); }
.nav-inner { height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand img { width: 26px; height: 26px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-right a { font-size: 0.9rem; color: var(--muted); transition: color 0.18s ease; }
.nav-right a:hover, .nav-right a[aria-current="page"] { color: var(--ink); }
.nav-right a[aria-current="page"] { font-weight: 600; }

main { flex: 1; padding: 48px 0 80px; }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-layout > * { min-width: 0; }
.toc { position: sticky; top: 24px; font-size: 0.88rem; }
.toc-title { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 6px; }
.toc a { color: var(--muted); display: block; padding: 2px 0; }
.toc a:hover { color: var(--frame); }
.toc .toc-other { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

.doc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 44px 48px 48px; box-shadow: 0 18px 48px rgba(13, 39, 109, 0.06);
  max-width: 780px;
  overflow-wrap: break-word;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-blue); color: var(--frame); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.doc h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; margin-bottom: 10px; }
.doc .meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 26px; }
.doc .lead { font-size: 1.02rem; color: var(--ink); margin-bottom: 26px; }
.doc h2 { font-size: 1.22rem; letter-spacing: -0.01em; font-weight: 650; margin: 38px 0 12px; padding-top: 8px; scroll-margin-top: 24px; }
.doc h3 { font-size: 1rem; font-weight: 650; margin: 22px 0 8px; }
.doc p { margin-bottom: 12px; }
.doc ul, .doc ol { margin: 0 0 14px 22px; }
.doc li { margin-bottom: 6px; }
.doc li > ul { margin-top: 6px; }
.doc a { color: var(--frame); font-weight: 550; }
.doc a:hover { text-decoration: underline; }
.doc strong { font-weight: 650; }
.doc .note {
  background: var(--surface-blue); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 0.92rem; color: var(--ink); margin: 16px 0 20px;
}
.doc .note p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 10px 0 18px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 650; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.doc .table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.doc .table-wrap table { min-width: 520px; }
.zh-note { display: none; }
html.lang-zh .zh-note { display: block; }

.footer { border-top: 1px solid var(--line); padding: 20px 0; font-size: 0.85rem; color: var(--muted); }
.footer-inner { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-inner a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .toc ol { grid-template-columns: 1fr 1fr; }
  .toc .toc-other { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .nav-inner { height: 56px; gap: 16px; }
  .nav-right { gap: 12px; }
  main { padding: 28px 0 48px; }
  .doc { padding: 28px 20px 30px; border-radius: 14px; }
  .doc h1 { font-size: 1.55rem; }
  .doc h2 { font-size: 1.1rem; }
  .toc ol { grid-template-columns: 1fr; }
}
