/* Snailposting: one scene. The road is the page. */
:root {
  --ink: #14303A;
  --cream: #FBF3D5;
  --yellow: #F5B800;
  --orange: #F68A00;
  --red: #E2523A;
  --green: #1F6B55;
  --grass: #2E8B6B;
  --brown: #6B4423;
  --soil: #33262C;
  --path: #D8B56F;
  --ug: clamp(196px, 31vh, 250px);          /* height of the ground below the road */
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --text: "Averia Serif Libre", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--soil);
  color: var(--cream);
  font-family: var(--text);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
h1, h2, p, ol, dl, dd { margin: 0; padding: 0; }
ol { list-style: none; }
img, svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--cream); }

/* ---------- stage ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 540px;
  overflow: hidden;
  overflow: clip;
  background: #DDEFE4;
  touch-action: pan-y;
  cursor: grab;
}
.stage.dragging { cursor: grabbing; }
.stage.dragging * { user-select: none; -webkit-user-select: none; }

.sky, .world, .flights { position: absolute; inset: 0; }
.sky { z-index: 1; pointer-events: none; }
.world { z-index: 5; will-change: transform; }
.world > * { position: absolute; bottom: var(--ug); }
.earth { z-index: 10; }
.world.front { z-index: 12; pointer-events: none; }
.snail { z-index: 14; }
.flights { z-index: 16; pointer-events: none; }
.gantry, .cam { z-index: 30; }

/* sky furniture */
.disc {
  position: absolute; top: 0; right: 11%;
  width: clamp(110px, 24vmin, 230px); aspect-ratio: 1;
  border-radius: 50%; background: #FFF6D8;
  will-change: transform;
}
.stars { position: absolute; inset: 0 0 var(--ug); opacity: 0; }
.stars i { position: absolute; width: 5px; height: 5px; background: var(--cream); border-radius: 50%; }
.stars i:nth-child(3n) { width: 3px; height: 3px; }

.globe {
  position: absolute; left: 9%; top: 34%;
  width: clamp(90px, 22vmin, 210px); aspect-ratio: 1;
  opacity: 0; will-change: transform, opacity; transform-origin: 50% 50%;
}
.globe svg { width: 100%; height: 100%; }
.warp { position: absolute; inset: 0 0 var(--ug); opacity: 0; overflow: hidden; }
.warp i { position: absolute; right: -280px; height: 3px; background: var(--cream); border-radius: 2px; opacity: .8; animation: warp 1s linear infinite; }
.warp i:nth-child(3n) { background: #F5B800; height: 4px; }
.warp i:nth-child(4n) { background: #8A56D8; }
.warp i:nth-child(5n) { background: #3E8FE0; height: 2px; }
@keyframes warp { from { transform: translateX(0); } to { transform: translateX(calc(-100vw - 560px)); } }

.cloud { position: absolute; left: 0; will-change: transform; }
.cloud i { display: block; height: 20px; border-radius: 10px; background: #FFFDF2; margin-bottom: 5px; opacity: .9; }

.hills { position: absolute; left: 0; bottom: var(--ug); background-repeat: repeat-x; background-position: 0 100%; will-change: transform; }
.hills.far {
  height: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='220'%3E%3Cpath d='M0 150C120 150 220 50 380 50s220 80 380 80c140 0 200-50 300-50 80 0 100 70 140 70v70H0z' fill='%2314303A' fill-opacity='.13'/%3E%3C/svg%3E");
}
.hills.near {
  height: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='160'%3E%3Cpath d='M0 110c90 0 150-70 280-70 140 0 190 60 320 60 120 0 160-40 220-40 50 0 60 50 80 50v50H0z' fill='%2314303A' fill-opacity='.2'/%3E%3C/svg%3E");
}

/* ---------- things on the road ---------- */
.decor { left: 0; width: 0; height: 0; }
.decor svg { position: absolute; bottom: 0; }

.verge {
  height: 18px; margin-bottom: -1px;
  background: repeat-x 0 0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18'%3E%3Cpath d='M0 18V8l5-8 4 8 6-5 5 5 5-7 5 7 6-4 4 4 4-6 4 6v10z' fill='%232E8B6B'/%3E%3C/svg%3E");
}

.stops { left: 0; width: 0; height: 0; }
.stop { position: absolute; bottom: 0; width: 0; height: 0; }
.stop .art { position: absolute; left: 0; bottom: 0; }
.stop .art svg { position: absolute; bottom: 0; }
.stop .art .bitten { visibility: hidden; }
.stop.reached .art .bitten { visibility: visible; }
.stop.reached .art .fresh { visibility: hidden; }

.marker { position: absolute; left: -3px; bottom: 0; width: 6px; background: var(--ink); }
.plate {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%) rotate(-1.5deg);
  font-family: var(--display); text-transform: uppercase; text-align: center; white-space: nowrap; line-height: 1;
}
.stop:nth-child(even) .plate { transform: translateX(-50%) rotate(1.2deg); }
.plate b {
  display: block; padding: 5px 12px 3px;
  background: var(--green); color: var(--cream);
  border: 3px solid var(--cream); outline: 3px solid var(--green);
  border-radius: 6px;
  font-weight: 900; font-size: 34px; letter-spacing: .01em;
}
.plate span {
  display: inline-block; margin-top: 7px; padding: 3px 9px 2px;
  background: var(--yellow); color: var(--ink);
  font-weight: 900; font-size: 17px; letter-spacing: .06em;
}
.stop.goal .plate b { background: var(--yellow); color: var(--ink); border-color: var(--ink); outline-color: var(--yellow); }
.stop.goal .plate span { background: var(--ink); color: var(--yellow); }
/* out in space the sky is dark: the posts go pale so they still read. The plates stay road-sign green. */
.stop.space .marker, .stop.space .marker::before { background: #FBF3D5; }
.pennant {
  position: absolute; left: 6px; top: -34px; width: 44px; height: 28px;
  background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform-origin: 0 50%; transform: scaleX(0);
  transition: transform .5s cubic-bezier(.3, 1.8, .5, 1);
}
.marker::before { content: ""; position: absolute; left: 0; top: -40px; width: 6px; height: 40px; background: var(--ink); transform-origin: 50% 100%; transform: scaleY(0); transition: transform .3s; }
.stop.reached .pennant { transform: scaleX(1); transition-delay: .25s; }
.stop.reached .marker::before { transform: scaleY(1); }

/* the brown one: where it started */
.lore {
  margin-bottom: 58px;
  padding: 16px 20px 18px;
  background: var(--brown); color: var(--cream);
  border: 3px solid var(--cream); outline: 4px solid var(--brown);
  border-radius: 8px;
  font-size: 16px; line-height: 1.38;
  transform: rotate(-.8deg);
  cursor: auto;
}
.lore::before, .lore::after { content: ""; position: absolute; top: 100%; width: 8px; height: 72px; background: var(--ink); z-index: -1; }
.lore::before { left: 18%; } .lore::after { right: 18%; }
.lore h2 { font-family: var(--display); font-weight: 900; font-size: 44px; line-height: .9; text-transform: uppercase; margin-bottom: 10px; }
.lore h2 span { font-size: 20px; font-weight: 700; letter-spacing: .06em; margin-left: 6px; color: #F1D9A8; }
.lore p + p { margin-top: 7px; }
.lore .quote { font-style: italic; font-size: 19px; line-height: 1.25; color: #FFE9A6; }
.lore a {
  display: inline-block; margin-top: 12px;
  font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--cream); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px;
}
.lore a::after { content: " \2197"; }
.lore a:hover { color: var(--yellow); }

.onward { width: 8px; height: 150px; background: var(--ink); }
.onward span {
  position: absolute; top: 0; left: -14px;
  padding: 8px 40px 6px 16px;
  background: var(--green); color: var(--cream);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%);
  font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; white-space: nowrap; letter-spacing: .03em;
}

/* slime */
.trail-clip { position: absolute; bottom: calc(var(--ug) - 15px); height: 16px; overflow: hidden; }
.trail-clip { visibility: hidden; }
.has-trail .trail-clip { visibility: visible; }
.has-rainbow .trail-clip { height: 30px; }
.has-rainbow .trail { opacity: 1; background: repeat-x 0 0 / 120px 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 42' preserveAspectRatio='none'%3E%3Cg id='a'%3E%3Cpath fill='%23E2523A' d='M0 0h70v6H0z'/%3E%3Cpath fill='%23F68A00' d='M0 6h70v6H0z'/%3E%3Cpath fill='%23F5D800' d='M0 12h70v6H0z'/%3E%3Cpath fill='%234FBF5A' d='M0 18h70v6H0z'/%3E%3Cpath fill='%233E8FE0' d='M0 24h70v6H0z'/%3E%3Cpath fill='%238A56D8' d='M0 30h70v6H0z'/%3E%3C/g%3E%3Cuse href='%23a' x='70' y='6'/%3E%3C/svg%3E"); }
.trail { height: 100%; background: repeating-linear-gradient(90deg, #F1FADB 0 52px, #FFFFFF 52px 70px, #F1FADB 70px 96px); opacity: .92; }

/* ---------- the snail ---------- */
.snail {
  position: absolute; left: 0; bottom: calc(var(--ug) - 14px);
  aspect-ratio: 1074 / 920;
  transform-origin: 0 100%;
  will-change: transform;
  pointer-events: none;
}
.snail-sq, .stalk, .snail img { position: absolute; inset: 0; }
.snail img { width: 100%; height: 100%; }
.snail-sq { transform-origin: 45% 100%; will-change: transform; }
.snail .body { clip-path: polygon(0 0, 69.4% 0, 69.4% 25.3%, 100% 25.3%, 100% 100%, 0 100%); }
.stalk { will-change: transform; }
.stalk.left { transform-origin: 80.63% 25.87%; }
.stalk.right { transform-origin: 88.64% 25.87%; }
.ring { position: absolute; left: 70.25%; top: 1.6%; width: 10.2%; aspect-ratio: 1; border-radius: 50%; background: #F8B800; }
.lid { position: absolute; width: 7%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.stalk.left .lid { left: 72.3%; top: 3.2%; }
.stalk.right .lid { left: 90.55%; top: 3.3%; }
.lid b { position: absolute; inset: 0; background: #F8B800; box-shadow: inset 0 -4px 0 #D08A00; transform: translateY(-102%); }
/* accessories come from ../snail-stage.css (.snst-acc); the flames are the engine's too, sized in em = snail width */
.snail .snst-flames { left: -1.1em; bottom: 1.2%; }
.shade {
  position: absolute; left: 0; bottom: calc(var(--ug) - 12px); z-index: 13;
  width: 100px; height: 16px; border-radius: 50%; background: #0B0C22;
  opacity: 0; transform-origin: 0 50%; will-change: transform, opacity; pointer-events: none;
}

/* ---------- fly-past ---------- */
/* One lane, one plane at a time; snail.js reserves the lane (52px of plane + its bob) and nothing else uses it. */
.plane { position: absolute; left: 0; height: 52px; display: flex; align-items: center; will-change: transform; }
.plane svg { width: 99px; height: 52px; flex: none; animation: bob 1.1s ease-in-out infinite alternate; }
.plane .rope { width: 28px; height: 3px; background: var(--ink); flex: none; }
.plane .banner {
  padding: 8px 30px 5px 16px;
  background: var(--yellow); color: var(--ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 50%, 100% 100%, 0 100%);
  font-family: var(--display); font-weight: 900; font-size: clamp(26px, 2.6vw, 34px); line-height: 1; text-transform: uppercase; white-space: nowrap; letter-spacing: .02em;
  animation: bob 1.3s ease-in-out infinite alternate-reverse;
}
/* Milestone call-out: hangs on the sign exactly where the next-stop plaque is, and takes its place while it is up. */
.gain {
  position: absolute; left: 26px; top: 100%; height: 40px; width: max-content; display: flex; align-items: stretch; white-space: nowrap;
  font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: .03em; text-transform: uppercase; line-height: 1;
  transform-origin: 0 50%; visibility: hidden;
}
.gain b, .gain span, .gain em { display: flex; align-items: center; padding: 3px .45em 0; font-style: normal; }
.gain b { background: var(--ink); color: var(--cream); }
.gain span { background: var(--yellow); color: var(--ink); }
.gain em { background: var(--red); color: var(--cream); font-size: .78em; }
.gantry.calling .gain { visibility: visible; }
.gantry.calling .plaque { visibility: hidden; }
.fw-ring { position: absolute; left: -50px; top: -50px; width: 100px; height: 100px; border: 5px solid var(--yellow); border-radius: 50%; will-change: transform, opacity; }
.shoot { position: absolute; left: 0; top: 0; width: 150px; height: 4px; border-radius: 3px; background: var(--cream); transform-origin: 0 50%; will-change: transform, opacity; }
.shoot::before { content: ""; position: absolute; left: -5px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #FFF6D8; }
.flights .snst-bit i { display: block; }
@keyframes bob { from { transform: translateY(-3px); } to { transform: translateY(4px); } }

/* ---------- the overhead sign ---------- */
.gantry {
  position: absolute; top: 0; left: clamp(12px, 3vw, 44px);
  padding-top: 20px;
  transform-origin: 50% 0;
  animation: sway 8s ease-in-out infinite;
  transition: opacity .25s;
  cursor: auto;
}
.gantry.aside { opacity: 0; pointer-events: none; }
.gantry::before, .gantry::after { content: ""; position: absolute; top: 0; width: 7px; height: 24px; background: var(--ink); }
.gantry::before { left: 22%; } .gantry::after { right: 22%; }
.gantry.knock { animation: knock 1.6s cubic-bezier(.3, .6, .4, 1); }
@keyframes sway { 0%, 100% { transform: rotate(-.5deg); } 50% { transform: rotate(.5deg); } }
/* the swing stays inside the slack snail.js keeps clear around the sign (2.5deg) */
@keyframes knock { 0% { transform: rotate(0); } 15% { transform: rotate(2.5deg); } 38% { transform: rotate(-2.2deg); } 60% { transform: rotate(1.5deg); } 80% { transform: rotate(-.9deg); } 100% { transform: rotate(-.5deg); } }

.sign { position: relative; background: var(--green); border-radius: 12px; padding: 5px; min-width: 292px; }
.sign-in { border: 3px solid var(--cream); border-radius: 8px; padding: 12px 18px 12px 16px; }
.sign-head { display: flex; align-items: center; gap: 12px; }
.shield { position: relative; width: 50px; flex: none; }
.shield svg { width: 100%; height: auto; }
.shield-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 6px; color: var(--ink); font-family: var(--display); line-height: .9; }
.shield-t small { font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.shield-t b { font-size: 19px; font-weight: 900; }
.sign h1 { font-family: var(--display); font-weight: 900; font-size: 27px; line-height: .95; text-transform: uppercase; letter-spacing: .03em; }
.sign h1 small { display: block; margin-top: 4px; font-weight: 700; font-size: 14px; letter-spacing: .12em; color: #CFE6C9; }
.mcap {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(74px, 8.6vw, 122px); line-height: .86; letter-spacing: -.01em;
  margin: 12px 0 8px -3px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mcap.none { transform: scaleX(.5); transform-origin: 0 50%; }
.figs { display: flex; align-items: flex-end; gap: 18px; font-family: var(--display); text-transform: uppercase; }
.figs dt { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: #CFE6C9; line-height: 1; }
.figs dd { font-size: 23px; font-weight: 900; line-height: 1; margin-top: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.figs dd.up::before { content: "\25B2  "; font-size: .62em; vertical-align: .18em; }
.figs dd.down::before { content: "\25BC  "; font-size: .62em; vertical-align: .18em; }
.figs dd.down { color: #FFB199; }
.status { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 900; letter-spacing: .1em; line-height: 1; padding-bottom: 2px; white-space: nowrap; }
.lamp { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--cream); background: transparent; flex: none; }
.status[data-s="live"] .lamp { background: #9BF0A8; border-color: #9BF0A8; }
.status[data-s="stale"] .lamp { background: var(--orange); border-color: var(--orange); }
.status[data-s="stale"] { color: #FFD08A; }
.status[data-s="error"] .lamp { background: #FF7A5C; border-color: #FF7A5C; }
.status[data-s="error"] { color: #FFB199; }
.status[data-s="test"] .lamp { background: var(--yellow); border-color: var(--yellow); }
.lamp.tick { animation: tick .7s ease-out; }
@keyframes tick { 0% { transform: scale(1.9); } 100% { transform: scale(1); } }

.god .sign { background: #1B4A3C; box-shadow: 0 0 0 4px var(--yellow); }
.god .sign-in { border-color: var(--yellow); }
.god .mcap { color: #FFE27A; }
.plaque {
  position: relative; display: inline-block; margin: 9px 0 0 26px; padding: 6px 12px 4px;
  background: var(--yellow); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .09em; line-height: 1; text-transform: uppercase; white-space: nowrap;
  transform: rotate(.7deg);
}
.plaque b { font-weight: 900; }
.plaque::before, .plaque::after { content: ""; position: absolute; top: -9px; width: 4px; height: 9px; background: var(--ink); }
.plaque::before { left: 14px; } .plaque::after { right: 14px; }
.plaque:empty { display: none; }

/* ---------- road controls ---------- */
.cam { position: absolute; top: 26px; right: clamp(20px, 3vw, 44px); display: flex; gap: 26px; cursor: auto; }
.diamond {
  width: 40px; height: 40px; padding: 0; border: 3px solid var(--ink); border-radius: 5px;
  background: var(--yellow); color: var(--ink);
  transform: rotate(45deg); cursor: pointer;
  transition: transform .15s;
}
.diamond svg { width: 22px; height: 22px; margin: auto; transform: rotate(-45deg); }
.diamond:hover { transform: rotate(45deg) scale(1.1); }
.diamond:active { transform: rotate(45deg) scale(.94); }
.diamond:disabled { opacity: .35; cursor: default; transform: rotate(45deg); }
.tosnail {
  position: absolute; top: 62px; right: -6px;
  padding: 7px 12px 5px; border: 0; background: var(--ink); color: var(--cream);
  font-family: var(--display); font-weight: 900; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
}
.tosnail:hover { background: var(--red); }

/* ---------- under the road ---------- */
.earth {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--ug);
  background: var(--soil);
  padding: 44px clamp(16px, 3vw, 44px) 16px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 48px;
  cursor: auto;
}
.path { position: absolute; left: 0; right: 0; top: 0; height: 24px; background: var(--path); box-shadow: inset 0 -5px 0 #B28D4C; }
.rocks { position: absolute; right: 0; bottom: 0; width: 100%; height: calc(100% - 24px); pointer-events: none; }
.rocks > path { display: none; }
.ca, .acts { position: relative; }
.ca { min-width: 0; flex: 1 1 auto; max-width: 760px; }

/* the contract address is a number plate, and the whole plate is the button */
.numplate {
  position: relative; display: block; width: 100%; margin: 0; padding: 0 0 2px; border: 0; border-radius: 10px;
  background: var(--yellow); color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--yellow), inset 0 0 0 6px var(--ink), 0 6px 0 #A66E00;
  font-family: var(--display); text-align: left; cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.numplate::before, .numplate::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4px; border-radius: 50%; background: var(--ink); opacity: .8; }
.numplate::before { left: 15px; } .numplate::after { right: 15px; }
.numplate:hover:enabled { background: #FFCB2E; }
.numplate:active:enabled { transform: translateY(4px); box-shadow: inset 0 0 0 3px var(--yellow), inset 0 0 0 6px var(--ink), 0 2px 0 #A66E00; }
.np-strap { display: flex; justify-content: space-between; gap: 12px; padding: 13px 36px 0; font-weight: 700; font-size: 12.5px; letter-spacing: .16em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.np-strap span:last-child { font-weight: 900; }
.np-no { display: flex; padding: 5px 36px 11px; font-weight: 900; font-size: clamp(20px, 2.15vw, 31px); line-height: 1; letter-spacing: .035em; white-space: nowrap; }
.np-no .h { min-width: 4ch; overflow: hidden; text-overflow: ellipsis; }
.np-no .t { flex: none; }
/* no plate yet: a bare holder */
.numplate:disabled {
  background: #45353B; color: #CDBDB2; cursor: default;
  box-shadow: inset 0 0 0 3px #45353B, inset 0 0 0 5px #7A6860, 0 6px 0 #221a1e;
}
.numplate:disabled::before, .numplate:disabled::after { background: #7A6860; }
.numplate:disabled .np-no { text-transform: uppercase; letter-spacing: .06em; font-size: clamp(26px, 2.9vw, 40px); color: #E7D9CC; }
.np-stamp {
  position: absolute; right: 9%; top: 50%; padding: 5px 13px 2px; border: 4px solid var(--red); border-radius: 5px;
  background: var(--cream); color: var(--red);
  font-family: var(--display); font-weight: 900; font-size: 27px; line-height: 1; letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: translateY(-50%) rotate(-7deg); pointer-events: none;
}
.numplate.copied { animation: thud .32s cubic-bezier(.3, 1.6, .5, 1); }
.numplate.copied .np-stamp { animation: stamp 1.9s both; }
.numplate.failed { animation: nope .3s; }
@keyframes stamp {
  0% { opacity: 0; transform: translateY(-50%) rotate(-16deg) scale(2.6); }
  9% { opacity: 1; transform: translateY(-50%) rotate(-7deg) scale(.9); }
  14%, 84% { opacity: 1; transform: translateY(-50%) rotate(-7deg) scale(1); }
  100% { opacity: 0; transform: translateY(-50%) rotate(-7deg) scale(1); }
}
@keyframes thud { 0% { transform: translateY(0); } 30% { transform: translateY(5px) rotate(-.4deg); } 100% { transform: translateY(0); } }
@keyframes nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.ca-warn { margin-top: 13px; font-size: 15px; line-height: 1.3; color: #E7CFC0; max-width: 52ch; }
.ca-warn b { color: var(--cream); }

.acts { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex: 0 1 auto; max-width: 46%; }
.lnks { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 22px; }
.btn {
  display: inline-block; padding: 13px 22px 10px; border: 0; border-radius: 4px;
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 5px 0 #A66E00;
  font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { background: #FFCB2E; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #A66E00; }
.lnk {
  padding: 4px 0; border: 0; background: none; color: var(--cream);
  font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; text-decoration-color: var(--orange);
  cursor: pointer; white-space: nowrap;
}
.lnk:hover { color: var(--yellow); }
.lnk.down::after { content: " \2193"; }
/* before launch these are signs with a cover on, not dead links */
.btn.off, .btn.off:hover, .btn.off:active { background: #5A4A50; color: #2A2024; box-shadow: 0 5px 0 #221a1e; transform: none; cursor: default; }
.btn.off::after { content: "at launch"; margin-left: 12px; padding: 3px 7px 1px; background: #2A2024; color: #CDBDB2; font-size: .5em; letter-spacing: .14em; vertical-align: .25em; }
.lnk.off, .lnk.off:hover { color: #8F7D76; text-decoration-style: dotted; text-decoration-color: #6B5A60; cursor: default; }
[hidden] { display: none !important; }
.earth :focus-visible, .lore :focus-visible { outline-color: var(--cream); box-shadow: none; }

/* ---------- phones ---------- */
@media (max-width: 719px) {
  :root { --ug: 268px; }
  .gantry { left: 12px; padding-top: 14px; }
  .gantry::before, .gantry::after { height: 18px; }
  .sign { min-width: 0; border-radius: 10px; padding: 4px; }
  .sign-in { padding: 9px 13px 9px 11px; }
  .sign-head { gap: 9px; }
  .shield { width: 40px; }
  .shield-t small { font-size: 8px; } .shield-t b { font-size: 15px; }
  .sign h1 { font-size: 21px; } .sign h1 small { font-size: 11.5px; margin-top: 3px; }
  .mcap { font-size: 68px; margin: 8px 0 6px -2px; }
  .figs { gap: 13px; } .figs dt { font-size: 10.5px; } .figs dd { font-size: 19px; }
  .status { font-size: 12.5px; gap: 5px; } .lamp { width: 11px; height: 11px; }
  .plaque { font-size: 13.5px; margin: 8px 0 0 16px; padding: 5px 9px 3px; }
  .cam { top: 20px; right: 14px; flex-direction: column; gap: 20px; }   /* stacked: the sign needs the width */
  .diamond { width: 34px; height: 34px; } .diamond svg { width: 18px; height: 18px; }
  .tosnail { top: 130px; right: 0; font-size: 14px; }
  .earth { flex-direction: column; justify-content: flex-start; padding: 36px 14px 10px; gap: 11px; }
  .ca { width: 100%; flex: none; }
  .numplate { border-radius: 8px; box-shadow: inset 0 0 0 2px var(--yellow), inset 0 0 0 5px var(--ink), 0 5px 0 #A66E00; }
  .numplate::before { left: 11px; } .numplate::after { right: 11px; }
  .np-strap { padding: 11px 26px 0; font-size: 10.5px; letter-spacing: .12em; }
  .np-no { padding: 4px 26px 9px; font-size: 22px; letter-spacing: .02em; }
  .numplate:disabled .np-no { font-size: 27px; }
  .np-stamp { font-size: 21px; right: 12%; }
  .ca-warn { font-size: 13px; line-height: 1.25; margin-top: 10px; }
  .acts { flex-direction: row; align-items: center; max-width: none; width: 100%; gap: 12px; }
  .lnks { justify-content: flex-start; gap: 5px 13px; }
  .btn { font-size: 19px; padding: 11px 12px 8px; flex: none; }
  .btn.off::after { display: none; }
  .lnk { font-size: 15.5px; letter-spacing: .04em; padding: 2px 0; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .lore { font-size: 15px; padding: 13px 16px 15px; }
  .lore h2 { font-size: 36px; } .lore h2 span { font-size: 17px; }
  .lore .quote { font-size: 17px; }
  .plate b { font-size: 26px; padding: 4px 9px 2px; } .plate span { font-size: 13.5px; padding: 3px 7px 2px; }
  .gain { height: 30px; font-size: 18px; }
  .plane { height: 34px; }
  .plane svg { width: 65px; height: 34px; }
  .plane .rope { width: 16px; }
  .plane .banner { font-size: 21px; padding: 6px 22px 4px 11px; clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 50%, 100% 100%, 0 100%); }
}
@media (max-height: 620px) and (min-width: 720px) {
  .mcap { font-size: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .gantry, .gantry.knock, .plane svg, .plane .banner, .lamp.tick { animation: none; }
  .pennant, .marker::before, .diamond, .btn, .numplate { transition: none; }
  .warp i, .numplate.copied, .numplate.failed { animation: none; }
  .numplate.copied .np-stamp { animation: none; opacity: 1; }
  .lane-slime, .lane-snail { transition: none; }
}

/* ---------- under the road: the paperwork ---------- */
.under { position: relative; background: var(--soil); color: var(--cream); padding: 30px clamp(14px, 3vw, 44px) 46px; }
.under::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: repeating-linear-gradient(90deg, #43333A 0 34px, transparent 34px 60px); }
.under-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: 44px clamp(28px, 5vw, 72px); align-items: start; }
.under h3 { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.under h3 small { margin-left: 10px; font-weight: 700; font-size: 14px; letter-spacing: .14em; color: #CDBDB2; }

/* the numbers: a distance sign */
.board { min-width: 0; transform: rotate(-.5deg); }
.board .sign-in { padding: 14px 20px 12px; }
.board h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 3px solid var(--cream); }
.board h3 small { margin: 0; color: #CFE6C9; font-size: 13px; }
.dist { margin: 6px 0 0; font-family: var(--display); text-transform: uppercase; }
.dist > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 0 5px; border-bottom: 2px solid rgba(251, 243, 213, .22); }
.dist dt { font-weight: 700; font-size: 19px; letter-spacing: .08em; color: #CFE6C9; }
.dist dd { font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chg3 { display: flex; gap: 10px; margin: 13px 0 2px; font-family: var(--display); text-transform: uppercase; }
.chg3 > div { flex: 1; padding: 7px 10px 5px; background: #17523F; border-radius: 5px; }
.chg3 dt { font-weight: 700; font-size: 12px; letter-spacing: .14em; color: #CFE6C9; line-height: 1; }
.chg3 dd { margin-top: 4px; font-weight: 900; font-size: 24px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chg3 dd.up::before, .chg3 dd.down::before { font-size: .6em; vertical-align: .2em; margin-right: 5px; }
.chg3 dd.up::before { content: "\25B2"; } .chg3 dd.down::before { content: "\25BC"; }
.chg3 dd.up { color: #B9F5B0; } .chg3 dd.down { color: #FFB199; }

/* the curve: a stretch of road with a gate at the end */
.curve { min-width: 0; padding-top: 6px; }
.lane { position: relative; height: 58px; margin: 46px 64px 0 0; background: var(--path); border-radius: 4px; box-shadow: inset 0 -6px 0 #B28D4C, 0 0 0 4px #43333A; }
.lane-slime { position: absolute; left: 0; top: 50%; width: 100%; height: 10px; margin-top: -8px; border-radius: 0 5px 5px 0; transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s cubic-bezier(.3, .8, .3, 1);
  background: repeating-linear-gradient(90deg, #F1FADB 0 40px, #FFFFFF 40px 54px, #F1FADB 54px 74px); }
.lane-snail { position: absolute; left: 0; bottom: 18px; width: 62px; height: auto; margin-left: -50px; transition: left .9s cubic-bezier(.3, .8, .3, 1); }
.lane.empty .lane-snail { opacity: .35; }
.lane-gate { position: absolute; right: -8px; bottom: 0; width: 8px; height: 104px; background: var(--ink); box-shadow: 0 0 0 2px var(--soil); }
.lane-gate b { position: absolute; right: 8px; top: 0; padding: 6px 12px 4px; background: var(--green); color: var(--cream); box-shadow: inset 0 0 0 2px var(--green), inset 0 0 0 4px var(--cream);
  font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 1; white-space: nowrap; }
.lane .np-stamp.bonded { right: auto; left: 50%; font-size: 30px; transform: translate(-50%, -50%) rotate(-7deg) scale(1); transition: opacity .2s; }
.lane.bonded .np-stamp.bonded { opacity: 1; animation: stamped .5s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes stamped { from { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scale(2.4); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(1); } }
.curve-note { margin-top: 16px; font-size: 16px; line-height: 1.35; color: #E7CFC0; max-width: 56ch; }

/* authorities: inspection stickers */
.checks { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 26px 0 0; padding: 0; list-style: none; }
.checks li { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.2; color: #E7CFC0; }
.checks b { position: relative; display: grid; place-items: center; width: 74px; height: 74px; flex: none; border-radius: 50%; padding-top: 22px;
  font-family: var(--display); font-weight: 900; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; line-height: 1;
  background: #45353B; color: #CDBDB2; box-shadow: inset 0 0 0 3px #45353B, inset 0 0 0 5px #7A6860; transform: rotate(-6deg); }
.checks b::before { content: "?"; position: absolute; left: 0; right: 0; top: 11px; text-align: center; font-size: 30px; }
.checks li[data-s="ok"] b { background: #2E8B6B; color: var(--cream); box-shadow: inset 0 0 0 3px #2E8B6B, inset 0 0 0 5px var(--cream); }
.checks li[data-s="ok"] b::before { content: "\2713"; }
.checks li[data-s="ok"] span { color: var(--cream); }
.checks li[data-s="bad"] b { background: var(--red); color: var(--cream); box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 5px var(--cream); }
.checks li[data-s="bad"] b::before { content: "!"; }
.checks li:nth-child(2) b { transform: rotate(5deg); }

/* how to buy: four stops */
.howto { grid-column: 1 / -1; }
.howto ol { counter-reset: stop; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 44px 0 0; padding: 22px 0 0; border-top: 5px dashed #5A4A50; }
.howto li { counter-increment: stop; position: relative; padding: 0 22px 0 0; }
.howto li::before { content: counter(stop); display: grid; place-items: center; width: 54px; height: 54px; margin: -51px 0 12px -4px; background: var(--yellow); color: var(--ink);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); font-family: var(--display); font-weight: 900; font-size: 25px; line-height: 1; }
.howto h4 { margin: 0 0 6px; font-family: var(--display); font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: .03em; text-transform: uppercase; }
.howto p { font-size: 16px; line-height: 1.4; color: #E7CFC0; max-width: 30ch; }
.under a { color: var(--cream); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.under a:hover { color: var(--yellow); }
.fine { grid-column: 1 / -1; font-size: 14px; line-height: 1.4; color: #B5A39A; max-width: 78ch; }
.under :focus-visible { outline-color: var(--cream); box-shadow: none; }

@media (max-width: 860px) {
  .under-in { grid-template-columns: 1fr; gap: 38px; }
  .howto ol { grid-template-columns: 1fr 1fr; gap: 44px 0; }
}
@media (max-width: 719px) {
  .under { padding: 26px 16px 36px; }
  .under h3 { font-size: 26px; }
  .board { transform: none; }
  .board .sign-in { padding: 12px 14px 10px; }
  .dist dt { font-size: 16px; } .dist dd { font-size: 25px; }
  .chg3 { gap: 7px; } .chg3 dd { font-size: 20px; } .chg3 dt { font-size: 11px; letter-spacing: .1em; }
  .lane { margin-right: 54px; height: 50px; }
  .lane-snail { width: 52px; margin-left: -42px; }
  .checks b { width: 64px; height: 64px; font-size: 13px; }
  .howto ol { grid-template-columns: 1fr; gap: 0; border-top: 0; border-left: 5px dashed #5A4A50; margin-left: 20px; padding: 4px 0 0 30px; }
  .howto li { padding: 0 0 24px; }
  .howto li::before { position: absolute; left: -58px; top: -8px; margin: 0; width: 46px; height: 46px; font-size: 21px; }
  .howto p { max-width: none; }
}
