:root {
  --ground: #f5f6f3;
  --paper: #ffffff;
  --ink: #15191f;
  --muted: #59616d;
  --line: #dde1e5;
  --plan: #8fb3d9;
  --done: #1f7a4d;
  --done-soft: #e3f1e9;
  --now: #e0861c;
  --now-ink: #8a4c00;
  --now-soft: #fdf0dd;
  --you: #b42d4f;
  --you-soft: #fbe6ec;
  --r: 10px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 16px/1.55 var(--body);
}
h1, h2 { font-family: var(--display); margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--now); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- pinned header: who + requirements ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 246, 243, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in, .reqs { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who__mark { width: 34px; height: 34px; border-radius: 8px; background: var(--ink); position: relative; flex: none; }
.who__mark::after { content: ""; position: absolute; inset: 8px; border: 2.5px solid var(--now); border-top-width: 6px; border-radius: 3px; }
.who__name { font-weight: 600; line-height: 1.2; }
.who__site { color: var(--muted); font-size: 14px; line-height: 1.2; }
.updated { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 0 rgba(31, 122, 77, .5); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(31, 122, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); } }

.reqs { padding-top: 10px; padding-bottom: 12px; }
.reqs__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.reqs__head h2 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.reqs__count { color: var(--muted); font-size: 14px; }
.reqs__toggle { margin-left: auto; background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.reqs__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 36px; overflow: hidden; transition: max-height .45s var(--ease);
}
.reqs.is-open .reqs__list { max-height: 420px; overflow: auto; }
.req { position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.3; white-space: nowrap;
}
.req__icon { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--line); }
.req--done .req__icon { background: var(--done); border-color: var(--done); }
.req--done .req__icon::after { content: ""; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.req--doing { border-color: var(--now); background: var(--now-soft); }
.req--doing .req__icon { border-color: var(--now); border-right-color: transparent; animation: spin 1.6s linear infinite; }
.req--you { border-color: var(--you); background: var(--you-soft); color: var(--you); font-weight: 600; }
.req--you .req__icon { border-color: var(--you); background: var(--you); }
.req--you .req__icon::after { content: "!"; color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.req__tag { font-size: 12px; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- stage: the one big visual ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.stage { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; padding: 48px 0 8px; }
.stage__step { font-size: 14px; font-weight: 600; color: var(--now-ink); margin-bottom: 10px; }
.stage h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1; letter-spacing: -.035em; font-weight: 800; margin-bottom: 16px; }
.stage__blurb { font-size: 18px; color: var(--muted); max-width: 30em; }
.facts { display: flex; flex-wrap: wrap; gap: 28px; margin: 28px 0 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.facts__you dd { color: var(--you); }

.site { margin: 0; }
.site svg { width: 100%; height: auto; display: block; overflow: visible; }
.plan rect, .plan path { fill: none; stroke: var(--plan); stroke-width: 1.5; stroke-dasharray: 6 6; }
.layer { opacity: 0; transition: opacity .6s var(--ease); }
.layer.is-done, .layer.is-current { opacity: 1; }

.frame { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.bar { fill: #e7eaee; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.dot { fill: #c5cbd3; }
.url { fill: #fff; stroke: #c5cbd3; stroke-width: 1.5; }
.nav { fill: var(--ink); }
.logo { fill: var(--now); }
.menu { stroke: #9aa3ad; stroke-width: 3; stroke-linecap: round; }
.hero { fill: #7fb2d9; }
.hill { fill: #4d8a6a; }
.card { fill: #fff; stroke: var(--line); stroke-width: 2; }
.pic { fill: #cfe0ef; }
.btn { fill: var(--now); }
.foot { fill: #cdd2d8; }
.txt-hero { fill: #fff; }
.photo { fill: #6f9a7f; }
.sun { fill: #f5c451; }
.txt { stroke: #b8bec6; stroke-width: 4; stroke-linecap: round; }
.check circle { fill: var(--done); }
.check path { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lock { fill: none; stroke: var(--done); stroke-width: 1.8; }
.live { fill: var(--done); }
.live-t { fill: #fff; font: 800 10px var(--display); letter-spacing: .08em; }
.confetti rect { transform-box: fill-box; animation: confetti 3.4s linear infinite; }
.confetti rect:nth-child(3n) { fill: var(--now); animation-delay: -1.1s; }
.confetti rect:nth-child(3n+1) { fill: var(--done); animation-delay: -2.3s; }
.confetti rect:nth-child(3n+2) { fill: #7fb2d9; animation-delay: -.4s; }
@keyframes confetti { from { transform: translateY(-20px) rotate(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(120px) rotate(320deg); opacity: 0; } }

/* the part being worked on: orange, outlined in moving dashes */
.layer.is-current > :not(text):not(g) { stroke: var(--now); stroke-width: 2.5; stroke-dasharray: 10 6; fill-opacity: .55; animation: march 1.2s linear infinite; }
.layer.is-current > g { opacity: .7; }
@keyframes march { to { stroke-dashoffset: -16; } }

.ground { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.ladder path { fill: none; stroke: #b08657; stroke-width: 4; stroke-linecap: round; }

/* crew */
.w .limb { stroke: #2b3440; stroke-width: 4; stroke-linecap: round; fill: none; }
.w .vest { fill: #f28c28; }
.w .stripe { stroke: #fff3c4; stroke-width: 2; }
.w .skin { fill: #e3ad84; }
.w .hat { fill: #ffc21a; }
.w .brim { stroke: #e0a400; stroke-width: 2.5; stroke-linecap: round; }
.w .tool { fill: #59616d; }
.w .handle { stroke: #8a6239; stroke-width: 3; stroke-linecap: round; }
.w .block { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.w .block-t { fill: var(--now-ink); font: 800 9px var(--display); }

.w--walk { animation: patrol 9s linear infinite; }
.w--walk .leg-a { animation: stride .5s ease-in-out infinite alternate; }
.w--walk .leg-b { animation: stride .5s ease-in-out infinite alternate-reverse; }
.w--walk .body { animation: bob .25s ease-in-out infinite alternate; }
@keyframes patrol {
  0% { transform: translate(140px, 396px) scaleX(1); }
  46% { transform: translate(470px, 396px) scaleX(1); }
  50% { transform: translate(470px, 396px) scaleX(-1); }
  96% { transform: translate(140px, 396px) scaleX(-1); }
  100% { transform: translate(140px, 396px) scaleX(1); }
}
@keyframes stride { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes bob { to { transform: translateY(-2px); } }
.w--paint .arm { animation: roll 1.1s ease-in-out infinite alternate; }
@keyframes roll { from { transform: rotate(-30deg); } to { transform: rotate(25deg); } }
.w--hammer .arm { animation: hammer .45s cubic-bezier(.5, 0, .9, .4) infinite alternate; }
@keyframes hammer { from { transform: rotate(-70deg); } to { transform: rotate(15deg); } }

.crane path { fill: none; stroke: var(--now); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.crane .crane__line { stroke-width: 2; }
.crane__load { fill: #fff; stroke: var(--now); stroke-width: 2.5; }
.crane__tag { fill: var(--now-ink); font: 800 10px var(--display); }
.crane__hoist { animation: hoist 3.2s ease-in-out infinite; }
@keyframes hoist { 50% { transform: translateY(22px); } }
.crane { transition: opacity .4s; }
.is-launched .crane, .is-launched .ladder, .is-launched .w--paint, .is-launched .w--hammer { opacity: 0; }

/* ---------- meter: pizza tracker bar ---------- */
.meter { padding: 32px 0 48px; }
.meter__bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--done), var(--done) calc(100% - 60px), var(--now)); transition: width 1.2s var(--ease); }
.meter__steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 8px; }
.step { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.step__dot { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 2px solid var(--line); background: var(--paper); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: -1px; }
.step b { display: block; color: var(--ink); font-weight: 600; }
.step--done .step__dot { background: var(--done); border-color: var(--done); color: #fff; }
.step--current .step__dot { border-color: var(--now); background: var(--now); color: #fff; box-shadow: 0 0 0 5px var(--now-soft); }
.step--current b { color: var(--now-ink); }

/* ---------- log: scrollable done / to do ---------- */
.log { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 40px; overflow: hidden; }
.log__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.log__head h2 { font-size: 22px; letter-spacing: -.02em; margin-right: auto; }
.log__filters { display: flex; gap: 4px; background: var(--ground); padding: 4px; border-radius: 999px; }
.log__filters button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; min-height: 32px; transition: background .2s, color .2s; }
.log__filters button:hover { background: var(--line); }
.log__filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.log__jump { border: 1px solid var(--ink); background: none; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; min-height: 32px; transition: background .2s, color .2s; }
.log__jump:hover { background: var(--ink); color: #fff; }
.log__scroll { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; padding: 8px 24px 24px; }
.log__list { list-style: none; margin: 0; padding: 0; position: relative; }
.log__list::before { content: ""; position: absolute; left: 11px; top: 16px; bottom: 16px; width: 2px; background: var(--line); }

.item { position: relative; display: grid; grid-template-columns: 24px 110px 1fr; gap: 0 18px; padding: 16px 0; }
.item + .item { border-top: 1px dashed var(--line); }
.item__dot { width: 24px; height: 24px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); position: relative; z-index: 1; margin-top: 1px; }
.item--done .item__dot { background: var(--done); border-color: var(--done); }
.item--done .item__dot::after { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.item--doing .item__dot { background: var(--now); border-color: var(--now); box-shadow: 0 0 0 5px var(--now-soft); }
.item--you .item__dot { background: var(--you); border-color: var(--you); }
.item__date { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.item__title { font-weight: 600; }
.item--todo .item__title { color: var(--muted); font-weight: 500; }
.item__detail { color: var(--muted); font-size: 15px; margin-top: 2px; }
.item__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ground); color: var(--muted); }
.tag--you { background: var(--you-soft); color: var(--you); }
.tag--doing { background: var(--now-soft); color: var(--now-ink); }
.item__link { font-size: 14px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.item__link:hover { color: var(--done); }

.now-marker { display: flex; align-items: center; gap: 12px; padding: 14px 0; font-size: 13px; font-weight: 700; color: var(--now-ink); letter-spacing: .04em; text-transform: uppercase; }
.now-marker::before, .now-marker::after { content: ""; height: 2px; background: var(--now); flex: 1; }
.now-marker::before { flex: none; width: 24px; }
.is-hidden { display: none !important; }

.foot { max-width: 1180px; margin: 0 auto; padding: 0 28px 48px; color: var(--muted); font-size: 14px; }
.foot__sample { margin-top: 6px; font-style: italic; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .top__in, .reqs, main, .foot { padding-left: 18px; padding-right: 18px; }
  .stage { grid-template-columns: 1fr; gap: 12px; padding-top: 28px; }
  .site { order: -1; margin: 0 -6px; }
  .stage h1 { font-size: 36px; }
  .stage__blurb { font-size: 16px; }
  .facts { gap: 20px; margin-top: 20px; }
  .facts dd { font-size: 24px; }
  .meter { padding: 24px 0 32px; }
  .meter__steps { display: flex; overflow-x: auto; gap: 18px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .step { flex: none; scroll-snap-align: start; }
  .reqs__list { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 4px; scrollbar-width: none; }
  .reqs__list::-webkit-scrollbar { display: none; }
  .reqs.is-open .reqs__list { flex-wrap: wrap; max-height: 50vh; }
  .updated span:last-child { font-size: 13px; }
  .log__head { padding: 16px; }
  .log__scroll { max-height: 70vh; padding: 4px 16px 16px; }
  .item { grid-template-columns: 24px 1fr; gap: 2px 14px; }
  .item__date { grid-column: 2; grid-row: 1; padding: 0; font-size: 13px; }
  .item__body { grid-column: 2; }
}
@media (max-width: 420px) {
  .who__site { display: none; }
  .log__filters button { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.meter__fill.is-full { background: var(--done); }
