/* The Long Way Round — shared styles. Decks may add their own scoped CSS (inject a <style> in render, prefix with the slide's class). */
:root {
  --bg: #0b0f1d;
  --bg2: #121833;
  --panel: #161d3a;
  --panel2: #1d2648;
  --line: #2b3563;
  --ink: #ece9e1;
  --dim: #9aa3c7;
  --faint: #5b6592;
  --accent: #f4f1ea;
  --good: #7be495;
  --bad: #ff6b6b;
  --warn: #ffcf5c;
  --l1: #ff8a5b; --l2: #ffcf5c; --l3: #7be495; --l4: #55d6f6; --l7: #c39bff; --app: #ff6fae; --rails: #ff5252;
  --pkt-stamp: var(--accent); --paper: #f4f1ea; --paper2: #d9d3c3; --night: #070a14; --stamp: var(--accent);
  --gx: 78%; --gy: -10%;              /* where the accent glow sits: rises as you climb the layers (set per [data-layer]) */
  --tx: 0px; --ty: 0px;               /* survey-map drift, set by engine.js as you travel */
  --press: 0 3px 0 color-mix(in oklab, var(--accent) 45%, #000);   /* tactile hard-edge button shadow */
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --body: 'Figtree', 'Avenir Next', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--night); }
html, body { margin: 0; height: 100%; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { background: transparent; }
/* THE NIGHT SURVEY: 1) contour map that drifts as you travel  2) glow that climbs with the layer  3) registration crosses  4) film grain */
html::before { content: ''; position: fixed; inset: -12%; z-index: 0; pointer-events: none;
  background: url(assets/contours.svg) center / cover no-repeat; opacity: .16;
  transform: translate(var(--tx), var(--ty)); transition: transform 1.4s cubic-bezier(.3,.7,.2,1);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 78%); }
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 700px at var(--gx) var(--gy), color-mix(in oklab, var(--accent) 17%, transparent), transparent 62%),
    radial-gradient(900px 600px at -10% 110%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88'%3E%3Cpath d='M44 40v8M40 44h8' stroke='%239aa3c7' stroke-width='1' opacity='.32'/%3E%3C/svg%3E") 0 0 / 88px 88px;
  transition: background-position 1s;
}
body::after { content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-layer=""] { --pkt-stamp: var(--app); }
[data-layer=l1] { --gx: 50%; --gy: 108%; } [data-layer=l2] { --gx: 30%; --gy: 88%; } [data-layer=l3] { --gx: 70%; --gy: 66%; }
[data-layer=l4] { --gx: 30%; --gy: 44%; } [data-layer=l7] { --gx: 70%; --gy: 22%; } [data-layer=app] { --gx: 50%; --gy: -8%; }
#app { position: relative; z-index: 1; height: 100vh; display: grid; grid-template-rows: 48px 1fr 62px; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }

/* ---------- chrome ---------- */
#top { display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px dashed color-mix(in oklab, var(--line) 90%, transparent); position: relative; } /* a tear-off line */
.chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .04em; }
.chip:hover { color: var(--ink); border-color: var(--accent); }
.chip#btn-map { border-radius: 8px; color: var(--ink); background: color-mix(in oklab, var(--panel) 80%, transparent); }
.chip.ghost { border-color: transparent; text-decoration: underline; }
#crumb { flex: 1; font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; gap: 12px; align-items: baseline; }
#crumb b { color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.postmark { --c: var(--accent); flex: none; align-self: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--c); color: var(--c); display: grid; place-items: center; font: 700 10px/1 var(--mono); letter-spacing: 0; position: relative; transform: rotate(-9deg); opacity: .95; }
.postmark::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 1px dotted var(--c); opacity: .7; }
.postmark::after { content: ''; position: absolute; left: 100%; top: 50%; width: 22px; height: 12px; margin-top: -6px; margin-left: 2px; opacity: .45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12' fill='none' stroke='%23fff' stroke-width='1.2'%3E%3Cpath d='M0 2q3-3 5 0t5 0 5 0 5 0M0 6q3-3 5 0t5 0 5 0 5 0M0 10q3-3 5 0t5 0 5 0 5 0'/%3E%3C/svg%3E") 0 0 / 22px 12px; }
.postmark.thunk { animation: thunk .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes thunk { 0% { transform: rotate(-9deg) scale(1.9); opacity: 0; } 60% { transform: rotate(-9deg) scale(.92); opacity: 1; } 100% { transform: rotate(-9deg) scale(1); } }
#crumb .postmark + b { margin-left: 26px; }
#layerkey { display: flex; gap: 4px; cursor: pointer; }
#layerkey i { font-style: normal; font-family: var(--mono); font-size: 10px; padding: 3px 7px; border-radius: 4px; color: var(--c); border: 1px solid color-mix(in oklab, var(--c) 35%, transparent); opacity: .45; transition: .2s; }
#layerkey i.on { background: var(--c); color: #0b0f1d; opacity: 1; font-weight: 700; }

#stage { position: relative; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#stage { display: flex; flex-direction: column; }
#streak { position: absolute; left: 0; top: 0; height: 2px; width: 100%; z-index: 5; pointer-events: none; background: linear-gradient(90deg, transparent, var(--accent) 70%, #fff); box-shadow: 0 0 14px var(--accent); transform: translateX(-101%); opacity: 0; }
#streak.go { animation: streak .9s cubic-bezier(.5,0,.2,1); }
@keyframes streak { 0% { transform: translateX(-101%); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(101%); opacity: 0; } }
#slide { flex: 1; display: flex; flex-direction: column; min-height: min-content; }
.slide { flex: 1; padding: 4vh 6vw 3vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.slide.enter { animation: enter .5s cubic-bezier(.2,.8,.2,1) both; }
.slide.enter.back { animation-name: enter-back; }
.slide.enter.deck { animation: enter-deck .8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateX(34px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-34px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes enter-deck { 0% { opacity: 0; transform: translateY(26px) scale(.975); filter: blur(8px); } 100% { opacity: 1; transform: none; filter: none; } }
.err { color: var(--bad); font-family: var(--mono); }

#bar { position: relative; display: flex; align-items: center; justify-content: center; gap: 22px; border-top: 1px dotted color-mix(in oklab, var(--faint) 80%, transparent); background: color-mix(in oklab, var(--night) 70%, transparent); backdrop-filter: blur(6px); }
/* the road: dots are mile-posts on a dashed track; the packet walks to the current one */
#dots { position: relative; display: flex; align-items: center; gap: 14px; padding: 0 8px; --pos: 0px; }
#dots::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 2px dashed color-mix(in oklab, var(--faint) 70%, transparent); transform: translateY(-1px); }
#dots::after { content: ''; position: absolute; left: 0; top: 50%; height: 2px; width: var(--pos); background: var(--accent); opacity: .75; transform: translateY(-1px); transition: width .5s cubic-bezier(.3,.8,.3,1); border-radius: 2px; }
.dot { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--faint); background: var(--bg); padding: 0; transition: .2s; opacity: .6; cursor: default; }
.dot.reach { opacity: 1; cursor: pointer; border-color: var(--dim); }
.dot.reach:hover { transform: scale(1.3); border-color: var(--accent); }
.dot.seen { background: var(--accent); border-color: var(--accent); }
.dot.now { background: var(--accent); border-color: var(--accent); opacity: 1; }
#walker { position: absolute; z-index: 2; left: 0; top: 50%; margin: -24px 0 0 -18px; pointer-events: none; transition: left .5s cubic-bezier(.3,.9,.3,1); filter: drop-shadow(0 3px 5px #0009); }
#walker .pkt { --stamp: var(--accent); }
#gate-hint { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-left: 12px; }
#gate-hint.pulse { animation: pulse .6s; }
@keyframes pulse { 30% { transform: translateX(6px); } 60% { transform: translateX(-3px); } }
.nav { width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 18px; transition: .12s; box-shadow: 0 2px 0 #0008; }
.nav:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.nav:disabled { opacity: .25; cursor: default; }
#next:not(.gated):not(.last) { background: var(--accent); color: #0b0f1d; border-color: var(--accent); box-shadow: var(--press); }
#next:not(.gated):not(.last):active { transform: translateY(3px); box-shadow: none; }
#next.gated { opacity: .35; border-style: dashed; }
#next.shake { animation: pulse .5s; }

/* ---------- type ---------- */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.kicker::before { content: '\25C6'; font-size: .62em; margin-right: .9em; vertical-align: .12em; opacity: .85; }  /* a mile-post */
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.02; letter-spacing: -.02em; font-weight: 800; }
h1.hero { font-size: clamp(44px, 8vw, 104px); }
h2 { font-size: clamp(30px, 4.4vw, 56px); }
/* the signature pairing: a heavy grotesque, then one italic serif phrase. Any .acc / em inside a headline picks it up. */
h1 .acc, h2 .acc, h3 .acc, h1 em, h2 em, h1 i, h2 i, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: -.005em; }
h1 .acc, h2 .acc { color: var(--accent); }
h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em; }
.prose { max-width: 40em; font-size: clamp(17px, 1.5vw, 21px); color: color-mix(in oklab, var(--ink) 92%, var(--bg)); }
.prose p { margin: 0 0 .8em; }
.prose.center { text-align: center; }
.lede { font-size: clamp(20px, 2.2vw, 30px); font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1.25; max-width: 30em; letter-spacing: -.01em; }
.dim { color: var(--dim); }
.acc { color: var(--accent); }
.mono { font-family: var(--mono); font-size: .88em; }
b, strong { font-weight: 600; }
code, .code { font-family: var(--mono); font-size: .86em; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre.code { padding: 14px 16px; line-height: 1.55; overflow: auto; border-radius: 10px; margin: 0; white-space: pre; }
.kw { color: var(--l7); } .str { color: #e8c3a4; } .num { color: var(--l1); } .cm { color: var(--faint); } .fn { color: var(--l4); }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.col { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); gap: 4vw; align-items: center; width: min(1200px, 100%); }
.split.even { grid-template-columns: 1fr 1fr; }
.split .prose { max-width: none; }
.wide { width: min(1200px, 100%); }
.center { text-align: center; }

/* Demo stage: fixed size so it never jumps as content changes. Override with inline style if you must, but keep it constant within a slide. */
.demo { position: relative; width: min(100%, 940px); height: min(54vh, 470px); background: linear-gradient(180deg, color-mix(in oklab, var(--panel) 92%, transparent), color-mix(in oklab, var(--bg2) 92%, transparent)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -30px #000a, inset 0 1px 0 color-mix(in oklab, var(--accent) 35%, #fff1); }
/* survey-sheet corner marks + a whisper of paper grain */
.demo::before { content: ''; position: absolute; inset: 9px; z-index: 3; pointer-events: none; opacity: .55;
  --m: color-mix(in oklab, var(--accent) 70%, var(--dim));
  background:
    linear-gradient(var(--m), var(--m)) 0 0 / 12px 1px, linear-gradient(var(--m), var(--m)) 0 0 / 1px 12px,
    linear-gradient(var(--m), var(--m)) 100% 0 / 12px 1px, linear-gradient(var(--m), var(--m)) 100% 0 / 1px 12px,
    linear-gradient(var(--m), var(--m)) 0 100% / 12px 1px, linear-gradient(var(--m), var(--m)) 0 100% / 1px 12px,
    linear-gradient(var(--m), var(--m)) 100% 100% / 12px 1px, linear-gradient(var(--m), var(--m)) 100% 100% / 1px 12px;
  background-repeat: no-repeat; }
.demo.tall { height: min(62vh, 560px); }
.demo.short { height: min(38vh, 320px); }
.demo svg { width: 100%; height: 100%; display: block; }
.caption { font-family: var(--mono); font-size: 13px; color: var(--dim); text-align: center; max-width: 60em; min-height: 3em; }
.caption b { color: var(--accent); }

/* controls */
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; font-weight: 500; transition: .12s; box-shadow: 0 2px 0 #0009; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.accent { background: var(--accent); color: #0b0f1d; border-color: var(--accent); font-weight: 600; box-shadow: var(--press); }
.btn.accent:active { transform: translateY(3px); box-shadow: none; }
.btn.big { font-size: 20px; padding: 14px 26px; border-radius: 14px; font-family: var(--display); font-weight: 600; }
.btn:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 7px 14px; color: var(--dim); font-size: 14px; }
.seg button.on { background: var(--accent); color: #0b0f1d; font-weight: 600; }
label.ctl { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--line); outline: none; width: 200px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
input[type=text], input[type=number], textarea, select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-family: var(--mono); font-size: 14px; padding: 8px 10px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.callout { border-left: 3px solid var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); padding: 10px 16px; border-radius: 0 10px 10px 0; max-width: 40em; }
.callout.warn { --accent: var(--warn); }

/* the fork: an in-slide door to a side path */
.door { display: inline-flex; align-items: flex-start; gap: 10px; text-decoration: none; color: var(--ink); border: 1px dashed color-mix(in oklab, var(--accent) 70%, transparent); border-radius: 12px; padding: 9px 14px; background: color-mix(in oklab, var(--accent) 6%, transparent); transition: .18s; cursor: pointer; text-align: left; max-width: 28em; }
.door:hover { background: color-mix(in oklab, var(--accent) 16%, transparent); transform: translateY(-2px); border-style: solid; }
.door-ico { font-family: var(--mono); color: var(--accent); font-size: 18px; line-height: 1.1; }
.door-txt { display: flex; flex-direction: column; font-weight: 500; }
.door-txt small { font-weight: 400; color: var(--dim); font-size: 13px; }
.doors { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* layer chips used in prose/diagrams */
.L1 { --c: var(--l1); } .L2 { --c: var(--l2); } .L3 { --c: var(--l3); } .L4 { --c: var(--l4); } .L7 { --c: var(--l7); } .LA { --c: var(--app); }
.lchip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: color-mix(in oklab, var(--c) 22%, transparent); color: var(--c); border: 1px solid var(--c); font-family: var(--mono); font-size: .8em; white-space: nowrap; }

/* ---------- the packet (see mascot.js) ---------- */
.pkt { display: inline-block; line-height: 0; vertical-align: middle; flex: none; }
.pkt svg, .pkt-g { overflow: visible; }
.pkt-blink { transform-box: fill-box; transform-origin: 50% 55%; animation: pkt-blink 5.5s infinite; animation-delay: var(--d, 0s); }
@keyframes pkt-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.pkt.flip svg { transform: scaleX(-1); }
.pkt.bob svg { animation: pkt-bob 2.4s ease-in-out infinite; }
@keyframes pkt-bob { 50% { transform: translateY(-3px) rotate(1.5deg); } }
.pkt .pkt-foot, .pkt-g .pkt-foot { transform-box: fill-box; transform-origin: 50% 0; }
.pkt.walk .pkt-foot.a, .pkt-g.walk .pkt-foot.a { animation: pkt-step .34s ease-in-out infinite; }
.pkt.walk .pkt-foot.b, .pkt-g.walk .pkt-foot.b { animation: pkt-step .34s ease-in-out infinite reverse; }
@keyframes pkt-step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px) scaleY(.75); } }
.pkt.hop svg { animation: pkt-hop .55s cubic-bezier(.3,1.5,.5,1); }
@keyframes pkt-hop { 0% { transform: none; } 35% { transform: translateY(-10px) scale(.94, 1.08); } 70% { transform: translateY(0) scale(1.08, .9); } 100% { transform: none; } }

/* ---------- outro ---------- */
.outro-pkt { align-self: center; margin-bottom: -6px; }
.outro-pkt .pkt svg { animation: pkt-hop .8s .25s cubic-bezier(.3,1.5,.5,1) both; }
.outro { text-align: left; }
.outro { width: min(980px, 100%); display: flex; flex-direction: column; gap: 22px; }
.outro-h { font-size: clamp(30px, 4vw, 52px); }
.outro > .kicker { display: flex; align-items: center; }
.outro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.pathcard { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; color: var(--ink); cursor: pointer; transition: .18s; position: relative; }
.pathcard b { font-family: var(--display); font-size: 21px; }
.pathcard span { color: var(--dim); font-size: 14.5px; }
.pathcard i { position: absolute; top: 12px; right: 14px; font-family: var(--mono); font-size: 10px; color: var(--good); font-style: normal; }
.pathcard { --notch: 9px; -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat; }  /* a ticket, punched at both sides */
.pathcard:hover { transform: translateY(-3px); border-color: var(--accent); }
.pathcard.primary { background: var(--accent); color: #0b0f1d; border-color: var(--accent); grid-column: 1 / -1; }
.pathcard.primary span { color: #0b0f1dcc; }

/* ---------- map: the night survey ---------- */
#map { position: fixed; inset: 0; z-index: 50; background: color-mix(in oklab, var(--night) 93%, transparent); backdrop-filter: blur(10px); overflow: auto; }
#map::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: url(assets/contours.svg) center / cover no-repeat; opacity: .3; }
.map-in { position: relative; padding: 34px 5vw 60px; max-width: 1500px; margin: 0 auto; }
.map-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.map-head h2 { font-size: 42px; } .map-head h2 i { font-family: var(--serif); font-weight: 400; font-size: 1.12em; color: var(--accent); }
.map-head p { color: var(--dim); margin: 0; flex: 1; min-width: 260px; }
.map-legend { display: flex; gap: 18px; font: 11px var(--mono); color: var(--dim); margin: -14px 0 22px; flex-wrap: wrap; }
.map-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; border: 1.5px solid var(--faint); }
.map-legend .l-done::before { background: var(--ink); border-color: var(--ink); } .map-legend .l-part::before { background: conic-gradient(var(--ink) 40%, var(--line) 0); border: 0; }
.road { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 30px 18px; position: relative; }
.stop { position: relative; display: flex; flex-direction: column; gap: 8px; }
.stopnum { font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: .14em; display: flex; align-items: center; gap: 8px; }
.stopnum::before { content: 'MILE'; color: var(--faint); }
.stopnum::after { content: ''; flex: 1; border-top: 2px dashed color-mix(in oklab, var(--faint) 60%, transparent); } /* the road between stops */
.mnode { --notch: 8px; position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 12px 44px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in oklab, var(--panel) 92%, transparent); cursor: pointer; text-decoration: none; color: var(--ink); transition: .15s;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat; }
.mnode:hover { border-color: var(--c); transform: translateY(-2px); background: color-mix(in oklab, var(--c) 10%, var(--panel)); }
.mnode b { font-family: var(--display); font-size: 17px; line-height: 1.1; }
.mnode small { color: var(--dim); font-size: 12px; line-height: 1.3; }
.mnode .ring { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--c) var(--f), var(--line) 0); }
.mnode .ring::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--panel); }
.mnode.done .ring::after { background: var(--c); }
.mnode.done::after { content: 'delivered'; position: absolute; right: 12px; bottom: 9px; background: color-mix(in oklab, var(--panel) 92%, transparent); font: 700 8.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c); border: 1.5px double var(--c); border-radius: 4px; padding: 3px 5px; transform: rotate(-7deg); opacity: .75; }
.mnode.done small { padding-right: 64px; }
.mnode.here { -webkit-mask: none; mask: none; border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in oklab, var(--c) 40%, transparent), 0 0 30px -6px var(--c); padding-top: 26px; }
.mnode.here .mp { position: absolute; right: 10px; top: -20px; pointer-events: none; }
.mnode em { font-family: var(--mono); font-size: 10px; color: var(--c); font-style: normal; text-transform: uppercase; letter-spacing: .1em; }
.mnode.side { margin-left: 22px; padding: 8px 12px 8px 40px; background: transparent; border-style: dashed; -webkit-mask: none; mask: none; }
.mnode.side .ring { left: 12px; top: 9px; width: 18px; height: 18px; }
.mnode.side.done::after { display: none; }
.mnode.side b { font-size: 14px; }
.mnode.side small { display: none; }
.mnode.soon { opacity: .4; }
/* side paths = a branch line with sleepers */
.branches { display: flex; flex-direction: column; gap: 6px; margin-left: 8px; padding-left: 0; position: relative; }
.branches::before { content: ''; position: absolute; left: 0; top: -6px; bottom: 14px; border-left: 2px dashed color-mix(in oklab, var(--faint) 70%, transparent); }
.map-foot { margin-top: 30px; }

@media (max-width: 800px) {
  .split, .split.even { grid-template-columns: 1fr; }
  #layerkey { display: none; }
}

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