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

body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.2s ease;
  min-height: 100vh;
}

body.dark-theme {
  background: linear-gradient(145deg, #0a111c 0%, #0b1b2f 100%);
  color: #e0edf5;
}
body.light-theme {
  background-color: #f4f7fc;
  color: #162b3a;
}

body.dark-theme::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  background: linear-gradient(180deg, #0d3060 0%, #071828 55%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
body.light-theme::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  background: linear-gradient(180deg, #93c5fd 0%, #dbeeff 55%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

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

/* ── Navbar ── */
.navbar-wrap {
  position: sticky;
  top: 16px;
  z-index: 100;
  padding: 0 24px;
  pointer-events: none;
  margin-bottom: 60px;
}
.navbar {
  pointer-events: all;
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid;
}
body.dark-theme .navbar { background: rgba(10,17,28,0.7); border-color: rgba(100,180,255,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.35); }
body.light-theme .navbar { background: rgba(244,247,252,0.75); border-color: rgba(0,0,0,0.1); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }

.navbar-inner {
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.logo img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
body.dark-theme .nav-links a { color: #b4d6f0; }
body.dark-theme .nav-links a:hover { color: white; }
body.light-theme .nav-links a { color: #162b3a; }
body.light-theme .nav-links a:hover { color: #0f4c5c; }

.nav-right { display: flex; align-items: center; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-sm { padding: 8px 18px; font-size: 0.88rem; }
.btn-outline { background: transparent; }
body.dark-theme .btn { background: #0f2f4a; border-color: #2b5980; color: #e0edf5; }
body.dark-theme .btn:hover { background: #143e60; }
body.dark-theme .btn-outline { background: transparent; color: #7fbdff; border-color: #2f6390; }
body.dark-theme .btn-outline:hover { background: #132c40; color: white; }
body.light-theme .btn { background: #0f4c5c; border-color: #0f4c5c; color: white; }
body.light-theme .btn:hover { background: #196b80; }
body.light-theme .btn-outline { background: transparent; color: #0f4c5c; border-color: #0f4c5c; }
body.light-theme .btn-outline:hover { background: #e6f1f7; }

.theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: inherit;
  padding: 6px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.theme-toggle:hover { opacity: 1; }

/* ── Legal page layout ── */
.legal-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  padding-bottom: 120px;
  align-items: start;
}

/* ── Sidebar TOC ── */
.legal-sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.4;
  margin-bottom: 16px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  padding: 7px 12px;
  border-radius: 10px;
  transition: all 0.15s;
  border: 1px solid transparent;
  font-weight: 500;
}
body.dark-theme .sidebar-nav a { color: #8fb4d9; }
body.dark-theme .sidebar-nav a:hover { color: #c8e4ff; background: rgba(100,180,255,0.06); border-color: rgba(100,180,255,0.1); }
body.dark-theme .sidebar-nav a.active { color: #6fb6ff; background: rgba(100,180,255,0.1); border-color: rgba(100,180,255,0.18); }
body.light-theme .sidebar-nav a { color: #4a7a9b; }
body.light-theme .sidebar-nav a:hover { color: #0f4c5c; background: rgba(15,76,92,0.05); border-color: rgba(15,76,92,0.12); }
body.light-theme .sidebar-nav a.active { color: #0f4c5c; background: rgba(15,76,92,0.08); border-color: rgba(15,76,92,0.18); }

.sidebar-divider {
  height: 1px;
  margin: 16px 0;
  border: none;
}
body.dark-theme .sidebar-divider { background: rgba(100,180,255,0.1); }
body.light-theme .sidebar-divider { background: rgba(0,0,0,0.08); }

.sidebar-meta { font-size: 0.78rem; opacity: 0.4; line-height: 1.6; padding: 0 12px; }

/* ── Legal content ── */
.legal-header {
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid;
}
body.dark-theme .legal-header { border-color: rgba(100,180,255,0.1); }
body.light-theme .legal-header { border-color: rgba(0,0,0,0.08); }

.legal-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.4;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-title {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
body.dark-theme .legal-title { color: #ebf5ff; }
body.light-theme .legal-title { color: #0e2a3a; }

.legal-subtitle {
  font-size: 1.05rem;
  opacity: 0.6;
  max-width: 560px;
  line-height: 1.7;
}
.legal-meta {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.legal-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  opacity: 0.5;
}
.legal-meta-item i { font-size: 0.7rem; }

.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: 100px;
}
.legal-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.dark-theme .legal-section-title { color: #d3eaff; }
body.light-theme .legal-section-title { color: #0e2a3a; }

.legal-section-title .section-num {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
body.dark-theme .section-num { background: rgba(100,180,255,0.12); color: #6fb6ff; }
body.light-theme .section-num { background: rgba(15,76,92,0.08); color: #0f4c5c; }

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.85;
  opacity: 0.75;
  margin-bottom: 16px;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul, .legal-section ol {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.legal-section ul li, .legal-section ol li {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.75;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.legal-section ul li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 9px;
}
body.dark-theme .legal-section ul li::before { background: #3a7fd6; }
body.light-theme .legal-section ul li::before { background: #0f4c5c; }

.legal-section ol { counter-reset: ol-counter; }
.legal-section ol li { counter-increment: ol-counter; }
.legal-section ol li::before {
  content: counter(ol-counter) '.';
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  min-width: 20px;
}
body.dark-theme .legal-section ol li::before { color: #4a9eff; }
body.light-theme .legal-section ol li::before { color: #0f4c5c; }

.legal-callout {
  border-radius: 16px;
  padding: 20px 24px;
  border: 1px solid;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
body.dark-theme .legal-callout { background: rgba(100,180,255,0.06); border-color: rgba(100,180,255,0.15); }
body.light-theme .legal-callout { background: rgba(15,76,92,0.04); border-color: rgba(15,76,92,0.14); }
.callout-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
body.dark-theme .callout-icon { color: #6fb6ff; }
body.light-theme .callout-icon { color: #0f4c5c; }
.legal-callout p { opacity: 0.75; font-size: 0.92rem; line-height: 1.7; margin: 0; }

.legal-section a { color: inherit; opacity: 0.9; }
body.dark-theme .legal-section a { color: #6fb6ff; }
body.light-theme .legal-section a { color: #0f4c5c; }

.section-divider {
  height: 1px;
  border: none;
  margin-bottom: 56px;
}
body.dark-theme .section-divider { background: rgba(100,180,255,0.07); }
body.light-theme .section-divider { background: rgba(0,0,0,0.06); }

/* ── Footer ── */
.footer {
  padding: 70px 0 0;
  margin-top: 0;
}
body.dark-theme .footer { background: #060d16; border-top: 1px solid #142233; }
body.light-theme .footer { background: #0c1e2e; color: #a0bcd4; border-top: none; }

.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 60px;
}
.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  color: #ffffff;
}
.footer-col p { margin: 16px 0 24px; font-size: 0.95rem; line-height: 1.7; color: #7ea3bc; }
.footer-col a {
  display: block;
  text-decoration: none;
  margin-bottom: 12px;
  font-size: 0.95rem;
  transition: opacity 0.2s, color 0.2s;
  color: #9dbcd4;
}
.footer-col a:hover { opacity: 1; color: white; }
.social-icons { display: flex; gap: 20px; font-size: 1.3rem; }
.social-icons i { cursor: pointer; transition: color 0.2s; color: #7fb4d0; }
.social-icons i:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 28px 32px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 0.85rem; color: #6b95af; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 0.85rem; text-decoration: none; transition: color 0.2s; color: #6b95af; }
.footer-legal a:hover { color: white; }

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  transform: translateY(120px);
  z-index: 9000;
  max-width: 360px;
  width: calc(100% - 48px);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.4s cubic-bezier(0.34,1.3,0.64,1), opacity 0.3s ease;
  opacity: 0;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.cookie-banner.visible { transform: translateY(0); opacity: 1; }
body.light-theme .cookie-banner { background: white; border: 1px solid #cde0ec; }
body.dark-theme .cookie-banner { background: #0e2033; border: 1px solid #2a5070; }
.cookie-icon { font-size: 1.8rem; }
.cookie-text strong { font-size: 0.95rem; font-weight: 600; display: block; margin-bottom: 3px; }
.cookie-text p { font-size: 0.82rem; opacity: 0.6; line-height: 1.4; }
.cookie-text a { color: inherit; text-decoration: underline; opacity: 0.75; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn {
  border-radius: 40px;
  padding: 9px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.18s;
  font-family: inherit;
}
.cookie-accept { background: #0f4c5c; color: white; border-color: #0f4c5c; }
.cookie-accept:hover { background: #196b80; border-color: #196b80; }
body.dark-theme .cookie-accept { background: #1a6a8a; border-color: #2a7aa0; }
body.dark-theme .cookie-accept:hover { background: #1f7da0; }
.cookie-decline { background: transparent; border-color: currentColor; opacity: 0.5; }
.cookie-decline:hover { opacity: 0.85; }

@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; }
  .legal-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .legal-title { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
}
