/*
 * "Library card": the tutor app's own palette (kids-tutor web/src/index.css),
 * so the deck and the live demo look like one thing when we switch windows.
 * Fonts are vendored because the deck must work with no network at the venue.
 */
@font-face { font-family: 'Fraunces'; src: url('../vendor/fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: block; }
@font-face { font-family: 'Nunito'; src: url('../vendor/fonts/nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: block; }
@font-face { font-family: 'Nunito'; src: url('../vendor/fonts/nunito-italic.woff2') format('woff2'); font-weight: 200 1000; font-style: italic; font-display: block; }
@font-face { font-family: 'JetBrains Mono'; src: url('../vendor/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; }
@font-face { font-family: 'JetBrains Mono'; src: url('../vendor/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); font-weight: 700; }

:root {
  --bg: #faf6ee;
  --surface: #fffdf8;
  --ink: #2a221a;
  --muted: #5c4e3e;
  --faint: #6b5d4d;
  --line: #e6dcc8;
  --line-strong: #d8cbb0;
  --ochre: #986b26;
  --ochre-dark: #6f4d1a;
  --forest: #55704a;
  --violet: #6f4f9c;
  --fail: #9a3b1f;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Nunito', ui-rounded, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

html, body, .reveal-viewport { background: var(--bg); }
.reveal { font-family: var(--body); font-size: 26px; color: var(--ink); }
.reveal .slides { text-align: left; }
.reveal .slides section { height: 100%; box-sizing: border-box; padding: 64px 80px; }
.reveal .slides section.bleed { padding: 0; }

.reveal h1, .reveal h2, .reveal h3 {
  font-family: var(--display); font-weight: 600; color: var(--ink);
  letter-spacing: -0.02em; text-transform: none; margin: 0; line-height: 1;
}
.reveal h1 { font-size: 96px; line-height: 0.95; }
.reveal h2 { font-size: 60px; }
.reveal h3 { font-size: 34px; line-height: 1.15; }
.reveal p { margin: 0; line-height: 1.45; }
.reveal a { color: var(--ochre); }
.reveal strong { font-weight: 800; }
.reveal ul, .reveal ol { margin: 0; }

.eyebrow {
  font-size: 17px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ochre);
}
.lede { font-size: 25px; color: var(--muted); max-width: 30em; }
.small { font-size: 20px; color: var(--faint); }
.mono { font-family: var(--mono); }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; gap: 24px; align-items: center; }
.center-v { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.spread { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 22px;
}
.card.win { border: 3px solid var(--forest); }

/* ---------- Title ---------- */
.title-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 100%; }
.title-grid .words { padding: 80px 56px 72px 88px; display: flex; flex-direction: column; justify-content: space-between; }
.title-grid .portrait { display: flex; align-items: flex-end; justify-content: flex-end; }
.title-grid .portrait img { width: 640px; height: 640px; object-fit: cover; border-radius: 32px 0 0 0; margin: 0; }
.byline { border-top: 2px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.byline .name { font-size: 24px; font-weight: 800; }

/* ---------- Section dividers ---------- */
.divider { height: 100%; display: flex; align-items: center; gap: 72px; position: relative; }
.divider .numeral { font-family: var(--display); font-weight: 600; font-size: 420px; line-height: 0.8; color: var(--ochre); }
.divider h2 { font-size: 84px; }
.divider .avatar { position: absolute; right: -24px; bottom: -16px; width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--line); margin: 0; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px;
  font-size: 16px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.pill.live { background: var(--forest); color: #fff; }
.pill.live::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.pill.backup { background: var(--ochre); color: #fff; }
.pill.quiet { background: var(--line); color: var(--muted); }

/* ---------- Demo slides: B swaps the live prompt for the backup screenshots ---------- */
.demo-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; height: 100%; align-items: center; }
.demo .when-backup { display: none; }
.demo.show-backup .when-live { display: none; }
.demo.show-backup .when-backup { display: flex; }
.steps { display: flex; flex-direction: column; gap: 14px; font-size: 22px; color: #3d3226; }
.steps div { display: flex; gap: 14px; align-items: baseline; }
.steps b { color: var(--ochre); font-weight: 800; }

.window {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 18px 40px rgba(42, 34, 26, 0.10); overflow: hidden;
  display: flex; flex-direction: column; height: 560px;
}
.window .bar { display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); font-weight: 800; }
.window .bar img { width: 36px; height: 36px; border-radius: 50%; margin: 0; }
.window .bar .url { margin-left: auto; font-weight: 400; font-size: 15px; color: var(--faint); }
.window .body { flex-grow: 1; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.bubble-kid { align-self: flex-end; background: var(--forest); color: #fff; font-size: 19px; padding: 12px 18px; border-radius: 18px 18px 4px 18px; }
.bubble-doug { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); font-size: 19px; padding: 12px 18px; border-radius: 18px 18px 18px 4px; max-width: 85%; line-height: 1.4; }

.placeholder {
  flex-grow: 1; border: 2px dashed var(--line-strong); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--faint); font-size: 18px; padding: 24px; min-height: 120px;
}
.shot { width: 100%; height: 100%; object-fit: contain; margin: 0; border-radius: 12px; }

/* ---------- Eval cards: the test that guards each rule ---------- */
.eval {
  position: absolute; right: 80px; bottom: 56px; width: 500px;
  border: 2px dashed var(--forest); border-radius: 14px; background: var(--surface);
  padding: 16px 20px; font-size: 19px; line-height: 1.5;
}
.eval .label { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest); margin-bottom: 4px; }
.eval code { font-variant-ligatures: none; font-family: var(--mono); font-size: 17px; color: var(--ink); background: none; }

/* ---------- Quotes from the prompt ---------- */
.prompt-quote {
  font-family: var(--mono); font-size: 21px; line-height: 1.5; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px;
}
.prompt-quote .src { display: block; margin-top: 8px; font-family: var(--body); font-size: 15px; color: var(--faint); }
.big-quote { font-family: var(--display); font-size: 64px; line-height: 1.05; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Ladder ---------- */
.ladder { display: flex; gap: 16px; align-items: flex-end; }
.ladder .rung:nth-child(1) { min-height: 90px; }
.ladder .rung:nth-child(2) { min-height: 140px; }
.ladder .rung:nth-child(3) { min-height: 190px; }
.ladder .rung { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 21px; font-weight: 700; flex: 1; }
.ladder .rung small { display: block; font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ochre); margin-bottom: 6px; }

/* ---------- Question wall ---------- */
/* Packed rather than scattered: every question readable, still a crowd. */
.wall { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.wall .pile { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; align-content: flex-start; }
.wall .q {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 13px; font-weight: 700; box-shadow: 0 6px 14px rgba(42, 34, 26, 0.06); white-space: nowrap;
}
.wall .why { align-self: flex-end; margin-right: 40px; font-family: var(--display); font-size: 92px; line-height: 0.9; font-weight: 600; color: var(--ochre); }

/* ---------- Bake-off ---------- */
.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.model { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.model img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin: 0; }
.model .name { font-weight: 800; font-size: 19px; }
.model .meta { font-size: 15px; color: var(--faint); }
.verdict { font-size: 16px; font-weight: 800; }
.verdict.pass { color: var(--forest); }
.verdict.fail { color: var(--fail); }

table.data { border-collapse: collapse; font-size: 23px; width: 100%; }
table.data th { text-align: left; font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border-bottom: 2px solid var(--line); padding: 8px 12px; }
table.data td { border-bottom: 1px solid var(--line); padding: 10px 12px; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data tr.win td { font-weight: 800; }

.vote { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.vote .card { font-size: 24px; line-height: 1.45; position: relative; padding-top: 56px; }
.vote .letter { position: absolute; top: 16px; left: 22px; font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--ochre); }
.vote .reveal-name { position: absolute; top: 20px; right: 22px; font-size: 16px; font-weight: 800; color: var(--faint); }

.stat { font-family: var(--display); font-weight: 600; font-size: 200px; line-height: 0.9; letter-spacing: -0.03em; }

/* ---------- Voice line-up ---------- */
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.voice {
  display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; font: inherit; font-size: 22px; color: var(--ink); text-align: left; cursor: pointer;
  min-height: 72px;
}
.voice:hover { border-color: var(--ochre); }
.voice .n { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--ochre); width: 24px; }
.voice .icon { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: var(--ochre); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.voice.playing .icon { background: var(--forest); }
.voice.win { border: 3px solid var(--forest); }

/* ---------- Diagrams (inline SVG) ---------- */
svg.diagram { width: 100%; height: auto; overflow: visible; }
.d-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.d-box-strong { fill: var(--surface); stroke: var(--ochre); stroke-width: 2.5; }
.d-gate { fill: var(--bg); stroke: var(--forest); stroke-width: 1.5; }
.d-ops { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 4; }
.d-title { font-family: var(--body); font-weight: 800; font-size: 20px; fill: var(--ink); }
.d-sub { font-family: var(--body); font-size: 15px; fill: var(--faint); }
.d-gate-text { font-family: var(--body); font-weight: 700; font-size: 16px; fill: var(--forest); }
.d-label { font-family: var(--body); font-weight: 800; font-size: 13px; letter-spacing: 0.12em; fill: var(--ochre); }
.d-line { stroke: var(--muted); stroke-width: 2; fill: none; }
.d-line-soft { stroke: var(--line-strong); stroke-width: 2; fill: none; stroke-dasharray: 5 4; }
.d-arrow { fill: var(--muted); }

/* ---------- Code ---------- */
.reveal pre {
  width: 100%; margin: 0; box-shadow: none; font-size: 20px; line-height: 1.5;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.reveal pre code { font-variant-ligatures: none; font-family: var(--mono); padding: 18px 22px; max-height: none; background: none; color: var(--ink); }
.hljs-keyword, .hljs-built_in { color: var(--violet); font-weight: 700; }
.hljs-string { color: var(--forest); }
.hljs-number, .hljs-literal { color: var(--ochre-dark); }
.hljs-comment { color: var(--faint); font-style: italic; }
.hljs-title, .hljs-attr { color: var(--ochre-dark); }
.code-note { font-size: 15px; color: var(--faint); margin-top: 8px; }

/* ---------- Loop diagram (build slide) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 18px; font-weight: 700; }

.footnote { position: absolute; left: 80px; bottom: 36px; font-size: 16px; color: var(--faint); }

.reveal .slide-number { background: none; color: var(--faint); font-family: var(--body); font-size: 13px; font-weight: 800;
  letter-spacing: 0.1em; right: 22px; bottom: 12px; padding: 0; }
.reveal .slide-number a { color: inherit; text-decoration: none; }
.reveal .progress { color: var(--ochre); height: 4px; }
.reveal .controls { color: var(--ochre); }
.reveal img { max-width: none; max-height: none; }

/* Fragments fade without sliding: movement on a projector reads as lag. */
.reveal .slides section .fragment { transition: opacity 0.35s ease; transform: none; }

/* Content sits in the middle of the slide unless it asks to fill it. */
.reveal .slides section > .stack, .reveal .slides section > .row { height: 100%; justify-content: center; }
.title-grid .eyebrow { white-space: nowrap; letter-spacing: 0.1em; }
.title .slide-number, .title .controls { display: none !important; }

/* Spot-the-mistake: a click lays an enlarged crop of the typo over the card,
   because at projector size the original labels are too small to read. */
.model { position: relative; }
.zoom-reveal { position: absolute; left: -12px; right: -12px; bottom: -12px; background: var(--surface);
  border: 3px solid var(--fail); border-radius: 14px; padding: 10px; box-shadow: 0 14px 30px rgba(42, 34, 26, 0.18);
  display: flex; flex-direction: column; gap: 8px; }
.zoom-reveal .zoom { width: 100%; height: auto; aspect-ratio: auto; border-radius: 8px; margin: 0; }

/* Image bake-off: one subject per slide. Prompt on the left, six models in a
   3 × 2 grid at 280 px, which is as large as two rows allow at 720 px tall. */
.reveal .slides section.bo { padding: 40px 56px; }
.bo-wrap { height: 100%; display: flex; gap: 32px; align-items: center; }
.bo-side { width: 250px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.bo-side h2 { font-size: 46px; }
.bo-side .lede { font-size: 19px; }
.bo-prompt { font-size: 16px; line-height: 1.45; color: var(--faint); font-style: italic; }
.bo-grid { display: grid; grid-template-columns: repeat(3, 280px); gap: 18px 22px; }
.bo-cell { position: relative; margin: 0; width: 280px; height: 280px; border-radius: 14px; overflow: visible; }
.bo-cell > img { width: 280px; height: 280px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); margin: 0; display: block; }
.bo-cell.win > img { border: 4px solid var(--forest); }
.bo-cell figcaption { position: absolute; left: 8px; top: 8px; background: rgba(42, 34, 26, 0.82); color: #fff; font-size: 14px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.bo-verdict { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 15px; font-weight: 800; padding: 6px 10px; border-radius: 10px; background: var(--surface); border: 2px solid currentColor; }
.bo-verdict.pass { color: var(--forest); }
.bo-verdict.fail { color: var(--fail); }
.bo-zoom { position: absolute; left: -10px; right: -10px; bottom: -10px; z-index: 2; background: var(--surface); border: 3px solid var(--fail); border-radius: 14px; padding: 8px; box-shadow: 0 14px 30px rgba(42, 34, 26, 0.22); display: flex; flex-direction: column; gap: 6px; }
.bo-zoom img { width: 100%; height: auto; border-radius: 8px; margin: 0; }
.bo-zoom .verdict { font-size: 15px; }
table.results td.pass { color: var(--forest); font-weight: 800; font-size: 26px; }
table.results td.fail { color: var(--fail); font-weight: 800; font-size: 26px; }
table.results td, table.results th { padding: 8px 10px; }

/* One-question demo: the recorded conversation, small enough to fit a window. */
.chat-small { gap: 10px; padding: 16px; }
.chat-small .bubble-kid, .chat-small .bubble-doug { font-size: 14.5px; line-height: 1.4; padding: 9px 14px; }
.chat-small .bubble-doug { max-width: 92%; display: flex; flex-direction: column; gap: 8px; }
.chat-drawing { width: 170px; height: 170px; border-radius: 10px; margin: 0; border: 1px solid var(--line); }

.timeline { display: flex; flex-direction: column; gap: 12px; border-left: 3px solid var(--line-strong); padding-left: 24px; }
.tl-row { display: flex; gap: 20px; align-items: baseline; font-size: 23px; }
.tl-t { font-family: var(--mono); font-variant-ligatures: none; color: var(--ochre); font-weight: 700; width: 90px; flex-shrink: 0; font-size: 20px; }
.tl-gap { margin-top: 12px; }
.brief-code { font-size: 15px !important; white-space: pre-wrap; }

.drill { display: flex; gap: 12px; align-items: center; font-size: 22px; }
.drill .q { font-weight: 800; }
.drill .a { font-family: var(--mono); font-variant-ligatures: none; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 12px; }

/* Slide 3: the questions arrive in a quick cascade when the slide opens, so the
   wall builds up while Chris talks. Fast, and never loops. */
.reveal .slides section.present .wall .q { animation: q-in 0.35s ease-out both; animation-delay: calc(var(--i) * 0.11s); }
.reveal .slides section.present .wall .why { animation: q-in 0.5s ease-out both; animation-delay: 4.3s; }
@keyframes q-in { from { opacity: 0; scale: 0.85; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .reveal .slides section.present .wall .q, .reveal .slides section.present .wall .why { animation: none; } }

/* The five checks, one row each, built up a click at a time. */
.checks { display: flex; flex-direction: column; gap: 10px; }
.check { display: grid; grid-template-columns: 40px 210px 1fr 300px; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; }
.check .num { font-family: var(--display); font-size: 34px; font-weight: 600; color: var(--forest); line-height: 1; }
.check .name { font-size: 22px; font-weight: 800; }
.check .what { font-size: 17px; line-height: 1.4; color: var(--muted); }
.check .sees { font-size: 16px; line-height: 1.35; font-style: italic; color: var(--ink); border-left: 3px solid var(--ochre); padding-left: 12px; }

/* Part dividers and the agenda: the same list, with "you are here" highlighted. */
.act-grid { height: 100%; display: grid; grid-template-columns: 6fr 5fr; gap: 56px; align-items: center; }
.act-title { font-size: 76px !important; line-height: 0.98 !important; }
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.agenda li { display: flex; gap: 18px; align-items: center; font-size: 26px; font-weight: 700; color: var(--faint);
  padding: 12px 20px; border-radius: 14px; border: 1px solid transparent; }
.agenda li .n { font-family: var(--display); font-size: 30px; color: var(--line-strong); width: 26px; }
.agenda li.now { color: var(--ink); background: var(--surface); border-color: var(--ochre); box-shadow: 0 10px 24px rgba(42, 34, 26, 0.08); }
.agenda li.now .n { color: var(--ochre); }
section:not(.act) .agenda li { color: var(--ink); }
section:not(.act) .agenda li .n { color: var(--ochre); }

/* Where am I: part and rule, bottom-left, quiet enough to ignore. */
.reveal .marker { position: absolute; left: 22px; bottom: 12px; z-index: 30; font-family: var(--body); font-size: 13px;
  font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); white-space: pre; pointer-events: none; }

/* Showcase: real conversations, rendered by the app, in an iPad-ish frame.
   A tall one scrolls itself once, slowly, when the slide opens (see the script
   that sets --scroll), and stops at the bottom. */
.show { height: 100%; display: flex; gap: 40px; align-items: center; }
.show-side { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.show-side h2 { font-size: 46px; }
.show-side .notice { display: flex; flex-direction: column; gap: 10px; font-size: 19px; color: var(--muted); line-height: 1.4; }
.show-frames { flex-grow: 1; display: flex; gap: 24px; justify-content: center; align-items: center; }
.frame { background: #2a221a; padding: 12px; border-radius: 28px; box-shadow: 0 20px 40px rgba(42, 34, 26, 0.18); }
.frame .screen { width: var(--w, 600px); height: var(--h, 600px); overflow: hidden; border-radius: 16px; background: var(--bg); position: relative; }
.frame .screen img { width: 100%; height: auto; margin: 0; display: block; }
.reveal .slides section.present .frame .screen img.scrolls { animation: screen-scroll var(--dur, 12s) ease-in-out 1.5s both; }
@keyframes screen-scroll { from { transform: translateY(0); } to { transform: translateY(var(--scroll, 0px)); } }
@media (prefers-reduced-motion: reduce) { .reveal .slides section.present .frame .screen img.scrolls { animation: none; } }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip { font-size: 14px; font-weight: 800; padding: 5px 10px; border-radius: 999px; border: 2px solid currentColor; background: var(--surface); }
.vchip.ok { color: var(--forest); }
.vchip.stop { color: var(--fail); }
.vchip.nudge { color: var(--ochre-dark); }

/* Safety gallery: four short exchanges, each with what the checks decided. */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.gcard img { width: 100%; height: 190px; object-fit: cover; object-position: center bottom; border-radius: 10px; margin: 0; border: 1px solid var(--line); }
.gcard .why { font-size: 15px; color: var(--muted); line-height: 1.35; }

/* Closing slide: each point carries its line from Microsoft's draft code. */
.know h3 { font-size: 38px; }
.know-quote { margin-top: 6px; font-size: 18px; font-style: italic; color: var(--muted); border-left: 3px solid var(--ochre); padding-left: 12px; }
.reveal .source { font-size: 13px; color: var(--faint); }

/* What carries over to work: eight lessons, each with where it came from. */
.carry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.carry { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.carry-t { font-size: 18px; font-weight: 800; line-height: 1.2; }
.carry-doug, .carry-work { font-size: 14px; line-height: 1.4; color: var(--muted); }
.carry-work { color: var(--ink); }
.carry span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ochre); margin-bottom: 2px; }
.carry-work span { color: var(--forest); }
.reveal .slide-number, .reveal .slide-number * { font-family: var(--body) !important; }

/* Slide 4: the friendly description is struck through on the first click,
   then the technical one fades in beneath it. */
.reveal .slides section .fragment.custom.strike { opacity: 1; visibility: inherit; }
.reveal .big-quote.wrong { text-decoration: line-through; text-decoration-thickness: 4px;
  text-decoration-color: transparent; transition: text-decoration-color 0.5s ease, color 0.5s ease; }
.reveal .big-quote.wrong.visible { text-decoration-color: var(--fail); color: var(--faint); }
.tag-not, .tag-this { font-size: 14px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.tag-not { color: var(--fail); }
.tag-this { color: var(--forest); }

.person-rule { font-size: 19px; line-height: 1.4; padding-left: 14px; border-left: 3px solid var(--forest); }

/* Request trace: time, where it runs, what happens. */
.trace { display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--line-strong); padding-left: 18px; }
.trace-row { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: baseline; font-size: 20px; line-height: 1.4; }
.tr-t { font-family: var(--mono); font-variant-ligatures: none; font-weight: 700; color: var(--ochre); font-size: 15px; }
.tr-where { font-weight: 800; }
.tr-what { color: var(--muted); }
.trace code, .trace-draw code { font-family: var(--mono); font-variant-ligatures: none; font-size: 0.88em; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.trace-draw { display: grid; grid-template-columns: 74px 1fr; gap: 16px; align-items: baseline; font-size: 16px; line-height: 1.45;
  background: var(--surface); border: 1px dashed var(--ochre); border-radius: 12px; padding: 10px 14px; }
.trace code, .trace-draw code { white-space: nowrap; }

.trace-row.is-check .tr-where { color: var(--forest); }
.tr-n { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--forest); color: #fff; font-size: 12px; font-weight: 800; align-items: center; justify-content: center; margin-right: 8px; }

/* Question roundtrip: larger now the timing column and footnote are gone. */
.trace { gap: 12px; }
.trace .tr-n { width: 24px; height: 24px; font-size: 14px; }

/* Picture roundtrip: same rows as the question trace, narrower to leave room for the picture. */
.trace-pic .trace-row { grid-template-columns: 240px 1fr; font-size: 19px; }
.trace-pic { gap: 12px; }
/* The hint ladder stands alone now, so it can be read from the back. */
.ladder .rung { font-size: 30px; padding: 20px 24px; }
.ladder .rung small { font-size: 16px; }
.ladder .rung:nth-child(1) { min-height: 130px; }
.ladder .rung:nth-child(2) { min-height: 190px; }
.ladder .rung:nth-child(3) { min-height: 250px; }

.ladder .rung .eg { display: block; margin-top: 12px; font-size: 19px; font-weight: 400; font-style: italic; color: var(--muted); line-height: 1.4; }

/* Kill switch: tripwire → alarm → switch. */
.kill { display: flex; align-items: stretch; gap: 14px; }
.kill-step { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; position: relative; display: flex; flex-direction: column; gap: 8px; }
.kill-n { position: absolute; top: 14px; right: 16px; font-family: var(--display); font-size: 34px; font-weight: 600; color: var(--line-strong); line-height: 1; }
.kill-t { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--fail); }
.kill-d { font-size: 19px; line-height: 1.4; color: var(--muted); }
.kill-d strong { color: var(--ink); }
.kill-arrow { align-self: center; font-size: 34px; color: var(--muted); }

/* Chat model choice: the model name sits on each card, always visible. */
.vote .model-tag { position: absolute; top: 14px; left: 22px; font-family: var(--mono); font-variant-ligatures: none; font-size: 18px; font-weight: 700;
  color: #fff; background: var(--ochre); padding: 3px 12px; border-radius: 8px; }

/* Chat model choice: the last click crowns gpt-5-mini and fades luna. */
.vote .card { transition: opacity 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease; }
.vote .winner-flag { position: absolute; top: 14px; right: 18px; background: var(--forest); color: #fff; font-size: 16px; font-weight: 800;
  letter-spacing: 0.06em; padding: 4px 12px; border-radius: 999px; }
.reveal .slides section .vote .winner-flag.fragment { transform: scale(0.8); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal .slides section .vote .winner-flag.fragment.visible { transform: scale(1); }
.vote:has(.winner-flag.visible) .mini-card { border: 3px solid var(--forest); box-shadow: 0 16px 34px rgba(85, 112, 74, 0.22); transform: translateY(-4px); }
.vote:has(.winner-flag.visible) .luna-card { opacity: 0.4; }

/* SVG maps: the last click stamps both as failed. */
.svg-fail .svg-card { position: relative; }
.svg-fail .fail-flag { position: absolute; width: 0; height: 0; }
.svg-fail .svg-card img { transition: opacity 0.5s ease, filter 0.5s ease; }
.svg-fail .svg-card::after { content: 'FAILED'; position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg) scale(1.4);
  font-family: var(--body); font-weight: 900; font-size: 64px; letter-spacing: 0.12em; color: var(--fail);
  border: 6px solid var(--fail); border-radius: 12px; padding: 4px 22px; opacity: 0; transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
.svg-fail:has(.fail-flag.visible) .svg-card::after { opacity: 0.92; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
.svg-fail:has(.fail-flag.visible) .svg-card img { opacity: 0.45; filter: grayscale(0.6); }

/* Evals: how one case is checked. */
.eval-flow { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.ef-step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 18px; line-height: 1.4; color: var(--muted); }
.ef-step strong { color: var(--ink); }
.ef-step code { font-family: var(--mono); font-variant-ligatures: none; font-size: 0.88em; }
.ef-n { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ochre); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.ef-result { display: flex; gap: 10px; align-items: center; padding: 4px 2px; }
.ef-pill { font-family: var(--mono); font-variant-ligatures: none; font-weight: 700; font-size: 15px; padding: 4px 12px; border-radius: 8px; color: #fff; }
.ef-pill.pass { background: var(--forest); } .ef-pill.fail { background: var(--fail); } .ef-pill.flaky { background: var(--ochre); }

/* Evals: what we test. */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.theme-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.tc-head { display: flex; justify-content: space-between; align-items: baseline; }
.tc-name { font-size: 20px; font-weight: 800; }
.tc-count { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--ochre); line-height: 1; }
.tc-q { font-size: 17px; font-style: italic; color: var(--ink); line-height: 1.35; }
.tc-check { font-size: 15px; color: var(--forest); line-height: 1.4; }

/* Evals: CI for prompts. */
.ci-list { display: flex; flex-direction: column; gap: 8px; font-size: 19px; line-height: 1.35; }

/* Thank-you slide: every 14 s Doug's face glitches (three hard flickers), snaps
   into what he really is, glows red and holds ~6 s, then snaps back. First one
   ~4 s after the slide opens. Only while the slide is showing; never with
   reduced motion. */
.morph { position: relative; width: 440px; height: 440px; border-radius: 28px; }
.morph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 28px; margin: 0; }
.morph .morph-inside { opacity: 0; }
.reveal .slides section.present .morph .morph-inside { animation: doug-morph 14s linear -4s infinite; }
.reveal .slides section.present .morph { animation: doug-glow 14s linear -4s infinite; }
@keyframes doug-morph {
  0%, 50% { opacity: 0; }
  51% { opacity: 1; } 52.5% { opacity: 0; }
  54% { opacity: 1; } 55.5% { opacity: 0; }
  57%, 96% { opacity: 1; }
  97%, 100% { opacity: 0; }
}
@keyframes doug-glow {
  0%, 56% { transform: scale(1); box-shadow: 0 0 0 rgba(200, 40, 20, 0); }
  58% { transform: scale(1.05); box-shadow: 0 0 60px 10px rgba(200, 40, 20, 0.45); }
  72% { transform: scale(1.05); box-shadow: 0 0 30px 4px rgba(200, 40, 20, 0.25); }
  86% { transform: scale(1.05); box-shadow: 0 0 60px 10px rgba(200, 40, 20, 0.45); }
  96% { transform: scale(1.05); box-shadow: 0 0 40px 6px rgba(200, 40, 20, 0.3); }
  97%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(200, 40, 20, 0); }
}
@media (prefers-reduced-motion: reduce) { .reveal .slides section.present .morph .morph-inside, .reveal .slides section.present .morph { animation: none; } }

/* Principles: six cards, one line each, one per click. */
.princ-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.princ { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px 22px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.princ-n { position: absolute; top: 16px; right: 20px; font-family: var(--display); font-size: 36px; font-weight: 600; color: var(--line-strong); line-height: 1; }
.princ-t { font-size: 25px; font-weight: 800; line-height: 1.2; padding-right: 30px; }
.princ-d { font-size: 19px; line-height: 1.4; color: var(--muted); }

/* Eight principles: four across, slightly tighter type. */
.princ-grid.princ-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.princ-8 .princ { min-height: 170px; padding: 20px 20px; }
.princ-8 .princ-t { font-size: 22px; }
.princ-8 .princ-d { font-size: 17px; }
.princ-8 .princ-n { font-size: 30px; top: 14px; right: 16px; }

.know-sub { margin-top: 4px; font-size: 19px; color: var(--muted); }
.know h3 { font-size: 34px; }

/* Doug's reaction portraits. */
.divider .divider-doug { position: absolute; right: 0; bottom: -40px; width: 210px; height: 210px; border-radius: 24px; object-fit: cover; margin: 0; box-shadow: 0 14px 30px rgba(42, 34, 26, 0.12); }
.kill-doug { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; margin: 6px 0 0 0; align-self: flex-end; }
.reveal .slides section .corner-doug { position: absolute; top: 12px; right: 80px; width: 84px; height: 84px; border-radius: 18px; object-fit: cover; margin: 0; }
