/* The Farmers Market — the whole stylesheet.
 *
 * Hand-written, no build step, no framework. There is deliberately no Sass or
 * PostCSS: native CSS nesting reached Baseline "widely available" on 2026-06-11
 * and color-mix() on 2025-11-09, which was the entire case for a build. Gzip
 * handles a 13KB file perfectly well.
 *
 * Direction: warm neutral. A cream paper ground with white panels lifted off it,
 * warm greys rather than blue-greys, and one olive accent. Depth comes from
 * hairlines and the paper/panel contrast, never from shadows.
 *
 * Five things below are accessibility requirements rather than taste, and each
 * ratio quoted was computed with the WCAG relative-luminance formula, not
 * estimated:
 *
 *   1. :focus-visible uses a TWO-TONE ring. A single colour provably cannot
 *      clear 3:1 against both a cream page and a dark olive button — ink on the
 *      hover-state button measures 2.03:1. Two tones always can. The outline is
 *      never suppressed anywhere in this file.
 *   2. Interactive targets are at least 24x24px (WCAG 2.5.8).
 *   3. Body text is 18px/1.6 and every foreground/background pair clears 4.5:1;
 *      UI borders and the focus ring clear 3:1 (WCAG 1.4.3, 1.4.11).
 *   4. Fluid to 320px, and survives 400% zoom with no horizontal scrollbar
 *      (WCAG 1.4.10).
 *   5. Dark mode via prefers-color-scheme (Baseline widely available, 2022-07)
 *      rather than light-dark(), which is only "newly available".
 */

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;

  --font-sans: Figtree, "Figtree Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Helvetica, Arial, sans-serif;

  /* ---- colour: light (default) -------------------------------------- */
  --page:         #FAF8F5;  /* warm cream paper                           */
  --panel:        #FFFFFF;  /* white lifts off the cream — the depth cue  */
  --panel-sunk:   #F2EEE8;
  --hairline:     #DDD6CC;  /*  1.36:1 vs page — a whisper, deliberately  */
  --border:       #8C8375;  /*  3.53:1 vs page,  3.74:1 vs panel  [UI 3:1]*/
  --ink:          #1C1A17;  /* 16.38:1 vs page, 17.36:1 vs panel          */
  --ink-muted:    #655C51;  /*  6.18:1 vs page,  6.56:1 vs panel          */
  --link:         #3F5A26;  /*  7.33:1 vs page,  7.77:1 vs panel          */
  --link-visited: #6E3556;  /*  8.59:1 vs page                            */
  --accent:       #4A6A2E;  /* warm olive.  5.84:1 vs page        [UI 3:1]*/
  --accent-hover: #3A5423;
  --on-accent:    #FFFFFF;  /*  6.19:1 on accent,  8.49:1 on accent-hover */
  --focus-inner:  #FAF8F5;  /* two-tone ring — see the focus section      */
  --focus-outer:  #1C1A17;
  --error:        #B3261E;  /*  6.17:1 vs page                            */
  --success:      #3F6212;  /*  6.68:1 vs page                            */

  /* Two tinted grounds. Both are backgrounds only — never text — so what
     matters is that ink/muted/link stay legible ON them, all computed:
       --band        ink 15.33  muted 5.79  link 6.86  accent 5.46
       --accent-soft ink 14.80  muted 5.59  link 6.62  accent 5.28          */
  --band:         #EFF2E8;  /* green-cast neutral: the "near you" band     */
  --accent-soft:  #E9EFE1;  /* secondary button fill, quieter than accent  */
  --chip:         #F2EEE8;  /* popular-search pills                       */

  /* ---- type ---------------------------------------------------------- */
  /* Base 18px, down from 19px. 19px is a GOV.UK signature; 18px with a
     wider display range reads more contemporary and stays comfortable.   */
  --step--2: 0.8125rem;  /* 13px  micro labels, provenance */
  --step--1: 0.9375rem;  /* 15px  small / meta             */
  --step-0:  1.125rem;   /* 18px  body                     */
  --step-1:  1.375rem;   /* 22px  lead, h3                 */
  --step-2:  1.75rem;    /* 28px  h2                       */
  --step-3:  2.25rem;    /* 36px  h1 (mobile)              */
  --step-4:  3.25rem;    /* 52px  h1 (desktop), display    */

  --lh-tight: 1.1;
  --lh-snug:  1.3;
  --lh-body:  1.6;

  /* ---- space: 4px grid ------------------------------------------------ */
  --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: 4.5rem;

  --radius:    6px;   /* inputs, buttons, panels */
  --radius-sm: 3px;   /* badges only */
  --radius-lg: 10px;  /* cards, bands — the softer, more current corner */
  --radius-pill: 999px;
  --measure:   34em;  /* ~68 characters */
  --container: 72rem;

  /* The ONE elevation in this stylesheet, and it is functional rather than
     decorative: the search dropdown OVERLAPS the content beneath it, and a
     hairline alone cannot say "this floats above that" — the two planes read as
     one flat diagram. Cards stay shadowless and keep using the panel/paper
     contrast. Any future use needs the same kind of justification.           */
  --lift: 0 6px 16px -4px rgb(28 26 23 / 0.16), 0 2px 5px -2px rgb(28 26 23 / 0.10);

  /* Card image box. 4:3 is the most forgiving crop for produce photography
     shot at unknown aspect ratios; the vendor strip is wider.               */
  --thumb-ratio: 4 / 3;
  --thumb-ratio-wide: 16 / 10;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page:         #1A1816;  /* warm near-black, not blue-black            */
    --panel:        #221F1C;
    --panel-sunk:   #141210;
    --hairline:     #3A352F;  /*  1.46:1 vs page                            */
    --border:       #847B6D;  /*  4.24:1 vs page,  3.93:1 vs panel          */
    --ink:          #F3EEE7;  /* 15.34:1 vs page, 14.21:1 vs panel          */
    --ink-muted:    #B0A699;  /*  7.39:1 vs page,  6.84:1 vs panel          */
    --link:         #AFD189;  /* 10.37:1 vs page,  9.61:1 vs panel          */
    --link-visited: #D3A6C0;  /*  8.42:1 vs page                            */
    --accent:       #9CC470;  /*  8.89:1 vs page                   [UI 3:1] */
    --accent-hover: #B2D68C;
    --on-accent:    #1A1816;  /*  8.89:1 on accent, 10.87:1 on accent-hover */
    --focus-inner:  #1A1816;
    --focus-outer:  #F3EEE7;
    --error:        #F2A19B;  /*  8.72:1 vs page                            */
    --success:      #A3C776;  /*  9.26:1 vs page                            */

    /*   --band        ink 14.14  muted 6.81  link 9.56  accent 8.19
         --accent-soft ink 11.41  muted 5.49  link 7.71  accent 6.61        */
    --band:         #1E2119;  /* green-cast near-black, not a lightened grey */
    --accent-soft:  #2A3322;
    --chip:         #2C2823;

    /* Shadows are near-invisible on a dark ground, so the dropdown leans on a
       lighter panel plus a real border instead — see .listbox.              */
    --lift: 0 6px 18px -4px rgb(0 0 0 / 0.55), 0 2px 6px -2px rgb(0 0 0 / 0.4);
  }
}

/* -------------------------------------------------------------------- font */
/* Self-hosted, latin subset, variable weight axis (20,156 bytes). Self-hosting
 * is not a performance preference: a font CDN would be a third-party request,
 * which a test forbids, and would undermine the no-cookies position the site
 * relies on to avoid a consent banner.
 *
 * font-display: swap shows fallback text immediately rather than blocking on
 * the font (no FOIT). The metric overrides below keep that swap from shifting
 * layout — they scale the FALLBACK to match Figtree's proportions, so the two
 * occupy near-identical space.
 */
@font-face {
  font-family: Figtree;
  src: url("/static/fonts/figtree-latin-variable.202cfb54d4e6.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The fallback, metric-matched to Figtree so the swap does not reflow. */
@font-face {
  font-family: "Figtree Fallback";
  src: local("Helvetica Neue"), local("Arial"), local("Segoe UI");
  size-adjust: 102%;
  ascent-override: 94%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* -------------------------------------------------------------- foundation */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* Never px-lock the root: it breaks a user's browser font-size setting. */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;

  /* Reserve the scrollbar gutter on every page, scrolling or not.
   *
   * Without this, a short page and a long one are laid out in viewports of
   * different widths, because a classic (non-overlay) scrollbar eats ~15px.
   * Centred content then moves by half that -- measured at exactly 7.5px --
   * so navigating between pages makes the header, logo and nav visibly jump
   * sideways. It showed up here as "/find/ sits slightly off compared to the
   * other pages": with no query that page is 767px tall and fits without
   * scrolling, while /find/?where=..., /vendors/ and the homepage are all
   * 1100px+ and scroll.
   *
   * `stable` is the fix rather than the old `overflow-y: scroll` hack: it
   * reserves the gutter without painting a permanently disabled scrollbar
   * track, and it correctly reserves NOTHING on platforms using overlay
   * scrollbars, where there is no shift to prevent. Baseline widely available
   * (Chrome 94, Firefox 97, Safari 16).
   */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  /* Figtree's default optical settings; kerning on for display sizes. */
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* Respect a user's reduced-motion preference. There is no motion here by
 * design, but this stops any future addition from ignoring the setting. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------- focus */
/* :focus-visible, not :focus — a mouse click should not paint the ring, but
 * keyboard navigation must always show it.
 *
 * TWO TONES, and this is not decoration. WCAG 1.4.11 wants the indicator to
 * clear 3:1 against adjacent colours, and no single colour manages that across
 * a cream page AND a dark olive button: an ink ring measures 16.38:1 on the page
 * but only 2.03:1 on the hover-state button. So the ring is an inner band in the
 * page colour sitting on the element edge, plus an outer band in ink beyond it.
 * Whatever the ring surrounds, one of the two bands contrasts with it:
 *
 *   vs page   #FAF8F5 -> 16.38:1 (outer)   vs accent  #4A6A2E -> 5.84:1 (inner)
 *   vs panel  #FFFFFF -> 17.36:1 (outer)   vs a-hover #3A5423 -> 8.01:1 (inner)
 *
 * and the two bands differ from each other by 16.38:1 so the ring reads as one
 * object. Dark-theme equivalents: 15.34 / 14.21 / 8.89 / 10.87.
 */
:focus-visible {
  outline: 2px solid var(--focus-inner);
  outline-offset: 0;
  box-shadow: 0 0 0 5px var(--focus-outer);
  border-radius: var(--radius);
}

/* Form controls keep their own shape, so the ring sits outside their border
 * rather than replacing it. */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus-inner);
  outline-offset: 0;
  box-shadow: 0 0 0 5px var(--focus-outer);
}

/* --------------------------------------------------------------- skip link */
.skip-link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  background: var(--ink);
  color: var(--page);  /* 16.38:1 */
  font-weight: 700;
  /* Visually hidden until focused — but never display:none, which would take it
   * out of the tab order entirely and defeat the point. */
  position: absolute;
  left: -9999px;
  z-index: 10;
}
.skip-link:focus {
  position: static;
  left: auto;
}

/* ------------------------------------------------------------------ layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

main { display: block; }

/* Whitespace scales with the viewport; type does not. Shrinking the text on
 * small screens is the amateur move — shrink the gaps instead. */
.main-wrapper {
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-7);
}
@media (min-width: 48em) {
  .container { padding: 0 var(--sp-5); }
  .main-wrapper { padding-top: var(--sp-6); padding-bottom: var(--sp-8); }
}

/* Content plus a narrower aside. Not two equal columns, hence the name. */
.layout-aside {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 48em) {
  .layout-aside { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-7); }
}

.measure { max-width: var(--measure); }

/* The depth primitive: white on cream, one hairline, one radius. This is the
 * ONLY way depth is expressed in this stylesheet — there are no shadows. */
.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
@media (min-width: 48em) {
  .panel { padding: var(--sp-5); }
}

/* ------------------------------------------------------------- typography */
/* One weight jump only: body 400, headings 600. A variable font makes five
 * weights tempting, and five weights look muddy. */
h1, h2, h3 {
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 var(--sp-4);
  /* Line-height tracks size inversely — a single value across all sizes is the
   * most common tell of an unstyled page. */
  line-height: var(--lh-snug);
  /* Silent enhancement: ignored where unsupported (Baseline "newly"). */
  text-wrap: balance;
}

/* Negative tracking on DISPLAY sizes only. Tight display type reads designed;
 * tight body type reads cramped. */
h1 {
  font-size: var(--step-3);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}
h2 { font-size: var(--step-2); margin-top: var(--sp-7); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); margin-bottom: var(--sp-1); }

@media (min-width: 48em) {
  h1 { font-size: var(--step-4); }
}

p { margin: 0 0 var(--sp-4); }
.lead {
  font-size: var(--step-1);
  line-height: var(--lh-snug);
  color: var(--ink-muted);
}
.small { font-size: var(--step--1); }
.muted { color: var(--ink-muted); }

/* A quiet section label: small, spaced, uppercase. Carries hierarchy without
 * needing another type size or another weight. */
.eyebrow {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-2);
}

/* -------------------------------------------------------------------- links */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: text-decoration-thickness 120ms ease;
}
a:visited { color: var(--link-visited); }
/* Thickness is the hover affordance, not colour — so it also reads for anyone
 * who cannot distinguish the two colours. */
a:hover { text-decoration-thickness: 3px; }
a:active { color: var(--ink); }

/* ------------------------------------------------------------------- icons */
/* The sprite itself is inlined once and must never occupy layout. */
.sprite { display: none; }

/* Icons scale with their surrounding text rather than being pinned to a px
 * size, and inherit its colour — so one symbol works in a muted meta line and
 * on an accent button with no variants. */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* Optical centring against a cap-height baseline. */
  vertical-align: -0.125em;
  flex: none;
}
.icon--lg { width: 1.35em; height: 1.35em; }

/* ------------------------------------------------------------------ header */
.site-header {
  border-bottom: 1px solid var(--hairline);
  padding: var(--sp-3) 0;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* The mark. Icon plus wordmark, one target. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--accent);
  /* Stops the two halves being split across a line at 320px. */
  white-space: nowrap;
}
.brand:visited { color: var(--accent); }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--accent); }
.brand--footer { font-size: var(--step-0); }

/* Nav links are navigation, not prose, so they drop the underline the rest of
 * the page uses — but they cannot then rely on colour alone to signal the
 * current page (WCAG 1.4.1). The active item gets a weight change AND a rule
 * underneath it, so it reads without colour perception. */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  /* WCAG 2.5.8 — 24px minimum on a link that has no padding of its own. */
  min-height: 2.75rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.site-nav__link:visited { color: var(--ink); }
.site-nav__link:hover { color: var(--link); text-decoration: none; }
.site-nav__link[aria-current="page"] { font-weight: 700; color: var(--ink); }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- mobile drawer -------------------------------------------------------
 * Progressive enhancement, in this order:
 *   no JS  -> the toggle is hidden and .site-nav simply wraps and stays visible
 *   JS     -> <html data-js> flips on, the toggle appears below 48em and the
 *             nav becomes an off-canvas panel
 * That ordering matters: if the nav were hidden by default and revealed by JS,
 * a failed script would leave the site with no navigation at all.            */
.nav-toggle { display: none; }

@media (min-width: 48em) {
  .site-header { padding: var(--sp-4) 0; }
}

@media (max-width: 47.999em) {
  [data-js] .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    /* A 44px square: comfortably over the 24px floor, and a real thumb target. */
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: none;
    color: var(--ink);
    font-size: var(--step-1);
    cursor: pointer;
  }
  [data-js] .nav-toggle:hover { background: var(--panel-sunk); }

  [data-js] .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 20;
    width: min(20rem, 82vw);
    margin: 0;
    padding: var(--sp-4);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--panel);
    border-left: 1px solid var(--hairline);
    overflow-y: auto;
    /* Closed state. `visibility` (not display) so the transition can run and
       so the panel is genuinely removed from the tab order while shut.

       The visibility timing is ASYMMETRIC on purpose, and it is a correctness
       requirement rather than polish. `visibility` is a discrete property, so
       putting it in a 200ms transition means it does not become `visible` until
       partway through the slide -- and `focus()` on a still-hidden element is
       silently IGNORED by the browser. That broke "focus moves into the drawer
       on open" with no error to show for it. So: reveal immediately (0s delay
       on open), and delay hiding until the slide-out has finished. */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 200ms ease, visibility 0s linear 200ms;
  }
  [data-js] .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 200ms ease, visibility 0s linear 0s;
  }

  [data-js] .site-nav__link {
    min-height: 3rem;
    font-size: var(--step-1);
    font-weight: 600;
    border-bottom: 1px solid var(--hairline);
  }
  /* The desktop underline marker would sit oddly in a stacked list. */
  [data-js] .site-nav__link[aria-current="page"]::after { display: none; }
  [data-js] .site-nav__link[aria-current="page"] { color: var(--link); }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-3);
  }

  /* Dim + block the page behind the open drawer. */
  .drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgb(28 26 23 / 0.45);
    border: 0;
    padding: 0;
    cursor: pointer;
  }
}

/* The scrim and drawer chrome never exist on desktop or without JS. */
.drawer-scrim,
.drawer-head { display: none; }
@media (max-width: 47.999em) {
  [data-js] .drawer-head { display: flex; }
}

/* ---------------------------------------------------------------- masthead */
.masthead { padding: var(--sp-5) 0 var(--sp-4); }
@media (min-width: 48em) {
  .masthead { padding: var(--sp-7) 0 var(--sp-5); }
}

/* ------------------------------------------------------------------ search */
.search { margin: 0 0 var(--sp-7); }
.search__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: flex-end;
}
.search__field { flex: 1 1 16em; }

.label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}
.hint {
  display: block;
  color: var(--ink-muted);
  font-size: var(--step--1);
  margin-bottom: var(--sp-2);
}
.input {
  width: 100%;
  min-height: 2.75rem;             /* well over the 24px minimum */
  padding: var(--sp-2) var(--sp-3);
  /* 1px hairline-weight border, not the 2px ink slab. --border is used rather
   * than --hairline because a form control is a UI component and needs 3:1
   * (3.53:1 vs page, 3.74:1 vs panel). */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
  background: var(--panel);
  appearance: none;
  transition: border-color 120ms ease;
}
.input:hover { border-color: var(--ink-muted); }

.button {
  /* inline-FLEX, not inline-block: a button may carry an icon beside its label
     (the "Find near me" locator arrow), and the two must share one baseline. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 2.75rem;
  padding: var(--sp-2) var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);         /* 6.19:1 */
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.button:hover { background: var(--accent-hover); }  /* 8.49:1 with label */
/* Flat, no faked 3D edge. The rule this replaced set `top: 3px` on a statically
 * positioned element, which did nothing at all. */
.button:active { background: color-mix(in srgb, var(--accent-hover) 90%, black); }

/* ----------------------------------------------------------------- results */
/* Hairline panels, stacked with a gap — not bottom-bordered rows. Each listing
 * is a discrete thing belonging to a named vendor, and a bounded panel says so. */
.results {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-3);
}

.result {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--sp-4);
  transition: border-color 120ms ease;
}
/* :has() — Baseline widely available. Lifts the whole panel's border when the
 * title inside it is hovered, so the panel reads as one target. */
.result:has(.result__title a:hover) { border-color: var(--border); }

.result__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--step-1);
}
.result__price {
  font-weight: 600;
  margin: 0 0 var(--sp-2);
  /* A column of prices should align on the decimal. */
  font-variant-numeric: tabular-nums;
}
.result__meta {
  color: var(--ink-muted);
  font-size: var(--step--1);
  margin: 0;
}

/* Marks whose words a shopper is reading: the vendor's, or the catalogue's.
 * Presenting the two identically would be quietly misleading. */
.provenance {
  display: block;
  color: var(--ink-muted);
  font-size: var(--step--2);
  letter-spacing: 0.02em;
  margin-top: var(--sp-1);
}

/* -------------------------------------------------------------------- misc */
.notice {
  padding: var(--sp-4);
  margin: 0 0 var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
}
.notice--error { border-left-color: var(--error); }
.notice > :last-child { margin-bottom: 0; }

.breadcrumbs { margin: var(--sp-4) 0 0; font-size: var(--step--1); }
.breadcrumbs__list { margin: 0; padding: 0; list-style: none; }
.breadcrumbs__item { display: inline-block; }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin: 0 var(--sp-2) 0 var(--sp-1);
  border-top: 1.5px solid var(--ink-muted);
  border-right: 1.5px solid var(--ink-muted);
  transform: rotate(45deg);
  vertical-align: middle;
}

.detail-list { margin: 0 0 var(--sp-5); }
.detail-list__row {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--hairline);
}
.detail-list__row:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list__key {
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin: 0 0 var(--sp-1);
}
.detail-list__value { margin: 0; }

.distance { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- product detail */
/* The one big number on a listing page. Larger than a heading, because it is
 * the thing a shopper came for. */
.price-display {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  margin: 0 0 var(--sp-4);
}

.field-list { margin: 0 0 var(--sp-6); }
.field-row {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--hairline);
}
.field-row:first-child { border-top: 1px solid var(--hairline); }
.field-row__key {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-1);
}
.field-row__value { margin: 0; max-width: var(--measure); }

/* Says whose words these are: the vendor's, or the catalogue's. Presenting the
 * two identically would be quietly misleading, which is the whole reason the
 * override model is visible in the UI at all. */
.badge {
  display: inline-block;
  margin-left: var(--sp-1);
  padding: 0.1em 0.5em;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--panel-sunk);
  color: var(--ink-muted);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.02em;
  /* Never sits on the same baseline flow as the text it annotates. */
  vertical-align: 0.1em;
  white-space: nowrap;
}
/* A vendor override is the notable case, so it gets the accent — but via the
 * border and text, not a fill, so it stays quiet. */
.badge--vendor {
  border-color: var(--accent);
  color: var(--link);
  background: transparent;
}

/* A vendor's offer row: name and place on the left, price hard right. */
.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
}
.offer__main { flex: 1 1 14em; }
.offer__price {
  margin: 0 0 0 auto;
  font-size: var(--step-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li + li { margin-top: var(--sp-1); }

/* ------------------------------------------------------------------- pager */
/* Previous/next only. Numbered pages are a lot of targets to hit the 24px
 * minimum with, and on a discovery list nobody wants page 7 specifically. */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--hairline);
}
.pager__status {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.pager__list {
  display: flex;
  gap: var(--sp-4);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.pager__link {
  display: inline-block;
  /* WCAG 2.5.8: comfortably over 24x24. */
  min-height: 2.75rem;
  min-width: 3rem;
  padding: var(--sp-2) 0;
  font-weight: 600;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: var(--sp-6) 0;
  margin-top: var(--sp-8);
  color: var(--ink-muted);
  font-size: var(--step--1);
}
.site-footer__top {
  display: grid;
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}
@media (min-width: 48em) {
  .site-footer__top {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: var(--sp-6);
  }
  .site-footer__legal { text-align: right; }
}
.site-footer__tagline { margin: var(--sp-1) 0 0; }
.site-footer__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.site-footer__item { margin: 0; }
.site-footer__item a { color: var(--ink-muted); }
.site-footer p { margin-bottom: var(--sp-1); max-width: var(--measure); }
/* The licence notices are required text, but they are not what a visitor came
 * for — sunk below a hairline at the smallest size that still clears 4.5:1. */
.site-footer__attribution {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--hairline);
}
.site-footer__attribution p { font-size: var(--step--2); max-width: 60ch; }

/* =========================================================== components ==
 * Everything below is the card/hero/band layer the redesign introduced. The
 * rules above it are the original foundation and are unchanged.
 * ======================================================================== */

/* --------------------------------------------------------------- section head */
/* An h2 with an optional action hard right ("View all produce ->"). */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  margin: var(--sp-7) 0 var(--sp-4);
}
.section-head > h2 { margin: 0; }
.section-head__action {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.section-head__action:hover { text-decoration: underline; text-decoration-thickness: 2px; }
/* The arrow nudges on hover. Motion is 2px and 120ms — enough to feel
 * responsive, not enough to be a effect. Suppressed under reduced-motion by
 * the global rule near the top of this file. */
.section-head__action .icon { transition: transform 120ms ease; }
.section-head__action:hover .icon { transform: translateX(2px); }

/* -------------------------------------------------------------------- hero */
.hero {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5) 0 var(--sp-6);
}
@media (min-width: 56em) {
  .hero {
    /* Text column gets the larger share; the image is support, not the point. */
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--sp-7);
    padding: var(--sp-7) 0 var(--sp-8);
  }
}
.hero__body { min-width: 0; }
.hero__title {
  font-size: var(--step-3);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  margin: 0 0 var(--sp-4);
}
@media (min-width: 48em) {
  .hero__title { font-size: var(--step-4); }
}
/* The second clause in accent. A <span>, not a colour on the whole heading:
 * the contrast between the two halves is the device. */
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__lead {
  font-size: var(--step-1);
  line-height: var(--lh-snug);
  color: var(--ink-muted);
  max-width: 30em;
  margin: 0 0 var(--sp-5);
}
.hero__eyebrow { color: var(--accent); }

/* The illustration. Hidden below the breakpoint where the grid collapses —
 * on a phone it would push the search box below the fold, and the search box
 * is the reason the page exists. */
.hero__figure { display: none; margin: 0; }
@media (min-width: 56em) {
  .hero__figure { display: block; }
}
.hero__figure img,
.hero__art {
  display: block;
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------- search group */
/* Input and button as ONE joined control, which is what makes it read as a
 * search bar rather than a form field that happens to sit next to a button.
 *
 * The two halves keep their own focus rings (the group is not a single focus
 * target), so the shared radius is applied to the outer edges only. */
.searchbar { margin: 0; }
.searchbar__group {
  display: flex;
  align-items: stretch;
  max-width: 32rem;
}
.searchbar__group .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  /* Collapse the doubled 1px seam between input and button. */
  margin-right: -1px;
  position: relative;
}
/* A focused input must paint its ring OVER the button's edge, not under it. */
.searchbar__group .input:focus-visible { z-index: 2; }
.searchbar__group .button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  white-space: nowrap;
}
/* Stacked on the narrowest screens: a 2-up row leaves the input too short to
 * read a place name in. */
@media (max-width: 26em) {
  .searchbar__group { flex-direction: column; }
  .searchbar__group .input {
    border-radius: var(--radius);
    margin: 0 0 var(--sp-2);
  }
  .searchbar__group .button { border-radius: var(--radius); }
}
.searchbar__note {
  margin: var(--sp-3) 0 0;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* -------------------------------------------------------------------- chips */
/* Popular searches. Pills, not links in a sentence — they are a menu of
 * one-tap queries, and a pill says "tap me" where an underline says "read me". */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.chips__label { color: var(--ink-muted); margin: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  /* 24px floor (WCAG 2.5.8) met by min-height, not by luck of the font size. */
  min-height: 2rem;
  padding: 0 var(--sp-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--chip);
  color: var(--ink);
  font-size: var(--step--1);
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.chip:visited { color: var(--ink); }
.chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--link);
  text-decoration: none;
}

/* ------------------------------------------------------------ feature cards */
.feature-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
}
@media (min-width: 40em) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.feature {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--panel-sunk);
  border-radius: var(--radius-lg);
}
.feature__icon { color: var(--accent); font-size: var(--step-1); }
.feature__title { margin: 0 0 var(--sp-1); font-size: var(--step-0); font-weight: 600; }
.feature__text { margin: 0; font-size: var(--step--1); color: var(--ink-muted); }

/* ------------------------------------------------------------------- thumbs */
/* A fixed-ratio image box. `aspect-ratio` reserves the space before the image
 * arrives, so a slow photo cannot shift the card layout (CLS). */
.thumb {
  position: relative;
  aspect-ratio: var(--thumb-ratio);
  overflow: hidden;
  background: var(--panel-sunk);
}
.thumb--wide { aspect-ratio: var(--thumb-ratio-wide); }
.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  /* Produce photography arrives at whatever crop the vendor shot it at. */
  object-fit: cover;
}

/* The no-photo state. Deliberately DESIGNED rather than left as an empty grey
 * box or a broken-image frame: a tinted ground, the leaf mark, and the item's
 * own initial. A vendor without a photo looks unfinished, not broken. */
.thumb--empty {
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, var(--accent-soft), var(--panel-sunk));
  color: var(--accent);
}
/* A medallion rather than a lone letter on a wash. An empty tile is a large
 * area of the card, so it needs enough structure to read as a deliberate
 * "no photo yet" state instead of a failed <img>. The disc gives it a centre,
 * the leaf ties it to the mark, and the initial keeps neighbouring empty tiles
 * distinguishable from each other. */
.thumb__placeholder {
  display: grid;
  place-items: center;
  gap: var(--sp-2);
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--panel);
  /* Barely-there ring: enough to define the disc against the wash without
     drawing a hard line across a decorative tile. */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  opacity: 0.9;
}
.thumb__initial {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.thumb__mark { font-size: var(--step-1); opacity: 0.7; }

/* ------------------------------------------------------------- product card */
.card-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 34em) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 52em) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  transition: border-color 120ms ease;
}
/* The whole card lifts its border when the title inside is hovered, so the
 * card reads as one target even though only the title is a link. */
.card:has(.card__title a:hover) { border-color: var(--accent); }
.card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.card__title { margin: 0; font-size: var(--step-1); }
.card__title a { text-decoration: none; color: var(--ink); }
.card__title a:visited { color: var(--ink); }
.card__title a:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; }
.card__price {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card__unit { font-weight: 400; color: var(--ink-muted); }
.card__text { margin: 0; font-size: var(--step--1); color: var(--ink-muted); }
.card__foot {
  margin-top: auto;
  padding-top: var(--sp-2);
  display: grid;
  gap: var(--sp-1);
  font-size: var(--step--1);
}
.card__vendor { font-weight: 600; }
.card__place {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink-muted);
}

/* A plain vertical list of cards, gap only. Separate from .card-grid because
 * these rows are full-width at every breakpoint. */
.stack {
  display: grid;
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------- media card */
/* The vendor row: image beside content on wide screens, stacked on narrow. */
.media-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  transition: border-color 120ms ease;
}
.media-card:has(.media-card__title a:hover) { border-color: var(--accent); }
@media (min-width: 44em) {
  .media-card { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  /* Stretch the fixed-ratio thumb to whatever height the text column needs. */
  .media-card .thumb { aspect-ratio: auto; height: 100%; min-height: 14rem; }
}
.media-card__body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}
@media (min-width: 48em) {
  .media-card__body { padding: var(--sp-5); }
}
.media-card__title { margin: 0; font-size: var(--step-2); }
.media-card__title a { color: var(--link); text-decoration: none; }
.media-card__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.media-card__text { margin: 0; color: var(--ink-muted); max-width: var(--measure); }
.media-card__place {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* A vendor's own photo at the top of their page. Only rendered when they have
 * one -- there is no fallback tile here, because a whole empty banner is worse
 * than no banner. */
.vendor-hero {
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 0 0 var(--sp-6);
}
.vendor-hero .thumb { aspect-ratio: 21 / 8; }

/* -------------------------------------------------------------------- band */
/* The tinted call-to-action block. Full-bleed background, contained content,
 * and a botanical watermark bled off the right edge. */
.band {
  position: relative;
  overflow: hidden;
  margin: var(--sp-7) 0 0;
  padding: var(--sp-6) var(--sp-4);
  background: var(--band);
  border-radius: var(--radius-lg);
  text-align: center;
}
@media (min-width: 48em) {
  .band { padding: var(--sp-7) var(--sp-6); }
}
.band__body { position: relative; z-index: 1; margin: 0 auto; max-width: 34rem; }
.band__title { margin: 0 0 var(--sp-2); font-size: var(--step-2); }
.band__text { margin: 0 0 var(--sp-4); color: var(--ink-muted); }
.band .searchbar__group { margin: 0 auto; }
/* Decorative only: aria-hidden in the markup, and it must never intercept a
 * click meant for the form. */
.band__watermark {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: 18rem;
  color: var(--accent);
  opacity: 0.12;
  pointer-events: none;
}
@media (max-width: 40em) {
  .band__watermark { display: none; }
}

/* --------------------------------------------------------------- combobox */
/* The suggestion dropdown. Only ever present once suggest.js has attached --
 * the class below is added by the script, so nothing here applies to a plain
 * form. */
.searchbar__group--combobox { position: relative; }

.listbox {
  position: absolute;
  top: calc(100% + var(--sp-1));
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: var(--sp-1);
  list-style: none;
  max-height: 19rem;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* THE one shadow in this stylesheet, and it is functional: this panel
     overlaps the content beneath it, and a hairline alone cannot say
     "floating above" -- the two planes read as one flat diagram. Cards, which
     sit in the flow, stay shadowless. */
  box-shadow: var(--lift);
}
/* Anchored to the input's edges on the stacked narrow layout, where the group
 * becomes a column and 100% would be the height of input + button. */
@media (max-width: 26em) {
  .listbox { top: 3rem; }
}

.listbox__option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  /* 40px rows: a comfortable touch target (WCAG 2.5.8 wants 24). */
  min-height: 2.5rem;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
/* aria-selected is the state the script maintains, so the visual highlight
 * hangs off the SAME attribute a screen reader reads. A separate CSS class
 * would be free to drift out of sync with what is announced. */
.listbox__option[aria-selected="true"],
.listbox__option:hover {
  background: var(--accent-soft);
}
.listbox__label { font-weight: 500; }
.listbox__meta {
  flex: none;
  font-size: var(--step--1);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------- secondary button */
/* A real button, quieter than the accent fill. Used where an action is
 * available but is not what the page is steering you toward. */
.button--secondary {
  background: var(--accent-soft);
  color: var(--link);              /* 6.62:1 — computed */
  border-color: transparent;
  font-size: var(--step--1);
  min-height: 2.5rem;
  padding: var(--sp-2) var(--sp-4);
}
.button--secondary:hover {
  background: color-mix(in srgb, var(--accent-soft) 84%, var(--accent));
  color: var(--link);
}
.button--secondary:active { background: color-mix(in srgb, var(--accent-soft) 72%, var(--accent)); }

/* --------------------------------------------------------------- utilities */
/* Any inline target that could fall under 24x24 (WCAG 2.5.8). */
.u-target { display: inline-block; min-width: 24px; min-height: 24px; }
.u-mb-0 { margin-bottom: 0; }
.u-mt-0 { margin-top: 0; }

/* Available to screen readers, invisible on screen. Not display:none. */
.u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: 0; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Wide content scrolls inside its own box rather than scrolling the page. */
.u-scroll-x { overflow-x: auto; }

/* A result heading used as an <h2> inside a list: drop the section-heading top
 * margin and step it back to the row size. */
.result__title--row {
  margin-top: 0;
  font-size: var(--step-1);
}
