/* ============================================================
   UDAAN — design system (single source of style)
   Light, professional, enterprise-grade. Edit the :root tokens
   and the whole product re-themes. Nothing else carries colour.
   ============================================================ */
:root {
  /* surfaces */
  --bg:        #F4F5F8;
  --surface:   #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-3: #EDEFF3;
  --line:      #E5E7EC;
  --line-2:    #D8DCE3;

  /* ink */
  --ink:       #161A23;
  --ink-soft:  #5A6273;
  --ink-faint: #9298A6;

  /* brand */
  --primary:      #4F46E5;
  --primary-2:    #6D5BF2;
  --primary-deep: #3B33C9;
  --primary-soft: #ECECFE;
  --accent:       #0EA5E9;
  --accent-soft:  #E3F4FC;

  /* status */
  --ok:   #15924C;  --ok-soft:   #E5F5EB;
  --warn: #B5740C;  --warn-soft: #FBF0DD;
  --err:  #D63C44;  --err-soft:  #FCE9EA;
  --info: #4F46E5;  --info-soft: #ECECFE;

  /* shape + motion */
  --r-xs: 7px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow:    0 4px 18px -6px rgba(16,24,40,.12), 0 1px 3px rgba(16,24,40,.05);
  --shadow-lg: 0 22px 48px -16px rgba(16,24,40,.22);
  --ring: 0 0 0 3px rgba(79,70,229,.18);
  --ease: cubic-bezier(.22,.61,.36,1);

  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font:    'Inter', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'Courier New', monospace;

  --maxw: 1180px;
  --appbar-h: 60px;

  /* foundations stars — warm gold for an earned star, cool grey for unearned */
  --star-gold:   #E8A317;
  --star-glow:   #F6C752;
  --star-deep:   #B5740C;
  --star-dim:    #D2D6DE;
  --star-soft:   #FBF1D8;

  /* onboarding palette — the learner's first impression. Calm,
     trustworthy depth (a deep ink-blue) carries stability; warm
     optimistic accents (amber / coral / a hopeful green) carry energy
     and momentum. Scoped to the welcome only, so the wider product
     theme is untouched. Red is never used here — a beginner makes no
     "errors" on a welcome screen. */
  --onb-trust:      #1E3A8A;   /* deep, dependable blue — anchors the screen */
  --onb-trust-2:    #2747A6;
  --onb-warm:       #F59E0B;   /* amber — hope, momentum, the prize         */
  --onb-warm-deep:  #C2740A;
  --onb-coral:      #FB7185;   /* soft coral — human warmth, never alarm    */
  --onb-grow:       #0F9D58;   /* growth green — "you are getting there"    */
  --onb-grow-soft:  #E4F4EC;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button { font-family: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-faint); font-weight: 600; }

/* ---------- LAYOUT ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.view { padding: 30px 0 64px; }
.row { display: flex; gap: 14px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }

/* ---------- APP BAR (enterprise nav) ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50; height: var(--appbar-h);
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px;
}
.nav { display: flex; gap: 2px; margin-left: 18px; }
.nav-item {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px;
  color: var(--ink-soft); transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-deep); }
.nav-item .ic { font-size: 15px; }
.appbar-right { display: flex; align-items: center; gap: 8px; }
.pill-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft);
}
.pill-chip.streak { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.pill-chip.xp     { color: var(--primary-deep); background: var(--primary-soft); border-color: transparent; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.ai-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

/* ---------- BREADCRUMBS ---------- */
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-faint); font-weight: 600; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { opacity: .6; }
.crumbs .here { color: var(--ink-soft); }

/* ---------- HEADINGS ---------- */
.page-title { font-family: var(--display); font-size: clamp(23px,3vw,30px); font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--ink-soft); font-size: 14.5px; margin-top: 3px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-title { font-family: var(--display); font-size: clamp(20px,2.4vw,26px); font-weight: 700; letter-spacing: -.015em; }
.section-sub { color: var(--ink-soft); font-size: 14.5px; margin-top: 3px; margin-bottom: 18px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm);
  font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .16s, background .16s, border-color .16s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(79,70,229,.55); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(.95); }
.btn-soft { background: var(--primary-soft); color: var(--primary-deep); }
.btn-soft:hover { background: #E0E0FD; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-deep); }
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: var(--r-md); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- CARDS ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .16s var(--ease), box-shadow .18s, border-color .16s; cursor: pointer; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

/* ---------- HERO ---------- */
.hero { padding: 56px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 13px; border-radius: 999px; background: var(--primary-soft);
  color: var(--primary-deep); font-size: 13px; font-weight: 700;
}
.hero h1 { font-family: var(--display); font-size: clamp(32px,4.6vw,52px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; }
.hero h1 .grad { background: linear-gradient(100deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(15px,1.6vw,18px); color: var(--ink-soft); margin: 16px 0 26px; max-width: 540px; }
.hero-art {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 20px; overflow: hidden;
}

/* ---------- STAT GRID ---------- */
.statgrid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.stat-num { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--primary-deep); letter-spacing: -.01em; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; margin-top: 1px; }

/* ---------- FEATURE GRID ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.feature { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.feature-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-deep); display: grid; place-items: center; font-size: 19px; }
.feature-t { font-weight: 700; font-size: 15.5px; margin: 13px 0 5px; }
.feature-d { color: var(--ink-soft); font-size: 13.5px; }

/* ---------- JOURNEY MAP ---------- */
.stage { margin-bottom: 30px; }
.stage-head { display: flex; align-items: center; gap: 13px; margin-bottom: 6px; }
.stage-badge { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: #fff; flex-shrink: 0; }
.stage-badge.a { background: linear-gradient(135deg,#0EA5E9,#4F46E5); }
.stage-badge.b { background: linear-gradient(135deg,#4F46E5,#7C3AED); }
.stage-badge.c { background: linear-gradient(135deg,#7C3AED,#DB2777); }
.stage-head h3 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.stage-head .meta { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.stage-line { color: var(--ink-soft); font-size: 14px; margin: 4px 0 14px; }

.block-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.block { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 17px; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .16s, border-color .15s; cursor: pointer; }
.block:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.block-tag { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .06em; }
.block-name { font-weight: 700; font-size: 15.5px; margin: 5px 0 4px; line-height: 1.3; overflow-wrap: anywhere; }
.block-meta { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 12px; }
.progress { height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: auto; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg,var(--primary),var(--accent)); border-radius: 999px; transition: width .5s var(--ease); }

/* ---------- RUNGS ---------- */
.rungs { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 14px 0; }
.rung { text-align: center; padding: 12px 6px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.rung .ri { font-size: 20px; }
.rung .rn { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-top: 3px; }

/* ---------- PROBLEM LIST ---------- */
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; transition: border-color .14s, transform .14s var(--ease), box-shadow .14s;
}
.pitem:hover { border-color: var(--primary); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.pitem-no { width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; background: var(--surface-3); color: var(--ink-soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pitem.done .pitem-no { background: var(--ok); color: #fff; }
.pitem-body { flex: 1; min-width: 0; }
.pitem-title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.pitem-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.pitem-go { color: var(--ink-faint); font-size: 18px; }

/* ---------- TAGS & BADGES ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tag.exam  { background: var(--accent-soft); color: #0B6F95; }
.tag.ai    { background: #F3E8FF; color: #7C3AED; }
.tag.rung  { background: var(--surface-3); color: var(--ink-soft); }
.tag.score { background: var(--warn-soft); color: var(--warn); }
.tag.diff  { background: var(--surface-3); color: var(--ink-soft); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge.pass { background: var(--ok-soft); color: var(--ok); }
.badge.fail { background: var(--err-soft); color: var(--err); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.neutral { background: var(--surface-3); color: var(--ink-soft); }

/* ---------- TABS ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 10px 16px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--ink-faint); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .14s, border-color .14s; }
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--primary-deep); border-bottom-color: var(--primary); }

/* ---------- CODE / EDITOR ---------- */
.editor {
  width: 100%; min-height: 230px; resize: vertical;
  background: #FBFCFE; border: 1px solid var(--line-2); border-radius: var(--r-md);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #1E2230; padding: 15px;
  tab-size: 4;
}
.editor:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* ---------- MONACO · the VS Code-grade code editor ---------- */
.monaco-host {
  width: 100%; height: 440px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  overflow: hidden; background: #1E1E1E; box-shadow: var(--shadow-sm);
}
.monaco-host-sm { height: 260px; }
.monaco-host:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.monaco-host .monaco-editor,
.monaco-host .monaco-editor .overflow-guard { border-radius: var(--r-md); }
pre.code { background: #F7F8FC; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.65; color: #2A2F3D; margin: 12px 0; }
code.inline { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: .88em; color: var(--primary-deep); }

/* ---------- RESULT PANEL ---------- */
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.metrics { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; min-width: 92px; }
.metric .mv { font-family: var(--display); font-size: 19px; font-weight: 700; }
.metric .ml { font-size: 10.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; margin-top: 1px; }
.metric.ok .mv { color: var(--ok); } .metric.bad .mv { color: var(--err); } .metric.brand .mv { color: var(--primary-deep); }
.result-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.tcase { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tcase:last-child { border-bottom: 0; }
.tcase-name { font-weight: 700; font-size: 13px; min-width: 80px; }
.tcase-vis { font-size: 12px; color: var(--ink-faint); }
.tcase-detail { background: #F7F8FC; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; margin: 0 16px 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; color: var(--ink-soft); overflow-x: auto; }
.coach-box { padding: 16px; }
.coach-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.coach-avatar { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: #fff; display: grid; place-items: center; font-size: 16px; }
.coach-body { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; }
.coach-body strong { color: var(--ink); }
.coach-body p { margin: 8px 0; color: var(--ink-soft); }
.coach-body p:first-child { margin-top: 0; }
.coach-tag { font-size: 11px; font-weight: 700; color: var(--ink-faint); }

/* analysis bars */
.abar { display: flex; align-items: center; gap: 12px; margin: 9px 0; }
.abar .al { font-size: 13px; font-weight: 600; min-width: 150px; color: var(--ink-soft); }
.abar .at { flex: 1; height: 9px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.abar .at > i { display: block; height: 100%; background: linear-gradient(90deg,var(--primary),var(--accent)); border-radius: 999px; }
.abar .av { font-size: 12.5px; font-weight: 700; min-width: 54px; text-align: right; }

/* ---------- ANALYSIS / CHARTS ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.chart-card.full { grid-column: 1 / -1; }
.chart-title { font-family: var(--display); font-weight: 700; font-size: 16px; margin-bottom: 3px; }
.chart-sub { font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sw-list { display: flex; flex-direction: column; gap: 8px; }
.sw-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.sw-row .swi { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.sw-row.good .swi { background: var(--ok-soft); } .sw-row.bad .swi { background: var(--err-soft); }
.sw-row .swt { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------- FORMS ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.input, .select, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--ink); font-family: var(--font); font-size: 14px; padding: 10px 12px;
}
.textarea { font-family: var(--mono); font-size: 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* ---------- TABLES ---------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.table-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; transition: background .12s; }
.table tbody tr.click:hover { background: var(--surface-2); }
.t-main { font-weight: 600; color: var(--ink); }
.t-soft { color: var(--ink-soft); }

/* ---------- AVATAR / CHIPS ---------- */
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; vertical-align: middle; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.chip button { background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; }
.chip button:hover { color: var(--err); }

/* ---------- NOTES / CALLOUTS ---------- */
.note { border-radius: var(--r-md); padding: 14px 16px; margin: 14px 0; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.note .nt { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.note.tip   { background: var(--ok-soft);   border-color: #C9E9D4; } .note.tip .nt   { color: var(--ok); }
.note.warn  { background: var(--warn-soft); border-color: #EFD9AE; } .note.warn .nt  { color: var(--warn); }
.note.ai    { background: #F3E8FF;          border-color: #E2CDFB; } .note.ai .nt    { color: #7C3AED; }
.note.story { background: var(--primary-soft); border-color: #D9D9FB; } .note.story .nt { color: var(--primary-deep); }
.note.exam  { background: var(--accent-soft); border-color: #C7E8F5; } .note.exam .nt { color: #0B6F95; }
.note p { color: var(--ink-soft); margin: 6px 0 0; }

/* ---------- ARTICLE ---------- */
.article { max-width: 760px; }
.article h1 { font-family: var(--display); font-size: clamp(26px,3.6vw,36px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.article h2 { font-family: var(--display); font-size: 22px; font-weight: 700; margin: 30px 0 10px; letter-spacing: -.01em; }
.article h3 { font-size: 17px; font-weight: 700; margin: 22px 0 7px; }
.article p { color: var(--ink-soft); margin-bottom: 13px; }
.article ul, .article ol { color: var(--ink-soft); margin: 0 0 13px 22px; }
.article li { margin-bottom: 6px; }
.article strong { color: var(--ink); }
.read-time { color: var(--ink-faint); font-weight: 600; font-size: 13px; }

/* ---------- EMPTY STATE ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--ink-faint); }
.empty .ei { font-size: 32px; margin-bottom: 6px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(140px);
  background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 12px 20px;
  font-weight: 700; font-size: 14px; z-index: 100; box-shadow: var(--shadow-lg);
  transition: transform .38s var(--ease);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 26px 0; color: var(--ink-faint); font-size: 13px; }

/* ---------- MOTIVATION BANNER ---------- */
.banner {
  background: linear-gradient(120deg,#4F46E5,#6D5BF2 55%,#0EA5E9); color:#fff;
  border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 16px;
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow);
}
.banner-lvl { width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.16);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; flex-shrink: 0; }
.banner-lvl .bl-n { font-size: 22px; line-height: 1; } .banner-lvl .bl-l { font-size: 9px; opacity: .85; letter-spacing: .08em; }
.banner-main { flex: 1; min-width: 220px; }
.banner-title { font-family: var(--display); font-weight: 700; font-size: 20px; }
.banner-sub { font-size: 13px; opacity: .92; margin: 2px 0 10px; }
.banner-bar { height: 8px; background: rgba(255,255,255,.22); border-radius: 999px; overflow: hidden; max-width: 360px; }
.banner-bar > i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.banner-msg { font-size: 14px; font-weight: 600; max-width: 280px; opacity: .96; }

/* ---------- MINI-QUEST (a quest within a quest) ---------- */
.miniquest {
  border: 1.5px solid var(--primary); border-left-width: 5px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--primary-soft), var(--surface) 70%);
  padding: 16px 18px; margin-top: 14px;
}
.mq-badge { display: inline-block; background: var(--primary); color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 6px; }
.mq-title { font-family: var(--display); font-weight: 700; font-size: 16.5px; margin: 9px 0 3px; }
.mq-intro { color: var(--ink-soft); font-size: 13.5px; }
.mq-task { font-size: 14px; margin: 11px 0; }
.mq-why { font-size: 12.5px; color: var(--primary-deep); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; margin-top: 12px; }

/* ---------- CONFIDENCE CALIBRATION (staged, compact) ---------- */
.calib {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.calib-q { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.calib-opt {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-soft);
  cursor: pointer; transition: background .14s, border-color .14s, color .14s;
}
.calib-opt:hover { border-color: var(--primary); color: var(--primary-deep); }
.calib-opt.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-deep); }

/* ---------- REFLECTION CARD ---------- */
.reflect {
  border: 1px solid #C9E9D4; background: var(--ok-soft);
  border-radius: var(--r-md); padding: 14px 16px; margin-top: 14px;
}
.reflect-q { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.reflect-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.reflect-opt {
  padding: 8px 13px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  cursor: pointer; transition: border-color .14s, transform .12s var(--ease);
}
.reflect-opt:hover { border-color: var(--ok); transform: translateY(-1px); }
.reflect-done { font-weight: 700; font-size: 14px; color: var(--ok); }

/* ---------- COACH GUARDRAIL ---------- */
.coach-verify { font-size: 12px; color: var(--ink-faint); margin-top: 8px; }
.coach-flag {
  background: none; border: 0; cursor: pointer; padding: 0;
  font-size: 12px; font-weight: 700; color: var(--ink-faint);
  text-decoration: underline; margin-top: 6px;
}
.coach-flag:hover { color: var(--err); }

/* ---------- ACTION PLAN ---------- */
.action-item { display: flex; gap: 13px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 10px; }
.action-item:last-child { margin-bottom: 0; }
.action-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft);
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.action-t { font-weight: 700; font-size: 14.5px; }
.action-d { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }

/* ---------- MISC ---------- */
.spin { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--primary); border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }
.reveal { opacity: 0; transform: translateY(14px); animation: rise .55s var(--ease) forwards; }
.reveal:nth-child(2){animation-delay:.05s} .reveal:nth-child(3){animation-delay:.1s}
.reveal:nth-child(4){animation-delay:.15s} .reveal:nth-child(5){animation-delay:.2s}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { display: none; }
  .feature-grid, .block-grid { grid-template-columns: repeat(2,1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .appbar { padding: 0 14px; }
  .nav { margin-left: 6px; }
  .nav-item { padding: 8px 9px; }
  .nav-item .lbl { display: none; }
  .feature-grid, .block-grid { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: repeat(2,1fr); }
  .hide-sm { display: none; }
  .hero { padding: 32px 0 20px; }
}

/* ============================================================
   R2 · ADAPTIVE CORE — readiness-gated feedback surfaces.
   The result panel re-shapes itself per learner: calm for
   beginners and strugglers, robust for those who have earned it.
   ============================================================ */

/* calm private-test summary — shown instead of an edge-case wall */
.priv-calm {
  margin: 12px 16px 4px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: 13px; color: var(--ink-soft); line-height: 1.55;
}

/* gentle encouragement — calm and safety modes */
.encourage {
  padding: 14px 16px; background: var(--ok-soft); border: 1px solid #CBE9D5;
  border-radius: var(--r-md); font-size: 14px; color: #0F6B39; line-height: 1.6; font-weight: 600;
}

/* safety card — leads the panel when a learner is genuinely stuck */
.safety {
  padding: 16px; margin-bottom: 14px;
  background: var(--info-soft); border: 1px solid #D6D4FB; border-radius: var(--r-md);
}
.safety-h { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--primary-deep); margin-bottom: 6px; }
.safety p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* growth offer — surfaced when only the hidden edge cases failed */
.growth {
  padding: 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: var(--r-md);
}
.growth-h { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.growth p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 12px; }

/* test heatmap — a visual map of every test at a glance (robust mode) */
.heat-wrap { margin: 4px 16px 16px; }
.heat-label { font-size: 12px; font-weight: 700; color: var(--ink-faint); margin-bottom: 7px; }
.heat { display: flex; flex-wrap: wrap; gap: 6px; }
.heat-cell {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; cursor: default;
}
.heat-cell.hpass { background: var(--ok); }
.heat-cell.hfail { background: var(--err); }
.heat-cell.herr  { background: var(--warn); }
.heat-cell.hhidden { box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }

/* concrete expected-vs-got diff — robust mode, failed public test */
.diff { display: flex; flex-direction: column; gap: 7px; }
.diff-row {
  display: flex; align-items: stretch; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden;
}
.diff-tag {
  flex-shrink: 0; width: 84px; padding: 8px 10px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); background: rgba(16,24,40,.03);
}
.diff-row pre { flex: 1; margin: 0; padding: 8px 10px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.diff-exp { background: var(--ok-soft); border-color: #CBE9D5; }
.diff-got { background: var(--err-soft); border-color: #F2CDCF; }
.diff-hint { font-size: 12px; color: var(--ink-soft); font-style: italic; }

/* edge-case coverage donut — robust mode */
.cov { margin-top: 14px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.cov-note { font-size: 12px; color: var(--ink-soft); line-height: 1.55; margin-top: 6px; text-align: center; }

/* readiness card — faculty insights */
.rd-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 12px; }
.rd-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; text-align: center; }
.rd-v { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); }
.rd-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-top: 3px; }
@media (max-width: 620px) { .rd-grid { grid-template-columns: 1fr; } }

/* ============================================================
   R3 · RESILIENCE & REACH — accessibility (WCAG 2.2 AA).
   Keyboard, screen-reader and reduced-motion support.
   ============================================================ */

/* skip link — the first focusable element, hidden until focused */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  padding: 10px 16px; background: var(--primary); color: #fff;
  border-radius: var(--r-sm); font-weight: 700; font-size: 14px;
  text-decoration: none; transform: translateY(-150%);
  transition: transform .15s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* present to assistive tech, invisible on screen */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* a clear, consistent focus ring for keyboard users everywhere */
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, [role="link"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
/* <main> is focused on every route change as a screen-reader landing
   point — it is not interactive, so it carries no visible ring */
main:focus, main:focus-visible { outline: none; }

/* card and table-row navigations driven by data-href */
[data-href] { cursor: pointer; }

/* honour a reduced-motion preference across the whole product */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* language switcher — R3 · Vernacular */
.lang-sel {
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--ink-soft); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px; cursor: pointer;
}
.lang-sel:hover { border-color: var(--line-2); color: var(--ink); }

/* offline chip — R3 · §1 Offline resilience */
.pill-chip.offline { color: var(--warn); background: var(--warn-soft); border-color: transparent; }

/* ============================================================
   Coding language — picker, chips, per-language analysis
   ============================================================ */
.codebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 18px 0 4px;
}
.codebar-h { font-size: 14px; margin: 0; }
.langpick {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--surface-3); border-radius: 999px;
}
.langopt {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft); background: transparent;
  padding: 7px 14px; border-radius: 999px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.langopt:hover:not(:disabled):not(.on) { color: var(--ink); }
.langopt.on {
  background: var(--surface); color: var(--primary-deep);
  box-shadow: var(--shadow-sm); font-weight: 700;
}
.langopt:disabled { opacity: .4; cursor: not-allowed; }
.langopt:focus-visible { outline: none; box-shadow: var(--ring); }
.codebar-hint { font-size: 12px; color: var(--ink-faint); margin: 0 0 8px; }

/* per-language chip — one accent per language, used in tables + cards */
.lang-chip {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.lang-python { background: #E3F4FC; color: #0B6F95; }
.lang-c      { background: #EAEEF6; color: #3A4A63; }
.lang-cpp    { background: #ECE9FE; color: #4A3CC0; }
.lang-java   { background: #FBEEDD; color: #9A5B07; }

/* per-language analysis cards */
.lang-grid {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.lang-card {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); padding: 14px;
}
.lang-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lang-ac { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.lang-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; margin: 12px 0 10px;
}
.lang-stats > div { text-align: center; }
.lang-stats b { display: block; font-size: 16px; color: var(--ink); }
.lang-stats b small { font-size: 10px; color: var(--ink-faint); font-weight: 600; }
.lang-stats span { font-size: 10px; color: var(--ink-faint); }
.lang-tip {
  margin-top: 10px; font-size: 11.5px; color: var(--ink-soft);
  line-height: 1.5; border-top: 1px solid var(--line); padding-top: 8px;
}

/* ============================================================
   multicode — one example, four languages, behind tabs
   (article reference material; tabs sync with the editor)
   ============================================================ */
.multicode { margin: 16px 0; }
.mc-title {
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 6px; letter-spacing: .01em;
}
.mc-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface-3); border-radius: var(--r-sm) var(--r-sm) 0 0;
  border: 1px solid var(--line); border-bottom: 0; width: fit-content;
}
.mc-tab {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: transparent; padding: 6px 14px; border-radius: var(--r-xs);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.mc-tab:hover:not(:disabled):not(.on) { color: var(--ink); }
.mc-tab.on {
  background: #1E1E1E; color: #fff; font-weight: 700; box-shadow: var(--shadow-sm);
}
.mc-tab:disabled { opacity: .35; cursor: not-allowed; }
.mc-tab:focus-visible { outline: none; box-shadow: var(--ring); }
/* each pane is a live playground: an editable code surface, a run bar,
   and an inline output block — read, tinker, run, see, all in the lesson */
.mc-pane { margin: 0; }
.mc-code {
  display: block; width: 100%; box-sizing: border-box;
  background: #1E1E1E; color: #D4D4D4; border: 0; margin: 0;
  border-radius: 0 var(--r-md) 0 0;
  padding: 14px 16px; min-height: 44px; overflow: hidden;
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  resize: vertical; outline: none; tab-size: 4;
}
.mc-code:focus { box-shadow: inset 3px 0 0 var(--primary-2); }
.mc-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #252526; padding: 8px 10px;
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.mc-run {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 700; color: #fff;
  background: var(--ok); padding: 6px 13px; border-radius: var(--r-xs);
}
.mc-run:hover:not(:disabled) { filter: brightness(1.08); }
.mc-run:disabled { opacity: .6; cursor: default; }
.mc-reset {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  color: #C6C6C6; background: transparent; border: 1px solid #3A3A3A;
  padding: 5px 11px; border-radius: var(--r-xs);
}
.mc-reset:hover { color: #fff; border-color: #5A5A5A; }
.mc-stdin {
  flex: 1; min-width: 150px; font: inherit; font-size: 12px;
  font-family: var(--mono);
  background: #1E1E1E; color: #D4D4D4; border: 1px solid #3A3A3A;
  border-radius: var(--r-xs); padding: 6px 9px; outline: none;
}
.mc-stdin:focus { border-color: var(--primary-2); }
.mc-run:focus-visible, .mc-reset:focus-visible { outline: none; box-shadow: var(--ring); }
.mc-hint { font-size: 11px; color: #8A8A8A; }
.mc-out {
  margin: 8px 0 0; white-space: pre-wrap; word-break: break-word;
  background: #F7F8FC; border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--r-sm); padding: 10px 13px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #2A2F3D;
}
.mc-out.mc-err {
  border-left-color: var(--err); background: var(--err-soft); color: #7A1E22;
}

/* effort-earned article block — a perk, so it should feel like one */
.note.note-earned {
  position: relative;
  background: linear-gradient(180deg, #FBF7FF, var(--surface));
  border-color: #D9C9F5;
}
.earned-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: #7C3AED;
  background: #F3E8FF; border-radius: 999px;
  padding: 3px 9px; margin-bottom: 8px;
}

/* ============================================================
   MULTI-TENANT · LEADERBOARD
   A competitive surface — podium, streak flames, climbing
   deltas, "you are #N" — that still renders from one API call.
   ============================================================ */

/* the window toggle (all-time / this week) */
.lb-toggle {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--surface-3); border-radius: 999px;
}
.lb-toggle button {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  background: transparent; padding: 8px 16px; border-radius: 999px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.lb-toggle button:hover:not(.on) { color: var(--ink); }
.lb-toggle button.on {
  background: var(--surface); color: var(--primary-deep);
  box-shadow: var(--shadow-sm);
}
.lb-toggle button:focus-visible { outline: none; box-shadow: var(--ring); }

/* the podium — top three, raised and celebratory */
.podium {
  display: grid; grid-template-columns: 1fr 1.15fr 1fr;
  gap: 12px; align-items: end; margin: 4px 0 22px;
}
.pod {
  position: relative; text-align: center; border-radius: var(--r-lg);
  padding: 18px 12px 16px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.pod-1 {
  background: linear-gradient(180deg, #FFF7E0, var(--surface) 78%);
  border-color: #F0DDA6; padding-top: 28px; padding-bottom: 24px;
  box-shadow: 0 14px 34px -14px rgba(181,116,12,.4);
}
.pod-2 { background: linear-gradient(180deg, #F2F4F8, var(--surface) 78%); border-color: var(--line-2); }
.pod-3 { background: linear-gradient(180deg, #FBEEE2, var(--surface) 78%); border-color: #ECCFB4; }
.pod-crown { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.pod-medal {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff; box-shadow: var(--shadow-sm);
}
.pod-medal.m1 { background: linear-gradient(135deg,#F5B731,#E08C0B); }
.pod-medal.m2 { background: linear-gradient(135deg,#C2C9D4,#8C95A4); }
.pod-medal.m3 { background: linear-gradient(135deg,#DDA06A,#B5740C); }
.pod-av {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 9px;
  display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff;
  background: linear-gradient(135deg,var(--primary),var(--primary-2));
}
.pod-1 .pod-av { width: 66px; height: 66px; font-size: 22px;
  background: linear-gradient(135deg,#F5B731,#E08C0B); }
.pod-name { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.pod-xp { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--primary-deep); margin-top: 3px; }
.pod-1 .pod-xp { font-size: 24px; }
.pod-meta { font-size: 11.5px; color: var(--ink-faint); font-weight: 600; margin-top: 2px; }

/* the ranked rows below the podium */
.lb-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: 0; }
.lb-row.me {
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}
.lb-rank {
  width: 38px; flex-shrink: 0; text-align: center;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink-soft);
}
.lb-row.me .lb-rank { color: var(--primary-deep); }
.lb-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; }
.lb-name { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.lb-sub  { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.lb-you-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--primary-deep); background: var(--surface);
  border: 1px solid var(--primary); border-radius: 999px; padding: 2px 7px;
}
.lb-stat { text-align: right; min-width: 56px; }
.lb-stat b { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); display: block; }
.lb-stat span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.lb-flame { color: var(--warn); font-weight: 700; font-size: 13px; white-space: nowrap; }
.lb-delta {
  min-width: 46px; text-align: right; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.lb-delta.up   { color: var(--ok); }
.lb-delta.down { color: var(--err); }
.lb-delta.flat { color: var(--ink-faint); }

/* the sticky "you are #N of M" banner */
.lb-mecard {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg,#4F46E5,#6D5BF2 60%,#0EA5E9); color: #fff;
  border-radius: var(--r-lg); padding: 16px 20px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.lb-mecard .me-rank { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }
.lb-mecard .me-lead { flex: 1; min-width: 180px; }
.lb-mecard .me-lead b { font-size: 15px; }
.lb-mecard .me-lead div { font-size: 12.5px; opacity: .92; margin-top: 2px; }
.lb-mecard .me-fig { text-align: center; }
.lb-mecard .me-fig b { font-family: var(--display); font-size: 19px; }
.lb-mecard .me-fig span { font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; display: block; }

/* a row climbing into place on render */
@keyframes lb-climb { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.lb-anim .lb-row, .lb-anim .pod { animation: lb-climb .4s var(--ease) backwards; }
.lb-anim .pod:nth-child(1){animation-delay:.10s} .lb-anim .pod:nth-child(2){animation-delay:0s} .lb-anim .pod:nth-child(3){animation-delay:.18s}
.lb-anim .lb-row:nth-child(n+1){animation-delay:.04s}

/* ============================================================
   MULTI-TENANT · MANAGEMENT PORTAL
   Role-aware admin surface — user roster, group management,
   problem assignment. Reuses the shared table/card system.
   ============================================================ */
.role-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700;
  white-space: nowrap; text-transform: capitalize;
}
.role-student { background: var(--surface-3);  color: var(--ink-soft); }
.role-teacher { background: var(--accent-soft); color: #0B6F95; }
.role-hos     { background: #F3E8FF;            color: #7C3AED; }
.role-admin   { background: var(--primary-soft); color: var(--primary-deep); }
.role-super_admin { background: var(--warn-soft); color: var(--warn); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; vertical-align: 0; }
.status-active   { background: var(--ok); }
.status-suspended{ background: var(--warn); }
.status-archived { background: var(--ink-faint); }

/* the role-scoped portal landing tiles */
.portal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 920px) { .portal-grid { grid-template-columns: repeat(2,1fr); } .podium { grid-template-columns: 1fr; } .pod-1 { order: -1; } }
@media (max-width: 620px) { .portal-grid { grid-template-columns: 1fr; } }

/* a compact modal-less inline editor row for a user */
.mini-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.mini-form .field { min-width: 150px; }

/* ============================================================
   R4 · PROOF — verified credentials
   ============================================================ */
.cred-card {
  position: relative; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 24px 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
  background-image: linear-gradient(135deg, var(--primary-soft) 0%, transparent 42%);
}
.cred-seal { position: absolute; top: 18px; right: 20px; font-size: 30px; }
.cred-issuer {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--primary-deep);
}
.cred-title {
  font-family: var(--display); font-size: 21px; font-weight: 700;
  color: var(--ink); margin: 8px 0 4px; letter-spacing: -.01em; padding-right: 40px;
}
.cred-sub { font-size: 14px; color: var(--ink-soft); }
.cred-detail { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.cred-meta {
  font-size: 11.5px; color: var(--ink-faint); margin-top: 12px; font-family: var(--mono);
  word-break: break-word;
}

/* ============ FOUNDATIONS STARS ============ */
/* --- app-bar star chip --- */
.star-chip {
  gap: 0; padding: 5px 10px;
  background: var(--star-soft); border-color: transparent;
  text-decoration: none;
}
.star-chip:hover { box-shadow: var(--shadow-sm); }
.star-chip-glyphs { display: inline-flex; gap: 1px; line-height: 1; }
.sc-star {
  font-size: 13px; color: var(--star-dim);
  transition: color .2s var(--ease), text-shadow .2s var(--ease), transform .2s var(--ease);
}
.sc-star.lit {
  color: var(--star-gold);
  text-shadow: 0 0 5px rgba(232,163,23,.6);
}
.star-chip:hover .sc-star.lit { transform: scale(1.12); }
/* --- app-bar wings chip (transformed) --- */
.wings-chip {
  gap: 5px; padding: 5px 12px; text-decoration: none; font-weight: 700;
  color: var(--star-deep);
  background: linear-gradient(135deg, var(--star-soft), #FFF6E0);
  border-color: var(--star-glow);
  box-shadow: 0 0 0 1px rgba(232,163,23,.18), 0 2px 8px -3px rgba(181,116,12,.4);
}
.wings-chip .wings-glyph { font-size: 14px; filter: drop-shadow(0 0 4px rgba(246,199,82,.7)); }
.wings-chip:hover { box-shadow: 0 0 0 1px rgba(232,163,23,.3), 0 4px 12px -3px rgba(181,116,12,.5); }

/* --- home star panel --- */
.star-panel {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 90% -10%, rgba(246,199,82,.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}
.star-panel-head { display: flex; align-items: flex-start; gap: 16px; }
.star-panel-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--star-deep);
}
.star-panel-title {
  font-family: var(--display); font-size: 21px; font-weight: 700;
  color: var(--ink); letter-spacing: -.01em; margin-top: 3px;
}
.star-panel-sub { color: var(--ink-soft); font-size: 14px; margin-top: 7px; max-width: 560px; }
.star-panel-count {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1;
  color: var(--star-gold);
}
.star-panel-count span { font-size: 16px; color: var(--ink-faint); }

/* --- the five large tactile stars --- */
.big-stars {
  display: flex; gap: clamp(10px, 3vw, 26px); justify-content: center;
  flex-wrap: wrap; margin: 22px 0 4px;
}
.big-star {
  position: relative; width: 76px; height: 76px;
  display: grid; place-items: center;
}
.big-star .bs-glyph {
  font-size: 62px; line-height: 1;
  color: var(--star-dim);
  text-shadow: 0 1px 0 #fff, 0 2px 3px rgba(16,24,40,.14);
  transition: color .4s var(--ease), text-shadow .4s var(--ease), transform .3s var(--ease);
}
.big-star .bs-tier {
  position: absolute; bottom: 2px;
  font-size: 11px; font-weight: 700; color: var(--ink-faint);
  background: var(--surface); padding: 0 6px; border-radius: 999px;
  border: 1px solid var(--line);
}
.big-star .bs-rays {
  position: absolute; inset: -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(246,199,82,.55), transparent 62%);
  opacity: 0; transform: scale(.6);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
/* an earned star — warm, glowing, raised */
.big-star.earned .bs-glyph {
  color: var(--star-gold);
  text-shadow:
    0 0 14px rgba(246,199,82,.85),
    0 1px 0 #fff, 0 3px 5px rgba(181,116,12,.35);
  animation: star-pop .6s var(--ease) both;
}
.big-star.earned .bs-rays { opacity: 1; transform: scale(1); }
.big-star.earned .bs-tier { color: var(--star-deep); border-color: var(--star-glow); }
/* the next star to earn — a soft, inviting pulse */
.big-star.next .bs-glyph { color: #C9A86A; }
.big-star.next .bs-rays {
  opacity: .5; transform: scale(.9);
  background: radial-gradient(circle, rgba(246,199,82,.3), transparent 65%);
  animation: star-beckon 2.6s ease-in-out infinite;
}
@keyframes star-pop {
  0%   { transform: scale(.4) rotate(-22deg); }
  60%  { transform: scale(1.18) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes star-beckon {
  0%,100% { opacity: .35; transform: scale(.85); }
  50%     { opacity: .7;  transform: scale(1.05); }
}

/* --- panel footer: progress to next star --- */
.star-panel-foot { margin-top: 16px; }
.star-progress {
  height: 7px; border-radius: 999px; background: var(--surface-3);
  overflow: hidden; margin-bottom: 9px;
}
.star-progress > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--star-gold), var(--star-glow));
  transition: width .6s var(--ease);
}
.star-panel-line { font-size: 14px; font-weight: 600; color: var(--ink-soft); text-align: center; }
.star-panel-line .spl-count { color: var(--ink-faint); font-weight: 600; }

/* all five stars earned, the climb to 100 still on — a warm gold frame
   that sets the panel apart from the mid-climb state without stealing the
   full Wings celebration reserved for transformation. */
.star-panel.allstars {
  border-color: var(--star-glow);
  background:
    radial-gradient(120% 150% at 50% -20%, rgba(246,199,82,.2), transparent 60%),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(232,163,23,.16), var(--shadow);
}
.star-panel.allstars .star-progress > i {
  background: linear-gradient(90deg, var(--star-deep), var(--star-gold), var(--star-glow));
}

/* --- transformed: the radiant Wings badge --- */
.star-panel.wings {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(246,199,82,.22), transparent 58%),
    linear-gradient(135deg, #FFFCF2, var(--surface));
  border-color: var(--star-glow);
}
.wings-badge {
  position: relative; flex-shrink: 0;
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, #FFF1CC, var(--star-soft));
  box-shadow:
    0 0 0 6px rgba(246,199,82,.18),
    0 0 36px rgba(246,199,82,.6),
    inset 0 2px 8px rgba(255,255,255,.9);
}
.wings-badge .wb-core {
  font-size: 52px; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(181,116,12,.45));
}
.wings-badge::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(246,199,82,.5), transparent 60%);
  animation: wings-halo 6s linear infinite;
}
.star-panel.wings .star-panel-copy { flex: 1; min-width: 240px; }
@keyframes wings-halo { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .big-star { width: 56px; height: 56px; }
  .big-star .bs-glyph { font-size: 44px; }
  .star-panel { padding: 20px; }
}
/* motion-sensitive learners: keep the meaning, drop the movement */
@media (prefers-reduced-motion: reduce) {
  .big-star.earned .bs-glyph,
  .big-star.next .bs-rays,
  .wings-badge::after { animation: none; }
}

/* ============================================================
   ONBOARDING — the first-run welcome
   The learner's first impression, so it carries the most weight.
   A full-bleed, three-slide experience: the promise, the runway to
   the job, and the 5-minute first win. The palette leads with a
   calm, trustworthy deep blue and lifts it with a warm amber glow —
   safe and uplifting, never clinical, never alarming. Skeuomorphic
   depth (a raised card, a soft inner top-light, a slow aurora) so a
   demotivated learner on a budget phone feels something is being
   handed to them. Generous type sizes carry weak eyesight and weak
   English. Every animation also has a still form for
   prefers-reduced-motion at the foot of this block.
   ============================================================ */
.onboard {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 18px;
  /* a calm trust-blue wash, warmed at the corners with optimistic amber */
  background:
    radial-gradient(900px 560px at 16% 10%, rgba(30,58,138,.16), transparent 60%),
    radial-gradient(820px 540px at 88% 92%, rgba(245,158,11,.16), transparent 62%),
    var(--bg);
}
/* the aurora — a slow, soft drift of light behind the card. It pairs
   trust-blue with a hopeful amber so the screen feels warm, not cold.
   aria-hidden; it carries no meaning, only mood. */
.onb-aurora {
  position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(440px 440px at 28% 32%, rgba(39,71,166,.34), transparent 65%),
    radial-gradient(400px 400px at 74% 66%, rgba(245,158,11,.30), transparent 65%);
  filter: blur(48px);
  animation: onb-drift 24s var(--ease) infinite alternate;
}
@keyframes onb-drift {
  to { transform: translate3d(5%, -4%, 0) scale(1.12); }
}

.onb-shell {
  position: relative; z-index: 1;
  width: 100%; max-width: 780px;
  display: flex; flex-direction: column; gap: 18px;
}

/* top row — brand wordmark and the always-available Skip */
.onb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.onb-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink);
}
/* Skip — present and honest, but quiet. No dark pattern: the way out
   is always one obvious tap, never hidden. */
.onb-skip {
  background: var(--surface); border: 1px solid var(--line-2); cursor: pointer;
  color: var(--ink-soft); font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: 999px;
  transition: border-color .15s, color .15s, background .15s;
}
.onb-skip:hover { border-color: var(--onb-trust); color: var(--onb-trust); }

/* the slide card — raised, with a soft inner top-light (skeuomorphic) */
.onb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255,255,255,.9);
  padding: 34px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
}
.onb-art {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 240px;
}
/* eyebrow — a warm, welcoming pill in trust-blue */
.onb-eyebrow {
  display: inline-block; align-self: flex-start;
  margin-bottom: 13px; padding: 7px 14px; border-radius: 999px;
  background: rgba(30,58,138,.08); color: var(--onb-trust);
  font-size: 13px; font-weight: 700; letter-spacing: .01em;
}
/* generous, confident, friendly — large enough for weak eyesight */
.onb-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(25px, 3.6vw, 34px); line-height: 1.16;
  letter-spacing: -.02em; color: var(--ink);
}
.onb-body {
  margin-top: 13px; font-size: 16px; line-height: 1.68; color: var(--ink-soft);
}
/* reassurance line — the "you will not be made to feel stupid" promise,
   set on a calm trust-blue ground so it reads as safety, not noise */
.onb-reassure {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 15px; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(30,58,138,.06);
  font-size: 14.5px; line-height: 1.55; font-weight: 600; color: var(--onb-trust);
}
.onb-reassure-ic { font-size: 17px; line-height: 1.4; flex-shrink: 0; }
.onb-ready {
  margin-top: 15px; font-weight: 700; font-size: 15.5px; color: var(--onb-warm-deep);
}

/* SLIDE 1 — the transformation: zero coding -> a real tech career.
   One idea, shown as a journey between two warm nodes. */
.onb-transform {
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.onb-tf-node {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; border-radius: var(--r-lg); text-align: center;
}
.onb-tf-node.from {
  background: var(--onb-grow-soft); border: 1px solid #BFE3CF;
}
.onb-tf-node.to {
  background: linear-gradient(155deg, var(--onb-trust-2), var(--onb-trust));
  color: #fff;
  box-shadow: 0 16px 34px -14px rgba(30,58,138,.55), inset 0 1px 0 rgba(255,255,255,.22);
}
.onb-tf-ic { font-size: 38px; line-height: 1; }
.onb-tf-lbl {
  font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.25;
}
.onb-tf-node.from .onb-tf-lbl { color: var(--onb-grow); }
/* the amber arrow — the momentum between the two states */
.onb-tf-arrow {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--onb-warm), var(--onb-warm-deep));
  color: #fff; font-size: 12px;
  box-shadow: 0 8px 18px -6px rgba(194,116,10,.6);
  animation: onb-pulse 2.6s var(--ease) infinite;
}
.onb-tf-arrow::after { content: "→"; font-size: 18px; font-weight: 700; }
@keyframes onb-pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.12); }
}

/* SLIDE 2 — the runway: three rungs climbing to the salary prize. */
.onb-map { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.onb-map-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px;
}
.onb-map-badge {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff;
}
/* the climb warms as it rises: trust-blue, to teal, to the amber summit */
.onb-map-badge.a { background: linear-gradient(150deg,#2747A6,#1E3A8A); }
.onb-map-badge.b { background: linear-gradient(150deg,#0EA5E9,#0B6F95); }
.onb-map-badge.c { background: linear-gradient(150deg,var(--onb-warm),var(--onb-warm-deep)); }
.onb-map-text { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.onb-map-text strong { display: block; color: var(--ink); font-size: 14px; }
/* the prize at the top of the runway — a warm amber card, the summit */
.onb-prize {
  position: relative; margin-top: 11px;
  background: linear-gradient(155deg, var(--onb-warm), var(--onb-warm-deep));
  color: #fff; border-radius: var(--r-lg);
  padding: 18px 16px; text-align: center;
  box-shadow: 0 16px 34px -14px rgba(194,116,10,.6), inset 0 1px 0 rgba(255,255,255,.28);
}
.onb-prize::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(255,255,255,.24), transparent 46%);
  pointer-events: none;
}
.onb-prize-job {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; opacity: .9;
}
.onb-prize-fig {
  font-family: var(--display); font-weight: 700; font-size: clamp(28px,4.6vw,38px);
  line-height: 1.05; margin: 6px 0 3px;
}
.onb-prize-cap { font-size: 12.5px; opacity: .9; }
.onb-prize-line {
  margin-top: 9px; padding-top: 9px; font-size: 13px; font-weight: 600;
  border-top: 1px solid rgba(255,255,255,.28);
}

/* SLIDE 3 — the first-win preview: code accepted, ten green checks. */
.onb-win {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.onb-win-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.onb-win .code { margin: 0; }
.onb-win-checks {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px;
}
/* a calm growth-green tick — success shown warmly, never as alarm */
.onb-tick {
  width: 27px; height: 27px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--onb-grow-soft); color: var(--onb-grow);
  font-weight: 700; font-size: 13px;
  transform: scale(0); animation: onb-pop .34s var(--ease) forwards;
}
.onb-tick:nth-child(1){animation-delay:.05s} .onb-tick:nth-child(2){animation-delay:.1s}
.onb-tick:nth-child(3){animation-delay:.15s} .onb-tick:nth-child(4){animation-delay:.2s}
.onb-tick:nth-child(5){animation-delay:.25s} .onb-tick:nth-child(6){animation-delay:.3s}
.onb-tick:nth-child(7){animation-delay:.35s} .onb-tick:nth-child(8){animation-delay:.4s}
.onb-tick:nth-child(9){animation-delay:.45s} .onb-tick:nth-child(10){animation-delay:.5s}
@keyframes onb-pop { to { transform: scale(1); } }
.onb-win-cap {
  margin-top: 12px; font-weight: 700; font-size: 13.5px; color: var(--onb-grow);
  text-align: center;
}

/* the navigation row — Back, progress dots, forward / call-to-action */
.onb-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.onb-dots { display: inline-flex; gap: 8px; }
.onb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-2); transition: width .2s var(--ease), background .2s;
}
.onb-dot.on { width: 22px; border-radius: 999px; background: var(--onb-trust); }
/* the one unmistakable call-to-action — warm amber, the colour of the
   prize, so the eye is pulled to the single obvious next step */
.onb-cta {
  background: linear-gradient(150deg, var(--onb-warm), var(--onb-warm-deep));
  color: #fff;
  box-shadow: 0 12px 26px -8px rgba(194,116,10,.62);
}
.onb-cta:hover { background: var(--onb-warm-deep); }

/* phones — stack the card, keep every control reachable with one thumb */
@media (max-width: 620px) {
  .onb-card { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .onb-art { min-height: 0; order: -1; }
  .onb-nav { flex-wrap: wrap; }
  .onb-nav .btn { flex: 1 1 auto; }
  .onb-dots { order: -1; width: 100%; justify-content: center; margin-bottom: 4px; }
}

/* motion-sensitive learners: the aurora rests, the arrow stops
   pulsing, the ticks appear at once. The meaning — promise, runway,
   instant win — is carried entirely by the text and layout, so
   nothing is lost. */
@media (prefers-reduced-motion: reduce) {
  .onb-aurora { animation: none; }
  .onb-tf-arrow { animation: none; }
  .onb-tick { transform: scale(1); animation: none; }
}
