/* ============================================================
   CeMAP Test Pass — "Private Bank / Premium Finance" redesign
   Deep forest & emerald, antique gold hairlines, cream on green.
   Editorial serif (Fraunces) headings + Inter body.
   Signature: fine gold rules, generous whitespace, engraved crest,
   a faint currency-pinstripe texture. Understated, expensive.
   All class/id hooks from index.html + app.js are preserved.
   ============================================================ */

:root {
  /* ---- Canvas: deep private-bank green ---- */
  --bg:        #0c1f17;   /* forest base */
  --bg-2:      #081711;   /* wells / inputs / darkest floor */

  /* ---- Surfaces (raised panels) ---- */
  --panel:     #102a1f;   /* card surface */
  --panel-2:   #163527;   /* raised chips, letters */
  --panel-3:   #1d4030;   /* hover lift */

  /* ---- Antique gold / champagne (the premium detail) ---- */
  --gold:      #c9a227;   /* antique gold — hairlines & accents */
  --gold-soft: rgba(201,162,39,.30);  /* faint gold hairline */
  --gold-faint:rgba(201,162,39,.12);  /* wash */
  --gold-ink:  #12130a;   /* text on gold */

  /* ---- Lines & texture ---- */
  --line:      #23483556; /* primary borders (green) */
  --line-solid:#264a37;
  --line-soft: rgba(201,162,39,.16);  /* gold hairline dividers */
  --grid:      rgba(201,162,39,.028); /* pinstripe ink */

  /* ---- Text: rich cream on dark ---- */
  --text:      #f3ecdb;   /* primary — warm cream */
  --muted:     #b8c9bd;   /* secondary sage — ~6.6:1 on --panel */
  --faint:     #7f9a89;   /* tertiary — labels */

  /* ---- Accents ---- */
  --accent:    #1e8f5e;   /* emerald — primary action */
  --accent-hi: #26a86f;   /* emerald hover */
  --accent-ink:#f4ffe9;   /* text on emerald */
  --accent-2:  #10b981;   /* bright emerald — info / links */

  /* ---- Status ---- */
  --green:     #34d399;
  --green-ink: #052018;
  --red:       #e0796b;
  --red-ink:   #2a0a06;
  --amber-warn:var(--gold);

  /* ---- Atmosphere ---- */
  --glow:      rgba(16,90,60,.55);  /* emerald aura */
  --topbar-bg: rgba(9,22,16,.82);
  --overlay:   rgba(4,11,8,.74);
  --shadow:    0 22px 60px -24px rgba(0,0,0,.75);

  /* ---- Geometry & type ---- */
  --radius:    14px;
  --radius-sm: 9px;
  --space-section: 32px;
  --space-block: 18px;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Inter", ui-monospace, monospace; /* numerals via tabular-nums */
}

/* ---- Day (light) theme — "wealth paper": ink on cream ---- */
:root[data-theme="light"] {
  --bg:        #f4efe3;   /* warm laid-paper cream */
  --bg-2:      #fbf8f0;   /* inputs / wells */

  --panel:     #fffdf7;   /* card surface */
  --panel-2:   #f1ead9;   /* raised chips */
  --panel-3:   #e9e0cb;   /* hover lift */

  --gold:      #9a7b12;   /* deepened gold for contrast on cream */
  --gold-soft: rgba(154,123,18,.42);
  --gold-faint:rgba(154,123,18,.10);
  --gold-ink:  #fffdf7;

  --line:      #d9cfb6;
  --line-solid:#cfc3a6;
  --line-soft: rgba(154,123,18,.24);
  --grid:      rgba(154,123,18,.035);

  --text:      #15271d;   /* deep green-ink */
  --muted:     #4a5f52;   /* ~7:1 on cream */
  --faint:     #74806f;

  --accent:    #146c47;   /* deep emerald */
  --accent-hi: #178253;
  --accent-ink:#fbfff5;
  --accent-2:  #0f7a52;

  --green:     #147a52;
  --green-ink: #ffffff;
  --red:       #b1442f;
  --red-ink:   #ffffff;

  --glow:      rgba(20,108,71,.14);
  --topbar-bg: rgba(251,248,240,.86);
  --overlay:   rgba(21,39,29,.42);
  --shadow:    0 22px 50px -26px rgba(30,50,38,.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  /* faint currency pinstripe + soft emerald aura */
  background-image:
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 7px),
    radial-gradient(1200px 620px at 50% -12%, var(--glow), transparent 68%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

/* Global focus-visible ring — gold, refined */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);
  border-radius: var(--radius-sm);
}
.btn.primary:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

/* Tabular numerals for anything measurable */
#timer, #progress-text, .badge, .up-amount,
.exam-facts li b, .stat b, .hist-score, .topic-pct, .hist-when {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
/* Editorial serif numerals for the headline data moments */
.score-ring, .letter { font-family: var(--serif); }

/* ============================================================
   Top bar — the private-bank masthead
   ============================================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px) saturate(1.2);
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 var(--gold-faint);
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand .logo { display: inline-flex; line-height: 0; flex-shrink: 0; }
.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 22px; font-weight: 600; line-height: 1;
  letter-spacing: .2px; color: var(--text);
}
.brand h1 .brand-pass { color: var(--gold); font-style: italic; }
.brand p {
  margin: 4px 0 0; font-size: 10.5px; color: var(--faint);
  text-transform: uppercase; letter-spacing: 2.4px; font-weight: 500;
}
@media (max-width: 620px) { .brand p { display: none; } }

nav { display: flex; gap: 2px; flex-shrink: 0; }
.nav-btn {
  position: relative;
  background: transparent; border: none; color: var(--muted);
  padding: 9px 15px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  letter-spacing: .2px;
  transition: color .2s ease;
}
.nav-btn::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 5px;
  height: 1.5px; background: var(--gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { color: var(--text); }
.nav-btn.active::after { transform: scaleX(1); }

/* ============================================================
   Layout
   ============================================================ */
main { max-width: 1080px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 24px) 72px; }
.view { display: none; }
.view.active { display: block; }
.view.active > * + * { margin-top: var(--space-block); }
.view.active > h2 + .view-intro,
.view.active > h2 + .browse-controls,
.view.active > .section-title + .cards,
.view.active > .section-title + .trade-grid { margin-top: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .view.active { animation: fade-up .5s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

h2 {
  margin: 0 0 16px;
  font-family: var(--serif); font-optical-sizing: auto;
  font-size: clamp(28px, 5vw, 42px); font-weight: 500; line-height: 1.12;
  letter-spacing: -.4px; color: var(--text);
}
.section-title {
  margin: 34px 0 20px;
  font-size: 11px; font-weight: 600; line-height: 1;
  text-transform: uppercase; letter-spacing: 2.6px; color: var(--gold);
  display: flex; align-items: center; gap: 16px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

/* ============================================================
   Hero — editorial, gold hairline frame
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 100% at 85% 0%, var(--gold-faint), transparent 55%),
    linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(30px, 6vw, 56px);
  margin-bottom: var(--space-section);
  box-shadow: var(--shadow);
}
/* inner gold hairline — engraved frame */
.hero::before {
  content: ''; position: absolute; inset: 10px;
  border: 1px solid var(--gold-soft); border-radius: calc(var(--radius) - 5px);
  pointer-events: none; opacity: .5;
}
/* faint engraved house/key crest, top-right */
.hero::after {
  content: ''; position: absolute; top: 26px; right: 26px;
  width: 132px; height: 132px; pointer-events: none; opacity: .1;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23c9a227' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M30 52 L50 34 L70 52'/%3E%3Cpath d='M36 48 V70 H64 V48'/%3E%3Cpath d='M46 70 V58 H54 V70'/%3E%3Ccircle cx='50' cy='20' r='2.4'/%3E%3C/svg%3E");
}
.hero > * { position: relative; }
/* small-caps gold eyebrow */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-size: 11px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold);
}
.hero-eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--gold);
}
.hero h2 {
  font-size: clamp(30px, 5.4vw, 50px); font-weight: 500;
  letter-spacing: -.5px; line-height: 1.08; max-width: 18ch;
}
.hero-trades h2 { max-width: none; }
.hero p {
  color: var(--muted); font-weight: 400; line-height: 1.75;
  max-width: 58ch; margin: 18px 0 0; font-size: clamp(15px, 1.6vw, 17px);
}
.hero p strong { color: var(--text); font-weight: 600; }
.hero-trades { text-align: center; }
.hero-trades .hero-eyebrow { justify-content: center; }
.hero-trades .hero-eyebrow::after {
  content: ''; width: 26px; height: 1px; background: var(--gold);
}
.hero-trades p { margin-left: auto; margin-right: auto; }
.cta-row { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-trades .cta-row { justify-content: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  letter-spacing: .2px; cursor: pointer;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn.primary {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 10px 26px -14px var(--accent);
}
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }
.btn.ghost {
  background: transparent; border: 1px solid var(--gold-soft); color: var(--text);
}
.btn.ghost:hover { border-color: var(--gold); background: var(--gold-faint); color: var(--text); }
.btn.ghost:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn:disabled:hover { filter: none; background: var(--accent); }

/* Inline busy spinner */
.btn-spin {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-spin { animation-duration: 1.4s; } }

.back {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; padding: 0 0 18px;
  letter-spacing: .2px; transition: color .2s, transform .2s;
}
.back:hover { color: var(--gold); transform: translateX(-3px); }

/* ============================================================
   Cards (banks, mocks)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
#mock-cards, #mock-cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 680px) {
  #mock-cards, #mock-cards-2 { grid-template-columns: 1fr; }
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  min-height: 172px;
  padding: 26px 26px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .22s ease, border-color .22s, box-shadow .22s; }
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  box-shadow: var(--shadow);
}
.card h4 {
  margin: 0; font-family: var(--serif); font-optical-sizing: auto;
  font-size: 21px; font-weight: 500; line-height: 1.2; letter-spacing: -.2px;
}
.card p {
  margin: 0; flex: 1;
  color: var(--muted); font-size: 14px; line-height: 1.6;
}

/* Mock-exam cards */
.mock-card { min-height: 214px; }
.exam-facts {
  list-style: none; margin: 6px 0 0; padding: 16px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.exam-facts li {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; min-width: 70px; align-items: flex-start;
}
.exam-facts li span {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--faint);
  font-weight: 600; order: 2;
}
.exam-facts li b {
  font-family: var(--serif); font-optical-sizing: auto;
  font-size: 26px; line-height: 1; font-weight: 500; color: var(--text); order: 1;
}
.exam-facts li:last-child b { color: var(--gold); }
.mock-card .start-mock { margin-top: 18px; width: 100%; }

/* ============================================================
   Setup form
   ============================================================ */
.setup-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px;
  display: flex; flex-direction: column; gap: 22px; max-width: 480px;
  box-shadow: var(--shadow);
}
.setup-card label {
  display: flex; flex-direction: column; gap: 10px;
  font-size: 11px; font-weight: 600; color: var(--gold);
  text-transform: uppercase; letter-spacing: 2px;
}
.setup-card select, .setup-card input {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-family: var(--sans); font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.setup-card select:hover, .setup-card input:hover,
#browse-topic:hover, #browse-search:hover { border-color: var(--gold-soft); }
.setup-card select, #browse-topic { cursor: pointer; }
.setup-card select:focus, .setup-card input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-faint);
}
.setup-card small {
  color: var(--muted); font-size: 12.5px;
  border-left: 2px solid var(--gold); padding-left: 12px; line-height: 1.55;
}

.view-intro { color: var(--muted); max-width: 640px; margin: 0 0 16px; line-height: 1.7; }

/* ============================================================
   Quiz header — progress + timer
   ============================================================ */
.quiz-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.quiz-header .back { padding: 0; align-self: center; }
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 14px; }
.progress-bar {
  flex: 1; height: 6px; background: var(--bg-2);
  border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden;
}
#progress-fill {
  position: relative; overflow: hidden;
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}
#progress-fill.full { background: var(--gold); }
#progress-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-weight: 500; }

.timer {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line-soft);
  padding: 7px 14px; border-radius: var(--radius-sm); white-space: nowrap;
  color: var(--text);
}
.timer::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 7px var(--accent-2);
}
.timer.warn { color: var(--gold); border-color: var(--gold-soft); }
.timer.warn::before { background: var(--gold); box-shadow: 0 0 7px var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .timer.warn { animation: pulse 1.1s steps(2, end) infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 3px var(--gold-faint); } }
}

/* ============================================================
   Question card + options
   ============================================================ */
.question-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 34px);
  box-shadow: var(--shadow);
}
.q-source {
  font-size: 10.5px; color: var(--gold);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px; font-weight: 600;
}
.q-text {
  font-family: var(--serif); font-optical-sizing: auto;
  font-size: clamp(20px, 2.8vw, 26px); font-weight: 500; line-height: 1.4;
  letter-spacing: -.2px; color: var(--text); margin-bottom: 26px;
}
.options { display: flex; flex-direction: column; gap: 12px; }

.option {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--sans);
  font-size: 15.5px; font-weight: 400; line-height: 1.5;
  cursor: pointer; text-align: left; width: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .option { transition: transform .16s ease, border-color .16s, background .16s; }
}
.option > span:last-child { flex: 1; }
.option .letter {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--gold-soft);
  color: var(--gold); font-size: 16px; font-weight: 500; font-style: italic;
  transition: inherit;
}

.option:hover:not(.disabled) {
  border-color: var(--gold-soft); background: var(--panel-2);
  transform: translateX(3px);
}

.option.selected {
  border-color: var(--gold); background: var(--gold-faint);
}
.option.selected .letter {
  background: var(--gold); border-color: var(--gold); color: var(--gold-ink);
}

.option.correct {
  border-color: var(--green); background: rgba(52,211,153,.12);
}
.option.correct .letter { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.option.incorrect {
  border-color: var(--red); background: rgba(224,121,107,.12);
}
.option.incorrect .letter { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.option.disabled { cursor: default; }
.option.disabled:hover { transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .option.correct .letter { animation: letter-pop .3s ease both; }
  @keyframes letter-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
}

/* Feedback (practice reveal) */
.feedback {
  margin-top: 24px; padding: 20px 22px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm); display: none;
}
.feedback:has(.verdict.right) { border-left-color: var(--green); }
.feedback:has(.verdict.wrong) { border-left-color: var(--red); }
.feedback.show { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .feedback.show { animation: fade-up .28s ease both; }
}
.feedback .verdict {
  font-family: var(--serif); font-weight: 600; font-style: italic;
  margin-bottom: 8px; font-size: 18px; letter-spacing: .2px;
}
.feedback .verdict.right { color: var(--green); }
.feedback .verdict.wrong { color: var(--red); }
.feedback .expl { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

.quiz-nav { display: flex; gap: 14px; margin-top: 28px; justify-content: space-between; }
.quiz-nav .btn { min-width: 128px; }

/* ============================================================
   Results — score ring + review
   ============================================================ */
.score-summary {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 40px 30px; text-align: center; margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.score-ring {
  position: relative; display: inline-flex;
  align-items: center; justify-content: center;
  width: 150px; height: 150px; border-radius: 50%;
  font-size: 44px; font-weight: 500; color: var(--text);
  background: radial-gradient(circle at center, var(--panel) 60%, transparent 61%);
}
.score-ring::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; z-index: -1;
  background: conic-gradient(var(--ring-c, var(--gold)) 100%, var(--line-soft) 0);
}
.score-ring::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid var(--gold-soft);
}
.score-ring.pass { --ring-c: var(--green); color: var(--green); }
.score-ring.fail { --ring-c: var(--red); color: var(--red); }
.score-summary .sub { color: var(--muted); margin-top: 18px; font-size: 15px; }
.score-summary .sub strong { text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.score-summary .sub .pass, .score-summary .pass { color: var(--green); }
.score-summary .sub .fail, .score-summary .fail { color: var(--red); }

.results-review { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.review-item {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-left: 2px solid var(--line-solid); border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.review-item.right { border-left-color: var(--green); }
.review-item.wrong { border-left-color: var(--red); }
.review-item .rq { font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.review-item .ra { font-size: 14px; color: var(--muted); }
.review-item .ra b { color: var(--text); }
.review-item .rexpl { font-size: 13.5px; color: var(--muted); margin-top: 8px; font-style: italic; line-height: 1.6; }

/* ============================================================
   Misc
   ============================================================ */
.hidden { display: none !important; }
.foot {
  text-align: center; padding: 32px 24px;
  color: var(--faint); font-size: 11.5px; line-height: 1.7;
  border-top: 1px solid var(--line-soft); margin-top: 24px;
  max-width: 860px; margin-left: auto; margin-right: auto;
}

.trust-note {
  color: var(--accent-2); font-size: 13px; font-weight: 500; margin: 0 0 26px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,.07); border: 1px solid var(--gold-soft);
  padding: 8px 14px; border-radius: 30px;
}

/* ============================================================
   Trade picker (entry screen) — the premium CTA card
   ============================================================ */
.trade-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.trade-card {
  position: relative;
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background:
    radial-gradient(130% 100% at 90% 0%, var(--gold-faint), transparent 55%),
    var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 8px; min-height: 200px;
  transition: transform .22s, border-color .22s, box-shadow .22s;
  box-shadow: var(--shadow);
}
.trade-card::before {
  content: ''; position: absolute; inset: 9px;
  border: 1px solid var(--gold-soft); border-radius: calc(var(--radius) - 5px);
  opacity: .4; pointer-events: none; transition: opacity .22s;
}
.trade-card.live:hover { transform: translateY(-4px); border-color: var(--gold-soft); }
.trade-card.live:hover::before { opacity: .8; }
.trade-card.soon { opacity: .5; cursor: not-allowed; }
.trade-card.soon:hover { opacity: .68; }
.trade-icon {
  position: relative; font-size: 30px; line-height: 1; margin-bottom: 10px;
  width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-soft); border-radius: 50%;
  background: var(--gold-faint); color: var(--gold);
}
.trade-name { position: relative; font-family: var(--serif); font-optical-sizing: auto; font-size: 22px; font-weight: 500; line-height: 1.2; }
.trade-tagline { position: relative; font-size: 13.5px; color: var(--muted); flex: 1; line-height: 1.6; margin-bottom: 6px; }
.trade-badge {
  position: relative; margin-top: auto; font-size: 11.5px; padding: 5px 12px; border-radius: 30px;
  align-self: flex-start; font-weight: 500; letter-spacing: .3px;
}
.trade-badge.live { background: var(--gold-faint); border: 1px solid var(--gold-soft); color: var(--gold); }
.trade-badge.live::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  margin-right: 8px; border-radius: 50%; background: var(--accent-2); vertical-align: middle;
}
.trade-badge.soon { background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--faint); }

/* ============================================================
   Browse / search question bank
   ============================================================ */
.browse-controls {
  display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
  position: sticky; top: 70px; z-index: 5;
  background: var(--bg); padding: 12px 0;
}
.browse-count { position: sticky; top: 132px; z-index: 5; background: var(--bg); }
#browse-search {
  flex: 1; min-width: 220px;
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--text);
  padding: 13px 15px; border-radius: var(--radius-sm); font-size: 16px; font-family: var(--sans);
}
#browse-search:focus, #browse-topic:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); }
#browse-topic {
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--text);
  padding: 13px 15px; border-radius: var(--radius-sm); font-size: 16px;
}
.browse-count { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; padding-top: 4px; }
@media (min-width: 560px) { .browse-count { text-align: right; } }
.browse-list { display: flex; flex-direction: column; gap: 14px; }
.browse-item {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-left: 2px solid var(--line-solid); border-radius: var(--radius-sm); padding: 20px 22px;
}
@media (prefers-reduced-motion: no-preference) {
  .browse-item { transition: border-color .2s, box-shadow .2s, transform .2s; }
}
.browse-item:hover {
  border-left-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-1px);
}
.bi-q { font-family: var(--serif); font-weight: 500; font-size: 18px; margin-bottom: 12px; line-height: 1.45; }
.bi-a { font-size: 14px; color: var(--text); margin-bottom: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.bi-a .bi-label, .bi-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold);
  font-weight: 700; margin-right: 8px;
}
.bi-expl { font-size: 13.5px; color: var(--muted); line-height: 1.6; font-style: italic; margin-bottom: 12px; }
.bi-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.browse-more-wrap { text-align: center; margin-top: 20px; }

.browse-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 56px 24px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  color: var(--muted);
}
.browse-empty-ico {
  font-family: var(--serif); font-size: 40px; line-height: 1;
  color: var(--gold); opacity: .8; margin-bottom: 4px;
}
.browse-empty-title { margin: 0; font-family: var(--serif); font-weight: 500; color: var(--text); font-size: 20px; }
.browse-empty-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .browse-empty { animation: fade-up .28s ease both; } }

/* ============================================================
   Auth area, modal
   ============================================================ */
.auth-area { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.user-chip {
  font-size: 13px; color: var(--text);
  background: var(--gold-faint); border: 1px solid var(--gold-soft);
  padding: 6px 12px; border-radius: 30px; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.linklike {
  background: none; border: none; color: var(--gold); cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px;
}
.auth-switch .linklike, .auth-forgot .linklike { display: inline-block; padding: 6px 4px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--overlay); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 32px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal::before {
  content: ''; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid var(--gold-soft); border-radius: calc(var(--radius) - 4px); opacity: .5;
}
.modal > * { position: relative; }
.modal h3 { margin: 0 0 20px; font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -.2px; }
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--muted);
  font-size: 24px; line-height: 1; cursor: pointer; border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--gold); background: var(--panel-2); }
#auth-form, #reset-form { display: flex; flex-direction: column; gap: 15px; }
#auth-form label, #reset-form label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 1.6px; font-weight: 600;
}
#auth-form label[hidden], #reset-form label[hidden] { display: none; }
#auth-form input, #reset-form input {
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--text);
  padding: 12px 13px; border-radius: var(--radius-sm); font-size: 16px; font-family: var(--sans);
  text-transform: none; letter-spacing: normal;
}
#auth-form input:focus, #reset-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); }
#auth-form .btn, #reset-form .btn { margin-top: 6px; }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 44px; box-sizing: border-box; }
.pw-toggle {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1;
  color: var(--muted); border-radius: var(--radius-sm);
}
.pw-toggle:hover { color: var(--text); }
.auth-error {
  background: rgba(224,121,107,.12); border: 1px solid var(--red);
  color: var(--red); padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px;
}
.auth-ok {
  background: rgba(52,211,153,.12); border: 1px solid var(--green);
  color: var(--green); padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px;
}
.auth-switch { margin: 18px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.auth-forgot { margin: 14px 0 0; text-align: center; }
.auth-forgot .linklike { font-size: 13px; color: var(--muted); }
.auth-forgot .linklike:hover { color: var(--gold); }

/* ============================================================
   Dashboard
   ============================================================ */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 16px; margin-bottom: 10px; }
.dash-stats .stat {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 20px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.dash-stats .stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; }
.dash-stats .stat b { font-family: var(--serif); font-size: 32px; font-weight: 500; }
.dash-stats .stat b.pass { color: var(--green); }
.dash-stats .stat b.fail { color: var(--red); }
.dash-history { display: flex; flex-direction: column; gap: 8px; }
.hist-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-left: 2px solid var(--line-solid); border-radius: var(--radius-sm); padding: 15px 18px;
}
.hist-row.right { border-left-color: var(--green); }
.hist-row.wrong { border-left-color: var(--red); }
.hist-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hist-mode { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--gold); font-weight: 600; }
.hist-exam { font-weight: 600; font-size: 14.5px; }
.hist-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.hist-when { font-size: 11px; color: var(--muted); }
.hist-score { font-weight: 700; font-size: 15px; }
.hist-score.pass { color: var(--green); }
.hist-score.fail { color: var(--red); }
.muted-line { color: var(--muted); padding: 14px 0; }
.dash-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 48px 24px;
  background: var(--panel); border: 1px dashed var(--gold-soft);
  border-radius: var(--radius); color: var(--muted); font-size: 14.5px;
}
.dash-empty::before { content: '❖'; font-size: 30px; line-height: 1; color: var(--gold); }
.dash-empty .linklike { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .muted-line { animation: soft-pulse 1.4s ease-in-out infinite; }
  @keyframes soft-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
}
.dash-topics { margin: 10px 0; }

/* ============================================================
   Topic analytics
   ============================================================ */
.topic-breakdown { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-soft); text-align: left; }
.topic-breakdown h4 { margin: 0 0 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); font-weight: 600; }
.topic-row { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 14px; margin-bottom: 11px; }
.topic-name { font-size: 13.5px; color: var(--text); text-align: left; }
.topic-bar { height: 6px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.topic-fill { height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.topic-fill.strong { background: var(--green); }
.topic-fill.ok { background: var(--gold); }
.topic-fill.weak { background: var(--red); }
.topic-pct { font-size: 13px; font-weight: 700; min-width: 66px; text-align: right; }
.topic-pct small { font-weight: 400; color: var(--muted); }
.topic-pct.strong { color: var(--green); }
.topic-pct.ok { color: var(--gold); }
.topic-pct.weak { color: var(--red); }
.topic-tip { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.topic-tip strong { color: var(--red); }
.topic-tip.good strong, .topic-tip.good { color: var(--green); }

.review-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.topic-tag, .reg-tag {
  font-size: 11.5px; padding: 4px 11px; border-radius: 30px;
  background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--muted);
}
.reg-tag { color: var(--gold); }

/* ============================================================
   Paywall / upgrade — the concierge card
   ============================================================ */
.plan-badge.premium {
  font-size: 12px; font-weight: 600;
  color: var(--gold); background: var(--gold-faint);
  border: 1px solid var(--gold-soft); padding: 6px 12px; border-radius: 30px;
}
.upgrade-card {
  position: relative;
  max-width: 480px; margin: 10px auto 0; text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--gold-faint), transparent 55%),
    linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 40px 34px; box-shadow: var(--shadow);
}
.upgrade-card::before {
  content: ''; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid var(--gold-soft); border-radius: calc(var(--radius) - 5px); opacity: .5;
}
.upgrade-card > * { position: relative; }
.upgrade-badge {
  display: inline-block; font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
  background: var(--gold-faint); border: 1px solid var(--gold-soft);
  padding: 6px 14px; border-radius: 30px; margin-bottom: 18px; font-weight: 600;
}
.upgrade-card h2 { margin: 0 0 12px; }
.upgrade-price { margin: 8px 0 2px; }
.up-amount { font-family: var(--serif); font-size: 46px; font-weight: 500; color: var(--text); }
.up-per { color: var(--muted); font-size: 16px; }
.upgrade-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.upgrade-list { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.upgrade-list li { position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.upgrade-list li::before {
  content: '✦'; position: absolute; left: 2px; top: 0; color: var(--gold); font-weight: 700;
}
.upgrade-cta { width: 100%; font-size: 16px; padding: 15px; }
.upgrade-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); min-height: 18px; }
.upgrade-note.is-error { color: var(--red); }

.results-upsell {
  margin-top: 24px; padding: 20px; border-radius: var(--radius);
  background: var(--gold-faint); border: 1px solid var(--gold-soft); text-align: center;
}
.results-upsell p { margin: 0 0 14px; color: var(--text); font-size: 14.5px; }

/* Admin link */
.admin-link { text-decoration: none; border-color: var(--gold-soft) !important; color: var(--gold) !important; }
.admin-link:hover { background: var(--gold-faint) !important; }

/* ============================================================
   Day / night theme toggle
   ============================================================ */
.theme-toggle {
  background: transparent; border: 1px solid var(--gold-soft); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 15px; line-height: 1; padding: 0;
  transition: background .2s, border-color .2s, transform .12s;
}
.theme-toggle:hover { border-color: var(--gold); background: var(--gold-faint); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-ico { display: none; }
:root[data-theme="dark"]  .theme-ico-moon { display: inline; }
:root[data-theme="light"] .theme-ico-sun  { display: inline; }

/* ============================================================
   Question diagram / image + AI note
   ============================================================ */
.q-image { margin: 16px 0 20px; }
.q-image img {
  max-width: 100%; height: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); background: #fff; padding: 8px; display: block;
}
.bi-q + .q-image { margin: 10px 0 12px; }
.bi-q + .q-image img { max-width: 340px; }
.ai-note {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 600;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line-soft);
  padding: 1px 8px; border-radius: 10px; vertical-align: middle;
}

/* ============================================================
   LANDING MARKETING SECTIONS (#view-trades)
   Shared rhythm: big deliberate gaps between blocks, centered
   heads, gold small-caps eyebrows, everything on one max-width.
   ============================================================ */
#view-trades .lp-block { margin-top: clamp(64px, 10vw, 108px); }
#view-trades .trust-strip { margin-top: 22px; }
#view-trades .lp-start { margin-top: 34px; }

.lp-head { text-align: center; max-width: 62ch; margin: 0 auto 40px; }
.lp-head .hero-eyebrow { justify-content: center; }
.lp-head .hero-eyebrow::after { content: ''; width: 26px; height: 1px; background: var(--gold); }
.lp-head h3 {
  margin: 14px 0 0; font-family: var(--serif); font-optical-sizing: auto;
  font-size: clamp(26px, 4.2vw, 38px); font-weight: 500; line-height: 1.15;
  letter-spacing: -.3px; color: var(--text); text-wrap: balance;
}
.lp-head > p { margin: 14px auto 0; color: var(--muted); max-width: 54ch; line-height: 1.7; }

/* --- Trust strip --- */
.trust-strip {
  list-style: none; margin: 0; padding: 18px 26px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 12px 30px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.trust-strip li {
  display: flex; align-items: center; gap: 11px;
  font-size: 12.5px; color: var(--muted); letter-spacing: .2px;
}
.trust-strip li::before {
  content: ''; width: 5px; height: 5px; flex-shrink: 0;
  background: var(--gold); transform: rotate(45deg);
}

/* --- Why cards --- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 18px; }
.why-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 13px;
}
@media (prefers-reduced-motion: no-preference) {
  .why-card { transition: transform .22s ease, border-color .22s, box-shadow .22s; }
}
.why-card:hover { transform: translateY(-3px); border-color: var(--gold-soft); box-shadow: var(--shadow); }
.why-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-faint); border: 1px solid var(--gold-soft); color: var(--gold);
}
.why-icon svg { width: 26px; height: 26px; }
.why-card h4 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; letter-spacing: -.2px; }
.why-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* --- How it works --- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.step {
  position: relative; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 30px 28px;
}
.step-num {
  display: block; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 40px; line-height: 1; color: var(--gold);
  padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--gold-soft);
}
.step h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.25; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* --- Sample question --- */
.sample-card {
  max-width: 720px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow);
}
.sample-tag { margin: 0 0 14px; font-size: 10.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.sample-q {
  margin: 0 0 24px; font-family: var(--serif); font-optical-sizing: auto;
  font-size: clamp(20px, 2.6vw, 25px); font-weight: 500; line-height: 1.4; letter-spacing: -.2px; color: var(--text);
}
.sample-q em { font-style: italic; color: var(--gold); }
.sample-opts { display: flex; flex-direction: column; gap: 12px; }
.sample-opt {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 18px; background: var(--bg-2);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  color: var(--text); font-size: 15.5px; line-height: 1.5;
}
.sample-opt > span:nth-child(2) { flex: 1; }
.sample-opt .l {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-soft); color: var(--gold);
  font-family: var(--serif); font-style: italic; font-size: 16px; font-weight: 500;
}
.sample-opt.correct { border-color: var(--green); background: rgba(52,211,153,.12); }
.sample-opt.correct .l { background: var(--green); border-color: var(--green); color: var(--green-ink); font-style: normal; }
.sample-opt.correct::after { content: '✓'; margin-left: 4px; color: var(--green); font-weight: 700; font-size: 16px; flex-shrink: 0; }
.sample-expl {
  margin-top: 22px; padding: 18px 22px;
  background: var(--bg-2); border: 1px solid var(--line-soft); border-left: 2px solid var(--green);
  border-radius: var(--radius-sm); color: var(--muted); font-size: 14.5px; line-height: 1.65;
}
.se-label {
  display: block; margin-bottom: 6px; font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--green); font-weight: 700;
}

/* --- Figures band --- */
.figures {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
}
.figure { padding: 32px 20px; text-align: center; border-right: 1px solid var(--line-soft); }
.figure:last-child { border-right: none; }
.figure b {
  display: block; font-family: var(--serif); font-optical-sizing: auto;
  font-size: clamp(34px, 5vw, 50px); font-weight: 500; line-height: 1; color: var(--text);
}
.figure b i { font-style: normal; font-size: .6em; color: var(--gold); margin-left: 1px; }
.figure span {
  display: block; margin-top: 10px; font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}

/* --- Pricing teaser --- */
.price-teaser {
  display: grid; grid-template-columns: 1.05fr .95fr;
  border: 1px solid var(--gold-soft); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.pt-info { padding: clamp(28px, 4vw, 40px); border-right: 1px solid var(--line-soft); }
.pt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pt-list li { position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.pt-list li::before { content: '✦'; position: absolute; left: 2px; top: 0; color: var(--gold); font-weight: 700; }
.pt-buy {
  padding: clamp(28px, 4vw, 40px);
  background: radial-gradient(120% 100% at 50% 0%, var(--gold-faint), transparent 60%), var(--bg-2);
  display: flex; flex-direction: column; align-items: flex-start;
}
.pt-badge {
  margin: 0 0 16px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
  background: var(--gold-faint); border: 1px solid var(--gold-soft); padding: 6px 13px; border-radius: 30px; font-weight: 600;
}
.pt-price { margin: 0; }
.pt-amount { font-family: var(--serif); font-size: 48px; font-weight: 500; color: var(--text); }
.pt-per { color: var(--muted); font-size: 16px; }
.pt-sub { margin: 10px 0 22px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.pt-buy .btn { width: 100%; margin-top: auto; }

/* --- FAQ --- */
.faq { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--gold); font-size: 22px; line-height: 1; flex-shrink: 0; transition: transform .2s ease;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item summary:hover { color: var(--gold); }
.faq-item summary:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); border-radius: var(--radius-sm); }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: fade-up .28s ease both; }
}

/* --- Final CTA band --- */
.cta-band {
  position: relative; text-align: center;
  padding: clamp(44px, 7vw, 76px) clamp(22px, 5vw, 48px);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: radial-gradient(120% 110% at 50% 0%, var(--gold-faint), transparent 55%), linear-gradient(160deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow); overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid var(--gold-soft); border-radius: calc(var(--radius) - 5px); opacity: .5;
}
.cta-band > * { position: relative; }
.cta-band .hero-eyebrow { justify-content: center; }
.cta-band .hero-eyebrow::after { content: ''; width: 26px; height: 1px; background: var(--gold); }
.cta-band h3 {
  margin: 14px 0 0; font-family: var(--serif); font-size: clamp(28px, 5vw, 42px);
  font-weight: 500; line-height: 1.12; letter-spacing: -.4px; color: var(--text); text-wrap: balance;
}
.cta-band > p { margin: 16px auto 0; color: var(--muted); max-width: 52ch; line-height: 1.7; }
.cta-band .cta-row { justify-content: center; margin-top: 30px; }

/* ============================================================
   Richer footer
   ============================================================ */
.foot {
  max-width: 1080px; margin: clamp(64px, 10vw, 104px) auto 0;
  padding: 0 clamp(16px, 4vw, 24px) 44px;
  text-align: left; color: var(--faint); font-size: 11.5px; line-height: 1.7; border-top: none;
}
.foot-top {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding: 40px 0 34px; border-top: 1px solid var(--line-soft);
}
.foot-brand { max-width: 340px; }
.fb-lockup { display: inline-flex; align-items: center; gap: 11px; }
.fb-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); }
.fb-name .brand-pass { color: var(--gold); font-style: italic; }
.foot-brand p { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.foot-links { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col h5 { margin: 0 0 14px; font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.foot-link {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--muted); transition: color .2s;
}
.foot-link:hover { color: var(--gold); }
.foot-legal { margin: 26px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.7; max-width: 900px; }
.foot-copy { margin: 12px 0 0; color: var(--faint); font-size: 11.5px; }

/* ============================================================
   Responsive — landing + app
   ============================================================ */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .price-teaser { grid-template-columns: 1fr; }
  .pt-info { border-right: none; border-bottom: 1px solid var(--line-soft); }
}

/* Responsive — down to 360px */
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .brand { flex: 1 1 auto; }
  nav {
    order: 5; width: 100%; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
  }
  nav::-webkit-scrollbar { display: none; }
  .nav-btn { white-space: nowrap; padding: 10px 14px; min-height: 40px; display: inline-flex; align-items: center; }
  .nav-btn::after { bottom: 4px; }

  main { padding: 24px 16px 56px; }
  .hero { padding: 28px 22px; }
  .hero::before, .hero::after { display: none; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; text-align: center; }

  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .btn { min-width: 0; flex: 1; }
  .score-ring { width: 124px; height: 124px; font-size: 36px; }

  .trade-grid { grid-template-columns: 1fr; gap: 14px; }
  .trade-card { min-height: 0; padding: 22px; }
  .trade-card::before { inset: 7px; }

  .browse-controls { flex-direction: column; gap: 10px; top: 62px; }
  #browse-topic { width: 100%; }
  #browse-search, #browse-topic { font-size: 16px; min-height: 46px; }
  .browse-count { top: 172px; }
  .browse-item { padding: 16px 18px; }

  .back { padding: 8px 4px 16px; min-height: 36px; display: inline-flex; align-items: center; margin-left: -4px; }

  .auth-area { gap: 8px; }

  /* Landing sections at 375px */
  #view-trades .lp-block { margin-top: 56px; }
  .lp-head { margin-bottom: 30px; }
  .trust-strip { padding: 18px 20px; gap: 10px 22px; justify-content: flex-start; }
  .why-grid { grid-template-columns: 1fr; }
  .why-card, .step { padding: 24px; }
  .step-num { font-size: 34px; }
  .sample-card { padding: 22px 18px; }
  .sample-opt { padding: 14px 15px; gap: 13px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure { padding: 26px 14px; }
  .figure:nth-child(1), .figure:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .figure:nth-child(2) { border-right: none; }
  .pt-buy .btn { min-height: 48px; }
  .faq-item summary { padding: 16px 18px; font-size: 17px; }
  .faq-item .faq-a { padding: 0 18px 18px; }
  .cta-band::before { inset: 8px; }
  .foot-top { flex-direction: column; gap: 30px; }
  .foot-links { gap: 40px; }
}
