/* Application styles — components from design/DESIGN.md, values ONLY from
   the canon tokens (design/tokens.css, loaded first). No raw hex/px here
   beyond structural zeros; that's the anti-drift rule. */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding-bottom: var(--sp-6); }

h1, h2 { font-family: var(--font-display); font-weight: var(--display-weight); }
a { color: var(--accent); text-decoration: none; font-weight: 700; }

/* --- app header --- */
.apphead { padding: var(--sp-4) var(--sp-4) var(--sp-2); }
.apphead h1 { font-size: 22px; }
.apphead .sub { font-size: 12.5px; color: var(--muted); margin-top: var(--sp-1); line-height: 1.5; }

/* --- persistent bottom navigation (canon) --- */
.tabbar {
  margin-top: auto; position: sticky; bottom: 0;
  background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: var(--sp-2) 0 calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  font-size: 10.5px; text-align: center; color: var(--muted);
}
.tabbar .tab { display: flex; flex-direction: column; gap: 2px; width: 64px; color: var(--muted); font-weight: 600; }
.tabbar .ico { font-size: 19px; }
.tabbar .tab.on { color: var(--accent); font-weight: 700; }

/* --- cards & lists --- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  margin: 0 var(--sp-4) var(--sp-3);
}
.recipe-card { display: flex; color: inherit; font-weight: 400; }
.recipe-card .ph {
  width: 118px; flex: 0 0 118px; aspect-ratio: var(--photo-ratio);
  object-fit: cover; background: var(--chip);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.recipe-card .body { padding: var(--sp-3); flex: 1; }
.recipe-card h3 { font-size: 14.5px; font-weight: 700; line-height: 1.25; margin-bottom: 3px; }
.recipe-card .context { font-size: 11px; color: var(--muted); margin-bottom: var(--sp-2); }
.recipe-card.overcap .ph, .recipe-card.overcap h3, .recipe-card.overcap .stats { opacity: .55; }

.stats { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stat { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* --- the carb badge: THE consistent element (canon) --- */
.carb-badge {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 7px; padding: 3px 8px; font-size: 12px; font-weight: 800;
}
.carb-badge small { font-weight: 600; opacity: .85; }

/* --- status flags: always icon + word, never color alone --- */
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 3px 7px; }
.flag.warn { background: var(--warn-soft); color: var(--warn); }
.flag.good { background: var(--good-soft); color: var(--good); }
.flag.danger { background: var(--danger-soft); color: var(--danger); }
/* A flag that states a fact rather than a caution: chip fill, muted ink, the
   weight of a filter chip. Added 2026-07-29 for the USDA dataset label, where
   the tints ARE the meaning (approved mockup usda-data-type v1, option
   "graded"): no label at all for Foundation and SR Legacy, `quiet` for Survey
   because USDA authored it, `warn` for Branded and for `manual entry` because
   neither figure is USDA's own measurement. Never use it for a state a human
   should act on — the three above are what say that. */
.flag.quiet { background: var(--chip); color: var(--muted); }

/* --- chips (filters) --- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px var(--sp-4) var(--sp-3); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
/* Chip rows the reviewer must be able to *choose* from, not just read, wrap
   onto as many lines as they need. On a desktop with a plain two-button mouse
   there is no gesture that reaches a chip past the right edge — the option is
   on screen in principle and unreachable in practice. Wrapping keeps every
   option clickable at any width.

   **The "filter strip you can swipe on a phone" exemption is SPENT** (2026-09-14).
   This comment used to excuse a sideways-scrolling row for filter strips. The
   House Menu WAS that strip, and it was written when the strip held three
   chips; five dimensions across the live tag values is roughly thirty, most of
   them unreachable on a desktop, on the screen the household uses most. The
   House Menu's filter rows are now `.chips.wrap` like every other row a person
   chooses from, and `test_every_chip_is_reachable_without_sideways_scrolling`
   hit-tests both screens. Plain `.chips` remains only for rows that are read
   rather than chosen. Do not re-open the exemption for a new filter row. */
.chips.wrap { flex-wrap: wrap; overflow-x: visible; }
.chip {
  flex: 0 0 auto; background: var(--chip); color: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600;
}
.chip.sel { background: var(--accent); color: var(--accent-ink); }
/* The per-chip count: what you get if you tap this, with every other filter
   and the search box already applied. */
.chip .ct { font-weight: 700; opacity: .5; margin-left: var(--sp-1); }
.chip.sel .ct { opacity: .8; }
.chip .x { margin-left: 6px; opacity: .75; font-weight: 800; }

/* A chip whose count is 0 under the current filters: HOLLOW — no fill, dashed
   edge, full-strength ink — and still visible and clickable (approved mockup
   house-menu v4, D10). It may NEVER be plain dimming: on this exact screen
   dimming already means "over the house cap — not suggested"
   (`.recipe-card.overcap` above),
   and one visual carrying two meanings is how a filter starts reading as a
   safety judgement about food. Hollow reads "empty container", which is what
   it is.

   A SELECTED chip returning zero stays filled, deliberately: "this is on and
   finds nothing" is a different statement from "this would find nothing", and
   the zero-results screen is unreadable if the two look alike. */
.chip.zero:not(.sel) {
  background: transparent; border-color: var(--line);
  border-style: dashed; color: var(--ink);
}

/* --- the House Menu filter panel (SPEC.md R4) --- */
/* Native <details>: no JavaScript anywhere in the filtering path. Rendered
   open whenever a filter is active, so state survives a page load (D11). */
.fpanel {
  margin: 0 var(--sp-4) var(--sp-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.fsum {
  list-style: none; display: flex; align-items: center; gap: var(--sp-2);
  padding: 11px 13px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.fsum::-webkit-details-marker { display: none; }
.fsum .sp {
  margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700;
}
/* How many individual chips are on, beside the word "Filters" — the summary
   that is visible with the panel shut, so filtering is never invisible. */
.fsum .cnt {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  padding: 1px var(--sp-2); font-size: 11.5px; font-weight: 800;
}
.fbody { border-top: 1px solid var(--line); padding: var(--sp-1) 0 10px; }
.fbody .chips { padding: 0 14px 2px; }
.dim {
  font-size: 9.5px; letter-spacing: .7px; text-transform: uppercase;
  color: var(--muted); font-weight: 800; padding: 10px 14px 5px;
}
/* The active filters, individually removable, outside the panel — so closing
   the panel never hides the fact that rows are being hidden. */
.active {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  padding: 0 var(--sp-4) var(--sp-3);
}
.active .clear {
  font-size: 12px; color: var(--accent); font-weight: 800; margin-left: 2px;
}

/* --- macro tiles: total carbs is the hero --- */
.macros { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tile .lb { font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile .vl { font-size: 20px; font-weight: 800; margin-top: 2px; }
.tile .vl small { font-size: 11px; font-weight: 600; color: var(--muted); }
.tile.hero { background: var(--accent); border-color: var(--accent); }
.tile.hero .lb, .tile.hero .vl, .tile.hero .vl small { color: var(--accent-ink); }
.tile.hero .vl { font-size: 24px; }
/* Incomplete needs-review: keep the macro layout so the page doesn't jump,
   but dim placeholders so they are never read as a dosing number. */
.macros.dimmed { opacity: .45; }

/* Post-verify confirmation receipt */
.confirm-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--good-soft); color: var(--good);
  font-size: 26px; font-weight: 800; margin-bottom: var(--sp-3);
}
.claimline {
  text-align: center; font-size: 12.5px; color: var(--muted);
  line-height: 1.5; padding: 0 var(--sp-4); margin-top: var(--sp-2);
}
.claimline b { color: var(--ink); }
.actions-stack {
  display: flex; flex-direction: column; gap: 9px;
  padding: var(--sp-5) var(--sp-4) var(--sp-6);
}

/* --- verification banners --- */
.banner { margin: 2px var(--sp-4) var(--sp-3); border-radius: var(--radius); padding: 11px 13px; font-size: 12.5px; line-height: 1.55; }
.banner.good { background: var(--good-soft); color: var(--good); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.dang { background: var(--danger-soft); color: var(--danger); }
/* A statement of FACT about a recipe, carrying no judgement: used for the
   "Not a dinner" filing on the recipe page. Chip-toned rather than one of the
   three status tints above, and that is the whole point of having it — on
   that page warn already means "do not dose from this yet" and danger means a
   hard rule failed, so either would say something untrue about a perfectly
   good salad dressing. It still states a WORD and not only a tint, which is
   the rule design/tokens.css sets for every status colour. */
.banner.plain { background: var(--chip); color: var(--ink); border: 1px solid var(--line); }

/* --- "Also in your library": non-dinners on the House Menu (SPEC R4, D-UI) ---
   A heading and a rule, then ordinary cards. No tint, no dimming, no
   collapse: this section exists BECAUSE neither of that screen's two
   existing signals fits. Dimmed means "the app judged this" (over the carb
   cap) and hidden means "you chose this" (your filters); a non-dinner is
   neither, and borrowing either signal would say something untrue. */
.libsec { margin: var(--sp-5) var(--sp-4) 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.libsec h2 {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: 16px; color: var(--ink); margin: 0 0 var(--sp-1);
}
.libsec-blurb { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-bottom: var(--sp-3); }
/* The cards inside carry their own horizontal margin from `.card`, which
   would double up against this section's. */
.libsec .card { margin-left: 0; margin-right: 0; }
.banner b { font-weight: 800; }

/* Site claim vs ours, side by side inside a banner. Both figures stay on the
   page in every state that has two of them, before and after any decision:
   accepting settles which number to dose from, not what the site said. */
.banner .twofig { display: flex; gap: var(--sp-2); margin: var(--sp-2) 0; }
.banner .twofig > div {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 9px; color: var(--ink);
}
.banner .twofig .lb {
  display: block; font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); font-weight: 800;
}
.banner .twofig b { font-size: 15px; }
/* The site's own printed figure, beneath the converted one. Muted and small
   because it is not the number being compared — but present on every screen
   that shows a converted figure, so a person checking the source can find the
   number the website actually prints. */
.banner .twofig .sub {
  display: block; font-size: 10.5px; color: var(--muted);
  font-weight: 600; margin-top: 3px; line-height: 1.4;
}

/* Calibration converted the site's claim to the plate size actually eaten.
   Its own box rather than a clause inside the prose: a converted figure that
   does not say it was converted is the same wrong number the conversion exists
   to remove (approved mockup calibration-cross-check v1, option B). Dashed
   because it is commentary on the two figures above it, not a third figure —
   and deliberately NOT a --warn tint: nothing here needs review. */
.banner .conversion-note {
  display: block; background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius-sm); padding: 7px 9px; margin: var(--sp-2) 0;
  color: var(--ink); font-size: 11.5px; line-height: 1.5;
}

/* A decision rendered inside the banner that states it, rather than below the
   carb table and the rating row (design/DESIGN.md: CTAs follow the banner, and
   the decision belongs next to the two numbers). .btn is normally page-width
   with its own side margins; in here it fills the banner instead. */
.banner-cta { margin-top: var(--sp-3); }
.banner-cta form { margin: 0; }
.banner-cta .btn { width: 100%; margin: 0 0 var(--sp-1); }
.banner-cta .fhint { text-align: center; margin-bottom: var(--sp-2); }
.banner-cta > *:last-child { margin-bottom: 0; }

/* --- panel card with header + table --- */
.panel { margin: 0 var(--sp-4) var(--sp-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel .hd { padding: 11px 13px 9px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.panel .hd .note { font-size: 10.5px; color: var(--muted); font-weight: 600;
  font-family: var(--font-body); text-align: right; flex: 0 1 auto; line-height: 1.35; }

table.breakdown { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.breakdown td { padding: 9px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.breakdown tr:last-child td { border-bottom: 0; }
table.breakdown td.qty { color: var(--muted); white-space: nowrap; width: 1%; padding-right: 6px; }

/* The discovery tally's two number columns (approved mockup
   system-status.html v3, option A). Right-aligned so the seven-day figure
   and the all-time one line up down the table — the comparison between the
   two periods is the whole reason there are two, and ragged numbers make it
   work the reader should not have to do. */
table.breakdown td.tally-figs { text-align: right; white-space: nowrap; }
table.breakdown td.tally-head {
  text-align: right; color: var(--muted); font-size: 10.5px;
  font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
}
table.breakdown td.cb { text-align: right; font-weight: 800; white-space: nowrap; width: 1%; }
table.breakdown td.cb small { font-weight: 600; color: var(--muted); }
table.breakdown .usda { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
table.breakdown .usda.manual { color: var(--warn); }
/* Specificity: `.usda` above sets muted, so the adjusted marker has to say it
   again here or the one label that must stand out would be the quietest text
   on the carb breakdown. */
table.breakdown .usda.adjusted { color: var(--warn); font-weight: 700; }
table.breakdown .usda.excluded { color: var(--danger); font-weight: 700; }
table.breakdown tr.total td { font-weight: 800; background: var(--accent-soft); }

/* --- instructions --- */
ol.steps { list-style: none; counter-reset: st; }
ol.steps li { counter-increment: st; display: flex; gap: 11px; padding: 9px 13px; font-size: 13px; line-height: 1.5; border-bottom: 1px solid var(--line); }
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before {
  content: counter(st); flex: 0 0 22px; height: 22px; border-radius: 50%;
  background: var(--chip); font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* --- rating control --- */
.raterow { display: flex; gap: var(--sp-2); padding: 2px var(--sp-4) var(--sp-3); }
.rate { flex: 1; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 4px; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.rate .e { display: block; font-size: 19px; margin-bottom: 2px; }
.rate.sel { border-color: var(--accent); background: var(--accent-soft); }

/* --- forms & buttons --- */
.btn {
  display: block; width: calc(100% - 2 * var(--sp-4)); margin: 0 var(--sp-4) var(--sp-2);
  text-align: center; border: 0; border-radius: var(--radius-sm); padding: 13px;
  font-weight: 800; font-size: 14.5px; background: var(--accent); color: var(--accent-ink);
  cursor: pointer; font-family: var(--font-body);
}
.btn.ghost { background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); font-weight: 700; }
/* "How many did it actually feed?" — the calibration box (approved mockup
   recipe-detail v8). A panel rather than a bare field because its three notes
   are part of the control: what it does, what it deliberately does not do
   (cook-for-N), and why a recipe may come back labelled over the carb cap. */
.calibration .bd { padding: 11px 13px 13px; }
.calibration .plates { display: flex; align-items: center; gap: var(--sp-2); }
.calibration .plates input {
  width: 76px; text-align: center; background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 10px; font-size: 15px; font-weight: 800; color: var(--ink);
  font-family: var(--font-body);
}
.calibration .plates .unit { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.calibration .plates .btn { margin-left: auto; }
.calibration .hint { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: var(--sp-2); }
.calibration .hint + .hint { border-top: 1px solid var(--line); padding-top: var(--sp-2); margin-top: var(--sp-3); }
.calibration .hint b { color: var(--ink); }

.btn.inline { display: inline-block; width: auto; margin: 0; padding: 8px 14px; font-size: 12.5px; }

.field { margin: 0 var(--sp-4) var(--sp-3); }
.field label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 12px; font-size: 14px;
  color: var(--ink); font-family: var(--font-body);
}
.field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* --- review triage rows (Option C, approved mockup review-ingredient-header v1) --- */
/* The ingredient's name is the heading of everything below it — the USDA
   disclosure, grams, department, dairy and the status radio all belong to
   that one line. It used to be set at body size and weight on the same
   --surface as its own controls, divided from the next ingredient by a 1px
   rule, which left a reviewer working a twelve-line recipe with no landmark:
   nothing said where one ingredient ended, and an expanded row put the name a
   long scroll away from the fields it names. Three things fix that, and they
   are meant to be read together — the name is promoted to an actual heading,
   an index says which of how many you are on, and a rail carries the row's
   state down its whole height so the boundary stays legible in peripheral
   vision while you're reading the controls. */
.review-row {
  padding: 11px 13px 12px; border-bottom: 2px solid var(--line);
  border-left: 4px solid var(--line); font-size: 13px;
}
.review-row:last-child { border-bottom: 0; }
/* Panel 1 (Recipe facts) keeps the body padding; the ingredient rows go
   full-bleed so the rail can sit against the panel edge. */
.accordion .abody.rows { padding: 0; }
.review-row .rowindex {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
/* --font-display is "headings only" per the canon. This is the call that
   change made: the ingredient name IS the heading of its row. */
.review-row .raw {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: 16px; line-height: 1.3;
}
/* The rail is state, never decoration, and it never speaks alone: every row
   that carries a colour also carries the word or the count that means the
   same thing (the "Excluded — import error" flag, the "needs attention" tint,
   the matched food named on the meta line). --good is claimed only by a row
   that is genuinely finished — matched, with grams — which is why a
   zero-carb-noted line keeps the neutral rail: it is settled, but there is no
   carb figure standing behind it, and green would say there was. */
.review-row.done { border-left-color: var(--good); }
.review-row.done .rowindex { color: var(--good); }
.review-row.attn { background: var(--warn-soft); border-left-color: var(--warn); }
.review-row.attn .rowindex { color: var(--warn); }
.review-row.excluded { border-left-color: var(--danger); }
.review-row.excluded .rowindex { color: var(--danger); }
/* Struck through because the line is not an ingredient at all. The words stay
   the excluded words (rule 8) — this only reinforces them, and is never used
   on a zero-carb line, which is a real ingredient. */
.review-row.excluded .raw { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.review-row .meta { font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
.review-row .controls { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
/* Normal / no nutrition impact / excluded — a radio group, not checkboxes,
   so the three states are mutually exclusive by construction. */
.review-row .statusradio { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.review-row .statusradio label { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: normal; font-weight: 600; color: var(--ink); }
.review-row input, .review-row select { background: var(--bg); border: 1.5px solid var(--line); border-radius: 9px; padding: 6px 8px; font-size: 12px; color: var(--ink); }
.review-row input.grams { width: 90px; }
.cand { display: flex; gap: 8px; align-items: flex-start; border: 1.5px solid var(--line); background: var(--bg); border-radius: 9px; padding: 8px 10px; font-size: 12px; margin-top: 6px; line-height: 1.45; }
.cand small { color: var(--muted); display: block; margin-top: 2px; }
/* A published measure this line cannot be stated in (approved mockup
   how-much-portions v3, option B). It must not read as a control that failed,
   because it is not a control at all — it carries no input. Dashed border and
   a hollow ring where the radio would be say "not a choice here" without
   inventing a token: --chip and --muted are both canon. */
.cand.inert { border-style: dashed; background: var(--chip); color: var(--muted); cursor: default; }
.cand.inert .r { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 14px; margin-top: 1px; }
/* A carbohydrate figure the app had to replace (app/nutrition/adjust.py).
   Warn, never muted: the whole safety of substituting rather than refusing is
   that a substituted 0.0 never reads like a measured one. Wherever a stored
   carb figure is shown, this is how it says it isn't the source's own. */
.adjusted { color: var(--warn); font-weight: 700; }
.cand .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* --- empty state --- */
.empty { text-align: center; padding: 80px 34px; }
.empty .art { font-size: 52px; margin-bottom: var(--sp-3); }
.empty h2 { font-size: 19px; margin-bottom: var(--sp-2); }
.empty p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: var(--sp-4); }
.empty .btn { display: inline-block; width: auto; padding: 12px 22px; }

/* --- auth screens --- */
.authwrap { max-width: 400px; margin: 12vh auto 0; padding: 0 var(--sp-4); }
.authwrap .logo { text-align: center; font-size: 46px; margin-bottom: var(--sp-3); }
.authwrap h1 { text-align: center; font-size: 22px; margin-bottom: var(--sp-2); }
.authwrap p { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: var(--sp-4); line-height: 1.5; }
.error { margin: 0 var(--sp-4) var(--sp-3); border-radius: var(--radius); padding: 11px 13px; font-size: 12.5px; background: var(--danger-soft); color: var(--danger); font-weight: 700; }
/* Same box as .error in the warn tint: "nothing is broken, but you can't go on here" (setup turned off on an empty public server, mockups/render-move.html §2). */
.notice { margin: 0 var(--sp-4) var(--sp-3); border-radius: var(--radius); padding: 11px 13px; font-size: 12.5px; background: var(--warn-soft); color: var(--warn); font-weight: 700; line-height: 1.45; }

/* --- review queue (Import tab) — approved 2026-07-26, mockup Option C --- */
/* Effort bands group the queue, so a reviewer can pick work that fits the
   time they have. The section headers carry the meaning; the tint only
   reinforces it. */
.seclabel {
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); padding: var(--sp-4) var(--sp-4) var(--sp-2);
}
.sortnote { font-size: 11.5px; color: var(--muted); line-height: 1.5; padding: 0 var(--sp-4) var(--sp-3); }
.effort {
  background: var(--chip); color: var(--ink);
  border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700;
}
.effort.easy { background: var(--good-soft); color: var(--good); }
.effort.heavy { background: var(--warn-soft); color: var(--warn); }
.summaryline { font-size: 13.5px; font-weight: 700; color: var(--accent); cursor: pointer; padding: 0 var(--sp-4); }

/* Count badge on the Import tab. Only rendered while work is pending. */
.tabbar .tab { position: relative; }
.tabbadge {
  position: absolute; top: -3px; left: 50%; margin-left: 5px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; font-size: 9px; font-weight: 800;
  padding: 1px 5px; min-width: 16px; text-align: center;
}

/* --- review screen: source link + queue progress --- */
.srclink {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); font-weight: 800; font-size: 12.5px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 12px; margin-top: var(--sp-3);
}
.qprog { padding: 0 var(--sp-4); }
.qprog .bar { height: 7px; background: var(--chip); border-radius: 999px; overflow: hidden; margin-top: var(--sp-2); }
.qprog .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.qprog .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: var(--sp-1); }

/* --- review screen: what's-left banner + teach-in-place (approved 2026-07-26,
   mockup import-review.html v4) --- */
/* The counted list of remaining work. Icon + words carry the state; the tint
   only reinforces it, so the screen still reads correctly without color. */
.banner ul { margin: var(--sp-2) 0 0 var(--sp-4); }
.banner li { margin-bottom: 3px; }

/* "How this screen works" — a compact numbered list, distinct from ol.steps,
   which is the recipe's cooking instructions. */
ol.howto { list-style: none; counter-reset: ht; padding: 10px 13px; }
ol.howto li {
  counter-increment: ht; display: flex; gap: 9px;
  font-size: 12px; line-height: 1.5; color: var(--muted); margin-bottom: 6px;
}
ol.howto li:last-child { margin-bottom: 0; }
ol.howto li::before {
  content: counter(ht); flex: 0 0 18px; height: 18px; border-radius: 50%;
  background: var(--chip); color: var(--ink); font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
ol.howto b { color: var(--ink); font-weight: 700; }

/* USDA lookup block. Sits ABOVE the suggested candidates: it exists for the
   case where the suggestions are wrong, so it can't hide underneath them. */
.fdc {
  border: 1.5px solid var(--line); background: var(--bg);
  border-radius: var(--radius-sm); padding: var(--sp-3); margin-top: var(--sp-2);
}
.fdc .fhd { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.fdc .ftitle { font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.fdc .frow { display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
.fdc .frow input { flex: 1; min-width: 120px; }
.usdalink {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-weight: 800; font-size: 11.5px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 5px 10px;
}
/* "Ask USDA again", offered only when a portions fetch actually failed. Shaped
   like .usdalink because it does the same kind of job, tinted --warn to match
   the message directly above it — the state it belongs to, not decoration.
   Deliberately the quietest actionable thing in the block: an outage is rare,
   and the review screen is used dozens of times in a row. */
.retrybtn {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--warn); font-weight: 800; font-size: 11.5px;
  border: 1.5px solid var(--warn); background: transparent;
  border-radius: 999px; padding: 5px 12px; margin-top: var(--sp-2);
  font-family: inherit; cursor: pointer;
}
.fhint { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.fhint code { background: var(--chip); border-radius: 4px; padding: 1px 4px; }
.lbl { font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 3px; }

/* The lookup's answer: found food, or the reason it can't be used. */
.fdcpreview { border-radius: 9px; padding: 9px 10px; font-size: 11.5px; line-height: 1.5; margin-top: var(--sp-2); }
.fdcpreview.good { background: var(--good-soft); color: var(--good); }
.fdcpreview.warn { background: var(--warn-soft); color: var(--warn); }
.fdcpreview.pend { background: var(--chip); color: var(--muted); }
.fdcpreview b { font-weight: 800; }
.spinner {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--chip); border-top-color: var(--accent);
  display: inline-block; vertical-align: -2px; margin-right: 5px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* htmx marks the in-flight element with .htmx-request; the pending line is
   hidden until then. */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }

.cand.sel { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }

/* --- correcting a match on an already-matched line (mockup import-review v6) --- */
/* The food being replaced, restated at the top of the correction UI: nobody
   should be choosing a replacement without the current match and its numbers in
   view. */
.current {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 10px;
  font-size: 11.5px; line-height: 1.5;
}
.current .lbl { margin-bottom: 2px; }
/* Says out loud that selecting nothing keeps the current match — the safe
   outcome, and not obvious in a list where nothing is pre-selected. */
.keepnote { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 6px; font-weight: 700; }
/* Heading over the candidate list inside the correction disclosure, where the
   paste field above it already carries the block's title. */
.candhd {
  font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted); margin-top: var(--sp-3);
}

/* --- ingredient reuse & dismissal (approved 2026-07-26, mockup v6) --- */
/* The reuse suggestion is an ordinary candidate carrying a chip (see .cand
   above). It is never accent-filled: on this screen accent fill means
   "selected", and a suggestion that looked selected would be a pre-checked
   default on the one screen where nothing ever is. */

/* A quiet text link, not a button: dismissing a suggestion is the rarer
   answer, and shouldn't compete with the choices above it. */
.textlink {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font-weight: 800; font-size: 11.5px;
  font-family: var(--font-body); text-align: left;
  display: inline-block; margin-top: var(--sp-2);
}

/* What a dismissal leaves behind, in place of the suggestion. Muted, and it
   stays for the rest of the review — auto-advance can move the page before a
   timed message is read. */
.receipt {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2);
  background: var(--chip); border-radius: 9px; padding: 8px 10px;
  margin-top: var(--sp-2); font-size: 11.5px; color: var(--muted); line-height: 1.4;
}
.receipt .undo {
  background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap;
  color: var(--accent); font-weight: 800; font-size: 11.5px; font-family: var(--font-body);
}

/* "Matched for you" — the receipt for an attach the app made on a spelling
   alone (plan import-friction D5, approved mockup narrow-reduction v1 option A).

   Deliberately the same --chip fill as .receipt above rather than a tint of
   its own. On this screen `warn` already means "do not dose from this yet" and
   `danger` means a hard rule failed, so either would say something untrue
   about a match that went right; and `accent` means "selected", which nothing
   on this row was. The ink stays full strength — unlike .receipt, which is
   muted because it describes something that did NOT happen — because this one
   is reporting a change to the row it sits on. */
.attached {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2);
  background: var(--chip); border-radius: 9px; padding: 8px 10px;
  margin-top: var(--sp-2); font-size: 11.5px; color: var(--ink); line-height: 1.5;
}
.attached .why { display: block; color: var(--muted); margin-top: 2px; }
.attached .undo {
  background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap;
  color: var(--accent); font-weight: 800; font-size: 11.5px; font-family: var(--font-body);
}

/* "Not suggested for" on a dictionary entry: the durable undo, and the audit
   trail of every suppression. Rendered only when it has something to show. */
.notlinked { border-top: 1px solid var(--line); margin-top: var(--sp-3); padding-top: var(--sp-2); }
.notlinked .nl {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2);
  font-size: 11.5px; padding: 5px 0;
}
.notlinked .nl .name { font-weight: 700; }
.notlinked .nl .when { color: var(--muted); font-weight: 400; }

/* Arithmetic above the grams field — multiplication, kitchen rounding, and
   the per-serving figure. A dosing number should be auditable on its face. */
.calc {
  font-size: 11.5px; color: var(--good); background: var(--good-soft);
  border-radius: 9px; padding: 7px 9px; margin-top: var(--sp-2);
  line-height: 1.5; font-weight: 700;
}
.calc .eq { color: var(--muted); font-weight: 400; }
/* The compatibility gate saying no (2026-07-30). Warn rather than danger:
   nothing went wrong and nobody made a mistake — USDA published a measure of
   something else, and this says so. Danger is reserved for a line flagged as
   an import error. */
.calc.calcrefused { color: var(--warn); background: var(--warn-soft); font-weight: 400; }

/* --- two-panel accordion review screen (Option B, approved mockup v13) --- */
/* Panel 1 (Recipe facts) and Panel 2 (Ingredients) are <details> so a
   finished panel collapses to one summary line and an unfinished one opens
   itself by default (the [open] attribute is set server-side from
   needs_attention / the outstanding-fields check — never toggled by CSS). */
.accordion { margin: 0 var(--sp-4) var(--sp-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.accordion[open] { border-color: var(--accent); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 11px 13px;
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 14px; }
.accordion summary .summaryline2 { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.accordion summary .chev { color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.accordion summary .abadge {
  background: var(--warn-soft); color: var(--warn); font-size: 10.5px; font-weight: 800;
  border-radius: 999px; padding: 3px 9px; flex: 0 0 auto;
}
.accordion .abody { border-top: 1px solid var(--line); padding: 11px 13px; }

/* Per-ingredient match disclosure: the ONE control both an unmatched line
   and an already-matched line use (open by default only for the former) —
   unifying what used to be two separate components (an always-visible USDA
   lookup block, and a separate "Wrong match? Change it" disclosure). */
.disc { border-top: 1px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-2); }
.disc summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: var(--sp-2);
  font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted);
}
.disc summary::-webkit-details-marker { display: none; }
.disc[open] summary { color: var(--accent); }
.disc .dbody { margin-top: var(--sp-3); }

/* A value pre-filled from the seed library (app/nutrition/seed_measures.py)
   or a suggested department — never looks like a human-confirmed one. */
.review-row input.grams.sugg, .review-row select.sugg {
  border-color: var(--accent); background: var(--accent-soft); font-weight: 700;
}
.suggmark {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 5px;
  font-size: 9.5px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: .3px;
}
.suggmark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Panel 1's third badge state. "needs attention" (the inherited warn tint) is
   "a field is blank"; `confirm` is "nothing is blank and nobody has looked",
   which only became a state once these fields started arriving pre-filled;
   `done` is the confirmed panel. Three states, three tints, three words. */
.accordion summary .abadge.confirm { background: var(--accent-soft); color: var(--accent); }
.accordion summary .abadge.done { background: var(--good-soft); color: var(--good); }

/* "or, none of the above" — the rule that separates `meatless` from the real
   proteins in the review screen's chip row. It is not a protein, it is the
   assertion that there are none, and a chip sitting in line with the others
   would read as one more choice of the same kind. */
.chiprule {
  display: flex; align-items: center; gap: var(--sp-2); margin: 9px 0 6px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted);
}
.chiprule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* The same rule in the danger tint, used once: above "Not for us" in the
   review screen's action bar. It marks the one exit that discards the recipe
   AND the reviewer's ingredient work, and that cannot be undone — a different
   kind of act from the two above it, exactly as `meatless` is a different
   kind of answer from a protein. One rule above the exception, never a pair
   labelling both groups (approved mockup not-a-dinner.html v1, option 3). */
.chiprule.danger { color: var(--danger); }
.chiprule.danger::after { background: var(--danger-soft); }

/* The hands-on estimate. Warn-tinted rather than reusing `.suggmark`'s accent
   on purpose: a seeded gram figure is a claim about the line it sits on, while
   this is a claim about the household's kitchen filled in from nothing on the
   page — a stronger guess, and the only one the app makes on this screen. It
   appears here and nowhere else, which is only honest because Panel 1 cannot
   collapse while facts_confirmed_at is NULL (see Recipe.facts_confirmed_at). */
.estmark {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 5px;
  font-size: 9.5px; font-weight: 800; color: var(--warn);
  text-transform: uppercase; letter-spacing: .3px;
}
.estmark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.review-facts input.est, input.est { border-color: var(--warn); background: var(--warn-soft); font-weight: 700; }

/* The source site's own prep/cook/total, quoted as evidence beneath the time
   fields. Quoted only — nothing in this block is summed or differenced, which
   is a rule about the code that renders it, not about the styling. */
.evidence { border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 9px 11px; margin-top: var(--sp-2); }
.evidence.none { border-style: dashed; }
.evidence .etitle {
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.evidence .efigs { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: 12px; }
.evidence .efig b { font-weight: 800; }
.evidence .efig span {
  display: block; color: var(--muted); font-size: 10.5px; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase;
}
.evidence .enote { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 7px; }
.evidence .enote.bad { color: var(--warn); font-weight: 700; }

/* Range force-choose (mockup v13): both stated bounds, already scaled and
   kitchen-rounded, shown as two options — neither pre-selected, no midpoint
   ever computed or offered (CLAUDE.md rule 6). */
.rangewrap { border: 1.5px solid var(--warn); background: var(--warn-soft); border-radius: 9px; padding: var(--sp-3); margin-top: var(--sp-2); }
.rangewrap .rtitle { font-size: 11px; font-weight: 800; color: var(--warn); margin-bottom: var(--sp-2); }
.rangeopt {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 9px;
  padding: 8px 10px; font-size: 12.5px; margin-top: 6px;
}
.rangeopt input { margin: 0; }
.rangeopt .g { color: var(--muted); font-size: 11.5px; margin-left: auto; }

/* Multi-cuisine chip picker: a visually-hidden checkbox inside a chip label.
   :has() toggles the selected look natively — no JS needed to keep a chip's
   appearance in sync with its own checkbox. */
.chipcheck { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
label.chip { cursor: pointer; position: relative; }
label.chip:has(.chipcheck:checked) { background: var(--accent); color: var(--accent-ink); }

/* Sticky action bar: the queue's "never choose what's next" promise. */
.actionbar {
  position: sticky; bottom: 0; background: var(--surface);
  border-top: 1px solid var(--line); padding: var(--sp-3) var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.actionbar .row { display: flex; gap: var(--sp-2); }
.actionbar .row .btn { flex: 1; }
.actionbar .btn.slim { padding: 9px; font-size: 12px; }
.btn.danger { background: var(--surface); color: var(--danger); border: 1px solid var(--line); }

/* --- system status: the scheduled jobs (SPEC R5) ---
   A job's state is always a word plus a tint, never a tint alone — the rule
   design/tokens.css sets for the status colors. `--danger` is the failures
   token, and "could not check" takes it too: a check that did not run is not
   a lesser problem than one that failed, it is an unknown reported honestly. */
.statepill {
  font-family: var(--font-body); font-size: 9.5px; letter-spacing: .5px;
  text-transform: uppercase; font-weight: 800; border-radius: 999px;
  padding: 3px 8px; white-space: nowrap;
}
.statepill.good { background: var(--good-soft); color: var(--good); }
.statepill.warn { background: var(--warn-soft); color: var(--warn); }
.statepill.dang { background: var(--danger-soft); color: var(--danger); }
.jr-result { font-weight: 800; }
.jr-result.ok { color: var(--good); }
.jr-result.bad { color: var(--danger); }
.jr-when { color: var(--muted); }
/* A filesystem path, deliberately not a link — there is nothing to open. */
.logpath { color: var(--muted); font-size: 11.5px; word-break: break-all; }
.histrow {
  display: flex; justify-content: space-between; gap: var(--sp-2);
  padding: 7px 13px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.histrow:last-child { border-bottom: 0; }

/* ===================================================================
   This Week (SPEC R8) — approved mockup this-week.html v5, 2026-09-19.

   Reuses .card, .recipe-card, .flag, .carb-badge and .banner rather than
   restyling them: a suggestion IS a recipe card, and the over-cap dim is the
   same dim as the House Menu's, deliberately, because one visual meaning per
   treatment is what stops "dimmed" starting to mean two things.
   =================================================================== */

.rowline { display: flex; justify-content: space-between; align-items: center;
  gap: var(--sp-2); padding: var(--sp-2) 0 var(--sp-1); }
.rowline .count { font-size: 12.5px; color: var(--muted); font-weight: 700; }

/* A button that reads as a link: same affordance as the mockup's "Show me
   different ones", but a real <button> because it POSTs — a re-roll must
   never be reachable by following a link (mail scanners prefetch). */
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 800; color: var(--accent);
  white-space: nowrap; }

.week-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.week-card { overflow: hidden; }

/* The why-chip. `new` is for a meal that arrived some way other than the
   engine choosing it — hand-added, or found by the weekly finder — and reads
   as good news rather than as caution. */
.why { display: inline-block; font-size: 10px; font-weight: 800;
  letter-spacing: .3px; border-radius: 6px; padding: 3px 7px;
  margin-bottom: 5px; background: var(--accent-soft); color: var(--accent); }
.why.new { background: var(--good-soft); color: var(--good); }

/* UNSAFE SINCE THE MENU WAS BUILT (CLAUDE.md rule 13). The card is tinted and
   the reason is on it; it is never removed, because a dinner vanishing with
   no explanation is the failure canon calls "blocked, zero problems listed".
   Whether it can still be PICKED is a separate question with three different
   answers — see app/menu/week.py BLOCKS_A_PICK. */
.week-card.unsafe { border-color: var(--danger); background: var(--danger-soft); }
.week-card.unsafe .ph, .week-card.unsafe h3, .week-card.unsafe .stats { opacity: .6; }

.week-foot { display: flex; align-items: stretch;
  border-top: 1px solid var(--line); }
.week-foot form { flex: 1; display: flex; }
.week-foot form:last-child { flex: 0 0 52px; }
.pickbtn { flex: 1; width: 100%; background: none; border: 0; cursor: pointer;
  font: inherit; padding: var(--sp-3); font-size: 13px; font-weight: 800;
  color: var(--accent); }
.pickbtn.on { background: var(--accent); color: var(--accent-ink); }
/* Not merely dim: a control that cannot be used says so in words, because a
   greyed button with no explanation is a dead end someone taps twice. */
.pickbtn.blocked { flex: 1; text-align: center; color: var(--danger);
  opacity: .65; padding: var(--sp-3); font-size: 13px; font-weight: 800; }
.swap { width: 100%; background: none; border: 0; cursor: pointer;
  border-left: 1px solid var(--line); font-size: 15px; color: var(--muted);
  padding: var(--sp-3) 0; }

/* Dropped from the suggestions and NAMED. Chip fill and muted ink, not a
   warn tint: nothing here needs acting on — the household already acted, by
   rating it. */
.dropped-note { margin-top: var(--sp-2); padding: var(--sp-3);
  background: var(--chip); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 11.5px; line-height: 1.5;
  color: var(--muted); font-weight: 600; }
.dropped-note b { color: var(--ink); }

/* v6 option C. The rung line belongs to THIS week's set, so it sits under
   the count; muted, because a samey week is a fact about variety and not a
   problem to fix. */
.rungline { margin: 0 0 var(--sp-2); font-size: 11.5px; line-height: 1.45;
  color: var(--muted); font-weight: 600; }

/* The library card: why recipes are missing, and how far the library is from
   big enough. Surface-toned, NOT warn — on this screen warn already means
   "over the cap", and nothing here is unsafe. */
.libcard { margin-top: var(--sp-3); padding: var(--sp-3);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 11.5px; line-height: 1.5;
  color: var(--muted); font-weight: 600; }
.libcard h2 { font-family: inherit; font-size: 12px; font-weight: 800;
  color: var(--ink); margin: 0 0 var(--sp-1); }
.libcard .when { display: block; font-size: 10.5px; margin-bottom: var(--sp-1); }
.libcard ul { list-style: none; margin: 0; padding: 0; }
.libcard li { display: flex; justify-content: space-between;
  gap: var(--sp-2); padding: 3px 0; }
.libcard a { color: var(--accent); font-weight: 800; text-decoration: none;
  white-space: nowrap; }
.libfloor { margin-top: var(--sp-2); padding-top: var(--sp-2);
  border-top: 1px solid var(--line); }
.libcard > .libfloor:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.libfloor .head { color: var(--ink); font-weight: 800; font-size: 12px; }
.libfloor .meter { height: 6px; background: var(--chip); border-radius: 3px;
  margin: var(--sp-1) 0; overflow: hidden; }
.libfloor .meter span { display: block; height: 100%;
  background: var(--accent); border-radius: 3px; }
.libfloor .go { display: inline-block; margin-top: var(--sp-1); }

/* How the week was built. Collapsed by default (household's choice): the
   account is available without standing between them and dinner. */
.acct { margin-top: var(--sp-3); }
.acct summary { list-style: none; cursor: pointer; padding: var(--sp-3);
  font-size: 12px; font-weight: 700; color: var(--muted);
  display: flex; justify-content: space-between; gap: var(--sp-2); }
.acct summary::-webkit-details-marker { display: none; }
.acct summary .caret { color: var(--accent); font-weight: 800; }
.acct-body { padding: 0 var(--sp-3) var(--sp-3); border-top: 1px solid var(--line); }
.acct-rule { display: flex; gap: 9px; padding: 7px 0; font-size: 11.5px;
  line-height: 1.45; border-bottom: 1px solid var(--line); }
.acct-rule:last-of-type { border-bottom: 0; }
.acct-rule .mk { flex: 0 0 16px; font-weight: 800; text-align: center; }
.acct-rule .lab { font-weight: 700; color: var(--ink); }
.acct-rule .det { color: var(--muted); font-weight: 600; }
/* Three marks, three colours, three words — never a tick for the third.
   `could_not_be_judged` is not a mild pass: the rule had nothing to read, and
   a screen that renders it as compliant is claiming something the engine
   never earned (SPEC R6a). */
.acct-rule.held .mk { color: var(--good); }
.acct-rule.gave_way .mk { color: var(--warn); }
.acct-rule.could_not_be_judged .mk { color: var(--muted); }
.acct-rule.could_not_be_judged .lab { color: var(--muted); }
.acct-foot { font-size: 11px; color: var(--muted); padding-top: 9px;
  line-height: 1.5; font-style: italic; }

.week-summary { margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--line); }
.week-summary .t { font-size: 12.5px; color: var(--muted); font-weight: 600;
  margin-bottom: var(--sp-2); }
.week-summary .t b { color: var(--ink); }
.week-summary .soon { font-size: 11px; color: var(--muted);
  text-align: center; margin-top: 7px; font-weight: 600; }

.empty-state { text-align: center; padding: 72px var(--sp-4); }
.empty-state .art { font-size: 52px; margin-bottom: var(--sp-3); }
.empty-state h2 { font-family: var(--font-display);
  font-weight: var(--display-weight); font-size: 19px; margin-bottom: var(--sp-2); }
.empty-state p { font-size: 13.5px; color: var(--muted); line-height: 1.55;
  margin-bottom: var(--sp-4); }

/* --- The Saturday email's one-tap confirm page (templates/email_confirm.html,
       approved mockup mockups/email-confirm.html v1). Tokens only, as everywhere. --- */

/* The three rating faces, as a radio group. A LABEL-wrapped radio rather than
   three links, because the GET that rendered this page must not be able to
   write anything — the choice is submitted with the form, never followed. */
.rate-faces { display: flex; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-3); }
.rate-face {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 6px; text-align: center;
  cursor: pointer;
}
.rate-face input { position: absolute; opacity: 0; pointer-events: none; }
.rate-face .e { font-size: 24px; display: block; }
.rate-face .l { font-size: 11px; font-weight: 700; margin-top: var(--sp-1); display: block; }
/* :has() gives the checked state without JS; .sel is the server-rendered
   pre-selection from the face the reader tapped in the email. Both are needed:
   one survives a click, the other survives page load. */
.rate-face.sel, .rate-face:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
}
.rate-face.no { border-color: var(--danger); }
.rate-face.no .l { color: var(--danger); }

/* The permanent verdict's button. Solid danger rather than the existing
   `.btn.danger` (which is a quiet outline used where the destructive act is
   ordinary) — this is the one control in the app that cannot be undone, and it
   is deliberately the loudest thing on its screen. */
.btn.danger-solid { background: var(--danger); color: var(--accent-ink); border: 0; }

/* --- "Send this week's menu" on /status (Appendix A screen 13's three
       controls, which arrived with the Saturday email on 2026-09-20). --- */
.sendbox { padding: var(--sp-3); }
.sendfacts { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: var(--sp-3); }
.sendfacts b { color: var(--ink); }
.sentline { margin-top: var(--sp-1); color: var(--good); font-weight: 700; }
.sentline.muted { color: var(--muted); font-weight: 400; }
/* Two forms, one panel: a rule between them, because they differ in what they
   WRITE and running them together would be the single-control mistake. */
.sendsplit { border-top: 1px solid var(--line); margin: var(--sp-3) 0; }
.sendlabel { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: var(--sp-2); }
.sendcheck { display: flex; gap: var(--sp-2); align-items: flex-start;
  font-size: 12.5px; line-height: 1.45; margin-bottom: var(--sp-3); cursor: pointer; }
.sendcheck .sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.sendinput { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 10px; font-size: 12.5px; font-family: var(--font-body);
  background: var(--bg); color: var(--ink); margin-bottom: var(--sp-2); }
.sendbox .btn { width: 100%; margin: 0; }
.sendnote { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: var(--sp-2); }
.sendnote b { color: var(--ink); }
.sendpreview { display: inline-block; font-size: 12.5px; color: var(--accent);
  font-weight: 700; text-decoration: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
/* A house fact the household does not set here — see templates/settings.html.
   Styled as a statement rather than as a disabled input, because a greyed-out
   field invites someone to look for how to enable it. */
.readonly-rule { font-size: 13px; color: var(--ink); line-height: 1.6; }

/* --- The measurable sibling: a ruler borrowed from another USDA food ------
   Approved mockup sibling-ruler v1, option B (plan import-friction D4).

   Drawn as its OWN block rather than as one more row in the portion list,
   and that is the design decision rather than a styling one: a weight from a
   DIFFERENT food rendered in the same shape as a weight from this one stops
   being read as different after about a week, and an unlabeled borrowed
   weight is indistinguishable from a measured one.

   The edge is DASHED --accent because the block is information until a human
   accepts it; the solid accent fill is reserved for the button that does the
   accepting, so "this is on offer" and "this is chosen" never look alike.
   No new token: --chip, --accent-soft and --accent only. */
.ruler { border: 1.5px dashed var(--accent); background: var(--surface);
  border-radius: var(--radius-sm); padding: var(--sp-3); margin-top: var(--sp-2); }
.ruler .rtitle { font-size: 11px; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: var(--sp-2); }
/* One block may offer more than one ruler — USDA publishes `stalk, small`,
   `stalk, medium` and `stalk, large` for celery, nearly four times apart and
   all true — so each is separated rather than run together (rule 6: two
   honest measurements are a question, never a ranking). */
.ruler .rulerrow + .rulerrow { border-top: 1px solid var(--line);
  margin-top: var(--sp-3); padding-top: var(--sp-3); }
.ruler .food { font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.ruler .ds { display: inline-block; background: var(--chip); color: var(--muted);
  font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; margin-left: 4px; vertical-align: 1px; }
.ruler .measure { font-size: 12.5px; margin-top: var(--sp-2); line-height: 1.5; }
.ruler .measure b { font-weight: 800; }
/* Both carb figures, side by side (plan R8). The live case this catches:
   searching `salmon fillet` returns `Vegetarian fillets` publishing
   `1 fillet = 85 g` — right noun, real portion, wrong food — and only the
   carb figure, 9.0 against salmon's 0.0, gives it away. */
.ruler .carbs { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }
.ruler .cbox { flex: 1 1 140px; background: var(--chip); border-radius: 9px;
  padding: 7px 9px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.ruler .cbox b { display: block; font-size: 13px; color: var(--ink); font-weight: 800; }
.ruler .cbox.mine { background: var(--accent-soft); }
.ruler .bound { font-size: 10.5px; color: var(--muted); line-height: 1.5;
  margin-top: var(--sp-2); border-top: 1px solid var(--line); padding-top: 7px; }
.ruler .bound b { color: var(--ink); font-weight: 700; }
.ruler .acceptbtn { margin-top: var(--sp-3); width: 100%; background: var(--accent);
  color: var(--accent-ink); border: none; border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13px; font-weight: 800; font-family: inherit;
  cursor: pointer; line-height: 1.35; }

/* ===== v16 — needs-you first, the carb breakdown below =====================
   Approved mockup import-review.html v16, option A (2026-09-21). This screen
   used to be two accordions, and Panel 2 — every ingredient, every gram, every
   per-100 g figure — COLLAPSED whenever nothing needed attention: that is,
   precisely on the happy path, where the reviewer then pressed Verify having
   read a one-line summary. Two regions replace them.

   The colours carry their usual meanings on this screen and no new ones:
   accent is "this is where you act", warn is "do not dose from this yet",
   danger is a hard failure, and --chip is the plain tone. The breakdown itself
   is deliberately UNTINTED — a settled row is not a success to celebrate, it
   is the arithmetic, and tinting it green would make the one warn row read as
   an exception rather than as the work. */

/* "Needs you" — accent-edged because accent means "act here". The header and
   subtitle are padded; the rows go full-bleed so their state rail sits against
   the section edge, the same call `.accordion .abody.rows` made for Panel 2. */
.needs {
  border: 1.5px solid var(--accent); border-radius: var(--radius);
  background: var(--surface); margin-top: var(--sp-3); overflow: hidden;
}
.needs .nhd {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--sp-2); padding: var(--sp-3) var(--sp-4) 0;
}
.needs .nhd .t {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: 17px; letter-spacing: -.01em;
}
.needs .nhd .ct {
  font-size: 11px; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; color: var(--accent); flex: 0 0 auto;
}
.needs .nsub {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  padding: var(--sp-1) var(--sp-4) var(--sp-3);
}
.needs .review-row:last-child { border-bottom: 0; }

/* Nothing to decide. Not the word "verified" and not a claim about the
   recipe's numbers — only `verify_recipe` may make that claim, and it has not
   run. --good is honest here because the statement is about the reviewer's
   work, which genuinely is finished. */
.allclear {
  border: 1.5px solid var(--good); background: var(--good-soft);
  border-radius: var(--radius); padding: var(--sp-4); margin-top: var(--sp-3);
}
.allclear .t {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: 17px; color: var(--good);
}
.allclear .s { font-size: 12.5px; color: var(--good); line-height: 1.55; margin-top: var(--sp-1); }

/* The breakdown. Always visible; there is no rule anywhere that collapses it. */
.bd {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-4); margin-top: var(--sp-3);
}
.bd .bhd {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2);
}
.bd .bhd .t {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: 17px; letter-spacing: -.01em;
}
.bd .bhd .n { font-size: 11px; color: var(--muted); font-weight: 700; flex: 0 0 auto; }
.bd .bsub { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.bdlist { margin-top: var(--sp-3); }
.bdrow {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  border-top: 1px solid var(--line); padding: 10px 0;
}
.bdrow:first-child { border-top: 0; }
.bdrow .l { flex: 1; min-width: 0; }
.bdrow .raw { font-size: 13px; font-weight: 700; line-height: 1.35; }
.bdrow .src { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.bdrow .g { flex: 0 0 60px; text-align: right; font-size: 12px; color: var(--muted); font-weight: 700; }
.bdrow .c { flex: 0 0 66px; text-align: right; font-size: 13px; font-weight: 800; }
/* A line still at the top of the page. Warn, and it says so in words on the
   row as well as in the tint — the rail rule above, applied here too. */
.bdrow.wait {
  background: var(--warn-soft); border-radius: var(--radius-sm); border-top: 0;
  padding: 10px var(--sp-3); margin: var(--sp-1) 0;
}
.bdrow.wait .raw, .bdrow.wait .src, .bdrow.wait .c { color: var(--warn); }
/* Inert and excluded leave the arithmetic the same way and are never
   described in the same words (rule 8): only the excluded row is struck
   through and tinted danger, and only it says "import error". */
.bdrow.inert .c, .bdrow.excl .c { color: var(--muted); font-weight: 700; }
.bdrow.excl .raw {
  text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--danger);
}
.bdrow.excl .src { color: var(--danger); }
/* A settled line's controls, behind one tap and nowhere else on the page. */
.bdrow .disc.bdchange, .factsstrip .disc.bdchange { margin-top: var(--sp-2); }

.bdtot {
  display: flex; gap: var(--sp-2); align-items: baseline;
  border-top: 1.5px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-3);
}
.bdtot.pers { border-top: 0; padding-top: var(--sp-2); margin-top: 0; }
.bdtot .l { flex: 1; font-size: 13px; font-weight: 800; }
.bdtot .l small {
  display: block; font-weight: 400; color: var(--muted); font-size: 11px;
  margin-top: 2px; line-height: 1.45;
}
.bdtot .c { flex: 0 0 auto; font-size: 16px; font-weight: 800; color: var(--accent); }
/* No total, and why. Warn rather than danger: nothing has failed, the screen
   is refusing to print a figure it cannot stand behind. */
.bdheld {
  border-top: 1.5px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-3);
  font-size: 12px; line-height: 1.55; color: var(--warn);
}
/* A contributing line stored at 0 g: the figures are real and the row stays
   neutral, but the two numbers that say "this adds nothing" carry the warn
   tint so they are not read past. An observation, not a verdict — see the
   comment on this row in templates/review.html. */
.bdrow .zeroflag { color: var(--warn); }

/* ===== triage — the backlog on one screen, grouped by food ================
   Approved mockup `triage.html` v1, option A (2026-09-21). The FOOD is the
   grouping and the SPELLING is what gets answered: rule 5 forbids merging two
   dictionary keys however alike they look, so a group is a comparison device
   with no authority, and every spelling inside it carries its own offer, its
   own buttons and its own answer. */
.tsum {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-4); margin-top: var(--sp-3);
}
.tsum .big {
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: 20px;
}
.tsum .s { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: var(--sp-1); }

.fgroup {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-top: var(--sp-3); overflow: hidden;
}
.fgroup .fhd {
  padding: var(--sp-3) var(--sp-4); display: flex; justify-content: space-between;
  align-items: baseline; gap: var(--sp-2); border-bottom: 1px solid var(--line);
}
.fgroup .fhd .t {
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: 16px;
}
.fgroup .fhd .n {
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted); flex: 0 0 auto;
}
.spell { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
.spell:first-of-type { border-top: 0; }
.spell .sp { font-size: 13.5px; font-weight: 800; }
.spell .where { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 3px; }
.spell .where a { color: var(--muted); text-decoration: none; }
.spell .where b { color: var(--ink); font-weight: 700; }
.kindchip {
  display: inline-block; background: var(--chip); border-radius: 999px;
  padding: 1px 7px; font-size: 10px; font-weight: 700; color: var(--ink);
}
.offer {
  background: var(--chip); border-radius: var(--radius-sm); padding: 9px 11px;
  font-size: 12px; line-height: 1.55; margin-top: var(--sp-2);
}
/* "Do not dose from this yet" is what warn means everywhere in this app, and
   treating two foods as one is exactly how a wrong carb figure gets made. */
.offer .cau { color: var(--warn); font-weight: 700; }
.offernums { color: var(--muted); font-size: 11px; display: block; margin-top: 3px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--sp-2); align-items: center; }
.acts form { display: contents; }
.seedform { align-items: flex-end; }
.act {
  background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: 6px 12px; font-size: 11.5px; font-weight: 800;
  cursor: pointer; font-family: var(--font-body);
}
.act.ghost { border-color: var(--line); color: var(--muted); }
.nothing { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: var(--sp-2); }
/* The warning a group earns when its spellings are NOT the same food. It sits
   BETWEEN them, because that is where the mistake would be made. */
.notsame {
  background: var(--warn-soft); color: var(--warn); font-size: 11.5px; line-height: 1.55;
  padding: 10px 13px; border-top: 1px solid var(--line);
}
.notsame b { font-weight: 800; }
/* The way into triage, from the import queue. Chip-toned: it is a route to
   work, not a warning about it. */
.triagelink {
  display: flex; align-items: center; gap: var(--sp-3); text-decoration: none;
  background: var(--chip); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-3); color: var(--ink);
}
.triagelink .tl { flex: 1; font-size: 13px; font-weight: 800; line-height: 1.35; }
.triagelink .tl small {
  display: block; font-weight: 400; color: var(--muted); font-size: 11.5px;
  margin-top: 3px; line-height: 1.45;
}
.triagelink .tr { color: var(--accent); font-size: 18px; font-weight: 800; }

/* --- triage v2: the inline search block (approved mockup triage.html v2,
   option S-A — one panel, everything at once). No new token: the block is
   INFORMATION until a human acts on it, so accent is reserved for controls
   that commit something. --- */
.sblock {
  border: 1.5px solid var(--accent); background: var(--surface);
  border-radius: var(--radius-sm); padding: var(--sp-3); margin-top: var(--sp-2);
}
.sblock .shd {
  font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--accent); display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
/* The query row — editable and re-runnable (F13: FDC's top hit is wrong
   about half the time on multi-word names). */
.qrow { display: flex; gap: 6px; align-items: flex-end; margin-top: var(--sp-3); flex-wrap: wrap; }
.qrow .grow { flex: 1 1 150px; min-width: 0; }
.qbox {
  width: 100%; border: 1.5px solid var(--accent); background: var(--bg);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px;
  color: var(--ink); font-weight: 700; font-family: inherit;
}
.qgo {
  background: var(--accent); color: var(--accent-ink); border: none;
  border-radius: var(--radius-sm); padding: 9px 13px; font-size: 12px;
  font-weight: 800; font-family: inherit; cursor: pointer; flex: 0 0 auto;
}
/* The FDC-ID paste route — first-class beside the name search, not a
   footnote (F13). */
.idrow { display: flex; gap: 6px; align-items: flex-end; margin-top: var(--sp-2); flex-wrap: wrap; }
.idrow .grow { flex: 1 1 120px; min-width: 0; }
.idbox {
  width: 100%; border: 1.5px solid var(--line); background: var(--bg);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px;
  color: var(--muted); font-family: inherit;
}
.idgo {
  background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px;
  font-weight: 800; font-family: inherit; cursor: pointer; flex: 0 0 auto;
}
/* A source heading — the two lists are labelled separately and never merged
   (rule 6: one ranked list across the dictionary and FoodData Central would
   be a ranking across two different kinds of authority). */
.src { display: flex; align-items: center; gap: 8px; margin-top: var(--sp-4); }
.src i { flex: 1; height: 1px; background: var(--line); }
.src span {
  font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted);
}
/* A choosable row. Nothing is ever pre-selected (rule 11) — F13 gives it
   live evidence: a pre-checked top hit would be wrong about half the time. */
.pick {
  display: flex; gap: 8px; align-items: flex-start; border: 1.5px solid var(--line);
  background: var(--bg); border-radius: var(--radius-sm); padding: 8px 10px;
  font-size: 12px; margin-top: 6px; line-height: 1.45; cursor: pointer;
}
.pick input[type="radio"] { margin-top: 2px; flex: 0 0 auto; }
.pick .t { font-weight: 700; }
.pick small { color: var(--muted); font-weight: 400; display: block; margin-top: 2px; line-height: 1.45; }
/* Why a list is short — several different reasons, several different
   sentences (C13, C14, D3; rule 9). Warn tint: on every screen in this app
   warn means "something here is not what it looks like". */
.shortwhy {
  background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 11.5px; line-height: 1.55; margin-top: var(--sp-2);
}
.shortwhy.grey { background: var(--chip); color: var(--muted); }
.shortwhy.grey b { color: var(--ink); }
/* The create questions — they exist because creating a dictionary entry
   means answering the dairy question (rule 3): dairy_class defaults to
   "none" at INSERT, and a default is not an allergy answer. */
.create { border-top: 1px solid var(--line); margin-top: var(--sp-3); padding-top: var(--sp-3); }
.create .chd {
  font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--accent);
}
.create .cfor { font-size: 12px; font-weight: 500; margin-top: 4px; line-height: 1.4; color: var(--muted); }
.reqrow { margin-top: var(--sp-3); }
.reqlbl { font-size: 11.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.req {
  background: var(--warn-soft); color: var(--warn); font-size: 9.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
}
/* Radios, not a <select>: a pre-selected required select passes HTML
   validation with zero interaction (rule 11). */
.dairyrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dairyopt {
  flex: 1 1 104px; border: 1.5px solid var(--line); background: var(--bg);
  border-radius: var(--radius-sm); padding: 8px 9px; font-size: 11.5px;
  line-height: 1.4; cursor: pointer; display: block;
}
.dairyopt input[type="radio"] { margin-right: 4px; }
/* The confirm bar. Stays visible; the refusal renders above it. */
.savebar { margin-top: var(--sp-3); }
.refusal {
  background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 11.5px; line-height: 1.55; margin-top: var(--sp-2);
}

/* --- triage v2: section 2 — matched, still owing a weight (approved
   mockup triage.html v2, option W-B). --- */
.sec2hd { margin-top: var(--sp-5); }
.sec2hd .t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 18px; }
.sec2hd .s { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.subhd {
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); margin-top: var(--sp-4); display: flex; align-items: center; gap: 8px;
}
.subhd i { flex: 1; height: 1px; background: var(--line); }
/* Which MEASURE a ruler explains. Offered once per distinct measure, and no
   measure ever borrows another's (A2) — the grams_per_noun / grams_per_unit
   split already refuses this in the database. */
.forwhat {
  display: inline-block; background: var(--chip); border-radius: 999px; padding: 3px 9px;
  font-size: 10.5px; font-weight: 800; color: var(--ink); margin-bottom: var(--sp-2);
}
.declinebtn {
  margin-top: var(--sp-2); width: 100%; background: transparent; color: var(--muted);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer;
}
/* No ruler found. Rule 9's fourth instance: the wording of a query decides
   what it finds, so this says NOT FOUND BY THESE QUERIES, never "USDA
   publishes none". */
.noruler {
  background: var(--chip); border-radius: var(--radius-sm); padding: 9px 11px;
  font-size: 11.5px; line-height: 1.55; color: var(--muted); margin-top: var(--sp-2);
}
.noruler b { color: var(--ink); font-weight: 700; }
/* A line named and linked, never confirmed here (A4) — the shape
   weight_revision.py already uses for lines it cannot move. */
.owing {
  border-top: 1px solid var(--line); padding: 9px 0; display: flex; gap: var(--sp-2);
  align-items: flex-start;
}
.owing:first-of-type { border-top: 0; }
.owing .l { flex: 1; min-width: 0; }
.owing .raw { font-size: 12px; font-weight: 700; line-height: 1.4; }
.owing .imp { font-size: 10.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.owing .g { flex: 0 0 52px; text-align: right; font-size: 12px; font-weight: 800; padding-top: 1px; }
.owing .g.none { color: var(--muted); font-weight: 700; }
.owing .jump {
  font-size: 10.5px; font-weight: 800; color: var(--accent); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
  display: inline-block; margin-top: 5px;
}

/* ===================================================================
   "Add to this week" — approved mockup add-to-this-week.html v3,
   plans/add-to-this-week.md. Reuses This Week's `.pickbtn` for the button
   itself, deliberately: it is the same act (an add IS a pick, D1) and one
   look for it on both screens is what makes the toggle legible.
   =================================================================== */

/* The strip under a House Menu card, or alone on the recipe page's card.
   Below the card's link, never inside it — a form inside an <a> is invalid. */
.add-foot { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.add-foot form { flex: 1; display: flex; }
.add-card .add-foot { border-top: 0; }

/* A refusal is a sentence in place of the button, in danger ink at the weight
   `.pickbtn.blocked` uses on This Week — never a greyed button with no
   reason, which is a dead end someone taps twice. The words are
   week.PICK_REFUSALS', never a copy. */
.addnote { flex: 1; padding: 9px var(--sp-3); font-size: 11.5px; line-height: 1.45;
  color: var(--danger); font-weight: 600; }

/* Browse mode's banner: chip-toned (.banner.plain), a route and not a
   warning. The count moves in place with each tap. */
.browsebar { display: flex; align-items: center; gap: var(--sp-2); }
.browsebar .t { flex: 1; }
.browsebar .t small { display: block; color: var(--muted); font-weight: 600; font-size: 11.5px; }

/* ===================================================================
   Shopping list — the List tab and More → Staples
   (approved mockup shopping-list.html v3; plan shopping-list.md).
   Prefixed `shop-` so nothing here can restyle another screen's `.item`,
   `.foot` or `.box`. No carb figure appears on these screens (plan A7), so
   no carb colour does either.
   =================================================================== */
.shop-pills { display: flex; gap: 6px; padding: var(--sp-1) var(--sp-4) var(--sp-3); flex-wrap: wrap; }
.shop-pill { background: var(--chip); border-radius: 999px; padding: 5px 11px;
  font-size: 11.5px; font-weight: 700; color: var(--muted); }
.shop-pill b { color: var(--ink); }

.shop-copybar { margin: 0 var(--sp-4) var(--sp-3); }
.shop-copybar .btn { display: block; text-align: center; text-decoration: none; margin: 0; }
.shop-hint { margin: 0 var(--sp-4) var(--sp-3); font-size: 11.5px; color: var(--muted); line-height: 1.5; }
/* The copy source: in the DOM so copy.js can read it and every htmx swap
   redraws it, but never seen or tabbed to. */
.shop-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.shop-dept { margin: 0 var(--sp-4) var(--sp-3); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shop-dept .hd { padding: 9px 14px 7px; font-size: 11px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.shop-dept.also .hd small { display: block; text-transform: none; letter-spacing: 0;
  font-weight: 600; margin-top: 2px; }

.shop-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--line); font-size: 13.5px; }
.shop-item:last-child { border-bottom: 0; }
.shop-item .markform { margin: 0; }
.shop-item .main { flex: 1; min-width: 0; }
.shop-item .top { display: flex; gap: var(--sp-2); align-items: baseline; }
.shop-item .nm { flex: 1; font-weight: 700; }
.shop-item .qty { font-weight: 800; text-align: right; }
.shop-item .from { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.shop-item .why { display: block; font-size: 11px; color: var(--muted); font-style: italic;
  margin-top: 3px; line-height: 1.45; }
.shop-item .acts { display: block; margin-top: var(--sp-1); }
.shop-item .acts .linkbtn { font-size: 11px; font-weight: 700; }

/* The "already have" box: a real submit button, so it works with no
   JavaScript. Ticked = filled in the good tint with a check. */
.shop-box { width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--line);
  background: var(--surface); padding: 0; cursor: pointer; position: relative; flex: 0 0 26px; }
.shop-box.on { background: var(--good); border-color: var(--good); }
.shop-box.on::after { content: "✓"; color: var(--accent-ink); font-size: 14px; font-weight: 800;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
/* U1: a ticked row stays in place, struck through and dimmed. */
.shop-item.have .nm, .shop-item.have .qty, .shop-item.have .from { opacity: .45; text-decoration: line-through; }
.shop-item.have .acts { opacity: .45; }
/* A6 / Q1: the tick reset because the amount moved. Warn tint: look again. */
.shop-item.changed { background: var(--warn-soft); }
.shop-item .flag { display: block; font-size: 11.5px; color: var(--warn); font-weight: 700;
  margin-top: var(--sp-1); line-height: 1.45; }
.shop-tag { display: inline-block; font-size: 10px; font-weight: 800; background: var(--chip);
  color: var(--muted); border-radius: 999px; padding: 1px 7px; margin-left: var(--sp-1); vertical-align: 1px; }

.copybtn { flex: 0 0 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--muted); font-size: 15px; cursor: pointer; padding: 0; }
.copybtn.done { border-color: var(--good); color: var(--good); background: var(--good-soft);
  font-size: 11px; font-weight: 800; }
.shop-toast { display: block; font-size: 11px; color: var(--good); font-weight: 700; margin-top: var(--sp-1); }

.shop-foot { margin: 0 var(--sp-4) var(--sp-3); background: var(--chip); border-radius: var(--radius);
  padding: var(--sp-3) 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.shop-foot b { color: var(--ink); }
/* The skipped staples: a row a person chooses from, so it WRAPS
   (`.chips.wrap`; the sideways-scroll exemption is spent) and is swept by
   assert_every_chip_is_reachable. */
.shop-foot .chips { padding: var(--sp-2) 0 0; gap: 6px; }
.shop-foot .markform { margin: 0; }
.shop-foot .chip { background: var(--surface); border: 1.5px solid var(--line); font-size: 12px;
  font-weight: 700; padding: 5px 10px; cursor: pointer; }
.shop-more { display: inline-block; margin-top: var(--sp-2); font-size: 12px; font-weight: 700;
  color: var(--accent); text-decoration: none; }

.shop-srow { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); font-size: 13.5px; }
.shop-srow:last-child { border-bottom: 0; }
.shop-srow .nm { flex: 1; font-weight: 600; }
.shop-srow form { margin: 0; }
.shop-back { display: block; padding: var(--sp-3) var(--sp-4) 0; font-size: 13px; color: var(--accent);
  font-weight: 700; text-decoration: none; }
.shop-plain { margin: 0 var(--sp-4) var(--sp-4); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: var(--sp-3) 14px; font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; line-height: 1.6; white-space: pre-wrap; user-select: all; }
