*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14213d;
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 60px;
  border-bottom: 1px solid rgba(227,232,240,.85);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #12213d;
  font-size: 13px;
}

.brand-text { font-size: 14px; letter-spacing: -.01em; color: #12213d; }
.brand-text span { color: #3b82f6; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: #5e6c86;
}

.nav-links a:hover { color: #12213d; }

.nav-cta {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #12213d;
  border-radius: 8px;
  padding: 7px 14px;
  transition: opacity .15s;
}

.nav-cta:hover { opacity: .85; }

/* ── LEGAL HEADER ── */
.legal-header {
  background: #f8fafc;
  border-bottom: 1px solid #eef2f6;
  padding: 52px 24px 40px;
  text-align: center;
}

.legal-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #3b82f6;
  margin-bottom: 14px;
}

.legal-header h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: #12213d;
  margin-bottom: 12px;
}

.legal-updated {
  font-size: 12px;
  color: #8293a8;
}

/* ── CONTENT ── */
.legal-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  align-items: start;
}

/* TOC sidebar */
.legal-toc {
  position: sticky;
  top: 80px;
  font-size: 12px;
  color: #8293a8;
}

.legal-toc-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #b0bec9;
  margin-bottom: 12px;
}

.legal-toc a {
  display: block;
  padding: 4px 0;
  color: #6b7f94;
  border-left: 2px solid #eef2f6;
  padding-left: 12px;
  transition: color .15s, border-color .15s;
  line-height: 1.4;
}

.legal-toc a:hover {
  color: #12213d;
  border-left-color: #3b82f6;
}

/* Body content */
.legal-body { min-width: 0; }

.legal-body h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #12213d;
  margin: 40px 0 10px;
  padding-top: 24px;
  border-top: 1px solid #eef2f6;
}

.legal-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.legal-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: #233756;
  margin: 22px 0 6px;
}

.legal-body p {
  color: #3c526b;
  margin-bottom: 14px;
  line-height: 1.75;
}

.legal-body ul, .legal-body ol {
  margin: 8px 0 14px 20px;
  color: #3c526b;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legal-body ul li::marker { color: #3b82f6; }
.legal-body ol li::marker { color: #3b82f6; font-weight: 700; }

.legal-body blockquote {
  border-left: 3px solid #3b82f6;
  padding: 10px 16px;
  background: #f0f6ff;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: #233756;
  font-style: italic;
}

.legal-body strong { color: #12213d; font-weight: 700; }

.legal-body a {
  color: #3b82f6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body .operation-example {
  background: #f8fafc;
  border: 1px solid #e8eef5;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 14px 0;
  font-size: 13px;
  color: #3c526b;
}

.legal-body .operation-example strong { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8293a8; margin-bottom: 4px; font-weight: 700; }

/* ── FOOTER ── */
.legal-footer {
  border-top: 1px solid #eef2f6;
  padding: 32px 24px 48px;
  background: #f8fafc;
}

.legal-footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}

.legal-footer-brand {
  font-size: 13px;
  font-weight: 700;
  color: #12213d;
  margin-bottom: 4px;
}

.legal-footer-copy {
  font-size: 11px;
  color: #8293a8;
}

.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.legal-footer-label {
  width: 100%;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #b0bec9;
  margin-bottom: 6px;
}

.legal-footer-nav a {
  font-size: 12px;
  color: #6b7f94;
  transition: color .15s;
}

.legal-footer-nav a:hover { color: #12213d; }
.legal-footer-nav a.active { color: #3b82f6; font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px 64px; }
  .legal-toc { display: none; }
  .legal-header { padding: 36px 16px 28px; }
  .nav-links { display: none; }
}
