/* McLean Local — styles
   Design: warm paper, deep forest green, brass accents; Fraunces for display, Atkinson
   Hyperlegible Next (designed for low-vision readers) for everything you read.
   Built for older and non-technical visitors first: big type, big targets, plain words. */

/* ------------------------------------------------------------------ fonts */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/fraunces-latin-opsz-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/fraunces-latin-ext-opsz-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(../fonts/fraunces-latin-opsz-italic.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2) format('woff2'); }

/* ------------------------------------------------------------------ tokens */
:root {
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --bg: #fbf8f1;
  --bg-2: #f3eee3;
  --bg-3: #ebe4d5;
  --surface: #ffffff;
  --surface-2: #fdfbf6;
  --ink: #15201a;
  --ink-2: #34413a;
  --muted: #56625b;
  --line: #e5dece;
  --line-strong: #cdc3ad;

  --primary: #1f4a37;
  --primary-hover: #163828;
  --primary-ink: #ffffff;
  --primary-soft: #e2efe6;
  --brass: #8f5d12;
  --brass-bright: #e0ac4c;
  --hero-gold: #e6b558; /* "McLean" on a dark sky: a little brighter than the brass, for 3:1 at first light */

  --open: #146c3b;
  --open-soft: #dff2e6;
  --closing: #8f4f00;
  --closing-soft: #fdefd8;
  --closed: #6b5a4c;
  --closed-soft: #f1ebe3;
  --focus: #1b5fd9;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-1: 0 1px 2px rgba(21, 32, 26, .06), 0 4px 14px rgba(21, 32, 26, .05);
  --shadow-2: 0 2px 6px rgba(21, 32, 26, .07), 0 18px 44px -10px rgba(21, 32, 26, .22);
  --shadow-3: 0 30px 90px -20px rgba(10, 24, 17, .45);
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Default sky (daytime) so the scene looks right before JavaScript runs. */
  --sky-top: #3f8fd6; --sky-mid: #8cc4ec; --sky-bot: #dff0f9; --sun: #fffbe8; --sun-glow: #fff0bf;
  --cloud: #ffffff; --cloud-op: .9; --far: #9fb2c4; --hill-far: #8fae9a; --river-top: #9fd0ec; --river-bot: #5e95bb;
  --bridge: #7b878e; --palisade: #6b7a71; --hill-mid: #5a8c5f; --house: #d3c3a6; --hill-near: #3d6c46; --canopy: #285131;
  --stars: 0; --windows: 0; --sun-op: 1; --moon-op: 0;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1411;
    --bg-2: #141c18;
    --bg-3: #1b2520;
    --surface: #172019;
    --surface-2: #1b251f;
    --ink: #eeebe3;
    --ink-2: #d0d4cc;
    --muted: #a5aea7;
    --line: #2a3630;
    --line-strong: #3d4b44;
    --primary: #8fd4ae;
    --primary-hover: #a9e2c2;
    --primary-ink: #0b1810;
    --primary-soft: #1d3328;
    --brass: #e7b85e;
    --open: #7fdba6;
    --open-soft: #173527;
    --closing: #f2bd6b;
    --closing-soft: #3a2a12;
    --closed: #c3b6aa;
    --closed-soft: #2a2622;
    --focus: #8ab4ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 44px -10px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

@media (min-width: 720px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-textsize="large"] { font-size: 125%; }
html[data-textsize="xlarge"] { font-size: 143.75%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
.wrap { width: min(1200px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: .8rem 1.2rem; border-radius: 12px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------------ header */
.topbar { position: relative; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
/* Wraps rather than clipping: at Larger and Largest text, or 320px wide, the buttons drop to a second row.
   The gap is only a minimum (the nav's auto margin spaces them), kept small so 375px phones fit on one row. */
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; min-height: 72px; padding-block: .4rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); border-radius: 14px; }
.brand-mark { width: 44px; height: 44px; }
.bm-bg { fill: var(--primary); }
@media (prefers-color-scheme: dark) { .bm-bg { fill: #1f4a37; } }
.bm-sun { fill: var(--brass-bright); }
.bm-tree { fill: #f7f1e3; }
.bm-ground { stroke: #f7f1e3; stroke-width: 2; stroke-linecap: round; opacity: .7; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand-name em { color: var(--brass); font-weight: 500; }
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .4rem; margin-left: auto; }
.tbtn {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: .5rem .9rem;
  border-radius: 14px; border: 1.5px solid transparent; background: transparent; color: var(--ink);
  font-weight: 650; text-decoration: none; font-size: .95rem; white-space: nowrap;
}
.tbtn:hover { background: var(--bg-2); }
.tbtn-accent { border-color: var(--line-strong); background: var(--surface); }
.tbtn-accent:hover { border-color: var(--primary); background: var(--surface); }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 250px; padding: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2);
}
.menu-title { font-size: .9rem; color: var(--muted); padding: .3rem .6rem .5rem; }
.menu button {
  display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 52px; padding: .5rem .7rem;
  border: 0; border-radius: 12px; background: transparent; text-align: left; font-weight: 600;
}
.menu button:hover { background: var(--bg-2); }
.menu button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.menu-a { width: 2rem; text-align: center; font-family: var(--font-display); font-weight: 700; line-height: 1; }
@media (max-width: 640px) {
  .tbtn-accent { display: none; }
  .tbtn { padding: .5rem .75rem; border: 1.5px solid var(--line-strong); }
  .topbar-inner { min-height: 64px; }
  .brand-name { font-size: 1.25rem; }
  .brand { gap: .5rem; }
}
@media (max-width: 360px) {
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1.15rem; }
}

/* ------------------------------------------------------------------ hero */
.hero {
  --hero-ink: #10201a;
  --hero-ink-2: #263a30;
  position: relative; isolation: isolate;
  min-height: clamp(560px, 84vh, 880px);
  display: grid; align-items: center;
  padding: 2.5rem 0 10rem;
  color: var(--hero-ink);
  transition: min-height .5s var(--ease), padding .5s var(--ease);
}
.hero[data-sky-tone="dark"] { --hero-ink: #ffffff; --hero-ink-2: #e7ecf5; }
.scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero.sug-open { z-index: 10; }
.scene-svg { width: 100%; height: 100%; }
.scene-fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; background: linear-gradient(to bottom, transparent, var(--bg)); }
.scene .stars { fill: #fff; opacity: var(--stars); transition: opacity 2s; }
/* Decorative motion plays briefly and stops (WCAG 2.2.2) instead of repainting the hero forever. Each star waits
   up to 2s (tools/gen-hero.mjs), so the last one is still within 5s of the page opening. */
.scene .twinkle circle { animation: twinkle 3s ease-in-out; transform-box: fill-box; transform-origin: center; }
.sun { opacity: var(--sun-op); transition: transform 2s var(--ease), opacity 2s; }
.sun-disk { fill: var(--sun); }
.moon { opacity: var(--moon-op); transition: opacity 2s; }
.moon-disk { fill: #f4f1e4; }
.moon-shade { fill: var(--sky-top); }
.cloud { fill: var(--cloud); opacity: var(--cloud-op); }
.hill-far { fill: var(--hill-far); }
.skyline path { fill: var(--far); }
.windows { fill: #ffd58a; opacity: var(--windows); transition: opacity 3s; }
.beacon { fill: #ff5b4f; opacity: var(--windows); animation: blink 2.5s steps(1) 2; }
.palisade { fill: var(--palisade); }
.river-shine { stroke: #fff; stroke-opacity: .35; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.bridge-piers path { fill: var(--palisade); }
.bridge-deck { fill: var(--bridge); }
.bridge-truss { fill: none; stroke: var(--bridge); stroke-width: 2.2; stroke-linejoin: round; }
.bridge-lamps { fill: #ffe2a0; opacity: var(--windows); transition: opacity 3s; }
.hill-mid { fill: var(--hill-mid); }
.houses path { fill: var(--house); }
.roofs path { fill: var(--palisade); }
.holiday-lights { opacity: calc(var(--windows, 0) * var(--holiday, 0)); }
.holiday-lights .l0 { fill: #ff6b5e; } .holiday-lights .l1 { fill: #ffd36b; }
.holiday-lights .l2 { fill: #7fe0a0; } .holiday-lights .l3 { fill: #8fc2ff; }
.hill-near { fill: var(--hill-near); }
.canopy-front { fill: var(--canopy); }

.hero-inner { text-align: center; position: relative; min-width: 0; }
.hello {
  display: inline-flex; align-items: center; gap: .6rem; padding: .4rem 1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .7); color: #1b2a22; font-weight: 650; font-size: .95rem;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.hero[data-sky-tone="dark"] .hello { background: rgba(8, 16, 28, .45); color: #f4f1ea; box-shadow: none; border: 1px solid rgba(255, 255, 255, .14); }
.hello-time:not(:empty)::before { content: '·'; margin-right: .6rem; opacity: .6; }
.hello-sun:empty { display: none; }
@media (max-width: 520px) { .hello-sun { display: none; } }
.hero-title {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 5.4vw + .6rem, 5.4rem);
  line-height: 1.02; letter-spacing: -.028em; margin: 1.1rem auto .9rem; max-width: 14ch;
  /* A halo in the opposite tone to the letters keeps them clear at sunrise and sunset, when the sky (and the
     clouds) behind them run from dark to light. sky.js counts on it, so keep the colours in step with its HALO. */
  text-shadow: 0 0 .15em rgba(255, 255, 255, .7), 0 2px 30px rgba(255, 255, 255, .35);
}
.hero[data-sky-tone="dark"] .hero-title { text-shadow: 0 0 .15em rgba(8, 16, 28, .7), 0 2px 30px rgba(8, 16, 28, .35); }
.hero-title em { font-style: italic; font-weight: 500; color: #462b06; } /* 4:1 or more on daytime skies; large text needs 3:1 */
.hero[data-sky-tone="dark"] .hero-title em { color: var(--hero-gold); }
.hero-lede { font-size: 1.22rem; width: fit-content; max-width: 34em; margin: 0 auto; padding: .45rem 1rem; border-radius: 18px; color: var(--hero-ink-2); font-weight: 500; }
/* The sky behind these changes colour all day, so they sit on a frosted backing like .hello's (sky.js's BACKING). */
.hero-lede, .search-label { background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero[data-sky-tone="dark"] :is(.hero-lede, .search-label) { background: rgba(8, 16, 28, .55); }

/* search */
.search { position: relative; max-width: 780px; margin: 2rem auto 0; text-align: left; z-index: 5; }
.search-label { display: block; width: fit-content; padding: .3rem .85rem; border-radius: 14px; font-weight: 650; margin: 0 0 .55rem .35rem; font-size: 1.02rem; color: var(--hero-ink); }
.search-box {
  --lift: 0 24px 60px -16px rgba(8, 26, 17, .5), 0 4px 12px rgba(8, 26, 17, .08);
  display: flex; align-items: center; gap: .25rem; background: var(--surface); color: var(--ink);
  border-radius: 24px; padding: .45rem .45rem .45rem 1.15rem; min-height: 76px;
  box-shadow: 0 0 0 1px rgba(10, 30, 20, .08), var(--lift);
}
/* A ring outside the box would sit on the sky, which can be any colour, so it's drawn on the box itself.
   The transparent outline shows up in Windows High Contrast, where shadows are removed. */
.search-box:focus-within { outline: 3px solid transparent; outline-offset: 3px; box-shadow: inset 0 0 0 3px var(--focus), var(--lift); }
.search-icon { color: var(--muted); width: 1.5em; height: 1.5em; }
#q { flex: 1 1 0%; width: 0; min-width: 0; border: 0; background: transparent; font-size: 1.32rem; padding: .8rem .6rem; color: var(--ink); }
#q::placeholder { color: var(--muted); opacity: 1; }
#q:focus { outline: none; }
#q::-webkit-search-cancel-button, #q::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-clear, .search-mic {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 52px; height: 52px;
  border: 0; border-radius: 16px; background: transparent; color: var(--ink-2); padding: 0 .7rem; font-weight: 650;
}
.search-clear:hover, .search-mic:hover { background: var(--bg-2); }
.search-mic .icon, .search-clear .icon { width: 1.45em; height: 1.45em; }
.search-mic[data-listening] { background: #fde8e6; color: #a1261b; animation: listen 1.2s ease-in-out infinite; }
.search-go {
  display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 18px; min-height: 60px;
  padding: 0 1.45rem; background: var(--primary); color: var(--primary-ink); font-weight: 750; font-size: 1.15rem;
  transition: background .2s, transform .2s var(--ease);
}
.search-go:hover { background: var(--primary-hover); }
.search-go:active { transform: scale(.98); }
@media (prefers-color-scheme: dark) { .search-box { --lift: 0 24px 60px -16px rgba(0, 0, 0, .7); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--lift); } }
@media (max-width: 560px) {
  .search-box { flex-wrap: wrap; padding: .5rem; gap: .35rem; }
  .search-icon { display: none; }
  #q { flex-basis: 100%; order: -1; padding: .7rem .7rem; font-size: 1.25rem; }
  .search-go { flex: 1; justify-content: center; }
  .mic-label { display: none; }
  .search-clear, .search-mic { height: 60px; min-width: 60px; border: 1.5px solid var(--line); }
}

/* suggestions */
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); list-style: none; padding: .45rem; margin: 0;
  background: var(--surface); color: var(--ink); border-radius: 22px; border: 1px solid var(--line);
  box-shadow: var(--shadow-3); max-height: min(70vh, 520px); overflow: auto; z-index: 20;
}
.sug { display: flex; align-items: center; gap: .85rem; padding: .6rem .7rem; min-height: 60px; border-radius: 14px; cursor: pointer; }
.sug[aria-selected="true"], .sug:hover { background: var(--bg-2); }
/* Focus stays in the search box while arrowing through, so this ring is the only sign of what Enter opens. */
.sug[aria-selected="true"] { box-shadow: inset 0 0 0 3px var(--focus); }
.sug-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--c-bg, var(--bg-2)); color: var(--c-fg, var(--ink-2)); }
.sug-text { display: grid; min-width: 0; }
.sug-label { font-weight: 700; font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-label mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--brass-bright); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.sug-sub { color: var(--muted); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-count { margin-left: auto; font-size: .88rem; color: var(--muted); white-space: nowrap; padding-left: .5rem; }
.sug-kind { margin-left: auto; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* quick chips */
.quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .55rem; margin-top: 1.35rem; }
.quick-label {
  font-weight: 700; color: #15201a; font-size: .98rem; padding: .35rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero[data-sky-tone="dark"] .quick-label { background: rgba(10, 18, 30, .45); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .45rem 1.05rem; border-radius: 999px;
  background: rgba(255, 255, 255, .86); color: #15201a; font-weight: 650; text-decoration: none; font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 3px 14px rgba(10, 30, 20, .1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s var(--ease), background .2s;
}
.chip:hover { background: #fff; transform: translateY(-2px); }
.hero[data-sky-tone="dark"] .chip { background: rgba(10, 18, 30, .5); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
.hero[data-sky-tone="dark"] .chip:hover { background: rgba(10, 18, 30, .7); }
/* Like the search box: a ring inside the chip's own backing, in its text colour, shows on any sky. */
.hero .chip:focus-visible { outline-color: transparent; box-shadow: inset 0 0 0 3px currentColor; }
.dot { width: .62rem; height: .62rem; border-radius: 50%; flex: none; display: inline-block; }
.dot-open { background: #2bb46a; box-shadow: 0 0 0 4px rgba(43, 180, 106, .22); }

/* hero in results mode: just the search, on a slim band of treetops */
.hero[data-mode="results"] { min-height: 0; padding: 1.6rem 0 4.6rem; }
.hero[data-mode="results"] .hello,
.hero[data-mode="results"] .hero-title,
.hero[data-mode="results"] .hero-lede,
.hero[data-mode="results"] .quick { display: none; }
.hero[data-mode="results"] .search { margin-top: 0; }
/* Behind the search box on results pages: just sky and a calm band of treetops. */
.hero[data-mode="results"] :is(.layer-river, .skyline, .city-windows, .beacon, .houses, .roofs, .house-windows, .holiday-lights, .sun, .moon, .clouds) { display: none; }
.hero[data-mode="results"] .layer { transform: none !important; }

/* "Having trouble?" and the load-failure message sit under the search box, on the sky. The page's green link
   can't be read on a night sky, so they get a card of their own. Don't set display here: [hidden] must still win. */
.boot-fallback {
  max-width: 780px; margin: 1rem auto 0; padding: .85rem 1.15rem; border-radius: 16px; font-size: 1.1rem; text-align: left;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1);
}
.boot-fallback .linklike { color: var(--primary); font-weight: 700; } /* "Try again" */

/* ------------------------------------------------------------------ sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { display: grid; gap: .45rem; margin-bottom: 1.5rem; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 2.6vw + 1rem, 2.75rem); letter-spacing: -.02em; }
.section-sub { color: var(--ink-2); font-size: 1.1rem; }

/* category tiles */
.tiles { list-style: none; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 172px), 1fr)); }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr 1fr; gap: .7rem; } }
.tile a, .tile button {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; height: 100%; width: 100%;
  padding: 1.1rem 1.1rem 1.05rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; text-align: left; box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.tile a:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.tile-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--c-bg); color: var(--c-fg); transition: transform .35s var(--ease); }
.tile-icon .icon { width: 30px; height: 30px; stroke-width: 1.75; }
.tile a:hover .tile-icon { transform: rotate(-6deg) scale(1.06); }
.tile-name { font-weight: 750; font-size: 1.1rem; line-height: 1.22; }
.tile-count { color: var(--muted); font-size: .93rem; margin-top: auto; }
.more-cats { margin-top: 1.1rem; }
.more-cats summary {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 52px; padding: .55rem 1.2rem; border-radius: 999px; cursor: pointer;
  list-style: none; font-weight: 700; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.more-cats summary::-webkit-details-marker { display: none; }
.more-cats summary:hover { border-color: var(--primary); }
.more-cats[open] summary .icon { transform: rotate(180deg); }
.more-cats .tiles { margin-top: 1rem; }

/* neighborhoods */
.areas { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.area a {
  display: grid; grid-template-columns: 128px 1fr; gap: 1.3rem; align-items: center; padding: 1.1rem 1.4rem 1.1rem 1.1rem; height: 100%;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.area a:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.area-viz { width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--primary-soft), var(--bg-2) 72%); overflow: hidden; }
.area-viz circle { transition: r .3s; }
.area-viz .ring { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 4; opacity: .8; }
.area-text { display: grid; gap: .15rem; min-width: 0; }
.area a:hover .area-viz .pt { r: 3.2; }
.area-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: -.01em; }
.area-blurb { display: block; color: var(--ink-2); font-size: .98rem; margin-top: .2rem; }
.area-count { margin-top: .45rem; font-weight: 700; color: var(--primary); font-size: .95rem; display: inline-flex; align-items: center; gap: .3rem; }

/* promises */
.promises { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.promises li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-1); }
.promise-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: .9rem; }
.promise-icon .icon { width: 26px; height: 26px; }
.promises h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.promises p { color: var(--ink-2); }

/* add band */
/* The band and the footer are dark in both themes, so they need the light focus ring. */
.add-band, .footer { --focus: #a9c8ff; }
.add-band {
  margin-top: clamp(2.5rem, 6vw, 4.5rem); padding: clamp(1.6rem, 4vw, 2.8rem); border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 100% 0%, #2c6a4c 0%, #1b3f2f 55%, #142f23 100%); color: #f4efe2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; position: relative; overflow: hidden;
}
.add-band::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 300px; height: 200px; opacity: .14; pointer-events: none;
  background: radial-gradient(circle at 30% 60%, #f4efe2 0 38px, transparent 39px), radial-gradient(circle at 55% 45%, #f4efe2 0 54px, transparent 55px), radial-gradient(circle at 80% 62%, #f4efe2 0 40px, transparent 41px);
}
.add-band .section-title { color: #fff; }
.add-copy { max-width: 36rem; display: grid; gap: .5rem; }
.add-copy p { font-size: 1.12rem; color: #dfe9e1; }
.add-actions { display: flex; flex-wrap: wrap; gap: .7rem; position: relative; z-index: 1; }
.add-band .btn-primary { background: #f4efe2; color: #143024; }
.add-band .btn-primary:hover { background: #fff; }
.add-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); background: transparent; }
.add-band .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* take it with you (offline / home screen) */
.take-band {
  margin-top: clamp(2.5rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(200px, 290px) 1fr; align-items: center;
  gap: clamp(1rem, 4vw, 3rem); padding: clamp(1.4rem, 4vw, 2.6rem); border-radius: var(--radius-lg);
  background: radial-gradient(120% 120% at 0% 0%, var(--primary-soft) 0%, var(--surface) 62%); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.take-art { display: grid; place-items: center; }
.take-phone { width: 100%; max-width: 270px; height: auto; overflow: visible; filter: drop-shadow(0 18px 28px rgba(10, 30, 20, .2)); }
.tp-body { fill: #17221c; stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 2; }
.tp-screen { fill: var(--bg); }
.tp-island { fill: #17221c; }
.tp-bar { fill: #1f4a37; }
.tp-sun { fill: #e0ac4c; }
.tp-tree { fill: #f7f1e3; }
.tp-title { fill: rgba(247, 241, 227, .85); }
.tp-search { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.tp-rows rect { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.tp-dot-1 { fill: #e07a5f; } .tp-dot-2 { fill: #4f93c4; } .tp-dot-3 { fill: #81b29a; }
.tp-lines rect { fill: var(--line-strong); }
.tp-lines rect:nth-child(even) { fill: var(--line); }
.tp-badge circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.tp-badge-icon { color: var(--muted); }
.tp-check circle { fill: var(--primary); }
.tp-check path { fill: none; stroke: var(--primary-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.take-copy { display: grid; gap: .7rem; max-width: 38rem; }
.take-kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--primary); }
.take-lede { font-size: 1.15rem; color: var(--ink-2); }
.take-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .3rem; }
.take-status { font-weight: 650; color: var(--ink-2); display: flex; gap: .45rem; align-items: flex-start; }
.take-status:empty { display: none; }
.take-status .icon { color: var(--open); width: 1.35em; height: 1.35em; flex: none; margin-top: .05em; }
@media (max-width: 760px) {
  .take-band { grid-template-columns: 1fr; }
  .take-phone { max-width: 170px; }
}

/* offline notice */
.offline-bar { background: var(--closing-soft); border-bottom: 1px solid color-mix(in srgb, var(--closing) 35%, transparent); color: var(--ink); }
.offline-bar-inner { display: flex; gap: .75rem; align-items: center; padding-block: .75rem; font-size: 1.02rem; }
.offline-bar .icon { flex: none; width: 1.5em; height: 1.5em; color: var(--closing); }

/* install steps */
.install-body { padding: 1.1rem 1.5rem 0; display: grid; gap: 1.25rem; }
.install-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.install-steps li { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start; font-size: 1.12rem; line-height: 1.5; }
.install-steps li::before {
  counter-increment: step; content: counter(step); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 1.15rem;
}
.install-steps small { display: block; color: var(--ink-2); font-size: .98rem; margin-top: .2rem; }
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 2em; height: 2em; padding: 0 .45em; border-radius: 9px;
  border: 1.5px solid var(--line-strong); background: var(--surface-2); vertical-align: middle; margin: 0 .1em; color: var(--ink); font-weight: 700; font-size: .95em; white-space: nowrap;
}
.key .icon { width: 1.15em; height: 1.15em; color: var(--primary); }
.install-note { background: var(--bg-2); border-radius: 14px; padding: .9rem 1.1rem; color: var(--ink-2); font-size: 1rem; }
.install-ok { display: flex; gap: .6rem; align-items: center; font-weight: 700; font-size: 1.1rem; }
.install-ok .icon { color: var(--open); width: 1.5em; height: 1.5em; flex: none; }
/* "Using a different phone or computer?" opens a list of devices, and each device opens its own steps. */
.install-other { border-top: 1px solid var(--line); padding-top: .5rem; }
.install-other summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; cursor: pointer; list-style: none;
}
.install-other summary::-webkit-details-marker { display: none; }
/* A chevron at the end of each row, down when closed and up when open. It's drawn in the text colour,
   so it suits both themes and Windows High Contrast. */
.install-other summary::after {
  content: ''; flex: none; width: .55em; height: .55em; margin-right: .35em; border: solid currentColor; border-width: 0 .16em .16em 0;
  transform: translateY(-.2em) rotate(45deg); transition: transform .2s var(--ease);
}
.install-other[open] > summary::after, .install-device[open] > summary::after { transform: translateY(.2em) rotate(-135deg); }
.install-other > summary { font-weight: 700; color: var(--primary); }
.install-device { border-bottom: 1px solid var(--line); }
.install-device:first-of-type { margin-top: .4rem; border-top: 1px solid var(--line); }
.install-device > summary { padding: .5rem .25rem; font-weight: 650; font-size: 1.05rem; color: var(--ink); }
.install-device > summary:hover, .install-device[open] > summary { color: var(--primary); }
.install-device > .install-steps { padding: .35rem 0 1.25rem 1rem; }

/* map when offline or unsupported. Once a map has loaded, #map keeps MapLibre's class and its 12px Helvetica,
   so the message sets its own font to look the same either way. */
.map-offline { display: grid; justify-items: center; text-align: center; gap: .8rem; padding: 3rem 1.5rem; font: 1rem/1.6 var(--font-body); }
.map-offline h3 { font-size: 1.3rem; }
.map-offline > .icon { width: 48px; height: 48px; color: var(--muted); }
.map-offline p { max-width: 30rem; font-size: 1.1rem; color: var(--ink-2); }
/* "Tap a dot to see the place" makes no sense without a map. map.js hides it too, for browsers without :has(). */
.map-wrap:has(.map-offline) .map-note { display: none; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 50px; padding: .55rem 1.05rem;
  border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.2; transition: background .2s, border-color .2s, transform .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn-primary:hover { background: var(--primary-hover); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-lg { min-height: 58px; padding: .7rem 1.4rem; font-size: 1.08rem; border-radius: 16px; }
.linklike { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .18em; font: inherit; }

/* ------------------------------------------------------------------ results */
.results { position: relative; z-index: 2; margin-top: -3.2rem; padding-bottom: 1rem; }
.results-head { display: grid; gap: .55rem; margin-bottom: 1.25rem; }
.back-link {
  justify-self: start; display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: .45rem 1rem .45rem .8rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--ink); box-shadow: var(--shadow-1);
}
.back-link:hover { border-color: var(--line-strong); }
.results-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 2.4vw + 1.1rem, 2.8rem); letter-spacing: -.02em; margin-top: .5rem; }
.results-title:focus { outline: none; }
.results-sub { font-size: 1.1rem; color: var(--ink-2); max-width: 52rem; }
.results-sub strong { color: var(--ink); }
.results-sub .linklike { color: var(--primary); font-weight: 650; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .7rem; }
.toggle {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 50px; padding: .5rem 1.1rem; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700;
}
.toggle[aria-pressed="true"] { background: var(--open-soft); border-color: var(--open); color: var(--open); }
.toggle[aria-pressed="true"]::after { content: '✓'; font-weight: 800; }
.select { position: relative; display: inline-flex; align-items: center; }
.select .icon { position: absolute; left: .85rem; color: var(--muted); pointer-events: none; }
.select select {
  appearance: none; -webkit-appearance: none; min-height: 50px; padding: .5rem 2.4rem .5rem 2.6rem; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 650; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356625b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1em;
}
@media (prefers-color-scheme: dark) {
  .select select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5aea7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
}
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); margin-left: auto; }
.seg button { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 0; background: transparent; font-weight: 700; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--primary), var(--shadow-1); }
@media (max-width: 640px) {
  /* Two to a row; anything that can't fit in half a row (List/Map at larger text) wraps onto its own. */
  .toolbar { gap: .5rem; }
  .toolbar > * { flex: 1 1 calc(50% - .25rem); }
  .toolbar .select { min-width: 0; }
  .toolbar .toggle { justify-content: center; padding-inline: .6rem; }
  .seg { margin-left: 0; }
  .seg button { flex: 1; justify-content: center; padding-inline: .5rem; }
  .select { width: 100%; }
  .select select { width: 100%; padding-left: .95rem; padding-right: 1.9rem; font-size: .92rem; text-overflow: ellipsis; background-position: right .6rem center; }
  .select .icon { display: none; }
}
@media (max-width: 440px) {
  .card { padding: 1rem; }
  .card-main { gap: .8rem; }
  .card-icon { width: 46px; height: 46px; border-radius: 14px; }
  .card-icon .icon { width: 24px; height: 24px; }
  .card-actions { gap: .45rem; }
  .card-actions .btn { padding-inline: .7rem; gap: .35rem; font-size: .95rem; }
}

.notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: 16px; margin-bottom: 1rem; font-size: 1.05rem; }
.notice .icon { width: 1.6em; height: 1.6em; margin-top: .05em; }
.notice-emergency { background: #fdecea; color: #7d1d14; border: 1.5px solid #f2b8b0; }
@media (prefers-color-scheme: dark) { .notice-emergency { background: #3a1a16; color: #ffd8d2; border-color: #6b2c24; } }

/* cards */
.cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.15rem 1.15rem 1.05rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card-main { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.card-text { display: grid; gap: .1rem; min-width: 0; }
.card-icon { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: var(--c-bg); color: var(--c-fg); }
.card-icon .icon { width: 27px; height: 27px; stroke-width: 1.8; }
/* Long one-word names ("Neuropsychiatric") break instead of running out of the card at Largest text. */
.card-name, .sheet-name, .pop-name, .results-title { overflow-wrap: anywhere; }
.card-name { font-size: 1.27rem; font-weight: 750; line-height: 1.25; letter-spacing: -.005em; }
.card-name a { color: var(--ink); text-decoration: none; }
.card-name a::after { content: ''; position: absolute; inset: 0; border-radius: 22px; z-index: 0; }
.card-name a:focus-visible { outline: none; }
.card:has(.card-name a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-sub { color: var(--muted); font-size: .98rem; }
.card-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .18rem .55rem; border-radius: 8px; background: var(--brass-bright); color: #3b2604; }
.badge-soon { background: var(--bg-3); color: var(--ink-2); }
.card-status, .status-line { display: flex; align-items: flex-start; gap: .55rem; margin-top: .55rem; font-size: 1.02rem; line-height: 1.4; }
.st-label { font-weight: 750; }
.card-status .st-dot, .status-pill .st-dot { margin-top: .36em; }
.status-open { color: var(--open); }
.status-closing { color: var(--closing); }
.status-closed { color: var(--closed); }
.status-unknown { color: var(--muted); font-weight: 600; }
.status-line .status-detail, .card-status .status-detail { font-weight: 500; color: var(--ink-2); }
.st-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: currentColor; }
/* Two pulses (5 s) and then still, so a list of open places isn't full of throbbing dots. */
.status-open .st-dot { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); animation: pulse 2.5s ease-in-out 2; }
.status-unknown .st-dot { background: transparent; border: 2px solid currentColor; }
.card-addr { color: var(--ink-2); font-size: 1rem; margin-top: .3rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: 1rem; position: relative; z-index: 1; }
.card-actions .btn { flex: 1 1 auto; }
.btn-call { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn-call:hover { background: var(--primary-hover); border-color: transparent; }
.btn .num { white-space: nowrap; }
.card-groups { display: grid; gap: 0; }
.group-label { font-family: var(--font-body); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; font-size: .88rem; color: var(--muted); margin: 1.6rem 0 .8rem; display: flex; align-items: center; gap: .8rem; }
.group-label:first-child { margin-top: .2rem; }
.group-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.more-left { font-weight: 600; color: var(--muted); }

/* "Narrow it down" chips inside a category */
.refine { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .4rem; }
.refine-label { font-weight: 700; color: var(--ink-2); margin-right: .2rem; }
.rchip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .4rem .95rem; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink); font-weight: 650; text-decoration: none;
  transition: border-color .2s, background .2s;
}
.rchip:hover { border-color: var(--primary); }
.rchip[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.rchip-n { font-size: .85rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.rchip[aria-current="true"] .rchip-n { background: rgba(255, 255, 255, .2); color: inherit; }
.rchip-more { font: inherit; cursor: pointer; color: var(--primary); border-style: dashed; }
.rchip-more .icon { width: 1.1em; height: 1.1em; }
@media (min-width: 641px) { .rchip-more { display: none; } }
@media (max-width: 640px) { .refine[data-collapsed] .rchip-extra { display: none; } }
.more-wrap { display: flex; justify-content: center; margin: 1.6rem 0 0; }
.btn-more { min-height: 58px; padding: .7rem 2rem; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 750; font-size: 1.08rem; box-shadow: var(--shadow-1); }
.btn-more:hover { border-color: var(--primary); }

.empty { text-align: center; padding: 2.5rem 1rem; display: grid; gap: .9rem; justify-items: center; }
.empty-art { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); }
.empty-art .icon { width: 52px; height: 52px; stroke-width: 1.5; }
.empty h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.empty p { color: var(--ink-2); font-size: 1.1rem; max-width: 34rem; }
.empty .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.empty .chip { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.empty .chip:hover { background: var(--surface); border-color: var(--primary); }

/* map */
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 1.25rem; box-shadow: var(--shadow-1); }
.map { width: 100%; height: min(68vh, 620px); }
.map-note { padding: .7rem 1rem; color: var(--ink-2); font-size: .98rem; border-top: 1px solid var(--line); background: var(--surface); }
.map-loading { display: grid; place-items: center; height: 100%; color: var(--muted); font-weight: 650; }
.maplibregl-popup-content { border-radius: 16px !important; padding: .9rem 1rem !important; font-family: var(--font-body); font-size: 1rem; box-shadow: var(--shadow-2) !important; background: var(--surface) !important; color: var(--ink); min-width: 220px; }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 12px; color: var(--ink-2); }
/* MapLibre's + and - buttons at the site's 44px target size, with its focus ring. map.js adds MapLibre's
   stylesheet after this one (it sets 29px and outline: none), so these selectors start with .map to win. */
.map .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.map .maplibregl-ctrl-group button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pop-name { font-weight: 750; font-size: 1.1rem; line-height: 1.25; padding-right: 1.6rem; }
.pop-sub { color: var(--muted); font-size: .92rem; }
.pop .btn { margin-top: .6rem; min-height: 44px; width: 100%; }

/* ------------------------------------------------------------------ dialogs */
dialog.sheet {
  border: 0; padding: 0; margin: auto; width: min(760px, calc(100% - 2rem)); max-height: min(92vh, 980px);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); overflow: auto;
  overscroll-behavior: contain;
}
dialog.sheet[open] { animation: pop .32s var(--ease); }
html:has(dialog[open]) { overflow: hidden; }
dialog.sheet::backdrop { background: rgba(8, 18, 13, .58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (max-width: 640px) {
  /* A percentage of the visible screen: in iOS Safari 94vh is taller than the screen while its toolbars
     show, which pushed the top of the sheet and its Close button off the top. */
  dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: calc(100% - 1rem); }
  dialog.sheet[open] { animation: slideup .36s var(--ease); }
}
.sheet-inner { padding: 0 0 1.5rem; }
.sheet-hero { position: relative; padding: 1rem 1.5rem 1.5rem; background: linear-gradient(160deg, var(--c-bg) 0%, color-mix(in srgb, var(--c-bg) 55%, var(--surface)) 100%); }
.sheet-top { display: flex; justify-content: flex-end; padding: 1rem 1rem 0; }
.sheet-hero .sheet-top { padding: 0 0 .4rem; margin-right: -.5rem; }
.close {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: .4rem 1rem .4rem .75rem; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); background: color-mix(in srgb, var(--surface) 82%, transparent); font-weight: 700; color: var(--ink);
}
.close:hover { background: var(--surface); }
.sheet-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); color: var(--c-fg); box-shadow: var(--shadow-1); }
.sheet-icon .icon { width: 32px; height: 32px; }
.sheet-kicker { margin-top: 1rem; font-weight: 700; color: var(--c-fg); font-size: .98rem; }
.sheet-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4vw + 1rem, 2.7rem); letter-spacing: -.02em; line-height: 1.05; margin-top: .2rem; }
.sheet-desc { margin-top: .6rem; font-size: 1.12rem; color: var(--ink-2); max-width: 40rem; }
.sheet-body { padding: 1.25rem 1.5rem 0; display: grid; gap: 1.4rem; }
.sheet-title { font-family: var(--font-display); font-size: 2rem; font-weight: 600; padding: 0 1.5rem; }
.sheet-lede { padding: .5rem 1.5rem 0; color: var(--ink-2); font-size: 1.05rem; }
.status-pill { display: inline-flex; align-items: flex-start; gap: .6rem; padding: .65rem 1rem; border-radius: 14px; font-size: 1.1rem; justify-self: start; line-height: 1.4; }
.status-pill.status-open { background: var(--open-soft); }
.status-pill.status-closing { background: var(--closing-soft); }
.status-pill.status-closed { background: var(--closed-soft); }
.status-pill.status-unknown { background: var(--bg-2); }
.actions-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.actions-big .btn { min-height: 64px; flex-direction: column; gap: .2rem; font-size: 1.02rem; border-radius: 18px; }
.actions-big .btn .icon { width: 1.5em; height: 1.5em; }
.actions-big .btn small { font-weight: 600; font-size: .85rem; opacity: .85; text-align: center; }
.actions-big .btn-call small { white-space: nowrap; }
.facts { display: grid; gap: .9rem; margin: 0; }
.fact { display: grid; grid-template-columns: 44px 1fr; gap: .8rem; align-items: start; }
.fact-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); }
.fact dt { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact dd { margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.fact-note { color: var(--ink-2); }
.hours-none { font-size: 1.05rem; color: var(--ink-2); }
.sheet-section h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.hours { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.hours th, .hours td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 650; width: 40%; }
.hours td::first-letter { text-transform: uppercase; }
.hours tr.today { background: var(--primary-soft); }
.hours tr.today th, .hours tr.today td { font-weight: 800; }
.hours tr.today th::after { content: 'Today'; margin-left: .5rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--primary); color: var(--primary-ink); padding: .1rem .4rem; border-radius: 6px; vertical-align: middle; }
.hours-note { color: var(--muted); font-size: .95rem; margin-top: .5rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.tags li { padding: .3rem .75rem; border-radius: 999px; background: var(--bg-2); font-size: .95rem; color: var(--ink-2); }
.sheet-meta { font-size: .95rem; color: var(--muted); display: grid; gap: .35rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.sheet-meta a { color: var(--muted); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0 1.5rem; }

/* suggest form */
.suggest-form { display: grid; gap: 1rem; }
.suggest-form .field, .suggest-form .kind, .suggest-form .field-row, .suggest-form .form-status { margin: 0 1.5rem; }
.field { display: grid; gap: .35rem; font-weight: 700; }
.field input, .field textarea {
  font-weight: 400; font-size: 1.1rem; padding: .8rem .95rem; border-radius: 14px; border: 1.5px solid var(--muted); background: var(--surface-2); color: var(--ink); min-height: 54px;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field-row .field { margin: 0; }
.kind { border: 0; padding: 0; display: grid; gap: .5rem; }
.kind legend { font-weight: 700; margin-bottom: .4rem; padding: 0; }
.kind label { display: flex; align-items: center; gap: .7rem; min-height: 48px; padding: .4rem .9rem; border: 1.5px solid var(--line-strong); border-radius: 14px; cursor: pointer; }
.kind label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.kind input { width: 1.3rem; height: 1.3rem; accent-color: var(--primary); }
.form-status { color: var(--ink-2); }
/* Out of the grid while empty, so it adds no gap. Not display: none, because #s-status is a live region
   (role=status), and screen readers often miss text that arrives in a hidden one. */
.form-status:empty { position: absolute; }

/* ------------------------------------------------------------------ footer, toast */
.footer { margin-top: clamp(3rem, 8vw, 6rem); background: #0f1f18; color: #e6e2d6; padding: 3rem 0 3.5rem; }
.footer a, .footer .linklike { color: #bfe6cf; }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.footer h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: #a9b7ae; margin-bottom: .8rem; font-family: var(--font-body); }
.footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer p { color: #cfd3c8; }
.footer p + p { margin-top: .6rem; }
.footer-name { font-family: var(--font-display); font-size: 1.8rem; color: #fff !important; margin-bottom: .5rem; }
.footer-name em { color: var(--brass-bright); }
.footer-updated { font-size: .95rem; color: #a9b7ae !important; }
.footer-note { font-size: .95rem; }
.footer-note strong { color: #fff; font-weight: 700; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(230, 226, 214, .16); }
.footer-legal p { font-size: .9rem; color: #a9b7ae; }

.toast {
  position: fixed; left: 50%; bottom: max(1.5rem, env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 3rem)); z-index: 60;
  background: #142a20; color: #fff; padding: .9rem 1.3rem; border-radius: 16px; font-weight: 650; box-shadow: var(--shadow-3);
  transition: transform .35s var(--ease), visibility 0s linear .35s; max-width: calc(100% - 2rem); visibility: hidden;
  pointer-events: none; /* only text: inside an open sheet, taps go through to the buttons under it */
}
.toast[data-show] { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
.toast:empty { display: none; }
@media (prefers-color-scheme: dark) { .toast { background: #eeebe3; color: #10201a; } }
.noscript { padding: 1.5rem 0; font-size: 1.15rem; }

/* ------------------------------------------------------------------ motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slideup { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 6%, transparent); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes blink { 0%, 60% { opacity: var(--windows); } 61%, 100% { opacity: 0; } }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 rgba(161, 38, 27, .35); } 50% { box-shadow: 0 0 0 10px rgba(161, 38, 27, 0); } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* No delays either, so cards don't appear one by one. */
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .layer { transform: none !important; }
}
@media (prefers-contrast: more) {
  :root { --muted: #3b4540; --line: #a59c88; --line-strong: #6f6756; }
  .chip, .hello, .hero-lede, .search-label { background: #fff !important; color: #000 !important; }
}
/* The values above suit light backgrounds; on dark ones they make grey text almost invisible. */
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --muted: #c9d0cb; --line: #66756d; --line-strong: #8a978f; }
}
@media (forced-colors: active) {
  .btn, .chip, .tile a, .card, .area a, .toggle, .select select, .seg button, .search-box { border: 1px solid CanvasText; }
  .st-dot, .dot { forced-color-adjust: none; }
  /* Background tints and shadows are removed in this mode, so chosen items use the system highlight. */
  .sug[aria-selected="true"], .seg button[aria-pressed="true"], .menu button[aria-pressed="true"], .rchip[aria-current="true"] {
    forced-color-adjust: none; background: Highlight; color: HighlightText; box-shadow: none;
  }
  .sug[aria-selected="true"] :is(.sug-sub, .sug-count, .sug-kind) { color: inherit; }
}

/* ------------------------------------------------------------------ print */
@media print {
  html { font-size: 11pt; }
  body { background: #fff; color: #000; }
  .topbar, .scene, .quick, .hello, .hero-lede, .hero-title, .search, .toolbar, .back-link, .card-actions .btn:not(.btn-call),
  .map-wrap, .more-wrap, #browse, .footer, .toast, dialog, .skip, .offline-bar, .take-band { display: none !important; }
  .hero { min-height: 0; padding: 0; }
  .results { margin: 0; }
  .results-title { font-size: 18pt; }
  .cards { display: block; }
  .card { break-inside: avoid; box-shadow: none; border: 0; border-bottom: 1px solid #999; border-radius: 0; padding: .6rem 0; animation: none; }
  .card-icon { display: none; }
  .card-actions { margin-top: .3rem; }
  .card-actions .btn-call { background: none; color: #000; border: 0; padding: 0; min-height: 0; font-weight: 700; }
  .card-name a::after { display: none; }
  .results::before { content: 'McLean Local · printed list'; display: block; font-size: 9pt; color: #555; margin-bottom: .5rem; }
}
