/* ============================================================
   StudyTrain — Neon green tech theme
   Near-black surfaces + neon green accent. Technical sans + monospace.
   ============================================================ */

:root {
  /* Core palette */
  --neon:           #00E676;       /* primary — modern minty neon */
  --neon-deep:      #00C853;       /* hover / pressed */
  --neon-dim:       #00E67633;     /* 20% — soft accents */
  --neon-faint:     #00E67611;     /* 7%  — borders, dividers */

  --ink:            #0A0E14;       /* near-black — primary dark surface */
  --ink-2:          #111827;       /* secondary dark surface */
  --ink-3:          #1F2937;       /* card backgrounds on dark */
  --line-dark:      #1F2937;
  --line-dark-2:    #2A3441;

  --surface:        #ECEFF5;       /* slightly deeper off-white — section background */
  --surface-2:      #FBFCFE;       /* card body — slightly off-white, lifted against surface */
  --text:           #0F172A;       /* slate-900 — body on light */
  --text-soft:      #475569;       /* slate-600 */
  --text-faint:     #94A3B8;       /* slate-400 */
  --text-dark:      #E5E7EB;       /* on dark surfaces */
  --text-dark-soft: #CBD5E1;       /* on dark, secondary — bumped for AA contrast */
  --line:           #E2E8F0;       /* slate-200 */

  --shadow-sm:      0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md:      0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-neon:    0 8px 32px rgba(0, 230, 118, 0.25);
  --radius:         10px;
  --radius-sm:      6px;

  /* Typography — focused technical */
  --sans:  -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "JetBrains Mono", "Fira Code", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

a { color: var(--neon-deep); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--neon); }

/* Screen-reader-only utility (visible to AT, hidden visually) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accessibility — visible focus ring on all interactives */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.section-kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--neon-deep);
  font-weight: 600;
  margin: 0 0 14px;
}
.section-title {
  font-family: var(--sans);
  font-size: clamp(1.85rem, 3.4vw, 2.45rem);
  margin: 0 0 8px;
  color: var(--text);
  letter-spacing: -0.025em;
  font-weight: 750;
  line-height: 1.1;
}
.section-sub {
  color: var(--text-soft);
  margin: 0 0 36px;
  font-size: 1.04rem;
  max-width: 720px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.015em;
}
.brand:hover { color: var(--text-dark); }
.brand-glyph {
  font-family: var(--mono);
  color: var(--neon);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.brand-name { letter-spacing: -0.02em; }
.brand-cursor {
  color: var(--neon);
  font-family: var(--mono);
  font-weight: 700;
  margin-left: 2px;
  animation: brand-cursor-blink 1s steps(2, start) infinite;
}
@keyframes brand-cursor-blink {
  to { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-cursor { animation: none; }
}
.site-nav a {
  color: var(--text-dark-soft);
  margin-left: 22px;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--neon); }
.nav-cta {
  background: var(--neon);
  color: var(--ink) !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--neon-deep); color: var(--ink) !important; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--text-dark);
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}
.hero::before {
  /* faint dot grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--neon-faint) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.7;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 56px;
  position: relative;
}
.hero-copy { max-width: 540px; }
.hero-kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  margin: 0 0 22px;
  font-weight: 600;
  color: var(--neon);
}
.hero-title {
  font-family: var(--sans);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 0 22px;
  color: #FFFFFF;
}
.hero-offer {
  font-size: 1.05rem;
  color: #FFFFFF;
  margin: 0 0 14px;
  line-height: 1.5;
  max-width: 500px;
}
.hero-offer strong { color: var(--neon); font-weight: 700; }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-dark-soft);
  margin: 0 0 28px;
  line-height: 1.6;
  max-width: 500px;
}
.hero-cta {
  margin: 0 0 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-trust {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dark-soft);
  letter-spacing: 0.04em;
  margin: 0;
}
.hero-trust strong { color: var(--neon); font-weight: 600; }

.hero-art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-dark-2);
  box-shadow: var(--shadow-neon);
}
.hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  font-family: var(--sans);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--neon);
  color: var(--ink) !important;
  border-color: var(--neon);
}
.btn-primary:hover { background: var(--neon-deep); border-color: var(--neon-deep); color: var(--ink) !important; }
.btn-ghost {
  background: transparent;
  color: var(--text-dark) !important;
  border: 1px solid var(--line-dark-2);
}
.btn-ghost:hover { border-color: var(--neon); color: var(--neon) !important; }
.btn-buy {
  background: var(--ink);
  color: var(--neon) !important;
  padding: 8px 18px;
  font-size: 0.88rem;
  border: 1px solid var(--neon);
}
.btn-buy:hover { background: var(--neon); color: var(--ink) !important; }
.btn-disabled {
  background: var(--line);
  color: var(--text-faint) !important;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--line);
}
/* "Launching soon" non-interactive label — replaces a disabled link */
.btn-soon {
  background: var(--line);
  color: var(--text-soft) !important;
  border: 1px dashed var(--text-faint);
  font-weight: 600;
  cursor: not-allowed;
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.btn-soon.btn-buy-primary {
  background: rgba(0, 230, 118, 0.10);
  color: var(--neon-deep) !important;
  border: 1px dashed var(--neon);
  font-family: var(--sans);
  font-size: 0.9rem;
}

/* Secondary nav button when logged-in */
.nav-cta-secondary {
  background: transparent !important;
  color: var(--text-dark) !important;
  border: 1px solid var(--line-dark-2);
}
.nav-cta-secondary:hover { border-color: var(--neon); color: var(--neon) !important; background: transparent !important; }

/* Admin nav link — distinct treatment so the admin can see they're operating with elevated rights */
.nav-admin {
  color: var(--neon) !important;
  border: 1px solid var(--neon-faint);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: var(--mono, Menlo, Consolas, monospace);
  letter-spacing: 0.5px;
}
.nav-admin:hover { background: var(--neon-faint); }
.nav-admin::before { content: "⚙ "; font-size: 0.9em; }

/* ============================================================
   Admin pages — share the site shell, distinct content styling
   ============================================================ */
.admin-page { padding: 40px 0 80px; }
.admin-header { margin: 0 0 32px; }
.admin-title { font-size: 1.8rem; margin: 6px 0 8px; color: var(--text); }
.admin-sub { color: var(--text-soft); font-size: 0.95rem; margin: 0; }
.admin-back { color: var(--neon); text-decoration: none; font-family: var(--mono); font-size: 0.9rem; }
.admin-back:hover { text-decoration: underline; }

.admin-flash {
  padding: 12px 18px;
  border-radius: 8px;
  margin: 0 0 24px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.admin-flash-ok  { background: rgba(0,230,118,0.08); color: var(--neon-deep); border: 1px solid var(--neon); }
.admin-flash-err { background: rgba(244,67,54,0.10); color: #c0392b; border: 1px solid rgba(244,67,54,0.4); }

/* Admin index — tools as cards */
.admin-tools { display: grid; gap: 12px; }
.admin-tool {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.admin-tool:hover { border-color: var(--neon); transform: translateY(-1px); }
.admin-tool-arrow { float: right; color: var(--neon); font-size: 1.4rem; line-height: 1; }
.admin-tool-title { color: var(--neon-deep); margin: 0 0 4px; font-size: 1.1rem; }
.admin-tool-desc  { color: var(--text-soft); margin: 0; font-size: 0.9rem; line-height: 1.5; }

.admin-note {
  margin: 32px 0 0;
  padding: 16px 20px;
  background: rgba(255,170,0,0.05);
  border: 1px solid rgba(255,170,0,0.25);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
}
.admin-note code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* Admin users list — per-user cards with collapsible licence management */
.admin-users-list { display: grid; gap: 12px; }
.admin-user-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
}
.admin-user-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.admin-user-meta { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.admin-user-id    { color: var(--text-faint); font-family: var(--mono); font-size: 0.85rem; }
.admin-user-email { color: var(--neon-deep); font-family: var(--mono); font-size: 0.95rem; font-weight: 700; }
.admin-user-name  { color: var(--text); font-size: 0.95rem; }
.admin-user-stats { display: flex; gap: 18px; align-items: center; font-size: 0.85rem; color: var(--text-soft); flex-wrap: wrap; }
.admin-user-stamp { font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); }

.admin-user-licences { margin-top: 12px; }
.admin-user-licences summary {
  cursor: pointer;
  color: var(--neon-deep);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 0;
}
.admin-user-licences-body { padding: 12px 0; border-top: 1px dashed var(--line); margin-top: 6px; }

.admin-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 0.88rem; }
.admin-table th {
  text-align: left;
  background: var(--surface);
  color: var(--text-soft);
  padding: 8px 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table code { background: var(--surface); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; color: var(--neon-deep); }
.admin-stamp { color: var(--text-soft); font-family: var(--mono); font-size: 0.8rem; }
.admin-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-badge.ok    { background: var(--neon); color: var(--ink); }
.admin-badge.muted { background: var(--line); color: var(--text-soft); }

/* Low-profile per-user indicators in the admin Users list. Smaller + less shouty than
   .admin-badge — designed for at-a-glance scanning of welcome/login/progress state. */
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  white-space: nowrap;
}
.admin-pill-ok    { border-color: rgba(0, 230, 118, 0.45); color: var(--neon); }
.admin-pill-warn  { border-color: rgba(255, 153, 0,  0.45); color: #ff9900; }
.admin-pill-muted { /* default styling — neutral grey from base */ }

.admin-grant-form { background: var(--surface); padding: 14px 16px; border-radius: 8px; margin: 16px 0 0; }
.admin-grant-form .admin-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.admin-grant-form select { margin: 0 0 10px; }
.admin-hint { color: var(--text-soft); font-size: 0.82rem; line-height: 1.5; margin: 6px 0 0; }
.admin-hint-warn { color: #c0392b; }

.admin-danger-zone { margin: 18px 0 0; padding: 12px 16px; background: rgba(244,67,54,0.05); border: 1px dashed rgba(244,67,54,0.3); border-radius: 8px; }
.admin-danger-zone summary { cursor: pointer; color: #c0392b; font-size: 0.88rem; font-weight: 700; }
.admin-delete-form { margin-top: 10px; display: flex; gap: 8px; align-items: center; }

.admin-inline-form { display: inline-flex; gap: 6px; align-items: center; margin-right: 6px; }
.admin-input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
}
.admin-input:focus { border-color: var(--neon); outline: none; }
.admin-input-sm { width: 72px; }
select.admin-input { width: 100%; box-sizing: border-box; }

.admin-empty { color: var(--text-faint); font-style: italic; padding: 16px; text-align: center; }

/* Email-test page reusable */
.admin-form { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; margin: 0 0 24px; }
.admin-form .admin-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-soft); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-form .admin-input { width: 100%; box-sizing: border-box; }
.admin-result {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--neon);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0 0 24px;
}
.admin-result.err { border-left-color: #c0392b; }
.admin-result h2 { margin: 0 0 12px; color: var(--neon-deep); font-size: 1.1rem; }
.admin-result.err h2 { color: #c0392b; }
.admin-kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 16px; font-size: 0.9rem; }
.admin-kv dt { color: var(--text-soft); }
.admin-kv dd { margin: 0; color: var(--text); font-family: var(--mono); font-size: 0.85rem; word-break: break-all; }
.admin-kv .ok  { color: var(--neon-deep); }
.admin-kv .err { color: #c0392b; }

.admin-scenario-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.admin-scenario-grid label {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface);
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
}
.admin-scenario-grid label:has(input:checked) { border-color: var(--neon); background: var(--neon-faint); }
.admin-scenario-grid strong { color: var(--neon-deep); font-size: 0.85rem; display: block; }
.admin-scenario-grid em { font-style: normal; color: var(--text-soft); font-size: 0.8rem; display: block; margin-top: 2px; }

.btn-danger { background: #c0392b !important; color: #fff !important; border: 0 !important; }
.btn-danger:hover { background: #e74c3c !important; }
.btn-sm { padding: 6px 12px !important; font-size: 0.85rem !important; }

/* ============================================================
   Dashboard P0+P1 — richer learning stats
   ============================================================ */

/* Empty / fallback states */
.dashboard-empty {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-style: italic;
  padding: 18px 0;
  margin: 0;
  text-align: center;
}
.domain-fallback {
  color: var(--text);
  font-size: 0.9rem;
  background: var(--surface);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  margin: 0;
  line-height: 1.55;
}
.domain-fallback strong { color: var(--neon-deep); }

/* Difficulty breakdown: 3 cards in a row */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.difficulty-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.difficulty-card-foundation { border-top: 3px solid #4caf50; }
.difficulty-card-standard   { border-top: 3px solid #2196f3; }
.difficulty-card-hard       { border-top: 3px solid #f44336; }
.difficulty-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 6px;
}
.difficulty-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1;
}
.difficulty-counts {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 6px;
}

/* Mode comparison (learning vs real) */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.mode-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}
.mode-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.mode-acc {
  font-size: 2rem;
  font-weight: 700;
  color: var(--neon-deep);
  font-family: var(--mono);
  line-height: 1;
}
.mode-counts {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 8px;
}
.mode-gap-note {
  background: var(--surface);
  border-left: 3px solid var(--neon);
  padding: 10px 14px;
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 4px;
  line-height: 1.5;
}

/* Recent incorrect — clickable list */
.recent-wrong-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.recent-wrong-row { margin: 0; }
.recent-wrong-row + .recent-wrong-row { border-top: 1px solid var(--line); }
.recent-wrong-link {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--text);
  align-items: center;
  transition: background 0.1s;
}
.recent-wrong-link:hover { background: var(--surface); }
.recent-wrong-domain {
  background: var(--surface);
  color: var(--neon-deep);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}
.recent-wrong-stem {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
}
.recent-wrong-when {
  color: var(--text-faint);
  font-size: 0.78rem;
  font-family: var(--mono);
  white-space: nowrap;
}

/* Last 7 days activity strip */
.activity-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 16px;
  align-items: end;
}
.activity-day { text-align: center; }
.activity-bar-wrap {
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.activity-bar {
  width: 60%;
  background: var(--neon);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.3s;
}
.activity-day-label {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.activity-day-count {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 700;
  font-family: var(--mono);
}

/* Community pack stats card */
.community-stats-card { border-left: 3px solid var(--neon); }
.community-pill {
  background: #2196f3;
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  vertical-align: middle;
}
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.community-stat {
  text-align: center;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
}
.community-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--neon-deep);
  font-family: var(--mono);
  line-height: 1;
}
.community-label {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 8px;
  line-height: 1.35;
}

/* P2 — Streak / Readiness summary tiles + Trend pill + Drill buttons */
.streak-card .dashboard-stat-num { color: #ff6b35; }
.streak-hint { color: var(--text-soft); font-size: 0.82rem; }

.readiness-card { border-top: 3px solid var(--line); }
.readiness-card.ready-high  { border-top-color: #4caf50; }
.readiness-card.ready-mid   { border-top-color: var(--neon); }
.readiness-card.ready-low   { border-top-color: #ffaa00; }
.readiness-card.ready-early { border-top-color: var(--text-faint); }
.readiness-card.ready-high  .dashboard-stat-num { color: #4caf50; }
.readiness-card.ready-mid   .dashboard-stat-num { color: var(--neon-deep); }
.readiness-card.ready-low   .dashboard-stat-num { color: #ffaa00; }
.readiness-breakdown { color: var(--text-soft); font-size: 0.78rem; font-family: var(--mono); }

.trend-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-soft);
}
.trend-pill.trend-up   { background: rgba(0,230,118,0.12); color: var(--neon-deep); }
.trend-pill.trend-down { background: rgba(244,67,54,0.12); color: #c0392b; }

/* Drill buttons inline with weak/missed rows */
.sub-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.drill-form { display: inline; margin: 0; }
.btn-drill {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--neon-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.1s, border-color 0.1s;
}
.btn-drill:hover {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
}

@media (max-width: 640px) {
  .difficulty-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .activity-strip { gap: 4px; }
  .activity-bar-wrap { height: 60px; }
  .recent-wrong-link { grid-template-columns: 50px 1fr; }
  .recent-wrong-when { display: none; }
}

@media (max-width: 640px) {
  .admin-user-row { flex-direction: column; align-items: flex-start; }
  .admin-table { font-size: 0.8rem; }
  .admin-table th, .admin-table td { padding: 6px 8px; }
  .admin-scenario-grid { grid-template-columns: 1fr; }
  .admin-kv { grid-template-columns: 1fr; gap: 2px 0; }
  .admin-kv dt { font-weight: 700; margin-top: 8px; }
}
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* Sign-out button — high-contrast variant for use on light surfaces */
.btn-signout {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--ink) !important;
  color: var(--neon) !important;
  border: 1px solid var(--ink);
  transition: background 0.15s, color 0.15s;
}
.btn-signout:hover {
  background: var(--neon) !important;
  color: var(--ink) !important;
  border-color: var(--neon);
  text-decoration: none;
}

/* ---------- Accessibility theme switcher ---------- */
.theme-switcher {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.theme-btn {
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: var(--text-soft);
  cursor: pointer;
  font-family: var(--sans);
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.theme-btn + .theme-btn { border-left: 1px solid var(--line); }
.theme-btn:hover { background: var(--surface); color: var(--text); }
.theme-btn.is-active {
  background: var(--neon);
  color: var(--ink);
}

/* Nav-variant — sits in the dark header, compact, icons-only */
.site-nav .theme-switcher-nav {
  margin: 0 6px;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-dark-2);
}
.site-nav .theme-switcher-nav .theme-btn {
  padding: 5px 9px;
  font-size: 0.92rem;
  color: var(--text-dark-soft);
}
.site-nav .theme-switcher-nav .theme-btn + .theme-btn { border-left-color: var(--line-dark-2); }
.site-nav .theme-switcher-nav .theme-btn:hover {
  background: rgba(0, 230, 118, 0.10);
  color: var(--neon);
}
.site-nav .theme-switcher-nav .theme-btn.is-active {
  background: var(--neon);
  color: var(--ink);
}

/* Per-action license expiry line inside the portal cards */
.action-expiry {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.action-expiry strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- THEME: DIMMED (warm low-contrast) ---------- */
[data-theme="dimmed"] {
  --surface:        #2A3140;
  --surface-2:      #323A4D;
  --bg:             #232936;
  --text:           #E2E6EF;
  --text-soft:      #A5ADBF;
  --text-faint:     #6B7383;
  --line:           #3F4757;
  --line-dark:      #232936;
  --line-dark-2:    #2A3140;
  --ink:            #14181F;
  --ink-2:          #1B202A;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.30);
  --shadow-md:      0 10px 30px rgba(0,0,0,0.35);
  --shadow-neon:    0 8px 32px rgba(0, 230, 118, 0.18);
}
[data-theme="dimmed"] body { background: var(--surface); color: var(--text); }
[data-theme="dimmed"] .site-header { background: var(--ink); }
[data-theme="dimmed"] .portal,
[data-theme="dimmed"] .exam,
[data-theme="dimmed"] .content-page,
[data-theme="dimmed"] .auth-page { background: var(--surface); }
[data-theme="dimmed"] .portal-cert,
[data-theme="dimmed"] .portal-action,
[data-theme="dimmed"] .exam-question,
[data-theme="dimmed"] .exam-results,
[data-theme="dimmed"] .content-body,
[data-theme="dimmed"] .content-nav,
[data-theme="dimmed"] .upsell-card,
[data-theme="dimmed"] .mindmap-outline,
[data-theme="dimmed"] .auth-card,
[data-theme="dimmed"] .license-table-wrap { background: var(--surface-2); border-color: var(--line); }
[data-theme="dimmed"] .license-table thead th { background: var(--bg); color: var(--text); }
[data-theme="dimmed"] .q-option label { background: var(--bg); border-color: var(--line); }
[data-theme="dimmed"] .q-feedback-right { background: rgba(0, 230, 118, 0.10); border-color: var(--neon); }
[data-theme="dimmed"] .review-reason,
[data-theme="dimmed"] .portal-tip,
[data-theme="dimmed"] .portal-foot,
[data-theme="dimmed"] .content-sample-tag,
[data-theme="dimmed"] .note-callout { background: var(--bg); }
[data-theme="dimmed"] .prog-dot { background: var(--bg); color: var(--text-soft); border-color: var(--line); }
[data-theme="dimmed"] .prog-done { background: rgba(0, 230, 118, 0.18); color: var(--neon); }
[data-theme="dimmed"] .auth-input { background: var(--bg); color: var(--text); border-color: var(--line); }

/* ---------- THEME: DARK (high-contrast OLED) ---------- */
[data-theme="dark"] {
  --surface:        #0A0E14;
  --surface-2:      #111827;
  --bg:             #050810;
  --text:           #E5E7EB;
  --text-soft:      #94A3B8;
  --text-faint:     #64748B;
  --line:           #1F2937;
  --line-dark:      #0A0E14;
  --line-dark-2:    #1F2937;
  --ink:            #050810;
  --ink-2:          #0A0E14;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.40);
  --shadow-md:      0 10px 30px rgba(0,0,0,0.50);
  --shadow-neon:    0 8px 32px rgba(0, 230, 118, 0.22);
}
[data-theme="dark"] body { background: var(--surface); color: var(--text); }
[data-theme="dark"] .site-header { background: var(--ink); }
[data-theme="dark"] .portal,
[data-theme="dark"] .exam,
[data-theme="dark"] .content-page,
[data-theme="dark"] .auth-page { background: var(--surface); }
[data-theme="dark"] .portal-cert,
[data-theme="dark"] .portal-action,
[data-theme="dark"] .exam-question,
[data-theme="dark"] .exam-results,
[data-theme="dark"] .content-body,
[data-theme="dark"] .content-nav,
[data-theme="dark"] .upsell-card,
[data-theme="dark"] .mindmap-outline,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .license-table-wrap { background: var(--surface-2); border-color: var(--line); }
[data-theme="dark"] .license-table thead th { background: var(--bg); color: var(--text); }
[data-theme="dark"] .q-option label { background: var(--bg); border-color: var(--line); }
[data-theme="dark"] .review-reason,
[data-theme="dark"] .portal-tip,
[data-theme="dark"] .portal-foot,
[data-theme="dark"] .content-sample-tag,
[data-theme="dark"] .note-callout { background: var(--bg); }
[data-theme="dark"] .prog-dot { background: var(--bg); color: var(--text-soft); border-color: var(--line); }
[data-theme="dark"] .prog-done { background: rgba(0, 230, 118, 0.18); color: var(--neon); }
[data-theme="dark"] .auth-input { background: var(--bg); color: var(--text); border-color: var(--line); }
[data-theme="dark"] .theme-btn:hover { background: var(--bg); }

/* ---------- How it works (4 steps) ---------- */
.how {
  padding: 80px 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.steps {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
  transition: border-color 0.18s, transform 0.08s, box-shadow 0.18s;
}
.step:hover {
  border-color: var(--neon);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-deep);
  background: var(--neon-faint);
  display: inline-block;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.step h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}
.step p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Certifications — uniform grid, AIGP highlighted in place ---------- */
.certs {
  padding: 80px 0;
  background: var(--surface);
}

/* Uniform cert grid — every card shares the same skeleton so adding new certs is content-only */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
}
.cert-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
}
.cert-card.cert-available {
  border-color: var(--cert-accent, var(--neon));
  box-shadow: 0 8px 28px color-mix(in srgb, var(--cert-accent, var(--neon)) 18%, transparent);
}
.cert-card.cert-available::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--cert-accent, var(--neon));
}
.cert-card.cert-coming_soon {
  border-color: var(--line);
}
.cert-card.cert-coming_soon::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--cert-accent, var(--neon));
  opacity: 0.35;
}
.cert-card.cert-available:hover { transform: translateY(-3px); }
.cert-card.cert-coming_soon {
  background: var(--surface-2);
  /* slightly muted, not heavily dimmed — keeps visual parity */
}

.cert-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* SKU rows on the card */
.sku-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.sku-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.sku-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sku-bundle {
  background: rgba(0, 230, 118, 0.06);
  border-left: 3px solid var(--neon);
  padding-left: 12px;
  margin: 4px -12px;
  border-radius: 4px;
  padding-right: 6px;
}
.sku-badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  background: var(--neon);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.sku-buy { width: 100%; }
.sku-buy .btn { width: 100%; text-align: center; }
.btn-buy-primary {
  background: var(--neon);
  color: var(--ink) !important;
  border-color: var(--neon);
  font-weight: 700;
}
.btn-buy-primary:hover { background: var(--neon-deep); border-color: var(--neon-deep); color: var(--ink) !important; }

/* Trust line at the bottom of an available cert card */
.cert-trust {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.cert-trust a {
  color: var(--neon-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Coming-soon panel — same vertical space as a SKU list */
.cert-coming-panel {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.btn-coming {
  width: 100%;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  border: 1px dashed var(--text-faint);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  cursor: not-allowed;
}
.cert-notify {
  margin: 12px 0 0;
  font-size: 0.85rem;
  text-align: center;
}
.cert-notify a {
  color: var(--neon-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.cert-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.cert-issuer {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.badge-available {
  background: var(--neon);
  color: var(--ink);
}
.badge-soon {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.cert-name {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cert-long-name {
  margin: 4px 0 14px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.cert-meta {
  display: flex;
  gap: 22px;
  margin: 0 0 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--mono);
}
.cert-meta-item { display: flex; flex-direction: column; }
.cert-meta-label {
  font-size: 0.66rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.cert-tagline {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.sku-info { flex: 1; min-width: 0; }
.sku-name { display: block; font-weight: 600; color: var(--text); }
.sku-desc {
  display: block;
  font-size: 0.84rem;
  color: var(--text-soft);
  margin-top: 2px;
  line-height: 1.5;
}

/* ---------- Why (5 cards) ---------- */
.why {
  padding: 88px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.why-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.why-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon);
  box-shadow: var(--shadow-md);
}
.why-icon {
  margin-bottom: 16px;
}
.why-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-deep);
  background: var(--neon-faint);
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.why-card h3 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.why-card p { margin: 0; color: var(--text-soft); font-size: 0.93rem; line-height: 1.6; }
.why-card strong { color: var(--text); font-weight: 700; }

/* ---------- About ---------- */
.about {
  padding: 96px 0;
  background: var(--ink);
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}
.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--neon-faint) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}
.about-kicker { color: var(--neon); }
.about-copy { max-width: 640px; }
.about-title {
  font-family: var(--sans);
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  margin: 0 0 18px;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.1;
}
.about-lead {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0 0 18px;
  line-height: 1.6;
}
.about-copy p { color: var(--text-dark-soft); line-height: 1.65; margin: 0 0 14px; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-dark-2);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  position: relative;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  bottom: 0;
  width: 3px;
  background: var(--neon);
}
.stat-num {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--neon);
  line-height: 1;
}
.stat-label {
  color: var(--text-dark-soft);
  font-size: 0.85rem;
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ---------- Schedule (table) ---------- */
.schedule {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.94rem;
}
.schedule-table thead th {
  background: var(--ink);
  color: var(--neon);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-dark-2);
}
.schedule-table tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text);
  line-height: 1.55;
}
.schedule-table tbody tr:last-child td { border-bottom: none; }
.schedule-table tbody tr:hover td { background: var(--surface); }
.schedule-table .row-final td { background: rgba(0, 230, 118, 0.06); font-weight: 500; }
.schedule-table .row-final:hover td { background: rgba(0, 230, 118, 0.10); }

.col-when { width: 170px; }
.col-output { width: 320px; }

.when-tag {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.005em;
}
.when-note {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.exam-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--neon-faint);
  color: var(--neon-deep);
  letter-spacing: 0.06em;
}
.exam-tag-final {
  background: var(--neon);
  color: var(--ink);
}
.exam-note {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.5;
}

/* ---------- Money-back guarantee ---------- */
.guarantee {
  padding: 56px 0;
  background: var(--ink);
  color: var(--text-dark);
  border-top: 1px solid var(--line-dark);
  position: relative;
  overflow: hidden;
}
.guarantee::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--neon-faint) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}
.guarantee-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  position: relative;
  z-index: 1;
}
.guarantee-seal { flex-shrink: 0; }
.guarantee-copy h2 {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  line-height: 1.15;
}
.guarantee-copy p { margin: 0; color: var(--text-dark); font-size: 1.02rem; line-height: 1.55; max-width: 760px; }
.guarantee-copy a { color: var(--neon); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.guarantee-copy a:hover { color: var(--neon-deep); }

/* ---------- Auth (login page) ---------- */
.auth-page {
  padding: 96px 0;
  background: var(--surface);
  min-height: 60vh;
}
.auth-container { max-width: 480px; }
.auth-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.auth-title {
  font-family: var(--sans);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 4px 0 12px;
  color: var(--text);
}
.auth-sub {
  color: var(--text-soft);
  margin: 0 0 28px;
  font-size: 0.98rem;
  line-height: 1.55;
}
.auth-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid #DC2626;
  color: #B91C1C;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: -8px;
}
.auth-input {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px var(--neon-faint);
}
.auth-submit { margin-top: 8px; width: 100%; }
.auth-demo {
  background: rgba(0, 230, 118, 0.08);
  border: 1px dashed var(--neon);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  font-family: var(--mono);
}
.auth-demo strong { color: var(--neon-deep); font-family: var(--sans); }
.auth-demo code {
  background: var(--ink);
  color: var(--neon);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85rem;
}
.auth-foot {
  margin: 22px 0 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ---------- Portal ---------- */
.portal {
  padding: 64px 0 96px;
  background: var(--surface);
  min-height: 60vh;
}
.portal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.portal-title {
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 4px 0 8px;
  color: var(--text);
}
.portal-sub { margin: 0; color: var(--text-soft); }
.portal-user {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.portal-email { color: var(--text-soft); }
.portal-empty {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  padding: 48px 32px;
  text-align: center;
  border-radius: var(--radius);
}
.portal-empty h2 {
  font-family: var(--sans);
  font-size: 1.3rem;
  color: var(--text);
  margin: 0 0 10px;
}

.portal-cert {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.portal-cert-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.portal-cert-head h2 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  color: var(--text);
}
.portal-cert-head .portal-long {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-top: 2px;
}
.portal-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.portal-action {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--text);
  transition: border-color 0.18s, transform 0.08s, box-shadow 0.18s;
}
.portal-action:hover {
  border-color: var(--neon);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--neon);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.portal-action h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}
.portal-action p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.action-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.portal-tip {
  background: rgba(0, 230, 118, 0.06);
  border-left: 3px solid var(--neon);
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text);
}
.portal-tip a { color: var(--neon-deep); text-decoration: underline; }
.portal-foot {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--surface-2);
  border: 1px dashed var(--text-faint);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-soft);
}
.portal-foot strong { color: var(--text); }

/* ---------- Exam runner ---------- */
.exam { padding: 56px 0 80px; background: var(--surface); min-height: 60vh; }
.exam-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.exam-title {
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 4px 0 6px;
  color: var(--text);
}
.exam-mode {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.exam-mode strong { color: var(--neon-deep); }
.exam-mode a { color: var(--neon-deep); text-decoration: underline; }

.exam-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 1.6rem;
  color: rgba(15, 23, 42, 0.04);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  transform: rotate(-25deg);
  z-index: 0;
}

.exam-question {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.q-domain {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-deep);
  margin: 0 0 14px;
  position: relative;
}
.q-text {
  font-size: 1.06rem;
  line-height: 1.55;
  margin: 0 0 24px;
  color: var(--text);
  position: relative;
}
.q-options {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.q-option label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.q-option label:hover { border-color: var(--neon); }
.q-option input[type=radio] {
  margin-top: 3px;
  accent-color: var(--neon-deep);
}
.q-option .opt-letter {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--neon-deep);
  min-width: 24px;
}
.q-picked label { border-color: var(--neon); background: rgba(0, 230, 118, 0.05); }
.q-correct label { border-color: var(--neon); background: rgba(0, 230, 118, 0.10); }
.q-wrong label { border-color: #DC2626; background: rgba(239, 68, 68, 0.06); }

.q-feedback {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
  position: relative;
}
.q-feedback-right { background: rgba(0, 230, 118, 0.10); border: 1px solid var(--neon); }
.q-feedback-wrong { background: rgba(239, 68, 68, 0.06); border: 1px solid #DC2626; }
.q-feedback h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: -0.015em;
}
.q-feedback-right h3 { color: var(--neon-deep); }
.q-feedback-wrong h3 { color: #B91C1C; }
.q-feedback p { margin: 0 0 10px; color: var(--text); font-size: 0.94rem; line-height: 1.6; }
.q-real-locked {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--surface);
  border-left: 3px solid var(--neon);
  border-radius: 4px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  position: relative;
}
.q-progress {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.q-running-score {
  text-align: center;
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  font-family: var(--mono);
}
.q-running-score .qrs-correct strong { color: var(--neon-deep); }
.q-running-score .qrs-wrong   strong { color: #c0392b; }
.q-running-score .qrs-pct     strong { color: var(--text); font-size: 1rem; }
.q-running-score .qrs-sep     { margin: 0 8px; color: var(--text-faint); }
.q-running-score .qrs-of      { margin-left: 10px; color: var(--text-faint); font-size: 0.85rem; }

/* Retake-incorrect improvement card on results page */
.retake-improvement {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 2px solid var(--neon-faint);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 28px;
}
.retake-improvement.retake-perfect {
  border-color: var(--neon);
  background: linear-gradient(135deg, rgba(0,230,118,0.06), var(--surface-2));
}
.retake-improvement-header {
  margin-bottom: 18px;
}
.retake-improvement-tag {
  display: inline-block;
  background: var(--neon);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.retake-improvement-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.45;
  font-weight: 500;
}
.retake-improvement-title strong {
  color: var(--neon-deep);
  font-weight: 700;
}
.retake-improvement-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.retake-stat {
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 12px;
}
.retake-stat-num {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--neon-deep);
  line-height: 1;
}
.retake-stat-num.retake-stat-still { color: #c0392b; }
.retake-stat-label {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
@media (max-width: 600px) {
  .retake-improvement-stats { grid-template-columns: 1fr; }
}

/* Helper buttons row above the question (Mark for review + Hint) */
.q-helpers {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.q-hint-btn { color: var(--neon-deep); }
.q-hint-btn:hover { background: var(--neon-faint); }
.q-hint-btn:disabled { opacity: 0.6; cursor: default; }

/* Hint outline applied by exam-hint.js to the correct option(s) */
.q-options .q-option.q-option-hint {
  border: 2px dashed var(--neon);
  background: rgba(0, 230, 118, 0.06);
  border-radius: 6px;
  position: relative;
}
.q-options .q-option.q-option-hint::after {
  content: "💡 hint";
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--neon-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.prog-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.prog-dot:hover { border-color: var(--neon); color: var(--text); }
.prog-done    { background: rgba(0, 230, 118, 0.10); border-color: var(--neon); color: var(--neon-deep); }
.prog-correct { background: rgba(0, 230, 118, 0.18); border-color: #00C853; color: #00C853; }
.prog-wrong   { background: rgba(244,  67,  54, 0.15); border-color: #F44336; color: #F44336; }
.prog-here    { background: var(--neon); color: var(--ink); border-color: var(--neon); outline: 2px solid var(--ink); outline-offset: 2px; }

/* Anti-copy hardening on exam content (deliberate friction, not a hard guarantee) */
.exam-question, .exam-results, .review-body {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.exam-question .q-form input,
.exam-question .q-form button { -webkit-user-select: auto; user-select: auto; }

/* Results */
.exam-results {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.results-score {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}
.score-num {
  font-family: var(--mono);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--neon-deep);
  letter-spacing: -0.03em;
  line-height: 1;
}
.score-pct {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-top: 6px;
}
.results-domains { margin-bottom: 28px; position: relative; }
.results-domains h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.results-domains ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.results-domains li {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.dom-score { font-family: var(--mono); font-weight: 700; color: var(--neon-deep); }

.results-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 28px 0;
  flex-wrap: wrap;
  position: relative;
}
.results-review summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--neon-deep);
  list-style: none;
  user-select: none;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.results-review summary::-webkit-details-marker { display: none; }
.results-review summary::before { content: "▸ "; }
.results-review[open] summary::before { content: "▾ "; }
.review-body { padding-top: 16px; }
.review-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.review-item:last-child { border-bottom: none; }
.review-q { margin: 0 0 12px; color: var(--text); font-size: 0.96rem; line-height: 1.55; }
.review-opts {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.review-opts li {
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.review-opts .opt-correct { color: var(--neon-deep); font-weight: 600; }
.review-opts .opt-picked { color: #B91C1C; }
.opt-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  background: var(--neon);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 6px;
}
.opt-tag-wrong { background: #DC2626; color: #FFFFFF; }
.review-reason {
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-soft);
}
.review-reason p { margin: 0 0 8px; }
.review-reason strong { color: var(--text); }

/* ---------- Content pages (notes + mindmap) ---------- */
.content-page {
  padding: 56px 0 96px;
  background: var(--surface);
  min-height: 60vh;
}
.content-back {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-soft);
}
.content-back:hover { color: var(--neon-deep); }
.content-head { margin-bottom: 32px; }
.content-title {
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 4px 0 8px;
  color: var(--text);
}
.content-sub { color: var(--text-soft); margin: 0; max-width: 720px; }

.content-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
}
.content-nav {
  position: sticky;
  top: 96px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.content-nav .content-title {
  font-size: 1.15rem;
  margin: 4px 0 14px;
}
.content-toc {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.content-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.content-toc a:hover { background: var(--surface); color: var(--neon-deep); }
.content-sample-tag {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 12px 14px;
  background: rgba(0, 230, 118, 0.06);
  border: 1px dashed var(--neon);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}
.content-sample-tag strong { color: var(--neon-deep); }

.content-body {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.content-body section { margin-bottom: 36px; position: relative; }
.content-body section:last-child { margin-bottom: 0; }
.content-body h2 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--neon);
}
.content-body h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--text);
}
.content-body p, .content-body li { color: var(--text); line-height: 1.65; font-size: 0.96rem; }
.content-body ul { padding-left: 22px; }
.content-body li { margin-bottom: 6px; }
.content-body strong { color: var(--neon-deep); font-weight: 700; }
.content-body em { color: var(--text); font-style: italic; }
.note-callout {
  background: rgba(0, 230, 118, 0.06);
  border-left: 3px solid var(--neon);
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 0.92rem;
  margin: 18px 0;
}
.content-truncate {
  color: var(--text-faint) !important;
  font-style: italic;
  font-size: 0.88rem !important;
}

/* Mindmap stage */
.mindmap-stage {
  position: relative;
  background: var(--ink);
  border: 1px solid var(--line-dark-2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 36px;
  overflow: hidden;
}
.mindmap-svg { display: block; width: 100%; height: auto; }
.mindmap-stage .exam-watermark { color: rgba(255, 255, 255, 0.04); }
.mindmap-outline {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.mindmap-outline h2 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--text);
}
.outline { padding-left: 22px; color: var(--text); line-height: 1.7; }
.outline > li { margin-bottom: 14px; }
.outline ul { padding-left: 20px; color: var(--text-soft); }
.outline strong { color: var(--text); }

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 80px 0 88px;
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--neon-faint) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}
.final-cta-inner { position: relative; z-index: 1; }
.final-cta h2 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin: 0 0 14px;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.final-cta p {
  margin: 0 auto 28px;
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 620px;
}
.final-cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--text-dark-soft);
  padding: 64px 0 36px;
  font-size: 0.9rem;
  border-top: 1px solid var(--line-dark);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 2fr;
  gap: 36px;
}
.footer-col h4 {
  font-family: var(--mono);
  color: var(--neon);
  margin: 0 0 12px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--text-dark-soft);
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--neon); }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.footer-brand .brand-glyph {
  color: var(--neon);
  font-family: var(--mono);
  font-size: 1.3rem;
}
.footer-tagline {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}
.footer-legal p { margin: 0 0 10px; line-height: 1.55; }
.copyright { color: var(--text-faint); font-size: 0.82rem !important; }
.footer-legal strong { color: var(--text-dark); font-weight: 600; }

/* ---------- Legal pages ---------- */
.legal h1 {
  font-family: var(--sans);
  color: var(--text);
  letter-spacing: -0.025em;
  font-weight: 800;
}

/* ---------- Sample question ---------- */
.sample {
  padding: 80px 0;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sample-card {
  background: var(--ink);
  color: var(--text-dark);
  border: 1px solid var(--line-dark-2);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}
.sample-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--neon);
}
.sample-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dark-soft);
  flex-wrap: wrap;
}
.sample-domain { color: var(--neon); }
.sample-question {
  font-size: 1.08rem;
  color: #FFFFFF;
  line-height: 1.55;
  margin: 0 0 22px;
}
.sample-question strong { color: var(--neon); font-weight: 700; }
.sample-options {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  color: var(--text-dark);
}
.sample-options li {
  padding: 8px 0;
  font-size: 0.95rem;
  line-height: 1.55;
  display: flex;
  gap: 12px;
}
.opt-letter {
  font-family: var(--mono);
  color: var(--neon);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 24px;
}
.sample-reveal {
  margin-top: 18px;
  border-top: 1px solid var(--line-dark-2);
  padding-top: 18px;
}
.sample-reveal summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--neon);
  list-style: none;
  user-select: none;
}
.sample-reveal summary::-webkit-details-marker { display: none; }
.sample-reveal summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s;
  margin-right: 4px;
}
.sample-reveal[open] summary::before { content: "▾ "; }
.sample-reveal[open] summary { margin-bottom: 14px; }
.reveal-body p {
  color: var(--text-dark);
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0 0 12px;
}
.reveal-body strong { color: var(--neon); font-weight: 700; }
.reveal-cta {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line-dark-2);
  color: var(--text-dark-soft) !important;
}
.reveal-cta a {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 600;
}
.reveal-cta a:hover { color: var(--neon-deep); }

/* ---------- Schedule repeat CTA ---------- */
.schedule-cta {
  margin-top: 36px;
  padding: 28px 32px;
  background: var(--surface-2);
  border: 1px solid var(--neon);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.schedule-cta p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 560px;
}
.schedule-cta strong { color: var(--neon-deep); }

/* ---------- FAQ ---------- */
.faq {
  padding: 88px 0;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.faq-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 880px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  transition: border-color 0.15s;
}
.faq-item:hover { border-color: var(--neon); }
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  letter-spacing: -0.005em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--neon-deep);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 0.94rem;
}
.faq-item a {
  color: var(--neon-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ---------- "Last updated" disclosure inside cert cards ---------- */
.cert-updated {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-family: var(--mono);
}
.cert-updated summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--cert-accent, var(--neon)) 6%, var(--surface));
  border: 1px dashed color-mix(in srgb, var(--cert-accent, var(--neon)) 40%, var(--line));
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.cert-updated summary::-webkit-details-marker { display: none; }
.cert-updated summary::before {
  content: "↻";
  color: var(--cert-accent, var(--neon-deep));
  font-weight: 700;
  margin-right: 2px;
}
.cert-updated summary::after {
  content: "▾";
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-left: 4px;
  transition: transform 0.15s;
}
.cert-updated[open] summary::after { transform: rotate(180deg); }
.cert-updated summary:hover { background: color-mix(in srgb, var(--cert-accent, var(--neon)) 14%, var(--surface)); }
.cert-updated summary strong { color: var(--text); font-family: var(--sans); }
.cert-updates {
  list-style: none;
  padding: 12px 14px;
  margin: 8px 0 0;
  background: var(--surface);
  border-left: 2px solid var(--cert-accent, var(--neon));
  border-radius: 0 4px 4px 0;
  font-size: 0.8rem;
  line-height: 1.65;
}
.cert-updates li { padding: 2px 0; }
.update-date {
  display: inline-block;
  min-width: 110px;
  color: var(--text);
  font-weight: 600;
}

/* ---------- Compact bundle box (inside an available cert card) ---------- */
.bundle-box {
  background: color-mix(in srgb, var(--cert-accent, var(--neon)) 8%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--cert-accent, var(--neon)) 40%, var(--line));
  border-left: 3px solid var(--cert-accent, var(--neon));
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 8px;
}
.bundle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.bundle-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.02rem;
}
.bundle-badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--cert-accent, var(--neon));
  color: var(--ink);
  border-radius: 3px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.bundle-desc {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.bundle-cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: var(--cert-accent, var(--neon)) !important;
  color: var(--ink) !important;
  border-color: var(--cert-accent, var(--neon)) !important;
  font-weight: 700;
}
.bundle-cta:hover { filter: brightness(0.92); color: var(--ink) !important; }
.bundle-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-soft);
  text-align: center;
  font-style: italic;
}

/* Individuals disclosure inside an available cert card */
.cert-individuals {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.cert-individuals summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  list-style: none;
  user-select: none;
  padding: 6px 0;
}
.cert-individuals summary::-webkit-details-marker { display: none; }
.cert-individuals summary::before {
  content: "+ ";
  color: var(--cert-accent, var(--neon-deep));
  font-weight: 700;
}
.cert-individuals[open] summary::before { content: "− "; }
.individuals-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.individual-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.individual-row:last-child { border-bottom: none; }
.individual-info { flex: 1; min-width: 0; }
.individual-name { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text); }
.individual-desc { display: block; font-size: 0.78rem; color: var(--text-soft); margin-top: 2px; line-height: 1.45; }
.individual-buy {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--cert-accent, var(--neon-deep)) !important;
  border: 1px solid color-mix(in srgb, var(--cert-accent, var(--neon-deep)) 50%, var(--line));
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.individual-buy:hover { background: var(--cert-accent, var(--neon)); color: var(--ink) !important; text-decoration: none; }

/* cert-trust as a clean list */
ul.cert-trust {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-soft);
}
ul.cert-trust li { padding: 2px 0; }
ul.cert-trust a {
  color: var(--cert-accent, var(--neon-deep));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ---------- Portal — license pill, expiry meta, color accent ---------- */
.license-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  z-index: 2;
}
.pill-licensed { background: var(--neon); color: var(--ink); }
.pill-unlicensed {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px dashed var(--text-faint);
}
.portal-action { position: relative; padding-top: 36px; }
.portal-action-unlicensed {
  opacity: 0.85;
  background: color-mix(in srgb, var(--surface) 60%, var(--surface-2));
  border-style: dashed;
}
.portal-action-unlicensed:hover { opacity: 1; border-color: var(--neon); }

.portal-cert { border-top: 3px solid var(--cert-accent, var(--neon)); }
.license-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.license-expiry {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.license-expiry strong { color: var(--text); }

/* ---------- Portal — Expand-your-library (upsell) section ---------- */
.portal-upsell {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.portal-upsell-title {
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 8px;
  color: var(--text);
}
.portal-upsell-sub { margin: 0 0 24px; color: var(--text-soft); max-width: 720px; }
.upsell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.upsell-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cert-accent, var(--neon));
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.upsell-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--cert-accent, var(--neon)); }
.upsell-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.upsell-name {
  margin: 4px 0 2px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}
.upsell-long { margin: 0 0 6px; font-size: 0.85rem; color: var(--text-soft); }
.upsell-tagline { margin: 0 0 14px; font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.upsell-cta { margin-top: auto; width: 100%; text-align: center; font-size: 0.88rem; }

/* ---------- Portal — license table ---------- */
.portal-licenses {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.portal-licenses-title {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 16px;
  color: var(--text);
}
.license-table-wrap {
  overflow-x: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.license-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; }
.license-table thead th {
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.license-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: top;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.license-table tbody tr:last-child td { border-bottom: none; }
.days-left {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(0, 230, 118, 0.12);
  color: var(--neon-deep);
  font-weight: 700;
}
.license-foot { font-size: 0.85rem; color: var(--text-soft); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 620px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .guarantee-inner { flex-direction: column; text-align: center; gap: 20px; }
  .col-when { width: 130px; }
  .col-output { width: 240px; }
}
@media (max-width: 960px) {
  .schedule-cta { flex-direction: column; align-items: stretch; text-align: left; padding: 22px; }
  .schedule-cta .btn { text-align: center; }
  .content-grid { grid-template-columns: 1fr; }
  .content-nav { position: static; }
  .portal-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .site-nav a { margin-left: 14px; font-size: 0.88rem; }
  .nav-cta { padding: 6px 12px; }
  .sku-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sku-buy { width: 100%; justify-content: space-between; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; }
  .about-stats { grid-template-columns: 1fr; }
  .schedule-table { font-size: 0.86rem; }
  .schedule-table thead th, .schedule-table tbody td { padding: 12px 14px; }
  .col-when { width: 110px; }
  .col-output { width: auto; }
}

/* ============================================================
   Exam landing + mode picker + resume
   ============================================================ */
.exam-landing { padding: 32px 0 64px; }
.exam-landing-title { margin: 6px 0 8px; }
.exam-landing-sub { color: var(--text-soft); max-width: 720px; margin-bottom: 32px; }
.exam-resume-box {
  border: 1px solid var(--neon);
  background: rgba(0, 230, 118, 0.06);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0 32px;
}
.exam-resume-box h2 { margin: 0 0 8px; font-size: 1.2rem; }
.exam-landing-actions { display: flex; gap: 12px; margin-top: 16px; }
.exam-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 720px) { .exam-mode-cards { grid-template-columns: 1fr; } }
.mode-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.mode-card:hover { border-color: var(--neon); transform: translateY(-2px); }
.mode-card h3 { margin: 0 0 8px; font-size: 1.15rem; color: var(--neon-deep); }
.mode-card p { color: var(--text-soft); margin: 0 0 16px; line-height: 1.5; }
.mode-cta { color: var(--neon); font-family: var(--mono); font-size: 0.92rem; font-weight: 700; }

.exam-head-actions { display: flex; gap: 8px; align-items: center; }

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard { padding: 24px 0 8px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.dashboard-card-wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .dashboard-grid { grid-template-columns: 1fr; } }
.dashboard-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.dashboard-stat {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--neon);
  line-height: 1;
}
.dashboard-label {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-top: 6px;
}
.dashboard-bars { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dom-bar-row { display: grid; grid-template-columns: 40px 1fr 48px; align-items: center; gap: 10px; }
.dom-bar-label { font-family: var(--mono); font-weight: 700; }
.dom-bar-track { height: 8px; background: rgba(0,230,118,0.08); border-radius: 4px; overflow: hidden; }
.dom-bar-fill { height: 100%; background: var(--neon); }
.dom-bar-pct { font-family: var(--mono); text-align: right; font-size: 0.85rem; color: var(--text-soft); }
.weak-list {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: decimal inside;
}
.weak-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.weak-list li:first-child { border-top: 0; }
.weak-sub { color: var(--text-dark); flex: 1; }
.weak-stat { font-family: var(--mono); color: var(--text-soft); white-space: nowrap; }

/* ============================================================
   Pack grid (6 packs + Mixed Mode)
   ============================================================ */
.packs-section { padding: 32px 0 8px; }
.packs-title { margin: 6px 0 8px; }
.packs-sub { color: var(--text-soft); margin-bottom: 24px; max-width: 800px; }
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.pack-tile {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pack-tile:hover { transform: translateY(-2px); border-color: var(--neon); }
.pack-tile-mixed { border-color: var(--neon); background: linear-gradient(135deg, rgba(0,230,118,0.06), var(--surface-2)); }
.pack-tile-head { display: flex; justify-content: space-between; align-items: center; }
.pack-tile h3 { margin: 0; font-size: 1.05rem; }
.pack-badge {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.pack-badge-done { background: rgba(0,230,118,0.15); color: var(--neon-deep); }
.pack-badge-progress { background: rgba(255,193,7,0.15); color: #FF9800; }
.pack-badge-fresh { background: rgba(120,120,120,0.12); color: var(--text-soft); }
.pack-sub { color: var(--text-soft); font-size: 0.85rem; margin: 0; line-height: 1.4; }
.pack-cta { color: var(--neon); font-family: var(--mono); font-size: 0.85rem; font-weight: 700; margin-top: 4px; }

/* ============================================================
   Subscribe modal — global, opens on [data-open-subscribe]
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: var(--surface-2);
  border: 1px solid var(--neon);
  border-radius: var(--radius);
  max-width: 480px; width: 100%;
  max-height: calc(100vh - 40px); overflow-y: auto;   /* mobile-safe scroll when content exceeds viewport */
  padding: 32px;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: 0;
  color: var(--text-soft); font-size: 1.6rem;
  cursor: pointer; line-height: 1; padding: 6px 10px;
}
.modal-close:hover { color: var(--neon); }
.modal-box h2 { margin: 0 0 8px; font-size: 1.3rem; color: var(--neon-deep); }
.modal-sub { color: var(--text-soft); margin: 0 0 18px; line-height: 1.5; }
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-family: var(--mono); font-size: 0.95rem;
}
.modal-form input[type="email"]:focus { border-color: var(--neon); outline: none; }
.subscribe-msg { margin: 12px 0 0; font-size: 0.92rem; min-height: 1.2em; }
.subscribe-msg-ok  { color: var(--neon); }
.subscribe-msg-err { color: #F44336; }
.modal-foot { color: var(--text-soft); font-size: 0.8rem; margin: 16px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   Scrolling 5% off ribbon — landing only
   ============================================================ */
.scroll-ribbon {
  display: block;
  background: var(--neon);
  color: var(--ink);
  font-family: var(--mono); font-weight: 700; font-size: 0.92rem;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid #00C853;
  height: 38px;
  line-height: 38px;
  position: relative;
}
.scroll-ribbon:hover { background: #00C853; color: var(--ink); }
.scroll-ribbon-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-marquee 28s linear infinite;
}
.scroll-ribbon-item { display: inline-block; padding: 0 32px; }
@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-ribbon-track { animation: none; }
}

/* ============================================================
   Pack stats (inside pack tile)
   ============================================================ */
.pack-stats {
  list-style: none;
  padding: 0; margin: 6px 0 0;
  font-size: 0.78rem; color: var(--text-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.pack-stats li { line-height: 1.4; }
.pack-stat-num { font-family: var(--mono); color: var(--text); font-weight: 700; }
.pack-stat-modes { font-family: var(--mono); }

/* ============================================================
   Cert-packs (pack grid INSIDE a cert card)
   ============================================================ */
.cert-packs {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.cert-packs-kicker {
  font-family: var(--mono);
  color: var(--cert-accent, var(--neon));
  font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 4px;
}
.cert-packs-sub {
  color: var(--text-soft); font-size: 0.92rem;
  margin: 0 0 16px; max-width: 800px;
}

/* ============================================================
   Dashboard count sub
   ============================================================ */
.dashboard-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  display: inline-block;
  margin-left: 4px;
}

/* ============================================================
   Discord foot (locked-state text)
   ============================================================ */
.portal-discord {
  margin-top: 48px;
}
.portal-discord-foot {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-top: 12px;
}

/* ============================================================
   Dashboard — clearer stat formatting
   ============================================================ */
.dashboard-stat-row { display: flex; align-items: baseline; gap: 4px; }
.dashboard-stat-num {
  font-family: var(--mono); font-weight: 700;
  font-size: 2.4rem; line-height: 1; color: var(--neon);
}
.dashboard-stat-div {
  font-family: var(--mono); font-weight: 700;
  font-size: 1.4rem; line-height: 1; color: var(--text-soft);
}
.dashboard-mini {
  margin-top: 10px;
  font-size: 0.86rem;
  display: flex; gap: 14px;
  font-family: var(--mono);
}
.mini-correct strong { color: #00C853; }
.mini-incorrect strong { color: #F44336; }

.demo-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255,193,7,0.15);
  color: #FF9800;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Domain bars — stats column on the right */
.dom-bar-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 14px;
}
.dom-bar-stats {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  display: flex; gap: 10px;
  white-space: nowrap;
}
.dom-acc { color: var(--neon); font-weight: 700; min-width: 38px; text-align: right; }
.dom-counts { min-width: 100px; }
.dom-remaining { color: var(--text-soft); opacity: 0.8; }

/* ============================================================
   Pack tiles — locked + sample states + mode-status
   ============================================================ */
.pack-tile-locked {
  opacity: 0.65;
  border-style: dashed;
  cursor: pointer;
}
.pack-tile-locked:hover { opacity: 0.85; }
.pack-badge-locked { background: rgba(120,120,120,0.18); color: var(--text-soft); }
.pack-stats-faded { opacity: 0.55; }
.pack-stats .pack-stat-modes { font-size: 0.75rem; }
.mode-done { color: var(--neon); }
.mode-undone { color: var(--text-soft); opacity: 0.7; }

.sample-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255,193,7,0.15);
  color: #FF9800;
  border-radius: 3px;
  vertical-align: middle;
}
.pack-tile-sample { border-color: #FF9800; }
.pack-tile-sample:hover { border-color: #FFB74D; }

/* ============================================================
   Kit modal additions — features list + price
   ============================================================ */
.kit-features {
  list-style: none;
  padding: 0; margin: 14px 0;
  display: flex; flex-direction: column; gap: 6px;
}
.kit-features li {
  padding-left: 24px;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.4;
}
.kit-features li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--neon); font-weight: 700;
}
.kit-price {
  font-size: 1.05rem;
  color: var(--text);
  margin: 18px 0;
}
.kit-price strong { color: var(--neon); font-family: var(--mono); font-size: 1.3rem; }

/* ============================================================
   Progress dot — mark-for-review (amber)
   ============================================================ */
.prog-review {
  background: rgba(255, 152,   0, 0.18);
  border-color: #FF9800;
  color: #FF9800;
}

/* Brighten prog-done so "completed (real mode)" reads clearly green */
.prog-done {
  background: rgba(0, 230, 118, 0.22);
  border-color: #00C853;
  color: #00C853;
}

/* Mark-for-review button under the question form */
.q-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 12px;
}
.q-actions-post { margin-top: 0; }
.q-mark-btn {
  font-family: var(--mono);
  font-size: 0.85rem;
}
.q-mark-on {
  background: rgba(255, 152, 0, 0.12);
  border-color: #FF9800;
  color: #FF9800;
}
.q-mark-on:hover { background: rgba(255, 152, 0, 0.22); }

/* ============================================================
   Sub-bar rows for weak / best spots — same shape as dom-bar-row
   ============================================================ */
.sub-bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 1fr auto;
  align-items: center; gap: 14px;
  padding: 4px 0;
}
.sub-bar-label {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.3;
}
.sub-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px; overflow: hidden;
}
.sub-bar-fill { height: 100%; }
.sub-bar-fill-weak { background: #F44336; }
.sub-bar-fill-best { background: #00C853; }
.sub-bar-stats {
  font-family: var(--mono);
  font-size: 0.78rem;
  display: flex; gap: 10px;
  white-space: nowrap;
}
.sub-acc { font-weight: 700; min-width: 38px; text-align: right; }
.sub-acc-weak { color: #F44336; }
.sub-acc-best { color: #00C853; }
.sub-counts { color: var(--text-soft); }

@media (max-width: 720px) {
  .sub-bar-row { grid-template-columns: 1fr; gap: 4px; }
  .sub-bar-label { font-size: 0.85rem; }
}

/* ============================================================
   Dashboard tools (reset stats button)
   ============================================================ */
.dashboard-tools {
  margin-top: 16px;
  text-align: right;
}
.reset-flash {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
}
.reset-flash-ok  { background: rgba(0,230,118,0.10); color: var(--neon-deep); border: 1px solid var(--neon); }
.reset-flash-err { background: rgba(244,67,54,0.10); color: #F44336;        border: 1px solid rgba(244,67,54,0.4); }

/* Reset modal — keep the warning visual */
.modal-sub-warn { color: #F44336; }
.reset-tick {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0;
  font-size: 0.92rem;
}
.reset-tick input[type="checkbox"] { margin-top: 4px; }
.reset-phrase-label {
  display: block; margin-top: 12px;
  font-size: 0.88rem; color: var(--text-soft);
}
.reset-phrase-target {
  margin: 6px 0;
  font-family: var(--mono); font-size: 0.85rem;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px;
  user-select: all;
}
.reset-phrase-target code { font-family: inherit; color: var(--neon); }
.reset-submit {
  width: 100%;
  margin-top: 16px;
  background: #F44336 !important;
  border-color: #F44336 !important;
  color: #fff !important;
}
.reset-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Kit modal: discount-email-capture sub-form */
.kit-discount-flow {
  margin: 18px 0;
  padding: 14px;
  background: rgba(0,230,118,0.04);
  border: 1px dashed var(--neon);
  border-radius: 8px;
}
.kit-discount-prompt {
  margin: 0 0 10px;
  font-size: 0.92rem;
}
.kit-discount-form {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.kit-discount-form input[type="email"] {
  flex: 1; min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  font-family: var(--mono); font-size: 0.9rem;
}

/* Support line */
.portal-support {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.portal-support-line {
  color: var(--text-soft);
  font-size: 0.92rem;
}
.portal-support-line a { color: var(--neon); }

/* ============================================================
   Sub-bar rows v2 — stacked layout so long subdomain labels fit
   ============================================================ */
.sub-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sub-bar-row:last-child { border-bottom: 0; }
.sub-bar-label {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.3;
}
.sub-bar-track-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.sub-bar-track {
  height: 8px;
  background: rgba(0, 230, 118, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.sub-bar-stats {
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ============================================================
   Domain-detail — collapsible/expandable per-domain breakdown
   ============================================================ */
.domain-detail {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.domain-detail:last-child { border-bottom: 0; }
.domain-detail summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 40px 1fr auto 16px;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
}
.domain-detail summary::-webkit-details-marker { display: none; }
.domain-detail summary:hover { background: rgba(0, 230, 118, 0.04); }
.domain-chev {
  font-family: var(--mono);
  color: var(--text-soft);
  transition: transform 0.18s ease;
  text-align: right;
}
.domain-detail[open] .domain-chev {
  transform: rotate(90deg);
  color: var(--neon);
}
.domain-subs {
  padding: 4px 0 14px 54px;
  border-left: 2px solid rgba(0, 230, 118, 0.15);
  margin-left: 18px;
}
.domain-empty {
  padding: 8px 0 12px 54px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-style: italic;
}

/* ============================================================
   Demo CTA under exam packs
   ============================================================ */
.demo-exams-cta {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.10), rgba(0, 230, 118, 0.02));
  border: 1px dashed var(--neon);
  border-radius: var(--radius);
  text-align: center;
}
.demo-exams-cta h3 {
  margin: 0 0 8px;
  color: var(--neon-deep);
  font-size: 1.05rem;
}
.demo-exams-cta p {
  color: var(--text-soft);
  margin: 0 0 16px;
}

/* ============================================================
   FINAL OVERRIDE — sub-bar rows. Older rules above are obsolete.
   Force visible tracks with explicit width + display.
   ============================================================ */
.sub-bar-row,
.sub-bar-row.sub-bar-row {  /* doubled selector for specificity */
  display: block !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  grid-template-columns: none !important;
}
.sub-bar-row:last-child { border-bottom: 0; }
.sub-bar-label {
  display: block !important;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.3;
  margin-bottom: 6px;
}
.sub-bar-track-wrap {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.sub-bar-track {
  flex: 1 1 auto !important;
  min-width: 120px;
  height: 10px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 5px;
  overflow: hidden;
  display: block;
}
.sub-bar-fill {
  display: block;
  height: 100% !important;
  border-radius: 5px;
}
.sub-bar-fill-weak { background: #F44336 !important; }
.sub-bar-fill-best { background: #00C853 !important; }
.sub-bar-stats {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

/* Domain summary — also use flex for robustness */
.domain-detail summary {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 12px 0 !important;
  cursor: pointer;
  list-style: none;
}
.domain-detail summary::-webkit-details-marker,
.domain-detail summary::marker { display: none; content: ''; }
.domain-summary .dom-bar-label { flex: 0 0 36px; }
.domain-summary .dom-bar-track {
  flex: 1 1 auto;
  min-width: 100px;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  overflow: hidden;
}
.domain-summary .dom-bar-fill {
  display: block;
  height: 100%;
  background: var(--neon);
  border-radius: 5px;
}
.domain-summary .dom-bar-stats {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  display: flex; gap: 10px;
  white-space: nowrap;
  color: var(--text-soft);
}
.domain-summary .dom-acc { color: var(--neon); font-weight: 700; }
.domain-summary .domain-chev { flex: 0 0 16px; }

/* ============================================================
   Dashboard-pair — weak + best side by side on desktop
   ============================================================ */
.dashboard-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .dashboard-pair { grid-template-columns: 1fr; }
}

/* Override: kill the old red sub-bar-fill-weak — always green now (or blank track) */
.sub-bar-fill-weak,
.sub-bar-fill-best {
  background: #00C853 !important;
}

/* Make track slightly more visible against dark surface so "blank/remaining" reads as empty space */
.sub-bar-track {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Drop the red/amber accuracy text — keep neutral colour for the % */
.sub-acc,
.sub-acc-weak,
.sub-acc-best {
  color: var(--text);
}

/* FINAL OVERRIDE — weak fills go back to RED (the wrong-portion is the focal point of "weak spots") */
.sub-bar-fill-weak { background: #F44336 !important; }
.sub-bar-fill-best { background: #00C853 !important; }
.sub-acc-weak { color: #F44336; }
.sub-acc-best { color: #00C853; }

/* ============================================================
   Cert-stats — accuracy + weak + best moved inside the cert card
   ============================================================ */
.cert-stats {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.cert-stats-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.cert-stats .dashboard-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 0; }
.cert-stats .dashboard-pair .cert-stats-card { margin-bottom: 0; }
@media (max-width: 720px) {
  .cert-stats .dashboard-pair { grid-template-columns: 1fr; }
}

/* Cert-stats summary cards — same shape as top dashboard had, but now nested */
.cert-stats-summary {
  grid-template-columns: repeat(3, 1fr) !important;
  margin-bottom: 14px;
}
@media (max-width: 720px) {
  .cert-stats-summary { grid-template-columns: 1fr !important; }
}
.cert-stats .dashboard-tools { margin-top: 16px; }

/* ============================================================
   Cert nav tabs — one per licensed cert under the welcome head
   ============================================================ */
.cert-nav {
  display: flex;
  gap: 8px;
  margin: 18px 0 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.cert-nav-tab {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-soft);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cert-nav-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.cert-nav-tab-active {
  color: var(--text);
  border-bottom-color: var(--cert-accent, var(--neon));
}
.cert-nav-issuer {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.cert-nav-name {
  font-size: 0.95rem;
  font-weight: 600;
}
.cert-nav-tab-active .cert-nav-name { color: var(--cert-accent, var(--neon)); }
@media (max-width: 720px) {
  .cert-nav-tab { padding: 8px 12px; }
  .cert-nav-name { font-size: 0.85rem; }
}

/* ============================================================
   LIGHT-THEME FIX — progress bar tracks were rgba(255,255,255,X) which is
   invisible on a white background. Use theme-aware variable instead.
   ============================================================ */
:root {
  --track-bg: rgba(15, 23, 42, 0.10);   /* slate-on-white = visible on light theme */
  --track-bg-strong: rgba(15, 23, 42, 0.16);
}
[data-theme="dimmed"], [data-theme="dark"] {
  --track-bg: rgba(255, 255, 255, 0.10);
  --track-bg-strong: rgba(255, 255, 255, 0.18);
}

/* Apply to every bar track — wins via specificity + !important */
.sub-bar-track,
.dom-bar-track,
.domain-summary .dom-bar-track {
  background: var(--track-bg) !important;
}

/* Reset-stats button — dark-mode-only neon-green was invisible on light bg */
.btn-ghost.btn-sm[data-open-reset-modal],
.dashboard-tools .btn {
  border: 1px solid var(--text-soft);
  color: var(--text);
  background: transparent;
}
.btn-ghost.btn-sm[data-open-reset-modal]:hover,
.dashboard-tools .btn:hover {
  border-color: #F44336;
  color: #F44336;
}

/* Pack tile + cert card on light theme — keep border crisp */
[data-theme="light"] .pack-tile,
.pack-tile {
  /* default light theme — ensure border + bg both visible */
  border-color: var(--line);
}

/* Progress dots on light theme — make defaults darker so they're visible */
.prog-dot { color: var(--text-soft); border-color: var(--line); }
.prog-correct { background: rgba(0, 200, 83, 0.18); color: #00C853; border-color: #00C853; }
.prog-wrong   { background: rgba(244, 67, 54, 0.16); color: #F44336; border-color: #F44336; }
.prog-done    { background: rgba(0, 200, 83, 0.18); color: #00C853; border-color: #00C853; }
.prog-review  { background: rgba(255, 152, 0, 0.18); color: #FF9800; border-color: #FF9800; }

/* Reset modal text-field on light theme: black text was rendered green-on-white; fix to plain */
.reset-phrase-target code { color: #0F172A; }
[data-theme="dimmed"] .reset-phrase-target code,
[data-theme="dark"] .reset-phrase-target code { color: var(--neon); }
.reset-phrase-target { background: rgba(15, 23, 42, 0.04); }

/* Reset submit button — pink on light, deeper-red on dark */
.reset-submit { background: #F44336 !important; color: #fff !important; border-color: #F44336 !important; }
.reset-submit:disabled { opacity: 0.35; cursor: not-allowed; }

/* Cert-nav: "Your Packs:" label */
.cert-nav { align-items: center; }
.cert-nav-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin-right: 12px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .cert-nav-label { width: 100%; margin-bottom: 4px; }
}

/* ============================================================
   LIGHT THEME — extra-aggressive overrides for elements still rendering with wrong contrast
   These selectors are deliberately broad to override any earlier rules.
   ============================================================ */
html:not([data-theme="dimmed"]):not([data-theme="dark"]) {
  /* Default = light theme — re-state variables for crystal-clear cascade */
  --track-bg: rgba(15, 23, 42, 0.12);
  --track-bg-strong: rgba(15, 23, 42, 0.20);
}

/* On light theme: every accuracy bar track must have a slate-tinted visible background */
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .sub-bar-track,
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .dom-bar-track,
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .domain-summary .dom-bar-track {
  background: rgba(15, 23, 42, 0.12) !important;
}

/* Reset-all-stats button on light theme — proper contrast */
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .dashboard-tools .btn,
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .btn-ghost.btn-sm {
  background: #fff !important;
  border: 1px solid #94A3B8 !important;
  color: #0F172A !important;
}
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .dashboard-tools .btn:hover,
html:not([data-theme="dimmed"]):not([data-theme="dark"]) .btn-ghost.btn-sm:hover {
  border-color: #F44336 !important;
  color: #F44336 !important;
}

/* Lock-icon polish: tighten spacing around the emoji */
.pill-unlicensed,
.pack-badge-locked { letter-spacing: 0; }

/* ============================================================
   Q-error flash + dark-mode prog dot visibility
   ============================================================ */
.q-error {
  background: rgba(244, 67, 54, 0.10);
  border: 1px solid #F44336;
  color: #F44336;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  margin: 0 0 16px;
  font-weight: 600;
}

/* Dark + dimmed: progress dot states need bolder fills against dark surface */
[data-theme="dimmed"] .prog-correct,
[data-theme="dark"]   .prog-correct {
  background: #00C853 !important;
  color: #000 !important;
  border-color: #00C853 !important;
}
[data-theme="dimmed"] .prog-wrong,
[data-theme="dark"]   .prog-wrong {
  background: #F44336 !important;
  color: #fff !important;
  border-color: #F44336 !important;
}
[data-theme="dimmed"] .prog-done,
[data-theme="dark"]   .prog-done {
  background: #00C853 !important;
  color: #000 !important;
  border-color: #00C853 !important;
}
[data-theme="dimmed"] .prog-review,
[data-theme="dark"]   .prog-review {
  background: #FF9800 !important;
  color: #000 !important;
  border-color: #FF9800 !important;
}
[data-theme="dimmed"] .prog-here,
[data-theme="dark"]   .prog-here {
  outline: 2px solid var(--text) !important;
}

/* ============================================================
   DARK / DIMMED — preserve cert accent colours
   Earlier theme rules set `border-color: var(--line)` which wiped out the
   coloured top-border on upsell cards. Restore the cert accent.
   ============================================================ */
[data-theme="dimmed"] .upsell-card,
[data-theme="dark"]   .upsell-card {
  border-top: 3px solid var(--cert-accent, var(--neon)) !important;
}
[data-theme="dimmed"] .upsell-card:hover,
[data-theme="dark"]   .upsell-card:hover {
  border-color: var(--cert-accent, var(--neon)) !important;
}

/* Pack tile borders — keep cert accent visible on dark themes */
[data-theme="dimmed"] .pack-tile,
[data-theme="dark"]   .pack-tile {
  background: var(--surface-2);
  border-color: var(--line);
}
[data-theme="dimmed"] .pack-tile-mixed,
[data-theme="dark"]   .pack-tile-mixed {
  border-color: var(--neon) !important;
  background: linear-gradient(135deg, rgba(0,230,118,0.12), var(--surface-2)) !important;
}
[data-theme="dimmed"] .pack-tile-sample,
[data-theme="dark"]   .pack-tile-sample {
  border-color: #FF9800 !important;
}
[data-theme="dimmed"] .pack-tile:hover,
[data-theme="dark"]   .pack-tile:hover {
  border-color: var(--neon);
}

/* Pack badges — strengthen accent contrast on dark backgrounds */
[data-theme="dimmed"] .pack-badge-done,
[data-theme="dark"]   .pack-badge-done   { background: rgba(0,230,118,0.22); color: var(--neon); }
[data-theme="dimmed"] .pack-badge-progress,
[data-theme="dark"]   .pack-badge-progress { background: rgba(255,193,7,0.22); color: #FFB74D; }
[data-theme="dimmed"] .pack-badge-locked,
[data-theme="dark"]   .pack-badge-locked { background: rgba(255,255,255,0.10); color: var(--text-soft); }
[data-theme="dimmed"] .pack-badge-fresh,
[data-theme="dark"]   .pack-badge-fresh  { background: rgba(255,255,255,0.10); color: var(--text-soft); }

/* Sample / demo tags */
[data-theme="dimmed"] .sample-tag,
[data-theme="dark"]   .sample-tag,
[data-theme="dimmed"] .demo-badge,
[data-theme="dark"]   .demo-badge {
  background: rgba(255,152,0,0.22);
  color: #FFB74D;
}

/* Cert nav tab accent underline stays vivid on dark themes */
[data-theme="dimmed"] .cert-nav-tab-active,
[data-theme="dark"]   .cert-nav-tab-active {
  border-bottom-color: var(--cert-accent, var(--neon)) !important;
}
[data-theme="dimmed"] .cert-nav-tab-active .cert-nav-name,
[data-theme="dark"]   .cert-nav-tab-active .cert-nav-name {
  color: var(--cert-accent, var(--neon)) !important;
}

/* Cert section accent stripe — strengthen on dark for "the white isn't there but the colour is" feel */
[data-theme="dimmed"] .portal-cert,
[data-theme="dark"]   .portal-cert {
  border-top: 3px solid var(--cert-accent, var(--neon));
}

/* Mark-for-review form inside the question card — anchored top right */
.exam-question { position: relative; }
.q-mark-form {
  position: absolute;
  top: 18px;
  right: 18px;
  margin: 0;
  z-index: 2;
}
@media (max-width: 720px) {
  .q-mark-form { top: 10px; right: 10px; }
  .q-mark-form .q-mark-btn { font-size: 0.78rem; padding: 6px 10px; }
}

/* ============================================================
   Enhanced results screen
   ============================================================ */
.results-headline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.results-passed { background: rgba(0,200,83,0.10); border: 1px solid #00C853; }
.results-failed { background: rgba(244,67,54,0.08); border: 1px solid #F44336; }
.results-headline-left { text-align: center; padding-right: 24px; border-right: 1px solid var(--line); }
.results-headline .score-num { font-family: var(--mono); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--text); }
.results-headline .score-pct { font-family: var(--mono); font-weight: 700; font-size: 1.4rem; }
.results-passed .score-pct { color: #00C853; }
.results-failed .score-pct { color: #F44336; }
.results-verdict { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.results-passed .results-verdict { color: #00C853; }
.results-failed .results-verdict { color: #F44336; }
.results-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.88rem; color: var(--text-soft); }
.results-meta strong { color: var(--text); font-family: var(--mono); }
@media (max-width: 720px) {
  .results-headline { grid-template-columns: 1fr; }
  .results-headline-left { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
}

.results-section {
  margin: 20px 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.results-section h3 { margin: 0 0 14px; font-size: 1rem; }
.results-bars { display: flex; flex-direction: column; gap: 10px; }
.result-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: center;
}
.result-bar-label { font-family: var(--mono); font-weight: 700; font-size: 0.88rem; }
.result-bar-track { height: 12px; background: var(--track-bg, rgba(15,23,42,0.10)); border-radius: 6px; overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: 6px; }
.result-bar-good { background: #00C853; }
.result-bar-mid  { background: #FFC107; }
.result-bar-bad  { background: #F44336; }
.result-bar-stats { font-family: var(--mono); font-size: 0.85rem; color: var(--text-soft); white-space: nowrap; }

.results-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.results-pair-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.results-pair-card h3 { margin: 0 0 10px; font-size: 0.92rem; }
.results-sub-list { list-style: none; padding: 0; margin: 0; }
.results-sub-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.results-sub-list li:last-child { border-bottom: 0; }
.results-sub-name { font-size: 0.88rem; flex: 1; }
.results-sub-stat { font-family: var(--mono); font-size: 0.82rem; white-space: nowrap; }
.results-sub-stat-weak { color: #F44336; }
.results-sub-stat-best { color: #00C853; }
@media (max-width: 720px) {
  .results-pair { grid-template-columns: 1fr; }
}

.results-marked-list { list-style: none; padding: 0; margin: 0; }
.results-marked-list li {
  display: grid; grid-template-columns: auto auto 1fr; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 0.88rem;
}
.results-marked-list li:last-child { border-bottom: 0; }
.marked-id { font-family: var(--mono); color: var(--text-soft); }
.marked-verdict { font-family: var(--mono); font-weight: 700; }
.marked-verdict-correct { color: #00C853; }
.marked-verdict-wrong   { color: #F44336; }
.marked-verdict-unanswered { color: #FF9800; }
.marked-sub { color: var(--text); }

.results-recommend {
  background: rgba(0,230,118,0.06);
  border-color: var(--neon);
}
.results-recommend p { margin: 0; font-size: 0.95rem; line-height: 1.5; }

/* Concept glossary section under per-option rationale (Premium Reviewed) */
.q-concepts {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.q-concepts-head {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin: 0 0 10px;
}
.q-concepts-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.q-concepts-list li {
  background: rgba(0,0,0,0.02);
  border-left: 3px solid var(--neon);
  padding: 8px 12px;
  border-radius: 4px;
}
[data-theme="dimmed"] .q-concepts-list li,
[data-theme="dark"] .q-concepts-list li { background: rgba(255,255,255,0.03); }
.q-concept-name { font-weight: 700; font-size: 0.92rem; color: var(--text); margin-bottom: 3px; }
.q-concept-def { font-size: 0.88rem; line-height: 1.5; color: var(--text); margin-bottom: 4px; }
.q-concept-scenario { font-size: 0.84rem; line-height: 1.5; color: var(--text-soft); }
.q-concept-scenario em { color: var(--neon-deep); font-style: normal; font-weight: 600; margin-right: 4px; }
[data-theme="dark"] .q-concept-scenario em { color: var(--neon); }

/* /submit page — public question submission */
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.submit-page { padding: 48px 0 64px; }
.submit-page h1 { font-size: 1.85rem; line-height: 1.2; margin: 4px 0 16px; }
.submit-page .lead { font-size: 1rem; line-height: 1.6; color: var(--text); margin: 0 0 28px; }
.submit-form { display: grid; gap: 18px; margin-top: 12px; }
.submit-form .form-row { display: grid; gap: 6px; }
.submit-form label { font-weight: 600; font-size: 0.92rem; }
.submit-form input[type="email"],
.submit-form input[type="text"] {
  font-family: var(--mono); font-size: 0.95rem;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text);
}
.submit-form input[type="file"] { padding: 6px 0; font-size: 0.9rem; }
.form-hint { font-size: 0.82rem; color: var(--text-soft); margin: 0; }
.form-confirms {
  border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
  display: grid; gap: 8px;
}
.form-confirms legend { font-weight: 700; padding: 0 6px; font-size: 0.92rem; }
.form-confirms label { font-weight: 400; font-size: 0.92rem; display: flex; gap: 10px; align-items: flex-start; }
.form-confirms input[type="checkbox"] { margin-top: 3px; }
.form-captcha label strong { font-family: var(--mono); font-size: 1.05rem; padding: 0 4px; background: rgba(0,230,118,0.10); border-radius: 4px; }
.submit-form .hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.submit-errors {
  background: rgba(244, 67, 54, 0.08); border: 1px solid #DC2626;
  border-radius: 6px; padding: 12px 16px; margin: 16px 0 22px;
}
.submit-errors ul { margin: 6px 0 0; padding-left: 20px; }
.submit-success {
  background: rgba(0,230,118,0.08); border: 1px solid var(--neon);
  border-radius: 8px; padding: 22px 24px;
}
.submit-success h2 { color: var(--neon-deep); margin: 0 0 8px; }
[data-theme="dark"] .submit-success h2 { color: var(--neon); }
.submit-success code { font-family: var(--mono); background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 4px; }
[data-theme="dark"] .submit-success code { background: rgba(255,255,255,0.08); }

/* Pack-tile tags — pill next to the title for non-default tiers (e.g. community-submitted) */
.pack-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1.5;
}
.pack-tag-community {
  background: rgba(0,230,118,0.14);
  color: var(--neon-deep);
  border: 1px solid var(--neon);
}
[data-theme="dark"] .pack-tag-community {
  background: rgba(0,230,118,0.16);
  color: var(--neon);
}
.pack-tile-community { border-color: var(--neon) !important; }

/* Submit-page requirements list */
.submit-requirements {
  margin: 4px 0 28px;
  padding: 14px 20px 14px 36px;
  background: rgba(0, 0, 0, 0.02);
  border-left: 3px solid var(--neon);
  border-radius: 4px;
}
[data-theme="dimmed"] .submit-requirements,
[data-theme="dark"]   .submit-requirements { background: rgba(255, 255, 255, 0.03); }
.submit-requirements li { font-size: 0.92rem; line-height: 1.55; margin-bottom: 4px; }
.submit-requirements li:last-child { margin-bottom: 0; }

/* Community pack tag — recoloured to blue per spec (overrides earlier green block) */
.pack-tag-community {
  background: rgba(59, 130, 246, 0.14) !important;
  color: #1d4ed8 !important;
  border: 1px solid #3b82f6 !important;
}
[data-theme="dimmed"] .pack-tag-community {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border-color: #60a5fa !important;
}
[data-theme="dark"] .pack-tag-community {
  background: rgba(96, 165, 250, 0.18) !important;
  color: #93c5fd !important;
  border-color: #60a5fa !important;
}
.pack-tile-community { border-color: #3b82f6 !important; }
[data-theme="dark"] .pack-tile-community { border-color: #60a5fa !important; }

/* Submit form select dropdown — match the inputs */
.submit-form select {
  font-family: var(--mono); font-size: 0.95rem;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text);
}

/* Legal pages (copyright claims, etc.) */
.legal-page { padding: 48px 0 64px; }
.legal-page h1 { font-size: 1.85rem; margin: 4px 0 18px; }
.legal-page p, .legal-page li { line-height: 1.6; font-size: 0.95rem; }
.legal-page ul { padding-left: 22px; margin: 12px 0 18px; }
.legal-page li { margin-bottom: 6px; }
.legal-note { font-size: 0.86rem; color: var(--text-soft); margin-top: 28px; font-style: italic; }
.footer-fineprint { color: var(--text-soft); margin-left: 6px; text-decoration: none; }
.footer-fineprint:hover { color: var(--text); text-decoration: underline; }

/* Vendor + exam-code cascading row */
.vendor-exam-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 540px) {
  .vendor-exam-row { grid-template-columns: 1fr; }
}

/* Pack tile wrap — lets us hang a secondary "View past results" link below the tile without nested <a> */
.pack-tile-wrap { display: flex; flex-direction: column; }
.pack-tile-wrap .pack-tile { flex: 1; }
.pack-view-results {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  text-align: right;
  padding: 2px 4px;
  align-self: flex-end;
}
.pack-view-results:hover { color: var(--neon-deep); text-decoration: underline; }
[data-theme="dark"] .pack-view-results:hover { color: var(--neon); }

/* Coming-soon styling — used by the staged-rollout kit modal AND individual SKU rows on the cert grid */
.kit-soon-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
  background: rgba(245, 158, 11, 0.16);
  color: #B45309;
  border: 1px solid #F59E0B;
}
[data-theme="dark"] .kit-soon-tag {
  background: rgba(245, 158, 11, 0.22);
  color: #FBBF24;
}
.kit-upgrade-promise {
  background: rgba(0, 230, 118, 0.10);
  border-left: 3px solid var(--neon);
  padding: 12px 14px;
  border-radius: 4px;
  margin: 14px 0 16px;
  font-size: 0.92rem;
  line-height: 1.55;
}
[data-theme="dark"] .kit-upgrade-promise { background: rgba(0, 230, 118, 0.14); }
.individual-coming { opacity: 0.82; }
.individual-buy-soon {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 4px 10px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  white-space: nowrap;
}
.bundle-coming .bundle-cta { background: var(--surface-2, rgba(0,0,0,0.04)); color: var(--text); border: 1px solid var(--line); }
.bundle-coming .bundle-cta:hover { background: var(--surface, rgba(0,0,0,0.06)); }

/* ============================================================
   Exam report-an-issue — link + modal extras
   ============================================================ */
.q-report-line {
  margin: 18px 0 6px;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.q-report-link {
  color: var(--neon);
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: underline;
  margin-left: 6px;
}
.q-report-link:hover { color: var(--neon-deep); }

.modal-report textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
  box-sizing: border-box;
}
.modal-report textarea:focus { border-color: var(--neon); outline: none; }
.report-label {
  display: block;
  margin: 6px 0 6px;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}
.report-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.report-status-ok  { color: var(--neon); }
.report-status-err { color: #F44336; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ============================================================
   Thanks page (post-checkout) + Activate page (set password)
   ============================================================ */
.activate-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin: 48px auto;
  max-width: 560px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

/* Thanks page — friendlier post-checkout landing */
.thanks-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 44px 40px;
  margin: 56px auto;
  max-width: 600px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.32);
  text-align: center;
}
.thanks-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0,230,118,0.12);
  color: var(--neon);
  font-size: 36px;
  font-weight: 700;
  margin: 0 auto 20px;
  border: 2px solid var(--neon);
}
.thanks-title {
  color: var(--neon-deep);
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.thanks-sub {
  color: var(--text);
  margin: 0 auto 36px;
  line-height: 1.6;
  font-size: 1.05rem;
  max-width: 480px;
}
.thanks-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
}
.thanks-steps li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.thanks-steps li:last-child { border-bottom: 0; }
.thanks-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--neon);
  color: var(--ink, #0f1115);
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 2px;
}
.thanks-steps li > div { flex: 1; }
.thanks-steps strong {
  color: var(--text);
  font-size: 1rem;
  display: block;
  margin-bottom: 4px;
}
.thanks-steps p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.55;
}
.thanks-steps code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--neon);
}
.thanks-help {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 0 28px;
  text-align: left;
}
.thanks-help p { color: var(--text-soft); font-size: 0.92rem; margin: 0; line-height: 1.55; }
.thanks-help a { color: var(--neon); text-decoration: none; }
.thanks-help a:hover { text-decoration: underline; }
.thanks-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .thanks-card { padding: 36px 24px; margin: 32px 16px; }
  .thanks-title { font-size: 1.6rem; }
  .thanks-sub { font-size: 1rem; }
  .thanks-actions { flex-direction: column; }
  .thanks-actions .btn { width: 100%; }
}

.activate-card h1 { color: var(--neon-deep); margin: 0 0 12px; font-size: 1.4rem; }
.activate-sub { color: var(--text-soft); margin: 0 0 22px; line-height: 1.55; }
.activate-form { display: flex; flex-direction: column; gap: 12px; }
.activate-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-family: var(--mono); font-size: 0.95rem;
  box-sizing: border-box;
}
.activate-form input[type="password"]:focus { border-color: var(--neon); outline: none; }

.form-label { display: block; font-size: 0.92rem; color: var(--text); font-weight: 600; margin: 8px 0 -4px; }
.form-error {
  background: rgba(244,67,54,0.10);
  color: #F44336;
  border: 1px solid rgba(244,67,54,0.4);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

.activated-flash {
  background: rgba(0,230,118,0.10);
  color: var(--neon-deep);
  border: 1px solid var(--neon);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 0 18px;
  font-size: 0.95rem;
}

/* Forgot / reset password — leans on existing .auth-card */
.auth-forgot { text-align: center; margin: 10px 0 0; font-size: 0.9rem; }
.auth-forgot a { color: var(--text-soft); text-decoration: underline; }
.auth-forgot a:hover { color: var(--neon); }
.auth-success {
  background: rgba(0,230,118,0.08);
  border: 1px solid var(--neon);
  color: var(--neon-deep);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 0 0 18px;
  line-height: 1.55;
  font-size: 0.95rem;
}
.auth-alt { text-align: center; margin: 14px 0 0; font-size: 0.9rem; color: var(--text-soft); }
.auth-alt a { color: var(--neon); text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* Pre-Stripe buy-gate modal */
#buy-gate-modal input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.95rem;
  box-sizing: border-box;
  margin: 8px 0 0;
}
#buy-gate-modal input[type="email"]:focus { border-color: var(--neon); outline: none; }
.buy-gate-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.buy-gate-status-ok  { color: var(--neon); }
.buy-gate-status-err { color: #F44336; }
.buy-gate-owned-msg {
  background: rgba(0,230,118,0.08);
  border: 1px solid var(--neon);
  color: var(--neon-deep);
  padding: 14px 16px;
  border-radius: 8px;
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.buy-gate-owned-msg strong { color: var(--neon); font-family: var(--mono); }
