/* Ede Bene styles. Read docs/DESIGN.md before changing this file.

   The look is "Market Stall" (approved Nov 17, 2026): a farmers-market stall. Loud, friendly and
   rounded: cream ground, 3px ink outlines, hard offset shadows with no blur, pill buttons, and
   round tilted "stickers" that carry the key numbers. Bricolage Grotesque throughout.

   Order of this file: tokens, base, labels, page frame, buttons and forms, messages,
   recipe card, week, prep, groceries, recipe page, landing, print.

   The site's security policy blocks inline styles (style="..."), so every size and colour
   lives here as a class. Bars use <progress> or SVG attributes. */

@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  /* the stall's palette (docs/DESIGN.md) */
  --ground: #fff4d6;        /* page background, cream fills */
  --ink: #17150f;           /* text, 3px outlines, hard shadows */
  --card: #ffffff;          /* cards */
  --green: #1f6b3a;         /* hero and summary panels, protein, "on", primary confirm */
  --tomato: #b42d1b;        /* main call to action, today, destructive text */
  --mustard: #f2b705;       /* calorie stickers, highlights, active phone tab, step numbers */
  --lettuce: #9ccb6b;       /* lunch tile, prep day, selected day */
  --tomato-light: #e8614c;  /* dinner tile, must-not-miss pills */
  --plum: #d9b6dc;          /* snack tile */
  --pink: #f4a6b8;          /* shake tile */
  --on-dark: #fff4d6;       /* text on ink or green */
  --on-color: #ffffff;      /* text on tomato or green stickers */
  --tomato-text: var(--tomato); /* tomato words on the ground or a card (lighter in dark mode) */
  --shade: var(--ink);      /* hard shadows (pure black in dark mode) */
  --on-fill: #17150f;       /* text and drawing lines ON a coloured fill (mustard, lettuce, tiles):
                               stays dark in dark mode, where --ink turns cream */
  --cream: #fff4d6;         /* fixed cream and white for drawing fills: same in both modes */
  --paper: #ffffff;
  /* dark mode values (approved Nov 17). Applied by the dark-mode blocks below; never used directly */
  --dk-ground: #15130e;
  --dk-card: #24211a;
  --dk-ink: #fff4d6;
  --dk-shade: #000000;
  --dk-l-breakfast: #f2b705;
  --dk-l-lunch: #9ccb6b;
  --dk-l-dinner: #ff8a75;
  --dk-l-snack: #d9b6dc;
  --dk-l-shake: #f4a6b8;
  --dk-tomato-text: #ff8a75;
  --dk-muted: #cfc3a3;      /* secondary text on the dark ground and dark cards */
  --dk-line: #4a4436;
  --dk-soft-green: #23351f;
  --dk-soft-tomato: #42211a;
  --dk-note: #3a3216;
  /* small label text on white, one per meal type */
  --l-breakfast: #7a5b00;
  --l-lunch: #1f6b3a;
  --l-dinner: #b42d1b;
  --l-snack: #6d3a72;
  --l-shake: #9b2c4b;
  /* quiet helpers for the pages not yet redrawn (prep, groceries, setup, account) */
  --muted: #57503f;         /* secondary text: 7:1 on ground and on white */
  --line: #e3d3a6;          /* quiet dividers on ground and white */
  --soft-green: #e1efd2;    /* done, fresh, info panels */
  --soft-tomato: #fbe1db;   /* errors */
  --note: #ffe9a3;          /* reminders ("take it out of the freezer tonight") */
  /* meal tiles: the colour says when you eat it */
  --t-breakfast: var(--mustard);
  --t-lunch: var(--lettuce);
  --t-dinner: var(--tomato-light);
  --t-snack: var(--plum);
  --t-salad: var(--lettuce);
  --t-shake: var(--pink);
  --t-treat: var(--plum);
  /* type */
  --text: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --step--2: 0.8125rem;   /* 13 */
  --step--1: 0.9375rem;   /* 15 */
  --step-0: 1.0625rem;    /* 17 */
  --step-1: 1.3125rem;    /* 21 */
  --step-2: 1.6875rem;    /* 27 */
  --step-3: 2.375rem;     /* 38 */
  --step-4: 3.25rem;      /* 52 */
  --step-5: 4.5rem;       /* 72 */
  /* shape */
  --rule: 3px;            /* the ink outline on almost everything */
  --rule-s: 2.5px;        /* outlines on small things (phone tiles, pills inside cards) */
  --r-hero: 40px;         /* hero and summary panels (28px on a phone) */
  --r-card: 32px;         /* cards (24px on a phone) */
  --r-box: 24px;          /* fact boxes, steps, day buttons */
  --r-tile: 18px;         /* tiles and inputs */
  --pill: 999px;          /* buttons, tags, chips */
  --shadow-hero: 10px 10px 0 var(--shade);
  --shadow-card: 8px 8px 0 var(--shade);
  --shadow-card-m: 5px 5px 0 var(--shade);
  --shadow-btn: 3px 3px 0 var(--shade);
  --gutter: 1rem;
  --tabs-h: 4.6rem;
}
@media (min-width: 40rem) { :root { --gutter: 2rem; } }

/* ---------- dark mode: tokens only (Account → Light or dark) ----------
   "Dark" always; "Match my device" follows the phone or computer setting. Outlines and text turn
   cream, cards and ground go dark, shadows pure black. Green, tomato, mustard and the tile colours
   stay as they are, and anything on them keeps dark text (--on-fill). */
html[data-theme="dark"] {
  --ground: var(--dk-ground); --card: var(--dk-card); --ink: var(--dk-ink); --shade: var(--dk-shade);
  --on-dark: var(--dk-ink);
  --l-breakfast: var(--dk-l-breakfast); --l-lunch: var(--dk-l-lunch); --l-dinner: var(--dk-l-dinner);
  --l-snack: var(--dk-l-snack); --l-shake: var(--dk-l-shake);
  --muted: var(--dk-muted); --tomato-text: var(--dk-tomato-text); --line: var(--dk-line); --soft-green: var(--dk-soft-green);
  --soft-tomato: var(--dk-soft-tomato); --note: var(--dk-note);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --ground: var(--dk-ground); --card: var(--dk-card); --ink: var(--dk-ink); --shade: var(--dk-shade);
    --on-dark: var(--dk-ink);
    --l-breakfast: var(--dk-l-breakfast); --l-lunch: var(--dk-l-lunch); --l-dinner: var(--dk-l-dinner);
    --l-snack: var(--dk-l-snack); --l-shake: var(--dk-l-shake);
    --muted: var(--dk-muted); --tomato-text: var(--dk-tomato-text); --line: var(--dk-line); --soft-green: var(--dk-soft-green);
    --soft-tomato: var(--dk-soft-tomato); --note: var(--dk-note);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 500 var(--step-0)/1.5 var(--text); }
h1, h2, h3 { line-height: 1.05; margin: 0 0 0.5em; font-weight: 800; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: var(--step-3); line-height: 0.92; letter-spacing: -0.04em; text-transform: uppercase; }
h2 { font-size: var(--step-2); margin-top: 2em; letter-spacing: -0.03em; text-transform: uppercase; }
h3 { font-size: var(--step-1); margin-top: 1.4em; }
p { margin: 0 0 1em; max-width: 66ch; }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--tomato-text); }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 4px; }
small, .quiet { color: var(--muted); font-size: var(--step--1); }
ul, ol { padding-left: 1.3em; }
hr { border: 0; border-top: 2px dashed var(--ink); margin: 2rem 0; }
[hidden] { display: none !important; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 1.2rem var(--gutter) 4rem; }
.wrap.wide { max-width: 72rem; }
.lead { font-size: var(--step-1); line-height: 1.4; max-width: 44ch; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--ground); padding: 0.6rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

/* ---------- labels ----------
   .tape is the small loud label (store names on the grocery list, the role on a recipe). In the
   stall look it is a mustard pill with an ink outline. .kicker is the small uppercase line above a
   heading ("Breakfast", "Tuesday"). */
.tape {
  display: inline-block; background: var(--mustard); color: var(--on-fill); font-weight: 800; font-size: var(--step--1);
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2; text-decoration: none;
  padding: 0.3em 0.9em; border: var(--rule-s) solid var(--ink); border-radius: var(--pill);
}
.kicker { display: block; font-size: var(--step--2); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.25; }
@media (min-width: 40rem) { .kicker { font-size: 0.875rem; } }
.kicker.breakfast { color: var(--l-breakfast); }
.kicker.lunch, .kicker.salad { color: var(--l-lunch); }
.kicker.dinner { color: var(--l-dinner); }
.kicker.snack, .kicker.treat { color: var(--l-snack); }
.kicker.shake { color: var(--l-shake); }
.pill { display: inline-flex; align-items: center; gap: 0.35em; border: var(--rule-s) solid var(--ink); border-radius: var(--pill); padding: 0.2em 0.85em; font-weight: 800; line-height: 1.3; background: var(--card); }
.pill.dark { background: var(--ink); color: var(--ground); border-color: var(--ink); letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--step--1); }
.pill.paid { background: var(--mustard); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1em 0.6em; border-width: 2px; color: var(--on-fill); }

/* ---------- page frame ---------- */
.bar { background: transparent; }
.bar-in { max-width: 72rem; margin: 0 auto; padding: 0.9rem var(--gutter) 0.2rem; display: flex; align-items: center; gap: 0.4rem 1.2rem; flex-wrap: wrap; }
@media (min-width: 48rem) { .bar-in { padding-top: 1.4rem; } }
/* The logo (views/logo.tsx): the green block, 72px wide on a phone and 84px from tablet up. Its
   outline follows the ink colour (cream in dark mode); the hard shadow is drawn here. */
.brand { display: block; line-height: 0; border-radius: 9px; }
.brand .logo { display: block; width: 4.5rem; height: auto; border-radius: 7px; box-shadow: var(--shadow-btn); }
.logo-edge { stroke: var(--ink); }
@media (min-width: 48rem) { .brand .logo { width: 5.25rem; border-radius: 8px; } }
.topnav { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; margin-left: auto; font-weight: 700; }
.topnav a { color: var(--ink); text-decoration: none; padding: 0.55rem 1.1rem; border: var(--rule) solid transparent; border-radius: var(--pill); }
.topnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.topnav a:hover { border-color: var(--ink); color: var(--ink); }
.topnav a[aria-current="page"]:hover { color: var(--on-dark); }

/* phone: the five sections move to a bar under the thumb */
.tabs { display: none; }
@media (max-width: 47.99rem) {
  .signed-in .topnav { display: none; }
  .signed-in .wrap { padding-bottom: calc(var(--tabs-h) + 3rem); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    background: var(--card); border-top: var(--rule) solid var(--ink); padding: 0.5rem 0.375rem calc(0.875rem + env(safe-area-inset-bottom));
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 3.5rem; color: var(--ink); text-decoration: none; font-size: 0.6875rem; font-weight: 800; line-height: 1.15; text-align: center; border: var(--rule-s) solid transparent; border-radius: 16px; }
  .tabs .icon { width: 1.5rem; height: 1.5rem; stroke-width: 2.2; }
  .tabs a[aria-current="page"] { background: var(--mustard); border-color: var(--ink); color: var(--on-fill); }
  .tabs a:focus-visible { outline-offset: -3px; }
}

.foot { border-top: 2px dashed var(--ink); margin-top: 3.5rem; padding-top: 1.2rem; color: var(--muted); font-size: var(--step--1); }
.foot a { color: var(--muted); margin-right: 1rem; }

/* ---------- buttons and forms ----------
   Buttons are pills with an ink outline and a small hard shadow. .btn is the main call to action
   (tomato); .plain is white; .soft is cream (Swap); .go is green (Save, confirm). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; min-height: 3rem; font: 800 var(--step-0)/1.2 var(--text);
  padding: 0.6em 1.3em; border-radius: var(--pill); border: var(--rule) solid var(--ink); background: var(--tomato); color: var(--on-color);
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-btn);
}
.btn:hover { color: var(--on-color); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shade); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.btn.plain { background: var(--card); color: var(--ink); }
.btn.soft { background: var(--ground); color: var(--ink); }
.btn.go { background: var(--green); color: var(--on-color); }
.btn.plain:hover, .btn.soft:hover { color: var(--ink); }
.btn.small { min-height: 2.75rem; font-size: var(--step--1); padding: 0.35em 1.1em; }
.btn.danger { background: var(--card); color: var(--tomato-text); border-color: var(--tomato); box-shadow: none; }
.btn.danger:hover { background: var(--soft-tomato); }
.btn.busy, .btn.busy:hover { cursor: progress; opacity: 0.85; transform: none; }
.spinner { width: 1em; height: 1em; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; flex: none; }
.btn[aria-pressed="true"] { background: var(--green); color: var(--on-color); }
.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin: 1.2rem 0; }
form.inline { display: inline; }
.backlink { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; font-weight: 800; text-decoration: none; }
.backlink .icon { stroke-width: 2.6; }
.backlink:hover { text-decoration: underline; }

/* Labels, inputs and selects: white boxes with the 3px ink outline and rounded corners. The focus
   ring is tomato. Selects draw their own arrow (two ink triangles) so they match on every phone. */
label { font-weight: 800; display: block; margin-bottom: 0.35rem; line-height: 1.25; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  font: 500 var(--step-0)/1.3 var(--text); color: var(--ink); background: var(--card); border: var(--rule) solid var(--ink); border-radius: var(--r-tile);
  padding: 0.65em 0.9em; width: 100%; max-width: 22rem; min-height: 3.25rem;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="text"]:focus-visible, input[type="email"]:focus-visible, input[type="number"]:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--tomato); outline-offset: 2px; border-radius: var(--r-tile); box-shadow: var(--shadow-btn);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer; font-weight: 700;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.35rem) 55%, calc(100% - 0.95rem) 55%; background-size: 0.42rem 0.42rem; background-repeat: no-repeat;
}
textarea { max-width: none; resize: vertical; background: var(--ground); }
input.code { font-size: var(--step-3); font-weight: 800; letter-spacing: 0.3em; padding-left: 1.1em; max-width: 15rem; text-align: center; min-height: 4.5rem; }
.field { margin-bottom: 1.25rem; }
.row { display: flex; gap: 0.25rem 1rem; flex-wrap: wrap; }
/* Fields side by side keep their boxes level when one label runs to two lines. */
.row .field { flex: 1 1 8rem; max-width: 12rem; display: flex; flex-direction: column; justify-content: flex-end; }
.hint { color: var(--muted); font-size: var(--step--1); margin: 0.2rem 0 0.6rem; max-width: 60ch; line-height: 1.4; }
fieldset { border: 0; padding: 0; margin: 0 0 2.5rem; min-width: 0; }
legend:focus { outline: none; }
legend { font-size: var(--step-2); font-weight: 800; padding: 0; margin-bottom: 0.6rem; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
@media (min-width: 40rem) { legend { font-size: var(--step-3); } }
.group-label { font-weight: 800; font-size: var(--step-1); line-height: 1.15; letter-spacing: -0.01em; margin: 1.8rem 0 0.4rem; }
.sub-label { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 1rem 0 0.3rem; }

/* choice chips: real checkboxes and radios, styled as pills. Picked: green with a tick.
   .chip.stop (allergies, foods to leave out, cuisines to avoid): tomato with a cross. */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0.5rem 0 0.7rem; }
.chip { position: relative; margin: 0; font-weight: 800; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: flex; align-items: center; gap: 0.35em; min-height: 2.75rem; padding: 0.4em 1.05em; background: var(--card); color: var(--ink); border: var(--rule-s) solid var(--ink); border-radius: var(--pill); line-height: 1.2; }
.chip:hover input:not(:checked):not(:disabled) + span { background: var(--ground); }
.chip input:checked + span { background: var(--green); color: var(--on-dark); box-shadow: var(--shadow-btn); }
.chip input:checked + span::before { content: "✓"; font-weight: 800; }
.chip input:focus-visible + span { outline: 3px solid var(--tomato); outline-offset: 2px; }
.chip.stop input:checked + span { background: var(--tomato); color: var(--on-color); }
.chip.stop input:checked + span::before { content: "✕"; }
.chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.pick { margin-bottom: 0.4rem; }
.pick-count { font-weight: 800; color: var(--ink); }
.pick-count.done { color: var(--green); }
.pick-count.done::before { content: "✓ "; }

/* big answer cards (radios): a round mark on the left; picked is mustard and lifted */
.choices { display: grid; gap: 0.75rem; margin: 0.6rem 0; }
.choice { position: relative; margin: 0; font-weight: 500; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice > span { position: relative; display: block; height: 100%; padding: 0.85em 1.1em 0.85em 3.3rem; background: var(--card); color: var(--ink); border: var(--rule) solid var(--ink); border-radius: 22px; line-height: 1.35; font-size: var(--step--1); }
.choice > span::before { content: ""; position: absolute; left: 1rem; top: 0.95em; width: 1.4rem; height: 1.4rem; border: var(--rule) solid currentColor; border-radius: 50%; background: var(--card); }
.choice b { display: block; font-weight: 800; font-size: var(--step-0); margin-bottom: 0.1rem; }
.choice b .pill.paid { margin-left: 0.4em; vertical-align: 0.15em; }
.choice:hover input:not(:checked) + span { background: var(--ground); }
.choice input:checked + span { background: var(--mustard); color: var(--on-fill); box-shadow: var(--shadow-btn); transform: translate(-2px, -2px); }
.choice input:checked + span::before { background: radial-gradient(circle, var(--on-fill) 0 0.3rem, transparent 0.34rem); }
.choice input:focus-visible + span { outline: 3px solid var(--tomato); outline-offset: 2px; }

/* setup, one step at a time. app.js writes "Step 2 of 7" and a <progress> into .progress. */
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 0 0 1.25rem; max-width: none; }
.progress:empty { display: none; }
.progress progress { flex: 1 1 12rem; height: 1.25rem; border-width: var(--rule); }
.progress progress::-webkit-progress-value { background: repeating-linear-gradient(-45deg, var(--mustard) 0 0.6rem, var(--tomato-light) 0.6rem 1.2rem); border-right: var(--rule) solid var(--ink); }
.progress progress::-moz-progress-bar { background: repeating-linear-gradient(-45deg, var(--mustard) 0 0.6rem, var(--tomato-light) 0.6rem 1.2rem); }
.steps-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.75rem; }
.steps-nav [data-next], .steps-nav [data-submit] { margin-left: auto; }
@media (max-width: 47.99rem) {
  /* keep Back and Next in reach, above the tab bar */
  .steps-nav { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); background: var(--ground); padding: 0.75rem 0 0.9rem; border-top: 2px dashed var(--ink); z-index: 5; margin-top: 1.25rem; }
  .steps-nav .btn { flex: 1 1 0; }
  .steps-nav .btn[hidden] { display: none; }
}

progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 0.875rem; border: var(--rule-s) solid var(--ink); border-radius: var(--pill); background: var(--card); overflow: hidden; color: var(--ink); }
progress::-webkit-progress-bar { background: var(--card); }
progress::-webkit-progress-value { background: var(--ink); border-radius: var(--pill); }
progress::-moz-progress-bar { background: var(--ink); border-radius: var(--pill); }
progress.done::-webkit-progress-value { background: var(--green); }
progress.done::-moz-progress-bar { background: var(--green); }

/* ---------- messages and panels ---------- */
.flash { background: var(--card); border: var(--rule) solid var(--ink); border-radius: var(--r-tile); padding: 0.8rem 1.1rem; margin: 0 0 1.4rem; max-width: none; font-weight: 700; box-shadow: var(--shadow-btn); }
.flash.bad { background: var(--soft-tomato); border-color: var(--tomato); color: var(--ink); box-shadow: 3px 3px 0 var(--tomato); }
.panel { background: var(--card); border: var(--rule) solid var(--ink); border-radius: var(--r-box); padding: 1.1rem 1.3rem; margin: 1.2rem 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h2, .panel h3 { margin-top: 0; font-size: var(--step-1); }
.panel ul { margin: 0.4rem 0 0.6rem; padding-left: 1.2rem; }
.panel p { max-width: none; }
.tonight { background: var(--note); border: var(--rule-s) solid var(--ink); border-radius: var(--r-tile); padding: 0.7rem 1rem; margin: 1rem 0 0; max-width: none; font-weight: 700; }

/* ---------- line drawings (src/worker/views/drawings.tsx) ----------
   Outline is currentColor (ink); fills come from these classes, never from colours in the markup. */
.drawing { display: block; flex: none; width: 7rem; height: 7rem; color: var(--ink); }
.drawing.sm { width: 4.75rem; height: 4.75rem; }
.drawing.lg { width: 9rem; height: 9rem; }
.drawing.xl { width: 14.5rem; height: 14.5rem; }
.drawing .f-cream { fill: var(--cream); }
/* lines of a drawing that sits on a coloured tile stay dark in dark mode */
.tile .drawing, .hero-tile .drawing, .on-fill .drawing { color: var(--on-fill); }
.drawing .f-white { fill: var(--paper); }
.drawing .f-mustard { fill: var(--mustard); }
.drawing .f-tomato { fill: var(--tomato); }
.drawing .f-lettuce { fill: var(--lettuce); }
.drawing .f-green { fill: var(--green); }
.drawing .f-tomato-light { fill: var(--tomato-light); }
.drawing .f-plum { fill: var(--plum); }
.drawing .f-pink { fill: var(--pink); }

/* tiles: a coloured square holding a drawing. The colour says when you eat it. */
.tile { display: grid; place-items: center; width: 6rem; height: 6rem; flex: none; border: var(--rule-s) solid var(--ink); border-radius: var(--r-tile); background: var(--ground); color: var(--ink); }
.tile .drawing { width: 80%; height: 80%; }
.tile.small { width: 3.25rem; height: 3.25rem; border-radius: 14px; }
.tile.small .drawing { width: 86%; height: 86%; }
.tile.big { width: 9rem; height: 9rem; }
.tile.breakfast, .hero-tile.breakfast { background: var(--t-breakfast); color: var(--on-fill); }
.tile.lunch, .hero-tile.lunch { background: var(--t-lunch); color: var(--on-fill); }
.tile.dinner, .hero-tile.dinner { background: var(--t-dinner); color: var(--on-fill); }
.tile.snack, .hero-tile.snack { background: var(--t-snack); color: var(--on-fill); }
.tile.salad, .hero-tile.salad { background: var(--t-salad); color: var(--on-fill); }
.tile.shake, .hero-tile.shake { background: var(--t-shake); color: var(--on-fill); }
.tile.treat, .hero-tile.treat { background: var(--t-treat); color: var(--on-fill); }

/* ---------- stickers: round, tilted, outlined numbers ----------
   Markup from Sticker / Stats in cards.tsx. Mustard = calories, green = protein, cream = the rest.
   Each place that uses them sets the size; .card-stickers turn into flat pills on a phone. */
.stickers { display: flex; flex-wrap: wrap; align-items: center; margin: 0; max-width: none; }
.sticker {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  width: 6.5rem; height: 6.5rem; border: var(--rule) solid var(--ink); border-radius: 50%; background: var(--ground); color: var(--ink);
  font-weight: 800; line-height: 1; text-align: center; font-size: 0.875rem;
}
.sticker b { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.02em; }
.sticker small { font-size: 0.75rem; font-weight: 700; margin-top: 3px; color: inherit; }
.sticker.cal { background: var(--mustard); color: var(--on-fill); }
.sticker.protein { background: var(--green); color: var(--on-color); }
.phone-only { display: none !important; }
@media (max-width: 39.99rem) { .phone-only { display: revert !important; } .desk-only { display: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- recipe card ----------
   Markup comes from RecipeCard in src/worker/views/cards.tsx. Do not rebuild it by hand.
   Phone (under 40 rem): sideways. Tile with Swap under it on the left; label, title, time and two
   number pills on the right. From 40 rem: tile on top, stickers overlapping the top edge. */
.cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.125rem; grid-template-columns: minmax(0, 1fr); }
.cards > li { display: grid; }
.card {
  position: relative; display: grid; grid-template-columns: 6rem minmax(0, 1fr); grid-template-areas: "tile body" "foot body"; align-content: start;
  gap: 0.5rem 0.875rem; padding: 0.75rem; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-card-m);
}
.card-tile { grid-area: tile; }
.card-body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.card-body > * { margin: 0; }
.card-title { font-size: var(--step-1); line-height: 1.05; letter-spacing: -0.02em; text-wrap: pretty; }
.card-title a { color: var(--ink); text-decoration: none; outline: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 3px; }
.card-title a:focus-visible::after { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 24px; }
.card-meta { font-size: var(--step--1); font-weight: 500; }
.card-note { font-size: var(--step--1); line-height: 1.35; color: var(--muted); }
.card-stickers { gap: 0.375rem; margin-top: auto !important; padding-top: 0.25rem; }
.card-stickers .sticker { flex-direction: row; gap: 0.25em; width: auto; height: auto; border-width: var(--rule-s); border-radius: var(--pill); padding: 0.2rem 0.6rem; font-size: var(--step--1); line-height: 1.2; }
.card-stickers .sticker b { font-size: inherit; letter-spacing: 0; }
.card-foot { grid-area: foot; display: flex; flex-direction: column; gap: 0.5rem; }
.card-foot form, .card-foot .btn { position: relative; z-index: 1; margin: 0; }
.card-foot form .btn { width: 100%; }
.card-foot .btn { box-shadow: none; }
.card-foot .source { display: none; }
/* A meal card's one "Change" button (a <details>, so it works without JavaScript); opening it shows Swap and Skip. */
.card-change { position: relative; z-index: 1; margin: 0; }
.card-change > summary { list-style: none; cursor: pointer; width: 100%; box-shadow: none; user-select: none; }
.card-change > summary::-webkit-details-marker { display: none; }
.card-change[open] > summary.btn, .card-change[open] > summary.btn:hover { background: var(--ink); color: var(--card); }
.card-acts { display: flex; flex-direction: column; gap: 0.375rem; margin-top: 0.375rem; }
.card-acts > * { margin: 0; }
.card-acts .btn { width: 100%; }
.card.skipped .card-title { color: var(--muted); text-decoration: line-through; }
.cards > .day-skip { grid-column: 1 / -1; }
.day-skip form { margin: 0; }
.day-skip .btn { width: 100%; box-shadow: none; }
.flash .flash-act { margin: 0.625rem 0 0; }
.flash > p { margin: 0; }
.card.out { border-style: dashed; background: transparent; box-shadow: none; }
/* "Add a simple snack" (AddSnackCard): the dashed OutCard look; the whole card is the link. */
.card.add-snack:hover, .card.add-snack:focus-within { background: var(--card); }
.card.add-snack .card-title a { color: var(--ink); }
.card-foot .btn.add-btn { white-space: nowrap; padding-left: 0.5rem; padding-right: 0.5rem; }  /* "Add to Wed" on the snack page */

@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.75rem 2rem; margin-top: 3.25rem; }
  .card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tile" "body" "foot"; grid-template-rows: auto 1fr auto; gap: 0; padding: 0; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
  .card-tile { width: auto; height: 9.375rem; border: 0; border-bottom: var(--rule) solid var(--ink); border-radius: 29px 29px 0 0; place-items: end start; padding: 0 0 0.625rem 1.375rem; }
  .card-tile .drawing { width: 7rem; height: 7rem; }
  .card-body { padding: 1.125rem 1.375rem 0; gap: 0.625rem; }
  .card-title { font-size: var(--step-2); line-height: 1.04; }
  .card-meta { font-size: 1rem; }
  .card-title a:focus-visible::after { border-radius: var(--r-card); }
  .card-stickers { position: absolute; top: -1.5rem; right: 0.875rem; padding: 0; gap: 0; flex-wrap: nowrap; }
  .card-stickers .sticker { flex-direction: column; gap: 0; width: 5.5rem; height: 5.5rem; padding: 0; border-width: var(--rule); border-radius: 50%; font-size: 0.8125rem; line-height: 1; }
  .card-stickers .sticker b { font-size: 1.625rem; }
  .card-stickers .sticker.cal { transform: rotate(-8deg); }
  .card-stickers .sticker.protein { margin-left: -0.75rem; transform: rotate(7deg); }
  .cards > li:nth-child(even) .card-stickers .sticker.cal { transform: rotate(6deg); }
  .cards > li:nth-child(even) .card-stickers .sticker.protein { transform: rotate(-6deg); }
  .card-foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.625rem; padding: 0.875rem 1.375rem 1.375rem; }
  .card-foot .source { display: inline-flex; }
  .card-change { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
  .card-change > summary { width: auto; }
  .card-acts { flex-direction: row; gap: 0.5rem; margin-top: 0; }
  .card-acts .btn { width: auto; }
  .card-foot form .btn { width: auto; }
  .card-foot .btn { box-shadow: var(--shadow-btn); }
  .card.out .card-tile { border-bottom-style: dashed; }
}
@media (min-width: 62rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.source { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: var(--pill); padding: 0.2rem 0.85rem; font-size: var(--step--1); font-weight: 700; line-height: 1.3; }

/* the mustard Groceries tile at the end of a day's cards, and the lettuce prep-day strip */
.promo { display: flex; flex-direction: column; gap: 0.375rem; width: 100%; padding: 1.125rem; background: var(--mustard); color: var(--on-fill); text-decoration: none; border: var(--rule) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-card-m); }
.promo:hover, .prep-strip:hover { color: var(--ink); }
.promo-title { display: block; font-size: 1.625rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.prep-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.125rem; padding: 1.125rem; background: var(--lettuce); color: var(--on-fill); text-decoration: none; border: var(--rule) solid var(--ink); border-radius: 24px; }
.prep-strip > span:first-child { display: flex; flex-direction: column; gap: 0.25rem; }
.prep-strip .pill { display: none; }
@media (min-width: 40rem) {
  .promo { justify-content: space-between; gap: 1rem; min-height: 13.75rem; padding: 1.75rem; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
  .promo-title { font-size: 2.25rem; line-height: 0.98; }
  .promo > span:last-child { font-size: 1.125rem; }
  .prep-strip { margin-top: 3.5rem; padding: 1.5rem 2rem; border-radius: var(--r-card); }
  .prep-strip .promo-title { font-size: 1.875rem; }
  .prep-strip .pill { display: inline-flex; padding: 0.6rem 1.4rem; font-size: var(--step-0); letter-spacing: 0; text-transform: none; }
}

/* ---------- week ---------- */
.page-head { display: grid; gap: 0.2rem 2rem; align-items: end; margin-bottom: 0.4rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0.6rem 0 0; color: var(--muted); max-width: 60ch; }
.page-head .actions { margin: 0.9rem 0 0; }
@media (min-width: 52rem) { .page-head.split { grid-template-columns: 1fr auto; } }
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1rem; }
.week-head h1 { font-size: clamp(3.25rem, 7vw, 5.5rem); line-height: 0.9; }
.title-row .pill { font-size: var(--step--1); padding: 0.3rem 0.9rem; }
@media (min-width: 40rem) { .week-head { margin-top: 1.5rem; } .title-row .pill { font-size: var(--step-0); padding: 0.4rem 1.1rem; } }

/* seven day buttons: today in tomato, prep day in lettuce; the picked day is lifted with a shadow */
.days { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 1.25rem 0 0; padding: 0; }
.days button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 4rem; padding: 0;
  background: var(--card); color: var(--ink); border: var(--rule-s) solid var(--ink); border-radius: 16px; font: 800 1rem/1 var(--text); cursor: pointer;
}
.days .dow { font-size: 0.75rem; }
.days .dow-long { display: none; }
.days .dom { font-size: 1.25rem; line-height: 1; }
.days button.prep { background: var(--lettuce); color: var(--on-fill); }
.days button.today { background: var(--tomato); color: var(--on-color); }
.days button[aria-selected="true"] { box-shadow: var(--shadow-btn); transform: translate(-2px, -2px); }
.days button[aria-selected="true"]:not(.today):not(.prep) { background: var(--mustard); color: var(--on-fill); }
@media (min-width: 40rem) {
  .days { display: flex; flex-wrap: nowrap; gap: 0.75rem; margin-top: 2rem; }
  .days li { flex: 1 1 0; min-width: 0; }
  .days button { min-height: 5.25rem; border-width: var(--rule); border-radius: var(--r-box); }
  .days .dow { font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .days .dow-long { display: inline; }
  .days .dow-short { display: none; }
  .days .dom { font-size: 1.875rem; }
  .days button[aria-selected="true"] { box-shadow: 5px 5px 0 var(--shade); }
}
.week-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 1rem 0 0; }
.week-tools > :only-child { margin-left: auto; }
.week-tools form { margin: 0; }
/* Free weeks: "3 swaps left this week" (Nov 17). Greyed when none are left. */
.pill.counter { background: var(--card); }
.pill.counter.used { background: var(--ground); color: var(--muted); }

.day { margin-top: 1.25rem; }
.day-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
/* the green "day's numbers" panel: amounts only, no targets. Five stickers from 40 rem; on a phone
   calories and protein as stickers and one line of text for the rest. */
.numbers {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.875rem 0.75rem; padding: 1.125rem;
  background: var(--green); color: var(--on-dark); border: var(--rule) solid var(--ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--shade);
}
.numbers-head { display: flex; flex-direction: column; gap: 2px; }
.numbers .kicker { color: var(--mustard); }
.numbers-title { font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.day-stickers { flex-wrap: nowrap; }
.day-stickers .sticker { width: 5.5rem; height: 5.5rem; font-size: 0.8125rem; }
.day-stickers .sticker b { font-size: 1.5625rem; }
.day-stickers .sticker:nth-child(1) { transform: rotate(-6deg); }
.day-stickers .sticker:nth-child(2) { margin-left: -0.625rem; transform: rotate(6deg); }
.day-stickers .sticker:nth-child(n+3) { display: none; }
.numbers-line { grid-column: 1 / -1; margin: 0; font-size: var(--step--1); font-weight: 700; line-height: 1.3; }
@media (min-width: 40rem) {
  .numbers { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; margin-top: 2rem; padding: 1.75rem 2.25rem; border-radius: var(--r-hero); box-shadow: var(--shadow-card); }
  .numbers-head { gap: 4px; }
  .numbers .kicker { font-size: var(--step--1); }
  .numbers-title { font-size: 2.5rem; }
  .day-stickers { flex-wrap: wrap; gap: 0.75rem; }
  .day-stickers .sticker { display: inline-flex; width: 6.5rem; height: 6.5rem; font-size: 0.875rem; }
  .day-stickers .sticker b { font-size: 1.875rem; }
  .day-stickers .sticker:nth-child(n+3) { display: inline-flex; }
  .day-stickers .sticker:nth-child(1) { width: 7.75rem; height: 7.75rem; transform: rotate(-5deg); font-size: var(--step--1); }
  .day-stickers .sticker:nth-child(1) b { font-size: 2.25rem; }
  .day-stickers .sticker:nth-child(2) { margin-left: 0; transform: none; }
  .numbers-line { display: none; }
}
/* tablets: keep the five stickers on one row under the title */
@media (min-width: 40rem) and (max-width: 61.99rem) {
  .numbers { flex-direction: column; align-items: flex-start; }
  .day-stickers { flex-wrap: nowrap; gap: 0.5rem; }
  .day-stickers .sticker, .day-stickers .sticker:nth-child(n+3) { width: 5.25rem; height: 5.25rem; font-size: 0.8125rem; }
  .day-stickers .sticker b { font-size: 1.5rem; }
  .day-stickers .sticker:nth-child(1) { width: 6.25rem; height: 6.25rem; }
  .day-stickers .sticker:nth-child(1) b { font-size: 1.75rem; }
}

.rows { list-style: none; padding: 0; margin: 0.8rem 0; border-top: 2px dashed var(--ink); }
.rows li { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.9rem; align-items: center; padding: 0.7rem 0; border-bottom: 2px dashed var(--ink); }
.rows a { font-weight: 800; }
.rows .quiet { display: block; }

/* Owner test page (/lab) and the strip shown while looking at a test person. */
.testbar { background: var(--ink); color: var(--card); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding: 0.5rem var(--gutter); font-size: var(--step--1); }
.testbar a { color: var(--card); }
.testbar span { flex: 1 1 auto; }
.testbar form { margin: 0; }
.lab-list { list-style: none; padding: 0; margin: 0.6rem 0 0; border-top: 2px dashed var(--ink); }
.lab-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; padding: 0.9rem 0; border-bottom: 2px dashed var(--ink); }
.lab-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lab-list li.on { border-left: 6px solid var(--mustard); padding-left: 0.8rem; }
.lab-list li > div:first-child { flex: 1 1 18rem; }
.lab-list b { font-weight: 800; font-size: var(--step-1); line-height: 1.15; }
.lab-list .quiet { display: block; }
.lab-list form { margin: 0; }
.lab-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.two-up { display: grid; gap: 0 3rem; }
@media (min-width: 52rem) { .two-up { grid-template-columns: 1fr 1fr; } }

/* round "done" tick used on recipe steps */
.tick { position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin: 0; cursor: pointer; }
.tick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tick span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); font: 400 var(--step-1)/1 var(--text); color: var(--ink); }
.tick input:checked + span { background: var(--green); border-color: var(--green); color: transparent; }
.tick input:checked + span::after { content: ""; position: absolute; width: 0.55rem; height: 1rem; border: solid var(--card); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.tick input:focus-visible + span { outline: 3px solid var(--tomato); outline-offset: 2px; }

/* ---------- grocery-style check lists (.checks, used on the week page) ---------- */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks label { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.7rem; padding: 0.75rem 0; margin: 0; font-weight: 400; cursor: pointer; align-items: baseline; min-height: 2.9rem; }
.checks input { width: 1.35rem; height: 1.35rem; accent-color: var(--green); transform: translateY(0.2rem); margin: 0; }
.checks .amt { font-weight: 700; white-space: nowrap; }
.checks .for { display: block; color: var(--muted); font-size: var(--step--1); }
.checks input:checked ~ span { text-decoration: line-through; color: var(--muted); }

/* ---------- recipe page ----------
   Hero card (tile with the drawing, name, "Per serving" pill, stickers, the numbers line), fact
   boxes, ingredients beside steps from 58 rem, mustard step numbers, tomato must-not-miss pills,
   and "How was it?" at the bottom. */
.recipe-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.recipe-top .btn { margin: 0; }
.recipe-hero { display: flex; flex-direction: column; margin-top: 0.75rem; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--shade); }
.hero-tile { position: relative; display: flex; align-items: center; height: 10.625rem; padding-left: 1.125rem; border-bottom: var(--rule) solid var(--ink); border-radius: 25px 25px 0 0; }
.hero-tile .drawing { width: 8.75rem; height: 8.75rem; }
.hero-stickers { position: absolute; right: 0.875rem; top: 2.375rem; flex-wrap: nowrap; }
.hero-stickers .sticker { width: 5.75rem; height: 5.75rem; font-size: 0.8125rem; }
.hero-stickers .sticker b { font-size: 1.75rem; }
.hero-stickers .sticker.cal { transform: rotate(-7deg); }
.hero-stickers .sticker.protein { margin-left: -0.75rem; transform: rotate(6deg); }
.hero-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 1rem 1.125rem 1.125rem; }
.hero-body > * { margin: 0; }
.hero-body h1 { font-size: 2.375rem; line-height: 0.94; }
.hero-body .pill.dark { font-size: 0.8125rem; padding: 0.3rem 0.9rem; }
.recipe-stickers { display: none; }
.numbers-line.phone-only { margin: 0; }
.disclaimer { font-size: var(--step--2); line-height: 1.4; max-width: 35rem; }
@media (min-width: 40rem) {
  .recipe-hero { flex-direction: row; flex-wrap: wrap; border-radius: var(--r-hero); box-shadow: var(--shadow-hero); }
  .hero-tile { flex: 1 1 18.75rem; height: auto; min-height: 17.5rem; justify-content: center; padding: 1.5rem; border: 0; border-radius: 37px; }
  .hero-tile .drawing { width: 14.5rem; height: 14.5rem; }
  .hero-body { flex: 2 1 30rem; gap: 1.25rem; padding: 2rem 2.25rem; }
  .hero-body h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 0.92; }
  .hero-body .pill.dark { font-size: var(--step--1); padding: 0.35rem 1rem; }
  .recipe-stickers { display: flex; gap: 0.625rem; }
  .recipe-stickers .sticker { width: 5.5rem; height: 5.5rem; font-size: 0.8125rem; }
  .recipe-stickers .sticker b { font-size: 1.5625rem; }
  .recipe-stickers .sticker.cal, .recipe-stickers .sticker.protein { width: 6.75rem; height: 6.75rem; font-size: 0.875rem; }
  .recipe-stickers .sticker.cal b, .recipe-stickers .sticker.protein b { font-size: 2.125rem; }
  .recipe-stickers .sticker.cal { transform: rotate(-6deg); }
  .recipe-stickers .sticker.protein { transform: rotate(5deg); }
  .disclaimer { font-size: var(--step--1); }
}

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; margin: 1.125rem 0; }
.facts div { display: flex; flex-direction: column; background: var(--card); border: var(--rule-s) solid var(--ink); border-radius: var(--r-tile); padding: 0.625rem 0.875rem; }
.facts div.mine { background: var(--mustard); color: var(--on-fill); }
.facts dt { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 0; font-size: 1.375rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.facts dd small { display: block; font-size: var(--step--2); font-weight: 500; letter-spacing: 0; color: var(--muted); }
@media (min-width: 40rem) {
  .facts { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.875rem; margin: 2.25rem 0 1.5rem; }
  .facts div { flex: 1 1 10.625rem; border-width: var(--rule); border-radius: var(--r-box); padding: 0.875rem 1.125rem; }
  .facts dt { font-size: var(--step--2); letter-spacing: 0.08em; }
  .facts dd { font-size: 1.75rem; }
}
.contains { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 1rem 0 0.4rem; font-size: var(--step--1); max-width: none; }
.contains b { color: var(--tomato-text); font-weight: 800; }
.contains span { border: 2px solid var(--tomato); color: var(--tomato-text); border-radius: var(--pill); padding: 0.05em 0.7em; font-weight: 700; }

.recipe-cols { display: grid; gap: 1.125rem; margin-top: 1.125rem; }
.recipe-cols h2 { margin: 0 0 0.375rem; font-size: 1.625rem; }
@media (min-width: 58rem) {
  .recipe-cols { grid-template-columns: minmax(18rem, 1fr) minmax(0, 2fr); gap: 2rem; align-items: start; margin-top: 3rem; }
  .recipe-cols > .ingredients { position: sticky; top: 1rem; }
  .recipe-cols h2 { font-size: 2rem; margin-bottom: 0.5rem; }
}
.ingredients { background: var(--card); border: var(--rule) solid var(--ink); border-radius: 28px; padding: 1.125rem 1.125rem 0.625rem; }
@media (min-width: 40rem) { .ingredients { border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 1.625rem 1.75rem 1rem; } }
.ingredients .checks li { border-bottom: 2px dashed var(--ink); }
.ingredients .checks li:last-child { border-bottom: 0; }
.ingredients .checks label { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.5rem 0; font-size: 1.125rem; font-weight: 500; line-height: 1.35; }
.ingredients .checks input { transform: none; }
.recipe-cols input[type="checkbox"] { width: 1.625rem; height: 1.625rem; flex: none; margin: 0; accent-color: var(--green); cursor: pointer; }

.method { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.method label { display: flex; align-items: flex-start; gap: 0.75rem; margin: 0; padding: 0.875rem; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 22px; font-weight: 500; cursor: pointer; }
.method input[type="checkbox"] { margin-top: 0.375rem; }
.step-num { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--mustard); border: var(--rule-s) solid var(--ink); font-size: 1.1875rem; font-weight: 800; line-height: 1; color: var(--on-fill); }
.method .text { flex: 1; min-width: 0; font-size: 1.0625rem; line-height: 1.4; padding-top: 0.375rem; }
.must { display: block; width: fit-content; margin-top: 0.5rem; background: var(--tomato-light); color: var(--on-fill); border: var(--rule-s) solid var(--ink); border-radius: var(--pill); padding: 0.2rem 0.75rem; font-size: 0.875rem; font-weight: 800; }
.method li:has(input:checked) label { background: var(--soft-green); }
.method li:has(input:checked) .text { text-decoration: line-through; text-decoration-thickness: 2px; }
.method li:has(input:checked) .must { text-decoration: none; }
@media (min-width: 40rem) {
  .method { gap: 1rem; }
  .method label { gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--r-box); }
  .method input[type="checkbox"] { margin-top: 0.625rem; }
  .step-num { width: 3rem; height: 3rem; border-width: var(--rule); font-size: 1.375rem; }
  .method .text { font-size: 1.125rem; padding-top: 0.5rem; }
  .must { font-size: var(--step--1); padding: 0.2rem 0.875rem; }
}

/* ---------- ratings and notes (recipe page "How was it?") ----------
   Five stars are radio buttons (arrow keys move between them, works without JS), notes, Save.
   POST /recipe/:id/rate saves with one write. The legend is the fieldset's first child, so star N
   is nth-child(N+1). "No stars" (.star-none) shows only once stars are saved, to take them off. */
.rate { display: flex; flex-direction: column; gap: 0.875rem; margin-top: 2rem; padding: 1.125rem; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 26px; }
.rate h2 { margin: 0; font-size: 1.625rem; }
.rate-form { display: flex; flex-direction: column; gap: 0.875rem; margin: 0; }
.rate-form > label { margin: 0; font-weight: 800; }
.rate .hint { margin: 0; }
.stars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.star { position: relative; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; margin: 0; cursor: pointer; border-radius: 12px; color: var(--ink); }
.star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star .icon { width: 2.75rem; height: 2.75rem; stroke-width: 1.8; }
.star:hover .icon { fill: var(--line); }
.star:has(input:focus-visible), .star-none:has(input:focus-visible) { outline: 3px solid var(--tomato); outline-offset: 1px; }
.stars:has(.star:nth-child(2) input:checked) .star:nth-child(-n+2) .icon,
.stars:has(.star:nth-child(3) input:checked) .star:nth-child(-n+3) .icon,
.stars:has(.star:nth-child(4) input:checked) .star:nth-child(-n+4) .icon,
.stars:has(.star:nth-child(5) input:checked) .star:nth-child(-n+5) .icon,
.stars:has(.star:nth-child(6) input:checked) .star:nth-child(-n+6) .icon { fill: var(--mustard); }
.star-none { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; margin: 0 0 0 0.5rem; padding: 0.2em 0.9em; border: var(--rule-s) solid var(--ink); border-radius: var(--pill); font-weight: 700; font-size: var(--step--1); cursor: pointer; }
.star-none input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-none:has(input:checked) { background: var(--ink); color: var(--ground); }
.rate-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.rate-foot p { flex: 1 1 15rem; margin: 0; font-size: var(--step--1); line-height: 1.4; }
.rate-saved { margin: 0; color: var(--muted); font-size: var(--step--1); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
@media (min-width: 40rem) { .rate { margin-top: 3rem; padding: 1.625rem 1.875rem; border-radius: var(--r-card); } .rate h2 { font-size: 2rem; } .rate-foot p { font-size: 1rem; } }

/* ---------- /lab/ratings (owner page: lowest-rated dishes, recent notes) ----------
   Built on .form-card and .lab-list like /lab. .pill.review is the tomato "Review" flag. */
.lab-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem; }
.lab-links .btn .icon { width: 1.1em; height: 1.1em; }
.pill.review { background: var(--tomato); color: var(--on-color); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1em 0.6em; border-width: 2px; vertical-align: 0.15em; }
.rt-list li.rt-flag { border-left: 6px solid var(--tomato); padding-left: 0.8rem; }
.rt-list .quiet { overflow-wrap: anywhere; }
.rt-nums { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; }
.rt-avg { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; }
.rt-avg b { font-size: var(--step-2); line-height: 1; letter-spacing: -0.02em; }
.rt-avg.none { font-size: var(--step-0); color: var(--muted); }
.star-row { display: inline-flex; gap: 2px; color: var(--ink); }
.star-row .icon { width: 1.25rem; height: 1.25rem; stroke-width: 2; }
.star-row .on .icon { fill: var(--mustard); }
.rt-notes .quiet { overflow-wrap: anywhere; }
.rt-note { margin: 0.5rem 0 0; padding: 0.75rem 0.9rem; background: var(--ground); border: var(--rule-s) solid var(--ink); border-radius: var(--r-tile); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }
@media (min-width: 40rem) { .rt-nums { align-items: flex-end; text-align: right; } }

@media (min-width: 52rem) {
  .wrap { padding-top: 2.4rem; }
  .choices.two { grid-template-columns: 1fr 1fr; }
}

/* ---------- Market Stall part 2: one block per page (each page's worker keeps to its block) ---------- */
/* [groceries] Groceries page (src/worker/views/groceries.tsx). Mockups GroceriesDesktop/Phone. */
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 0.25rem; }
.g-head-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.875rem; min-width: 0; }
.g-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; }
.g-date { font-size: var(--step--1); padding: 0.3rem 0.9rem; }
.g-print.btn { min-height: 2.75rem; font-size: var(--step--1); padding: 0.3rem 0.9rem; box-shadow: none; border-width: var(--rule-s); }
.g-print .icon { width: 1.25rem; height: 1.25rem; }
.g-wide { display: none; }
.g-head h1 { margin: 0; font-size: clamp(2.875rem, 7vw, 5.5rem); line-height: 0.9; }
.g-badge { flex: none; display: flex; align-items: center; justify-content: center; width: 6rem; height: 6rem; border-radius: 50%; background: var(--mustard); color: var(--on-fill); border: var(--rule) solid var(--ink); box-shadow: 4px 4px 0 var(--shade); transform: rotate(5deg); }
.g-badge .drawing { width: 4.5rem; height: 4.5rem; color: var(--on-fill); }

/* Pickup / Delivery / Shop in store: radio pills. The help line follows the checked one. */
.g-modes { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.g-modes fieldset { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; }
.g-mode { position: relative; margin: 0; cursor: pointer; }
.g-mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.g-mode > span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3rem; padding: 0 0.25rem; font-weight: 800; font-size: var(--step--1); line-height: 1.1; border: var(--rule-s) solid var(--ink); border-radius: var(--pill); background: var(--card); color: var(--ink); }
.g-mode input:checked + span { background: var(--ink); color: var(--ground); }
.g-mode input:focus-visible + span { outline: 3px solid var(--tomato); outline-offset: 3px; }
.g-mode-long { display: none; }
.g-help { margin: 0; font-size: var(--step--1); line-height: 1.35; max-width: 60ch; display: none; }
.g-help-start { display: block; }
@supports selector(:has(*)) {
  .g-modes .g-help { display: none; }
  .g-modes:has(.g-mode-pickup input:checked) .g-help-pickup,
  .g-modes:has(.g-mode-delivery input:checked) .g-help-delivery,
  .g-modes:has(.g-mode-store input:checked) .g-help-store { display: block; }
}

/* the "N of M checked off" panel (hidden by app.js until the first tick) */
.g-list { display: block; }
.g-progress { position: sticky; top: 0.5rem; z-index: 4; display: flex; flex-direction: column; gap: 0.625rem; margin: 1.25rem 0 0; max-width: none; padding: 0.875rem 1rem; background: var(--green); color: var(--on-dark); border: var(--rule) solid var(--ink); border-radius: var(--r-box); box-shadow: var(--shadow-card-m); }
.g-progress-text { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1.1; }
.g-progress-text b { font-weight: 800; }
.g-progress progress { height: 1.375rem; background: var(--cream); border: var(--rule-s) solid var(--ink); }
.g-progress progress::-webkit-progress-bar { background: var(--cream); }
.g-progress progress::-webkit-progress-value { background: var(--mustard); border-radius: 0; color: var(--on-fill); }
.g-progress progress::-moz-progress-bar { background: var(--mustard); border-radius: 0; color: var(--on-fill); }

/* one white box per store, coloured header */
.g-stores { display: flex; flex-direction: column; gap: 1.125rem; margin-top: 1.25rem; }
.g-store { min-width: 0; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow-card-m); }
.g-store > h2 { margin: 0; padding: 0.75rem 1.125rem; font-size: 1.625rem; line-height: 1.05; border-bottom: var(--rule) solid var(--ink); border-radius: 23px 23px 0 0; color: var(--on-fill); overflow-wrap: anywhere; }
.g-store.c0 > h2 { background: var(--tomato-light); color: var(--on-fill); }
.g-store.c1 > h2 { background: var(--lettuce); color: var(--on-fill); }
.g-store.c2 > h2 { background: var(--plum); color: var(--on-fill); }
.g-store.c3 > h2 { background: var(--pink); color: var(--on-fill); }
.g-store.c4 > h2 { background: var(--ground); color: var(--ink); }
.g-body { padding: 0.25rem 1.125rem 0.75rem; }
.g-body h3 { margin: 0.875rem 0 0; font-size: var(--step--2); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.g-store.c0 h3 { color: var(--l-dinner); }
.g-store.c1 h3 { color: var(--l-lunch); }
.g-store.c2 h3 { color: var(--l-snack); }
.g-store.c3 h3 { color: var(--l-shake); }
.g-store.c4 h3 { color: var(--l-breakfast); }
.g-note { margin: 0.75rem 0 0.25rem; font-size: var(--step--1); color: var(--muted); }
.g-items { list-style: none; padding: 0; margin: 0; }
.g-items li { border-bottom: 2px dashed var(--ink); }
.g-items li:last-child { border-bottom: 0; }
.g-items label { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.375rem 0; margin: 0; font-weight: 500; font-size: 1.125rem; line-height: 1.3; cursor: pointer; }
.g-items input { flex: none; width: 1.625rem; height: 1.625rem; margin: 0; accent-color: var(--green); cursor: pointer; }
.g-what { min-width: 0; overflow-wrap: anywhere; }
.g-what b { font-weight: 800; }
.g-for { display: block; font-size: var(--step--2); color: var(--muted); line-height: 1.3; }
.g-items input:checked + .g-what { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }

/* When you get home */
/* Pickup / Delivery / Shop in store change the page (docs/DESIGN.md "Groceries"). The checked radio
   decides; without :has support the page shows the in-store version with everything visible. */
.g-flow { display: flex; flex-direction: column; }
.g-when-order, .g-when-pickup, .g-when-delivery { display: none; }
.g-copy { align-items: center; flex-wrap: wrap; gap: 0.5rem 0.875rem; margin: 0.25rem 0 0.75rem; }
.g-copy .g-note { margin: 0; }
@supports selector(:has(a)) {
  .wrap:has(.g-mode-store input:checked) .g-walmart { display: none; }
  .wrap:has(.g-mode-pickup input:checked) .g-when-store,
  .wrap:has(.g-mode-delivery input:checked) .g-when-store { display: none; }
  .wrap:has(.g-mode-pickup input:checked) .g-when-pickup,
  .wrap:has(.g-mode-delivery input:checked) .g-when-delivery,
  .wrap:has(.g-mode-pickup input:checked) span.g-when-order,
  .wrap:has(.g-mode-delivery input:checked) span.g-when-order { display: inline; }
  .wrap:has(.g-mode-pickup input:checked) .g-copy,
  .wrap:has(.g-mode-delivery input:checked) .g-copy { display: flex; }
  /* ordering online: what you already have first, then the paste blocks, then the list, then the fridge box */
  .wrap:has(.g-mode-pickup input:checked) .g-walmart,
  .wrap:has(.g-mode-delivery input:checked) .g-walmart { order: -1; margin-top: 1.25rem; }
  .wrap:has(.g-mode-pickup input:checked) .g-pantry,
  .wrap:has(.g-mode-delivery input:checked) .g-pantry { order: -1; }
}
.g-home { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; padding: 1rem 1.125rem; background: var(--mustard); color: var(--on-fill); border: var(--rule) solid var(--ink); border-radius: 26px; }
.g-home > div { flex: 1 1 18rem; min-width: 0; }
.g-home h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.g-home ul { margin: 0; padding-left: 1.375rem; font-size: 1.0625rem; line-height: 1.5; }
.g-home-art { display: none; }

/* Walmart paste blocks */
.g-walmart { margin-top: 1.75rem; padding: 1rem 1.125rem; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow-card-m); }
.g-walmart h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.g-walmart > p { margin: 0; max-width: 60ch; }
.g-paste { background: var(--ground); border: 2px dashed var(--ink); border-radius: var(--r-tile); padding: 0.875rem 1rem; margin: 0.875rem 0 0; }
.g-paste h3 { margin: 0 0 0.3rem; font-size: var(--step-0); }
.g-paste p { margin: 0 0 0.6rem; max-width: none; overflow-wrap: anywhere; }

@media (min-width: 40rem) {
  .g-head { margin-top: 1rem; }
  .g-wide { display: inline; }
  .g-date { font-size: var(--step-0); padding: 0.4rem 1.1rem; }
  .g-print.btn { font-size: var(--step-0); border-width: var(--rule); padding: 0.35rem 1.1rem; }
  .g-badge { width: 11.875rem; height: 11.875rem; box-shadow: 6px 6px 0 var(--shade); }
  .g-badge .drawing { width: 8.75rem; height: 8.75rem; }
  .g-modes { margin-top: 2rem; gap: 0.75rem; }
  .g-modes fieldset { display: flex; flex-wrap: wrap; gap: 0.75rem; }
  .g-mode { flex: 1 1 12.5rem; }
  .g-mode > span { min-height: 4rem; font-size: 1.375rem; text-transform: uppercase; letter-spacing: -0.02em; border-width: var(--rule); }
  .g-mode-long { display: inline; }
  .g-mode-short { display: none; }
  .g-help { font-size: 1.125rem; }
  .g-progress { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 1.75rem; padding: 1.25rem 1.75rem; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
  .g-progress-text { font-size: 1.875rem; white-space: nowrap; }
  .g-progress progress { flex: 1 1 17.5rem; width: auto; height: 1.75rem; border-width: var(--rule); }
  .g-stores { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 2rem; margin-top: 2.75rem; }
  .g-store { flex: 1 1 25rem; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
  .g-store > h2 { padding: 1rem 1.625rem; font-size: 2rem; border-radius: 29px 29px 0 0; }
  .g-body { padding: 0.5rem 1.625rem 1.125rem; }
  .g-body h3 { margin-top: 1rem; font-size: 0.875rem; }
  .g-items label { gap: 0.875rem; font-size: 1.1875rem; }
  .g-home { margin-top: 2.75rem; padding: 1.5rem 1.875rem; border-radius: var(--r-card); }
  .g-home h2 { font-size: 1.875rem; }
  .g-home ul { font-size: 1.1875rem; line-height: 1.6; }
  .g-home-art { flex: none; display: flex; align-items: center; justify-content: center; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: var(--cream); border: var(--rule) solid var(--ink); transform: rotate(-6deg); }
  .g-home-art .drawing { width: 5.375rem; height: 5.375rem; color: var(--on-fill); }
  .g-walmart { margin-top: 2.75rem; padding: 1.5rem 1.875rem; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
}
/* [/groceries] */
/* [prep] */
/* Prep day (prep.tsx). Green header with the date, pot drawing and stickers; "The order" blocks
   that tint and cross out when ticked; side boxes. One column on a phone, two from 58 rem. */
.prep-page { min-width: 0; }
.prep-hero {
  display: flex; flex-direction: column; gap: 0.75rem; padding: 1.125rem; background: var(--green); color: var(--on-dark);
  border: var(--rule) solid var(--ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--shade);
}
.prep-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; min-width: 0; }
.prep-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; }
.prep-hero-top .btn { margin: 0; }
.prep-date { background: var(--cream); color: var(--on-fill); border-width: var(--rule); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; }
.prep-hero h1 { margin: 0; font-size: var(--step-4); line-height: 0.9; color: var(--on-dark); }
.prep-hero p { margin: 0; font-size: 1rem; line-height: 1.35; color: var(--on-dark); max-width: 30rem; }
.prep-hero .prep-hero-sub { font-size: var(--step--1); font-weight: 700; }
.prep-hero-art { display: flex; align-items: center; color: var(--on-fill); }
.prep-pot { display: grid; place-items: center; flex: none; width: 7.25rem; height: 7.25rem; border-radius: 50%; background: var(--cream); border: var(--rule) solid var(--ink); }
.prep-pot .drawing { width: 5.6rem; height: 5.6rem; color: var(--on-fill); }
.prep-hero-art .sticker { width: 6.5rem; height: 6.5rem; margin-left: -0.75rem; color: var(--on-fill); font-size: 0.75rem; transform: rotate(-6deg); }
.prep-hero-art .sticker b { font-size: 1.375rem; margin-bottom: 3px; letter-spacing: -0.03em; }
.prep-hero-art .prep-done { width: 6rem; height: 6rem; margin-left: -0.625rem; background: var(--cream); transform: rotate(6deg); }
.prep-hero-art .prep-done b { font-size: 1.625rem; }

.prep-warn { margin: 1.25rem 0 0; max-width: none; padding: 0.875rem 1.125rem; background: var(--card); border: var(--rule) solid var(--tomato); border-radius: var(--r-box); box-shadow: 4px 4px 0 var(--tomato); }
.prep-warn b { display: block; color: var(--tomato-text); }

.prep-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.125rem; margin-top: 1.125rem; }
.prep-grid h2 { margin: 0; }
.prep-order { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.prep-order h2 { font-size: 1.625rem; }
.prep-box { display: flex; flex-direction: column; gap: 0.375rem; padding: 1rem 1.125rem; border: var(--rule) solid var(--ink); border-radius: 26px; background: var(--card); min-width: 0; }
.prep-box h2 { font-size: 1.375rem; line-height: 1.04; }
.prep-box ul { margin: 0; padding-left: 1.375rem; font-size: var(--step-0); line-height: 1.5; }
.prep-box p { margin: 0; max-width: none; line-height: 1.35; }
.prep-after, .prep-skill { color: var(--on-fill); }
.prep-after a, .prep-skill a { color: inherit; }
.prep-after { background: var(--mustard); color: var(--on-fill); }
.prep-after h3 { margin: 0.375rem 0 0; font-size: var(--step-0); text-transform: uppercase; letter-spacing: 0.06em; }
.prep-after b { font-weight: 800; }
.prep-skill { background: var(--lettuce); color: var(--on-fill); }
.prep-skill > div { display: flex; flex-direction: column; gap: 0.375rem; }
.prep-skill > div + div { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 2px dashed var(--on-fill); }
.prep-skill .kicker { font-size: 0.75rem; }
.prep-skill .prep-skill-from { font-size: var(--step--1); font-weight: 700; }

.prep-blocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.pblock {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; align-items: start; margin: 0; padding: 0.875rem; line-height: 1.25;
  background: var(--card); color: var(--ink); border: var(--rule) solid var(--ink); border-radius: 22px; cursor: pointer;
}
.pblock-side { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 0.625rem; }
.pblock-art { display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--cream); border: var(--rule-s) solid var(--ink); }
.pblock-art .drawing { width: 2.4rem; height: 2.4rem; color: var(--on-fill); }
.pblock-time { background: var(--mustard); color: var(--on-fill); border: var(--rule-s) solid var(--ink); border-radius: var(--pill); padding: 0.15rem 0.75rem; font-weight: 800; font-size: 1rem; white-space: nowrap; }
.pblock-body { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.pblock-title { font-size: 1.25rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.pblock-title a { color: inherit; }
.pblock-text { font-size: var(--step-0); font-weight: 500; line-height: 1.35; }
.pblock-pills { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.pblock-pill { border: var(--rule-s) solid var(--ink); border-radius: var(--pill); padding: 0.15rem 0.625rem; font-size: 0.875rem; font-weight: 800; line-height: 1.3; }
.pblock-pill.own { background: var(--lettuce); color: var(--on-fill); }
.pblock-pill.must-pill { background: var(--tomato-light); color: var(--on-fill); }
.pblock input { grid-column: 2; grid-row: 1; align-self: center; width: 1.875rem; height: 1.875rem; margin: 0; accent-color: var(--green); cursor: pointer; }
.pblock:has(input:checked) { background: var(--soft-green); }
.pblock:has(input:checked) .pblock-title { text-decoration: line-through; text-decoration-thickness: 3px; }
.pblock:has(input:focus-visible) { outline: 3px solid var(--tomato); outline-offset: 3px; }

@media (min-width: 40rem) {
  .prep-hero { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.5rem; padding: 2.25rem 2.75rem; border-radius: var(--r-hero); box-shadow: var(--shadow-hero); }
  .prep-hero h1 { font-size: clamp(3rem, 7vw, 5.75rem); }
  .prep-hero p { font-size: 1.25rem; line-height: 1.4; }
  .prep-hero .prep-hero-sub { font-size: var(--step-0); }
  .prep-pot { width: 11.875rem; height: 11.875rem; }
  .prep-pot .drawing { width: 9.375rem; height: 9.375rem; }
  .prep-hero-art .sticker { width: 8.25rem; height: 8.25rem; margin-left: -1.25rem; font-size: 0.875rem; }
  .prep-hero-art .sticker b { font-size: 1.875rem; }
  .prep-hero-art .prep-done { width: 7rem; height: 7rem; margin-left: -0.75rem; }
  .prep-hero-art .prep-done b { font-size: 2rem; }
  .pblock { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--r-box); }
  .pblock-side { flex-direction: column; gap: 0.5rem; }
  .pblock-art { width: 4.5rem; height: 4.5rem; border-width: var(--rule); }
  .pblock-art .drawing { width: 3.25rem; height: 3.25rem; }
  .pblock-time { min-width: 4.25rem; text-align: center; border-width: var(--rule); font-size: var(--step-0); padding: 0.2rem 0.625rem; }
  .pblock-body { grid-column: 2; grid-row: 1; }
  .pblock-title { font-size: 1.375rem; }
  .pblock-text { font-size: 1.125rem; line-height: 1.4; }
  .pblock-pills { gap: 0.5rem; }
  .pblock-pill { font-size: var(--step--1); padding: 0.2rem 0.75rem; }
  .pblock input { grid-column: 3; align-self: start; margin-top: 0.375rem; }
  .prep-box { padding: 1.5rem 1.625rem; border-radius: var(--r-card); }
  .prep-box h2 { font-size: 1.625rem; }
  .prep-box ul { font-size: 1.125rem; line-height: 1.6; }
  .prep-skill p { font-size: 1.125rem; line-height: 1.4; }
  .prep-skill .prep-skill-from { font-size: var(--step--1); }
  .prep-order h2 { font-size: 2rem; }
  .prep-blocks { gap: 1rem; }
}
@media (min-width: 58rem) {
  .prep-grid {
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); grid-template-rows: auto auto auto 1fr; gap: 1.5rem 2rem; margin-top: 3rem;
    grid-template-areas: "order before" "order after" "order skill" "order .";
  }
  .prep-order { grid-area: order; }
  .prep-before { grid-area: before; box-shadow: var(--shadow-card); }
  .prep-after { grid-area: after; }
  .prep-skill { grid-area: skill; }
}
/* [/prep] */
/* [home] visitor home page (src/worker/views/home.tsx, mockup StallRounded). Phone first. */
.home-hero {
  display: flex; flex-direction: column; gap: 2rem; margin-top: 0.75rem; padding: 1.75rem 1.25rem 1.5rem;
  background: var(--green); color: var(--on-dark); border: var(--rule) solid var(--ink); border-radius: 28px; box-shadow: var(--shadow-card-m);
}
.home-pitch { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; min-width: 0; }
.home-pitch > * { margin: 0; }
.home-badge {
  background: var(--ground); color: var(--ink); font-weight: 800; font-size: var(--step--2); letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.2; padding: 0.35rem 0.9rem; border: var(--rule) solid var(--ink); border-radius: var(--pill);
}
.home-hero h1 { font-size: clamp(2.875rem, 7.4vw, 6.5rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--on-dark); text-wrap: initial; }
.home-accent { color: var(--mustard); }
.home-lead { font-size: var(--step-0); line-height: 1.45; max-width: 31rem; }
.home-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; }
.home-actions .btn { font-size: var(--step-0); padding: 0.75em 1.4em; box-shadow: 4px 4px 0 var(--shade); }
.home-actions .btn:hover { box-shadow: 5px 5px 0 var(--shade); }

/* the stall: three radios (visually hidden) pick which meal shows; the labels are the tabs */
.stall { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.stall-box { background: var(--ground); color: var(--ink); border: var(--rule) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-card-m); overflow: hidden; }
.stall-meal { display: none; }
#stall-0:checked ~ .stall-box .stall-m0, #stall-1:checked ~ .stall-box .stall-m1, #stall-2:checked ~ .stall-box .stall-m2 { display: block; }
.stall-stage { position: relative; display: flex; align-items: center; justify-content: center; height: 14rem; padding-top: 1.5rem; }
.stall-bob { display: block; }
.stall-drawing { width: 10.5rem; height: 10.5rem; }
.stall-drawing .f-cream { fill: var(--card); }
.stall-stickers { position: absolute; top: 0.75rem; right: 0.75rem; flex-wrap: nowrap; }
.stall-stickers .sticker { width: 4.5rem; height: 4.5rem; font-size: 0.75rem; }
.stall-stickers .sticker b { font-size: 1.375rem; }
.stall-stickers .sticker.cal { transform: rotate(-8deg); }
.stall-stickers .sticker.protein { margin-left: -0.625rem; transform: rotate(7deg); }
.stall-plate { display: flex; flex-direction: column; gap: 0.125rem; margin: 0; max-width: none; padding: 0.75rem 1.125rem 0.875rem; background: var(--tomato); color: var(--on-color); border-top: var(--rule) solid var(--ink); }
.stall-kicker { font-size: var(--step--2); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.25; }
.stall-dish { font-size: var(--step-1); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; min-height: 2.1em; }
.stall-tabs { display: flex; gap: 0.5rem; }
.stall-tabs label {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 3rem; margin: 0; padding: 0.5rem 0.5rem;
  font-weight: 800; font-size: var(--step--1); background: var(--ground); color: var(--ink); border: var(--rule) solid var(--ink); border-radius: var(--pill); cursor: pointer;
}
.stall-tabs label:hover { box-shadow: var(--shadow-btn); }
#stall-0:checked ~ .stall-tabs [for="stall-0"], #stall-1:checked ~ .stall-tabs [for="stall-1"], #stall-2:checked ~ .stall-tabs [for="stall-2"] { background: var(--ink); color: var(--ground); }
#stall-0:focus-visible ~ .stall-tabs [for="stall-0"], #stall-1:focus-visible ~ .stall-tabs [for="stall-1"], #stall-2:focus-visible ~ .stall-tabs [for="stall-2"] { outline: 3px solid var(--mustard); outline-offset: 3px; }

/* Today's menu and the three numbered boxes */
.home-menu { margin-top: 3rem; scroll-margin-top: 1rem; }
.home-menu h2 { margin: 0; }
.home-note { margin-top: 1.5rem; }
.home-steps { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; gap: 1rem; }
.home-step { display: flex; align-items: flex-start; gap: 1rem; padding: 1.125rem 1.25rem; background: var(--card); border: var(--rule) solid var(--ink); border-radius: var(--r-box); }
.home-num {
  flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border: var(--rule) solid var(--ink); border-radius: 50%;
  font-weight: 800; font-size: var(--step-1); color: var(--on-fill);
}
.home-step.s1 .home-num { background: var(--lettuce); color: var(--on-fill); }
.home-step.s2 .home-num { background: var(--tomato-light); color: var(--on-fill); }
.home-step.s3 .home-num { background: var(--mustard); color: var(--on-fill); }
.home-step-text { display: flex; flex-direction: column; gap: 0.25rem; line-height: 1.4; }
.home-step-text b { font-weight: 800; font-size: var(--step-1); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.1; }

@media (min-width: 40rem) {
  .home-hero { border-radius: var(--r-hero); box-shadow: var(--shadow-hero); padding: 2.5rem 2.25rem; }
  .home-lead { font-size: var(--step-1); }
  .home-actions .btn { font-size: 1.25rem; padding: 0.8em 1.6em; box-shadow: 6px 6px 0 var(--shade); }
  .home-actions .btn:hover { box-shadow: 7px 7px 0 var(--shade); }
  .home-badge { font-size: var(--step--1); }
  .stall-box { border-radius: 28px; box-shadow: var(--shadow-card); }
  .stall-stage { height: 17.5rem; }
  .stall-drawing { width: 13rem; height: 13rem; }
  .stall-stickers { top: 0.875rem; right: 0.875rem; }
  .stall-stickers .sticker { width: 5.25rem; height: 5.25rem; font-size: 0.8125rem; }
  .stall-stickers .sticker b { font-size: 1.5625rem; }
  .stall-plate { padding: 0.875rem 1.375rem 1rem; }
  .stall-dish { font-size: 1.625rem; }
  .stall-tabs label { font-size: var(--step-0); }
  .home-menu { margin-top: 4.5rem; }
  .home-steps { margin-top: 4.5rem; }
  .home-step { border-radius: 28px; padding: 1.375rem 1.5rem; }
  .home-num { width: 3.25rem; height: 3.25rem; font-size: 1.5rem; }
  .home-step-text { font-size: 1.125rem; }
  .home-step-text b { font-size: 1.5rem; }
}
@media (min-width: 62rem) {
  .home-hero { flex-direction: row; align-items: center; gap: 2.5rem; padding: 3.5rem 3.25rem; border-radius: 48px; }
  .home-pitch { flex: 1 1 30rem; gap: 1.5rem; }
  .stall { flex: 1 1 21rem; max-width: 26.25rem; }
  .home-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .stall-bob { animation: stall-bob 4s ease-in-out infinite; }
  .stall-meal { animation: stall-pop 0.35s ease-out; }
  @keyframes stall-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
  @keyframes stall-pop { 0% { transform: scale(0.94); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }
}
/* [/home] */
/* [account] */
/* Account and Delete my account (src/worker/views/account.tsx). Mockups: Account*, Delete*.
   .switch is the Switch component in cards.tsx (a real checkbox drawn as a switch, green when on). */
.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; margin: 0; padding: 0.5rem 0; border-bottom: 2px dashed var(--ink); font-weight: 500; cursor: pointer; }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-text b { font-size: 1.125rem; font-weight: 800; line-height: 1.2; }
.switch-hint { font-size: var(--step--1); line-height: 1.35; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { position: relative; flex: none; width: 5.25rem; height: 3rem; border: var(--rule) solid var(--ink); border-radius: var(--pill); background: var(--ground); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 2.25rem; height: 2.25rem; border: var(--rule) solid var(--ink); border-radius: 50%; background: var(--paper); }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(2.25rem); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--tomato); outline-offset: 3px; }
.pill.soon { margin-left: 0.5em; padding: 0.1em 0.6em; border-width: 2px; background: var(--ground); color: var(--ink); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; vertical-align: 0.15em; }
.btn .pill.soon { margin-left: 0.15em; padding: 0.05em 0.5em; font-size: 0.6875rem; vertical-align: 0; }
.acct-side .btn { white-space: nowrap; padding-left: 0.8em; padding-right: 0.8em; }

.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.5rem 0 1.25rem; }
.acct-head h1 { margin: 0; font-size: clamp(3.125rem, 7vw, 5.5rem); line-height: 0.9; }
.acct-badge { display: grid; place-items: center; flex: none; width: 6rem; height: 6rem; border: var(--rule) solid var(--ink); border-radius: 50%; background: var(--lettuce); box-shadow: 4px 4px 0 var(--shade); transform: rotate(-5deg); color: var(--on-fill); }
.acct-badge .drawing, .del-badge .drawing { width: 75%; height: 75%; color: var(--on-fill); }
.acct-cols, .acct-main, .acct-side, .acct-form { display: grid; gap: 1.125rem; align-content: start; min-width: 0; }
.acct-card { min-width: 0; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow-card-m); padding: 1.125rem; }
.acct-card.quiet-card { box-shadow: none; }
.acct-card > h2 { margin: 0 0 0.6rem; font-size: 1.5rem; }
.acct-card > :last-child { margin-bottom: 0; }
.acct-card p { max-width: none; }
.acct-rows .switch:last-child { border-bottom: 0; }
.acct-hint { color: var(--muted); font-size: var(--step--1); line-height: 1.4; margin: 0.25rem 0 0.75rem; max-width: 60ch; }
.acct-card > .acct-hint:last-child { margin: 0.75rem 0 0; }
/* the legend floats so the dashed rule above the group isn't broken by it */
.acct-set { margin: 0.75rem 0 0; padding: 1rem 0 0; border-top: 2px dashed var(--ink); }
.acct-card > h2 + .acct-set { margin-top: 0; padding-top: 0; border-top: 0; }
.acct-set legend { float: left; width: 100%; margin: 0 0 0.5rem; font-size: 1.125rem; letter-spacing: 0; text-transform: none; line-height: 1.2; }
.acct-set legend + * { clear: both; }
.acct-set > :last-child { margin-bottom: 0; }
.day-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; }
.day-pick .chip span { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0; font-weight: 800; font-size: var(--step--1); border-radius: 14px; }
.day-pick .chip input:checked + span::before { content: none; }
.day-pick .chip input:checked + span { background: var(--lettuce); color: var(--on-fill); box-shadow: var(--shadow-btn); }
.day-pick abbr { text-decoration: none; }
.acct-choices { margin: 0; gap: 0.6rem; }
.seg { margin: 0; }
.seg .chip { flex: 1 1 5.75rem; }
.seg .chip span { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.35em 0.6em; border-width: var(--rule); text-align: center; font-weight: 800; font-size: var(--step--1); line-height: 1.2; }
.acct-save { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.acct-save .btn { min-width: 9rem; }
.acct-save .acct-hint { margin: 0; }
/* Settings save as you change them (app.js [account]); the Save button is only for no JavaScript. */
.acct-saved { font-weight: 700; color: var(--ink); }
.acct-saved.bad { color: var(--tomato-text); }

.acct-plan { display: grid; gap: 0.9rem; min-width: 0; background: var(--mustard); color: var(--on-fill); border: var(--rule) solid var(--ink); border-radius: 26px; padding: 1.125rem; }
.acct-plan p { margin: 0; max-width: none; }
.acct-plan .kicker { color: var(--on-fill); font-size: 0.875rem; }
.acct-plan-name { font-size: 1.875rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.acct-plan-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.acct-plan-btns .btn { flex: 1 1 11rem; }
.acct-plan form { margin: 0; }
.btn.ink { background: var(--ink); color: var(--ground); }
.btn.ink:hover { color: var(--ground); }
.acct-plan .btn:disabled, .acct-card .btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }

.acct-side .acct-card { display: grid; gap: 0.75rem; }
.acct-side .acct-card > * { margin: 0; }
.acct-side .acct-card .btn { width: 100%; }
.acct-side form { margin: 0; }
.acct-email { display: grid; gap: 2px; font-size: 1.125rem; overflow-wrap: anywhere; }
.acct-links { list-style: none; margin: 0; padding: 0; }
.acct-links li { border-bottom: 2px dashed var(--ink); }
.acct-links li:last-child { border-bottom: 0; }
.acct-links a, .acct-off { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; min-height: 3rem; font-size: 1.125rem; font-weight: 700; text-decoration: none; }
.acct-links a:hover { text-decoration: underline; }
.acct-off { color: var(--muted); }
.acct-delete { width: 100%; }

@media (min-width: 40rem) {
  .acct-badge { width: 8.5rem; height: 8.5rem; box-shadow: 6px 6px 0 var(--shade); }
  .acct-card { border-radius: var(--r-card); padding: 1.6rem 1.875rem; }
  .acct-plan { border-radius: var(--r-card); padding: 1.6rem 1.875rem; }
  .acct-card > h2 { font-size: 2rem; }
  .switch-text b { font-size: var(--step-1); }
  .switch-hint { font-size: var(--step-0); }
  .acct-set legend { font-size: var(--step-1); }
  .acct-hint { font-size: var(--step-0); }
  .seg .chip { flex-basis: 9rem; }
  .day-pick { gap: 6px; }
  .day-pick .chip span { font-size: var(--step-0); }
  .seg .chip span { font-size: var(--step-0); }
  .acct-plan-name { font-size: 2.25rem; }
}
@media (min-width: 58rem) {
  .acct-head { margin-top: 1rem; }
  .acct-badge { width: 10.625rem; height: 10.625rem; }
  .acct-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .acct-main, .acct-form { gap: 2rem; }
  .acct-side { gap: 1.5rem; }
  .acct-side .acct-card > h2 { font-size: 1.625rem; }
  .acct-side .acct-card:not(.quiet-card) { box-shadow: var(--shadow-card); }
}

/* Delete my account: one card, "Keep my account" big and green, delete smaller and red-outlined */
.del-card { display: grid; gap: 1.125rem; max-width: 42.5rem; margin: 0.75rem auto 0; background: var(--card); border: var(--rule) solid var(--ink); border-radius: 28px; box-shadow: 6px 6px 0 var(--shade); padding: 1.25rem 1.125rem; }
.del-card p, .del-card ul { max-width: none; }
.del-head { display: flex; align-items: center; gap: 0.875rem; }
.del-head h1 { margin: 0; font-size: 2.5rem; }
.del-badge { display: grid; place-items: center; flex: none; width: 5.25rem; height: 5.25rem; border: var(--rule) solid var(--ink); border-radius: 50%; background: var(--tomato-light); transform: rotate(-5deg); color: var(--on-fill); }
.del-what p { margin: 0 0 0.35rem; }
.del-what ul { margin: 0; line-height: 1.5; }
.del-what .del-warn { margin: 0.5rem 0 0; color: var(--tomato-text); font-weight: 800; }
.del-why { margin: 0; padding: 1rem 0 0; border-top: 2px dashed var(--ink); }
.del-why legend { float: left; width: 100%; margin: 0 0 0.35rem; font-size: 1.25rem; letter-spacing: 0; text-transform: none; line-height: 1.2; }
.del-why legend span, .del-note-label span { font-size: var(--step--1); font-weight: 500; }
.del-why legend + * { clear: both; }
.del-reason { display: flex; align-items: center; gap: 0.75rem; min-height: 2.875rem; margin: 0; font-size: 1.125rem; font-weight: 500; line-height: 1.25; cursor: pointer; }
.del-reason input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--green); cursor: pointer; }
.del-note-label { margin: 0.6rem 0 0.25rem; font-size: var(--step--1); }
.del-why .acct-hint { margin: 0.5rem 0 0; }
.del-btns { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.btn.del-keep { min-height: 3.5rem; font-size: 1.1875rem; box-shadow: 4px 4px 0 var(--shade); }
.btn.del-go { min-height: 3.25rem; }
@media (min-width: 40rem) {
  .del-card { gap: 1.5rem; margin-top: 1.5rem; border-radius: var(--r-hero); box-shadow: var(--shadow-hero); padding: 2.5rem 2.75rem; }
  .del-head { gap: 1.5rem; }
  .del-head h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
  .del-badge { width: 7.5rem; height: 7.5rem; }
  .del-what { font-size: 1.1875rem; }
  .del-what p:first-child { font-size: 1.25rem; }
  .del-why legend { font-size: 1.375rem; }
  .del-reason { min-height: 2.75rem; font-size: 1.1875rem; }
  .del-note-label { font-size: 1rem; }
  .del-btns { display: flex; flex-wrap: wrap; gap: 0.875rem; }
  .btn.del-keep { flex: 2 1 15rem; min-height: 3.75rem; font-size: 1.25rem; box-shadow: 5px 5px 0 var(--shade); }
  .btn.del-go { flex: 1 1 12.5rem; min-height: 3.75rem; font-size: 1.125rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .switch-track, .switch-track::after { transition: background-color 0.12s, transform 0.15s; }
}
/* [/account] */
/* [forms] setup questions, My answers, sign-in, legal */
/* The week's theme beside the date ("Thai week"): a mustard pill. */
.theme-pill { background: var(--mustard); color: var(--on-fill); }
/* .heads-up: the "check with your doctor first" note under the goal question (docs/DESIGN.md "Health and safety wording") */
.heads-up { background: var(--note); border: var(--rule-s) solid var(--ink); border-radius: var(--r-tile); padding: 0.75rem 1rem; margin: 1.5rem 0 0; font-size: var(--step--1); line-height: 1.45; max-width: 60ch; }
.legal p + p { margin-top: 0.7rem; }
/* Page title with a round lettuce badge holding a line drawing (setup, sign-in, test people). */
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.5rem 0 1.5rem; }
.form-head > div { flex: 1 1 auto; min-width: 0; }
.form-head h1 { margin: 0; font-size: clamp(2.6rem, 11vw, 4.75rem); line-height: 0.9; }
.form-head p { margin: 0.75rem 0 0; font-size: var(--step-0); max-width: 44ch; }
.form-badge { display: grid; place-items: center; flex: none; width: 6rem; height: 6rem; border-radius: 50%; background: var(--lettuce); color: var(--on-fill); border: var(--rule) solid var(--ink); box-shadow: 4px 4px 0 var(--shade); transform: rotate(-5deg); }
.form-badge .drawing { width: 84%; height: 84%; color: var(--on-fill); }
.form-badge.snack-badge { background: var(--t-snack); }  /* the snack page: plum, like snack tiles */
.snack-head h1 { font-size: clamp(2rem, 8.5vw, 4.75rem); overflow-wrap: break-word; }  /* "Wednesday" fits on a phone */
@media (min-width: 40rem) {
  .form-head { margin: 1.5rem 0 2.25rem; gap: 2rem; }
  .form-head p { font-size: var(--step-1); line-height: 1.35; }
  .form-badge { width: 9.5rem; height: 9.5rem; box-shadow: 6px 6px 0 var(--shade); }
}

/* a white card with the ink outline and hard shadow, for forms and long text */
.form-card { background: var(--card); border: var(--rule) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-card-m); padding: 1.25rem 1.125rem; margin: 0 0 1.5rem; }
.form-card > :last-child { margin-bottom: 0; }
@media (min-width: 40rem) { .form-card { border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 1.75rem 2rem; margin-bottom: 2rem; } }
.form-card .btn { width: 100%; }
@media (min-width: 40rem) { .form-card .btn { width: auto; } }

/* setup and My answers: each question group is a card; app.js shows one at a time */
.setup fieldset { background: var(--card); border: var(--rule) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-card-m); padding: 1.25rem 1.125rem 1.5rem; margin: 0 0 1.75rem; }
.setup legend { float: left; width: 100%; margin-bottom: 0.4rem; }
.setup legend + * { clear: both; }
.setup fieldset > :last-child { margin-bottom: 0; }
.setup fieldset > .group-label:first-of-type, .setup legend + .group-label { margin-top: 0.75rem; }
@media (min-width: 40rem) {
  .setup fieldset { border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 2rem 2.25rem 2.25rem; }
}

/* sign-in, code, not found: one narrow column */
.form-solo .form-card, .form-solo .form-after, .form-solo .flash { max-width: 34rem; }
.form-solo .form-card input[type="email"] { max-width: none; }
.form-email { overflow-wrap: anywhere; }
.form-after { font-size: var(--step--1); color: var(--muted); }
.form-after a { color: var(--ink); font-weight: 800; }

/* "No week planned yet" */
.noplan { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; margin-top: 1rem; }
.noplan h1 { font-size: clamp(2.4rem, 10vw, 4rem); line-height: 0.9; }
.noplan .lead { margin-bottom: 0; }
.noplan .actions { margin-bottom: 0; }
@media (min-width: 40rem) { .noplan { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.25rem 2.5rem; border-radius: var(--r-hero); box-shadow: var(--shadow-hero); } }

/* terms and privacy */
.legal-title { font-size: clamp(2.6rem, 11vw, 5rem); line-height: 0.9; margin: 0.5rem 0 1.25rem; }
@media (min-width: 40rem) { .legal-title { margin: 1.5rem 0 1.75rem; } }
.legal h2 { font-size: var(--step-1); margin: 1.75rem 0 0.4rem; padding-top: 1.25rem; border-top: 2px dashed var(--ink); }
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
@media (min-width: 40rem) { .legal h2 { font-size: var(--step-2); } }

/* owner test page */
.lab-card h2 { margin: 0 0 0.5rem; font-size: var(--step-2); }
.lab-card .btn { width: auto; }
/* [/forms] */

@media (prefers-reduced-motion: no-preference) {
  .btn, .chip span, .choice > span, .days button, .tick span { transition: background-color 0.12s, border-color 0.12s, transform 0.12s, box-shadow 0.12s; }
  .spinner { animation: spin 0.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}

/* ---- Upgrade screen (free and paid, Nov 17) ---- */
/* One white card, centred and not too wide. Badge on top on a phone, beside the title from 40 rem.
   Only role tokens, so dark mode works with no extra rules. */
.up-card { max-width: 40rem; margin: 1rem auto 1.5rem; }
.up-top { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.up-words { min-width: 0; }
.up-words h1 { margin: 0; font-size: clamp(2rem, 8.5vw, 3rem); line-height: 0.92; overflow-wrap: anywhere; }
.up-text { margin: 0.75rem 0 0; font-size: var(--step-0); line-height: 1.4; max-width: 44ch; }
.up-badge { width: 5rem; height: 5rem; background: var(--mustard); }
.up-list-h { margin: 0 0 0.6rem; font-size: var(--step-0); letter-spacing: 0.04em; }
.up-list { display: grid; gap: 0.4rem; margin: 0 0 1.1rem; }
.up-item { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.45rem 0.6rem; border: var(--rule-s) solid transparent; border-radius: var(--r-tile); font-weight: 700; line-height: 1.35; }
.up-item > span:last-child { min-width: 0; }
.up-here { background: var(--note); border-color: var(--ink); }
.up-tick { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--lettuce); color: var(--on-fill); border: 2px solid var(--ink); font-size: 0.9rem; font-weight: 800; line-height: 1; }
.up-free { margin: 0 0 1.25rem; padding-top: 0.9rem; border-top: 2px dashed var(--line); color: var(--muted); font-size: var(--step--1); line-height: 1.45; max-width: none; }
.up-price { margin: 0 0 0.6rem; font-size: var(--step-1); font-weight: 800; }
.up-btns { display: flex; flex-direction: column; gap: 0.7rem; }
.up-btns form { margin: 0; }
.up-card .btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
.up-note { margin: 0.7rem 0 0; color: var(--muted); font-size: var(--step--1); }
@media (min-width: 40rem) {
  .up-card { margin-top: 2rem; }
  .up-top { flex-direction: row; align-items: center; gap: 1.5rem; }
  .up-badge { width: 7rem; height: 7rem; }
  .up-text { font-size: var(--step-1); line-height: 1.35; }
  .up-btns { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* Paid tags inside buttons and headings (Nov 17) */
/* Paid tag inside a button (Print on prep day, groceries, recipe for free people) and in a card
   heading (Past weeks on Account). Same sizing idea as .btn .pill.soon. */
.btn .pill.paid { margin-left: 0.15em; padding: 0.05em 0.5em; font-size: 0.6875rem; line-height: 1.3; vertical-align: 0; }
.acct-card h2 .pill.paid { margin-left: 0.5em; vertical-align: 0.3em; letter-spacing: 0.06em; }

/* ---------- print (docs/DESIGN.md "Printing") ----------
   Groceries, Prep day and Recipe pages (and the week) print black and white to save ink: the light
   look even when the screen is dark, no bars, buttons, forms or drawings, no coloured fills or hard
   shadows, thin grey outlines. Works on US Letter and A4 (both land between the 40 and 48 rem
   layouts). The Print buttons call window.print() (app.js, data-print); Ctrl/Cmd-P is not gated.
   Everything screen-side stays above this line; only .print-only is hidden on screen here. */
.print-only { display: none; }
@media print {
  @page { margin: 12mm; }
  /* the light look, even when the screen is dark: point the tokens back at paper and ink */
  html[data-theme] {
    --ground: var(--paper); --card: var(--paper); --ink: var(--on-fill); --shade: var(--on-fill); --muted: var(--on-fill); --tomato-text: var(--on-fill);
    --l-breakfast: var(--on-fill); --l-lunch: var(--on-fill); --l-dinner: var(--on-fill); --l-snack: var(--on-fill); --l-shake: var(--on-fill);
    --line: var(--paper); --soft-green: var(--paper); --soft-tomato: var(--paper); --note: var(--paper);
    color-scheme: light; font-size: 12px;
  }
  body { background: #fff; color: var(--ink); font-size: 11pt; line-height: 1.4; }
  .wrap, .wrap.wide { max-width: none; margin: 0; padding: 0; }

  /* off the paper: page frame, controls, messages, sticky bars, drawings */
  .bar, .tabs, .foot, .skip, .testbar, .actions, .no-print, .days, .backlink, .card-foot form, .rate,
  main > .flash, .flash:not(.print-keep), .btn, .spinner, .g-progress, .drawing, .tile, .hero-tile,
  .g-badge, .g-home-art, .prep-hero-art, .pblock-art { display: none !important; }
  .print-only { display: block; }
  .day[hidden] { display: block !important; }

  /* black on white everywhere: no fills, no shadows, no tilts */
  main, main * { color: var(--ink) !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; }
  main * { transform: none !important; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3, .kicker { break-after: avoid; }
  h2 { margin-top: 1.2em; }

  /* the small header on top of each printed page */
  .print-head { margin: 0 0 0.6rem; padding-bottom: 0.35rem; border-bottom: 1px solid #999; font-size: 9pt; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; max-width: none; }

  /* tick boxes: small empty squares to tick with a pen; a ticked item prints like the rest */
  main input[type="checkbox"], .recipe-cols input[type="checkbox"], .pblock input { appearance: none; -webkit-appearance: none; flex: none; width: 0.85rem; height: 0.85rem; margin: 0; border: 1px solid var(--ink); border-radius: 2px; }
  .g-items input:checked + .g-what, .checks input:checked ~ span, .pblock:has(input:checked) .pblock-title,
  .method li:has(input:checked) .text { text-decoration: none; color: var(--ink); }

  /* thin outlines in place of the 3px ink ones */
  .card, .facts div, .ingredients, .method label, .recipe-hero, .numbers, .panel, .flash, .g-home, .prep-box, .pblock, .prep-warn { border: 1px solid #999 !important; border-radius: 8px; }
  .pill, .contains span { border: 1px solid #999; }

  /* the week (unchanged in spirit: cards two to a row) */
  .card { break-inside: avoid; }
  .tape { border: 0; padding: 0; }
  .card-stickers { position: static; }
  .cards { grid-template-columns: 1fr 1fr; gap: 0.5rem; }

  /* Groceries: one compact list, two columns, grouped by store and section */
  .g-head { margin: 0; }
  .g-head h1 { font-size: 22pt; }
  .g-date { border: 0; padding: 0; font-size: 10pt; }
  .g-stores { display: block; column-count: 2; column-gap: 1.75rem; margin-top: 0.75rem; }
  .g-store { display: block; border: 0; border-radius: 0; margin: 0 0 0.75rem; }
  .g-store > h2 { padding: 0 0 0.15rem; font-size: 13pt; border: 0; border-bottom: 1px solid #999; border-radius: 0; }
  .g-body { padding: 0; }
  .g-body h3 { margin: 0.5rem 0 0.1rem; font-size: 8pt; }
  .g-note { margin: 0.25rem 0; font-size: 9pt; }
  .g-items li { border-bottom: 0; break-inside: avoid; }
  .g-items label { min-height: 0; gap: 0.45rem; padding: 0.12rem 0; font-size: 10pt; line-height: 1.25; align-items: baseline; }
  .g-items input { transform: translateY(0.1rem) !important; }
  .g-for { display: none; }
  .g-home { display: block; margin-top: 0.75rem; padding: 0.5rem 0.75rem; break-inside: avoid; }
  .g-home h2 { margin: 0 0 0.25rem; font-size: 13pt; }
  .g-home ul { font-size: 10pt; line-height: 1.4; }

  /* Prep day: the order first, every block whole, then the side boxes */
  .prep-hero { display: block; margin: 0; padding: 0; border: 0; }
  .prep-hero-top { display: none; }
  .prep-hero h1 { font-size: 22pt; margin-bottom: 0.25rem; }
  .prep-hero p { font-size: 10pt; max-width: none; }
  .prep-grid { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
  .prep-order { order: -1; gap: 0.4rem; }
  .prep-order h2, .prep-box h2 { font-size: 14pt; margin: 0; }
  .prep-blocks { gap: 0.4rem; }
  .pblock { grid-template-columns: 0.85rem 5.5rem minmax(0, 1fr); gap: 0 0.6rem; padding: 0.45rem 0.6rem; break-inside: avoid; }
  .pblock input { grid-column: 1; grid-row: 1; align-self: start; margin-top: 0.2rem; }
  .pblock-side { grid-column: 2; grid-row: 1; display: block; }
  .pblock-time { display: block; min-width: 0; white-space: nowrap; padding: 0; border: 0; font-size: 11pt; text-align: left; }
  .pblock-body { grid-column: 3; grid-row: 1; }
  .pblock-title { font-size: 11pt; }
  .pblock-text { font-size: 10pt; line-height: 1.35; }
  .pblock-pills { display: block; margin-top: 0.15rem; font-size: 9pt; }
  .pblock-pill { display: inline; border: 0; padding: 0; font-size: 9pt; font-weight: 700; }
  .pblock-pill + .pblock-pill::before { content: " · "; font-weight: 500; }
  .pblock-pill.must-pill { font-weight: 800; }
  .prep-box { padding: 0.5rem 0.75rem; break-inside: avoid; }
  .prep-box ul { font-size: 10pt; line-height: 1.4; }
  .prep-box p, .prep-skill p { font-size: 10pt; }
  .prep-warn { padding: 0.5rem 0.75rem; font-size: 10pt; }
  .prep-skill > div + div { border-top: 1px dotted #999; }

  /* Recipe: title, numbers on one plain line, facts, then ingredients beside the steps */
  .recipe-hero { display: block; margin: 0; padding: 0; border: 0 !important; }
  .hero-body { padding: 0; gap: 0.25rem; }
  .hero-body h1 { font-size: 22pt; }
  .hero-body .pill.dark { border: 0; padding: 0; font-size: 9pt; }
  .recipe-stickers { display: block; font-size: 10.5pt; }
  .recipe-stickers .sticker, .recipe-stickers .sticker.cal, .recipe-stickers .sticker.protein { display: inline; width: auto; height: auto; border: 0; border-radius: 0; font-size: inherit; font-weight: 700; }
  .recipe-stickers .sticker b, .recipe-stickers .sticker.cal b, .recipe-stickers .sticker.protein b { font-size: inherit; }
  .recipe-stickers .sticker > span::before { content: " "; }
  .recipe-stickers .sticker small { font-size: inherit; font-weight: 500; margin: 0; }
  .recipe-stickers .sticker small::before { content: " ("; }
  .recipe-stickers .sticker small::after { content: ")"; }
  .recipe-stickers .sticker + .sticker::before { content: " · "; font-weight: 500; }
  .disclaimer { font-size: 8pt; max-width: none; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0.6rem 0; }
  .facts div { padding: 0.3rem 0.5rem; }
  .facts dt { font-size: 7.5pt; }
  .facts dd { font-size: 11pt; }
  .facts dd small { font-size: 8pt; }
  .panel { margin: 0.5rem 0; padding: 0.5rem 0.75rem; break-inside: avoid; }
  .panel h2 { font-size: 12pt; margin: 0 0 0.2rem; }
  .panel p, .panel ul { font-size: 10pt; }
  .flash.print-keep { padding: 0.4rem 0.6rem; font-weight: 800; }
  .recipe-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 1rem; align-items: start; margin-top: 0.6rem; }
  .recipe-cols > .ingredients { position: static; }
  .recipe-cols h2 { font-size: 13pt; margin: 0 0 0.25rem; }
  .ingredients { padding: 0.5rem 0.75rem; }
  .ingredients .checks li { border-bottom: 0; break-inside: avoid; }
  .ingredients .checks label { min-height: 0; gap: 0.45rem; padding: 0.12rem 0; font-size: 10pt; line-height: 1.3; align-items: baseline; }
  .contains { font-size: 8.5pt; margin: 0.4rem 0 0; }
  .method { gap: 0.35rem; }
  .method li { break-inside: avoid; }
  .method label { align-items: baseline; gap: 0.4rem; padding: 0; border: 0 !important; }
  .method input[type="checkbox"] { display: none; }
  .step-num { display: block; width: 1.4rem; height: auto; border: 0; border-radius: 0; font-size: 10.5pt; text-align: right; }
  .step-num::after { content: "."; }
  .method .text { padding-top: 0; font-size: 10.5pt; line-height: 1.4; }
  .must { display: block; margin-top: 0.1rem; padding: 0; border: 0; font-size: 10pt; font-weight: 800; }
}
