/* ==========================================================================
   Deck styles — hazard theme
   Safety-signage yellow and black, heavy condensed type.
   Colours and fonts are tokens in :root; the layout rules below use them.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #FFD100;
  --ink: #000000;
  --muted: #3D3300;
  --line: #000000;
  --hot: #A8101A;
  --code-bg: #000000;
  --code-ink: #FFD100;
  --code-kw: #FFFFFF;
  --code-str: #FF8A80;
  --chip-radius: 0;
  --rule: 6px;
  --stripe-height: 48px;

  --font-head: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --head-weight: 850;
  --head-stretch: 72%;
  --head-tracking: -0.01em;
  --head-leading: 0.98;
  --body-leading: 1.35;
}

/* ---------- Canvas ---------- */

.reveal-viewport {
  background-color: var(--bg);
  color: var(--ink);
}

/* ---------- Base type ---------- */

.reveal {
  font-family: var(--font-body);
  font-size: 34px;
  line-height: var(--body-leading);
  color: var(--ink);
}

.reveal .slides {
  text-align: left;
}

.reveal .slides section {
  box-sizing: border-box;
  height: 100%;
  padding: 40px 48px;
}

.reveal h1,
.reveal h2,
.reveal h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-stretch: var(--head-stretch);
  letter-spacing: var(--head-tracking);
  line-height: var(--head-leading);
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.reveal h1 { font-size: 84px; max-width: 15ch; }
.reveal h2 { font-size: 54px; max-width: 24ch; }
.reveal h3 { font-size: 32px; margin-bottom: 0.35em; }

.reveal p { margin: 0 0 0.6em; max-width: 64ch; }
.reveal strong { font-weight: 650; }
.reveal code { font-family: var(--font-mono); font-size: 0.85em; }

.reveal .sub { color: var(--muted); font-size: 28px; }
.reveal .footnote {
  position: absolute;
  bottom: 64px;
  left: 48px;
  font-size: 18px;
  color: var(--muted);
}

.reveal .lede {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-stretch: var(--head-stretch);
  font-size: 60px;
  line-height: 1.1;
  max-width: 22ch;
  margin-top: 40px;
}
.reveal .lede { font-weight: 700; }
.reveal .lede.small-lede { font-size: 42px; max-width: 30ch; }

/* ---------- Title slides ---------- */

.reveal .title-slide { padding-top: 120px; }
.reveal .title-slide.closing { padding-top: 220px; }
.reveal .byline { font-size: 24px; color: var(--muted); margin-top: 1.5em; }

.reveal .title-mark { position: absolute; }

/* A warning triangle */
.reveal .title-mark {
  top: 44px; right: 48px;
  width: 190px; height: 168px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.reveal .title-mark::after {
  content: "!";
  position: absolute; inset: 52px 0 0;
  text-align: center;
  font: 900 100px/1 var(--font-head);
  color: var(--bg);
}


/* ---------- Lists ---------- */

.reveal ul, .reveal ol { margin: 0; padding: 0; list-style: none; }

.reveal .plain li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 28px;
  max-width: 64ch;
  font-size: 24px;
}
.reveal .plain li::before {
  content: "";
  position: absolute; left: 0; top: 0.68em;
  width: 22px; height: var(--rule);
  min-height: 2px;
  background: var(--hot);
}

.reveal .steps { counter-reset: step; }
.reveal .steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  margin-bottom: 26px;
  max-width: 46ch;
}
.reveal .steps li::before {
  content: counter(step);
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-stretch: var(--head-stretch);
  font-size: 56px;
  line-height: 1;
  color: var(--hot);
}

.reveal .chips {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 36px; max-width: 1100px;
}
.reveal .chips li {
  border: 2px solid var(--line);
  border-radius: var(--chip-radius);
  padding: 10px 24px;
  font-size: 30px;
}
.reveal .chips li { border-width: 4px; font-weight: 600; }

/* ---------- Layouts ---------- */

.reveal .split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: center;
}

.reveal .verdicts li { font-size: 34px; margin-bottom: 18px; }
.reveal .verdicts .tick { color: var(--hot); font-weight: 700; margin-right: 12px; }

.reveal .compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
}
.reveal .compare > div { padding-right: 48px; }
.reveal .compare > div + div {
  padding: 0 0 0 48px;
  border-left: var(--rule) solid var(--line);
}
.reveal .compare-head { font-size: 22px; color: var(--muted); }
.reveal .compare .big {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-stretch: var(--head-stretch);
  font-size: 44px;
  line-height: 1.08;
}
.reveal .compare > div:first-child .big { font-family: var(--font-mono); font-size: 38px; font-weight: 600; font-stretch: 100%; }
.reveal .compare .small { font-size: 27px; color: var(--muted); }

.reveal .options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 32px;
}
.reveal .options > div { border-top: var(--rule) solid var(--line); padding-top: 22px; min-height: 2px; }
.reveal .options > div:first-child { border-top-color: var(--hot); }
.reveal .options p { font-size: 27px; color: var(--muted); }

/* Timeline: a real sequence of dates */
.reveal .timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 52px;
  position: relative;
}
.reveal .timeline::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 10px;
  height: var(--rule); min-height: 2px;
  background: var(--line);
}
.reveal .timeline li { position: relative; padding-top: 44px; }
.reveal .timeline li::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 5px var(--bg);
}
.reveal .timeline li.next::before { background: var(--bg); border: 3px solid var(--hot); box-sizing: border-box; }
.reveal .timeline time {
  display: block;
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-stretch: var(--head-stretch);
  font-size: 34px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.reveal .timeline .next time { color: var(--hot); }
.reveal .timeline span { display: block; font-size: 25px; line-height: 1.35; }

/* ---------- Diagram ---------- */

.reveal svg.diagram { width: 100%; height: auto; max-height: 420px; margin-top: 10px; overflow: visible; }
.diagram .box rect { fill: none; stroke: var(--line); stroke-width: 3; }
.diagram .label { font: var(--head-weight) 34px var(--font-head); font-stretch: var(--head-stretch); fill: var(--ink); }
.diagram .flow line { stroke: var(--ink); stroke-width: 3; }
.diagram .flow line.hot { stroke: var(--hot); stroke-width: 4; }
.diagram .step, .diagram .step text { font: 400 24px var(--font-body); fill: var(--ink); }
.diagram .step.hot, .diagram .step .hot { fill: var(--hot); font-weight: 600; }
.diagram .arrowhead { fill: var(--ink); }
.diagram .arrowhead.hot { fill: var(--hot); }

/* ---------- Code ---------- */

.reveal pre {
  width: 100%;
  margin: 24px 0 0;
  box-shadow: none;
  font-size: 18px;
}
.reveal pre code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  color: var(--code-ink);
  display: block;
  overflow-x: auto;
  white-space: pre;
  padding: 22px 26px;
  border-radius: 0;
  max-height: none;
  line-height: 1.55;
}
.reveal .hljs-keyword, .reveal .hljs-attribute, .reveal .hljs-section, .reveal .hljs-built_in { color: var(--code-kw); }
.reveal .hljs-string, .reveal .hljs-number, .reveal .hljs-literal { color: var(--code-str); }
.reveal .hljs-comment { color: var(--muted); font-style: italic; }

/* ---------- Reveal chrome ---------- */

.reveal .controls { color: var(--hot); }
.reveal .progress { color: var(--hot); height: 5px; }

.reveal .slide-number {
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 16px;
  right: auto; left: 18px; bottom: 18px;
}

.reveal .slide-number { color: var(--ink); font-weight: 700; }

/* ---------- Accessibility ---------- */

.reveal a:focus-visible,
.reveal button:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .reveal .slides section,
  .reveal .slides section .fragment { transition: none !important; }
}

/* No slide number on the title and closing slides */
/* Reveal sets the counter's display inline, hence !important */
/* Hazard tape along the bottom of the window on title slides */
.reveal-viewport.is-title::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--stripe-height);
  background: repeating-linear-gradient(-45deg, var(--ink) 0 24px, var(--bg) 24px 48px);
  pointer-events: none;
}

/* Lift the arrows, progress bar and slide number above the tape */
.reveal-viewport.is-title .reveal .controls { bottom: calc(var(--stripe-height) + 12px); }
.reveal-viewport.is-title .reveal .progress { bottom: var(--stripe-height); }
.reveal-viewport.is-title .slide-number { bottom: calc(var(--stripe-height) + 18px) !important; }
