/* ============================================================
   Quant Modelling [HFT] — Shared design system
   Used by every notes page, practice test and the index.
   ============================================================ */

:root {
  /* Palette (light) */
  --bg:        #f6f7f9;
  --surface:   #ffffff;
  --surface-2: #f1f3f7;
  --ink:       #1a1d29;
  --ink-soft:  #3b4252;
  --muted:     #6b7280;
  --line:      #e4e7ec;
  --line-2:    #d4d8e0;

  --accent:      #4f46e5;   /* indigo */
  --accent-soft: #eef2ff;
  --accent-ink:  #3730a3;
  --teal:        #0d9488;
  --teal-soft:   #ecfdf5;
  --amber:       #b45309;
  --amber-soft:  #fffbeb;
  --rose:        #be123c;
  --rose-soft:   #fff1f2;
  --violet:      #7c3aed;
  --violet-soft: #f5f3ff;
  --sky:         #0369a1;
  --sky-soft:    #f0f9ff;

  --radius:   14px;
  --radius-sm:9px;
  --shadow:   0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --maxw: 880px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;
}

[data-theme="dark"] {
  --bg:        #0d1017;
  --surface:   #151a23;
  --surface-2: #1c222e;
  --ink:       #e8ebf1;
  --ink-soft:  #c2c8d4;
  --muted:     #8b93a4;
  --line:      #262d3a;
  --line-2:    #333c4d;
  --accent:      #818cf8;
  --accent-soft: #1e2236;
  --accent-ink:  #c7d2fe;
  --teal-soft:   #11241f;
  --amber-soft:  #2a2113;
  --rose-soft:   #2a1620;
  --violet-soft: #1f1830;
  --sky-soft:    #0d2030;
  --shadow:   0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.68;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 22px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.topbar .brand .dot { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--teal)); box-shadow: 0 0 0 4px var(--accent-soft); }
.topbar .spacer { flex: 1; }
.topbar a.home { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.topbar a.home:hover { color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-soft);
  width: 38px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .1s linear; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 40px; max-width: 1220px; margin: 0 auto; padding: 30px 26px 90px; }
.sidebar { position: sticky; top: 78px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; padding-right: 6px; }
.sidebar h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.toc { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 13.5px; transition: .12s; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc li.sub a { padding-left: 28px; font-size: 12.5px; }
.content { min-width: 0; max-width: var(--maxw); }

/* ---------- Hero ---------- */
.hero { margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.eyebrow .num { background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 14px; }
.hero .lede { font-size: 18px; color: var(--ink-soft); margin: 0 0 16px; max-width: 60ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Headings & prose ---------- */
.content h2 { font-size: 25px; letter-spacing: -.02em; margin: 46px 0 14px; padding-top: 6px; scroll-margin-top: 80px; }
.content h2::before { content: ""; display: block; width: 38px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--teal)); margin-bottom: 14px; }
.content h3 { font-size: 19px; letter-spacing: -.01em; margin: 30px 0 10px; scroll-margin-top: 80px; }
.content h4 { font-size: 16px; margin: 22px 0 8px; color: var(--ink-soft); }
.content p { margin: 13px 0; }
.content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.content a:hover { border-bottom-color: var(--accent); }
.content ul, .content ol { padding-left: 22px; margin: 12px 0; }
.content li { margin: 6px 0; }
.content li::marker { color: var(--accent); }
strong { color: var(--ink); font-weight: 650; }
hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.lead { font-size: 17.5px; color: var(--ink-soft); }
mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; padding: 0 3px; border-radius: 4px; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-soft); }
.badge.exam { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent-ink); }
.badge.teal { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 30%, transparent); color: var(--teal); }
.badge.amber{ background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--amber); }

/* ---------- Callouts ---------- */
.callout { position: relative; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: var(--radius-sm); padding: 16px 18px 16px 18px; margin: 20px 0; box-shadow: var(--shadow-sm); }
.callout > .c-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; letter-spacing: .01em; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.callout > .c-title .ic { font-size: 15px; }
.callout p:first-of-type { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.key      { border-left-color: var(--accent); background: linear-gradient(0deg, var(--surface), var(--accent-soft) 220%); }
.callout.key      > .c-title { color: var(--accent-ink); }
.callout.def      { border-left-color: var(--sky); }   .callout.def    > .c-title { color: var(--sky); }
.callout.example  { border-left-color: var(--teal); background: linear-gradient(0deg, var(--surface), var(--teal-soft) 240%); } .callout.example > .c-title { color: var(--teal); }
.callout.warning  { border-left-color: var(--rose); background: linear-gradient(0deg, var(--surface), var(--rose-soft) 240%); } .callout.warning > .c-title { color: var(--rose); }
.callout.tip      { border-left-color: var(--violet); } .callout.tip    > .c-title { color: var(--violet); }
.callout.note     { border-left-color: var(--muted); }  .callout.note   > .c-title { color: var(--muted); }

/* ---------- Formula block ---------- */
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; text-align: center; overflow-x: auto; box-shadow: var(--shadow-sm); }
.formula .label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.formula.accent { border-color: color-mix(in srgb, var(--violet) 35%, transparent); background: var(--violet-soft); }

/* ---------- Worked example ---------- */
.worked { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 20px 18px; margin: 22px 0; box-shadow: var(--shadow-sm); }
.worked > .w-head { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--teal); padding: 14px 0 10px; border-bottom: 1px dashed var(--line-2); margin-bottom: 6px; }
.worked > .w-head .pill { font-size: 11px; background: var(--teal-soft); color: var(--teal); padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 8px 0 0; }
.steps > li { counter-increment: step; position: relative; padding: 8px 0 8px 38px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 7px; width: 24px; height: 24px; background: var(--accent); color: #fff; border-radius: 7px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.result { margin-top: 12px; padding: 10px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); font-weight: 600; color: var(--accent-ink); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 16px; margin: 20px 0; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: .18s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-2); }
.card h4 { margin: 0 0 6px; font-size: 15.5px; color: var(--ink); }
.card .ic { font-size: 22px; display: block; margin-bottom: 8px; }
.card p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--surface); }
thead th { background: var(--surface-2); text-align: left; font-weight: 700; color: var(--ink); padding: 11px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
table code { white-space: nowrap; }

/* ---------- Code ---------- */
code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-soft); }
pre { background: #0e1320; color: #e6edf3; border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; margin: 18px 0; border: 1px solid #1e2636; box-shadow: var(--shadow-sm); font-size: 13.5px; line-height: 1.6; }
pre code { background: none; border: none; padding: 0; color: inherit; }
.tok-c { color: #7d8aa3; font-style: italic; } /* comment */
.tok-k { color: #ff9d6b; } /* keyword */
.tok-f { color: #7ee0c0; } /* function */
.tok-s { color: #c3e88d; } /* string */
.tok-n { color: #82aaff; } /* number */

/* ---------- Mermaid diagram ---------- */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 22px 0; text-align: center; box-shadow: var(--shadow-sm); overflow-x: auto; }
/* .mermaid is a <pre>; reset the dark code-block styling so the transparent SVG
   sits on the light .diagram card (the dark pre bg was bleeding through). */
.mermaid { background: transparent; border: none; box-shadow: none; padding: 0; margin: 0; color: inherit; font-family: var(--font-sans); overflow: visible; }
.diagram .mermaid { display: flex; justify-content: center; }
.diagram .cap { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- Self-check (details) ---------- */
.quiz { border: 1px solid var(--line); border-left: 4px solid var(--violet); border-radius: var(--radius-sm); background: var(--violet-soft); margin: 18px 0; padding: 0 16px; }
.quiz summary { cursor: pointer; font-weight: 650; color: var(--violet); padding: 13px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.quiz summary::-webkit-details-marker { display: none; }
.quiz summary::before { content: "?"; width: 22px; height: 22px; background: var(--violet); color: #fff; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.quiz[open] summary::before { content: "✓"; background: var(--teal); }
.quiz .ans { padding: 0 0 14px 30px; color: var(--ink-soft); }

/* ---------- Pager ---------- */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { flex: 1; max-width: 48%; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); transition: .15s; box-shadow: var(--shadow-sm); }
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pager .dir { font-size: 12px; color: var(--muted); font-weight: 600; }
.pager .ttl { font-weight: 650; color: var(--ink); margin-top: 2px; }
.pager a.next { text-align: right; margin-left: auto; }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 20px 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding: 22px 18px 70px; }
  .sidebar { display: none; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Topbar: brand + theme toggle stay; in-page section jumps are dropped so the
     bar never overflows. Page links (Syllabus, All modules) remain. */
  .topbar { gap: 8px; padding: 10px 14px; }
  .topbar .brand { font-size: 14.5px; white-space: nowrap; }
  .topbar a.home { white-space: nowrap; }
  .topbar a.home[href^="#"] { display: none; }
  .home { padding: 8px 16px 72px; }
  .exam-page { padding: 22px 15px 80px; }
  /* Practice-test score bar wraps; progress track drops to its own line. */
  .scorebar { flex-wrap: wrap; border-radius: 14px; padding: 10px 14px; gap: 8px 12px; }
  .scorebar .s-track { flex: 1 1 100%; order: 3; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 27px; }
  .pager { flex-direction: column; }
  .pager a, .pager a.next { max-width: 100%; text-align: left; }
}

/* ============================================================
   Home / landing page
   ============================================================ */
.home { max-width: 1120px; margin: 0 auto; padding: 8px 24px; }
.home-hero { text-align: center; padding: 54px 16px 26px; }
.home-hero .kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; }
.home-hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -.035em; margin: 20px 0 14px; background: linear-gradient(120deg, var(--ink) 30%, var(--accent) 75%, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero p.sub { font-size: 19px; color: var(--ink-soft); max-width: 62ch; margin: 0 auto; }
.stat-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 30px 0 6px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 22px; min-width: 120px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(135deg, var(--accent), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.section { margin: 56px 0 0; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.section-head p { color: var(--muted); margin: 0; font-size: 15.5px; }

.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.module-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: .18s; position: relative; overflow: hidden; }
.module-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--accent), var(--teal)); opacity: 0; transition: .18s; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.module-card:hover::before { opacity: 1; }
.mc-top { display: flex; align-items: center; gap: 12px; }
.mc-num { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.mc-title { font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; line-height: 1.25; }
.mc-desc { color: var(--muted); font-size: 14px; margin: 0; }
.mc-tag { align-self: flex-start; margin-top: auto; font-size: 11.5px; font-weight: 600; color: var(--teal); background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent); padding: 3px 10px; border-radius: 999px; }

.part-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.part-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; box-shadow: var(--shadow-sm); }
.part-card .pc-letter { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.part-card .pc-marks { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0; }
.part-card .pc-name { font-weight: 650; margin-bottom: 6px; }
.part-card .pc-desc { color: var(--muted); font-size: 13.5px; }

.test-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.test-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), transparent); padding: 20px 22px; box-shadow: var(--shadow-sm); transition: .18s; }
.test-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.test-card .tc-ic { flex: none; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--teal)); display: grid; place-items: center; font-size: 22px; color: #fff; }
.test-card .tc-title { font-weight: 700; font-size: 17px; }
.test-card .tc-sub { color: var(--muted); font-size: 13.5px; }

@media (max-width: 720px) {
  .module-grid, .part-grid, .test-grid { grid-template-columns: 1fr; }
}

/* KaTeX sizing */
.katex { font-size: 1.05em; }
.formula .katex-display { margin: 0; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }

/* ============================================================
   Practice-test (exam) components
   ============================================================ */
.exam-page { margin: 0 auto; padding: 28px 22px 90px; }
.exam-part { margin: 40px 0 10px; padding: 18px 22px; border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), transparent); border: 1px solid var(--line); }
.exam-part h2 { margin: 0 0 4px; padding: 0; }
.exam-part h2::before { display: none; }
.exam-part .meta { color: var(--muted); font-size: 14px; font-weight: 600; }
.scorebar { position: sticky; top: 56px; z-index: 40; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; margin: 14px 0 26px; box-shadow: var(--shadow-sm); font-weight: 600; font-size: 14px; }
.scorebar .s-val { color: var(--accent); font-variant-numeric: tabular-nums; }
.scorebar .s-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.scorebar .s-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .35s ease; }
.scorebar button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-soft); border-radius: 8px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.scorebar button:hover { border-color: var(--accent); color: var(--accent); }

.q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; margin: 16px 0; box-shadow: var(--shadow-sm); }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-num { font-weight: 700; color: var(--accent); font-size: 14px; }
.q-marks { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 9px; font-weight: 600; }
.q-text { margin: 4px 0 14px; font-weight: 500; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.opt { display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; transition: .14s; background: var(--surface); }
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.opt .mark { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); background: var(--surface-2); }
.opts.locked .opt { cursor: default; }
.opts.locked .opt:hover { background: var(--surface); border-color: var(--line-2); }
.opt.correct { border-color: var(--teal); background: var(--teal-soft); }
.opt.correct .mark { background: var(--teal); color: #fff; border-color: var(--teal); }
.opt.wrong { border-color: var(--rose); background: var(--rose-soft); }
.opt.wrong .mark { background: var(--rose); color: #fff; border-color: var(--rose); }
.solution { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 3px solid var(--teal); font-size: 14.5px; color: var(--ink-soft); display: none; }
.solution.show { display: block; }
.solution strong { color: var(--teal); }
.final-score { display: none; margin: 30px 0; padding: 24px; text-align: center; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.final-score.show { display: block; }
.final-score .big { font-size: 42px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(135deg, var(--accent), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
