:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101313;
  color: #f0f3ed;
  --base: #101313;
  --panel: #191e1d;
  --border: #343d38;
  --muted: #a8b3ab;
  --mint: #c0f78a;
  --red: #ffb6ab;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
button:disabled { cursor: default; }
a { color: inherit; }
.shell { max-width: 1120px; padding: 0 clamp(20px, 5vw, 56px); margin: 0 auto; }
.mast { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 720; text-decoration: none; }
.mark { display: inline-grid; width: 28px; height: 28px; place-items: center; background: var(--mint); color: var(--base); border-radius: 8px; font-size: 1.15rem; line-height: 1; }
.meta, .code, .percent, .count, kbd { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: .85rem; }
.intro { padding: clamp(38px, 8vw, 96px) 0 28px; }
h1, h2, p { margin: 0; }
.intro h1 { font-size: clamp(2.85rem, 7vw, 6.25rem); letter-spacing: -.085em; line-height: .98; font-weight: 730; }
.tabs { display: flex; border-bottom: 1px solid var(--border); gap: 28px; }
.tab { background: none; color: var(--muted); border: 0; padding: 14px 1px 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 680; }
.tab[aria-selected=true] { color: var(--mint); border-bottom-color: var(--mint); }
.deck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 0 42px; }
.lecture { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; text-decoration: none; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; min-height: 108px; padding: 16px 17px; transition: border-color 160ms ease, background 160ms ease; }
.lecture:hover { border-color: #769167; background: #202820; }
.lecture-copy { display: grid; gap: 6px; }
.code { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .045em; }
.lecture-title { font-size: 1.03rem; font-weight: 690; line-height: 1.3; }
.lecture-action { border: 1px solid #41513e; background: #222f20; border-radius: 99px; padding: 6px 10px; color: var(--mint); font-size: .8rem; white-space: nowrap; }
.quiz { min-height: 100svh; max-width: 1220px; padding: 0 clamp(16px, 5vw, 60px); margin: auto; display: flex; flex-direction: column; }
.quiz-top { min-height: 72px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.back { text-decoration: none; color: var(--muted); font-weight: 650; display: inline-flex; align-items: center; gap: 9px; width: fit-content; }
.back:hover { color: var(--mint); }
.back span { font-size: 1.4rem; line-height: .9; transform: translateY(-1px); }
.quiz-stats { display: flex; align-items: center; gap: clamp(10px, 2vw, 25px); color: var(--muted); white-space: nowrap; font-size: .84rem; }
.quiz-stats strong { color: var(--mint); font-weight: 650; }
.progress { height: 3px; background: var(--border); overflow: hidden; border-radius: 99px; }
.progress > div { background: var(--mint); height: 100%; transition: width 180ms ease; }
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(100%, 1000px); margin: 0 auto; padding: clamp(26px, 5vh, 70px) 0; }
.context { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .875rem; margin-bottom: 15px; }
.kind { border: 1px solid #496041; background: #1c291c; color: var(--mint); padding: 4px 9px; border-radius: 99px; font-size: .8rem; }
.kind.analysis { border-color: #625776; background: #2b2335; color: #e2c9ff; }
.stage h1 { font-size: clamp(1.9rem, 4.3vw, 3.85rem); line-height: 1.07; letter-spacing: -.056em; font-weight: 720; text-wrap: pretty; }
.stage h1.long { font-size: clamp(1.75rem, 3.7vw, 3.2rem); }
.options { list-style: none; padding: 0; margin: clamp(20px, 4vh, 32px) 0 0; display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 13px; min-height: 52px; padding: 9px 14px; width: 100%; color: inherit; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; text-align: left; font-size: clamp(1rem, 1.75vw, 1.15rem); line-height: 1.32; }
.option:not(:disabled):hover { background: #232d24; border-color: #829a74; }
.option kbd { font-size: .9rem; color: var(--muted); min-width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #455047; border-radius: 7px; }
.option.right { color: var(--mint); border-color: #6f9d52; background: #202d1e; }
.option.right kbd { color: var(--base); background: var(--mint); border-color: var(--mint); }
.option.wrong { color: var(--red); border-color: #995c54; background: #2b1e1d; }
.option.wrong kbd { color: var(--base); background: var(--red); border-color: var(--red); }
.feedback { display: grid; gap: 5px; padding: 16px 0 0; font-size: 1rem; line-height: 1.46; }
.feedback strong { color: var(--mint); }
.feedback.bad strong { color: var(--red); }
.feedback p { color: var(--muted); }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 19px; }
.question-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.primary, .secondary { border-radius: 10px; padding: 11px 16px; display: inline-block; text-decoration: none; font-weight: 680; }
.primary { background: var(--mint); color: #151d12; border: 1px solid var(--mint); }
.primary:hover { background: #d9ffb0; }
.secondary { color: var(--muted); background: transparent; border: 1px solid var(--border); }
.secondary:hover { color: #fff; border-color: #768479; }
.keyboard { color: var(--muted); font-size: .82rem; }
.summary { display: grid; align-content: center; gap: 18px; }
.summary .result-numbers { display: flex; gap: clamp(15px, 4vw, 42px); margin: 8px 0; flex-wrap: wrap; }
.result-numbers div { display: grid; gap: 4px; color: var(--muted); }
.result-numbers strong { font-size: clamp(2rem, 5vw, 3.1rem); color: var(--mint); letter-spacing: -.05em; }
.summary .controls { justify-content: flex-start; flex-wrap: wrap; }
.storage-note { color: #f3c891; font-size: .875rem; padding: 12px 0; }
[hidden] { display: none !important; }
@media (max-width: 620px) {
  .deck { grid-template-columns: 1fr; }
  .mast { min-height: 62px; }
  .quiz-top { min-height: 61px; }
  .stage { justify-content: flex-start; }
  .keyboard { display: none; }
  .option { padding: 9px 10px; }
  .option kbd { height: 25px; min-width: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
