/* Abbotsford Insider, lead page VERSION 2 (gallery / catalogue grammar).
   Every value comes from tokens.css. 6d motion pass 2026-11-16: press/hover/focus states, sticky header, one below-fold fade, success celebration (block at the end). */

/* Duolingo pass 2026-11-16, re-extract into tokens later: 4px key edge on buttons, press pushes 2px into it. */
:root {
  --btn-edge: inset 0 -4px 0 var(--ink), 0 1px 2px rgb(23 59 47 / .10);
  --btn-edge-hover: inset 0 -4px 0 var(--ink), 0 8px 18px rgb(23 59 47 / .16);
  --btn-edge-press: inset 0 -2px 0 var(--ink), 0 1px 2px rgb(23 59 47 / .10);
  --btn2-edge: inset 0 -2px 0 var(--ink); --btn2-edge-press: none; /* 2px border + 2px = 4px bottom edge */
  --btn-press: translateY(2px);
  --h2-s: 32px; --h2-m: 40px; --h2-l: 48px; /* section heads, same steps as the category heading */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: var(--s6); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--w-body) var(--step-body-m)/var(--lh-body) var(--font-body); overflow-x: clip; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--w-display); margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-h2-m); line-height: var(--lh-head); }
.warm h1 { font-size: 48px; line-height: var(--lh-display); letter-spacing: -.02em; color: var(--evergreen); } /* critic pass 2026-11-16: 48 / 72 / clamp(60, 5vw, 72), evergreen like the h2s */
h2 { font-size: var(--step-h2-m); line-height: var(--lh-head); letter-spacing: -.01em; }
h3 { font-size: var(--step-h3); line-height: var(--lh-head); }
p { max-width: var(--measure); margin: 0; text-wrap: pretty; }
a { color: var(--evergreen); text-decoration-thickness: 2px; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--evergreen); color: var(--paper); }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--s2); container-type: inline-size; }
.section { margin-top: var(--rhythm-section); } /* rhythm tokens (tokens.css), every zone, 2026-11-18 */
@media (min-width: 1024px) { .hero + .section { margin-top: calc(var(--rhythm-section) - var(--s6)); } } /* hero carries 64px bottom padding from 1024; below that its art hangs into the gap */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: var(--s1); transform: translateY(-200%); background: var(--paper); padding: var(--s1) var(--s2); border-radius: var(--radius-control); z-index: 10; }
.skip:focus { transform: none; }
.warm .section h2 { font-size: var(--h2-s); line-height: 1.08; letter-spacing: -.02em; color: var(--evergreen); }
.warm .band h2 { color: var(--paper); }
@media (min-width: 632px) { .warm .section h2 { font-size: var(--h2-m); } }
@media (min-width: 1104px) { .warm .section h2 { font-size: var(--h2-l); } }
.muted { color: var(--muted); }
.small { font-size: var(--step-small); }
@media (min-width: 768px) {
  body { font-size: var(--step-body); }
  h1 { font-size: var(--step-h2); }
  .warm h1 { font-size: 72px; }
  h2 { font-size: var(--step-h2); }
  .wrap { padding: 0 var(--s4); }
}

/* ---------- Wordmark, icons ---------- */
.wordmark { font-family: var(--font-display); font-size: var(--step-h3); line-height: 1; letter-spacing: -.01em; white-space: nowrap; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
/* Logo files: logo/final/ (logo/decisions.md). The SVGs carry only a viewBox (8.81:1), so both sides are set here. */
.wordmark img { display: block; flex: none; width: 211px; height: 24px; }
.site-foot .wordmark img { width: 247px; height: 28px; }
.icon { width: var(--icon); height: var(--icon); flex: none; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.icon--tile { width: var(--icon-tile); height: var(--icon-tile); color: var(--ink); stroke-width: 1.2; }

/* ---------- Buttons (sheet) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: var(--control-h);
  padding: 0 var(--s3); border-radius: var(--radius-control); border: 0; font: var(--w-ui) var(--step-body-m)/1 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform var(--dur) var(--ease); }
.btn:active { transform: var(--press); transition-duration: var(--dur-press); }
.btn:focus-visible, .input:focus-visible, a:focus-visible, summary:focus-visible, .rail:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
.on-dark :focus-visible { outline: var(--focus-on-dark); }
.btn--primary, .btn--secondary { font-weight: 700; }
.btn--primary { background: var(--gold); color: var(--ink); box-shadow: var(--btn-edge); padding-bottom: 4px; }
.btn--primary:active { transform: var(--btn-press); box-shadow: var(--btn-edge-press); }
.btn--secondary { background: var(--paper); color: var(--ink); border: var(--btn2-border); box-shadow: var(--btn2-edge); }
.btn--secondary:active { transform: var(--btn-press); box-shadow: var(--btn2-edge-press); }
.btn--quiet { background: transparent; color: var(--evergreen); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; padding: 0 var(--s1); }
.on-dark .btn--quiet { color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { box-shadow: var(--btn-edge-hover); transform: var(--btn-hover); }
  .btn--primary:active { transform: var(--btn-press); box-shadow: var(--btn-edge-press); }
  .btn--secondary:hover { background: var(--panel); }
  .btn--quiet:hover { background: var(--panel); text-decoration-thickness: 3px; }
  .on-dark .btn--quiet:hover { background: transparent; }
}

/* ---------- Inputs + search (sheet) ---------- */
.field { display: grid; gap: var(--s1); margin-bottom: var(--s3); }
.field label { font-size: var(--step-small); font-weight: var(--w-ui); }
.field .hint { font-size: var(--step-small); color: var(--muted); }
.input { min-height: var(--control-h); width: 100%; padding: 0 var(--s2); border: var(--input-border); border-radius: var(--radius-input);
  font: var(--w-body) var(--step-body-m)/1.2 var(--font-body); color: var(--ink); background: var(--paper); }
.input::placeholder { color: var(--muted); opacity: 1; }
.field--error .input { border: 2px solid var(--error); }
.err { display: flex; gap: var(--s1); align-items: flex-start; color: var(--error); font-size: var(--step-small); line-height: var(--lh-body); }
.select-wrap { position: relative; }
.select-wrap .input { appearance: none; padding-right: var(--s5); cursor: pointer; }
.select-wrap .icon { position: absolute; right: var(--s2); top: 50%; translate: 0 -50%; pointer-events: none; color: var(--ink); }
.input--area { min-height: calc(var(--control-h) * 3); padding: var(--s2); border-radius: var(--radius-card); resize: vertical; line-height: var(--lh-body); }
.search { display: flex; gap: var(--s1); width: 100%; max-width: 560px; background: var(--paper); border: var(--input-border); border-radius: var(--radius-input); padding: 4px; }
.search .input { flex: 1; min-width: 0; border: 0; min-height: var(--control-h); }
.search .btn { min-height: var(--control-h); }
.search:focus-within { border-color: var(--ink); }
@media (max-width: 479px) {
  .search { flex-direction: column; border: 0; padding: 0; border-radius: 0; background: transparent; }
  .search .input { border: var(--input-border); min-height: var(--control-h); }
  .search .btn { width: 100%; min-height: var(--control-h); }
}
@media (min-width: 768px) { .input { font-size: var(--step-body); } }

/* ---------- Tag ---------- */
.tag-featured { display: inline-flex; align-items: center; gap: 4px; background: var(--featured-bg); color: var(--evergreen);
  border-radius: var(--radius-tag); padding: 4px var(--s1); font: var(--w-display) var(--step-small)/1.2 var(--font-body); }

/* ---------- Nav ---------- */
.site-head { padding-top: var(--s2); position: relative; z-index: 5; }
.navbar { position: relative; display: flex; align-items: center; gap: var(--s2); min-height: 64px; padding: 0 var(--s1) 0 var(--s2); border: var(--rule); border-radius: var(--radius-card); background: var(--paper); }
.navbar .wordmark { font-size: var(--step-body); }
.navbar .links { display: none; gap: var(--s3); font-size: var(--step-small); font-weight: var(--w-ui); margin-left: var(--s3); }
.navbar .links a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.navbar .links a[aria-current] { color: var(--evergreen); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.navbar .end { margin-left: auto; display: flex; gap: var(--s1); align-items: center; }
.navbar .btn { min-height: 44px; padding: 0 var(--s2) 4px; font-size: var(--step-small); }
.navbar .add { display: none; }
.navbar .menu-d summary { list-style: none; width: 48px; min-height: 48px; padding: 0; }
.navbar .menu-d summary .icon { translate: 0 -1px; } /* optical centre on the key face above the edge */
.menu-d summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; left: -1px; right: -1px; top: calc(100% + var(--s1)); background: var(--paper); border: var(--card-border); border-radius: var(--radius-card); padding: var(--s1) var(--s2) var(--s2); display: grid; box-shadow: var(--card-shadow-hover); }
.menu-panel a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: var(--w-ui); min-height: 48px; display: flex; align-items: center; border-bottom: var(--rule); }
.menu-panel a[aria-current]:not(.btn) { color: var(--evergreen); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; } /* current page, same mark as the desktop links */
.menu-panel .btn { margin-top: var(--s2); min-height: var(--control-h); }
.navbar .btn--primary { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .navbar .links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; } }
@container (min-width: 1016px) { /* was 928; 1016 since Contact joined and "Local" became "Local stories" (2026-11-26): five centred links (540px) leave a 24px gap beside the logo only from ~1012px of container (max is 1056); narrower = menu button */
  .navbar { padding: 0 var(--s2) 0 var(--s3); }
  .navbar .links { display: flex; position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; font-size: var(--step-body-m); gap: var(--s4); } /* centred, 16px (owner 2026-11-16) */
  .navbar .add { display: inline-flex; }
  .menu-d { display: none; }
}

/* ---------- Hero (locked): centred column between two bleeding clusters ---------- */
.hero { position: relative; padding: var(--s4) var(--s2) 0; overflow-x: clip; }
.hero-col { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; display: grid; justify-items: center; text-align: center; gap: var(--s2); }
.hero-col .sub { max-width: 30em; }
.hero-col .search { margin-top: var(--s2); position: relative; }
.hero-art { aspect-ratio: 723 / 1100; width: 120px; margin: 0 0 var(--s2) calc(-1 * var(--s2)); }
.hero-art img, .hero-art .ai-char { width: 100%; height: auto; }
.hero-art--left img, .hero-art--left .ai-char { translate: -2.6% 0; }
/* 375: mobile pose (art/mascot-point-down.svg) in the top-right slot, magnifier lowered at the headline and search below */
.hero-mascot-m { position: absolute; top: var(--s6); right: var(--s1); width: 128px; height: auto; pointer-events: none; }
/* 768 up: art/mascot-point.svg reaches up to the search box, magnifier aimed at the pill corner with at least 16px clear space (owner 2026-11-16: the ring must never touch or hide behind the box).
   z-index -1 keeps it behind the form and button, pointer-events off, so it can never cover the input or block a tap. */
svg.hero-mascot, .hero-mascot { display: none; }
.hero-art--right { display: none; }
@media (min-width: 768px) {
  .hero { padding: var(--s6) var(--s4); display: grid; align-items: center; }
  svg.hero-mascot-m, .hero-mascot-m { display: none; }
  .hero-col h1 { margin-inline: -80px; } /* 72px line is wider than the 560 column; the column itself stays put */
  .hero-art { --w: clamp(190px, 26vw, 400px); position: absolute; top: 50%; translate: 0 -50%; width: var(--w); margin: 0; }
  .hero-art--left { left: min(0px, calc(50% - 280px - var(--w) - var(--s3))); }
  .hero-art--right { display: block; aspect-ratio: 789 / 1100; right: min(0px, calc(50% - 280px - var(--w) - var(--s3))); }
  svg.hero-mascot, .hero-mascot { display: block; position: absolute; z-index: -1; width: 150px; max-width: none; height: auto; top: calc(100% + 14px); left: calc(100% - 44px); pointer-events: none; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero { display: block; padding-bottom: 240px; }
  .hero-art { --w: 210px; top: auto; bottom: 0; translate: none; }
  .hero-art--left { left: 0; }
  .hero-art--right { --w: 190px; right: 0; bottom: -112px; } /* smaller and lower, into the section gap, so the mascot has the pill corner */
  .plate .go-t { display: none; }
  .rail { column-gap: var(--s4); }
}
@media (min-width: 1024px) { .hero { min-height: 664px; } .warm h1 { font-size: clamp(60px, 5vw, 72px); } .hero-mascot { width: 220px; top: calc(100% - 9px); left: calc(100% - 4px); } }
@media (min-width: 1200px) { .hero { min-height: 704px; } .hero-mascot { width: 240px; top: calc(100% - 10px); left: calc(100% - 5px); } }

/* ---------- Catalogue index: the 12 categories ----------
   Key-cap tiles: a coloured face on a 4px darker edge, Phosphor Fill icon. One fixed colour per category at every width.
   The illo colours are allowed in UI for these tiles only (DESIGN.md section 17). */
.tile { width: 64px; height: 64px; background: var(--panel); border-radius: var(--radius-card); display: grid; place-items: center; flex: none; transition: transform var(--dur) var(--ease); } /* guide plates */
.index { --cat-tile: 72px; --cat-icon: 36px; --cat-edge: 4px; --cat-press: translateY(2px);
  --sky-deep: color-mix(in oklab, var(--illo-sky) 30%, var(--ink)); --red-deep: color-mix(in oklab, var(--illo-red) 45%, var(--ink)); }
.index-head { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.index-head h2 { font-size: 32px; line-height: 1.08; letter-spacing: -.02em; color: var(--evergreen); }
.index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s2); }
.entry { display: grid; gap: 12px; align-content: start; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: var(--w-display); line-height: 1.2; min-height: 44px; border-radius: var(--s1); }
.entry .tile { --edge: color-mix(in oklab, var(--face) 72%, var(--ink)); --glyph: var(--ink);
  position: relative; isolation: isolate; width: var(--cat-tile); height: calc(var(--cat-tile) + var(--cat-edge)); padding-bottom: var(--cat-edge); background: none; border-radius: 0; transition: none; }
/* edge: stays put, two layered soft shadows under it */
.entry .tile::before { content: ""; position: absolute; z-index: -2; inset: var(--cat-edge) 0 0; border-radius: var(--radius-card); background: var(--edge);
  box-shadow: 0 1px 2px rgb(23 59 47 / .10), 0 8px 14px rgb(23 59 47 / .10); }
/* face: the part that moves */
.entry .tile::after { content: ""; position: absolute; z-index: -1; inset: 0 0 var(--cat-edge); border-radius: var(--radius-card); background: var(--face); transition: transform var(--dur) var(--ease); }
.cat-icon { width: var(--cat-icon); height: var(--cat-icon); flex: none; fill: currentColor; color: var(--glyph); transition: transform var(--dur) var(--ease); }
.entry--plumber .tile     { --face: var(--illo-sky); --glyph: var(--sky-deep); }
.entry--electrician .tile { --face: var(--gold); }
.entry--roofer .tile      { --face: var(--illo-red); --glyph: var(--paper); }
.entry--hvac .tile        { --face: color-mix(in oklab, var(--gold) 55%, var(--illo-red)); }
.entry--landscaper .tile  { --face: var(--illo-green); --glyph: var(--paper); }
.entry--cleaning .tile    { --face: color-mix(in oklab, var(--illo-sky) 45%, var(--paper)); --glyph: var(--sky-deep); }
.entry--painter .tile     { --face: color-mix(in oklab, var(--illo-red) 32%, var(--paper)); --glyph: var(--red-deep); }
.entry--windshield .tile  { --face: color-mix(in oklab, var(--illo-sky) 55%, var(--ink)); --glyph: var(--paper); }
.entry--detailing .tile   { --face: var(--evergreen); --glyph: var(--gold); --edge: color-mix(in oklab, var(--face) 55%, var(--ink)); }
.entry--dentist .tile     { --face: color-mix(in oklab, var(--illo-sky) 50%, var(--illo-green)); --glyph: var(--paper); }
.entry--reno .tile        { --face: color-mix(in oklab, var(--illo-red) 68%, var(--ink)); --glyph: var(--paper); }
.entry--vet .tile         { --face: color-mix(in oklab, var(--gold) 55%, var(--paper)); }
.entry--web .tile        { --face: color-mix(in oklab, var(--illo-green) 40%, var(--paper)); --glyph: var(--evergreen); }
.entry:active .tile::after, .entry:active .cat-icon { transform: var(--cat-press); transition-duration: var(--dur-press); }
@media (hover: hover) and (pointer: fine) {
  .entry:hover .name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .entry:hover .tile::after, .entry:hover .cat-icon { transform: var(--btn-hover); }
  .entry:hover:active .tile::after, .entry:hover:active .cat-icon { transform: var(--cat-press); }
}
@container (min-width: 600px) {
  .index-head h2 { font-size: 40px; }
  .index-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entry { grid-template-columns: var(--cat-tile) minmax(0, 1fr); align-items: center; gap: 12px; }
}
@container (min-width: 1040px) {
  .index { display: grid; grid-template-columns: minmax(0, 332px) minmax(0, 1fr); column-gap: var(--s3); align-items: start; }
  .index-head { margin-bottom: 0; gap: var(--s2); }
  .index-head h2 { font-size: 48px; }
  .index-grid { gap: var(--s4) var(--s2); }
}

/* ---------- Trust band: the two labels a visitor meets, shown as specimens ---------- */
.band { background: var(--evergreen); color: var(--paper); border-radius: var(--radius-card); padding: var(--s4) var(--s3); display: grid; gap: var(--s4); justify-items: start; }
.band h2, .band p { color: var(--paper); }
.band-copy { display: grid; gap: var(--s2); }
.band .btn--quiet { padding: 0; }
.specimens { display: grid; gap: var(--s2); width: 100%; }
.specimen { background: var(--paper); color: var(--ink); border-radius: var(--radius-card); padding: var(--s2); display: grid; gap: var(--s2); align-content: start; }
.spec-show { min-height: 64px; border: 0; background: var(--panel); border-radius: var(--radius-card); padding: var(--s2); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: center; }
/* Flat tinted strip like the Featured sample: it is a label, not a button (final critic 2026-11-16). */
.spec-show--featured { border: 0; background: var(--featured-bg); font-size: var(--step-small); color: var(--evergreen); gap: var(--s1); }
.spec-show--featured .tag-featured { background: var(--paper); }
.rank-num { font-size: var(--rank-numeral); font-weight: var(--rank-numeral-weight); color: var(--rank-numeral-colour); line-height: 1; font-variant-numeric: tabular-nums; width: var(--rank-col); }
.spec-name { font-weight: var(--w-display); font-size: var(--step-h3); line-height: var(--lh-head); }
.band .specimen .caption { color: var(--ink); font-size: var(--step-body-m); padding: 0 var(--s1) var(--s1); }
@container (min-width: 700px) {
  .band { padding: var(--s5); }
  .specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .specimen { padding: var(--s3); }
  .band .specimen .caption { padding: 0; }
}

/* ---------- Guides rail: scroll-snap, next item peeks, no JS ---------- */
.rail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3); margin-bottom: var(--s3); }
.rail-head .btn--quiet { padding: 0; }
.rail { --gutter: var(--s2); -webkit-mask-image: linear-gradient(to right, black calc(100% - var(--s5)), transparent); mask-image: linear-gradient(to right, black calc(100% - var(--s5)), transparent); display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  padding: var(--s1) var(--gutter) var(--s3); overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--muted) var(--panel); }
.rail > li { scroll-snap-align: start; flex: none; display: flex; }
.plate { width: min(64vw, 280px); display: grid; grid-template-rows: auto 1fr auto; gap: var(--s3); padding: var(--s3); border: var(--card-border); border-radius: var(--radius-card);
  color: var(--ink); text-decoration: none; position: relative; transition: transform var(--dur) var(--ease); }
.plate::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: var(--card-shadow-hover); opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
/* key-cap tiles, same build and same colour as the matching category tile (illo-colour exception, DESIGN.md section 17) */
.plate .tile { --edge: color-mix(in oklab, var(--face) 72%, var(--ink)); --glyph: var(--ink); position: relative; isolation: isolate; width: 64px; height: 68px; background: none; border-radius: 0; transition: none; padding-bottom: 4px; }
.plate .tile::before { content: ""; position: absolute; z-index: -2; inset: 4px 0 0; border-radius: var(--radius-card); background: var(--edge); box-shadow: 0 1px 2px rgb(23 59 47 / .10), 0 8px 14px rgb(23 59 47 / .10); }
.plate .tile::after { content: ""; position: absolute; z-index: -1; inset: 0 0 4px; border-radius: var(--radius-card); background: var(--face); transition: transform var(--dur) var(--ease); }
.plate .cat-icon { width: 32px; height: 32px; }
.plate--electrician .tile { --face: var(--gold); }
.plate--reno .tile { --face: color-mix(in oklab, var(--illo-red) 68%, var(--ink)); --glyph: var(--paper); }
.plate--hvac .tile { --face: color-mix(in oklab, var(--gold) 55%, var(--illo-red)); }
.plate:active .tile::after, .plate:active .cat-icon { transform: translateY(2px); transition-duration: var(--dur-press); }
@media (hover: hover) and (pointer: fine) {
  .plate:hover .tile::after, .plate:hover .cat-icon { transform: var(--btn-hover); }
  .plate:hover:active .tile::after, .plate:hover:active .cat-icon { transform: translateY(2px); }
}
.plate .kind, .lead .kind { font-size: var(--step-small); color: var(--muted); }
.plate .go, .lead .go { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--step-small); font-weight: var(--w-ui); color: var(--evergreen); }
.plate h3, .lead h3 { margin-top: 4px; }
.lead { width: min(78vw, 480px); display: grid; grid-template-rows: 1fr auto auto; gap: var(--s2); color: var(--ink); text-decoration: none;
  padding: var(--s3); border: var(--card-border); border-radius: var(--radius-card); } /* mobile rail: same card frame as the plates */
.lead-art { aspect-ratio: 1100 / 647; display: grid; align-content: end; }
.lead-art img { width: 100%; height: auto; }
@media (hover: hover) and (pointer: fine) {
  .plate:hover { transform: var(--card-hover); }
  .plate:hover::after { opacity: 1; }
  .lead:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}
@media (min-width: 768px) {
  .rail { -webkit-mask-image: none; mask-image: none; overflow: visible; max-width: var(--container); margin: 0 auto; padding: 0 var(--s4);
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--s5); align-items: start; }
  .rail > li { display: block; }
  .rail > li:first-child { grid-row: 1 / span 3; }
  .rail > li:nth-child(2) .plate { border-top: 1px solid var(--ink); }
  .lead { width: auto; padding: 0; border: 0; border-radius: 0; }
  .plate { width: auto; grid-template-rows: none; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: var(--s3);
    padding: var(--s3) 0; border: 0; border-bottom: var(--rule); border-radius: 0; }
  .plate::after { display: none; }
  .plate .go { white-space: nowrap; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  .plate:hover { transform: none; }
  .plate:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}

/* ---------- Local stories: ledger, one label schema per row ---------- */
.ledger { border-top: 1px solid var(--ink); }
.ledger a { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--s2); row-gap: 4px; align-items: center; padding: var(--s3) 0; border-bottom: var(--rule); color: var(--ink); text-decoration: none; }
/* quiet key-cap: evergreen face, gold Phosphor glyph, 4px darker edge. One neutral treatment for every story. */
.ledger .tile { --face: var(--evergreen); --edge: color-mix(in oklab, var(--evergreen) 25%, var(--ink)); grid-row: 1 / span 3; align-self: start;
  position: relative; isolation: isolate; width: 40px; height: 44px; padding-bottom: 4px; background: none; border-radius: 0; transition: none; }
.ledger .tile::before { content: ""; position: absolute; z-index: -2; inset: 4px 0 0; border-radius: 12px; background: var(--edge); box-shadow: 0 1px 2px rgb(23 59 47 / .10), 0 6px 10px rgb(23 59 47 / .10); }
.ledger .tile::after { content: ""; position: absolute; z-index: -1; inset: 0 0 4px; border-radius: 12px; background: var(--face); transition: transform var(--dur) var(--ease); }
.ledger .cat-icon { width: 22px; height: 22px; color: var(--gold); }
.ledger a:active .tile::after, .ledger a:active .cat-icon { transform: translateY(2px); transition-duration: var(--dur-press); }
.ledger .when { font-size: var(--step-small); font-weight: var(--w-ui); color: var(--evergreen); font-variant-numeric: tabular-nums; }
.ledger h3 { font-size: var(--step-h3); }
.ledger .fact { font-size: 14px; color: var(--muted); }
.ledger .icon { display: none; color: var(--evergreen); }
@media (hover: hover) and (pointer: fine) {
  .ledger a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .ledger a:hover .tile::after, .ledger a:hover .cat-icon { transform: var(--btn-hover); }
  .ledger a:hover:active .tile::after, .ledger a:hover:active .cat-icon { transform: translateY(2px); }
}
@container (min-width: 760px) {
  .ledger a { grid-template-columns: 40px 116px minmax(0, 1fr) 240px var(--icon); column-gap: var(--s3); }
  .ledger .tile { grid-row: auto; align-self: center; }
  .ledger .icon { display: block; }
}

/* ---------- Owner close: mascot holds the door ---------- */
.closing { display: grid; gap: var(--s3); align-items: center; padding: 0; }
.closing-copy { display: grid; gap: var(--s2); justify-items: start; }
.closing-copy .btn { margin-top: var(--s2); min-height: 56px; padding: 0 var(--s4) 4px; font-size: 18px; }
.closing-art { aspect-ratio: 1 / 1; width: min(100%, 330px); justify-self: center; margin-bottom: calc(-1 * var(--s3)); }
.closing-art img, .closing-art .ai-char { width: 100%; height: auto; }
@container (min-width: 600px) {
  .closing { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: var(--s4); }
  .closing-art { width: min(100%, 430px); justify-self: end; margin-bottom: calc(-1 * var(--s4)); }
}

/* ---------- Grey breathing band, then the footer on the evergreen band ---------- */
/* breathing room before the footer: white space, not a grey strip (owner 2026-11-16) */
.site-foot { margin-top: var(--rhythm-section); }
.site-foot { background: var(--evergreen); color: var(--paper); padding: var(--s5) 0 var(--s5); }
.site-foot .wordmark, .site-foot p { color: var(--paper); }
.foot-grid { display: grid; gap: var(--s4); }
.foot-credit { max-width: none; width: 100%; margin-top: var(--s4); padding-top: var(--s2); border-top: 1px solid rgba(255,255,255,.2); }
.foot-credit a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.foot-about { display: grid; gap: var(--s1); align-content: start; }
.foot-title { font-size: var(--step-h3); font-weight: 800; line-height: var(--lh-head); letter-spacing: 0; color: var(--gold); /* gold on evergreen 6.7:1, owner 2026-11-16 */ margin-bottom: var(--s1); }
.foot-cats { columns: 2; column-gap: var(--s3); }
.foot-list a, .foot-cats a { color: var(--paper); font-weight: var(--w-body); text-decoration: none; font-size: var(--step-body-m); min-height: 44px; display: inline-flex; align-items: center; }
.foot-cats li { break-inside: avoid; }
@media (hover: hover) and (pointer: fine) { .foot-list a:hover, .foot-cats a:hover { text-decoration: underline; text-decoration-thickness: 2px; } }

.foot-mail { color: var(--paper); font-weight: var(--w-ui); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; justify-self: start; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .foot-mail:hover { text-decoration-thickness: 2px; } }
.foot-social { color: var(--paper); display: inline-flex; align-items: center; justify-content: flex-start; min-width: 44px; min-height: 44px; justify-self: start; transition: transform .16s ease-out, opacity .16s ease-out; }
.foot-social:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .foot-social:hover { opacity: .8; } }
@container (min-width: 600px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); }
}
@container (min-width: 1000px) {
  .foot-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2.4fr); column-gap: var(--s4); }
  .foot-list a, .foot-cats a { min-height: 40px; }
}


/* ---------- Contact (plain zone, no art) ---------- */
.contact { max-width: 640px; }
.contact-head { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.contact form { display: grid; }
.contact .btn--primary { justify-self: start; }
.note { margin-top: var(--s3); font-size: var(--step-small); color: var(--muted); }
.errors { border: 2px solid var(--error); border-radius: var(--radius-card); padding: var(--s2); margin-bottom: var(--s3); }
.errors h2 { display: flex; gap: var(--s1); align-items: center; font-size: var(--step-body-m); color: var(--error); margin-bottom: var(--s1); letter-spacing: 0; }
.errors ul { list-style: disc; padding-left: var(--s3); font-size: var(--step-small); }
.errors a { color: var(--error); }
.success { border: var(--card-border); border-radius: var(--radius-card); padding: var(--s3); display: grid; gap: var(--s2); justify-items: start; }
.success h2 { display: flex; gap: var(--s1); align-items: center; font-size: var(--step-h3); letter-spacing: 0; }
.success .icon { color: var(--evergreen); }
.success .btn--quiet { padding: 0; }
.state { display: none; }
.state:target { display: block; }
.contact:has(.state:target) .state-default { display: none; }
.preview-note { margin-top: var(--s5); padding-top: var(--s2); border-top: var(--rule); font-size: var(--step-small); color: var(--muted); }
@media (max-width: 479px) { .contact .btn--primary { width: 100%; } }

/* ================= 6d MOTION PASS (2026-11-16) =================
   Restrained. Transform + opacity only, token durations (--dur, --dur-press) and --ease.
   Shadows and colours snap; the only fading shadows are ::after layers faded by opacity.
   Nothing here changes a rest state: layout, colour, type and copy are the approved still. */
:root { --dur-reveal: calc(var(--dur) * 3); --dur-jump: calc(var(--dur) * 7); --dur-flutter: calc(var(--dur) * 6); --dur-fly: calc(var(--dur) * 7); --dur-flap: calc(var(--dur) * 4 / 3);
  --ease-up: var(--ease); --ease-down: cubic-bezier(.55, 0, .9, .45); --ease-loop: cubic-bezier(.45, 0, .55, 1); } /* out going up, in coming down, in-out for loops; nothing linear */

/* ---------- Sticky header (CSS only; motion.js adds .is-scrolled for the shadow) ---------- */
html { scroll-padding-top: calc(var(--s6) + var(--s5)); } /* 72px of stuck header + room for a field label */
.site-head { position: sticky; top: calc(-1 * var(--s1)); } /* the 16px top gap tightens to 8px once stuck */
.navbar::after { content: ""; position: absolute; z-index: -1; inset: -1px; border-radius: inherit; box-shadow: var(--card-shadow-hover); opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
.site-head.is-scrolled .navbar::after { opacity: 1; }
.site-head::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: var(--s2); background: var(--paper); } /* paper strip over the gap above the stuck bar, so no sliced content shows there; white on white at the top of the page */

/* ---------- Text controls: nav links, wordmark, menu links, footer links ---------- */
.navbar .links a, .wordmark, .menu-panel a:not(.btn), .foot-list a, .foot-cats a { transition: transform var(--dur) var(--ease); }
.menu-panel a:not(.btn), .foot-list a, .foot-cats a { transform-origin: left center; }
/* mobile menu opens from the button that triggered it */
@keyframes menu-in { from { opacity: 0; transform: var(--press); } }
.menu-d[open] .menu-panel { transform-origin: top right; animation: menu-in var(--dur) var(--ease); }

.foot-list a[aria-current], .foot-cats a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
/* quiet link on the evergreen band: a solid paper chip appears behind the label on hover (the label flips to evergreen) */
/* quiet links everywhere: a solid capsule appears behind the label on hover and the label colour flips, both in the same frame (snap).
   Ink capsule + paper label on light surfaces, paper capsule + evergreen label on the evergreen band.
   The capsule is a pseudo-element, so the rest state and the layout never move. */
.btn--quiet { position: relative; isolation: isolate; }
.btn--quiet::before { content: ""; position: absolute; z-index: -1; inset: 6px -10px; border-radius: var(--radius-control); background: var(--ink); opacity: 0; pointer-events: none; } /* no fade: it snaps with the label colour, so the label is never on the wrong ground */
.on-dark .btn--quiet::before { inset: 6px calc(-1 * var(--s2)); background: var(--paper); }
/* Home hero "Browse all categories": the ink capsule is its resting state, not only on hover (owner 2026-11-23). */
.hero-col > .btn--quiet { color: var(--paper); text-decoration: none; transition: transform var(--dur) var(--ease); }
.hero-col > .btn--quiet::before { opacity: 1; }
.hero-col > .btn--quiet:active { transform: var(--btn-press); }

/* ---------- Guide cards ---------- */
.lead { position: relative; transition: transform var(--dur) var(--ease); }
.lead::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: var(--card-shadow-hover); opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
.lead-art img { transition: transform var(--dur) var(--ease); }
@media (min-width: 768px) { .lead::after { display: none; } }

/* ---------- Hover (mouse only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .navbar .links a:not([aria-current]):hover { color: var(--evergreen); text-decoration-thickness: 3px; }
  /* wordmark: no hover change at all (owner 2026-11-16); press and focus ring stay */
  .menu-panel a:not(.btn):not([aria-current]):hover { color: var(--evergreen); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
  .foot-list a:not([aria-current]):hover, .foot-cats a:not([aria-current]):hover { text-decoration-thickness: 3px; text-underline-offset: 5px; }
  .foot-list a[aria-current]:hover, .foot-cats a[aria-current]:hover { text-decoration-thickness: 2px; }
  .btn--secondary:hover, .on-dark .btn--quiet:hover { transform: var(--btn-hover); }
  .btn--quiet:hover { background: transparent; color: var(--paper); text-decoration: none; }
  .btn--quiet:hover::before { opacity: 1; }
  .on-dark .btn--quiet:hover { color: var(--evergreen); text-decoration: underline; }
  .input:hover, .search:hover { border-color: var(--ink); }
  .input:hover { box-shadow: inset 0 0 0 1px var(--ink); }
  .field--error .input:hover { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
  /* key-cap tiles: the face rises 2px off its edge */
  .entry:hover .tile::after, .entry:hover .cat-icon, .plate:hover .tile::after, .plate:hover .cat-icon, .ledger a:hover .tile::after, .ledger a:hover .cat-icon { transform: var(--card-hover); }
  .entry:hover .name, .plate:hover h3, .lead:hover h3, .ledger a:hover h3 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
  .lead:hover .lead-art img { transform: var(--card-hover); }
}
@media (hover: hover) and (pointer: fine) and (min-width: 480px) {
  .search:hover { box-shadow: inset 0 0 0 1px var(--ink); } /* from 480 the pill is the field */
  .search .input:hover { box-shadow: none; }
}
@media (hover: hover) and (pointer: fine) and (max-width: 767.98px) {
  .lead:hover { transform: var(--card-hover); }
  .lead:hover::after { opacity: 1; }
  .lead:hover .lead-art img { transform: none; }
}

/* ---------- Press (after hover, so a press always wins) ---------- */
.btn:active, .navbar .links a:active, .wordmark:active, .menu-panel a:not(.btn):active, .foot-list a:active, .foot-cats a:active { transform: var(--press); transition-duration: var(--dur-press); }
.btn--primary:active, .btn--secondary:active { transform: var(--btn-press); } /* face drops 2px into the 4px edge, edge snaps to 2px */
.entry:active .tile::after, .entry:active .cat-icon, .plate:active .tile::after, .plate:active .cat-icon, .ledger a:active .tile::after, .ledger a:active .cat-icon,
.entry:hover:active .tile::after, .entry:hover:active .cat-icon, .plate:hover:active .tile::after, .plate:hover:active .cat-icon, .ledger a:hover:active .tile::after, .ledger a:hover:active .cat-icon { transform: var(--btn-press); transition-duration: var(--dur-press); }
.lead:active .lead-art img { transform: var(--press); transition-duration: var(--dur-press); }
@media (max-width: 767.98px) {
  .plate:active, .lead:active { transform: var(--press); transition-duration: var(--dur-press); }
  .lead:active .lead-art img { transform: none; }
}

/* ---------- Focus: instant, never animated. Evergreen on light, paper on the evergreen band and footer ---------- */
.navbar .links a, .wordmark, .foot-list a, .foot-cats a, .menu-panel a:not(.btn) { border-radius: var(--s1); } /* only shapes the focus ring: these have no fill or border */
.entry:focus-visible, .wordmark:focus-visible, .navbar .links a:focus-visible { outline-offset: 4px; } /* clear white gap between the ring and a coloured tile */
@media (min-width: 768px) { .plate:focus-visible, .lead:focus-visible, .ledger a:focus-visible { outline-offset: 6px; } }
/* quiet links: the ring is a pill 2px outside the hover capsule, so it sits on the page colour and never on the ink capsule */
.btn--quiet:focus-visible { outline: none; }
.btn--quiet:focus-visible::after { content: ""; position: absolute; inset: 1px -15px; border: var(--focus); border-radius: var(--radius-control); pointer-events: none; }
.on-dark .btn--quiet:focus-visible::after { inset: 1px calc(-1 * var(--s2) - 5px); border: var(--focus-on-dark); }
@media (forced-colors: active) { .btn--quiet:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); } .btn--quiet:focus-visible::after { display: none; } }
@supports selector(:has(a)) {
  @media (min-width: 480px) {
    .search:has(.input:focus-visible) { outline: var(--focus); outline-offset: -3px; } /* ring the whole pill, drawn INSIDE its edge (over the 2px border + 1px), so the box never grows toward the mascot magnifier; 3px of white stays between ring and gold button */
    .search .input:focus-visible { outline: none; }
  }
}

/* ---------- Add-your-business success page: mascot cheers, a small flock takes off and leaves the screen ---------- */
.landed { display: grid; gap: var(--s4); align-items: center; }
.landed-copy { display: grid; gap: var(--s2); justify-items: start; }
.landed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s2); }
.landed-actions .btn--primary { min-height: 56px; padding: 0 var(--s4) 4px; font-size: 18px; }
.landed-actions .btn--quiet { padding: 0; }
.cheer { position: relative; aspect-ratio: 1 / 1; width: min(78%, 330px); justify-self: center; margin-top: var(--s4); }
.cheer-mascot { display: block; width: 100%; height: auto; overflow: visible; }
.cheer-mascot g { transform-box: view-box; } /* origins below are viewBox units, stated so no browser guesses */
.cheer-mascot .m-all { transform-origin: 430px 821px; } /* take-off squash and stretch from the ground line (bottom of the feet) */
.cheer-mascot .m-body { transform-origin: 430px 689px; } /* landing squash from the bottom tip of the body */
.cheer-mascot .m-legs { transform-origin: 430px 787px; } /* legs shorten toward the feet, never widen */
.cheer-mascot .m-arm-l { transform-origin: 262px 440px; }
.cheer-mascot .m-arm-r { transform-origin: 598px 440px; }
.cheer-birds { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cheer-birds .bird-x { visibility: hidden; } /* rest state = birds gone; they exist only while the one-shot plays */
.cheer-birds .wing { transform-box: fill-box; transform-origin: 80% 100%; }
.cheer-birds .wing { fill: color-mix(in oklab, var(--body) 55%, var(--paper)); } /* lighter shade of the bird's own colour */
@container (min-width: 600px) {
  .landed { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: var(--s4); }
  .cheer { width: min(100%, 430px); justify-self: end; }
}
@container (max-width: 599.98px) { .cheer { order: -1; width: 220px; margin-top: var(--s2); } }
@media (max-width: 479px) { .landed-actions { width: 100%; } .landed-actions .btn--primary { width: 100%; } }
/* the rest state IS the final frame; the keyframes only describe where things start */
/* MASCOT (1.26s): anticipation squash, stretch on the way up, happy eyes at the top, then a clean landing.
   Landing: he falls accelerating and is back to his exact shape as the feet touch (66%). The feet then stay planted and unscaled;
   only the body sinks 17px with one soft squash while the legs shorten under it (no sideways scale on legs or feet, so they
   read straight), and it eases back up to the rest pose with no rebound. Arms are home by 92%, before the body. */
@keyframes m-jump {
  0% { transform: none; animation-timing-function: var(--ease-up); }
  16% { transform: scale(1.07, .88); animation-timing-function: var(--ease-up); }
  44% { transform: translateY(-78px) scale(.95, 1.07); animation-timing-function: var(--ease-down); }
  66%, 100% { transform: none; }
}
@keyframes m-land-body {
  0%, 66% { transform: none; animation-timing-function: var(--ease-up); } /* carries the fall's speed into the squash, slowing */
  77% { transform: translateY(17px) scale(1.04, .96); animation-timing-function: var(--ease-loop); }
  100% { transform: none; }
}
@keyframes m-land-legs {
  0%, 66% { transform: none; animation-timing-function: var(--ease-up); }
  77% { transform: scaleY(.88); animation-timing-function: var(--ease-loop); }
  100% { transform: none; }
}
@keyframes m-arm-l { 0%, 28% { transform: none; } 44% { transform: rotate(-16deg); } 62% { transform: rotate(8deg); } 77% { transform: rotate(-4deg); } 92%, 100% { transform: none; } }
@keyframes m-arm-r { 0%, 28% { transform: none; } 44% { transform: rotate(16deg); } 62% { transform: rotate(-8deg); } 77% { transform: rotate(4deg); } 92%, 100% { transform: none; } }
/* face swaps are one-frame cuts (step-end below): each value holds until the next stop, so no half-faded double mouth or eyes */
@keyframes m-smile-small { 0% { opacity: 1; } 18%, 100% { opacity: 0; } } /* starts on the everyday smile */
@keyframes m-smile-big { 0% { opacity: 0; } 18%, 100% { opacity: 1; } }   /* and cuts to the grin he keeps */
@keyframes m-eyes-open { 0% { opacity: 1; } 35% { opacity: 0; } 68%, 100% { opacity: 1; } }
@keyframes m-eyes-happy { 0% { opacity: 0; } 35% { opacity: 1; } 68%, 100% { opacity: 0; } } /* ^ ^ at the top of the jump */
/* BIRDS: flutter in small loops beside him for about a second, then all take off and leave the screen. */
@keyframes bird-bob { 25% { transform: translate(var(--bx, 16px), -22px); } 50% { transform: translate(0, -36px); } 75% { transform: translate(calc(var(--bx, 16px) * -1), -16px); } }
@keyframes bird-x { from { visibility: visible; } to { visibility: visible; transform: translateX(var(--fx, 1800px)); } }
@keyframes bird-y { to { transform: translateY(-5200px); } }
@keyframes bird-flap { 50% { transform: scaleY(-.8); } }
@media (prefers-reduced-motion: no-preference) {
  /* fill is backwards only: once the jump is over no animation is left on him, so every group is back to transform: none */
  .cheer-mascot .m-all { animation: m-jump var(--dur-jump) backwards; }
  .cheer-mascot .m-body { animation: m-land-body var(--dur-jump) backwards; }
  .cheer-mascot .m-legs { animation: m-land-legs var(--dur-jump) backwards; }
  .cheer-mascot .m-arm-l { animation: m-arm-l var(--dur-jump) var(--ease-loop) backwards; }
  .cheer-mascot .m-arm-r { animation: m-arm-r var(--dur-jump) var(--ease-loop) backwards; }
  .cheer-mascot .m-smile-small { animation: m-smile-small var(--dur-jump) step-end backwards; }
  .cheer-mascot .m-smile-big { animation: m-smile-big var(--dur-jump) step-end backwards; }
  .cheer-mascot .m-eyes-open { animation: m-eyes-open var(--dur-jump) step-end backwards; }
  .cheer-mascot .m-eyes-happy { animation: m-eyes-happy var(--dur-jump) step-end backwards; }
  /* flutter 1.08s (two loops), take-off 40 to 120ms apart, 1.26s flight, wings flap all the way: over at 2.46s */
  .cheer-birds .bird-bob { animation: bird-bob calc(var(--dur-flutter) / 2) var(--ease-loop) var(--d, 0ms) 2; }
  .cheer-birds .bird-x { animation: bird-x var(--dur-fly) cubic-bezier(.4, 0, .8, .7) calc(var(--dur-flutter) + var(--d, 0ms)) backwards; }
  .cheer-birds .bird-y { animation: bird-y var(--dur-fly) var(--ease-down) calc(var(--dur-flutter) + var(--d, 0ms)) backwards; }
  .cheer-birds .wing { animation: bird-flap var(--dur-flap) var(--ease-loop) var(--d, 0ms) 10; }
}

/* ---------- "Add your business" CTA (owner 2026-11-16): ink capsule, gold mascot tile that floods the button on hover ----------
   Rebuilt from scratch on tokens. The gold is ONE layer the size of the button's inner area, parked to the left so only its
   round right end shows as the tile; hover slides it back by transform (no width, no clip-path). Nothing loops at rest.
   The label never changes colour. The real label is paper and sits UNDER the gold; the gold carries its own ink copy of the label
   (data-label, so the words are not repeated in the markup), moved the opposite way by the same amount with the same timing, so the
   copy stands still on screen while the gold uncovers it. Every frame: ink on gold where the gold is, paper on ink where it is not.
   No 4px bottom edge on this button: nothing is darker than ink, so the edge cannot show. The gold tile carries the darker edge instead. */
:root { --dur-fill: calc(var(--dur) * 4 / 3); --dur-pin: calc(var(--dur) * 2); } /* 240ms, 360ms */
.btn.btn--map { --h: var(--control-h); --tile: calc(var(--h) - 8px); --pr: var(--s3); --gap: 12px; position: relative; isolation: isolate; min-height: var(--h); padding: 0 var(--pr) 0 4px; gap: var(--gap);
  background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: inset 0 1px 0 color-mix(in oklab, var(--paper) 22%, transparent); }
.navbar .add.btn--map { --h: 44px; --pr: var(--s2); --gap: var(--s1); }
.menu-panel .btn.btn--map { --pr: calc(var(--tile) + 4px); } /* label stays centred on the full-width button */
.closing-copy .btn.btn--map { --h: 56px; --pr: var(--s4); --gap: var(--s2); }
.map-fill { position: absolute; z-index: -1; inset: 4px; border-radius: var(--radius-control); overflow: hidden; pointer-events: none; animation: map-guard-out var(--dur-fill) linear; }
.map-gold { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: var(--gold); box-shadow: inset 0 -3px 0 color-mix(in oklab, var(--gold) 72%, var(--ink));
  transform: translateX(calc(-100% + var(--tile))); transition: transform var(--dur-fill) var(--ease); }
.map-gold::before { content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 calc(var(--pr) - 4px) 0 calc(var(--tile) + var(--gap));
  color: var(--ink); transform: translateX(calc(100% - var(--tile))); transition: transform var(--dur-fill) var(--ease); } /* ink copy of the label, exactly over the real one; the two transforms cancel */
.map-tile { width: var(--tile); height: var(--tile); flex: none; display: grid; place-items: center; }
/* Pin is sized by WIDTH. A percentage height here resolves against the tile's auto grid row, which grows to the pin's own height and
   spills out of the tile, so he sat on the bottom edge. Centring is the grid's; the viewBox in the markup pads 32 units over his head
   and 14 under his tip, so he rests half a pixel low: about 1px more gold above than below (a pointed tip carries little weight). */
.map-pin { width: 66%; height: auto; overflow: visible; transform-origin: 50% 100%; }
.map-pin .pin-body { fill: var(--ink); }
.map-pin .pin-eye { fill: var(--paper); }
.map-pin .pin-smile { fill: none; stroke: var(--paper); stroke-width: 34; stroke-linecap: round; transition: opacity var(--dur) var(--ease); }
.map-pin .pin-grin { fill: var(--paper); transition: opacity var(--dur) var(--ease); } /* hidden at rest by its opacity attribute in the markup */
.map-label { flex: 1; text-align: center; position: relative; z-index: -2; } /* under the gold, over the ink capsule */
/* Pin hop (360ms, once per hover) is played by motion.js with element.animate(): squash down, lift a twelfth of the tile (3px nav, 4px closing) slowing to the top, fall
   speeding up, touch down at his exact shape, one soft squash, settle. Leaving mid-hop eases whatever pose he is in back to rest in
   --dur-press; coming back mid-settle starts the next hop from that pose. Rest is a true transform: none, and with JS off there is no hop. */
@media (hover: hover) and (pointer: fine) {
  .btn--map:hover .map-gold, .btn--map:hover .map-gold::before { transform: none; }
  .btn--map:hover .map-fill { animation-name: map-guard-in; }
}
.btn--map:focus-visible .map-gold, .btn--map:focus-visible .map-gold::before { transform: none; } /* keyboard focus gets the gold too (no hop) */
.btn--map:focus-visible .map-fill { animation-name: map-guard-in; }
/* Repaint guard (fix-r4). Not a visible effect: opacity .999 and .998 draw as 1, and both settled states stay at a true opacity 1. Chrome 157 with GPU compositing can leave a
   gold slab stuck on the label when the pointer leaves in the very frame a reversed wipe finishes: the next wipe takes over on the compositor and the area the gold just left is
   never redrawn. A --dur-fill opacity animation on the clip box restarts with every wipe (in on hover or focus, out on leave), so the whole capsule is redrawn on each frame of
   the wipe and nothing stale can outlive it. Two names because a CSS animation only restarts when its name changes. The out one also plays once, unseen, on page load. */
@keyframes map-guard-in { from { opacity: .999; } to { opacity: .998; } }
@keyframes map-guard-out { from { opacity: .998; } to { opacity: .999; } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn--map:hover .pin-smile { opacity: 0; }
  .btn--map:hover .pin-grin { opacity: 1; } /* bigger smile while hovered, back to the normal one on leave */
}

/* ---------- Reduced motion: no motion at all. Colour, underline and shadow cues still snap ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn, .btn:hover, .btn:active, .wordmark, .wordmark:hover, .wordmark:active,
  .navbar .links a, .navbar .links a:hover, .navbar .links a:active,
  .menu-panel a, .menu-panel a:active, .foot-list a, .foot-list a:hover, .foot-list a:active, .foot-cats a, .foot-cats a:hover, .foot-cats a:active,
  .plate, .plate:hover, .plate:active, .lead, .lead:hover, .lead:active, .lead-art img,
  .tile::after, .cat-icon, .cheer-mascot g, .cheer-birds g, .cheer-birds .wing { transform: none !important; }
}

/* ---------- Floating nav (owner 2026-11-18, his usual client pattern) ----------
   At the top of the page there is no strip: logo, links and button sit on the page, lined up with the content edge.
   Once scrolled, the bar (paper, hairline, lifted shadow) fades in behind them, bleeding a little past the content
   edge so the logo keeps its padding. Opacity only. */
:root { --nav-bl: 12px; --nav-br: 8px; }
@media (min-width: 768px) { :root { --nav-bl: var(--s3); --nav-br: var(--s2); } }
.navbar { padding-inline: 0; border-color: transparent; background: transparent; }
.navbar::before { content: ""; position: absolute; z-index: -1; inset: -1px calc(-1 * var(--nav-br)) -1px calc(-1 * var(--nav-bl)); border-radius: inherit;
  border: var(--rule); background: var(--paper); opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
.navbar::after { inset: -1px calc(-1 * var(--nav-br)) -1px calc(-1 * var(--nav-bl)); }
.site-head.is-scrolled .navbar::before { opacity: 1; }

/* ---------- Section lines (owner 2026-11-18, ref family.co): a hairline in the middle of every section gap ----------
   Half the rhythm above the line, half below, so the spacing is unchanged. */
:root { --hair: rgb(31 29 26 / .1); }
.section:not(.owner-card) { margin-top: calc(var(--rhythm-section) / 2); padding-top: calc(var(--rhythm-section) / 2);
  background: linear-gradient(var(--hair), var(--hair)) center top / 100% 1px no-repeat; }
.warm .section { background-size: min(100% - 2 * var(--s2), var(--container) - 2 * var(--s4)) 1px; }
@media (min-width: 768px) { .warm .section { background-size: min(100% - 2 * var(--s4), var(--container) - 2 * var(--s4)) 1px; } }
@media (min-width: 1024px) { .hero + .section { margin-top: calc(var(--rhythm-section) / 2 - var(--s6)); } }

/* ---------- Rubric fixes 2026-11-18 (fresh grade, round 1) ---------- */
.band-copy p { max-width: 36em; } /* 2: was 85 characters a line at 1440 */
/* 18: outlined buttons and the guide rows' "Read the guide" take the same ink capsule as the quiet buttons */
.lead .go { position: relative; isolation: isolate; justify-self: start; } /* r2: capsule hugs the label, not the card width */
.lead .go::before { content: ""; position: absolute; z-index: -1; inset: -6px -12px; border-radius: var(--radius-control); background: var(--ink); opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--secondary:hover { background: var(--ink); color: var(--paper); }
  .lead:hover .go { color: var(--paper); }
  .lead:hover .go::before { opacity: 1; }
}
/* ---------- Owner-delegated design calls 2026-11-18 ---------- */
/* Trust band: each white card shows its sample as a plain row over a rule, not a box inside a box;
   the band's corners follow its padding (outer = card 20 + padding) */
.specimen .spec-show { background: none; border-radius: 0; padding: 0 var(--s1) var(--s2); min-height: 48px; border-bottom: var(--rule); }
@container (min-width: 700px) { .specimen .spec-show { padding-inline: 0; } }
.band { border-radius: calc(var(--radius-card) + var(--s3)); }
@container (min-width: 700px) { .band { border-radius: calc(var(--radius-card) + var(--s5)); } }
/* Footer categories: 12 names in two columns that share rows, so a wrapped name moves both columns together */
.foot-cats { columns: auto; display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); grid-auto-flow: column; column-gap: var(--s3); }
.specimen .tag-featured { background: var(--gold); color: var(--ink); } /* the sample shows the real Featured tag, gold as on the lists */

/* ---------- Categories dropdown (owner 2026-11-23). Desktop: link + caret button + panel (motion.js drives it).
   Mobile: a <details> row inside the menu panel. Transform + opacity only; layered shadow. ---------- */
.nav-cats { position: relative; display: inline-flex; align-items: center; }
.nav-caret { display: inline-grid; place-items: center; width: 32px; min-height: 44px; margin-left: 4px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: var(--s1); }
.nav-caret .icon { --icon: 18px; transition: transform var(--dur) var(--ease); }
.nav-caret[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-caret:focus-visible { outline: var(--focus); outline-offset: 0; }
.nav-drop { position: absolute; z-index: 20; top: calc(100% + 10px); left: 50%; width: 560px; padding: var(--s2); background: var(--paper); border: var(--card-border); border-radius: var(--radius-card);
  box-shadow: 0 2px 4px rgb(23 59 47 / .10), 0 18px 36px rgb(23 59 47 / .14); transform: translateX(-50%); }
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge over the gap */
.nav-drop.is-in { animation: drop-in var(--dur) var(--ease) both; }
@keyframes drop-in { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%); } }
.drop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px var(--s2); }
.navbar .links .drop-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 8px; border-radius: 12px; font-size: var(--step-small); font-weight: var(--w-ui); color: var(--ink); text-decoration: none; }
.drop-tile.tile { width: 36px; height: 36px; border-radius: 10px; background: var(--face, var(--panel)); transition: none; }
.drop-tile .cat-icon { --cat-icon: 20px; }
.navbar .links .drop-all { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); min-height: 48px; margin-top: var(--s1); padding: 0 var(--s2); border-radius: 12px; background: var(--evergreen); color: var(--paper); font-weight: var(--w-ui); font-size: var(--step-small); text-decoration: none; }
.drop-all .icon { color: var(--gold); transition: transform var(--dur) var(--ease); }
.navbar .links .drop-item:focus-visible, .navbar .links .drop-all:focus-visible { outline: var(--focus); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) {
  .navbar .links .drop-item:hover { background: var(--panel); text-decoration: none; }
  .navbar .links a.drop-all:not([aria-current]):hover { text-decoration: none; color: var(--paper); background: color-mix(in oklab, var(--evergreen) 85%, var(--ink)); } /* the generic nav-link hover set ink text on the dark bar (owner 2026-11-23) */
  .drop-all:hover .icon { transform: translateX(3px); }
}
/* mobile menu: Categories opens in place */
.menu-cats { border-bottom: var(--rule); }
.navbar .menu-cats summary { width: auto; padding: 0; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: var(--w-ui); cursor: pointer; border-radius: var(--s1); }
.menu-cats summary::-webkit-details-marker { display: none; }
.menu-cats summary .icon { transition: transform var(--dur) var(--ease); }
.menu-cats[open] summary .icon { transform: rotate(180deg); }
.menu-cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s2); padding-bottom: var(--s1); }
.menu-panel .menu-cat-list a { min-height: 44px; font-weight: var(--w-body); font-size: var(--step-small); border-bottom: 0; }
.menu-cats summary:focus-visible { outline: var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-drop.is-in { animation: none; } .nav-caret .icon, .menu-cats summary .icon { transition: none; } }

/* Home "Browse categories": 11 category tiles + the 12th tile goes to /categories/ (owner 2026-11-23, after the
   competitor's dark "All categories" tile). Same key-cap build, evergreen face, gold count. */
.entry--all .tile { --face: var(--ink); --edge: #000; --glyph: var(--gold); }
.entry--all .all-n { font-size: 28px; font-weight: 800; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; transition: transform var(--dur) var(--ease); }
.entry--all .name { display: inline-flex; align-items: center; gap: 8px; color: var(--evergreen); }
.entry--all .name .icon { --icon: 20px; transition: transform var(--dur) var(--ease); }
.entry--all:active .all-n { transform: var(--cat-press); transition-duration: var(--dur-press); }
@media (hover: hover) and (pointer: fine) {
  .entry--all:hover .all-n { transform: var(--btn-hover); }
  .entry--all:hover .name .icon { transform: translateX(3px); }
}

/* mobile menu: "All categories" gets the same dark bar as the desktop panel (grader 2026-11-23) */
.menu-panel .menu-cat-list li:last-child { grid-column: 1 / -1; }
.menu-panel .menu-cat-list li:last-child a { justify-content: space-between; margin-top: 4px; padding: 0 var(--s2); border-radius: 12px; background: var(--evergreen); color: var(--paper); font-weight: var(--w-ui); }
/* keep the dark "All categories" bars readable: the generic menu-link hover and current-page rules set evergreen text,
   which vanished on the evergreen bar (owner 2026-11-23) */
.menu-panel .menu-cat-list li:last-child a:not(.btn), .menu-panel .menu-cat-list li:last-child a:not(.btn):hover { color: var(--paper); text-decoration: none; }
.index-head .btn { justify-self: start; } /* the All categories link sits under the left-aligned intro (2026-11-30) */
