/* ── shared with css/style.css design tokens ── */
:root {
  --bg:        #F6FAFD;
  --bg-soft:   #EAF4FB;
  --surface:   #FFFFFF;
  --ink:       #0B1A2B;
  --ink-2:     #1F2D44;
  --muted:     #64748B;
  --faint:     #94A3B8;
  --line:      rgba(11,26,43,0.08);
  --line-2:    rgba(11,26,43,0.14);
  --pool-1:    #5FD0FF;
  --pool-2:    #00A8E8;
  --pool-3:    #0077C2;
  --pool-4:    #0B5FFF;
  --accent:    #7A5AE0;
  --teal:      #22C8B0;
  --shadow-sm: 0 1px 2px rgba(11,26,43,0.05);
  --shadow:    0 1px 2px rgba(11,26,43,0.04), 0 10px 30px rgba(11,26,43,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--pool-3); text-decoration: none; }
a:hover { color: var(--pool-4); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,250,253,0.88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.nav-brand-icon { width: 36px; height: 36px; border-radius: 9px; overflow: hidden; box-shadow: 0 4px 12px rgba(11,32,80,0.18); flex-shrink: 0; }
.nav-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.nav-brand-name { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 14px; text-decoration: none; }
.nav-links a:hover,
.nav-links a.active { color: var(--pool-3); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); cursor: pointer;
  background: none; font-family: inherit; transition: 100ms ease;
}
.lang-btn.active { background: var(--ink); color: #fff; border-color: transparent; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: #fff !important; font-weight: 600;
  font-size: 13px; transition: 150ms ease;
}
.nav-cta:hover { background: var(--pool-4); }
.nav-menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); cursor: pointer; color: var(--ink);
}

/* ── LEGAL HERO ── */
.legal-hero {
  background: radial-gradient(60% 80% at 50% 0%, #DDF0FA 0%, transparent 70%), var(--bg);
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--line);
}
.legal-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--pool-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.legal-kicker .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pool-2); box-shadow: 0 0 0 4px rgba(0,168,232,0.18);
}
.legal-hero h1 {
  font-family: 'Sora', sans-serif; font-weight: 800;
  font-size: clamp(38px, 5vw, 58px); letter-spacing: -0.035em;
  line-height: 1.02; margin: 0 0 16px; color: var(--ink);
}
.water {
  background: linear-gradient(135deg, var(--pool-1) 0%, var(--pool-2) 45%, var(--pool-4) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.legal-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sep { color: var(--faint); }

/* ── LEGAL BODY ── */
.legal-body { padding: 56px 0 96px; }
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 52px;
  align-items: start;
}

/* ── TOC ── */
.toc {
  position: sticky; top: 84px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px;
}
.toc h4 {
  font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.toc ol li { counter-increment: toc; }
.toc a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 13px; color: var(--muted); font-weight: 500; transition: 120ms ease;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 10px; font-weight: 700; color: var(--faint);
  font-family: 'JetBrains Mono', ui-monospace, monospace; flex-shrink: 0;
}
.toc a:hover { background: var(--bg); color: var(--ink); }
.toc a.active { background: var(--bg-soft); color: var(--pool-3); font-weight: 600; }

/* ── LANG SECTIONS ── */
.lang-section { display: none; }
.lang-section.active { display: block; }

/* ── LEGAL DOC ── */
.legal-doc { display: flex; flex-direction: column; }
.legal-section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.legal-section:first-child { padding-top: 0; }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 {
  display: flex; align-items: baseline; gap: 14px;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em; margin-bottom: 14px; color: var(--ink);
}
.legal-section h2 .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 700; color: var(--pool-3);
  background: rgba(0,119,194,0.10); padding: 3px 8px;
  border-radius: 6px; letter-spacing: 0.04em; flex-shrink: 0;
}
.legal-section p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.7; font-size: 15px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { margin: 8px 0 12px 20px; color: var(--ink-2); line-height: 1.7; font-size: 15px; }
.legal-section li { margin-bottom: 6px; }
.legal-section a { color: var(--pool-3); }
.callout {
  background: rgba(0,119,194,0.07);
  border: 1px solid rgba(0,119,194,0.18);
  border-left: 3px solid var(--pool-3);
  border-radius: 10px; padding: 18px 20px;
  font-size: 14.5px; color: var(--ink-2); line-height: 1.65;
}
.callout strong { color: var(--ink); }

/* ── LEGAL HELP BANNER ── */
.legal-help {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(135deg, var(--pool-3), var(--pool-4));
  border-radius: 16px; padding: 24px 28px; margin-top: 40px; color: #fff;
}
.legal-help svg { flex-shrink: 0; }
.legal-help .t { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; }
.legal-help .s { font-size: 13px; opacity: 0.8; margin-top: 2px; }
.legal-help a {
  margin-left: auto; flex-shrink: 0;
  background: rgba(255,255,255,0.18); color: #fff !important;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  white-space: nowrap; transition: 120ms ease;
}
.legal-help a:hover { background: rgba(255,255,255,0.28); }

/* ── FOOTER ── */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 56px 0 28px; }
.foot-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.foot-brand p { margin: 12px 0 0; color: rgba(255,255,255,0.55); line-height: 1.55; font-size: 14px; max-width: 300px; }
.foot-col h5 { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 12px; color: #fff; margin-bottom: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.foot-col a { color: rgba(255,255,255,0.65); font-size: 14px; }
.foot-col a:hover { color: var(--pool-1); }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.10); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(255,255,255,0.40);
}
.foot-legal { display: flex; gap: 20px; }
.foot-legal a { color: rgba(255,255,255,0.50); }
.foot-legal a:hover { color: var(--pool-1); }

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .nav-links { display: none; }
  .nav-menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: #fff;
    padding: 20px 32px 24px; gap: 16px;
    border-bottom: 1px solid var(--line); z-index: 49;
  }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .legal-help { flex-wrap: wrap; }
  .legal-help a { margin-left: 0; width: 100%; text-align: center; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .legal-hero { padding: 48px 0 40px; }
  .foot-top { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
