/* ══════════════════════════════════════════════════════════
   naveed.io — two shifts, one builder
   Ported from ryan-will-love.naveed.io. Day sections read like a spec sheet,
   night sections like the old naveed.io; the shift clock in the top bar
   follows the scroll from 06:00 round to 06:00 again.
   ══════════════════════════════════════════════════════════ */

:root {
  --font-display: 'Bricolage Grotesque', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --maxw: 1240px;
  --gutter: clamp(16px, 5vw, 72px);

  /* per-build hues, shared with naveed.io */
  --weave: #2fd0c6; --burrow: #e8e2d0; --spitball: #f2b134; --knowthat: #a3e635; --ember: #ff7a45;
  --pic: #8a86ff; --mis: #bf82ff; --miscolored: #e2725b; --misra: #ff5e8a; --tvcal: #ff7694;
  --carwash: #35c4ea; --mhbuild: #c08a52; --hushbin: #29c6a2; --traffic: #5bc8ff; --scouter: #f5b82e;
  --garden: #e79bb0; --hunch: #7ad37a; --codewrights: #9d8bff; --dice: #ff4fd8; --evue: #4f9cff;
  --cleanup: #ffd166; --nio: #5bc8ff; --petal: #4aa6ff; --ourworkshop: #f0842e;
}

/* shift palettes — any element can switch its subtree */
.night {
  --bg: #07090e; --bg-2: #0b0e15; --surface: #0f131c; --surface-2: #141924;
  --line: #1f2530; --line-2: #2a323f;
  --fg: #eef0f4; --fg-2: #a2a8b4; --fg-3: #6b7280; --fg-4: #464c58;
  --acc: #5bc8ff; --acc-ink: #05121c; --acc-glow: rgba(91,200,255,.20); --acc2: #9d8bff;
  --grid: 64px;
  color-scheme: dark;
}
.day {
  --bg: #f1f3f6; --bg-2: #e8ecf1; --surface: #ffffff; --surface-2: #f7f8fa;
  --line: #dce1e8; --line-2: #c5ccd7;
  --fg: #0b0e15; --fg-2: #394250; --fg-3: #5f6876; --fg-4: #949cab;
  --acc: #0a6fab; --acc-ink: #ffffff; --acc-glow: rgba(10,111,171,.13); --acc2: #5a48d4;
  --hazard: #f2b100;
  --grid: 48px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
html, body { margin: 0; }
body { font-family: var(--font-body); background: #07090e; color: #eef0f4; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: color-mix(in oklab, var(--acc) 30%, transparent); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
.sec { position: relative; background: var(--bg); color: var(--fg); padding: clamp(76px, 11vw, 150px) 0; overflow: clip; }
.sec.tight { padding-top: clamp(40px, 6vw, 80px); }
.sec::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--grid) var(--grid); opacity: .5;
  -webkit-mask-image: radial-gradient(110% 70% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(110% 70% at 50% 0%, #000 20%, transparent 75%);
}
.night.sec::before { opacity: .28; }

/* ── type ─────────────────────────────────────────── */
.kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-3); }
.kicker .acc, .acc { color: var(--acc); }
.sec-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.h-sec { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; line-height: .96; font-size: clamp(38px, 6.4vw, 84px); margin: 26px 0 0; text-wrap: balance; }
.h-sec .stroke, .stroke { color: transparent; -webkit-text-stroke: 1.4px var(--fg-3); }
.lead { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; font-size: clamp(22px, 2.9vw, 36px); color: var(--fg); max-width: 30ch; margin: 22px 0 0; text-wrap: balance; }
.lead .dim { color: var(--fg-3); }
.prose { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.68; color: var(--fg-2); max-width: 64ch; text-wrap: pretty; }
.prose p { margin: 0 0 1.05em; }
.prose b, .prose strong { color: var(--fg); font-weight: 600; }
.mono { font-family: var(--font-mono); }
.small { font-size: 13px; color: var(--fg-3); }

/* ── buttons / chips ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg);
  text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), border-color .18s, background .18s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--acc); }
.btn-primary { background: var(--acc); color: var(--acc-ink); border-color: transparent; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 10px 30px -8px var(--acc-glow); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); background: transparent;
}
button.chip { cursor: pointer; }
button.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ── reveal ──────────────────────────────────────── */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* ══ nav + shift clock ═══════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter);
  background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); color: var(--fg); transition: background .5s, color .5s, border-color .5s;
  font-family: var(--font-mono); font-size: 12px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.topbar .mk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--acc); font-size: 11px; }
.topbar .brand .dim { color: var(--fg-3); font-weight: 500; }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.clock {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); cursor: pointer; font: inherit; font-size: 12px;
}
.clock .face { width: 20px; height: 20px; }
.clock .face circle { fill: none; stroke: var(--fg-3); stroke-width: 1.5; }
.clock .face line { stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; transform-origin: 10px 10px; transition: transform .25s var(--ease); }
.clock .t { font-variant-numeric: tabular-nums; font-weight: 700; }
.clock .s { color: var(--fg-3); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.topbar .apply { padding: 8px 14px; font-size: 12px; }
.progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); }
.jump {
  position: fixed; top: 66px; right: var(--gutter); z-index: 61; width: min(320px, calc(100vw - 32px));
  background: var(--surface); color: var(--fg); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); font-family: var(--font-mono); font-size: 13px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.jump.open { opacity: 1; transform: none; pointer-events: auto; }
.jump a { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--fg-2); }
.jump a:hover, .jump a:focus-visible { background: var(--surface-2); color: var(--fg); }
.jump a .h { color: var(--fg-3); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .topbar .brand .dim, .clock .s, .topbar .apply .lbl { display: none; }
}
/* the three places people want to land: the job, the builds, the writing */
.tnav { display: flex; align-items: center; gap: 4px; margin-right: auto; margin-left: clamp(8px, 3vw, 36px); min-width: 0; }
.tnav a { padding: 7px 11px; border-radius: 999px; text-decoration: none; color: var(--fg-3); white-space: nowrap; letter-spacing: .02em; transition: color .2s, background .2s; }
.tnav a:hover { color: var(--fg); }
.tnav a.on { color: var(--fg); background: color-mix(in oklab, var(--acc) 14%, transparent); }
.tnav .sm { display: none; }
@media (max-width: 900px) { .tnav .x { display: none; } .tnav a { padding: 7px 8px; } }
@media (max-width: 640px) { .topbar .brand .name { display: none; } .tnav { margin-left: 6px; gap: 0; } .tnav a { padding: 7px 7px; font-size: 11.5px; } .tnav .lg { display: none; } .tnav .sm { display: inline; } }
/* phones: the clock menu already reaches the contact section, so the button steps aside for the links */
@media (max-width: 480px) { .topbar .apply { display: none; } }
@media (max-width: 360px) { .tnav a { padding: 7px 4px; font-size: 11px; } }

/* ══ hero (day) ═══════════════════════════════════════ */
.hero { padding-top: clamp(110px, 14vw, 170px); padding-bottom: clamp(56px, 8vw, 110px); }
.hero .sun {
  position: absolute; z-index: 0; top: -12vw; right: -8vw; width: 46vw; height: 46vw; min-width: 340px; min-height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,140,.55), rgba(255,214,140,.16) 45%, transparent 68%); pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.048em; line-height: .88;
  font-size: clamp(60px, 11.6vw, 168px); margin: 26px 0 0;
}
.hero h1 .l2 { display: block; }
.hero h1 .stroke { -webkit-text-stroke: 1.6px var(--fg-2); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; margin-top: clamp(28px, 4vw, 48px); }
.hero .intro { font-size: clamp(17px, 1.55vw, 20px); line-height: 1.6; color: var(--fg-2); max-width: 56ch; margin: 0; text-wrap: pretty; }
.hero .intro b { color: var(--fg); font-weight: 600; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.shifts { display: grid; gap: 12px; }
.shift {
  position: relative; border-radius: 18px; padding: 20px 20px 18px; border: 1px solid var(--line-2); overflow: hidden;
  background: var(--bg); color: var(--fg);
}
.shift.day { background: var(--surface); }
.shift.night { background: radial-gradient(120% 140% at 100% 0%, #16203a 0%, #0b0e15 55%); border-color: #232b3a; }
.shift.night::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, #fff6 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 85% 60%, #fff9 50%, transparent 51%), radial-gradient(1px 1px at 40% 75%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 85%, #fff6 50%, transparent 51%);
}
.shift .row1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.shift .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3); display: inline-flex; gap: 8px; align-items: center; }
.shift .lbl svg { width: 16px; height: 16px; }
.shift .hrs { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.shift h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2vw, 25px); letter-spacing: -.02em; line-height: 1.15; margin: 12px 0 10px; }
.shift ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--fg-2); }
.shift li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; }
.shift li::before { content: "→"; font-family: var(--font-mono); color: var(--acc); font-size: 12px; padding-top: 2px; }
.shift.night li::before { content: "✦"; }

.hero-meta { display: flex; flex-wrap: wrap; margin: clamp(36px, 5vw, 60px) 0 0; border-top: 1px solid var(--line-2); }
.hero-meta > div { padding: 14px 22px 0 0; margin-right: 22px; }
.hero-meta > div + div { border-left: 1px solid var(--line); padding-left: 22px; margin-left: -22px; }
.hero-meta dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.hero-meta dd { margin: 5px 0 0; font-family: var(--font-mono); font-size: 13.5px; color: var(--fg); }
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-meta > div, .hero-meta > div + div { border: 0; margin: 0; padding: 12px 10px 0 0; }
}
/* ══ hard mode ══════════════════════════════════════ */
.hazard { height: 10px; border-radius: 3px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, #11151c 12px 24px); opacity: .9; width: 120px; margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-2); }
.stats > div { padding: 18px 18px 0 0; }
.stats > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.stats .n { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 4vw, 56px); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); margin-top: 8px; line-height: 1.5; }
@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+3) { padding-top: 22px; }
}

/* ══ plant ⇄ DC ══════════════════════════════════════ */
.plant { margin-top: clamp(32px, 4vw, 52px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; }
.plant-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button {
  font-family: var(--font-mono); font-size: 12px; padding: 7px 14px; border-radius: 999px; border: 0; background: transparent; color: var(--fg-3); cursor: pointer;
  transition: background .25s var(--ease), color .25s;
}
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.plant-bar .hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
.plant-stage { position: relative; background: var(--bg); }
.plant-stage svg { display: block; width: 100%; height: auto; }
.plant-stage .lane { fill: none; stroke: var(--line-2); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.plant-stage .lane-in { fill: none; stroke: var(--surface); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; }
.plant-stage .st rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.plant-stage .st text { font-family: var(--font-mono); fill: var(--fg); font-size: 13px; transition: opacity .25s; }
.plant-stage .st .sub { fill: var(--fg-3); font-size: 10.5px; letter-spacing: .06em; }
.plant-stage .item { transition: opacity .3s; }
.plant-stage .sensor { cursor: pointer; }
.plant-stage .sensor .hit { fill: transparent; }
.plant-stage .sensor .d { fill: var(--surface); stroke: var(--fg-3); stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.plant-stage .sensor:hover .d, .plant-stage .sensor:focus-visible .d { stroke: var(--acc); }
.plant-stage .sensor.on .d { fill: var(--hazard, #f2b100); stroke: #11151c; }
.plant-stage .sensor:focus { outline: none; }
.plant-stage .sensor:focus-visible .ring { stroke: var(--acc); stroke-width: 2; fill: none; }
.morph { transition: opacity .22s ease; }
.morph.out { opacity: 0; }
.console {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); background: var(--surface-2); min-height: 44px;
}
.console .out .k { color: var(--acc); }
.console .out .w { color: #b07800; }
.console .cnt { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.nouns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.nouns div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.nouns div:nth-child(4n) { border-right: 0; }
.nouns .a { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); display: block; }
.nouns .b { font-weight: 600; color: var(--fg); }
@media (max-width: 820px) { .nouns { grid-template-columns: 1fr 1fr; } .nouns div:nth-child(2n) { border-right: 0; } }
/* field notes */
.episodes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(32px, 4vw, 52px); }
.ep { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 10px; align-content: start; }
.ep .yr { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.ep .where { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.ep h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.015em; line-height: 1.2; }
.ep p { margin: 0; color: var(--fg-2); font-size: 14.5px; line-height: 1.55; }
.ep.now { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-glow); }
.ep.now .yr { color: var(--acc); }
@media (max-width: 1000px) { .episodes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .episodes { grid-template-columns: 1fr; } }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--line-2); }
.rules > div { padding: 16px 18px 0 0; }
.rules > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.rules .r { font-family: var(--font-mono); font-size: 11px; color: var(--acc); letter-spacing: .1em; }
.rules h4 { margin: 8px 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.015em; }
.rules p { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.55; }
@media (max-width: 820px) { .rules { grid-template-columns: 1fr; } .rules > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 14px; } }
/* ══ dusk: the shift change ══════════════════════════ */
.dusk { position: relative; height: 260vh; color: #fff; background: #07090e; }
.dusk .sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-a, #f1f3f6), var(--sky-b, #f1f3f6)); }
.dusk .stage { position: sticky; top: 0; height: 100vh; height: 100dvh; display: grid; place-items: center; overflow: hidden; }
.dusk .stars { position: absolute; inset: 0; opacity: var(--stars, 0); pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 42%, #fffa 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 44% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 61% 30%, #fff9 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 77% 16%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 44%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 64%, #fff8 50%, transparent 51%), radial-gradient(1.3px 1.3px at 92% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 58%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 35% 84%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 88%, #fff8 50%, transparent 51%), radial-gradient(1.2px 1.2px at 18% 90%, #fff 50%, transparent 51%);
}
.dusk .orb { position: absolute; left: 50%; width: 140px; height: 140px; margin-left: -70px; border-radius: 50%; top: var(--orb-y, 10%);
  background: radial-gradient(circle at 40% 38%, var(--orb-a, #fff3c4), var(--orb-b, #ffb347) 60%, transparent 72%); filter: blur(.4px); opacity: var(--orb-o, 1);
  box-shadow: 0 0 120px 40px color-mix(in oklab, var(--orb-b, #ffb347) 40%, transparent);
}
.dusk .horizon { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(180deg, transparent, rgba(7,9,14,.55)); }
.dusk .inner { position: relative; z-index: 2; width: min(1100px, 100%); padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; color: var(--ink, #0b0e15); }
.dusk .copy .kicker { color: var(--ink-3, #5f6876); }
.dusk h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.04em; line-height: .92; font-size: clamp(40px, 6.6vw, 92px); margin: 18px 0 18px; }
.dusk p { margin: 0 0 12px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; color: var(--ink-2, #394250); max-width: 46ch; }
.dusk .legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-family: var(--font-mono); font-size: 12px; }
.dusk .legend span { display: inline-flex; gap: 8px; align-items: center; }
.dusk .legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dusk .clockviz { width: 100%; max-width: 480px; justify-self: center; aspect-ratio: 1; }
.dusk .clockviz text { font-family: var(--font-mono); font-size: 11px; }
.dusk .then { position: absolute; z-index: 3; left: 0; right: 0; bottom: 9vh; text-align: center; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 5vw, 64px); letter-spacing: -.03em; color: #fff; opacity: var(--then, 0); transform: translateY(calc((1 - var(--then, 0)) * 20px)); }
.dusk .then .stroke { -webkit-text-stroke: 1.4px #8b93a3; }
@media (max-width: 820px) {
  .dusk .inner { grid-template-columns: 1fr; gap: 8px; }
  .dusk .clockviz { max-width: 300px; }
  .dusk h2 { font-size: clamp(36px, 10vw, 56px); margin: 10px 0; }
  .dusk p { font-size: 15px; }
}

/* ══ night: the year ═════════════════════════════════ */
.year-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.bignum { font-family: var(--font-display); font-weight: 800; letter-spacing: -.04em; line-height: .9; font-size: clamp(64px, 12vw, 168px); color: var(--acc); font-variant-numeric: tabular-nums; }
.bignum-l { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); text-align: right; line-height: 1.7; }
.tape { margin-top: 30px; border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 18px 14px; background: var(--bg-2); }
.tape .rail { height: 3px; background: linear-gradient(90deg, var(--line-2), var(--fg-3), var(--line-2)); border-radius: 3px; position: relative; }
.tape .months { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; height: 220px; align-items: start; }
.tape .m { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; cursor: default; }
.tape .m .hook { width: 1px; height: 10px; background: var(--fg-3); }
.tape .m .bag {
  width: min(70%, 42px); border-radius: 6px 6px 12px 12px; height: calc(var(--h) * 190px + 4px);
  background: linear-gradient(180deg, color-mix(in oklab, var(--acc) 80%, #fff), var(--acc2));
  transform-origin: top center; transform: scaleY(0); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 60ms);
  box-shadow: 0 10px 30px -12px var(--acc-glow);
}
.tape.on .m .bag { transform: scaleY(1); }
.tape .m .v { position: absolute; top: calc(var(--h) * 190px + 22px); font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); opacity: 0; transition: opacity .4s; transition-delay: calc(var(--i) * 60ms + .5s); }
.tape.on .m .v { opacity: 1; }
.tape .axis { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); text-align: center; }
.tape .note { margin-top: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
@media (max-width: 640px) { .tape .months { height: 170px; } .tape .m .bag { height: calc(var(--h) * 140px + 3px); } .tape .m .v { top: calc(var(--h) * 140px + 20px); writing-mode: vertical-rl; } .tape .axis { font-size: 9px; } }
.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 28px; border-top: 1px solid var(--line-2); }
.counters > div { padding: 16px 16px 0 0; }
.counters > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.counters .n { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.counters .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-top: 6px; line-height: 1.5; }
@media (max-width: 820px) { .counters { grid-template-columns: 1fr 1fr; } .counters > div:nth-child(3) { border-left: 0; padding-left: 0; } .counters > div:nth-child(n+3) { padding-top: 20px; } }

.factory { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.factory svg { width: 100%; height: auto; }
.factory svg text { font-family: var(--font-mono); font-size: 12px; fill: var(--fg-2); }
.factory .node rect { fill: var(--surface); stroke: var(--line-2); }
.factory .node.park rect { stroke: var(--scouter); }
.factory .wire { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.factory .pulse { fill: var(--acc); filter: drop-shadow(0 0 6px var(--acc)); }
.factory blockquote { margin: 0 0 16px; font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.02em; color: var(--fg); border-left: 2px solid var(--burrow); padding-left: 18px; }
@media (max-width: 920px) { .factory { grid-template-columns: 1fr; } }
/* ══ the binder ══════════════════════════════════════ */
.binder-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; align-items: center; }
.binder-bar .count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
/* one 9-pocket binder page: 3 × 3 on desktop, 2 across on phones */
.binder {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 24px auto 0; max-width: 940px; perspective: 1400px;
  padding: clamp(14px, 2vw, 22px); border-radius: 22px; background: linear-gradient(180deg, #11151f, #0c0f17); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 40px 90px -50px #000;
}
@media (max-width: 760px) {
  .binder { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: 12px; padding: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .slab { scroll-snap-align: center; }
}
.slab {
  --hue: var(--acc); position: relative; aspect-ratio: 5 / 8.1; border-radius: 16px; padding: 9px; cursor: pointer;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 40%, rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 24px 60px -34px #000;
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), box-shadow .3s, opacity .3s;
  text-align: left; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 7px; width: 100%;
}
.slab.tilting { transition: transform .08s linear, box-shadow .3s; }
.slab:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 40px 80px -40px color-mix(in oklab, var(--hue) 70%, #000); }
.slab[hidden] { display: none; }
.slab .label {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px;
  background: linear-gradient(180deg, #f4f1e8, #e6e1d3); color: #1a1d24; font-family: var(--font-mono);
}
.slab .label .t { font-size: 9.5px; line-height: 1.35; letter-spacing: .04em; text-transform: uppercase; }
.slab .label .t b { display: block; font-size: 11px; letter-spacing: .02em; }
.slab .label .g { text-align: center; line-height: 1; padding-left: 8px; border-left: 1px solid #c9c2b0; }
.slab .label .g b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.slab .label .g span { font-size: 8px; letter-spacing: .12em; }
.slab .card {
  position: relative; flex: 1; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, color-mix(in oklab, var(--hue) 16%, #0d1017), #0b0e15 60%);
  border: 2px solid color-mix(in oklab, var(--hue) 70%, #fff 0%); box-shadow: inset 0 0 0 3px #0b0e15;
}
.slab .card .top { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 11px 7px; gap: 8px; }
.slab .card .nm { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; line-height: 1.05; color: #fff; }
.slab .card .no { font-family: var(--font-mono); font-size: 10px; color: color-mix(in oklab, var(--hue) 70%, #fff); white-space: nowrap; }
.slab .art { position: relative; margin: 0 9px; aspect-ratio: 16 / 11; border-radius: 6px; overflow: hidden; background: #0b0e15; border: 1px solid rgba(255,255,255,.08); }
.slab .art img { width: 100%; height: 100%; object-fit: cover; }
.slab .art .gen { position: absolute; inset: 0; }
.slab .type { margin: 7px 11px 0; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in oklab, var(--hue) 75%, #fff); padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.slab .flav { margin: 7px 11px 0; font-size: 12.5px; line-height: 1.45; color: #c3c8d2; flex: 1; }
.slab .stat { display: flex; justify-content: space-between; gap: 6px; margin: 0 11px 10px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.08); font-family: var(--font-mono); font-size: 10px; color: #8e95a3; }
.slab .stat b { color: #fff; font-weight: 700; }
/* sheen + holo foil */
.slab .sheen { position: absolute; inset: 0; border-radius: 16px; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .3s;
  background: radial-gradient(60% 50% at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.75), transparent 60%); }
.slab:hover .sheen, .slab.tilting .sheen { opacity: 1; }
.slab.holo .card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .22;
  background: linear-gradient(115deg, transparent 20%, #ff6ad5 30%, #c774e8 38%, #ad8cff 46%, #8795e8 54%, #94d0ff 62%, transparent 72%);
  background-size: 250% 250%; background-position: var(--fx, 50%) var(--fy, 50%); transition: opacity .3s;
}
.slab.holo:hover .card::after, .slab.holo.tilting .card::after { opacity: .5; }
.slab.holo .label { background: linear-gradient(110deg, #f4f1e8, #fff8e6 40%, #e6f3ff 60%, #e6e1d3); }
@media (prefers-reduced-motion: reduce) { .slab { transform: none !important; } }
.dawn { background: linear-gradient(180deg, #07090e 0%, #1b1530 26%, #4a2b45 48%, #c46a5a 74%, #f4b583 100%); color: #fff; }
.dawn::before { display: none; }
.dawn .kicker { color: #c9b6c9; }
.dawn .kicker .acc { color: #ffd39b; }
.dawn .sec-head { border-color: rgba(255,255,255,.18); }
.dawn .h-sec .stroke { -webkit-text-stroke-color: #e8c2b8; }
.dawn .prose { color: #f1e6ea; }
.dawn .prose b { color: #fff; }
.dawn .sig { margin-top: 28px; font-family: var(--font-mono); font-size: 13px; color: #fff3e6; }
/* ══ contact + terminal ══════════════════════════════ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(32px, 4vw, 52px); align-items: start; }
.tiles { display: grid; gap: 10px; }
.tile { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; transition: border-color .2s, transform .18s var(--ease); }
.tile:hover { border-color: var(--acc); transform: translateY(-2px); }
.tile .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); grid-column: 1 / -1; }
.tile .v { font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 2vw, 24px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tile .go { font-family: var(--font-mono); font-size: 12px; color: var(--acc); align-self: center; }
.term { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; font-family: var(--font-mono); font-size: 13px; box-shadow: 0 40px 90px -50px #000; }
.term:focus-within { border-color: color-mix(in oklab, var(--acc) 50%, var(--line-2)); box-shadow: 0 0 0 4px var(--acc-glow); }
.term .bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--fg-3); font-size: 11.5px; }
.term .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.term .bar .ttl { margin-left: 8px; }
.term .body { height: 300px; overflow-y: auto; padding: 12px 14px; line-height: 1.75; color: var(--fg-2); white-space: pre-wrap; word-break: break-word; }
.term .body .pr { color: var(--acc); }
.term .body .cm { color: var(--fg-4); }
.term .body .ok { color: var(--acc); }
.term .body .er { color: #ff8f8f; }
.term .body .y { color: #f5b82e; }
.term .body a { color: var(--acc); text-decoration: underline dashed; text-underline-offset: 3px; }
.term form { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.term label { color: var(--acc); white-space: nowrap; }
.term input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--fg); font: inherit; }
.term .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.term .chips button { font: inherit; font-size: 11px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); cursor: pointer; }
.term .chips button:hover { color: var(--fg); border-color: var(--acc); }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .term input { font-size: 16px; } .term .body { height: 260px; } }

.foot { padding: 28px 0 40px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ══ reduced motion ══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .tape .m .bag { transform: none; transition: none; }
  .tape .m .v { opacity: 1; transition: none; }
  .dusk { height: auto; }
  .dusk .stage { position: relative; height: auto; padding: 100px 0; }
}
.cloudbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); background: var(--surface-2); transition: background .3s; }
.cloudbar b { color: var(--fg); font-weight: 600; }
.cloudbar .dot { width: 8px; height: 8px; border-radius: 50%; background: #1fae6b; box-shadow: 0 0 0 0 rgba(31,174,107,.5); }
.cloudbar.ping .dot { animation: cping .6s ease-out; }
@keyframes cping { from { box-shadow: 0 0 0 0 rgba(31,174,107,.6); } to { box-shadow: 0 0 0 9px rgba(31,174,107,0); } }
.cloudbar.down { background: color-mix(in oklab, #ff5e6a 8%, var(--surface-2)); }
.cloudbar .dot.off { background: #c4343f; }
.plant-stage .item { cursor: pointer; }
.plant-stage .item.held text { fill: #b07800 !important; }
.plant-stage .sensor.stale .d { fill: var(--line-2); stroke: var(--fg-4); stroke-dasharray: 2 2; }
.plant-stage .ghost {
  position: absolute; right: 14px; top: 12px; z-index: 3; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  background: transparent; border: 1.5px dashed var(--line-2); border-radius: 8px; padding: 6px 10px; cursor: help; opacity: 0; pointer-events: none; transition: opacity .25s; text-decoration: line-through;
}
.plant-stage .ghost.show { opacity: 1; pointer-events: auto; }
.plant-stage .bubble {
  position: absolute; z-index: 4; transform: translate(-50%, -100%); max-width: 240px; padding: 8px 11px; border-radius: 10px;
  background: var(--fg); color: var(--bg); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.45; pointer-events: none; opacity: 0; transition: opacity .2s;
}
.plant-stage .bubble.show { opacity: 1; }
.switches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.sw { text-align: left; font: inherit; color: var(--fg-2); background: var(--surface); border: 0; border-right: 1px solid var(--line); padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; transition: background .2s; }
.sw:last-child { border-right: 0; }
.sw b { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sw b::before { content: ""; width: 26px; height: 15px; border-radius: 999px; background: var(--line-2); box-shadow: inset 2px 0 0 2px var(--line-2); transition: background .2s; flex: none;
  background-image: radial-gradient(circle at 7px 50%, var(--surface) 5px, transparent 5.5px); }
.sw[aria-pressed="true"] { background: color-mix(in oklab, var(--hazard, #f2b100) 10%, var(--surface)); }
.sw[aria-pressed="true"] b::before { background-color: #f2b100; background-image: radial-gradient(circle at 19px 50%, #fff 5px, transparent 5.5px); }
.sw span { font-size: 13px; line-height: 1.45; }
@media (max-width: 820px) { .switches { grid-template-columns: 1fr; } .sw { border-right: 0; border-bottom: 1px solid var(--line); } }
.console .out .w { color: #9a6a00; }
.night .console .out .w { color: #f2b100; }

/* weave */
.weave { margin-top: clamp(32px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: linear-gradient(140deg, color-mix(in oklab, var(--weave) 14%, var(--surface)), var(--surface) 60%); border: 1px solid color-mix(in oklab, var(--weave) 30%, var(--line-2)); }
.weave h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 14px; }
.weave .prose { font-size: 16px; }
.weave-shots { position: relative; height: 380px; }
.weave-shots .w-diag { position: absolute; right: 0; top: 0; width: 80%; height: 340px; object-fit: cover; object-position: top left; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px #000; }
.weave-shots .w-qr { position: absolute; left: 0; bottom: 0; width: 34%; max-width: 150px; height: auto; z-index: 2; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px #000; }
@media (max-width: 920px) { .weave { grid-template-columns: 1fr; } .weave-shots { height: 300px; } .weave-shots .w-diag { height: 270px; } }

/* the year */
.over { display: inline-block; margin-top: 8px; padding: 4px 8px; border-radius: 6px; font-weight: 700; color: #0b0e15; background: #a3e635; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .3s var(--ease); }
.over.show { opacity: 1; transform: scale(1.06); animation: glitch .12s steps(2) 6; }
@keyframes glitch { 50% { transform: translateX(2px) skewX(-8deg) scale(1.06); } }
/* binder flip */
.slab .flipper { position: relative; flex: 1; display: block; transform-style: preserve-3d; transition: transform .45s var(--ease); }
.slab.flipped .flipper { transform: rotateY(180deg); }
.slab .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.slab .back { transform: rotateY(180deg); display: flex; flex-direction: column; }
.slab .rcpts { display: grid; gap: 8px; padding: 4px 11px 0; font-size: 12.5px; line-height: 1.45; color: #c3c8d2; flex: 1; align-content: start; }
.slab .rcpts span { padding-left: 14px; position: relative; }
.slab .rcpts span::before { content: "✓"; position: absolute; left: 0; color: color-mix(in oklab, var(--hue) 75%, #fff); font-size: 11px; }
.slab .lks { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 11px 11px; border-top: 1px solid rgba(255,255,255,.08); }
.slab .lks a { font-family: var(--font-mono); font-size: 10.5px; color: #fff; text-decoration: none; padding: 4px 8px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--hue) 60%, transparent); }
.slab .lks a:hover { background: color-mix(in oklab, var(--hue) 25%, transparent); }
.slab .lks .none { font-family: var(--font-mono); font-size: 10px; color: #6b7280; }
.slab.flipped .sheen { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) { .slab .flipper { transition: none; } }
.linkish { font: inherit; color: var(--acc); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.foot { background: var(--bg); color: var(--fg-3); }
/* ══ round 2: passes, steward rules, codewrights, label status, quests ══ */
.passes { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
@media (max-width: 1000px) { .passes { grid-template-columns: 1fr; } }
.pass { position: relative; padding: 0 18px 18px; overflow: hidden; border-style: solid; }
.pass::before, .pass::after { content: ""; position: absolute; top: 52px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.pass::before { left: -9px; } .pass::after { right: -9px; }
.pass .pp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 -18px 4px; padding: 14px 18px 12px; border-bottom: 1.5px dashed var(--line-2); }
.pass .code { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -.02em; line-height: 1; }
.pass.now .code { color: var(--acc); }
.pass .pp-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); text-align: right; }
.pass .stamp { justify-self: start; margin-top: 4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #b4472f; border: 1.5px solid #b4472f; border-radius: 6px; padding: 3px 8px; transform: rotate(-3deg); opacity: .85; }
.pass.now .stamp { color: var(--acc); border-color: var(--acc); }
.rules { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
.rules > div:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
@media (max-width: 820px) { .rules > div { border-left: 0 !important; padding-left: 0 !important; } }
.pile { max-width: 940px; margin: 16px auto 0; text-align: center; line-height: 1.7; }
.sig { margin-top: 26px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; color: var(--fg-3); }
@media (max-width: 820px) { .rules { grid-template-columns: 1fr; row-gap: 18px; } }
.scanlist button[hidden] { display: none; }
.binder-bar .swipe { display: none; }
@media (max-width: 760px) { .binder-bar .swipe { display: inline; } }

/* ══ round 3: design critique fixes ══ */
.dusk { height: 180vh; }
@media (max-width: 760px) { .dusk { height: 150vh; } }
/* passes swipe sideways on phones */
@media (max-width: 760px) {
  .passes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .passes .pass { scroll-snap-align: start; }
}
/* the card is an article; a stretched button flips it, links sit above */
.slab { cursor: pointer; }
.slab .flip { position: absolute; inset: 0; z-index: 0; border: 0; background: transparent; border-radius: 16px; cursor: pointer; padding: 0; }
/* the card sits above the flip button, so taps on links reach the links; the card's own click flips it */
.slab .flipper { z-index: 1; }
.slab .flip:focus-visible { outline: 2px solid var(--hue); outline-offset: 3px; }
.slab .lks { position: relative; z-index: 3; }
.slab .label .t em { display: block; font-style: normal; font-size: 8px; letter-spacing: .08em; color: #8a7f68; margin-top: 2px; text-transform: none; }
@media (max-width: 760px) { .slab .label .t em { font-size: 7.5px; } }
/* touch targets */
@media (pointer: coarse) { .clock { min-height: 44px; } .topbar .apply { min-height: 44px; } }
/* four passes: 4 across on wide screens, 2 on mid */
@media (min-width: 1101px) { .passes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) and (min-width: 761px) { .passes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ══ naveed.io additions ═════════════════════════════ */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: #5bc8ff; color: #05121c; font: 600 13px var(--font-mono); text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
.topbar .brand .acc { color: var(--acc); }
.hero .kicker { margin-top: 0; }

/* § 01 — the climb: steps scroll, the tower stays */
.step.assemble { display: none; }
.climb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); margin-top: clamp(36px, 5vw, 64px); align-items: start; }
.steps { display: grid; gap: 0; }
.step { min-height: 78vh; padding: 8vh 0 6vh; opacity: .32; transition: opacity .5s var(--ease); }
.step:first-child { padding-top: 0; }
/* the last step is as tall as the pinned tower, so the tower never slides up under the bar */
.step[data-layer="7"] { min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px); }
.step.on { opacity: 1; }
.step .lv { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.step .lv span { display: grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--acc); color: var(--acc-ink); font-weight: 700; letter-spacing: .04em; }
.step h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 16px; text-wrap: balance; }
.step p { font-size: clamp(15.5px, 1.2vw, 17.5px); line-height: 1.65; color: var(--fg-2); margin: 0 0 1em; max-width: 52ch; text-wrap: pretty; }
.step p b { color: var(--fg); font-weight: 600; }
.step .try { font-family: var(--font-mono); font-size: 13px; color: var(--acc); }
.stack-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stack-chips span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-3); background: var(--surface); }

.tower { position: sticky; top: 84px; margin: 0; height: calc(100vh - 108px); height: calc(100dvh - 108px); max-height: 760px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; box-shadow: 0 40px 90px -60px rgba(11,14,21,.45); }
.tower-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tower-at { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--acc); white-space: nowrap; }
.tower-stage { position: relative; flex: 1; min-height: 0; background: var(--bg); }
.tower-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tw text { font-family: var(--font-mono); }
.tw .band { fill: var(--surface); stroke: var(--line); stroke-width: 1; transition: fill .5s, stroke .5s; }
.tw .lyr { transition: opacity .6s var(--ease); }
.tw .lyr.off { opacity: .13; }
.tw .lyr.on .band { fill: color-mix(in oklab, var(--acc) 7%, var(--surface)); stroke: color-mix(in oklab, var(--acc) 55%, var(--line)); }
.tw .tag { font-size: 10px; letter-spacing: .14em; fill: var(--fg-3); }
.tw .lyr.on .tag { fill: var(--acc); font-weight: 700; }
.tw .ink { fill: var(--fg); }
.tw .ink-2 { fill: var(--fg-2); }
.tw .ink-3 { fill: var(--fg-3); }
.tw .stroke-2 { stroke: var(--line-2); fill: none; }
.tw .box { fill: var(--surface); stroke: var(--line-2); }
.tw .dark { fill: #0b0e15; stroke: #2a323f; }
.tw .rail { stroke: var(--fg-3); stroke-width: 4; stroke-linecap: round; }
.tw .sensor { cursor: pointer; }
.tw .sensor .d { fill: var(--surface); stroke: var(--fg-3); stroke-width: 1.5; transition: fill .15s; }
.tw .sensor.hot .d, .tw .sensor.forced .d { fill: #f2b100; stroke: #11151c; }
.tw .sensor:focus { outline: none; }
.tw .sensor:focus-visible .d { stroke: var(--acc); stroke-width: 2.5; }
.tw .led { fill: #2a323f; transition: fill .12s; }
.tw .led.hot, .tw .led.forced { fill: #3ddc84; }
.tw .led.out.on { fill: #ff5a5f; }
.tw .led.tx.hot { fill: #f2b100; }
.tw .route { fill: none; stroke: #3f4a5c; stroke-width: 2.2; stroke-linecap: round; transition: stroke .3s; }
.tw .route[data-r="0"].lit { stroke: #5bc8ff; }
.tw .route[data-r="1"].lit { stroke: #f2b100; }
.tw .gate { stroke: var(--acc); stroke-width: 5; stroke-linecap: round; transition: stroke .2s; }
.tw .pivot { fill: var(--surface); stroke: var(--fg); stroke-width: 2; }
#tw-gate { transition: transform .18s cubic-bezier(.2,.7,.2,1); }
#tw-gate.hot .gate { filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 3px #fff); stroke-width: 7; }
#tw-gate.hot .pivot { fill: #f2b100; }
.tw .rank { transition: width .5s cubic-bezier(.2,.7,.2,1), fill .3s; }
#tw-hub.hot circle, #tw-hub.hot rect { fill: color-mix(in oklab, var(--acc) 30%, var(--surface)); }
#tw-relay.hot circle { fill: rgba(61,220,132,.35); stroke: #3ddc84; }
#tw-phone.hot { stroke: #5bc8ff; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(91,200,255,.6)); }
.tw .mach { fill: #151a23; stroke: #3ddc84; stroke-opacity: .55; transition: fill .3s; }
.tw .mach.hot { fill: rgba(61,220,132,.22); }
.tw .kv.bad { fill: #e5484d; }
.tw .smw { stroke: #8b93a3; stroke-width: 1.2; }
.tw .sm { fill: var(--surface); stroke: var(--fg-3); stroke-width: 1.4; transition: fill .2s, stroke .2s; }
.tw .sm.on { fill: var(--acc); stroke: var(--acc); filter: drop-shadow(0 0 4px var(--acc)); }
.tw .sml { font-size: 8.5px; fill: var(--fg-3); }
.tw .sml.on { fill: var(--acc); font-weight: 700; }
.tw .wire { stroke: var(--line-2); stroke-dasharray: 2 4; fill: none; }
.tw .bus { stroke: color-mix(in oklab, var(--acc) 35%, var(--line-2)); stroke-width: 2; }
.tw .pkt { fill: var(--acc); }
.tw .bar { fill: var(--acc); transition: height .4s var(--ease), y .4s var(--ease); }
.tw .site { fill: var(--surface); stroke: var(--line-2); transition: fill .2s; }
.tw .site.hot { fill: color-mix(in oklab, var(--acc) 55%, var(--surface)); stroke: var(--acc); }
.tw .note { transition: transform .5s var(--ease), opacity .5s; }
@media (max-width: 920px) {
  .climb-grid { grid-template-columns: 1fr; gap: 0; }
  /* the tower pins under the top bar; the steps scroll up beneath it */
  .tower { order: -1; top: 66px; height: 46vh; height: 46dvh; z-index: 5; border-radius: 16px; }
  .tower-bar { padding: 8px 12px; }
  .step { min-height: 62vh; padding: 6vh 0 4vh; }
  .step:first-child { padding-top: 5vh; }
  .step[data-layer="7"] { min-height: 40vh; }
  /* a short sticky frame that pans layer to layer; the finale grows it back into the whole tower */
  .tower { height: 238px; }
  .tower.whole { height: calc(100svh - 92px); max-height: 540px; }   /* short enough that the bands draw compact */
  .step.assemble { display: block; min-height: calc(100svh - 40px); padding: 0; opacity: 1; }
}

/* § 03 bio: prose only now; the photo lives in the hero */
.bio { margin-top: clamp(28px, 4vw, 48px); }

/* passes: the live one is a link */
a.pass { color: inherit; text-decoration: none; transition: transform .18s var(--ease), border-color .2s; }
a.pass:hover { transform: translateY(-3px); }
.pass .more { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--acc); }

/* weave block is a link to its case file */
a.weave { color: inherit; text-decoration: none; transition: transform .25s var(--ease), border-color .25s; }
a.weave:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--weave) 60%, var(--line-2)); }
.factory .prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--acc); text-underline-offset: 3px; }
.pile a { color: var(--fg-2); }

/* § 06 dawn: the writing list on the sunrise */
.dawn { padding-bottom: clamp(90px, 12vw, 170px); }
.dawn .prose { max-width: 70ch; }
.wlist { margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid rgba(255,255,255,.22); }
.wrow { display: grid; grid-template-columns: 70px 84px minmax(0, 1fr) 80px; gap: 16px; align-items: baseline; padding: 18px 8px; border-bottom: 1px solid rgba(255,255,255,.16); text-decoration: none; color: #fff; transition: background .2s, padding-left .25s var(--ease); border-radius: 6px; }
.wrow:hover { background: rgba(255,255,255,.07); padding-left: 16px; }
.wrow .no, .wrow .d, .wrow .rd { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; color: #f6d9c6; }
.wrow .no { color: #ffd39b; }
.wrow .rd { text-align: right; }
.wrow .ttl { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2vw, 25px); letter-spacing: -.02em; line-height: 1.2; }
.wrow .ttl small { display: block; margin-top: 6px; font-family: var(--font-body); font-weight: 400; font-size: 14.5px; letter-spacing: 0; line-height: 1.5; color: #f1e6ea; }
.wrow .arw { display: inline-block; transition: transform .22s var(--ease); }
.wrow:hover .arw { transform: translateX(4px); }
@media (max-width: 760px) {
  .wrow { grid-template-columns: auto 1fr auto; gap: 6px 12px; }
  .wrow .ttl { grid-column: 1 / -1; grid-row: 2; }
  .wrow .rd { grid-row: 1; grid-column: 3; }
}

.contact-grid .term { align-self: stretch; }
.foot.day { border-top: 1px solid var(--line); }
/* Bricolage's overlapping contours show through a plain text-stroke at hero size; paint a bg-coloured fill over the inner half */
.hero h1 .stroke { color: var(--bg); -webkit-text-stroke: 3.2px var(--fg-2); paint-order: stroke fill; }
.sec.day .stroke, .sec.night .stroke { color: var(--bg); -webkit-text-stroke-width: 2.8px; paint-order: stroke fill; }
.sec.day.hero h1 .stroke { -webkit-text-stroke-width: 3.2px; }
.dusk .then .stroke { color: #07090e; -webkit-text-stroke-width: 2.8px; paint-order: stroke fill; }
.dawn .h-sec .stroke { color: transparent; -webkit-text-stroke: 1.6px #e8c2b8; }
@media (max-width: 920px) { .tower-bar .kicker { display: none; } .tower-bar { justify-content: flex-end; } }

/* hero: the name and the photo, first thing */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 360px); grid-template-areas: "id photo" "tag photo"; column-gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero-id { grid-area: id; }
.hero-photo { grid-area: photo; margin: 0; position: relative; z-index: 2; align-self: end; }
.hero-photo .ph { aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); box-shadow: 0 40px 80px -44px rgba(11,14,21,.55); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--fg-3); }
.tagline { grid-area: tag; margin: 22px 0 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3.6vw, 50px); letter-spacing: -.025em; line-height: 1.05; }
.tagline .dim { color: var(--fg-3); }
.hero .hero-grid { margin-top: clamp(32px, 4vw, 56px); }
@media (max-width: 760px) {
  .hero-top { grid-template-columns: minmax(0, 1fr) 118px; grid-template-areas: "id photo" "tag tag"; column-gap: 16px; }
  .hero-photo .ph { border-radius: 14px; }
  .hero-photo figcaption { display: none; }
}
body.developing .hero .hero-photo { animation: develop .9s var(--ease) .2s both; }

/* binder: three sheets, no tabs */
.binder-hint { margin: 22px 0 0; }
.binder-hint .swipe { display: none; }
@media (max-width: 760px) { .binder-hint .swipe { display: inline; } }
.sheet { margin-top: clamp(36px, 5vw, 64px); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 940px; margin: 0 auto; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sheet .binder { margin-top: 16px; }
.hero .hero-grid { align-items: start; }

/* Burrow's map: the copy sits beside the quote, the map gets the full width (and scrolls sideways on phones) */
.factory { grid-template-columns: 1fr; }
.factory > .rise { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 920px) { .factory > .rise { grid-template-columns: 1fr; } }
.fmap { margin: clamp(28px, 4vw, 44px) 0 0; }
.fmap-scroll { border: 1px solid var(--line-2); border-radius: 18px; background: radial-gradient(120% 120% at 50% 0%, #0d1220, #07090e 70%); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fmap svg { display: block; width: 100%; min-width: 760px; height: auto; }
.fmap svg text { font-family: var(--font-mono); }
.fmap figcaption { margin-top: 12px; max-width: 90ch; line-height: 1.6; }
.fmap .swipe { display: none; }
@media (max-width: 800px) { .fmap .swipe { display: inline; } }

/* L0: the run draws itself when you reach the plan; the gotcha and today's milestone pulse */
.tw .plan-run { fill: none; stroke: #5bc8ff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 0; }
.tw .lyr.on .plan-run { animation: plandraw 1.8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes plandraw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.tw .gotcha circle { transform-box: fill-box; transform-origin: center; animation: gpulse 1.6s ease-in-out infinite; }
@keyframes gpulse { 50% { transform: scale(1.25); } }
.tw .mile { fill: var(--acc); }
.tw .mile.now { filter: drop-shadow(0 0 5px var(--acc)); }
.tw .mile.next { fill: var(--surface); stroke: var(--acc); stroke-dasharray: 2 2; }
@media (prefers-reduced-motion: reduce) { .tw .lyr.on .plan-run, .tw .gotcha circle { animation: none; } }
.tower-bar .kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* L0 is the bottom band: start its text lower so the tower is already pinned (L0 in view) when you read it */
@media (min-width: 921px) { .step:first-child { padding-top: 45vh; } }

/* L4 people: an avatar per operator, a bar against target; on break, they grey out */
.tw .op-av { fill: var(--acc); transition: fill .3s; }
.tw .op-bar { transition: width .6s cubic-bezier(.2,.7,.2,1), fill .3s; }
.tw .op.brk .op-av { fill: var(--fg-4); }
.tw .op.brk text.ink-2 { opacity: .5; }

/* the range: everything past the six, compact, so it reads as breadth */
.range { margin-top: clamp(40px, 5vw, 64px); }
.range .sheet-head { max-width: none; }
.range-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.mini { position: relative; display: grid; gap: 3px; padding: 12px 14px 12px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .2s, transform .18s var(--ease); }
.mini::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--hue); }
a.mini:hover { border-color: color-mix(in oklab, var(--hue) 55%, var(--line-2)); transform: translateY(-2px); }
.mini .mn { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.015em; color: var(--fg); }
.mini .mt { font-size: 13px; color: var(--fg-2); line-height: 1.4; }
.mini .ms { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: color-mix(in oklab, var(--hue) 70%, #fff); }
.mini.ping { animation: miniping 1.4s var(--ease); }
@keyframes miniping { 0%, 60% { box-shadow: 0 0 0 3px var(--hue); } 100% { box-shadow: none; } }
@media (max-width: 640px) { .range-grid { grid-template-columns: 1fr 1fr; } .mini .mn { font-size: 15px; } .mini .mt { font-size: 12px; } }

/* § 04 — night notes: short true stories in place of the commit tape */
.nnotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 22px; }
.nn { display: block; padding: 20px 20px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-2); color: inherit; text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
.nn:hover { border-color: var(--acc); transform: translateY(-2px); }
.nn-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.nn h4 { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -.025em; line-height: 1.1; margin: 10px 0 10px; color: var(--fg); text-wrap: balance; }
.nn p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); text-wrap: pretty; }
