/* Revision-guide skin. Load after lesson.css. Same content and interactions, printed-book look:
   warm paper, serif reading text, numbered sections, questions numbered in the margin with marks,
   ruled answer lines, examiner tips as margin notes, simulations as numbered figures. */
:root {
  --paper: #FBF9F4; --surface: #FBF9F4; --ink: #17181C; --muted: #5B5B60; --rule: #DCD6C8; --soft: #F1EDE3;
  --accent: #1E3A8A; --accent-soft: #E6EAF5; --band: transparent;
  --pen: #B3321C; --pen-soft: transparent;
  --serif: "STIX Two Text", Georgia, "Times New Roman", serif;
  --r: 2px;
}
/* A printed guide is always on paper: keep the light page even when the device is in dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #FBF9F4; --surface: #FBF9F4; --ink: #17181C; --muted: #5B5B60; --rule: #DCD6C8; --soft: #F1EDE3; --accent: #1E3A8A; --accent-ink: #FFFFFF; --accent-soft: #E6EAF5; --band: transparent; --signal: #A86400; --ok: #16794A; --ok-soft: #E2F2E9; --no: #B42318; --no-soft: #FBE9E7; --pen: #B3321C; --pen-soft: transparent; --bench: #0C1526; --bench-2: #121E35; --bench-line: #22314D; color-scheme: light; }
}
:root[data-theme="dark"] { --paper: #FBF9F4; --surface: #FBF9F4; --ink: #17181C; --muted: #5B5B60; --rule: #DCD6C8; --soft: #F1EDE3; --accent: #1E3A8A; --accent-ink: #FFFFFF; --accent-soft: #E6EAF5; --band: transparent; --signal: #A86400; --ok: #16794A; --ok-soft: #E2F2E9; --no: #B42318; --no-soft: #FBE9E7; --pen: #B3321C; --pen-soft: transparent; --bench: #0C1526; --bench-2: #121E35; --bench-line: #22314D; color-scheme: light; }

body { font-family: var(--serif); font-size: 1.12rem; line-height: 1.62; }
.tb, .tb-nav a, .crumbs, .eyebrow, .ltabs, .rail, .b, .chip, .seg, .qhead, .qact, .opt .ol, .bench, .listen, .prac-bar, .lmeta, .tool, .ex-h, .tip-tag, .key-l, .qhint .lab, .fbx b, .sec-n, table.info th { font-family: var(--font); }

/* top bar: a running header */
.tb { background: var(--paper); border-bottom: 1px solid var(--ink); }
.tb-el { background: var(--ink); color: var(--paper); border-radius: 0; }
.tb-nav a { border-radius: 0; padding: 7px 10px; }
.tb-nav a[aria-current] { background: none; box-shadow: inset 0 -2px 0 var(--ink); }

/* title band becomes a chapter opener */
.band { background: var(--paper); color: var(--ink); }
.band-in { border-bottom: 3px double var(--ink); padding-block: 34px 22px; }
.band h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem); }
.band .eyebrow { color: var(--accent); opacity: 1; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; }
.band .lede { font-style: italic; color: var(--muted); opacity: 1; }
.band :focus-visible { outline-color: var(--accent); }
.ltabs a { border: 0; border-radius: 0; padding: 6px 2px; margin-right: 18px; border-bottom: 2px solid transparent; }
.ltabs a:hover { border-bottom-color: var(--rule); }
.ltabs a[aria-current] { background: none; color: var(--ink); border-bottom-color: var(--ink); }
.band-stats dd { font-family: var(--serif); font-weight: 600; }

/* contents rail like a book's contents */
.rail a { font-family: var(--serif); font-size: 1rem; background: none; }
.rail-h, .outcomes .rail-h { font-family: var(--font); }
.outcomes ul { font-family: var(--serif); font-size: 0.95rem; }

/* section headings: big number, ruled underneath */
.lesson-main { gap: 56px; }
.sec-h { border-bottom: 2px solid var(--ink); padding-bottom: 8px; gap: 14px; }
.sec-n { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.sec-h h2 { font-weight: 750; }
.listen { border-radius: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; padding: 2px 0; }
.listen.on { background: none; color: var(--accent); }
.blk h3 { font-family: var(--font); }
.bul li::marker { color: var(--ink); }

/* key points and formulae: ruled boxes, no fills */
.key { background: none; border: 1.5px solid var(--ink); border-top-width: 1.5px; border-radius: 0; position: relative; padding-top: 20px; }
.key-l { position: absolute; top: -0.75em; left: 12px; background: var(--paper); padding: 0 6px; color: var(--ink); font-weight: 700; }
.blk-formula > * { background: none !important; border-radius: 0 !important; }

/* tables: book rules only */
table.info { background: none; border: 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
table.info th { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* examiner tips: margin notes */
.tip { background: none; border: 0; border-left: 3px solid var(--pen); border-radius: 0; padding: 4px 0 4px 16px; margin-top: 0; }
.tip-tag { position: static; display: inline-block; background: none; color: var(--pen); padding: 0; margin-bottom: 4px; font-weight: 700; }
.tip p { font-style: italic; }

/* worked examples: set out like a printed guide */
.ex { background: none; border: 0; border-top: 2px solid var(--accent); border-bottom: 1px solid var(--rule); border-radius: 0; padding: 14px 0 18px; }
.ex-tag { background: none; color: var(--accent); padding: 0; font-weight: 700; }
.ex-t { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.ex-done { background: none; border-left: 3px solid var(--ok); border-radius: 0; color: var(--ink); }
.working { background: none; }

/* questions: number in the margin, marks on the right, no cards */
.qcard { background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; padding: 18px 0 8px 2.6rem; position: relative; }
@media (min-width: 640px) { .qcard { padding: 22px 0 10px 3rem; } }
.qhead { min-height: 0; }
.qn { position: absolute; left: 0; top: 18px; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
@media (min-width: 640px) { .qn { top: 20px; } }
.qmeta { color: var(--muted); }
.qmarks { font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--ink); }
.blk-check .qcard { border: 1.5px dashed var(--rule); padding: 18px 18px 12px 3rem; }
.blk-check .qn { left: 14px; }
.qhint p { background: none; border-left: 3px solid var(--accent); border-radius: 0; padding: 4px 0 4px 14px; font-style: italic; }
.fbx { border-radius: 0; background: none !important; border-left: 3px solid currentColor; padding: 4px 0 4px 14px; }

/* answer options: lettered list, not tiles */
.opt { border: 0; border-bottom: 1px dotted var(--rule); border-radius: 0; background: none; padding: 9px 4px; }
.opt:hover:not(:disabled) { background: var(--soft); }
.opt .ol { border-radius: 50%; background: none; border: 1.5px solid var(--ink); }
.opts.grid .opt { border: 1px solid var(--rule); }
.opt.right, .opt.wrong { background: none; }
.opt.right { box-shadow: inset 3px 0 0 var(--ok); } .opt.wrong { box-shadow: inset 3px 0 0 var(--no); }

/* answers written on lines */
.numin, .expin, .unitsel, .gap, .wbox { border: 0 !important; border-bottom: 1.5px solid var(--ink) !important; border-radius: 0 !important; background: transparent !important; }
.numin:focus, .expin:focus, .unitsel:focus, .gap:focus, .wbox:focus { box-shadow: 0 2px 0 var(--accent) !important; }
textarea.wbox { background-image: repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px) !important; line-height: 32px; border-bottom: 0 !important; }

/* quieter controls */
.b { border-radius: 2px; padding: 7px 12px; font-size: 0.92rem; border-width: 1px; }
.b.ghost { border-color: var(--rule); background: none; }
.chip { border-radius: 2px; }
.seg button { border-radius: 0 !important; }

/* simulations: numbered figures */
.lesson-main { counter-reset: fig; }
.blk-sim, .blk-fig { counter-increment: fig; }
.blk-sim { padding: 10px; border: 1px solid var(--rule); background: var(--soft); }
.blk-sim .bench { border-radius: 0; }
.blk-sim::after { content: "Figure " counter(fig) ". Interactive: change the controls and watch what happens."; display: block; font-family: var(--font); font-size: 0.85rem; color: var(--muted); padding: 8px 2px 0; }
.blk-fig figcaption::before { content: "Figure " counter(fig) ". "; font-weight: 700; font-style: normal; }
.blk-fig figcaption { font-style: italic; }

/* practice page, home lists */
.prac-bar { background: var(--paper); border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; box-shadow: none; }
.lessons { background: none; border: 0; border-top: 2px solid var(--ink); border-radius: 0; }
.ltitle { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.tool { border-radius: 0; background: none; border-width: 1px; }
.gpop { border-radius: 2px; }
.blk-check .qn { position: static; font-family: var(--font); font-size: 1rem; }
.blk-check .qcard { padding-left: 18px; }
.tip-src { font-family: var(--font); font-style: normal; font-size: 0.78rem; }
.tip p.tip-src { font-style: normal; }
