/**
 * The Food Gene — recipe.css
 * Version: 3.4 (Site V2) · Teal Kitchen
 * Owner: Recipe agent.
 *
 * The content-page furniture for recipes, guides and single videos: the centred
 * head, the details bar and action buttons, the two-column content layout with
 * its side column (Flavour DNA, Nutrition, "Watch it made", Good to know,
 * chapters), the ingredients and method card with the reader tools, the
 * editorial blocks, the FAQ and Cook Mode. Loaded only on those pages (NFR-001).
 *
 * Colours, radii, sizes and fonts come only from tokens.css (NFR-008); shared
 * components (.btn, .mb-pill, .mb-chip, .share-bar, .side-heading, cards) are
 * main.css's and are used here, not restyled.
 *
 *   1. Head: title, summary, byline (CNT-002, SEO-010)
 *   2. Details bar and action buttons (CNT-002, CNT-004)
 *   3. Hero (MED-008, MED-009)
 *   4. Content layout and side column (CNT-003)
 *   5. Ingredients and method (CNT-002, CNT-016, CNT-017, CNT-019)
 *   6. Method steps and timers (CNT-005, CNT-018)
 *   7. Editorial blocks and FAQ (CMS-005, CMS-006, SEO-011)
 *   8. Flavour DNA and Nutrition (CNT-020, CNT-028)
 *   9. Watch it made, share, related (CNT-022, CNT-024)
 *  10. Video page (CNT-008, CNT-010, MED-008)
 *  11. Cook Mode (CNT-018)
 *  12. Responsive (CNT-003, NFR-010)
 */

/* ═══ 1. Head (CNT-002, SEO-010) ═════════════════════════════════════════ */

/* CNT-002: a centred title, summary and author line. Guides and videos use the
   same head so the three content pages read as one family. */
.recipe__head, .content-head {
  max-width: var(--width-reading);
  margin: 0 auto var(--space-md);
  text-align: center;
}
/* BR-003.2: the h1 token, balanced, so a long title breaks into even lines. */
.recipe__title, .content-head h1 { font-size: var(--size-h1); margin-bottom: var(--space-xs); }
.recipe__summary, .content-head__intro {
  max-width: 60ch;
  margin: 0 auto var(--space-xs);
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3xs) var(--space-xs);
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
/* A middle dot between the parts, drawn rather than typed so a screen reader
   does not read "dot" between the author and the date. */
.byline > * + *::before {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  margin-right: var(--space-xs);
  vertical-align: middle;
  border-radius: var(--radius-pill);
  background: var(--border-medium);
}
.byline__author { color: var(--text-primary); font-weight: var(--weight-semi); }
/* CARD-003, CARD-004: the page shows every badge, centred under the byline
   like the rest of the head. */
.recipe__head .badge-row, .content-head .badge-row {
  justify-content: center;
  margin: var(--space-xs) 0 0;
}

/* ═══ 2. Details bar and action buttons (CNT-002, CNT-004) ══════════════ */

.details-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-lg);
  max-width: var(--width-reading);
  margin: 0 auto var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}
.details-bar div { min-width: 4.5rem; }
.details-bar dt {
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-badge);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-sage-strong);
}
.details-bar dd {
  margin: 0;
  font-weight: var(--weight-semi);
  font-size: var(--text-base);
  color: var(--text-primary);
}

.recipe__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xs);
  margin: 0 auto var(--space-lg);
}
.btn__icon { flex: none; }

/* ═══ 3. Hero (MED-008, MED-009) ═════════════════════════════════════════ */

/* The picture keeps the max-width of the size the editor chose (media--small,
   --medium, --large) and is centred; on a narrower screen it fills the width
   (MED-008.2). The 3:2 box is the shape every display size is cut to (MED-001). */
.recipe__hero, .content-hero { margin: 0 0 var(--space-lg); }
.recipe__hero .media, .content-hero .media {
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.recipe__hero img, .content-hero img { width: 100%; aspect-ratio: 3 / 2; }
.recipe__hero .video-player, .content-hero .video-player { margin-inline: auto; }

/* ═══ 4. Content layout and side column (CNT-003) ═══════════════════════ */

/* One column on phones and tablets; from 900px the side column sits beside the
   main content (CNT-003.1). Set in §12. */
.content-layout { display: grid; gap: var(--space-xl); align-items: start; }
.content-layout__main { min-width: 0; }
.content-layout__main > :first-child { margin-top: 0; }
.content-layout__side {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}
.content-layout__side > section { margin: 0; }

/* A side panel: Flavour DNA, Nutrition and the guide's chapter list read as
   small cards in the column. */
.flavor-dna, .nutrition, .chapters {
  padding: var(--space-sm) var(--space-sm) var(--space-xs);
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
}

.side-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  min-height: var(--tap-target);
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
}
/* Decorative arrows: the `/ ""` alternative keeps them out of the accessible name. */
.side-link::after { content: "\2192"; content: "\2192" / ""; }
.side-link:hover { text-decoration: underline; }

.recipe__tags .mb-chips { margin: 0; }

/* ═══ 5. Ingredients and method (CNT-002, CNT-016, CNT-017, CNT-019) ════ */

.recipe-card {
  display: grid;
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-lg);
  align-items: start;
  /* The Jump to Recipe target sits clear of the sticky phone header. */
  scroll-margin-top: var(--space-md);
}
.recipe-card > section { margin: 0; min-width: 0; }

/* Sized so "INGREDIENTS" fits its column at every width from 640px, including
   the narrowest case at 900px, where the side column first appears. */
.recipe-card__heading {
  margin-bottom: var(--space-xs);
  font-size: clamp(1.375rem, 0.9rem + 1.1vw, 1.75rem);
}

.ingredients__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-sm);
  margin-bottom: var(--space-2xs);
}
.ingredients__head .recipe-card__heading { margin: 0; }

/* Ingredient group titles ("For the sauce") and step titles: Barlow Condensed
   caps, the card-title voice (BR-003), not a third Rubik size. */
.ingredients__group, .step__title {
  font-family: var(--font-title);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-title);
  line-height: var(--leading-tight);
}
.ingredients__group {
  margin: var(--space-sm) 0 var(--space-3xs);
  font-size: var(--size-kicker);
}

/* CNT-016: the servings adjuster. The −/+ buttons are inserted by recipe.js. */
.servings {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 2px;
  font-size: var(--text-base);
}
.servings__label {
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-badge);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-sage-strong);
}
.servings__value {
  min-width: 1.6em;
  font-weight: var(--weight-semi);
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--text-primary);
}
.servings__unit { color: var(--text-primary); }
.servings__btn {
  display: grid;
  place-items: center;
  width: var(--tap-target);
  height: var(--tap-target);
  padding: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--accent-juniper);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.servings__btn:hover:not(:disabled) { border-color: var(--accent-juniper); background: var(--bg-accent-soft); }
/* CNT-016.2: − is disabled at 1 and + at 99. Dimmed and inert, not hidden, so
   the control does not jump about at the ends. */
.servings__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* CNT-017: tick boxes. Native checkboxes in the teal accent: announced and
   operated correctly everywhere with no script, and the whole row is the
   44px target (NFR-004). */
.tick {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  margin: 0.15em 0 0;
  accent-color: var(--accent-juniper);
  cursor: pointer;
}

.ingredients__list { margin-bottom: var(--space-xs); }
.ingredient { border-bottom: 1px solid var(--border-sand); }
.ingredient:last-child { border-bottom: 0; }
.ingredient__label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  min-height: var(--tap-target);
  padding: var(--space-2xs) 0;
  font-weight: var(--weight-normal);
  color: var(--text-primary);
  cursor: pointer;
}
.ingredient__amount, .ingredient__unit { font-weight: var(--weight-semi); }
.ingredient__notes { color: var(--text-secondary); font-size: var(--text-sm); }

/* A ticked row dims rather than disappearing — CNT-019 still needs to know which
   rows are unticked, and a vanishing line loses the reader's place. */
.tick:checked + .ingredient__text {
  color: var(--text-muted);
  text-decoration: line-through;
}
.tick:checked + .ingredient__text .ingredient__amount,
.tick:checked + .ingredient__text .ingredient__unit { font-weight: var(--weight-normal); }

/* An amount that just changed gets a brief highlight, so a reader pressing +
   can see which numbers moved. */
.ingredient__amount { transition: background-color 600ms ease; }
.ingredient__amount.is-updated { background: var(--bg-accent-soft); }

/* CNT-019: the copy button and its short "Copied" confirmation. */
.copy-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-sm);
  margin-top: var(--space-sm);
}
.copy-list[hidden] { display: none; }
.copy-list__status {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--accent-juniper);
}

/* ═══ 6. Method steps and timers (CNT-005, CNT-018) ═════════════════════ */

.method__list { counter-reset: step; }
/* A narrow left rail holds the step number with its "done" box beneath, so the
   text column keeps its width on a phone. */
.step {
  display: grid;
  grid-template-columns: var(--tap-target) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--space-2xs);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-sand);
  counter-increment: step;
}
.step:first-child { padding-top: var(--space-2xs); }
.step:last-child { border-bottom: 0; }

/* The step number is drawn from the counter, so renumbering is automatic. */
.step::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill);
  background: var(--accent-juniper);
  color: var(--text-inverse);
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
}
.step__done {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  /* NFR-004: a 44px target around the small box. */
  width: var(--tap-target);
  height: var(--tap-target);
  cursor: pointer;
}
.step__done .tick { margin: 0; }
.step__body { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }

.step__title {
  margin: 0.2rem 0 var(--space-2xs);
  font-size: 1.3rem;
  color: var(--accent-juniper);
}
.step__needs {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.step__needs-label {
  margin-right: var(--space-3xs);
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-badge);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-sage-strong);
}
.step__text > * { margin: 0 0 var(--space-2xs); }
.step__text > :last-child { margin-bottom: 0; }
.step__tip {
  margin: var(--space-2xs) 0 0;
  padding-left: var(--space-xs);
  border-left: 3px solid var(--accent-juniper);   /* BR-012.2: teal, never mint, on white */
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.step__image { margin-top: var(--space-xs); border-radius: var(--radius-md); overflow: hidden; }
.step__timer-note { margin: var(--space-2xs) 0 0; font-size: var(--text-sm); color: var(--text-secondary); }

/* A step marked done fades back, number included. */
.step:has(.tick:checked) .step__body,
.step:has(.tick:checked)::before { opacity: 0.5; }

/* The countdown control (CNT-018), inserted by recipe.js. */
.step-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: var(--space-xs);
  padding: 4px 4px 4px var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-pill);
}
.step-timer__display {
  min-width: 3.25em;
  font-weight: var(--weight-semi);
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.step-timer__btn {
  min-width: var(--tap-target);
  min-height: var(--tap-target);
  padding: 0 var(--space-xs);
  background: var(--bg-surface-subtle);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-badge);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-juniper);
  cursor: pointer;
}
.step-timer__btn:hover { background: var(--bg-accent-soft); }
.step-timer.is-running { border-color: var(--accent-juniper); }
.step-timer.is-done { background: var(--bg-accent-soft); border-color: var(--accent-juniper); }
.step-timer.is-done .step-timer__display { color: var(--accent-juniper); }

/* ═══ 7. Editorial blocks and FAQ (CMS-005, CMS-006, SEO-011) ════════════ */

/* CMS-006: the look comes from the class, never from editor-typed styles. */
.editorial-block {
  margin: var(--space-sm) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
}
.editorial-block__title {
  margin-bottom: var(--space-2xs);
  font-size: var(--text-xl);
}
.editorial-block__body { color: var(--text-primary); }
.editorial-block__body > * { margin: 0 0 var(--space-2xs); }
.editorial-block__body > :last-child { margin-bottom: 0; }

/* The Quick Answer is the concise answer a reader or an answer engine reads
   first (SEO-010), and Good to know is CNT-024's highlighted box: both on the
   tint. The tips that follow the method sit on the quieter panel. */
.editorial-block--quick-answer,
.editorial-block--good-to-know { background: var(--bg-accent-soft); }
.editorial-block--quick-answer { margin-top: 0; }

.recipe__intro { margin: var(--space-md) 0; }
.recipe__tips { margin: var(--space-lg) 0; }

.faq { margin: var(--space-xl) 0 0; }
.faq__heading { font-size: var(--size-h3); margin-bottom: var(--space-sm); }
.faq__item { padding: var(--space-sm) 0; border-top: 1px solid var(--border-subtle); }
.faq__item:last-child { border-bottom: 1px solid var(--border-subtle); }
.faq__item dt { font-weight: var(--weight-semi); color: var(--text-primary); }
.faq__item dd { margin: var(--space-3xs) 0 0; color: var(--text-primary); }
.faq__item dd > * { margin: 0 0 var(--space-2xs); }
.faq__item dd > :last-child { margin-bottom: 0; }

/* ═══ 8. Flavour DNA and Nutrition (CNT-020, CNT-028) ═══════════════════ */

.flavor-dna__list { display: grid; gap: 2px; }
.flavor-dna__row {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 1.75rem;
  font-size: var(--text-sm);
}
.flavor-dna__name { color: var(--text-primary); }
.flavor-dna__dots { display: flex; gap: 5px; }
.flavor-dna__dot {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-medium);
  background: var(--bg-surface);
}
.flavor-dna__dot.is-filled { background: var(--accent-juniper); border-color: var(--accent-juniper); }

/* CNT-028: UK label order, the "of which" rows indented under their parent. */
.nutrition__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.nutrition__caption {
  caption-side: top;
  padding-bottom: var(--space-2xs);
  text-align: left;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.nutrition__table th,
.nutrition__table td {
  padding: 0.4rem 0;
  border-top: 1px solid var(--border-sand);
  vertical-align: baseline;
}
.nutrition__table th { text-align: left; font-weight: var(--weight-normal); }
.nutrition__table td {
  padding-left: var(--space-2xs);
  text-align: right;
  font-weight: var(--weight-semi);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nutrition__sub th { padding-left: var(--space-sm); color: var(--text-secondary); }
.nutrition__energy th { font-weight: var(--weight-semi); }
.nutrition__kj {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
  color: var(--text-secondary);
}

/* ═══ 9. Watch it made, share, related (CNT-022, CNT-024) ═══════════════ */

.watch-it .video-player { margin-bottom: var(--space-3xs); }

/* The Share button's target. tabindex="-1" lets recipe.js move focus here; the
   bar's own links carry the visible focus ring. */
.content-share { border-radius: var(--radius-md); scroll-margin-top: var(--space-xl); }
.content-share:focus { outline: none; }
.content-share.is-flash { animation: share-flash 1.6s ease-out; }
@keyframes share-flash {
  from { background-color: var(--bg-accent-soft); }
  to   { background-color: var(--bg-surface); }
}

/* Recipes in the content flow: "Put it into practice" and the related list. */
.content-section { margin: var(--space-xl) 0 0; }
.content-section .section-head h2 { font-size: var(--size-h3); }
.related { margin: var(--space-xl) 0 0; }

/* ═══ 10. Video page (CNT-008, CNT-010, MED-008) ════════════════════════ */

.video-page .video-player { margin-inline: auto; }
.video-page__player { margin: 0 0 var(--space-lg); }

/* CNT-010 / MED-008.3: a 9:16 film displays tall, never letterboxed, and never
   taller than 85% of the screen. Capping the WIDTH at 85vh × 9/16 is what keeps
   the shape: capping only the height would leave a wider box than the film. */
.video-player--vertical {
  max-width: min(var(--video-width, var(--media-small)), 100%, calc(85vh * 9 / 16));
}
/* A film with no provider stored keeps its own shape too (CNT-025): the still
   is cut to the player's ratio, so a 9:16 short still reads as tall. */
.video-player__missing .media {
  aspect-ratio: var(--video-ratio, 16 / 9);
  max-width: none;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.video-player__missing img { height: 100%; }

.video-recipe {
  display: grid;
  gap: var(--space-2xs);
  justify-items: start;
  margin: 0 0 var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}
.video-recipe .kicker { margin: 0; }
.video-recipe__title { margin: 0 0 var(--space-2xs); font-size: var(--text-xl); }
.video-recipe__title a { color: inherit; text-decoration: none; }
.video-recipe__title a:hover { text-decoration: underline; }

.chapters__list { display: grid; }
.chapters__list li + li { border-top: 1px solid var(--border-sand); }
.chapters__list a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-target);
  padding: var(--space-3xs) 0;
  font-size: var(--text-sm);
  text-decoration: none;
}
.chapters__time {
  min-width: 3.25rem;
  padding: 2px var(--space-2xs);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semi);
  text-align: center;
  color: var(--accent-juniper);
}
.chapters__label { color: var(--text-primary); }
.chapters__list a:hover .chapters__label { color: var(--accent-juniper-hover); text-decoration: underline; }

/* SEO-012: the transcript is a disclosure, so a long text does not push the
   rest of the page down for a reader who wants the recipe. */
.transcript { margin: var(--space-md) 0; }
.transcript summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: var(--tap-target);
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--bg-surface-subtle);
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-juniper);
  cursor: pointer;
  list-style: none;
}
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::after { content: "+"; content: "+" / ""; font-size: var(--text-lg); line-height: 1; }
.transcript[open] summary::after { content: "\2212"; content: "\2212" / ""; }
.transcript summary:hover { background: var(--bg-accent-soft); }
.transcript .prose { margin-top: var(--space-sm); }

/* ═══ 11. Cook Mode (CNT-018) ═══════════════════════════════════════════ */

/* Full screen, large text, one step at a time. A fixed overlay rather than the
   Fullscreen API: the API needs a user gesture, behaves differently on iOS, and
   an overlay is easier to keep keyboard-navigable. */
.cook-mode {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-md);
  padding: var(--space-md) var(--gutter) max(var(--space-md), env(safe-area-inset-bottom));
  background: var(--bg-surface);
  color: var(--text-primary);
}
.cook-mode[hidden] { display: none; }
body.is-cook-mode { overflow: hidden; }

.cook-mode__bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: var(--width-reading);
  margin: 0 auto;
}
.cook-mode__count {
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-juniper);
  white-space: nowrap;
}
.cook-mode__progress {
  flex: 1;
  height: 6px;
  background: var(--bg-surface-warm);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.cook-mode__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent-juniper);
  border-radius: var(--radius-pill);
  transition: width var(--transition-smooth);
}
.cook-mode__close {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--tap-target);
  height: var(--tap-target);
  padding: 0;
  background: var(--bg-surface-subtle);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--accent-juniper);
  cursor: pointer;
}
.cook-mode__close:hover { background: var(--bg-accent-soft); }

.cook-mode__body {
  display: grid;
  align-content: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: var(--width-reading);
  margin: 0 auto;
  overflow-y: auto;
  /* Large text is the point of Cook Mode: readable from across a worktop. */
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  line-height: var(--leading-snug);
}
.cook-mode__step-title { margin: 0; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.cook-mode__needs {
  margin: 0;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-accent-soft);
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
}
.cook-mode__needs-label {
  display: block;
  font-family: var(--font-label);
  font-weight: var(--weight-medium);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-sage-strong);
}
.cook-mode__text > * { margin: 0 0 var(--space-xs); }
.cook-mode__text > :last-child { margin-bottom: 0; }

.cook-mode__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  width: 100%;
  max-width: var(--width-reading);
  margin: 0 auto;
}
.cook-mode__nav .btn { flex: 1 1 0; max-width: 14rem; min-height: 3.5rem; font-size: var(--text-base); }
.cook-mode .step-timer { font-size: var(--text-lg); }
.cook-mode .step-timer__display { min-width: 4em; }

/* ═══ 12. Responsive (CNT-003, NFR-010) ═════════════════════════════════ */

@media (min-width: 640px) {
  /* Ingredients and method side by side whenever the card has the room. */
  .recipe-card { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-lg); }
  .related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 600px) and (max-width: 899.98px) {
  /* Below the content, the side panels sit two abreast rather than in one
     tall column of short boxes. */
  .content-layout__side { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
}

@media (min-width: 900px) {
  /* CNT-003.1: the side column beside the main content from 900px. */
  .content-layout { grid-template-columns: minmax(0, 1fr) 15.5rem; gap: var(--space-lg); }
  .content-layout--single { grid-template-columns: minmax(0, 1fr); }
  .content-layout--single .content-layout__main { max-width: var(--media-medium); margin-inline: auto; width: 100%; }
}

@media (max-width: 639.98px) {
  .recipe-card { padding: var(--space-sm); border-radius: var(--radius-md); }
  /* Jump to Recipe across the top, the four quieter actions in a 2 × 2 grid:
     every one stays a full-width 44px target on a phone (NFR-004). */
  .recipe__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe__actions .btn { width: 100%; padding-inline: var(--space-xs); }
  .recipe__actions .btn-primary { grid-column: 1 / -1; }
  /* Four facts fit on one line at 375px; a fifth (Rest or rise) wraps centred. */
  .details-bar { gap: var(--space-xs) var(--space-xs); padding: var(--space-xs) var(--space-sm); }
  .details-bar div { min-width: 4rem; }
  .recipe__hero .media, .content-hero .media { border-radius: var(--radius-md); }
  .editorial-block { padding: var(--space-sm); }
  .cook-mode__nav .btn { max-width: none; }
}
