/* yellowhatos.com: night and steel, hat yellow only where it is earned. No shadows, glass or gradient washes. */

@font-face { font-family: "Big Shoulders Display"; src: url("/fonts/big-shoulders-display.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Chivo"; src: url("/fonts/chivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Chivo Mono"; src: url("/fonts/chivo-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #06090c;
  --plate: #0d1318;
  --plate-2: #121a20;
  --rivet: #1c252d;
  --rivet-2: #2a3640;
  --steel: #d9dee2;
  --slag: #8a949c;
  --hat: #ffc20e;
  --hat-deep: #c98f00;
  --fault: #ff5d52;
  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-sans: "Chivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Chivo Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.3125rem;
  --text-xl: 1.6875rem;
  --text-2xl: 2.125rem;
  --text-3xl: 3.25rem;
  --radius-ctl: 2px;
  --radius-panel: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --frame: clamp(16px, 2.4vw, 32px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--steel);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: var(--steel); text-decoration-color: var(--rivet-2); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--steel); }
p { margin: 0 0 1em; }
h1, h2 { margin: 0; font-weight: inherit; }
:focus-visible { outline: 2px solid var(--hat); outline-offset: 3px; }
.slag { color: var(--slag); }
.measure { max-width: 62ch; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--frame)); margin-inline: auto; padding-inline: var(--frame); }

/* Type roles (globals.css) */
.t-display { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.84; letter-spacing: -0.005em; }
.t-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: 0.95; letter-spacing: 0.005em; font-size: var(--text-2xl); }
.t-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Buttons: two kinds only */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0 1.4rem; border: 1px solid transparent; border-radius: var(--radius-ctl);
  font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; letter-spacing: 0.04em; text-transform: uppercase;
  line-height: 1; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn-primary { background: var(--hat); color: var(--night); }
.btn-primary:hover { background: #ffd040; }
.btn-ghost { border-color: var(--rivet-2); color: var(--steel); background: transparent; }
.btn-ghost:hover { border-color: var(--steel); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: progress; transform: none; }
.btn-sm { min-height: 38px; padding: 0 0.9rem; font-size: 0.95rem; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--hat); color: var(--night); padding: 8px 12px; border-radius: var(--radius-ctl); }
.skip:focus { left: 8px; }

/* Film grain (one tiny SVG noise tile, made here) */
.grain {
  pointer-events: none; position: fixed; inset: -50%; z-index: 60; opacity: 0.06;
  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='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, -2%); } 100% { transform: translate(3%, 1%); } }

/* Header */
.top { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; padding-block: 18px; position: relative; z-index: 2; }
.mark {
  font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--hat);
  text-decoration: none; display: inline-block; transition: transform 160ms var(--ease);
}
.mark:hover { transform: rotate(-6deg); }
.noname { margin: 0; color: var(--slag); font-size: var(--text-sm); }
.top-nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: var(--text-sm); }
.top-nav a { color: var(--steel); text-decoration: none; }
.top-nav a:hover { text-decoration: underline; }
.toggles { display: flex; gap: 0.5rem; }

/* Hero: the roadwork sign */
.hero { position: relative; padding-block: clamp(24px, 5vw, 64px) clamp(40px, 7vw, 96px); }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero > *:not(.dust) { position: relative; z-index: 1; }
.sign { margin: 0 auto; max-width: 980px; position: relative; }
.sign-head {
  position: relative; background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel);
  padding: clamp(12px, 2.2vw, 22px);
}
.sign-panel { position: relative; background: #000; border: 1px solid var(--rivet); border-radius: var(--radius-ctl); overflow: hidden; }
#led { width: 100%; aspect-ratio: 99 / 29; }
.sign-fallback {
  position: absolute; inset: 0; margin: 0; display: grid; place-content: center; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 5vw, 3.2rem); line-height: 1.05; color: var(--hat);
}
.js .sign-fallback { display: none; }
.rivet { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--rivet-2); }
.r1 { top: 7px; left: 7px; } .r2 { top: 7px; right: 7px; } .r3 { bottom: 7px; left: 7px; } .r4 { bottom: 7px; right: 7px; }
.beacon {
  position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--hat); z-index: 2;
  border: 2px solid var(--plate-2); animation: blink 1s steps(1) infinite;
}
.beacon-l { left: 18%; }
.beacon-r { right: 18%; animation-delay: -0.5s; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.16; } }
.sign-legs { display: flex; justify-content: space-between; width: 46%; margin: 0 auto; height: clamp(22px, 4vw, 44px); }
.sign-legs span { width: 10px; background: var(--rivet-2); }
.barricade {
  width: 64%; margin: 0 auto; height: 22px; border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl);
  background: repeating-linear-gradient(-45deg, var(--hat) 0 16px, var(--night) 16px 32px);
}
.sign-caption { margin: 18px auto 0; max-width: 68ch; text-align: center; color: var(--slag); font-size: var(--text-sm); min-height: 3em; }
.sign-caption .ok { color: var(--steel); }
.sign-caption .bad { color: var(--fault); }

.hero-copy { margin-top: clamp(40px, 6vw, 72px); }
.could { font-size: clamp(2.4rem, 6.5vw, 5.75rem); color: var(--steel); }
.could span { display: block; }
.could span + span { margin-top: 0.06em; }
.excuse { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin: 1.5rem 0 1.25rem; font-size: var(--text-lg); line-height: 1.35; }
.excuse #excuse { transition: opacity 160ms var(--ease); }
.excuse #excuse.swap { opacity: 0; }
.lead { color: var(--slag); }

/* Email sign-up */
.updates { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--rivet); }
.updates-inner { max-width: 760px; }
.updates h2 { margin-bottom: 0.9rem; }
.signup { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin: 1.5rem 0 1rem; }
.field { display: grid; gap: 0.4rem; flex: 1 1 280px; }
.field-label { font-size: var(--text-sm); color: var(--slag); }
.field input {
  width: 100%; min-height: 48px; padding: 0 0.9rem; background: var(--plate); color: var(--steel);
  border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl); font: inherit;
}
.field input::placeholder { color: #5d676f; }
.field input:focus { border-color: var(--steel); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--fault); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: var(--text-sm); color: var(--slag); }
.fine.ok { color: var(--steel); }
.fine.bad { color: var(--fault); }

/* Guesses */
.guess { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--rivet); }
.guess h2 { margin-bottom: 0.9rem; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 1.5rem 0 1rem; }
.choice {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label pct" "bar bar"; gap: 0.55rem 0.75rem; align-items: center;
  min-height: 72px; padding: 0.85rem 1rem; text-align: left; cursor: pointer; color: var(--steel);
  background: transparent; border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}
.choice:hover { border-color: var(--steel); }
.choice-label { grid-area: label; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.2rem; letter-spacing: 0.02em; line-height: 1.05; }
.pct { grid-area: pct; font-size: var(--text-sm); color: var(--slag); font-variant-numeric: tabular-nums; }
.bar { grid-area: bar; height: 4px; background: var(--rivet); border-radius: 1px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--slag); transition: width 600ms var(--ease); }
.choice[aria-pressed="true"] { background: var(--hat); border-color: var(--hat); color: var(--night); }
.choice[aria-pressed="true"] .pct { color: var(--night); }
.choice[aria-pressed="true"] .bar { background: rgba(6, 9, 12, 0.18); }
.choice[aria-pressed="true"] .bar i { background: var(--night); }
.choice[aria-busy="true"] { cursor: progress; opacity: 0.7; }
.live { align-self: start; background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); padding: 22px; }
.live p { margin-bottom: 0.6em; }
.live-big { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--text-xl); line-height: 1; color: var(--steel); }

/* The guess ticket: thermal paper with a torn edge */
.ticket-slot:empty { display: none; }
.ticket-slot { margin-top: 18px; }
.ticket {
  background: var(--steel); color: var(--night); padding: 18px 18px 26px; border-radius: var(--radius-ctl) var(--radius-ctl) 0 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px), 75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px), 55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px), 35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px), 15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px));
  animation: print 600ms var(--ease) both;
}
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-6px); } }
.ticket h3 { margin: 0 0 0.8rem; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: var(--text-xl); line-height: 0.95; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.9rem; margin: 0 0 0.8rem; font-size: var(--text-sm); }
.ticket dt { color: #4b555d; }
.ticket dd { margin: 0; }
.ticket .t-mono { font-size: var(--text-xs); word-break: break-all; }
.ticket .check { font-weight: 600; }
.ticket .check.bad { color: #b3261e; }
.ticket p { margin: 0.4rem 0 0; font-size: var(--text-xs); color: #4b555d; }
.ticket-actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.ticket .btn-ghost { color: var(--night); border-color: #9aa3aa; }

/* What's being built + site permit */
.built { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 56px); padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 104px); border-top: 1px solid var(--rivet); }
.built h2 { margin-bottom: 0.9rem; }
.define { margin: 1.8rem 0 0; padding-left: 1rem; border-left: 2px solid var(--rivet-2); }
.define dt { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: var(--text-xl); line-height: 1; }
.define dt span { font-family: var(--font-sans); font-weight: 400; text-transform: none; font-style: italic; font-size: var(--text-sm); color: var(--slag); margin-left: 0.4rem; }
.define dd { margin: 0.5rem 0 0; color: var(--steel); }
.permit { position: relative; align-self: start; background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); padding: 26px 24px 22px; }
.permit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rivet-2); padding-bottom: 0.8rem; margin-bottom: 0.9rem; }
.permit-head p { margin: 0; font-size: var(--text-sm); color: var(--slag); }
.permit-lead { font-size: var(--text-sm); color: var(--slag); }
.crew { display: grid; grid-template-columns: max-content 1fr; gap: 0.75rem 1.1rem; margin: 0; }
.crew dt { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; line-height: 1.25; letter-spacing: 0.02em; }
.crew dd { margin: 0; font-size: var(--text-sm); color: var(--steel); line-height: 1.5; }
.realdate { font-family: var(--font-mono); background: var(--night); border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl); padding: 0 0.35em; white-space: nowrap; }

/* Footer */
.foot { border-top: 1px solid var(--rivet); padding-block: 28px 40px; font-size: var(--text-sm); color: var(--slag); }
.foot p { margin: 0 0 0.4rem; }
.foot a { margin-right: 1rem; }

/* Plain pages (privacy, confirm, unsubscribe, 404) */
.plain-main { max-width: 680px; margin: 0 auto; padding: 48px var(--frame) 80px; }
.plain-main .mark { margin-bottom: 2rem; }
.plain-main h1 { font-size: var(--text-3xl); margin-bottom: 1.2rem; }
.plain-main h2 { font-size: var(--text-xl); margin: 2rem 0 0.6rem; }
.plain-main form { margin-top: 1.5rem; }
.plain-main li { margin-bottom: 0.5em; }

/* Motion: the visitor's choice wins (the button), then the system setting */
html[data-motion="paused"] .grain, html[data-motion="paused"] .beacon { animation: none; }
html[data-motion="paused"] .ticket { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) .grain, html:not([data-motion="on"]) .beacon, html:not([data-motion="on"]) .ticket { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .guess, .built { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .top-nav { display: none; }
  .toggles { margin-left: auto; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .beacon-l { left: 10%; } .beacon-r { right: 10%; }
  .sign-legs { width: 56%; }
  .barricade { width: 82%; height: 16px; }
  .crew { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .crew dd { margin-bottom: 0.7rem; }
}

/* Social card (rendered once to /og.png at 1200x630) */
body.og { width: 1200px; height: 630px; overflow: hidden; }
.og .grain, .og .beacon { animation: none; }
.og-frame { display: grid; grid-template-columns: 600px 1fr; gap: 44px; align-items: center; height: 630px; padding: 48px 52px; }
.og-left .mark { font-size: 4.2rem; margin-bottom: 18px; }
.og-could { font-size: 3.3rem; color: var(--steel); margin: 0; white-space: nowrap; }
.og-could span { display: block; }
.og-url { margin: 30px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slag); }
.og-right .sign { max-width: none; }
.og-note { margin: 22px 0 0; text-align: center; color: var(--slag); font-size: 1.05rem; }

/* The site crow photo band */
.crowband { margin: 0 auto; padding-block: 0 clamp(40px, 6vw, 72px); }
.crowband img { width: 100%; height: auto; border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); background: var(--plate); }
.crowband figcaption { margin-top: 12px; font-size: var(--text-sm); color: var(--steel); }

/* Social card over the photo */
.ogp { position: relative; width: 1200px; height: 630px; overflow: hidden; background: var(--night); }
.ogp-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.ogp-text { position: absolute; left: 56px; top: 50%; transform: translateY(-52%); }
.ogp-text .mark { font-size: 4rem; margin-bottom: 14px; }
.ogp-could { font-size: 2.9rem; color: var(--steel); margin: 0; white-space: nowrap; }
.ogp-could span { display: block; }

/* ---------- v2 ---------- */
:root { --font-mono-face: "Chivo Mono"; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The sign is a button: kick it */
button.sign-head { display: block; width: 100%; text-align: inherit; font: inherit; color: inherit; cursor: pointer; }
button.sign-head:focus-visible { outline: 2px solid var(--hat); outline-offset: 4px; }
.sign-panel { display: block; }
.sign-fallback { display: grid; }
.sign.kicked .sign-head { animation: kick 420ms var(--ease); }
@keyframes kick { 0% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(-6px, 2px) rotate(-1.2deg); } 45% { transform: translate(5px, -1px) rotate(0.9deg); } 70% { transform: translate(-2px, 1px) rotate(-0.4deg); } 100% { transform: none; } }

/* Hazard tape between the top and the story */
.tape { overflow: hidden; border-block: 1px solid var(--rivet-2); background: repeating-linear-gradient(-45deg, var(--hat) 0 14px, var(--night) 14px 28px); padding: 7px 0; }
.tape-run { display: flex; gap: 0; width: max-content; animation: tape 38s linear infinite; }
.tape-run span { background: var(--night); color: var(--hat); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.95rem; padding: 4px 18px; margin-right: 26px; white-space: nowrap; }
@keyframes tape { to { transform: translateX(-50%); } }
html[data-motion="paused"] .tape-run, html[data-motion="paused"] .sign.kicked .sign-head { animation: none; }

/* What's being built */
.built { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.built-lead { font-size: var(--text-lg); line-height: 1.45; color: var(--steel); }
.built-list { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; max-width: 66ch; }
.built-list li { position: relative; padding-left: 1.6rem; color: var(--steel); }
.built-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.7rem; height: 2px; background: var(--hat); }
.built-list b { font-weight: 600; }
.built .define { margin-top: 3.2rem; }

/* Dev log */
.devlog { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--rivet); }
.devlog h2 { margin-bottom: 0.9rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 1.2rem; }
.chip {
  min-height: 36px; padding: 0 0.85rem; border-radius: 999px; border: 1px solid var(--rivet-2); background: transparent; color: var(--steel);
  font: inherit; font-size: var(--text-sm); cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}
.chip:hover { border-color: var(--steel); }
.chip[aria-pressed="true"] { background: var(--steel); border-color: var(--steel); color: var(--night); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0.75rem; }
.tile { background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); padding: 16px 16px 14px; display: grid; gap: 0.5rem; align-content: start; }
.tile[hidden] { display: none; }
.tile h4 { margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.2rem; line-height: 1.05; letter-spacing: 0.01em; }
.tile p { margin: 0; font-size: var(--text-sm); color: var(--steel); line-height: 1.5; }
.st { justify-self: start; display: inline-flex; align-items: center; gap: 0.45em; font-size: var(--text-xs); color: var(--slag); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--slag); }
.st-hw::before { background: var(--hat); }
.st-vm::before { background: var(--steel); }
.st-linux::before { background: transparent; border: 1.5px solid var(--steel); }
.st-wip::before { background: transparent; border: 1.5px dashed var(--hat); }
.st-plan::before { background: transparent; border: 1.5px dotted var(--slag); }
.how-h { font-size: var(--text-xl); margin: 2.6rem 0 1rem; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0; counter-reset: step; }
.pipeline li { counter-increment: step; position: relative; padding: 16px 18px 16px 0; border-top: 2px solid var(--rivet-2); }
.pipeline li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; line-height: 1; color: var(--hat); margin-bottom: 0.4rem; }
.pipeline b { display: block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.1rem; margin-bottom: 0.3rem; }
.pipeline span { font-size: var(--text-sm); color: var(--steel); }

/* Bare Metal */
.play { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--rivet); }
.play-head h2 { margin-bottom: 0.9rem; }
.play-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(18px, 3vw, 32px); margin-top: 1.4rem; align-items: start; }
.stage { position: relative; height: clamp(440px, 68vh, 640px); background: var(--night); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage:focus-visible { outline: 2px solid var(--hat); outline-offset: 3px; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud { position: absolute; inset: 0 0 auto 0; display: flex; gap: 1.2rem; padding: 12px 14px; font-size: var(--text-sm); color: var(--slag); pointer-events: none; }
.hud b { color: var(--steel); font-variant-numeric: tabular-nums; font-weight: 600; }
.overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.9rem; padding: 24px; text-align: center; background: rgba(6, 9, 12, 0.82); }
.overlay[hidden] { display: none; }
.overlay p { margin: 0; max-width: 42ch; color: var(--steel); }
.ov-title { font-size: var(--text-3xl); color: var(--steel); }
.ov-score b { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: var(--hat); }
.ov-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.ov-save { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.ov-save .field { flex: 0 1 220px; text-align: left; }
.ov-save input { text-transform: uppercase; letter-spacing: 0.3em; font-family: var(--font-mono); text-align: center; }
.pad { position: absolute; inset: auto 0 0 0; display: none; justify-content: space-between; padding: 14px; pointer-events: none; }
.pad button { pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--rivet-2); background: rgba(6, 9, 12, 0.7); color: var(--steel); display: grid; place-items: center; }
.pad button:active { border-color: var(--hat); color: var(--hat); }
.pad svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { .pad { display: flex; } }
.g-pause { position: absolute; top: 8px; right: 8px; }
.board { background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); padding: 20px; }
.board h3 { font-size: var(--text-xl); margin-bottom: 0.8rem; }
.scores { margin: 0; padding: 0; list-style: none; counter-reset: rank; display: grid; gap: 0.35rem; }
.scores li { display: grid; grid-template-columns: 2.2em 3.6em 1fr; align-items: baseline; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.scores li.slag { display: block; }
.scores li:not(.slag)::before { counter-increment: rank; content: counter(rank) "."; color: var(--slag); }
.scores .nm { font-family: var(--font-mono); letter-spacing: 0.15em; color: var(--steel); }
.scores .pts { text-align: right; font-weight: 600; }
.scores li.me .nm, .scores li.me .pts { color: var(--hat); }

/* The crow, on the page */
.crowsec { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--rivet); }
.crowsec img { width: 100%; height: auto; border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); background: var(--plate); }
.crowsec h2 { margin-bottom: 0.9rem; }

/* Follow + support */
.follow { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 56px); padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--rivet); }
.follow h2 { margin-bottom: 0.9rem; }
.nets { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
.net { display: flex; align-items: center; gap: 0.7rem; min-height: 48px; padding: 0 0.9rem; border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl); text-decoration: none; color: var(--steel); transition: border-color 160ms var(--ease), color 160ms var(--ease); }
.net:hover { border-color: var(--hat); color: var(--hat); }
.net svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.net span { font-size: var(--text-sm); }
.support { align-self: start; background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); padding: 22px; }
.support h3 { font-size: var(--text-xl); margin-bottom: 0.7rem; }
.support .btn { margin: 0.4rem 0 0.8rem; }

/* Live stats */
.jobsite { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); border-top: 1px solid var(--rivet); }
.jobsite h2 { margin-bottom: 1.2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0.6rem; margin: 0 0 1rem; }
.stats div { background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); padding: 14px 16px; }
.stats dt { font-size: var(--text-sm); color: var(--slag); }
.stats dd { margin: 0.25rem 0 0; font-family: var(--font-display); font-weight: 900; font-size: 2.3rem; line-height: 1; color: var(--steel); font-variant-numeric: tabular-nums; }

/* The crow chat */
.crow-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70;
  display: flex; align-items: center; gap: 0.6rem; padding: 4px 16px 4px 4px; border-radius: 999px; border: 1px solid var(--rivet-2);
  background: var(--plate); color: var(--steel); cursor: pointer; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.crow-fab:hover { border-color: var(--hat); }
.crow-fab img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--hat); }
.crow-fab[aria-expanded="true"] { display: none; }
.crow-panel {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 71;
  width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto 1fr auto auto auto;
  background: var(--plate); border: 1px solid var(--rivet-2); border-radius: var(--radius-panel); overflow: hidden;
}
.crow-panel[hidden] { display: none; }
.crow-head { display: flex; align-items: center; gap: 0.7rem; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--rivet-2); }
.crow-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--hat); }
.crow-head div { flex: 1; }
.crow-name { margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.1rem; line-height: 1; }
.crow-sub { margin: 0.2rem 0 0; font-size: var(--text-xs); color: var(--slag); }
.crow-x { width: 38px; height: 38px; border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl); background: transparent; color: var(--steel); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.crow-log { list-style: none; margin: 0; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; overscroll-behavior: contain; }
.crow-log li { max-width: 86%; padding: 10px 12px; border-radius: 10px; font-size: var(--text-sm); line-height: 1.5; }
.crow-log li.c { align-self: flex-start; background: var(--plate-2); border: 1px solid var(--rivet-2); color: var(--steel); border-bottom-left-radius: 2px; }
.crow-log li.u { align-self: flex-end; background: var(--steel); color: var(--night); border-bottom-right-radius: 2px; }
.crow-log li.typing { color: var(--slag); font-style: italic; }
.crow-log .cta { display: inline-block; margin-top: 0.5rem; }
.crow-chips { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.crow-chips .chip { flex: none; }
.crow-form { display: flex; gap: 0.5rem; padding: 10px 14px; border-top: 1px solid var(--rivet-2); }
.crow-form input { flex: 1; min-height: 38px; padding: 0 0.8rem; background: var(--night); color: var(--steel); border: 1px solid var(--rivet-2); border-radius: var(--radius-ctl); font: inherit; font-size: 16px; }
.crow-form input:focus { outline: none; border-color: var(--steel); }
.crow-note { margin: 0; padding: 0 14px 12px; font-size: var(--text-xs); color: var(--slag); }

@media (max-width: 860px) {
  .play-grid, .crowsec, .follow, .built { grid-template-columns: minmax(0, 1fr); }
  .built .define { margin-top: 1.6rem; }
}
@media (max-width: 560px) {
  .crow-fab span { display: none; }
  .crow-fab { padding: 4px; }
  .stage { height: clamp(420px, 72vh, 560px); }
  .ov-title { font-size: var(--text-2xl); }
}
.numbers { list-style: none; margin: 1.6rem 0 0.4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0.6rem; }
.numbers li { border-top: 2px solid var(--hat); padding-top: 10px; display: grid; gap: 0.25rem; align-content: start; }
.numbers b { font-family: var(--font-display); font-weight: 900; font-size: 2.1rem; line-height: 1; color: var(--steel); font-variant-numeric: tabular-nums; }
.numbers span { font-size: var(--text-sm); color: var(--steel); line-height: 1.4; }
.numbers i { font-style: normal; font-size: var(--text-xs); color: var(--slag); }
