:root {
  --paper: #eef3f8;
  --paper-2: #e1e9f2;
  --ink: #0d1d4b;
  --ink-2: #3c4a6e;
  --ink-3: #6d7896;
  --water: #1f6fb8;
  --route: #4aa5e2;
  --water-soft: #7cc2f0;
  --signal: #ff6a2b;
  --line: rgba(13, 29, 75, 0.13);
  --line-strong: rgba(13, 29, 75, 0.3);
  --dark: #0a1638;
  --dark-2: #12224d;
  --on-dark: #eef3f8;
  --on-dark-2: #9fb0d0;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1d4b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.18  0 0 0 0 0.35  0 0 0 .16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection {
  background: var(--water);
  color: var(--paper);
}

a {
  color: inherit;
}

.mono {
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: 0.02em;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 200;
}
.skip:focus {
  left: 8px;
}

:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 3px;
  border-radius: 4px;
}

em {
  font-style: italic;
  color: var(--water);
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
/* ---------- LOGO ---------- */
.js .logo.reveal:not(.in) * {
  animation-play-state: paused !important;
}
.logo {
  display: block;
  height: 30px;
  width: auto;
  color: var(--ink);
  overflow: visible;
}
.logo .l-ink {
  fill: none;
  stroke: currentColor;
  stroke-width: 23;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo .l-o {
  fill: currentColor;
}
.logo .l-route {
  fill: none;
  stroke: var(--route);
  stroke-width: 24;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.1s 0.25s var(--ease) forwards;
}
.logo .l-dash {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  opacity: 0;
  animation:
    fade 0.4s 1.2s forwards,
    march 1.1s linear infinite;
  animation-play-state: running, paused;
}
.logo .l-badge,
.logo .l-end {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.5s 1.25s var(--ease) forwards;
}
.logo .l-check {
  fill: none;
  stroke: #0d1d4b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a:hover > .logo .l-dash,
.logo:hover .l-dash {
  animation-play-state: running, running;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fade {
  to {
    opacity: 1;
  }
}
@keyframes march {
  to {
    stroke-dashoffset: -26;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.nav nav {
  display: flex;
  gap: 28px;
}
.nav nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-2);
  position: relative;
  padding: 10px 0;
}
.nav nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1.5px;
  background: var(--water);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav nav a:hover {
  color: var(--ink);
}
.nav nav a:hover::after {
  transform: scaleX(1);
}
.coords {
  color: var(--ink-3);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 600 0.98rem/1 var(--sans);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background 0.25s,
    color 0.25s,
    box-shadow 0.25s;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--water);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px var(--water);
}
.btn-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
}

/* ---------- HERO ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: calc(100svh - 64px);
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(32px, 4vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 28px;
  letter-spacing: 0.14em;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--route);
  animation: ping 2.2s infinite;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--route) 70%, transparent);
  }
  80%,
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 9.4vw, 9.2rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin: 0;
}
.display em {
  padding-right: 0.05em;
}

.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 18ch;
}

.lede {
  font-size: clamp(1.06rem, 1.35vw, 1.28rem);
  color: var(--ink-2);
  max-width: 34rem;
  margin: 32px 0 36px;
}
.lede strong {
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(
    transparent 62%,
    color-mix(in srgb, var(--route) 38%, transparent) 62%
  );
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-map {
  position: relative;
  margin: 0;
  aspect-ratio: 800 / 640;
  border-radius: 22px;
  background:
    radial-gradient(
      120% 90% at 70% 20%,
      color-mix(in srgb, var(--route) 16%, transparent),
      transparent 60%
    ),
    var(--paper-2);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 40px 80px -50px rgba(13, 29, 75, 0.45);
}
#map {
  width: 100%;
  height: 100%;
  display: block;
}
#contours path {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.13;
  stroke-width: 1;
}
#contours path.major {
  stroke-opacity: 0.26;
}
#route-shadow {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.18;
  stroke-width: 2;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
}
#route {
  fill: none;
  stroke: var(--route);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#route-dash {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-dasharray: 6 7;
  stroke-linecap: round;
  animation: march 1.4s linear infinite;
}
#route-mask {
  fill: none;
  stroke: #fff;
  stroke-width: 22;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stop circle.ring {
  fill: var(--paper-2);
  stroke: var(--ink);
  stroke-opacity: 0.4;
  stroke-width: 1.5;
  transition: all 0.5s var(--ease);
}
.stop circle.core {
  fill: var(--ink);
  fill-opacity: 0.3;
  transition: all 0.5s var(--ease);
}
.stop .check {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.4s 0.15s;
}
.stop text {
  font: 500 13px var(--mono);
  fill: var(--ink-2);
}
.stop.hit circle.ring {
  fill: #fff;
  stroke: var(--route);
  stroke-opacity: 1;
  stroke-width: 4;
}
.stop.hit circle.core {
  fill-opacity: 0;
}
.stop.hit .check {
  opacity: 1;
}
.stop.load.hit circle.ring {
  fill: var(--ink);
  stroke: var(--ink);
}
.stop.load.hit circle.core {
  fill: #fff;
  fill-opacity: 1;
}
.stop.load .check,
.stop.incident .check {
  display: none;
}
.stop.incident.hit circle.ring {
  fill: #fff;
  stroke: var(--signal);
}
.stop.incident.hit circle.core {
  fill: var(--signal);
  fill-opacity: 1;
}
.truck-halo {
  fill: var(--route);
  fill-opacity: 0.3;
  animation: halo 1.6s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.truck-core {
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 3;
}
@keyframes halo {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}

.ledger {
  position: absolute;
  left: 16px;
  top: 16px;
  width: min(330px, calc(100% - 32px));
  background: color-mix(in srgb, var(--dark) 94%, transparent);
  color: var(--on-dark);
  border-radius: 12px;
  padding: 12px 14px 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
.ledger-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--on-dark-2);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(238, 243, 248, 0.12);
}
.ledger-net {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--signal);
  white-space: nowrap;
  transition: color 0.4s;
}
.ledger-net i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ledger-net.online {
  color: var(--water-soft);
}
#ledger-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  min-height: 132px;
  font-family: var(--mono);
  font-size: 11.5px;
}
#ledger-list li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  animation: rowIn 0.5s var(--ease) both;
}
#ledger-list time {
  color: var(--on-dark-2);
}
.chip {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.chip.pending {
  color: #ffb08f;
}
.chip.synced {
  color: var(--water-soft);
}
@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.ledger-foot {
  margin: 6px 0 0;
  color: var(--on-dark-2);
  font-size: 10px;
  opacity: 0.7;
}

/* ---------- TICKER ---------- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 16px 0;
}
.ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 48s linear infinite;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  white-space: nowrap;
}
.ticker b {
  color: var(--route);
  font-size: 0.6em;
  align-self: center;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- SECTIONS ---------- */
section {
  padding: clamp(80px, 11vw, 160px) var(--gutter);
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 24px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-head .index {
  padding-top: 0.9em;
  color: var(--ink-3);
  border-top: 1.5px solid var(--ink);
  align-self: start;
}
.section-sub {
  grid-column: 2;
  max-width: 36rem;
  color: var(--on-dark-2);
  margin: 18px 0 0;
  font-size: 1.1rem;
}
.on-dark .index {
  color: var(--on-dark-2);
  border-color: var(--on-dark);
}

/* problem: one delivery, four transcriptions */
.copies {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  align-items: start;
  padding-bottom: 24px;
}
.copy {
  --r: 0deg;
  --y: 0px;
  margin: 0;
  position: relative;
  min-height: 200px;
  padding: 18px 18px 24px;
  border-radius: 5px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(13, 29, 75, 0.06),
    0 22px 40px -26px rgba(13, 29, 75, 0.5);
  rotate: var(--r);
  translate: 0 calc(var(--y) + 36px);
  opacity: 0;
  transition:
    translate 0.9s var(--ease),
    opacity 0.9s var(--ease),
    rotate 0.5s var(--ease);
}
.copy:nth-child(2) {
  transition-delay: 0.12s;
}
.copy:nth-child(3) {
  transition-delay: 0.24s;
}
.copy:nth-child(4) {
  transition-delay: 0.36s;
}
.copies.in .copy,
html:not(.js) .copy {
  translate: 0 var(--y);
  opacity: 1;
}
.copy:hover {
  rotate: 0deg;
  z-index: 2;
}
.copy figcaption {
  color: var(--ink-3);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
}
.copy-note {
  background-color: #fbf9f2;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 27px,
    rgba(74, 165, 226, 0.4) 27px 28px
  );
  background-position: 0 47px;
  background-size: 100% calc(100% - 60px);
  background-repeat: no-repeat;
}
.hand {
  font-family: 'Caveat', cursive;
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 28px;
  color: #22357a;
  margin: 0;
}
.copy-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}
.copy-sheet th,
.copy-sheet td {
  border: 1px solid #d3dbe6;
  padding: 6px;
  text-align: left;
  white-space: nowrap;
}
.copy-sheet th {
  background: #eef2f7;
  color: var(--ink-3);
  font-weight: 500;
}
.copy-sheet .dup td {
  background: color-mix(in srgb, var(--signal) 13%, #fff);
}
.copy-chat {
  background: #dfe8f0;
}
.bubble {
  background: #fff;
  margin: 0;
  padding: 10px 12px;
  border-radius: 3px 14px 14px 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 1px 0 rgba(13, 29, 75, 0.1);
}
.ticks {
  display: block;
  text-align: right;
  color: var(--ink-3);
  font-size: 0.66rem;
  margin-top: 6px;
}
.copy-report {
  border-top: 5px solid var(--ink);
}
.copy-report p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 2;
}
.copy-report mark {
  background: none;
  color: var(--signal);
  font-weight: 500;
  position: relative;
}
.copy-report mark::after {
  content: '';
  position: absolute;
  inset: -5px -9px;
  border: 2px solid var(--signal);
  border-radius: 50%;
  rotate: -5deg;
}
.flag {
  position: absolute;
  right: -10px;
  bottom: -13px;
  background: var(--signal);
  color: #fff;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.66rem;
  rotate: -4deg;
  box-shadow: 0 8px 18px -8px var(--signal);
}

.truth {
  margin-top: clamp(64px, 8vw, 104px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 22px;
  align-items: center;
  padding: 22px clamp(20px, 2.6vw, 32px);
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 999px;
}
.truth-badge {
  grid-row: span 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 5px solid var(--route);
  background: #fff var(--check) center / 24px no-repeat;
}
.truth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  font-size: 0.86rem;
}
.truth-row b {
  font-weight: 500;
  color: #fff;
}
.truth-row .ok {
  color: var(--water-soft);
}
.truth-note {
  margin: 0;
  color: var(--on-dark-2);
}

.stat-line {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.8vw, 3.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 1120px;
  margin: clamp(88px, 11vw, 150px) 0 0;
}
.stat-line .num {
  font-size: 1.9em;
  line-height: 0.8;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat-line .num.accent {
  color: var(--water);
}
.footnote {
  color: var(--ink-3);
  margin: 28px 0 0;
}

/* flow: the route band */
.flow {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.track {
  --cols: 4;
  --done: 100%;
  --rest: rgba(13, 29, 75, 0.1);
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 0 clamp(16px, 2.5vw, 36px);
  position: relative;
}
.track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 20px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--route) var(--done),
    var(--rest) var(--done)
  );
  transform-origin: left;
  scale: 0 1;
  transition: scale 1.6s var(--ease);
}
.track::after {
  content: '';
  position: absolute;
  left: 14px;
  width: calc(var(--done) - 28px);
  top: 22px;
  border-top: 2px dashed #fff;
  transform-origin: left;
  scale: 0 1;
  transition: scale 1.6s 0.2s var(--ease);
}
.track.in::before,
.track.in::after,
html:not(.js) .track::before,
html:not(.js) .track::after {
  scale: 1 1;
}
.track li {
  position: relative;
  padding-top: 72px;
}
.track .badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid var(--route);
  background: #fff var(--check) center / 20px no-repeat;
  scale: 0;
  transition: scale 0.5s var(--ease);
  transition-delay: calc(0.4s + var(--i, 0) * 0.28s);
}
.track.in .badge,
html:not(.js) .track .badge {
  scale: 1;
}
.track .step-n {
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.track h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  line-height: 1;
  margin: 10px 0 12px;
}
.track p {
  margin: 0;
  color: var(--ink-2);
  max-width: 30ch;
}

/* contingency demo */
.pana {
  margin-top: clamp(88px, 11vw, 150px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.pana-kicker {
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
}
.pana-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.pana-text {
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 34rem;
  min-height: 4.7em;
}
.lanes2 {
  display: grid;
  gap: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(18px, 2.6vw, 36px);
}
.lane2-name {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  color: var(--ink-2);
}
.lane2-track {
  position: relative;
}
.lane2-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 14px;
  translate: 0 -50%;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--route) var(--cut, 100%),
    rgba(13, 29, 75, 0.12) var(--cut, 100%)
  );
}
.lane2-track::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  translate: 0 -1px;
  border-top: 2px dashed #fff;
}
.broken .lane2-track::after {
  right: calc(100% - var(--cut, 100%));
}
.lane2-stops {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(8px, 1.4vw, 16px);
  min-height: 40px;
}
.s2 {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 500 0.66rem var(--mono);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  color: var(--ink);
}
.s2.done {
  background: #fff var(--check) center / 16px no-repeat;
  border: 4px solid var(--route);
  color: transparent;
}
.s2.moved {
  background: #fff;
  border-color: var(--signal);
}
.s2.pana-mark {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  animation: ping 2.2s infinite;
}
.lane2-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  color: var(--ink-3);
}
.lane2-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lg {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.lg.done {
  border: 3px solid var(--route);
}
.lg.moved {
  border-color: var(--signal);
}

/* offline demo */
.offline,
.status {
  background: var(--dark);
  color: var(--on-dark);
}
.offline em,
.status em,
.closing em {
  color: var(--water-soft);
}
.offline::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(238, 243, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 243, 248, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(80% 70% at 50% 60%, #000, transparent);
  pointer-events: none;
}
.demo {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
}
.phone {
  background: var(--paper);
  color: var(--ink);
  border-radius: 34px;
  padding: 20px 20px 24px;
  border: 8px solid #1d2c2a;
  box-shadow:
    0 0 0 1px rgba(238, 243, 248, 0.15),
    0 40px 80px -30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}
.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  margin-bottom: 28px;
}
.signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--signal);
  background: color-mix(in srgb, var(--signal) 10%, transparent);
  color: var(--signal);
  font: 600 11px var(--mono);
  cursor: pointer;
  transition: all 0.3s;
}
.signal[aria-pressed='true'] {
  border-color: var(--water);
  background: color-mix(in srgb, var(--water) 12%, transparent);
  color: var(--water);
}
.bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.bars i {
  width: 3px;
  background: currentColor;
  opacity: 0.25;
  border-radius: 1px;
  transition: opacity 0.3s;
}
.bars i:nth-child(1) {
  height: 4px;
}
.bars i:nth-child(2) {
  height: 6px;
}
.bars i:nth-child(3) {
  height: 9px;
}
.bars i:nth-child(4) {
  height: 12px;
}
.signal[aria-pressed='true'] .bars i {
  opacity: 1;
}
.phone-stop {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.phone-family {
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.02;
  margin: 8px 0 6px;
}
.phone-meta {
  color: var(--ink-2);
  margin: 0 0 auto;
  padding-bottom: 28px;
}
.btn-record {
  width: 100%;
  min-height: 60px;
  border-radius: 16px;
  background: var(--water);
  color: #fff;
  font-size: 1.1rem;
}
.btn-record:hover {
  background: #185a99;
  transform: translateY(-2px);
}
.btn-record:active {
  transform: scale(0.98);
}
.btn-record:disabled {
  background: var(--ink-3);
  cursor: default;
  transform: none;
}
.phone-hint {
  margin: 12px 0 0;
  font-size: 0.86rem;
  color: var(--ink-2);
  text-align: center;
}

.lanes {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  gap: 0;
  border: 1px solid rgba(238, 243, 248, 0.14);
  border-radius: 22px;
  background: rgba(238, 243, 248, 0.03);
  overflow: hidden;
}
.lane {
  padding: 22px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.lane-title {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-dark-2);
  margin: 0 0 16px;
}
.lane-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lane-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--dark-2);
  border: 1px solid rgba(238, 243, 248, 0.08);
  font-size: 0.95rem;
  animation: rowIn 0.45s var(--ease) both;
}
.lane-list li .mono {
  color: var(--on-dark-2);
}
.lane-list li.leaving {
  animation: rowOut 0.45s var(--ease) both;
}
@keyframes rowOut {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}
#outbox li {
  border-left: 3px solid var(--signal);
}
#server li {
  border-left: 3px solid var(--water-soft);
}
.lane-empty {
  color: var(--on-dark-2);
  opacity: 0.7;
  font-size: 0.92rem;
  margin: 0;
}
.lane-empty[hidden] {
  display: none;
}
.lane-arrow {
  border-inline: 1px dashed rgba(238, 243, 248, 0.14);
  display: grid;
  place-items: center;
  position: relative;
}
.lane-arrow span {
  writing-mode: vertical-rl;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--on-dark-2);
  transition: color 0.3s;
}
.lane-arrow.flowing span {
  color: var(--water-soft);
}
.lane-arrow.flowing::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 40px;
  background: linear-gradient(transparent, var(--water-soft));
  animation: drop 0.9s linear infinite;
}
@keyframes drop {
  from {
    top: -40px;
  }
  to {
    top: 100%;
  }
}
.demo-note {
  position: relative;
  color: var(--on-dark-2);
  max-width: 52rem;
  margin: 32px 0 0;
}

/* anatomy of a delivery */
.anat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) minmax(0, 1fr);
  gap: clamp(20px, 3.4vw, 56px);
  align-items: center;
}
.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(28px, 4vw, 56px);
}
.notes-l {
  text-align: right;
}
.notes li {
  cursor: default;
  outline-offset: 6px;
  transition: opacity 0.3s;
}
.notes .k {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--water);
  color: var(--water);
  margin-bottom: 10px;
  transition:
    background 0.3s,
    color 0.3s;
}
.notes h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2vw, 1.95rem);
  line-height: 1.05;
  margin: 0 0 6px;
}
.notes p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.97rem;
  max-width: 30ch;
}
.notes-l p {
  margin-left: auto;
}
.anat.focus .notes li:not(.lit) {
  opacity: 0.32;
}
.notes li.lit .k {
  background: var(--water);
  color: #fff;
}
.ticket {
  position: relative;
  background: #fff;
  padding: 26px 22px 20px;
  filter: drop-shadow(0 26px 30px rgba(13, 29, 75, 0.22));
}
.ticket::before,
.ticket::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
}
.ticket::before {
  top: -10px;
  background: conic-gradient(from 135deg at top, #fff 90deg, #0000 0) 0 0 / 16px
    10px repeat-x;
}
.ticket::after {
  bottom: -10px;
  background: conic-gradient(from -45deg at bottom, #fff 90deg, #0000 0) 0 0 /
    16px 10px repeat-x;
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-bottom: 14px;
  border-bottom: 1.5px dashed var(--line-strong);
}
.ticket dl {
  margin: 8px 0 0;
}
.ticket dl > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 8px 8px 8px 32px;
  position: relative;
  border-radius: 6px;
  transition: background 0.3s;
}
.ticket dt {
  color: var(--ink-3);
}
.ticket dd {
  margin: 0;
  text-align: right;
}
.ticket [data-k]::before {
  content: attr(data-k);
  position: absolute;
  left: 6px;
  top: 50%;
  translate: 0 -50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  color: var(--water);
  border: 1px solid currentColor;
}
.ticket .lit {
  background: color-mix(in srgb, var(--route) 18%, transparent);
}
.st {
  color: var(--water);
  font-weight: 500;
}
.ticket-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1.5px dashed var(--line-strong);
  color: var(--ink-3);
  text-align: center;
  font-size: 0.66rem;
}
.stack {
  text-align: center;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin: clamp(56px, 7vw, 96px) 0 0;
}

/* people */
.people {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  background: #3a96d6;
  color: var(--ink);
}
.people .display-sm {
  max-width: 16ch;
  font-size: clamp(2.4rem, 5.4vw, 5rem);
}
.people em {
  color: #fff;
}
.people-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.people-list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid rgba(13, 29, 75, 0.22);
  font-size: 1.08rem;
}
.people-list .mono {
  font-size: 1.4rem;
  font-weight: 500;
}

/* bounds: struck-through claims */
.strikes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.strikes li {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.4vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
}
.strikes s {
  text-decoration: none;
  position: relative;
}
.strikes s::after {
  content: '';
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  top: 54%;
  height: 0.07em;
  border-radius: 99px;
  background: var(--signal);
  transform-origin: left;
  scale: 0 1;
  transition: scale 0.7s var(--ease);
  transition-delay: calc(var(--d, 0s) + 0.45s);
}
.strikes .in s::after,
html:not(.js) .strikes s::after {
  scale: 1 1;
}
.strikes li.keep {
  color: var(--ink);
  border-bottom: 0;
  padding-top: 32px;
  display: flex;
  align-items: center;
  gap: 0.35em;
}
.strikes li.keep::before {
  content: '';
  flex: none;
  width: 0.78em;
  height: 0.78em;
  border-radius: 50%;
  border: 0.09em solid var(--route);
  background: #fff var(--check) center / 50% no-repeat;
}

/* status: the project's own route */
.track-status {
  --cols: 5;
  --done: calc(60% + 14px);
  --rest: rgba(238, 243, 248, 0.1);
}
.status .track h3 {
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  color: var(--on-dark);
}
.status .track p {
  color: var(--on-dark-2);
  font-size: 0.95rem;
}
.status .track .step-n {
  color: var(--water-soft);
}
.track-status .now .step-n {
  color: var(--signal);
}
.track-status .next .step-n {
  color: var(--on-dark-2);
}
.track-status .now .badge {
  border-color: var(--signal);
  background: var(--dark);
  animation: ping 2.2s infinite;
}
.track-status .next .badge {
  background: var(--dark);
  border: 3px dashed var(--on-dark-2);
}
.track-status .next h3,
.track-status .next p {
  opacity: 0.65;
}
.status-note {
  color: var(--on-dark-2);
  margin: 56px 0 0;
}

/* closing */
.closing {
  background: var(--dark);
  color: var(--on-dark);
  text-align: center;
  padding-top: 40px;
  padding-bottom: clamp(100px, 12vw, 180px);
  border-top: 1px solid rgba(238, 243, 248, 0.1);
  overflow: hidden;
}
.closing::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 120vw;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--route) 42%, transparent),
    transparent
  );
  pointer-events: none;
}
.closing > * {
  position: relative;
}
.closing .logo {
  height: clamp(56px, 9vw, 104px);
  margin: 72px auto 40px;
  color: var(--on-dark);
}
.closing .display {
  margin-bottom: 48px;
}
.closing .btn-primary {
  background: var(--paper);
  color: var(--ink);
}
.closing .btn-primary:hover {
  background: var(--water-soft);
  color: var(--dark);
}

/* footer: the day's closing receipt */
.foot {
  background: var(--dark);
  padding: 0 var(--gutter) clamp(56px, 7vw, 96px);
}
.foot-slot {
  max-width: 920px;
  height: 12px;
  margin: 0 auto;
  border-radius: 99px;
  background: #040a1f;
  box-shadow:
    inset 0 3px 4px rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(238, 243, 248, 0.08);
}
.foot-paper {
  max-width: 880px;
  margin: -6px auto 0;
  overflow: hidden;
  padding-bottom: 12px;
}
.js .foot-paper.reveal {
  opacity: 1;
  transform: none;
}
.foot-ticket {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 30px clamp(20px, 3vw, 40px) 22px;
  translate: 0 -102%;
  transition: translate 2.2s cubic-bezier(0.5, 0, 0.2, 1);
}
.foot-paper.in .foot-ticket,
html:not(.js) .foot-ticket {
  translate: 0 0;
}
.foot-ticket::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: conic-gradient(from -45deg at bottom, var(--paper) 90deg, #0000 0)
    0 0 / 16px 10px repeat-x;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-bottom: 18px;
  border-bottom: 1.5px dashed var(--line-strong);
}
.foot-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.foot-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  color: var(--ink-2);
}
.foot-sum b {
  color: var(--ink);
}
.foot-sum .ok {
  color: var(--water);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1.5px dashed var(--line-strong);
}
.foot-grid nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.foot-grid a {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.25;
  padding: 2px 0;
  background: linear-gradient(var(--route), var(--route)) left 88% / 0 2px
    no-repeat;
  transition: background-size 0.35s var(--ease);
}
.foot-grid a:hover {
  background-size: 100% 2px;
}
.foot-grid p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.8;
}
.barcode {
  height: 46px;
  margin: 22px 0 10px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--ink) 0 2px,
      transparent 2px 5px,
      var(--ink) 5px 6px,
      transparent 6px 10px
    ),
    repeating-linear-gradient(90deg, transparent 0 13px, var(--paper) 13px 17px);
  background-blend-mode: normal;
}
.foot-legal {
  margin: 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

/* ---------- REVEAL ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .copies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
  }
  .pana {
    grid-template-columns: 1fr;
  }
  .anat {
    grid-template-columns: 1fr 1fr;
  }
  .ticket {
    grid-column: 1 / -1;
    order: -1;
    width: min(440px, 100%);
    margin: 0 auto 32px;
  }
  .notes-l {
    text-align: left;
  }
  .notes-l p {
    margin-left: 0;
  }
  .track-status {
    --cols: 1;
  }
  .demo {
    grid-template-columns: 1fr;
  }
  .phone {
    max-width: 380px;
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 1080px) {
  .track-status {
    gap: 0;
  }
  .track-status::before {
    left: 13px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 20px;
    height: auto;
    transform-origin: top;
    scale: 1 0;
    background: linear-gradient(
      180deg,
      var(--route) var(--done-v),
      var(--rest) var(--done-v)
    );
  }
  .track-status::after {
    left: 22px;
    top: 14px;
    width: 0;
    height: calc(var(--done-v) - 14px);
    border-top: 0;
    border-left: 2px dashed #fff;
    transform-origin: top;
    scale: 1 0;
  }
  .track-status li {
    padding: 0 0 40px 72px;
  }
  .track-status {
    --done-v: 62%;
  }
}

@media (max-width: 760px) {
  .nav nav,
  .coords {
    display: none;
  }
  .section-head {
    grid-template-columns: 1fr;
  }
  .section-head .index {
    width: 64px;
  }
  .section-sub {
    grid-column: 1;
  }
  .people {
    grid-template-columns: 1fr;
  }
  .copies {
    grid-template-columns: 1fr;
    gap: 52px;
  }
  .copy {
    --y: 0px;
    width: 88%;
    min-height: 0;
  }
  .copy:has(.flag) {
    z-index: 1;
  }
  .flag {
    right: 12px;
  }
  .copy:nth-child(even) {
    margin-left: auto;
  }
  .truth {
    border-radius: 24px;
  }
  .track {
    --cols: 1;
    gap: 0;
  }
  .track::before {
    left: 13px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 20px;
    height: auto;
    transform-origin: top;
    scale: 1 0;
    background: var(--route);
  }
  .track::after {
    left: 22px;
    top: 14px;
    width: 0;
    height: calc(100% - 28px);
    border-top: 0;
    border-left: 2px dashed #fff;
    transform-origin: top;
    scale: 1 0;
  }
  .track li {
    padding: 0 0 40px 72px;
  }
  .track-status::before {
    background: linear-gradient(
      180deg,
      var(--route) var(--done-v),
      var(--rest) var(--done-v)
    );
  }
  .track-status::after {
    height: calc(var(--done-v) - 14px);
  }
  .s2 {
    width: 32px;
    height: 32px;
  }
  .lane2-stops {
    gap: 7px;
    min-height: 32px;
  }
  .anat {
    grid-template-columns: 1fr;
  }
  .lanes {
    grid-template-columns: 1fr;
  }
  .lane {
    min-height: 0;
  }
  .lane-arrow {
    border-inline: 0;
    border-block: 1px dashed rgba(238, 243, 248, 0.14);
    min-height: 56px;
  }
  .lane-arrow span {
    writing-mode: horizontal-tb;
  }
  .ledger {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: 0;
    border-radius: 0;
  }
  .hero-map {
    aspect-ratio: auto;
  }
  #map {
    aspect-ratio: 800 / 640;
    height: auto;
  }
  .people-list li {
    grid-template-columns: 72px 1fr;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-grid nav {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .ticker-track {
    animation: none;
  }
}
