/* ============================================================
   Global: always respect the [hidden] HTML attribute, regardless
   of what author CSS declares for the element. Without this, any
   `.foo { display: flex|grid|inline-flex }` rule on a [hidden]
   element silently defeats the HTML5 default `display: none`.
   Bit us on .auth-modal (signup modal stuck open after success)
   and the .user-menu dropdown (couldn't close). One rule, one
   precedence-winning declaration, all future [hidden] elements
   work as expected.
   ============================================================ */
[hidden] { display: none !important; }

/* ============================================================
   Claude Architect Trainer — shared styles, RTL-aware
   Brand system: MSApps × OpsAgents
   (Rubik + JetBrains Mono · navy / orange / purple → cyan)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&family=Heebo:wght@300;400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
  /* Surfaces */
  --bg:          #080F26;            /* navy */
  --bg-soft:     #0E1B3D;            /* navy mid */
  --bg-card:     #131E45;            /* card */
  --bg-card-2:   #182760;            /* card hover */
  --border:      rgba(91, 200, 224, 0.14);
  --border-strong: rgba(91, 200, 224, 0.28);

  /* Text */
  --fg:          #f3f5ff;
  --fg-soft:     rgba(243, 245, 255, 0.78);
  --muted:       rgba(243, 245, 255, 0.52);

  /* Brand accents */
  --accent:        #F36F21;          /* MSApps orange */
  --on-accent:     #1b1404;          /* dark ink for text ON --accent — theme-independent, AA-safe in dark + incoming Claude-light (card vOOxUa0c) */
  --accent-soft:   #FFB07A;
  --purple:        #5B2EE5;          /* OpsAgents purple */
  --purple-deep:   #3A14B0;
  --cyan:          #5BC8E0;          /* OpsAgents cyan */
  --purple-cyan:   linear-gradient(90deg, #5B2EE5, #5BC8E0);

  /* Semantic */
  --good: #5BE0A4;
  --bad:  #FF6B6B;
  --info: #5BC8E0;
  --warn: #F3B821;

  /* Code surface */
  --code-bg: #060B1E;
  --code-fg: #E9EEFF;

  /* Effects */
  --shadow:        0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 18px 60px rgba(91, 46, 229, 0.18);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     20px;

  /* Type */
  --sans: 'Rubik', system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  --sans-he: 'Heebo', 'Rubik', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* ============================================================
     Claude-light design-token foundation (redesign cards #1–#8)
     ------------------------------------------------------------
     DORMANT layer. Card #436 / redesign #1 = FOUNDATION ONLY.
     Nothing in the app references these `--cca-*` tokens yet, so
     the current navy/orange theme above renders byte-identical.
     Components migrate onto these tokens in redesign cards #2–#8,
     pivoting the app to the warm-cream / coral "Claude-light"
     visual language (canonical: Trello card 6uy0hdgx).
     Do NOT consume these here — repaint happens downstream.
     ============================================================ */

  /* Claude-light — color */
  --cca-bg:           #F7F4EE;   /* warm cream background */
  --cca-surface:      #FFFFFF;   /* white surface / card */
  --cca-coral:        #D97757;   /* primary coral accent */
  --cca-coral-hover:  #C8623F;   /* coral hover / pressed */
  --cca-coral-soft:   #EFD9CF;   /* soft coral tint / wash */
  --cca-correct:      #2E7D55;   /* semantic — correct (green) */
  --cca-wrong:        #C2392B;   /* semantic — wrong (red) */
  --cca-line:         #E5DFD4;   /* neutral border / hairline */
  --cca-ink:          #2B2A28;   /* default warm ink text */
  --cca-ink-soft:     #6B6760;   /* muted secondary text */
  --cca-shadow:       0 1px 2px rgba(43, 42, 40, 0.06),
                      0 8px 24px rgba(43, 42, 40, 0.08); /* subtle */

  /* Claude-light — radius scale */
  --cca-radius-sm:    8px;
  --cca-radius-md:    12px;
  --cca-radius-lg:    20px;

  /* Claude-light — spacing step (8px base) */
  --cca-space:        8px;

  /* Claude-light — type families */
  --cca-font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --cca-font-ui:      'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  --cca-font-he:      'Heebo', 'Assistant', system-ui, sans-serif;

  /* Claude-light — modular type scale (ratio 1.25, base 1rem/16px) */
  --cca-fs-xs:        0.64rem;   /* ~10.24px */
  --cca-fs-sm:        0.8rem;    /* ~12.8px  */
  --cca-fs-base:      1rem;      /* 16px     */
  --cca-fs-md:        1.25rem;   /* 20px     */
  --cca-fs-lg:        1.5625rem; /* ~25px    */
  --cca-fs-xl:        1.9531rem; /* ~31.25px */
  --cca-fs-2xl:       2.4414rem; /* ~39.06px */
  --cca-fs-3xl:       3.0518rem; /* ~48.83px */

  /* Claude-light — matching line-heights */
  --cca-lh-xs:        1.5;
  --cca-lh-sm:        1.5;
  --cca-lh-base:      1.6;
  --cca-lh-md:        1.45;
  --cca-lh-lg:        1.3;
  --cca-lh-xl:        1.2;
  --cca-lh-2xl:       1.15;
  --cca-lh-3xl:       1.1;

  /* Claude-light — optimal reading measure for question body */
  --cca-measure:      68ch;

  /* ============================================================
     OpsAgents "Sea · Sand · Claude" design system — PALETTE LAYER
     ------------------------------------------------------------
     Re-cut of the approved redesign (card UqAxJNfu — supersedes the
     orphan PR #2 / redesign/opsagents-design-system, head dbd000e5,
     which had no merge base with main). The original PR re-pointed the
     LIVE legacy tokens (--bg/--accent/--good …) straight onto this
     palette because its base was a 253-line scaffold. Main has since
     diverged into a fully-built DARK navy theme (~2089 lines, ~197
     hardcoded #fff / dark-rgba sites that assume a dark ground), so a
     blind --bg/--accent flip here would render white-on-sand and would
     also collide with the in-flight --cca-* warm-light migration
     (cards #1–#8 / Trello 6uy0hdgx, "repaint happens downstream").

     So the Sea·Sand·Claude tokens are landed as a NAMED, documented
     layer — exactly like the dormant --cca-* foundation above — ready
     to be consumed by the downstream component-repaint cards without a
     destructive wholesale-replace. SAND grounds, SEA is the functional
     primary, CLAUDE terracotta is the one expressive accent, SAGE is
     the calm middle. Type = Rubik + Heebo (RTL) + JetBrains Mono.
     ============================================================ */

  /* ── Sand · the ground (lead) ───────────────────────────── */
  --ss-bg:        #F4EFE6;   /* page ground (sand-200) */
  --ss-bg-soft:   #ECE6D9;   /* sidebar / topbar / sunken (sand-300) */
  --ss-bg-card:   #FBF8F1;   /* cards, panels (sand-100) */
  --ss-bg-raised: #FCFAF4;   /* brightest raised surface (sand-50) */

  /* ── Lines (warm sand hairlines) ────────────────────────── */
  --ss-border:        #E2DAC8;
  --ss-border-strong: #D5CAB3;

  /* ── Ink · text on sand (teal-charcoal, never pure black) ── */
  --ss-fg:        #16303A;   /* primary text */
  --ss-fg-soft:   #3C555F;   /* secondary text */
  --ss-muted:     #6B7E85;   /* meta / placeholder */

  /* ── Sea · the functional primary (links, buttons, focus) ── */
  --ss-sea:        #0E7C96;
  --ss-sea-deep:   #0A5A6E;   /* pressed */
  --ss-sea-bright: #2FAFC4;
  --ss-sea-wash:   #DCEDF0;   /* soft chip fill */
  --ss-on-accent:  #FFFFFF;   /* text on sea / sage / claude fills */
  --ss-ring:       rgba(14, 124, 150, 0.30);

  /* ── Claude · the one expressive warm accent ────────────── */
  --ss-claude:        #D97757;
  --ss-claude-deep:   #B65C3F;
  --ss-claude-hover:  #C8694A;
  --ss-claude-soft:   #F6E4DA;
  --ss-claude-ink:    #A6502F;
  --ss-gradient-claude: linear-gradient(135deg, #D97757 0%, #B65C3F 100%);
  --ss-claude-ring:   rgba(217, 119, 87, 0.32);

  /* ── Sage · the calm middle ─────────────────────────────── */
  --ss-sage:      #6F9C76;
  --ss-sage-soft: #E6EFE3;
  --ss-sage-ink:  #3C6644;

  /* ── State (desaturated — a red pill = "needs a human") ──── */
  --ss-good:      #3C7355;
  --ss-good-soft: #E4EFE7;
  --ss-bad:       #C56A5A;
  --ss-bad-soft:  #F4E0D9;

  /* ── Code blocks · deep teal-charcoal (the one dark surface) */
  --ss-code-bg:   #16303A;
  --ss-code-fg:   #EAF1F2;
  --ss-code-border:#2A4A54;

  /* ── Shadows (soft, warm teal-ink) ──────────────────────── */
  --ss-shadow:      0 4px 16px rgba(22, 48, 58, 0.07);
  --ss-shadow-lift: 0 12px 30px rgba(22, 48, 58, 0.12);
  --ss-radius:      16px;

  /* ── Type ───────────────────────────────────────────────── */
  --ss-font-display: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ss-font-body:    'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ss-font-hebrew:  'Heebo', 'Rubik', system-ui, sans-serif;
  --ss-font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ss-ls-wide:      0.14em;
  /* ============================================================
     Slice 6 (card 5j2FhLyb) — CONVOY MOP-UP: re-point every legacy
     dark-theme token onto the Sea·Sand·Claude light palette so the
     residual surfaces slices 1-5 did not hand-migrate (exam-mode,
     flashcards, slides, vocab, games, user-pill, auth, diagnostics)
     render on the light ground instead of as dark islands. Placed
     last in :root -> wins over the dark defs above. Hardcoded #fff /
     rgba(255,255,255,*) literals that assumed a dark ground are fixed
     at their call sites below (solid green/red game fills keep white
     text; low-opacity tint states switch to dark ink).
     ============================================================ */
  --bg:            var(--ss-bg);
  --bg-soft:       var(--ss-bg-soft);
  --bg-card:       var(--ss-bg-card);
  --bg-card-2:     var(--ss-bg-raised);
  --border:        var(--ss-border);
  --border-strong: var(--ss-border-strong);
  --fg:            var(--ss-fg);
  --fg-soft:       var(--ss-fg-soft);
  --muted:         var(--ss-muted);
  --accent:        var(--ss-claude);
  --accent-soft:   var(--ss-claude-ink);
  --on-accent:     var(--ss-on-accent);
  --purple:        var(--ss-sea-deep);
  --purple-deep:   var(--ss-sea-deep);
  --cyan:          var(--ss-sea);
  --purple-cyan:   linear-gradient(90deg, var(--ss-sea-deep), var(--ss-sea-bright));
  --good:          var(--ss-good);
  --bad:           var(--ss-bad);
  --info:          var(--ss-sea);
  --code-bg:       var(--ss-code-bg);
  --code-fg:       var(--ss-code-fg);
  --shadow:        var(--ss-shadow);
  --shadow-strong: var(--ss-shadow-lift);
  --sans:          var(--ss-font-body);
  --sans-he:       var(--ss-font-hebrew);
  --mono:          var(--ss-font-mono);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--ss-bg);
  color: var(--ss-fg);
  font-family: var(--ss-font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Decorative stripes — subtle warm tonal washes on the sand ground.
   Sea-tinted haze top-right, Claude-terracotta warmth bottom-left. */
body {
  background:
    radial-gradient(1200px 600px at 92% -10%, rgba(14, 124, 150, 0.06) 0%, rgba(14, 124, 150, 0) 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(217, 119, 87, 0.05) 0%, rgba(217, 119, 87, 0) 65%),
    linear-gradient(180deg, var(--ss-bg) 0%, #EDE7DB 100%);
  background-attachment: fixed;
}

[dir="rtl"] { font-family: var(--ss-font-hebrew); }
[dir="rtl"] .pill,
[dir="rtl"] .eyebrow,
[dir="rtl"] .chrome-path,
[dir="rtl"] .lang-badge { font-family: var(--ss-font-mono); /* mono is LTR-safe */ }

/* ============================================================
   Chrome — TrainerChrome from msapps × opsagents system
   64px tall, MSApps · | · OpsAgents · / path · tabs · EN/HE · avatar
   ============================================================ */
.chrome {
  height: 64px;
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ss-bg-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ss-border);
  position: sticky; top: 0; z-index: 50;
}

.chrome-left { display: flex; align-items: center; gap: 18px; }
.chrome-right { display: flex; align-items: center; gap: 22px; }

.brand-link {
  display: inline-flex; align-items: center;
  text-decoration: none;
  transition: 0.18s opacity;
}
.brand-link:hover { opacity: 0.78; }
.brand-logo { display: block; }
.brand-logo-msapps    { height: 30px; width: auto; }
.brand-logo-opsagents { height: 38px; width: auto; }

.hairline {
  width: 1px; height: 28px;
  background: var(--ss-border-strong);
}

.chrome-path {
  margin-inline-start: 20px;
  font-family: var(--ss-font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ss-muted);
  /* Lay the label + chips out as inline-flex items so a tight bar wraps whole
     chips to a new line instead of squeezing one into a circular bubble that
     overlaps the nav. Pairs with white-space:nowrap on the chips below. */
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.chrome-tabs {
  display: flex; align-items: center; gap: 22px;
}
/* Primary tabs are direct <a> children; More-menu items are <a> inside
   #chrome-more-menu (styled separately below as .chrome-more-menu a). */
.chrome-tabs > a {
  font-family: var(--ss-font-body);
  font-size: 13px; font-weight: 500;
  color: var(--ss-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 21px 2px;
  transition: 0.15s color, 0.15s border-color;
  white-space: nowrap;
}
.chrome-tabs > a:hover { color: var(--ss-fg-soft); }
.chrome-tabs > a.on {
  color: var(--ss-fg);
  border-bottom-color: var(--ss-sea);
}

/* ── DX2 (o4OFAXKM): "More" overflow dropdown ────────────────────────
   Reuses the visual language of the existing .user-menu (navy panel, cyan
   hairline border, logical-property positioning so it opens on the correct
   side in both LTR and RTL). The trigger sits in the primary row and adopts
   the same underline-on-active treatment as a real tab. */
.chrome-more { position: relative; display: inline-flex; align-items: center; }
.chrome-more-trigger {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ss-muted);
  font-family: var(--ss-font-body); font-size: 13px; font-weight: 500;
  padding: 21px 2px;
  cursor: pointer;
  transition: 0.15s color, 0.15s border-color;
  white-space: nowrap;
}
.chrome-more-trigger:hover { color: var(--ss-fg-soft); }
.chrome-more-trigger.on { color: var(--ss-fg); border-bottom-color: var(--ss-sea); }
.chrome-more-trigger:focus-visible {
  outline: 2px solid var(--ss-sea); outline-offset: 2px; border-radius: 4px;
}
.chrome-more-caret {
  font-size: 10px; line-height: 1; opacity: 0.7;
  transition: 0.15s transform;
}
.chrome-more-trigger[aria-expanded="true"] .chrome-more-caret { transform: rotate(180deg); }
.chrome-more-menu {
  position: absolute;
  top: calc(100% - 6px);
  inset-inline-end: 0;        /* RTL-safe: opens to the correct side */
  min-width: 200px;
  padding: 6px;
  background: var(--ss-bg-card);
  border: 1px solid var(--ss-border-strong);
  border-radius: 10px;
  box-shadow: var(--ss-shadow);
  z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
}
.chrome-more-menu a {
  display: block;
  text-decoration: none;
  color: var(--ss-fg);
  padding: 9px 12px;
  text-align: start;          /* RTL-safe alignment */
  font-family: var(--ss-font-body);
  font-size: 13px; font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  border-bottom: 0;           /* override primary-tab underline treatment */
  transition: 0.12s background, 0.12s color;
}
.chrome-more-menu a:hover { background: var(--ss-sea-wash); color: var(--ss-sea-deep); }
.chrome-more-menu a.on {
  background: var(--ss-claude-soft);
  color: var(--ss-claude-ink);
}
.chrome-more-menu a:focus-visible {
  outline: 2px solid var(--ss-sea); outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
  .chrome-more-caret { transition: none; }
  .chrome-tabs > a, .chrome-more-trigger { transition: none; }
}

.lang-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(14, 124, 150, 0.06);
  font-family: var(--ss-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lang-badge .lang-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ss-sea);
  box-shadow: 0 0 8px rgba(14, 124, 150, 0.5);
}
.lang-badge button {
  background: transparent; border: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--ss-muted);
  cursor: pointer;
  /* WCAG 2.5.5 — the EN/HE toggles were a 16×15px tap target (card dNonOEsS).
     inline-flex + min-height/min-width make the hit area ≥44px without enlarging
     the glyphs; negative vertical margin keeps the header row from growing. */
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  margin-block: -14px;
  padding: 0;
  transition: 0.15s color;
}
.lang-badge button:hover { color: var(--ss-fg-soft); }
.lang-badge button.on { color: var(--ss-fg); }
.lang-badge .lang-sep { color: var(--ss-border-strong); }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0; padding: 0;
  background: linear-gradient(135deg, var(--ss-sea), var(--ss-sea-bright));
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14, 124, 150, 0.25);
  transition: 0.15s transform, 0.15s box-shadow;
}
.avatar:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(14, 124, 150, 0.4); }

/* ============================================================
   Main canvas (no sidebar; nav lives in chrome)
   ============================================================ */
.main {
  padding: 36px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Reserve viewport height for the SPA content area so late-injected content
   (question/exam data arriving after the async Firestore boot) can't grow the
   page from a collapsed state and shift the footer — the CLS source in card
   cz2qFRaW. Scoped away from games/kahoot short views (.main--compact, set by
   renderRoute) so a lobby or auth prompt isn't padded to a full viewport. */
.main:not(.main--compact) {
  min-height: 100vh;
}

/* ============================================================
   Dashboard surface — hero · streak · mastery · next-up
   Mirrors system.jsx TrainerDashboard (lines 511-637)
   ============================================================ */
.dash-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.dash-card,
.hero {
  border-radius: 12px;
  border: 1px solid var(--ss-border);
  background: var(--ss-bg-card);
}
.dash-card { padding: 24px; }
.dash-card-wide { grid-column: 1 / -1; }
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.hero {
  grid-column: 1 / -1;
  position: relative;
  padding: 36px;
  overflow: hidden;
  background: linear-gradient(120deg, var(--ss-bg-card) 0%, var(--ss-bg-raised) 60%);
}
.hero .eyebrow { color: var(--ss-claude-ink); margin-bottom: 14px; }
.hero-title {
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.1;
  margin: 0 0 22px;
  max-width: calc(100% - 240px);
}
.hero-xp { color: var(--ss-claude-ink); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.xp-ring {
  position: absolute; right: 36px;
  top: 50%; transform: translateY(-50%);
  width: 200px; height: 200px;
  pointer-events: none;
}
[dir="rtl"] .xp-ring { right: auto; left: 36px; }
@media (max-width: 880px) {
  .hero-title { max-width: 100%; }
  .xp-ring { position: static; transform: none; margin: 18px auto 0; }
}

.pill-dot {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(14, 124, 150, 0.06);
  font-family: var(--ss-font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ss-fg);
}
.pill-dot::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ss-sea);
  box-shadow: 0 0 8px rgba(14, 124, 150, 0.5);
}

.muted-mono {
  font-family: var(--ss-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ss-muted);
}

.streak-num {
  font-size: 52px; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1;
  margin: 14px 0;
  color: var(--ss-fg);
}
.streak-num-unit {
  font-size: 18px; font-weight: 400;
  color: var(--ss-fg-soft);
  margin-inline-start: 6px;
}
.streak-grid {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px;
}
.streak-cell {
  aspect-ratio: 1 / 1.2;
  border-radius: 3px;
  background: rgba(14, 124, 150, 0.08);
}
.streak-cell.on {
  background: var(--ss-claude);
  box-shadow: 0 0 8px rgba(217, 119, 87, 0.5);
}
.streak-zero .streak-num,
.streak-zero .streak-num-unit { color: var(--ss-muted); }
.streak-zero .streak-cell { background: rgba(14, 124, 150, 0.04); }
.streak-hint {
  margin-top: 14px;
  font-size: 13px; line-height: 1.5;
  color: var(--ss-fg-soft);
}

.mastery-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.mastery-row-head {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 6px;
  color: var(--ss-fg-soft);
}
.mastery-bar {
  height: 6px; border-radius: 3px;
  background: rgba(14, 124, 150, 0.08);
  overflow: hidden;
}
.mastery-bar > span {
  display: block; height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.next-up-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 16px;
}
@media (max-width: 880px) {
  .next-up-grid { grid-template-columns: repeat(2, 1fr); }
}
.next-card {
  display: block;
  padding: 18px;
  border-radius: 8px;
  background: var(--ss-bg-raised);
  border: 1px solid var(--ss-border);
  color: var(--ss-fg); text-decoration: none;
  transition: 0.18s background, 0.18s border-color, 0.18s transform;
}
.next-card:hover {
  background: var(--ss-bg-card);
  border-color: var(--c, var(--ss-sea));
  transform: translateY(-2px);
}
.next-num {
  width: 28px; height: 28px; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  color: var(--c);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
}
.next-eyebrow {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ss-muted);
}
.next-title {
  margin-top: 6px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ss-fg);
}
.next-meta {
  margin-top: 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ss-muted);
}

/* ============================================================
   Exam-mode tiles (Quick Test + Real Exam)
   Card UCfq9suI — Two exam modes.
   ============================================================ */
.exam-modes-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 16px;
}
@media (max-width: 760px) {
  .exam-modes-grid { grid-template-columns: 1fr; }
}
.exam-mode-card {
  display: block;
  padding: 22px;
  border-radius: 10px;
  background: var(--ss-bg-card);
  border: 1px solid var(--ss-border);
  color: var(--ss-fg); text-decoration: none;
  transition: 0.18s background, 0.18s border-color, 0.18s transform;
  position: relative;
  overflow: hidden;
}
.exam-mode-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c, var(--accent));
  opacity: 0.7;
}
[dir="rtl"] .exam-mode-card::before { left: auto; right: 0; }
.exam-mode-card:hover:not(.locked) {
  background: var(--ss-bg-raised);
  border-color: color-mix(in srgb, var(--c, var(--accent)) 50%, transparent);
  transform: translateY(-2px);
}
.exam-mode-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.exam-mode-eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ss-muted);
}
.exam-mode-title {
  margin-top: 8px;
  font-size: 24px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ss-fg);
}
.exam-mode-tagline {
  margin-top: 4px;
  font-family: var(--mono); font-size: 12px;
  color: var(--ss-claude-ink);
  letter-spacing: 0.04em;
}
.exam-mode-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ss-fg-soft);
  line-height: 1.45;
}
.exam-mode-cta {
  margin-top: 16px;
  font-family: var(--mono); font-size: 12px;
  color: var(--ss-fg);
  letter-spacing: 0.04em;
}
.exam-mode-card.locked .exam-mode-cta { color: var(--ss-muted); }

/* ============================================================
   Exam header — timer chip + meta wrapper
   ============================================================ */
.exam-head-right {
  display: flex; align-items: center; gap: 14px;
}
.exam-timer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(14, 124, 150, 0.04);
  border: 1px solid var(--ss-border);
}
.exam-timer-label {
  font-family: var(--ss-font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ss-muted);
}
.exam-timer-chip {
  font-family: var(--ss-font-mono); font-size: 16px; font-weight: 600;
  color: var(--ss-fg);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.exam-timer-chip.warn {
  color: var(--ss-bad);
  animation: timer-pulse 1s ease-in-out infinite alternate;
}
@keyframes timer-pulse {
  from { opacity: 0.85; }
  to   { opacity: 1; text-shadow: 0 0 12px rgba(197, 106, 90, 0.45); }
}

/* Pass / fail badge on results screen */
.exam-passfail {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 26px; font-weight: 700; letter-spacing: -0.01em;
}
@keyframes correctFlash {
  0%   { background: var(--ss-good-soft); box-shadow: 0 0 0 3px rgba(60, 115, 85, 0.20); }
  100% { background: var(--ss-bg-card); box-shadow: var(--ss-shadow); }
}
.correct-flash { animation: correctFlash 0.8s ease-out forwards; }

.exam-passfail.pass {
  background: var(--ss-good-soft);
  border: 1px solid var(--ss-good);
  color: var(--ss-good);
}
.exam-passfail.fail {
  background: var(--ss-bad-soft);
  border: 1px solid var(--ss-bad);
  color: var(--ss-bad);
}
.exam-timeup {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ss-bad-soft);
  border: 1px solid var(--ss-bad);
  color: var(--ss-bad);
  font-family: var(--ss-font-mono); font-size: 12px; letter-spacing: 0.05em;
  margin-bottom: 14px;
}

/* Wrong-answers review (collapsible, below results card) */
.wrong-review {
  margin-top: 22px;
  border-top: 1px solid var(--ss-border);
  padding-top: 16px;
}
.wrong-review-summary {
  cursor: pointer;
  font-family: var(--ss-font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ss-muted);
  list-style: none;
  user-select: none;
  padding: 4px 0;
}
.wrong-review-summary::-webkit-details-marker { display: none; }
.wrong-review-summary:hover { color: var(--ss-fg); }
.wrong-review-list {
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 24px;
}
.wrong-review-item {
  padding: 16px;
  border: 1px solid var(--ss-border);
  border-radius: 10px;
  background: var(--ss-bad-soft);
}

/* ============================================================
   Card
   ============================================================ */
.card {
  background:
    linear-gradient(180deg, rgba(14, 124, 150, 0.025), rgba(217, 119, 87, 0.015)),
    var(--ss-bg-card);
  border: 1px solid var(--ss-border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--ss-shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ss-claude), transparent);
  opacity: 0.55;
}
.card + .card { margin-top: 18px; }

/* ============================================================
   Headings & eyebrow pattern (// LABEL IN MONO)
   ============================================================ */
h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ss-fg);
}
h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ss-fg-soft);
}

/* Drop in `<div class="eyebrow">// LABEL</div>` above any h2/h3 for brand consistency */
.eyebrow {
  font-family: var(--ss-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ss-claude-ink);
  margin-bottom: 10px;
  display: inline-block;
}
.eyebrow.cyan   { color: var(--ss-sea); }
.eyebrow.purple { color: var(--ss-sea-deep); }
.eyebrow.muted  { color: var(--ss-muted); letter-spacing: 0.32em; }

.muted { color: var(--ss-muted); }
.gradient-text {
  background: linear-gradient(90deg, var(--ss-sea), var(--ss-claude));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   Tags (domain chips)
   ============================================================ */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(14, 124, 150, 0.04);
  border: 1px solid var(--ss-border);
  font-family: var(--ss-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ss-fg-soft);
}
.tag.d1 { color: var(--ss-claude); border-color: var(--ss-claude-soft); background: rgba(217, 119, 87, 0.08); }
.tag.d2 { color: var(--ss-sea); border-color: var(--ss-sea-wash); background: rgba(14, 124, 150, 0.08); }
.tag.d3 { color: var(--ss-claude-ink); border-color: var(--ss-claude-soft); background: rgba(217, 119, 87, 0.06); }
.tag.d4 { color: var(--ss-sea-bright); border-color: rgba(47, 175, 196, 0.30); background: rgba(14, 124, 150, 0.06); }
.tag.d5 { color: var(--ss-sage); border-color: var(--ss-sage-soft); background: rgba(111, 156, 118, 0.08); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ss-claude);
  color: var(--ss-on-accent);
  border: 0;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--ss-font-body);
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: 0.16s;
  box-shadow: 0 6px 18px rgba(217, 119, 87, 0.25);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 24px rgba(217, 119, 87, 0.35); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  background: transparent;
  color: var(--ss-fg);
  border: 1px solid var(--ss-border-strong);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--ss-bg-card); border-color: var(--ss-sea); }
.btn.good { background: var(--ss-good); color: #fff; box-shadow: 0 6px 18px rgba(60, 115, 85, 0.25); }
.btn.bad  { background: var(--ss-bad);  color: #fff; box-shadow: 0 6px 18px rgba(197, 106, 90, 0.25); }
.btn.small { padding: 7px 12px; font-size: 12px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ============================================================
   Exam surface — header · progress · question · A/B/C/D options ·
                  side question grid · legend
   Mirrors system.jsx TrainerExam (lines 639-728)
   ============================================================ */
.exam-shell { padding: 0; }
.exam-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.exam-progress {
  height: 4px; border-radius: 2px;
  background: rgba(14, 124, 150, 0.10);
  overflow: hidden;
}
.exam-progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--ss-sea), var(--ss-claude));
  transition: width 0.35s ease;
}
.exam-grid {
  margin-top: 36px;
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 32px;
}
@media (max-width: 880px) {
  .exam-grid { grid-template-columns: 1fr; }
}

.exam-scenario {
  font-family: var(--ss-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ss-claude);
  padding: 6px 10px;
  border: 1px solid var(--ss-claude-soft);
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 14px;
}
.exam-question {
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.3;
  color: var(--ss-fg);
}
.exam-options {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 28px;
}
.exam-opt {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px;
  border-radius: 8px;
  background: var(--ss-bg-card);
  border: 1px solid var(--ss-border);
  color: var(--ss-fg);
  text-align: start;
  font: inherit;
  cursor: pointer;
  transition: 0.15s background, 0.15s border-color, 0.15s transform;
}
.exam-opt:hover:not(:disabled) {
  background: var(--ss-bg-raised);
  border-color: var(--ss-border-strong);
}
.exam-opt:disabled { cursor: default; }
.exam-opt.selected {
  background: var(--ss-sea-wash);
  border-color: var(--ss-sea);
}
.exam-opt.selected .exam-opt-chip {
  background: var(--ss-sea); color: var(--ss-on-accent);
}
.exam-opt.correct {
  background: var(--ss-good-soft);
  border-color: var(--ss-good);
}
.exam-opt.correct .exam-opt-chip { background: var(--ss-good); color: #fff; }
.exam-opt.wrong {
  background: var(--ss-bad-soft);
  border-color: var(--ss-bad);
}
.exam-opt.wrong .exam-opt-chip { background: var(--ss-bad); color: #fff; }
.exam-opt-chip {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(14, 124, 150, 0.06);
  color: var(--ss-fg);
  font-family: var(--ss-font-mono);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.exam-opt-text {
  font-size: 15px; line-height: 1.5;
  padding-top: 4px;
}

.exam-actions {
  margin-top: 28px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.exam-shortcut { margin-inline-start: auto; }
.btn.ghost.flagged {
  border-color: var(--ss-claude);
  color: var(--ss-claude);
  background: var(--ss-claude-soft);
}

.exam-side {
  padding: 22px;
  border-radius: 10px;
  background: var(--ss-bg-card);
  border: 1px solid var(--ss-border);
  align-self: start;
}
.qgrid {
  margin-top: 14px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.qgrid-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  font-family: var(--ss-font-mono); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 124, 150, 0.04);
  color: var(--ss-muted);
  border: 1px solid var(--ss-border);
  cursor: pointer;
  transition: 0.12s;
}
.qgrid-cell:hover { background: rgba(14, 124, 150, 0.10); color: var(--ss-fg); }
.qgrid-cell.done {
  background: var(--ss-sea-wash);
  color: var(--ss-sea);
}
.qgrid-cell.cur {
  background: var(--ss-claude);
  color: var(--ss-on-accent); font-weight: 700;
  box-shadow: 0 0 12px rgba(217, 119, 87, 0.4);
}
.qgrid-cell.flag { border-color: var(--ss-claude); }
.qgrid-legend {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--ss-font-mono); font-size: 11px;
  color: var(--ss-muted);
  letter-spacing: 0.04em;
}
.qgrid-legend > div { display: flex; align-items: center; gap: 8px; }
.qgrid-legend .dot { width: 12px; height: 12px; border-radius: 3px; }
.qgrid-legend .dot.done { background: var(--ss-sea); }
.qgrid-legend .dot.cur  { background: var(--ss-claude); }
.qgrid-legend .dot.flag { background: transparent; border: 1px solid var(--ss-claude); }
.qgrid-legend .dot.un   { background: var(--ss-border); }

/* ============================================================
   MCQ options (legacy — used by scenarios + playground)
   ============================================================ */
.options { display: grid; gap: 10px; margin: 16px 0; }
.opt {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--ss-bg-card);
  color: var(--fg);          /* buttons don't inherit page color — without this the option text is invisible on the dark bg until answered */
  font-family: inherit;      /* buttons don't inherit font-family either — keep Inter, not the UA default */
  cursor: pointer;
  transition: 0.14s;
  text-align: start;
  font-size: 15px;
  line-height: 1.5;
}
.opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--ss-claude-soft);
  transform: translateX(2px);
}
[dir="rtl"] .opt:hover:not(:disabled) { transform: translateX(-2px); }
/* Gemini review fold (card UqAxJNfu): once an option is answered the
   buttons are disabled — show the not-allowed cursor and dim them, and
   suppress the hover affordance (handled by :not(:disabled) above). */
.opt:disabled { cursor: not-allowed; opacity: .8; }
.opt.correct {
  border-color: var(--good);
  background: var(--ss-good-soft);
  color: var(--ss-good);
}
.opt.wrong {
  border-color: var(--bad);
  background: var(--ss-bad-soft);
  color: var(--ss-bad);
}
.explain {
  margin-top: 12px;
  padding: 14px 16px;
  border-inline-start: 3px solid var(--ss-sea);
  background: var(--ss-sea-wash);
  border-radius: var(--radius-sm);
  color: var(--ss-fg-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ============================================================
   Code blocks
   ============================================================ */
pre, code {
  font-family: var(--ss-font-mono);
  font-size: 13px;
}
pre {
  background: var(--ss-code-bg);
  color: var(--ss-code-fg);
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid var(--ss-code-border);
  white-space: pre;
  position: relative;
}
.code-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .code-compare { grid-template-columns: 1fr; } }
.code-compare .wrong-side pre { border-color: var(--ss-bad); box-shadow: 0 0 0 1px rgba(197, 106, 90, 0.05) inset; }
.code-compare .right-side pre { border-color: var(--ss-good); box-shadow: 0 0 0 1px rgba(60, 115, 85, 0.05) inset; }

/* ============================================================
   Flash surface — header · stacked card deck · rating row
   Mirrors system.jsx TrainerFlash (lines 739-815)
   ============================================================ */
.flash-shell {
  display: flex; flex-direction: column; align-items: center;
}
.flash-head {
  width: 100%; max-width: 980px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.flash-stack {
  position: relative;
  width: min(780px, 100%);
  height: 440px;
}
.flash-stack-back {
  position: absolute; inset: 0;
  background: var(--bg-soft);
  border: 1px solid var(--ss-border);
  border-radius: 16px;
  pointer-events: none;
}
.flash-stack-back.back-3 { top: 20px; transform: scale(0.96); opacity: 0.55; }
.flash-stack-back.back-2 { top: 10px; transform: scale(0.98); opacity: 0.80; }

.flash-card-3d {
  position: absolute; inset: 0;
  perspective: 1200px;
  cursor: pointer;
}
.flash-3d-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
  transform-style: preserve-3d;
}
.flash-card-3d.flipped .flash-3d-inner { transform: rotateY(180deg); }
[dir="rtl"] .flash-card-3d.flipped .flash-3d-inner { transform: rotateY(-180deg); }

.flash-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--ss-border);
  padding: 40px;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.flash-face-back { transform: rotateY(180deg); }
[dir="rtl"] .flash-face-back { transform: rotateY(-180deg); }

.flash-face-head {
  display: flex; align-items: center; justify-content: space-between;
}
.flash-face-body {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 0;
}
.flash-face-foot {
  display: flex; justify-content: center;
}
.flash-q {
  font-size: 36px; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.25;
  text-align: center;
  max-width: 620px;
  color: var(--ss-fg);
}
.flash-a {
  font-size: 20px; line-height: 1.55;
  color: var(--ss-fg-soft);
  max-width: 640px; text-align: center;
}
@media (max-width: 760px) {
  .flash-q { font-size: 26px; }
  .flash-a { font-size: 17px; }
  .flash-stack { height: 380px; }
  .flash-face { padding: 28px; }
}

.badge-gradient {
  display: inline-flex; align-items: center;
  padding: 5px 10px; border-radius: 4px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  color: #fff;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
}

.flash-ratings {
  margin-top: 32px;
  display: flex; gap: 10px;
  flex-wrap: wrap; justify-content: center;
}
.flash-rate {
  padding: 14px 28px;
  border-radius: 8px;
  background: var(--ss-bg-card);
  border: 1px solid color-mix(in srgb, var(--c, var(--cyan)) 35%, transparent);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 110px;
  color: var(--ss-fg);
  cursor: pointer;
  font: inherit;
  transition: 0.16s background, 0.16s border-color, 0.16s transform;
}
.flash-rate:hover {
  background: var(--ss-bg-raised);
  border-color: var(--c, var(--cyan));
  transform: translateY(-2px);
}
.flash-rate-name {
  font-size: 15px; font-weight: 600;
}
.flash-rate-key {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ss-muted);
  text-transform: uppercase;
}

/* ============================================================
   Progress bar
   ============================================================ */
.progress {
  height: 8px;
  background: var(--ss-bg-soft);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--purple) 50%, var(--cyan) 100%);
  box-shadow: 0 0 12px rgba(91, 200, 224, 0.35);
}

/* ============================================================
   Badges (gamification)
   ============================================================ */
.badges {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) { .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.badge {
  padding: 14px 10px;
  border: 1px solid var(--ss-border);
  background: var(--ss-bg-card);
  border-radius: 10px;
  text-align: center;
  opacity: 0.42;
  transition: 0.2s;
}
.badge.earned {
  opacity: 1;
  border-color: rgba(243, 111, 33, 0.45);
  background: linear-gradient(135deg, rgba(243,111,33,0.16), rgba(91,46,229,0.08));
  box-shadow: 0 6px 22px rgba(243, 111, 33, 0.20);
}
.badge .ico { font-size: 22px; line-height: 1; }
.badge .nm  { font-size: 11px; color: var(--fg-soft); margin-top: 6px; font-weight: 500; line-height: 1.3; }

/* ============================================================
   Slideshow surface
   ============================================================ */
.deck { min-height: 100vh; display: flex; flex-direction: column; }
.slide {
  flex: 1;
  display: none;
  padding: 60px 8vw;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.slide.on { display: flex; }
.slide.title-slide { align-items: center; text-align: center; }
.slide h1.lg {
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 14px;
}
.slide h2.lg {
  font-size: 36px;
  letter-spacing: -0.025em;
  margin-bottom: 30px;
  color: var(--fg-soft);
}
.slide ul { font-size: 21px; line-height: 1.85; }
.slide ul li { margin-bottom: 6px; }
.slide .footer-note { color: var(--muted); font-size: 13px; margin-top: 30px; font-family: var(--mono); }

.deck-nav {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px;
  background: rgba(14, 27, 61, 0.85);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.dot-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-width: 60vw;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: 0.2s;
}
.dot.on {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(243, 111, 33, 0.4);
  transform: scale(1.2);
}

.kbd {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--ss-bg-soft);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  font-family: var(--mono);
  color: var(--fg-soft);
}

.tip {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ss-claude-soft);
  border-inline-start: 3px solid var(--accent);
  color: var(--accent-soft);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   Course-mode helpers (course.html shares this stylesheet)
   ============================================================ */
.week-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.week-tabs button {
  padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--ss-bg-card);
  color: var(--fg-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.15s;
}
.week-tabs button:hover { color: var(--ss-fg); border-color: var(--cyan); }
.week-tabs button.on {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* Authorship strip removed — partner identity now lives in the chrome
   logos. The fixed body::after was floating over content. */

/* ============================================================
   Utility
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 880px) {
  .chrome-tabs { gap: 14px; }
  .chrome-tabs > a,
  .chrome-more-trigger { font-size: 12px; }
  .chrome-path { display: none; }
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 20px; }
  /* DX2 (o4OFAXKM): the nav used to be display:none on mobile — leaving phones
     with no top navigation at all. The header is a 3-child flex row (left brand /
     nav / right controls); on a phone there is no room for all three on one line,
     so the nav was squeezed to width:0. Fix: let the header WRAP, drop the nav
     onto its own full-width second row, and let that row scroll horizontally.
     Only 4 primary tabs + a "More" menu now, so the row barely needs to scroll. */
  .chrome {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 14px;
    row-gap: 4px;
  }
  .chrome-left  { order: 1; }
  .chrome-right { order: 2; }
  .chrome-tabs {
    order: 3;
    flex-basis: 100%;           /* own row, full width */
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;        /* don't clip the dropdown vertically */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;      /* Firefox: hide the scrollbar track */
    min-width: 0;
  }
  .chrome-tabs::-webkit-scrollbar { display: none; }  /* WebKit: hide track */
  .chrome-tabs > a,
  .chrome-more-trigger { padding-top: 10px; padding-bottom: 10px; }
  /* Drop the dropdown as a full-width sheet directly under the header.
     ⚠ iOS WebKit trap: `.chrome` carries `backdrop-filter: blur()`, which makes
     it the CONTAINING BLOCK for `position:fixed` (and absolute) descendants — so
     a `fixed; top:88px` menu was anchored to the (135px, wrapped) header, not the
     viewport, landing mid-header and clipping off the right edge on real iPhones
     (Safari + Chrome). Desktop Blink masked it because the numbers coincided.
     Fix: use plain `absolute` relative to `.chrome` (already the containing block
     in BOTH engines) and pin BOTH inline edges so it spans full width minus a
     10px gutter and can never overflow a narrow screen. */
  .chrome-more { position: static; }
  .chrome-more-menu {
    position: absolute;
    top: calc(100% + 2px);      /* just below the header's bottom edge */
    inset-inline-start: 10px;
    inset-inline-end: 10px;
    min-width: 0;
    max-width: none;            /* both insets set → full-width sheet */
  }
}

/* lBRIlxuE: the More dropdown is portaled to <body> and fixed-positioned when
   opened on a phone (JS initMoreMenu) so no backdrop-filter containing block or
   overflow:auto ancestor can clip it or anchor it off-screen — the iOS WebKit
   trap. JS sets `top` from the live header rect; CSS pins both inline edges to a
   full-width sheet and lifts it above the sticky-header stacking context. */
.chrome-more-menu--portaled {
  position: fixed;
  inset-inline-start: 10px;
  inset-inline-end: 10px;
  min-width: 0;
  max-width: none;
  z-index: 1000;
}
.center { text-align: center; }
.hide { display: none !important; }

/* Hairline divider used between sections */
hr.brand {
  border: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 28px 0;
}

/* ── Compliance: unofficial-study-tool disclaimer ───────────────────── */
.unofficial-chip {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, #2a2f37);
  background: var(--ss-claude-soft);
  color: var(--accent-soft, #f3a72d);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
/* Claude Partner Network member — verified General CPN (2026-05-01). This is an
   approved TEXT disclosure of partner status, NOT a reproduction of Anthropic's
   official partner badge (brand rule: never redraw/recolor the official badge;
   the official SVG is not bundled). Kept understated so it reads as a factual
   link, never as a faux-official badge, and never louder than the compliance-
   critical "unofficial" chip beside it. */
.cpn-chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border, #232830);
  background: transparent;
  color: var(--ss-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}
.cpn-chip:hover { color: var(--ss-fg-soft); border-color: var(--border-strong, #2a2f37); }
/* On a tight bar, keep the compliance-critical "unofficial" chip; drop the
   nice-to-have partner chip rather than risk it crowding the nav. */
@media (max-width: 980px) { .cpn-chip { display: none; } }
.site-disclaimer {
  margin-top: 60px;
  padding: 24px 32px;
  background: var(--bg-card, #15181d);
  border-top: 1px solid var(--border, #232830);
  color: var(--muted, #8a8f97);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.site-disclaimer p { max-width: 880px; margin: 0 auto; }
.site-disclaimer a { color: var(--fg-soft, #c4c7cb); text-decoration: underline; }
.site-disclaimer strong { color: var(--fg-soft, #c4c7cb); }
[dir="rtl"] .site-disclaimer { text-align: center; }

/* ── Vocabulary / glossary ──────────────────────────────────────────── */
.vocab-shell { max-width: 920px; margin: 0 auto; padding: 24px 20px 60px; }
.vocab-head {
  display: flex; align-items: flex-end; gap: 24px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.vocab-head > div:first-child { flex: 1; min-width: 240px; }
.vocab-search {
  flex: 0 0 320px; max-width: 100%;
  padding: 12px 16px; font-size: 14px; font-family: inherit;
  background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px;
}
.vocab-search:focus { outline: none; border-color: var(--accent); }
.vocab-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.vocab-chip {
  background: transparent; color: var(--fg-soft);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.vocab-chip:hover { border-color: var(--accent); color: var(--accent-soft); }
.vocab-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.vocab-chip .tag { margin-inline-end: 4px; }
.vocab-list { display: flex; flex-direction: column; gap: 10px; }
.vocab-row {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
}
.vocab-row-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.vocab-term { font-weight: 700; font-size: 16px; color: var(--fg); }
.vocab-term-alt { color: var(--muted); font-size: 13px; font-weight: 500; }
.vocab-def { color: var(--fg-soft); line-height: 1.6; font-size: 14px; }
@media (max-width: 640px) {
  .vocab-shell { padding: 18px 14px 60px; }
  .vocab-search { flex-basis: 100%; }
}

/* ── Flash: rating hint + skip row ─────────────────────────────────── */
.flash-rate-hint {
  text-align: center;
  margin: 20px 0 8px;
  color: var(--muted, #8a8f97);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.flash-skip-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px;
}
.flash-skip-row .flash-skip { padding: 6px 14px; font-size: 13px; }

/* ── Games ──────────────────────────────────────────────────────────── */
.games-shell { max-width: 880px; margin: 0 auto; padding: 24px 20px 60px; }
.games-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.game-card {
  text-align: start; background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; cursor: pointer; font-family: inherit;
  display: flex; gap: 14px; align-items: flex-start;
  transition: 0.15s;
}
.game-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.game-card-icon { font-size: 28px; line-height: 1; }
.game-card-body { flex: 1; }
.game-card-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; color: var(--fg); }
.game-card-pitch { color: var(--fg-soft); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.game-card-foot { display: flex; justify-content: space-between; align-items: center; }
.game-card-cta { color: var(--accent); font-weight: 700; font-size: 13px; }

/* Hook-or-Prompt round */
.hop-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.hop-stats { display: flex; gap: 24px; font-size: 14px; }
.hop-stats > div > span { display: block; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.hop-stats > div > div { font-size: 18px; font-weight: 700; color: var(--fg); }
.hop-timer-low { color: var(--bad, #FF6B6B); }
.hop-progress {
  height: 6px; background: var(--bg-soft, #1a1d22); border-radius: 999px;
  overflow: hidden; margin-bottom: 24px;
}
.hop-progress span {
  display: block; height: 100%; background: var(--accent); transition: width 0.3s;
}
.hop-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 24px; margin-bottom: 18px;
}
.hop-rule-domain { margin-bottom: 10px; }
.hop-rule { font-size: 20px; line-height: 1.5; font-weight: 500; color: var(--fg); }
.hop-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px;
}
.hop-opt {
  background: var(--bg-card); color: var(--fg); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  transition: 0.14s;
}
.hop-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--ss-claude-soft); }
.hop-opt.correct { border-color: var(--good); background: var(--ss-good-soft); color: var(--ss-good); }
.hop-opt.wrong { border-color: var(--bad); background: var(--ss-bad-soft); color: var(--ss-bad); }
.hop-opt.dim { opacity: 0.4; }
.hop-explain {
  padding: 16px 18px; border-radius: 10px; line-height: 1.6; font-size: 14px;
  background: var(--bg-soft);
}
.hop-explain.correct { border-inline-start: 3px solid var(--good); }
.hop-explain.wrong { border-inline-start: 3px solid var(--bad); }
.hop-next-row { display: flex; justify-content: center; margin-top: 18px; }

/* Game end screen */
.game-end { text-align: center; padding: 36px 24px; }
.game-end-newbest { color: var(--accent); font-weight: 700; margin: 10px 0; }
.game-end-score { font-size: 56px; font-weight: 800; color: var(--accent-soft); margin: 6px 0; }
.game-end-stats {
  display: flex; gap: 32px; justify-content: center; margin: 24px 0;
}
.game-end-stats > div > span { display: block; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.game-end-stats > div > div { font-size: 18px; font-weight: 700; }
.game-end-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Kahoot Host Controller (card 58oDyDmq) ─────────────────────── */
.kh-participant-chip {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--fg);
}
.kh-option-bar {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  overflow: hidden; transition: border-color 0.2s;
}
.kh-option-bar.kh-correct { border-color: var(--good); background: rgba(91, 224, 164, 0.08); }
.kh-option-letter {
  font-weight: 700; font-size: 14px; min-width: 20px;
  color: var(--fg); z-index: 1;
}
.kh-option-text { flex: 1; font-size: 14px; color: var(--fg); z-index: 1; }
.kh-option-count {
  font-family: var(--cca-font-mono); font-size: 14px; font-weight: 700;
  color: var(--accent); z-index: 1;
}
.kh-option-fill {
  /* inset-inline-start (not left): under dir=rtl the tally bar must fill from
     the reading-start edge, and left:0 anchors it to the wrong side. */
  position: absolute; inset-inline-start: 0; top: 0; bottom: 0;
  background: var(--accent); opacity: 0.08;
  transition: width 0.4s ease;
}

.kh-error {
  color: #e5484d;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.28);
}
/* Leading ⚠ glyph via ::before so the icon works whether the element is
   toggled to display:block (khShowError) — margin-inline-end keeps the gap
   RTL-safe under dir=rtl (Hebrew host UI). */
.kh-error::before {
  content: "\26A0";
  margin-inline-end: 8px;
  font-size: 1rem;
}

/* ── Kahoot Participant Join (card 95uc0mYE) ─────────────────────── */
.kj-answer-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 16px 18px; border-radius: 12px;
  background: var(--bg-card); border: 2px solid var(--border);
  color: var(--fg); font-size: 15px; font-weight: 500;
  cursor: pointer; transition: 0.15s; text-align: start;
  font-family: inherit;
}
.kj-answer-btn:hover:not(:disabled) { border-color: var(--accent); transform: scale(1.01); }
.kj-answer-btn:disabled { opacity: 0.6; cursor: not-allowed; }
/* Fallback triplet = brand --accent #F36F21 (base tokens define no --accent-rgb;
   review minor on PR #55 — the old indigo fallback was off-brand). */
.kj-answer-btn.kj-selected { border-color: var(--accent); background: rgba(var(--accent-rgb, 243, 111, 33), 0.1); }
/* Option-letter chip — shared visual with the host tally bars (PR #54 defines
   the same rule; duplicated here so this slice stands alone whichever PR merges
   first — dedupe at the post-merge rebase, rule #18). */
.kh-option-letter {
  font-weight: 700; font-size: 14px; min-width: 20px;
  color: var(--fg); z-index: 1;
}

@media (max-width: 640px) {
  .hop-options { grid-template-columns: 1fr; }
  .hop-stats { gap: 14px; }
}

/* ── Provenance Smackdown ──────────────────────────────────────────── */
.ps-blobs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 18px;
}
.ps-blob {
  text-align: start; background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; gap: 10px;
  transition: 0.14s;
}
.ps-blob:hover:not(:disabled) { border-color: var(--accent); }
.ps-blob.correct { border-color: var(--good); background: rgba(91, 224, 164, 0.10); }
.ps-blob.wrong { border-color: var(--bad); background: rgba(255, 107, 107, 0.10); }
.ps-blob.dim { opacity: 0.4; }
.ps-blob-side {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.ps-blob-value { font-size: 22px; font-weight: 700; color: var(--fg); margin: 4px 0; }
.ps-blob-meta { font-size: 12px; color: var(--fg-soft); line-height: 1.7; }
.ps-blob-meta span { display: inline-block; }
.tier-verified { color: var(--good); font-weight: 700; }
.tier-extracted { color: var(--cyan); font-weight: 700; }
.tier-inferred { color: var(--ss-claude-ink); font-weight: 700; }
.tier-estimated { color: var(--bad); font-weight: 700; }

@media (max-width: 640px) { .ps-blobs { grid-template-columns: 1fr; } }

/* ── Flashstorm ────────────────────────────────────────────────────── */
.fs-snippet {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; margin-bottom: 16px;
  max-height: 240px; overflow: auto;
}
.fs-snippet pre {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.55; color: var(--fg);
  white-space: pre-wrap; word-break: break-word;
}
.fs-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.fs-opt {
  background: var(--bg-card); color: var(--fg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; cursor: pointer; font-family: inherit;
  font-size: 13px; text-align: start; line-height: 1.4;
  transition: 0.12s;
}
.fs-opt:hover { border-color: var(--accent); background: var(--ss-claude-soft); }
.fs-opt.correct { border-color: var(--good); background: var(--ss-good-soft); color: var(--ss-good); }
.fs-opt.wrong { border-color: var(--bad); background: var(--ss-bad-soft); color: var(--ss-bad); }

@media (max-width: 640px) { .fs-options { grid-template-columns: 1fr; } }

/* ── Right or Wrong ────────────────────────────────────────────────── */
.rw-buttons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.rw-btn {
  padding: 28px; font-size: 18px; font-weight: 700; letter-spacing: 0.06em;
  border-radius: 14px; border: 2px solid; cursor: pointer; font-family: inherit;
  transition: 0.12s;
}
.rw-right { color: var(--good); border-color: var(--good); background: rgba(91,224,164,0.06); }
.rw-wrong { color: var(--bad);  border-color: var(--bad);  background: rgba(255,107,107,0.06); }
.rw-right:hover, .rw-wrong:hover { transform: translateY(-2px); }
.rw-btn.correct { background: var(--ss-good-soft); color: var(--ss-good); }
.rw-btn.wrong { background: var(--ss-bad-soft); color: var(--ss-bad); }

/* ── Tier Ladder ───────────────────────────────────────────────────── */
.tl-prompt {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; margin-bottom: 18px;
  font-size: 18px; line-height: 1.5; color: var(--fg);
  min-height: 80px;
}
.tl-tiers, .tp-tools {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.tl-tier, .tp-tool {
  padding: 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-family: inherit; transition: 0.12s;
}
.tl-tier:hover, .tp-tool:hover {
  border-color: var(--accent); background: var(--ss-claude-soft);
}
.tl-tier.tier-verified  { color: var(--good); }
.tl-tier.tier-extracted { color: var(--cyan); }
.tl-tier.tier-inferred  { color: var(--ss-claude-ink); }
.tl-tier.tier-estimated { color: var(--bad); }
.tl-tier.correct, .tp-tool.correct { background: var(--ss-good-soft); border-color: var(--good); color: var(--ss-good); }
.tl-tier.wrong, .tp-tool.wrong { background: var(--ss-bad-soft); border-color: var(--bad); color: var(--ss-bad); }

/* Quiz Blitz game styles */
.qb-question {
  text-align: center; padding: 24px; margin-bottom: 20px;
  font-size: 18px; line-height: 1.6; color: var(--fg);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
}
.qb-options {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .qb-options { grid-template-columns: repeat(2, 1fr); }
}
.qb-option {
  padding: 16px 20px; font-size: 15px; font-weight: 500;
  background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-family: inherit; transition: 0.12s;
  text-align: left; line-height: 1.4;
}
[dir="rtl"] .qb-option { text-align: right; }
.qb-option:hover {
  border-color: var(--accent); background: var(--ss-claude-soft);
}
.qb-option.correct { background: var(--ss-good-soft); border-color: var(--good); color: var(--ss-good); }
.qb-option.wrong { background: var(--ss-bad-soft); border-color: var(--bad); color: var(--ss-bad); }
/* Personal-bests leaderboard on the Quiz Blitz end screen (K3, card 30Bs1hor) */
.qb-leaderboard { margin: 14px 0 4px; }
.qb-leaderboard:empty { display: none; }
.qb-lb-title { margin-bottom: 6px; letter-spacing: 0.04em; }
.qb-lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.qb-lb-list li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.qb-lb-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-lb-score { font-weight: 600; font-variant-numeric: tabular-nums; }
.qb-lb-acc { color: var(--muted); font-size: 12px; }
[dir="rtl"] .qb-lb-list li { direction: rtl; }

/* ============================================================
   Auth — chrome pill + dropdown + modal sheet (card 1jpqYSeg)
   ============================================================ */
.auth-slot { display: inline-flex; align-items: center; gap: 8px; }

.auth-cta {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.user-pill { position: relative; display: inline-flex; align-items: center; }
.user-pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--ss-bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  transition: 0.15s background, 0.15s border-color;
  max-width: 220px;
}
[dir="rtl"] .user-pill-btn { padding: 4px 4px 4px 12px; }
.user-pill-btn:hover { background: var(--ss-bg-raised); border-color: var(--border-strong); }
.user-pill-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  color: var(--on-accent);
  /* Solid accent (not the accent->purple gradient): a single dark ink can't pass AA
     across a gradient — at the midpoint --on-accent is only ~2.88:1. On solid
     --accent it's 6.3:1, matching the other on-accent elements (Gemini HIGH, PR #9). */
  background: var(--accent);
  flex-shrink: 0;
}
.user-pill-name {
  font-size: 13px;
  max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 180px;
  padding: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
}
.user-menu-item {
  appearance: none; -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--fg);
  padding: 9px 12px;
  text-align: start;
  font-family: var(--sans);
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.12s background;
}
.user-menu-item:hover { background: rgba(91, 200, 224, 0.10); }

/* ── modal ─────────────────────────────────────────────────── */
.auth-modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 8, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 32px 28px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  animation: authSheetIn 0.24s ease-out;
}
@keyframes authSheetIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-modal-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  width: 32px; height: 32px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.12s color, 0.12s background;
}
.auth-modal-close:hover { color: var(--fg); background: var(--ss-bg-soft); }
.auth-modal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.auth-modal-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-modal-sub {
  margin: 0 0 18px;
  color: var(--fg-soft);
  font-size: 14px;
  line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--ss-bg-raised);
  color: var(--ss-fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  transition: 0.14s border-color, 0.14s box-shadow;
  min-height: 44px;
}
[dir="rtl"] .auth-field input { text-align: start; }
.auth-field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--ss-ring);
}
.auth-pw-wrap { position: relative; }
.auth-pw-toggle {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  inset-inline-end: 10px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 8px;
  min-height: 32px;
  border-radius: 4px;
  transition: 0.12s color;
}
.auth-pw-toggle:hover { color: var(--cyan); }
.auth-hint {
  font-size: 12px;
  color: var(--muted);
}
.auth-checkbox {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  color: var(--fg-soft);
  cursor: pointer;
  user-select: none;
  line-height: 1.45;
}
.auth-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.auth-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 46px;
  font-size: 14px;
}
.auth-submit:disabled { opacity: 0.6; cursor: wait; }

.auth-error, .auth-success {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.auth-error {
  color: color-mix(in srgb, var(--ss-bad) 55%, var(--ss-fg));
  background: var(--ss-bad-soft);
  border: 1px solid var(--ss-bad);
}
.auth-success {
  color: var(--ss-sage-ink);
  background: var(--ss-good-soft);
  border: 1px solid var(--ss-good);
}

.auth-foot {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.auth-foot-sep { color: var(--ss-border-strong); }
.auth-link {
  appearance: none; -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--cyan);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  min-height: 32px;
  transition: 0.12s color;
}
.auth-link strong { color: var(--fg); margin-inline-start: 4px; }
.auth-link:hover { color: #8BDDF0; }

/* Lock background scroll when the modal is open. */
body.auth-open { overflow: hidden; }

/* Mobile tweaks — 375×667 viewport must render without horizontal scroll. */
@media (max-width: 480px) {
  .auth-modal { padding: 12px; }
  .auth-modal-sheet { padding: 26px 20px 22px; border-radius: 16px; }
  .auth-modal-title { font-size: 20px; }
  .user-pill-name { max-width: 96px; }
  .auth-cta, .auth-login { padding: 6px 10px; font-size: 11px; }
  .chrome-right { gap: 12px; }
}

/* ── Profile modal ──────────────────────────────────────────── */
.profile-sheet { max-width: 480px; }
.profile-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.profile-avatar {
  flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  font-size: 22px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.profile-identity { min-width: 0; }
.profile-name { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.profile-email { font-size: 13px; color: var(--muted); word-break: break-all; }
.profile-xp-section { margin-bottom: 18px; }
.profile-level-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.profile-level {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase;
}
.profile-xp-label {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.profile-xp-bar {
  height: 6px; border-radius: 3px;
  background: var(--ss-bg-soft);
  overflow: hidden; margin-bottom: 5px;
}
.profile-xp-bar > span {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width 0.4s ease;
}
.profile-xp-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.profile-stats-row {
  display: flex; gap: 10px; margin-bottom: 4px;
}
.profile-stat {
  flex: 1; padding: 10px 8px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--ss-bg-card);
  text-align: center;
}
.profile-stat-val { font-size: 20px; font-weight: 700; }
.profile-stat-key {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.profile-section-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin: 18px 0 2px;
}
.profile-badges {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 480px) {
  .profile-stats-row { flex-wrap: wrap; }
  .profile-stat { min-width: calc(50% - 5px); }
  .profile-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* MSApps employee SSO (Zoho OIDC) — auth modal */
.auth-sso-divider{display:flex;align-items:center;gap:.6rem;margin:1rem 0 .75rem;color:var(--muted,#8a8f98);font-size:.8rem;text-transform:uppercase;letter-spacing:.08em}
.auth-sso-divider::before,.auth-sso-divider::after{content:"";flex:1;height:1px;background:currentColor;opacity:.25}
.auth-sso-btn{width:100%;background:transparent;border:1px solid var(--border,#3a3f4b);color:inherit;padding:.7rem 1rem;border-radius:8px;font-weight:600;cursor:pointer;transition:border-color .15s,background .15s}
.auth-sso-btn:hover{border-color:var(--accent,#6c8cff);background:rgba(108,140,255,.08)}
.auth-sso-btn:disabled{opacity:.6;cursor:default}
.auth-sso-note{margin:.5rem 0 0;font-size:.75rem;color:var(--muted,#8a8f98);text-align:center}

/* ============================================================
   DX3 — Diagnosis mode (card lsnnm14X)
   Analyzes practice history, shows per-domain readiness bars,
   and recommends next study actions.
   ============================================================ */
.diag-shell { max-width: 800px; margin: 0 auto; padding: 24px 20px 60px; }
.diag-header { text-align: center; margin-bottom: 24px; }
.diag-header h1 { font-size: 24px; margin: 8px 0 12px; }
.diag-header .muted { font-size: 14px; line-height: 1.5; max-width: 480px; margin: 0 auto; }

.diag-nodata { text-align: center; padding: 48px 24px; }
.diag-nodata-icon { font-size: 48px; margin-bottom: 16px; }
.diag-nodata p { font-size: 15px; color: var(--fg-soft); margin-bottom: 24px; max-width: 360px; margin-left: auto; margin-right: auto; }

.diag-overall { text-align: center; margin-bottom: 24px; padding: 32px 24px; }
.diag-overall-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.diag-overall-score { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.diag-overall-icon { font-size: 36px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--readiness-color) 15%, transparent); color: var(--readiness-color); font-weight: 700; }
.diag-overall-pct { font-size: 42px; font-weight: 700; color: var(--readiness-color); }
.diag-overall-status { font-size: 14px; color: var(--fg-soft); }

.diag-domains { margin-bottom: 24px; }
.diag-section-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.diag-domain-grid { display: flex; flex-direction: column; gap: 16px; }
.diag-domain-item { padding: 16px; background: var(--ss-bg-card); border-radius: 10px; }
.diag-domain-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.diag-domain-id { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); }
.diag-domain-name { flex: 1; font-size: 14px; font-weight: 600; }
.diag-domain-weight { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.diag-domain-bar { height: 8px; border-radius: 4px; background: var(--ss-bg-soft); overflow: hidden; margin-bottom: 8px; }
.diag-domain-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.diag-domain-stats { display: flex; justify-content: space-between; font-size: 12px; }
.diag-domain-stats .muted { color: var(--muted); }

.diag-recs { }
.diag-rec-list { display: flex; flex-direction: column; gap: 8px; }
.diag-rec-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ss-bg-card); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--fg); transition: 0.15s; }
.diag-rec-item:hover { border-color: var(--accent); background: var(--ss-claude-soft); }
.diag-rec-num { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); width: 20px; text-align: center; }
.diag-rec-text { flex: 1; font-size: 14px; }
.diag-rec-arrow { color: var(--muted); font-size: 14px; }

[dir="rtl"] .diag-rec-arrow { transform: scaleX(-1); }

@media (max-width: 640px) {
  .diag-shell { padding: 18px 14px 60px; }
  .diag-header h1 { font-size: 20px; }
  .diag-overall-pct { font-size: 36px; }
  .diag-domain-header { flex-wrap: wrap; }
}

/* ── Certification track selector + teaser (multi-track slice 2, card Gpyz9XFa) ── */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.track-card {
  display: block;
  padding: 18px;
  border-radius: 10px;
  background: var(--ss-bg-card);
  border: 1px solid var(--ss-border);
  color: var(--ss-fg);
  text-align: start;
  cursor: pointer;
  font: inherit;
  transition: 0.18s background, 0.18s border-color, 0.18s transform;
}
.track-card:hover {
  background: var(--ss-bg-soft);
  border-color: color-mix(in srgb, var(--purple) 50%, transparent);
  transform: translateY(-2px);
}
.track-card.on {
  border-color: var(--purple);
  background: color-mix(in srgb, var(--purple) 14%, transparent);
}
.track-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.track-code {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.track-chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--ss-border-strong);
  white-space: nowrap;
}
.track-chip.live    { color: var(--ss-good); border-color: color-mix(in srgb, var(--ss-good) 55%, transparent); }
.track-chip.pending { color: var(--ss-claude-ink); border-color: color-mix(in srgb, var(--ss-claude-ink) 55%, transparent); }
.track-chip.soon    { color: var(--ss-muted); }
.track-name { font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.track-meta { font-size: 12.5px; }
.track-teaser-title { font-size: 26px; line-height: 1.25; margin: 6px 0 8px; }
.track-facts { margin-top: 12px; font-size: 12.5px; }

/* MT-5 (card 1kXK8NYA): per-track exam-logistics panel. Logical properties only
   so the grid mirrors correctly under [dir=rtl] (Hebrew). */
.track-logistics {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ss-border);
}
.track-logistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 18px;
  margin: 10px 0 0;
}
.tl-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--ss-border);
}
.tl-row dt { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.tl-row dd { margin: 0; font-size: 13px; font-weight: 600; text-align: end; }

/* ── Paywall UI (S2, card ZOs1WM5i — pricing epic VE5wPRL4) ─────────────
   PRO chip on the locked real-mock tile + the upsell modal. The modal is a
   position:fixed overlay so opening it causes zero layout shift (cz2qFRaW
   CLS discipline); the inline Pro-lock card reuses .card dimensions. */
.pro-chip {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  border-radius: 999px;
  color: var(--bg, #0b0b10);
  background: linear-gradient(90deg, var(--accent), var(--purple));
  vertical-align: middle;
}
.upsell-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 8, 14, 0.72);
  backdrop-filter: blur(3px);
}
.upsell-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 28px 26px 24px;
  border: 1px solid var(--line, var(--ss-border));
  border-radius: 14px;
  background: var(--card, var(--ss-bg, #101018));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.upsell-title { margin: 6px 0 8px; font-size: 26px; line-height: 1.2; }
.upsell-benefits { margin-top: 14px; }
.upsell-benefits-title { font-weight: 600; margin-bottom: 6px; }
.upsell-benefits ul { margin: 0; padding-inline-start: 20px; }
.upsell-benefits li { margin: 5px 0; line-height: 1.45; }
.upsell-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.upsell-note { margin-top: 12px; font-size: 12.5px; min-height: 1em; }
.upsell-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.6;
  font-size: 16px;
  cursor: pointer;
}
.upsell-close:hover { opacity: 1; }
