/* ============================================================
   NMC Test Pass — "Clinical Calm"
   Bright, airy, healthcare-app design system.
   Light-first (leads light); a gentle deep-teal dark theme.
   Typeface: Plus Jakarta Sans (humanist, rounded, friendly).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces & mint backdrop */
  --bg:          #f6fbfa;
  --bg-2:        #eaf6f2;
  --bg-3:        #e3f3ee;
  --surface:     #ffffff;
  --surface-2:   #f1f9f6;
  --surface-3:   #e9f5f1;

  /* Ink */
  --text:        #16332e;
  --text-soft:   #33544e;
  --muted:       #6a877f;
  --faint:       #93aca4;

  /* Teal / emerald primary */
  --primary:      #0d9488;
  --primary-2:    #14b8a6;
  --primary-strong:#0f766e;
  --primary-ink:  #ffffff;
  --primary-soft: #d3f3ec;
  --primary-soft-2:#e4f7f2;

  /* Warm highlights */
  --coral:       #fb7185;
  --coral-soft:  #ffe4e6;
  --sky:         #38bdf8;
  --sky-soft:    #e0f4ff;
  --amber:       #f59e0b;

  /* Status */
  --pass:        #059669;
  --pass-soft:   #d6f3e6;
  --fail:        #e11d63;
  --fail-soft:   #ffe1ec;

  /* Lines */
  --border:      #d8ece6;
  --border-soft: #e6f2ee;
  --ring:        rgba(13,148,136,.42);

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --pill: 999px;

  /* Soft, teal-tinted shadows */
  --shadow-xs: 0 1px 2px rgba(16,73,66,.05);
  --shadow-sm: 0 4px 14px -6px rgba(16,73,66,.18);
  --shadow:    0 14px 34px -16px rgba(16,73,66,.24);
  --shadow-lg: 0 30px 60px -26px rgba(16,73,66,.32);
  --shadow-primary: 0 16px 30px -12px rgba(13,148,136,.5);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --fast: 140ms;
  --mid:  240ms;

  --maxw: 1120px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg:          #0a1c1a;
  --bg-2:        #0c221f;
  --bg-3:        #0e2825;
  --surface:     #12302c;
  --surface-2:   #163832;
  --surface-3:   #1b423b;

  --text:        #e8f5f1;
  --text-soft:   #bfdcd5;
  --muted:       #8bafa7;
  --faint:       #6f938b;

  --primary:      #2dd4bf;
  --primary-2:    #5eead4;
  --primary-strong:#14b8a6;
  --primary-ink:  #052420;
  --primary-soft: rgba(45,212,191,.16);
  --primary-soft-2:rgba(45,212,191,.10);

  --coral:       #fb7185;
  --coral-soft:  rgba(251,113,133,.16);
  --sky:         #56ccf8;
  --sky-soft:    rgba(86,204,248,.14);

  --pass:        #34d399;
  --pass-soft:   rgba(52,211,153,.16);
  --fail:        #fb7185;
  --fail-soft:   rgba(251,113,133,.16);

  --border:      #244841;
  --border-soft: #1d3b35;
  --ring:        rgba(45,212,191,.5);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 6px 18px -8px rgba(0,0,0,.55);
  --shadow:    0 18px 40px -18px rgba(0,0,0,.6);
  --shadow-lg: 0 34px 66px -26px rgba(0,0,0,.66);
  --shadow-primary: 0 16px 34px -14px rgba(45,212,191,.4);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(60% 55% at 82% -8%, var(--primary-soft-2), transparent 60%),
    radial-gradient(48% 46% at 6% 4%, var(--sky-soft), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  line-height: 1.6;
  font-size: 16px;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
a { color: inherit; }

::selection { background: var(--primary-soft); color: var(--text); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 34px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand .logo {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.brand .logo svg { width: 30px; height: 30px; }
.brand h1 {
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}
.brand .brand-pass { color: var(--primary); }
.brand p {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ---------- Nav ---------- */
.topbar nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.nav-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  font-size: .86rem;
  padding: 8px 14px;
  border-radius: var(--pill);
  transition: color var(--fast), background var(--fast);
  white-space: nowrap;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active {
  color: var(--primary-ink);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .nav-btn.active { color: var(--primary-ink); }
.nav-btn[hidden] { display: none; }

.auth-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.user-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
}
.plan-badge {
  display: inline-flex; align-items: center;
  font-size: .74rem; font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--pill);
}
.plan-badge.premium {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: var(--primary-ink);
  box-shadow: var(--shadow-sm);
}
.admin-link { text-decoration: none; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: relative;
  width: 46px; height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast);
}
.theme-toggle:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.theme-ico { position: absolute; font-size: 1.05rem; transition: opacity var(--fast), transform var(--mid); }
.theme-ico-sun { opacity: 0; transform: rotate(-40deg) scale(.6); }
.theme-ico-moon { opacity: 1; }
[data-theme="dark"] .theme-ico-moon { opacity: 0; transform: rotate(40deg) scale(.6); }
[data-theme="dark"] .theme-ico-sun { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: .94rem;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast), background var(--fast), color var(--fast), border-color var(--fast);
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn:active { transform: translateY(1px) scale(.99); }

.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: var(--primary-ink);
  box-shadow: var(--shadow-primary);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -14px rgba(13,148,136,.6); }

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary-strong); transform: translateY(-1px); }
[data-theme="dark"] .btn.ghost:hover { color: var(--primary-2); }

.btn-sm { padding: 8px 14px; font-size: .82rem; }

.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

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

.linklike {
  background: none; border: none; padding: 0;
  color: var(--primary-strong); font-weight: 700; font-size: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
[data-theme="dark"] .linklike { color: var(--primary-2); }

/* ---------- Layout / main ---------- */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 34px) 80px;
}

.view { display: none; animation: rise var(--mid) var(--ease); }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.section-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 30px 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 22px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: var(--text); }
h3 { font-weight: 700; letter-spacing: -0.01em; }
h4 { font-weight: 700; letter-spacing: -0.01em; color: var(--text); }

.view-intro { color: var(--text-soft); max-width: 62ch; margin-top: 10px; }
.trust-note { color: var(--pass); font-weight: 600; font-size: .9rem; margin-top: 10px; }

.back {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 600; font-size: .85rem;
  padding: 8px 15px;
  border-radius: var(--pill);
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--fast), color var(--fast), border-color var(--fast);
}
.back:hover { transform: translateX(-2px); color: var(--primary-strong); border-color: var(--primary); }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(26px, 5vw, 52px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero h2 { position: relative; z-index: 2; max-width: 20ch; }
.hero > p { position: relative; z-index: 2; color: var(--text-soft); max-width: 60ch; margin-top: 14px; font-size: 1.02rem; }

.hero-trades { text-align: left; }

.eyebrow {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .01em;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 7px 14px;
  border-radius: var(--pill);
  margin-bottom: 18px;
}
[data-theme="dark"] .eyebrow { color: var(--primary-2); }
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 26%, transparent);
  animation: beat 2.4s ease-in-out infinite;
}
@keyframes beat { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .55; } }

.hero-trust {
  position: relative; z-index: 2;
  list-style: none; padding: 0; margin: 24px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 20px;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--text-soft); }
.ht-ico {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--pass-soft); color: var(--pass);
  font-size: .74rem; font-weight: 800;
}

/* Hero decorative graphics */
.hero-decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-blob {
  position: absolute;
  top: -30%; right: -14%;
  width: min(62%, 520px); height: auto;
  fill: var(--primary-soft);
  opacity: .8;
}
[data-theme="dark"] .hero-blob { opacity: .5; }
.hero-pulse {
  position: absolute;
  right: 4%; bottom: 8%;
  width: min(52%, 440px); height: 90px;
  opacity: .9;
}
.pulse-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 3.2s var(--ease) forwards .2s;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--primary) 40%, transparent));
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Trade grid (landing CTA cards) ---------- */
.trade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.trade-card {
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid), border-color var(--fast);
  overflow: hidden;
}
.trade-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--mid) var(--ease);
}
.trade-card.live:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.trade-card.live:hover::after { transform: scaleX(1); }
.trade-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.trade-card.soon { opacity: .72; cursor: not-allowed; }
.trade-card:disabled { cursor: not-allowed; }

.trade-icon {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--primary-soft);
  font-size: 1.6rem;
  margin-bottom: 6px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}
.trade-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.015em; color: var(--text); }
.trade-tagline { color: var(--muted); font-size: .9rem; line-height: 1.45; flex-grow: 1; }
.trade-badge {
  display: inline-flex; align-items: center;
  margin-top: 10px;
  font-size: .8rem; font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--pill);
}
.trade-badge.live { background: var(--primary-soft); color: var(--primary-strong); }
[data-theme="dark"] .trade-badge.live { color: var(--primary-2); }
.trade-badge.soon { background: var(--surface-3); color: var(--muted); }

/* ---------- Generic cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.mock-card { display: flex; flex-direction: column; }
.mock-card h4 { font-size: 1.1rem; }
.mock-card p { color: var(--muted); font-size: .9rem; margin-top: 6px; }

.exam-facts {
  list-style: none; padding: 0; margin: 18px 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.exam-facts li {
  display: flex; flex-direction: column; gap: 3px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 12px 6px;
}
.exam-facts li span { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.exam-facts li b { font-size: 1.02rem; color: var(--text); font-variant-numeric: tabular-nums; }
.mock-card .btn { margin-top: auto; width: 100%; }

/* ---------- Practice setup ---------- */
.setup-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 32px);
  box-shadow: var(--shadow-sm);
  max-width: 520px;
  display: flex; flex-direction: column; gap: 18px;
  margin-top: 8px;
}
.setup-card label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--text-soft); }
.setup-card small { color: var(--muted); font-size: .84rem; line-height: 1.5; }

select, input[type="search"], input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .96rem;
  font-weight: 500;
  transition: border-color var(--fast), box-shadow var(--fast);
}
select:focus, input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236a877f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ---------- Quiz ---------- */
.quiz-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.quiz-header .back { margin-bottom: 0; }
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 180px; }
.progress-bar {
  flex: 1; height: 10px;
  background: var(--surface-3);
  border-radius: var(--pill);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
#progress-fill {
  height: 100%;
  width: 5%;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width var(--mid) var(--ease);
}
#progress-fill.full { background: linear-gradient(90deg, var(--pass), var(--primary-2)); }
#progress-text { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.timer {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: .98rem;
  padding: 9px 16px;
  border-radius: var(--pill);
  background: var(--primary-soft);
  color: var(--primary-strong);
}
[data-theme="dark"] .timer { color: var(--primary-2); }
.timer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: beat 2s ease-in-out infinite; }
.timer.warn { background: var(--fail-soft); color: var(--fail); animation: pulseWarn 1s ease-in-out infinite; }
@keyframes pulseWarn { 50% { box-shadow: 0 0 0 5px var(--fail-soft); } }

.question-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}
.q-source {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 5px 11px; border-radius: var(--pill);
  margin-bottom: 14px;
}
[data-theme="dark"] .q-source { color: var(--primary-2); }
.q-text { font-size: clamp(1.1rem, 2.2vw, 1.28rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.4; color: var(--text); }

.q-image { margin: 18px 0; }
.q-image img { max-width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--border); }

.options { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.option {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .98rem; font-weight: 500;
  transition: transform var(--fast) var(--ease), border-color var(--fast), background var(--fast), box-shadow var(--fast);
}
.option:hover:not(.disabled) { border-color: var(--primary); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.option:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.letter {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text-soft);
  font-weight: 800; font-size: .92rem;
  transition: background var(--fast), color var(--fast);
}
.option:hover:not(.disabled) .letter { background: var(--primary-soft); color: var(--primary-strong); }
.option.selected { border-color: var(--primary); background: var(--primary-soft-2); }
.option.selected .letter { background: var(--primary); color: var(--primary-ink); }
.option.disabled { cursor: default; }
.option.correct { border-color: var(--pass); background: var(--pass-soft); }
.option.correct .letter { background: var(--pass); color: #fff; }
.option.incorrect { border-color: var(--fail); background: var(--fail-soft); }
.option.incorrect .letter { background: var(--fail); color: #fff; }

.feedback {
  margin-top: 20px;
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  animation: rise var(--mid) var(--ease);
}
.verdict { font-weight: 800; font-size: .96rem; margin-bottom: 6px; }
.verdict.right { color: var(--pass); }
.verdict.wrong { color: var(--fail); }
.expl { color: var(--text-soft); font-size: .92rem; line-height: 1.6; }

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

/* ---------- Results ---------- */
.score-summary {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 24px;
}
.score-ring {
  display: grid; place-items: center;
  width: 132px; height: 132px;
  margin: 0 auto 14px;
  border-radius: 50%;
  font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface);
  position: relative;
}
.score-ring::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(var(--pass) calc(var(--_p, 1) * 1turn), var(--surface-3) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
  z-index: -1;
}
.score-ring.pass { color: var(--pass); }
.score-ring.pass::before { background: conic-gradient(var(--pass) .82turn, var(--surface-3) 0); }
.score-ring.fail { color: var(--fail); }
.score-ring.fail::before { background: conic-gradient(var(--fail) .48turn, var(--surface-3) 0); }
.score-summary .sub { color: var(--text-soft); font-size: 1rem; }
.score-summary .sub .pass { color: var(--pass); font-weight: 800; }
.score-summary .sub .fail { color: var(--fail); font-weight: 800; }

.topic-breakdown {
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  text-align: left;
}
.topic-breakdown h4 { margin-bottom: 14px; font-size: .96rem; }
.topic-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.2fr) 3fr auto;
  align-items: center; gap: 12px;
  padding: 8px 0;
}
.topic-name { font-size: .86rem; font-weight: 600; color: var(--text-soft); }
.topic-bar { height: 10px; background: var(--surface-3); border-radius: var(--pill); overflow: hidden; border: 1px solid var(--border-soft); }
.topic-fill { height: 100%; border-radius: var(--pill); transition: width var(--mid) var(--ease); }
.topic-fill.strong { background: linear-gradient(90deg, var(--pass), var(--primary-2)); }
.topic-fill.ok { background: linear-gradient(90deg, var(--amber), #fbbf24); }
.topic-fill.weak { background: linear-gradient(90deg, var(--fail), var(--coral)); }
.topic-pct { font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topic-pct.strong { color: var(--pass); }
.topic-pct.ok { color: var(--amber); }
.topic-pct.weak { color: var(--fail); }
.topic-pct small { color: var(--muted); font-weight: 600; }
.topic-tip { margin-top: 14px; font-size: .88rem; color: var(--text-soft); background: var(--surface-2); padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-soft); }
.topic-tip.good { color: var(--pass); }
.topic-tip strong { color: var(--text); }

.results-upsell {
  margin-top: 22px; padding: 20px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--primary-soft), var(--sky-soft));
  border: 1px solid var(--border-soft);
  text-align: center;
}
.results-upsell p { color: var(--text-soft); margin-bottom: 14px; }

.results-review { display: flex; flex-direction: column; gap: 12px; }
.review-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}
.review-item.right { border-left-color: var(--pass); }
.review-item.wrong { border-left-color: var(--fail); }
.rq { font-weight: 700; color: var(--text); line-height: 1.45; }
.ra { margin-top: 8px; font-size: .9rem; color: var(--text-soft); }
.ra b { color: var(--text); }
.rexpl { margin-top: 8px; font-size: .88rem; color: var(--muted); line-height: 1.55; }
.review-tags, .bi-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.topic-tag, .reg-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; font-weight: 700;
  padding: 5px 11px; border-radius: var(--pill);
}
.topic-tag { background: var(--primary-soft); color: var(--primary-strong); }
[data-theme="dark"] .topic-tag { color: var(--primary-2); }
.reg-tag { background: var(--sky-soft); color: #0369a1; }
[data-theme="dark"] .reg-tag { color: var(--sky); }
.ai-note { background: var(--coral-soft); color: var(--fail); padding: 2px 7px; border-radius: var(--pill); font-size: .68rem; font-weight: 700; margin-left: 6px; }

/* ---------- Browse / question bank ---------- */
.browse-controls { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.browse-controls input[type="search"] { flex: 1; min-width: 220px; }
.browse-controls select { flex: 0 0 auto; width: auto; min-width: 200px; }
.browse-count { color: var(--muted); font-size: .84rem; font-weight: 600; margin: 8px 0 16px; }
.browse-list { display: flex; flex-direction: column; gap: 14px; }
.browse-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--fast), transform var(--fast);
}
.browse-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.bi-q { font-weight: 700; color: var(--text); line-height: 1.45; }
.bi-a {
  margin-top: 12px; padding: 12px 14px;
  background: var(--pass-soft);
  border-radius: var(--r-sm);
  font-size: .92rem; color: var(--text);
}
.bi-label { font-weight: 800; color: var(--pass); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
.bi-expl { margin-top: 12px; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.browse-more-wrap { text-align: center; margin-top: 22px; }
.browse-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.browse-empty-ico { font-size: 2.6rem; color: var(--primary); opacity: .6; }
.browse-empty-title { font-weight: 700; color: var(--text); margin-top: 10px; }
.browse-empty-sub { font-size: .9rem; margin-top: 4px; }

/* ---------- Upgrade / paywall ---------- */
.upgrade-card {
  position: relative;
  max-width: 560px; margin: 8px auto 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 44px);
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
}
.upgrade-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--sky));
}
.upgrade-badge {
  display: inline-flex;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  padding: 7px 14px; border-radius: var(--pill);
  background: var(--primary-soft); color: var(--primary-strong);
  margin-bottom: 14px;
}
[data-theme="dark"] .upgrade-badge { color: var(--primary-2); }
.upgrade-price { margin: 14px 0 4px; }
.up-amount { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.up-per { font-size: 1rem; color: var(--muted); font-weight: 600; }
.upgrade-sub { color: var(--muted); font-size: .92rem; }
.upgrade-list { list-style: none; padding: 0; margin: 24px 0; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.upgrade-list li { position: relative; padding-left: 34px; color: var(--text-soft); font-weight: 500; line-height: 1.5; }
.upgrade-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--pass-soft); color: var(--pass);
  font-size: .78rem; font-weight: 800;
}
.upgrade-cta { width: 100%; margin-top: 6px; padding: 16px; font-size: 1rem; }
.upgrade-note { margin-top: 12px; font-size: .86rem; color: var(--muted); }
.upgrade-note.is-error { color: var(--fail); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 8px 0 26px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 6px;
}
.stat span { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.stat b { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat b.pass { color: var(--pass); }
.stat b.fail { color: var(--fail); }

.dash-empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-lg); padding: 40px 20px; text-align: center; color: var(--muted); }

.dash-history { display: flex; flex-direction: column; gap: 10px; }
.hist-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  box-shadow: var(--shadow-xs);
}
.hist-row.right { border-left-color: var(--pass); }
.hist-row.wrong { border-left-color: var(--fail); }
.hist-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hist-mode { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: var(--pill); background: var(--surface-3); color: var(--text-soft); }
.hist-exam { font-weight: 700; color: var(--text); }
.hist-meta { display: flex; align-items: center; gap: 14px; }
.hist-when { font-size: .8rem; color: var(--muted); }
.hist-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.hist-score.pass { color: var(--pass); }
.hist-score.fail { color: var(--fail); }

.muted-line { color: var(--muted); font-size: .9rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background: color-mix(in srgb, #052925 55%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade var(--mid) var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(24px, 5vw, 34px);
  box-shadow: var(--shadow-lg);
  animation: pop var(--mid) var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.modal form { display: flex; flex-direction: column; gap: 15px; }
.modal label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .86rem; color: var(--text-soft); }
.modal .btn.primary { width: 100%; margin-top: 6px; padding: 14px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--surface-2); color: var(--muted);
  font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
  transition: background var(--fast), color var(--fast);
}
.modal-close:hover { background: var(--fail-soft); color: var(--fail); }

.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px;
  width: 34px; height: 34px; border-radius: 10px;
  border: none; background: transparent; font-size: 1rem;
  display: grid; place-items: center; color: var(--muted);
}
.pw-toggle:hover { background: var(--surface-2); }

.auth-error, .auth-ok { font-size: .86rem; font-weight: 600; padding: 11px 14px; border-radius: var(--r-sm); line-height: 1.45; }
.auth-error { background: var(--fail-soft); color: var(--fail); }
.auth-ok { background: var(--pass-soft); color: var(--pass); }
.auth-error[hidden], .auth-ok[hidden] { display: none; }
.auth-switch, .auth-forgot { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 14px; }
.auth-forgot { margin-top: 12px; }

/* ============================================================
   LANDING MARKETING SECTIONS
   ============================================================ */
.lp-section { margin-top: clamp(52px, 8vw, 92px); }

.lp-head { max-width: 60ch; margin: 0 auto 30px; text-align: center; }
.lp-eyebrow {
  display: inline-block;
  font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary-strong);
  margin-bottom: 12px;
}
[data-theme="dark"] .lp-eyebrow { color: var(--primary-2); }
.lp-title {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.18; color: var(--text);
  text-wrap: balance;
}
.lp-sub {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.get-started .lp-head { margin-bottom: 24px; }

/* Trust strip */
.trust-strip {
  list-style: none;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin: 26px auto 0;
  padding: 16px 22px;
  max-width: 940px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
}
.trust-strip li {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .86rem; font-weight: 600; color: var(--text-soft);
}
.trust-strip li:not(:first-child)::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); opacity: .55;
}

/* Why cards */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid);
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.why-ico {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 15px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 16%, transparent);
}
[data-theme="dark"] .why-ico { color: var(--primary-2); }
.why-ico svg { width: 26px; height: 26px; }
.why-card h4 { font-size: 1.04rem; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* How it works — steps */
.steps {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-ink);
  font-weight: 800; font-size: 1.1rem;
  box-shadow: var(--shadow-primary);
  margin-bottom: 16px;
}
.step h4 { font-size: 1.04rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .92rem; line-height: 1.55; }
/* connector dots between steps on wide screens */
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50px; right: -13px; z-index: 2;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); opacity: .5;
}

/* Sample question */
.sample-card {
  max-width: 720px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
}
.sample-options { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.sample-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: .96rem; font-weight: 500; color: var(--text);
}
.sample-opt .letter { flex-shrink: 0; }
.sample-opt.is-correct { border-color: var(--pass); background: var(--pass-soft); }
.sample-opt.is-correct .letter { background: var(--pass); color: #fff; }
.opt-mark {
  margin-left: auto;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--pass); color: #fff;
  font-size: .8rem; font-weight: 800;
}
.sample-expl {
  margin-top: 20px;
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--pass);
}
.sample-expl .verdict { display: inline-block; margin-bottom: 6px; }
.sample-expl p { color: var(--text-soft); font-size: .92rem; line-height: 1.6; }

/* Stats band */
.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-fig {
  background: var(--surface);
  padding: 30px 18px;
  text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-fig b {
  font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800;
  letter-spacing: -0.03em; color: var(--primary-strong);
  font-variant-numeric: tabular-nums; line-height: 1;
}
[data-theme="dark"] .stat-fig b { color: var(--primary-2); }
.fig-plus, .fig-unit { font-size: .55em; font-weight: 700; color: var(--muted); margin-left: 2px; }
.stat-fig span { font-size: .84rem; font-weight: 600; color: var(--text-soft); }

/* Pricing teaser */
.price-card {
  max-width: 560px; margin: 0 auto;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 40px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.price-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--sky));
}
.price-head { text-align: center; }
.price-tag { margin: 14px 0 4px; }
.price-amount { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.price-per { font-size: 1rem; color: var(--muted); font-weight: 600; }
.price-note { color: var(--muted); font-size: .88rem; }
.price-list {
  list-style: none; padding: 0; margin: 24px 0;
  display: flex; flex-direction: column; gap: 12px;
}
.price-list li { position: relative; padding-left: 34px; color: var(--text-soft); font-weight: 500; line-height: 1.5; }
.price-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--pass-soft); color: var(--pass);
  font-size: .78rem; font-weight: 800;
}
.price-cta { width: 100%; padding: 15px; font-size: 1rem; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow var(--fast), border-color var(--fast);
}
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: var(--primary-soft); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px;
  font-weight: 700; font-size: 1rem; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ring); border-radius: var(--r); }
.faq-chev {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); position: relative;
  transition: background var(--fast), transform var(--mid) var(--ease);
}
.faq-chev::before, .faq-chev::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 10px; height: 2px; border-radius: 2px; background: var(--primary-strong);
  transform: translate(-50%, -50%);
}
[data-theme="dark"] .faq-chev::before, [data-theme="dark"] .faq-chev::after { background: var(--primary-2); }
.faq-chev::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform var(--mid) var(--ease); }
.faq-item[open] .faq-chev { background: var(--primary-soft); }
.faq-item[open] .faq-chev::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item p {
  padding: 0 20px 20px;
  color: var(--text-soft);
  font-size: .94rem; line-height: 1.65;
  max-width: 68ch;
}

/* Final CTA band */
.cta-band {
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--sky-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(36px, 6vw, 60px) clamp(22px, 5vw, 48px);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cta-band-decor { position: absolute; inset: 0; z-index: 1; opacity: .5; pointer-events: none; }
.cta-band-decor svg { position: absolute; left: 0; bottom: 10%; width: 100%; height: 80px; }
.cta-band h3 { position: relative; z-index: 2; font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 800; letter-spacing: -0.025em; color: var(--text); text-wrap: balance; max-width: 22ch; margin: 0 auto; }
.cta-band p { position: relative; z-index: 2; color: var(--text-soft); margin: 12px auto 22px; max-width: 46ch; }
.cta-band .btn { position: relative; z-index: 2; }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--maxw);
  margin: clamp(52px, 8vw, 88px) auto 0;
  padding: 40px clamp(16px, 4vw, 34px) 44px;
  border-top: 1px solid var(--border-soft);
  color: var(--faint);
  font-size: .78rem;
  line-height: 1.6;
}
.foot-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px 48px;
  padding-bottom: 30px;
}
.foot-brand { display: flex; align-items: flex-start; gap: 12px; max-width: 340px; }
.foot-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.foot-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.foot-tag { color: var(--muted); font-size: .84rem; margin-top: 4px; line-height: 1.5; }
.foot-cols { display: flex; gap: 44px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col h5 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); font-weight: 800; }
.foot-link {
  background: none; border: none; padding: 0; text-align: left;
  color: var(--muted); font-size: .88rem; font-weight: 600;
  transition: color var(--fast);
}
.foot-link:hover { color: var(--primary-strong); }
[data-theme="dark"] .foot-link:hover { color: var(--primary-2); }
.foot-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 6px; }
.foot-legal {
  padding-top: 26px;
  border-top: 1px solid var(--border-soft);
  color: var(--faint);
  max-width: 90ch;
}

/* ---------- Utility / state ---------- */
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ---------- Focus visibility ---------- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.option:focus-visible, .btn:focus-visible, .trade-card:focus-visible, .nav-btn:focus-visible { outline: none; }
.nav-btn:focus-visible { box-shadow: 0 0 0 3px var(--ring); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar { gap: 10px; }
  .brand p { display: none; }
  .topbar nav {
    order: 4;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .brand { margin-right: 0; }
  .brand h1 { font-size: 1.05rem; }
  .auth-area { order: 3; margin-left: auto; }
  .exam-facts { grid-template-columns: repeat(3, 1fr); }
  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .btn { min-width: 46%; }
  #prev-q { flex: 1; }
  .topic-row { grid-template-columns: 1fr auto; }
  .topic-row .topic-bar { grid-column: 1 / -1; order: 3; }
  .hero-pulse { display: none; }

  /* Landing at phone widths */
  .trust-strip { border-radius: var(--r-lg); padding: 16px 18px; }
  .stat-fig { padding: 22px 12px; }
  .sample-opt { align-items: flex-start; }
  .opt-mark { align-self: center; }
  .foot-top { flex-direction: column; gap: 26px; }
  .foot-cols { gap: 32px; }
}

@media (max-width: 380px) {
  .stat-fig span { font-size: .78rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .pulse-line { stroke-dashoffset: 0; }
}
