/* ==========================================================================
   Project decks: continuously scrolling slides with a counter, a dot
   rail and a set of slide layouts. Also holds the work-in-progress styling
   and the small interactive widgets used on individual decks.
   ========================================================================== */

:root { --bar-h: 58px; --tape-h: 0px; }
.deck--wip { --tape-h: 30px; }

/* Continuous scrolling: no snapping and no full-screen slides. Jumping to a
   slide from the dot rail leaves room for the fixed bars. */
html.deck-html { scroll-padding-top: calc(var(--bar-h) + var(--tape-h) + 12px); }
/* The work-in-progress tape lives under the top bar, so the root needs to know its height too. */
html.deck-html:has(.deck--wip) { --tape-h: 30px; }

/* ---------- Top bar ---------- */
.deck-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: var(--bar-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.deck-bar__back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
}
.deck-bar__back:hover { color: var(--ink); }
.deck-bar__back span { transition: transform 0.2s var(--ease); }
.deck-bar__back:hover span { transform: translateX(-3px); }
.deck-bar__title {
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deck-bar__level {
  margin-right: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.deck-bar__right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.deck-bar__count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.deck-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
}
.deck-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.15s linear;
}

/* ---------- Dot rail ---------- */
.deck-dots {
  position: fixed;
  right: clamp(10px, 1.6vw, 22px);
  top: 50%;
  z-index: 55;
  display: grid;
  gap: 10px;
  translate: 0 -50%;
}
.deck-dot {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--ink-3);
  background: transparent;
  rotate: 45deg;
  transition: background-color 0.2s, border-color 0.2s, scale 0.2s;
}
.deck-dot:hover { border-color: var(--ink); }
.deck-dot[aria-current="true"] { background: var(--accent); border-color: var(--accent); scale: 1.25; }
.deck-dot::after {
  content: attr(data-title);
  position: absolute;
  right: 22px;
  top: 50%;
  translate: 0 -50%;
  rotate: -45deg;
  transform-origin: 100% 50%;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.deck-dot:hover::after,
.deck-dot:focus-visible::after { opacity: 1; }

.deck-hint {
  position: fixed;
  left: var(--gutter);
  bottom: 16px;
  z-index: 40;
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: opacity 0.4s;
}
.deck-hint kbd {
  padding: 0.05em 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: inherit;
}
.deck-hint.is-hidden { opacity: 0; }

/* ---------- Slides ---------- */
.slide {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 3vh, 32px) calc(var(--gutter) + 28px) clamp(20px, 3vh, 32px) var(--gutter);
  border-bottom: 1px dashed var(--line);
}
/* Only the first slide has to clear the fixed bar. */
.slide:first-of-type {
  padding-top: calc(var(--bar-h) + var(--tape-h) + clamp(24px, 4vh, 40px));
}
.slide__inner {
  width: min(var(--maxw), 100%);
  margin-inline: auto;
}
.slide__head { display: grid; gap: 10px; margin-bottom: clamp(16px, 2.6vh, 26px); }
.slide__head .lede { max-width: 44em; }
.slide__title {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  font-weight: 720;
  letter-spacing: -0.035em;
}
.slide p + p { margin-top: 0.9em; }
.slide .body { color: var(--ink-2); font-size: 1.04rem; max-width: 40em; }
.slide .body strong { color: var(--ink); }

/* two-column layouts */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.split--media-wide { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.split--text-wide { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split--top { align-items: start; }

.split > *,
.compare > *,
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.phases > *,
.scope > * { min-width: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }

/* ---------- Title slide ---------- */
.deck-title {
  font-size: clamp(2.8rem, 6.6vw, 5.6rem);
  font-weight: 770;
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.pitch { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 32em; }
.title-copy { display: grid; gap: 22px; justify-items: start; }
.title-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
}
.facts > div { padding: 12px 16px; border-bottom: 1px dashed var(--line-strong); }
.facts > div:nth-child(odd) { border-right: 1px dashed var(--line-strong); }
.facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
.facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.facts dt {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts dd { margin: 3px 0 0; font-weight: 600; line-height: 1.3; }

.title-art { position: relative; }
.title-art .frame { rotate: 1.2deg; }
.title-art .tape--tl { left: -18px; top: 10px; rotate: -38deg; }
.title-art .tape--br { right: -18px; bottom: 14px; rotate: -38deg; }

/* ---------- Figures ---------- */
.fig { margin: 0; display: grid; gap: 10px; }
.fig__img {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
}
.fig__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
a.fig__img { cursor: zoom-in; }
a.fig__img:hover img { transform: scale(1.025); }
a.fig__img::after {
  content: "⤢";
  position: absolute;
  right: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s;
}
a.fig__img:hover::after,
a.fig__img:focus-visible::after { opacity: 1; }
.fig__img--contain img { object-fit: contain; background: var(--card); }
.fig__img--dark { background: #1d1e21; }
.fig__img--dark img { object-fit: contain; }
.fig figcaption {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.fig figcaption b { color: var(--accent-ink); font-weight: 700; letter-spacing: 0.06em; margin-right: 6px; }
.fig--shadow .fig__img { box-shadow: 8px 8px 0 var(--paper-3); }
.fig--tall .fig__img { max-height: 62vh; }
.fig--tall .fig__img img { max-height: 62vh; object-fit: contain; }

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  padding: 4px 8px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.badge--accent { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Full-bleed image slide ---------- */
.slide--bleed { padding: 0; min-height: min(68svh, 600px); justify-content: flex-end; border-bottom: 0; overflow: hidden; background: var(--arena); }
.slide--bleed > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bleed-caption {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 0 clamp(28px, 6vh, 56px) var(--gutter);
  padding: 18px 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--accent);
}
.bleed-caption .slide__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 8px 0 8px; }
.bleed-caption p:last-child { color: var(--ink-2); font-size: 0.98rem; }

/* ---------- Milestones (Prototype → Gold) ---------- */
.phases {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  list-style: none;
  counter-reset: phase;
}
.phase {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 18px 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
}
.phase::before {
  counter-increment: phase;
  content: counter(phase, decimal-leading-zero);
  position: absolute;
  right: 14px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-3);
}
.phase:not(:last-child)::after {
  content: "";
  position: absolute;
  right: calc(-1 * clamp(14px, 1.8vw, 22px) - 1px);
  top: 26px;
  width: clamp(14px, 1.8vw, 22px);
  border-top: 1.5px dashed var(--ink-3);
}
.phases--stack { --n: 1; gap: 16px; }
.phases--stack .phase::after {
  right: auto;
  left: 28px;
  top: 100%;
  width: 0;
  height: 16px;
  border-top: 0;
  border-left: 1.5px dashed var(--ink-3);
}
.phase__name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.phase__goal { font-weight: 680; line-height: 1.25; letter-spacing: -0.01em; }
.phase ul { display: grid; gap: 8px; list-style: none; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.phase li { position: relative; padding-left: 14px; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
.phase li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; background: var(--ink-3); }
.phase li b { color: var(--ink); font-weight: 650; }

/* ---------- Bullet + card lists ---------- */
.points { display: grid; gap: 14px; list-style: none; }
.points li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.5; }
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  background: var(--accent);
  rotate: 45deg;
}
.points li b { color: var(--ink); font-weight: 650; }

.card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
}
.card__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.card h3 { font-size: 1.2rem; font-weight: 690; letter-spacing: -0.015em; line-height: 1.2; }
.card p { color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.card--accent { box-shadow: 6px 6px 0 var(--accent); }

/* ---------- Big stat ---------- */
.stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15em 0.3em;
  font-size: clamp(3.6rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.stat__arrow { color: var(--accent); font-weight: 500; }
.stat__to { color: var(--accent-ink); }
.stat small { font-size: 0.32em; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-3); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.meter {
  position: relative;
  height: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--paper-2);
  overflow: hidden;
}
.meter span { position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--c, var(--ink-3)); }
.meter + .meter { margin-top: 10px; }

/* ---------- Before / after ---------- */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); align-items: start; }

.compare--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.spec-table th,
.spec-table td { padding: 9px 14px; text-align: left; border-bottom: 1px dashed var(--line-strong); vertical-align: top; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper-2);
  white-space: nowrap;
}
.spec-table td.num { font-family: var(--font-mono); font-size: 0.82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spec-table td:first-child,
.spec-table td.move { font-weight: 600; }
.spec-table td.num:first-child { font-weight: 400; color: var(--ink-3); }
.spec-table .is-red td.move { color: var(--red); }

.pill {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}
.pill--red { background: var(--red); color: #fff; }
.pill--yellow { background: var(--yellow); color: #1c1c1e; }
.pill--ink { background: var(--ink); color: var(--paper); }

/* wind-up bars inside the move table */
.windup { display: flex; align-items: center; gap: 8px; }
.windup i { display: block; height: 6px; width: calc(var(--t) * 46px); background: var(--accent); border-radius: 1px; }
.is-red .windup i { background: var(--red); }

/* ---------- Quote / note ---------- */
.quote-hand {
  font-family: var(--font-hand);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent-ink);
  rotate: -1.5deg;
}

/* ---------- Next level ---------- */
.next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--paper-3);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.next:hover { transform: translate(-2px, -2px); box-shadow: 11px 11px 0 var(--accent); }
.next__media { position: relative; min-height: 240px; border-right: 1.5px solid var(--ink); background: var(--arena); }
.next__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.6s var(--ease); }
.next:hover .next__media img { filter: none; }
.next__body { display: grid; align-content: center; gap: 10px; padding: clamp(22px, 3vw, 36px); }
.next__label { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); }
.next__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 760; letter-spacing: -0.035em; line-height: 1; }
.next__body p { color: var(--ink-2); }
.end-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ==========================================================================
   Work-in-progress deck (The Boss Fight)
   ========================================================================== */
.wip-tape {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  right: 0;
  z-index: 58;
  height: var(--tape-h);
  overflow: hidden;
  border-block: 5px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #1c1c1e 0 9px, var(--yellow) 9px 18px) 5;
  background: var(--yellow);
  color: #1c1c1e;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 20px;
  white-space: nowrap;
}
.wip-tape__track { display: inline-block; animation: tape 40s linear infinite; }
@keyframes tape { to { transform: translateX(-50%); } }

.stamp {
  display: inline-block;
  padding: 4px 10px;
  border: 2.5px solid var(--red);
  border-radius: 3px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  rotate: -6deg;
  opacity: 0.85;
  mix-blend-mode: multiply;
}
[data-theme="night"] .stamp { mix-blend-mode: normal; }

.wip-viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--arena);
  box-shadow: 10px 10px 0 var(--yellow);
}
.wip-viewport .arena__capsule--boss { --w: 60px; --h: 168px; left: 56%; bottom: 30%; }
.wip-viewport .arena__capsule--player { --w: 24px; --h: 66px; left: 28%; bottom: 22%; }
.wip-viewport__label {
  position: absolute;
  right: 12px;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.wip-viewport__stamp {
  position: absolute;
  left: 18px;
  top: 18px;
  background: rgba(255, 255, 255, 0.92);
  mix-blend-mode: normal;
}
.wip-viewport__note { margin: 22px 0 0 auto; max-width: 380px; }

.rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
}
.rules li {
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}
.rules b { color: var(--ink); }

.phasebar__track span {
  overflow: hidden;
  padding-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 19px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
.card p b { color: var(--ink); font-weight: 650; }

/* commentary layer: margin notes that can be switched off from the bar */
.commentary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.commentary-toggle::before {
  content: "";
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 7px 50%, #fff 4px, transparent 4.5px), var(--ink-3);
}
.commentary-toggle[aria-pressed="true"]::before {
  background: radial-gradient(circle at 17px 50%, #fff 4px, transparent 4.5px), var(--accent);
}
.commentary { transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
html[data-commentary="off"] .commentary { opacity: 0; transform: scale(0.96); pointer-events: none; }

.margin-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-family: var(--font-hand);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
.margin-note small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* boss bar used on the title + phases slides */
.phasebar { position: relative; padding-top: 26px; }
.phasebar__name {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.phasebar__track {
  display: grid;
  grid-template-columns: 10fr 50fr 40fr;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  overflow: hidden;
}
.phasebar__track span { position: relative; }
.phasebar__track span + span { border-left: 2px solid var(--ink); }
.phasebar__track .p3 { background: repeating-linear-gradient(-45deg, var(--red) 0 6px, color-mix(in srgb, var(--red) 70%, #000) 6px 12px); }
.phasebar__track .p2 { background: color-mix(in srgb, var(--red) 82%, var(--paper)); }
.phasebar__track .p1 { background: color-mix(in srgb, var(--red) 55%, var(--paper)); }
.phasebar__scale {
  display: grid;
  grid-template-columns: 10fr 50fr 40fr;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
}
.phasebar__scale span:last-child { display: flex; justify-content: space-between; }

.phase-cards { display: grid; grid-template-columns: 10fr 50fr 40fr; gap: 14px; margin-top: 22px; }
.phase-cards .card { min-width: 0; }

/* commentary layer HUD mock-up */
.hud-mock {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--arena);
  color: #f1ede4;
  font-family: var(--font-mono);
}
.hud-mock .arena { position: absolute; inset: 0; }
.hud-mock__strip {
  position: absolute;
  left: 3%;
  top: 5%;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  font-size: clamp(0.55rem, 0.9vw, 0.72rem);
  line-height: 1.45;
  min-width: 34%;
}
.hud-mock__strip b { color: #ffb08a; font-weight: 700; }
.hud-mock__readout {
  position: absolute;
  left: 3%;
  top: 31%;
  z-index: 2;
  width: 40%;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  font-size: clamp(0.5rem, 0.82vw, 0.68rem);
  line-height: 1.5;
}
.hud-mock__readout ol { list-style: none; display: grid; gap: 2px; margin-top: 4px; }
.hud-mock__readout li { display: flex; justify-content: space-between; gap: 8px; opacity: 0.75; }
.hud-mock__readout li.is-pick { opacity: 1; color: #ffb08a; }
.hud-mock__readout li .no { color: #ff7d8c; }
.hud-mock__note {
  position: absolute;
  right: 3%;
  top: 6%;
  z-index: 2;
  width: 30%;
  padding: 10px 12px;
  background: var(--note);
  color: var(--note-ink);
  font-family: var(--font-hand);
  font-size: clamp(0.85rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.12;
  rotate: 1.5deg;
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.6);
}
.hud-mock__label {
  position: absolute;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  z-index: 2;
}
.hud-mock__player {
  position: absolute;
  left: 3%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: 24%;
}
.hud-mock__player i { display: block; height: 6px; border: 1px solid rgba(255, 255, 255, 0.5); background: linear-gradient(90deg, var(--c) var(--v), rgba(0, 0, 0, 0.4) var(--v)); }
.hud-mock__player .pips { display: flex; gap: 4px; }
.hud-mock__player .pips span { width: 8px; height: 8px; border-radius: 50%; background: #e9d27a; }
.hud-mock .bossbar { width: 52%; left: 60%; bottom: 7%; }
.hud-mock .bossbar__track { height: 8px; }

.trigger-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.trigger {
  padding: 0.6em 0.9em;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.trigger:hover { border-color: var(--accent); }
.trigger[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* MoSCoW scope board */
.scope { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.scope .card ul { display: grid; gap: 6px; list-style: none; font-size: 0.9rem; color: var(--ink-2); }
.scope .card li::before { content: "▪ "; color: var(--ink-3); }
.scope .card--cut { background: transparent; border-style: dashed; }
.scope .card--cut li { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; color: var(--ink-3); }

.checklist { display: grid; gap: 10px; list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--card);
}
.checklist li.is-done::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  border-color: var(--accent);
}
.checklist small { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-3); letter-spacing: 0.04em; }

.calc { display: grid; gap: 0; list-style: none; counter-reset: step; }
.calc li {
  display: grid;
  grid-template-columns: 2.2em 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.calc li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
}
.calc li span { color: var(--ink-2); }
.calc li b { font-family: var(--font-mono); font-size: 0.95rem; white-space: nowrap; }
.calc li.is-total b { color: var(--accent-ink); font-size: 1.05rem; }

/* ==========================================================================
   Math Apocalypse multiplier simulator
   ========================================================================== */
.mult {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--accent);
}
.mult__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.mult__value {
  font-size: clamp(3.4rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}
.mult__value.is-up { color: var(--green); }
.mult__value.is-down { color: var(--red); }
.mult__ladder { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mult__ladder span {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
}
.mult__ladder span.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mult__streak { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mult__streak span { height: 12px; border: 1.5px solid var(--ink); background: var(--paper-2); border-radius: 2px; transition: background-color 0.15s; }
.mult__streak span.is-on { background: var(--accent); }
.mult__log { min-height: 1.5em; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-2); }
.mult__buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Crateyard: island code ---------- */
.island-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 10px 10px 0 var(--accent);
}
.island-frame .islandcard__code { font-size: clamp(1.7rem, 3.6vw, 3rem); }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.code-row code {
  padding: 0.5em 0.8em;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.levers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.lever { display: grid; grid-template-columns: 3.4em 1fr; gap: 14px; align-items: start; padding: 18px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); }
.lever__icon { width: 3.4em; height: 3.4em; stroke: var(--accent-ink); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lever h3 { font-size: 1.15rem; font-weight: 690; letter-spacing: -0.015em; }
.lever p { margin-top: 4px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }

/* ---------- Shopping Shotguns: receipt + threat bars ---------- */
.receipt {
  position: relative;
  padding: 26px 24px 28px;
  border: 1.5px solid var(--ink);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--paper-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  rotate: 1deg;
}
.receipt__title { text-align: center; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.9rem; }
.receipt__sub { text-align: center; color: var(--ink-3); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px dashed var(--line-strong); }
.receipt__cols { columns: 2 200px; column-gap: 28px; }
.receipt__group { break-inside: avoid; margin-bottom: 12px; }
.receipt__group h3 { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); }
.receipt__group ul { list-style: none; }
.receipt__group li::before { content: "☐ "; color: var(--ink-3); }
.receipt__foot { margin-top: 10px; padding-top: 12px; border-top: 2px dashed var(--line-strong); text-align: center; color: var(--ink-3); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }

.threat { display: grid; gap: 22px; }
.threat__row { display: grid; gap: 8px; padding-bottom: 18px; border-bottom: 1px dashed var(--line-strong); }
.threat__row:last-child { border-bottom: 0; padding-bottom: 0; }
.threat__name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.015em; }
.threat__name small { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-3); }
.threat__bar { display: grid; grid-template-columns: 8.5em 1fr 3.6em; gap: 10px; align-items: center; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.threat__bar b { font-weight: 700; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.threat .meter + .meter { margin-top: 0; }
.threat .meter { height: 10px; }

/* ---------- CricX: card anatomy ---------- */
.cardmock {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(300px, 100%);
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 8px 8px 0 var(--accent);
  rotate: -2deg;
}
.cardmock__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.cardmock__top span:last-child { padding: 2px 8px; border: 1px solid var(--ink); border-radius: 999px; }
.cardmock__name { font-size: 1.3rem; font-weight: 740; letter-spacing: -0.02em; line-height: 1; }
.cardmock__art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1.5px dashed var(--ink-3);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cardmock__label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.cardmock__balls { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.cardmock__balls span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}
.cardmock__balls span.is-out { background: var(--red); border-color: var(--red); color: #fff; }
.cardmock__tag { justify-self: center; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Data center: migration path ---------- */
.path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; list-style: none; }
.path__step { position: relative; display: grid; gap: 8px; align-content: start; padding: 18px 18px 20px; border: 1.5px solid var(--ink); background: var(--card); }
.path__step + .path__step { margin-left: -1.5px; }
.path__step::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 28px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  background: var(--card);
  rotate: 45deg;
}
.path__step:last-child::after { display: none; }
.path__step:last-child { background: var(--accent-soft); }
.path__ver { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.path__label { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.path__step p { color: var(--ink-2); font-size: 0.92rem; line-height: 1.45; }

/* ---------- Case-study blocks: contribution, problem/result, summary, flow ---------- */
.contrib {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 6px 6px 0 var(--paper-3);
}
.contrib > div { padding: 16px 18px; }
.contrib > div + div { border-left: 1px dashed var(--line-strong); }
.contrib__label { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.contrib ul { display: grid; gap: 6px; margin-top: 8px; list-style: none; }
.contrib li { position: relative; padding-left: 16px; font-size: 0.93rem; line-height: 1.45; color: var(--ink-2); }
.contrib li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--accent); }
.contrib li b { color: var(--ink); font-weight: 650; }
.contrib__note { grid-column: 1 / -1; padding: 10px 18px; border-top: 1px dashed var(--line-strong); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--ink-3); }
.contrib--compact { box-shadow: none; }
.contrib--compact > div { padding: 12px 14px; }
.contrib--compact li { font-size: 0.86rem; }
.title-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.ptr { display: grid; margin-top: 20px; list-style: none; border-top: 1px dashed var(--line-strong); }
.ptr li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); line-height: 1.45; color: var(--ink-2); }
.ptr b { padding-top: 3px; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }

.sumgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.sumgrid > div { padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); }
.sumgrid .sum--wide { grid-column: span 2; }
.sumgrid dt { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.sumgrid dd { margin: 6px 0 0; font-weight: 600; line-height: 1.4; }

.big-q { max-width: 26em; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 720; letter-spacing: -0.03em; line-height: 1.15; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; list-style: none; overflow: hidden; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--line-strong); }
.flow li { display: grid; gap: 6px; align-content: start; padding: 14px 14px 16px; background: var(--card); font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); }
.flow li:last-child { background: var(--accent-soft); }
.flow b { display: block; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }

/* videos sized so they always fit the slide height */
.video-solo { max-width: min(980px, calc((100vh - 280px) * 1.78)); }
.video-quad { max-width: min(900px, calc((100vh - 320px) * 1.78)); }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* short laptop screens (e.g. 1280×720): tighten vertical rhythm */
@media (min-width: 900px) and (max-height: 800px) {
  .slide { padding-top: 20px; padding-bottom: 20px; }
  .slide__head { gap: 8px; margin-bottom: 14px; }
  .slide__title { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
  .slide .lede { font-size: 1rem; line-height: 1.45; }
  .deck-title { font-size: clamp(2.5rem, 5.2vw, 4.2rem); }
  .title-copy { gap: 16px; }
  .pitch { font-size: 1.02rem; }
  .facts > div { padding: 8px 14px; }
  .spec-table { font-size: 0.85rem; }
  .spec-table th,
  .spec-table td { padding: 5px 12px; }
  .rules { margin-top: 10px; }
  .fig figcaption { font-size: 0.68rem; }
  .fig--compact .fig__img { aspect-ratio: 16 / 4.6 !important; }
  .stat { font-size: clamp(3.4rem, 9vw, 7rem); }
  .card { padding: 16px; gap: 8px; }
}
@media (max-width: 1080px) {
  .grid-4,
  .phases,
  .scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase:nth-child(2n)::after { display: none; }
}

@media (max-width: 899px) {
  .contrib,
  .sumgrid,
  .flow { grid-template-columns: 1fr; }
  .contrib > div + div { border-left: 0; border-top: 1px dashed var(--line-strong); }
  .sumgrid .sum--wide { grid-column: auto; }
  .ptr li { grid-template-columns: 1fr; gap: 2px; }
  .levers { grid-template-columns: 1fr; }
  .path { grid-template-columns: 1fr; }
  .path__step + .path__step { margin-left: 0; margin-top: -1.5px; }
  .path__step::after { right: auto; left: 30px; top: auto; bottom: -13px; rotate: 135deg; }
  .threat__bar { grid-template-columns: 7em 1fr 3.2em; }
  .deck-dots,
  .deck-hint { display: none; }
  .slide { min-height: 0; padding: 24px var(--gutter); }
  .slide:first-of-type { padding-top: calc(var(--bar-h) + var(--tape-h) + 24px); }
  .slide--bleed { min-height: 52svh; padding: 0; }
  .split,
  .split--media-wide,
  .split--text-wide,
  .compare,
  .next { grid-template-columns: 1fr; }
  .next__media { min-height: 200px; border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .grid-3 { grid-template-columns: 1fr; }
  .phase-cards { grid-template-columns: 1fr; }
  .deck-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .deck-bar__right { gap: 8px; }
  .deck-bar__title { font-size: 0.9rem; text-align: center; }
  .deck-bar__level { display: none; }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-4,
  .phases,
  .scope { grid-template-columns: 1fr; }
  .phase::after { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts > div:nth-child(odd) { border-right: 0; }
  .facts > div:nth-last-child(2) { border-bottom: 1px dashed var(--line-strong); }
  .deck-bar__back b { display: none; }
  .theme-toggle__label,
  .commentary-toggle span { display: none; }
  .theme-toggle,
  .commentary-toggle { padding-inline: 10px; }
  .hud-mock { aspect-ratio: 4 / 5; }
  .hud-mock__readout { width: 70%; top: 28%; }
  .hud-mock__note { width: 46%; top: auto; bottom: 22%; }
  .hud-mock .bossbar { width: 86%; left: 50%; bottom: 4%; }
  .hud-mock__player { bottom: 16%; width: 50%; }
  .bleed-caption { margin-inline: 16px; }
}
