/* ============================================================================
   City of Louisiana, Missouri — theme.css
   A painted river town on the bluffs: coursed brick, limestone, gold-hour light.
   Display: Sanchez (Clarendon slab) · Body: Golos Text · Meta: DM Mono
   Signature accent: gold-hour ochre (#c6871f) as an OKLCH ramp.
   World-built per DESIGN-DNA.md — reused by no other Stoa build.
   ============================================================================ */

/* ---- Fonts (self-hosted woff2, no runtime CDN) --------------------------- */
@font-face {
  font-family: "Sanchez";
  src: url("fonts/Sanchez-400.subset.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sanchez";
  src: url("fonts/Sanchez-400-Italic.subset.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/GolosText-var.subset.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-400.subset.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-500.subset.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  /* Palette from the world (dna block hexes literal here for lint sync) */
  --cream: #f3f5ef;        /* cool river-mist limestone ground */
  --cream-deep: #e6ece3;   /* a shade down for cards/bands */
  --paper: #fbfcf7;        /* raised surfaces */
  --ink: #241a12;          /* bluff-umber ink (body text) */
  --ink-soft: #4a3d30;     /* secondary text */
  --brick: #a8442c;        /* heritage brick red — imagery/motif ONLY, never UI status */
  --river: #2f5d52;        /* muted river green — cool counter for accents/tags */
  --seed: #c6871f;         /* signature accent seed (gold-hour ochre) */

  /* Gold-hour ochre — OKLCH ramp from one hue (~78deg); L decreases 50->900,
     chroma gamut-fit. Named --accent-* per doctrine ramp mandate. */
  --accent-50:  oklch(0.972 0.021 84);
  --accent-100: oklch(0.936 0.046 83);
  --accent-200: oklch(0.884 0.078 81);
  --accent-300: oklch(0.822 0.108 79);   /* luminous — dark-room links/actions */
  --accent-400: oklch(0.762 0.124 76);
  --accent-500: oklch(0.706 0.128 73);   /* the signature gold, ~#c6871f */
  --accent-600: oklch(0.612 0.116 66);
  --accent-700: oklch(0.512 0.100 60);
  --accent-800: oklch(0.418 0.082 55);   /* bronze — link text on light */
  --accent-900: oklch(0.322 0.060 50);   /* deep bronze-brown — strong text on light */

  /* Semantic assignments */
  --bg: var(--cream);
  --surface: var(--paper);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --link: var(--accent-800);
  --link-hover: var(--accent-900);
  --accent: var(--accent-500);
  --rule: color-mix(in oklab, var(--ink) 16%, transparent);
  --rule-strong: color-mix(in oklab, var(--ink) 30%, transparent);

  /* Status semantics get their OWN token — never the heritage brick */
  --notice: #9c3b1c;                 /* deep clay — deadlines/alerts */
  --notice-bg: #f7e4d6;
  --ok: #2f6d4f;

  /* Dark "river-dusk" room */
  --dusk: #1b130b;                   /* deep umber ground */
  --dusk-2: #241a10;
  --dusk-text: #f1e6d2;
  --dusk-muted: #c6b79c;

  /* Fluid type scale — one continuous curve ~360 -> 1280px.
     Tighter ratio small (~1.2), bolder large (~1.28). Body >=16px, fine floor ~13px. */
  --fs-fine:  clamp(0.81rem, 0.78rem + 0.15vw, 0.875rem);
  --fs-sm:    clamp(0.90rem, 0.87rem + 0.18vw, 0.97rem);
  --fs-base:  clamp(1.00rem, 0.96rem + 0.28vw, 1.125rem);
  --fs-md:    clamp(1.16rem, 1.08rem + 0.42vw, 1.40rem);
  --fs-lg:    clamp(1.36rem, 1.20rem + 0.74vw, 1.85rem);
  --fs-xl:    clamp(1.60rem, 1.32rem + 1.28vw, 2.55rem);
  --fs-2xl:   clamp(1.95rem, 1.45rem + 2.30vw, 3.55rem);
  --fs-3xl:   clamp(2.35rem, 1.55rem + 3.70vw, 4.75rem);

  /* Spacing */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem; --sp-9: 6rem;
  --wrap: 68rem;         /* content max width */
  --wrap-wide: 78rem;

  --radius: 4px;         /* brick-town corners: crisp, minimal */
  --radius-lg: 8px;
  --arch: 46% 46% 8px 8px / 62% 62% 8px 8px;   /* storefront-transom arch */

  --shadow-1: 0 1px 2px rgba(36,26,18,0.06), 0 2px 8px rgba(36,26,18,0.05);
  --shadow-2: 0 4px 14px rgba(36,26,18,0.10), 0 12px 34px rgba(36,26,18,0.09);

  --hit: 44px;           /* primary civic action hit target */

  /* Button fills as explicit hex (parseable by rgb-only contrast tools; the
     oklch ramp above stays for the DNA lint + decorative fills). Resolved from
     the ramp: gold ~= --accent-500, bronze ~= --accent-800. */
  --btn-gold: #d09237;
  --btn-gold-hi: #dea84f;
  --btn-gold-border: #8a6020;
  --btn-bronze: #5e3f1c;
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Golos Text", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--accent-600); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-200); color: var(--ink); }

/* Links: never restyle the visited state per doctrine constant 6 */
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

/* ---- Typography ---------------------------------------------------------- */
h1, h2, h3, h4, .display {
  font-family: "Sanchez", serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}
h1, .h1 { font-size: var(--fs-3xl); margin: 0 0 var(--sp-4); }
h2, .h2 { font-size: var(--fs-2xl); margin: 0 0 var(--sp-4); line-height: 1.12; }
h3, .h3 { font-size: var(--fs-lg); margin: 0 0 var(--sp-3); line-height: 1.16; }
h4, .h4 { font-size: var(--fs-md); margin: 0 0 var(--sp-2); }
p { margin: 0 0 var(--sp-4); max-width: 66ch; }
.lead { font-size: var(--fs-md); line-height: 1.5; color: var(--ink); max-width: 60ch; }
.eyebrow {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: var(--fs-fine); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-800);
  margin: 0 0 var(--sp-3);
}
.meta, time, .rec-meta, .kbd {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, monospace;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
em, i, .quote-serif { font-family: "Sanchez", serif; font-style: italic; }
small, .fine { font-size: var(--fs-fine); color: var(--muted); }
strong, b { font-weight: 600; }

/* ---- Layout -------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, var(--wrap-wide)); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.section--tight { padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-5); }

/* ---- Motif: coursed masonry (divider / marker / keyline / hover) --------- */
/* A thin double-course rule, unmistakably a brick town. Used >=3 ways. */
.masonry-rule {
  height: 0; border: 0; margin: var(--sp-6) 0;
  border-top: 2px solid var(--rule-strong);
  position: relative;
}
.masonry-rule::after {
  content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 0;
  border-top: 1px dashed var(--rule);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 16px);
          mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 16px);
}
.masonry-marker { list-style: none; padding-left: 0; margin: 0; }
.masonry-marker > li { position: relative; padding-left: 1.75em; margin-bottom: var(--sp-2); }
.masonry-marker > li::before {
  content: ""; position: absolute; left: 0; top: 0.58em;
  width: 0.6em; height: 0.4em; border-radius: 1px;
  background: var(--brick);
  box-shadow: 0.8em 0 0 var(--accent-600);   /* second brick sits at ~1.4em, inside the 1.75em gutter */
}
.keyline {                                   /* frames empty states + 404 */
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, color-mix(in oklab, var(--ink) 5%, transparent) 22px 24px),
    var(--paper);
  padding: clamp(1.5rem, 1rem + 3vw, 3rem);
}

/* ---- Proto banner (honest chrome, minimal) ------------------------------- */
.proto-banner {
  background: var(--dusk); color: var(--dusk-text);
  font-size: var(--fs-fine); text-align: center;
  padding: 0.5rem 1rem; line-height: 1.35;
}
.proto-banner strong { color: var(--accent-300); font-weight: 600; }

/* ---- Header / masthead (scaffold chrome classes) ------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--cream) 90%, white);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 2px solid var(--ink);
  view-transition-name: masthead;
}
.header-bar {
  width: min(100% - 2.5rem, var(--wrap-wide)); margin-inline: auto;
  display: flex; align-items: center; gap: var(--sp-4);
  padding-block: 0.55rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 3px; object-fit: contain; flex: none; }
.brand-copy { display: block; min-width: 0; }
.brand-name { font-family: "Sanchez", serif; font-size: var(--fs-md); line-height: 1; letter-spacing: -0.01em; }
.brand-tagline {
  display: block; font-family: "DM Mono", monospace; font-size: 0.64rem;
  letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; margin-top: 3px;
}

/* Omnibox — single search form in masthead (scaffold: .header-search.omnibox) */
.header-search { position: relative; flex: 1 1 22rem; min-width: 12rem; display: flex; }
.header-search .visually-hidden { position: absolute; }
#chrome-q {
  flex: 1; min-height: var(--hit); min-width: 0;
  font-family: "Golos Text", sans-serif; font-size: var(--fs-sm);
  padding: 0 0.9rem; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
#chrome-q::placeholder { color: var(--muted); }
.header-search button[type="submit"] {
  min-height: var(--hit); min-width: var(--hit); padding: 0 1.05rem; cursor: pointer;
  font-family: "Golos Text", sans-serif; font-weight: 600; font-size: var(--fs-sm);
  color: var(--cream); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 0 var(--radius) var(--radius) 0;
}
.header-search button[type="submit"]:hover { background: var(--accent-800); border-color: var(--accent-800); }
/* Combobox dropdown (JS renders <li> options into #chrome-suggestions) */
#chrome-suggestions {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 0.35rem; list-style: none;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2); max-height: min(70vh, 28rem); overflow: auto;
}
#chrome-suggestions:empty { display: none; }
.sugg-group { font-family: "DM Mono", monospace; font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); padding: 0.5rem 0.6rem 0.2rem; }
.sugg { padding: 0.5rem 0.6rem; border-radius: var(--radius); cursor: pointer; display: block; }
.sugg b { font-weight: 600; }
.sugg small { display: block; color: var(--muted); font-size: var(--fs-fine); }
.sugg[aria-selected="true"], .sugg:hover { background: var(--accent-100); }
.sugg--ask { border-left: 3px solid var(--accent-500); font-weight: 600; }
.sugg-empty { padding: 0.6rem; color: var(--muted); font-size: var(--fs-sm); }

/* ---- Primary nav (scaffold: #site-nav > a.nav-link) ---------------------- */
.site-nav {
  width: min(100% - 2.5rem, var(--wrap-wide)); margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 0.1rem 1.4rem; border-top: 1px solid var(--rule);
}
.nav-link {
  display: inline-flex; align-items: center; padding: 0.55rem 0.15rem; min-height: var(--hit);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--fs-sm);
  border-bottom: 3px solid transparent;
}
.nav-link:hover { color: var(--accent-900); border-bottom-color: var(--accent-500); }
.nav-link[aria-current="page"] { color: var(--accent-900); border-bottom-color: var(--ink); font-weight: 600; }
.menu-toggle { display: none; }

/* Mobile nav — full-viewport drawer, focus-contained via nav.js */
@media (max-width: 46rem) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 0.45rem; margin-left: auto;
    min-height: var(--hit); min-width: var(--hit); padding: 0 0.9rem; cursor: pointer;
    background: var(--paper); color: var(--ink); font-weight: 600; font-family: inherit; font-size: var(--fs-sm);
    border: 2px solid var(--ink); border-radius: var(--radius);
  }
  .menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
    content: ""; display: block; width: 18px; height: 2px; background: currentColor; position: relative;
  }
  .menu-toggle-bars::before { position: absolute; top: -6px; }
  .menu-toggle-bars::after { position: absolute; top: 6px; }
  .site-nav {
    position: fixed; inset: 0; z-index: 70; width: 100%; margin: 0;
    background: var(--dusk); color: var(--dusk-text);
    display: none; flex-direction: column; gap: 0; padding: 4.75rem 1.5rem 2rem; overflow: auto; border-top: 0;
  }
  .site-nav.is-open { display: flex; }
  .nav-link {
    color: var(--dusk-text); font-size: var(--fs-lg); font-family: "Sanchez", serif;
    padding: 0.85rem 0; min-height: var(--hit); border-bottom: 1px solid rgba(241,230,210,0.14);
  }
  .nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent-300); border-bottom-color: var(--accent-500); }
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--hit); padding: 0.6rem 1.25rem; cursor: pointer;
  font-family: "Golos Text", sans-serif; font-weight: 600; font-size: var(--fs-sm);
  text-decoration: none; border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--ink); color: var(--cream); transition: background .15s, transform .05s;
}
.btn:hover { background: var(--btn-bronze); border-color: var(--btn-bronze); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--btn-gold); border-color: var(--btn-gold-border); color: var(--ink); }
.btn--gold:hover { background: var(--btn-gold-hi); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--accent-100); color: var(--ink); border-color: var(--ink); }
/* Ghost button on a dark surface (hero / dark room) keeps legible light text */
.hero .btn--ghost, .room-dark .btn--ghost { color: var(--dusk-text); border-color: var(--dusk-text); }
.hero .btn--ghost:hover, .room-dark .btn--ghost:hover { background: rgba(243,245,239,0.14); color: #fff; border-color: var(--cream); }
.btn--lg { font-size: var(--fs-base); padding: 0.8rem 1.6rem; }

/* ---- Hero (brick-arch-duotone) ------------------------------------------- */
.hero { position: relative; color: var(--dusk-text); overflow: clip; background: var(--dusk); }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {          /* gold-hour duotone wash */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(27,19,11,0.30), rgba(27,19,11,0.72) 72%, rgba(27,19,11,0.92)),
    linear-gradient(90deg, color-mix(in oklab, var(--brick) 42%, transparent), transparent 60%),
    color-mix(in oklab, var(--accent-700) 26%, transparent);
  mix-blend-mode: multiply;
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 2rem + 7vw, 7rem); }
.hero h1 { color: #fff; font-size: var(--fs-3xl); text-shadow: 0 2px 20px rgba(0,0,0,0.35); view-transition-name: hero-title; }
.hero .eyebrow { color: var(--accent-300); }
.hero p { color: var(--dusk-text); max-width: 46ch; font-size: var(--fs-md); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero__hint { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--dusk-muted); }
.hero__hint b { color: var(--accent-300); font-weight: 600; }
.hero__credit { position: absolute; right: 0.6rem; bottom: 0.4rem; z-index: 2;
  font-size: 0.66rem; color: rgba(241,230,210,0.7); font-family: "DM Mono", monospace;
  background: rgba(27,19,11,0.5); padding: 0.15rem 0.5rem; border-radius: 3px; }
@media (max-width: 46rem) { .hero__credit { display: none; } }  /* avoid caption/paragraph collision on phones */

/* ---- Task strip (Pay & do) ----------------------------------------------- */
.tasks { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.task {
  display: flex; flex-direction: column; gap: 0.3rem; min-height: 6.5rem;
  padding: var(--sp-4); text-decoration: none; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); transition: transform .12s, box-shadow .12s;
}
.task:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: var(--ink); }
.task__k { font-family: "Sanchez", serif; font-size: var(--fs-md); }
.task__d { font-size: var(--fs-sm); color: var(--muted); }
.task__go { margin-top: auto; font-family: "DM Mono", monospace; font-size: var(--fs-fine);
  color: var(--accent-800); letter-spacing: 0.02em; }

/* ---- Cards / service grid ------------------------------------------------ */
.cards { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-lg);
  padding: var(--sp-5); display: flex; flex-direction: column; gap: 0.5rem; box-shadow: var(--shadow-1);
}
.card h3 { margin: 0; }
.card__meta { font-family: "DM Mono", monospace; font-size: var(--fs-fine); color: var(--muted); }
.card a.card__link { margin-top: auto; font-weight: 600; text-decoration: none; }
.card a.card__link:hover { text-decoration: underline; }
.card--dept { border-top: 5px solid var(--accent-500); }

/* ---- Arched storefront photo frame --------------------------------------- */
.arch {
  display: block;               /* contain the block <img> (was an inline span → overflow) */
  position: relative; overflow: hidden; border-radius: var(--arch);
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 5px var(--paper), var(--shadow-1);
  background: var(--cream-deep);
}
.card figure.photo { margin-bottom: 0.35rem; }
.arch img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.arch--wide img { aspect-ratio: 3 / 2; }
figure.photo { margin: 0; }
figure.photo figcaption { font-size: var(--fs-fine); color: var(--muted); margin-top: 0.4rem; }
.room-dark figure.photo figcaption { color: var(--dusk-muted); }

/* ---- "This week" / notice cards ------------------------------------------ */
.nextmeet {
  display: grid; gap: var(--sp-2); padding: var(--sp-5);
  background: var(--dusk); color: var(--dusk-text); border-radius: var(--radius-lg);
  border: 2px solid var(--dusk-2);
}
.nextmeet .eyebrow { color: var(--accent-300); }
.nextmeet h3 { color: #fff; }
.nextmeet time { color: var(--accent-300); font-size: var(--fs-md); }
.nextmeet a { color: var(--accent-300); }
.notice {
  border-left: 5px solid var(--notice); background: var(--notice-bg); color: #4a1e0e;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
}
.notice time, .notice .meta { color: var(--notice); }

/* ---- Record / document rows (meta register) ------------------------------ */
.records { list-style: none; margin: 0; padding: 0; }
.rec {
  display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: baseline;
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--rule);
}
.rec__title { font-weight: 600; text-decoration: none; }
.rec__title:hover { text-decoration: underline; }
.rec__meta { font-family: "DM Mono", monospace; font-size: var(--fs-fine); color: var(--muted);
  text-align: right; white-space: nowrap; }
.rec__tag { font-family: "DM Mono", monospace; font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--river); }
.rec__desc { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ---- Tables -------------------------------------------------------------- */
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data th, table.data td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--rule); }
table.data th { font-family: "DM Mono", monospace; font-size: var(--fs-fine); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); }
table.data td.num { font-family: "DM Mono", monospace; font-variant-numeric: tabular-nums; text-align: right; }

/* ---- Dark room ----------------------------------------------------------- */
.room-dark { background: var(--dusk); color: var(--dusk-text); }
.room-dark h1, .room-dark h2, .room-dark h3 { color: #fff; }
.room-dark .eyebrow { color: var(--accent-300); }
.room-dark a { color: var(--accent-300); }
.room-dark a:hover { color: var(--accent-200); }
/* Buttons keep their own contrast-safe text in a dark room (never the link color) */
.room-dark a.btn, .room-dark .btn { color: var(--cream); }
.room-dark a.btn--gold, .room-dark .btn--gold { color: var(--ink); }
.room-dark a.btn--ghost, .room-dark .btn--ghost { color: var(--dusk-text); border-color: var(--dusk-text); }
.room-dark .muted, .room-dark p.fine { color: var(--dusk-muted); }
.room-dark .card { background: var(--dusk-2); border-color: rgba(241,230,210,0.14); color: var(--dusk-text); }

/* ---- Search + Ask surface ------------------------------------------------ */
.ask-answer {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-1);
}
.ask-answer[hidden] { display: none; }
.ask-answer h2 { font-size: var(--fs-lg); }
.ask-sources { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin-top: var(--sp-4); }
.ask-source { display: block; padding: var(--sp-3); text-decoration: none; color: var(--ink);
  background: var(--cream-deep); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.ask-source:hover { background: var(--accent-100); }
.ask-source b { display: block; }
.ask-source small { color: var(--muted); font-family: "DM Mono", monospace; font-size: var(--fs-fine); }
.results { list-style: none; margin: var(--sp-5) 0 0; padding: 0; }
.result { padding: var(--sp-4) 0; border-bottom: 1px solid var(--rule); }
.result h3 { margin: 0 0 0.2rem; font-size: var(--fs-md); }
.result a { text-decoration: none; }
.result a:hover { text-decoration: underline; }
.result p { margin: 0.2rem 0 0; color: var(--muted); font-size: var(--fs-sm); }
.result .rec__tag { margin-right: 0.5rem; }
.search-empty, .ask-empty { color: var(--muted); }

/* ---- Pre-footer contact band (rich, page content) ------------------------ */
.contact-band { background: var(--cream-deep); border-top: 1px solid var(--rule-strong); }
.contact-band .grid { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; gap: var(--sp-6); }
.contact-band h2 { font-size: var(--fs-lg); }
.contact-band h3 { font-size: var(--fs-md); }
.contact-band address { font-style: normal; line-height: 1.7; }
.contact-band .meta { color: var(--muted); }
.signup form { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.signup input[type="email"] { flex: 1 1 12rem; min-height: var(--hit); padding: 0 0.8rem;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; }
.signup .note { font-size: var(--fs-fine); color: var(--muted); margin-top: 0.4rem; }
@media (max-width: 46rem) { .contact-band .grid { grid-template-columns: 1fr; } }

/* ---- Footer (scaffold: .site-footer > .footer-nav + .footer-note) -------- */
.site-footer { background: var(--dusk); color: var(--dusk-text); padding-block: var(--sp-6);
  border-top: 4px solid var(--accent-500); view-transition-name: footer; }
.site-footer .footer-nav, .site-footer .footer-note {
  width: min(100% - 2.5rem, var(--wrap-wide)); margin-inline: auto;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.site-footer a { color: var(--dusk-text); text-decoration: none; min-height: 2.75rem; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--accent-300); }
.footer-note { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid rgba(241,230,210,0.16);
  font-size: var(--fs-fine); color: var(--dusk-muted); }

/* ---- Utilities ----------------------------------------------------------- */
.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; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: #fff;
  padding: 0.7rem 1rem; border-radius: 0 0 var(--radius) 0; }
.skip-link:focus { left: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tag { display: inline-block; font-family: "DM Mono", monospace; font-size: 0.68rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--river); background: color-mix(in oklab, var(--river) 12%, transparent);
  padding: 0.15rem 0.5rem; border-radius: 3px; }
.pull { font-family: "Sanchez", serif; font-style: italic; font-size: var(--fs-lg); line-height: 1.3;
  color: var(--ink); border-left: 4px solid var(--accent-500); padding-left: var(--sp-4); margin: var(--sp-6) 0; max-width: 40ch; }

/* ---- Motion: on-load reveal + duotone drift (reduced-motion gated) -------
   .reveal defaults to VISIBLE; @starting-style fades it up only on first render,
   so content is never persistently invisible (keyboard/screen-reader/QA/screenshot
   safe) and degrades to instant-visible where @starting-style is unsupported. */
@media (prefers-reduced-motion: no-preference) {
  /* transform-only: content is always fully opaque (never invisible to axe,
     keyboard, or a screenshot), it just rises a touch on first render. */
  .reveal { transition: transform .6s ease; }
  @starting-style { .reveal { transform: translateY(14px); } }
  .hero__media img { animation: gold-drift 26s ease-in-out infinite alternate; }
  @keyframes gold-drift { from { transform: scale(1.02); } to { transform: scale(1.08); } }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---- Print --------------------------------------------------------------- */
@media print {
  .proto-banner, .site-header, .site-nav, .site-footer, .menu-toggle, .header-search, .hero__cta { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { background: #fff; color: #000; }
  .hero__media { display: none; }
  .room-dark, .nextmeet { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .arch { border-color: #000; box-shadow: none; }
  .section { padding-block: 0.5rem; }
}
