/* ==========================================================================
   GWMS eLearning Engine — engine.css
   Palette contrast is checked against WCAG 2.1 AA (4.5:1 body, 3:1 UI).
   Measured ratios are noted beside each pairing.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Light surface set */
  --bg:          #FAF9F7;
  --surface:     #FFFFFF;
  --surface-2:   #F2EFEA;
  --ink:         #1B1A18;   /* on --bg  : 16.6:1 */
  --ink-muted:   #57534C;   /* on --bg  :  7.6:1 */
  --line:        #DFDAD2;
  --line-strong: #B9B2A8;   /* on --bg  :  3.1:1  (UI boundary) */
  --accent:      #A23A18;   /* on --bg  :  6.4:1 */
  --accent-ink:  #FFFFFF;   /* on accent:  6.7:1 */
  --accent-soft: #F7E9E3;
  --ok:          #1D5B3A;   /* on white :  8.1:1 */
  --ok-soft:     #E6F1EA;
  --no:          #96201C;   /* on --bg  :  8.0:1 */
  --no-soft:     #F9E7E6;
  --focus:       #1B1A18;

  --shadow: 0 1px 2px rgba(27,26,24,.05), 0 8px 24px -12px rgba(27,26,24,.22);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;

  --measure: 34rem;          /* ~66 characters */
  --pad: clamp(1rem, 4vw, 2.25rem);
  --radius: 10px;
  --tap: 44px;               /* minimum touch target */

  --leading: 1.62;
  --step: 1rem;
  --dur: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

/* Dark surface set — applied by media query or by explicit [data-theme] */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #141618;
    --surface:     #1D2023;
    --surface-2:   #262A2E;
    --ink:         #F0EEE9;   /* on --bg : 15.6:1 */
    --ink-muted:   #ABA49B;   /* on --bg :  7.4:1 */
    --line:        #32373B;
    --line-strong: #545B61;   /* on --bg :  3.2:1 */
    --accent:      #E58B60;   /* on --bg :  7.1:1 */
    --accent-ink:  #141618;   /* on accent: 7.1:1 */
    --accent-soft: #2C231E;
    --ok:          #7CCDA0;   /* on --bg :  9.4:1 */
    --ok-soft:     #1B2A22;
    --no:          #F0938D;   /* on --bg :  8.2:1 */
    --no-soft:     #2C1D1C;
    --focus:       #F0EEE9;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#141618; --surface:#1D2023; --surface-2:#262A2E;
  --ink:#F0EEE9; --ink-muted:#ABA49B; --line:#32373B; --line-strong:#545B61;
  --accent:#E58B60; --accent-ink:#141618; --accent-soft:#2C231E;
  --ok:#7CCDA0; --ok-soft:#1B2A22; --no:#F0938D; --no-soft:#2C1D1C;
  --focus:#F0EEE9;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.8);
}

/* Learner display preferences */
:root[data-text-size="large"]  { --step: 1.125rem; --measure: 32rem; }
:root[data-text-size="xlarge"] { --step: 1.28rem;  --measure: 30rem; }
:root[data-line-spacing="loose"] { --leading: 1.9; }
:root[data-typeface="legible"] {
  --font-body: "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif;
  --font-head: "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif;
}

@media (prefers-reduced-motion: reduce) { :root { --dur: 0ms; } }
:root[data-motion="reduced"] { --dur: 0ms; }

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* The UA rule for [hidden] is element-level, so any class that sets display
   (.btn, .reveal, …) would silently defeat it. Keep hidden meaning hidden. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--step)/var(--leading) var(--font-body);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.22; letter-spacing: -0.01em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
img, video, svg { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }

:where(a) { color: var(--accent); text-underline-offset: 3px; }

/* Focus: always visible, never removed */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
#main:focus { outline: none; }
#main:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: .5rem; top: -100vh; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1rem; border-radius: var(--radius); font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: .5rem; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar__inner {
  max-width: 62rem; margin: 0 auto;
  padding: .4rem max(.5rem, env(safe-area-inset-left)) .4rem max(.5rem, env(safe-area-inset-right));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem;
}
.appbar__title { text-align: center; min-width: 0; }
.appbar__eyebrow {
  display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted);
}
.appbar__name {
  display: block; font-family: var(--font-head); font-size: .98rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.iconbtn {
  display: inline-flex; flex-direction: column; align-items: center; gap: .1rem;
  min-width: var(--tap); min-height: var(--tap);
  padding: .35rem .5rem; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; cursor: pointer;
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn__glyph { display: flex; }
.iconbtn__label { font-size: .68rem; letter-spacing: .02em; color: var(--ink-muted); }

/* ---------- Progress ---------- */
.progress { height: 4px; background: var(--line); position: relative; }
.progress__fill {
  height: 100%; width: 0%; background: var(--accent);
  transition: width var(--dur) ease-out;
}

/* ---------- Stage ---------- */
.stage {
  flex: 1 0 auto; width: 100%;
  padding: var(--pad) max(var(--pad), env(safe-area-inset-left)) 2rem max(var(--pad), env(safe-area-inset-right));
}
.slide { max-width: var(--measure); margin: 0 auto; }
body.is-booting .slide { opacity: .6; }
.slide[data-enter] { animation: fade var(--dur) ease-out both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.loading { color: var(--ink-muted); }

/* Slide header */
.slide__eyebrow {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .5rem; font-weight: 600;
}
.slide__title { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.1rem); margin-bottom: .7em; }
.slide__title:focus { outline: none; }
.slide__title:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

/* ---------- Body blocks ---------- */
.block-lead { font-size: 1.12em; color: var(--ink); }
.block-list { padding-left: 1.15em; margin: 0 0 1em; }
.block-list li { margin-bottom: .4em; }
.block-quote {
  margin: 0 0 1.25em; padding: .1em 0 .1em 1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-head); font-size: 1.1em; color: var(--ink);
}
.block-quote cite { display: block; font: 400 .8rem/1.4 var(--font-body); color: var(--ink-muted); font-style: normal; margin-top: .5em; }
.callout {
  margin: 0 0 1.25em; padding: .9rem 1rem;
  background: var(--surface-2); border-radius: var(--radius);
  border-left: 3px solid var(--line-strong);
}
.callout > :last-child { margin-bottom: 0; }
.callout__label {
  display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700; margin-bottom: .35rem;
}

/* Figures */
.figure { margin: 0 0 1.5rem; }
.figure__frame {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.figure img { display: block; width: 100%; }
.figure figcaption { font-size: .82rem; color: var(--ink-muted); margin-top: .55rem; }
.credit { font-size: .74rem; color: var(--ink-muted); margin-top: .35rem; }
.credit b { font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap); padding: .6rem 1.15rem;
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-muted); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn--wide { width: 100%; }

.linkbtn {
  background: none; border: 0; padding: .5rem .25rem; min-height: var(--tap);
  color: var(--accent); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Slide nav bar ---------- */
.slidebar {
  position: sticky; bottom: 0; z-index: 15;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.slidebar__inner {
  max-width: 62rem; margin: 0 auto;
  padding: .55rem max(.75rem, env(safe-area-inset-left)) .55rem max(.75rem, env(safe-area-inset-right));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem;
}
.slidebar__inner > :first-child { justify-self: start; }
.slidebar__inner > :last-child { justify-self: end; }
.slidebar__status {
  margin: 0; font-size: .78rem; color: var(--ink-muted); text-align: center;
}
.slidebar__gate {
  margin: 0; padding: 0 1rem .6rem; text-align: center;
  font-size: .82rem; color: var(--accent);
}

/* ---------- Alternate representations (differentiation) ---------- */
.altbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin: 0 0 1.5rem; padding: .45rem; border: 1px solid var(--line);
  background: var(--surface); border-radius: var(--radius);
}
.altbar__label {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700; padding: 0 .5rem; margin: 0;
}
.altbar__opts { display: flex; flex-wrap: wrap; gap: .25rem; }
.altbar__opts label { position: relative; }
.altbar__opts input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.altbar__opts span {
  display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .8rem;
  border-radius: 999px; border: 1px solid var(--line-strong); font-size: .85rem; font-weight: 600;
  color: var(--ink-muted); cursor: pointer;
}
.altbar__opts input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.altbar__opts input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.media-note { font-size: .82rem; color: var(--ink-muted); }
.media-error {
  padding: .8rem 1rem; border-radius: var(--radius);
  background: var(--no-soft); color: var(--no); font-size: .88rem;
}
audio { width: 100%; margin-bottom: .75rem; }

/* ---------- Video ---------- */
.videowrap {
  position: relative; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); margin-bottom: .75rem;
}
.videowrap--embed { aspect-ratio: 16 / 9; }
.videowrap--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.videowrap video { display: block; width: 100%; }

/* ---------- Disclosure / reveal ---------- */
.reveal { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .85rem; background: var(--surface); }
.reveal__btn {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  min-height: var(--tap); padding: .8rem 1rem;
  background: none; border: 0; border-radius: var(--radius);
  text-align: left; font-weight: 600; cursor: pointer;
}
.reveal__btn:hover { background: var(--surface-2); }
.reveal__marker {
  flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-size: .9rem; line-height: 1;
  transition: transform var(--dur) ease-out, background var(--dur), color var(--dur);
}
.reveal__btn[aria-expanded="true"] .reveal__marker {
  transform: rotate(45deg); background: var(--accent); color: var(--accent-ink);
}
.reveal__panel { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.reveal__panel > :first-child { margin-top: 1rem; }
.reveal__panel > :last-child { margin-bottom: 0; }
.reveal__panel[hidden] { display: none; }
.reveal__done { margin-left: auto; font-size: .72rem; color: var(--ok); font-weight: 700; }

/* ---------- Assessment shared ---------- */
.assess {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1rem 1.1rem 1.1rem; margin: 0 0 1.25rem;
  box-shadow: var(--shadow);
}
.assess__kind {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700; margin: 0 0 .5rem;
}
.assess__q { font-family: var(--font-head); font-size: 1.15em; margin: 0 0 1rem; padding: 0; border: 0; }
fieldset.assess__set { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Choice list — native radios/checkboxes for full keyboard support */
.choices { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.choice { position: relative; }
.choice > input { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); margin: 0; }
.choice > label {
  display: block; min-height: var(--tap); padding: .8rem 1rem .8rem 2.65rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); cursor: pointer;
}
.choice > label:hover { background: var(--surface-2); }
.choice > input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.choice > input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice > input:disabled + label { cursor: default; }
.choice[data-state="correct"] > label { border-color: var(--ok); background: var(--ok-soft); }
.choice[data-state="incorrect"] > label { border-color: var(--no); background: var(--no-soft); }
.choice__mark { font-weight: 700; }
.choice[data-state="correct"] .choice__mark { color: var(--ok); }
.choice[data-state="incorrect"] .choice__mark { color: var(--no); }
.choice__why { display: block; margin-top: .4rem; font-size: .86rem; color: var(--ink-muted); }

.feedback { padding: .85rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; }
.feedback--ok { background: var(--ok-soft); border: 1px solid var(--ok); }
.feedback--no { background: var(--no-soft); border: 1px solid var(--no); }
.feedback__head { font-weight: 700; margin: 0 0 .3rem; }
.feedback--ok .feedback__head { color: var(--ok); }
.feedback--no .feedback__head { color: var(--no); }
.feedback > :last-child { margin-bottom: 0; }
.assess__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Reflection */
.reflect__field { display: block; }
.reflect__hint { display: block; font-size: .86rem; color: var(--ink-muted); margin: 0 0 .6rem; }
.reflect textarea {
  width: 100%; min-height: 8.5rem; padding: .8rem .9rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); resize: vertical;
}
.reflect textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.reflect__group { margin-bottom: 1.15rem; }
.reflect__group:last-of-type { margin-bottom: 0; }
.reflect__group .assess__q { font-size: 1em; margin-bottom: .4rem; }
.reflect__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .75rem; }
.reflect__saved { font-size: .82rem; color: var(--ok); font-weight: 600; }
.sendstatus { margin: .75rem 0 0; font-size: .9rem; font-weight: 600; }
.sendstatus--sending { color: var(--ink-muted); }
.sendstatus--sent, .sendstatus--handed { color: var(--ok); }
.sendstatus--queued, .sendstatus--local { color: var(--ink-muted); font-weight: 400; }

.privacy-note { font-size: .78rem; color: var(--ink-muted); margin: .75rem 0 0; }

/* Branch */
.branch__opts { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.branch__btn {
  width: 100%; text-align: left; min-height: var(--tap);
  padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: .75rem;
}
.branch__btn:hover { background: var(--surface-2); border-color: var(--accent); }
.branch__btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.branch__idx {
  flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem;
  background: var(--surface-2); color: var(--ink-muted);
}
.branch__btn:hover .branch__idx, .branch__btn[aria-pressed="true"] .branch__idx { background: var(--accent); color: var(--accent-ink); }
.branch__sub { display: block; font-weight: 400; font-size: .86rem; color: var(--ink-muted); margin-top: .2rem; }

/* ---------- Dialogs ---------- */
.sheet {
  width: min(34rem, 100vw); max-width: 100vw;
  max-height: 88svh; padding: 0; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(10,10,10,.45); }
.sheet__head {
  position: sticky; top: 0; z-index: 2; background: var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem .75rem; border-bottom: 1px solid var(--line);
}
.sheet__head h2 { margin: 0; font-size: 1.15rem; }
.closebtn {
  min-height: var(--tap); padding: .5rem .9rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; font-weight: 600;
}
.closebtn:hover { background: var(--surface-2); }
.sheet__body { padding: 1rem 1.15rem 1.5rem; overflow-y: auto; }
.sheet__intro { color: var(--ink-muted); font-size: .9rem; }
.sheet__foot {
  display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;
  margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--line);
}

@media (max-width: 480px) {
  .sheet {
    width: 100vw; max-height: 92svh; margin: auto 0 0; border-radius: 14px 14px 0 0;
    border-bottom: 0;
  }
}

/* Menu (scene/slide list) */
.menu-scene { margin-bottom: 1.25rem; }
.menu-scene__title {
  font-size: .72rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700; margin: 0 0 .5rem;
}
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.menu-item {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  min-height: var(--tap); padding: .6rem .7rem;
  border: 1px solid transparent; border-radius: var(--radius);
  background: none; text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.menu-item__dot {
  flex: 0 0 auto; width: .6rem; height: .6rem; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: transparent;
}
.menu-item[data-visited="true"] .menu-item__dot { background: var(--accent); border-color: var(--accent); }
.menu-item__text { flex: 1 1 auto; min-width: 0; }
.menu-item__type { font-size: .7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .07em; }

/* Preferences */
.prefset { border: 0; padding: 0; margin: 0 0 1.35rem; min-width: 0; }
.prefset legend { padding: 0; font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .5rem; }
.segmented { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: .45rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem;
}
.segmented input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Info sheet content */
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.info-list li { padding-bottom: .85rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list b { display: block; }
.issue { display: grid; gap: .2rem; padding: .7rem .85rem; border-radius: var(--radius); font-size: .88rem; }
.issue--error { background: var(--no-soft); border-left: 3px solid var(--no); }
.issue--warn { background: var(--surface-2); border-left: 3px solid var(--line-strong); }
.issue__where { font-size: .74rem; color: var(--ink-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tally { display: flex; gap: 1.25rem; margin: 0 0 1rem; }
.tally b { display: block; font-family: var(--font-head); font-size: 1.6rem; }
.tally span { font-size: .75rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }

/* Fatal load error */
.fatal { max-width: var(--measure); margin: 0 auto; }
.fatal pre {
  background: var(--surface-2); padding: .9rem 1rem; border-radius: var(--radius);
  overflow-x: auto; font-size: .85rem; border: 1px solid var(--line);
}

/* Print — text path for the whole course */
@media print {
  .appbar, .slidebar, .sheet, .skip-link, .altbar { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal__panel[hidden] { display: block !important; }
}
