/* ==========================================================================
   Hawkins — site styles
   Dark, neon-red, 80s-sci-fi look. One stylesheet for visitors, joined from
   _includes/css/ in this order. Later rules win ties, so the order matters:
   add a section where it belongs rather than at the end.
   ========================================================================== */
/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #060608;
  --surface: #111015;
  --surface-2: #18161c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #ede6da;
  --text-muted: #a8a196;
  --text-faint: #8a847c; /* 4.5:1 or better on every surface */

  --red: #e3242b;
  --red-bright: #ff4040;
  --red-glow: rgba(255, 42, 42, 0.5);
  --red-wash: rgba(255, 42, 42, 0.08);
  --amber: #ffc857;
  --amber-fill: #ffc857; /* behind dark text; the same in both themes */
  --glass: rgba(6, 6, 8, 0.85); /* see-through bars over the page */

  /* Neon on black. Light mode swaps these for ink on paper, where glows read
     as smudges: no halos, darker lines, buttons outlined in ink. */
  --hover-ink: #fff; /* text on hover */
  --button-line: var(--red-bright); /* outlined buttons */
  --page-glow: rgba(255, 30, 30, 0.12); /* the red haze at the top of the page */
  --neon-halo: rgba(255, 20, 20, 0.45); /* around neon lettering */
  --title-glow: rgba(255, 42, 42, 0.3); /* around page titles */
  --red-glow-soft: rgba(255, 42, 42, 0.25);
  --red-glow-inset: rgba(255, 42, 42, 0.15);
  --lift: rgba(255, 30, 30, 0.14); /* the shadow under a card you point at */
  --red-line-strong: rgba(255, 64, 64, 0.55);
  --red-line: rgba(255, 64, 64, 0.45);
  --red-line-soft: rgba(255, 64, 64, 0.3);
  --red-line-faint: rgba(255, 64, 64, 0.2);
  --seg-hover: rgba(255, 42, 42, 0.45); /* cook mode's step bar */
  --seg-done: rgba(227, 36, 43, 0.5);
  --amber-line: rgba(255, 200, 87, 0.45);
  --amber-line-strong: rgba(255, 200, 87, 0.6);
  --amber-wash: rgba(255, 200, 87, 0.1);
  --amber-wash-strong: rgba(255, 200, 87, 0.2);
  --amber-glow: rgba(255, 200, 87, 0.35);
  --amber-ring: rgba(255, 200, 87, 0.25);
  --photo-glow: rgba(255, 20, 20, 0.12); /* under the recipe photo */
  --wall-letter: #cfc6b6; /* Joyce's alphabet wall, on the home page */
  --bulb-off: 0.18;

  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Courier Prime", "Courier New", ui-monospace, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 3.75rem;
  --media-ratio: 3 / 2; /* every recipe image, everywhere */
}

/* Light theme, for a bright kitchen: a case file on manila paper instead of a
   dark room. It follows the phone or computer's setting (Auto), unless Light
   or Dark is picked at the bottom of the page (page.js sets data-theme). The
   same colors are listed twice: once for Auto, once for Light. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg: #f3ede1;
    --surface: #fbf8f2;
    --surface-2: #efe7d8;
    --line: rgba(40, 25, 10, 0.12);
    --line-strong: rgba(40, 25, 10, 0.24);

    --text: #1f1a14;
    --text-muted: #554b41;
    --text-faint: #685d52; /* 4.5:1 or better on every surface */

    --red: #c8151c;
    --red-bright: #b3121a;
    --red-wash: rgba(200, 20, 28, 0.06);
    --glass: rgba(243, 237, 225, 0.88);

    --amber: #8f4a00;
    --hover-ink: var(--text);
    --button-line: var(--line-strong);
    --red-glow: transparent;
    --page-glow: transparent;
    --neon-halo: transparent;
    --title-glow: transparent;
    --red-glow-soft: transparent;
    --red-glow-inset: transparent;
    --lift: rgba(40, 25, 10, 0.12);
    --red-line-strong: rgba(179, 18, 26, 0.5);
    --red-line: rgba(179, 18, 26, 0.4);
    --red-line-soft: rgba(179, 18, 26, 0.28);
    --red-line-faint: rgba(179, 18, 26, 0.2);
    --seg-hover: rgba(200, 21, 28, 0.45);
    --seg-done: rgba(200, 21, 28, 0.75);
    --amber-line: rgba(143, 74, 0, 0.4);
    --amber-line-strong: rgba(143, 74, 0, 0.55);
    --amber-wash: rgba(143, 74, 0, 0.07);
    --amber-wash-strong: rgba(143, 74, 0, 0.14);
    --amber-glow: transparent;
    --amber-ring: rgba(143, 74, 0, 0.25);
    --photo-glow: rgba(40, 25, 10, 0.16);
    --wall-letter: #3a3029;
    --bulb-off: 0.45;
  }
}
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f3ede1;
  --surface: #fbf8f2;
  --surface-2: #efe7d8;
  --line: rgba(40, 25, 10, 0.12);
  --line-strong: rgba(40, 25, 10, 0.24);

  --text: #1f1a14;
  --text-muted: #554b41;
  --text-faint: #685d52; /* 4.5:1 or better on every surface */

  --red: #c8151c;
  --red-bright: #b3121a;
  --red-wash: rgba(200, 20, 28, 0.06);
  --glass: rgba(243, 237, 225, 0.88);

  --amber: #8f4a00;
  --hover-ink: var(--text);
  --button-line: var(--line-strong);
  --red-glow: transparent;
  --page-glow: transparent;
  --neon-halo: transparent;
  --title-glow: transparent;
  --red-glow-soft: transparent;
  --red-glow-inset: transparent;
  --lift: rgba(40, 25, 10, 0.12);
  --red-line-strong: rgba(179, 18, 26, 0.5);
  --red-line: rgba(179, 18, 26, 0.4);
  --red-line-soft: rgba(179, 18, 26, 0.28);
  --red-line-faint: rgba(179, 18, 26, 0.2);
  --seg-hover: rgba(200, 21, 28, 0.45);
  --seg-done: rgba(200, 21, 28, 0.75);
  --amber-line: rgba(143, 74, 0, 0.4);
  --amber-line-strong: rgba(143, 74, 0, 0.55);
  --amber-wash: rgba(143, 74, 0, 0.07);
  --amber-wash-strong: rgba(143, 74, 0, 0.14);
  --amber-glow: transparent;
  --amber-ring: rgba(143, 74, 0, 0.25);
  --photo-glow: rgba(40, 25, 10, 0.16);
  --wall-letter: #3a3029;
  --bulb-off: 0.45;
}

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

[hidden] { display: none !important; }

.visually-hidden,
.resume:not([hidden]) + .resume .resume__title { /* the trip card under the recipes card shares its heading */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation; /* no double-tap zoom, so quick taps reach upside-down.js */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--page-glow), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--red-bright); text-underline-offset: 0.2em; }
a:hover { color: var(--hover-ink); }

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--red); color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-main {
  flex: 1;
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 8vw, 5rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  transition: top 0.15s;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 0.75rem); }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-bright);
}

/* Serves 4 [-/+], under the ingredients heading. */
.servings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: -0.5rem 0 1.25rem;
}
.servings__label { font-weight: 600; color: var(--text-muted); }
.servings .stepper button { width: 2.75rem; height: 2.75rem; }
.servings .stepper__value { min-width: 3rem; font-size: 1rem; }
.servings__note { flex-basis: 100%; margin: 0; font-size: 0.875rem; color: var(--text-faint); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
}
.section-head__count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-faint);
}
.section-head__link,
.section-head__actions { margin-left: auto; }
.section-head__link {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-decoration: none;
}
.section-head__link:hover { color: var(--red-bright); }
.section-head__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Buttons and chips read in plain sentence case, so they're quick to take in.
   The typewriter face is for labels and headings. */
.button,
.toggle,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.button { padding: 0.75rem 1.5rem; font-size: 0.9375rem; border-color: var(--button-line); }
.toggle,
.chip { padding: 0.4rem 0.9rem; font-size: 0.8125rem; }
/* Filter chips come in long rows, so they're a little tighter than buttons. */
.chip { gap: 0.4rem; padding-inline: 0.8rem; }
.button:hover,
.toggle:hover,
.chip:hover {
  color: var(--hover-ink);
  border-color: var(--red-bright);
  box-shadow: 0 0 16px var(--red-glow);
}
.toggle[aria-pressed="true"],
.chip[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Neon outline lettering, like the show's title card */
.neon-title {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 15vw, 9rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--red-bright);
  text-shadow: 0 0 12px var(--red-glow), 0 0 42px var(--neon-halo);
  animation: flicker 7s infinite;
}
@supports (-webkit-text-stroke: 1px red) {
  .neon-title {
    color: transparent;
    -webkit-text-stroke: clamp(1.5px, 0.25vw, 2.5px) var(--red-bright);
  }
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.4; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-bright) 30%, var(--red-bright) 70%, transparent);
  opacity: 0.6;
  box-shadow: 0 0 10px var(--red-glow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red-bright);
  text-shadow: 0 0 10px var(--red-glow);
}
@supports (-webkit-text-stroke: 1px red) {
  .brand { color: transparent; -webkit-text-stroke: 1px var(--red-bright); }
  .brand:hover { color: var(--red-wash); }
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--text); }
/* The case files, then the tools (Plan, the pot) after one thin line. */
.site-nav .site-nav__tools {
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line-strong);
}
/* Plan is a tool, not a section: an outlined pill (the border comes out of
   the padding, so it's no taller than the links). The current page is a red
   outline rather than the sections' underline. */
.site-nav .plan-link--tool {
  padding-block: calc(0.5rem - 1px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.site-nav .plan-link--tool:hover { border-color: var(--text-muted); }
.site-nav .plan-link--tool[aria-current] { border-color: var(--red-bright); }
.site-nav .plan-link--tool[aria-current] .plan-link__label { text-decoration: none; }
.site-nav a[aria-current] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--red-bright);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* Phones: the section links don't fit beside Plan and the pot, so they move
   into a Menu button's dropdown (nav.js). Wider screens never see either. */
.nav-menu,
.nav-menu__list { display: none; }
.nav-menu__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-menu__toggle:hover,
.nav-menu__toggle[aria-expanded="true"] { color: var(--text); }
/* Packing is in progress: a small red dot, as the Cooking pot has. */
.nav-menu__dot {
  display: none;
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--red-glow);
}
.nav-menu__toggle[data-badge] { padding-right: 1rem; }
.nav-menu__toggle[data-badge] .nav-menu__dot { display: block; position: absolute; top: 0.45rem; right: 0.25rem; }
/* The dropdown: under the header, like the Cooking menu. */
.nav-menu__list {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 0.35rem);
  right: var(--gutter);
  z-index: 70;
  width: min(16rem, calc(100% - 2 * var(--gutter)));
  padding: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: cooking-menu-in 0.18s ease-out;
}
.nav-menu__list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 6px;
}
.nav-menu__list a:hover,
.nav-menu__list a:focus-visible { color: var(--text); background: var(--line); outline: none; }
.nav-menu__list a[aria-current] { color: var(--red-bright); border-left-color: var(--red-bright); }
.nav-menu__file { font-weight: 400; letter-spacing: 0.04em; color: var(--text-faint); }
/* The pot's first-time note sits over the same spot: it waits while Menu is open. */
body:has(.nav-menu__toggle[aria-expanded="true"]) .cooking-hint { display: none; }
/* 58rem: five section links, Plan, the pot, and their badges need about 56rem. */
@media (max-width: 58rem) {
  .site-nav__section { display: none; }
  /* No sections beside it, so no line before Plan. */
  .site-nav .site-nav__tools { margin-left: 0; padding-left: 0; border-left: 0; }
  .nav-menu { display: flex; }
  .nav-menu__list:not([hidden]) { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-menu__list { animation: none; }
}

/* ---------- Caffeine (see caffeine/index.html and _data/drinks.yml) ---------- */
.drink-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
@media (min-width: 40rem) {
  .drink-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .drink-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.drink {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
/* Every drink photo is 4:5 (tall, like a cup). */
.drink__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.drink__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.drink__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  padding: 1.125rem 1.25rem 1.25rem;
}
.drink__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
}
.drink__name a { text-decoration: none; }
.drink__name a:hover { color: var(--red-bright); }
.drink__flavors { color: var(--text); }
.drink__style {
  font-size: 0.9375rem;
  color: var(--text-muted);
}
/* How to order it: a small shop label over each order line. */
.drink__orders {
  display: grid;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line-strong);
}
.drink__orders dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.drink__orders dd { margin: 0.1rem 0 0; }
.drink__orders .drink__extra {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}

/* ---------- Cocktails (see cocktails/index.html, _cocktails/ and _layouts/cocktail.html) ---------- */
/* The list is recipe cards (_includes/cocktail-card.html) and each page is a
   recipe page without cook mode: the same 3:2 photos and "Missing" strip. */
/* The Upside Bar banner: the whole sign on wide screens; on phones, "THE
   UPSIDE" in the middle (it sits a little right of the photo's center). */
.cocktail-banner {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  aspect-ratio: 1600 / 350;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.cocktail-banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 40rem) {
  .cocktail-banner { aspect-ratio: 5 / 2; }
  .cocktail-banner img { object-position: 55% 50%; }
}
/* The steps aren't buttons here: no cook mode to mark them done. */
.cocktail-page .step__num { cursor: default; }
.cocktail-page .step__num:hover { box-shadow: 0 0 12px var(--red-glow-soft), inset 0 0 8px var(--red-glow-inset); }
.cocktail-page .step__body { cursor: default; }
.cocktail-ingredients { display: grid; gap: 0.6rem; margin-top: 0.75rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px));
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-faint);
}
.site-footer__quote { color: var(--text-muted); }
/* Appearance: Auto / Light / Dark. */
.theme-pick {
  display: inline-flex;
  margin: 0;
  padding: 0.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.theme-pick button {
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.theme-pick button:hover { color: var(--text); }
.theme-pick button[aria-pressed="true"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Page heads ---------- */
.page-head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-title {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  color: var(--red-bright);
  text-shadow: 0 0 24px var(--title-glow);
}
/* A title with an action beside it (Open the gate on Recipes). */
.page-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.page-head__lede {
  margin-top: 0.75rem;
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ---------- Recipe finder: search, filters, and dish groups (see assets/js/recipes.js) ---------- */
/* Search, category chips, and result count above the recipe grid.
   The search reads like a typewriter prompt on a case file. */
.finder {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.finder__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.search {
  position: relative;
  flex: 1 1 18rem;
  max-width: 28rem;
}
.search__prompt {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--red-bright);
  text-shadow: 0 0 10px var(--red-glow);
  pointer-events: none;
}
.search__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 0.55rem 0.25rem 0.55rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem; /* 16px keeps iOS from zooming in on focus */
  color: var(--text);
  caret-color: var(--red-bright);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search__input::placeholder {
  color: var(--text-faint);
}
.search__input:focus {
  outline: none;
  border-bottom-color: var(--red-bright);
  box-shadow: 0 1px 0 var(--red-bright), 0 10px 18px -14px var(--red-glow);
}
.search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 0.875rem;
  height: 0.875rem;
  cursor: pointer;
  background: linear-gradient(45deg, transparent 43%, var(--red-bright) 43% 57%, transparent 57%),
              linear-gradient(-45deg, transparent 43%, var(--red-bright) 43% 57%, transparent 57%);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip__count {
  min-width: 1.5em;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--line);
  font-size: 0.75rem;
  text-align: center;
}
.chip[aria-pressed="true"] .chip__count { background: rgba(0, 0, 0, 0.25); }

/* The recipe search holds the picked filters as pills, in front of the text. */
.search--tokens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line-strong);
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search--tokens:focus-within {
  border-bottom-color: var(--red-bright);
  box-shadow: 0 1px 0 var(--red-bright), 0 10px 18px -14px var(--red-glow);
}
.search--tokens .search__prompt { position: static; transform: none; margin-right: 0.1rem; }
.search--tokens .search__input { flex: 1 1 6rem; width: auto; min-width: 6rem; padding: 0.25rem; border-bottom: 0; }
.search--tokens .search__input:focus { box-shadow: none; }
.search__tokens { display: contents; list-style: none; }
.search__tokens li { display: flex; }
.token {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.2rem 0.35rem 0.2rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.token--tag { color: #1a1408; background: var(--amber-fill); }
.token--fave::before { content: "♥\FE0E"; }
.chip--fave { color: var(--red-bright); border-color: var(--red-line); }
.chip--fave .fave-icon { fill: currentColor; stroke: none; }
.token__x {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}
.token:hover .token__x { background: rgba(0, 0, 0, 0.45); }
.token:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Suggestions open under the search while you're in it. Chips wrap, so
   there's nothing hidden off to the side however many tags there are. */
.suggest {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.suggest__group { display: grid; gap: 0.5rem; }
.suggest__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.suggest .chip { min-height: 2.5rem; }

/* Tags (like Low Calorie) sit on top of the category: amber instead of red. */
.chip--tag { border-style: dashed; border-color: var(--amber-line); color: var(--amber); }
.chip--tag:hover { border-color: var(--amber); box-shadow: 0 0 16px var(--amber-glow); color: var(--amber); }
.chip--tag[aria-pressed="true"] { background: var(--amber-fill); border-color: var(--amber-fill); border-style: solid; color: #1a1408; }
.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.45rem;
  font-size: 0.6875rem;
  line-height: 1.6;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--amber);
  text-decoration: none;
  vertical-align: 0.1em;
  border: 1px solid var(--amber-line);
  border-radius: 999px;
}
/* A category with several tags wraps into neat rows instead of indenting. */
.eyebrow:has(> .tag) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}
.eyebrow:has(> .tag) > .tag { margin-left: 0; }
a.tag:hover { border-color: var(--amber); }

/* The count and sort sit right above the cards they describe. */
.results {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.results__count { margin: 0; font-size: 0.9375rem; color: var(--text-muted); }
.results__sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.select {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font: inherit;
  font-family: var(--font-body);
  font-size: 1rem; /* 16px keeps iOS from zooming in */
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  /* A small chevron drawn with two gradients */
  background:
    linear-gradient(45deg, transparent 50%, var(--red-bright) 50%) right 1rem center / 0.3rem 0.3rem no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--red-bright) 50%) right 0.7rem center / 0.3rem 0.3rem no-repeat,
    var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.select:hover { border-color: var(--red-bright); }
.select:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }
.select option { background: var(--surface); color: var(--text); }
.button--gate {
  padding: 0.5rem 1.1rem;
  font-size: 0.8125rem;
  margin-left: auto;
}
.button--gate.is-opening {
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 22px var(--red-glow);
  animation: gate-flicker 0.45s steps(2) 1;
}
@keyframes gate-flicker {
  0%, 40%, 80% { opacity: 1; }
  20%, 60% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .button--gate.is-opening { animation: none; }
}
/* Phones: a tighter finder, with the search full width. */
@media (max-width: 40rem) {
  .finder { gap: 1rem; }
  .search { flex: 1 1 auto; max-width: none; min-width: 0; }
  .button--gate { flex: none; padding-inline: 0.9rem; }
}

.empty {
  padding: clamp(2rem, 6vw, 3.5rem) 1.5rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty__title {
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--text);
}
.empty .button { margin-top: 1.25rem; }

/* Recipes grouped by dish, each under its own heading. */
.dish-group + .dish-group { margin-top: clamp(2rem, 5vw, 3rem); }
.dish-group__title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
}
/* The heading already names the dish, so the cards under it don't repeat it. */
.dish-group .card__body > .eyebrow { display: none; }
.dish-group__count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-faint);
}

/* ---------- Recipe cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  border-color: var(--red-line-strong);
  box-shadow: 0 0 0 1px var(--red-glow-soft), 0 10px 32px var(--lift);
}

.card__media {
  position: relative;
  aspect-ratio: var(--media-ratio);
  min-height: 0; /* the frame sets the size, so a photo can't stretch it past a "no photo" tile */
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
/* No photo yet: a quiet tile with a fork and knife. */
.card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-faint);
  background: radial-gradient(circle at 50% 40%, var(--line), transparent 70%);
}
.card__placeholder svg { opacity: 0.7; }
/* A small heart on the photo of a recipe you've favorited. */
.card__fave {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  display: none;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--red-bright);
  background: var(--glass); /* dark or cream, with the theme */
  border-radius: 50%;
}
.card__fave .fave-icon { fill: currentColor; }
.card.is-favorite .card__fave { display: grid; }
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  padding: 1.125rem 1.25rem 1.25rem;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
}
.card__link { text-decoration: none; }
.card__link::after {
  /* Makes the whole card clickable while keeping one link for screen readers */
  content: "";
  position: absolute;
  inset: 0;
}
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--red-bright); outline-offset: 3px; }
.card__summary {
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}
/* Tags sit at the bottom of the card, just above the time and servings. */
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: auto 0 0;
  padding-top: 0.25rem;
  font-family: var(--font-body);
  font-weight: 600;
}
.card__tags .tag { margin-left: 0; }
.card__tags + .card__meta { margin-top: 0; padding-top: 0.25rem; }

/* ---------- Home ---------- */
.home-hero {
  padding-block: clamp(2rem, 8vw, 5rem) clamp(2.5rem, 8vw, 4.5rem);
  text-align: center;
}
.home-hero__tagline {
  max-width: 34rem;
  margin: 2rem auto 0;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Stranger Things Day (Nov 6), under the tagline */
.st-day {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.25rem, 5vw, 2.5rem);
  border: 2px solid var(--red-bright);
  border-radius: var(--radius);
  background: var(--red-wash);
  box-shadow: 0 0 24px var(--red-glow), inset 0 0 24px var(--red-glow-inset);
  animation: st-day-glow 3s ease-in-out infinite;
}
.st-day .eyebrow { margin: 0; font-size: 0.9375rem; }
.st-day__title {
  margin: 0.75rem 0 1rem;
  font-size: clamp(1.9rem, 7.5vw, 3.5rem);
  line-height: 1.15;
}
.st-day__text {
  max-width: 32rem;
  margin: 0 auto;
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  color: var(--text);
}
@keyframes st-day-glow {
  50% { box-shadow: 0 0 44px var(--red-glow), inset 0 0 32px var(--red-glow-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .st-day, .st-day__title { animation: none; }
}

.home-section + .home-section { margin-top: clamp(3rem, 8vw, 4.5rem); }

/* Christmas lights strung across the wall */
.lights {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem clamp(0.6rem, 2.2vw, 1.25rem);
  max-width: 40rem;
  min-height: 4.25rem;
  margin: clamp(2rem, 6vw, 3rem) auto 0;
}
.bulb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 1.5rem;
}
.bulb::before { /* socket */
  content: "";
  width: 0.45rem;
  height: 0.35rem;
  border-radius: 2px 2px 0 0;
  background: #2f4a33;
}
.bulb__glass {
  width: 0.95rem;
  height: 1.35rem;
  border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%;
  background: var(--c);
  opacity: var(--bulb-off);
  transition: opacity 0.12s, box-shadow 0.12s;
}
.bulb.is-on .bulb__glass {
  opacity: 1;
  box-shadow: 0 0 14px 4px var(--c);
}
.bulb__letter {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--wall-letter);
}
.bulb--space { width: 0.75rem; }

/* Section "case files" */
.files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* An odd card out spans the row, so it isn't left sitting alone. */
.file:last-child:nth-child(odd) { grid-column: 1 / -1; }
.file {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background:
    repeating-linear-gradient(180deg, transparent 0 1.9rem, rgba(255, 255, 255, 0.025) 1.9rem 2rem),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.file:not(.is-soon):hover,
.file:focus-within {
  border-color: var(--red-line-strong);
  box-shadow: 0 10px 32px var(--lift);
}
.file__title { font-family: var(--font-display); font-size: 1.5rem; }
.file__link { text-decoration: none; }
.file__link::after { content: ""; position: absolute; inset: 0; }
.file__blurb { color: var(--text-muted); }
/* Course shortcuts sit above the card's own link so they stay clickable. */
.file__chips { margin: 0.25rem 0 0.5rem; }
.file__chips .chip { position: relative; z-index: 1; padding: 0.3rem 0.7rem; font-size: 0.75rem; }
.file__status {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-mono);
  color: var(--red-bright);
}
.file.is-soon { opacity: 0.85; }
.soon-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}
.soon-list__item { display: flex; align-items: baseline; gap: 0.75rem; }
.soon-list__file {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red-bright);
}

/* ---------- Recipe page ---------- */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-faint);
}
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red-bright); }

.recipe-hero {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}
.recipe-hero__text { display: flex; flex-direction: column; gap: 0.75rem; }
.recipe-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5.5vw, 3.25rem);
  color: var(--red-bright);
  text-shadow: 0 0 24px var(--title-glow);
  text-wrap: balance;
}
.recipe-hero__summary {
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}
.recipe-hero__media {
  margin: 0;
  aspect-ratio: var(--media-ratio);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 20px 60px var(--photo-glow);
}
.recipe-hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* Phones and tablets (below the two-column hero): a recipe with no photo yet
   shows a short strip of the placeholder, just MISSING and its line, so the
   ingredients aren't pushed down a screen. Cards keep the full 3:2 frame. */
@media (max-width: 55.99rem) {
  .recipe-hero__media:not(.is-photo) { aspect-ratio: 4 / 1; }
  .recipe-hero__media:not(.is-photo) img { object-position: 50% 48%; }
}

/* Real photos get a light grade so they sit in the dark theme: a touch darker
   and warmer, with a soft vignette that pulls bright edges (white plates,
   countertops) toward the page. The food itself keeps its own colors. */
.is-photo { position: relative; }
/* <picture> only picks the file; the <img> inside is what's laid out. */
.is-photo picture { display: contents; }
.is-photo img { filter: brightness(0.92) contrast(1.06) saturate(1.08) sepia(0.06); }
.is-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(5, 4, 8, 0.55) 100%),
    linear-gradient(to top, rgba(120, 10, 14, 0.18), transparent 45%);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}
.stat {
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stat dd { margin: 0.15rem 0 0; font-weight: 600; }
.stat--wide { grid-column: span 2; }
.stat--total { border-color: var(--red-line); }
.stat--total dd { color: var(--amber); }
/* Calories we estimated ourselves, because the source didn't list them */
.stat--estimated { border-style: dashed; border-color: var(--amber-line); }
.stat__flag {
  margin-left: 0.25rem;
  padding: 0 0.3rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.625rem;
  color: var(--amber);
}

.recipe-body { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: start; }

/* Ingredients */
.panel {
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ingredients__group {
  margin: 1.25rem 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.ingredients .section-head + .ingredients__group { margin-top: 0; }

.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li + li { border-top: 1px dashed var(--line); }

.check {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.6rem 0;
  cursor: pointer;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
}
.check__box {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  transition: background-color 0.15s, border-color 0.15s;
}
.check:hover .check__box { border-color: var(--red-bright); }
.check input:focus-visible + .check__box { outline: 2px solid var(--red-bright); outline-offset: 2px; }
.check input:checked + .check__box {
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  border-color: var(--red);
}
.check input:checked ~ .check__text { color: var(--text-faint); text-decoration: line-through; text-decoration-color: rgba(255, 64, 64, 0.6); }
.qty { font-weight: 600; color: var(--amber); }
.check input:checked ~ .check__text .qty { color: inherit; }

/* Directions */
.directions__hint {
  margin: -0.75rem 0 0.5rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.steps { margin: 0; padding: 0; list-style: none; }
.step {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.step__num {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--red-bright);
  background: transparent;
  border: 1.5px solid var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--red-glow-soft), inset 0 0 8px var(--red-glow-inset);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.step__num:hover { box-shadow: 0 0 18px var(--red-glow), inset 0 0 8px var(--red-glow-soft); }
.step__body { cursor: pointer; padding-top: 0.45rem; }
.step__title { font-size: 1.0625rem; font-weight: 600; }
.step__text { margin-top: 0.35rem; }
.step__text p + p { margin-top: 0.75rem; }
.step__text strong { font-weight: 600; color: var(--amber); }
/* A step with several separate actions is written as a bulleted list. */
.step__text ul,
.cook__text ul { margin: 0; padding-left: 1.25em; list-style: disc; }
.step__text li + li { margin-top: 0.35rem; }
.step__text li::marker,
.cook__text li::marker { color: var(--red-bright); }
.step__text p + ul,
.step__text ul + p { margin-top: 0.75rem; }

.step.is-done .step__num {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: none;
}
.step.is-done .step__body { opacity: 0.45; }

.notes {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--red-wash);
  border: 1px solid var(--red-line-faint);
  border-left: 3px solid var(--red-bright);
  border-radius: var(--radius-sm);
}
.notes__title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.notes ul { margin: 0.75rem 0 0; padding-left: 1.1rem; }
.notes li { padding-left: 0.25rem; }
.notes li + li { margin-top: 0.5rem; }
.notes li::marker { color: var(--red-bright); }

.source {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}
.source a { color: var(--text-muted); }

/* Previous / next */
.pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.pager__link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pager__link:hover { border-color: var(--red-line-strong); box-shadow: 0 10px 32px var(--lift); }
.pager__link--next { text-align: right; }
.pager__title { font-family: var(--font-display); font-size: 1.125rem; }

/* ---------- 404 ---------- */
.lost {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-block: clamp(1rem, 6vw, 4rem);
  text-align: center;
}
.lost__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 22vw, 10rem);
  line-height: 1;
  color: var(--red-bright);
  text-shadow: 0 0 16px var(--red-glow), 0 0 48px var(--neon-halo);
  transform: rotate(180deg);
  animation: flicker 5s infinite;
}
.lost .page-title { text-wrap: balance; }
.lost__text { max-width: 32rem; color: var(--text-muted); }
.lost .button { margin-top: 1rem; }

/* ---------- Recipe page on wider screens ---------- */
@media (min-width: 56rem) {
  .recipe-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
  }
  .recipe-body { grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr); }
  .ingredients {
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    border-radius: var(--radius);
  }
  .step { grid-template-columns: 3rem 1fr; gap: 1.25rem; }
  .step__num { width: 3rem; height: 3rem; }
}

/* Turbo's loading bar, shown when a page takes a moment (see page.js). */
.turbo-progress-bar { height: 3px; background: var(--red-bright); box-shadow: 0 0 10px var(--red-glow); }

/* ---------- Cook mode (see cook.js) ---------- */

.is-cooking { overflow: hidden; }
.cook {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, var(--page-glow), transparent 70%),
    var(--bg);
  border: 0;
}
.cook[open] {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
}
.cook::backdrop { background: var(--bg); }

.cook__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) var(--gutter) 0.75rem;
  border-bottom: 1px solid var(--line);
}
.cook__heading { flex: 1; min-width: 0; }
.cook__recipe {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* "Step 3 of 8 ▾": opens the step list. */
.cook__count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0 -0.6rem;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red-bright);
  background: transparent;
  border: 1px solid var(--red-line-soft);
  border-radius: 999px;
  cursor: pointer;
}
.cook__count:hover,
.cook__count[aria-expanded="true"] { border-color: var(--red-bright); box-shadow: 0 0 14px var(--red-glow); }
.cook__close {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
}
.cook__close:hover { border-color: var(--red-bright); box-shadow: 0 0 16px var(--red-glow); }

/* One segment per step. The button is a tall tap target; the bar is drawn
   inside it, so the row still reads as a thin progress line. */
.cook__segments {
  display: flex;
  gap: 3px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
/* Done steps are dim red, the current one bright with its number above, and
   steps still to come gray. The whole height is tappable, however thin. */
.cook__seg {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.cook__seg::before {
  content: "";
  position: absolute;
  inset: 68% 0 auto;
  height: 4px;
  margin-top: -2px;
  background: var(--line-strong);
  border-radius: 2px;
  transition: background 0.2s ease, height 0.2s ease, margin 0.2s ease, box-shadow 0.2s ease;
}
.cook__seg:hover::before { background: var(--seg-hover); }
.cook__seg.is-done::before { background: var(--seg-done); }
.cook__seg.is-current::before {
  height: 8px;
  margin-top: -4px;
  background: var(--red-bright);
  box-shadow: 0 0 12px var(--red-glow);
}
.cook__seg-num {
  position: absolute;
  top: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cook__seg.is-current .cook__seg-num { opacity: 1; }
.cook__seg:focus-visible { outline: none; }
.cook__seg:focus-visible::before { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
/* A step with a running timer gets an amber dot. */
.cook__seg.has-timer::after {
  content: "";
  position: absolute;
  top: 68%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--amber-fill);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg), 0 0 8px var(--amber-glow);
}

.cook__stage {
  grid-row: 3;
  grid-column: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y; /* sideways drags move between steps (cook.js) */
  overscroll-behavior: contain;
  display: grid;
  align-items: center;
  padding: clamp(1.5rem, 5vh, 3rem) var(--gutter);
}
.cook__step {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
}
.cook__num {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red-bright);
  text-shadow: 0 0 24px var(--red-glow);
}
.cook__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.375rem, 4vw, 2rem);
}
.cook__text {
  font-size: clamp(1.25rem, 3.4vw, 1.625rem);
  line-height: 1.55;
}
.cook__text p { margin: 0; }
.cook__text p + p { margin-top: 1rem; }
.cook__text strong { font-weight: 600; color: var(--amber); }
.cook__text li + li { margin-top: 0.6rem; }
.cook__text p + ul,
.cook__text ul + p { margin-top: 1rem; }
.cook__text a { color: var(--text); }

.cook__step.is-enter-next { animation: cook-in-next 0.28s ease; }
.cook__step.is-enter-prev { animation: cook-in-prev 0.28s ease; }
@keyframes cook-in-next { from { opacity: 0; transform: translateX(2rem); } }
@keyframes cook-in-prev { from { opacity: 0; transform: translateX(-2rem); } }

/* A bold time in cook mode: tap to start a timer. */
.timer-start {
  display: inline;
  padding: 0 0.35em;
  font: inherit;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-wash);
  border: 1px dashed var(--amber-line-strong);
  border-radius: 6px;
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.timer-start::before { content: "⏱\FE0E "; font-size: 0.85em; }
.timer-start::after {
  content: "\25B6\FE0E  Start";
  margin-left: 0.45em;
  padding: 0.1em 0.45em;
  font-family: var(--font-body);
  font-size: 0.65em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  vertical-align: 0.15em;
  color: #1a1408;
  background: var(--amber-fill);
  border-radius: 4px;
}
.timer-start:hover { background: var(--amber-wash-strong); }
.timer-start.is-running { border-style: solid; background: var(--amber-wash-strong); }
/* Running, it counts down in place of Start (cook.js keeps data-left current). */
.timer-start.is-running::after { content: attr(data-left); color: var(--amber); background: transparent; box-shadow: inset 0 0 0 1px var(--amber); }
.timer-start.is-finished::after { content: "\2713\FE0E  Done"; color: #1a1408; background: var(--amber-fill); box-shadow: none; }
/* Until the first timer is started: a gentle pulse and a one-line hint. */
.timer-start.is-new { animation: timer-pulse 2s ease-in-out 3; }
@keyframes timer-pulse { 50% { box-shadow: 0 0 0 4px var(--amber-ring), 0 0 18px var(--amber-glow); } }
.cook__text .cook__hint {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Ingredients: covers the whole step view (see showPanel in recipe.js). */
.cook__ingredients-toggle {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-wash);
}
.cook__ingredients-toggle:hover { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 16px var(--amber-glow); }

.cook__sheet {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg);
}
.cook__sheet[hidden] { display: none; }
.cook__panel-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) var(--gutter) 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.cook__panel-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem var(--gutter) 2rem;
  background: var(--surface);
}
.cook:has(.timers:not([hidden])) .cook__panel-list { padding-bottom: 6rem; }
.cook__panel-list > * { max-width: 44rem; margin-left: auto; margin-right: auto; }
.cook__panel-title {
  flex: 1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.cook__panel-nav {
  display: grid;
  padding: 0.75rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
  border-top: 1px solid var(--line);
}
.cook__panel-nav .button { justify-content: center; padding: 1rem; font-size: 1rem; }
.cook__ingredients .check { font-size: 1.125rem; }

/* Start over, at the bottom of the step list: there, but quiet. */
.cook__restart {
  display: block;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.cook__restart:hover { color: var(--text); }
.cook__restart[hidden] { display: none; }

/* "Welcome back" and "All done" cards. */
.cook__notice {
  grid-template-rows: none;
  place-items: center;
  padding: var(--gutter);
}
.cook__notice-card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 0 40px var(--red-glow);
}
/* "All done": a check that draws itself, then a heart to save the recipe. */
.cook__check { display: block; margin: 0 auto 1rem; fill: none; stroke: var(--red-bright); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cook__check circle { --len: 151; stroke-dasharray: 151; opacity: 0.35; }
.cook__check path { --len: 36; stroke-dasharray: 36; }
.cook__check.is-drawn circle { animation: check-draw 0.5s ease-out both; }
.cook__check.is-drawn path { animation: check-draw 0.35s 0.35s ease-out both; }
@keyframes check-draw { from { stroke-dashoffset: var(--len); } }
@media (prefers-reduced-motion: reduce) {
  .cook__check.is-drawn circle,
  .cook__check.is-drawn path { animation: none; }
}
.cook__fave { margin-top: 1rem; }
.cook__notice-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.cook__notice-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.25;
}
.cook__notice-text { margin: 0 0 1.5rem; color: var(--text-muted); }
.cook__notice-actions { display: grid; gap: 0.75rem; }
.cook__notice-actions .button { justify-content: center; padding: 1rem; font-size: 1rem; }
.cook__notice-back { margin: 0.75rem auto 0; }

/* The step list. */
.cook__step-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.cook__pick {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cook__pick:hover { border-color: var(--red-bright); box-shadow: 0 0 16px var(--red-glow); }
.cook__pick-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--red-bright);
}
.cook__pick-title { font-size: 1.0625rem; font-weight: 600; }
.cook__pick-state {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}
.cook__pick.is-done .cook__pick-title { color: var(--text-muted); }
.cook__pick.is-done .cook__pick-num { color: var(--red); -webkit-text-stroke: 0; }
.cook__pick.has-timer .cook__pick-state { color: var(--amber); }
.cook__pick[aria-current] {
  background: var(--red-wash);
  border-color: var(--red-bright);
  box-shadow: inset 4px 0 0 var(--red-bright);
}
.cook__pick[aria-current] .cook__pick-state { color: var(--red-bright); }

.cook__nav {
  display: grid;
  grid-row: 4;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
  padding: 0.75rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
  border-top: 1px solid var(--line);
}
.cook__nav .button { justify-content: center; padding: 1rem; font-size: 1rem; }
.cook__next { background: var(--red); border-color: var(--red); color: #fff; }
.cook__next:hover { background: var(--red-bright); }
.cook__prev:disabled { opacity: 0.35; cursor: default; box-shadow: none; color: var(--text); border-color: var(--line-strong); }

/* Running timers: one frosted panel at the bottom of the page, a row each
   (like a Live Activity). It sits just above the Back / Next buttons while
   cook mode is open. */
.timers {
  position: fixed;
  right: var(--gutter);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  z-index: 60;
  display: grid;
  width: min(20rem, calc(100% - 2 * var(--gutter)));
  overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line-strong);
  border-radius: 1.4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.timers[hidden] { display: none; }
.timers.is-in { animation: tray-in 0.3s ease-out; } /* appearing, not on every page */
/* Phones: the full width of the page, like the other bars at the bottom. */
@media (max-width: 40rem) {
  .timers { left: var(--gutter); width: auto; }
}
.cook .timers { bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem); }
.cook:has(.timers:not([hidden])) .cook__stage { padding-bottom: 8rem; }
/* A thin line between rows. */
.timers > :not([hidden]) ~ :not([hidden]) { border-top: 1px solid var(--line); }
@keyframes tray-in { from { opacity: 0; transform: translateY(0.5rem); } }

/* Sound can't start until you tap: a quiet row, not a shout. */
.timers__sound {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  color: var(--amber);
  background: none;
  border: 0;
  cursor: pointer;
}
.timers__sound[hidden] { display: none; }
.timers__sound:hover { text-decoration: underline; }

/* A timer: tap the name to go back to that step. */
.timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-height: 3.5rem;
  padding: 0.35rem 0.25rem 0.35rem 1rem;
}
.timer[hidden] { display: none; }
.timer__open {
  display: grid;
  min-width: 0;
  padding: 0;
  font: inherit;
  line-height: 1.3;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.timer__open:hover .timer__step { text-decoration: underline; }
.timer__step::after { content: " ›"; color: var(--amber); }
.timer__step,
.timer__meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.timer__step { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.timer__meta { font-size: 0.75rem; color: var(--text-muted); }
.timer__time {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}
/* × as a plain glyph, with a full-size tap area. */
.timer__cancel {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.timer__cancel:hover { color: var(--text); }
.timer__cancel:focus-visible { outline: 2px solid var(--red-bright); outline-offset: -4px; }
.timer__cancel[hidden] { display: none; }
/* Gone off: the row turns red, with its buttons right there. */
.timer.is-done {
  padding-bottom: 0.75rem;
  background: rgba(255, 64, 64, 0.14);
  animation: timer-alarm 1s steps(2) infinite;
}
.timer.is-done .timer__time { font-size: 0.875rem; white-space: nowrap; color: var(--red-bright); }
.timer.is-done.is-stopped { animation: none; background: none; }
.timer.is-done.is-stopped .timer__time { color: var(--text-muted); }
.timer__actions {
  display: grid;
  grid-column: 1 / -1;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.5rem;
  padding-right: 0.75rem;
}
.timer__actions[hidden] { display: none; }
.timer__actions:has(.timer__stop:not([hidden])),
.timer__actions:has(.timer__extend:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
/* Stop, +5 min, and the step: a range timer that just rang. */
.timer__actions:has(.timer__stop:not([hidden])):has(.timer__extend:not([hidden])) { grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.5fr); gap: 0.4rem; }
.timer__actions:has(.timer__extend:not([hidden])) > .button { padding-inline: 0.5rem; }
.timer__stop,
.timer__extend,
.timer__continue {
  justify-content: center;
  padding: 0.75rem 0.75rem;
  font-size: 0.875rem;
  white-space: nowrap;
}
.timer__stop { background: var(--surface-2); }
.timer__extend { color: var(--amber); background: var(--surface-2); border-color: var(--amber-line); }
.timer__continue {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}
.timer__continue:hover { background: var(--red-bright); }
@keyframes timer-alarm { 50% { background: rgba(255, 64, 64, 0.32); } }

/* Room at the bottom of the page so the tray never hides the end of it. */
body:has(> .timers:not([hidden])) { padding-bottom: 8rem; }

@media (prefers-reduced-motion: reduce) {
  .cook__step.is-enter-next,
  .cook__step.is-enter-prev,
  .timer-start.is-new,
  .timer.is-done,
  .timers.is-in { animation: none; }
}

/* ---------- Header counts: Plan's and Packing's badges (see plan.js, packing-status.js) ---------- */
.plan-link { display: inline-flex !important; align-items: center; gap: 0.4rem; }
/* The current-page underline goes under the word only, not the count. */
.site-nav .plan-link[aria-current] { text-decoration: none; }
.plan-link[aria-current] .plan-link__label {
  text-decoration: underline;
  text-decoration-color: var(--red-bright);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}
.plan-link__count {
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  box-shadow: 0 0 10px var(--red-glow);
}
.plan-link__count.is-bumped { animation: plan-bump 0.4s ease; }
/* Packing's percent is quieter than Plan's count: a progress note, not a to-do. */
.plan-link__count--quiet { color: var(--text-muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Cooking: what you've started (cooking.js) ---------- */
/* In the header, next to Plan: a glowing dot and "Cooking". */
.cooking-nav { display: flex; }
.cooking-nav[hidden] { display: none; }
.cooking-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cooking-link:hover,
.cooking-link[aria-expanded="true"] { color: var(--text); }
.cooking-link__dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--amber);
  animation: cooking-glow 2.4s ease-in-out infinite;
}
@keyframes cooking-glow { 50% { opacity: 0.45; box-shadow: 0 0 2px var(--amber); } }
.cooking-link__icon { display: none; }
/* Its count is amber, like the rest of it, so it isn't mistaken for Plan's. */
.cooking-link .plan-link__count { color: #1a1408; background: var(--amber-fill); box-shadow: 0 0 10px var(--amber-glow); }
/* Phones: no room for the word, so a glowing pot (the count, when there's
   more than one, on its corner). The label stays for screen readers. */
@media (max-width: 58rem) {
  .cooking-link { position: relative; padding: 0.5rem 0.4rem; }
  .cooking-link__icon { display: block; }
  .cooking-link__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .cooking-link__dot { position: absolute; top: 0.4rem; right: 0.2rem; width: 0.45rem; height: 0.45rem; }
  .cooking-link .plan-link__count { position: absolute; top: 0; right: -0.35rem; min-width: 1.1rem; padding: 0 0.25rem; font-size: 0.6875rem; letter-spacing: 0; }
  .cooking-link:has(.plan-link__count:not([hidden])) .cooking-link__dot { display: none; }
}
/* The menu: drops down under the header. */
.cooking-menu {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 0.35rem);
  right: var(--gutter);
  z-index: 70;
  width: min(22rem, calc(100% - 2 * var(--gutter)));
  overflow: hidden;
  background: var(--surface); /* solid: it's read over a busy page */
  border: 1px solid var(--line-strong);
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: cooking-menu-in 0.18s ease-out;
}
.cooking-menu[hidden] { display: none; }
.cooking-menu__title {
  margin: 0;
  padding: 0.75rem 1rem 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-faint);
}
@keyframes cooking-menu-in { from { opacity: 0; transform: translateY(-0.35rem); } }

/* The first time on a phone: a note pointing up at the pot. */
.cooking-hint {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 0.6rem);
  right: var(--gutter);
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: min(19rem, calc(100% - 2 * var(--gutter)));
  padding: 0.6rem 0.4rem 0.6rem 1rem;
  color: #1a1408;
  background: var(--amber-fill);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: cooking-menu-in 0.25s ease-out;
}
.cooking-hint::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  right: 0.85rem;
  width: 0.9rem;
  height: 0.9rem;
  background: inherit;
  border-radius: 0.15rem;
  transform: rotate(45deg);
}
.cooking-hint__text { position: relative; margin: 0; font-size: 0.875rem; line-height: 1.35; }
.cooking-hint__ok {
  position: relative;
  flex: none;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.cooking-hint__ok:focus-visible { outline: 2px solid #1a1408; outline-offset: -4px; }

/* A recipe's row: its photo, name and step (and timer), and Done. */
.cooking-list { margin: 0; padding: 0; list-style: none; }
.cooking-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 3.5rem; }
.cooking-row + .cooking-row { border-top: 1px solid var(--line); }
.cooking-row__open {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  line-height: 1.3;
  color: inherit;
  text-decoration: none;
}
.cooking-row__open:focus-visible { outline: 2px solid var(--red-bright); outline-offset: -2px; border-radius: 0.75rem; }
.cooking-row__art {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  color: var(--text-faint);
  background: var(--surface-2);
  border-radius: 0.6rem;
}
.cooking-row__art img { width: 100%; height: 100%; object-fit: cover; }
.cooking-row__text { display: grid; min-width: 0; }
.cooking-row__title,
.cooking-row__meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cooking-row__title { font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.cooking-row__title::after { content: " ›"; color: var(--red-bright); }
.cooking-row__open:hover .cooking-row__title { text-decoration: underline; }
.cooking-row__meta { font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.cooking-row__done,
.cooking-row__undo {
  flex: none;
  min-height: 2.75rem;
  padding: 0 1rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.cooking-row__done:hover { color: var(--text); text-decoration: underline; }
.cooking-row__undo { color: var(--red-bright); }
.cooking-row__done:focus-visible,
.cooking-row__undo:focus-visible { outline: 2px solid var(--red-bright); outline-offset: -4px; }
.cooking-row--cleared { padding-left: 1rem; }
/* Its timers, under the name: each goes to the step it's for. */
.cooking-row__timers { grid-column: 1 / -1; display: grid; justify-items: start; padding: 0 0.75rem 0.45rem 4rem; margin-top: -0.3rem; }
.cooking-row__timers[hidden] { display: none; }
.cooking-row__timer {
  min-height: 2.25rem;
  padding: 0 0.6rem;
  margin-left: -0.6rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.cooking-row__timer:hover { text-decoration: underline; }
.cooking-row__timer.is-done { color: var(--red-bright); }
.cooking-row__timer:focus-visible { outline: 2px solid var(--red-bright); outline-offset: -2px; }
.cooking-row__note { font-size: 0.875rem; color: var(--text-muted); }

/* Pick up where you left off: at the top of the home and Recipes pages. */
.resume { margin: 0 0 clamp(1.5rem, 4vw, 2.5rem); }
.resume[hidden] { display: none; }
.resume__title { margin: 0 0 0.75rem; font-size: 1.25rem; }
.resume .cooking-list {
  max-width: 34rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 1.25rem;
}
.home-hero + .container .resume { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
/* The trip you're packing for sits under the recipes' card, which has the heading. */
.resume:not([hidden]):has(+ .resume:not([hidden])) { margin-bottom: 0.75rem; }
.resume:not([hidden]) + .resume { margin-top: 0; }
/* A trip name can run long: it wraps instead of cutting off. */
.resume .cooking-row__title { white-space: normal; }

/* On a recipe card: how far you've got. */
.card__progress {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber);
}
.card__progress::before { content: "● "; font-size: 0.6em; vertical-align: 0.2em; }
@media (prefers-reduced-motion: reduce) {
  .cooking-link__dot,
  .cooking-menu,
  .cooking-hint { animation: none; }
}
@keyframes plan-bump { 40% { transform: scale(1.35); } }

/* ---------- Cards: + Plan over the photo, and the phone list layout ---------- */
/* "+ Plan" on recipe cards, over the photo. */
.card__plan {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: var(--glass); /* dark or cream, with the theme */
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.card__plan:hover { border-color: var(--red-bright); box-shadow: 0 0 14px var(--red-glow); }
.card__plan[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
/* With a mouse, "+ Plan" waits for hover or focus. Planned cards keep it, so you can see what's in. */
@media (hover: hover) and (pointer: fine) {
  .card__plan { opacity: 0; transition: opacity 0.15s; }
  .card:hover .card__plan,
  .card:focus-within .card__plan,
  .card__plan[aria-pressed="true"] { opacity: 1; }
}

/* On phones the cards become a list: thumbnail on the left, details on the
   right, so several recipes fit on a screen. */
@media (max-width: 40rem) {
  .card-grid { gap: 0.75rem; }
  .card { flex-direction: row; }
  .card:hover, .card:focus-within { transform: none; }
  /* A 3:2 thumbnail pinned to the top left, with + Plan underneath it. */
  .card__media {
    flex: none;
    align-self: flex-start;
    width: 6.75rem;
    margin: 0.75rem 0 0.75rem 0.75rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }
  .card:has(> .card__plan:not([hidden])) { min-height: 8.25rem; }
  .card__body { gap: 0.35rem; padding: 0.85rem 1rem 0.85rem 0.9rem; }
  .card__title { font-size: 1.0625rem; }
  .card__summary { display: none; }
  .card__tags { margin-top: 0.15rem; padding-top: 0; }
  .card__meta { margin-top: auto; padding-top: 0.15rem; }
  .card__plan {
    top: 5.75rem;
    left: 0.75rem;
    right: auto;
    width: 6.75rem;
    padding: 0.25rem 0;
    font-size: 0.6875rem;
    text-align: center;
  }
  .card .card__stamp {
    padding: 0.15rem 0.35rem;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    border-width: 2px;
  }
}

/* ---------- Page actions: the filled button, + Add to plan, Start cooking ---------- */
.recipe-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
/* The one filled button on a page: what you came to do. */
.button--primary { color: #fff; background: var(--red); border-color: var(--red); }
.button--primary:hover { background: var(--red-bright); border-color: var(--red-bright); }
.button--plan,
.button--fave { padding: 0.6rem 1.2rem; font-size: 0.875rem; }
.fave-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.button--fave[aria-pressed="true"] { color: var(--red-bright); border-color: var(--red-bright); }
.button--fave[aria-pressed="true"] .fave-icon { fill: currentColor; }
/* Start cooking, with Start over beside it once there's progress. */
.cook-start { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.button--quiet { padding-inline: 0.75rem; color: var(--text-muted); border-color: transparent; }
.button--quiet:hover { color: var(--text); border-color: var(--line-strong); box-shadow: none; }
/* On phones it waits at the bottom of the screen, out of the way of the timer
   tray when one is running. With Start over, the two share one bar, like a
   toolbar: Start over as plain text on the left. */
@media (max-width: 40rem) {
  .cook-start {
    position: fixed;
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
    z-index: 50;
    flex-wrap: nowrap;
    gap: 0.25rem;
    border-radius: 999px;
  }
  .cook-start .button--cook { flex: 1; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
  .cook-start:has(.button--quiet:not([hidden])) {
    padding: 0.3rem;
    background: var(--glass);
    border: 1px solid var(--line-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .cook-start:has(.button--quiet:not([hidden])) .button--cook { box-shadow: none; }
  .cook-start .button--quiet { order: -1; flex: none; padding-inline: 1rem; }
  body:has(.button--cook:not([hidden])) { padding-bottom: 5rem; }
  body:has(> .timers:not([hidden])) .cook-start { position: static; padding: 0; background: none; border: 0; box-shadow: none; }
  body:has(> .timers:not([hidden])) .cook-start .button--cook { flex: none; }
}
.button--plan[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Plan page (see plan.js) ---------- */
.plan-layout { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: start; }
/* Let long lines (the folded recipe summary) shorten instead of widening the page. */
.plan-layout > * { min-width: 0; }

.plan-list { margin: 0; padding: 0; list-style: none; }
.plan-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px dashed var(--line);
}
.plan-item:first-child { border-top: 0; padding-top: 0.25rem; }
.plan-item__main { display: grid; min-width: 0; }
.plan-item__amount { display: flex; align-items: center; gap: 0.5rem; }
.plan-item__serves { font-size: 0.8125rem; color: var(--text-faint); }
.plan-item__title { font-weight: 600; line-height: 1.35; text-decoration: none; }
.plan-item__title:hover { color: var(--red-bright); }
.plan-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.plan-item__cook {
  color: var(--red-bright);
  font-weight: 600;
  text-decoration: none;
}
.plan-item__cook::after { content: " ›"; }
.plan-item__cook:hover { text-decoration: underline; }

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.stepper button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.stepper button:hover:not(:disabled) { color: var(--red-bright); }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper__value {
  min-width: 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  color: var(--amber);
}
.plan-item__remove {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.plan-item__remove:hover { color: var(--red-bright); border-color: var(--line-strong); }

.plan-empty { padding: 0.5rem 0 0.25rem; color: var(--text-muted); }
.plan-empty p { margin: 0; }
.plan-empty p + p { margin-top: 0.25rem; }

.plan-add { display: block; margin-top: 1rem; }
.plan-add select {
  width: 100%;
  padding: 0.7rem 2.25rem 0.7rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 1rem; /* 16px keeps iOS from zooming in */
  color: var(--text);
  /* A small chevron drawn with two gradients */
  background:
    linear-gradient(45deg, transparent 50%, var(--red-bright) 50%) right 1.15rem center / 0.3rem 0.3rem no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--red-bright) 50%) right 0.85rem center / 0.3rem 0.3rem no-repeat,
    var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.plan-add select:hover,
.plan-add select:focus { border-color: var(--red-bright); outline: none; }
.plan-add option { background: var(--surface); color: var(--text); }

/* Phones: the recipes folded into one line above the shopping list. */
.plan-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--text-muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.plan-summary__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-summary__text strong { color: var(--text); }
.plan-summary__edit { flex: none; font-weight: 600; color: var(--red-bright); }
.plan-recipes__done { margin-left: auto; }
.panel:has(> .plan-summary:not([hidden])) { padding-block: 0.9rem; }

/* Favorites to add with one tap. */
.plan-faves { display: grid; gap: 0.5rem; margin-top: 1rem; }
.plan-faves .suggest__label { margin: 0; }

/* The Share and … menus. */
.menu { position: relative; }
.menu__toggle { letter-spacing: 0.1em; }
.menu__list {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 15rem;
  padding: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
/* No room to the left (on a phone, where the buttons wrap): open rightward. */
.menu__list.is-start { right: auto; left: 0; }
.menu__list button {
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.menu__list button:hover,
.menu__list button:focus-visible { background: var(--line); outline: none; }
.menu__list .menu__danger { color: var(--red-bright); }
.menu__list small { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--text-faint); }
@media (max-width: 40rem) {
  .menu__list { max-width: calc(100vw - 2 * var(--gutter)); }
}

.plan-shared {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--red-wash);
  border: 1px solid var(--red-line-soft);
  border-left: 3px solid var(--red-bright);
  border-radius: var(--radius-sm);
}
.plan-shared p { margin: 0; }
.plan-shared__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.plan-shared .button { padding: 0.5rem 1.1rem; font-size: 0.8125rem; }

.plan-extra {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 32rem;
  margin: 0 0 1.5rem;
}
.plan-extra .search__input { flex: 1; }
.plan-extra .search__input::placeholder { text-transform: none; letter-spacing: 0.02em; }

.shopping__aisles { display: grid; gap: 0.5rem; }
.shopping__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 0.5rem;
}
.shopping__row .check { padding-bottom: 0; }
.shopping__row .shopping__from { grid-column: 1; padding: 0 0 0.6rem 2rem; }
/* "Have at home" (or "Need it", or × on your own items): quiet words, not a button
   shouting from every row. The tap area is full size, without an outline
   (which on a phone sticks around after the tap). */
.shopping__action {
  min-height: 2.75rem;
  margin-top: -0.1rem;
  padding: 0 0.25rem 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-faint);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.shopping__action:focus-visible { outline: 2px solid var(--red-bright); outline-offset: -2px; border-radius: 6px; }
@media (hover: hover) {
  .shopping__action:hover { color: var(--text); text-decoration: underline; }
}
.shopping__action--remove { font-size: 1.125rem; line-height: 1; padding: 0 0.5rem; }
.shopping__from a { color: inherit; text-decoration: none; }
.shopping__from a:hover { color: var(--red-bright); text-decoration: underline; }
.shopping__row:has(input:checked) .shopping__from { opacity: 0.6; }

.pantry-summary {
  margin: -0.25rem 0 1.25rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.pantry-summary__review {
  margin-left: 0.25rem;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red-bright);
  background: none;
  border: 0;
  cursor: pointer;
}
.pantry-summary__review::after { content: " ›"; }
.pantry-summary__review:hover { text-decoration: underline; }
/* "At home": a folded list under the shopping list. */
.pantry {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.pantry summary {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
}
.pantry[open] summary { margin-bottom: 0.5rem; }
.pantry__hint { margin: 0 0 0.25rem; font-size: 0.875rem; color: var(--text-faint); }
.pantry .shopping__name { color: var(--text-muted); }
/* At home rows have nothing to tick: the name lines up with the hint. */
.shopping__item { margin: 0; padding: 0.6rem 0 0; }
.pantry .shopping__from { padding-left: 0; }
.aisle .ingredients__group { margin-top: 1rem; }
.aisle:first-child .ingredients__group { margin-top: 0.5rem; }
.shopping__from {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-faint);
}

.plan-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  z-index: 70;
  margin: 0;
  padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--red-bright);
  /* Rounded enough to read as a pill on one line, and still hold a long
     ingredient name that wraps to two. */
  border-radius: 1.4rem;
  box-shadow: 0 0 20px var(--red-glow);
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  max-width: min(28rem, calc(100% - 2 * var(--gutter)));
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s;
}
.plan-toast.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.2s, transform 0.2s; }
.plan-toast [data-plan-toast-text],
.plan-toast [data-pack-toast-text] {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plan-toast__undo {
  flex: none;
  padding: 0.35rem 0.9rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

@media (min-width: 56rem) {
  .plan-layout { grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); }
  .plan-recipes {
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1.5rem);
  }
  .shopping__aisles { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); column-gap: 2rem; align-items: start; }
}
@media (max-width: 40rem) {
  .shopping .section-head__actions { width: 100%; margin-left: 0; }
}

/* ---------- Header on small phones (320px) ---------- */
@media (max-width: 30rem) {
  /* Brand, Plan, the pot and Menu fit a small phone (320px) at full size.
     Plan's count or the Cooking pot need the tighter type, so only then does it shrink. */
  .site-header:has([data-plan-count]:not([hidden]), [data-cooking]:not([hidden])) {
    --nav-pad: 0.15rem; --nav-size: 0.75rem; --nav-track: 0.02em; --brand-size: 0.875rem; --brand-track: 0.04em;
    --header-gap: 0.375rem; --pot-pad: 0.25rem; --count-min: 1.2rem; --count-pad: 0.3rem; --count-size: 0.6875rem;
  }
  .site-nav a { padding: 0.5rem var(--nav-pad, 0.3rem); font-size: var(--nav-size, 0.8125rem); letter-spacing: var(--nav-track, 0.04em); }
  .brand { font-size: var(--brand-size, 1.25rem); letter-spacing: var(--brand-track, 0.14em); }
  .site-header__inner { gap: var(--header-gap, 0.5rem); }
  .site-nav ul { gap: 0.125rem; }
  .plan-link { gap: 0.25rem; }
  .plan-link__count { min-width: var(--count-min, 1.35rem); padding-inline: var(--count-pad, 0.35rem); font-size: var(--count-size, 0.75rem); }
  .cooking-link { padding-inline: var(--pot-pad, 0.4rem); }
  .nav-menu__toggle { padding-inline: var(--pot-pad, 0.4rem); }
}

/* ---------- Packing lists (see packing.js) ---------- */
.pack-layout { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: start; }
/* Let long lines (the folded trip summary) shorten instead of widening the page. */
.pack-layout > * { min-width: 0; }
.pack-setup__done { margin-left: auto; }
.pack-setup .section-head { margin-bottom: 1rem; }
.pack-setup .suggest__label { margin: 1.25rem 0 0.5rem; }
.pack-setup .pack-setup__presets-label { margin-top: 0; }
/* Quick start: a row per trip (they're links, so they don't look like the
   kit toggles), then a dashed rule: "or build your own". */
.pack-quick { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pack-quick__trip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.pack-quick__trip + .pack-quick__trip { border-top: 1px dashed var(--line); }
.pack-quick__trip .chip__count { font-weight: 400; color: var(--text-muted); background: none; }
.pack-quick__trip .chip__count::after { content: " ›"; color: var(--text-faint); }
.pack-quick__trip:hover { color: var(--hover-ink); background: var(--surface-2); }
.pack-quick__trip:hover .chip__count::after { color: var(--red-bright); }
.pack-quick__trip:focus-visible { outline: 2px solid var(--red-bright); outline-offset: -2px; }
.pack-setup__or { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; font-size: 0.8125rem; color: var(--text-faint); }
.pack-setup__or::before,
.pack-setup__or::after { content: ""; flex: 1; border-top: 1px dashed var(--line-strong); }
.pack-setup__hint { margin: 1.25rem 0 0; font-size: 0.875rem; color: var(--text-muted); }
/* Getting there / Weather / Plans: a small heading over each row of kits. */
.pack-groups { display: grid; gap: 0.9rem; margin-top: 0.75rem; }
.pack-setup .pack-group__label { margin: 0 0 0.45rem; font-size: 0.6875rem; }
/* Clear trip's "are you sure?": a small box in the middle of the screen. */
.confirm {
  width: min(22rem, calc(100% - 2 * var(--gutter)));
  padding: 1.25rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.confirm[open] { animation: cooking-menu-in 0.18s ease-out; }
.confirm::backdrop { background: rgba(0, 0, 0, 0.55); }
.confirm__title { margin: 0 0 0.5rem; font-size: 1.25rem; }
.confirm__text { margin: 0 0 1.25rem; color: var(--text-muted); }
.confirm__actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.confirm__actions .button { padding: 0.5rem 1.1rem; font-size: 0.8125rem; }
@media (prefers-reduced-motion: reduce) {
  .confirm[open] { animation: none; }
}

/* How long: "3 days" between a − and a +. */
.pack-days { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.pack-days__label { font-weight: 600; color: var(--text-muted); }
.pack-days .stepper button { width: 2.75rem; height: 2.75rem; }
.pack-days .stepper__value { min-width: 4.75rem; font-size: 1rem; }

/* How much is packed: a thin bar under the heading. */
.pack-bar {
  height: 6px;
  margin: -0.5rem 0 1.25rem;
  overflow: hidden;
  background: var(--line-strong);
  border-radius: 3px;
}
.pack-bar__fill {
  display: block;
  height: 100%;
  background: var(--red-bright);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--red-glow);
  transition: width 0.3s ease;
}
/* The progress line sits on its own line, so "· 6 skipped" appearing never
   makes it wrap and push the checklist down. */
.pack-list .section-head__count { flex-basis: 100%; margin-top: -0.25rem; }

/* One card per kit: its name, how many are packed, and the list. A kit that's
   all packed when the page opens is folded down to its name with a ✓; tap the
   name to open it. */
.pack-kits { display: grid; gap: 0.75rem; }
.pack-kit {
  padding: 0 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pack-kit__title { margin: 0; }
.pack-kit__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  color: var(--red-bright);
  background: none;
  border: 0;
  cursor: pointer;
}
.pack-kit__head:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; border-radius: 6px; }
.pack-kit__name { flex: 1; min-width: 0; }
.pack-kit__count { font-weight: 400; letter-spacing: 0.04em; color: var(--text-faint); }
.pack-kit__tick { display: none; color: var(--amber); }
.pack-kit__caret { flex: none; color: var(--text-faint); transition: transform 0.15s; }
.pack-kit__head[aria-expanded="false"] .pack-kit__caret { transform: rotate(-90deg); }
.pack-kit.is-complete .pack-kit__tick { display: inline; }
.pack-kit.is-complete .pack-kit__head { color: var(--text-muted); }
.pack-kit__list { padding-bottom: 0.5rem; }
/* A kit's tips (Flying: TSA rules), folded under its list. */
.pack-tips { margin: 0 0 0.75rem; padding-top: 0.6rem; border-top: 1px dashed var(--line); font-size: 0.875rem; color: var(--text-muted); }
.pack-tips summary { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); cursor: pointer; }
.pack-tips summary:hover { color: var(--text-muted); }
.pack-tips ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.pack-tips li + li { margin-top: 0.3rem; }
.pack-tips__links { margin: 0.6rem 0 0; color: var(--text-faint); }
.pack-tips__links a { color: var(--red-bright); }
/* A kit you just added glows for a moment (packing.js adds and removes is-new). */
.pack-kit.is-new { animation: pack-kit-glow 1.5s ease-out; }
@keyframes pack-kit-glow {
  0%, 35% { border-color: var(--red-bright); box-shadow: 0 0 0 1px var(--red-bright), 0 0 22px var(--red-glow); }
}
@media (prefers-reduced-motion: reduce) {
  .pack-kit.is-new { animation: none; }
}

/* Rows are full-width tap targets. A row's state is in its box and its text,
   never in an extra word, so nothing can wrap or move when it changes:
   packed is the red ✓ and a line through the text; skipped (not taking it) is
   a slashed circle and faded text. */
.pack-row .check { align-items: center; min-height: 2.75rem; padding: 0.4rem 0; }
.pack-row .check__box { margin-top: 0; }
.pack-row .shopping__action { align-self: center; margin-top: 0; }
/* Bring and Skip take the same room, so the name never wraps differently. */
.pack-row__skip { min-width: 3.25rem; text-align: right; }
.pack-row.is-skipped .check__box {
  position: relative;
  overflow: hidden;
  border-color: var(--text-faint);
  border-style: solid;
  border-radius: 50%;
}
.pack-row.is-skipped .check__box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, transparent calc(50% - 0.75px), var(--text-faint) calc(50% - 0.75px), var(--text-faint) calc(50% + 0.75px), transparent calc(50% + 0.75px));
}
.pack-row.is-skipped .check:hover .check__box { border-color: var(--red-bright); }
.pack-row.is-skipped .pack-row__name,
.pack-row.is-skipped .qty { color: var(--text-faint); }

/* Extras' last row: "+ Add an item…", typed straight into the list. */
.pack-add {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0;
}
.pack-add__plus {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--text-faint);
}
.pack-add:focus-within .pack-add__plus { color: var(--red-bright); }
.pack-add__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0;
  font-family: var(--font-body);
  font-size: 1rem; /* 16px keeps iOS from zooming in on focus */
  color: var(--text);
  caret-color: var(--red-bright);
  background: transparent;
  border: 0;
  border-radius: 0;
}
.pack-add__input::placeholder { color: var(--text-faint); }
.pack-add__input:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; border-radius: 6px; }

.pack-credit { margin: 1.5rem 0 0; font-size: 0.8125rem; color: var(--text-faint); }
.pack-credit a { color: inherit; }
.pack-credit a:hover { color: var(--red-bright); }

@media (min-width: 56rem) {
  .pack-layout { grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); }
  /* The setup stays in view beside the checklist; if it's taller than the
     window it scrolls inside itself instead of being cut off. */
  .pack-setup {
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px) - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

/* ---------- Classified recipes (see classified.js) ---------- */
.classified {
  display: grid;
  justify-items: start;
  gap: 1rem;
  max-width: 40rem;
  margin: clamp(1rem, 4vw, 2.5rem) 0 clamp(2rem, 6vw, 4rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 42, 42, 0.035) 14px 28px),
    var(--surface);
  border: 1px solid var(--red-line-soft);
  border-radius: var(--radius);
  box-shadow: 0 0 40px rgba(255, 30, 30, 0.08);
}
.classified__stamp {
  margin: 0;
  padding: 0.35rem 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-bright);
  border: 3px solid currentColor;
  border-radius: 4px;
  transform: rotate(-4deg);
  text-shadow: 0 0 12px var(--red-glow);
  box-shadow: 0 0 14px var(--red-glow-soft), inset 0 0 10px var(--red-glow-inset);
}
.classified__text { margin: 0; color: var(--text-muted); }
.classified__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  width: 100%;
}
.classified__form .search { flex: 1 1 14rem; }
.classified__form .search__input::placeholder { text-transform: uppercase; }
.classified__form.is-denied { animation: denied 0.4s ease; }
@keyframes denied {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.classified__error {
  min-height: 1.5em;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.classified__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.classified__bar button {
  padding: 0.15rem 0.7rem;
  font: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}
.classified__bar button:hover { color: var(--text); border-color: var(--red-bright); }
.tag--classified { color: var(--red-bright); border-color: var(--red-line); }
.card--classified .card__media {
  position: relative;
  display: grid;
  place-items: center;
}
.card--classified .card__media img,
.card--classified .card__placeholder {
  grid-area: 1 / 1;
  filter: grayscale(0.6) brightness(0.55);
}
.card--classified .card__media::after {
  content: "";
  grid-area: 1 / 1;
  align-self: stretch;
  justify-self: stretch;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 42, 42, 0.08) 14px 28px);
}
.card__stamp {
  grid-area: 1 / 1;
  z-index: 1;
  max-width: 85%;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(0.95rem, 4vw, 1.25rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-bright);
  background: rgba(10, 6, 6, 0.6);
  border: 3px solid currentColor;
  border-radius: 4px;
  transform: rotate(-8deg);
  text-shadow: 0 0 12px var(--red-glow);
  box-shadow: 0 0 14px var(--red-glow-soft), inset 0 0 10px var(--red-glow-inset);
}
[data-clearance="granted"] .card__stamp,
[data-clearance="granted"] .card--classified .card__media::after { display: none; }
[data-clearance="granted"] .card--classified .card__media img { filter: none; }
.card--classified .card__summary { font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: 0.02em; }
@media (prefers-reduced-motion: reduce) {
  .classified__form.is-denied { animation: none; }
}

/* ---------- Page transitions ---------- */
/* Opening a recipe from its card, the photo and title glide into place
   (page.js names the card you tapped; the recipe page names its own). */
.recipe-hero__media { view-transition-name: recipe-media; }
.recipe-hero__title { view-transition-name: recipe-title; }
::view-transition-group(*) { animation-duration: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Upside Down (easter egg, see upside-down.js) ---------- */
/* Flipping each part and reversing their order looks the same as flipping the
   whole page, but leaves body untransformed so fixed overlays still work. */
.upside-down body { flex-direction: column-reverse; }
.upside-down body > :is(.site-header, .site-main, .site-footer) {
  transform: rotate(180deg);
  filter: saturate(0.55) brightness(0.88) contrast(1.05);
}
.upside-down .site-header { top: auto; bottom: 0; }
.upside-down .ingredients { position: static; max-height: none; overflow: visible; }

/* Cold blue haze and drifting spores over everything. */
.upside-down body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(220, 230, 255, 0.55), transparent),
    radial-gradient(1px 1px at 34% 72%, rgba(220, 230, 255, 0.45), transparent),
    radial-gradient(2px 2px at 58% 40%, rgba(220, 230, 255, 0.4), transparent),
    radial-gradient(1px 1px at 76% 86%, rgba(220, 230, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 24%, rgba(220, 230, 255, 0.45), transparent),
    radial-gradient(ellipse at 50% 120%, rgba(60, 90, 140, 0.28), transparent 70%),
    rgba(30, 50, 90, 0.16);
  background-size: 320px 320px, 260px 260px, 400px 400px, 300px 300px, 360px 360px, 100% 100%, 100% 100%;
  animation: spores 18s linear infinite;
}
@keyframes spores {
  to { background-position: 40px -320px, -30px -260px, 60px -400px, -20px -300px, 30px -360px, 0 0, 0 0; }
}

/* Lights flicker out during the flip. */
.upside-flicker body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: #000;
  animation: lights-out 0.9s steps(1, end) forwards;
}
@keyframes lights-out {
  0%, 20%, 34% { opacity: 0; }
  10%, 26% { opacity: 0.7; }
  42%, 62% { opacity: 1; }
  100% { opacity: 0; }
}

.upside-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  z-index: 80;
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  background: var(--glass);
  box-shadow: 0 0 18px var(--red-glow);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  pointer-events: none;
}
.upside-toast.is-shown { animation: toast 4.5s ease forwards; }
.upside-down .upside-toast { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 1.5rem); }
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 0.5rem); }
  8%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ---------- Home-screen app (the .is-app class, set in head.html) ---------- */
/* Opened as a web app, there's no Safari toolbar. So a Back button waits in
   the bottom-left corner (page.js: up to the list, or home). In Safari it
   never shows. */
.app-back {
  position: fixed;
  left: var(--gutter);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  z-index: 55;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  color: var(--text);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.app-back:hover,
.app-back:focus-visible { color: var(--red-bright); border-color: var(--red-bright); outline: none; }
html:not(.is-app) .app-back { display: none; }

/* Room for it: the page can scroll clear of it, the bars that slide up from
   the bottom (Start cooking, the timer tray) start to its right, and the
   pop-up notes (Removed, Undo) sit above it. In cook mode the tray lives in
   the dialog, which covers Back, so it keeps the full width there. */
.is-app body { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4.5rem); }
@media (max-width: 40rem) {
  .is-app .cook-start,
  .is-app body > .timers { left: calc(var(--gutter) + 3.5rem); }
}
.is-app .plan-toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 4.75rem); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .card:hover,
  .card:focus-within { transform: none; }
  .upside-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
}

@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header,
  .site-footer,
  .breadcrumb,
  .recipe-hero__media,
  .section-head__actions,
  .directions__hint,
  .cook,
  .timers,
  .app-back,
  .card__plan,
  .recipe-hero__actions,
  .plan-page .page-head__lede,
  .plan-page .directions__hint,
  .plan-shared,
  .plan-add,
  .plan-summary,
  .plan-faves,
  .plan-recipes__done,
  .plan-extra,
  .classified__bar,
  .pantry-summary__review,
  .shopping__action,
  .pantry,
  .plan-item__cook,
  .stepper button,
  .plan-item__remove,
  .plan-toast,
  .pager { display: none !important; }
  .recipe-hero__title,
  .page-title { color: #000; text-shadow: none; }
  .recipe-hero__summary,
  .stat dt,
  .source { color: #333; }
  .stat,
  .panel,
  .notes { background: none; border-color: #ccc; }
  .stat--total dd,
  .tag,
  .qty,
  .step__text strong,
  .eyebrow,
  .ingredients__group,
  .notes__title { color: #000; }
  .recipe-body { grid-template-columns: 1fr; }
  .upside-down body { flex-direction: column; }
  .upside-down body > * { transform: none; filter: none; }
  .upside-down body::after,
  .upside-toast { display: none; }
  .ingredients { position: static; max-height: none; overflow: visible; }
  .plan-layout { grid-template-columns: 1fr; gap: 1rem; }
  .plan-recipes { position: static; }
  .stepper { border: 0; }
  .stepper__value { color: #000; }
  .plan-item__title { color: #000; }
  .shopping__aisles { display: block; columns: 2; column-gap: 2rem; }
  .aisle { break-inside: avoid; }
  .shopping__from { color: #555; }
  .step { break-inside: avoid; border-color: #ddd; }
  .step__num { color: #000; border-color: #000; box-shadow: none; }
  .step.is-done .step__body { opacity: 1; }
  .check__box { border-color: #000; }
  .check input:checked ~ .check__text { color: #000; text-decoration: none; }
}

