/* ============================================================
   Gas ACS Pass — "Engineer's Instrument / Combustion"
   Dark-first. Warm graphite, combustion orange, a reserved
   amber→red flame gradient, gas-flame blue as a sparing
   technical accent. Chakra Petch display, Inter body,
   JetBrains Mono numerals. Pressure-gauge instrument motif.
   All class/id hooks from index.html + app.js are preserved.
   ============================================================ */

:root {
  /* Canvas — warm near-black graphite */
  --bg:        #15120f;
  --bg-2:      #100d0a;   /* wells / inputs (deeper) */

  /* Instrument surfaces */
  --panel:     #1d1913;   /* panel face */
  --panel-2:   #262019;   /* raised chips, letters */
  --panel-3:   #322a20;   /* hover lift */

  /* Lines & etched grid */
  --line:      #3b3123;   /* primary borders */
  --line-soft: #2a2318;   /* hairlines / dividers */
  --grid:      rgba(255,140,70,.035);  /* faint warm rule */

  /* Text — warm off-white */
  --text:      #f5efe6;   /* primary  (~14:1 on --panel) */
  --muted:     #bcae9b;   /* secondary (~6.6:1 on --panel) */
  --faint:     #8b7d6b;   /* tertiary — labels only */

  /* Accent — combustion orange */
  --accent:    #ff7a2e;
  --accent-ink:#1c0f05;
  --accent-lo: #c05713;   /* pressed depth */

  /* Secondary technical accent — gas-flame blue (sparing) */
  --accent-2:  #3aa0ff;

  /* Signature flame gradient (reserved) */
  --flame:     linear-gradient(90deg, #ffb020, #ff7a2e 55%, #e0331f);

  /* Status */
  --green:     #35c98d;
  --green-ink: #04241a;
  --red:       #f0553f;
  --red-ink:   #2a0606;
  --amber-warn:#ffb020;

  /* Ambience */
  --glow:      rgba(255,110,40,.14);
  --topbar-bg: rgba(21,18,15,.86);
  --overlay:   rgba(8,5,3,.74);

  /* Geometry & type */
  --radius:    12px;
  --radius-sm: 8px;
  --space-section: 28px;
  --space-block: 16px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Chakra Petch", "Rajdhani", "Oswald", var(--sans);
}

/* ----- Day (light) theme — "workshop bench / calibration sheet" ----- */
:root[data-theme="light"] {
  --bg:        #f4efe7;
  --bg-2:      #ffffff;

  --panel:     #ffffff;
  --panel-2:   #f2ece2;
  --panel-3:   #e7ddcf;

  --line:      #ddd2c1;
  --line-soft: #ece3d6;
  --grid:      rgba(150,90,40,.05);

  --text:      #24190f;   /* ~13:1 on white */
  --muted:     #6a5b47;   /* ~6.2:1 on white */
  --faint:     #94836c;

  --accent:    #cc5514;   /* deepened for AA on light */
  --accent-ink:#ffffff;
  --accent-lo: #a3400a;

  --accent-2:  #1a72c4;

  --green:     #12855a;
  --green-ink: #ffffff;
  --red:       #c33322;
  --red-ink:   #ffffff;
  --amber-warn:#a8630a;

  --glow:      rgba(204,85,20,.10);
  --topbar-bg: rgba(244,239,231,.9);
  --overlay:   rgba(36,25,15,.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(1100px 520px at 78% -8%, var(--glow), transparent 68%);
  background-size: 30px 30px, 30px 30px, 100% 100%;
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

/* Global focus-visible ring (accessibility) */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,122,46,.45);
  border-radius: var(--radius-sm);
}
.btn.primary:focus-visible { box-shadow: 0 3px 0 var(--accent-lo), 0 0 0 3px rgba(255,122,46,.5); }
.btn.ghost:focus-visible { box-shadow: 0 0 0 3px rgba(58,160,255,.5); }

/* Mono / tabular for anything measurable */
#timer, #progress-text, .badge, .letter, .score-ring, .q-source {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Display face for headings */
h2, .card h4, .trade-name, .modal h3, .upgrade-card h2 {
  font-family: var(--display);
  letter-spacing: .2px;
}

/* ============================================================
   Top bar — instrument fascia
   ============================================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -1px 0 var(--line-soft), 0 1px 0 rgba(255,122,46,.16);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .logo { display: inline-flex; line-height: 0; filter: drop-shadow(0 2px 6px rgba(255,122,46,.35)); }
.brand h1 {
  margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1;
  letter-spacing: .4px; text-transform: uppercase;
}
.brand p {
  margin: 3px 0 0; font-size: 11px; color: var(--muted);
  font-family: var(--mono); letter-spacing: .2px;
}

nav { display: flex; gap: 6px; flex-shrink: 0; }
.nav-btn {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.nav-btn:hover { color: var(--text); background: var(--panel-2); }
.nav-btn.active {
  color: var(--accent);
  background: rgba(255,122,46,.10);
  border: 1px solid rgba(255,122,46,.35);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ============================================================
   Layout
   ============================================================ */
main { max-width: 1060px; margin: 0 auto; padding: 32px 20px 64px; }
.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: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .view.active { animation: instrument-in .28s ease both; }
  @keyframes instrument-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 4vw, 34px); font-weight: 700; line-height: 1.14;
}
.section-title {
  margin: 26px 0 18px;
  font-family: var(--mono);
  font-size: 12px; font-weight: 700; line-height: 1;
  text-transform: uppercase; letter-spacing: 2px; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: ''; width: 8px; height: 8px; flex-shrink: 0;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}

/* Uppercase technical micro-label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.6px; color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(255,122,46,.15);
}

/* ============================================================
   Hero — split: technical copy + pressure-gauge instrument
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 40px);
  margin-bottom: var(--space-section);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 14px 40px -22px rgba(0,0,0,.7);
}
/* combustion accent edge + faint ruler on the panel */
.hero::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--flame);
}
.hero > * { position: relative; }

.hero-trades {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  align-items: center; text-align: left;
}
.hero-main h2 { color: var(--text); }
.hero p {
  color: var(--text); font-weight: 400; line-height: 1.65;
  max-width: 54ch; margin: 0;
}
.hero p strong { color: var(--accent); font-weight: 600; }

/* Hero spec strip — mono figures like an instrument readout */
.hero-specs {
  display: flex; align-items: stretch; gap: 20px; flex-wrap: wrap;
  margin: 26px 0 0; padding: 16px 20px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.hero-specs > div:not(.spec-div) { display: flex; flex-direction: column; gap: 2px; }
.hero-specs dt {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--faint);
}
.hero-specs dd {
  margin: 0; font-family: var(--mono); font-weight: 700; font-size: 26px;
  line-height: 1; color: var(--text); font-variant-numeric: tabular-nums;
}
.hero-specs dd.spec-hot {
  background: var(--flame); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.spec-div { width: 1px; align-self: stretch; background: var(--line); }

/* Instrument column */
.hero-instrument { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gauge { width: 100%; max-width: 340px; height: auto; display: block; }
.g-track { stroke: var(--line); stroke-width: 12; stroke-linecap: round; }
.g-flame {
  stroke-width: 12; stroke-linecap: round;
  filter: drop-shadow(0 0 7px rgba(255,122,46,.5));
}
.g-tick line { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }
.g-tick-minor line { stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; }
.g-needle { fill: var(--text); filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.g-needle-grp { transform-box: view-box; transform-origin: 160px 170px; }
.g-hub { fill: var(--panel-2); stroke: var(--accent); stroke-width: 2.5; }
.g-hub-dot { fill: var(--accent); }
.g-value {
  fill: var(--text); font-family: var(--mono); font-weight: 700; font-size: 30px;
  font-variant-numeric: tabular-nums;
}
.g-end { fill: var(--faint); font-family: var(--mono); font-size: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .g-needle-grp { animation: needle-settle 1.2s cubic-bezier(.28,.9,.35,1) both; }
  @keyframes needle-settle {
    0%   { transform: rotate(46deg); }
    70%  { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
  }
  .g-flame { animation: flame-flicker 3.2s ease-in-out infinite; }
  @keyframes flame-flicker {
    0%, 100% { filter: drop-shadow(0 0 7px rgba(255,122,46,.5)); }
    50%      { filter: drop-shadow(0 0 11px rgba(255,122,46,.75)); }
  }
}
.instrument-cap {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--faint);
}
.cap-tick { width: 14px; height: 1px; background: var(--accent-2); }

@media (min-width: 820px) {
  .hero-trades { grid-template-columns: 1.15fr .85fr; gap: 40px; }
  .hero { padding: 44px 48px; }
  .hero-main h2 { font-size: clamp(30px, 3.4vw, 40px); }
  .hero p { font-size: 16px; }
}

.cta-row { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* Study-hub hero (no instrument) keeps the flame edge + spacing */
#view-home .hero { text-align: left; }

/* ============================================================
   Buttons — solid combustion orange
   ============================================================ */
.btn {
  border: none; border-radius: var(--radius-sm); padding: 12px 20px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .08s ease, filter .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn.primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 3px 0 var(--accent-lo);
}
.btn.primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 3px 0 var(--accent-lo), 0 6px 18px rgba(255,122,46,.34);
}
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-lo); }
.btn.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
}
.btn.ghost:hover { border-color: var(--accent-2); background: rgba(58,160,255,.08); }
.btn.ghost:active { transform: translateY(1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; transform: none; }
.btn:disabled:hover { filter: none; }

/* Inline busy spinner (loading states) */
.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(--mono); font-size: 13px; letter-spacing: .3px; padding: 0 0 16px;
  transition: color .15s, transform .15s;
}
.back:hover { color: var(--accent); transform: translateX(-3px); }

/* ============================================================
   Bank cards — instrument panels
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
#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; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 168px;
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
/* fine corner tick — instrument register mark */
.card::before {
  content: ''; position: absolute; top: 12px; right: 12px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  opacity: .8;
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .15s ease, border-color .15s, box-shadow .15s; }
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,122,46,.5);
  box-shadow: 0 12px 28px -14px rgba(0,0,0,.7), 0 0 0 1px rgba(255,122,46,.12);
}
.card h4 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; }
.card p {
  margin: 0; flex: 1;
  color: var(--muted); font-size: 13.5px; line-height: 1.55;
}
.card .meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 14px; gap: 10px;
  border-top: 1px solid var(--line-soft);
}
.badge {
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text);
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.badge::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; margin-right: 7px;
  border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.card .acts { display: flex; gap: 8px; flex-shrink: 0; }
.card .acts .btn { padding: 8px 14px; font-size: 13px; letter-spacing: .2px; }
.card .acts .btn.primary {
  background: transparent; color: var(--accent);
  border: 1px solid rgba(255,122,46,.45);
  box-shadow: none;
}
.card .acts .btn.primary:hover { background: rgba(255,122,46,.10); }
.card .acts .btn.primary:active { box-shadow: none; }

/* ============================================================
   Setup form
   ============================================================ */
.setup-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 20px; max-width: 460px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.setup-card label {
  display: flex; flex-direction: column; gap: 9px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: 1.4px;
}
.setup-card select, .setup-card input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-family: var(--sans); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.setup-card select:hover, .setup-card input:hover,
#browse-topic:hover, #browse-search:hover { border-color: rgba(255,122,46,.4); }
.setup-card select, #browse-topic { cursor: pointer; }
#setup-count { font-family: var(--mono); font-variant-numeric: tabular-nums; }

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

.mock-card { min-height: 200px; }
.exam-facts {
  list-style: none; margin: 4px 0 0; padding: 14px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex; gap: 14px; flex-wrap: wrap;
}
.exam-facts li {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 70px; align-items: flex-start;
}
.exam-facts li span {
  font-family: var(--mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint);
  margin-top: 3px;
}
.exam-facts li b {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 20px; line-height: 1.1; font-weight: 700; color: var(--text);
}
.exam-facts li:last-child b { color: var(--accent); }
.mock-card .start-mock { margin-top: 16px; width: 100%; }

.setup-card select:focus, .setup-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,122,46,.2);
}
.setup-card small {
  color: var(--muted); font-size: 12px;
  border-left: 2px solid var(--accent); padding-left: 10px;
}
.mock-only { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   Quiz header — progress + timer (pressure building)
   ============================================================ */
.quiz-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.quiz-header .back { padding: 0; align-self: center; }
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 12px; }
.progress-bar {
  flex: 1; height: 9px; 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:
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(0,0,0,.28) 23px 24px),
    var(--flame);
  transition: width .3s ease;
}
#progress-fill.full { box-shadow: 0 0 8px rgba(255,122,46,.6), 0 0 0 1px rgba(255,122,46,.4) inset; }
@media (prefers-reduced-motion: no-preference) {
  #progress-fill::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transform: translateX(-100%);
    animation: sheen 2.2s ease-in-out infinite;
  }
  @keyframes sheen { to { transform: translateX(100%); } }
}
#progress-text { font-size: 13px; color: var(--muted); white-space: nowrap; }

.timer {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: var(--radius-sm); white-space: nowrap;
}
.timer::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
}
.timer.warn { color: var(--amber-warn); border-color: var(--amber-warn); }
.timer.warn::before { background: var(--amber-warn); box-shadow: 0 0 6px var(--amber-warn); }
@media (prefers-reduced-motion: no-preference) {
  .timer.warn { animation: live-pulse 1s steps(2, end) infinite; }
  @keyframes live-pulse { 50% { box-shadow: 0 0 0 3px rgba(255,176,32,.25); } }
}

/* ============================================================
   Question card + options
   ============================================================ */
.question-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 28px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.q-source {
  font-size: 12px; color: var(--faint);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
}
.q-text {
  font-size: clamp(17px, 2.4vw, 20px); font-weight: 600; line-height: 1.5;
  color: var(--text); margin-bottom: 22px;
}
.options { display: flex; flex-direction: column; gap: 12px; }

.option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--text); font-family: var(--sans);
  font-size: 15.5px; font-weight: 500; line-height: 1.45;
  cursor: pointer; text-align: left; width: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .option { transition: transform .13s ease, border-color .13s, background .13s, box-shadow .13s; }
}
.option > span:last-child { flex: 1; }
.option .letter {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1.5px solid var(--line);
  color: var(--muted); font-size: 14px; font-weight: 700;
}

.option:hover:not(.disabled) {
  border-color: rgba(58,160,255,.55);
  background: var(--panel-3);
  transform: translateX(2px);
}

.option.selected {
  border-color: var(--accent);
  background: rgba(255,122,46,.1);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
}
.option.selected .letter {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
@media (prefers-reduced-motion: no-preference) {
  .option.selected { animation: patch-in .18s ease; }
  @keyframes patch-in {
    from { box-shadow: inset 3px 0 0 transparent; }
    to   { box-shadow: inset 3px 0 0 var(--accent); }
  }
}

.option.correct {
  border-color: var(--green);
  background: rgba(53,201,141,.14);
  box-shadow: inset 3px 0 0 var(--green);
}
.option.correct .letter {
  background: var(--green); border-color: var(--green); color: var(--green-ink);
}
.option.incorrect {
  border-color: var(--red);
  background: rgba(240,85,63,.14);
  box-shadow: inset 3px 0 0 var(--red);
}
.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 { animation: conduct-on .3s ease both; }
  @keyframes conduct-on {
    0%   { box-shadow: inset 3px 0 0 var(--green); }
    40%  { box-shadow: inset 3px 0 0 var(--green), 0 0 0 3px rgba(53,201,141,.3); }
    100% { box-shadow: inset 3px 0 0 var(--green); }
  }
  .option.correct .letter { animation: letter-pop .26s ease both; }
  @keyframes letter-pop {
    0%   { transform: scale(.8); }
    60%  { transform: scale(1.12); }
    100% { transform: scale(1); }
  }
  .option.incorrect { animation: nudge .22s ease both; }
  @keyframes nudge {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
  }
}

/* Feedback (practice reveal) */
.feedback {
  margin-top: 22px; padding: 18px 20px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  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: trace-in .22s ease both; }
  @keyframes trace-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
  }
}
.feedback .verdict {
  font-family: var(--mono); font-weight: 700; margin-bottom: 8px;
  font-size: 14px; letter-spacing: .5px;
}
.feedback .verdict.right { color: var(--green); }
.feedback .verdict.wrong { color: var(--red); }
.feedback .expl { color: var(--muted); font-size: 14px; line-height: 1.6; }

.quiz-nav { display: flex; gap: 12px; margin-top: 24px; justify-content: space-between; }
.quiz-nav .btn { min-width: 120px; }

/* ============================================================
   Results — score ring + review
   ============================================================ */
.score-summary {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px; text-align: center; margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.score-ring {
  position: relative; display: inline-flex;
  align-items: center; justify-content: center;
  width: 140px; height: 140px; border-radius: 50%;
  font: 700 40px/1 var(--mono); color: var(--text);
  background: radial-gradient(circle at center, var(--panel) 60%, transparent 61%);
}
.score-ring::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%; z-index: -1;
  background: conic-gradient(var(--ring-c, var(--accent)) 100%, var(--line-soft) 0);
}
.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: 14px; }
.score-summary .sub strong {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px;
}
.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: 24px;
}
.review-item {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.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.45; }
.review-item .ra { font-size: 14px; color: var(--muted); }
.review-item .ra b { color: var(--text); }
.review-item .rexpl { font-size: 13px; color: var(--muted); margin-top: 8px; font-style: italic; line-height: 1.55; }

/* ============================================================
   Misc
   ============================================================ */
.hidden { display: none !important; }
.foot {
  padding: 40px 20px 32px; margin-top: clamp(40px, 7vw, 72px);
  color: var(--faint); font-size: 11.5px; font-family: var(--mono); line-height: 1.7;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.14));
}

/* ============================================================
   Responsive — down to 360px
   ============================================================ */
@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 14px; }
  .brand { justify-content: flex-start; }
  nav {
    gap: 6px; 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% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
  }
  nav::-webkit-scrollbar { display: none; }
  .nav-btn { white-space: nowrap; padding: 10px 14px; min-height: 40px; display: inline-flex; align-items: center; }

  main { padding: 16px 16px 48px; }
  .hero { padding: 24px 20px; margin-bottom: 22px; }
  .hero-trades { gap: 22px; }
  .hero h2 { line-height: 1.2; }
  .hero p { margin-top: 12px; }
  .hero-specs { gap: 14px; padding: 14px 16px; }
  .hero-specs dd { font-size: 22px; }
  .gauge { max-width: 280px; }
  .section-title { margin: 22px 0 14px; }
  .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: 112px; height: 112px; font-size: 32px; }

  .trade-grid { grid-template-columns: 1fr; gap: 12px; }
  .trade-card { min-height: 0; padding: 18px; }
  .trade-icon { font-size: 30px; }

  .browse-controls { flex-direction: column; gap: 10px; }
  #browse-topic { width: 100%; }
  #browse-search, #browse-topic { font-size: 16px; min-height: 44px; }
  .browse-list { gap: 12px; }
  .browse-item { padding: 15px 16px; }
  .bi-q { font-size: 15px; }
  .browse-count { text-align: left; margin-bottom: 14px; }

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

/* ============================================================
   Auth area, modal, dashboard
   ============================================================ */
.auth-area { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--radius-sm); }
.user-chip {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  background: rgba(255,122,46,.1); border: 1px solid rgba(255,122,46,.3);
  padding: 5px 11px; border-radius: 20px; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.linklike {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline;
}
.auth-switch .linklike, .auth-forgot .linklike { display: inline-block; padding: 6px 4px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--overlay); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 380px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.modal h3 { margin: 0 0 18px; font-size: 20px; }
.modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 40px; height: 40px;
  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(--text); background: var(--panel-2); }
#auth-form, #reset-form { display: flex; flex-direction: column; gap: 14px; }
#auth-form label, #reset-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
#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); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 16px; font-family: var(--sans);
}
#auth-form input:focus, #reset-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,46,.2); }
#auth-form .btn, #reset-form .btn { margin-top: 4px; }

/* Password show/hide eye toggle */
.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(240,85,63,.12); border: 1px solid var(--red);
  color: var(--red); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13px;
}
.auth-switch { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* Dashboard */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 14px; margin-bottom: 8px; }
.dash-stats .stat {
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-stats .stat span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); }
.dash-stats .stat b { font-family: var(--mono); font-size: 26px; font-weight: 700; }
.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);
  border-left: 4px solid var(--line); border-radius: var(--radius); padding: 13px 16px;
}
.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-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); }
.hist-exam { font-weight: 600; font-size: 14px; }
.hist-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.hist-when { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.hist-score { font-family: var(--mono); 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: 8px; padding: 40px 24px;
  background: var(--panel); border: 1px dashed var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); color: var(--muted); font-size: 14.5px;
}
.dash-empty::before { content: '⚡'; font-size: 30px; line-height: 1; color: var(--accent); opacity: .85; }
.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; } }
}

@media (max-width: 560px) {
  .auth-area { width: 100%; justify-content: center; gap: 10px; }
  .auth-area .btn-sm, #install-btn { min-height: 40px; padding: 9px 16px; flex: 1; max-width: 160px; }
  .user-chip { max-width: none; }
}

/* ============================================================
   Topic analytics
   ============================================================ */
.topic-breakdown {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
  text-align: left;
}
.topic-breakdown h4 { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--faint); }
.topic-row { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 12px; margin-bottom: 9px; }
.topic-name { font-size: 13px; color: var(--text); text-align: left; }
.topic-bar { height: 8px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; }
.topic-fill { height: 100%; border-radius: 6px; transition: width .4s; }
.topic-fill.strong { background: var(--green); }
.topic-fill.ok { background: var(--amber-warn); }
.topic-fill.weak { background: var(--red); }
.topic-pct { font-family: var(--mono); font-size: 13px; font-weight: 700; min-width: 64px; text-align: right; }
.topic-pct small { font-weight: 400; color: var(--muted); }
.topic-pct.strong { color: var(--green); }
.topic-pct.ok { color: var(--amber-warn); }
.topic-pct.weak { color: var(--red); }
.topic-tip { margin: 14px 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: 10px; }
.topic-tag, .reg-tag {
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.reg-tag { color: var(--accent-2); font-family: var(--mono); border-color: rgba(58,160,255,.3); }

.dash-topics { margin: 8px 0 8px; }

.trust-note {
  color: var(--green); font-size: 13px; font-weight: 500; margin: 0 0 24px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(53,201,141,.08); border: 1px solid rgba(53,201,141,.25);
  padding: 7px 12px; border-radius: 20px;
}

/* ============================================================
   Trade picker (entry screen)
   ============================================================ */
.trade-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.trade-card {
  position: relative; overflow: hidden;
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 6px; min-height: 168px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.trade-card::before {
  content: ''; position: absolute; top: 12px; right: 12px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); opacity: .8;
}
.trade-card.live:hover {
  transform: translateY(-2px);
  border-color: rgba(255,122,46,.5);
  box-shadow: 0 12px 28px -14px rgba(0,0,0,.7), 0 0 0 1px rgba(255,122,46,.12);
}
.trade-card.soon { opacity: .5; cursor: not-allowed; transition: opacity .15s, border-color .15s; }
.trade-card.soon:hover { opacity: .72; border-color: var(--line); }
.trade-card.soon:hover .trade-badge.soon { border-color: var(--accent-2); color: var(--accent-2); }
.trade-icon { font-size: 34px; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 2px 5px rgba(255,122,46,.3)); }
.trade-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.trade-tagline { font-size: 13px; color: var(--muted); flex: 1; line-height: 1.5; margin-bottom: 4px; }
.trade-badge { margin-top: auto; font-size: 12px; padding: 4px 10px; border-radius: 20px; align-self: flex-start; font-family: var(--mono); }
.trade-badge.live { background: rgba(255,122,46,.12); border: 1px solid rgba(255,122,46,.35); color: var(--accent); }
.trade-badge.live::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.trade-badge.soon { background: var(--panel-2); border: 1px solid var(--line); color: var(--faint); }

/* ============================================================
   Browse / search question bank
   ============================================================ */
.browse-controls {
  display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
  position: sticky; top: 64px; z-index: 5;
  background: var(--bg); padding: 10px 0;
  box-shadow: 0 8px 12px -8px rgba(8,5,3,.8);
}
.browse-count { position: sticky; top: 122px; z-index: 5; background: var(--bg); }
#browse-search {
  flex: 1; min-width: 220px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 16px; font-family: var(--sans);
}
#browse-search:focus, #browse-topic:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,46,.2); }
#browse-topic {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 16px;
}
.browse-count { color: var(--muted); font-size: 13px; margin: 0 0 18px; padding-top: 2px; font-family: var(--mono); }
@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);
  border-left: 3px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
@media (prefers-reduced-motion: no-preference) {
  .browse-item { transition: border-color .15s, box-shadow .15s, transform .15s; }
}
.browse-item:hover {
  border-left-color: var(--accent);
  box-shadow: 0 8px 20px -12px rgba(0,0,0,.7);
  transform: translateY(-1px);
}
.bi-q { font-weight: 600; font-size: 15.5px; margin-bottom: 12px; line-height: 1.5; }
.bi-a { font-size: 14px; color: var(--text); margin-bottom: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.bi-a .bi-label, .bi-label {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--green);
  font-weight: 700; margin-right: 6px;
}
.bi-expl { font-size: 13px; color: var(--muted); line-height: 1.55; font-style: italic; margin-bottom: 12px; }
.bi-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.browse-more-wrap { text-align: center; margin-top: 18px; }

.browse-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 48px 24px;
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted);
}
.browse-empty-ico {
  font-family: var(--mono); font-size: 34px; line-height: 1;
  color: var(--accent-2); opacity: .7; margin-bottom: 4px;
}
.browse-empty-title { margin: 0; font-weight: 600; color: var(--text); font-size: 16px; }
.browse-empty-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .browse-empty { animation: trace-in .22s ease both; }
}

/* ============================================================
   Day / night theme toggle
   ============================================================ */
.theme-toggle {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 16px; line-height: 1; padding: 0;
  transition: background .15s, border-color .15s, transform .1s;
}
.theme-toggle:hover { border-color: var(--accent); 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; }

/* ============================================================
   Paywall / upgrade
   ============================================================ */
.plan-badge.premium {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); background: rgba(255,122,46,.12);
  border: 1px solid rgba(255,122,46,.35); padding: 5px 10px; border-radius: 20px;
}
.upgrade-card {
  position: relative; overflow: hidden;
  max-width: 460px; margin: 10px auto 0; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius); padding: 32px 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.upgrade-badge {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent);
  background: rgba(255,122,46,.1); border: 1px solid rgba(255,122,46,.35);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 14px;
}
.upgrade-card h2 { margin: 0 0 10px; }
.upgrade-price { margin: 6px 0 2px; }
.up-amount {
  font-family: var(--mono); font-size: 44px; font-weight: 700;
  background: var(--flame); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.up-per { color: var(--muted); font-size: 16px; }
.upgrade-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.upgrade-list { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.upgrade-list li { position: relative; padding-left: 28px; font-size: 14px; line-height: 1.45; }
.upgrade-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}
.upgrade-cta { width: 100%; font-size: 16px; padding: 14px; }
.upgrade-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); min-height: 18px; }
.upgrade-note.is-error { color: var(--red); }

.results-upsell {
  margin-top: 22px; padding: 18px; border-radius: var(--radius);
  background: rgba(255,122,46,.08); border: 1px solid rgba(255,122,46,.3); text-align: center;
}
.results-upsell p { margin: 0 0 12px; color: var(--text); font-size: 14px; }

/* Auth success message + forgot-password link */
.auth-ok {
  background: rgba(53,201,141,.12); border: 1px solid var(--green);
  color: var(--green); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13px;
}
.auth-forgot { margin: 12px 0 0; text-align: center; }
.auth-forgot .linklike { font-size: 13px; color: var(--muted); }
.auth-forgot .linklike:hover { color: var(--accent); }

/* Brand wordmark — combustion "Pass" */
.brand h1 .brand-pass { color: var(--accent); }

/* Admin link in the top bar (admins only) */
.admin-link { text-decoration: none; border-color: rgba(255,122,46,.4) !important; color: var(--accent) !important; }
.admin-link:hover { background: rgba(255,122,46,.1) !important; }

/* Question diagram/image */
.q-image { margin: 14px 0 18px; }
.q-image img {
  max-width: 100%; height: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; padding: 8px; display: block;
}
.bi-q + .q-image { margin: 10px 0 12px; }
.bi-q + .q-image img { max-width: 340px; }

/* AI-generated explanation honesty note */
.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);
  padding: 1px 7px; border-radius: 10px; vertical-align: middle; letter-spacing: .02em;
}

/* ============================================================
   LANDING PAGE — marketing sections (instrument language)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
:target { scroll-margin-top: 92px; }

/* Section rhythm — id specificity beats the generic .view.active > *+* rule */
#view-trades > .hero { margin-bottom: 0; }
#view-trades > * + * { margin-top: clamp(56px, 8.5vw, 100px); }
#view-trades > .trust-strip { margin-top: clamp(18px, 3vw, 26px); }
#view-trades .lp-section { scroll-margin-top: 92px; }

/* Hero CTA row */
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-cta .btn { min-width: 168px; text-align: center; }
@media (max-width: 560px) {
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { min-width: 0; width: 100%; }
}

/* Section kicker + title + lead (shared) */
.lp-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.6px; color: var(--accent);
}
.lp-kicker span {
  font-size: 11px; color: var(--accent-ink); background: var(--accent);
  padding: 2px 7px; border-radius: 5px; letter-spacing: 1px;
}
.lp-title {
  margin: 0 0 12px; max-width: 22ch;
  font-family: var(--display); font-weight: 700; line-height: 1.12;
  font-size: clamp(23px, 3.4vw, 32px); text-wrap: balance;
}
.lp-lead {
  margin: 0 0 28px; max-width: 62ch;
  color: var(--muted); font-size: clamp(15px, 1.6vw, 16.5px); line-height: 1.6;
}

/* Trust strip */
.trust-strip {
  list-style: none; margin: 0; padding: 14px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 26px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.trust-strip li {
  position: relative;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .3px;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.trust-strip li::before {
  content: ''; display: inline-block; vertical-align: middle;
  width: 6px; height: 6px; margin-right: 10px; border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 640px) {
  .trust-strip { justify-content: flex-start; gap: 10px 18px; padding: 14px 16px; }
  .trust-strip li { font-size: 11px; white-space: normal; }
}

/* Why — value cards */
.why-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.value-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: transform .15s ease, border-color .15s, box-shadow .15s;
}
.value-card::before {
  content: ''; position: absolute; top: 12px; right: 12px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); opacity: .8;
}
.value-card:hover {
  transform: translateY(-3px); border-color: rgba(255,122,46,.45);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,122,46,.12);
}
.value-ico-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 11px; color: var(--accent);
  background: rgba(255,122,46,.1); border: 1px solid rgba(255,122,46,.28);
}
.value-ico { width: 26px; height: 26px; }
.value-card h3 { margin: 0 0 8px; font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1.25; }
.value-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* How it works — steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr);
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--panel); border: 1px solid var(--line);
  border-top: 2px solid var(--line-soft); border-radius: var(--radius);
  padding: 24px 22px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  font-family: var(--mono); font-weight: 700; font-size: 18px;
  color: var(--accent); background: var(--bg-2);
  border: 1px solid rgba(255,122,46,.35); border-radius: 10px;
}
.step h3 { margin: 0 0 8px; font-family: var(--display); font-size: 16px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
/* connector tick between steps on wide screens */
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 44px; right: -9px; z-index: 1;
  width: 8px; height: 8px; background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
}

/* Sample question */
.sample-split {
  display: grid; gap: 28px; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .sample-split { grid-template-columns: .82fr 1.18fr; gap: 40px; }
}
.sample-copy .lp-lead { margin-bottom: 16px; }
.sample-note {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--faint);
}
.sample-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 26px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 44px -26px rgba(0,0,0,.8);
}
.sample-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--flame); border-radius: var(--radius) 0 0 var(--radius); }
.sample-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sample-head .q-source { margin: 0; }
.sample-flag {
  font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent);
  background: rgba(255,122,46,.1); border: 1px solid rgba(255,122,46,.3);
  padding: 3px 9px; border-radius: 20px;
}
.sample-q { margin: 0 0 18px; font-size: clamp(15.5px, 2vw, 17px); font-weight: 600; line-height: 1.5; color: var(--text); }
.sample-opts { display: flex; flex-direction: column; gap: 10px; }
.sample-opt {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px; background: var(--bg-2);
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--text);
}
.sample-opt .s-text { flex: 1; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.s-letter {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: var(--panel-2); border: 1.5px solid var(--line); color: var(--muted);
}
.sample-opt.is-correct {
  border-color: var(--green); background: rgba(53,201,141,.12);
  box-shadow: inset 3px 0 0 var(--green);
}
.sample-opt.is-correct .s-letter { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.s-tick {
  font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--green);
}
.s-tick::before { content: '✓ '; }
.sample-expl {
  margin-top: 16px; padding: 14px 16px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--green); border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
}
.s-expl-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--green); margin-right: 8px;
}

/* Stats band */
.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.stat-fig {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 16px; text-align: center;
  border-left: 1px solid var(--line-soft);
}
.stat-fig:first-child { border-left: none; }
.stat-fig b {
  font-family: var(--mono); font-weight: 700; line-height: 1;
  font-size: clamp(28px, 5vw, 40px); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-fig b.flame {
  background: var(--flame); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-fig span {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--faint);
}
@media (max-width: 560px) {
  .stats-band { grid-template-columns: 1fr 1fr; }
  .stat-fig { padding: 20px 12px; }
  .stat-fig:nth-child(2) { border-left: 1px solid var(--line-soft); }
  .stat-fig:nth-child(3), .stat-fig:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .stat-fig:nth-child(3) { border-left: none; }
}

/* Pricing teaser */
.price-card {
  position: relative; overflow: hidden;
  max-width: 480px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius); padding: 32px 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 20px 50px -30px rgba(0,0,0,.8);
}
.price-figure { margin: 6px 0 4px; }
.price-amt {
  font-family: var(--mono); font-size: 46px; font-weight: 700;
  background: var(--flame); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.price-per { color: var(--muted); font-size: 16px; font-family: var(--mono); }
.price-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.price-list {
  list-style: none; padding: 0; margin: 0 0 24px; text-align: left;
  display: flex; flex-direction: column; gap: 11px;
}
.price-list li { position: relative; padding-left: 28px; font-size: 14px; line-height: 1.45; }
.price-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700;
}
.price-cta { width: 100%; font-size: 16px; padding: 14px; }
.price-foot { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.price-foot .linklike { color: var(--accent); }

/* FAQ — native accessible accordion */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s;
}
.faq-item[open] { border-color: rgba(255,122,46,.4); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 18px; font-weight: 600; font-size: 15px; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(255,122,46,.5); border-radius: var(--radius); }
.faq-item summary::after {
  content: ''; flex-shrink: 0; width: 12px; height: 12px; position: relative;
  background:
    linear-gradient(var(--accent), var(--accent)) center/12px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center/2px 12px no-repeat;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(90deg); background: linear-gradient(var(--accent), var(--accent)) center/12px 2px no-repeat; }
.faq-a { padding: 0 18px 18px; color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 68ch; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: faq-in .22s ease both; }
  @keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

/* Final CTA band */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(36px, 6vw, 56px) clamp(24px, 5vw, 48px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 220px at 50% -30%, var(--glow), transparent 70%);
}
.cta-mark {
  display: inline-block; width: 44px; height: 4px; margin: 0 auto 20px;
  background: var(--flame); border-radius: 4px;
}
.cta-band h2 { margin: 0 0 12px; font-size: clamp(24px, 3.6vw, 34px); }
.cta-band p { margin: 0 auto 26px; max-width: 54ch; color: var(--muted); font-size: 15.5px; }
.cta-band .cta-row { justify-content: center; }
.cta-band .btn { min-width: 190px; }
@media (max-width: 560px) {
  .cta-band .cta-row { flex-direction: column; }
  .cta-band .btn { min-width: 0; width: 100%; }
}

/* ============================================================
   Richer footer
   ============================================================ */
.foot-top {
  display: grid; gap: 28px 40px; text-align: left;
  grid-template-columns: 1fr; max-width: 1060px; margin: 0 auto;
  padding-bottom: 26px; border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 720px) {
  .foot-top { grid-template-columns: 1.4fr 2fr; }
}
.foot-brand { display: flex; flex-direction: column; gap: 12px; }
.foot-mark { display: inline-flex; line-height: 0; filter: drop-shadow(0 2px 6px rgba(255,122,46,.3)); }
.foot-tag { margin: 0; color: var(--muted); font-family: var(--sans); font-size: 13.5px; line-height: 1.6; max-width: 42ch; }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-col h4 {
  margin: 0 0 2px; font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; color: var(--faint);
}
.foot-col .linklike {
  text-decoration: none; color: var(--muted); font-family: var(--sans); font-size: 13.5px;
  padding: 2px 0; transition: color .15s, transform .15s;
}
.foot-col .linklike:hover { color: var(--accent); transform: translateX(2px); }
.foot-disclaimer {
  max-width: 1060px; margin: 22px auto 0; text-align: center;
  color: var(--faint); font-family: var(--mono); font-size: 11px; line-height: 1.7;
}
@media (max-width: 560px) {
  .foot { padding: 24px 16px; }
  .foot-links { grid-template-columns: 1fr 1fr; gap: 20px; }
}
