/* ============ LEDGER DESIGN SYSTEM — Series 66 Mastery ============ */
:root,
[data-theme='light'] {
  --color-bg: #f7f5f0;
  --color-surface: #fffefb;
  --color-surface-2: #f1eee7;
  --color-surface-offset: #eae6dc;
  --color-divider: #e2ddd2;
  --color-border: #d5cfbf;

  --color-text: #1c2333;
  --color-text-muted: #6b6a72;
  --color-text-faint: #a5a29c;

  --color-navy: #1b2437;
  --color-navy-soft: #2a3550;
  --color-brass: #9a7325;
  --color-brass-bright: #b8933f;
  --color-brass-highlight: #f0e6cf;
  --color-brass-contrast: #2b2005;

  --color-success: #2e6b2a;
  --color-success-highlight: #e2eedd;
  --color-error: #9c3545;
  --color-error-highlight: #f4dfe3;

  --sec1: #0f6f68; --sec1-soft: #e0efed;
  --sec2: #2b5aa0; --sec2-soft: #e2eaf5;
  --sec3: #6c4a9e; --sec3-soft: #ebe4f5;
  --sec4: #8a5a24; --sec4-soft: #f1e6d6;

  --shadow-sm: 0 1px 2px rgb(28 35 51 / 0.06);
  --shadow-md: 0 4px 14px rgb(28 35 51 / 0.08);
  --shadow-lg: 0 14px 40px rgb(28 35 51 / 0.14);

  --radius-sm: 0.375rem; --radius-md: 0.625rem; --radius-lg: 0.875rem; --radius-xl: 1.25rem; --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
  --color-bg: #14161d;
  --color-surface: #1a1d26;
  --color-surface-2: #20242f;
  --color-surface-offset: #232734;
  --color-divider: #2a2e3c;
  --color-border: #3a4052;

  --color-text: #e6e4dd;
  --color-text-muted: #9a99a1;
  --color-text-faint: #696873;

  --color-navy: #222838;
  --color-navy-soft: #2b3247;
  --color-brass: #cfa54c;
  --color-brass-bright: #dcb968;
  --color-brass-highlight: #3a3320;
  --color-brass-contrast: #241c06;

  --color-success: #7cb56a;
  --color-success-highlight: #22301f;
  --color-error: #d97b8a;
  --color-error-highlight: #3a2127;

  --sec1: #4fb3a8; --sec1-soft: #1d2e2c;
  --sec2: #7aa3dd; --sec2-soft: #1e2635;
  --sec3: #b39ddb; --sec3-soft: #262033;
  --sec4: #d8ac6a; --sec4-soft: #302818;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 14px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 14px 40px rgb(0 0 0 / 0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; scroll-padding-top: var(--space-16, 64px); }
body {
  min-height: 100dvh; line-height: 1.6;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-size: 1rem; color: var(--color-text); background: var(--color-bg);
}

:root {
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.5vw, 3.25rem);
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --content-default: 900px;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
a { color: var(--color-brass); text-underline-offset: 3px; }
a:hover { color: var(--color-brass-bright); }
::selection { background: color-mix(in oklab, var(--color-brass) 30%, transparent); }
:focus-visible { outline: 2px solid var(--color-brass); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--color-navy); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

a, button, [role='button'], input, select { transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive); }

/* ============ SHELL ============ */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  background: var(--color-surface); border-right: 1px solid var(--color-divider); padding: var(--space-5) var(--space-4);
}
.brand { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-2) var(--space-2) var(--space-5); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; color: var(--color-text); }
.brand-sub { font-size: var(--text-xs); color: var(--color-brass); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-top: var(--space-2); border-top: 1px solid var(--color-divider); }
.side-nav-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-faint); padding: var(--space-4) var(--space-3) var(--space-2); }
.nav-item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 500; line-height: 1.3;
}
.nav-item:hover { background: var(--color-surface-2); color: var(--color-text); }
.nav-item.active { background: var(--color-brass-highlight); color: var(--color-brass-contrast); font-weight: 700; }
.nav-item .nav-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--sec-c, var(--color-brass)); }
.nav-item .nav-count { margin-left: auto; font-size: var(--text-xs); color: var(--color-text-faint); font-variant-numeric: tabular-nums; }
.side-foot { padding-top: var(--space-4); border-top: 1px solid var(--color-divider); }
.progress-widget-row { display: flex; justify-content: space-between; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.progress-track { height: 8px; border-radius: var(--radius-full); background: var(--color-surface-offset); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--color-brass), var(--color-brass-bright)); transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.progress-widget-note { display: block; font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-2); }

.main-col { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-5); background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-divider);
}
.crumb { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.streak-chip { font-size: var(--text-xs); font-weight: 700; color: var(--color-brass); background: var(--color-brass-highlight); padding: .25rem .6rem; border-radius: var(--radius-full); }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-full); border: 1px solid var(--color-border); color: var(--color-text-muted); background: var(--color-surface); }
.theme-toggle:hover { color: var(--color-text); border-color: var(--color-brass); }
.menu-btn { display: none; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-md); color: var(--color-text); }

.content { flex: 1; width: 100%; max-width: var(--content-default); margin: 0 auto; padding: var(--space-8) var(--space-6) var(--space-16); }
.footer { border-top: 1px solid var(--color-divider); padding: var(--space-6); font-size: var(--text-xs); color: var(--color-text-faint); max-width: var(--content-default); margin: 0 auto; width: 100%; }
.footer p { max-width: none; margin-bottom: var(--space-2); }

.scrim { position: fixed; inset: 0; background: rgb(10 12 18 / 0.5); z-index: 55; }

/* ============ TYPE ============ */
.page-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400; margin-bottom: var(--space-2); }
.page-lede { font-size: var(--text-base); color: var(--color-text-muted); margin-bottom: var(--space-8); max-width: 62ch; }
.section-heading { font-family: var(--font-display); font-size: var(--text-lg); margin: var(--space-10) 0 var(--space-4); display: flex; align-items: baseline; gap: var(--space-3); }
.section-heading .rule { flex: 1; height: 1px; background: var(--color-divider); align-self: center; }

/* ============ HERO (home) ============ */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-soft) 100%);
  color: #f2efe7; padding: clamp(var(--space-8), 6vw, var(--space-16));
  margin-bottom: var(--space-10); box-shadow: var(--shadow-lg);
}
.hero h1 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 400; line-height: 1.05; max-width: 18ch; margin-bottom: var(--space-4); }
.hero p { color: #cfd3dd; max-width: 54ch; margin-bottom: var(--space-6); }
.hero .hero-rule { font-family: var(--font-display); font-style: italic; color: var(--color-brass-bright); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 700;
}
.btn-primary { background: var(--color-brass); color: var(--color-brass-contrast); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--color-brass-bright); transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgb(255 255 255 / 0.35); color: #f2efe7; }
.btn-ghost:hover { border-color: var(--color-brass-bright); color: var(--color-brass-bright); }
.btn-outline { border: 1px solid var(--color-border); color: var(--color-text); background: var(--color-surface); }
.btn-outline:hover { border-color: var(--color-brass); color: var(--color-brass); }

.fact-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-10); }
.fact-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-4); text-align: left; }
.fact-num { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-brass); display: block; }
.fact-label { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* section cards */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); margin: var(--space-6) 0; }
.sec-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  padding: var(--space-5); color: var(--color-text); box-shadow: var(--shadow-sm);
}
.sec-card:hover { border-color: var(--sec-c, var(--color-border)); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sec-tag { font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sec-c); }
.sec-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; }
.sec-card p { font-size: var(--text-sm); color: var(--color-text-muted); flex: 1; }
.sec-meta { display: flex; gap: var(--space-3); font-size: var(--text-xs); color: var(--color-text-faint); font-weight: 600; padding-top: var(--space-3); border-top: 1px solid var(--color-divider); }
.mini-bar { height: 6px; border-radius: var(--radius-full); background: var(--color-surface-offset); overflow: hidden; margin-top: var(--space-2); }
.mini-bar-fill { height: 100%; background: var(--sec-c); width: 0%; transition: width 400ms cubic-bezier(0.16,1,0.3,1); }

/* ============ LESSONS ============ */
.unit {
  background: var(--color-surface); border: 1px solid var(--color-divider); border-left: 4px solid var(--sec-c, var(--color-brass));
  border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-5);
}
.unit > h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; margin-bottom: var(--space-3); }
.unit h4 { font-size: 1rem; margin: var(--space-4) 0 var(--space-2); }
.unit p { margin-bottom: var(--space-3); }
.unit ul, .unit ol { padding-left: 1.25rem; margin: 0 0 var(--space-3); display: block; }
.unit li { margin-bottom: var(--space-2); }
.unit .def-table { width: 100%; font-size: var(--text-sm); margin: var(--space-4) 0; border: 1px solid var(--color-divider); border-radius: var(--radius-md); overflow: hidden; }
.unit .def-table th { text-align: left; background: var(--color-surface-2); padding: .5rem .75rem; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.unit .def-table td { padding: .5rem .75rem; border-top: 1px solid var(--color-divider); vertical-align: top; }
.unit .def-table td:first-child { font-weight: 700; white-space: nowrap; }

.callout { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); margin: var(--space-4) 0; font-size: var(--text-sm); }
.callout-icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; font-family: var(--font-display); font-size: 1rem; }
.callout strong { display: block; margin-bottom: var(--space-1); }
.callout-eli { background: var(--color-surface-2); border: 1px dashed var(--color-border); }
.callout-eli .callout-icon { background: var(--sec-c, var(--color-brass)); color: #fff; }
.callout-lens { background: color-mix(in oklab, var(--color-navy) 92%, transparent); color: #e8e5da; }
.callout-lens .callout-icon { background: var(--color-brass); color: var(--color-brass-contrast); }
.callout-lens strong { color: var(--color-brass-bright); }
.callout-lens a { color: var(--color-brass-bright); }

/* ============ QUIZ ============ */
.quiz-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.quiz-count { font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.quiz-track { flex: 1; min-width: 160px; height: 8px; border-radius: var(--radius-full); background: var(--color-surface-offset); overflow: hidden; }
.quiz-track-fill { height: 100%; background: var(--sec-c, var(--color-brass)); width: 0%; transition: width 300ms ease; }
.quiz-timer { font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

.q-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-md); }
.q-topic { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--sec-c, var(--color-brass)); margin-bottom: var(--space-3); }
.q-text { font-size: var(--text-lg); font-weight: 500; line-height: 1.4; margin-bottom: var(--space-5); }
.q-choices { display: grid; gap: var(--space-3); }
.choice {
  display: flex; align-items: flex-start; gap: var(--space-3); text-align: left; width: 100%;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4);
  font-size: var(--text-sm); background: var(--color-surface); line-height: 1.5;
}
.choice:hover:not(:disabled) { border-color: var(--sec-c, var(--color-brass)); background: var(--color-surface-2); }
.choice:disabled { cursor: default; opacity: .88; }
.choice .choice-key { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--text-xs); border: 1.5px solid var(--color-border); color: var(--color-text-muted); }
.choice.correct { border-color: var(--color-success); background: var(--color-success-highlight); }
.choice.correct .choice-key { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.choice.wrong { border-color: var(--color-error); background: var(--color-error-highlight); }
.choice.wrong .choice-key { background: var(--color-error); border-color: var(--color-error); color: #fff; }

.q-feedback { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.verdict { display: flex; align-items: center; gap: var(--space-2); font-weight: 800; font-size: var(--text-base); }
.verdict.ok { color: var(--color-success); }
.verdict.no { color: var(--color-error); }
.explain-box { border-left: 4px solid var(--sec-c, var(--color-brass)); background: var(--color-surface-2); padding: var(--space-4); border-radius: var(--radius-md); }
.explain-box h5 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.explain-box ul { padding-left: 1.1rem; }
.explain-box li { margin-bottom: var(--space-2); font-size: var(--text-sm); }
.mnemonic-box { display: flex; gap: var(--space-3); align-items: flex-start; border: 1.5px dashed var(--color-brass); background: var(--color-brass-highlight); color: var(--color-brass-contrast); padding: var(--space-4); border-radius: var(--radius-md); }
.mnemonic-box .mn-icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--color-brass); color: var(--color-brass-contrast); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem; }
.mnemonic-box strong { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .07em; margin-bottom: var(--space-1); }
.mnemonic-box span { font-size: var(--text-sm); font-weight: 500; }
.q-actions { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-6); gap: var(--space-3); }
.q-hint { font-size: var(--text-xs); color: var(--color-text-faint); }

/* results */
.result-hero { text-align: center; padding: var(--space-10) var(--space-6); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-xl); margin-bottom: var(--space-8); }
.score-ring { width: 132px; height: 132px; margin: 0 auto var(--space-4); position: relative; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .ring-val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.9rem; }
.result-hero h2 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; margin-bottom: var(--space-2); }
.result-hero p { color: var(--color-text-muted); font-size: var(--text-sm); max-width: 46ch; margin: 0 auto; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-8); }
.review-item { border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3); background: var(--color-surface); }
.review-item .rev-topic { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; color: var(--sec-c, var(--color-brass)); margin-bottom: var(--space-1); }
.review-item p { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.review-item .rev-why { font-size: var(--text-sm); color: var(--color-text-muted); }
.review-item .rev-why strong { color: var(--color-text); }

/* ============ STUDY LAB & MNEMONICS ============ */
.tip-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-4); }
.tip-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; margin-bottom: var(--space-2); }
.tip-card p, .tip-card li { font-size: var(--text-sm); color: var(--color-text-muted); }
.tip-card ol, .tip-card ul { padding-left: 1.2rem; margin-top: var(--space-2); }
.tip-card li { margin-bottom: var(--space-2); }
.tip-tag { display: inline-block; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-brass); background: var(--color-brass-highlight); border-radius: var(--radius-full); padding: .2rem .65rem; margin-bottom: var(--space-3); }

.mn-search { width: 100%; max-width: 420px; padding: .7rem 1rem; border-radius: var(--radius-md); border: 1.5px solid var(--color-border); background: var(--color-surface); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.mn-search:focus { border-color: var(--color-brass); outline: none; }
.mn-item { border-left: 4px solid var(--sec-c, var(--color-brass)); }
.mn-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--space-1); }
.mn-item .mn-code { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--color-brass); display: block; margin-bottom: var(--space-2); }

/* ============ DASHBOARD ============ */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-8); }
.dash-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-5); }
.dash-card h3 { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-3); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; font-size: var(--text-xs); }
.big-num { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.sub-num { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-2); display: block; }
.topic-list { display: grid; gap: var(--space-2); }
.topic-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); font-size: var(--text-sm); align-items: center; }
.topic-row .topic-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--color-text-muted); }
.topic-row .topic-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.topic-bar { grid-column: 1 / -1; height: 6px; border-radius: var(--radius-full); background: var(--color-surface-offset); overflow: hidden; }
.topic-bar-fill { height: 100%; border-radius: var(--radius-full); background: var(--sec-c, var(--color-brass)); }

/* ============ RESPONSIVE ============ */
@media (hover: none) and (pointer: coarse) {
  .q-hint { display: none; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 280px; transform: translateX(-100%); transition: transform 260ms cubic-bezier(0.16,1,0.3,1); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .content { padding: var(--space-6) var(--space-4) var(--space-16); }
  .topbar { padding: var(--space-3) var(--space-4); }
}
