:root {
  color-scheme: light;
  --ink: #071b2b;
  --paper: #f4f7f6;
  --surface: #fff;
  --muted: #647782;
  --line: rgba(7, 27, 43, .1);
  --mint: #5de4c7;
  --mint-deep: #087f6b;
  --gold: #f5b85b;
  --shadow: 0 24px 80px rgba(4, 29, 43, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 146px; }
body { margin: 0; min-width: 320px; background: var(--paper); line-height: 1.78; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  color: #fff;
  background: rgba(6, 23, 34, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px) saturate(140%);
}
.header-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  color: var(--mint);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  background: rgba(255,255,255,.08);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark circle:first-of-type { fill: #fff; }
.brand-mark circle:not(:first-of-type) { fill: var(--gold); }
.brand span:last-child { display: grid; line-height: 1.1; }
.brand strong { font-size: .98rem; letter-spacing: .02em; }
.brand small { margin-top: 5px; color: rgba(255,255,255,.52); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.language-switch {
  min-height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: rgba(255,255,255,.82);
  font-size: .82rem;
  font-weight: 700;
}
.language-switch:hover, .language-switch:focus-visible { color: var(--ink); background: var(--mint); border-color: var(--mint); }

.document-nav { border-top: 1px solid rgba(255,255,255,.08); }
.document-nav > div {
  width: min(1180px, calc(100% - 48px));
  min-height: 52px;
  margin: auto;
  display: flex;
  align-items: stretch;
  gap: 30px;
}
.document-nav a { position: relative; display: inline-flex; align-items: center; color: rgba(255,255,255,.58); font-size: .84rem; font-weight: 650; white-space: nowrap; }
.document-nav a::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.document-nav a:hover, .document-nav a.active { color: #fff; }
.document-nav a.active::after { background: var(--mint); }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #061722 0%, #0a2b3d 58%, #0c3a46 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to right, #000, transparent 86%);
}
.hero-glow { position: absolute; right: 6%; bottom: -140px; width: 360px; height: 360px; border-radius: 50%; background: var(--mint); filter: blur(120px); opacity: .19; }
.hero-inner { position: relative; width: min(1180px, calc(100% - 48px)); margin: auto; padding: 72px 0 82px; }
.eyebrow { margin: 0 0 16px; color: var(--mint); font-size: .7rem; font-weight: 800; letter-spacing: .2em; }
.hero h1 { margin: 0; font-size: clamp(2.8rem, 6vw, 5.8rem); line-height: 1; letter-spacing: -.06em; }
.hero p:last-child { margin: 22px 0 0; color: rgba(255,255,255,.63); font-size: 1rem; }

.legal-layout {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 96px;
  display: grid;
  grid-template-columns: 250px minmax(0, 790px);
  justify-content: space-between;
  gap: 72px;
  align-items: start;
}
.sidebar { position: sticky; top: 156px; display: grid; gap: 26px; }
.document-meta { padding: 21px; display: grid; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 0 14px 45px rgba(4,29,43,.05); }
.document-meta span, .document-meta small { color: var(--muted); font-size: .73rem; }
.document-meta strong { margin: 4px 0 2px; font-size: 1.05rem; letter-spacing: -.01em; }
.toc { padding-left: 4px; display: grid; gap: 2px; }
.toc p { margin: 0 0 10px; color: var(--ink); font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.toc a { padding: 6px 11px; border-left: 2px solid transparent; color: var(--muted); font-size: .78rem; line-height: 1.45; transition: color .18s, border-color .18s, background .18s; }
.toc a:hover, .toc a:focus-visible { color: var(--mint-deep); border-color: var(--mint); background: rgba(93,228,199,.08); }

.legal-content {
  min-width: 0;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid rgba(7,27,43,.08);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.legal-content > h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.2; letter-spacing: -.045em; }
.legal-content > p:first-of-type { margin: 15px 0 38px; padding-bottom: 28px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.legal-content h2 { margin: 42px 0 14px; padding-top: 2px; color: var(--ink); font-size: 1.14rem; line-height: 1.4; letter-spacing: -.02em; }
.legal-content p { margin: 0 0 18px; color: #425863; font-size: .96rem; }
.legal-content ul, .legal-content ol { margin: 12px 0 22px; padding: 0; list-style: none; counter-reset: item; }
.legal-content li { position: relative; margin: 10px 0; padding-left: 25px; color: #425863; font-size: .96rem; }
.legal-content ul li::before { content: ""; position: absolute; top: .72em; left: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--mint-deep); box-shadow: 0 0 0 5px rgba(8,127,107,.08); }
.legal-content ol li { counter-increment: item; }
.legal-content ol li::before { content: counter(item) "."; position: absolute; left: 0; color: var(--mint-deep); font-weight: 800; }
.legal-content a { color: var(--mint-deep); font-weight: 650; text-decoration: underline; text-decoration-color: rgba(8,127,107,.28); text-underline-offset: 3px; }
.legal-content code { padding: .16rem .4rem; border-radius: 6px; background: #edf3f1; color: #245346; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
.test-warning { margin: 0 0 30px; padding: 14px 16px; border: 1px solid #e7b54d; border-radius: 13px; background: #fff8e7; color: #765209; font-size: .88rem; font-weight: 650; }

.site-footer { padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); color: rgba(255,255,255,.57); background: #061722; }
.site-footer > div { width: min(1180px, calc(100% - 48px)); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer p { margin: 0; font-size: .76rem; }
.site-footer a { color: rgba(255,255,255,.8); font-size: .78rem; }
.site-footer a:hover { color: var(--mint); }

@media (max-width: 900px) {
  html { scroll-padding-top: 132px; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .sidebar { position: static; grid-template-columns: 1fr; }
  .toc { display: none; }
  .document-meta { display: flex; align-items: center; gap: 9px; padding: 14px 17px; border-radius: 16px; }
  .document-meta strong { margin: 0; }
  .document-meta small::before { content: "·"; margin-right: 9px; }
}

@media (max-width: 600px) {
  .header-inner, .document-nav > div, .hero-inner, .legal-layout, .site-footer > div { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand small { display: none; }
  .document-nav { overflow-x: auto; scrollbar-width: none; }
  .document-nav::-webkit-scrollbar { display: none; }
  .document-nav > div { min-height: 48px; gap: 24px; }
  .document-nav a { font-size: .8rem; }
  .hero-inner { padding: 52px 0 58px; }
  .hero h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
  .hero p:last-child { max-width: 290px; font-size: .88rem; line-height: 1.7; }
  .legal-layout { padding-bottom: 58px; }
  .document-meta { overflow: hidden; white-space: nowrap; }
  .document-meta span { display: none; }
  .legal-content { padding: 30px 22px 42px; border-radius: 23px; }
  .legal-content > h1 { font-size: 1.62rem; }
  .legal-content > p:first-of-type { margin-bottom: 30px; padding-bottom: 24px; font-size: .78rem; line-height: 1.7; }
  .legal-content h2 { margin-top: 34px; font-size: 1.05rem; }
  .legal-content p, .legal-content li { font-size: .93rem; line-height: 1.82; }
  .site-footer > div { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
