/* VeggieRecipes.uk

   Design: each recipe takes a colour from its main ingredient (the produce
   palette below), used as solid blocks. Everything around those blocks stays
   quiet: a pale pea-grey page in light mode, ink in dark mode, one typeface.

   Dark mode applies when the visitor picked it with the header toggle
   (data-theme="dark" on <html>) or, with no saved choice, when the device is
   set to dark. Each dark rule is therefore written twice. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/bricolage-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/bricolage-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f2f4ef; --ink: #2a1f2d; --muted: #6a5f6c; --line: #dde1d8; --soft: #e8ebe4; --paper: #fff;
  --band: #e4e8de; --band-on: var(--ink); --band-line: #d2d7ca;
  /* Produce palette: each recipe takes one, set as --c / --on on its element */
  --tomato: #b8321f; --squash: #e0952a; --pea: #3f6e26; --beet: #7d1d3f; --aubergine: #43305a; --bean: #e6c229;
}
:root[data-theme="dark"] {
  --bg: #1c171e; --ink: #f1ecef; --muted: #b3a8b4; --line: #332b36; --soft: #261f29; --paper: #261f29;
  --band: #2a1f2d; --band-on: #fff; --band-line: #3d3242;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c171e; --ink: #f1ecef; --muted: #b3a8b4; --line: #332b36; --soft: #261f29; --paper: #261f29;
    --band: #2a1f2d; --band-on: #fff; --band-line: #3d3242;
  }
}
.c-tomato { --c: var(--tomato); --on: #fff; }
.c-squash { --c: var(--squash); --on: #2a1f2d; }
.c-pea { --c: var(--pea); --on: #fff; }
.c-beet { --c: var(--beet); --on: #fff; }
.c-aubergine { --c: var(--aubergine); --on: #fff; }
.c-bean { --c: var(--bean); --on: #2a1f2d; }

* { box-sizing: border-box; }
/* display rules on classes would otherwise beat the hidden attribute */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-optical-sizing: auto; font-size: 1.0625rem; line-height: 1.5; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header: wordmark, search (works from any page), theme toggle, sections */
.top { background: var(--band); color: var(--band-on); border-bottom: 1px solid var(--band-line); padding: 14px 0 0; margin-bottom: 24px; }
.top .bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 28px; }
.mark { font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; }
.find { max-width: 520px; width: 100%; justify-self: center; }
.find input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 11px 16px; border-radius: 4px; color: var(--band-on);
  background: color-mix(in srgb, var(--band-on) 10%, transparent); border: 2px solid transparent;
}
.find input::placeholder { color: var(--band-on); opacity: 0.7; }
.find input:focus { outline: none; border-color: var(--band-on); }
.theme {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 4px; cursor: pointer;
  background: none; color: var(--band-on); border: 2px solid color-mix(in srgb, var(--band-on) 35%, transparent);
}
.theme:hover { border-color: var(--band-on); }
.sections { display: flex; gap: 4px 24px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.sections::-webkit-scrollbar { display: none; }
.sections a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; white-space: nowrap; text-decoration: none; font-weight: 600; opacity: 0.85; border-bottom: 3px solid transparent; }
.sections a:hover { opacity: 1; }
.sections a[aria-current="page"] { opacity: 1; font-weight: 800; border-bottom-color: currentColor; }
.top :focus-visible { outline-color: var(--band-on); outline-offset: -2px; }
.foot { background: var(--band); color: var(--band-on); border-top: 1px solid var(--band-line); margin-top: 24px; padding: 20px 0 calc(48px + env(safe-area-inset-bottom)); }
.to-top { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; margin-bottom: 24px; border-radius: 4px; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid color-mix(in srgb, var(--band-on) 35%, transparent); }
.to-top:hover { border-color: var(--band-on); }
.foot-cols { display: grid; gap: 24px 48px; }
@media (min-width: 800px) { .foot-cols { grid-template-columns: minmax(0, 560px) auto; justify-content: space-between; } }
.foot-about p { margin: 10px 0 0; max-width: 60ch; opacity: 0.85; }
.foot-about h2 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.foot-about .small { font-size: 0.9rem; }
.foot-links { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 32px; align-content: start; }
@media (min-width: 800px) { .foot-links { grid-template-columns: max-content; } }
.foot-links a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; text-decoration: none; opacity: 0.85; }
.foot-links a:hover { opacity: 1; text-decoration: underline; }
.foot :focus-visible { outline-color: var(--band-on); }
.foot-install { margin-top: 20px; }
.foot-install h3 { margin: 0; font-size: 1.05rem; }
.foot-install p { margin: 6px 0 12px; }
.install-tip { margin: 0 0 20px; padding: 16px 18px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); }
.install-tip h2 { margin: 0 0 4px; font-size: 1.15rem; }
.install-tip p { margin: 0 0 10px; max-width: 60ch; }
.install-tip .linkish { display: block; }
@media (max-width: 699px) {
  .top .bar { grid-template-columns: 1fr auto; }
  .find { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .mark { font-size: 1.5rem; }
}

/* ── Page headings for the section pages */
.page-head { margin: 8px 0 28px; max-width: 70ch; }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin: 0 0 12px; }
.page-head p { margin: 0; color: var(--muted); }

/* ── Buttons shared across pages */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 4px; border: 2px solid currentColor; background: none; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 4px; border: 2px solid var(--line); background: var(--paper); cursor: pointer; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.empty { color: var(--muted); margin: 32px 0; }

/* ── Home */
/* Featured recipes: every slide sits in the same grid cell and they crossfade. */
.feature { position: relative; display: grid; border-radius: 4px; overflow: hidden; }
.feature .slide { grid-area: 1 / 1; display: grid; text-decoration: none; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s 0.9s; }
.feature .slide.is-on { opacity: 1; visibility: visible; transition: opacity 0.9s ease; }
@media (min-width: 800px) { .feature .slide { grid-template-columns: 1.4fr 1fr; min-height: 420px; } }
@media (prefers-reduced-motion: reduce) { .feature .slide, .feature .slide.is-on { transition: none; } }
.feature:has(.slide:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
/* Controls sit in the bottom of the colour panel, in that slide's text colour. */
.feature-ctl { position: absolute; right: 12px; bottom: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; color: var(--on); }
.feat-pause { min-height: 32px; margin-right: 6px; padding: 0 12px; border: 2px solid currentColor; border-radius: 4px; background: none; color: inherit; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.dot { width: 24px; height: 32px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; opacity: 0.7; }
.dot[aria-current]::before { background: currentColor; opacity: 1; }
.feat-pause:focus-visible, .dot:focus-visible { outline: 3px solid currentColor; outline-offset: 1px; }
/* Photos fill their box absolutely so a tall source image can't stretch it. */
.ph { position: relative; overflow: hidden; background: var(--c); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.feature .ph { min-height: 260px; }
.card a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.feature .panel { background: var(--c); color: var(--on); padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) calc(clamp(24px, 4vw, 48px) + 36px); display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; }
.feature h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; margin: 0; }
.feature p { margin: 0; font-size: 1.1rem; opacity: 0.9; }
.row { margin: 48px 0 8px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.row h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.03em; font-weight: 800; margin: 0; }
.more { background: none; border: 0; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; padding: 8px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
/* Magazine rhythm on the home rows: the first recipe is double size. */
@media (min-width: 900px) {
  .row .grid { grid-template-columns: repeat(4, 1fr); }
  .row .card:first-child { grid-column: span 2; grid-row: span 2; }
  .row .card:first-child .ph { aspect-ratio: auto; flex: 1; min-height: 280px; }
  .row .card:first-child h3 { font-size: 2rem; letter-spacing: -0.035em; font-weight: 800; padding: 18px 22px 22px; }
}
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: 4px; overflow: hidden; background: var(--c); color: var(--on); }
.card .ph { aspect-ratio: 4 / 3; }
.card h3 { margin: 0; padding: 14px 16px 16px; font-size: 1.2rem; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
/* No photo: the colour block is the card, with the name set large */
.card.no-photo h3 { flex: 1; display: flex; align-items: flex-end; font-size: 1.7rem; letter-spacing: -0.03em; font-weight: 800; padding: 20px; min-height: 240px; }
.card a:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
/* Below the magazine layout, rows show four (an even number for two
   columns); the fifth is only for the large-first-card layout. */
@media (max-width: 899px) { .row:not(.is-expanded):not(.is-searching) .card:nth-child(5) { display: none; } }
/* Two per row on phones */
@media (max-width: 599px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card h3 { font-size: 1rem; padding: 10px 12px 12px; }
  .card.no-photo h3 { min-height: 0; font-size: 1.25rem; padding: 12px; }
}

/* ── All recipes */
.filters { display: grid; gap: 10px; margin-bottom: 28px; }
.filters .btn-row { gap: 8px; }

/* ── Recipe page */
.rhero { display: grid; border-radius: 4px; overflow: hidden; margin-top: 8px; }
@media (min-width: 900px) { .rhero { grid-template-columns: 1fr 1.25fr; min-height: 440px; } .rhero.no-photo { grid-template-columns: 1fr; min-height: 0; } }
.rhero .panel { background: var(--c); color: var(--on); padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.rhero .back { color: inherit; opacity: 0.85; font-weight: 600; }
.rhero h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); line-height: 0.96; letter-spacing: -0.04em; font-weight: 800; margin: 0; }
.rhero .ph { min-height: 240px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.stepper { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.stepper span { min-width: 6.5em; text-align: center; }
.stepper button { width: 48px; height: 48px; border-radius: 4px; border: 2px solid currentColor; background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.go { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 32px; border-radius: 4px; background: var(--on); color: var(--c); font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.rhero .btn { min-height: 60px; }
.rhero .btn[aria-pressed="true"] { background: color-mix(in srgb, var(--on) 18%, transparent); }
.cooklog { margin: 0; font-size: 0.95rem; opacity: 0.9; }
.body { display: grid; gap: 32px; margin: 40px 0 72px; }
@media (min-width: 900px) { .body { grid-template-columns: minmax(300px, 1fr) 1.8fr; gap: 56px; } .ing { position: sticky; top: 16px; align-self: start; } }
.ing { background: var(--paper); padding: 24px; border-radius: 4px; }
.body h2 { font-size: 1.6rem; letter-spacing: -0.03em; margin: 0 0 14px; font-weight: 800; }
.ing ul { list-style: none; margin: 0 0 12px; padding: 0; }
.ing h3 { font-size: 1rem; margin: 12px 0 2px; }
.ing-row { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; min-height: 44px; border: 0; background: none; text-align: left; cursor: pointer; align-items: center; }
.ing-row b { white-space: nowrap; text-align: right; }
.ing-row[aria-pressed="true"] { opacity: 0.45; text-decoration: line-through; }
/* Ingredient swaps on a recipe page. */
.swaps { margin: 0 0 20px; padding: 16px; border-radius: 4px; background: color-mix(in srgb, var(--c) 12%, var(--paper)); border-left: 6px solid var(--c); }
.swaps p { margin: 0 0 12px; max-width: 60ch; }
.swaps p:last-child { margin-bottom: 0; }
.swaps .btn { min-height: 44px; padding: 0 14px; font-size: 0.95rem; }
.swaps .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.swaps .btn-row + p { margin-top: 16px; }
.card-note { margin: -8px 16px 14px; font-size: 0.9rem; font-weight: 600; opacity: 0.85; }
.spices { font-size: 0.95rem; margin: 8px 0 12px; }
.linkish { background: none; border: 0; padding: 8px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 0.95rem; }
.method ol { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.method li { counter-increment: s; margin-bottom: 14px; max-width: 66ch; }
.step { width: 100%; display: grid; grid-template-columns: 3.2rem 1fr; gap: 8px; border: 0; background: none; text-align: left; padding: 6px 0; cursor: pointer; line-height: 1.5; }
.step::before { content: counter(s); font-size: 2rem; line-height: 1; font-weight: 800; color: var(--c); letter-spacing: -0.04em; }
.c-bean .step::before, .c-squash .step::before { color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
/* On the dark page the darker produce colours need lifting to stay readable (4.9:1 or better). */
:root[data-theme="dark"] .step::before { color: color-mix(in srgb, var(--c) 60%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step::before { color: color-mix(in srgb, var(--c) 60%, #fff); } }
.step[aria-pressed="true"] { opacity: 0.45; }
.notes { margin-top: 32px; max-width: 66ch; }
.notes p { margin: 0 0 10px; }
.nutri { color: var(--muted); font-size: 0.9rem; margin-top: 24px; }

/* ── Cooking Mode: the whole screen takes the recipe's colour */
body[data-view="cook"] { background: var(--c, var(--bg)); }
.cook { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: var(--c); color: var(--on); padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.cook-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; padding: 14px 24px; }
.cook-title { display: grid; gap: 2px; }
.cook-title strong { font-size: 1.3rem; letter-spacing: -0.02em; }
.wake { font-size: 0.85rem; opacity: 0.85; }
.close { min-height: 52px; padding: 0 22px; display: inline-flex; align-items: center; border: 2px solid currentColor; border-radius: 4px; text-decoration: none; font-weight: 700; }
/* Side-by-side from iPad portrait (768px) upwards; stacked on phones. */
@media (min-width: 760px) {
  .cook { height: 100vh; height: 100dvh; grid-template-rows: auto minmax(0, 1fr); padding-bottom: env(safe-area-inset-bottom); }
  .cook-ing, .cook-step { overflow-y: auto; }
}
.cook-main { display: grid; min-height: 0; }
@media (min-width: 760px) { .cook-main { grid-template-columns: minmax(280px, 31%) 1fr; } }
/* Phones: the step comes first and Previous/Next stay on screen; ingredients follow. */
@media (max-width: 759px) {
  .cook-step { order: -1; }
  .cook-nav { position: sticky; bottom: 0; background: var(--c); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
.cook-ing { background: color-mix(in srgb, var(--c) 78%, #000); color: #fff; padding: 22px; overflow-y: auto; }
.c-squash .cook-ing, .c-bean .cook-ing { background: color-mix(in srgb, var(--c) 55%, #fff); color: #2a1f2d; }
.cook-ing h2 { font-size: 1.15rem; margin: 0 0 10px; }
.cook-ing ul { list-style: none; margin: 0 0 16px; padding: 0; }
.tick { width: 100%; display: flex; justify-content: space-between; gap: 12px; text-align: left; align-items: center; padding: 10px 12px; min-height: 48px; border: 0; border-radius: 4px; background: none; color: inherit; font-size: 1.05rem; cursor: pointer; opacity: 0.75; }
.tick b { white-space: nowrap; }
.tick.is-used { background: var(--on); color: var(--c); opacity: 1; font-weight: 700; }
.c-squash .tick.is-used, .c-bean .tick.is-used { background: #2a1f2d; color: #fff; }
.tick[aria-pressed="true"] { text-decoration: line-through; opacity: 0.4; background: none; color: inherit; }
.cook-step { display: flex; flex-direction: column; padding: 24px clamp(20px, 4vw, 64px); }
.cook-count { font-weight: 800; font-size: clamp(3rem, 7vw, 6rem); line-height: 0.9; letter-spacing: -0.05em; margin: 0 0 18px; opacity: 0.65; }
.cook-count small { font-size: 0.3em; letter-spacing: 0; font-weight: 700; }
.cook-text { font-size: clamp(1.7rem, 2.9vw, 2.7rem); line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; margin: 0; max-width: 28ch; }
.cook-tip { margin-top: 22px; padding: 14px 16px; border: 2px solid currentColor; border-radius: 4px; max-width: 60ch; font-size: 1.05rem; }
.cook-tip p { margin: 0 0 6px; }
.cook-timer { margin-top: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.timer-btn { min-height: 64px; padding: 0 28px; border-radius: 4px; border: 0; background: var(--on); color: var(--c); font-weight: 800; font-size: 1.2rem; cursor: pointer; }
.timer-run { display: flex; align-items: baseline; gap: 14px; }
.timer-time { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.timer-note { font-size: 1rem; font-weight: 600; opacity: 0.8; }
.timer-run.is-check .timer-time, .timer-run.is-done .timer-time { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }
.cook-nav { margin-top: auto; padding-top: 28px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
.cook-nav a, .cook-nav button { min-height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-weight: 800; font-size: 1.25rem; text-decoration: none; border: 2px solid currentColor; background: none; color: inherit; cursor: pointer; }
.cook-nav .next { background: var(--on); color: var(--c); border-color: var(--on); }
.cook-nav [aria-disabled="true"] { visibility: hidden; }

/* ── Timer strip: every running timer, named, on every step */
.timers { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.chip-t { display: flex; align-items: stretch; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--c, #2a1f2d) 70%, #000); color: #fff; }
.chip-t button { border: 0; background: none; color: inherit; cursor: pointer; min-height: 52px; }
.chip-t-go { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 4px 14px; text-align: left; line-height: 1.15; }
.chip-t-label { font-size: 0.85rem; font-weight: 600; opacity: 0.85; max-width: 14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-t-time { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chip-t-act { padding: 0 14px; font-weight: 700; border-left: 1px solid rgba(255, 255, 255, 0.25) !important; }
.chip-t.is-check, .chip-t.is-done { background: #fff; color: #2a1f2d; box-shadow: inset 0 0 0 3px #2a1f2d; }
.chip-t.is-check .chip-t-act, .chip-t.is-done .chip-t-act { border-left-color: rgba(0, 0, 0, 0.2) !important; }
@media (prefers-reduced-motion: no-preference) {
  .chip-t.is-check, .chip-t.is-done { animation: pulse 1s ease-in-out infinite alternate; }
  @keyframes pulse { to { box-shadow: inset 0 0 0 3px #2a1f2d, 0 0 0 6px rgba(255, 255, 255, 0.6); } }
}
/* Outside Cooking Mode the strip floats at the bottom of the screen. */
.timers.is-floating { position: fixed; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10; justify-content: center; }
.timers.is-floating .chip-t { background: #2a1f2d; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); }
.timers.is-floating .chip-t.is-check, .timers.is-floating .chip-t.is-done { background: #fff; }

/* ── What can I make? */
.wcim { display: grid; gap: 32px; margin-bottom: 72px; }
@media (min-width: 900px) { .wcim { grid-template-columns: 1.1fr 1fr; gap: 48px; } .wcim-results { position: sticky; top: 16px; align-self: start; } }
.wcim input[type="search"] { width: 100%; font: inherit; padding: 12px 16px; border-radius: 4px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); margin-bottom: 12px; }
.wcim input[type="search"]:focus { outline: none; border-color: var(--ink); }
.have { display: flex; flex-wrap: wrap; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.have .chip { border-radius: 999px; }
.wcim h2, .shop h2, .plan h2 { font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.result a { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; text-decoration: none; background: var(--paper); border-radius: 4px; overflow: hidden; padding-right: 16px; }
.result .sw { width: 64px; height: 64px; background: var(--c); position: relative; overflow: hidden; }
.result .sw img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result strong { display: block; line-height: 1.2; }
.result strong { font-size: 1.05rem; }
.result .sub { color: var(--muted); font-size: 0.9rem; }
.result .pc { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.result a:hover strong { text-decoration: underline; }
.summary-line { min-height: 44px; display: flex; align-items: center; gap: 12px; color: var(--muted); }

/* ── Shopping list and planner */
.shop, .plan { display: grid; gap: 32px; margin-bottom: 72px; }
@media (min-width: 900px) { .shop, .plan { grid-template-columns: minmax(300px, 1fr) 1.4fr; gap: 48px; } }
.pick h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.pick ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pick-btn { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px 6px 6px; border-radius: 4px; border: 2px solid var(--line); background: var(--paper); text-align: left; cursor: pointer; }
.pick-btn .sw { width: 32px; height: 32px; border-radius: 3px; background: var(--c); flex-shrink: 0; display: grid; place-items: center; color: var(--on); }
.pick-btn .sw svg { opacity: 0; }
.pick-btn[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }
.pick-btn[aria-pressed="true"] .sw svg { opacity: 1; }
.pick-btn small { margin-left: auto; color: var(--muted); font-weight: 400; white-space: nowrap; }
.list { background: var(--paper); border-radius: 4px; padding: 24px; }
.list h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.list h3:first-child { margin-top: 0; }
.list ul { list-style: none; padding: 0; margin: 0; }
.item { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 2px 14px; padding: 12px 0; min-height: 52px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; cursor: pointer; }
/* A tick box on every line, so it's clear the line can be tapped. */
.item::before { content: ''; grid-column: 1; grid-row: 1 / span 2; align-self: start; width: 26px; height: 26px; box-sizing: border-box; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper) center / 18px no-repeat; }
.item span { grid-column: 2; }
.item b { grid-column: 3; white-space: nowrap; text-align: right; }
.item small { grid-column: 2 / -1; color: var(--muted); font-size: 0.85rem; }
.item[aria-pressed="true"]::before { border-color: var(--pea); background-color: var(--pea); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.item[aria-pressed="true"] span, .item[aria-pressed="true"] b, .item[aria-pressed="true"] small { color: var(--muted); opacity: 0.7; }
.item[aria-pressed="true"] span { text-decoration: line-through; }
.shop-progress { position: sticky; top: 8px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.shop-progress strong { white-space: nowrap; }
.shop-progress.is-done { background: var(--pea); color: #fff; }
.cupboard { margin-top: 24px; padding: 14px 16px; border-radius: 4px; background: var(--soft); }
.cupboard strong { display: block; margin-bottom: 4px; }
.facts-list { margin: 0; display: grid; grid-template-columns: 1fr auto; }
.facts-list dt, .facts-list dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts-list dd { text-align: right; font-weight: 700; }
.order { margin: 0; padding-left: 1.4em; }
.order li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.order span { color: var(--muted); }
.plan .list h2 { margin-top: 28px; }
.plan .list h2:first-child { margin-top: 0; }

/* ── Freezer guide */
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 72px; }
.guide section { background: var(--paper); border-radius: 4px; padding: 20px 24px; }
.guide h2 { font-size: 1.3rem; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 10px; }
.guide ul { margin: 0; padding-left: 1.1em; }
.guide li { margin-bottom: 6px; }
.guide .wide { grid-column: 1 / -1; }

/* ── Meal plans */
.plans-h { font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 800; margin: 40px 0 12px; }
.plans { list-style: none; padding: 0; margin: 0 0 72px; max-width: 640px; }
.plans li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plans a { font-weight: 700; font-size: 1.15rem; }
.plan-head { margin-bottom: 16px; }
.plan-name { width: 100%; max-width: 640px; font: inherit; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; padding: 4px 10px; margin: 0 0 12px -12px; border: 2px dashed var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); }
.plan-name:focus { outline: none; border-style: solid; border-color: var(--ink); }
.plan-status { min-height: 1.5em; margin: 12px 0 0; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.shared-list { max-width: 720px; margin: 8px 0 72px; }
.shared-list li.added { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.shared-list li.added .item { border-bottom: 0; }
.shared-list li.added .rm { flex: none; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: 0.85rem; cursor: pointer; }
.shared-list li.added .rm:hover { border-color: var(--ink); color: var(--ink); }
.shop-add { margin-top: 24px; }
.shop-add label { display: block; font-weight: 600; margin-bottom: 6px; }
.shop-add div { display: flex; gap: 10px; }
.shop-add input { flex: 1; min-width: 0; font: inherit; padding: 10px 14px; border-radius: 4px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); }
.shop-add input:focus { outline: none; border-color: var(--ink); }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 16px; }
.week-nav strong { font-size: 1.2rem; text-align: center; }
.week-nav .btn { min-height: 44px; padding: 0 14px; }
.week { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-bottom: 40px; }
.day { background: var(--paper); border-radius: 4px; padding: 16px; border-top: 6px solid var(--line); }
.day.is-today { border-top-color: var(--ink); }
.day h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.day h2 span { font-size: 0.85rem; font-weight: 700; }
.slot { padding: 8px 0; border-top: 1px solid var(--line); }
.slot:first-of-type { border-top: 0; }
.slot h3 { margin: 0 0 4px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.slot ul { list-style: none; padding: 0; margin: 0; }
.slot li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; padding: 4px 0 4px 12px; border-left: 4px solid var(--c, var(--line)); margin: 4px 0; }
.slot li a, .slot li span { font-weight: 600; }
.slot li small { grid-column: 1; color: var(--muted); font-size: 0.85rem; }
.slot li .rm { grid-column: 2; grid-row: 1 / span 2; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: 0.85rem; cursor: pointer; }
.slot .add { margin-top: 4px; min-height: 40px; padding: 0 12px; border: 2px dashed var(--line); border-radius: 4px; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; width: 100%; text-align: left; }
.slot .add:hover, .slot li .rm:hover { border-color: var(--ink); color: var(--ink); }
.nothing { margin: 4px 0 0; color: var(--muted); }
.cal { max-width: 70ch; margin: 0 0 72px; }
.cal h2 { font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 8px; }
.cal p { margin: 0 0 12px; }
.hint { color: var(--muted); font-size: 0.95rem; }
.add-meal { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 6px; background: var(--bg); color: var(--ink); }
.add-meal::backdrop { background: rgba(20, 15, 25, 0.55); }
.add-form { padding: 20px; display: grid; gap: 8px; }
.add-form h2 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.add-form h3 { margin: 12px 0 0; font-size: 1.05rem; }
.add-form label { font-weight: 600; margin-top: 4px; }
.add-form label small { font-weight: 400; color: var(--muted); }
.add-form input { width: 100%; font: inherit; padding: 10px 14px; border-radius: 4px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); }
.add-form input:focus { outline: none; border-color: var(--ink); }
.add-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 38vh; overflow-y: auto; }
.add-form .btn-row { margin-top: 12px; }
