:root {
  --bg: #101214;
  --bg-surface: #181c20;
  --bg-raised: #20262b;
  --text: #dcdddc;
  --text-dim: #9aa5ad;
  --text-bright: #f4f5f4;
  --border: #323a41;
  --accent: #65c7d7;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Liberation Mono", monospace;
}

html, body { margin: 0; background: var(--bg); color: var(--text); }

.reveal-viewport { background: var(--bg); color: var(--text); }
.reveal { width: 100vw; height: 100vh; font-family: var(--sans); color: var(--text); }
.reveal .slides { width: 960px; height: 700px; text-align: left; }
.reveal .slides section { width: 960px; height: 700px; box-sizing: border-box; padding: 0; }

.reveal h1, .reveal h2 {
  font-family: var(--sans);
  font-weight: 650;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  margin: 0 0 0.4em;
}
.reveal h1 { font-size: 44px; line-height: 1.15; }
.reveal h2 { font-size: 26px; line-height: 1.2; margin-top: 0.8em; }
.reveal p, .reveal li { line-height: 1.4; }
.reveal ul, .reveal ol { margin: 0; padding-left: 1.2em; }
.reveal li { margin: 0 0 0.4em; }
.reveal li::marker { color: var(--accent); }

.slide-content {
  box-sizing: border-box;
  width: 100%;
  height: 700px;
  padding: 44px 30px 56px;
  font-size: 30px;
  overflow-wrap: anywhere;
}

.outcome-line {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: var(--bg-raised);
  color: var(--text-bright);
  font-size: 21px;
  line-height: 1.4;
}

.text-slide { display: flex; flex-direction: column; justify-content: center; padding-left: 64px; padding-right: 64px; }
.text-slide h1 { font-size: 44px; }
.text-slide ul { font-size: 24px; color: var(--text); }

.step-slide {
  display: grid;
  padding-left: 22px;
  padding-right: 22px;
  grid-template-columns: 360px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "head head" "copy picture";
  column-gap: 24px;
  row-gap: 22px;
  align-items: start;
}
.step-head { grid-area: head; min-width: 0; }
.step-head h1 { margin: 0; font-size: 34px; }
.why-line { margin: 8px 0 0; color: var(--text-dim); font-size: 15px; line-height: 1.35; }
.instruction-panel, .result-copy { grid-area: copy; min-width: 0; font-size: 23px; }
.instruction-panel p { margin: 0 0 0.6em; }
.instruction-panel ol { font-size: 23px; }

.evidence-panel {
  grid-area: picture;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.web-slide .evidence-panel, .result-picture:has(.shot-crop) {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
}
.evidence-panel > .shot-crop { grid-area: 1 / 1; }
.evidence-panel img { display: block; max-width: 100%; height: auto; margin: 0; }
.shot-crop { position: relative; overflow: hidden; width: 100%; background: var(--bg-surface); }
.shot-crop img { max-width: none; }
.evidence-panel:has(> .shot-crop.fragment.visible) > .shot-crop:not(.fragment) { visibility: hidden; }
.shot-mark { position: absolute; border: 3px solid var(--accent); border-radius: 4px; }
.shot-mark b { position: absolute; top: -14px; left: -14px; min-width: 26px; padding: 2px 6px; border-radius: 13px; background: var(--accent); color: var(--bg); font-size: 16px; text-align: center; }

.result-copy p { margin: 0 0 0.35em; }
.result-copy h2 { margin: 22px 0 10px; color: var(--text-dim); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.reveal .result-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reveal .result-chips li {
  max-width: 100%;
  margin: 0;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-bright);
  font-size: 18px;
  line-height: 1.3;
}

.command-block {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--bg-surface);
}
.reveal pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: none;
}
.reveal pre code { font-family: var(--mono); font-size: 17px; color: var(--text-bright); background: none; padding: 0; }
.command-block pre { flex: 1 1 auto; min-width: 0; padding: 10px 0; color: var(--text-bright); }
.command-block pre code::before { content: "$ "; color: var(--accent); }
.command-block button {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.command-block button:hover { background: var(--text-bright); }
.command-block button:focus-visible { outline: 3px solid var(--text-bright); outline-offset: 2px; }

.terminal-output, .terminal-diff, .terminal-text {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text);
}
.terminal-output, .terminal-diff, .terminal-pane { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.terminal-output .terminal-line, .terminal-output .marked-line, .terminal-diff .terminal-line, .terminal-pane .terminal-line, .terminal-pane .marked-line { width: max-content; min-width: 100%; }
.terminal-line, .marked-line { display: block; }
.marked-line {
  margin: 0 -16px;
  padding: 0 16px 0 12px;
  border-left: 4px solid var(--accent);
  background: var(--bg-raised);
  color: var(--text-bright);
}

.transcript {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.45;
}
.reveal .transcript p { margin: 0 0 10px; line-height: 1.45; }
.transcript-sign { display: inline-block; width: 1.4em; text-indent: 0; }
.reveal .transcript-asked {
  padding: 8px 12px 8px calc(12px + 1.4em);
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--accent);
  text-indent: -1.4em;
  white-space: pre-wrap;
}
.transcript-did { overflow: hidden; color: var(--text-bright); white-space: nowrap; text-overflow: ellipsis; }
.transcript-did .transcript-sign { color: var(--text-dim); }
.transcript-result { display: flex; min-width: 0; color: var(--text-dim); }
.transcript-result .transcript-sign { flex: none; padding-left: 0.7em; }
.transcript .terminal-output { flex: 1 1 auto; min-width: 0; padding: 0 0 0 4px; border: 0; background: none; font-size: inherit; }
.transcript .marked-line { margin: 0 0 0 -4px; padding: 0 8px 0 4px; border-left: 0; background: var(--bg-raised); color: var(--accent); }

.variable {
  padding: 0 4px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg);
}
.variable-note { margin: 0; font-size: 17px; color: var(--text-dim); }
.variable-note::before { content: "$X"; margin-right: 8px; padding: 0 4px; border-radius: 3px; background: var(--accent); color: var(--bg); font-family: var(--mono); font-size: 15px; }

.course-footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
  font-family: var(--sans);
  font-size: 14px;
  pointer-events: none;
}
.course-footer a { color: var(--text-dim); text-decoration: none; pointer-events: auto; }
.course-footer a:hover, .course-footer a:focus-visible { color: var(--accent); text-decoration: underline; }

.reveal .controls { color: var(--accent); }
.reveal .progress { color: var(--accent); }

.reveal-scroll .slides::after { content: ""; display: block; height: 120px; }
.reveal-scroll .slide-content { padding: 20px; font-size: 21px; }
.reveal-scroll h1, .reveal-scroll .text-slide h1, .reveal-scroll .step-head h1 { margin-bottom: 0.25em; font-size: 28px; }
.reveal-scroll .text-slide { padding-left: 20px; padding-right: 20px; }
.reveal-scroll p, .reveal-scroll li { line-height: 1.3; }
.reveal-scroll li { margin-bottom: 0.25em; }
.reveal-scroll ul, .reveal-scroll ol { padding-left: 1em; }
.reveal-scroll .text-slide ul, .reveal-scroll .instruction-panel, .reveal-scroll .instruction-panel ol, .reveal-scroll .result-copy { font-size: 21px; }
.reveal-scroll .why-line { margin-top: 0; font-size: 21px; }
.reveal-scroll .outcome-line { margin-top: 10px; padding: 8px 12px; font-size: 21px; line-height: 1.3; }
.reveal-scroll .step-slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head" "copy" "picture"; row-gap: 14px; }
.reveal-scroll .result-copy h2 { margin: 14px 0 8px; font-size: 21px; }
.reveal-scroll .result-chips li { padding: 4px 12px; font-size: 21px; }
.reveal-scroll pre, .reveal-scroll pre code, .reveal-scroll .transcript { font-size: 21px; }
.reveal-scroll .command-block button { min-width: 72px; min-height: 57px; font-size: 21px; }
.reveal-scroll .variable-note { font-size: 21px; }
.reveal-scroll .variable-note::before { font-size: 19px; }
.reveal-scroll .shot-mark b { top: -16px; left: -16px; min-width: 32px; border-radius: 16px; font-size: 21px; }

@font-face { font-family: "Heros"; src: url(fonts/texgyreheros-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Heros"; src: url(fonts/texgyreheros-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

html:has(.home-page), .home-page {
  --paper: #ffffff;
  --panel: #eef1f4;
  --ink: #1c2530;
  --ink-2: #4d5866;
  --rule: #c9d0d8;
  background: var(--paper);
  color: var(--ink);
}
.home-page { font: 400 16px/1.5 Heros, "Helvetica Neue", Arial, sans-serif; }
.home-page a { color: inherit; }
.home-page :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.home-page [hidden] { display: none !important; }

.home-head { box-sizing: border-box; padding: 40px 16px 8px; }
.home-head h1 { margin: 0; font-size: 36px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.home-byline { margin: 16px 0 0; color: var(--ink-2); }
.start-link, .open-link {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 24px;
  border-radius: 24px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}
.start-link:hover, .open-link:hover { background: #33404f; }
.coming-soon { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 700; }

.lesson-list-view { padding: 24px 16px 8px; }
.lesson-list { margin: 0; padding: 0; list-style: none; }
.lesson-list > li { position: relative; padding: 0 0 32px 40px; --line: var(--ink); }
.lesson-list > li::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 6px; background: var(--line); }
.lesson-list > li:last-child::before { bottom: auto; height: 12px; }
.lesson-list > li::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border: 3px solid var(--line); border-radius: 50%; background: #fff; }
.lesson-list > li.is-built::after { background: var(--line); box-shadow: inset 0 0 0 3px #fff; }
.lesson-list h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.lesson-number { color: var(--ink-2); }
.lesson-fields { margin: 8px 0 0; font-size: 14px; }
.lesson-fields dt { color: var(--ink-2); font-weight: 700; }
.lesson-fields dd { max-width: 58ch; margin: 0 0 8px; }
.lesson-fields ul { margin: 0; padding-left: 18px; }
.lesson-list .open-link { margin-top: 8px; }

.home-footer { padding: 0 16px 40px; color: var(--ink-2); font-size: 14px; }

.map { position: relative; overflow: hidden; }
.map-poster { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.map-lines { position: absolute; top: 0; left: 0; }
.has-map .map-poster .home-head { position: absolute; top: 40px; left: 48px; width: 400px; padding: 0; }
.has-map .map-poster .home-head h1 { font-size: 48px; }
.has-map .map-poster .home-footer { position: absolute; padding: 0; font-size: 12px; white-space: nowrap; }

.stop {
  position: absolute;
  box-sizing: border-box;
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stop-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.stop-number { color: var(--ink-2); }
.stop-state { display: block; color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.stop:hover .stop-title { text-decoration: underline; }
.stop[aria-expanded="true"] { background: var(--panel); }

.lesson-card {
  position: absolute;
  box-sizing: border-box;
  padding: 20px 24px 24px 32px;
  border-radius: 4px;
  background: var(--panel);
  font-size: 14px;
  line-height: 1.4;
}
.lesson-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: 4px 0 0 4px; background: var(--line, var(--ink)); }
.card-number { color: var(--ink-2); font-weight: 700; }
.lesson-card h2 { margin: 0 40px 8px 0; font-size: 18px; line-height: 1.25; }
.lesson-card p { margin: 0; }
.lesson-card .card-before { margin-top: 8px; color: var(--ink-2); }
.lesson-card .open-link { min-height: 40px; margin-top: 16px; padding: 0 16px; border-radius: 20px; font-size: 14px; }
.lesson-card .coming-soon { margin-top: 16px; }
.card-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 16px; background: transparent; color: var(--ink-2); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.card-close:hover { background: var(--rule); }

/* The one map breakpoint: at 1050 px the map scales to 0.8 or more, so 15 px stop titles render at 12 px or more.
   The map script reads it from .map's display. */
@media (width >= 1050px) {
  .has-map .lesson-list-view {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (width < 1050px) {
  .map { display: none !important; }
}
