/* FeastMatch — Add to Event design language, catering-only marketplace.
   Palette sampled from addtoevent.co.uk: the plum→rose gradient on every
   primary control, slate text, near-white section bands, amber stars. */

:root {
  /* Type. GT Super and Neue Haas Grotesk are licensed and not yet bought, so
     each stack falls through to a stand-in: Newsreader for the display serif,
     and real Helvetica Neue on any Apple device for the text face. Drop the
     licensed woff2s into public/fonts/, add the @font-face blocks, and the
     stacks pick them up with no other change. */
  --font-display: "GT Super Display", "GT Super Text", "Newsreader",
                  Georgia, "Times New Roman", serif;
  --font-text: "Neue Haas Grotesk Text", "Neue Haas Grotesk Display",
               "Helvetica Neue", Helvetica, Arial, "Liberation Sans",
               system-ui, sans-serif;

  /* Forest green, measured at 9.66:1 on white — AAA at every size. Two greens
     the palette references offered were rejected on contrast, not taste:
     #059669 is 3.77:1 and fails AA for body text, #22C55E is 2.28:1. */
  --brand: #1F4D36;
  --brand-dark: #143026;
  --brand-tint: #EDF3EF;
  /* Editorial food design does not gradient its buttons. Both gradient tokens
     are kept as names so nothing downstream breaks, but they are flat now. */
  --grad: var(--brand);
  --grad-soft: var(--brand-tint);

  --ink: #111111;
  --ink-2: #2b2b2b;
  --muted: #5c5c5c;
  --line: #e4e4e1;
  --line-2: #f2f2ef;
  --bg: #ffffff;
  --surface: #fafaf8;
  --surface-2: #f2f2ef;

  --star: #f6931d;
  /* Deep teal, not green: against a green brand the old #15803d was a
     1.42:1 difference, so a paid-out badge read as a link. */
  --ok: #0F766E;
  --ok-bg: #F0FBFA;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;

  --r: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);
  --gutter: 2.5rem;
  --header-h: 76px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  /* 16, not 17: both new families set larger on the page than Nunito did. */
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* h1 and h2 are the display cut; h3 and h4 stay in the text face, where they
   do structural work in dense pages rather than acting as titles. Neither
   family has a weight 800 — everything that asked for one now asks for 700. */
h1, h2, h3, h4 { margin: 0 0 .5em; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  /* The old -.02em was a correction for a rounded geometric sans. A wide
     serif needs none of it; negative tracking is what read as squashed. */
  letter-spacing: 0;
  line-height: 1.14;
}
h3, h4 { font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
small { font-size: .8125rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--r) 0; font-weight: 700;
}
.skip:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(100% - var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - var(--gutter), 760px); margin-inline: auto; }
.band { padding: clamp(3rem, 6vw, 5rem) 0; }
.band-grey { background: var(--surface); }
.band-tight { padding: 2.5rem 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
/* "FeastMatch" is one word set as two coloured spans. The old rule pushed the
   halves apart with a fixed .3rem gap while pulling the letters together with
   -.03em, so it read as two narrow words. The gap is now relative to the type
   size and the tracking is back to normal. */
.logo { display: flex; align-items: baseline; gap: .14em; font-weight: 600; font-size: 1.4rem; letter-spacing: 0; color: var(--ink); font-family: var(--font-display); }
.logo:hover { text-decoration: none; }
.logo .feast { color: var(--ink); }
.logo .match { color: var(--brand); }
.main-nav { display: flex; gap: 1.75rem; margin-inline: auto; }
.main-nav a { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--r);
  width: 44px; height: 44px; font-size: 1.25rem; cursor: pointer; color: var(--ink);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: var(--pill); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-lg { padding: .95rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; align-items: center; padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.hero h1 { margin-bottom: 1rem; }
/* The one word the hero emphasises is the whole green budget above the fold. */
.hero h1 .accent { color: var(--brand); }
.hero-lead { font-size: 1.1rem; color: var(--ink-2); max-width: 34rem; }
.hero-search {
  display: flex; align-items: center; gap: .5rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--pill); padding: .4rem .4rem .4rem 1.25rem;
  box-shadow: var(--shadow); max-width: 34rem; margin-top: 1.75rem;
}
.hero-search input { flex: 1; border: 0; font: inherit; padding: .6rem 0; background: transparent; min-width: 0; }
.hero-search input:focus { outline: none; }
.hero-search .btn { white-space: nowrap; }

.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.mosaic img { border-radius: var(--r-lg); object-fit: cover; width: 100%; background: var(--surface-2); }
.mosaic img:nth-child(3n + 1) { height: 190px; }
.mosaic img:nth-child(3n + 2) { height: 240px; }
.mosaic img:nth-child(3n) { height: 160px; }
.mosaic > div { display: grid; gap: .6rem; align-content: start; }
.mosaic > div:nth-child(2) { padding-top: 2rem; }
.mosaic > div:nth-child(3) { padding-top: .75rem; }

/* ---------------------------------------------------------------- trust bar */
.trustbar { border-block: 1px solid var(--line); background: #fff; }
.trustbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; padding: 1.1rem 0; }
.trustpoints { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-left: auto; }
.trustpoint { display: flex; align-items: center; gap: .5rem; font-size: .95rem; color: var(--ink-2); }
.trustpoint svg { flex: none; color: var(--ok); }
.rating-chip { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- cards + grids */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head p { margin: 0; color: var(--muted); }
.section-head h2 { margin-bottom: .25rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.tile { display: block; color: inherit; }
.tile:hover { text-decoration: none; }
.tile img { border-radius: var(--r-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--surface-2); transition: transform .25s ease; }
.tile:hover img { transform: scale(1.02); }
.tile-body { padding: .75rem .1rem 0; }
.tile-body strong { display: block; font-size: 1.05rem; }
.tile-meta { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .875rem; margin-top: .15rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.card-pad-0 { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: .35rem; }
.card-list { display: grid; gap: 1rem; }

/* pill filter tabs */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.pill {
  padding: .5rem 1.1rem; border-radius: var(--pill); border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.pill:hover { border-color: var(--brand); text-decoration: none; }
.pill[aria-selected="true"], .pill.is-active { background: var(--grad); color: #fff; border-color: transparent; }

/* steps */
.steps { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem 1.5rem; text-align: center; }
.step-num {
  width: 48px; height: 48px; margin: 0 auto 1rem; border-radius: var(--pill);
  background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem;
}
.step p { color: var(--muted); margin: 0; }

/* supplier cards */
.supplier-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; }
.supplier-card img { border-radius: var(--r); aspect-ratio: 4 / 3; object-fit: cover; height: 100%; background: var(--surface-2); }
.supplier-card h3 { margin-bottom: .1rem; }
.supplier-card .tag-row { margin: .6rem 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-block; padding: .2rem .65rem; border-radius: var(--pill); background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.tag-brand { background: var(--grad-soft); color: var(--brand-dark); }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: var(--pill); font-size: .8rem; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--surface-2); color: var(--muted); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; color: var(--ink-2); }
.field { margin-bottom: 1.15rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .85rem; margin: .3rem 0 0; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url],
input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid #cbd5e1; border-radius: var(--r);
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 77, 54, .18); }
textarea { resize: vertical; min-height: 7rem; }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; gap: .65rem; align-items: start; font-weight: 400; font-size: .95rem; color: var(--ink-2); }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; accent-color: var(--brand); }
.choice-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.choice {
  display: flex; gap: .65rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--line);
  border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: .92rem; background: #fff; margin: 0;
}
.choice:hover { border-color: var(--brand); }
.choice input { accent-color: var(--brand); width: 1.1rem; height: 1.1rem; flex: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--grad-soft); }
.honey { position: absolute; left: -9999px; }

.alert { padding: .9rem 1.1rem; border-radius: var(--r); margin-bottom: 1.25rem; font-size: .95rem; border: 1px solid transparent; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }

/* wizard */
.wizard-steps { display: flex; gap: .5rem; margin-bottom: 2rem; }
.wizard-steps li { flex: 1; list-style: none; font-size: .8rem; font-weight: 700; color: var(--muted); }
.wizard-steps li::before { content: ""; display: block; height: 5px; border-radius: var(--pill); background: var(--line); margin-bottom: .5rem; }
.wizard-steps li.done::before, .wizard-steps li.current::before { background: var(--grad); }
.wizard-steps li.current { color: var(--brand); }

/* ---------------------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.dash-nav { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: .15rem; }
.dash-nav a { padding: .6rem .9rem; border-radius: var(--r); color: var(--ink-2); font-weight: 600; font-size: .95rem; display: flex; justify-content: space-between; gap: .5rem; }
.dash-nav a:hover { background: var(--surface-2); text-decoration: none; }
.dash-nav a[aria-current="page"] { background: var(--grad-soft); color: var(--brand-dark); }
.dash-nav .count { background: var(--brand); color: #fff; border-radius: var(--pill); padding: 0 .5rem; font-size: .75rem; }

.metrics { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 2rem; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.25rem; }
.metric span { display: block; color: var(--muted); font-size: .85rem; font-weight: 600; }
.metric strong { font-size: 1.75rem; font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { background: var(--surface); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- messaging */
.thread-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.thread {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  display: flex; flex-direction: column; max-height: 62vh;
}
.thread-scroll { overflow-y: auto; padding: 1.25rem; display: grid; gap: .9rem; }
.msg { max-width: 78%; padding: .7rem 1rem; border-radius: var(--r-lg); font-size: .95rem; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; font-size: .72rem; opacity: .7; margin-top: .35rem; }
.msg-them { background: var(--surface-2); border-bottom-left-radius: 4px; justify-self: start; }
.msg-me { background: var(--grad); color: #fff; border-bottom-right-radius: 4px; justify-self: end; }
.msg-me a { color: #fff; text-decoration: underline; }
.msg-system {
  justify-self: center; background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a;
  font-size: .82rem; font-weight: 600; text-align: center; max-width: 90%;
}
.composer { border-top: 1px solid var(--line); padding: .9rem; display: flex; gap: .75rem; align-items: end; }
.composer textarea { min-height: 3rem; max-height: 9rem; }
.thread-empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--muted); }

/* quote + escrow */
.quote-card { border: 2px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; background: #fff; }
.quote-card.is-accepted { border-color: var(--ok); background: var(--ok-bg); }
.quote-amount { font-size: 2rem; font-family: var(--font-display); font-weight: 400; letter-spacing: 0; line-height: 1; }
.escrow-steps { display: grid; gap: 0; margin: 1.25rem 0; }
.escrow-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: .9rem; padding-bottom: 1.25rem; position: relative; }
.escrow-step:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.escrow-step.done:not(:last-child)::before { background: var(--ok); }
.escrow-dot { width: 32px; height: 32px; border-radius: var(--pill); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.escrow-step.done .escrow-dot { background: var(--ok); color: #fff; }
.escrow-step.current .escrow-dot { background: var(--grad); color: #fff; }
.escrow-step strong { display: block; }
.escrow-step p { margin: 0; font-size: .88rem; color: var(--muted); }
.money-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.money-row:last-child { border-bottom: 0; font-weight: 700; font-size: 1.05rem; }

/* ---------------------------------------------------------------- profile */
.profile-hero img { width: 100%; height: clamp(220px, 32vw, 380px); object-fit: cover; border-radius: var(--r-xl); background: var(--surface-2); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; margin-top: 2rem; }
.profile-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.gallery img { border-radius: var(--r); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
/* The manage view puts controls under each thumbnail; the public profile has
   bare images and is unaffected. */
.gallery .btn-row { gap: .35rem; }
.gallery .btn-row form { display: contents; }
input[type=file] {
  width: 100%; padding: .6rem; border: 1px dashed #cbd5e1; border-radius: var(--r);
  font: inherit; background: var(--surface); color: var(--ink);
}
input[type=file]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 77, 54, .18); }
.review { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.1rem; }
.review:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .3rem; }

/* ---------------------------------------------------------------- CTA band + footer */
.cta-band { background: var(--grad); color: #fff; border-radius: var(--r-xl); padding: clamp(2rem, 4vw, 3.25rem); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); }
.cta-band .btn-outline { background: #fff; color: var(--brand); border-color: #fff; }
.cta-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.cta-list li { display: flex; gap: .6rem; align-items: center; }

/* Near-black, not green: green at footer scale turns the page into one field.
   The footer re-points the two tokens that are tuned for a white background.
   Both failed WCAG AA here before the rebrand too — #5a6577 muted text was
   2.48:1 on the old navy and the rose wordmark was 2.93:1. */
.site-footer {
  background: #111111; color: #cfd3cf; padding: 3.5rem 0 2rem; margin-top: 4rem;
  --muted: #a6afa7;            /* 8.37:1 */
  --brand-on-dark: #8CBFA0;    /* 9.06:1 */
}
.site-footer h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.site-footer a { color: #cbd5e1; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-bottom { border-top: 1px solid #334155; margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem; }
.site-footer .logo { color: #fff; }
.site-footer .logo .feast { color: #fff; }
.site-footer .logo .match { color: var(--brand-on-dark); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 0; z-index: 300;
  background: var(--ink); color: #fff; padding: .8rem 1.4rem; border-radius: var(--pill);
  box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, translate .2s ease;
}
.toast.show { opacity: 1; translate: -50% -.5rem; }
.toast.error { background: var(--danger); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .mosaic { display: none; }
  .profile-layout, .thread-layout, .dash { grid-template-columns: 1fr; }
  .profile-aside, .dash-nav { position: static; }
  .dash-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: .5rem; }
}
@media (max-width: 800px) {
  .main-nav {
    position: absolute; inset: var(--header-h) 0 auto; background: #fff; flex-direction: column;
    gap: 0; padding: .5rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
  .nav-toggle { display: block; order: 3; }
  .header-actions .btn-outline { display: none; }
  .supplier-card { grid-template-columns: 1fr; }
  .supplier-card img { aspect-ratio: 16 / 9; }
  .trustpoints { margin-left: 0; }
}

/* ---------------------------------------------------------------- utilities
   The views are template strings, and a strict `style-src 'self'` blocks inline
   style attributes outright — so spacing and alignment live here instead of in
   the markup. Scale: 1=.2rem 2=.4rem 3=.5rem 4=.6rem 5=.75rem 6=.9rem 7=1rem
   8=1.25rem 9=1.5rem 10=2rem 11=2.5rem 12=3rem. */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }      .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .2rem; }  .mb-1 { margin-bottom: .2rem; }
.mt-2 { margin-top: .4rem; }  .mb-2 { margin-bottom: .4rem; }
.mt-3 { margin-top: .5rem; }  .mb-3 { margin-bottom: .5rem; }
.mt-4 { margin-top: .6rem; }  .mb-4 { margin-bottom: .6rem; }
.mt-5 { margin-top: .75rem; } .mb-5 { margin-bottom: .75rem; }
.mt-6 { margin-top: .9rem; }  .mb-6 { margin-bottom: .9rem; }
.mt-7 { margin-top: 1rem; }   .mb-7 { margin-bottom: 1rem; }
.mt-8 { margin-top: 1.25rem; }.mb-8 { margin-bottom: 1.25rem; }
.mt-9 { margin-top: 1.5rem; } .mb-9 { margin-bottom: 1.5rem; }
.mt-10 { margin-top: 2rem; }  .mb-10 { margin-bottom: 2rem; }
.mt-11 { margin-top: 2.5rem; }.mb-11 { margin-bottom: 2.5rem; }
.mt-12 { margin-top: 3rem; }  .mb-12 { margin-bottom: 3rem; }
.my-0 { margin-block: 0; }      .my-2 { margin-block: .4rem; }
.my-3 { margin-block: .5rem; }  .my-4 { margin-block: .6rem; }
.my-5 { margin-block: .75rem; } .my-6 { margin-block: .9rem; }
.my-7 { margin-block: 1rem; }   .my-9 { margin-block: 1.5rem; }
.my-10 { margin-block: 2rem; }

.text-xs { font-size: .85rem; }
.text-sm { font-size: .9rem; }
.text-lg { font-size: 1.35rem; }
.fw-400 { font-weight: 400; }
.fw-700 { font-weight: 700; }
.upper { text-transform: uppercase; }
.tracked { letter-spacing: .04em; }
.ta-left { text-align: left; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.c-inherit { color: inherit; }
.d-block { display: block; }
.round { border-radius: var(--r); }
.round-xl { border-radius: var(--r-xl); }
.pl-list { padding-left: 1.2rem; }
.mw-22 { max-width: 22rem; }
.mw-form { max-width: 480px; }
.mw-form-wide { max-width: 520px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.jc-between { justify-content: space-between; }
.jc-center { justify-content: center; }
.ai-start { align-items: start; }
.ai-center { align-items: center; }
.ai-end { align-items: end; }
.as-end { align-self: end; }
.gap-2 { gap: .4rem; }
.gap-5 { gap: .75rem; }
.gap-7 { gap: 1rem; }
.gap-12 { gap: 3rem; }

.star-on { opacity: 1; }
.star-off { opacity: .25; }
.bare-fieldset { border: 0; padding: 0; margin: 0; }
.quote-amount-row { margin: .6rem 0 .2rem; }
.choice-group-label {
  margin: .9rem 0 .4rem; font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.thread-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 1rem; align-items: start; }
.tile-fallback-box { aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--grad-soft); }

/* Touch targets. The small button and pill sizes read well with a mouse but
   land at 38–41px, under the 44px minimum, so they are grown where the pointer
   is coarse rather than everywhere. */
@media (pointer: coarse), (max-width: 800px) {
  .btn-sm, .pill, .nav-toggle { min-height: 44px; }
  .btn-sm, .pill { padding-block: .6rem; }
  .dash-nav a, .main-nav a { min-height: 44px; display: flex; align-items: center; }

  /* The toggle declares 44px square but is a flex item in a tight header row,
     so it was being shrunk to 32px wide. */
  .nav-toggle { flex: 0 0 44px; min-width: 44px; }

  /* Form controls size off the base font, so dropping 17px to 16px for the new
     type left selects at 43px. Checkboxes and radios are excluded — their
     wrapping label is the target, handled by .check below. */
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  select, textarea { min-height: 44px; }

  /* Footer columns, both logos, and the links inside card headings and table
     cells are all real destinations sitting at 20-27px. inline-flex grows the
     hit area without moving the text or changing the type scale. */
  .footer-cols a, .site-footer address a,
  .card-list h3 a, .table-wrap td a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  /* Those links now carry their own 44px, so the list gap would double-space. */
  .footer-cols ul { gap: 0; }
  .logo { min-height: 44px; align-items: center; }

  /* .tag is a span almost everywhere, but on a supplier profile the service
     tags are links into the listings, so only the anchors are grown. */
  a.tag { display: inline-flex; align-items: center; min-height: 44px; }

  /* A checkbox row is 25px tall; the label is the target, so grow the label.
     align-items stays at start so a wrapped label still reads correctly. */
  .check { min-height: 44px; }

  /* A link that is the whole of its paragraph is a call to action, not prose. */
  .link-cta { display: inline-flex; align-items: center; min-height: 44px; }
}


/* ==================================================================
   Mobile formatting.

   styles.css had breakpoints at 1000px and 800px and nothing below, so
   a 390px handset was served the same layout as a 780px tablet and every
   dimension tuned for the wide end of that range came out oversized.
   These rules are the draft fix layer from ~/scratch/feastmatch-mobile-draft
   folded in, adapted to the green/serif system. Everything is scoped
   below 800px or to a coarse pointer; desktop above 1000px is untouched.
   ================================================================== */

/* --- gutters. A flat 40px is 11% of a 375px screen. ---------------- */
@media (max-width: 700px) { :root { --gutter: 2rem; } }
@media (max-width: 560px) { :root { --gutter: 1.5rem; } }
@media (max-width: 400px) { :root { --gutter: 1.25rem; } }

/* --- type scale. The base stays a flat 16px rather than the draft's
   clamp up to 17px: the new families already set larger than Nunito did,
   and under 16px iOS Safari zooms on input focus — every input inherits
   the body size through `font: inherit`. ---------------------------- */
@media (max-width: 560px) {
  h1 { font-size: clamp(1.75rem, 1.15rem + 2.6vw, 2rem); }
  h2 { font-size: clamp(1.35rem, 1.05rem + 1.4vw, 1.5rem); }
  h3 { font-size: 1.125rem; }
  .hero-lead { font-size: 1.02rem; }
}
/* Long unbroken strings — supplier names, emails, URLs in cells — are the
   most common source of sideways scroll. */
h1, h2, h3, td, th, .tile-body strong, .metric strong, .msg { overflow-wrap: anywhere; }

/* --- vertical rhythm. Six 3rem bands in a row is most of a phone screen
   spent on whitespace. ---------------------------------------------- */
@media (max-width: 560px) {
  .band { padding: clamp(2.25rem, 6vw, 5rem) 0; }
  .band-tight { padding: 1.75rem 0; }
  .site-footer { padding: 2.5rem 0 1.5rem; margin-top: 2.5rem; }
  .grid { gap: 1rem; }
  .steps { gap: 1rem; }
  .section-head { margin-bottom: 1.25rem; }
}

/* --- header. 76px of sticky header is a lot of a 667px screen, and the
   secondary action was hidden outright rather than relocated. Base state
   is declared before the media query that reveals it, or a later rule of
   equal specificity wins. ------------------------------------------- */
@media (max-width: 560px) { :root { --header-h: 60px; } }
.main-nav .nav-secondary { display: none; }
@media (max-width: 800px) {
  .site-header .wrap { gap: .75rem; }
  .logo { font-size: 1.25rem; }
  .header-actions .btn-outline { display: none; }
  .main-nav .nav-secondary { display: flex; margin-top: .75rem; }
}

/* --- hero. The <br> is a desktop line break forced onto a 340px column,
   and .hero-search is a pill-shaped flex row that squeezes the input to
   about 150px once the nowrap button takes its share. --------------- */
@media (max-width: 800px) {
  .hero { padding-top: 1.5rem; gap: 1.75rem; }
  .hero h1 br { display: none; }
}
@media (max-width: 560px) {
  .hero-search {
    display: grid; gap: .6rem; padding: .75rem;
    border-radius: var(--r-lg); margin-top: 1.25rem;
  }
  .hero-search input {
    padding: .75rem .9rem; border: 1px solid var(--line);
    border-radius: var(--r); background: #fff;
  }
  .hero-search .btn { width: 100%; }
}
/* The mosaic is display:none below 1000px, which left the mobile hero with
   no imagery at all. Back as one compact strip. */
@media (max-width: 1000px) {
  .mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .5rem; }
  .mosaic > div { display: contents; }
  .mosaic > div:nth-child(2), .mosaic > div:nth-child(3) { padding-top: 0; }
  .mosaic img { display: none; }
  .mosaic > div > img:first-child { display: block; height: clamp(90px, 26vw, 140px); }
}

/* --- grids. auto-fit minimums of 220-260px collapse to one column at
   335px of usable width, so eight occasion tiles become eight full-width
   4:3 photographs. Two columns is denser and better proportioned. ---- */
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { gap: .75rem; }
  .tile-body strong { font-size: .95rem; }
  .tile-meta { font-size: .8rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .metric { padding: .85rem .9rem; }
  .metric strong { font-size: 1.4rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (max-width: 380px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --- section heads. flex + space-between + align-items:end drops the
   "View all" button to its own line, baseline-aligned to nothing. ---- */
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: stretch; }
  .section-head .btn { align-self: start; }
  .section-head.jc-center .btn { align-self: center; }
}

/* --- cards and steps ---------------------------------------------- */
@media (max-width: 560px) {
  .card { padding: 1.15rem; }
  .step { padding: 1.5rem 1.15rem; }
  .step-num { width: 40px; height: 40px; margin-bottom: .75rem; }
  .supplier-card { padding: .75rem; gap: .9rem; }
  .cta-band { border-radius: var(--r-lg); padding: 1.5rem 1.25rem; }
}

/* --- the wizard. Each step is flex:1, so five labels sharing 335px get
   about 67px each and every one wraps to three lines. Below 560 the bars
   stay and the label moves to a single line. ------------------------ */
.wizard-current-label {
  display: none; font-size: .82rem; font-weight: 700;
  color: var(--brand); margin: -.5rem 0 1.25rem;
}
@media (max-width: 560px) {
  .wizard-steps { gap: .35rem; margin-bottom: 1.25rem; }
  .wizard-steps li { font-size: 0; }
  .wizard-steps li::before { height: 6px; margin-bottom: 0; }
  .wizard-current-label { display: block; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice { padding: .7rem .75rem; font-size: .875rem; }
  .field { margin-bottom: .9rem; }
  textarea { min-height: 5.5rem; }
}

/* --- dashboard. minmax(0, 1fr) is defensive here rather than corrective:
   .dash-nav carries overflow-x: auto, which already zeroes a track's
   automatic minimum, so the measured build does not scroll sideways. The
   scroll affordances below are the real gain. ----------------------- */
@media (max-width: 1000px) {
  .dash, .profile-layout, .thread-layout { grid-template-columns: minmax(0, 1fr); }
  .dash { gap: 1.5rem; }
  .dash-nav {
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav a { scroll-snap-align: start; white-space: nowrap; }
}
/* Tables scroll already, but with no min-width the columns crush to
   unreadable widths before the scroller ever engages. */
@media (max-width: 700px) {
  .table-wrap { position: relative; }
  .table-wrap table { min-width: 34rem; }
  .table-wrap th, .table-wrap td { padding: .65rem .8rem; white-space: nowrap; }
}

/* --- messaging. 62vh against a sticky header and the browser chrome bar
   leaves very little thread; dvh tracks the collapsing URL bar. ------ */
@media (max-width: 1000px) {
  .thread { max-height: 70dvh; }
  .msg { max-width: 88%; }
  .composer { padding: .7rem; gap: .5rem; }
}

/* --- the remaining tap targets the earlier pass did not reach ------- */
@media (pointer: coarse), (max-width: 800px) {
  .btn { min-height: 44px; }
  .check input, .choice input { width: 1.35rem; height: 1.35rem; }
  .check, .choice { min-height: 44px; }
  .site-footer a, .footer-cols a { min-width: 44px; }
  .supplier-card h3 a {
    display: inline-flex; align-items: center; min-height: 44px; margin-block: -.3rem;
  }
  .tile { padding-block: 2px; }
}

/* --- sticky mobile CTA. Item 11 of the pre-launch gate, and the thing
   the gate flagged as missing on the live site. --------------------- */
.mobile-cta { display: none; }
@media (max-width: 800px) {
  .mobile-cta {
    display: flex; position: fixed; inset: auto 0 0; z-index: 90;
    gap: .6rem; align-items: center;
    padding: .6rem var(--gutter);
    padding-bottom: calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
  }
  .mobile-cta .btn { flex: 1; }
  .mobile-cta-note { font-size: .78rem; color: var(--muted); font-weight: 600; line-height: 1.2; }
  body:has(.mobile-cta) { padding-bottom: 4.5rem; }
}
