/* ==========================================================================
   Slide runtime stylesheet — maximromanov.github.io/slides
   A fixed 1920×1080 stage, scaled to the window. Same tokens as the website.
   ========================================================================== */

@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../assets/fonts/Literata-normal-latin.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: "Literata"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../assets/fonts/Literata-normal-latin-ext.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: "Literata"; font-style: italic; font-weight: 300 900; font-display: swap; src: url("../assets/fonts/Literata-italic-latin.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: "Literata"; font-style: italic; font-weight: 300 900; font-display: swap; src: url("../assets/fonts/Literata-italic-latin-ext.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"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/Inter-normal-latin.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: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/Inter-normal-latin-ext.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: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../assets/fonts/JetBrainsMono-normal-latin.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: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../assets/fonts/JetBrainsMono-normal-latin-ext.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: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/Amiri-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --paper: #FFFFFF; --paper-2: #F3F0EA; --panel: #FAF8F4; --rule: #D6CBB9; --rule-soft: #E8E2D8;
  --ink: #1F1A15; --muted: #5F564B; --faint: #8B8174;
  --red: #B5140E; --red-soft: #D14A40; --red-wash: #F4E2DE; --gold: #B8923F;
  --navy: #1F3A5F; --navy-2: #2B4C7E;
  --f-text: "Literata", "Iowan Old Style", Georgia, serif;
  --f-head: var(--f-text);
  --w-text: 400; --w-head: 600; --ls-text: 0;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-ar: "Amiri", "Scheherazade New", "Noto Naskh Arabic", "Geeza Pro", serif;
  --stage-w: 1920; --stage-h: 1080;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #111; color: var(--ink); font-family: var(--f-text); font-weight: var(--w-text); letter-spacing: calc(var(--ls-text) * 1em); overflow: hidden; }
body.deck { -webkit-font-smoothing: antialiased; }

/* ---------- viewport and stage ---------- */
.viewport { position: fixed; inset: 0; display: grid; place-items: center; background: #111; }
.stage { position: relative; width: calc(var(--stage-w) * 1px); height: calc(var(--stage-h) * 1px); transform-origin: center center; background: var(--paper); box-shadow: 0 0 0 1px #000, 0 30px 80px rgba(0,0,0,.6); overflow: hidden; }

/* every slide is an absolutely positioned 1920×1080 layer; only .current is shown */
.slide { position: absolute; inset: 0; display: none; padding: 96px 120px 96px 200px; font-size: 40px; line-height: 1.4; }
.slide.current { display: block; animation: slide-in .38s cubic-bezier(.2,.7,.2,1) both; }
.slide.current.back { animation-name: slide-in-back; }
@keyframes slide-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
/* incremental reveal: .step elements appear one per keypress */
.slide .step { opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .35s ease; }
.slide .step.on { opacity: 1; transform: none; }
.slide .step.on.was { opacity: .55; }
/* staggered build for tiles when a slide appears */
.slide.current .stats > .stat, .slide.current .chain > .box, .slide.current .pills > .pill, .slide.current .agenda-li { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.slide.current .stats > :nth-child(2), .slide.current .chain > :nth-child(2), .slide.current .pills > :nth-child(2) { animation-delay: .12s; }
.slide.current .stats > :nth-child(3), .slide.current .chain > :nth-child(3), .slide.current .pills > :nth-child(3) { animation-delay: .24s; }
.slide.current .stats > :nth-child(4), .slide.current .chain > :nth-child(4), .slide.current .pills > :nth-child(4) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.slide.current h1::after { animation: rule-grow .6s .15s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rule-grow { from { width: 0; } }
.slide.current .punch { animation: fade .6s .3s both; }
@keyframes fade { from { opacity: 0; } }
.slide.figure.current .fig img, .slide.full.current img { animation: fade .5s both; }
.slide img.zoomable, .slide.figure .fig img { cursor: zoom-in; }
@media (prefers-reduced-motion: reduce) { .slide, .slide *, .slide::after { animation: none !important; transition: none !important; } .slide .step { opacity: 1; transform: none; } }
/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(255,255,255,.96); display: none; place-items: center; z-index: 40; cursor: zoom-out; }
.lightbox.on { display: grid; }
.lightbox img { max-width: 96vw; max-height: 96vh; width: auto; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.slide::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 56px; background: url("img/strip.png") center / cover; opacity: .95; }
.slide.no-strip::before, .slide.full::before, .slide.title::before, .slide.section::before { display: none; }
.slide::after { content: ""; position: absolute; left: 56px; top: 0; bottom: 0; width: 3px; background: var(--red); }
.slide.no-strip::after, .slide.full::after, .slide.title::after, .slide.section::after { display: none; }

/* grain, as on the site */
.stage::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; display: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.12 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.slide > * { position: relative; z-index: 1; }

/* ---------- typography ---------- */
.slide h1 { font-family: var(--f-head); font-weight: var(--w-head); font-size: 1.5em; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .65em; text-wrap: balance; }
.slide h1 em, .slide h1 i { font-style: italic; font-weight: 500; }
.slide h1 .accent, .slide .accent { color: var(--red); }
.slide h1::after { content: ""; display: block; width: 1.6em; height: 3px; background: var(--red); margin-top: .36em; }
.slide h2 { font-family: var(--f-head); font-size: 1.15em; font-weight: var(--w-head); margin: 0 0 .45em; line-height: 1.2; }
.slide p { margin: 0 0 .7em; text-wrap: pretty; }
.slide ul, .slide ol { margin: 0 0 .7em; padding-left: 1.2em; }
.slide li { margin: 0 0 .45em; padding-left: .15em; }
.slide li::marker { color: var(--red); }
.slide ul.plain { list-style: none; padding-left: 0; }
.slide em { font-style: italic; }
.slide strong { font-weight: calc(var(--w-text) + 200); }
.slide blockquote { margin: .6em 0; padding: .1em 0 .1em 1em; border-left: 4px solid var(--gold); color: var(--muted); font-style: italic; }
.slide .small { font-size: .75em; line-height: 1.4; color: var(--muted); }
.slide .tiny { font-size: .6em; line-height: 1.35; color: var(--muted); }
.slide .big { font-size: 1.3em; line-height: 1.25; }
.slide .muted { color: var(--muted); }
.slide .kicker { font-family: var(--f-mono); font-size: .55em; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin: 0 0 .8em; }
.slide .punch { font-weight: 600; color: var(--red); font-style: italic; margin-top: auto; }
.slide .bottom { margin-top: auto; padding-top: .6em; }
.slide .bottom.punch { text-align: center; font-size: 1.05em; }
.slide code { font-family: var(--f-mono); font-size: .85em; background: var(--paper-2); padding: .05em .3em; border-radius: 4px; }
[lang="ar"] { font-family: var(--f-ar); }
.slide .ar { font-family: var(--f-ar); font-size: 1.35em; line-height: 1.6; direction: rtl; }
.slide .indent { padding-left: 1.4em; }
.slide.text, .slide.split { display: none; flex-direction: column; }
.slide.text.current, .slide.split.current { display: flex; }

/* tables */
.slide table { border-collapse: collapse; width: 100%; font-size: .72em; line-height: 1.3; margin: .4em 0 .8em; font-family: var(--f-ui); }
.slide th, .slide td { text-align: left; vertical-align: top; padding: .3em .55em; border-bottom: 1px solid var(--rule-soft); }
.slide th { font-family: var(--f-mono); font-size: .8em; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); }
.slide tr:first-child th:empty { border-bottom: 0; }
.slide td:first-child { font-weight: 600; }
.slide .small table { font-size: .9em; }

/* word-ambiguity table (Cairo) */
.ayn { display: grid; grid-template-columns: 1.15fr .55fr 1fr; gap: 0 1em; margin-top: .3em; }
.ayn .row { display: contents; }
.ayn .row > div { padding: .45em 0; border-top: 1px solid var(--rule-soft); }
.ayn .row:first-child > div { border-top: 0; }
.ayn .ar-x { font-family: var(--f-ar); font-size: 1.25em; line-height: 1.5; }
.ayn .ar-x b { color: var(--red); font-weight: 700; }
.ayn .rd { font-size: .95em; }
.ayn .rd b { color: var(--red); }
.ayn .tr { font-size: .78em; line-height: 1.35; color: var(--ink); }
.ayn-bare { display: flex; justify-content: center; align-items: center; margin: .3em 0 .2em; }
.ayn-bare span { font-family: var(--f-ar); font-size: 6.5em; line-height: 1.15; color: var(--ink); }
.ayn .src { display: block; font-family: var(--f-ui); font-size: .8em; color: var(--muted); margin-top: .2em; }

/* ---------- layouts ---------- */
/* title */
.slide.title { padding: 0; }
.slide.title .cover { position: absolute; inset: 0; }
.slide.title .cover img { width: 100%; height: 100%; object-fit: cover; }
.slide.title .block { position: absolute; left: 160px; right: 160px; top: 200px; display: flex; flex-direction: column; gap: 22px; }
.slide.title h1 { font-family: var(--f-head); font-size: 92px; letter-spacing: -.03em; line-height: 1.02; margin: 0; }
.slide.title h1::after { width: 140px; margin-top: 34px; }
.slide.title .sub { font-size: 44px; color: var(--red); font-style: italic; }
.slide.title .who { font-size: 40px; margin-top: 30px; }
.slide.title .meta { font-family: var(--f-ui); font-size: 26px; color: var(--muted); }
.slide.title .logos { position: absolute; left: 160px; right: 160px; bottom: 90px; display: flex; gap: 60px; align-items: center; }
.slide.title .logos img { height: 110px; width: auto; }

/* section divider */
.slide.section { display: none; padding: 0; background: var(--ink); color: var(--paper); }
.slide.section.current { display: grid; place-items: center; }
.slide.section .inner { text-align: center; max-width: 1400px; padding: 0 120px; }
.slide.section .kicker { color: var(--gold); }
.slide.section h1 { color: var(--paper); font-size: 2.1em; margin: 0; }
.slide.section h1::after { margin: 34px auto 0; background: var(--gold); }
.slide.section p { color: #C9BFB0; font-size: .9em; margin-top: .8em; }
.slide.section.light { background: var(--paper); color: var(--ink); }
.slide.section.light h1 { color: var(--ink); }
.slide.section.light p { color: var(--muted); }

/* agenda (list with one item highlighted) */
.slide.agenda ol { list-style: none; padding: 0; margin: 0; font-size: 1.4em; line-height: 1.3; }
.slide.agenda li { animation: rise .5s both; display: flex; gap: .65em; align-items: baseline; padding: .4em 0; border-top: 1px solid var(--rule); color: var(--muted); }
.slide.agenda li:first-child { border-top: 0; }
.slide.agenda li .n { font-family: var(--f-ar); color: var(--gold); font-size: 1.1em; min-width: 1.2em; text-align: center; }
.slide.agenda li.on { color: var(--red); font-weight: 600; }
.slide.agenda li:nth-child(2) { animation-delay: .1s } .slide.agenda li:nth-child(3) { animation-delay: .2s } .slide.agenda li:nth-child(4) { animation-delay: .3s }
.slide.agenda li.on .n { color: var(--red); }

/* figure: an image scaled into the free area, caption beneath */
.slide.figure { display: none; flex-direction: column; padding: 22px 24px 18px 80px; }
.slide.figure.no-strip { padding-left: 24px; }
.slide.figure.current { display: flex; }
.slide.figure h1 { flex: 0 0 auto; font-size: 42px; margin: 0 0 10px; }
.slide.figure h1::after { margin-top: 8px; height: 2px; width: 72px; }
.slide.figure .fig { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.slide.figure .fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; min-height: 0; }
.slide.figure .fig.framed img { border: 1px solid var(--gold); outline: 1px solid var(--red); outline-offset: 5px; background: #fff; }
.slide.figure figcaption, .slide .caption { font-family: var(--f-ui); font-size: 18px; line-height: 1.3; color: var(--muted); max-width: 1700px; text-align: left; flex: 0 0 auto; }
.slide.figure .fig .imgs { flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; align-items: center; gap: 30px; width: 100%; height: 100%; }
.slide.figure .fig .imgs img { max-width: 100%; max-height: 100%; height: 100%; width: auto; object-fit: contain; }
.slide.figure .fig.two .imgs img { max-width: calc(50% - 15px); }

/* full-bleed image (photos, book pages) */
.slide.full { padding: 0; }
.slide.full img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.full img.contain { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.slide.full.paper { background: var(--paper); }
.slide.full.dark { background: #2C4A6E; }
.slide.full .overlay { position: absolute; padding: 26px 34px; background: rgba(255,255,255,.93); border-left: 4px solid var(--red); max-width: 760px; font-size: 36px; line-height: 1.35; }
.slide.full .overlay.tr { right: 80px; top: 80px; } .slide.full .overlay.tl { left: 80px; top: 80px; }
.slide.full .overlay.br { right: 80px; bottom: 80px; } .slide.full .overlay.bl { left: 80px; bottom: 80px; }
.slide.full .overlay .by { display: block; font-family: var(--f-ui); font-size: 24px; color: var(--muted); margin-top: 10px; }
.slide.full .label { position: absolute; left: 80px; top: 60px; font-family: var(--f-mono); font-size: 22px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); background: rgba(255,255,255,.9); padding: 8px 14px; }

/* split: text column + figure column */
.slide.split .cols { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 1.5em; align-items: stretch; flex: 1 1 auto; min-height: 0; }
.slide.split .cols.w-40-60 { grid-template-columns: 2fr 3fr; }
.slide.split .cols.w-35-65 { grid-template-columns: 35fr 65fr; }
.slide.split .cols.w-60-40 { grid-template-columns: 3fr 2fr; }
.slide.split .cols img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; margin: 0 auto; object-fit: contain; }
.slide.split .cols .col { min-height: 0; max-height: 100%; }
.slide.split .cols .col > img:only-child { height: 100%; }
.slide.split .cols .col.center { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.slide.split .cols .col > .fig { display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* stat boxes */
.stats { display: flex; gap: .8em; margin: .75em 0; flex-wrap: wrap; }
.stat { flex: 1 1 0; min-width: 6.5em; background: var(--navy); color: #fff; padding: .85em .75em .75em; text-align: center; border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.stat b { display: block; font-size: 1.6em; font-weight: 700; line-height: 1; color: var(--gold); letter-spacing: -.02em; }
.stat span { display: block; font-family: var(--f-ui); font-size: .6em; margin-top: .6em; color: #E8E2D6; }
.stat.red { background: var(--red-wash); color: var(--red); border: 1px solid var(--red-soft); box-shadow: none; }
.stat.red b { color: var(--red); } .stat.red span { color: var(--red); }
.stat.paper { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); box-shadow: none; }
.stat.paper b { color: var(--ink); } .stat.paper span { color: var(--muted); }
.stat.gold { background: var(--gold); color: #fff; } .stat.gold b { color: #fff; }

/* pill/tag row (periods) */
.pills { display: flex; gap: .6em; margin: .65em 0; }
.pill { flex: 1 1 0; text-align: center; padding: .75em .5em; border: 1px solid var(--rule); background: var(--panel); font-family: var(--f-ui); font-size: .6em; line-height: 1.35; border-radius: 4px; }
.pill b { display: block; font-family: var(--f-mono); letter-spacing: .12em; text-transform: uppercase; font-size: .92em; }
.pill.on { border-color: var(--red-soft); background: var(--red-wash); color: var(--red); }
.pills.timeline .pill { position: relative; }
.pills.timeline .pill + .pill::before { content: "→"; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 28px; }

/* chain of boxes (oral → written → print → digital; four domains) */
.chain { display: flex; gap: .5em; align-items: stretch; margin: .75em 0; }
.chain .box { flex: 1 1 0; background: var(--navy); color: #fff; padding: .75em .65em; text-align: center; border-radius: 4px; position: relative; display: flex; flex-direction: column; gap: .3em; justify-content: center; }
.chain .box + .box::before { content: "→"; position: absolute; left: -.55em; top: 50%; transform: translate(-0%, -50%); color: var(--gold); font-size: .85em; }
.chain .box.hi { background: var(--gold); color: var(--ink); }
.chain .box .num { font-size: 1.5em; font-weight: 700; color: var(--gold); line-height: 1; }
.chain .box.hi .num { color: var(--ink); }
.chain .box .name { font-size: .85em; font-weight: 600; }
.chain .box .desc { font-family: var(--f-ui); font-size: .55em; opacity: .85; line-height: 1.35; }

/* callout boxes */
.callout { background: var(--panel); border: 1px solid var(--rule); border-left: 5px solid var(--gold); padding: .75em .95em; margin: .6em 0; font-size: .8em; line-height: 1.4; border-radius: 4px; }
.callout.red { border-left-color: var(--red); background: var(--red-wash); }
.callout .head { font-family: var(--f-mono); font-size: .62em; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: .5em; }
.callout .by { font-family: var(--f-ui); font-size: .75em; color: var(--muted); display: block; margin-top: .35em; }

/* two text columns */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 3.2em; }
.twocol > div + div { border-left: 1px solid var(--rule); padding-left: 1.6em; margin-left: -1.6em; }
.twocol h3 { font-family: var(--f-head); font-size: 1em; font-weight: var(--w-head); margin: 0 0 .35em; font-style: italic; }

/* quote slide */
.slide.quote { display: none; }
.slide.quote.current { display: grid; place-items: center; }
.slide.quote .q { max-width: 26em; font-size: 1.35em; line-height: 1.35; font-style: italic; text-align: center; }
.slide.quote .q .by { display: block; font-style: normal; font-family: var(--f-ui); font-size: .52em; color: var(--muted); margin-top: .9em; }

.slide.measuring { display: flex !important; visibility: hidden; animation: none !important; }
.slide.measuring * { animation: none !important; transition: none !important; }
.slide.measuring .step { opacity: 1; }

/* speaker notes are never shown on the stage */
.slide aside.notes { display: none; }

/* preview mode (the thumbnails inside the speaker-notes window) */
body.preview .progress, body.preview .counter { display: none; }
body.preview .slide, body.preview .slide * { animation: none !important; transition: none !important; }
body.preview .stage { box-shadow: none; }

/* size tag shown briefly on + / - */
.scale-tag { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); background: rgba(28,25,23,.92); color: #fff; font: 14px/1 var(--f-mono); letter-spacing: .1em; padding: 10px 16px; border-radius: 6px; opacity: 0; transition: opacity .2s; z-index: 36; pointer-events: none; }
.scale-tag.on { opacity: 1; }
/* figure and full slides are not auto-fitted; the size lever still scales their text */
.slide.figure, .slide.full, .slide.section, .slide.title { font-size: calc(40px * var(--type-scale, 1)); }

/* type tester panel */
.typepanel { position: fixed; right: 16px; top: 16px; z-index: 35; background: #1c1917; color: #eee; border: 1px solid #444; border-radius: 8px; padding: 16px 18px; font: 13px/1.5 var(--f-ui); width: 330px; display: none; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.typepanel.on { display: block; }
.typepanel h2 { margin: 0 0 10px; font: 600 14px var(--f-ui); color: #fff; }
.typepanel label { display: grid; grid-template-columns: 74px 1fr 46px; gap: 8px; align-items: center; margin: 6px 0; }
.typepanel select, .typepanel input[type=range] { width: 100%; }
.typepanel select { background: #2a2622; color: #eee; border: 1px solid #555; border-radius: 4px; padding: 3px 4px; font: 13px var(--f-ui); }
.typepanel output { font-family: var(--f-mono); font-size: 12px; color: #bbb; text-align: right; }
.typepanel .row { display: flex; gap: 8px; margin-top: 10px; }
.typepanel button { flex: 1; background: #2a2622; color: #eee; border: 1px solid #555; border-radius: 4px; padding: 6px 8px; font: 12px var(--f-ui); cursor: pointer; }
.typepanel button:hover { border-color: var(--red-soft); }
.typepanel .hint { color: #888; font-size: 11.5px; margin: 8px 0 0; }
.typepanel textarea { width: 100%; height: 54px; margin-top: 8px; background: #111; color: #ccc; border: 1px solid #444; font: 11px var(--f-mono); resize: none; }

/* ---------- chrome ---------- */
.progress { position: fixed; left: 0; bottom: 0; height: 4px; background: var(--red); width: 0; z-index: 20; transition: width .2s; }
.counter { position: fixed; right: 16px; bottom: 12px; font-family: var(--f-mono); font-size: 12px; color: #888; z-index: 20; letter-spacing: .1em; }
.help { position: fixed; inset: 0; background: rgba(0,0,0,.75); color: #eee; display: none; place-items: center; z-index: 30; font-family: var(--f-ui); font-size: 16px; }
.help.on { display: grid; }
.help .box { background: #1c1917; border: 1px solid #444; padding: 28px 34px; border-radius: 8px; min-width: 420px; }
.help h2 { margin: 0 0 14px; font-size: 18px; font-family: var(--f-text); }
.help table { border-collapse: collapse; } .help td { padding: 4px 14px 4px 0; } .help kbd { font-family: var(--f-mono); background: #333; padding: 1px 7px; border-radius: 3px; }

/* overview */
body.overview .viewport { overflow: auto; place-items: start; padding: 40px; display: block; }
body.overview .stage { transform: none !important; width: auto; height: auto; background: none; box-shadow: none; display: grid; grid-template-columns: repeat(4, 384px); gap: 24px; overflow: visible; }
body.overview .stage::before { display: none; }
body.overview .slide { display: block !important; position: relative; width: 384px; height: 216px; padding: 0; overflow: hidden; cursor: pointer; outline: 2px solid transparent; background: var(--paper); }
body.overview .slide.current { outline-color: var(--red); }
body.overview .slide .step, body.overview .slide * { animation: none !important; }
body.overview .slide .step { opacity: 1; transform: none; }
body.overview .slide::before, body.overview .slide::after { transform: scale(.2); transform-origin: top left; }
body.overview .slide > .scaled { width: 1920px; height: 1080px; transform: scale(.2); transform-origin: top left; padding: 96px 120px 96px 200px; position: relative; }
body.overview .slide.section > .scaled, body.overview .slide.quote > .scaled { display: grid; place-items: center; }
body.overview .slide.section { background: var(--ink); } body.overview .slide.section.light { background: var(--paper); }
body.overview .slide.figure > .scaled, body.overview .slide.split > .scaled { display: flex; flex-direction: column; }
body.overview .slide.title > .scaled, body.overview .slide.full > .scaled { padding: 0; }

/* ---------- print: one slide per page, 16:9 ---------- */
@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { overflow: visible; background: #fff; height: auto; }
  .viewport { position: static; display: block; }
  .stage { transform: none !important; box-shadow: none; overflow: visible; width: 1920px; height: auto; }
  .slide { display: block !important; position: relative; width: 1920px; height: 1080px; page-break-after: always; break-after: page; overflow: hidden; }
  .slide.section, .slide.figure, .slide.split, .slide.quote { display: flex !important; flex-direction: column; }
  .slide.section, .slide.quote { display: grid !important; }
  .progress, .counter, .help, .lightbox { display: none !important; }
  .slide .step { opacity: 1 !important; transform: none !important; }
  .slide, .slide * { animation: none !important; }
}
