/* ============ Flash Attention deck — FEL ČVUT dark theme ============ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --bg:          #0A0D35;
  --bg-deeper:   #060926;
  --bg-lift:     #13174A;
  --bg-lift-2:   #1B2068;
  --cyan:        #1FA8F0;
  --cyan-soft:   #6EC8F8;
  --indigo:      #4F40E8;
  --indigo-deep: #3F30D6;
  --fg:          #FFFFFF;
  --fg-muted:    #9CA5C2;
  --fg-dim:      #6B7396;
  --border:      rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.30);
  --warn:        #F2B636;
  --good:        #4ADE80;
  --bad:         #F87171;

  /* Type scale (1920×1080) */
  --type-display: 132px;
  --type-title:   72px;
  --type-section: 96px;
  --type-h2:      52px;
  --type-h3:      36px;
  --type-body-lg: 32px;
  --type-body:    26px;
  --type-small:   22px;
  --type-mono:    20px;
  --type-eyebrow: 18px;

  /* Spacing */
  --pad-top:    100px;
  --pad-bottom: 100px;
  --pad-x:      120px;
  --gap-title:  40px;
  --gap-item:   24px;

  --sans: 'Manrope', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

deck-stage {
  background: #000;
  font-family: var(--sans);
}

section {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.45;
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/* ------ Slide chrome shared across many slides ------ */
.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 0;
  white-space: nowrap;
}
.chip .num {
  color: var(--fg-dim);
  margin-right: 14px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--type-eyebrow);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}

.title {
  font-family: var(--sans);
  font-size: var(--type-title);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
}
.title em { font-style: normal; color: var(--cyan); }
.title .indigo { color: var(--cyan-soft); }

.lede {
  font-size: var(--type-body-lg);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-muted);
  max-width: 1200px;
  margin: 0;
}
.lede em { color: var(--fg); font-style: normal; font-weight: 600; }

.meta {
  font-family: var(--mono);
  font-size: var(--type-small);
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.kicker-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: var(--gap-title);
}
.kicker-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 320px;
}

/* ------ Title slide ------ */
.slide-title {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg);
  position: relative;
}
.slide-title .title-mark {
  font-family: var(--mono);
  font-size: var(--type-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.slide-title h1 {
  font-size: var(--type-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 1500px;
}
.slide-title h1 em {
  font-style: normal;
  color: var(--cyan);
}
.slide-title .subtitle {
  font-size: var(--type-h3);
  font-weight: 300;
  color: var(--fg-muted);
  max-width: 1200px;
  margin-top: 28px;
  line-height: 1.35;
}
.slide-title .footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: var(--type-small);
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.title-circuit {
  position: absolute;
  right: 60px;
  bottom: 60px;
  width: 540px;
  height: 360px;
  pointer-events: none;
  opacity: 0.55;
}

/* ------ Section divider slides ------ */
.slide-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.slide-section .left {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.slide-section .ch-num {
  font-family: var(--mono);
  font-size: 240px;
  font-weight: 500;
  line-height: 0.9;
  color: var(--cyan);
  letter-spacing: -0.05em;
}
.slide-section .ch-label {
  font-family: var(--mono);
  font-size: var(--type-small);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.slide-section h2 {
  font-size: var(--type-section);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--fg);
}
.slide-section h2 em {
  font-style: normal;
  color: var(--cyan);
}
.slide-section .ch-tag {
  font-family: var(--mono);
  font-size: var(--type-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ------ Standard content slide ------ */
.slide-content {
  display: flex;
  flex-direction: column;
}
.slide-content h2 {
  font-size: var(--type-title);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
}
.slide-content h2 em {
  font-style: normal;
  color: var(--cyan);
}

/* ------ Big stat / number slides ------ */
.slide-stat {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 100px;
  align-items: center;
}
.bignum {
  font-family: var(--sans);
  font-size: 380px;
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--cyan);
  margin: 0;
}
.bignum.indigo { color: var(--cyan-soft); }
.bignum-cap {
  font-family: var(--mono);
  font-size: var(--type-h3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 24px;
  font-weight: 400;
}

/* ------ Formula block ------ */
.formula {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 500;
  padding: 56px 64px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  line-height: 1.6;
  color: var(--fg);
}
.formula.small { font-size: 32px; padding: 40px 48px; }
.formula .accent { color: var(--cyan); }

/* ------ Card / panel ------ */
.card {
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 40px 44px;
}
.card .card-label {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 18px;
}

/* ------ Quiz / multiple-choice ------ */
.quiz {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.quiz-prompt {
  font-size: var(--type-h3);
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg);
  max-width: 1400px;
}
.choices {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
.choice {
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px 28px;
  text-align: left;
  font-family: var(--sans);
  font-size: var(--type-body);
  font-weight: 400;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.35;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.choice .key {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--cyan);
  font-weight: 600;
  flex-shrink: 0;
  width: 28px;
}
.choice:hover:not(.locked) {
  border-color: var(--cyan-soft);
  background: var(--bg-lift-2);
}
.choice.correct {
  border-color: var(--good);
  background: rgba(74, 222, 128, 0.12);
  color: var(--fg);
}
.choice.correct .key { color: var(--good); }
.choice.incorrect {
  border-color: var(--bad);
  background: rgba(248, 113, 113, 0.10);
  color: var(--fg-muted);
}
.choice.incorrect .key { color: var(--bad); }
.choice.locked { cursor: default; }

.feedback {
  margin-top: 8px;
  padding: 26px 32px;
  border-radius: 4px;
  background: var(--bg-deeper);
  border-left: 3px solid var(--cyan);
  font-size: var(--type-body);
  line-height: 1.45;
  display: none;
  color: var(--fg);
}
.feedback.show { display: block; }
.feedback strong {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 10px;
}

/* ------ Memory diagram ------ */
.mem-diagram {
  display: grid;
  gap: 36px;
}
.mem-row {
  display: grid;
  grid-template-columns: 280px 1fr 360px;
  gap: 32px;
  align-items: center;
}
.mem-label {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: -0.01em;
}
.mem-label .sub {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
}
.mem-bar-wrap {
  position: relative;
  height: 56px;
  background: var(--bg-lift);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.mem-bar {
  height: 100%;
  border-radius: 0;
  transition: width 1.2s cubic-bezier(0.22,0.61,0.36,1);
  background: var(--cyan);
}
.mem-bar.hbm { background: linear-gradient(90deg, var(--indigo-deep), var(--indigo)); width: 10%; }
.mem-bar.l2  { background: linear-gradient(90deg, var(--indigo), var(--cyan)); width: 28%; }
.mem-bar.sram { background: linear-gradient(90deg, var(--cyan-soft), var(--cyan)); width: 95%; }
.mem-cap {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}

/* ------ Slider widget ------ */
.slider-widget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.slider-block {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.slider-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  gap: 20px;
  align-items: center;
}
.slider-row .lbl { font-family: var(--mono); font-size: 22px; color: var(--fg-muted); letter-spacing: 0.05em; }
.slider-row .val { font-family: var(--mono); font-size: 24px; color: var(--cyan); font-weight: 600; text-align: right; }
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  width: 100%;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  background: var(--cyan);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(31,168,240,0.18);
}
input[type=range]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: var(--cyan);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.readout {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.readout .ro-label {
  font-family: var(--mono);
  font-size: var(--type-small);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 12px;
}
.readout .ro-value {
  font-family: var(--sans);
  font-size: 110px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--cyan);
}
.readout .ro-bar {
  margin-top: 28px;
  height: 8px;
  background: var(--bg-deeper);
  border-radius: 4px;
  overflow: hidden;
}
.readout .ro-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo), var(--cyan));
  transition: width 0.25s ease;
  width: 30%;
}
.readout .ro-msg {
  margin-top: 22px;
  font-size: var(--type-small);
  color: var(--fg-muted);
  line-height: 1.45;
  min-height: 64px;
}
.readout .ro-msg strong { color: var(--cyan); font-weight: 600; }

/* ------ I/O trace step ------ */
.io-trace {
  display: grid;
  gap: 18px;
}
.io-step {
  display: grid;
  grid-template-columns: 80px 1fr 320px;
  gap: 30px;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
}
.io-step.heavy { border-left-color: var(--warn); }
.io-num {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.io-num .big {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0;
  margin-top: 4px;
}
.io-op { font-family: var(--mono); font-size: 26px; font-weight: 500; color: var(--fg); }
.io-op .descr { display: block; font-family: var(--sans); font-size: 18px; color: var(--fg-muted); font-weight: 400; margin-top: 4px; letter-spacing: 0; }
.io-cost {
  font-family: var(--mono);
  font-size: 22px;
  text-align: right;
  color: var(--cyan);
  font-weight: 600;
}
.io-cost.heavy { color: var(--warn); }
.io-cost .label { display: block; font-size: 12px; color: var(--fg-dim); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 4px; font-weight: 500; }

.io-total {
  margin-top: 12px;
  padding: 26px 32px;
  background: var(--bg-deeper);
  border-radius: 4px;
  border-left: 3px solid var(--warn);
  font-size: var(--type-body);
  line-height: 1.4;
}
.io-total .num { font-family: var(--mono); font-size: 30px; color: var(--warn); font-weight: 600; }

/* ------ Online softmax step-through ------ */
.osm-state {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  background: var(--bg-deeper);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.osm-stat {
  padding: 30px 36px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.osm-stat:last-child { border-right: none; }
.osm-stat .nm {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 14px;
}
.osm-stat .vl {
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: -0.01em;
  line-height: 1;
  transition: transform 0.3s ease, color 0.3s ease;
}
.osm-stat.changed .vl {
  color: var(--warn);
  transform: scale(1.04);
}

.osm-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.osm-tile {
  padding: 28px 32px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s ease;
}
.osm-tile.processed {
  border-color: var(--cyan);
  background: rgba(31,168,240,0.08);
  box-shadow: 0 0 0 2px rgba(31,168,240,0.2);
}
.osm-tile .tag {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 12px;
}
.osm-tile .vec {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--fg);
}
.osm-narrative {
  margin-top: 24px;
  padding: 26px 32px;
  background: var(--bg-lift);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
  font-size: var(--type-body);
  line-height: 1.5;
  color: var(--fg);
  min-height: 100px;
}
.osm-narrative.empty { color: var(--fg-dim); }

.osm-controls {
  display: flex;
  gap: 16px;
  margin-top: 22px;
}
.btn {
  background: var(--cyan);
  color: var(--bg);
  border: none;
  padding: 16px 28px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn:hover { background: var(--cyan-soft); transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.btn.ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ------ Pseudocode ------ */
.pseudocode {
  font-family: var(--mono);
  font-size: 21px;
  background: var(--bg-deeper);
  color: var(--fg);
  padding: 32px 40px;
  border-radius: 6px;
  line-height: 1.55;
  border: 1px solid var(--border);
}
.pseudocode .ln { display: block; min-height: 1.55em; white-space: nowrap; }
.pseudocode .ln.empty { min-height: 0.5em; }
.pseudocode .ind  { padding-left: 36px; }
.pseudocode .ind2 { padding-left: 72px; }
.pseudocode .cm { color: var(--fg-dim); }
.pseudocode .kw { color: var(--cyan); font-weight: 600; }
.pseudocode .hl {
  display: inline-block;
  background: rgba(242, 182, 54, 0.12);
  border-bottom: 1px dotted var(--warn);
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--fg);
  transition: background 0.15s ease, color 0.15s ease;
}
.pseudocode .hl:hover, .pseudocode .hl.active {
  background: var(--warn);
  color: var(--bg);
  border-bottom-color: transparent;
}
.pseudocode-info {
  margin-top: 20px;
  padding: 22px 28px;
  background: var(--bg-lift);
  border-left: 3px solid var(--border);
  border-radius: 4px;
  font-size: var(--type-body);
  color: var(--fg-muted);
  min-height: 80px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pseudocode-info.active { border-left-color: var(--warn); color: var(--fg); }

/* ------ Drag-to-reorder ------ */
.dnd-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.dnd-item {
  background: var(--bg-lift);
  padding: 24px 30px;
  border-radius: 4px;
  border-left: 3px solid var(--border-strong);
  font-size: var(--type-body);
  cursor: grab;
  user-select: none;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 20px;
}
.dnd-item:hover { background: var(--bg-lift-2); }
.dnd-item:active { cursor: grabbing; }
.dnd-item .handle { font-family: var(--mono); font-size: 24px; color: var(--fg-dim); letter-spacing: -0.1em; }
.dnd-item .rank { font-family: var(--mono); font-size: 18px; color: var(--cyan); font-weight: 600; min-width: 36px; }
.dnd-item.dragging { opacity: 0.35; transform: scale(0.98); }
.dnd-item.drag-over { border-left-color: var(--cyan); background: var(--bg-lift-2); }
.dnd-item.correct-pos { border-left-color: var(--good); background: rgba(74, 222, 128, 0.10); }
.dnd-item.incorrect-pos { border-left-color: var(--bad); background: rgba(248, 113, 113, 0.08); }

/* ------ Aside callout ------ */
.aside {
  padding: 32px 40px;
  background: var(--bg-lift);
  border-left: 4px solid var(--warn);
  border-radius: 4px;
  font-size: var(--type-body);
  line-height: 1.5;
}
.aside .lbl {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warn);
  font-weight: 700;
  margin-bottom: 12px;
}
.aside.indigo { border-left-color: var(--cyan); }
.aside.indigo .lbl { color: var(--cyan); }

/* ------ Tile flow animated diagram (NEW) ------ */
.tile-flow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 36px;
  background: var(--bg-deeper);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.tile-flow .mem-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.tile-flow .mem-box .mb-label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
}
.matrix-grid {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 220px;
  height: 220px;
  padding: 8px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.matrix-grid .cell {
  background: var(--bg-lift-2);
  border-radius: 2px;
  transition: all 0.35s ease;
}
.matrix-grid .cell.active {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(31,168,240,0.6);
}
.matrix-grid .cell.done {
  background: rgba(74,222,128,0.6);
}
.matrix-grid.sram {
  width: 220px;
  height: 220px;
  background: rgba(31,168,240,0.05);
  border-color: var(--cyan);
}
.tile-flow-arrow {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}
.arrow {
  font-family: var(--mono);
  font-size: 32px;
  color: var(--cyan);
}
.arrow-label {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.tile-flow-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--fg);
}
.tile-flow-meta .stat {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.tile-flow-meta .stat .lbl { color: var(--fg-dim); font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; }
.tile-flow-meta .stat .v { color: var(--cyan); font-weight: 600; font-size: 24px; }

/* ------ Comparison side-by-side ------ */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.compare .col {
  padding: 32px 36px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.compare .col.win {
  border-color: var(--good);
  background: rgba(74, 222, 128, 0.05);
}
.compare .col.bad {
  border-color: var(--bad);
  background: rgba(248, 113, 113, 0.04);
}
.compare h4 {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin: 0 0 18px;
}
.compare .col.bad h4 { color: var(--bad); }
.compare .col.win h4 { color: var(--good); }
.compare .body { font-size: var(--type-small); line-height: 1.5; color: var(--fg-muted); }
.compare .num {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 6px;
}

/* ------ Reveal toggle ------ */
.reveal-wrap { margin-top: 24px; }
.reveal-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  margin-top: 0;
}
.reveal-content.open { max-height: 800px; margin-top: 22px; }

/* ------ End slide ------ */
.slide-end {
  background: var(--bg-deeper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  position: relative;
}
.slide-end h2 {
  font-size: var(--type-section);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 36px;
  max-width: 1500px;
}
.slide-end h2 em { font-style: normal; color: var(--cyan); }
.slide-end p {
  font-size: var(--type-body-lg);
  line-height: 1.45;
  color: var(--fg-muted);
  max-width: 1300px;
  margin: 0 0 20px;
}
.slide-end .credits {
  font-family: var(--mono);
  font-size: var(--type-small);
  color: var(--fg-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 60px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

/* ------ Footer/counter band on each slide ------ */
.slide-foot {
  position: absolute;
  bottom: 36px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  pointer-events: none;
}
.slide-foot .mark { color: var(--cyan); }

/* ------ Grids / utility ------ */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.gap-sm { gap: 16px; }
.gap-md { gap: 28px; }
.gap-lg { gap: 44px; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }
.muted { color: var(--fg-muted); }
.dim { color: var(--fg-dim); }
.cyan { color: var(--cyan); }
.warn { color: var(--warn); }
.good { color: var(--good); }
.mono { font-family: var(--mono); }
.code-inline {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-deeper);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--cyan);
}

/* ------ Circuit illustration accent ------ */
.circuit-bg {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 600px;
  height: 400px;
  pointer-events: none;
  opacity: 0.35;
}
