/* =====================================================================
   Sec+ Pass — "Cyber / SOC" (Security Operations Centre)
   Near-black grounds · cyber-cyan primary · restrained alert-red ·
   sparing matrix-green · JetBrains Mono (labels/figures) + Inter (UI)
   Dark is the primary theme.
   ===================================================================== */

/* ---------- Design tokens: DARK (primary / lead) ---------- */
:root {
  --bg:          #080f18;
  --bg-2:        #0a1420;
  --surface:     #0f1b2a;
  --surface-2:   #0c1521;
  --surface-3:   #142335;
  --sunk:        #060c14;

  --text:        #e8eff8;
  --text-muted:  #97a9c0;
  --text-faint:  #61758f;

  --cyan:        #2ee6ff;
  --cyan-bright: #6ef2ff;
  --cyan-600:    #17c3e6;
  --cyan-700:    #0d93b0;

  --primary:     var(--cyan);
  --primary-600: var(--cyan-600);
  --primary-700: var(--cyan-700);
  --on-primary:  #04131d;

  --accent:      #ff4d64;      /* alert red — restrained */
  --accent-600:  #ff6a7d;
  --matrix:      #34f5a0;      /* matrix green — sparing */

  --line:        rgba(46,230,255,.16);
  --line-strong: rgba(46,230,255,.34);
  --border:      #1b2b3f;
  --border-2:    #263a53;

  --ok:          #34f5a0;
  --ok-bg:       rgba(52,245,160,.11);
  --bad:         #ff5f72;
  --bad-bg:      rgba(255,95,114,.12);
  --warn:        #f5c451;

  --grid:        rgba(46,230,255,.045);
  --glow:        rgba(46,230,255,.35);

  --shadow-sm:   0 1px 2px rgba(0,0,0,.5);
  --shadow-md:   0 14px 34px -16px rgba(0,0,0,.72);
  --shadow-lg:   0 30px 70px -30px rgba(0,0,0,.82);
  --glow-sm:     0 0 0 1px rgba(46,230,255,.16), 0 8px 26px -12px rgba(46,230,255,.30);

  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 22px;

  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --maxw: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Design tokens: LIGHT (secondary — clean & legible) ---------- */
[data-theme="light"] {
  --bg:          #eef2f7;
  --bg-2:        #e6ecf3;
  --surface:     #ffffff;
  --surface-2:   #f2f6fb;
  --surface-3:   #e9f0f8;
  --sunk:        #e2e9f2;

  --text:        #0e1c2b;
  --text-muted:  #4c6076;
  --text-faint:  #74889d;

  --cyan:        #0e7490;      /* deepened so it reads on white */
  --cyan-bright: #0891b2;
  --cyan-600:    #0e7490;
  --cyan-700:    #155e75;

  --primary:     #0e7490;
  --primary-600: #0b6a83;
  --primary-700: #0c4a5f;
  --on-primary:  #f2fbff;

  --accent:      #d92544;
  --accent-600:  #b91d38;
  --matrix:      #0a9d63;

  --line:        rgba(14,116,144,.22);
  --line-strong: rgba(14,116,144,.42);
  --border:      #d3dde9;
  --border-2:    #bccbdd;

  --ok:          #0a9d63;
  --ok-bg:       rgba(10,157,99,.10);
  --bad:         #d92544;
  --bad-bg:      rgba(217,37,68,.09);
  --warn:        #b5821a;

  --grid:        rgba(14,116,144,.05);
  --glow:        rgba(14,116,144,.22);

  --shadow-sm:   0 1px 2px rgba(20,40,60,.07);
  --shadow-md:   0 12px 30px -16px rgba(20,45,70,.28);
  --shadow-lg:   0 28px 64px -30px rgba(20,45,70,.34);
  --glow-sm:     0 1px 2px rgba(20,40,60,.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 560px at 50% -12%, var(--glow), transparent 60%),
    radial-gradient(760px 460px at 100% 0%, rgba(52,245,160,.05), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: var(--sans); font-weight: 700; color: var(--text);
  line-height: 1.14; letter-spacing: -.018em; margin: 0; text-wrap: balance;
}

a { color: var(--primary); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
em { font-style: italic; color: var(--cyan-bright); }
[data-theme="light"] em { color: var(--cyan-700); }
::selection { background: rgba(46,230,255,.24); color: #fff; }

/* ---------- Utility state classes (JS-driven) ---------- */
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* Shared mono micro-label */
.hero-eyebrow, .lp-eyebrow, .sample-tag, .q-source, .section-title,
.exam-facts span, .lp-stat span, .hero-stat span, .stat span,
.lp-trust li, .trade-badge, .hist-mode, .upgrade-badge, .lp-plan-badge,
.foot-col h5, .bi-label { font-family: var(--mono); }

/* =====================================================================
   Topbar
   ===================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 13px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand .logo { display: inline-flex; filter: drop-shadow(0 0 10px rgba(46,230,255,.28)); }
.brand .logo svg { display: block; border-radius: 11px; }
.brand h1 { font-size: 1.22rem; letter-spacing: -.01em; line-height: 1.05; font-weight: 800; }
.brand-pass { color: var(--cyan); }
[data-theme="light"] .brand-pass { color: var(--cyan-700); }
.brand p {
  margin: 3px 0 0; font-family: var(--mono);
  font-size: .66rem; color: var(--text-muted);
  letter-spacing: .06em; text-transform: uppercase;
}

nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: .89rem; font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px; border-radius: var(--r-sm); position: relative;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-btn.active { color: var(--cyan); }
[data-theme="light"] .nav-btn.active { color: var(--cyan-700); }
.nav-btn.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
  box-shadow: 0 0 8px var(--glow);
}

.auth-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-chip {
  font-size: .82rem; color: var(--text-muted);
  padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-family: var(--mono);
}
.plan-badge.premium {
  font-family: var(--mono);
  font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  color: var(--on-primary); padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  border: 1px solid var(--cyan-600); box-shadow: 0 0 12px -2px var(--glow);
}
.admin-link { text-decoration: none; }

/* Theme toggle */
.theme-toggle {
  appearance: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); font-size: 1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.theme-toggle:hover { border-color: var(--cyan); transform: rotate(-8deg); box-shadow: 0 0 0 3px rgba(46,230,255,.14); }
.theme-ico { display: none; }
[data-theme="light"] .theme-ico-moon { display: inline; }
[data-theme="dark"]  .theme-ico-sun  { display: inline; }
:root:not([data-theme="light"]) .theme-ico-sun { display: inline; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: .005em;
  padding: 12px 22px; border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform .16s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease);
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.btn-sm { padding: 8px 14px; font-size: .84rem; }

.btn.primary {
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan) 55%, var(--cyan-600));
  color: var(--on-primary);
  border-color: color-mix(in srgb, var(--cyan-700) 60%, transparent);
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn.primary:active:not(:disabled) { transform: translateY(0); }

.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn.ghost:hover:not(:disabled) { border-color: var(--cyan); background: var(--surface-2); transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(46,230,255,.10); }

.btn:focus-visible, .nav-btn:focus-visible, .theme-toggle:focus-visible,
.option:focus-visible, .linklike:focus-visible, .pw-toggle:focus-visible,
.foot-link:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}

.linklike {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--primary); font: inherit; font-weight: 600;
  padding: 0; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.linklike:hover { color: var(--cyan-bright); }
[data-theme="light"] .linklike:hover { color: var(--cyan-700); }

.back {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--text-muted); font-family: var(--mono); font-size: .84rem; font-weight: 500;
  padding: 6px 2px; margin-bottom: 8px; transition: color .16s var(--ease);
}
.back:hover { color: var(--cyan); }

/* Spinner */
.btn-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   App shell / views
   ===================================================================== */
#app {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px) 72px;
}
.view { display: none; animation: viewIn .4s var(--ease); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section-title {
  font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 14px; margin: 34px 0 18px;
}
.section-title::before { content: "▍"; color: var(--cyan); letter-spacing: 0; }
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.view-intro { color: var(--text-muted); max-width: 64ch; margin: 6px 0 20px; }
.view h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 4px; }

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(46,230,255,.06), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow-md);
  position: relative;
}
.hero > * { position: relative; z-index: 1; }
.hero h2 { font-size: clamp(1.85rem, 4.4vw, 2.8rem); margin-bottom: 12px; font-weight: 800; }
.hero p { color: var(--text-muted); font-size: 1.06rem; max-width: 62ch; margin: 0; }
.hero strong { color: var(--text); }
[data-theme="dark"] .hero strong, :root:not([data-theme="light"]) .hero strong { color: var(--cyan-bright); font-weight: 600; }

/* Landing hero = centred, framed, grid + radar crest */
.hero-trades {
  text-align: center;
  padding: clamp(40px, 6vw, 74px) clamp(24px, 5vw, 64px);
  overflow: hidden;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.hero-trades::after {
  content: ""; position: absolute; inset: 12px;
  border: 1px solid var(--line); border-radius: calc(var(--r-xl) - 10px);
  pointer-events: none; z-index: 1;
}
/* faint SOC grid + scanline field */
.hero-trades::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .6;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(46,230,255,.05) 0 1px, transparent 1px 4px);
  background-size: 40px 40px, 40px 40px, 100% 4px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 34%, #000 18%, transparent 76%);
  mask-image: radial-gradient(120% 100% at 50% 34%, #000 18%, transparent 76%);
}
.hero-trades h2, .hero-trades p { margin-left: auto; margin-right: auto; }
.hero-trades p { font-size: 1.12rem; }
.hero-eyebrow {
  display: inline-block; font-size: .7rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--cyan);
  padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--cyan) 8%, transparent);
}
[data-theme="light"] .hero-eyebrow { color: var(--cyan-700); }

.crest { display: block; margin: 22px auto 14px; color: var(--cyan); line-height: 0; }
.crest-svg { filter: drop-shadow(0 0 14px rgba(46,230,255,.4)); }
.crest-key { fill: var(--surface); }
.crest-sweep { transform-origin: 100px 100px; animation: sweep 6s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* Hero stat trio */
.hero-stats {
  display: inline-grid; grid-auto-flow: column; gap: clamp(18px, 5vw, 44px);
  margin: 26px auto 4px; padding: 16px clamp(18px, 4vw, 34px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}
.hero-stat { text-align: center; position: relative; }
.hero-stat + .hero-stat::before {
  content: ""; position: absolute; left: calc(-1 * clamp(9px, 2.5vw, 22px)); top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.hero-stat b {
  display: block; font-family: var(--mono); font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.3rem); color: var(--cyan); line-height: 1;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(46,230,255,.3);
}
[data-theme="light"] .hero-stat b { color: var(--cyan-700); text-shadow: none; }
.hero-stat span {
  display: block; margin-top: 7px; font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-faint);
}

/* CTA row */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* =====================================================================
   Trade card (landing CTA — the "console" tile)
   ===================================================================== */
.trade-grid, .cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.trade-card {
  appearance: none; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 34px 26px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  font-family: var(--sans);
}
.trade-card::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .5; transition: opacity .2s var(--ease);
}
.trade-card.live:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -22px var(--glow); border-color: var(--cyan); }
.trade-card.live:hover::before { opacity: 1; }
.trade-card.soon { opacity: .68; cursor: default; }
.trade-card:disabled { cursor: default; }

.trade-icon {
  font-size: 1.9rem; line-height: 1;
  width: 72px; height: 72px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, var(--surface-3), var(--surface));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 4px var(--surface), 0 0 20px -6px var(--glow);
}
.trade-name { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.trade-tagline { color: var(--text-muted); font-size: .98rem; max-width: 30ch; }
.trade-badge {
  margin-top: 6px; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.trade-badge.live {
  color: var(--on-primary);
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  box-shadow: 0 0 16px -4px var(--glow);
}
.trade-badge.soon { color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); }

/* =====================================================================
   Cards (mock, setup, generic)
   ===================================================================== */
.card, .mock-card, .setup-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); position: relative;
}
.mock-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-top: 2px solid var(--cyan);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.mock-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px var(--glow); border-color: var(--border-2); border-top-color: var(--cyan); }
.mock-card h4 { font-size: 1.28rem; margin-bottom: 6px; font-weight: 700; }
.mock-card p { color: var(--text-muted); margin: 0 0 18px; font-size: .95rem; }

.exam-facts {
  list-style: none; margin: 0 0 20px; padding: 16px 0; display: flex; gap: 8px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.exam-facts li { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.exam-facts li + li { border-left: 1px solid var(--line); }
.exam-facts span { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.exam-facts b { font-family: var(--mono); font-size: 1.28rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.mock-card .btn { margin-top: auto; width: 100%; }

.trust-note {
  color: var(--ok); font-size: .92rem; font-weight: 500;
  background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  padding: 10px 16px; border-radius: var(--r-md); display: inline-block;
}

/* Setup form */
.setup-card { max-width: 520px; display: flex; flex-direction: column; gap: 18px; }
.setup-card small { color: var(--text-muted); margin-top: -6px; }

label { display: flex; flex-direction: column; gap: 7px; font-size: .9rem; font-weight: 500; color: var(--text-muted); }
input, select {
  font-family: var(--sans); font-size: 1rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  padding: 12px 14px; width: 100%;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46,230,255,.18); }
select { cursor: pointer; }
input::placeholder { color: var(--text-faint); }

/* =====================================================================
   Browse / Question Bank
   ===================================================================== */
.browse-controls { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.browse-controls input[type="search"] { flex: 2 1 260px; }
.browse-controls select { flex: 1 1 180px; }
.browse-count { color: var(--text-faint); font-size: .82rem; margin-bottom: 14px; font-family: var(--mono); }
.browse-list { display: grid; gap: 14px; }

.browse-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  border-left: 2px solid var(--cyan); padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.bi-q { font-size: 1.12rem; font-weight: 600; color: var(--text); margin-bottom: 10px; line-height: 1.4; }
.bi-a { margin-bottom: 8px; color: var(--text); font-weight: 500; }
.bi-label { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ok); margin-right: 6px; }
.bi-expl { color: var(--text-muted); font-size: .95rem; line-height: 1.55; padding-top: 8px; border-top: 1px dashed var(--line); }
.ai-note {
  font-family: var(--mono); font-size: .64rem; color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  padding: 1px 7px; border-radius: 999px; margin-left: 4px; letter-spacing: .04em;
}
.bi-tags, .review-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.topic-tag, .reg-tag {
  font-family: var(--mono); font-size: .68rem; font-weight: 500; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.reg-tag { color: var(--cyan); border-color: var(--line-strong); }
[data-theme="light"] .reg-tag { color: var(--cyan-700); }
.q-image { margin: 12px 0; }
.q-image img { max-width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); }

.browse-more-wrap { text-align: center; margin-top: 22px; }
.browse-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.browse-empty-ico { font-size: 2.6rem; color: var(--cyan); }
.browse-empty-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 10px 0 4px; }
.browse-empty-sub { font-size: .92rem; }

/* =====================================================================
   Quiz
   ===================================================================== */
.quiz-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.quiz-header .back { margin: 0; }
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 180px; }
.progress-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; }
#progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan-700), var(--cyan));
  box-shadow: 0 0 10px var(--glow);
  border-radius: 999px; transition: width .35s var(--ease);
}
#progress-fill.full { background: linear-gradient(90deg, var(--matrix), var(--cyan)); }
#progress-text { font-family: var(--mono); font-size: .88rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.timer {
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums;
  padding: 6px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
}
.timer.warn { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px -3px var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .72; } }

.question-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow-md); border-top: 2px solid var(--cyan);
}
.q-source { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.q-text { font-size: clamp(1.2rem, 3vw, 1.55rem); font-weight: 700; line-height: 1.36; color: var(--text); margin-bottom: 22px; letter-spacing: -.01em; }

.options { display: grid; gap: 12px; }
.option {
  appearance: none; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; width: 100%;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r-md);
  font-family: var(--sans); font-size: 1rem; color: var(--text);
  transition: border-color .16s var(--ease), background .16s var(--ease), transform .12s var(--ease), box-shadow .16s var(--ease);
}
.option:hover:not(.disabled) { border-color: var(--cyan); transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(46,230,255,.08); }
.letter {
  flex: none; width: 32px; height: 32px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: .92rem;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-muted);
  transition: inherit;
}
.option.selected { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, var(--bg-2)); }
.option.selected .letter { background: var(--cyan); border-color: var(--cyan); color: var(--on-primary); }
.option.disabled { cursor: default; }
.option.correct { border-color: var(--ok); background: var(--ok-bg); }
.option.correct .letter { background: var(--ok); border-color: var(--ok); color: #04131d; }
.option.incorrect { border-color: var(--bad); background: var(--bad-bg); }
.option.incorrect .letter { background: var(--bad); border-color: var(--bad); color: #fff; }

.feedback { margin-top: 20px; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); animation: viewIn .3s var(--ease); }
.verdict { font-weight: 700; font-size: 1.08rem; margin-bottom: 6px; font-family: var(--mono); }
.verdict.right { color: var(--ok); }
.verdict.wrong { color: var(--bad); }
.expl, .rexpl { color: var(--text-muted); font-size: .96rem; line-height: 1.55; }

.quiz-nav { display: flex; gap: 12px; margin-top: 24px; }
.quiz-nav .btn { flex: 1; }
#prev-q { flex: 0 0 auto; }

/* =====================================================================
   Results
   ===================================================================== */
.score-summary {
  text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: clamp(28px, 5vw, 44px); box-shadow: var(--shadow-md);
  margin-bottom: 24px; position: relative;
}
.score-ring {
  --rc: var(--ok);
  width: 156px; height: 156px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 2.3rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--rc); background: var(--surface); border: 3px solid var(--rc);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--rc) 12%, transparent),
              0 0 30px -6px color-mix(in srgb, var(--rc) 60%, transparent),
              inset 0 0 0 6px color-mix(in srgb, var(--rc) 8%, transparent);
}
.score-ring.pass { --rc: var(--matrix); }
.score-ring.fail { --rc: var(--bad); }
.score-summary .sub { color: var(--text-muted); font-size: 1.02rem; }
.score-summary .sub .pass, .hist-score.pass, b.pass { color: var(--ok); }
.score-summary .sub .fail, .hist-score.fail, b.fail { color: var(--bad); }

/* Topic breakdown bars */
.topic-breakdown { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); text-align: left; }
.topic-breakdown h4 { font-size: 1.12rem; margin-bottom: 16px; font-weight: 700; }
.topic-row { display: grid; grid-template-columns: minmax(96px, 1.3fr) 3fr auto; align-items: center; gap: 12px; margin-bottom: 12px; }
.topic-name { font-size: .9rem; color: var(--text); font-weight: 500; }
.topic-bar { height: 9px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; }
.topic-fill { height: 100%; border-radius: 999px; transition: width .5s var(--ease); }
.topic-fill.strong { background: linear-gradient(90deg, var(--cyan-700), var(--matrix)); }
.topic-fill.ok { background: linear-gradient(90deg, var(--warn), #ffd97a); }
.topic-fill.weak { background: linear-gradient(90deg, var(--accent), var(--accent-600)); }
.topic-pct { font-family: var(--mono); font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topic-pct.strong { color: var(--ok); } .topic-pct.ok { color: var(--warn); } .topic-pct.weak { color: var(--bad); }
.topic-pct small { color: var(--text-faint); font-weight: 400; }
.topic-tip { margin: 16px 0 0; font-size: .92rem; color: var(--text-muted); }
.topic-tip strong { color: var(--accent); }
.topic-tip.good strong, .topic-tip.good { color: var(--ok); }

.results-upsell { margin-top: 20px; padding: 18px; border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--line-strong); text-align: center; }
.results-upsell p { margin: 0 0 12px; color: var(--text-muted); }

.results-review { display: grid; gap: 12px; }
.review-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  border-left: 2px solid var(--border-2); padding: 16px 18px;
}
.review-item.right { border-left-color: var(--ok); }
.review-item.wrong { border-left-color: var(--bad); }
.rq { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ra { font-size: .92rem; color: var(--text-muted); margin-bottom: 6px; }
.ra b { color: var(--text); }
.review-item.right .ra { color: var(--ok); } .review-item.wrong .ra { color: var(--bad); }

/* =====================================================================
   Upgrade / paywall
   ===================================================================== */
.upgrade-card {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(46,230,255,.07), transparent 55%), var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  padding: clamp(30px, 5vw, 48px); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.upgrade-card::before { content: ""; position: absolute; inset: 12px; pointer-events: none; border: 1px solid var(--line); border-radius: calc(var(--r-xl) - 10px); }
.upgrade-card > * { position: relative; }
.upgrade-badge {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-primary); background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  border: 1px solid var(--cyan-600); padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
  box-shadow: 0 0 16px -4px var(--glow);
}
.upgrade-card h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.upgrade-price { margin: 14px 0 4px; }
.up-amount { font-family: var(--mono); font-size: 3rem; font-weight: 700; color: var(--cyan); text-shadow: 0 0 22px rgba(46,230,255,.3); }
[data-theme="light"] .up-amount { color: var(--cyan-700); text-shadow: none; }
.up-per { color: var(--text-muted); font-size: 1rem; margin-left: 4px; }
.upgrade-sub { color: var(--text-muted); margin: 0 0 22px; }
.upgrade-list { list-style: none; margin: 0 0 26px; padding: 0; text-align: left; display: grid; gap: 12px; }
.upgrade-list li { position: relative; padding-left: 32px; color: var(--text); }
.upgrade-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--on-primary); background: var(--cyan);
  box-shadow: 0 0 12px -3px var(--glow);
}
.upgrade-cta { width: 100%; padding: 15px; font-size: 1.02rem; }
.upgrade-note { margin: 12px 0 0; font-size: .88rem; color: var(--text-muted); }
.upgrade-note.is-error { color: var(--bad); }

/* =====================================================================
   Dashboard
   ===================================================================== */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  border-top: 2px solid var(--cyan); padding: 20px 18px; text-align: center; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
}
.stat span { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.stat b { font-family: var(--mono); font-size: 1.9rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dash-empty { background: var(--surface); border: 1px dashed var(--border-2); border-radius: var(--r-md); padding: 32px; text-align: center; color: var(--text-muted); }

.dash-history { display: grid; gap: 10px; }
.hist-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  border-left: 2px solid var(--border-2); padding: 14px 18px;
}
.hist-row.right { border-left-color: var(--ok); }
.hist-row.wrong { border-left-color: var(--bad); }
.hist-main { display: flex; align-items: center; gap: 10px; }
.hist-mode {
  font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px;
}
.hist-exam { font-weight: 600; color: var(--text); }
.hist-meta { display: flex; align-items: center; gap: 14px; }
.hist-when { font-family: var(--mono); font-size: .78rem; color: var(--text-faint); }
.hist-score { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.muted-line { color: var(--text-muted); }

/* =====================================================================
   Modal (auth / reset)
   ===================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(3,8,14,.66); backdrop-filter: blur(4px); animation: viewIn .2s var(--ease);
}
.modal {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-lg); border-top: 3px solid var(--cyan);
}
.modal h3 { font-size: 1.45rem; margin-bottom: 18px; font-weight: 700; }
.modal form { display: flex; flex-direction: column; gap: 15px; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--text-faint);
  width: 34px; height: 34px; border-radius: 50%;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  appearance: none; border: 0; background: none; cursor: pointer; font-size: 1.05rem;
  width: 34px; height: 34px; border-radius: var(--r-sm);
}
.auth-error, .auth-ok { font-size: .88rem; padding: 10px 12px; border-radius: var(--r-sm); margin: 0; }
.auth-error { color: var(--bad); background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.auth-ok { color: var(--ok); background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.modal .btn.primary { width: 100%; margin-top: 4px; }
.auth-forgot, .auth-switch { text-align: center; font-size: .9rem; color: var(--text-muted); margin: 14px 0 0; }
.auth-switch { margin-top: 8px; }

/* =====================================================================
   Landing marketing sections
   ===================================================================== */
.hero-foot { margin: 16px 0 0 !important; font-family: var(--mono); font-size: .74rem !important; color: var(--text-faint) !important; letter-spacing: .02em; }

/* Trust strip */
.lp-trust {
  list-style: none; margin: 26px 0 0; padding: 16px 8px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 26px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.lp-trust li { position: relative; font-size: .72rem; font-weight: 600; letter-spacing: .06em; color: var(--text-muted); text-transform: uppercase; }
.lp-trust li::before { content: "▪"; color: var(--cyan); font-size: .8em; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); }
.lp-trust li:first-child::before { content: none; }

/* Section rhythm + heads */
.lp-section { margin-top: clamp(52px, 8vw, 92px); }
.lp-start { margin-top: clamp(40px, 6vw, 64px); }
.lp-head { max-width: 62ch; margin: 0 auto clamp(26px, 4vw, 40px); text-align: center; }
.lp-eyebrow {
  display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 14px;
}
[data-theme="light"] .lp-eyebrow { color: var(--cyan-700); }
.lp-head h3 { font-size: clamp(1.5rem, 3.6vw, 2.15rem); font-weight: 800; }
.lp-head p { color: var(--text-muted); margin: 12px auto 0; max-width: 62ch; font-size: 1.04rem; }

/* Why cards */
.lp-why { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.lp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px var(--glow); border-color: var(--cyan); }
.lp-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 16px; color: var(--cyan);
  background: radial-gradient(circle at 50% 35%, var(--surface-3), var(--surface));
  border: 1px solid var(--line-strong); box-shadow: inset 0 0 0 3px var(--surface), 0 0 18px -6px var(--glow);
}
[data-theme="light"] .lp-ico { color: var(--cyan-700); }
.lp-card h4 { font-size: 1.18rem; margin-bottom: 8px; font-weight: 700; }
.lp-card p { color: var(--text-muted); font-size: .95rem; line-height: 1.55; margin: 0; }

/* How it works */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.lp-steps li { position: relative; text-align: center; padding: 8px 12px 0; }
.lp-steps li::before {
  content: ""; position: absolute; top: 28px; left: 50%; width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--line-strong)); z-index: 0;
}
.lp-steps li:last-child::before { display: none; }
.lp-step-no {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: 16px;
  font-family: var(--mono); font-weight: 700; font-size: 1.4rem; color: var(--on-primary);
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-strong), 0 0 20px -6px var(--glow);
}
.lp-steps h4 { font-size: 1.12rem; margin-bottom: 6px; font-weight: 700; }
.lp-steps p { color: var(--text-muted); font-size: .94rem; margin: 0 auto; max-width: 30ch; }

/* Sample question */
.sample-q {
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--cyan);
  border-radius: var(--r-lg); padding: clamp(24px, 4vw, 36px); box-shadow: var(--shadow-md);
}
.sample-tag { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 12px; }
[data-theme="light"] .sample-tag { color: var(--cyan-700); }
.sample-text { font-size: clamp(1.18rem, 3vw, 1.45rem); font-weight: 700; line-height: 1.36; color: var(--text); margin: 0 0 20px; letter-spacing: -.01em; }
.sample-options { display: grid; gap: 11px; }
.sq-option {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); font-size: 1rem;
}
.sq-letter {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: .88rem;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-muted);
}
.sq-option.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.sq-option.is-correct .sq-letter { background: var(--ok); border-color: var(--ok); color: #04131d; }
.sq-mark { margin-left: auto; color: var(--ok); font-weight: 700; font-size: 1.05rem; }
.sample-expl { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-muted); font-size: .95rem; line-height: 1.55; }
.sample-expl strong { color: var(--ok); }

/* Stats band */
.lp-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, var(--surface-3), var(--surface));
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.lp-stat { text-align: center; padding: clamp(22px, 4vw, 34px) 16px; }
.lp-stat + .lp-stat { border-left: 1px solid var(--line); }
.lp-stat b {
  display: block; font-family: var(--mono); font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem); color: var(--cyan); line-height: 1;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(46,230,255,.28);
}
[data-theme="light"] .lp-stat b { color: var(--cyan-700); text-shadow: none; }
.lp-stat b i { font-style: normal; font-size: .4em; color: var(--text-muted); margin-left: 2px; }
.lp-stat span { display: block; margin-top: 10px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }

/* Pricing teaser */
.lp-price-card {
  max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.lp-price-main {
  padding: clamp(28px, 4vw, 42px); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(46,230,255,.08), transparent 60%), var(--surface-3);
  border-right: 1px solid var(--line);
}
.lp-plan-badge {
  font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--on-primary);
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan)); border: 1px solid var(--cyan-600);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; box-shadow: 0 0 14px -4px var(--glow);
}
.lp-price { margin: 0 0 6px; }
.lp-price-amt { font-family: var(--mono); font-size: clamp(2.6rem, 6vw, 3.3rem); font-weight: 700; color: var(--cyan); text-shadow: 0 0 24px rgba(46,230,255,.3); }
[data-theme="light"] .lp-price-amt { color: var(--cyan-700); text-shadow: none; }
.lp-price-per { color: var(--text-muted); font-size: 1rem; margin-left: 4px; }
.lp-price-sub { color: var(--text-muted); font-size: .9rem; margin: 0 0 22px; }
.lp-price-cta { width: 100%; max-width: 260px; }
.lp-price-alt { margin: 16px 0 0; font-size: .85rem; color: var(--text-muted); max-width: 34ch; }
.lp-price-alt strong { color: var(--text); }
.lp-price-list { list-style: none; margin: 0; padding: clamp(28px, 4vw, 42px); display: grid; gap: 14px; align-content: center; }
.lp-price-list li { position: relative; padding-left: 34px; color: var(--text); font-size: .98rem; }
.lp-price-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px; width: 23px; height: 23px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: var(--on-primary); background: var(--cyan); box-shadow: 0 0 12px -3px var(--glow);
}

/* FAQ */
.lp-faq { max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq details:last-child { border-bottom: 0; }
.lp-faq summary {
  list-style: none; cursor: pointer; position: relative; padding: 20px 52px 20px 22px;
  font-weight: 600; font-size: 1.05rem; color: var(--text); transition: background .16s var(--ease);
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary:hover { background: var(--surface-2); }
.lp-faq summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.faq-plus { position: absolute; right: 22px; top: 22px; width: 16px; height: 16px; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; background: var(--cyan); border-radius: 2px; transition: transform .22s var(--ease), opacity .22s var(--ease); }
.faq-plus::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq-plus::after { left: 7px; top: 0; width: 2px; height: 16px; }
.lp-faq details[open] .faq-plus::after { transform: rotate(90deg); opacity: 0; }
.faq-body { padding: 0 22px 20px; color: var(--text-muted); font-size: .96rem; line-height: 1.6; max-width: 70ch; }
.lp-faq details[open] .faq-body { animation: viewIn .3s var(--ease); }

/* Final CTA band */
.lp-cta-band {
  text-align: center; border-radius: var(--r-xl);
  padding: clamp(36px, 6vw, 60px) clamp(24px, 5vw, 48px);
  background:
    radial-gradient(120% 120% at 50% -20%, rgba(46,230,255,.22), transparent 60%),
    linear-gradient(180deg, var(--surface-3), #0a1c2a);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.lp-cta-band::before {
  content: ""; position: absolute; inset: 0; opacity: .5; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  -webkit-mask-image: radial-gradient(100% 100% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(100% 100% at 50% 0%, #000, transparent 75%);
}
.lp-cta-band::after { content: ""; position: absolute; inset: 12px; border: 1px solid var(--line); border-radius: calc(var(--r-xl) - 10px); pointer-events: none; z-index: 1; }
[data-theme="light"] .lp-cta-band { background: radial-gradient(120% 120% at 50% -20%, rgba(14,116,144,.16), transparent 60%), linear-gradient(180deg, #d9e6f0, #cadcea); }
.lp-cta-band > * { position: relative; z-index: 2; }
.crest-sm { margin: 0 auto 12px; color: var(--cyan); }
.lp-cta-band h3 { color: var(--text); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.lp-cta-band p { color: var(--text-muted); margin: 12px auto 24px; max-width: 52ch; }
.lp-band-cta { padding: 14px 30px; font-size: 1rem; }

/* =====================================================================
   Footer
   ===================================================================== */
.foot { max-width: var(--maxw); margin: 40px auto 0; padding: clamp(32px, 5vw, 48px) clamp(16px, 4vw, 40px) 48px; border-top: 1px solid var(--line); }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px 40px; margin-bottom: 30px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; max-width: 42ch; }
.foot-logo { flex: none; filter: drop-shadow(0 0 8px rgba(46,230,255,.22)); line-height: 0; }
.foot-logo svg { border-radius: 9px; }
.foot-brand strong { font-size: 1.12rem; font-weight: 700; color: var(--text); }
.foot-brand p { color: var(--text-muted); font-size: .9rem; line-height: 1.55; margin: 4px 0 0; max-width: none; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.foot-col h5 { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 4px; }
.foot-link {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 0;
  font-family: var(--sans); font-size: .92rem; color: var(--text-muted); text-align: left; transition: color .16s var(--ease);
}
.foot-link:hover { color: var(--cyan); }
.foot-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 3px; }
.foot-legal { color: var(--text-faint); font-size: .78rem; line-height: 1.6; max-width: 92ch; margin: 0; padding-top: 22px; border-top: 1px solid var(--line); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 720px) {
  .topbar { gap: 10px 14px; padding: 12px 16px; }
  .brand p { display: none; }
  nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .nav-btn { white-space: nowrap; }
  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .btn { flex: 1 1 100%; }
  #prev-q { order: 2; }
  .topic-row { grid-template-columns: 1fr auto; }
  .topic-name { grid-column: 1 / -1; }
  .hist-row { flex-direction: column; align-items: flex-start; }

  .lp-steps { grid-template-columns: 1fr; gap: 14px; max-width: 420px; margin: 0 auto; }
  .lp-steps li { display: grid; grid-template-columns: 56px 1fr; text-align: left; gap: 4px 16px; padding: 6px 0; align-items: center; }
  .lp-steps li::before { display: none; }
  .lp-step-no { margin-bottom: 0; grid-row: span 2; }
  .lp-steps h4 { align-self: end; }
  .lp-steps p { grid-column: 2; margin: 0; max-width: none; }
  .lp-stats { grid-template-columns: 1fr 1fr; }
  .lp-stat:nth-child(odd) { border-left: 0; }
  .lp-stat:nth-child(even) { border-left: 1px solid var(--line); }
  .lp-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lp-price-card { grid-template-columns: 1fr; max-width: 480px; }
  .lp-price-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .foot-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 460px) {
  .hero-stats { gap: 12px; padding: 14px 12px; width: 100%; }
  .hero-stat + .hero-stat::before { left: -6px; }
  .hero-stat b { font-size: 1.5rem; }
}

@media (max-width: 420px) {
  .exam-facts { flex-direction: column; gap: 12px; }
  .exam-facts li + li { border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .score-ring { width: 132px; height: 132px; font-size: 1.9rem; }
  .lp-trust { gap: 8px 18px; }
  .lp-trust li::before { left: -13px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .crest-sweep { display: none; }
}
