/* Deck design tokens, version 2 ("Dark cyber, vivid"; opens light): fonts, colors, type scale, space and motion.
   Light values on :root (light is the default, whatever the system prefers: a user decision), dark values under :root[data-theme="dark"].
   The @media print block repeats the light values, so print is always light, from either theme (tools/check_palette.mjs checks that the two
   blocks agree). Format rule for tools/check_palette.mjs: one "--name: #rrggbb;" per color, inside the blocks below.
   No other file in the deck may contain a color literal (the palette check greps for them); glows and washes are
   color-mix() of tokens. The values come from the design spec, section 3 (scripts/palette_tokens.json there). */

/* ---- fonts (OFL-1.1, copied from the paper viewer) ---- */
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Charis SIL"; font-style: italic; font-weight: 400; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Charis SIL"; font-style: italic; font-weight: 400; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Charis SIL"; font-style: italic; font-weight: 700; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Charis SIL"; font-style: italic; font-weight: 700; font-display: swap; src: url("../vendor/fonts/charis-sil-latin-ext-700-italic.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../vendor/fonts/inter-greek-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("../vendor/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("../vendor/fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  /* surfaces */
  --bg: #f5f7fb;           /* the stage (near-black in the dark theme) */
  --bg-deep: #e9edf5;      /* outside the stage, shadows */
  --surface: #ffffff;      /* cards, diagram nodes, tables */
  --surface-2: #eaeef6;    /* wells: observations, table heads, tracks */
  --surface-3: #dfe5f0;    /* raised details inside cards (illustration fills) */
  /* ink */
  --ink: #090d1a;
  --ink-2: #343d55;
  --ink-3: #525c74;        /* muted text: footer, ticks, field labels */
  /* rules */
  --rule: #dbe0ea;         /* hairlines (decorative) */
  --rule-2: #c3cada;       /* card outlines (decorative) */
  --rule-3: #6c768e;       /* borders that carry meaning (3:1) */
  --line: #5d667d;         /* diagram edges, chart axes (3:1) */
  --neutral: #666f84;      /* the neutral "before" bar, muted blocks, finished progress (3:1) */
  /* accent: magenta. "The current one": current build, model node, citation chips, the fine-tuned column. Never the only sign. */
  --accent: #b60587;
  --accent-ink: #a0047a;   /* magenta text: citation chips, reference labels */
  --accent-wash: #fbe4f3;
  --on-accent: #ffffff;
  /* eras of part 1 (Okabe-Ito blue, orange, bluish green, more saturated). Always with the era's icon and name. */
  --era-1: #084dbf;
  --era-2: #d94a00;
  --era-3: #1a8a51;
  /* chart series (Okabe-Ito blue, orange, bluish green, ink). Always with a marker shape, a dash and a direct label. */
  --series-1: #084dbf;
  --series-2: #d94a00;
  --series-3: #1a8a51;
  --series-4: #090d1a;
  /* status: orange for "what can go wrong" (with an icon and the heading); bluish-green ink for the presenter's sync status */
  --ok-ink: #00704f;
  --bad: #d94a00;
  --bad-ink: #a83a00;
  /* one color per part: decoration only (texture, glow, eyebrow, footer mark, progress); never codes data */
  --part-0: #006a82;       /* cyan: opening, close, references */
  --part-1: #925400;       /* saturated amber: part 1 (5.6:1 flat on --bg, 6.0 on --surface; plan 02 P19) */
  --part-2: #5a3dd4;       /* violet: part 2 */
  --part-3: #0a6a36;       /* green: part 3 */

  /* derived (no literals): glows, washes and shadows */
  --part: var(--part-0);   /* the current slide's part color; .slide[data-part] sets it per slide */
  --glow-accent: color-mix(in oklab, var(--accent) 55%, transparent);
  --glow-part: color-mix(in oklab, var(--part) 45%, transparent);
  --wash-part: color-mix(in oklab, var(--part) 12%, var(--surface));
  --halo: .14;             /* opacity of the wide under-stroke that makes a neon line */
  --rule-card: color-mix(in oklab, var(--rule-3) 25%, var(--rule-2));   /* decorative card outline, a little darker than --rule-2 (which keeps drawing grid lines and art): a wash by the deck check's rule */
  --shadow-1: 0 1px 0 color-mix(in oklab, var(--bg-deep) 60%, transparent);
  --shadow-2: 0 18px 50px -28px color-mix(in oklab, var(--ink) 40%, transparent), 0 0 0 1px var(--rule-2);
  --scrim: color-mix(in oklab, var(--ink) 62%, transparent);
  /* background layer budget (design section 6.3): texture opacity by slide kind, and the glow's most */
  --tex-loud: .08; --tex-quiet: .06; --tex-faint: .022; --tex-data: .012;   /* light: a livelier texture on ordinary slides (plan 02 X1), still faint behind charts and data */
  --glow-max: .10;

  /* type. The vendored faces come first, so the deck looks the same on any lecture-hall computer. */
  --font-display: "Charis SIL", Charter, "Bitstream Charter", Georgia, serif;
  --font-serif: var(--font-display);   /* statement sentences only */
  --font-sans: "Inter Variable", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* sizes in stage px (the stage is 1920 x 1080 and is scaled as a whole) */
  --fs-display: 98px;     /* title slide */
  --fs-numeral: 250px;    /* part opener numeral */
  --fs-statement: 68px;   /* the one sentence of a statement slide */
  --fs-title: 58px;       /* slide title */
  --fs-lead: 40px;        /* subtitle, lead line */
  --fs-body: 32px;        /* body text */
  --fs-body-min: 28px;    /* smallest body text (requirement: 28) */
  --fs-label: 26px;       /* labels in visuals */
  --fs-label-min: 22px;   /* smallest label: chart ticks, footer, citation chips (requirement: 22) */
  --fs-eyebrow: 24px;

  /* space: an 8 px grid on the stage */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --pad-x: 120px;         /* left and right margin of every slide */
  --pad-top: 96px;
  --pad-bottom: 120px;    /* leaves room for the footer and the progress bar */
  --r1: 8px; --r2: 14px; --r3: 22px;

  /* motion. Every duration and delay is a token; reduced motion (the system's, or the M switch) sets all of them but
     --d-drift to 0, so no transition starts, and the drift stops. */
  --d-ui: 160ms;          /* hover, overlay fade */
  --d-build: 380ms;       /* a build step appears */
  --d-slide: 560ms;       /* a content slide enters */
  --d-leave: 160ms;       /* the old slide leaves, quickly */
  --d-enter-delay: 160ms; /* the new slide waits at least as long as the old one takes to leave (plan 02 P9: --d-enter-delay >= --d-leave), so two slides are never both visible; an ordinary change takes at most 800 ms with it */
  --d-zoom: 900ms;        /* the part-opener zoom */
  --d-draw: 760ms;        /* an edge or a chart line draws itself */
  --d-bar: 720ms;         /* a bar or a span grows */
  --d-pop: 420ms;         /* a marker or a unit cell pops in */
  --stagger: 70ms;        /* delay between items that arrive together */
  --d-drift: 96s;         /* background drift: one pass of the texture */
  --drift-phase: 0;       /* capture mode: 0, .25, .5 or .75 picks the drift phase the texture is paused at */
  --shift-slide: 48px;
  --shift-build: 18px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);     /* expo out: entries */
  --ease-in: cubic-bezier(.5, 0, .75, 0);      /* exits */
  --ease-move: cubic-bezier(.65, 0, .35, 1);   /* lines that draw, drift */
  --ease-pop: cubic-bezier(.34, 1.4, .64, 1);  /* markers and cells only: a small overshoot */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #05070c;           /* the stage (near-black in the dark theme) */
  --bg-deep: #020306;      /* outside the stage, shadows */
  --surface: #0c111c;      /* cards, diagram nodes, tables */
  --surface-2: #131a29;    /* wells: observations, table heads, tracks */
  --surface-3: #1a2335;    /* raised details inside cards (illustration fills) */
  --ink: #f1f5ff;
  --ink-2: #bcc6dc;
  --ink-3: #97a3bd;        /* muted text: footer, ticks, field labels */
  --rule: #1a2132;         /* hairlines (decorative) */
  --rule-2: #2a3550;       /* card outlines (decorative) */
  --rule-3: #7482a9;       /* borders that carry meaning (3:1) */
  --line: #8a97b8;         /* diagram edges, chart axes (3:1) */
  --neutral: #7a86a6;      /* the neutral "before" bar, muted blocks, finished progress (3:1) */
  --accent: #ed1fb2;
  --accent-ink: #ff7bd5;   /* magenta text: citation chips, reference labels */
  --accent-wash: #2b0a24;
  --on-accent: #14020f;
  --era-1: #3d9bff;
  --era-2: #fe860f;
  --era-3: #17dca3;
  --series-1: #3d9bff;
  --series-2: #fe860f;
  --series-3: #17dca3;
  --series-4: #f1f5ff;
  --ok-ink: #4ff0bd;
  --bad: #fe860f;
  --bad-ink: #ffad6b;
  --part-0: #27e1ff;       /* cyan: opening, close, references */
  --part-1: #ffb020;       /* amber: part 1 */
  --part-2: #a58bff;       /* violet: part 2 */
  --part-3: #3cf58c;       /* green: part 3 */
  --halo: .26;
  --shadow-1: 0 1px 0 color-mix(in oklab, var(--bg-deep) 60%, transparent);
  --shadow-2: 0 18px 60px -24px var(--bg-deep), 0 0 0 1px var(--rule-2);
  --scrim: color-mix(in oklab, var(--bg-deep) 78%, transparent);
  --tex-loud: .10; --tex-quiet: .05; --tex-faint: .03; --tex-data: .02;
  --glow-max: .08;
  color-scheme: dark;
}
/* Print always uses the light theme, whatever the screen shows (plan amendment R2): the light values again, so the
   page prints light from a dark session. check_palette verifies that this block and the light block agree. */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #f5f7fb;
  --bg-deep: #e9edf5;
  --surface: #ffffff;
  --surface-2: #eaeef6;
  --surface-3: #dfe5f0;
  --ink: #090d1a;
  --ink-2: #343d55;
  --ink-3: #525c74;
  --rule: #dbe0ea;
  --rule-2: #c3cada;
  --rule-3: #6c768e;
  --line: #5d667d;
  --neutral: #666f84;
  --accent: #b60587;
  --accent-ink: #a0047a;
  --accent-wash: #fbe4f3;
  --on-accent: #ffffff;
  --era-1: #084dbf;
  --era-2: #d94a00;
  --era-3: #1a8a51;
  --series-1: #084dbf;
  --series-2: #d94a00;
  --series-3: #1a8a51;
  --series-4: #090d1a;
  --ok-ink: #00704f;
  --bad: #d94a00;
  --bad-ink: #a83a00;
  --part-0: #006a82;
  --part-1: #925400;
  --part-2: #5a3dd4;
  --part-3: #0a6a36;
    --halo: .14;
    --shadow-2: 0 18px 50px -28px color-mix(in oklab, var(--ink) 40%, transparent), 0 0 0 1px var(--rule-2);
    color-scheme: light;
  }
}

/* Reduced motion, from the system or from the deck's own switch (key M). */
@media (prefers-reduced-motion: reduce) {
  :root { --d-ui: 0ms; --d-build: 0ms; --d-slide: 0ms; --d-leave: 0ms; --d-enter-delay: 0ms; --d-zoom: 0ms; --d-draw: 0ms; --d-bar: 0ms; --d-pop: 0ms; --stagger: 0ms; }
}
:root[data-motion="reduce"] { --d-ui: 0ms; --d-build: 0ms; --d-slide: 0ms; --d-leave: 0ms; --d-enter-delay: 0ms; --d-zoom: 0ms; --d-draw: 0ms; --d-bar: 0ms; --d-pop: 0ms; --stagger: 0ms; }
