/* Shipping Reliable Products — deck theme.
   Every slide is one kitchen order ticket: thermal paper, thermal ink, dashed tear rules.
   Human = red thermal ink. Agent = reverse print (paper on ink). */
:root {
  --paper: #fbfaf6;
  --paper-2: #efede6;
  /* the only greys: a five-step ink ramp */
  --ink: #1f1e24;
  --ink-2: #47464d;
  --ink-3: #66656b;
  --ink-4: #a6a5a9;
  --ink-5: #dddbd4;
  --you: #c4372a;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, Menlo, monospace;
  --tear: 2px dashed var(--ink-4);
  --pad-x: 96px;
}

html, body, .reveal-viewport, .reveal, .reveal .slides, .reveal .backgrounds, .reveal .slide-background {
  background: var(--paper) !important;
}
.reveal { color: var(--ink); font-family: var(--display); }
.reveal ::selection { background: var(--you); color: var(--paper); }
.reveal .slides { text-align: left; }
.reveal .slides section {
  overflow: hidden; box-sizing: border-box; height: 100%; min-height: 100%;
  padding: 132px var(--pad-x) 64px; background: var(--paper);
}
.reveal .slides > section.stack { padding: 0 !important; }

/* ── the ticket frame: running header + tear rule, perforated foot ── */
.kot-hd {
  position: absolute; top: 40px; left: var(--pad-x); right: var(--pad-x); z-index: 3;
  display: flex; gap: 24px; align-items: baseline; padding-bottom: 18px; border-bottom: 3px dashed var(--ink);
  font: 500 17px/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink);
}
.kot-hd .no { flex: none; }
.kot-hd .item { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kot-hd .clock { flex: none; min-width: 120px; text-align: right; }
.kot-hd .live { position: static; flex: none; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); padding: 4px 10px; margin: -4px 0; font-weight: 500; }
.reveal .slides section:not(.stack)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; z-index: 0;
  background: radial-gradient(circle at 8px 12px, var(--ink-4) 5px, transparent 5.5px) 0 0 / 16px 12px repeat-x;
}

/* ── type: a display size and a line size per slide ── */
.reveal h1, .reveal h2, .reveal h3 {
  color: var(--ink); font-family: var(--display); font-weight: 800; font-stretch: 75%;
  letter-spacing: -0.015em; line-height: 0.96; text-transform: none; margin: 0; text-wrap: balance;
}
.reveal h1 { max-width: 1060px; font-size: 96px; }
.reveal h2 { max-width: 1060px; font-size: 64px; }
.reveal h2 + h2 { margin-top: 18px; }
.reveal h3 { font-size: 27px; font-weight: 700; font-stretch: 85%; line-height: 1.1; letter-spacing: 0; }
.reveal p, .reveal li { color: var(--ink-2); font-size: 27px; line-height: 1.32; }
.reveal p { margin: 20px 0 0; max-width: 960px; }
.reveal strong { color: var(--ink); font-weight: 700; }
.reveal em { font-style: italic; }
.reveal a { color: var(--ink); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 5px; }
.reveal code { font-family: var(--mono); color: var(--ink); font-size: 0.86em; }
.reveal pre { width: 100%; box-shadow: none; margin: 32px 0 0; font-size: 19px; }
.reveal pre code {
  background: none; color: var(--ink); font-family: var(--mono); line-height: 1.55;
  padding: 18px 0; border-top: var(--tear); border-bottom: var(--tear); max-height: 470px;
}
.reveal .hljs, .reveal .hljs * { color: var(--ink); }
.reveal .hljs-comment, .reveal .hljs-comment * { color: var(--ink-3); }

/* old eyebrow labels and section numbers feed the header, never render in place */
.poster-label, .section-slide .num { display: none; }

/* ── statement slides ── */
.statement h1 { margin-top: 110px; font-size: 112px; }
.statement h2 { margin-top: 120px; font-size: 76px; }
.statement .subtitle { margin-top: 30px; font-size: 30px; }
.statement.giant h1 { margin-top: 80px; font-size: 240px; letter-spacing: -0.03em; }
.statement.center { text-align: center; }
.statement.center h1, .statement.center h2, .statement.center p { margin-left: auto; margin-right: auto; }

/* ── section openers: mostly blank stock ── */
.section-slide h1 { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 150px; font-size: 104px; }
.section-slide .subtitle { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 84px; margin: 0; font-size: 27px; color: var(--ink-3); }

/* ── who did it: red ink for you, reverse print for the agent ── */
.tag { display: inline-block; font: 500 18px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 7px; vertical-align: middle; margin-left: 8px; }
.tag.you { color: var(--you); box-shadow: inset 0 0 0 1.5px var(--you); }
.tag.agent { color: var(--paper); background: var(--ink); }
.tag.both { color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.you-h, .poster-tile.you h3 { color: var(--you) !important; }
.agent-h, .poster-tile.agent h3 { display: inline-block; background: var(--ink); color: var(--paper) !important; padding: 3px 9px 4px; }

/* ── line items (formerly tiles) ── */
.tile-row { position: relative; z-index: 2; display: grid; column-gap: 32px; row-gap: 26px; margin-top: 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-row.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.poster-tile { border-top: var(--tear); padding-top: 16px; min-width: 0; }
.poster-tile h3 { margin: 0 0 10px; }
.poster-tile p { margin: 6px 0 0; font-size: 21px; line-height: 1.32; }
.poster-tile.key { border-top: 3px solid var(--ink); }

/* ── plates (memes, 1-bit thermal prints) ── */
.meme-slide .meme-image {
  position: absolute; left: 50%; top: 228px; transform: translateX(-50%);
  height: 356px; width: auto; max-width: none; max-height: none; z-index: 1; image-rendering: pixelated;
}
.meme-slide h2 { position: relative; z-index: 2; font-size: 52px; }
.meme-slide .caption {
  position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 48px; z-index: 2; margin: 0;
  font-size: 23px; color: var(--ink-2); max-width: none;
}
.fig { display: inline-block; margin-right: 14px; font: 500 15px/1 var(--mono); letter-spacing: 0.06em; color: var(--ink); }
.meme-slide .meme-image.tall { height: 400px; max-height: none; top: 196px; }

.meme-slide .meme-image.up { top: 118px; height: 410px; max-height: none; }

/* ── two columns, a tear down the middle ── */
.split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 40px; position: relative; z-index: 2; }
.split > div { padding: 4px 36px 0 0; min-width: 0; }
.split > div + div { padding: 4px 0 0 36px; border-left: var(--tear); }
.split h3 { margin: 0 0 14px; }
.split p { font-size: 23px; margin: 8px 0 0; }
.split ul { margin: 6px 0 0; padding-left: 22px; }
.split li { font-size: 22px; line-height: 1.36; margin: 5px 0; }
.split li::marker { color: var(--ink-4); }

/* ── Brooks fractions ── */
.fractions { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1.5fr; margin-top: 64px; border-top: 3px dashed var(--ink); border-bottom: var(--tear); position: relative; z-index: 2; }
.fractions > div { padding: 30px 22px; }
.fractions > div + div { border-left: var(--tear); }
.fractions strong { display: block; font: 800 96px/1 var(--display); font-stretch: 75%; color: var(--ink); letter-spacing: -0.02em; }
.fractions span { display: block; margin-top: 14px; font: 500 16px/1 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.fractions .agent-slice { background: var(--ink); }
.fractions .agent-slice strong, .fractions .agent-slice span { color: var(--paper); }

/* ── tables ── */
.reveal table { margin-top: 32px; font-size: 20px; border-collapse: collapse; width: 100%; position: relative; z-index: 2; }
.reveal table th { font: 500 18px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 10px 12px 10px 0; border-bottom: 3px dashed var(--ink); }
.reveal table td { padding: 10px 12px 10px 0; border-bottom: var(--tear); color: var(--ink-2); vertical-align: top; line-height: 1.3; font-size: 21px; }
.reveal table td:first-child { color: var(--ink); font-weight: 700; white-space: nowrap; }
.reveal table.tight td, .reveal table.tight th { padding-top: 7px; padding-bottom: 7px; }
.reveal table.tight td { font-size: 19px; }
.reveal table.tight th { font-size: 16px; }

/* ── agenda ── */
.agenda { margin-top: 30px; list-style: none; padding: 0; position: relative; z-index: 2; }
.agenda li { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; padding: 9px 0; border-bottom: var(--tear); font-size: 22px; color: var(--ink); align-items: baseline; }
.agenda li .t, .agenda li .d { font: 500 16px/1 var(--mono); color: var(--ink-3); }
.agenda li.hands { font-weight: 700; }
.agenda li.hands .d { background: var(--ink); color: var(--paper); padding: 4px 8px; }

/* ── ladder ── */
.ladder { margin-top: 40px; display: grid; position: relative; z-index: 2; }
.ladder > div { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 14px 0; border-top: var(--tear); font-size: 25px; color: var(--ink); align-items: baseline; }
.ladder > div:last-child { border-bottom: var(--tear); }
.ladder .n { font: 500 18px/1 var(--mono); color: var(--ink-3); }
.ladder.stair > div:nth-child(2) { margin-left: 56px; }
.ladder.stair > div:nth-child(3) { margin-left: 112px; }
.ladder.stair > div:nth-child(4) { margin-left: 168px; }
.ladder.stair > div:nth-child(5) { margin-left: 224px; }

/* ── workflow strip ── */
.strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; margin-top: 56px; position: relative; z-index: 2; }
.strip > div { border-top: var(--tear); padding: 14px 0; min-height: 150px; }
.strip .n { font: 500 15px/1 var(--mono); color: var(--ink-3); display: block; }
.strip b { display: block; font-size: 22px; font-stretch: 85%; color: var(--ink); margin-top: 10px; line-height: 1.12; }
.strip .tag { margin: 14px 0 0; font-size: 16px; padding: 4px 5px; }
.strip > div.you { border-top: 3px solid var(--you); }
.strip > div.agent { border-top: 3px solid var(--ink); }

/* ── side by side ── */
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 20px; height: calc(100% - 60px); position: relative; z-index: 2; }
.side img { width: 100%; max-height: 480px; object-fit: contain; image-rendering: pixelated; }

/* ── contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 24px; margin-top: 44px; position: relative; z-index: 2; }
.contact-card { display: block; text-decoration: none !important; }
.contact-card p { font: 400 19px/1.3 var(--mono); }

/* ── lines under the headline ── */
.subtitle { margin-top: 26px; font-size: 27px; color: var(--ink-2); }
.kicker { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 50px; margin: 0; font-size: 27px; color: var(--ink); z-index: 2; max-width: none; }
.kicker.mono { font: 400 17px/1.4 var(--mono); color: var(--ink-3); }

.reveal .fragment.fade-in-then-semi-out.visible:not(.current-fragment) { opacity: 0.35; }

/* ── /btw: a second ticket clipped under the first ── */
.reveal .slides section.btw-slide { background: var(--paper-2); }
.btw-slide::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; z-index: 2;
  background: var(--paper); border-bottom: 2px dashed var(--ink-4);
}
.btw-slide .kot-hd { top: 50px; }
.btw-slide h2 { position: relative; z-index: 2; }

.reveal .slide-number, .reveal .progress { display: none !important; }

/* fixes after first look */
.statement:has(.agenda) h2 { margin-top: 0; }
.reveal h2 + p, .reveal h2 + ul { margin-top: 30px; }

.poster-tile p { font-size: 22px; }
.statement:has(.agenda) h2 { font-size: 60px; }
.agenda { margin-top: 22px; }
.agenda li { padding: 6px 0; font-size: 21px; }
.reveal .agenda { margin-left: 0; width: 100%; }
.figtag { position: absolute; left: var(--pad-x); top: 500px; margin: 0; z-index: 2; }
.fig { font-size: 16px; }
.reveal pre { font-size: 17px; }
.reveal ul.plain { list-style: none; margin: 34px 0 0; padding: 0; max-width: 980px; }
.reveal ul.plain li { padding: 12px 0; border-top: var(--tear); font-size: 30px; color: var(--ink); }
.reveal ul.plain li:last-child { border-bottom: var(--tear); }
.split .tag + p { margin-top: 14px; }
.ladder.stair > div:nth-child(5) { margin-left: 224px; }
.reveal .slides section.btw-slide.meme-slide { background: var(--paper); }

/* where the next click goes: arrows show direction (right = next slide, down = /btw aside);
   the MORE tag shows when the next click reveals more on this slide */
.reveal .controls { right: 28px; bottom: 26px; overflow: visible; }
.reveal .controls button { color: var(--ink-3) !important; }
.reveal .controls button.enabled { opacity: 1; }
.reveal .controls button:not(.enabled) { opacity: 0; }
.reveal::after {
  content: "more"; display: none; position: absolute; right: 30px; bottom: 112px; z-index: 12;
  font: 500 14px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); padding: 5px 8px; pointer-events: none;
}
html.kot-more .reveal::after { display: block; }
html:not(.kot-down) .reveal .controls .navigate-down { opacity: 0 !important; }

/* exercise slides: the header names the chapter, the clock slot carries the time */
.exercise .ladder > div:last-child { border-top: 3px dashed var(--ink); }
.exercise pre { margin-top: 22px; }
.exercise pre code { padding: 12px 0; font-size: 15px; line-height: 1.45; }
.exercise pre + .ladder { margin-top: 18px; }
.exercise .ladder > div { padding: 9px 0; font-size: 22px; }
.exercise pre + .ladder > div:first-child { border-top: 0; }
.tenets { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; margin-top: 28px; }
.tenets > div { display: grid; grid-template-columns: 44px 1fr; padding: 11px 0; border-top: var(--tear); font-size: 24px; color: var(--ink); align-items: baseline; }
.tenets > div:nth-last-child(-n+2) { border-bottom: var(--tear); }
.tenets .n { font: 500 16px/1 var(--mono); color: var(--ink-3); }
.tenets + p { margin-top: 26px; font-size: 26px; color: var(--ink); }
