/* Jumpbook — Privacy Policy
   Palette matches the app's own dark theme (see app_colors_x.dart):
   pure-black background, steel-blue accent (#6B8EAC), iOS-style grays. */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #000000;
  --surface: #111318;
  --surface-2: #171a21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f2f4;
  --text-secondary: #9a9aa2;
  --text-tertiary: #6c6c76;
  --accent: #6B8EAC;
  --accent-hover: #7FA3C0;
  --accent-tint: rgba(107, 142, 172, 0.12);
  --accent-tint-strong: rgba(107, 142, 172, 0.22);
  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --maxw: 760px;
  --radius: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(107, 142, 172, 0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* ── Progress bar ─────────────────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 2000;
  transition: width 0.1s ease-out;
}

/* ── Top bar ──────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05em;
  color: var(--text);
  text-decoration: none;
}

.brand svg {
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-link,
.toc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--accent-tint);
  color: var(--accent-hover);
  text-decoration: none;
  border: 1px solid rgba(107, 142, 172, 0.35);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.toc-toggle svg {
  flex-shrink: 0;
}

.lang-link:hover,
.toc-toggle:hover {
  background: var(--accent);
  color: #fff;
}

.toc-toggle {
  display: none;
}

/* ── Layout ───────────────────────────────────────────────────────── */
.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 240px minmax(0, var(--maxw));
  gap: 56px;
  align-items: start;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  grid-column: 1 / -1;
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2em, 5vw, 2.8em);
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 640px;
}

.hero .tagline {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 1.05em;
  max-width: 560px;
}

.hero .last-updated {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-tertiary);
  font-size: 0.85em;
}

/* ── TOC sidebar ──────────────────────────────────────────────────── */
.toc-wrap {
  position: sticky;
  top: 84px;
  align-self: start;
}

.toc-label {
  font-family: var(--font-display);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.toc {
  list-style: none;
  border-left: 1px solid var(--border);
}

.toc li a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc li a:hover {
  color: var(--text);
}

.toc li a.active {
  color: var(--accent-hover);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ── Content ──────────────────────────────────────────────────────── */
main {
  min-width: 0;
  padding-bottom: 80px;
}

.summary-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 48px;
}

.summary-box .summary-label {
  font-family: var(--font-display);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 14px;
}

.summary-box ul {
  list-style: none;
}

.summary-box li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 0.95em;
}

.summary-box li:last-child {
  margin-bottom: 0;
}

.summary-box li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

section {
  scroll-margin-top: 84px;
  padding-top: 8px;
  margin-bottom: 56px;
}

section:last-of-type {
  margin-bottom: 0;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5em;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08em;
  color: var(--accent-hover);
  margin-top: 30px;
  margin-bottom: 12px;
}

h3:first-child {
  margin-top: 0;
}

p {
  margin-bottom: 15px;
  color: var(--text-secondary);
}

ul,
ol {
  margin: 0 0 20px 22px;
}

li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  padding-left: 4px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--accent-hover);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 163, 192, 0.35);
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--accent-hover);
}

.highlight-box {
  background: var(--accent-tint);
  border: 1px solid rgba(107, 142, 172, 0.3);
  padding: 18px 22px;
  margin: 20px 0;
  border-radius: 10px;
}

.highlight-box p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 0.95em;
}

.highlight-box p+p {
  margin-top: 10px;
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 32px;
  margin: 20px 0;
  border-radius: var(--radius);
  text-align: center;
}

.contact-box h2 {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-box a {
  font-size: 1.1em;
  font-weight: 600;
  border-bottom-width: 2px;
}

/* ── Back to top ──────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
}

footer {
  text-align: center;
  padding: 36px 24px 48px;
  color: var(--text-tertiary);
  font-size: 0.85em;
  border-top: 1px solid var(--border);
}

/* ── Mobile TOC (collapsible) ─────────────────────────────────────── */
.mobile-toc {
  display: none;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc-wrap {
    display: none;
  }

  .toc-toggle {
    display: inline-flex;
  }

  .mobile-toc {
    display: block;
    grid-column: 1 / -1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 20px 0 40px;
    overflow: hidden;
  }

  .mobile-toc[data-open="false"] .toc {
    display: none;
  }

  .mobile-toc .toc {
    border-left: none;
    padding: 4px 20px 16px;
  }

  .mobile-toc .toc li a {
    padding: 9px 0;
  }

  .hero {
    padding: 40px 0 28px;
  }
}

@media (max-width: 560px) {
  .layout {
    padding: 0 18px;
  }

  .topbar {
    padding: 12px 16px;
  }

  main {
    padding-bottom: 60px;
  }

  .summary-box,
  .contact-box {
    padding: 22px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }

  .toc-toggle .label {
    display: none;
  }

  .toc-toggle {
    padding: 9px;
  }
}
