/* Quant Practice: calm, quiet practice space. Tokens first; no red anywhere. */

:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --ink: #1E2230;
  --muted: #656C79;          /* spec #6B7280, nudged darker for AA on the warm background */
  --line: #E7E3DA;
  --primary: #5B6CFF;        /* rings, accents, focus */
  --primary-strong: #4A5AE8; /* filled buttons and primary text (AA) */
  --on-primary: #F7F8FF;
  --primary-soft: #EEF0FF;
  --ok: #2F9E7A;
  --ok-bg: #E6F5EE;
  --ok-ink: #1F6B53;
  --miss: #B7791F;
  --miss-bg: #FDF3E1;
  --miss-ink: #8A5A10;
  --shadow: 0 8px 24px -12px rgba(30, 34, 48, .18);
  --scrim: rgba(20, 22, 29, .45);
  --radius-card: 16px;
  --radius-btn: 12px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161D;
    --surface: #1C1F29;
    --ink: #ECEDF2;
    --muted: #9AA1B2;
    --line: #2A2E3A;
    --primary: #8C97FF;
    --primary-strong: #8C97FF;
    --on-primary: #14161D;
    --primary-soft: #252A44;
    --ok: #5FD3A8;
    --ok-bg: #16302A;
    --ok-ink: #5FD3A8;
    --miss: #F2B45A;
    --miss-bg: #3A2C14;
    --miss-ink: #F2B45A;
    --shadow: 0 8px 24px -12px rgba(0, 0, 0, .5);
    --scrim: rgba(0, 0, 0, .62);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161D; --surface: #1C1F29; --ink: #ECEDF2; --muted: #9AA1B2; --line: #2A2E3A;
  --primary: #8C97FF; --primary-strong: #8C97FF; --on-primary: #14161D; --primary-soft: #252A44;
  --ok: #5FD3A8; --ok-bg: #16302A; --ok-ink: #5FD3A8;
  --miss: #F2B45A; --miss-bg: #3A2C14; --miss-ink: #F2B45A;
  --shadow: 0 8px 24px -12px rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .62);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--primary-strong); }
.num, .tab { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 8px; top: -48px; background: var(--surface); padding: 8px 16px; border-radius: var(--radius-btn); z-index: 10; }
.skip:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-btn); }

/* ---------------------------------------------------------------- shell */

.top {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 16px; }
.brand-dot { width: 24px; height: 24px; border-radius: 8px; background: var(--primary); display: inline-block; position: relative; }
.brand-dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.nav { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 14px; box-shadow: var(--shadow); }
.nav a {
  min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
}
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-strong); }
@media (max-width: 520px) {
  .top { padding-top: 12px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { flex: 1; justify-content: center; padding: 0 8px; }
}

main { max-width: 960px; margin: 0 auto; padding: 16px 16px 64px; outline: none; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.narrow { width: 100%; max-width: 640px; margin: 0 auto; }

/* ---------------------------------------------------------------- cards and buttons */

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--line);
}
@media (max-width: 520px) { .card { padding: 16px; } }

.btn {
  font: inherit; font-weight: 600; font-size: 16px;
  min-height: 48px; padding: 0 24px; border-radius: var(--radius-btn);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: transform 120ms ease, background 120ms ease;
}
.btn:hover { background: var(--primary-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary-strong); }
.btn.block { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong);
}
.chip.quiet { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.miss { background: var(--miss-bg); color: var(--miss-ink); }

/* ---------------------------------------------------------------- question card */

.qcard { width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.qmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.timer { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timer > span { display: block; height: 100%; width: 100%; background: var(--primary); opacity: .55; transform-origin: left; }
.stem { font-size: 20px; font-weight: 600; line-height: 1.45; }
@media (max-width: 520px) { .stem { font-size: 18px; } }
.legend { color: var(--muted); font-size: 14px; }
.prompt { font-weight: 600; color: var(--muted); }

.choices { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.choices.two { flex-direction: row; }
.choices.two > li { flex: 1; }
.choice {
  width: 100%; min-height: 52px; text-align: left; font: inherit; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: border-color 120ms ease, background 120ms ease;
}
.choice:hover { border-color: var(--primary); }
.choice .badge {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); }
.choice[aria-pressed="true"] .badge, .choice[aria-checked="true"] .badge { background: var(--primary-strong); color: var(--on-primary); border-color: var(--primary-strong); }
.choice.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.choice.is-correct .badge { background: var(--ok); color: var(--surface); border-color: var(--ok); }
.choice.is-miss { border-color: var(--miss); background: var(--miss-bg); }
.choice.is-miss .badge { background: var(--miss); color: var(--surface); border-color: var(--miss); }
.choice .tag { margin-left: auto; font-size: 14px; font-weight: 600; }
.choice.is-correct .tag { color: var(--ok-ink); }
.choice.is-miss .tag { color: var(--miss-ink); }
.choice[disabled] { cursor: default; }

/* worked solution lines */
.lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.line {
  width: 100%; min-height: 48px; text-align: left; font: inherit; font-variant-numeric: tabular-nums;
  display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: var(--radius-btn);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.line .ln { color: var(--muted); font-size: 14px; font-weight: 600; min-width: 1.5em; }
.line:hover { border-color: var(--primary); }
.line[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.line.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.line.is-miss { border-color: var(--miss); background: var(--miss-bg); }
.subq { display: flex; flex-direction: column; gap: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 44px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.pill .badge { font-size: 12px; color: var(--muted); }
.pill[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-strong); }
.pill.is-correct { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink); }
.pill.is-miss { border-color: var(--miss); background: var(--miss-bg); color: var(--miss-ink); }

/* state table */
.tablewrap { overflow-x: auto; }
table.state { border-collapse: separate; border-spacing: 0 6px; width: 100%; font-variant-numeric: tabular-nums; }
table.state th { font-size: 14px; color: var(--muted); font-weight: 600; text-align: left; padding: 0 8px; }
table.state td { padding: 0 4px; }
table.state td:first-child { font-size: 14px; color: var(--muted); white-space: nowrap; padding-right: 8px; }
table.state input, table.state .given {
  width: 100%; min-width: 64px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; padding: 0 12px;
}
table.state .given { display: flex; align-items: center; background: var(--bg); color: var(--muted); }
table.state input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
table.state input.is-correct { border-color: var(--ok); background: var(--ok-bg); }
table.state input.is-miss { border-color: var(--miss); background: var(--miss-bg); }
table.state .fix { display: block; font-size: 14px; color: var(--miss-ink); padding: 2px 4px 0; }

/* feedback */
.feedback {
  border-radius: var(--radius-card); padding: 16px 20px; display: flex; flex-direction: column; gap: 8px;
  animation: slideup 150ms ease-out;
}
.feedback.ok { background: var(--ok-bg); }
.feedback.ok .fb-title { color: var(--ok-ink); }
.feedback.miss { background: var(--miss-bg); }
.feedback.miss .fb-title { color: var(--miss-ink); }
.feedback .chip { background: var(--surface); }
.fb-title { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fb-fix { font-weight: 600; }
.fb-method { color: var(--ink); }
.fb-list { margin: 0; padding-left: 20px; }
@keyframes slideup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .feedback { animation: none; }
  .btn, .choice { transition: none; }
}
.kbd-hint { font-size: 14px; color: var(--muted); text-align: center; }
@media (hover: none) { .kbd-hint { display: none; } }

/* ---------------------------------------------------------------- home and progress */

.hero { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 8px; }
.hero p { color: var(--muted); max-width: 560px; }
.rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 760px) { .rings { grid-template-columns: repeat(2, 1fr); } }
.ringcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 12px; text-decoration: none; color: var(--ink); }
.ringcard:hover { border-color: var(--primary); }
.ring { width: 88px; height: 88px; }
.ring .track { stroke: var(--line); }
.ring .fill { stroke: var(--primary); transition: stroke-dashoffset 400ms ease; }
@media (prefers-reduced-motion: reduce) { .ring .fill { transition: none; } }
.ring text { fill: var(--ink); font: 600 14px var(--font); }
.levels { display: flex; gap: 4px; justify-content: center; }
.levels span { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.levels span.done { background: var(--primary); }
.levels span.now { background: var(--primary-soft); outline: 1.5px solid var(--primary); }

.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.step .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.step.now { color: var(--ink); font-weight: 600; }
.step.now .dot { background: var(--primary); }
.step.done .dot { background: var(--ok); }

.notice { border-radius: var(--radius-card); padding: 16px 20px; background: var(--primary-soft); display: flex; flex-direction: column; gap: 8px; }
.trapcard { border-color: var(--miss); }
.trapcard ol { margin: 0; padding-left: 20px; font-variant-numeric: tabular-nums; }
.example { background: var(--bg); border-radius: var(--radius-btn); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.skillpick { display: flex; flex-wrap: wrap; gap: 8px; }

.preview-note { text-align: center; }

.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 100%; background: var(--primary); border-radius: 6px; transform-origin: left; transition: transform 200ms ease; }
@media (prefers-reduced-motion: reduce) { .progress > span { transition: none; } }
.skillrow + .skillrow { border-top: 1px solid var(--line); padding-top: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 4px; }

/* forms */
.label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field {
  font: inherit; color: var(--ink); background: var(--surface); width: 100%;
  min-height: 44px; padding: 10px 12px; border-radius: var(--radius-btn); border: 1.5px solid var(--line);
}
.field:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.field.short { width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.field.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
textarea.field { resize: vertical; line-height: 1.5; }
select.field { appearance: auto; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg .pill[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-strong); }
.miss-text { color: var(--miss-ink); }
.ok-text { color: var(--ok-ink); }
.entry { padding: 16px; gap: 4px; display: flex; flex-direction: column; }

.keyrow { flex-wrap: nowrap; align-items: center; gap: 12px; }
.btn.keycap { min-width: 48px; min-height: 44px; padding: 0 16px; font-size: 20px; font-variant-numeric: tabular-nums; flex: none; }
.today-line { font-weight: 600; }

/* ---------------------------------------------------------------- onboarding */

.top .nav { margin-left: auto; }
.top .help-btn {
  order: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 700 18px var(--font); cursor: pointer; box-shadow: var(--shadow);
}
.top .help-btn:hover { background: var(--primary-soft); }
@media (max-width: 520px) {
  .top .nav { margin-left: 0; }
  .top .brand { flex: 1; }
  .top .help-btn { order: 2; }
  .top .nav { order: 3; }
}
#ob-banner { max-width: 960px; margin: 0 auto; padding: 0 16px; }
#ob-banner:empty { display: none; }
.ob-banner {
  background: var(--primary-soft); border-radius: var(--radius-card); padding: 16px 20px; margin-top: 8px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.ob-banner p { flex: 1 1 320px; }

.ob-root { position: relative; z-index: 900; }
.ob-spot {
  position: fixed; top: 0; left: 0; z-index: 990; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px var(--scrim), 0 0 0 2px var(--primary);
  transition: transform 150ms ease;
}
.ob-pop, .ob-sheet, .ob-modal {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: 0 16px 40px -16px rgba(30, 34, 48, .35); padding: 16px;
}
.ob-pop { position: fixed; z-index: 1000; width: min(320px, calc(100vw - 32px)); top: 0; left: 0; }
.ob-sheet { position: fixed; z-index: 1000; left: 8px; right: 8px; bottom: 8px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.ob-scrim { position: fixed; inset: 0; z-index: 1000; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.ob-modal { width: min(440px, 100%); padding: 24px; }
.ob-enter { animation: ob-in 150ms ease-out; }
@keyframes ob-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ob-enter { animation: none; } .ob-spot { transition: none; } }
.ob-content { display: flex; flex-direction: column; gap: 8px; }
.ob-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ob-title { font-size: 16px; }
.ob-modal .ob-title { font-size: 20px; }
.ob-body { color: var(--ink); }
.ob-actions { margin-top: 8px; align-items: center; }
.ob-actions.end { justify-content: flex-end; }
.ob-actions .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.ob-modal .ob-actions { justify-content: flex-end; }
.ob-modal-actions { justify-content: flex-end; }
.ob-skip { padding: 0 8px; }
.ob-x {
  flex: none; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font: 400 24px var(--font); cursor: pointer;
}
.ob-x:hover { background: var(--primary-soft); }
.ob-dots { display: flex; align-items: center; gap: 8px; }
.ob-dots-row { display: inline-flex; gap: 4px; }
.ob-dots-row span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ob-dots-row span.on { background: var(--primary); }
/* arrow: a rotated square on the edge facing the anchor */
.ob-arrow { position: absolute; width: 12px; height: 12px; background: var(--surface); border: 1px solid var(--line); transform: rotate(45deg); }
.ob-pop[data-side="bottom"] .ob-arrow { top: -7px; left: calc(var(--arrow) - 6px); border-right: 0; border-bottom: 0; }
.ob-pop[data-side="top"] .ob-arrow { bottom: -7px; left: calc(var(--arrow) - 6px); border-left: 0; border-top: 0; }
.ob-pop[data-side="right"] .ob-arrow { left: -7px; top: calc(var(--arrow) - 6px); border-right: 0; border-top: 0; }
.ob-pop[data-side="left"] .ob-arrow { right: -7px; top: calc(var(--arrow) - 6px); border-left: 0; border-bottom: 0; }

.ob-inline { display: flex; gap: 8px; align-items: baseline; }
.ob-inline-tag { flex: none; font-weight: 600; color: var(--primary-strong); }

/* checklist dock */
body.has-ob-dock main { padding-bottom: 120px; }
.ob-checklist {
  position: fixed; right: 16px; bottom: 16px; z-index: 950; width: 280px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow);
}
.ob-checklist.collapsed { width: auto; }
.ob-cl-head {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; border: 0; background: transparent; color: var(--ink); font: 600 14px var(--font); cursor: pointer;
  border-radius: var(--radius-card);
}
.ob-cl-body { margin: 0; padding: 0 16px 16px; }
.ob-cl-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ob-cl-list li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.ob-cl-list li.done { color: var(--muted); }
.ob-tick {
  flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: var(--ok-ink);
}
li.done .ob-tick { background: var(--ok-bg); border-color: var(--ok); }
@media (max-width: 599px) {
  .ob-checklist { right: 12px; bottom: 12px; width: auto; max-width: calc(100vw - 24px); }
  .ob-checklist:not(.collapsed) { left: 12px; }
  .ob-checklist.collapsed { border-radius: 999px; }
  .ob-checklist.collapsed .ob-cl-head { border-radius: 999px; min-height: 44px; }
}

/* help centre */
.help-scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(20, 22, 29, .35); display: flex; justify-content: flex-end; }
.help-panel {
  width: min(420px, 100%); height: 100%; overflow-y: auto; background: var(--bg); padding: 24px;
  display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow);
  animation: help-in 150ms ease-out;
}
@keyframes help-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 599px) {
  .help-scrim { align-items: flex-end; }
  .help-panel { height: 88vh; border-radius: var(--radius-card) var(--radius-card) 0 0; padding: 16px; animation-name: help-up; }
  @keyframes help-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .help-panel { animation: none; } }
.glossary { display: flex; flex-direction: column; gap: 8px; }
.glossary details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 0 16px; }
.glossary summary { min-height: 44px; padding: 10px 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.glossary summary::-webkit-details-marker { display: none; }
.glossary details[open] { padding-bottom: 16px; }
.glossary ol { margin: 0; padding-left: 20px; }

/* debug overlay (?onboarding=debug) */
.ob-debug {
  position: fixed; left: 8px; bottom: 8px; z-index: 1200; max-width: min(720px, calc(100vw - 16px)); max-height: 50vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-btn); box-shadow: var(--shadow);
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 12px;
}
.ob-debug summary { cursor: pointer; font-weight: 600; }
.ob-debug table { border-collapse: collapse; margin-top: 8px; }
.ob-debug td, .ob-debug th { text-align: left; padding: 2px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.ob-debug tr.showing td { background: var(--primary-soft); }
