@font-face {
  font-family: 'Outfit';
  src: url('assets/fonts/outfit-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Tokens. The page is dark only, built for projectors and control rooms. */
:root {
  color-scheme: dark;
  --bg: #0a0c17;
  --ink: #eef0f8;
  --ink-2: #a3a9c4;
  --ink-3: #6f7593;
  --hover: rgba(255, 255, 255, 0.07);
  --line: #c1c7df;
  --line-soft: #5b6285;
  --fill-1: #141831;
  --fill-2: #1b2040;
  --fill-3: #252b52;
  --room: #171c38;
  --floor: #121631;
  --ground: #0d1022;
  --road: #10132a;
  --glass: rgba(120, 196, 230, 0.07);
  --window-dark: #0f1328;
  --window-warm: #ffd27a;
  --screen: #0f1430;
  --screen-on: #232c5c;
  --air: #bfdcff;
  --sea: #0b1128;
  --land: #1c2247;
  --critical: #ef4444;
  --blind: #2a3160;
  --blanket: #2d3566;
  --person: #39417a;
  --coffee: #7b4a2e;
  --data: #3fd0e6;
  --alert: #f5a524;
  --command: #34d399;
  --ai: #8b7cf6;
  --panel: rgba(16, 20, 40, 0.94);
  --panel-line: #2f3760;
  --app-head: #1b2142;
  --free: #4ade80;
  --busy: #f87171;
  --sky-night-1: #05070f;
  --sky-night-2: #10142b;
  --sky-dawn-1: #0c1030;
  --sky-dawn-2: #2a2956;
  --sky-dawn-3: #7c5270;
  --sky-dawn-4: #d9905f;
  --sky-day-1: #0f1a3d;
  --sky-day-2: #24406e;
  --sky-day-3: #4f6f9c;
  --sun: #ffd28a;
  --star: #cfd6ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Outfit has no Japanese, so Japanese falls through to the system's own face: Hiragino on a Mac, Yu Gothic or Meiryo
   on Windows. That avoids shipping a 4.8 MB font. */
:root {
  --font: 'Outfit', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP',
    system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
}

/* Top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(16px, 3vw, 40px) 14px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  border-color: var(--panel-line);
}

.logo-ink {
  fill: var(--ink);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Auto-play: a ring counts down to the start, then the icon shows pause while it plays. */
.auto-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.auto-btn[hidden] {
  display: none;
}

.auto-ring {
  width: 22px;
  height: 22px;
  transform: rotate(-90deg);
}

.auto-track,
.auto-progress {
  fill: none;
  stroke-width: 2;
}

.auto-track {
  stroke: var(--panel-line);
}

.auto-progress {
  stroke: var(--ink);
  stroke-dasharray: 62.83;
  stroke-dashoffset: 62.83;
  stroke-linecap: round;
}

.auto-play,
.auto-pause {
  transform: rotate(90deg);
  transform-origin: 12px 12px;
}

.auto-play {
  fill: currentColor;
}

.auto-pause {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.auto-btn[data-state='off'] .auto-pause,
.auto-btn:not([data-state='off']) .auto-play {
  display: none;
}

.auto-btn[data-state='playing'] .auto-progress {
  stroke-dashoffset: 0;
  stroke: var(--command);
}

@media (max-width: 640px) {
  .auto-label {
    display: none;
  }

  .auto-btn {
    padding: 0 8px;
  }
}

/* Opening stage */
.opening {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

.sky {
  position: absolute;
  inset: 0;
}

#sky-night {
  background: linear-gradient(180deg, var(--sky-night-1) 0%, var(--sky-night-2) 85%);
}

#sky-dawn {
  opacity: 0;
  background: linear-gradient(
    180deg,
    var(--sky-dawn-1) 0%,
    var(--sky-dawn-2) 48%,
    var(--sky-dawn-3) 72%,
    var(--sky-dawn-4) 88%
  );
}

#sky-day {
  opacity: 0;
  background: linear-gradient(180deg, var(--sky-day-1) 0%, var(--sky-day-2) 60%, var(--sky-day-3) 90%);
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.world,
.tile-art,
.stage {
  font-family: var(--font);
}

.headline {
  position: absolute;
  top: clamp(90px, calc(10vh + 14px), 144px);
  left: 0;
  right: 0;
  margin: 0 auto;
  width: min(92vw, 1100px);
  text-align: center;
  z-index: 5;
  visibility: hidden;
}

.headline {
  pointer-events: none;
}

.headline h1,
.headline p {
  width: fit-content;
  max-width: 100%;
  /* The docking move scales from the top left; fixing the origin here keeps a scene jump from shifting the title. */
  transform-origin: 0 0;
}

@media (min-width: 900px) {
  .headline p {
    white-space: nowrap;
    max-width: none;
  }
}

.headline h1 {
  margin: 0 auto;
  font-size: clamp(36px, calc(5.4vw - 2px), 86px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.headline p {
  margin: 18px auto 0;
  max-width: 820px;
  font-size: clamp(16px, 1.5vw, 22px);
  color: var(--ink-2);
}

.caption {
  position: absolute;
  left: clamp(16px, 4vw, 64px);
  top: clamp(90px, calc(10vh + 14px), 122px);
  width: min(540px, calc(100vw - 32px));
  padding: 16px 20px 18px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(10px);
  z-index: 6;
  visibility: hidden;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.caption h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.15;
  font-weight: 600;
}

.caption p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: clamp(14px, 1.1vw, 17px);
}

.caption .mech {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink);
}

.mech > span:not(.arrow) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
}

.arrow {
  color: var(--ink-3);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.dot-data {
  background: var(--data);
}

.dot-alert {
  background: var(--alert);
}

.dot-cmd {
  background: var(--command);
}

.dot-ai {
  background: var(--ai);
}

/* Controls */
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  margin: 0 auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(10px);
}

.ctl {
  height: 38px;
  min-width: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ctl:hover {
  background: var(--hover);
}

.ctl svg {
  width: 16px;
  height: 16px;
}

.ctl svg[hidden] {
  display: none;
}

.segments {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0 4px;
}

.seg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 86px;
  padding: 7px 10px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
}

.seg:hover:not(:disabled) {
  background: var(--hover);
  color: var(--ink);
}

.seg.is-active {
  color: var(--ink);
}

.seg:disabled {
  opacity: 0.45;
  cursor: default;
}

.seg i {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--panel-line);
  overflow: hidden;
}

.seg b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--data);
}

/* Finale */
.finale {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  padding: 90px 16px 110px;
  visibility: hidden;
  overflow-y: auto;
}

.finale-head {
  margin-top: auto;
  text-align: center;
}

.finale-foot {
  margin-bottom: auto;
}

.finale-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.finale-head p {
  margin: 10px 0 0;
  color: var(--ink-2);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 20px);
  width: min(1500px, 100%);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  cursor: pointer;
  transition: translate 0.25s ease, border-color 0.25s ease;
}

.tile:hover:not(:disabled),
.tile:focus-visible {
  translate: 0 -4px;
  border-color: var(--data);
  outline: none;
}

.tile-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, var(--sky-day-1), var(--sky-day-3));
}

.tile[data-scene='office'] .tile-thumb {
  background: var(--room);
}

.tile[data-scene='building'] .tile-thumb {
  background: linear-gradient(180deg, var(--sky-dawn-1), var(--sky-dawn-3));
}

.tile[data-scene='fleet'] .tile-thumb {
  background: var(--sea);
}

.tile-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  --lw: 1.1;
}

.tile-key {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--panel-line);
}

.tile-meta {
  display: grid;
  gap: 2px;
  padding: 12px 14px 14px;
}

.tile-meta strong {
  font-size: 16px;
  font-weight: 600;
}

.tile-meta span {
  font-size: 13px;
  color: var(--ink-2);
}

.tile.is-todo {
  border-style: dashed;
  background: transparent;
  cursor: default;
}

.tile.is-todo .tile-thumb {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--hover) 10px 20px);
  color: var(--ink-3);
  font-size: 13px;
}

.finale-foot {
  color: var(--ink-3);
  font-size: 14px;
}

/* Chapters. Built chapters pin a 1600 by 900 stage that deck.js fits to the window; the rest are title cards. */
.chapter {
  position: relative;
  background: var(--bg);
}

.chapter-pin {
  height: 100vh;
  overflow: hidden;
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px;
  height: 900px;
  transform: translate(-50%, -50%) scale(var(--fit, 1));
}

.ch-head {
  position: absolute;
  left: 72px;
  top: 96px;
  width: 560px;
}

.ch-head h2,
.card-inner h2 {
  margin: 0;
  text-wrap: balance;
  font-size: 44px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.lede {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.45;
}

.ch-day {
  position: absolute;
  right: 72px;
  top: 104px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  font-size: 14px;
  font-weight: 600;
}

.ch-day svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.chapter-card {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 16px;
  box-sizing: border-box;
  border-top: 1px solid var(--panel-line);
}

.card-inner {
  width: min(760px, 100%);
}

.card-inner h2 {
  font-size: clamp(32px, 4vw, 52px);
}

.card-inner .lede {
  font-size: clamp(17px, 1.4vw, 20px);
}

.card-note {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--panel-line);
  color: var(--ink-3);
  font-size: 14px;
}

/* The beat bar: progress pips, then one line per beat. */
.beat-bar {
  position: absolute;
  left: 72px;
  right: 72px;
  top: 792px;
  display: flex;
  gap: 24px;
}

.beat-pips {
  display: flex;
  gap: 8px;
  margin: 1px 0 0;
  padding: 0;
  list-style: none;
}

/* Each dash has a 24 px tall hit area around its 4 px bar. */
.beat-pips li {
  position: relative;
  width: 22px;
  height: 24px;
}

.beat-pips li::before,
.beat-pips i {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 4px;
  border-radius: 2px;
  pointer-events: none;
}

.beat-pips li::before {
  content: '';
  background: var(--panel-line);
  transition: background 0.2s;
}

.beat-pips li:hover::before {
  background: var(--ink-3);
}

/* deck.js sets --fill from 0 to 1 as the dash's beat plays. */
.beat-pips i {
  background: var(--ink);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
}

.beat-pips li.is-playing::before {
  animation: pip-pulse 1.1s ease-in-out infinite;
}

.beat-pips li.is-target::before {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 22%, transparent);
}

@keyframes pip-pulse {
  50% {
    background: var(--ink-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beat-pips li.is-playing::before {
    animation: none;
  }
}

.beat-pips button {
  position: absolute;
  inset: 0 -4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.beat-pips button:focus-visible {
  outline: 2px solid var(--ink-2);
  outline-offset: 0;
}

.beat-text {
  position: relative;
  flex: 1;
  min-height: 56px;
}

.beat-text p {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 1180px;
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}

.beat-line {
  visibility: hidden;
  opacity: 0;
}

.beat-line strong {
  margin-right: 6px;
  color: var(--ink);
  font-weight: 600;
}

.beat-hint {
  color: var(--ink-3) !important;
}

/* Japanese: break lines between phrases rather than inside a word, where the browser supports it. */
:lang(ja) .lede,
:lang(ja) .beat-text p,
:lang(ja) .ui-pane p,
:lang(ja) .ui-pane li,
:lang(ja) .caption p,
:lang(ja) .headline p,
:lang(ja) .tile-meta span,
:lang(ja) .ch-head h2,
:lang(ja) .ch-head .lede,
:lang(ja) .card-inner h2,
:lang(ja) .card-inner .lede,
:lang(ja) .beat-line {
  word-break: auto-phrase;
}

/* The progress rail */
.rail {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 15;
  transform: translateY(-50%);
  transition: opacity 0.3s;
}

.rail.is-over-opening {
  opacity: 0.45;
}

.rail ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 6px 4px;
  list-style: none;
}

.rail a {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
}

.rail a.is-active {
  background: var(--ink);
  border-color: var(--ink);
}

.rail a span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.rail a:hover span,
.rail a:focus-visible span {
  opacity: 1;
}

@media (max-width: 700px) {
  .rail {
    display: none;
  }
}

.lang-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.dot-watch {
  background: var(--ink-3);
}

.dot-critical {
  background: var(--critical);
}

/* Product mockups. Sizes are in stage pixels. */
.ui-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--panel-line);
  background: var(--fill-1);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.ui-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid var(--panel-line);
  background: var(--app-head);
}

.ui-mark {
  width: 16px;
  height: 18px;
  fill: var(--ink);
}

.ui-crumbs {
  position: relative;
  flex: 1;
  height: 20px;
  color: var(--ink-2);
  font-size: 13px;
}

.ui-crumb {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.ui-crumb i {
  margin: 0 4px;
  color: var(--ink-3);
  font-style: normal;
}

.ui-body {
  position: relative;
  flex: 1;
}

.ui-pane {
  position: absolute;
  inset: 0;
  padding: 24px 28px;
  overflow: hidden;
}

.ui-pane,
.ui-crumb {
  visibility: hidden;
  opacity: 0;
}

.ui-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ui-title-row h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.ui-sev {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ui-sev-critical {
  color: var(--critical);
  background: color-mix(in srgb, var(--critical) 16%, transparent);
}

.ui-section,
.ui-code-label,
.ui-history small,
.ui-inv-sec h5 {
  margin: 18px 0 10px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ui-cond {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ui-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--fill-2);
  font-size: 15px;
  font-weight: 600;
}

.ui-field small,
.ui-target small,
.ui-outcome small,
.ui-action-row small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
}

.ui-field-tag {
  border-color: color-mix(in srgb, var(--data) 60%, var(--panel-line));
}

.ui-resolves {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.ui-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.ui-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.ui-toggle i {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 9px;
  background: var(--fill-3);
}

.ui-toggle i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-3);
}

.ui-toggle.is-on i {
  background: var(--command);
}

.ui-toggle.is-on i::after {
  left: 15px;
  background: #fff;
}

.ui-status {
  position: relative;
  height: 26px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 600;
}

.ui-status > * {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ui-history {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid var(--panel-line);
}

.ui-history small {
  display: block;
  margin: 12px 0 8px;
}

.ui-hist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--fill-2);
  font-size: 14px;
}

.ui-hist-row b {
  flex: 1;
  font-weight: 600;
}

.ui-hist-row time {
  color: var(--ink-3);
}

.ui-hist-row-open {
  margin-bottom: 14px;
}

.ui-hist-row-mini {
  padding: 10px 12px;
  font-size: 13px;
}

.ui-status-new {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid currentColor;
  color: var(--data);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ui-desc {
  margin: -6px 0 18px;
  color: var(--ink-2);
  font-size: 14px;
}

.ui-target {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-line);
  background: var(--fill-2);
  font-size: 15px;
  font-weight: 600;
}

.ui-step .ui-target {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

.ui-chip {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--fill-3);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ui-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--window-dark);
  color: var(--command);
  font: 500 15px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.ui-outcome {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 600;
}

.ui-outcome span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ui-notify {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.ui-phone {
  flex: none;
  width: 250px;
  height: 470px;
  box-sizing: border-box;
  padding: 20px 16px;
  border-radius: 34px;
  border: 2px solid var(--line-soft);
  background: var(--room);
}

.ui-phone-clock {
  margin: 36px 0 0;
  font-size: 52px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
}

.ui-phone-date {
  margin: 6px 0 40px;
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
}

.ui-phone-top {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

.ui-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--panel-line);
  background: var(--app-head);
  font-size: 13.5px;
  line-height: 1.45;
}

.ui-bubble b {
  display: block;
  margin-bottom: 4px;
}

.ui-bubble p {
  margin: 0;
  color: var(--ink-2);
}

.ui-note {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.ui-email {
  flex: 1;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--panel-line);
  background: var(--fill-2);
  font-size: 15px;
}

.ui-email > p {
  margin: 0 0 12px;
}

.ui-email-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--panel-line);
}

.ui-email-head p {
  display: flex;
  gap: 10px;
  margin: 0 0 8px;
}

.ui-email-head small {
  flex: none;
  width: 64px;
  color: var(--ink-3);
  font-size: 13px;
}

.ui-meta {
  color: var(--ink-3);
  font-size: 13px;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--fill-3);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.ui-btn-ai {
  border-color: transparent;
  background: var(--ai);
  color: #fff;
}

.ui-inv {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ai) 45%, var(--panel-line));
  background: color-mix(in srgb, var(--ai) 6%, var(--fill-1));
}

.ui-inv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-inv-head h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
}

.ui-inv-run {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.ui-inv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ui-inv-sec h5 {
  margin: 14px 0 6px;
}

.ui-inv-sec ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.4;
}

.ui-ev,
.ui-kind {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ui-ev {
  margin-left: 6px;
}

.ui-ev-supported {
  color: var(--command);
  background: color-mix(in srgb, var(--command) 15%, transparent);
}

.ui-ev-possible {
  color: var(--alert);
  background: color-mix(in srgb, var(--alert) 15%, transparent);
}

.ui-kind {
  margin-right: 8px;
  color: var(--ai);
  background: color-mix(in srgb, var(--ai) 14%, transparent);
}

.ui-saved,
.c10-bot-state {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.c10-bot-state b {
  color: var(--data);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.ui-toast {
  margin: 14px 0 0;
  color: var(--command);
  font-size: 13px;
  font-weight: 600;
}

.ui-dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ui-dash-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ui-widget {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--panel-line);
  background: var(--fill-2);
}

.ui-widget-title {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.ui-gauge {
  display: block;
  width: 100%;
  height: 170px;
}

.ui-gauge-track,
.ui-gauge-over,
.ui-gauge-value {
  fill: none;
  stroke-width: 14;
}

.ui-gauge-track {
  stroke: var(--fill-3);
  stroke-linecap: round;
}

.ui-gauge-over {
  stroke: color-mix(in srgb, var(--critical) 35%, transparent);
}

.ui-gauge-value {
  stroke: var(--data);
  stroke-linecap: round;
}

.ui-gauge-value.is-over {
  stroke: var(--critical);
}

.ui-gauge-num {
  fill: var(--ink);
  font-size: 26px;
  font-weight: 600;
}

.ui-widget-push {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ui-btn-push {
  height: 56px;
  padding: 0 28px;
  border-color: transparent;
  border-radius: 12px;
  background: var(--command);
  color: #fff;
  font-size: 17px;
}

.ui-widget-push .ui-meta {
  margin: 10px 0 0;
}

.ui-cmds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ui-cmds li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--window-dark);
}

.ui-cmds i {
  width: 14px;
  color: var(--ink-3);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.ui-cmds code {
  flex: 1;
  color: var(--ink-2);
  font: 500 13px ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.ui-sent {
  color: var(--command);
}

.ui-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 28px;
  height: 28px;
}

.ui-cursor path {
  fill: var(--ink);
  stroke: var(--bg);
  stroke-width: 1.5;
}

.ui-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ui-step {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--panel-line);
  background: var(--fill-2);
}

.ui-step-ai {
  border-color: color-mix(in srgb, var(--ai) 45%, var(--panel-line));
}

.ui-step-cmd {
  border-color: color-mix(in srgb, var(--command) 45%, var(--panel-line));
}

.ui-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.ui-draft {
  min-height: 20px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: var(--fill-1);
  font-size: 14px;
}

.ui-caret {
  display: inline-block;
  width: 2px;
  height: 16px;
  margin-left: 2px;
  background: var(--ai);
  vertical-align: -3px;
}

.ui-draft-out {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.ui-status-chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ai) 14%, transparent);
  color: var(--ai);
  font-weight: 600;
}

.ui-inferred {
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--ai) 60%, transparent);
}

.ui-inferred small {
  margin-left: 4px;
  color: var(--ai);
  font-size: 11px;
  font-weight: 700;
}

.ui-by-hand {
  color: var(--command);
  font-size: 12px;
  font-weight: 700;
}

.ui-action-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 170px;
  gap: 16px;
  align-items: center;
  font-size: 14px;
}

.ui-action-row small {
  display: block;
}

.ui-state {
  position: relative;
  height: 28px;
}

.ui-state > * {
  position: absolute;
  right: 0;
  top: 0;
}

.ui-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ui-pill-off {
  background: var(--fill-3);
  color: var(--ink-2);
}

.ui-pill-on {
  background: var(--command);
  color: #fff;
}

.ui-action-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.ui-action-btns .ui-btn {
  height: 32px;
  font-size: 13px;
}

.ui-action-btns .ui-note {
  margin: 0 0 0 6px;
}

/* Chapter 10 line art */
.c10-left {
  position: absolute;
  left: 72px;
  top: 300px;
  width: 540px;
  height: 460px;
}

.c10-line {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.c10-bar-bg {
  fill: var(--fill-3);
}

.c10-bar {
  fill: var(--alert);
}

.c10-limit {
  stroke: var(--critical);
  stroke-width: 2;
}

.c10-limit-text {
  fill: var(--ink-3);
  font-size: 11px;
}

/* The day chip holds both days in one place and cross-fades between them. */
.c10-day {
  display: inline-grid;
}

.c10-day > b {
  grid-area: 1 / 1;
  font-weight: inherit;
  white-space: nowrap;
}

.c10-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.c10-step-head .ui-step-title {
  margin: 0;
}

.c10-btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

/* Scene art. Static line art keeps a 2px screen width at every zoom level. */
.ln {
  fill: none;
  stroke: var(--line);
  stroke-width: var(--lw, 2);
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ln.thin {
  stroke-width: calc(var(--lw, 2) * 0.65);
}

.ln.soft {
  stroke: var(--line-soft);
}

.sh {
  fill: var(--fill-2);
  stroke: var(--line);
  stroke-width: var(--lw, 2);
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.sh.wall,
.sh.roof {
  fill: var(--fill-1);
}

.sh.soft,
.sh.desk-panel {
  fill: var(--fill-3);
}

.sh.window-dark,
.window-dark {
  fill: var(--window-dark);
}

.sh.glass {
  fill: var(--glass);
}

.sh.screen {
  fill: var(--screen);
}

.sh.person {
  fill: var(--person);
}

.sh.blanket {
  fill: var(--blanket);
}

.far {
  opacity: 0.45;
}

.room,
.o-wall {
  fill: var(--room);
}

.o-ceiling {
  fill: var(--fill-1);
}

.o-floor {
  fill: var(--floor);
}

.slab {
  fill: var(--line);
}

.ground-fill {
  fill: var(--ground);
}

.road {
  fill: var(--road);
}

.road-dash {
  stroke: var(--line-soft);
  stroke-width: 2;
  stroke-dasharray: 18 16;
}

.window-lit {
  fill: var(--window-warm);
}

.glass-dawn {
  fill: url(#g-dawn-glass);
  opacity: 0;
}

.glass-room {
  fill: var(--glass);
}

.blind {
  fill: var(--blind);
}

.beam {
  fill: url(#g-beam);
  opacity: 0;
}

.led-on {
  fill: var(--command);
  opacity: 0;
}

.coffee {
  fill: var(--coffee);
}

.steam {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
}

.room-sign {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  fill: var(--ink-2);
}

.sensor-dot {
  fill: var(--data);
}

.sensor-ring {
  fill: none;
  stroke: var(--data);
  stroke-width: 2;
  opacity: 0;
}

.link {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 1.6;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
  opacity: 0;
}

.comet {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 8 300;
  stroke-dashoffset: 12;
}

.comet.halo {
  stroke-width: 14;
  opacity: 0.28;
}

.comet.data {
  stroke: var(--data);
}

.comet.cmd {
  stroke: var(--command);
}

.comet.ai {
  stroke: var(--ai);
}

.leader.ai {
  stroke: var(--ai);
}

.card-ai .card-bg {
  stroke: var(--ai);
}

.leader {
  fill: none;
  stroke: var(--data);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  opacity: 0;
}

.chip-bg,
.card-bg,
.node-bg,
.app-bg {
  fill: var(--panel);
  stroke: var(--panel-line);
  stroke-width: 1.5;
}

.chip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-2);
}

.chip-value {
  font-size: 21px;
  font-weight: 600;
  fill: var(--ink);
}

.spark {
  fill: none;
  stroke: var(--data);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

.node-ring {
  fill: none;
  stroke: var(--alert);
  stroke-width: 3;
  opacity: 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink);
}

.card-line {
  font-size: 13px;
  fill: var(--ink-2);
}

.card-rule,
.app-rule {
  stroke: var(--panel-line);
  stroke-width: 1;
}

.card-status-text {
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
}

.s-watch {
  fill: var(--ink-3);
}

.s-alert {
  fill: var(--alert);
}

.s-sent {
  fill: var(--command);
}

.s-ai {
  fill: var(--ai);
}

.app-head {
  fill: var(--app-head);
}

.app-title {
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink);
}

.app-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-3);
}

.app-channel {
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink-2);
}

.app-row {
  font-size: 14px;
  fill: var(--ink);
}

.app-name {
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
}

.app-time {
  font-size: 12px;
  fill: var(--ink-3);
}

.app-msg {
  font-size: 13px;
  fill: var(--ink-2);
}

.lock {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.8;
}

.pill text {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
}

.pill-free rect {
  fill: color-mix(in srgb, var(--free) 16%, transparent);
}

.pill-free circle {
  fill: var(--free);
}

.pill-busy rect {
  fill: color-mix(in srgb, var(--busy) 18%, transparent);
}

.pill-busy circle {
  fill: var(--busy);
}

.app-ring {
  fill: none;
  stroke: var(--command);
  stroke-width: 3;
  opacity: 0;
}

.sun-disc {
  fill: var(--sun);
}

.star {
  fill: var(--star);
}

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seg {
    min-width: 0;
    padding: 7px 6px 8px;
  }

  .seg span {
    display: none;
  }

  .seg i {
    width: 22px;
  }

  .ctl-text span {
    display: none;
  }

  .caption {
    padding: 12px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .tile {
    transition: none;
  }
}

.day-glass {
  fill: url(#g-day-glass);
  opacity: 0.55;
}

.sh.chair {
  fill: var(--fill-3);
  stroke: var(--line-soft);
}

.screen-on {
  fill: var(--screen-on);
}

.screen-line {
  fill: none;
  stroke: var(--data);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

.pc-bar {
  fill: var(--data);
}

.pc-axis {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.pc-title,
.pc-label {
  font-size: 8px;
  fill: var(--ink-2);
}

.pc-value {
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink);
}

.cam-cone {
  fill: url(#g-cone);
  opacity: 0;
}

.cam-lens {
  fill: var(--screen);
}

.airflow {
  fill: none;
  stroke: var(--air);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
  opacity: 0;
}

/* Office building */
.strip {
  fill: var(--fill-3);
}

.strip-on {
  fill: var(--window-warm);
}

.lamp-glow {
  fill: url(#g-lamp);
}

.led-heat {
  fill: var(--alert);
}

.heat {
  fill: none;
  stroke: var(--alert);
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* Factory */
.glaze {
  stroke: var(--window-warm);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  opacity: 0.8;
}

.facade-sign {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.12em;
  fill: var(--ink);
}

.machine-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--ink-2);
}

.truck-side {
  font-size: 18px;
  font-weight: 600;
  fill: var(--ink-2);
}

.light-ok {
  fill: var(--command);
}

.light-warn {
  fill: var(--alert);
  opacity: 0;
}

.light-bad,
.beacon-red {
  fill: var(--critical);
  opacity: 0;
}

.beacon-green {
  fill: var(--command);
  opacity: 0;
}

.bay {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

/* Fleet map */
.sea {
  fill: var(--sea);
}

.land {
  fill: var(--land);
  stroke: var(--line);
  stroke-width: 1.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.grid {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 0.8;
  opacity: 0.35;
  vector-effect: non-scaling-stroke;
}

.route {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 1.6;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
}

.city {
  fill: var(--ink-2);
}

.city-label {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink-2);
}

.truck-dot {
  fill: var(--data);
  stroke: var(--bg);
  stroke-width: 1.5;
}

.truck-hero .truck-dot {
  fill: var(--ink);
  stroke: var(--data);
  stroke-width: 2.5;
}

.truck-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--ink);
}

.trail {
  fill: none;
  stroke: var(--data);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0.6;
}

.truck-warn {
  fill: var(--alert);
  opacity: 0;
}

.truck-alert {
  fill: none;
  stroke: var(--alert);
  stroke-width: 2.5;
  opacity: 0;
}

.phone-body {
  fill: var(--fill-1);
  stroke: var(--line);
  stroke-width: 2;
}

.phone-screen {
  fill: var(--room);
}

.phone-who {
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
}

.phone-meta {
  font-size: 10px;
  fill: var(--ink-3);
}

.phone-bubble {
  fill: var(--app-head);
  stroke: var(--panel-line);
  stroke-width: 1;
}

.phone-from {
  font-size: 11px;
  font-weight: 700;
  fill: var(--ink);
}

.phone-text {
  font-size: 10.5px;
  fill: var(--ink-2);
}

/* The company mark and copyright line, stacked at the bottom right. The mark is a white PNG. */
.opening-credit {
  position: absolute;
  right: clamp(12px, 2vw, 28px);
  bottom: 8px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.25;
  text-align: right;
  pointer-events: none;
}

.opening-credit p {
  margin: 0;
}

.foot-logo {
  width: 64px;
  height: auto;
  opacity: 0.85;
}

/* Start overlay: the opening waits on a large play button until it is pressed. */
.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.start-overlay[hidden] {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.start-btn {
  width: clamp(90px, 12vmin, 142.5px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e2c044;
  color: #1a1500;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(226, 192, 68, 0.6);
  animation: start-pulse 2s ease-out infinite;
  transition: transform 0.2s ease;
}
.start-btn:hover,
.start-btn:focus-visible {
  transform: scale(1.08);
}
.start-btn svg {
  width: 50%;
  height: 50%;
}
.start-label {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
@keyframes start-pulse {
  70% { box-shadow: 0 0 0 36px rgba(226, 192, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 192, 68, 0); }
}

/* Speed button: a text-only control that cycles 1x, 1.5x and 2x. */
.ctl-speed {
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

/* Phones: the caption card spans the screen width. */
@media (max-width: 699px) {
  .caption {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

/* Below 900px the sub-headline wraps inside the screen instead of running past it. */
@media (max-width: 899px) {
  .headline p {
    max-width: 100%;
  }
}

/* ---- Home: the wordmark that appears once the hero is behind, the scroll cue, the picker, the closing call, the footer ---- */
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.topbar.is-past-hero .brand {
  opacity: 1;
  visibility: visible;
}

.brand-logo {
  display: block;
  height: 24px;
  width: 144px;
  fill: var(--ink);
}

.curtain {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 3px;
  pointer-events: none;
}

.scroll-progress i {
  display: block;
  height: 100%;
  background: #e2c044;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 96px;
  z-index: 9;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  visibility: hidden;
}

.scroll-cue svg {
  width: 22px;
  height: 22px;
  animation: cue-bob 1.6s ease-in-out infinite;
}

@keyframes cue-bob {
  50% { transform: translateY(5px); }
}

.chapter-flow {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(96px, 14vh, 150px) clamp(16px, 4vw, 64px);
  box-sizing: border-box;
}

.flow-inner {
  width: min(1400px, 100%);
  text-align: center;
}

.flow-inner h2 {
  margin: 0;
  text-wrap: balance;
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.flow-inner .lede {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: clamp(16px, 1.4vw, 20px);
}

.picker {
  background: linear-gradient(180deg, var(--bg) 0%, var(--sky-day-1) 45%, var(--sky-day-2) 100%);
}

.picker .tiles {
  margin: clamp(32px, 6vh, 56px) auto 0;
  text-align: left;
}

.cta {
  background: radial-gradient(60% 55% at 50% 45%, rgba(226, 192, 68, 0.1), transparent 70%), var(--bg);
}

.cta-mark {
  display: block;
  width: min(360px, 70vw);
  height: auto;
  margin: 0 auto 28px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 16px 30px;
  border-radius: 999px;
  background: #e2c044;
  color: #1a1500;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(226, 192, 68, 0.3);
  outline: none;
}

.site-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 16px 48px;
  border-top: 1px solid var(--panel-line);
  background: var(--bg);
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

.site-foot p {
  margin: 0;
}

.site-foot .foot-logo {
  width: 110px;
}

@media (max-width: 640px) {
  .picker .tile-meta span {
    display: none;
  }

  .scroll-cue {
    bottom: 84px;
  }
}
