@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --paper: #fdfcf9;
  --ink: #1c1a17;
  --muted: #5b564d;
  --rule: #ddd7ca;
  --rider: #a63c17;
  --lit: #f3cd55;
  --dark: #2b2824;
  --night: #222632;
  --night-yard: #181b24;
  --pad: 20px;
  color-scheme: light;
  accent-color: var(--rider);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  --field: #fff;
  --card: #fff;
  margin: 0;
  transition: background-color 900ms ease-in-out 300ms, color 250ms linear 650ms;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.45 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--lit); color: var(--ink); }
a { color: var(--rider); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
main, .sign, .foot { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 var(--pad); }
main { flex: 1; }

/* Yard sign */
.sign { padding-top: 22px; position: relative; }
.sign::before { /* post arm */
  content: ""; display: block; height: 6px; background: var(--ink); width: min(300px, 82%); margin-left: -2px;
}
.sign::after { /* post */
  content: ""; position: absolute; left: calc(var(--pad) - 2px); top: 22px; width: 6px; height: 132px; background: var(--ink);
}
.sign-board {
  display: inline-block; position: relative; margin: 16px 0 0 34px;
  padding: 14px 18px 12px; border: 3px solid var(--ink); background: var(--paper);
  color: var(--ink); text-decoration: none;
}
.sign-board::before, .sign-board::after { /* chains */
  content: ""; position: absolute; top: -19px; width: 2px; height: 16px; background: var(--ink);
}
.sign-board::before { left: 18px; } .sign-board::after { right: 18px; }
.sign-title {
  display: block; font-weight: 800; font-stretch: 68%; text-transform: uppercase;
  font-size: 40px; line-height: .92; letter-spacing: .01em;
}
.sign-rider {
  display: inline-block; margin: 6px 0 0 34px; padding: 5px 10px;
  background: var(--rider); color: #fff; font-weight: 700; font-stretch: 80%;
  font-size: 14px; letter-spacing: .02em; text-transform: uppercase;
}

/* Ask */
.ask { margin-top: 28px; }
.ask label { display: block; font-weight: 600; margin-bottom: 6px; }
.ask-row { display: flex; gap: 8px; }
.ask input {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 12px 12px;
  border: 2px solid var(--ink); border-radius: 0; background: var(--field); color: var(--ink);
}
.ask input::placeholder { color: #8a8478; }
.ask button, .samples button {
  font: inherit; cursor: pointer; border-radius: 0;
}
.ask-row button {
  font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .03em; font-size: 18px;
  padding: 0 18px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
}
.ask-row button:hover { background: var(--rider); border-color: var(--rider); }
.ask-row button:disabled { background: var(--muted); border-color: var(--muted); cursor: progress; }
.ask-error { color: var(--rider); font-weight: 600; margin: 8px 0 0; }
.samples { margin-top: 16px; font-size: 15px; color: var(--muted); }
.samples ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.samples button {
  font-size: 15px; padding: 7px 10px; background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink);
}
.samples button:hover { background: var(--ink); color: var(--paper); }
.samples button:disabled { opacity: .5; cursor: progress; }

.proof { margin: 28px 0 0; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 17px; max-width: 34em; }
.proof strong { font-weight: 800; font-stretch: 75%; font-size: 30px; line-height: 1; display: block; margin-bottom: 4px; font-variant-numeric: tabular-nums; }

/* Flyer */
.flyer { margin-top: 28px; border-top: 2px solid var(--ink); padding-top: 18px; }
.open-tag {
  display: inline-block; margin: 0; padding: 3px 8px; border: 2px solid var(--rider); color: var(--rider);
  font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; font-size: 14px;
}
.flyer-addr { font-weight: 800; font-stretch: 72%; font-size: 30px; line-height: 1.02; text-transform: uppercase; margin: 10px 0 4px; overflow-wrap: anywhere; }
.flyer-count { margin: 0; color: var(--muted); }
.flyer-body { display: grid; gap: 18px; margin-top: 14px; }
@media (min-width: 720px) { .flyer-body { grid-template-columns: 1fr 1fr; align-items: start; gap: 32px; } .house { position: sticky; top: 16px; } }

.house-art { position: relative; }
.house { margin: 0; width: 100%; max-width: 460px; justify-self: center; }
@media (max-width: 719px) { .house { max-width: none; } .house-art { margin: 0 calc(-1 * var(--pad)); } }
.house svg { display: block; width: 100%; height: auto; }
/* Night falls. Dusk while the house is unchecked or quiet; each kind of record found makes it later
   (JS sets n1..n4 on the figure, cumulative). Everything below is the one authored moment. */
.house { --wall: #fdfcf9; --ground: #ddcdab; --ease: cubic-bezier(.2,.7,.2,1); --ink: #1c1a17; --paper: #fdfcf9; --dark: #2b2824; --rule: #ddd7ca; --muted: #5b564d; }
.house.dusk .sky-night { opacity: .4; } .house.dusk .stars.s1 { opacity: .45; } .house.dusk .fog { opacity: .5; }
.house .wall { fill: var(--wall); transition: fill 1200ms var(--ease) 600ms; }
.house .chimney { fill: var(--wall); transform-box: fill-box; transform-origin: 50% 100%; transition: fill 1200ms var(--ease) 600ms, transform 900ms var(--ease) 1500ms; }
.house .yard { fill: var(--ground); transition: fill 1400ms var(--ease); }
.house .horizon { stroke: var(--wall); transition: stroke 1200ms var(--ease) 600ms; }
.house .sky-night { opacity: 0; transition: opacity 1400ms var(--ease); }
.house.loading-sky .sky-night { opacity: .3; }
.house .stars, .house .moon, .house .wear, .house .fog, .house .rider { opacity: 0; }
.house .stars { transition: opacity 900ms ease-out 700ms; }
.house .moon { translate: 0 14px; transition: opacity 1000ms ease-out 500ms, translate 1400ms var(--ease) 500ms; }
.house .wear { transition: opacity 700ms ease-out; }
.house .w1 { transition-delay: 1100ms; } .house .w2 { transition-delay: 1300ms; } .house .w3 { transition-delay: 1500ms; } .house .w4 { transition-delay: 1700ms; }
.house .tree { transform-box: fill-box; transform-origin: 50% 100%; scale: 1 .6; transition: opacity 700ms ease-out 1500ms, scale 1100ms var(--ease) 1500ms; }
.house .fog { transition: opacity 1200ms ease-out 400ms; animation: drift 11s ease-in-out infinite alternate; }
.house .fog ellipse, .house .fog2 ellipse { fill: #c9cfdc; opacity: .5; }
.house .cloud { fill: #4a5166; }
.house .sign-text { font: 800 9.5px "Archivo", system-ui, sans-serif; font-stretch: 70%; letter-spacing: .04em; fill: #1c1a17; }
.house .rider-text { font: 800 8px "Archivo", system-ui, sans-serif; font-stretch: 72%; letter-spacing: .05em; fill: #fff; }
.house .rider { transform-box: view-box; transform-origin: 381px 236px; translate: 0 -10px; rotate: 8deg; transition: opacity 300ms ease-out, translate 700ms var(--ease), rotate 1400ms cubic-bezier(.3,1.6,.5,1); transition-delay: var(--rider-at, 1700ms); }
.house.done .rider { opacity: 1; translate: 0 0; rotate: 0deg; }
.house.n0 .sky-night { opacity: .1; }
.house.n1 { --ground: #1d212c; } .house.n1 .sky-night { opacity: .82; } .house.n1 .stars.s1, .house.n1 .moon { opacity: 1; translate: 0 0; } .house.n1 .w1 { opacity: 1; } .house.n1 .fog { opacity: .7; }
.house.n2 { --wall: #f1ece1; --ground: #171a23; } .house.n2 .sky-night, .house.n2 .stars.s2, .house.n2 .w2, .house.n2 .fog { opacity: 1; }
.house.n3 { --wall: #e7e0d0; } .house.n3 .w3 { opacity: 1; } .house.n3 .tree { scale: 1 1; } .house.n3 .chimney { transform: rotate(-5deg); }
.house.n4 .w4 { opacity: 1; } .house.n4 .moon circle { fill: #e0745c; }
@keyframes drift { to { transform: translateX(22px); } }
.sound {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); cursor: pointer;
}
.sound svg { width: 22px; height: 22px; }
.sound .on, .sound[aria-pressed="true"] .off { display: none; }
.sound[aria-pressed="true"] .on { display: inline; }
.sound:hover { background: var(--lit); }
.windows { position: absolute; inset: 0; }
.win {
  position: absolute; padding: 0; border: 3px solid var(--ink); background: var(--dark);
  display: grid; place-items: center; overflow: hidden; cursor: default; color: var(--ink);
}
.win.round { border-radius: 50%; }
.win svg { width: 72%; height: 86%; }
.win.lit { background: var(--lit); cursor: pointer; box-shadow: 0 6px 18px rgba(243, 205, 85, .45); }
.win.lit:hover { background: #f7dc84; }
.win.lit.faded { background: #e9dcae; box-shadow: 0 4px 10px rgba(243, 205, 85, .2); }
.win.faded .ghost use, .resident.faded svg use, .key-ghost.faded use { opacity: .42; }
.win.unknown { background: var(--paper); border-style: dashed; cursor: pointer; font-weight: 800; font-size: 20px; }
.win.pending { background: var(--rule); }
.win .dots { font-weight: 800; font-size: 20px; color: var(--muted); animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.win .n {
  position: absolute; right: 2px; bottom: 1px; font-size: 12px; font-weight: 800; line-height: 1;
  background: var(--ink); color: var(--paper); padding: 2px 3px; font-variant-numeric: tabular-nums;
}
.win.round .n { right: auto; left: 50%; transform: translateX(-50%); bottom: 3px; }
.win.round svg { width: 58%; height: 62%; margin-bottom: 18%; }
.win .ghost { transform: translateY(0); opacity: 1; }
.rise .win.lit { animation: flicker 620ms steps(1, end) both; animation-delay: calc(var(--i) * 140ms + 400ms); }
@keyframes flicker { 0% { background: var(--dark); box-shadow: none; } 18% { background: var(--lit); } 30% { background: var(--dark); box-shadow: none; } 46% { background: var(--lit); } 58% { background: var(--dark); box-shadow: none; } 72% { background: var(--lit); } }
.rise .win.lit .ghost { animation: rise 640ms cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 140ms + 960ms); }
.rise .win.lit .n { animation: fadein 300ms ease-out both; animation-delay: calc(var(--i) * 140ms + 1200ms); }
@keyframes fadein { from { opacity: 0; } }
@keyframes rise { from { translate: 0 70%; opacity: 0; } 60% { translate: 0 -12%; opacity: 1; } to { translate: 0 0; opacity: 1; } }
.win.lit:not(.faded) .ghost use { animation: hover 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.1s); }
@keyframes hover { 50% { transform: translateY(-5px); } }
.ghost-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.ghost-key[hidden] { display: none; }
.key-ghost { display: inline-flex; align-items: center; gap: 6px; }
.key-ghost svg { width: 16px; height: 19px; }
.key { display: none; }
.idle .key { display: block; margin-top: 22px; }
.key-list { list-style: none; padding: 0; margin: 0; }
.key-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 9px 0; border-top: 1.5px solid var(--rule); font-size: 15px; color: var(--muted); }
.key-list b { display: block; color: var(--ink); font-weight: 700; }
.key-win { width: 20px; height: 22px; margin-top: 3px; border: 2.5px solid var(--ink); background: var(--lit); }
.key-win.round { height: 20px; border-radius: 50%; }
.loading .win { background: var(--dark); }
.loading .win svg, .loading .win .n { display: none; }

.roster-title { font-weight: 800; font-stretch: 72%; text-transform: uppercase; font-size: 22px; margin: 0 0 8px; letter-spacing: .01em; }
.residents, .neighbours, .nearest { list-style: none; padding: 0; margin: 0; }
.resident { border-top: 1.5px solid var(--rule); }
.resident:last-child { border-bottom: 1.5px solid var(--rule); }
.resident button {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.resident button:hover .plate { color: var(--rider); }
.resident svg { width: 36px; height: 44px; }
.resident.checked-clear { padding: 9px 0 9px 52px; }
.resident.checked-clear .kind { display: inline; }
.resident.checked-clear .kind::after { content: " · "; }
.resident.checked-clear .meta { display: inline; font-size: 14px; line-height: 1.4; }
.kind { display: block; font-size: 14px; color: var(--muted); font-weight: 600; }
.plate { display: block; font-weight: 800; font-stretch: 85%; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.meta { display: block; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.more { font-weight: 800; color: var(--rider); font-size: 20px; }
.neighbours { margin-top: 14px; }
.neighbours li { font-size: 15px; color: var(--muted); padding: 8px 0; }
.neighbours strong { color: var(--ink); }
.quiet-line { font-weight: 800; font-stretch: 72%; text-transform: uppercase; font-size: 28px; margin: 0 0 6px; line-height: 1; }
.quiet p { margin: 0 0 8px; }
.nearest li { padding: 8px 0; border-top: 1.5px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.nearest li span:last-child { color: var(--muted); text-align: right; }
.fine { font-size: 14px; color: var(--muted); margin: 22px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); max-width: 40em; }

.idle-note { display: none; }
.idle .flyer-head, .idle .roster > :not(.key):not(.proof), .idle .fine { display: none; }
.idle .roster .proof { margin-top: 0; }
@media (min-width: 720px) { .idle .flyer-body { align-items: center; } }
.idle { border-top: 0; margin-top: 8px; }
.idle .idle-note { display: block; text-align: center; color: var(--muted); font-size: 15px; margin-top: 8px; }
.idle .flyer-body { margin-top: 0; }

/* Sheet */
.sheet {
  width: min(560px, 100%); max-width: 100%; max-height: 86dvh; margin: auto auto 0; padding: 18px var(--pad) 26px;
  border: 0; border-top: 3px solid var(--ink); background: var(--paper); color: var(--ink);
}
@media (min-width: 720px) { .sheet { margin: auto; border: 3px solid var(--ink); } }
.sheet::backdrop { background: rgba(28,26,23,.45); }
.sheet[open] { animation: sheet 220ms ease-out; }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
.sheet-close { position: sticky; top: 0; display: flex; justify-content: flex-end; }
.sheet-close button { font: inherit; font-weight: 700; background: var(--paper); border: 1.5px solid var(--ink); padding: 6px 12px; cursor: pointer; }
.sheet h2 { font-weight: 800; font-stretch: 72%; text-transform: uppercase; font-size: 28px; line-height: 1; margin: 4px 0 10px; }
.sheet .what { margin: 0 0 12px; }
.sheet .step { margin: 14px 0; padding: 10px 12px; border: 1.5px solid var(--ink); background: var(--card); }
.sheet .step b { display: block; }
.sheet details.more summary { cursor: pointer; font-weight: 700; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.records { list-style: none; padding: 0; margin: 0; }
.records li { padding: 10px 0; border-top: 1.5px solid var(--rule); }
.records .plate { font-size: 17px; }
.src { font-size: 14px; color: var(--muted); margin-top: 14px; }

.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; padding-top: 28px; padding-bottom: 26px; font-size: 14px; color: var(--muted); }

/* Methods page */
.doc { max-width: 40em; }
.doc h1 { font-weight: 800; font-stretch: 72%; text-transform: uppercase; font-size: 34px; line-height: 1; margin: 28px 0 12px; }
.doc h2 { font-weight: 800; font-stretch: 78%; font-size: 22px; margin: 28px 0 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.doc th, .doc td { text-align: left; padding: 8px 6px 8px 0; border-top: 1.5px solid var(--rule); vertical-align: top; }
.doc th { font-weight: 700; }
.doc code { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .doc table.rules, .doc .rules tbody, .doc .rules tr, .doc .rules td { display: block; }
  .doc .rules thead { display: none; }
  .doc .rules tr { border-top: 1.5px solid var(--rule); padding: 8px 0; }
  .doc .rules td { border-top: 0; padding: 2px 0; }
}
.doc .big { font-weight: 800; font-stretch: 75%; font-size: 30px; }

@media (prefers-reduced-motion: reduce) {
  .rise .win.lit .ghost, .rise .win.lit, .rise .win.lit .n, .sheet[open], .win .dots, .win.lit .ghost use, .house .fog { animation: none; }
  .house *, .house .wear, .house .fog, .house .chimney, .house .rider, .house .tree, .house .moon { transition: none !important; }
}
@media (max-width: 600px) { .flyer-addr { font-size: 24px; } }
@media (max-width: 360px) { .sign-title { font-size: 34px; } .ask-row { flex-direction: column; } .ask-row button { padding: 12px; } }
.credit { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* The page takes on the night (US-32). body.night: at least one live kind (open case, listed site, flood zone,
   radon geology). body.dusk: only old, closed cases. The house drawing keeps its own colours (scoped above). */
body.night {
  --paper: #10131b; --ink: #ece6d6; --muted: #a8a294; --rule: #2b3040; --rider: #e8806a; --field: #171b26; --card: #171b26;
  color-scheme: dark;
}
body.dusk { --paper: #ece4d4; --rule: #cfc5b0; --field: #f6f1e6; --card: #f6f1e6; }
body.night .sign-rider { background: #a63c17; }
body.night .ask input::placeholder { color: #807a6e; }
body.night .ask-row button { background: var(--ink); color: #10131b; border-color: var(--ink); }
body.night .ask-row button:hover { background: var(--rider); border-color: var(--rider); }
body.night .samples button:hover { background: var(--ink); color: #10131b; }
body.night .resident svg path, body.night .guide svg path { fill: #ece6d6; }
body.night .sheet::backdrop { background: rgba(0,0,0,.6); }
body.night .flyer, body.night .proof { border-color: var(--ink); }
body.night ::selection { color: #1c1a17; }

/* The guide ghost: one plain sentence on where to start; tapping it opens that window's records. */
.guide {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; width: 100%; margin: 0 0 16px;
  padding: 12px 14px; border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.4; text-align: left; cursor: default;
}
.guide[hidden] { display: none; }
.guide.go { cursor: pointer; }
.guide.go .guide-text::after { content: " ›"; color: var(--rider); font-weight: 800; }
.guide.go:hover { border-color: var(--rider); }
.guide svg { width: 34px; height: 41px; animation: hover 3.6s ease-in-out infinite; }
.rise .guide { animation: fadein 500ms ease-out both; animation-delay: 1900ms; }
/* The window the guide talks about beckons: a slow ring, after the ghosts have risen. */
.win.beckon { outline: 3px solid #e0745c; outline-offset: 3px; animation: beckon 2.4s ease-in-out 2.2s infinite; }
.win.round.beckon { outline: none; box-shadow: 0 0 0 3px #e0745c, 0 6px 18px rgba(243, 205, 85, .45); }
@keyframes beckon { 50% { outline-offset: 7px; outline-color: rgba(224,116,92,.35); } }
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  .guide svg, .rise .guide, .win.beckon { animation: none; }
}
