/* ==========================================================================
   Ficverse — ficverseapp.com
   Design tokens mirror the iOS app (DesignSystem/Tokens/Brand.swift):
   turquoise primary + coral accent, light/dark adaptive.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --primary: #0FA8A0;
  --primary-strong: #0B857F;
  --primary-soft: rgba(15, 168, 160, .10);
  --primary-line: rgba(15, 168, 160, .28);
  --accent: #FF6B5E;
  --accent-soft: rgba(255, 107, 94, .12);

  --ink: #13201F;
  --ink-2: #40514F;
  --ink-3: #6C7D7B;
  --surface: #F4FAF9;
  --surface-2: #FFFFFF;
  --bg: #FFFFFF;
  --line: rgba(19, 32, 31, .10);
  --line-strong: rgba(19, 32, 31, .16);

  --shadow-s: 0 1px 2px rgba(19, 32, 31, .05), 0 4px 12px rgba(19, 32, 31, .05);
  --shadow-m: 0 2px 6px rgba(19, 32, 31, .06), 0 18px 40px rgba(19, 32, 31, .09);
  --shadow-l: 0 30px 80px rgba(11, 78, 74, .18);
  --bezel: #10201F;

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --r-xl: 28px;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "New York", Iowan Old Style, Palatino, "Palatino Linotype", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #3FD5C6;
    --primary-strong: #5FE3D6;
    --primary-soft: rgba(63, 213, 198, .12);
    --primary-line: rgba(63, 213, 198, .26);
    --accent: #FF8578;
    --accent-soft: rgba(255, 133, 120, .14);

    --ink: #E8F0EF;
    --ink-2: #AFC1BF;
    --ink-3: #869997;
    --surface: #14201F;
    --surface-2: #182726;
    --bg: #0E1514;
    --line: rgba(232, 240, 239, .10);
    --line-strong: rgba(232, 240, 239, .18);

    --shadow-s: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .28);
    --shadow-m: 0 2px 6px rgba(0, 0, 0, .34), 0 18px 40px rgba(0, 0, 0, .40);
    --shadow-l: 0 30px 80px rgba(0, 0, 0, .55);
    --bezel: #263634;
  }
}

:root[data-theme="dark"] {
  --primary: #3FD5C6;
  --primary-strong: #5FE3D6;
  --primary-soft: rgba(63, 213, 198, .12);
  --primary-line: rgba(63, 213, 198, .26);
  --accent: #FF8578;
  --accent-soft: rgba(255, 133, 120, .14);

  --ink: #E8F0EF;
  --ink-2: #AFC1BF;
  --ink-3: #869997;
  --surface: #14201F;
  --surface-2: #182726;
  --bg: #0E1514;
  --line: rgba(232, 240, 239, .10);
  --line-strong: rgba(232, 240, 239, .18);

  --shadow-s: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .28);
  --shadow-m: 0 2px 6px rgba(0, 0, 0, .34), 0 18px 40px rgba(0, 0, 0, .40);
  --shadow-l: 0 30px 80px rgba(0, 0, 0, .55);
  --bezel: #263634;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.022em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.1rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.85rem, 3.9vw, 2.75rem); letter-spacing: -.028em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 820px; }

section { padding-block: clamp(60px, 9vw, 116px); }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--r-s) 0; font-weight: 600;
}
.skip:focus { left: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 18px; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; margin-right: auto; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand:hover { opacity: .85; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink-2); font-size: .935rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--primary-soft); }

.nav-tools { display: flex; align-items: center; gap: 8px; }

.lang-switch { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch a {
  text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); padding: 5px 11px; border-radius: 999px; transition: all .18s ease;
}
.lang-switch a[aria-current="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-s); }
.lang-switch a:not([aria-current="true"]):hover { color: var(--ink); }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; color: var(--ink-2); transition: all .18s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 66px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 22px; box-shadow: var(--shadow-m);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .2s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { display: block; padding: 12px 14px; font-size: 1.02rem; }
  .nav-toggle { display: grid; order: 3; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .97rem; text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: #06201F; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 32%, transparent); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-1px); box-shadow: 0 10px 26px color-mix(in srgb, var(--primary) 40%, transparent); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-sm { padding: 9px 17px; font-size: .89rem; }
.btn[aria-disabled="true"] { cursor: default; opacity: .95; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* Fake App Store badge — coming soon state */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 22px 11px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  text-decoration: none; position: relative;
}
.store-badge .apple { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-badge .txt { display: grid; text-align: left; line-height: 1.15; }
.store-badge .txt small { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; opacity: .72; }
.store-badge .txt strong { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.store-badge[aria-disabled="true"] { opacity: .92; cursor: default; }

/* ---------- Pills & chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  color: var(--primary); font-size: .8rem; font-weight: 650; letter-spacing: .01em;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 60%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }

.chip {
  display: inline-block; padding: 5px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-2); font-weight: 500;
}
.chip.tag::before { content: "#"; opacity: .5; margin-right: 1px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(52px, 8vw, 96px) clamp(60px, 8vw, 100px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -30% -10% auto -10%; height: 720px;
  background:
    radial-gradient(48% 46% at 18% 34%, color-mix(in srgb, var(--primary) 26%, transparent) 0%, transparent 68%),
    radial-gradient(42% 40% at 82% 18%, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 66%),
    radial-gradient(40% 44% at 60% 72%, color-mix(in srgb, var(--primary) 13%, transparent) 0%, transparent 70%);
  filter: blur(10px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: clamp(30px, 5vw, 64px); align-items: center; }
.hero h1 { margin: 18px 0 0; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary) 8%, var(--accent) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(1.06rem, 1.5vw, 1.22rem); color: var(--ink-2); margin-top: 20px; max-width: 33em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.hero-note { font-size: .85rem; color: var(--ink-3); margin-top: 16px; }
.hero-note svg { width: 15px; height: 15px; color: var(--primary); display: inline-block; vertical-align: -2px; margin-right: 6px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* ---------- Phone mockup ---------- */
.hero-visual { display: flex; justify-content: center; perspective: 1400px; }
.phone {
  width: min(300px, 78vw); aspect-ratio: 393 / 852; flex: none;
  background: var(--bg); border-radius: 44px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 10px var(--bezel), var(--shadow-l);
  padding: 12px 11px; position: relative; overflow: hidden;
  transform: rotate(-1.4deg);
}
.phone::after {
  content: ""; position: absolute; top: 13px; left: 50%; translate: -50% 0;
  width: 84px; height: 24px; border-radius: 999px; background: var(--bezel); z-index: 4;
}
.screen { height: 100%; border-radius: 34px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.screen-top { padding: 44px 16px 10px; }
.screen-title { font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.02em; }
.screen-sub { font-size: .7rem; color: var(--ink-3); margin-top: 2px; }
.screen-body { flex: 1; overflow: hidden; padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 10px; }

.m-search { display: flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: .74rem; color: var(--ink-3); }
.m-search svg { width: 13px; height: 13px; flex: none; }

.m-fandom { display: flex; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.m-poster { width: 46px; height: 66px; flex: none; border-radius: 7px; background: linear-gradient(155deg, var(--primary) 0%, #0B6B7E 55%, var(--accent) 130%); position: relative; overflow: hidden; }
.m-poster::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 50% at 30% 20%, rgba(255,255,255,.28), transparent 70%); }
.m-fandom-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.m-fandom-meta b { font-size: .82rem; letter-spacing: -.01em; }
.m-fandom-meta span { font-size: .66rem; color: var(--ink-3); line-height: 1.35; }
.m-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.m-tag { font-size: .58rem; padding: 2.5px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.m-row-label { font-size: .64rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }

.m-story { display: flex; gap: 9px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.m-cover { width: 34px; height: 48px; flex: none; border-radius: 6px; }
.m-cover.a { background: linear-gradient(160deg, #143F4D, var(--primary)); }
.m-cover.b { background: linear-gradient(160deg, #4A1E3B, var(--accent)); }
.m-cover.c { background: linear-gradient(160deg, #1D3F2E, #55C08E); }
.m-story-meta { min-width: 0; flex: 1; }
.m-story-meta b { display: block; font-size: .74rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-story-meta span { font-size: .62rem; color: var(--ink-3); }
.m-stats { display: flex; gap: 8px; margin-top: 4px; font-size: .58rem; color: var(--ink-3); }
.m-stats i { font-style: normal; color: var(--accent); }

.m-tabbar { display: flex; justify-content: space-around; padding: 9px 6px 14px; border-top: 1px solid var(--line); background: var(--bg); }
.m-tabbar span { width: 17px; height: 17px; border-radius: 5px; background: var(--ink-3); opacity: .3; }
.m-tabbar span.on { background: var(--primary); opacity: 1; }

/* Reader variant */
.screen.reader { background: #FBF6EC; color: #2A2118; }
.screen.reader .reader-head { display: flex; align-items: center; justify-content: space-between; padding: 42px 18px 8px; font-size: .62rem; color: #857A69; }
.screen.reader .reader-body { padding: 6px 20px; font-family: var(--font-serif); font-size: .72rem; line-height: 1.72; }
.screen.reader .reader-body p { margin-bottom: 9px; }
.screen.reader .hl { background: color-mix(in srgb, #0FA8A0 20%, transparent); border-radius: 3px; padding: 0 2px; }
.screen.reader .reader-note { margin: 8px 0 0; padding: 8px 10px; background: #fff; border: 1px solid #E7DDCB; border-radius: 10px; font-family: var(--font); font-size: .6rem; color: #6C6153; }
.screen.reader .reader-note b { display: block; color: #2A2118; font-size: .62rem; margin-bottom: 2px; }
.screen.reader .reader-progress { margin-top: auto; padding: 10px 18px 16px; }
.screen.reader .bar { height: 3px; border-radius: 3px; background: #E7DDCB; overflow: hidden; }
.screen.reader .bar i { display: block; height: 100%; width: 62%; background: #0FA8A0; }

/* ---------- Logos / trust strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--surface); padding-block: 22px; }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 34px; }
.strip-item { display: inline-flex; align-items: center; gap: 9px; font-size: .87rem; color: var(--ink-2); font-weight: 500; }
.strip-item svg { width: 17px; height: 17px; color: var(--primary); flex: none; }

/* ---------- Section heading ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head p { color: var(--ink-2); font-size: 1.06rem; margin-top: 16px; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 26px 24px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--primary-line); }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--ink-2); font-size: .96rem; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-line);
}
.card .ico svg { width: 21px; height: 21px; }
.card.coral .ico { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 26%, transparent); }

.card ul { margin: 14px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.card ul li { position: relative; padding-left: 24px; font-size: .92rem; color: var(--ink-2); }
.card ul li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); opacity: .55;
}

/* ---------- Split feature rows ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(30px, 5vw, 68px); align-items: center; }
.split + .split { margin-top: clamp(56px, 8vw, 104px); }
.split.rev .split-media { order: -1; }
@media (max-width: 760px) { .split.rev .split-media { order: 0; } }
.split h2 { margin-bottom: 18px; }
.split p { color: var(--ink-2); }
.split .feat-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.split .feat-list li { display: flex; gap: 12px; align-items: flex-start; }
.split .feat-list svg { width: 20px; height: 20px; flex: none; color: var(--primary); margin-top: 3px; }
.split .feat-list b { display: block; font-size: .98rem; }
.split .feat-list span { color: var(--ink-2); font-size: .93rem; }
.split-media { display: flex; justify-content: center; }

/* Panel mock (used in split rows) */
.panel {
  width: 100%; max-width: 460px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-m); overflow: hidden;
}
.panel-bar { display: flex; align-items: center; gap: 6px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.panel-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.panel-bar b { margin-left: 8px; font-size: .74rem; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.panel-body { padding: 20px; display: grid; gap: 12px; }

.editor-line { height: 9px; border-radius: 5px; background: var(--line); }
.editor-line.w90 { width: 90%; } .editor-line.w70 { width: 70%; } .editor-line.w80 { width: 80%; } .editor-line.w55 { width: 55%; }
.editor-line.accent { background: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.editor-toolbar span {
  min-width: 30px; height: 30px; padding-inline: 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .8rem; color: var(--ink-2); font-weight: 700;
}
.editor-toolbar span.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.setting-row:last-child { border-bottom: 0; }
.setting-row span { color: var(--ink-2); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
.seg i { font-style: normal; font-size: .74rem; padding: 4px 9px; border-radius: 7px; color: var(--ink-3); }
.seg i.on { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-s); font-weight: 600; }
.switch { width: 42px; height: 25px; border-radius: 999px; background: var(--primary); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2.5px; right: 2.5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-s); }
.switch.off { background: var(--line-strong); }
.switch.off::after { right: auto; left: 2.5px; }

/* ---------- Safety band ---------- */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .card { background: var(--bg); }

/* ---------- Stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 34px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; letter-spacing: -.03em; color: var(--primary); line-height: 1.1; }
.stat span { font-size: .87rem; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; margin-inline: auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 4px 20px; transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--primary-line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-weight: 600; position: relative; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  translate: 0 -60%; rotate: 45deg; transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: -135deg; translate: 0 -20%; }
.faq .a { padding: 0 0 18px; color: var(--ink-2); font-size: .96rem; }
.faq .a p + p { margin-top: 10px; }

/* ---------- CTA ---------- */
.cta-box {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid var(--primary-line);
  background:
    radial-gradient(80% 130% at 12% 0%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 62%),
    radial-gradient(70% 120% at 92% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--surface);
  padding: clamp(38px, 6vw, 68px) clamp(24px, 5vw, 60px); text-align: center;
}
.cta-box h2 { margin-bottom: 14px; }
.cta-box p { color: var(--ink-2); max-width: 52ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 54px 34px; }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 34px; }
.footer-about p { color: var(--ink-3); font-size: .9rem; margin-top: 14px; max-width: 34ch; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 14px; font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  font-size: .82rem; color: var(--ink-3);
}
.tmdb-note { max-width: 62ch; line-height: 1.55; }
.tmdb-note a { color: var(--ink-2); }

/* ---------- Legal pages ---------- */
.legal-hero { padding-block: clamp(44px, 6vw, 76px) 26px; border-bottom: 1px solid var(--line); background: var(--surface); }
.legal-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: .87rem; color: var(--ink-3); }
.legal-meta b { color: var(--ink-2); font-weight: 600; }

.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; padding-block: clamp(36px, 5vw, 60px); max-width: 1260px; }
@media (max-width: 940px) { .legal-layout { grid-template-columns: 1fr; } .toc { position: static !important; max-height: none !important; } }

.toc {
  position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m); padding: 18px 16px;
}
.toc h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 12px; font-weight: 700; font-family: var(--font); }
.toc ol { list-style: none; counter-reset: toc; padding: 0; display: grid; gap: 2px; margin: 0; }
.toc li { counter-increment: toc; }
.toc a {
  display: block; text-decoration: none; color: var(--ink-2); font-size: .855rem; line-height: 1.35;
  padding: 6px 8px; border-radius: 7px; border-left: 2px solid transparent;
}
.toc a::before { content: counter(toc) ". "; color: var(--ink-3); }
.toc a:hover { background: var(--primary-soft); color: var(--ink); }
.toc a.active { color: var(--primary); background: var(--primary-soft); border-left-color: var(--primary); font-weight: 600; }

.legal { font-size: 1rem; }
.legal .summary-box {
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  border-radius: var(--r-m); padding: 22px 24px; margin-bottom: 40px;
}
.legal .summary-box h2 { font-size: 1.12rem; margin-bottom: 12px; }
.legal .summary-box ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.legal .summary-box li { color: var(--ink-2); font-size: .95rem; }
.legal .summary-box p { font-size: .86rem; color: var(--ink-3); margin-top: 14px; }

.legal h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 46px; margin-bottom: 14px;
  padding-top: 14px; scroll-margin-top: 90px;
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; }
.legal h3 { font-size: 1.05rem; margin-top: 26px; margin-bottom: 8px; }
.legal p { margin-bottom: 14px; color: var(--ink-2); }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; }
.legal li { color: var(--ink-2); }
.legal li > ul, .legal li > ol { margin-top: 8px; margin-bottom: 0; }
.legal strong { color: var(--ink); font-weight: 650; }
.legal a { color: var(--primary); text-underline-offset: 3px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.legal .callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 16px 20px; border-radius: 0 var(--r-s) var(--r-s) 0; margin: 20px 0;
}
.legal .callout p:last-child { margin-bottom: 0; }
.legal .callout strong { color: var(--ink); }

.table-scroll { overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--r-m); }
.legal table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9rem; }
/* Three- and four-column tables need real width; they scroll inside .table-scroll
   on narrow screens rather than compressing every cell into a word ladder. */
.legal .table-wide table { min-width: 800px; }
.legal .table-wide td:first-child { white-space: normal; min-width: 150px; }
.legal th, .legal td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal thead th { background: var(--surface); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.legal tbody tr:last-child td { border-bottom: 0; }
.legal td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 22px 24px; margin-top: 20px;
}
.contact-card ul { list-style: none; padding: 0; display: grid; gap: 10px; margin: 0; }
.contact-card li { display: flex; gap: 10px; flex-wrap: wrap; font-size: .95rem; }
.contact-card b { min-width: 130px; color: var(--ink); }

/* ---------- 404 ---------- */
.center-page { min-height: 68vh; display: grid; place-items: center; text-align: center; }
.center-page p { color: var(--ink-2); margin: 16px 0 28px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .toc, .skip { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .legal-layout { display: block; }
  .legal a { color: #000; text-decoration: underline; }
}
