/* ==========================================================================
   Hack Lab slide theme — INTLPOL 268, Stanford
   One theme for every deck in content/slides. Slides are authored on a fixed
   1600×900 canvas and scaled to the viewport by deck.js.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Stanford identity */
  --cardinal: #8c1515;
  --cardinal-dark: #6f0f0f;
  --cardinal-bright: #b1040e;
  --cardinal-tint: #f4e8e8;

  /* Neutrals (match hacklab.info + console) */
  --ink: #2e2d29;
  --ink-2: #53565a;
  --ink-3: #767674;
  --paper: #f7f7f5;
  --surface: #ffffff;
  --fog: #f2f1ed;
  --line: #d5d5d4;
  --night: #181715;

  /* Stanford accent palette — used for diagrams, never alone for meaning */
  --lagunita: #007c92;
  --lagunita-tint: #dcefF2;
  --poppy: #e98300;
  --poppy-ink: #8a4d00;
  --poppy-tint: #fcecd8;
  --palo-alto: #175e54;
  --palo-alto-tint: #ddece8;
  --plum: #620059;
  --plum-tint: #efe0ed;
  --sky: #4298b5;
  --illuminating: #fedd5c;

  /* Network stack layer colours (label every layer; colour is a cue only) */
  --layer-app: var(--cardinal);
  --layer-app-tint: var(--cardinal-tint);
  --layer-transport: var(--poppy-ink);
  --layer-transport-tint: var(--poppy-tint);
  --layer-internet: var(--lagunita);
  --layer-internet-tint: var(--lagunita-tint);
  --layer-link: var(--palo-alto);
  --layer-link-tint: var(--palo-alto-tint);

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --pad-x: 88px;
  --pad-top: 64px;
  --slide-w: 1600px;
  --slide-h: 900px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Page / viewport ---------- */
html, body { margin: 0; height: 100%; }
body.deck-page {
  background: #0d0d0c;
  color: var(--ink);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.deck-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.deck {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--slide-w);
  height: var(--slide-h);
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: center center;
}

/* ---------- Slide base ---------- */
.slide {
  position: absolute;
  inset: 0;
  width: var(--slide-w);
  height: var(--slide-h);
  box-sizing: border-box;
  padding: var(--pad-top) var(--pad-x) 96px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 30px;
  line-height: 1.38;
  overflow: hidden;
  display: none;
  flex-direction: column;
  gap: 28px;
}
.slide.active { display: flex; }
.slide * { box-sizing: border-box; }
.slide .notes { display: none !important; }

/* Header block */
.eyebrow {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cardinal);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 4px;
  background: currentColor;
  border-radius: 2px;
}
.slide h1, .slide h2, .slide h3 { margin: 0; font-weight: 650; letter-spacing: -0.022em; }
.slide h2 { font-size: 58px; line-height: 1.06; text-wrap: balance; }
.slide h3 { font-size: 32px; line-height: 1.2; letter-spacing: -0.012em; }
.slide header { display: flex; flex-direction: column; gap: 14px; }
.slide p { margin: 0; }
.slide strong { font-weight: 650; }
.slide em { font-style: italic; }
.slide a { color: var(--lagunita); text-decoration-thickness: .06em; text-underline-offset: .15em; }
.lede { font-size: 34px; line-height: 1.34; color: var(--ink); max-width: 30em; text-wrap: pretty; }
.muted { color: var(--ink-2); }
.small { font-size: 24px; }
.xsmall { font-size: 20px; }
.accent { color: var(--cardinal); }
.mono { font-family: var(--font-mono); }

/* Body area fills remaining height */
.body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 24px; }
.body.center { justify-content: center; }
.row { display: flex; gap: 40px; min-height: 0; }
.row > * { min-width: 0; }
.col { display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.grow { flex: 1; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.cols-60-40 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; }
.cols-40-60 { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.list > li { position: relative; padding-left: 34px; text-wrap: pretty; }
.list > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .52em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--cardinal);
}
.list.tight { gap: 8px; }
.list .list { margin-top: 10px; gap: 6px; font-size: .86em; }
.list .list > li::before { background: transparent; border: 2px solid var(--ink-3); width: 10px; height: 10px; }
ol.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
ol.steps > li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; align-items: baseline; }
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .8em;
  font-weight: 600;
  color: var(--cardinal);
}

/* Cards / panels (used sparingly) */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.panel.fog { background: var(--fog); border-color: transparent; }
.panel h3 { margin-bottom: 12px; }
.kicker { font-size: 18px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 600; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  background: var(--cardinal-tint); color: var(--cardinal);
}
.callout {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 26px 32px;
}
.callout .callout-mark { flex: none; width: 36px; height: 36px; color: var(--illuminating); }
.callout.cardinal { background: var(--cardinal); }

/* Figures */
figure { margin: 0; }
.figure { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.figure img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.figure .frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 0;
}
.figure .frame.bare { background: transparent; border: 0; padding: 0; }
.figure .frame.dark { background: var(--night); border-color: var(--night); }
figcaption, .caption { font-size: 19px; line-height: 1.4; color: var(--ink-2); }
.shadow { box-shadow: 0 18px 40px -18px rgba(24, 23, 21, .45); }
.round { border-radius: var(--radius); }

/* Source line (APA) sits above the footer */
.source {
  position: absolute;
  left: var(--pad-x);
  right: 440px;
  bottom: 30px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-3);
  margin: 0;
}
.source a { color: inherit; }
.source em { font-style: italic; }

/* Footer chrome, added by deck.js */
.slide-footer {
  position: absolute;
  right: var(--pad-x);
  bottom: 30px;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.slide-footer .course { text-transform: uppercase; letter-spacing: .1em; }
.slide-footer .num { color: var(--ink-2); font-weight: 600; }
.slide.no-footer .slide-footer { display: none; }

/* ---------- Title slide ---------- */
.slide.title {
  background: var(--cardinal);
  color: #fff;
  padding: 96px 104px;
  justify-content: space-between;
}
.slide.title::after {
  /* quiet engineering grid */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
          mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
  pointer-events: none;
}
.slide.title > * { position: relative; z-index: 1; }
.slide.title .eyebrow { color: rgba(255,255,255,.82); }
.slide.title h1 { font-size: 104px; line-height: .98; letter-spacing: -0.035em; max-width: 12em; text-wrap: balance; }
.slide.title .week { font-family: var(--font-mono); font-size: 26px; font-weight: 500; color: rgba(255,255,255,.8); letter-spacing: .02em; }
.slide.title .meta { display: flex; justify-content: space-between; align-items: flex-end; font-size: 24px; color: rgba(255,255,255,.86); }
.slide.title .meta strong { color: #fff; display: block; font-size: 28px; }
.slide.title .slide-footer { display: none; }
.lockup { display: flex; align-items: center; gap: 22px; }
.lockup .seal { width: 112px; height: 112px; flex: none; filter: drop-shadow(0 10px 24px rgba(0,0,0,.28)); }
.lockup .mark {
  width: 64px; height: 64px; border-radius: 16px;
  background: #fff; color: var(--cardinal);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 24px; letter-spacing: -.04em;
}

/* ---------- Section divider ---------- */
.slide.section {
  background: var(--night);
  color: #fff;
  justify-content: flex-end;
  padding: 96px 104px 120px;
}
.slide.section .section-num {
  position: absolute;
  top: 64px; right: 96px;
  font-family: var(--font-mono);
  font-size: 220px;
  font-weight: 300;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.22);
}
.slide.section .eyebrow { color: #ff8f8f; }
.slide.section h2 { font-size: 96px; letter-spacing: -0.035em; max-width: 13em; }
.slide.section .lede { color: rgba(255,255,255,.78); margin-top: 18px; }
.slide.section .slide-footer, .slide.section .source { color: rgba(255,255,255,.5); }
.slide.section .slide-footer .num { color: rgba(255,255,255,.75); }
.slide.section.cardinal { background: var(--cardinal); }
.slide.section.cardinal .eyebrow { color: rgba(255,255,255,.8); }

/* ---------- Full-bleed image ---------- */
.slide.bleed { padding: 0; background: #000; color: #fff; }
.slide.bleed > img.bg, .slide.bleed > .bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.slide.bleed .overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 160px var(--pad-x) 96px;
  background: linear-gradient(to top, rgba(10,10,9,.88) 0%, rgba(10,10,9,.55) 55%, rgba(10,10,9,0) 100%);
  display: flex; flex-direction: column; gap: 14px;
}
.slide.bleed .overlay.top {
  top: 0; bottom: auto;
  padding: 64px var(--pad-x) 160px;
  background: linear-gradient(to bottom, rgba(10,10,9,.85) 0%, rgba(10,10,9,.5) 55%, rgba(10,10,9,0) 100%);
}
.slide.bleed .overlay.corner {
  top: auto; right: auto; width: 62%;
  padding: 200px 120px 88px var(--pad-x);
  background: radial-gradient(ellipse at 0% 100%, rgba(10,10,9,.88) 0%, rgba(10,10,9,.62) 45%, rgba(10,10,9,0) 72%);
}
.slide.bleed .overlay.side {
  top: 0; left: auto; width: 46%;
  padding: 64px var(--pad-x) 96px 120px;
  justify-content: center;
  background: linear-gradient(to left, rgba(10,10,9,.9) 0%, rgba(10,10,9,.7) 60%, rgba(10,10,9,0) 100%);
}
.slide.bleed .eyebrow { color: #ff9c9c; }
.slide.bleed h2 { font-size: 64px; max-width: 18em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.slide.bleed .lede { color: rgba(255,255,255,.9); }
.slide.bleed .slide-footer, .slide.bleed .source { color: rgba(255,255,255,.78); z-index: 2; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.slide.bleed .slide-footer .num { color: #fff; }
.slide.bleed .credit {
  position: absolute; right: var(--pad-x); top: 28px;
  font-size: 14px; color: rgba(255,255,255,.7);
}

/* ---------- Quote ---------- */
.quote {
  font-size: 40px; line-height: 1.32; font-weight: 450; letter-spacing: -0.012em;
  margin: 0; text-wrap: pretty;
}
.quote p + p { margin-top: 22px; }
.quote .qmark { font-size: 120px; line-height: .5; color: var(--cardinal); font-weight: 700; display: block; height: 52px; }
.attribution { margin-top: 28px; font-size: 24px; color: var(--ink-2); }
.attribution strong { color: var(--ink); }

/* ---------- Code / terminal ---------- */
.terminal {
  background: var(--night);
  color: #e9e7e1;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 21px;
  line-height: 1.5;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 0;
}
.terminal .bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: #242320;
  font-size: 15px; color: #a3a19a; letter-spacing: .04em;
}
.terminal .bar i { width: 12px; height: 12px; border-radius: 50%; background: #4a4843; display: block; }
.terminal .bar span { margin-left: 10px; }
.terminal pre {
  margin: 0; padding: 20px 26px 24px;
  font: inherit; white-space: pre; overflow: hidden;
}
.terminal .prompt { color: #ff8f8f; }
.terminal .cmd { color: #fff; font-weight: 600; }
.terminal .dim { color: #8f8d86; }
.terminal .hl { color: var(--illuminating); }
.terminal .ok { color: #7fd1b9; }
.terminal .key { color: #8ccfe0; }
.dissect {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 21px;
  line-height: 1.55;
  overflow: hidden;
}
.dissect .sum { padding: 14px 24px; background: var(--fog); font-weight: 600; border-bottom: 1px solid var(--line); }
.dissect pre { margin: 0; padding: 14px 24px 18px; font: inherit; white-space: pre; }
.dissect .f { color: var(--ink-2); }
.dissect .v { color: var(--ink); font-weight: 600; }
.dissect .b { color: var(--ink-3); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 22px; line-height: 1.32; }
.table th {
  text-align: left; font-size: 16px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); padding: 0 18px 12px; border-bottom: 2px solid var(--ink);
}
.table td { padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .code { font-family: var(--font-mono); font-weight: 600; color: var(--cardinal); white-space: nowrap; }
.table .group { font-weight: 650; }

/* ---------- Diagram primitives ---------- */
.diagram { width: 100%; height: 100%; display: block; overflow: visible; }
.diagram text { font-family: var(--font-sans); fill: var(--ink); }
.diagram .lbl { font-size: 22px; font-weight: 600; }
.diagram .lbl-sm { font-size: 17px; font-weight: 500; fill: var(--ink-2); }
.diagram .mono { font-family: var(--font-mono); }
.diagram .node { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.diagram .node-dark { fill: var(--ink); }
.diagram .link { stroke: var(--line); stroke-width: 3; fill: none; }
.diagram .link-strong { stroke: var(--ink-2); stroke-width: 3; fill: none; }
.diagram .wire { stroke: var(--ink); stroke-width: 2.5; fill: none; }
.diagram .path-hot { stroke: var(--cardinal); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.diagram .cloud { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.diagram .boundary { stroke: var(--cardinal); stroke-width: 2.5; stroke-dasharray: 8 8; fill: none; }
.icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Layer stack (encapsulation) */
.stack { display: grid; gap: 10px; }
.layer-app { --c: var(--layer-app); --t: var(--layer-app-tint); }
.layer-transport { --c: var(--layer-transport); --t: var(--layer-transport-tint); }
.layer-internet { --c: var(--layer-internet); --t: var(--layer-internet-tint); }
.layer-link { --c: var(--layer-link); --t: var(--layer-link-tint); }

.encap {
  display: grid;
  grid-template-columns: 170px 170px 170px minmax(0, 1fr) 170px 280px;
  grid-auto-rows: 88px;
  row-gap: 22px;
  align-items: stretch;
}
.encap .seg {
  display: grid; place-items: center; text-align: center;
  font-size: 22px; font-weight: 650; line-height: 1.1;
  border: 2px solid var(--c); color: var(--c); background: var(--surface);
  border-radius: 12px; margin-right: 8px;
  transition: opacity .35s var(--ease);
}
.encap .seg.hdr-seg { background: var(--c); color: #fff; }
.encap .seg.payload { background: var(--t); border-style: dashed; }
.encap .seg small { display: block; font-size: 15px; font-weight: 500; opacity: .85; margin-top: 4px; }
.encap .name {
  grid-column: 6; display: flex; flex-direction: column; justify-content: center;
  padding-left: 28px; border-left: 4px solid var(--c);
  font-size: 30px; font-weight: 650; color: var(--ink);
  transition: opacity .35s var(--ease);
}
.encap .name small { font-size: 18px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
.encap[data-focus] > * { opacity: .22; }
.encap[data-focus="app"] > .f-app, .encap[data-focus="transport"] > .f-transport,
.encap[data-focus="internet"] > .f-internet, .encap[data-focus="link"] > .f-link { opacity: 1; }

/* Protocol header grid (IP / TCP) */
.hdr { font-size: 20px; }
.hdr .ruler { display: grid; grid-template-columns: 70px repeat(32, minmax(0, 1fr)); font-family: var(--font-mono); font-size: 14px; color: var(--ink-3); margin-bottom: 6px; }
.hdr .ruler span { text-align: center; }
.hdr .ruler span.oct { color: var(--ink); font-weight: 700; }
.hdr .words { display: grid; grid-template-columns: 70px repeat(32, minmax(0, 1fr)); row-gap: 6px; }
.hdr .off { font-family: var(--font-mono); font-size: 15px; color: var(--ink-3); display: grid; place-items: center start; }
.hdr .fld {
  display: grid; place-items: center; text-align: center;
  min-height: 60px; padding: 4px 6px;
  background: var(--surface); border: 1.5px solid var(--c, var(--ink-2));
  border-radius: 8px; margin: 0 2px;
  font-weight: 600; color: var(--ink); line-height: 1.15;
}
.hdr .fld small { display: block; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.hdr .fld.key { background: var(--t, var(--fog)); }
.hdr .fld.opt { border-style: dashed; color: var(--ink-2); background: transparent; }
.hdr .legend { display: flex; justify-content: space-between; font-size: 16px; color: var(--ink-2); margin-top: 12px; }

/* Numbered chain (kill chain) */
.chain { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.chain .link-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--cardinal);
  border-radius: 12px;
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.chain .n { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--cardinal); }
.chain .t { font-size: 17px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; line-height: 1.15; min-height: 2.3em; }
.chain .d { font-size: 19px; line-height: 1.36; color: var(--ink-2); }
.chain .link-step:not(:last-child)::after {
  content: ""; position: absolute; right: -11px; top: 38px;
  width: 10px; height: 10px; border-top: 3px solid var(--cardinal); border-right: 3px solid var(--cardinal);
  transform: rotate(45deg); background: transparent; z-index: 2;
}

/* Metric (grading) */
.metric-bar { display: flex; height: 64px; border-radius: 12px; overflow: hidden; gap: 4px; }
.metric-bar > div { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; }
.metric-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.metric-legend .m { border-top: 4px solid var(--c); padding-top: 14px; }
.metric-legend.aligned { display: flex; gap: 4px; }
.metric-legend.aligned .m { border-top: 0; padding: 4px 12px 0 0; min-width: 0; }
.metric-legend.aligned .pct { font-size: 54px; }
.metric-legend .pct { font-size: 60px; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-legend .lbl { font-size: 24px; font-weight: 600; margin-top: 8px; }
.metric-legend .sub { font-size: 20px; color: var(--ink-2); margin-top: 4px; }

/* Schedule */
.sched { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 0; }
.sched .wk {
  display: grid; grid-template-columns: 64px 112px 1fr; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 23px;
}
.sched .wk .n { font-family: var(--font-mono); font-weight: 700; color: var(--cardinal); font-size: 20px; }
.sched .wk .d { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 20px; }
.sched .wk .t { font-weight: 600; }
.sched .wk .t small { display: block; font-weight: 500; font-size: 17px; color: var(--ink-2); margin-top: 2px; }
.sched .wk.today { background: var(--cardinal-tint); border-radius: 10px; border-bottom-color: transparent; padding-left: 12px; margin-left: -12px; }
.sched .wk.off .t { color: var(--ink-3); font-weight: 500; }
.pill { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: 3px; }
.pill.exam { background: var(--ink); color: #fff; }
.pill.now { background: var(--cardinal); color: #fff; }

/* ---------- Web decks: browser ↔ server exchange ---------- */
/* <div class="exchange"><div class="browser">…</div><div class="wire">…</div><div class="server">…</div></div>
   .wire holds .msg.req / .msg.res arrows (label in a <span>) and .payload <pre> blocks. */
.exchange {
  display: grid; grid-template-columns: 540px minmax(0, 1fr) 230px; column-gap: 32px;
  align-items: stretch; height: 100%; min-height: 0;
}
.exchange.wide { grid-template-columns: 640px minmax(0, 1fr) 230px; }
.browser {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 26px 50px -32px rgba(24, 23, 21, .45);
}
.browser .chrome { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--fog); border-bottom: 1px solid var(--line); flex: none; }
.browser .chrome i { width: 12px; height: 12px; border-radius: 50%; background: #cfcdc6; display: block; }
.browser .chrome .url {
  flex: 1; margin-left: 10px; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px;
  font: 500 17px var(--font-mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser .chrome .url .icon { width: 15px; height: 15px; color: var(--palo-alto); flex: none; }
.browser .chrome .url .hot { color: var(--cardinal); font-weight: 700; }
.browser .page { flex: 1; min-height: 0; overflow: hidden; padding: 26px 30px; font-size: 28px; line-height: 1.3; }
.browser .page h1 { font-size: 40px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.02em; }
.browser .page .form { display: grid; gap: 10px; max-width: 360px; font-size: 20px; }
.browser .page .form .in { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 12px; font-family: var(--font-mono); color: var(--ink-2); background: var(--paper); }
.browser .page .form .btn { background: var(--cardinal); color: #fff; border-radius: 8px; padding: 8px 14px; text-align: center; font-weight: 650; }
.browser .alertbox { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); font-size: 20px; overflow: hidden; }
.browser .alertbox .ab-t { background: var(--fog); padding: 8px 14px; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.browser .alertbox .ab-b { padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.browser .alertbox .ab-ok { align-self: flex-end; background: var(--lagunita); color: #fff; border-radius: 6px; padding: 4px 16px; font-size: 16px; font-weight: 600; }
.exchange .wire { display: flex; flex-direction: column; justify-content: center; gap: 26px; min-height: 0; padding: 0 6px; }
.exchange .msg { position: relative; height: 3px; flex: none; margin-top: 40px; border-radius: 2px; background: var(--c, var(--ink-2)); }
.exchange .msg::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-top: 3px solid var(--c); border-right: 3px solid var(--c); }
.exchange .msg.req { --c: var(--lagunita); }
.exchange .msg.req::after { right: -2px; transform: translateY(-50%) rotate(45deg); }
.exchange .msg.res { --c: var(--cardinal); }
.exchange .msg.res::after { left: -2px; transform: translateY(-50%) rotate(-135deg); }
.exchange .msg > span {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 600 22px var(--font-mono); color: var(--c); background: var(--paper); padding: 0 10px;
}
.exchange .msg > span .hot { color: #fff; background: var(--cardinal); border-radius: 6px; padding: 2px 8px; }
.exchange .msg.plain > span { font-family: var(--font-sans); font-weight: 600; }
.exchange .payload {
  margin: 0; padding: 14px 20px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--night); color: #e9e7e1; font: 400 19px/1.42 var(--font-mono); white-space: pre;
}
.exchange .payload .t { color: #8ccfe0; }
.exchange .payload .hl { color: var(--illuminating); }
.exchange .payload .bad { color: #ff8f8f; font-weight: 600; }
.exchange .server { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.exchange .server .ic { width: 150px; height: 150px; border-radius: 36px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.exchange .server .ic .icon { width: 84px; height: 84px; stroke-width: 1.5; }
.exchange .server.db .ic { background: var(--plum); }
.exchange .server b { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.exchange .server small { font: 500 17px var(--font-mono); color: var(--ink-2); }
.exchange .server .state { margin-top: 6px; font: 600 22px var(--font-mono); color: var(--cardinal); background: var(--cardinal-tint); border-radius: 8px; padding: 6px 14px; }
.exchange .server .state.off { color: var(--ink-3); background: var(--fog); text-decoration: line-through; }

/* Annotated HTTP message: .terminal lines tagged .ln.g1…g4 light up cumulatively as the slide builds */
.http { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; min-height: 0; flex: 1; }
.http .terminal { flex: 1; }
/* inline-block (not block) so the newline that follows each .ln in the <pre> source is the only line break */
.http .ln { display: inline-block; width: calc(100% + 28px); margin: 0 -14px; padding: 0 10px; border-left: 4px solid transparent; border-radius: 4px; vertical-align: top; transition: background .3s var(--ease), border-color .3s var(--ease); }
.http .ln.g1, .http .k.g1 { --c: var(--lagunita); }
.http .ln.g2, .http .k.g2 { --c: var(--poppy); }
.http .ln.g3, .http .k.g3 { --c: #7fd1b9; }
.http .ln.g4, .http .k.g4 { --c: var(--illuminating); }
.slide[data-step-now="1"] .http .ln.g1,
.slide[data-step-now="2"] .http :is(.ln.g1, .ln.g2),
.slide[data-step-now="3"] .http :is(.ln.g1, .ln.g2, .ln.g3),
.slide[data-step-now="4"] .http :is(.ln.g1, .ln.g2, .ln.g3, .ln.g4) { background: color-mix(in srgb, var(--c) 18%, transparent); border-left-color: var(--c); }
.http .legend { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.http .k { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 10px; border: 2px solid var(--c); background: var(--surface); font-size: 21px; font-weight: 650; color: var(--ink); }
.http .k::before { content: ""; width: 34px; height: 6px; border-radius: 3px; background: var(--c); margin-bottom: 6px; }
.http .k small { font-size: 16px; font-weight: 500; color: var(--ink-2); line-height: 1.3; }

/* Request line anatomy: GET / HTTP/1.0 */
.reqline { display: flex; gap: 48px; align-items: flex-start; justify-content: center; font-family: var(--font-mono); }
.reqline .part { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.reqline .part > b { font-size: 120px; font-weight: 500; letter-spacing: -.02em; line-height: 1; padding: 0 10px 14px; border-bottom: 8px solid var(--c); color: var(--ink); }
.reqline .part > span { font: 600 24px var(--font-sans); color: var(--c); letter-spacing: .02em; text-transform: uppercase; }
.reqline .part > small { font: 400 22px/1.35 var(--font-sans); color: var(--ink-2); text-align: center; max-width: 13em; }

/* Three attack types (web decks) */
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.types .panel { display: flex; flex-direction: column; gap: 14px; padding: 30px 32px; border-top: 8px solid var(--c, var(--ink-2)); }
.types .n { font: 700 20px var(--font-mono); color: var(--c); letter-spacing: .06em; }
.types h3 { font-size: 34px; line-height: 1.12; }
.types p { font-size: 23px; line-height: 1.36; color: var(--ink-2); }
.types .when { margin-top: auto; font-size: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.types .panel.later { opacity: .55; }

/* ---------- Builds (progressive reveal) ---------- */
[data-step] { transition: opacity .4s var(--ease), transform .4s var(--ease); }
[data-step]:not(.step-on) { opacity: 0; transform: translateY(10px); pointer-events: none; }
[data-step].fade:not(.step-on) { transform: none; }
[data-step].dim-after.step-past { opacity: .35; }
svg [data-step]:not(.step-on) { transform: none; }

/* ---------- Deck chrome ---------- */
.deck-progress { position: fixed; left: 0; top: 0; height: 3px; background: var(--cardinal-bright); width: 0; transition: width .3s var(--ease); z-index: 20; }
.deck-controls {
  position: fixed; right: 18px; bottom: 16px; z-index: 30;
  display: flex; gap: 4px; padding: 6px;
  background: rgba(24, 23, 21, .82); border-radius: 12px;
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .25s;
}
body.show-ui .deck-controls, .deck-controls:focus-within, .deck-controls:hover { opacity: 1; }
.deck-controls button, .deck-controls a {
  appearance: none; border: 0; background: transparent; color: #eee;
  width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; cursor: pointer;
  text-decoration: none;
}
.deck-controls button:hover, .deck-controls a:hover { background: rgba(255,255,255,.12); }
.deck-controls .icon { width: 22px; height: 22px; }
.deck-controls .count { color: #bbb; font: 600 14px var(--font-sans); padding: 0 10px; display: grid; place-items: center; font-variant-numeric: tabular-nums; min-width: 72px; }
:focus-visible { outline: 3px solid var(--illuminating); outline-offset: 2px; }

/* Overview grid */
.deck-overview {
  position: fixed; inset: 0; z-index: 40; background: #131211; overflow: auto;
  padding: 88px 40px 48px; display: none;
}
body.overview .deck-overview { display: block; }
.deck-overview .ov-head {
  position: fixed; left: 0; right: 0; top: 0; height: 64px; z-index: 41;
  display: flex; align-items: center; gap: 18px; padding: 0 40px;
  background: rgba(19,18,17,.94); color: #eee; font: 600 16px var(--font-sans);
  border-bottom: 1px solid #2a2926;
}
.deck-overview .ov-head a { color: #eee; text-decoration: none; opacity: .8; }
.deck-overview .ov-head a:hover { opacity: 1; }
.deck-overview .ov-head .sp { flex: 1; }
.deck-overview .ov-head input {
  background: #242320; border: 1px solid #3a3935; color: #fff; border-radius: 8px;
  font: 500 15px var(--font-sans); padding: 10px 14px; width: 280px;
}
.deck-overview .ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.ov-card { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; color: #cfcdc6; font: 500 14px var(--font-sans); display: flex; flex-direction: column; gap: 8px; }
.ov-card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; outline: 2px solid transparent; outline-offset: 3px; background: #000; }
.ov-card:hover .thumb, .ov-card:focus-visible .thumb { outline-color: #777; }
.ov-card.current .thumb { outline-color: var(--cardinal-bright); }
.ov-card .thumb .slide { display: flex; transform-origin: 0 0; pointer-events: none; }
.ov-card .thumb [data-step] { opacity: 1 !important; transform: none !important; }
.ov-card .meta { display: flex; gap: 10px; }
.ov-card .meta b { color: #fff; font-variant-numeric: tabular-nums; }
.ov-card[hidden] { display: none; }

/* Help */
.deck-help {
  position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(0,0,0,.6);
}
body.help .deck-help { display: grid; }
.deck-help .box { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 32px 40px; font: 400 17px/1.5 var(--font-sans); min-width: 520px; }
.deck-help h2 { margin: 0 0 16px; font-size: 24px; }
.deck-help dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 20px; margin: 0; }
.deck-help dt { font-family: var(--font-mono); font-weight: 600; }
.deck-help dd { margin: 0; color: var(--ink-2); }

/* Blackout */
.deck-black { position: fixed; inset: 0; background: #000; z-index: 45; display: none; }
body.black .deck-black { display: block; }

/* Presenter view */
body.presenter { background: #131211; color: #eee; overflow: hidden; }
body.presenter .deck-viewport, body.presenter .deck-controls, body.presenter .deck-progress { display: none; }
.pv { position: fixed; inset: 0; display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: auto 1fr auto; gap: 20px; padding: 24px; font-family: var(--font-sans); }
.pv-top { grid-column: 1 / -1; display: flex; gap: 28px; align-items: baseline; font-size: 18px; color: #bbb; }
.pv-top .clock { font: 600 40px var(--font-mono); color: #fff; }
.pv-top .elapsed { font: 600 40px var(--font-mono); color: #ffb3b3; }
.pv-top button { background: #2a2926; color: #eee; border: 0; border-radius: 8px; padding: 8px 14px; font: 600 15px var(--font-sans); cursor: pointer; }
.pv-top .sp { flex: 1; }
.pv-cur, .pv-next { position: relative; background: #000; border-radius: 10px; overflow: hidden; }
.pv-cur { grid-row: 2 / 4; }
.pv-right { display: grid; grid-template-rows: auto 1fr; gap: 16px; min-height: 0; grid-row: 2 / 4; }
.pv-next { aspect-ratio: 16 / 9; }
.pv-label { position: absolute; left: 10px; top: 8px; z-index: 5; font: 700 12px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.6); padding: 4px 8px; border-radius: 6px; }
.pv-stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform-origin: center; }
.pv-stage .slide { display: flex; }
.pv-notes { background: #1c1b19; border-radius: 10px; padding: 22px 26px; overflow: auto; font-size: 22px; line-height: 1.5; color: #e9e7e1; }
.pv-notes .empty { color: #777; font-style: italic; }
.pv-notes p { margin: 0 0 14px; }
.pv-steps { font: 600 15px var(--font-mono); color: #aaa; margin-bottom: 10px; }

/* ---------- Print: one slide per page, builds shown ---------- */
@media print {
  @page { size: 1600px 900px; margin: 0; }
  body.deck-page { background: #fff; overflow: visible; }
  .deck-viewport { position: static; display: block; overflow: visible; }
  .deck { position: static; transform: none !important; width: auto; height: auto; }
  .slide { position: relative; display: flex !important; page-break-after: always; break-after: page; }
  [data-step] { opacity: 1 !important; transform: none !important; }
  .deck-controls, .deck-progress, .deck-overview, .deck-help, .deck-black { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
