/* ── MIT 6.S976/18.S996 Lean slides — dark green theme ── */


:root {
  --lean-accent: #166534;
  --lean-accent-light: #15803d;
  --lean-band: #14532d;
  --text-dark: #1e293b;
  --text-muted: #334155;
  --bg-code: #f8fafc;
  --border-code: #d1d5db;
  --bg-highlight: #f0fdf4;
  --border-highlight: #86efac;
}

/* ── Base typography ── */
.reveal {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 3.4vh;
  color: var(--text-dark);
}

.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
  text-transform: none;
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  color: var(--text-dark);
}

.reveal .slides section {
  text-align: left;
  padding: 2vh 3vw;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
}

/* ── Slide header (logo + green line) ── */
.slide-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.5em;
}
.slide-header img {
  height: 6vh;
  flex-shrink: 0;
}
.slide-header::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--lean-accent);
}

/* ── Title slide (two-part layout) ── */
.title-slide {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  padding: 0 !important;
}
.title-slide .top-area {
  padding: 1.2em 1.5em 0.8em;
}
.title-slide .logo {
  height: 140px;
}
.title-slide .green-band {
  background: var(--lean-band);
  flex: 1;
  padding: 1em 1.5em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.title-slide h1 {
  font-size: 1.8em;
  font-weight: 300;
  margin: 0 0 0.6em 0;
  color: #ffffff;
}
.title-slide .meta {
  font-size: 0.85em;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.6;
}
.title-slide .meta strong {
  font-weight: 500;
  color: #ffffff;
}
.title-slide .course-info {
  font-size: 0.75em;
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin-top: 0.8em;
}
.title-slide .date {
  font-size: 0.85em;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  margin-top: auto;
  padding-bottom: 0.5em;
}
/* lean4-skills as teletype on the green band: monospace, legible (no light code box) */
.title-slide h1 code,
.title-slide .meta code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.95em;
}

/* ── Content slides ── */
.reveal h2 {
  font-size: 1.3em;
  font-weight: 600;
  margin: 0 0 0.5em 0;
  color: var(--text-dark);
}

.reveal ul {
  font-size: 0.9em;
  font-weight: 300;
  line-height: 1.7;
  margin: 0;
  padding-left: 1.2em;
}
.reveal ul ul {
  font-size: 1em;
}
.reveal ul li {
  margin-bottom: 0.25em;
}

.reveal ol {
  font-size: 0.9em;
  font-weight: 300;
  line-height: 1.7;
  margin: 0;
  padding-left: 1.2em;
}
.reveal ol li {
  margin-bottom: 0.25em;
}

.reveal p {
  font-size: 0.9em;
  font-weight: 300;
  line-height: 1.6;
  margin: 0.4em 0;
}

.reveal strong {
  font-weight: 600;
  color: var(--text-dark);
}

.reveal em {
  font-style: italic;
}

.reveal a {
  color: var(--lean-accent-light);
  font-weight: 600;
}

/* ── Code blocks ── */
.reveal pre {
  font-size: 0.68em;
  width: 100%;
  margin: 0.4em 0;
  box-shadow: none;
  border: 1px solid var(--border-code);
  border-radius: 6px;
  background: var(--bg-code);
}
.reveal pre code {
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  padding: 0.8em 1em;
  max-height: 70vh;
  background: var(--bg-code);
  font-size: 0.95em;
  line-height: 1.55;
}

/* ── Lean syntax highlighting ── */
.reveal pre code .hljs-keyword,
.reveal pre code .keyword {
  color: #cf222e;
  font-weight: 700;
}
.reveal pre code .hljs-type,
.reveal pre code .hljs-built_in,
.reveal pre code .type-name {
  color: #0550ae;
}
.reveal pre code .hljs-title,
.reveal pre code .hljs-function,
.reveal pre code .def-name {
  color: #0550ae;
  font-weight: 600;
}
.reveal pre code .hljs-string {
  color: #0a3069;
}
.reveal pre code .hljs-number,
.reveal pre code .hljs-literal {
  color: #0550ae;
}
.reveal pre code .hljs-comment {
  color: #6e7781;
  font-style: italic;
}
.reveal pre code .hljs-symbol {
  color: #1e293b;
}

/* ── Inline code ── */
.reveal code {
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', monospace;
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.reveal pre code {
  background: var(--bg-code);
  padding: 0.8em 1em;
}

/* ── Accent ── */
.accent {
  color: var(--lean-accent);
  font-weight: 600;
}

/* ── Key-value highlight boxes ── */
.key-box {
  background: var(--bg-highlight);
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--lean-accent);
  border-radius: 0 8px 8px 0;
  padding: 0.6em 1em;
  margin: 0.4em 0;
  font-size: 0.85em;
}
.key-box strong {
  color: var(--text-dark);
}

/* ── Dark background slides ── */
.reveal section[data-background-color="#14532d"] {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}
.reveal section[data-background-color="#14532d"] h1,
.reveal section[data-background-color="#14532d"] h2 {
  color: #ffffff !important;
  font-size: 2em;
  font-weight: 300;
}
.reveal section[data-background-color="#14532d"] p,
.reveal section[data-background-color="#14532d"] li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1em;
}
.reveal section[data-background-color="#14532d"] em {
  color: #86efac;
}
.reveal section[data-background-color="#14532d"] strong {
  color: #ffffff;
}
.reveal section[data-background-color="#14532d"] code {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
  align-items: start;
}

/* ── Blockquotes ── */
.reveal blockquote {
  font-size: 0.85em;
  border-left: 4px solid var(--lean-accent);
  padding: 0.3em 0.8em;
  margin: 0.5em 0;
  background: var(--bg-highlight);
  border-radius: 0 6px 6px 0;
}

/* ── Lean code: Verso-style syntax colors ── */
.reveal,
.reveal section {
  --verso-code-keyword-color: #cf222e;
  --verso-code-const-color: #0550ae;
  --verso-code-var-color: #1e293b;
  --verso-code-color: #1e293b;
  --verso-code-font-family: 'Source Code Pro', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  --verso-info-indicator-color: var(--lean-accent);
  --verso-code-keyword-weight: 700;
}

/* ── Lean code block appearance ── */
.reveal code.hl.lean.block {
  background: var(--bg-code);
  border: 1px solid var(--border-code);
  border-radius: 6px;
  box-shadow: none;
  padding: 0.8em 1em;
  font-size: 0.5em;
  line-height: 1.55;
  width: 95%;
  max-width: 95%;
  text-align: left;
}

/* ── Code panel: Verso info panel alongside code ── */
.code-with-panel {
  border: 1px solid var(--border-code);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: none;
}
.code-with-panel > code.hl.lean.block {
  border: none;
  border-radius: 6px 0 0 6px;
  background: var(--bg-code);
}
.code-with-panel > .panel-cell {
  background: #f8fafc;
  border-left: 1px solid var(--border-code);
}
.code-with-panel > .info-panel,
.code-with-panel .info-panel {
  font-size: 0.45em;
  color: var(--text-dark);
}

/* ── Inline Lean code ── */
.reveal code.hl.lean.inline {
  background: #f1f5f9;
  border-radius: 3px;
  padding: 0.1em 0.3em;
  font-size: 0.85em;
}

/* ── #eval output ── */
.command-output.information {
  background: var(--bg-highlight);
  border-color: var(--lean-accent);
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── Soften wavy underlines on info diagnostics ── */
.reveal .hl.lean .has-info.information .token:not(.tactic-state):not(.tactic-state *),
.reveal .hl.lean .has-info.information .inter-text:not(.tactic-state):not(.tactic-state *) {
  text-decoration-color: rgba(22, 101, 52, 0.35);
}

/* ── Keyword: bold and colored ── */
.hl.lean .keyword {
  font-weight: 700 !important;
}

/* ── Variable: no italic ── */
.hl.lean .var {
  font-style: normal !important;
}

/* ── Re-enable Verso hover popups ── */
.hl.lean .hover-container {
  display: block;
}

/* ── Images ── */
.reveal section img {
  max-width: 70%;
  max-height: 45vh;
  object-fit: contain;
}
.reveal section img.img-tall {
  max-height: 70vh;
  max-width: 95%;
}
.reveal section img.img-small {
  max-height: 25vh;
  max-width: 40%;
}
.reveal section img.img-wide {
  max-width: 90%;
  max-height: 40vh;
}

/* ── Placeholder images ── */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.8em;
  font-weight: 400;
  min-height: 25vh;
  margin: 0.5em 0;
  padding: 1em;
}

/* ── hstack layout ── */
.reveal .r-hstack {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5em;
}
.reveal .r-hstack > ul {
  flex: 1;
}
.reveal .r-hstack > p {
  flex: 1;
}
.reveal .r-hstack > hr,
.reveal .r-hstack > p:empty {
  display: none;
}

/* ── Transcript / dialogue styling ── */
.transcript {
  font-size: 0.82em;
  line-height: 1.6;
}
.transcript .speaker {
  font-weight: 600;
  color: var(--lean-accent);
}
.transcript .pedagogy {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9em;
}

/* ── Axiom output box ── */
.axiom-output {
  background: var(--bg-highlight);
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--lean-accent);
  border-radius: 0 6px 6px 0;
  padding: 0.4em 0.8em;
  margin: 0.3em 0;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.75em;
  color: var(--text-dark);
}

/* ── Section break slides ── */
.section-break {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center !important;
}
.section-break h2 {
  font-size: 1.8em;
  font-weight: 300;
  color: #ffffff !important;
}
.section-break p {
  color: rgba(255,255,255,0.85);
  font-size: 1em;
}

/* ═══════════════════════════════════════════════════════════ */
/* ── Prompts→Protocols additions (UCSD 2026-05) ── */
/* ═══════════════════════════════════════════════════════════ */

/* ── Flow diagrams: boxes joined by arrows ── */
.flow-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 0.5em;
  flex-wrap: wrap;
  margin: 0.7em 0;
}
.flow-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  margin: 0.4em 0;
}
.flow-box {
  background: var(--bg-highlight);
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--lean-accent);
  border-radius: 6px;
  padding: 0.45em 0.7em;
  font-size: 0.62em;
  line-height: 1.3;
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flow-box .fb-title { font-weight: 600; color: var(--text-dark); display: block; }
.flow-box .fb-sub { color: var(--text-muted); font-size: 0.92em; }
.flow-box.dark { background: var(--lean-band); border-color: var(--lean-accent); }
.flow-box.dark .fb-title { color: #ffffff; }
.flow-box.dark .fb-sub { color: #86efac; }
.flow-box.wide { flex: 0 0 auto; min-width: 9em; }
.flow-arrow {
  color: var(--lean-accent);
  font-weight: 700;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.05em;
}
.flow-arrow.down { padding: 0.05em 0; }
.flow-arrow .albl { font-size: 0.5em; color: var(--text-muted); font-weight: 400; margin-left: 0.3em; }

/* ── Architecture: agent ↔ protocol layer ↔ Lean/Mathlib ── */
.arch { display: flex; align-items: center; justify-content: center; gap: 0.4em; margin: 0.6em 0; }
.arch .col { display: flex; flex-direction: column; gap: 0.45em; flex: 1; }
.arch .frame {
  border: 2px solid var(--lean-accent);
  border-radius: 8px;
  padding: 0.5em 0.45em;
  background: #f0fdf4;
  flex: 1.35;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}
.arch .frame .frame-title {
  font-size: 0.6em; font-weight: 600; text-align: center;
  color: var(--lean-accent); margin-bottom: 0.1em;
}

/* ── Prompt vs Protocol split ── */
.contrast-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2em;
  align-items: stretch;
  margin: 0.7em 0;
}
.contrast-2 .panel {
  border: 1px solid var(--border-code);
  border-radius: 8px;
  padding: 0.7em 0.9em;
  background: #ffffff;
}
.contrast-2 .panel h3 {
  font-size: 0.78em;
  margin: 0 0 0.45em 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.contrast-2 .panel.protocol { background: var(--bg-highlight); border-color: var(--border-highlight); }
.contrast-2 .panel ul { font-size: 0.82em; }

/* ── Big number hook ── */
.bignum {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  flex-wrap: wrap;
  margin: 0.8em 0;
}
.bignum .num { font-weight: 700; color: var(--lean-accent); line-height: 1; text-align: center; }
.bignum .num.sm  { font-size: 1.5em; }
.bignum .num.mid { font-size: 2.2em; }
.bignum .num.lg  { font-size: 2.6em; }
.bignum .num .lbl {
  display: block; font-size: 0.3em; font-weight: 400;
  color: var(--text-muted); margin-top: 0.3em;
}
.bignum .arrow { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); }
.bignum .arrow .glyph { font-size: 1.8em; line-height: 0.8; }
.bignum .arrow .albl { font-size: 0.95em; max-width: 12em; text-align: center; line-height: 1.25; margin-top: 0.25em; color: var(--text-dark); font-weight: 500; }

/* ── Evaluation stack ── */
.eval-stack { display: flex; flex-direction: column; gap: 3px; margin: 0.5em 0; }
.stack-layer {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  border-radius: 4px;
  padding: 0.32em 0.7em;
  font-size: 0.72em;
  background: var(--bg-highlight);
  border-left: 4px solid var(--lean-accent-light);
}
.stack-layer .sl-name { font-weight: 600; flex: 0 0 11em; color: var(--text-dark); }
.stack-layer .sl-q { color: var(--text-muted); flex: 1; }
.stack-layer.base { background: var(--lean-band); border-left-color: #052e16; }
.stack-layer.base .sl-name { color: #ffffff; }
.stack-layer.base .sl-q { color: #86efac; }

/* ── Failure → countermeasure table ── */
.fail-table { width: 100%; border-collapse: collapse; font-size: 0.74em; line-height: 1.4; }
.fail-table th {
  text-align: left;
  padding: 0.3em 0.5em;
  border-bottom: 1.5px solid var(--lean-accent);
  color: var(--text-dark);
  font-weight: 600;
}
.fail-table td { padding: 0.28em 0.5em; vertical-align: top; border-bottom: 1px solid #e2e8f0; }
.fail-table td.cm { color: var(--lean-accent); font-weight: 500; }
.fail-table td.cm .eg, .fail-table td.cm .eg code { color: #64748b !important; font-weight: 400 !important; }
.fail-table td.cm .eg { font-size: 0.9em; }
.fail-table td { vertical-align: top; }
.fail-table tr:nth-child(even) td { background: #f6f8fa; }
.fail-table th, .fail-table td { padding: 0.4em 0.6em; }

/* ── Reusable-prompt card (checklist slide) ── */
.prompt-card {
  background: var(--bg-highlight);
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--lean-accent);
  border-radius: 0 8px 8px 0;
  padding: 0.7em 0.9em;
}
.prompt-card .label {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--lean-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35em;
}
.prompt-card p { margin: 0; font-size: 0.82em; line-height: 1.55; }
.prompt-card em { color: var(--lean-accent); font-style: normal; font-weight: 600; }

/* ── Project grid ── */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45em 1.3em;
  font-size: 0.82em;
  margin: 0.5em 0;
}
.proj-grid .proj { border-left: 3px solid var(--lean-accent); padding-left: 0.6em; }
.proj-grid .proj strong { color: var(--text-dark); }
.proj-grid .proj .pd { color: var(--text-muted); font-size: 0.9em; }

/* ── Final thank-you slide: white top with link columns, green footer band ── */
.thanks-slide { display: flex !important; flex-direction: column; padding: 0 !important; }
.thanks-slide .top {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4vh 6vw;
}
.thanks-slide .top h2 { margin: 0 0 0.9em 0; font-size: 1.5em; }
.thanks-slide .link-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3em;
}
.thanks-slide .link-cols h3 {
  font-size: 0.8em;
  margin: 0 0 0.4em 0;
  color: var(--lean-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.thanks-slide .link-cols ul { list-style: none; padding: 0; margin: 0; font-size: 1em; line-height: 2; }
.thanks-slide .link-cols li { margin: 0; }
.thanks-slide .thanks-band {
  background: var(--lean-band);
  color: #ffffff;
  padding: 1.3em 6vw;
}
.thanks-slide .thanks-band .name { font-size: 1.3em; font-weight: 600; color: #ffffff; margin: 0 0 0.15em 0; }
.thanks-slide .thanks-band .sub { color: rgba(255,255,255,0.9); font-size: 0.85em; line-height: 1.5; }

/* ── Bounded-loop branch tags ── */
.branch-tag { font-size: 0.62em; font-weight: 700; color: var(--text-dark); margin-bottom: 0.25em; }
.branch-tag.accent { color: var(--lean-accent); }
.flow-box.loop { border-style: dashed; }

/* ── de Finetti contribution map (paper Figure 2) colors ── */
.flow-box.api    { background: #f1f5f9; border-color: #64748b; }
.flow-box.ending { background: #f1f5f9; border-color: #64748b; }
.flow-box.routeA { background: #e6edfa; border-color: #3b6bc4; }
.flow-box.routeB { background: #e0f2e0; border-color: #3f8f3f; }
.flow-box.routeC { background: #fce6cf; border-color: #cf8530; }
.flow-box.result { background: #fdf6c8; border-color: #b59f2e; }
.flow-box.result .fb-title { font-weight: 700; }
.flow-box.infra  { background: #f1f5f9; border-color: #94a3b8; flex: 1 1 0; }

/* ── "Show, don't tell": verbatim source code-cards, tag pills, enforcement spectrum ── */
/* A code-card is a styled "file card": a filename header bar above a verbatim source excerpt. */
.code-card {
  background: var(--bg-code);
  border: 1px solid var(--border-code);
  border-radius: 8px;
  overflow: hidden;
  margin: 0.5em 0;
}
.code-card .fname {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  background: #e8eef5;
  border-bottom: 1px solid var(--border-code);
  padding: 0.35em 0.85em;
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.66em;
  color: var(--text-muted);
}
.code-card .fname .path { font-weight: 600; }
.code-card pre {
  margin: 0;
  width: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg-code);
  font-size: 0.6em;
}
.code-card pre code {
  display: block;
  background: var(--bg-code);
  padding: 0.7em 1em;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;     /* soft-wrap long verbatim lines; never overflow the card horizontally */
  overflow-wrap: anywhere;
}

/* Reusable tag pill, used by both .code-card (verbatim provenance) and .transcript (stylized label) */
.tag {
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  font-weight: 600;
  color: var(--text-muted);
  background: #dde6f0;
  border: 1px solid #c4d2e0;
  border-radius: 999px;
  padding: 0.08em 0.6em;
  white-space: nowrap;
}
.code-card .fname .tag { font-size: 0.78em; font-weight: 400; }
.tagline { text-align: right; margin: -0.15em 0 0.25em; }
.tagline .tag { font-size: 0.6em; white-space: normal; }

/* Enforcement spectrum: model → tool → script → hook → kernel (darkest = kernel, the blocking floor) */
.enforce { display: flex; flex-direction: column; gap: 4px; margin: 0.55em 0; }
.enforce .row {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  border-radius: 4px;
  padding: 0.4em 0.75em;
  font-size: 0.72em;
  background: var(--bg-highlight);
  border-left: 4px solid var(--lean-accent-light);
}
.enforce .layer { font-weight: 700; flex: 0 0 4.2em; color: var(--text-dark); }
.enforce .rule { color: var(--text-muted); flex: 1; }
.enforce .chip {
  flex: 0 0 auto;
  font-size: 0.82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.05em 0.5em;
  border-radius: 4px;
}
.enforce .chip.adv { color: var(--lean-accent); background: #e2f0e6; }
.enforce .chip.blk { color: #ffffff; background: var(--lean-accent); }
.enforce .row.kernel { background: var(--lean-band); border-left-color: #052e16; }
.enforce .row.kernel .layer { color: #ffffff; }
.enforce .row.kernel .rule { color: #86efac; }
.enforce .row.kernel .rule code { background: rgba(255, 255, 255, 0.15); color: #ffffff; }
.enforce .row.kernel .chip.blk { background: #052e16; color: #86efac; }

/* Verbatim terminal-capture transcript (real session), reproduced as-is */
.reveal pre.term {
  font-size: 0.4em;
  background: #1a1b20;
  border: 1px solid #2c2f36;
  border-radius: 6px;
  width: 100%;
  margin: 0.3em 0;
}
.reveal pre.term code {
  font-size: 1em;
  font-family: 'Source Code Pro','SF Mono','Menlo','Monaco','Consolas',monospace;
  color: #d4d7dc;
  background: #1a1b20;
  line-height: 1.35;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0.7em 0.9em;
  max-height: 82vh;
  overflow: auto;
  display: block;
}
/* Claude-Code-style grey input box for the user prompt inside a terminal capture */
.reveal pre.term .cc-prompt {
  display: block;
  background: #30333b;
  border-radius: 5px;
  padding: 0.35em 0.6em;
  margin: 0.1em 0 0.35em;
}
/* Lightweight, consistent highlighting for terminal captures */
.reveal pre.term .kw   { color: #61afef; }                  /* reserved words (blue) */
.reveal pre.term .ty   { color: #56b6c2; }                  /* type names (teal) */
.reveal pre.term .tool { color: #e5c07b; font-weight: 700; }/* tool-call labels */
.reveal pre.term .b    { color: #ffffff; font-weight: 700; }/* emphasis (Notes lead-ins) */
.reveal pre.term .dot  { color: #98c379; font-weight: 700; }/* the ● turn markers */
.reveal pre.term .ok   { color: #98c379; }                  /* success / true */
.reveal pre.term .err  { color: #e06c75; }                  /* error / false */
.reveal pre.term .warn { color: #e5c07b; }                  /* warning */
.reveal pre.term .muted{ color: #7a828e; }                  /* timestamps, result pipes */
.reveal pre.term .cc-icon { color: #d97757; }               /* Claude Code logo (coral/orange) */

/* Search ladder: numbered tool steps (mirrors .enforce/.stack-layer band look) */
.ladder { display: flex; flex-direction: column; gap: 4px; margin: 0.5em 0; counter-reset: rung; }
.ladder .rung {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  border-radius: 4px;
  padding: 0.34em 0.7em;
  font-size: 0.74em;
  background: var(--bg-highlight);
  border-left: 4px solid var(--lean-accent-light);
}
.ladder .rung::before {
  counter-increment: rung;
  content: counter(rung);
  flex: 0 0 1.3em;
  font-weight: 700;
  color: var(--lean-accent);
  text-align: right;
}
.ladder .rung code { font-weight: 600; background: #eef4ee; }
.ladder .rung .what { color: var(--text-muted); flex: 1; }
.ladder .rung.test { background: var(--lean-band); border-left-color: #052e16; }
.ladder .rung.test::before { color: #86efac; }
.ladder .rung.test code { color: #ffffff; background: rgba(255,255,255,0.12); }
.ladder .rung.test .what { color: #86efac; }

/* ═══════════════════════════════════════════════════════════════
   ITP 2026 — Three Roads to de Finetti
   Additions on top of the attached Cambridge/UCSD GitHub Slides theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --itp-gold: #fbbf24;
  --itp-gold-dark: #b7791f;
  --route-a: #3b6bc4;
  --route-a-bg: #e6edfa;
  --route-b: #3f8f3f;
  --route-b-bg: #e0f2e0;
  --route-c: #cf8530;
  --route-c-bg: #fce6cf;
}

/* Ensure every slide is a stable 16:10 canvas under disableLayout. */
.reveal .slides section {
  overflow: hidden;
}

.reveal h3 {
  font-size: 0.95em;
  font-weight: 600;
  margin: 0 0 0.35em 0;
}

.reveal small {
  font-size: 0.72em;
  line-height: 1.35;
}

.title-slide .top-area {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 1em;
}

.itp-chip {
  border: 1px solid var(--itp-gold-dark);
  background: #fff8dc;
  color: #713f12;
  font-size: 0.58em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.45em 0.8em;
  margin-bottom: 0.25em;
  white-space: nowrap;
}

.title-slide .green-band {
  border-top: 7px solid var(--itp-gold);
}

.compact { font-size: 0.76em !important; line-height: 1.4 !important; }
.tight-list { line-height: 1.45 !important; }
.tight-list li { margin-bottom: 0.12em !important; }
.tight-list.small, ul.small, ol.small { font-size: 0.72em; }
.compact-cols { gap: 1.4em; }

.source-foot {
  position: absolute;
  left: 3vw;
  right: 3vw;
  bottom: 1.3vh;
  color: #64748b;
  font-size: 0.58em;
  line-height: 1.3;
}

.scope-note {
  margin-top: 0.45em;
  border-left: 4px solid var(--itp-gold-dark);
  background: #fffdf2;
  padding: 0.45em 0.7em;
  color: #475569;
  font-size: 0.66em;
  line-height: 1.4;
}

/* Exchangeability visual */
.exchange-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin-top: 0.2em;
}
.exchange-panel {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.55em 0.7em 0.4em;
}
.exchange-panel h3 { text-align: center; }
.exchange-svg { width: 100%; height: 31vh; display: block; }

/* Theorem slide */
.theorem-card { margin-top: 0.35em; }
.theorem-card pre code { font-size: 0.84em; line-height: 1.35; padding: 0.55em 0.75em; }
.direction-row {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 0.7em;
  margin-top: 0.45em;
}
.direction {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45em 0.6em 0.45em 3.9em;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  font-size: 0.67em;
  line-height: 1.35;
}
.direction.easy { background: #f8fafc; }
.direction.hard { background: #f0fdf4; border-color: #86efac; }
.direction .dir-label {
  position: absolute;
  left: 0.55em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.direction.hard .dir-label { color: var(--lean-accent); }
.direction span:last-child { color: #64748b; }

/* Scale/evolution */
.evolution-row {
  display: grid;
  grid-template-columns: 1fr 0.55fr 1.12fr 0.55fr 1.12fr;
  gap: 0.35em;
  align-items: stretch;
  margin: 0.55em 0 0.65em;
}
.evo-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.65em 0.45em;
  text-align: center;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.evo-card.artifact { background: #fff8dc; border-color: #d7a921; }
.evo-card.refactor { background: #f0fdf4; border-color: #4caf65; }
.evo-num { font-size: 1.6em; font-weight: 700; color: var(--lean-accent); line-height: 1; }
.evo-card.artifact .evo-num { color: #92400e; }
.evo-title { font-size: 0.72em; font-weight: 700; margin-top: 0.35em; }
.evo-sub { font-size: 0.72em; color: #64748b; line-height: 1.3; margin-top: 0.2em; }
.evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1.3em;
  line-height: 1;
}
.evo-arrow span { font-size: 0.55em; line-height: 1.2; text-align: center; margin-top: 0.45em; color: #64748b; }

/* Contribution map */
.figure-wrap { display: flex; justify-content: center; align-items: center; height: 60vh; }
.contribution-map { max-width: 100%; max-height: 59vh; width: auto; }

/* Common-ending interface */
.equation-card {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.25em 0.7em;
  margin: 0.3em 0 0.55em;
  text-align: center;
  font-size: 0.82em;
}
.equation-card .katex-display { margin: 0.25em 0; }
.small-math { font-size: 0.7em; }
.interface-flow {
  display: grid;
  grid-template-columns: 1.25fr auto 1fr auto 1.2fr auto 0.85fr;
  gap: 0.35em;
  align-items: stretch;
  margin: 0.35em 0 0.55em;
}
.if-box {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 0.45em;
  min-height: 6.8em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-size: 0.58em;
  line-height: 1.3;
}
.if-box strong { font-size: 1.15em; margin: 0.12em 0; }
.if-box span { color: #64748b; }
.if-box .if-kicker { text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8em; color: var(--lean-accent); font-weight: 700; }
.if-box.route-source { border-color: #64748b; background: #f8fafc; }
.if-box.result { background: #fdf6c8; border-color: #b59f2e; }
.if-arrow { display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 0.9em; }

/* Route slides */
.route-heading { display: flex; align-items: center; gap: 0.5em; }
.route-heading h2 { margin-bottom: 0.35em; }
.route-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  font-size: 0.82em;
  flex: 0 0 auto;
}
.route-pill.routeA { background: var(--route-a); }
.route-pill.routeB { background: var(--route-b); }
.route-pill.routeC { background: var(--route-c); }
.route-layout { display: grid; grid-template-columns: 1.65fr 0.82fr; gap: 0.8em; margin-top: 0.2em; }
.route-steps { border-left: 6px solid #64748b; display: flex; flex-direction: column; gap: 0.28em; padding-left: 0.45em; }
.routeA-border { border-color: var(--route-a); }
.routeB-border { border-color: var(--route-b); }
.routeC-border { border-color: var(--route-c); }
.route-step {
  display: grid;
  grid-template-columns: 2em 1fr;
  gap: 0.35em;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  padding: 0.42em 0.5em;
  font-size: 0.66em;
  line-height: 1.35;
  min-height: 5.1em;
  align-items: center;
}
.route-step .step-num {
  width: 1.65em;
  height: 1.65em;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #475569;
}
.route-step span { color: #475569; }
.route-aside {
  border-radius: 10px;
  padding: 0.75em 0.8em;
  font-size: 0.86em;
  line-height: 1.4;
  border: 1.5px solid #cbd5e1;
}
.routeA-bg { background: var(--route-a-bg); border-color: var(--route-a); }
.routeB-bg { background: var(--route-b-bg); border-color: var(--route-b); }
.routeC-bg { background: var(--route-c-bg); border-color: var(--route-c); }
.route-aside p { font-size: 0.95em; }
.route-stat {
  margin-top: 0.65em;
  font-size: 1.35em;
  font-weight: 700;
  line-height: 1;
  color: var(--text-dark);
}
.route-stat span { display: block; font-size: 0.42em; font-weight: 500; color: #64748b; line-height: 1.3; margin-top: 0.25em; }

/* Tables */
.compare-table, .stats-table, .conflict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.63em;
  line-height: 1.28;
  margin-top: 0.35em;
}
.compare-table th, .stats-table th, .conflict-table th {
  background: var(--lean-band);
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 0.42em 0.5em;
  border-right: 1px solid rgba(255,255,255,0.22);
}
.compare-table td, .stats-table td, .conflict-table td {
  padding: 0.42em 0.5em;
  border-bottom: 1px solid #dbe3eb;
  vertical-align: top;
}
.compare-table tbody tr:nth-child(even), .stats-table tbody tr:nth-child(even), .conflict-table tbody tr:nth-child(even) { background: #f8fafc; }
.compare-table tr.ra td:first-child { border-left: 5px solid var(--route-a); }
.compare-table tr.rb td:first-child { border-left: 5px solid var(--route-b); }
.compare-table tr.rc td:first-child { border-left: 5px solid var(--route-c); }
.stats-table .group td { background: #eef2f7; font-style: italic; font-weight: 600; color: #475569; }
.stats-table .total td { background: #fff8dc; font-weight: 700; border-top: 2px solid #b59f2e; }

/* AI responsibility */
.responsibility-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.7em; margin: 0.55em 0; }
.resp-card { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 0.65em; min-height: 12.2em; }
.resp-card.model { background: #f8fafc; }
.resp-card.lean { background: #f0fdf4; border-color: #86efac; }
.resp-card.human { background: #fff8dc; border-color: #d7a921; }
.resp-card h3 { text-align: center; }

/* Review timeline */
.review-timeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.3em;
  align-items: stretch;
  margin: 0.6em 0;
}
.rt-node {
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.7em 0.55em;
  min-height: 8.4em;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.62em;
  line-height: 1.3;
}
.rt-node strong { font-size: 1.55em; }
.rt-node small { color: #64748b; margin-top: 0.3em; }
.rt-date { text-transform: uppercase; font-size: 0.72em; letter-spacing: 0.06em; font-weight: 700; color: #64748b; margin-bottom: 0.35em; }
.rt-node.submitted { background: #fff8dc; border-color: #d7a921; }
.rt-node.diagnosis { background: #fff7ed; border-color: #fb923c; }
.rt-node.actions { background: #f8fafc; }
.rt-node.result { background: #f0fdf4; border-color: #4caf65; }
.rt-arrow { display: flex; align-items: center; justify-content: center; color: #64748b; }
.four-gains { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.5em; margin: 0.45em 0; }
.four-gains div { border-top: 4px solid var(--lean-accent); background: #f8fafc; border-radius: 5px; padding: 0.45em; font-size: 0.62em; text-align: center; line-height: 1.3; }
.four-gains span { display: block; color: #64748b; margin-top: 0.2em; }

/* TauCeti main slides */
.tau-timeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.15fr;
  gap: 0.25em;
  align-items: stretch;
  margin: 0.5em 0;
}
.tau-step {
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 9px;
  padding: 0.55em;
  min-height: 9.2em;
  font-size: 0.58em;
  line-height: 1.32;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tau-step strong { margin: 0.25em 0; }
.tau-step small { color: #64748b; }
.tau-step.summit { background: #f0fdf4; border-color: #4caf65; }
.tau-id { font-size: 0.8em; font-weight: 700; color: var(--lean-accent); letter-spacing: 0.04em; text-transform: uppercase; }
.tau-arrow { display: flex; align-items: center; color: #64748b; }
.tau-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.55em; margin: 0.5em 0; }
.tau-stats div { background: var(--lean-band); color: white; border-radius: 8px; text-align: center; padding: 0.45em; }
.tau-stats strong { display: block; color: white; font-size: 1.35em; }
.tau-stats span { font-size: 0.48em; color: #bbf7d0; }
.theorem-vs-gains { grid-template-columns: 1.2fr 0.9fr; gap: 0.8em; }
.tau-code pre code { font-size: 0.74em; line-height: 1.35; }
.gain-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45em; }
.gain { border: 1px solid #cbd5e1; border-radius: 8px; padding: 0.5em; background: #f8fafc; font-size: 0.61em; line-height: 1.3; }
.gain strong { display: block; margin-bottom: 0.2em; color: var(--lean-accent); }
.gain span { color: #475569; }

/* Closing */
.closing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.7em; margin: 0.4em 0 0.9em; }
.closing-grid > div { border-top: 5px solid var(--lean-accent); background: #f8fafc; border-radius: 6px; padding: 0.6em; min-height: 7.1em; position: relative; }
.closing-num { position: absolute; right: 0.35em; top: 0.15em; font-size: 2.3em; font-weight: 700; color: #dbe7de; }
.closing-grid strong { font-size: 0.75em; }
.closing-grid p { font-size: 0.63em; line-height: 1.35; position: relative; }
.closing-links { font-size: 0.75em; }
.closing-links ul { font-size: 0.8em !important; line-height: 1.6 !important; }

/* Appendix */
.appendix { background: white; }
.appendix h2::after {
  content: 'APPENDIX';
  float: right;
  margin-top: 0.3em;
  font-size: 0.36em;
  letter-spacing: 0.12em;
  color: #94a3b8;
  font-weight: 700;
}
.appendix.dense { font-size: 0.95em; }
.appendix-break p { text-align: center; }
.import-graph { max-height: 78vh !important; }
.import-slide h2 { margin-bottom: 0.2em; }

.common-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; margin: 0.6em 0; }
.common-detail { border: 1px solid #cbd5e1; border-radius: 9px; padding: 0.6em; background: #f8fafc; min-height: 7.5em; }
.common-detail > span { font-size: 0.55em; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--lean-accent); }
.common-detail strong { display: block; font-size: 0.72em; margin: 0.2em 0; }
.common-detail p { font-size: 0.62em; line-height: 1.35; }
.common-detail.result { background: #fdf6c8; border-color: #b59f2e; }
.compact-ladder .rung { font-size: 0.64em; padding: 0.4em 0.55em 0.4em 3em; }

.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65em; margin: 0.6em 0; }
.module-grid div { border-left: 5px solid var(--route-a); background: #f8fafc; padding: 0.6em; border-radius: 5px; font-size: 0.68em; line-height: 1.35; min-height: 7em; }
.module-grid strong { display: block; }
.module-grid span { color: #475569; }

.bridge-chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1.05fr auto 1.05fr auto 0.9fr; gap: 0.25em; align-items: center; margin: 0.8em 0; }
.bridge-chain div { border: 1px solid #cbd5e1; border-radius: 7px; padding: 0.55em 0.35em; text-align: center; font-size: 0.58em; line-height: 1.25; background: #f8fafc; min-height: 7.5em; display: flex; flex-direction: column; justify-content: center; }
.bridge-chain span { display: block; color: #64748b; margin-top: 0.2em; }
.bridge-chain b { color: #64748b; }

.layer-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em 0.7em; margin-top: 0.7em; }
.layer-list > div { display: grid; grid-template-columns: 2.7em 1fr; column-gap: 0.45em; border: 1px solid #cbd5e1; border-left-width: 6px; border-radius: 6px; padding: 0.6em 0.75em; font-size: 0.82em; line-height: 1.35; }
.layer-list > div > span { grid-row: 1 / span 2; font-size: 1.25em; font-weight: 700; align-self: center; text-align: center; }
.layer-list small { grid-column: 2; color: #64748b; }
.layer-list .done { border-left-color: #22c55e; background: #f0fdf4; }
.layer-list .partial { border-left-color: #eab308; background: #fefce8; }
.layer-list .open { border-left-color: #ef4444; background: #fff7f7; }

.tau-table { font-size: 0.7em; }
.pr-cascade { display: flex; flex-direction: column; gap: 0.28em; margin-top: 0.45em; }
.pr-row { display: grid; grid-template-columns: 5.5em 1.2fr 1.6fr; gap: 0.5em; align-items: center; border-left: 6px solid #94a3b8; background: #f8fafc; border-radius: 5px; padding: 0.42em 0.55em; font-size: 0.62em; line-height: 1.25; }
.pr-row > span { font-weight: 700; color: var(--lean-accent); }
.pr-row small { color: #64748b; }
.pr-row.summit { border-left-color: #22c55e; background: #f0fdf4; }
.pr-row.facade { border-left-color: var(--itp-gold-dark); background: #fff8dc; }

.before-after { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.7em; align-items: center; margin-top: 0.5em; }
.ba-col { border: 1px solid #cbd5e1; border-radius: 10px; padding: 0.65em; min-height: 17em; }
.ba-col.before { background: #fff7ed; }
.ba-col.after { background: #f0fdf4; }
.ba-col h3 { text-align: center; }
.ba-box { border: 1px solid #cbd5e1; background: white; border-radius: 6px; padding: 0.5em; margin: 0.35em 0; font-size: 0.62em; line-height: 1.3; }
.ba-box.good { border-color: #86efac; }
.ba-box.gold { border-color: #d7a921; background: #fffdf2; }
.ba-arrow { font-size: 1.5em; color: #64748b; }

.metric-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75em; align-items: center; margin: 0.65em 0; }
.metric { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 0.65em; text-align: center; min-height: 10em; display: flex; flex-direction: column; justify-content: center; font-size: 0.84em; }
.metric.old { background: #fff7ed; border-color: #fb923c; }
.metric.new { background: #f0fdf4; border-color: #4caf65; }
.metric-num { font-size: 1.8em; color: var(--lean-accent); font-weight: 700; margin: 0.25em 0; }
.metric small { color: #64748b; }
.metric-arrow { font-size: 1.5em; color: #64748b; }
.mini-code pre code { font-size: 0.9em; line-height: 1.35; padding: 0.5em 0.7em; }
.tower-code { margin-top: 0.55em; }

.api-table { font-size: 0.66em; }
.hyp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; margin: 0.65em 0; }
.hyp-grid > div { border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; padding: 0.65em; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.35em; text-align: center; font-size: 0.61em; line-height: 1.25; min-height: 7em; }
.hyp-grid small { grid-column: 1 / span 3; color: #64748b; margin-top: 0.25em; }
.hyp-grid > div > span { color: var(--lean-accent); font-weight: 700; }

.interface-table { display: flex; flex-direction: column; gap: 0.38em; margin-top: 0.5em; }
.interface-table > div { display: grid; grid-template-columns: 1.15fr 1.6fr 0.45fr; gap: 0.55em; align-items: center; border: 1px solid #cbd5e1; border-left: 5px solid var(--lean-accent); background: #f8fafc; border-radius: 6px; padding: 0.48em 0.6em; font-size: 0.62em; line-height: 1.25; }
.interface-table span { color: #475569; }
.interface-table em { text-align: right; color: var(--lean-accent); font-weight: 700; font-style: normal; }

.prune-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.55em; margin-top: 0.55em; }
.prune-grid > div { border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; padding: 0.55em; min-height: 8.8em; font-size: 0.59em; line-height: 1.3; display: flex; flex-direction: column; }
.prune-grid strong { color: var(--lean-accent); }
.prune-grid span { color: #475569; margin: 0.25em 0; }
.prune-grid small { margin-top: auto; font-weight: 700; color: #94a3b8; }

.rubric-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em; margin: 0.55em 0; }
.rubric-cloud span { border: 1px solid #86a78f; background: #f0fdf4; color: #14532d; border-radius: 999px; padding: 0.3em 0.65em; font-size: 0.58em; font-weight: 600; }
.review-numbers { justify-content: center; gap: 1.5em; }
.review-numbers .num { min-width: 4.2em; }
.conflict-table { font-size: 0.55em; line-height: 1.2; }
.conflict-table td { padding: 0.34em 0.45em; }
.conflict-slide h2 { margin-bottom: 0.3em; }

.naming-examples { display: flex; flex-direction: column; gap: 0.45em; margin: 0.65em 0; }
.naming-examples > div { display: grid; grid-template-columns: 1.15fr 0.75fr auto 1.4fr 0.85fr; gap: 0.4em; align-items: center; border: 1px solid #cbd5e1; border-radius: 7px; padding: 0.55em; background: #f8fafc; font-size: 0.6em; line-height: 1.25; }
.naming-examples span { color: #64748b; }
.naming-examples b { color: var(--lean-accent); }

.decision-tree { margin: 0.8em 0; }
.dt-root { width: 46%; margin: 0 auto 0.7em; background: var(--lean-band); color: white; text-align: center; padding: 0.55em; border-radius: 8px; font-size: 0.68em; font-weight: 600; }
.dt-branches { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.7em; }
.dt-branches > div { border: 1px solid #cbd5e1; border-top: 5px solid var(--lean-accent); background: #f8fafc; border-radius: 7px; padding: 0.6em; text-align: center; min-height: 9em; font-size: 0.62em; line-height: 1.3; }
.dt-branches span, .dt-branches small { display: block; color: #64748b; }
.dt-branches strong { display: block; margin: 0.35em 0; }

.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75em; margin-top: 0.55em; }
.case-card { border: 1px solid #cbd5e1; border-radius: 9px; background: #f8fafc; padding: 0.65em; min-height: 15em; }
.case-card h3 { color: var(--lean-accent); }
.case-card p { font-size: 0.7em; line-height: 1.4; }
.case-resolution { border-left: 5px solid #0d9488; background: #f0fdfa; padding: 0.55em; font-size: 0.63em; line-height: 1.35; }

.expose-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1.1fr auto 1fr; gap: 0.35em; align-items: stretch; margin: 0.75em 0; }
.expose-flow > div { border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; padding: 0.55em; min-height: 10em; font-size: 0.58em; line-height: 1.3; display: flex; flex-direction: column; justify-content: center; }
.expose-flow > b { display: flex; align-items: center; color: #64748b; }
.expose-flow span { color: #475569; margin-top: 0.3em; }
.expose-flow .failure { background: #fff7f7; border-color: #ef4444; }
.expose-flow .success { background: #f0fdf4; border-color: #22c55e; }
.playbook { font-size: 0.72em !important; line-height: 1.45 !important; }
.playbook li { background: #f8fafc; border-left: 5px solid var(--lean-accent); margin-bottom: 0.38em !important; padding: 0.42em 0.55em; border-radius: 0 6px 6px 0; }

.remaining-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8em; margin: 0.55em 0; }
.remaining-grid > div { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 0.65em; min-height: 16em; }
.remaining-grid .landed { background: #f0fdf4; border-color: #86efac; }
.remaining-grid .remaining { background: #fff8dc; border-color: #d7a921; }
.remaining-grid > div > strong { display: block; text-align: center; margin-bottom: 0.4em; }
.facade-code pre code { font-size: 0.68em; line-height: 1.4; }
.source-links ul { font-size: 0.8em !important; }

/* Better code-card filename sizing for long TauCeti paths. */
.code-card .fname { font-size: 0.58em; }

/* Print/viewport fallback */
@media (max-aspect-ratio: 4/3) {
  .reveal { font-size: 3.0vh; }
}


/* ── Offline-safe title and mathematics ── */
.reveal .slides section.title-slide .green-band {
  background-color: #14532d !important;
  background-image: none !important;
}

.math-display {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02em;
  line-height: 1.45;
  letter-spacing: 0.005em;
  text-align: center;
  color: #111827;
}
.math-display sub,
.math-display sup,
.math-inline sub,
.math-inline sup {
  font-size: 0.64em;
  line-height: 0;
}
.math-inline {
  font-family: Georgia, "Times New Roman", serif;
  white-space: nowrap;
}
.math-symbol { font-style: normal; }
.math-equals { display: inline-block; padding: 0 0.35em; }
.math-arrow { display: inline-block; padding: 0 0.28em; }
.math-ae {
  display: inline-block;
  margin-left: 0.55em;
  font-family: var(--font-main);
  font-size: 0.62em;
  font-style: normal;
  color: #475569;
  white-space: nowrap;
}
.frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  line-height: 0.82;
  margin-right: 0.08em;
  transform: translateY(-0.04em);
}
.frac > span:first-child {
  border-bottom: 1px solid currentColor;
  padding: 0 0.12em 0.08em;
}
.frac > span:last-child { padding-top: 0.08em; }

/* ─── editorial-compression pass (July 2026) ─────────────────────── */

/* merged factorization slide: three routes converge */
.routes-converge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6em; margin: 0.35em 0 0.1em; }
.rc-route { border: 1.5px solid; border-radius: 8px; text-align: center; padding: 0.38em; font-size: 0.7em; font-weight: 600; }
.rc-route.routeA { background: var(--route-a-bg); border-color: var(--route-a); }
.rc-route.routeB { background: var(--route-b-bg); border-color: var(--route-b); }
.rc-route.routeC { background: var(--route-c-bg); border-color: var(--route-c); }
.rc-converge {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;                       /* matches .routes-converge, so each arrow sits under its route */
  text-align: center;
  font-size: 1.15em;
  line-height: 1.1;
  margin: 0.05em 0 0.1em;
}
.rc-converge .routeA { color: var(--route-a); }
.rc-converge .routeB { color: var(--route-b); }
.rc-converge .routeC { color: var(--route-c); }

/* per-route bottleneck note */
.bottleneck { border-left: 6px solid #64748b; background: #f8fafc; border-radius: 0 8px 8px 0; padding: 0.55em 0.8em; font-size: 0.74em; line-height: 1.45; margin-top: 0.6em; }
.bottleneck strong { color: var(--lean-accent); }
.bottleneck.routeA { border-color: var(--route-a); background: var(--route-a-bg); }
.bottleneck.routeB { border-color: var(--route-b); background: var(--route-b-bg); }
.bottleneck.routeC { border-color: var(--route-c); background: var(--route-c-bg); }

/* three-bottleneck synthesis cards */
.bottleneck-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7em; margin: 0.6em 0; }
.bn-card { border: 1.5px solid #cbd5e1; border-top-width: 7px; border-radius: 9px; padding: 0.75em 0.8em; background: #f8fafc; min-height: 8.5em; display: flex; flex-direction: column; }
.bn-card.routeA { border-color: var(--route-a); background: var(--route-a-bg); }
.bn-card.routeB { border-color: var(--route-b); background: var(--route-b-bg); }
.bn-card.routeC { border-color: var(--route-c); background: var(--route-c-bg); }
.bn-card .bn-kicker { text-transform: uppercase; font-size: 0.7em; letter-spacing: 0.05em; font-weight: 700; color: var(--text-dark); }
.bn-card p { font-size: 0.92em; line-height: 1.4; margin: 0.4em 0; }
.bn-card .bn-stat { margin-top: auto; font-size: 0.74em; color: #475569; font-weight: 600; }

/* workflow tool chips */
.chip-row { display: flex; justify-content: center; gap: 0.5em; margin: 0.45em 0; flex-wrap: wrap; }
.chip-row span { border: 1px solid #cbd5e1; background: #f8fafc; color: #334155; border-radius: 999px; padding: 0.25em 0.65em; font-size: 0.58em; font-weight: 600; }
.chip-row span code { font-size: 0.95em; }

/* martingale-route status strip (TauCeti teal frame, status semantics inside) */
.route-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55em; margin-top: 0.55em; }
.route-status > div { border: 1px solid #cbd5e1; border-left-width: 6px; border-radius: 6px; background: #f8fafc; padding: 0.45em 0.6em; font-size: 0.68em; line-height: 1.3; }
.route-status .st { display: block; font-weight: 700; }
.route-status .landed { border-left-color: #0d9488; background: #f0fdfa; }
.route-status .landed .st { color: #0f766e; }
.route-status .partial { border-left-color: #eab308; background: #fefce8; }

/* TauCeti identity: teal, distinct from route-B green */
.tau-contrast tbody tr td:first-child { border-left: 5px solid #94a3b8; }
.tau-contrast tbody tr td:last-child { border-left: 5px solid #0d9488; }

/* TauCeti before/after change grid */
.tau-changes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55em; margin: 0.45em 0; }
.tc-box { border: 1px solid #5eead4; border-top: 5px solid #0d9488; border-radius: 9px; background: #f0fdfa; padding: 0.55em 0.7em; font-size: 0.63em; line-height: 1.38; }
.tc-box h3 { font-size: 1.05em; margin-bottom: 0.25em; color: #0f766e; }
.tc-box .arr { color: #0f766e; font-weight: 700; padding: 0 0.3em; }
.tc-hl { display: block; margin-top: 0.3em; font-weight: 600; color: #134e4a; }

/* appendix divider: what is back there, as bullets */
.reveal .appendix-toc {
  list-style: disc;
  text-align: left;
  max-width: 26em;
  margin: 0.9em auto 0;
  padding-left: 1.1em;
  font-size: 0.82em;
  line-height: 1.5;
}
.reveal .appendix-toc li {
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.5em;
}
.appendix-toc li::marker { color: #86efac; }

/* closing cards carry a paragraph now, not a one-liner */
.closing-grid > div { min-height: 6.4em; }

.case-card.short { min-height: 8.5em; }

/* ─── neutral (process) treatment ─────────────────────────────────────
   Slate, so route blue/green/orange and TauCeti teal remain the only
   colors that carry meaning. Used where a slide already spends its
   color budget on routes, or where the content is workflow, not math. */
.key-box.neutral {
  background: #f8fafc;
  border-color: #cbd5e1;
  border-left-color: #475569;
}
.ladder.neutral .rung { background: #f8fafc; border-left-color: #94a3b8; }
.ladder.neutral .rung::before { color: #64748b; }
.ladder.neutral .rung code { background: #eef2f7; color: #1e293b; }
/* left rule darkens down the ladder, so the steps read as a sequence */
.ladder.neutral .rung:nth-child(1) { border-left-color: #cbd5e1; }
.ladder.neutral .rung:nth-child(2) { border-left-color: #94a3b8; }
.ladder.neutral .rung:nth-child(3) { border-left-color: #64748b; }
.ladder.neutral .rung:nth-child(4) { border-left-color: #475569; }
.ladder.neutral .rung:nth-child(5) { border-left-color: #334155; }

/* predicate names inside a display equation are code, not prose */
.math-pred {
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', monospace;
  font-weight: 600;
  font-size: 0.86em;
  letter-spacing: 0;
  color: #1e293b;
}

/* ═══════════════════════════════════════════════════════════════════
   COLOR DISCIPLINE PASS
   Blue = Route A, green = Route B, orange = Route C, and nothing else.
   Gold  = the artifact and the shared target it is aimed at.
   Teal  = TauCeti.
   Slate = structure, process, captions, numbers.
   House dark green is chrome only: title band, appendix background,
   links, section rules. It never labels a content object.
   ═══════════════════════════════════════════════════════════════════ */

/* — kickers, labels and numeric callouts drop to slate — */
.if-box .if-kicker { color: #475569; }
.common-detail > span { color: #475569; }
.bottleneck strong { color: #1e293b; }
.evo-num { color: #334155; }
.bignum .num { color: #334155; }
.case-card h3 { color: #334155; }
.compare-table th, .stats-table th, .conflict-table th { background: #334155; }
.scope-note { border-left-color: #94a3b8; background: #f8fafc; }

/* — the hard direction is the shared target, so it takes the gold — */
.direction.hard { background: #fffdf2; border-color: var(--itp-gold-dark); }
.direction.hard .dir-label { color: var(--itp-gold-dark); }

/* — TauCeti material takes teal, including its status and its review — */
.key-box.tau { background: #f0fdfa; border-color: #5eead4; border-left-color: #0d9488; }
.rubric-cloud span { border-color: #5eead4; background: #f0fdfa; color: #134e4a; }
.case-resolution { border-left-color: #0d9488; background: #f0fdfa; }
.playbook li { border-left-color: #0d9488; }
.metric.old { background: #f8fafc; border-color: #94a3b8; }
.metric.new { background: #f0fdfa; border-color: #0d9488; }
.metric.old .metric-num { color: #334155; }
.metric.new .metric-num { color: #0f766e; }

/* status is encoded by weight, not by a second hue: solid teal = landed,
   dashed teal = partial. Amber and status-green would read as route C / B. */
.layer-list .done { border-left-color: #0d9488; background: #f0fdfa; }
.layer-list .partial { border-left-color: #5eead4; border-left-style: dashed; background: #f8fafc; }
.layer-list .done > span { color: #0f766e; }
.layer-list .partial > span { color: #64748b; }
.route-status .partial { border-left-color: #5eead4; border-left-style: dashed; background: #f8fafc; }
.route-status .partial .st { color: #475569; }

/* — appendix route slides carry their route color — */
.route-pill.inline { font-size: 0.6em; vertical-align: 0.18em; margin-right: 0.45em; }
.ladder.routeA .rung { background: var(--route-a-bg); border-left-color: var(--route-a); }
.ladder.routeA .rung::before { color: var(--route-a); }
.ladder.routeA .rung code { background: #dde7f7; }
.bridge-chain.routeB div { background: var(--route-b-bg); border-color: var(--route-b); }
.key-box.routeC { background: var(--route-c-bg); border-color: var(--route-c); border-left-color: var(--route-c); }
/* bases neutralized so an unmodified reuse cannot leak green into a route slide */
.ladder .rung { background: #f8fafc; border-left-color: #94a3b8; }
.ladder .rung::before { color: #64748b; }
.metric-num { color: #334155; }

/* — slide 10: recurring failure, then the rule it became — */
.incidents { display: flex; flex-direction: column; gap: 0.32em; margin: 0.5em 0 0.55em; }
.incidents > div {
  display: grid;
  grid-template-columns: 1.25fr auto 1fr;
  gap: 0.65em;
  align-items: center;
  background: #f8fafc;
  border-left: 4px solid #94a3b8;
  border-radius: 0 6px 6px 0;
  padding: 0.45em 0.7em;
  font-size: 0.76em;
  line-height: 1.32;
}
.incidents > div > span:first-child { color: #475569; }
.incidents b { color: #94a3b8; font-weight: 700; }
.incidents .fix { color: #1e293b; font-weight: 600; }
.incidents code { font-size: 0.88em; }

/* — slide 10: what lean4-skills has been for, in three stages — */
.arc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6em; margin: 0.5em 0 0.55em; }
.arc-row > div {
  border: 1px solid #cbd5e1;
  border-top: 5px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.6em 0.7em;
  font-size: 0.74em;
  line-height: 1.35;
}
.arc-row > div:nth-child(2) { border-top-color: #94a3b8; }
.arc-row > div:nth-child(3) { border-top-color: #334155; }
.arc-row .when { display: block; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.82em; font-weight: 700; color: #64748b; }
.arc-row strong { display: block; margin: 0.22em 0 0.18em; color: #1e293b; }
.arc-row .body { color: #475569; }
.compact.quiet { color: #475569; }
.reveal h3.arc-label { font-size: 0.78em; font-weight: 600; color: #475569; margin: 2.9em 0 0.15em; }

/* — appendix: the remaining roadmap as an ordered queue — */
.queue { display: flex; flex-direction: column; gap: 0.34em; margin: 0.5em 0; }
.queue > div {
  display: grid;
  grid-template-columns: 4.2em 1fr;
  column-gap: 0.7em;
  align-items: baseline;
  border: 1px solid #cbd5e1;
  border-left: 6px solid #0d9488;
  border-radius: 0 7px 7px 0;
  background: #f0fdfa;
  padding: 0.45em 0.65em;
  font-size: 0.62em;
  line-height: 1.32;
}
.queue > div:nth-child(3) { border-left-color: #5eead4; background: #f8fafc; }
.queue > div:nth-child(4) { border-left-color: #99f6e4; border-left-style: dashed; background: #f8fafc; }
.queue .qn { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 0.88em; color: #0f766e; }
.queue > div:nth-child(3) .qn, .queue > div:nth-child(4) .qn { color: #64748b; }
.queue strong { grid-column: 2; color: #1e293b; }
.queue small { grid-column: 2; display: block; color: #475569; margin-top: 0.1em; }

/* ─── slides 1-8 run larger ───────────────────────────────────────────
   These slides were laid out conservatively and carry 9-15em of unused
   vertical space each. Scaling the section font keeps every proportion
   the design already has and simply uses the room. Slides 9+ are denser
   and stay at the base size. */
#title                { font-size: 1.12em; }
#intuition            { font-size: 1.10em; }
#theorem              { font-size: 1.02em; }
#scale                { font-size: 1.18em; }
#factorization-target { font-size: 1.10em; }
/* the three route slides move together: they are seen in sequence and a
   size difference between them would read as a change in emphasis */
#route-a, #route-b, #route-c { font-size: 1.15em; }
/* the permutation diagram is sized in vh, so it needs its own bump to
   keep pace with the text around it */
#intuition .exchange-svg { height: 34vh; }

/* closing band: thanks on the left, slide archive on the right */
.thanks-slide .thanks-band { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; }
.thanks-slide .thanks-band .band-link {
  margin-left: auto;              /* right-aligns even if the flex context changes */
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', monospace;
  font-size: 0.72em;
  color: #86efac;
  text-decoration: none;
  white-space: nowrap;
}
/* title slide: the archive URL sits in the bottom corner of the band.
   margin-top:auto pushes it down the flex column, align-self pushes it
   right; 0.56em offsets the slide's 1.12em scale so it renders at the
   same size as the closing band's copy. */
.title-slide .green-band .band-link {
  margin-top: auto;
  align-self: flex-end;
  font-family: 'Source Code Pro', 'SF Mono', 'Menlo', monospace;
  font-size: 0.64em;
  color: #86efac;
  text-decoration: none;
  white-space: nowrap;
}
.intro-gap { margin-top: 0.9em !important; }
/* panel headings read "term: gloss"; the gloss is lighter so two bold
   lines do not compete with the diagram underneath */
.exchange-panel h3 .gloss { font-weight: 400; color: #475569; }
/* slide 3: compact contractability figure, sized in em so it tracks the
   section scale rather than the viewport */
.contract-svg { display: block; width: 100%; max-width: 25em; height: auto; margin: 0.3em auto 0.5em; }

/* ─── slides 9-14 run larger too ──────────────────────────────────────
   The earlier pass scaled only 1-8, which left the whole second half of
   the talk visibly smaller: the TauCeti table and the post-review note
   were the worst of it. Scaled per slide by the slack each one has. */
#bottlenecks      { font-size: 1.12em; }
#ai-workflow      { font-size: 1.06em; }   /* densest main slide, smallest bump */
#post-review      { font-size: 1.15em; }
#tauceti-rebuild  { font-size: 1.15em; }
#tauceti-changes  { font-size: 1.12em; }
#closing          { font-size: 1.10em; }

/* the smallest primitive in the deck; 0.58em was too fine to read */
.source-foot { font-size: 0.63em; }

/* the intuition diagrams have room to breathe now */
#intuition .exchange-svg { height: 38vh; }

/* ─── KaTeX ───────────────────────────────────────────────────────────
   Rendered by explicit opt-in on [data-tex], never by an auto-render
   sweep, so the Lean code blocks are untouchable. .tex is display,
   .tex-i is inline. KaTeX and its fonts are bundled under lib/katex,
   so the deck still runs with no network. */
.equation-card .katex-display { margin: 0.2em 0; }
.equation-card .katex-display > .katex { font-size: 1.05em; }
.tex-i .katex { font-size: 1em; }
.katex { color: #111827; }
/* the display cards no longer need the hand-rolled serif math styling */
.equation-card.math-display { font-family: inherit; }
/* long qualifiers sit on their own centred line under the display math */
.equation-card .math-ae { display: block; margin: 0.1em 0 0; }
