/**
 * The Food Gene — main.css
 * Version: 3.0 (Site V2) · Cotswold Botanical
 *
 * Written against the V2 markup. Every colour, space and size comes from
 * tokens.css (NFR-008) — there are no raw hex values below.
 *
 * Structure:
 *   1. Reset and base
 *   2. Accessibility (NFR-004)
 *   3. Layout
 *   4. Typography
 *   5. Buttons and badges
 *   6. Header and navigation
 *   7. Search panel
 *   8. Media (MED-008)
 *   9. Cards
 *  10. Homepage sections
 *  11. Listings, tabs and filters
 *  12. Share and follow
 *  13. Newsletter
 *  14. Empty states and pagination
 *  15. Footer
 *  16. Maintenance and style guide
 *  17. Responsive
 */

/* ═══ 1. Reset and base ═══════════════════════════════════════════════════ */

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

html {
  /* No overflow-x:hidden here. It hides the symptom of a too-wide element while
     breaking position:sticky, so NFR-010 is met by sizing things correctly. */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { max-width: 100%; }
img, video { height: auto; }

/* MED-008: the shape is never stretched or squashed. object-fit covers the case
   where a container has a fixed ratio and the file does not match it. */
img { object-fit: cover; }

a { color: var(--accent-juniper); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-juniper-hover); }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }

hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-xl) 0;
}

/* ═══ 2. Accessibility (NFR-004) ══════════════════════════════════════════ */

/* A visible focus ring on every focusable thing. :focus-visible so a mouse
   click does not leave a ring behind, while keyboard focus always shows one. */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The skip link: off-screen until focused, then anchored top-left. */
.skip-link {
  position: absolute;
  top: 0; left: var(--space-sm);
  transform: translateY(-120%);
  z-index: var(--z-modal);
  padding: var(--space-2xs) var(--space-sm);
  background: var(--accent-juniper);
  color: var(--text-inverse);
  text-decoration: none;
  transition: transform var(--transition-fast);
}
.skip-link:focus { transform: translateY(0); }

/* #main receives focus after the skip link, and must not show a ring for it. */
main:focus { outline: none; }

/* NFR-004: respect "reduce motion". Anyone who has asked for less movement gets
   none — including the smooth scrolling that can trigger nausea. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══ 3. Layout ═══════════════════════════════════════════════════════════ */

main {
  max-width: var(--width-page);
  margin: 0 auto;
  padding: var(--space-lg) var(--gutter) var(--space-2xl);
}

section { margin-bottom: var(--space-2xl); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-2xs);
  border-bottom: 1px solid var(--border-subtle);
}
.section-head h2 { margin: 0; }
.section-link {
  flex: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
}
.section-link:hover { text-decoration: underline; }

.page-head { margin-bottom: var(--space-lg); }
.page-head__intro {
  max-width: var(--width-reading);
  font-size: var(--text-lg);
  color: var(--text-secondary);
}
.page-head__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.page-narrow main, .page-error main { max-width: var(--width-narrow); }

/* ═══ 4. Typography ══════════════════════════════════════════════════════ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin: 0 0 var(--space-2xs);
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }

/* BR-003: display type is not used at small sizes. A card title, a side heading
   and an eyebrow all sit below the threshold, so they use the body family. */
h4, .side-heading, .card__title, .eyebrow {
  font-family: var(--font-body);
}

.side-heading {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xs);
}

.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-sage-strong);   /* BR-012: not --accent-sage at this size */
  margin: 0 0 var(--space-2xs);
}

.prose { max-width: var(--width-reading); }
.prose > * + * { margin-top: var(--space-sm); }
.prose h2 { margin-top: var(--space-xl); font-size: var(--text-xl); }
.prose h3 { margin-top: var(--space-lg); }
.prose ul, .prose ol { padding-left: var(--space-md); }
.prose li { list-style: disc; margin-bottom: var(--space-3xs); }
.prose ol li { list-style: decimal; }
.prose blockquote {
  margin: var(--space-md) 0;
  padding-left: var(--space-sm);
  border-left: 3px solid var(--accent-juniper);
  font-style: italic;
  color: var(--text-secondary);
}
.prose img { margin: var(--space-md) 0; }
.smallprint { font-size: var(--text-sm); color: var(--text-secondary); }

/* ═══ 5. Buttons and badges ══════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: var(--tap-target);     /* NFR-004 */
  padding: var(--space-2xs) var(--space-md);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);   /* BR-004: subtle only */
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-primary {
  background: var(--accent-juniper);
  border-color: var(--accent-juniper);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: var(--accent-juniper-hover);
  border-color: var(--accent-juniper-hover);
  color: var(--text-inverse);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  color: var(--accent-juniper);
}
.btn-secondary:hover { border-color: var(--accent-juniper); background: var(--bg-accent-soft); }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
  text-decoration: underline;
}
.btn-quiet:hover { color: var(--accent-juniper); }

.btn[aria-pressed="true"] {
  background: var(--accent-juniper);
  border-color: var(--accent-juniper);
  color: var(--text-inverse);
}

/* Badges — CARD-002. The restyled V1 pills BR-001 allows us to keep. */
.badge-row {
  display: flex; flex-wrap: wrap; gap: var(--space-3xs);
  margin-bottom: var(--space-2xs);
}
.badge, .badge-juniper, .badge-sage {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.badge {
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.badge-juniper {
  background: var(--bg-accent-soft);
  color: var(--accent-juniper);
  border: 1px solid rgba(38, 67, 54, 0.2);
}
.badge-sage {
  background: var(--bg-sage-soft);
  /* BR-012: a small label on the sage tint uses Shaded Thyme, not Frosted Sage. */
  color: var(--accent-sage-strong);
  border: 1px solid rgba(92, 124, 105, 0.22);
}

/* ═══ 6. Header and navigation (NAV-001, NAV-002, NAV-007) ═══════════════ */

.site-header {
  position: sticky; top: 0;
  z-index: var(--z-header);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: var(--width-page);
  margin: 0 auto;
  padding: var(--space-2xs) var(--gutter);
}

/* BR-005: wordmark in DM Serif Display, normal letters, no tagline. */
.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark--footer { font-size: var(--text-lg); color: var(--text-on-dark); margin: 0 0 var(--space-2xs); }
.wordmark--large  { font-size: var(--text-2xl); margin-bottom: var(--space-md); }

/* NAV-002: navigation right on desktop. margin-left:auto pushes it and the
   actions across without a spacer element. */
.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: var(--space-md); }
.site-nav__list a {
  display: inline-block;
  padding: var(--space-2xs) 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav__list a:hover { border-bottom-color: var(--border-medium); }
.site-nav__list a[aria-current="page"] {
  color: var(--accent-juniper);
  border-bottom-color: var(--accent-juniper);
}

.header-actions { display: flex; align-items: center; gap: var(--space-3xs); }

/* NAV-007: every header button is at least 44x44. */
.header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}
.header-btn:hover { background: var(--bg-surface-subtle); color: var(--accent-juniper); }

/* NAV-001: the saved count. Hidden until the script knows the real number. */
.saved-count {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 1.15rem;
  padding: 0 0.25em;
  border-radius: var(--radius-pill);
  background: var(--accent-juniper);
  color: var(--text-inverse);
  font-size: 0.6875rem;
  font-weight: var(--weight-semi);
  line-height: 1.15rem;
  text-align: center;
}

.nav-toggle { display: none; }   /* shown under 900px — see §17 */

/* ═══ 7. Search panel (NAV-003) ══════════════════════════════════════════ */

.search-panel {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: var(--space-sm) var(--gutter);
}
.search-panel__form {
  display: flex;
  gap: var(--space-2xs);
  max-width: var(--width-page);
  margin: 0 auto;
}
.search-panel__form input[type="search"] { flex: 1; }
.search-panel__close {
  width: var(--tap-target); height: var(--tap-target);
  background: none; border: 0; cursor: pointer;
  color: var(--text-secondary);
}
.search-panel__results {
  max-width: var(--width-page);
  margin: var(--space-2xs) auto 0;
}
.suggest-group + .suggest-group { margin-top: var(--space-2xs); }
.suggest-group__label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}
.suggest-group a {
  display: flex; justify-content: space-between; gap: var(--space-sm);
  padding: var(--space-2xs);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
}
.suggest-group a:hover { background: var(--bg-surface-subtle); }
.suggest-group__meta { color: var(--text-secondary); font-size: var(--text-sm); }

/* Inputs */
input[type="search"], input[type="email"], input[type="text"],
input[type="password"], select, textarea {
  width: 100%;
  min-height: var(--tap-target);
  padding: var(--space-2xs) var(--space-xs);
  background: var(--bg-surface);
  /* BR-012 permits Silver Thyme for an input border. */
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-base);
  color: var(--text-primary);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-juniper);
  outline: var(--focus-ring);
  outline-offset: 1px;
}
label { display: block; font-size: var(--text-sm); font-weight: var(--weight-medium); }

.form-error {
  padding: var(--space-2xs) var(--space-xs);
  border-left: 3px solid var(--accent-juniper);
  background: var(--bg-accent-soft);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

/* ═══ 8. Media (MED-008) ═════════════════════════════════════════════════ */

/* The three display sizes. max-width, never width — MED-008 requires that on a
   screen narrower than the chosen size the media fills the available width, and
   a max-width does exactly that with no media query. */
.media { display: block; }
.media--small  { max-width: var(--media-small); }
.media--medium { max-width: var(--media-medium); }
.media--large  { max-width: var(--media-large); }
.media img { display: block; width: 100%; }

/* BR-011: ONE uniform placeholder. Never a different colour per card or
   category — that is what makes a half-filled grid look accidental. */
.media-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  width: 100%;
  background: var(--bg-placeholder);
  color: var(--text-muted);    /* BR-012 permits Silver Thyme for an icon */
}

/* The click-to-load video player (INT-010). */
.video-player { max-width: var(--video-width, var(--media-large)); }
.video-player__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bg-surface-warm);
  cursor: pointer;
  /* MED-008: the ratio is fixed from the data, so the frame is never squashed. */
  aspect-ratio: var(--video-ratio, 16 / 9);
  overflow: hidden;
}
.video-player__trigger .media,
.video-player__trigger img { width: 100%; height: 100%; max-width: none; }
.video-player__play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-inverse);
  background: rgba(22, 32, 27, 0.28);
  transition: background-color var(--transition-fast);
}
.video-player__trigger:hover .video-player__play { background: rgba(22, 32, 27, 0.42); }
.video-player__duration {
  position: absolute; right: var(--space-2xs); bottom: var(--space-2xs);
  padding: 0.1em 0.45em;
  background: var(--bg-surface-dark);
  color: var(--text-on-dark);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}
.video-player__notice, .video-player__missing p {
  margin: var(--space-3xs) 0 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.video-player iframe { display: block; width: 100%; aspect-ratio: var(--video-ratio, 16 / 9); border: 0; }

/* MED-008: a vertical film is never taller than 85% of the screen. */
.video-player--vertical { max-width: min(var(--video-width), 100%); }
.video-player--vertical .video-player__trigger,
.video-player--vertical iframe { max-height: 85vh; }

/* ═══ 9. Cards (CARD-001 … CARD-006) ═════════════════════════════════════ */

/* BR-007: three columns on wide desktop, two on tablet, one on mobile. auto-fill
   with a minimum does that without breakpoints, and never leaves a stretched
   single card on a wide screen. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-md);
}
.card-grid--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-smooth);
}
.card:hover { box-shadow: var(--shadow-md); }

/* CARD-001: image-dominant. */
.card__media { position: relative; display: block; }
.card__media .media, .card__media img { width: 100%; max-width: none; }
.card__image { aspect-ratio: 3 / 2; }
.card__play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-inverse);
  background: rgba(22, 32, 27, 0.24);
}

.card__body { padding: var(--space-xs); }
.card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3xs);
}
.card__title a { color: var(--text-primary); text-decoration: none; }
.card__title a:hover { color: var(--accent-juniper); }
.card__summary {
  margin: 0 0 var(--space-3xs);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.card__meta { margin: 0; font-size: var(--text-xs); color: var(--text-secondary); }

/* CARD-006: the bookmark, with a clear pressed state. */
.card__bookmark {
  position: absolute;
  top: var(--space-2xs); right: var(--space-2xs);
  display: grid; place-items: center;
  width: var(--tap-target); height: var(--tap-target);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}
.card__bookmark:hover { color: var(--accent-juniper); border-color: var(--accent-juniper); }
.card__bookmark[aria-pressed="true"] {
  background: var(--accent-juniper);
  border-color: var(--accent-juniper);
  color: var(--text-inverse);
}
.card__bookmark[aria-pressed="true"] svg { fill: currentColor; }

/* ═══ 10. Homepage (HOME-001 … HOME-006) ═════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.hero__media { display: block; }
.hero__image { aspect-ratio: 16 / 9; width: 100%; max-width: none; }
.hero__body { margin-top: var(--space-sm); }
.hero h1 { font-size: var(--text-3xl); }
.hero h1 a { color: inherit; text-decoration: none; }
.hero h1 a:hover { color: var(--accent-juniper); }
.hero__summary { font-size: var(--text-lg); color: var(--text-secondary); max-width: 46ch; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }

.hero__aside {
  padding-left: var(--space-lg);
  border-left: 1px solid var(--border-subtle);
}
.also-new__item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--space-2xs);
  padding: var(--space-2xs) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.also-new__media .media, .also-new__media img { width: 100%; max-width: none; aspect-ratio: 1; }
.also-new__item h3 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--weight-semi); }
.also-new__item h3 a { color: var(--text-primary); text-decoration: none; }
.also-new__meta { margin: 0; font-size: var(--text-xs); color: var(--text-secondary); }

/* HOME-002: Browse Recipes */
.browse__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-2xs);
}
.browse__item a {
  display: block;
  height: 100%;
  padding: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.browse__item a:hover { border-color: var(--accent-juniper); background: var(--bg-accent-soft); }
.browse__item h3 { font-family: var(--font-display); font-size: var(--text-lg); }
.browse__subs { margin: 0; font-size: var(--text-xs); color: var(--text-secondary); }
.browse__item--view a { background: var(--bg-surface-warm); }

/* HOME-005 */
.collection__intro { max-width: var(--width-reading); color: var(--text-secondary); }

/* HOME-004 */
.watch-home__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: var(--space-lg);
}
.watch-home__title { margin-top: var(--space-2xs); font-family: var(--font-display); }
.watch-home__title a { color: var(--text-primary); text-decoration: none; }
.watch-home__list { display: grid; gap: var(--space-2xs); }
.watch-home--empty .watch-home__placeholder {
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-surface-warm);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* HOME-006 */
.guide-list { display: grid; gap: var(--space-sm); }
.guide-list__item { padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-subtle); }
.guide-list__item h3 { font-family: var(--font-display); }
.guide-list__item h3 a { color: var(--text-primary); text-decoration: none; }
.guide-list__summary { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.guide-list__meta { margin: var(--space-3xs) 0 0; font-size: var(--text-xs); color: var(--text-secondary); }

/* CNT-023: the vertical shorts row. Scrolls horizontally rather than wrapping,
   because a 9:16 card is tall and a wrapped grid of them is a very long page. */
.shorts__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 9rem;
  gap: var(--space-2xs);
  overflow-x: auto;
  padding-bottom: var(--space-2xs);
  scroll-snap-type: x mandatory;
}
.shorts__item { scroll-snap-align: start; }
.shorts__item a { text-decoration: none; color: var(--text-primary); }
.shorts__image { aspect-ratio: 9 / 16; width: 100%; max-width: none; }
.shorts__title { display: block; margin-top: var(--space-3xs); font-size: var(--text-sm); }

/* ═══ 11. Listings, tabs and filters (CNT-011) ═══════════════════════════ */

.index-head { margin-bottom: var(--space-md); }
.index-head__intro { max-width: var(--width-reading); color: var(--text-secondary); font-size: var(--text-lg); }

.tabs { border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--space-sm); }
.tabs ul { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.tabs a {
  display: inline-block;
  padding: var(--space-2xs) 0;
  margin-bottom: -1px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--text-primary); }
.tabs a[aria-current="page"] { color: var(--accent-juniper); border-bottom-color: var(--accent-juniper); }

.subcats { margin-bottom: var(--space-md); }
.subcats ul { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }
.subcats a {
  display: inline-block;
  padding: var(--space-3xs) var(--space-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
}
.subcats a:hover { border-color: var(--accent-juniper); color: var(--accent-juniper); }
.subcats a[aria-current="page"] {
  background: var(--accent-juniper);
  border-color: var(--accent-juniper);
  color: var(--text-inverse);
}

.filters {
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.filters__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-2xs);
}
.filters__diets { margin: var(--space-2xs) 0 0; padding: 0; border: 0; }
.filters__diets legend { font-size: var(--text-sm); font-weight: var(--weight-medium); padding: 0; }
.filters__check {
  display: inline-flex; align-items: center; gap: var(--space-3xs);
  min-height: var(--tap-target);
  margin-right: var(--space-sm);
  font-weight: var(--weight-normal);
}
.filters__check input { width: auto; min-height: 0; }
.filters__actions { display: flex; align-items: center; gap: var(--space-2xs); margin-top: var(--space-2xs); }

.result-count {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.search-page__form { display: flex; gap: var(--space-2xs); margin-bottom: var(--space-lg); max-width: var(--width-reading); }
.search-group { margin-bottom: var(--space-xl); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }
.tag-list a {
  display: inline-block;
  padding: 0.15em 0.6em;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--accent-sage-strong);
  text-decoration: none;
}

/* ═══ 12. Share and follow (CNT-022, CNT-026, CNT-027) ═══════════════════ */

.share-bar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--space-2xs);
  padding: var(--space-2xs) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: var(--space-md) 0;
}
.share-bar__label {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}
.share-bar__list, .follow-icons__list { display: flex; flex-wrap: wrap; gap: var(--space-3xs); }

.share-btn, .follow-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.share-btn:hover, .follow-btn:hover {
  color: var(--accent-juniper);
  border-color: var(--accent-juniper);
  background: var(--bg-accent-soft);
}
.share-btn__flash {
  position: absolute;
  bottom: calc(-1 * var(--space-md));
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: var(--text-xs);
  color: var(--accent-juniper);
}

.follow-icons { margin: var(--space-lg) 0; }
.follow-icons__label {
  margin: 0 0 var(--space-3xs);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}
/* In the dark footer the icons invert. */
.site-footer .follow-btn {
  background: transparent;
  border-color: rgba(245, 247, 245, 0.25);
  color: var(--text-on-dark);
}
.site-footer .follow-btn:hover {
  background: rgba(245, 247, 245, 0.1);
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}
.site-footer .follow-icons__label { color: var(--text-on-dark-muted); }

/* ═══ 13. Newsletter (HOME-007, INT-005) ════════════════════════════════ */

.newsletter {
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-surface-warm);
  border-radius: var(--radius-sm);
}
.newsletter__inner { max-width: var(--width-narrow); margin: 0 auto; text-align: center; }
.newsletter__intro { color: var(--text-secondary); }
.newsletter__form { text-align: left; margin-top: var(--space-md); }
.newsletter__field { margin-bottom: var(--space-2xs); }
.newsletter__consent {
  display: flex; align-items: flex-start; gap: var(--space-2xs);
  margin-bottom: var(--space-2xs);
}
.newsletter__consent input { width: auto; min-height: 0; margin-top: 0.3em; flex: none; }
.newsletter__consent label { font-weight: var(--weight-normal); font-size: var(--text-sm); }
.newsletter__smallprint { margin: var(--space-2xs) 0 0; font-size: var(--text-xs); color: var(--text-secondary); }

/* ═══ 14. Empty states and pagination (CNT-025) ═════════════════════════ */

.empty-state {
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}
.empty-state--page { border: 0; background: transparent; padding-top: var(--space-2xl); }
.empty-state h1, .empty-state h2 { margin-bottom: var(--space-2xs); }
.empty-state p { color: var(--text-secondary); max-width: 48ch; margin-inline: auto; }
.empty-state .btn { margin: var(--space-2xs) var(--space-3xs) 0; }

.error-detail {
  margin-top: var(--space-lg);
  padding: var(--space-sm);
  background: var(--bg-surface-warm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-align: left;
  white-space: pre-wrap;
  overflow-x: auto;
}

.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}
.pagination__status { font-size: var(--text-sm); color: var(--text-secondary); }
.saved-actions { margin-top: var(--space-lg); text-align: center; }

/* ═══ 15. Footer (NAV-006) ══════════════════════════════════════════════ */

.site-footer {
  background: var(--bg-surface-dark);
  color: var(--text-on-dark);
  padding: var(--space-xl) var(--gutter) var(--space-md);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  max-width: var(--width-page);
  margin: 0 auto;
}
.site-footer__summary { color: var(--text-on-dark-muted); font-size: var(--text-sm); max-width: 34ch; }
.site-footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-2xs);
}
.site-footer__links li { margin-bottom: var(--space-3xs); }
.site-footer__links a {
  color: var(--text-on-dark);
  font-size: var(--text-sm);
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--text-on-dark); text-decoration: underline; }
.site-footer__base {
  max-width: var(--width-page);
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(245, 247, 245, 0.15);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
}

/* ═══ 16. Maintenance and style guide ═══════════════════════════════════ */

.layout-bare { display: grid; place-items: center; min-height: 100vh; }
.bare-main { max-width: var(--width-narrow); padding: var(--space-lg) var(--gutter); }
.maintenance { text-align: center; }
.maintenance__message { color: var(--text-secondary); font-size: var(--text-lg); }

/* BR-013 */
.sg-table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-lg); font-size: var(--text-sm); }
.sg-table th, .sg-table td {
  padding: var(--space-3xs) var(--space-2xs);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}
.sg-table th { font-weight: var(--weight-semi); color: var(--text-secondary); }
.sg-swatch {
  display: inline-block;
  width: 2.5rem; height: 1.5rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
}
.sg-muted { color: var(--text-muted); }
.sg-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); }
.sg-subhead { font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-sm); }
.sg-specimen--display { font-family: var(--font-display); font-size: var(--text-2xl); }
.sg-specimen--body { font-family: var(--font-body); font-size: var(--text-md); max-width: var(--width-reading); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-surface-subtle); padding: 0.1em 0.35em; }

/* ═══ 17. Responsive (BR-006, BR-007, NAV-007, NFR-010) ═════════════════ */

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero__aside { padding-left: 0; border-left: 0; border-top: 1px solid var(--border-subtle); padding-top: var(--space-sm); }
  .watch-home__layout { grid-template-columns: 1fr; }
  h1 { font-size: var(--text-3xl); }
}

/* NAV-007: under 900px the navigation moves into a slide-out panel. */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .header-actions { order: 2; margin-left: auto; }

  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(20rem, 84vw);
    z-index: var(--z-panel);
    padding: var(--space-2xl) var(--space-md) var(--space-md);
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    margin-left: 0;
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav__list { flex-direction: column; gap: var(--space-2xs); }
  .site-nav__list a { font-size: var(--text-lg); min-height: var(--tap-target); }

  /* The backdrop is a pseudo-element on body, so no extra markup is needed. */
  body.nav-open::after {
    content: '';
    position: fixed; inset: 0;
    z-index: var(--z-header);
    background: rgba(22, 32, 27, 0.4);
  }
  body.nav-open { overflow: hidden; }

  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  main { padding-top: var(--space-md); }
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--space-3xs); }
  .also-new__item { grid-template-columns: 4.5rem 1fr; }
  .search-panel__form { flex-wrap: wrap; }
  .search-panel__form input[type="search"] { flex: 1 1 100%; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .pagination { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   18. MARY BERRY LAYOUT LAYER
   Requirements v3.2 · matches docs/prototype/thefoodgene-v2-heritage-kitchen.html

   The layout language of maryberry.co.uk rendered in Cotswold Botanical. Every
   colour below is an existing token: BR-002 and BR-003 are untouched, so the
   structure is borrowed and the brand is not.

   Appended as a LAYER rather than replacing sections 1-17, because .card,
   .card-grid, .tabs, .chapters and a dozen others are used by guides, videos,
   search, saved and the recipe page - templates this change does not touch.
   Recipes get .mb-thumb; guides and videos keep .card, which is also what the
   reference does: its recipe cards are caption-only, its guide cards are not.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Header over the hero ─────────────────────────────────────────────────
   On the homepage the header floats on the photograph in white. Only there: a
   transparent header over a white page is an invisible header. */
body.has-overlay-header .site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  background: transparent;
  border-bottom: 1px solid rgba(245, 247, 245, .28);
}
body.has-overlay-header .site-header a,
body.has-overlay-header .site-header .wordmark,
body.has-overlay-header .header-btn { color: var(--text-on-dark); }
body.has-overlay-header .site-nav__list a[aria-current="page"],
body.has-overlay-header .header-nav-right a[aria-current="page"] {
  color: #fff;
  border-bottom-color: #fff;
}
body.has-overlay-header .header-btn:hover { background: rgba(245, 247, 245, .14); color: #fff; }
body.has-overlay-header .saved-count { background: var(--text-on-dark); color: var(--accent-juniper); }

/* ── Header: centred wordmark, navigation split around it ─────────────────
   The reference's signature arrangement: some navigation left, the wordmark
   centred, the rest plus the icons right. NAV-002 asks for the wordmark left
   and navigation right; this keeps that requirement's intent - brand primary,
   navigation secondary - while matching the reference's balance. */
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm);
}
.site-nav { margin-left: 0; justify-self: start; }
.wordmark { justify-self: center; text-align: center; }
.header-actions { justify-self: end; }

.header-nav-right { display: flex; align-items: center; gap: var(--space-md); }
.header-nav-right a {
  padding: var(--space-2xs) 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.header-nav-right a:hover { border-bottom-color: var(--border-medium); }
.header-nav-right a[aria-current="page"] { color: var(--accent-juniper); border-bottom-color: var(--accent-juniper); }

/* ── Full-bleed hero ────────────────────────────────────────────────────── */
.mb-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(76vh, 620px);
  overflow: hidden;
  background: var(--bg-surface-dark);
  /* Breaks out of main's padding so the photograph runs edge to edge. */
  margin: calc(-1 * var(--space-lg)) calc(-1 * var(--gutter)) var(--space-2xl);
}
.mb-hero__media { position: absolute; inset: 0; }
.mb-hero__media .media, .mb-hero__media img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mb-hero__media .media-placeholder { height: 100%; aspect-ratio: auto; }
.mb-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,32,27,.42) 0%, rgba(22,32,27,.16) 42%, rgba(22,32,27,.74) 100%);
}
.mb-hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--width-page);
  margin: 0 auto;
  padding: var(--space-3xl) var(--gutter) var(--space-xl);
  color: var(--text-on-dark);
}
.mb-hero__line {
  margin: 0 0 var(--space-md);
  max-width: 19ch;
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.14;
  color: var(--text-on-dark);
}
.mb-hero__line em { font-style: italic; }
.mb-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }

/* ── Centred section title: roman + italic, short rule ────────────────────
   The reference's most recognisable device. The rule is a pseudo-element, so
   the markup stays a plain heading. */
.mb-title { text-align: center; margin: 0 0 var(--space-lg); }
.mb-title h1, .mb-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: var(--leading-tight);
  color: var(--accent-juniper);
}
.mb-title em { font-style: italic; }
.mb-title h1::after, .mb-title h2::after {
  content: "";
  display: block;
  width: 190px;
  max-width: 60%;
  height: 1px;
  margin: var(--space-2xs) auto 0;
  background: var(--border-medium);
}
.mb-title p { max-width: 54ch; margin: var(--space-2xs) auto 0; color: var(--text-secondary); }
.mb-title--left { text-align: left; }
.mb-title--left h1::after, .mb-title--left h2::after { margin-left: 0; }
.mb-title--left p { margin-left: 0; }

/* ── Pull quote ─────────────────────────────────────────────────────────── */
.mb-quote {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-2xs) 56px;
  text-align: center;
}
.mb-quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.45;
}
.mb-quote em { font-style: italic; }
.mb-quote__mark {
  position: absolute;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--bg-accent-soft);
  user-select: none;
}
.mb-quote__mark--open { top: -6px; left: 0; }
.mb-quote__mark--close { right: 0; bottom: -34px; }
.mb-quote cite {
  display: block;
  margin-top: var(--space-md);
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Full-bleed feature band ──────────────────────────────────────────────
   The gradient is what makes white text legible over an unknown photograph.
   Without it the band only works over images that happen to be dark. */
.mb-feature {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 430px;
  overflow: hidden;
  background: var(--bg-surface-dark);
  margin-inline: calc(-1 * var(--gutter));
}
.mb-feature__media { position: absolute; inset: 0; }
.mb-feature__media .media, .mb-feature__media img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mb-feature__media .media-placeholder { height: 100%; aspect-ratio: auto; }
.mb-feature__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(22,32,27,.84) 0%, rgba(22,32,27,.66) 38%,
    rgba(22,32,27,.14) 72%, rgba(22,32,27,0) 100%);
}
.mb-feature__inner {
  position: relative;
  width: 100%;
  max-width: var(--width-page);
  margin: 0 auto;
  padding: var(--space-xl) var(--gutter);
  color: var(--text-on-dark);
}
.mb-feature__kicker {
  display: block;
  margin-bottom: var(--space-3xs);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: rgba(245,247,245,.82);
}
.mb-feature h2 {
  margin: 0 0 var(--space-2xs);
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.1;
  color: var(--text-on-dark);
}
.mb-feature h2 a { color: inherit; text-decoration: none; }
.mb-feature h2 a:hover { text-decoration: underline; }
.mb-feature__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-sm);
  color: rgba(245,247,245,.88);
}
.mb-feature__blurb { max-width: 46ch; margin-bottom: var(--space-md); color: rgba(245,247,245,.9); }

/* ── Pill buttons and filter chips ───────────────────────────────────────── */
.mb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-target);
  padding: var(--space-2xs) var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: .74rem;
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.mb-pill--solid { background: var(--accent-sage); border-color: var(--accent-sage); color: #fff; }
.mb-pill--solid:hover { background: var(--accent-sage-strong); border-color: var(--accent-sage-strong); color: #fff; }
.mb-pill--dark { background: var(--accent-juniper); border-color: var(--accent-juniper); color: #fff; }
.mb-pill--dark:hover { background: var(--accent-juniper-hover); border-color: var(--accent-juniper-hover); color: #fff; }
.mb-pill--ghost { background: transparent; border-color: rgba(245,247,245,.7); color: var(--text-on-dark); }
.mb-pill--ghost:hover { background: rgba(245,247,245,.14); color: #fff; }

.mb-chips { display: flex; flex-wrap: wrap; gap: var(--space-3xs); margin: 0 0 var(--space-md); }
.mb-chips--center { justify-content: center; }
.mb-chips__label {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.mb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: var(--space-3xs) var(--space-sm);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-warm);
  color: var(--accent-sage-strong);
  font-size: .7rem;
  font-weight: var(--weight-semi);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.mb-chip:hover { background: var(--bg-accent-soft); color: var(--accent-juniper); }
/* The selected chip inverts rather than merely tinting: on a row of pale pills,
   a slightly paler pill is not a state anyone can see. */
.mb-chip[aria-current="page"] {
  background: var(--accent-juniper);
  border-color: var(--accent-juniper);
  color: #fff;
}

/* ── Recipe thumbnail: photograph, caption beneath ───────────────────────── */
.mb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
  gap: var(--space-lg) var(--space-md);
}
.mb-thumb { position: relative; }
.mb-thumb > a { display: block; text-decoration: none; }
.mb-thumb__shot {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-placeholder);
}
.mb-thumb__shot .media, .mb-thumb__shot img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mb-thumb__shot .media-placeholder { height: 100%; aspect-ratio: auto; }
.mb-thumb__shot img { transition: transform .5s ease; }
.mb-thumb:hover .mb-thumb__shot img { transform: scale(1.04); }
.mb-thumb__cap {
  display: block;
  margin-top: var(--space-2xs);
  font-size: .78rem;
  font-weight: var(--weight-medium);
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--accent-sage-strong);
}
.mb-thumb > a:hover .mb-thumb__cap { color: var(--accent-juniper); text-decoration: underline; }
/* Time and diet ride on the photograph rather than adding a row beneath it, so
   CARD-002's badges survive without the caption growing a second line. */
.mb-thumb__onshot {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: var(--space-3xs);
  padding: var(--space-md) var(--space-2xs) var(--space-3xs);
  background: linear-gradient(180deg, rgba(22,32,27,0) 0%, rgba(22,32,27,.62) 100%);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.mb-thumb__onshot .sep { opacity: .6; }
.mb-thumb__save {
  position: absolute;
  top: var(--space-3xs);
  right: var(--space-3xs);
  display: grid;
  place-items: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.92);
  color: var(--text-primary);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.mb-thumb:hover .mb-thumb__save,
.mb-thumb__save:focus-visible { opacity: 1; }
.mb-thumb__save[aria-pressed="true"] { opacity: 1; background: var(--accent-juniper); color: #fff; }
.mb-thumb__save[aria-pressed="true"] svg { fill: currentColor; }
/* Touch has no hover, so a control that only appears on hover is one that does
   not exist there. */
@media (hover: none) { .mb-thumb__save { opacity: 1; } }

/* ── Editorial two-column block ──────────────────────────────────────────── */
.mb-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.mb-split__shot { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-placeholder); }
.mb-split__shot .media, .mb-split__shot img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mb-split__shot .media-placeholder { height: 100%; aspect-ratio: auto; }
.mb-split h2 {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--accent-juniper);
}
.mb-split em { font-style: italic; }
.mb-split p { color: var(--text-secondary); }
.mb-split__sign {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--accent-sage-strong);
}

/* ── "More filters" disclosure ────────────────────────────────────────────
   Collapsed by default so the index stays as calm as the reference, but opened
   automatically when a filter is already active - otherwise the page would
   appear to ignore the address it was given. */
.mb-more { margin: 0 0 var(--space-2xs); }
.mb-more > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  min-height: var(--tap-target);
  list-style: none;
  cursor: pointer;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-sage-strong);
}
.mb-more > summary::-webkit-details-marker { display: none; }
.mb-more > summary::after { content: "+"; font-size: 1rem; }
.mb-more[open] > summary::after { content: "\2212"; }
.mb-more > summary:hover { color: var(--accent-juniper); }
.mb-more .filters { border: 0; padding: var(--space-2xs) 0 0; background: transparent; }

/* ── Centred footer ──────────────────────────────────────────────────────
   The reference's footer is a pale sage. Ours stays Botanical Pine Charcoal,
   because BR-002 names that colour for "footer and dark areas". Structure
   borrowed, colour ours. */
.site-footer__inner--centred { display: block; text-align: center; }
.site-footer__inner--centred .wordmark--footer { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.site-footer__rule { border: 0; border-top: 1px solid rgba(245,247,245,.22); margin: 0 0 var(--space-md); }
.site-footer__inner--centred .follow-icons { margin: 0 0 var(--space-md); }
.site-footer__inner--centred .follow-icons__list { justify-content: center; }
.site-footer__inner--centred .follow-icons__label { display: none; }
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-xl);
  margin-bottom: var(--space-md);
}
.site-footer__row a {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: rgba(245,247,245,.86);
  text-decoration: none;
}
.site-footer__row a:hover { color: #fff; text-decoration: underline; }

/* ── Section rhythm ─────────────────────────────────────────────────────── */
.mb-section { padding: clamp(40px, 6vw, 72px) 0; margin-bottom: 0; }
.mb-section--tight { padding-top: 0; }
.mb-section--tint {
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  background: var(--bg-surface-warm);
}

/* ── Responsive (NFR-010) ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* The wordmark stays centred, with the menu button and the icons flanking. */
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .header-nav-right { display: none; }
  .mb-split { grid-template-columns: 1fr; }
  .mb-split__shot { aspect-ratio: 16 / 10; }
  .mb-feature { min-height: 360px; align-items: flex-end; }
  /* A left-weighted gradient stops working once the copy sits over the middle
     of the photograph, so it becomes a bottom-up scrim. */
  .mb-feature__scrim { background: linear-gradient(180deg, rgba(22,32,27,.28) 0%, rgba(22,32,27,.84) 72%); }
  .mb-feature h2 { max-width: none; }
  .mb-hero { min-height: min(62vh, 460px); }
}
@media (max-width: 600px) {
  .mb-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: var(--space-md) var(--space-2xs); }
  .mb-quote { padding: var(--space-2xs) 28px; }
  .mb-quote__mark { font-size: 3.2rem; }
  .site-footer__row { gap: var(--space-2xs) var(--space-md); }
}

/* ── Film thumbnails (CNT-023) ────────────────────────────────────────────
   The recipe thumbnail with a play affordance. The badge on the still shows the
   run time instead of a cooking time. */
.mb-thumb__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(22, 32, 27, .26);
  transition: background-color var(--transition-fast);
}
.mb-thumb--video:hover .mb-thumb__play { background: rgba(22, 32, 27, .42); }

/* Watch & Cook: the featured film beside its chapter list. */
.watch-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.watch-featured__body h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  color: var(--accent-juniper);
  margin: 0 0 var(--space-2xs);
}
.watch-featured__body h2 a { color: inherit; text-decoration: none; }
.watch-featured__body h2 a:hover { text-decoration: underline; }
.watch-featured__body p { color: var(--text-secondary); }
.watch-featured__body .chapters { margin-top: var(--space-md); }

@media (max-width: 900px) {
  .watch-featured { grid-template-columns: 1fr; }
}
