/* Fraunces, self-hosted, for the wordmark alone. The interface stays on the
   system stack: it renders 13px hints and tabular numerals natively on every
   platform, costs nothing, and never shifts layout on load. A display face
   would be a downgrade there and is doing no work the UI font can't.
   The wordmark is the opposite case — "Grubstake" set in the same font as the
   table headers is a label, not a mark.
   Only the opsz axis is in this cut; weight is baked at 700. font-display:
   swap so the name is readable in the fallback while 20KB arrives. */
@font-face {
  font-family: Fraunces;
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* A real scale with gaps you can see. Everything used to sit between
     0.8rem and 1.05rem, so nothing could be emphasis. */
  --t-micro: 0.75rem;    /* 12px — pills, ids, provenance */
  --t-small: 0.8125rem;  /* 13px — hints, secondary */
  --t-body:  0.9375rem;  /* 15px — prose */
  --t-lead:  1.25rem;    /* 20px — page ledes, numbers in tables */
  --t-title: 1.75rem;    /* 28px — page titles */

  /* One right edge for everything that isn't a table. Ledes stopped at 62ch,
     hints at 68ch, method lists at 74ch and the stat tiles stretched the full
     1080, so the top of a page had four different right edges and read as a
     narrow column with a wide thing bolted on. Tables are the deliberate
     exception: they run the full width because their content demands it.

     In rem, not ch, deliberately. `ch` is the width of a "0" in the element's
     *own* font, so 74ch on a 15px lede and 74ch on a 13px hint are two
     different widths — which is how four right edges happened in the first
     place. 40rem is ~72 characters of body prose and fits four stat tiles. */
  --measure: 40rem;

  /* Paper, not screen. Cream ground, ink type, one green. The photograph on
     the front door — dried flowers, carrots, warm wood — was a stranger on
     charcoal and belongs on this. Fraunces was chosen because it does not
     look like SaaS; on a dark UI it was confined to a wordmark and three
     numbers, and everything else stayed Inter-on-graphite. */
  --bg: #f4efe6;
  --panel: #fbf8f2;
  --field: #fffdf9;          /* input grounds — was var(--field), hard-coded 19 times */
  --line: #d9d0c1;
  --rule: #e6dfd2;           /* table rules — was var(--rule) */
  --ink: #1e1a16;
  --dim: #6f665c;
  --accent: #3e7d4a;
  --warn: #a86e12;
  --bad: #b8433a;
  /* RGB triplets, so tints can follow the palette instead of hard-coding
     the old dark-theme colours: rgb(var(--accent-rgb) / .1). */
  --accent-rgb: 62 125 74;
  --warn-rgb: 168 110 18;
  --bad-rgb: 184 67 58;
  --ink-rgb: 30 26 22;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.topbar {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
/* .topbar a is (0,1,1) and this was (0,1,0), so the accent colour written
   here has never actually won — the wordmark has been rendering in --dim
   since the day it was added. Matching the selector's weight fixes it. */
.topbar a.brand {
  font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.15rem;
  color: var(--accent); text-decoration: none; letter-spacing: 0;
  font-optical-sizing: auto;
}
/* nav fills the bar so the profile can sit hard right. It used to be a
   plain flex row, which put the avatar one nav-gap after "Store" — reading as
   a seventh menu item rather than as your account. */
.topbar nav { display: flex; gap: 1.1rem; flex: 1; align-items: baseline; }
.topbar a { color: var(--dim); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }

main { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
/* .split-body is a wrapper the split layout needs; on every other page it has
   to be transparent to the layout it sits inside. */
main:not(.split) > .split-body { display: contents; }

h1 { font-size: 1.6rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 2rem 0 .8rem; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.lede { color: var(--dim); max-width: var(--measure); margin: 0 0 1.5rem; }

.hero h1 { font-size: 2rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.steps li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem;
  padding: .7rem .95rem; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius);
}
.steps li.done { border-left-color: var(--accent); }
.steps li span { color: var(--dim); font-size: .9rem; }
.steps a { color: var(--accent); }

textarea {
  width: 100%; padding: .8rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}
button {
  margin-top: .7rem; padding: .5rem 1.1rem; border-radius: 8px;
  border: 1px solid var(--accent); background: transparent;
  color: var(--accent); font-weight: 600; cursor: pointer;
}
button:hover { background: rgb(var(--accent-rgb) / .12); }

.coverage { margin: 1.6rem 0 .8rem; color: var(--dim); }
.coverage.good b { color: var(--accent); }
.coverage.ok b { color: var(--warn); }
.coverage.poor b { color: var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  text-align: left; padding: .5rem .6rem; color: var(--dim);
  font-weight: 600; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--line);
}
td { padding: .5rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr.unresolved td { background: rgb(var(--warn-rgb) / .06); }
td.raw { color: var(--ink); max-width: 26rem; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.dim, .dim { color: var(--dim); }
td.small { font-size: .8rem; }
code { background: var(--field); padding: .1rem .35rem; border-radius: 4px; color: var(--accent); font-size: .85em; }
/* A path, URL or key has no break points of its own, so a long one ran off
   the side of a phone and took the page with it. break-word, not anywhere:
   it breaks only a string that cannot fit its line, and leaves a table
   column's minimum width where it was. */
code { overflow-wrap: break-word; }
/* A chip is one object. Without nowrap "out today" broke across two lines
   and took its own border with it, leaving half a pill on each. */
.tag {
  font-size: .72rem; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 .4rem; color: var(--dim);
  white-space: nowrap; display: inline-block; vertical-align: baseline;
}

/* Dense tables scroll inside themselves rather than the page. */
table { display: block; overflow-x: auto; width: 100%; }
td a { color: var(--ink); text-decoration: none; }
td a:hover { color: var(--accent); text-decoration: underline; }
.lede a, p a { color: var(--accent); }

/* Home tiles. Capped at the prose measure so a row of three doesn't stretch
   to 1080px and hand the page a right edge nothing else shares. */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: .7rem; margin: 1.5rem 0; max-width: var(--measure);
}
/* Unless the page around them is that wide. The cap is right where the tiles
   are the widest thing on the page, and wrong on the proposal, where a full
   width panel sits above them and a full width table below: five tiles broke
   four and one across 60% of the page, with the rest of the row empty
   (Jordan, 2026-09-24). The same for a line of text that annotates something
   full width rather than being prose in its own right. */
.tiles.wide, .hint.wide, .lede.wide { max-width: none; }
.tile {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .9rem 1rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.tile:hover { border-color: var(--accent); }
.tile b { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile span { color: var(--dim); font-size: .85rem; }
.tile.attn b { color: var(--warn); }

/* Review cards */
/* Every auto-filled grid takes min(track, 100%) as its column minimum. A bare
   300px was wider than a 320px phone leaves after the page's side padding, so
   the cards pushed the whole page sideways. The min() changes nothing wherever
   a full track fits, which is every screen wider than a phone. */
/* align-items: start, because grid items stretch to their row's height by
   default. Three of sixty-one recipes carry a photo, so one card with an
   image made every card beside it grow a blank half — which read as a broken
   placeholder rather than as a card that simply has no picture. Ragged
   bottoms are the honest look when the content is ragged. */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: .8rem; align-items: start;
}
.card { padding: .9rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
/* A title breaks inside a word only when the word is wider than the whole
   line. Otherwise its longest word set the head's minimum width and pushed
   what sat beside it out of the card: a pasted link as a title ran 185px
   past a review card on a 280px screen. break-word would not do: it leaves
   that minimum where it was. */
.card-title { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3;
  overflow-wrap: anywhere; }
.card-title:hover { color: var(--accent); }
.card-meta { color: var(--dim); font-size: .84rem; margin: .35rem 0 .7rem; }
.card form { display: flex; gap: .5rem; }
.card button { margin-top: 0; font-size: .85rem; padding: .35rem .8rem; }

.cov { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cov.good { color: var(--accent); }
.cov.ok { color: var(--warn); }
.cov.poor { color: var(--bad); }
/* nowrap keeps "80%" in one piece. In a heading the same class carries a
   sentence ("125 min left of 240 · 12 shared across recipes"), which is
   wider than a small phone and has to be allowed to wrap. */
h2 .cov { margin-left: .5rem; text-transform: none; letter-spacing: 0; white-space: normal; }

button.ghost { border-color: var(--line); color: var(--dim); }
button.ghost:hover { background: rgb(var(--ink-rgb) / .05); color: var(--ink); }

.rowbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin: 1rem 0 .5rem; }
.rowbar form { display: flex; align-items: center; gap: .5rem; margin: 0; }
.rowbar button { margin-top: 0; }
.rowbar label { color: var(--dim); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.rowbar input[type=number] {
  width: 4.5rem; padding: .35rem .5rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-variant-numeric: tabular-nums;
}
/* A button and the sentence explaining it. Sitting them side by side put a
   caption on the button's baseline, so the two competed for the same line and
   the caption's length decided where the button ended up. Stack them: the
   button is the thing, the sentence is underneath it. */
.action { margin: 1rem 0 1.4rem; }
.action button { margin-top: 0; }
.action .caption {
  display: block; color: var(--dim); font-size: var(--t-small);
  max-width: var(--measure); margin-top: .45rem; line-height: 1.5;
}

.hint { color: var(--dim); font-size: .85rem; max-width: var(--measure); margin: .2rem 0 1.5rem; }
.empty { color: var(--dim); }
.empty a, .notes a { color: var(--accent); }

.method { color: var(--ink); max-width: var(--measure); padding-left: 1.2rem; }
.method li { margin-bottom: .5rem; }
.method li.section { list-style: none; margin-left: -1.2rem; color: var(--dim); font-weight: 600; text-transform: uppercase; font-size: .78rem; letter-spacing: .05em; margin-top: 1rem; }
.notes { color: var(--dim); max-width: var(--measure); font-size: .9rem; }
.notes li { margin-bottom: .45rem; }

.copyrow { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .2rem; flex-wrap: wrap; }
.copyrow code { word-break: break-all; }
.copyrow button { margin-top: 0; font-size: .8rem; padding: .25rem .7rem; }

/* Both boxes carry text nobody wrote for a screen: what Kroger or requests
   said, a URL and its query string included, with nowhere to break. With
   Kroger unreachable that made the store page 590px wide on every phone. */
.flash {
  padding: .6rem .9rem; margin-bottom: 1.2rem;
  background: rgb(var(--accent-rgb) / .1); border: 1px solid var(--accent);
  border-radius: var(--radius); color: var(--accent); font-size: .9rem;
  overflow-wrap: anywhere;
}
/* A message saying something did not happen, in the alert's colours. */
.flash.error { background: rgb(var(--bad-rgb) / .1); border-color: var(--bad); color: var(--bad); }
.alert {
  padding: .6rem .9rem; margin: 1rem 0;
  background: rgb(var(--bad-rgb) / .1); border: 1px solid var(--bad);
  border-radius: var(--radius); color: var(--bad); font-size: .9rem;
  overflow-wrap: anywhere;
}
code.big { font-size: 1.3rem; padding: .2rem .5rem; }
form.inline { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
form.inline button { margin-top: 0; }
.searchbar { margin: 1rem 0; }
.searchbar input {
  width: 22rem; max-width: 100%; padding: .45rem .7rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit;
}
/* An inline form is as wide as its contents, and a 22rem field plus the
   button came to 450px: wider than a phone. On a phone the form takes the
   row instead, and the field gives up width so the button stays on screen. */
@media (max-width: 640px) {
  form.inline.searchbar { display: flex; }
  .searchbar input { min-width: 0; }
}
.pinned-now { padding: .6rem .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
tr.is-pinned td { background: rgb(var(--accent-rgb) / .08); }
.promo { color: var(--accent); }
td form { margin: 0; }
td button { margin-top: 0; font-size: .8rem; padding: .3rem .8rem; }
input[type=radio] { accent-color: var(--accent); }
.btnlink {
  display: inline-block; padding: .5rem 1.1rem; border-radius: 8px;
  border: 1px solid var(--accent); color: var(--accent);
  text-decoration: none; font-weight: 600;
}
.btnlink:hover { background: rgb(var(--accent-rgb) / .12); }

/* Planner */
.weightbar { margin: 1.2rem 0 .4rem; padding: 1rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.presets button { margin-top: 0; font-size: .82rem; padding: .3rem .8rem; }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: .8rem 1.2rem; }
.sliders label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.sliders label > span { display: flex; gap: .4rem; align-items: baseline;
  text-transform: capitalize; color: var(--dim); }
.sliders label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sliders label i { font-style: normal; font-size: .78rem; }
.sliders input[type=range] { accent-color: var(--accent); width: 100%; }
.weightbar > button { margin-top: 1rem; margin-right: .5rem; }

.trace { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.trace li { padding: .55rem .8rem; border-radius: 8px; font-size: .88rem;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); }
.trace li.took { border-left-color: var(--accent); }
.trace li.passed { border-left-color: var(--line); color: var(--dim); }
.delta { display: inline-block; margin-left: .45rem; font-size: .78rem;
  font-variant-numeric: tabular-nums; padding: 0 .35rem; border-radius: 4px;
  background: var(--field); }
.delta.up { color: var(--accent); }
.delta.down { color: var(--bad); }
.warn { color: var(--warn); }
/* Spare servings are information, not a problem — a big recipe that runs over
   gives you lunch. Muted rather than sharing the warning colour. */
.spare { color: var(--dim); font-weight: 500; }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.method.compact { font-size: .85rem; }
.method.compact li { margin-bottom: .3rem; }
input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; }

/* The settings rules live further down, with the cards. This block was an
   earlier version of the same selectors left behind: .settings-grid and
   .setting were each defined twice, and its ".setting > span" was still
   applying text-transform: capitalize, which turned the unit beside every
   value into "Portions Per Meal". Same fault as the two .storerow rules. */

/* Cart send */
.sendbox { padding: 1rem 1.2rem; background: var(--panel); border: 1px solid var(--accent);
  border-radius: var(--radius); max-width: 60ch; }
.sendbox p { margin-top: 0; }
.sendbox label { display: block; margin: .35rem 0; color: var(--dim); font-size: .9rem; }
.sendbox label.confirm { margin: .9rem 0 .2rem; color: var(--ink); font-weight: 600; }
a.tile { text-decoration: none; }
button.tick { margin:0; padding:.1rem .5rem; border-color: var(--line); color: var(--dim); font-size:.95rem; line-height:1.2; }
button.tick:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
tr.is-done td { opacity: .5; }
tr.is-done td:nth-child(2) { text-decoration: line-through; }
.card.locked { border-color: var(--accent); }
label.lock { font-size: .76rem; color: var(--dim); display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.card-head { gap: .5rem; }
.btnlink.small { padding: .35rem .8rem; font-size: .85rem; }
/* .ghost on an <a> has to beat .btnlink's accent border, or a link that sits
   beside a ghost button outranks it for no reason. */
.btnlink.ghost { border-color: var(--line); color: var(--dim); font-weight: 600; }
.btnlink.ghost:hover { background: rgb(var(--ink-rgb) / .05); color: var(--ink); }
.card form { align-items: center; }
/* A recipe's photo: one size and shape for every recipe, cropped to fill it,
   with the title and what there is to know beside it (.recipehead). */
/* The frame takes the height of the row, which the text sets; the photo
   fills the frame and is cropped to it. Sized by the photo instead, a tall
   one made the row taller than the text beside it. */
.hero-frame { position: relative; min-height: 10rem; overflow: hidden;
  border-radius: var(--radius); }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
.recipehead {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.2rem 1.6rem; align-items: stretch; margin-bottom: 1.8rem;
}
.recipehead.nophoto { grid-template-columns: minmax(0, 1fr); }
.recipehead h1 { margin-top: 0; }
.recipehead .lede { margin-bottom: .3rem; }
.recipehead .cooked { margin: 0 0 .9rem; color: var(--dim); font-size: var(--t-small); }
.recipehead .rowbar { margin: 0 0 .7rem; gap: .75rem; }
/* A <button> keeps the browser's smaller font where a link takes the page's,
   so Archive and Save stood shorter than Edit and Rescale beside them. */
.recipehead button { font-size: inherit; }
.recipehead .repeatbox input { width: 4.5rem; }
.recipehead .hint { margin: .3rem 0 0; }
/* On a phone the photo goes above, as wide as the page and shorter. */
@media (max-width: 640px) {
  .recipehead { grid-template-columns: minmax(0, 1fr); }
  .hero-frame { aspect-ratio: 16 / 9; min-height: 0; }
}
.thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: .6rem; }
tr.daybreak td { background: var(--field); color: var(--dim); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
select { padding: .3rem .5rem; border-radius: 6px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; font-size: .85rem; }

/* Background jobs */
.jobbox { padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin: 1.2rem 0; }
.bar { height: 8px; background: var(--field); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }
.jobline { margin: .7rem 0 .2rem; display: flex; gap: .7rem; align-items: baseline; }
.jobline b { font-variant-numeric: tabular-nums; }

/* Active page: a filled underline plus a brightness change, so it doesn't
   rely on colour alone to be legible. */
.topbar nav a { position: relative; padding-bottom: .3rem; }
.topbar nav a.here { color: var(--ink); font-weight: 600; }
.topbar nav a.here::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.95rem;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* Drag-to-install bookmarklet */
.dragrow { margin: 1rem 0 .6rem; }
.bookmarklet {
  display: inline-block; padding: .65rem 1.3rem; border-radius: 10px;
  background: var(--accent); color: #14171a; font-weight: 700;
  text-decoration: none; font-size: 1rem; cursor: grab;
  box-shadow: 0 2px 10px rgb(var(--accent-rgb) / .18);
}
.bookmarklet:active { cursor: grabbing; }
.bookmarklet:hover { filter: brightness(1.07); }
.method a, .steps a, ol a, ul a { color: var(--accent); }
.bookmarklet { display: inline-flex; align-items: center; gap: .45rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.card-actions form { display: flex; gap: .5rem; margin: 0; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.danger:hover { background: rgb(var(--bad-rgb) / .12); }
/* Destructive action sits apart from the rest, deliberately — right-aligned
   whether or not the card is wide enough to keep it on one row. */
.card-actions > form:last-child { margin-left: auto; }
.sortbar { display: flex; align-items: center; gap: .4rem; margin: 0 0 1rem; flex-wrap: wrap; }
.chip { padding: .2rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--dim); text-decoration: none; font-size: .8rem; }
.chip:hover { color: var(--ink); }
.chip.on { border-color: var(--accent); color: var(--accent); }

/* Stat breakdown: items wrap as whole units, never mid-label. */
.breakdown {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .3rem 1.1rem; margin: 0 0 1.1rem;
  color: var(--dim); font-size: .85rem;
}
.breakdown span { white-space: nowrap; }
.breakdown b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.breakdown .dim b { color: var(--dim); }
.breakdown .divider {
  width: 1px; align-self: stretch; background: var(--line); margin: 0 .2rem;
}

/* Recipe origin, coloured so a glance separates what you clipped from what
   came out of the family cookbook. */
.src { color: var(--dim); }
.src-nyt { color: #2f6ea3; font-weight: 600; }
.src-maryes { color: #a5476f; font-weight: 600; }
.src-starter { color: #6f5aa5; font-weight: 600; }
.chip .arrow { margin-left: .3rem; opacity: .8; }
.src-legacy { color: #7d857c; }

/* Status pill: state where the state is, rather than in a sentence below it. */
.status {
  display: inline-block; margin-left: .6rem; padding: .1rem .6rem;
  border-radius: 999px; font-size: .72rem; font-weight: 600;
  text-transform: none; letter-spacing: 0; vertical-align: middle;
}
.status.ok { color: var(--accent); border: 1px solid var(--accent);
  background: rgb(var(--accent-rgb) / .1); }
.status.todo { color: var(--warn); border: 1px solid var(--warn);
  background: rgb(var(--warn-rgb) / .1); }

/* Drag-to-bookmarks hint: a fixed overlay spanning the whole window, so the
   line can begin at the button and finish at the top edge, which is where the
   bookmarks bar is. Nothing in the document flow can do both. */
#dragarrow {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 20;
}
#dragarrow .curve {
  fill: none; stroke: var(--accent); stroke-width: 3;
  stroke-linecap: round; opacity: .75; stroke-dasharray: 2 9;
}
/* A filled triangle, not two stroked legs. The old head was a wide thin "^"
   drawn at a fixed angle, so it neither matched the curve's direction nor
   read as an arrowhead. */
#dragarrow .head { fill: var(--accent); stroke: none; opacity: .9; }
#dragarrow text {
  fill: var(--accent); font-size: 14px; font-weight: 600;
  font-family: inherit; opacity: .9;
}
.dragzone { display: flex; align-items: center; gap: 1rem; margin: 1.2rem 0 .6rem; }

/* No bookmarks bar to point at on a phone. */
@media (max-width: 760px) {
  .dragzone { padding: .4rem 0 1rem; }
  .dragzone .dragarrow, .dragzone .draglabel { display: none; }
}

/* Settings as a dense list: label, field, one-line hint. The full reasoning
   is a tooltip — nine paragraphs turned a settings page into an essay. */
/* Two fields per row: one column left the right half of the page empty. */
/* Each setting is a block: name and control on one line, the note under it.
   The old grid ran label / input / hint twice across the page, so "days" and
   "share of spend that scores zero" shared a column width and neither half
   aligned with the other. Alignment now happens inside a block. */
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr));
  gap: 0 3rem; margin: 0 0 1.6rem;
}
.setting {
  display: grid; grid-template-columns: minmax(8rem, 11rem) 4.6rem;
  justify-content: start; align-items: baseline;
  gap: 0 .8rem; padding: .4rem 0;
  border-bottom: 1px solid var(--rule);
}
.setting.full { grid-column: 1 / -1; grid-template-columns: 1fr;
  justify-content: stretch; }
.setting > label { font-size: .9rem; color: var(--ink); }
.setting > i {
  grid-column: 1; font-style: normal; color: var(--dim);
  font-size: var(--t-micro); line-height: 1.5;
}
.setting > input, .setting > select {
  grid-row: 1; grid-column: 2;
  padding: .22rem .45rem; border-radius: 6px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; font-size: .88rem;
  font-variant-numeric: tabular-nums; width: 100%;
}
/* A select holds words, not a number. The value column is sized for figures,
   which clipped "start to table" to "start to ta", so a row containing one
   lets its second track take the width the words need. */
.setting:has(select) { grid-template-columns: minmax(8rem, 11rem) auto; }
.setting > select { width: auto; min-width: 7rem; max-width: 12rem; }
.setting.full > input { grid-row: 2; grid-column: 1; width: 100%; }
.setting.full > i { grid-row: 3; }


/* --- Restraint pass -------------------------------------------------------
   Green was doing six jobs at once: brand, links, buttons, success, saved
   state, numbers and code. When everything is the accent, nothing reads as
   emphasis. It now means "you can act on this, or it went well" — data reads
   in plain ink. */
code { color: #4d5c66; }
code.big { color: var(--accent); }
td a { color: var(--ink); }

/* Rows are scannable and trackable across their width. */
tbody tr:hover td { background: rgb(var(--ink-rgb) / .028); }
tbody tr { transition: background .12s ease; }

/* Keyboard users get to see where they are. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }

/* A clearer step between page title, section and body. */
h1 { font-size: 1.75rem; letter-spacing: -.02em; }
h2 { font-size: .8rem; letter-spacing: .09em; margin: 2.2rem 0 .9rem; }
.card { padding: .8rem .9rem; }
.card-meta { font-size: .8rem; }


/* --- Type scale -----------------------------------------------------------
   Four steps with real gaps between them, so a glance can tell a page title
   from a section from a number from a caption. */
h1 { font-size: var(--t-title); line-height: 1.15; }
h2 { font-size: var(--t-micro); }
.lede { font-size: var(--t-body); }
.hint, .card-meta, td.small, .breakdown, .chip, .draglabel small { font-size: var(--t-small); }
.tag, .status, .src, td.dim.small, .settings-list i { font-size: var(--t-micro); }
table { font-size: var(--t-small); }
th { font-size: var(--t-micro); }

/* --- Figures in tables ------------------------------------------------------
   The table's own size, a touch heavier than the words beside them. They
   were a size up and bold, and Jordan asked why the prices were so much
   bigger than everything else (2026-09-17). */
td.num {
  font-size: inherit; font-weight: 500; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
td.num.dim { font-weight: 400; color: var(--dim); }
.cov { font-size: var(--t-body); font-weight: 600; }
h2 .cov { font-size: var(--t-small); }

/* A cost in a table stays in the table's type: the display serif (.money,
   below) is for figures that stand alone. */
td.money { font-family: inherit; font-size: inherit; font-weight: 600; letter-spacing: 0; }
td.money.dim { font-weight: 500; }

/* Units ride along quietly so the figure keeps the weight. */
td.num .unit, .unit { font-size: var(--t-micro); font-weight: 400; color: var(--dim); }

.tile b { font-size: 1.9rem; letter-spacing: -.02em; }
.tile span { font-size: var(--t-small); }

/* Pick-a-row table: the row is the control, so the whole thing is a target. */
table.pick tbody tr { cursor: pointer; }
table.pick td { border-bottom: 1px solid var(--rule); padding: 0; }
table.pick label {
  display: flex; align-items: baseline; gap: .8rem;
  padding: .6rem .7rem; cursor: pointer; width: 100%;
}
table.pick .branch { font-size: var(--t-body); color: var(--ink); min-width: 11rem; }
table.pick .street { font-size: var(--t-small); color: var(--dim); }
table.pick tr.is-pinned .branch { font-weight: 600; }

/* A panel for the one setting that reaches an outside account. */
.panel {
  padding: .9rem 1.1rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); max-width: 46rem;
}
.panel.ok { border-color: rgb(var(--accent-rgb) / .4); }
.panel.todo { border-color: rgb(var(--warn-rgb) / .4); }
.panel-head { margin: 0 0 .4rem; font-size: var(--t-body); }
.panel .hint { margin: 0; }
.panel .status { margin-left: 0; margin-right: .5rem; }

/* --- Accounts -------------------------------------------------------------
   Signup and sign-in are the only pages a stranger sees, so they get a
   narrower column and more air than the working pages. Nothing here is
   scanned against anything else; it's read once, in order. */
.wizard { max-width: 46rem; }
.wizard.narrow { max-width: 26rem; }
.wizard h1 { margin-top: .2rem; }

.steplabel {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); margin: 0 0 .5rem;
}
/* Progress as five bars rather than "Step 3 of 5" alone — the shape of what
   is left is easier to read than the arithmetic. */
.stepbar { display: flex; gap: .3rem; margin: 0 0 1.6rem; }
.stepbar span {
  height: 3px; flex: 1; border-radius: 2px; background: var(--line);
}
.stepbar span.done { background: rgb(var(--accent-rgb) / .45); }
.stepbar span.now { background: var(--accent); }

.field { display: block; margin: 0 0 1rem; max-width: 24rem; }
.field > span {
  display: block; font-size: var(--t-small); color: var(--ink);
  margin-bottom: .3rem;
}
.field > span i { font-style: normal; color: var(--dim); font-size: var(--t-micro); }
.field input, .field select {
  width: 100%; padding: .5rem .6rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-size: var(--t-body);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent);
}
/* Codes are transcribed by hand, so they get the monospace and the spacing
   that makes a misread character obvious. */
input.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em; text-transform: uppercase;
}

.q { margin: 0 0 1.5rem; }
.qlabel { margin: 0 0 .45rem; font-size: var(--t-body); }
.choices { display: flex; flex-wrap: wrap; gap: .4rem; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block; padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: var(--t-small); cursor: pointer;
  color: var(--dim); user-select: none;
}
.choice input:checked + span {
  border-color: var(--accent); color: var(--accent);
  background: rgb(var(--accent-rgb) / .10);
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The signup page's dollar input. Scoped to the div: as a bare .money this
   also made every table cell classed money a flex box, so price cells on the
   plan and the shopping list stopped stretching to their row and drew their
   border under the number instead of along the row. */
div.money { display: flex; align-items: center; gap: .35rem; }
div.money .prefix { color: var(--dim); font-size: var(--t-body); }
div.money input {
  width: 7rem; padding: .4rem .5rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-variant-numeric: tabular-nums;
}
.tag.later {
  background: none; border: 1px solid var(--line); color: var(--dim);
  margin-left: .4rem;
}

table.people { width: 100%; margin: .4rem 0 .6rem; }
table.people th {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .06em;
  color: var(--dim); font-weight: 500; text-align: left; padding: 0 .35rem .3rem 0;
}
/* The base td rule is vertical-align: top, which floats the remove
   button above the input beside it. */
table.people td { padding: 0 .35rem .35rem 0; vertical-align: middle; }
table.people input, table.people select {
  width: 100%; padding: .35rem .45rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-size: var(--t-small);
}
table.people .drop { padding: .25rem .5rem; line-height: 1; }

/* Ten codes, laid out so a missed one is visible as a gap. */
.codes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr));
  gap: .4rem; margin: 0 0 1rem;
}
.codes code {
  padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--field); text-align: center; letter-spacing: .06em;
  color: var(--ink);
}

/* "Write these down" is neither an error nor a success. .alert reads as
   something went wrong; this is an instruction that matters. */
.notice {
  padding: .6rem .9rem; margin: 1rem 0;
  background: rgb(var(--warn-rgb) / .09); border: 1px solid var(--warn);
  border-radius: var(--radius); color: var(--warn); font-size: var(--t-small);
  max-width: 62ch;
}

button.big { font-size: var(--t-body); padding: .6rem 1.1rem; }
/* Consecutive hint lines: the first loses its trailing gap so the pair reads
   as a stanza rather than two stranded sentences. */
.hint.tight { margin-bottom: .35rem; }

/* A hint after a heading sits close on purpose — it is a subtitle. A hint
   after a form is a separate thought and was inheriting the same 3px, while
   every other block on those pages is separated by about 25. Scoped to the
   doorway pages so a caption directly under a button (the passkey status,
   which really is a caption) keeps its tight setting. */
.wizard form + .hint, .wizard .rowbar + .hint { margin-top: .9rem; }
/* Same rule for a hint following a button. The sign-in fix only covered a
   hint after a whole form, and this one sits after a lone button — 3px again,
   against 25 everywhere else. */
.wizard button + .hint { margin-top: 1rem; }

/* The rowbar styled number inputs only, so a text field beside a button fell
   back to the browser's white default on a dark page. */
.rowbar input[type=text], .rowbar input:not([type]) {
  padding: .4rem .6rem; border-radius: 6px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; min-width: 14rem;
}
.or {
  display: flex; align-items: center; gap: .8rem; color: var(--dim);
  font-size: var(--t-micro); margin: 1.2rem 0;
}
.or::before, .or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.hint.ok { color: var(--accent); }
/* Not .alert — that is a boxed banner. Inline status under a button wants the
   colour without the box. */
.hint.bad { color: var(--bad); }
button.ghost.danger { color: var(--bad); border-color: rgb(var(--bad-rgb) / .35); }

/* The account chip sits apart from the section links — it is about you, not
   about where you are in the app. */
nav a.account {
  margin-left: .6rem; width: 1.6rem; height: 1.6rem; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--t-micro); color: var(--dim);
}
nav a.account.here, nav a.account:hover {
  border-color: var(--accent); color: var(--accent);
}

/* --- Store picker ---------------------------------------------------------
   One column width for the page. The lede, the list and the cart panel each
   stopped at a different x, which read as three unrelated blocks. */
.column { max-width: 36rem; }
.column .lede, .column .hint { max-width: none; }

.storelist {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: 0 0 .8rem;
}
.storerow {
  display: grid; grid-template-columns: 1fr auto;
  padding: .5rem .8rem .55rem; cursor: pointer;
  border-left: 3px solid transparent;
}
/* The separator lives on the row, so a highlighted neighbour can't paint over
   it and break the rhythm the way a table background did. */
.storerow + .storerow { border-top: 1px solid var(--line); }
.storerow:hover { background: rgb(var(--ink-rgb) / .03); }
.storerow.on { border-left-color: var(--accent); background: rgb(var(--accent-rgb) / .07); }
.storerow.on .sname { color: var(--accent); }
/* Visually hidden, not display:none — the radio still takes focus, and arrow
   keys still move through the group. */
.storerow input { position: absolute; opacity: 0; width: 0; height: 0; }
.storerow:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }

.sname { grid-column: 1; font-size: var(--t-body); }
.saddr { grid-column: 1; color: var(--dim); font-size: var(--t-small); }
/* Right-aligned in its own column, so the rows have a straight right edge
   instead of one that follows the longest address. */
.sflag {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .06em;
}

.ziprow { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.ziprow label { color: var(--dim); font-size: var(--t-small); }
.ziprow input {
  padding: .3rem .5rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-size: var(--t-small); font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}
.ziprow button { margin-top: 0; font-size: var(--t-small); padding: .3rem .7rem; }

/* Distance is the number the eye should land on; "mi" is just its unit. */
.sflag.miles { color: var(--ink); font-variant-numeric: tabular-nums;
               text-transform: none; letter-spacing: 0; font-size: var(--t-small); }
.sflag.miles i { font-style: normal; color: var(--dim); font-size: var(--t-micro); }
/* No autofill chip to leave room for any more. */
.ziprow input { width: 6rem; }

/* --- Account menu ---------------------------------------------------------
   <details> gives click-to-open, Escape-to-close and keyboard focus with no
   script. The marker is removed because the chip is the affordance. */
/* Pushed to the far edge, with a rule between it and the links so the two
   groups read as different kinds of thing. */
.usermenu { position: relative; margin-left: auto; padding-left: 1.1rem;
            border-left: 1px solid var(--line); }
.usermenu > summary { list-style: none; cursor: pointer; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary.account {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  border: 1px solid var(--line); display: inline-flex;
  align-items: center; justify-content: center;
  font-size: var(--t-micro); color: var(--dim);
}
.usermenu[open] > summary.account,
.usermenu > summary.account.here,
.usermenu > summary.account:hover { border-color: var(--accent); color: var(--accent); }

.usermenu-pop {
  position: absolute; right: 0; top: 2.2rem; z-index: 40;
  min-width: 12rem; padding: .35rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgb(var(--ink-rgb) / .12);
}
.usermenu-pop .who {
  margin: 0; padding: .35rem .55rem .45rem; color: var(--dim);
  font-size: var(--t-micro); border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.usermenu-pop a, .usermenu-pop button {
  display: block; width: 100%; text-align: left;
  padding: .4rem .55rem; margin: 0; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: inherit;
  font-size: var(--t-small); font-weight: 400; text-decoration: none;
  cursor: pointer;
}
.usermenu-pop a:hover, .usermenu-pop button:hover {
  background: rgb(var(--ink-rgb) / .06); color: var(--ink);
}
.usermenu-pop form { margin: 0; }
.usermenu-pop button { color: var(--bad); }

/* --- Top bar on a phone ---------------------------------------------------
   In one row the bar needs about 515px: wordmark, five links and the account
   chip. On a 400px phone it pushed the page out to 513px, and the browser
   grew the layout viewport to match, so everything position: fixed was laid
   out against a box taller than the screen. The review queue's Undo bar sat
   below the bottom edge, out of reach of the one tap that reverses a delete.
   Two rows instead: wordmark and chip on the first, the links on the second,
   spread so they start under the wordmark and end under the chip. */
@media (max-width: 640px) {
  .topbar { position: relative; flex-wrap: wrap; row-gap: .2rem; padding-top: .6rem; }
  /* The row gap only matters on a screen too narrow for the five links (a
     folded phone, or a zoomed one). Wrapping beats pushing the page wider
     again, and the gap keeps an underline clear of the line below it. */
  .topbar nav { flex-basis: 100%; flex-wrap: wrap; justify-content: space-between;
                gap: 1rem .5rem; }
  /* Lifted into the wordmark's row and centred on its line: the wordmark is
     1.15rem at a line height of 1.55, the chip 1.7rem. It stays inside <nav>
     in the markup, so the tab order is unchanged, and the menu still opens
     from the chip. The rule beside it separated it from the links, which
     are a row away now. */
  .topbar .usermenu {
    position: absolute; right: 1.5rem;
    top: calc(.6rem + (1.15rem * 1.55 - 1.7rem) / 2);
    margin: 0; padding: 0; border: 0;
  }
}

/* --- Landing --------------------------------------------------------------
   The page a stranger lands on. Different job from the app pages: those hold
   a narrow left column on purpose, this one has a window to fill. */
/* One width for every block on the page. The hero was 76rem while the grid
   and footer were capped at 62rem, so the right edges did not line up and
   the page read as two documents stacked. 64rem keeps a 2-column paragraph
   at a readable ~60ch. */
/* Short page, tall screens: left to flow, the content hugged the top and
   left a third of the viewport as dead dark below the photo. A one-screen
   page should sit like a cover, so it centers in the space under the topbar.
   min-height, not height — small windows still scroll normally. */
.landing {
  max-width: 64rem; padding-top: 1rem;
  min-height: calc(100vh - 8rem);   /* no topbar on this page any more */
  display: flex; flex-direction: column; justify-content: center;
}

.hero {
  display: grid; grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr);
  gap: 3rem; align-items: center; margin-bottom: 3.5rem;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
}

.landing h1 {
  font-family: Fraunces, Georgia, serif; font-weight: 700;
  font-size: 3rem; margin-bottom: .6rem; letter-spacing: -.01em;
  font-optical-sizing: auto;
}
/* 45ch, not 34: this is the most important sentence on the page and it was
   breaking into three ragged lines. */
.landing .pitch {
  font-size: 1.35rem; color: var(--ink); line-height: 1.4;
  max-width: 45ch; margin: 0 0 1.8rem;
}

.cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.cta .btnlink { padding: .6rem 1.2rem; }
/* The invite requirement used to ride inside this button as "Create an
   account · invite required" — a caveat bolted to a verb, which made it more
   than twice the width of "Sign in". Under the label it was worse: the button
   went two lines tall and the flex row stretched "Sign in" to match. The way
   out was not to place the caveat better but to stop needing one — the label
   is the caveat now, and "Sign in / I have an invite code" tells a stranger
   the door is closed without a word of grey text. */
.cta { align-items: center; }


h2.section {
  font-size: var(--t-micro); margin: 0 0 1.2rem;
}

/* Two columns, not auto-fit: four items in a three-column grid leaves one
   orphaned on a row of its own. 2x2 is the only balanced arrangement of
   four, so it is stated rather than left to the track sizing. */
/* The same three columns and the same gutter as .steps-flow directly above.
   These used to be a two-column grid, which shares only its outer edges with a
   three-column one: the steps' second column began at 538px and the points'
   at 720px. Nothing was misaligned by a pixel or two — they were built on
   different grids, and stacking them broke a rhythm the eye had just learned.
   Two items in a three-column track leaves the last one empty, which reads as
   the page tapering off rather than as a row that failed to fill. */
.points {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem 2.4rem; margin: 0 0 2.5rem;
}
@media (max-width: 700px) { .points { grid-template-columns: 1fr; } }
/* Same weight as the step labels above. These were green at full body size
   while the steps were grey at small — so the secondary content on the page
   was the loudest thing on it, and green was doing two different jobs. It now
   does one: the numbers, the step numerals and the buttons. */
.points h3 {
  margin: 0 0 .3rem; font-size: 1.05rem; color: var(--ink);
  font-weight: 600; letter-spacing: -.01em;
}
/* These specifics are the differentiating content on the page. They were set
   at 13px dim, which is how you style a footnote. */
.points p { margin: 0; color: var(--dim); font-size: var(--t-small); line-height: 1.55; }

/* Same 62rem as the grid above, so the block closes on one edge instead of
   trailing off mid-page. The rule makes it a footer rather than a paragraph
   that happens to be last. */
.landing .hint {
  max-width: none; margin: 0;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
}

/* --- Sign-in split --------------------------------------------------------
   A one-field form on an otherwise empty page reads as unfinished. The photo
   is decoration and lives in CSS, so it stays out of the accessibility tree
   and out of the document a screen reader walks. */
main.split {
  max-width: none; padding: 0; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: calc(100vh - 3.4rem);
}
main.split .split-art {
  background: #0e1114 url("img/signin.jpg") center / cover no-repeat;
  /* The photo is warm and the UI is cool; a slight desaturation and a lift of
     the blacks keeps the seam between them from reading as two websites. */
  filter: saturate(.82) brightness(.86);
}
main.split .split-body {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2.5rem;
}
main.split .split-body > * { width: 100%; max-width: 24rem; }

/* Signup: a third for the picture, the rest for the wizard. Step 2 is a table
   of everyone in the household — five inputs across — and a 50/50 split like
   sign-in would squeeze it into something you'd have to scroll sideways. */
main.split.split-wide { grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); }
main.split.split-wide .split-art {
  background-image: url("img/signup.jpg");
}
main.split.split-wide .split-body { align-items: flex-start; padding: 2.5rem 3rem; }
main.split.split-wide .split-body > * { max-width: 46rem; }
@media (max-width: 1000px) {
  main.split.split-wide { grid-template-columns: 1fr; }
  main.split.split-wide .split-art { display: none; }
  main.split.split-wide .split-body { padding: 2rem 1.5rem; }
}

/* One column on anything narrow: a half-height photo above a login form is
   just an obstacle between the visitor and the field they came to type in. */
@media (max-width: 800px) {
  main.split { grid-template-columns: 1fr; min-height: 0; }
  main.split .split-art { display: none; }
  main.split .split-body { padding: 2rem 1.5rem; }
}

/* --- Landing: evidence, sequence, and a break ------------------------------ */

/* The numbers the screenshot is too small to show. Set in Fraunces so the
   wordmark is not the only serif on the page — two isolated uses read as a
   mistake, three read as a system. */
/* These sit in the hero's right column now, where the screenshot used to be —
   so they stack rather than running three across a full-width strip. The rule
   down the left edge does the job the image's frame used to: giving the column
   an edge so it reads as a panel rather than as loose text beside the pitch. */
.stats {
  display: grid; gap: 1.5rem; margin: 0;
  padding: .25rem 0 .25rem 2rem; border-left: 1px solid var(--line);
}
/* Once the hero collapses to one column, the stats no longer have the pitch
   beside them to justify stacking — a tablet has room for all three across.
   Left as a single column at tablet width they ran down the page at full
   desktop size, one number per line with 80% of the width empty. Only a
   phone is narrow enough to need one per row. */
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem;
    padding: 1.4rem 0 0; border-left: 0; border-top: 1px solid var(--line);
  }
}
/* A phone: one glance, not a scroll. At desktop scale three stacked
   numbers were each as tall as the pitch. Compact rows — number and label
   side by side, tighter type — put all three in the height one used to
   take. And the page stops centering itself: on a phone the "cover" idea
   just pushes the wordmark down. */
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; gap: .8rem; padding-top: 1.1rem; }
  .stats div { display: flex; align-items: baseline; gap: .7rem; }
  .landing .stats b { font-size: 1.55rem; margin: 0; min-width: 5.5rem; }
  .stats span { font-size: var(--t-micro); }
  .landing { min-height: 0; justify-content: flex-start; padding-top: .5rem; }
  .band img { height: 140px; }
}
.stats b {
  display: block; font-family: Fraunces, Georgia, serif; font-weight: 700;
  font-size: 2.1rem; line-height: 1.05; color: var(--accent);
  font-optical-sizing: auto; margin-bottom: .3rem;
}
.stats span { color: var(--dim); font-size: var(--t-small); line-height: 1.45; }

/* A break between two walls of text. Same width as everything else — a
   full-bleed strip would reintroduce exactly the mismatched-margin problem
   the page just had. */
/* The photo is the last thing on the landing page now; the 2.8rem below it
   was breathing room for sections that no longer exist, stacked on top of
   main's own 4rem bottom padding. */
.band { margin: 0; }
.band img {
  width: 100%; height: 190px; object-fit: cover; object-position: center 76%;   /* the produce, not the canopy above it */
  display: block; border-radius: var(--radius);
  /* Warm photograph against a cool UI: knocked back so it reads as a pause
     rather than as a second website. */
  filter: saturate(.85) brightness(.82);
}
@media (max-width: 700px) { .band img { height: 130px; } }

/* The sequence. Numbered because the order is the point. */
.steps-flow {
  list-style: none; counter-reset: step; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem 2.4rem; margin: 0 0 2.6rem;
}
/* The numeral shares the label's line. Stacked above it, each step was three
   elements deep and needed 2.2rem of padding to clear — so the thing you
   actually read sat a third of the way down its own cell. */
.steps-flow li { counter-increment: step; position: relative; }
.steps-flow b {
  display: flex; align-items: baseline; gap: .5rem;
  font-size: 1.05rem; margin-bottom: .3rem;
}
.steps-flow b::before {
  content: counter(step);
  font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.15rem;
  color: var(--accent); opacity: .8; line-height: 1;
}
.steps-flow p { margin: 0; color: var(--dim); font-size: var(--t-small); line-height: 1.55; }
@media (max-width: 700px) { .steps-flow { grid-template-columns: 1fr; } }

/* Full width beneath the row, so three links cannot make one column taller
   than the two beside it. */
.works-on {
  margin: -1.4rem 0 2.6rem; color: var(--dim); font-size: var(--t-small);
}

/* Roster editing. Each row is its own form, wired by form= rather than by
   nesting — a <form> inside a <tr> is not valid HTML and browsers hoist it
   out, which silently breaks the row. */
table.roster input {
  width: 100%; padding: .3rem .5rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-size: var(--t-small);
}
table.roster td { vertical-align: middle; }
table.roster .rowacts { display: flex; gap: .4rem; align-items: center; white-space: nowrap; }
table.roster .rowacts button { margin-top: 0; font-size: var(--t-micro); padding: .25rem .6rem; }
table.roster tr.addrow input { border-style: dashed; }

/* Restriction chips. Tapping beats typing: recognition instead of recall, a
   bounded set instead of an open box, and the stored value is a token the
   matcher can look for rather than prose it has to interpret.

   Collapsed by default. Only the name is required, and opening 28 chips on
   arrival made the optional part the biggest thing on the page. */
.person { margin: 0 0 .7rem; }
/* 3. The person is the unit: name and restrictions inside one boundary. The
   rule used to bracket only the chips, leaving the name floating above it. */
.person {
  border-left: 2px solid var(--line);
  /* .1rem on top against .5rem below and .9rem left: the label sat on the
     card's edge with a 1.6px gap. Balanced with the bottom. */
  padding: .7rem 0 .7rem .9rem; margin: 0 0 .9rem;
}
.personname { margin-bottom: .2rem; }
.personname > .personhead { display: flex; align-items: center; gap: .5rem; }
/* 2. Same width as "Call this kitchen" above it. A 32px difference between
   two stacked inputs reads as a mistake, not a hierarchy. */
.personname input {
  flex: 1; max-width: 24rem; padding: .5rem .6rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font: inherit; font-size: var(--t-body);
}
.personname i { font-style: normal; color: var(--dim); font-size: var(--t-micro); }
.personname .drop { margin-top: 0; padding: .3rem .6rem; line-height: 1; }

.restrictions { margin-top: .2rem; }

/* Named .pick, not .chip: .chip was already taken by the review page's sort
   pill, which carries its own border and 999px radius. Reusing the name drew
   a pill around every option and a box inside it — a chip inside a chip.

   A uniform grid, not flex-wrap. Wrapping left a different number of chips
   on every row — "Halal, Kosher" stranded on their own, a jagged right edge,
   and no two groups lining up. Equal cells give straight columns and a
   straight edge regardless of how many options a group has. */
/* A group is a heading plus its chips; the space ABOVE it has to be larger
   than the space inside it, or DIET reads as belonging to the name field. */
.pickgroup { margin-top: 1.1rem; }
.picklabel {
  display: block; margin-bottom: .4rem;
  color: var(--dim); font-size: var(--t-micro);
  text-transform: uppercase; letter-spacing: .06em;
}
/* Sized to the word, not to the widest word in the group. The uniform grid
   was a reaction to a ragged wrap, but that raggedness came from oversized
   chips and a double border — with both gone, content-width chips pack more
   per row and read as words rather than as a table of equal boxes. */
.pickgrid { display: flex; flex-wrap: wrap; gap: .3rem; }
.pick { display: block; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span {
  display: block; padding: .25rem .6rem; border-radius: 6px;
  border: 1px solid var(--line); font-size: var(--t-micro); color: var(--dim);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.pick span:hover { border-color: var(--dim); color: var(--ink); }
.pick input:checked + span {
  border-color: var(--accent); color: var(--accent);
  background: rgb(var(--accent-rgb) / .10);
}
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }



/* "Add another person" sat between the roster and the hint, attached to
   neither. Dashed and full-width, directly under the last person, it reads as
   the next slot in the list instead of a loose button. */
#addperson {
  display: block; width: 100%; margin: .9rem 0 0;
  border-style: dashed; border-color: var(--line); color: var(--dim);
  text-align: center; font-weight: 500;
}
#addperson:hover { border-color: var(--accent); color: var(--accent); background: none; }
.person + .person { margin-top: 1.1rem; }

/* Settings: what each signup answer actually does. A definition list rather
   than a table — these are explanations, not data to compare across rows. */
.mechanisms { margin: 0 0 1.5rem; }
.mechanisms dt { font-weight: 600; margin: .9rem 0 .15rem; }
.mechanisms dd { margin: 0; color: var(--dim); max-width: 62ch; }

/* The one-line consequence of the cooking answers. Sits between the last
   question and Continue, where a summary belongs. */
.outcome {
  margin: 1.75rem 0 1.25rem; padding: .7rem .9rem;
  border-left: 2px solid var(--accent); background: rgb(var(--accent-rgb) / .06);
  color: var(--fg); font-size: var(--t-small);
}
.outcome:empty { display: none; }

/* Which night a meal lands on, once a shopping day makes that meaningful. */
.dayname {
  display: block; font-size: var(--t-tiny, .72rem); letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim); margin-bottom: .15rem;
}
/* "+ 2 nights", in one piece. Beside a proposal's title it sits under the
   day's name rather than widening the column: squeezed, it broke as
   "Wednesday + / 2 nights" even at 1280px. */
.nights { white-space: nowrap; }
.dayname .nights { display: block; }
/* The title starts right after the day. Spaced between the day and "keep",
   a short one ("Baked Ziti") floated in the middle of the row. */
.card-head > .dayname + .card-title { margin-right: auto; }
/* On a phone the day, with its nights beside it, has the line above the
   title, and the title shares its line with "keep". Side by side, the day,
   the title's longest word and "keep" could not shrink: at 280px "keep" ran
   12px out of the card beside "Wednesday", and a week with long words was
   321px wide. A grid, because flex-wrap would give a long title a line of
   its own and push "keep" down to a third. */
@media (max-width: 640px) {
  .card-head:has(> .dayname) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 0;
  }
  .card-head > .dayname { grid-column: 1 / -1; }
  .card-head > .dayname .nights { display: inline; }
}

/* Signup question spacing. The base .hint carries margin-bottom 1.5rem and .q
   carries the same, so the gap *inside* a question equalled the gap *between*
   questions — the chips were equidistant from their own hint and the next
   question's label, and nothing read as a group. Label, hint and control are
   one unit now, with roughly three times that distance between units. */
.q { margin: 0 0 2rem; }
.q .qlabel { margin: 0 0 .3rem; }
.q .hint { margin: 0 0 .65rem; }

/* Every input's dark background is declared by its container — .field input,
   .money input, .rowbar input, .ziprow input, table.roster input, and four
   more. There is no base rule, so each new input location falls back to the
   browser's white default on a dark page, which has now happened at least
   twice (see the .rowbar text-input note above, and the library's repeat-interval
   field).

   Wrapped in :where() so it contributes ZERO specificity: every existing
   container rule still wins, and this only reaches inputs nobody styled.
   Checkboxes and radios are excluded — several are deliberately hidden and
   restyled as chips. */
:where(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--field); color: var(--ink); font: inherit;
  padding: .4rem .5rem;
}

/* Inline repeat-interval editing in the library table. Narrow enough that the
   column does not widen, and the spinner is hidden because a 1-365 field is
   typed, not nudged one day at a time. */
.rotdays {
  /* Sized to its digits. A fixed 3rem box with "14" right-aligned inside it
     left a digit's worth of empty field on the left, so a centred cell
     centred the box and the number sat visibly right of the heading.
     field-sizing is the real fix; 3ch is the fallback, wide enough for 365. */
  width: 3ch; field-sizing: content; min-width: 1.5ch;
  text-align: right; padding: .1rem .15rem;
  font-size: inherit; font-weight: inherit; font-variant-numeric: tabular-nums;
  /* A light box at rest, so the column reads as something you can change.
     Borderless, it read as plain numbers and nobody knew they could be
     edited; white-filled, thirty-five of them down a borderless table looked
     like a rendering fault. On focus the box firms up, so you can tell which
     one you are typing into. */
  border-color: var(--line); background: transparent;
  transition: border-color .12s ease, background-color .12s ease;
}
.rotdays:hover { border-color: var(--line); }
.rotdays:focus { border-color: var(--accent); background: var(--field); outline: none; }
/* A few pixels between the box and its "d", which touched it. */
.rotdays + .unit { margin-left: .25rem; }
.rotdays::-webkit-outer-spin-button,
.rotdays::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rotdays { -moz-appearance: textfield; }

/* Wizard back navigation. The bar's earned segments are links now; the
   anchor needs the same box as the span it replaces or the bar changes shape
   depending on which step you're on. */
.stepbar a.done {
  display: block; height: 3px; flex: 1; border-radius: 2px;
  background: rgb(var(--accent-rgb) / .45); transition: background .15s;
}
.stepbar a.done:hover { background: var(--accent); }
.wizback {
  display: inline-block; margin: 0 0 1rem; color: var(--dim);
  font-size: var(--t-small); text-decoration: none;
}
.wizback:hover { color: var(--accent); }

/* The planner's swap trace, replayed on the front door. A log, so it is set
   like one: monospace, left-aligned, one decision per line. Lines start
   hidden and are revealed by the script; without JS (or with reduced motion)
   they are simply all there. */
.trace { margin: 0 0 2.4rem; }
.trace-head {
  margin: 0 0 .7rem; font-size: var(--t-micro); text-transform: uppercase;
  letter-spacing: .08em; color: var(--dim);
}
.trace-log {
  list-style: none; margin: 0; padding: .9rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--t-small); line-height: 1.7;
}
.trace-log li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0 1.4rem; align-items: baseline; padding: .15rem 0;
  border: 0; background: none;             /* the list is the box, not each row */
  transition: opacity .35s ease, transform .35s ease;
}
.trace-log li + li { border-top: 1px solid var(--rule); }
.trace-log li.pending { opacity: 0; transform: translateY(4px); }
.trace-log b { font-weight: 600; color: var(--ink); }
.trace-log .t-try { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace-log .t-why { color: var(--dim); white-space: nowrap; }
.trace-log .t-verdict { white-space: nowrap; }
.trace-log li.kept .t-verdict { color: var(--accent); }
.trace-log li.held .t-verdict { color: var(--dim); }
@media (max-width: 640px) {
  .trace-log li { grid-template-columns: 1fr; gap: 0; margin-bottom: .5rem; }
  .trace-log .t-try { white-space: normal; }
}

/* ---------------------------------------------------------------------------
   Paper: the type
   Fraunces on every page title and every big number, not just the wordmark.
   The h2s stay as small sans caps — on paper they read as the running heads
   of a ledger, which is the right register. Bigger optical size on titles so
   the ink traps do their work rather than clogging.
   ------------------------------------------------------------------------ */
/* The embedded Fraunces cut is weight 700 only — a display face, not a text
   face — so it goes on the things that ARE display: titles and numbers. The
   pitch stays in the sans; a serif at paragraph length is a paragraph. */
h1, .stats b, .tile b, .money, .codes code {
  font-family: Fraunces, Georgia, serif; font-weight: 700;
}
h1 { letter-spacing: -.015em; font-optical-sizing: auto; }
.codes code { font-weight: 500; }
/* Buttons: an ink outline on paper, filled on hover. The green fill that read
   as a glow on charcoal reads as a highlighter on cream. */
button, .btnlink { border-color: var(--ink); color: var(--ink); }
button:hover, .btnlink:hover { background: var(--ink); color: var(--bg); }
button.ghost, .btnlink.ghost { border-color: var(--line); color: var(--dim); }
button.ghost:hover, .btnlink.ghost:hover { background: rgb(var(--ink-rgb) / .06); color: var(--ink); }
/* The one thing that stays green: primary actions and the numbers. */
/* .primary is here because the selector keyed on type=submit, and the one
   button that is not in a form — "Add a passkey", the only action on that
   screen — therefore rendered as a secondary. A primary action should look
   like one whether or not it happens to submit something. */
button[type=submit]:not(.ghost), button.primary:not(.ghost),
.btnlink:not(.ghost), .cta .btnlink:first-child {
  border-color: var(--accent); color: var(--accent);
}
button[type=submit]:not(.ghost):hover, .cta .btnlink:first-child:hover {
  background: var(--accent); color: #fff;
}
/* Cards on paper get a hairline and a whisper of lift, not a darker panel. */
.card, .tile, .panel, .person, .trace-log {
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgb(var(--ink-rgb) / .04);
}
/* Table rules become the ledger lines. */
th { color: var(--dim); border-bottom: 1px solid var(--ink); }
td { border-bottom-color: var(--rule); }
/* The photograph belongs here now, so it stops being knocked back. */
.band img { filter: none; opacity: 1; }

/* A row on the servings audit with nothing to check against. Not an error —
   the app simply cannot tell, and the distinction from a wrong value (.warn)
   is the whole point of the page. */
tr.flagme td { background: rgb(var(--ink-rgb) / 0.03); }

/* The review breakdown is a set of filters, so it has to look like one and
   show which is on. It used to be plain text sitting right above the sort
   pills, which is why it read as clickable and was not. */
.breakdown a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.breakdown a:hover { border-bottom-color: var(--line); }
.breakdown a.on { color: var(--accent); border-bottom-color: var(--accent); }
.breakdown a.on b { color: var(--accent); }
.breakdown .clearfilter { color: var(--dim); font-size: var(--t-small); border-bottom-color: var(--line); }

/* The filter row sits right above the sort pills and used to be plain text,
   so it read as a summary. A resting underline says "control" without
   turning eleven counts into eleven buttons. */
.breakdown a { border-bottom: 1px dotted var(--line); }
.breakdown a:hover { border-bottom-style: solid; border-bottom-color: var(--dim); }
.breakdown .barlabel { border: 0; }

/* An active tile-as-filter. Same treatment the breakdown links get, so the
   two filtering surfaces on this page read as one idea. */
.tile.on { border-color: var(--accent); }
.tile.on b, .tile.on span { color: var(--accent); }

/* Informational, not alarming. .alert is red and means something is wrong;
   "nothing to resolve yet, because the library is empty" is a state, not a
   fault, and it was being shouted in error red. */
.notice {
  background: rgb(var(--accent-rgb) / .07);
  border: 1px solid rgb(var(--accent-rgb) / .28);
  color: var(--ink); border-radius: var(--radius);
  padding: .75rem 1rem; margin: 1.2rem 0; max-width: 68ch;
}
.notice a { color: var(--accent); }

/* Undo bar for the review queue. Deletes are held for a few seconds rather
   than confirmed up front: a modal on every row is fifty taps to prune a
   queue, and by the tenth nobody reads it.

   It was a black pill with a translucent white button, which is a different
   application's design language. Everything here is warm paper, an 8px
   corner and a green accent, so it is a panel like every other panel. */
.undobar {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 160%);
  display: flex; align-items: center; gap: .9rem;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .55rem .55rem .55rem .95rem;
  box-shadow: 0 8px 28px rgb(var(--ink-rgb) / .16);
  font-size: var(--t-small); z-index: 60;
  transition: transform .2s cubic-bezier(.2,.7,.3,1);
  /* Never wider than the screen. The text is one line, so a long title made
     the bar wider than a phone, and the Undo button, at its right end, was
     off the edge. The title gives way with an ellipsis; the button does not.
     The width is stated because a box placed at left: 50% only has half the
     screen to shrink into, and would squeeze short titles too. */
  width: max-content; max-width: calc(100% - 2rem);
}
.undobar.up { transform: translate(-50%, 0); }
.undobar .what { white-space: nowrap; color: var(--dim);
                 min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.undobar button {
  background: transparent; color: var(--accent);
  border: 1px solid rgb(var(--accent-rgb) / .35); border-radius: 6px;
  padding: .3rem .85rem; font-size: var(--t-small); font-weight: 600;
  cursor: pointer;
}
.undobar button:hover {
  background: rgb(var(--accent-rgb) / .09);
  border-color: rgb(var(--accent-rgb) / .6);
}
@media (prefers-reduced-motion: reduce) { .undobar { transition: none; } }

/* A delete the server will refuse, said before the press rather than after.
   These two recipes were deleted several times over: the card animated away,
   the counters dropped, the server said no, and they were back on reload. */
.card .danger .inplan {
  display: block; font-weight: 400; font-size: var(--t-micro);
  color: var(--dim); margin-top: .1rem;
}
.card .danger.armed {
  background: var(--bad); border-color: var(--bad); color: var(--paper);
}
.card .refused {
  margin: .6rem 0 0; padding: .5rem .7rem;
  background: rgb(var(--bad-rgb) / .07);
  border: 1px solid rgb(var(--bad-rgb) / .3);
  border-radius: 6px; font-size: var(--t-small); color: var(--ink);
}

/* Home: what the week looks like, in place of the build checklist. */
.whatnow { margin-top: 2rem; }
.whatnow h2 { margin-bottom: .25rem; }
/* What is worth knowing before the next step, as one readout under the week:
   a label, what it is, the one thing to do. It was a sentence ending in a
   colon over an amber pill, and a second section further down with its own
   heading, a sentence, a red list and a black one (2026-11-27). Labels in a
   column of their own so the eye runs down them; the detail takes the rest
   and wraps, a name included: "boneless skinless chicken thigh" made Home
   289px wide on a 280px phone when it could not break. */
.attention { margin-top: 2.4rem; max-width: var(--measure); }
.attention h2 { margin-bottom: .7rem; }
.readout {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  gap: .55rem 1.5rem; margin: 0; font-size: var(--t-small); line-height: 1.5;
}
.readout dt { color: var(--dim); font-weight: 600; }
/* Amber, as the list's own tags and the send box use: worth reading, not an
   error. It was red, which over a two-month-old reading was an alarm about
   nothing anybody could see. */
.readout dt.warn { color: var(--warn); }
.readout dd { margin: 0; overflow-wrap: anywhere; }
.readout dd b { color: var(--ink); }
.readout a.act { margin-left: .7rem; color: var(--accent); white-space: normal; }
/* Dotted and faint, as the shopping table marks a name with more behind it:
   five solid underlines in a row read as five links shouting at once. */
.readout .names a { color: var(--ink); text-decoration-style: dotted;
  text-decoration-color: rgb(var(--ink-rgb) / .35); text-underline-offset: .2em; }
.readout .names a:hover { color: var(--accent); text-decoration-style: solid;
  text-decoration-color: currentColor; }
.readnote { margin: .9rem 0 0; font-size: var(--t-small); color: var(--dim); }
.readnote a { color: var(--accent); }
@media (max-width: 480px) {
  .readout { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .readout dd { margin-bottom: .7rem; }
}

/* Groceries table. Rows were ~115px tall: the product name wrapped, the
   reason wrapped, and the two actions stacked, so eight rows filled a
   screen. */
.prod {
  max-width: 30ch; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
td.acts { white-space: nowrap; }
td.acts form { display: inline-block; margin: 0; }
/* A secondary link standing next to a primary button. This was only ever
   styled inside a table cell, so the two beside "Plan this week" on the
   homepage rendered as browser-default blue underlines on cream. */
a.quiet {
  color: var(--dim); text-decoration: underline;
  text-decoration-color: var(--line); text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a.quiet:hover { color: var(--accent); text-decoration-color: var(--accent); }
td.acts .quiet { margin-left: .6rem; font-size: var(--t-small); }
/* Headers sat left over right-aligned numbers, so no header was above its
   own column. */
th.num, thead th.num { text-align: right; }
/* "SOLD BY" broke over two lines above a column of five-letter values, which
   made one header in a row of one-line headers twice as tall. Headings are
   short by nature; the one that genuinely wants two lines asks for it. */
th { white-space: nowrap; }
th.wrap { white-space: normal; }

/* Home banner. 200px of a 612px-tall image, positioned 72% down: the top of
   the frame is empty wall and the produce sits low. Checked by rendering the
   crop at three positions and looking at them. */
.homeband {
  display: block; width: 100%; max-width: var(--measure); height: 200px;
  object-fit: cover; object-position: center 72%;
  border-radius: var(--radius); margin: 0 0 2rem;
  background: var(--panel);
}
@media (max-width: 700px) { .homeband { height: 140px; } }

/* Settings: the explanation for a control, under the control. */
details.why { display: inline; }
details.why summary {
  display: inline; cursor: pointer; color: var(--accent);
  font-size: var(--t-micro); margin-left: .4rem;
}
details.why[open] { display: block; margin-top: .3rem; }
details.why[open] summary { display: none; }
.settings-list.storenote { margin-bottom: 1.5rem; align-items: baseline; }
.elsewhere { list-style: none; padding: 0; }
.elsewhere li { margin: .6rem 0; }
.elsewhere span { display: block; }

/* Settings, tidied. The store row borrowed the three-column grid, which flung
   its value to the far edge of the page and dropped the link onto a line of
   its own, unstyled and therefore browser-purple. */
/* Renamed off .storerow. That class already belonged to a row in the store
   picker, and this rule sits later in the file, so its 2rem bottom margin was
   winning on every one of those rows and pushing the list apart. Two
   components, one class name, and the collision is invisible until you look
   at the page that loses. */
.storenote { margin: 0 0 2rem; color: var(--dim); }
.storenote b { color: var(--ink); }
.storenote a { color: var(--accent); }

/* A select sized to its widest option instead of to the number inputs beside
   it, which clipped "start to table" to "start to ta". */
.settings-list select { width: auto; min-width: 11rem; }

/* Twelve accent-green "why" links down one page read as twelve things to do.
   They are footnotes: quiet until wanted. */
details.why summary {
  color: var(--dim); border-bottom: 1px dotted var(--line);
  font-size: var(--t-micro); opacity: .75;
}
details.why summary:hover { color: var(--accent); opacity: 1; }
details.why[open] {
  color: var(--dim); font-size: var(--t-small);
  max-width: 46ch; margin-top: .35rem;
}

/* The flag column holds labels, not prose. Full sentences there wrapped to
   three lines and squeezed the product name to a stump, which undid the row
   height fix one commit earlier. */
td.why-col { max-width: 24ch; }

/* Settled decisions fold away. They were printed as a second full-width wall
   of rows below a table that was a subset of them. */
/* The measure belongs to the summary line, which is prose. Putting it on the
   whole element crushed the table inside to 40rem: product names wrapped to
   four lines and the change link was cut off the right edge. */
details.settled { margin: 2rem 0 0; }
details.settled > summary {
  cursor: pointer; color: var(--dim); font-size: var(--t-small);
  padding: .6rem .8rem; background: var(--panel); max-width: var(--measure);
  border: 1px solid var(--line); border-radius: var(--radius);
}
details.settled > summary:hover { border-color: var(--accent); color: var(--ink); }
details.settled[open] > summary { margin-bottom: .8rem; }
details.settled table { max-width: none; }

/* The recommendation. Offered, never applied: this is the whole difference
   between an app that suggests and one that decides for you. */
.recommend {
  margin: 1.2rem 0; padding: 1rem 1.2rem; max-width: var(--measure);
  background: var(--panel); border: 1px solid var(--accent);
  border-radius: var(--radius);
}
.reclabel { margin: 0; color: var(--dim); font-size: var(--t-micro);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.recname { margin: .25rem 0 .15rem; font-size: var(--t-lead); font-weight: 600;
  line-height: 1.25; }
.recfacts { margin: 0; color: var(--dim); font-size: var(--t-small); }
.recommend form { margin: 0; }
.recommend button { margin-top: .8rem; }


/* Product pictures. The fastest way to see that a box of crackers is not
   flour, which no amount of ranking managed. */
.recommend { display: flex; gap: 1rem; align-items: flex-start; }
.recshot {
  width: 84px; height: 84px; object-fit: contain; flex: none;
  background: #fff; border-radius: 8px; border: 1px solid var(--line);
}
.prodcell { display: flex; gap: .6rem; align-items: flex-start; }
.thumbshot {
  width: 40px; height: 40px; object-fit: contain; flex: none;
  background: #fff; border-radius: 6px; border: 1px solid var(--line);
}

/* A caption belongs to the thing it captions, so it lives in the table's
   footer. As a paragraph it took the page width and overran the table. */
td.tfootnote { border-bottom: none; padding-top: .8rem; line-height: 1.6; }

/* How dear this is against the others on screen, carried by the figure itself
   rather than by a bar under it or a wash behind it. Five steps, green through
   amber to red, scaled to the results in front of you: $8/kg is dear for
   onions and cheap for saffron, so an absolute scale would say nothing.
   Colour is never the only signal — the number is right there. */
td.kg0 { color: var(--accent); }
td.kg1 { color: #6b8c3a; }
td.kg2 { color: var(--warn); }
td.kg3 { color: #b5561f; }
td.kg4 { color: var(--bad); }

/* A note about the pack, not a second fact about it. */
.oversize { font-size: var(--t-micro); color: var(--dim); font-style: italic;
  font-weight: 400; letter-spacing: 0; }

/* A section heading with a line under it, rather than four dim words floating
   above a list. */
.settings-grid + h2, form h2 {
  border-bottom: 1px solid var(--line); padding-bottom: .4rem;
  margin-bottom: .9rem;
}
/* The note belongs to the block above it, so it takes the block's width. */
.hint.wide { max-width: none; }

/* --- Settings --------------------------------------------------------------
   Was thirteen identical rows with the faintest text on the page doing all
   the structural work, and a "why" link interrupting every note. Four cards,
   grouped by what they are about, with the value as the thing the eye lands
   on and the explanation folded behind a mark on the label. */
.cards-settings {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(23rem, 100%), 1fr));
  gap: 1rem; margin: 0 0 1rem;
  /* Not align-items: start. Top-aligned cards left an obvious hole under
     whichever of a pair was shorter, which was the most visible thing wrong
     with the page. */
}
.scard {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.2rem 1.1rem;
  /* --panel on --bg is a 3% difference, so the cards read as faint
     rectangles rather than as the grouping they are. A soft shadow does the
     separating without darkening the palette. */
  box-shadow: 0 1px 2px rgb(var(--ink-rgb) / .04),
              0 4px 12px rgb(var(--ink-rgb) / .04);
}
.scard.wide { grid-column: 1 / -1; margin-bottom: 1.4rem; }
.scard > h2 {
  margin: 0; font-size: var(--t-body); font-weight: 600; color: var(--ink);
  text-transform: none; letter-spacing: 0; border: none; padding: 0;
}
.scard > .blurb {
  margin: .15rem 0 .9rem; color: var(--dim); font-size: var(--t-small);
  max-width: 40ch;
}
.scard .setting { border-bottom: 1px solid var(--rule); }
.scard .setting:last-child { border-bottom: none; }
/* The number is the content of a settings page, so it is set like content
   rather than like a form control. */
.scard .setting > input, .scard .setting > select {
  font-size: var(--t-body); font-weight: 600; background: var(--field);
}
/* The explanation rides on the label as a mark, instead of the word "why"
   landing in the middle of every note thirteen times.

   A popover rather than a <details>: opening a details pushes every row below
   it down the page, so reading one answer moves the question you were about
   to read next. This floats over the page and moves nothing. Shown on focus
   as well as hover, so it is reachable without a mouse. */
.setting label > .why {
  position: relative; display: inline-block; margin-left: .35rem;
  width: 1.05em; height: 1.05em; line-height: 1.02em; text-align: center;
  border-radius: 50%; border: 1px solid var(--line); color: var(--dim);
  font-size: var(--t-micro); cursor: help; font-weight: 400;
  /* Baseline, not middle: middle hung it a shade low against the label. */
  vertical-align: baseline; position: relative; top: -.05em;
}
.setting label > .why::before { content: "?"; }
/* The popover itself is unscoped, because floating over the page and
   displacing nothing is general behaviour. Only its appearance as a little
   "?" circle belongs to Settings, and that stays scoped above. Split at that
   seam so the next tooltip anywhere inherits the behaviour instead of growing
   a second copy of it that drifts. */
.why > .tip {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(100% + .45rem); width: 17rem; max-width: 60vw;
  padding: .55rem .7rem; border-radius: 8px;
  background: var(--ink); color: var(--bg);
  font-size: var(--t-small); line-height: 1.5; text-align: left;
  letter-spacing: 0; text-transform: none; font-weight: 400;
  white-space: normal;
  /* Hidden means gone, not invisible. An invisible note still counted as
     content, and a table's scroll box showed a sideways scrollbar for it. */
  display: none; transition: opacity .12s ease;
  z-index: 30; pointer-events: none;
}
/* The little arrow, so it reads as attached to the mark it came from. */
.why > .tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--ink);
}
.why:hover > .tip,
.why:focus > .tip { display: block; }
@starting-style { .why:hover > .tip, .why:focus > .tip { opacity: 0; } }

.wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 0 2.5rem; }
.wgrid .setting:nth-last-child(-n+2) { border-bottom: none; }
/* The split, drawn. Five numbers whose meaning is entirely relative are hard
   to hold in the head; the same five as one bar are not. */
.wbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden;
  margin: 1rem 0 0; }
.wbar span { display: block; }
.w-0 { background: var(--accent); }
.w-1 { background: #6b8c3a; }
.w-2 { background: var(--warn); }
.w-3 { background: #b5561f; }
.w-4 { background: var(--bad); }

/* A unit belongs beside the number, not two lines under the label: "$ 10 per
   serving" reads at a glance where "10" over "$ per serving" does not. */
.valuefield {
  display: grid; grid-template-columns: .75rem 4.6rem auto;
  align-items: baseline; gap: 0 .35rem;
}
.valuefield .affix {
  color: var(--dim); font-size: var(--t-small); text-transform: none;
}
.valuefield .affix.pre { text-align: right; }
.scard .valuefield > input { width: 100%; }
.setting > .valuefield { grid-row: 1; grid-column: 2; }
.setting:has(.valuefield) { grid-template-columns: minmax(8rem, 11rem) auto; }
/* Term ceiling has no "$" slot, and its number lines up with the weights
   above it, which have none either. Without this the number took the .75rem
   column meant for the "$": an 18px box on every screen, its 40 out of
   sight. */
.valuefield:not(:has(> .affix.pre)) { grid-template-columns: 4.6rem auto; }

/* On a phone the unit had no room beside the number. The name kept its 8rem
   and the number its 4.6rem, which left 40 to 50px for the unit: "nights · 1
   = always cook fresh" took five lines at 360px, and at 320px the rows ran
   12px past the edge of the screen. So on a phone the name has its own line,
   and the number keeps its unit on the line below. A select takes that line
   too, at its own width, so "start to table" is not cut short. */
@media (max-width: 640px) {
  .scard .setting:has(> .valuefield),
  .scard .setting:has(> select) { grid-template-columns: minmax(0, 1fr); row-gap: .25rem; }
  .scard .setting > .valuefield,
  .scard .setting > select { grid-row: 2; grid-column: 1; }
  .scard .setting > select { justify-self: start; }
  .scard .setting:has(> .valuefield) > i,
  .scard .setting:has(> select) > i { grid-row: 3; }
  /* The empty slot keeps a number in line with a "$" one while the numbers
     stand in a column. Stacked, the line they share is the left edge, and
     the slot only pushed them in from it. */
  .scard .valuefield:has(> .affix.pre:empty) { grid-template-columns: 4.6rem auto; }
  .scard .valuefield > .affix.pre:empty { display: none; }
  /* The weights keep their one line. Their names are single words, so the
     name column can give way where 8rem of it does not fit, as at 280px. */
  .wgrid .setting { grid-template-columns: minmax(0, 11rem) 4.6rem; }
}

/* Meal categories: a list you edit by adding and removing, not a string you
   have to punctuate correctly. */
.chipfield { grid-column: 1 / -1; margin: .3rem 0 .1rem; }
.chiplist { display: flex; flex-wrap: wrap; gap: .35rem; }
.chiplist:not(:empty) { margin-bottom: .45rem; }
.chiplist .chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .3rem .18rem .55rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--field);
  font-size: var(--t-small); color: var(--ink);
}
.chipx {
  margin: 0; padding: 0 .15rem; border: none; background: none;
  color: var(--dim); font-size: 1rem; line-height: 1; cursor: pointer;
  font-weight: 400;
}
.chipx:hover { color: var(--bad); background: none; }
.chipadd {
  width: 100%; padding: .25rem .5rem; border-radius: 6px;
  border: 1px dashed var(--line); background: transparent;
  color: var(--ink); font: inherit; font-size: var(--t-small);
}
.chipadd::placeholder { color: var(--dim); }

/* Fifty at a time through a catalogue of hundreds. */
.pager { display: flex; align-items: baseline; gap: 1.2rem; margin: .9rem 0 0;
  flex-wrap: wrap; }

/* Progress toward a shoppable library. Deliberately not a fifth tile: the four
   above are a census and they add up, this is a position on a journey, and a
   percentage is worth seeing rather than reading. */
.progress {
  max-width: var(--measure); margin: -.6rem 0 1.6rem;
  padding: .85rem 1rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.progresstop {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .55rem;
}
.progresstop span { color: var(--dim); font-size: var(--t-small); }
.progresstop b {
  font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; color: var(--accent);
}
.pbar {
  height: 8px; border-radius: 4px; overflow: hidden;
  background: rgb(var(--ink-rgb) / .08);
}
.pbar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.progress .caption {
  display: block; margin: .55rem 0 0; color: var(--dim);
  font-size: var(--t-small); line-height: 1.5;
}

/* Centred under a centred header. Numbers are right-aligned everywhere else
   on purpose, because a column you compare down wants its digits lined up;
   a column of single-digit counts nobody compares just looks stranded out
   at the right edge. */
td.mid, td.num.mid, thead th.mid, thead th.num.mid { text-align: center; }

/* A count you can ask a question of. The number alone gives no sign it is
   hoverable, so it carries the same dotted underline a glossary term would,
   and the popover uses the shared .why behaviour: it floats, and nothing on
   the page moves. */
.why.count {
  /* Inline, not inline-block: a block's baseline is its last line, so a name
     that wrapped ("canned asparagus / spear") lined its row up with "spear",
     and the dotted line ran the block's width under one word. */
  position: relative; display: inline; cursor: help;
  border-bottom: 1px dotted rgb(var(--ink-rgb) / .35);
}
.why.count:hover, .why.count:focus { border-bottom-color: var(--accent); }
.why.count > .tip { width: max-content; max-width: min(22rem, 100vw - 2.5rem); }
/* In a table, a note on the first column opens to the right and one on a
   right-aligned figure to the left, so neither hangs past the table's edge.
   Centred cells keep the centred note. */
td:first-child > .why > .tip { left: 0; transform: none; }
td:first-child > .why > .tip::after { left: 1rem; }
td.num:not(.mid) > .why > .tip { left: auto; right: 0; transform: none; }
td.num:not(.mid) > .why > .tip::after { left: auto; right: 1rem; margin: 0 -5px 0 0; }

/* A page title with one quiet link beside it, for the door a section needs
   into its own index. Baseline-aligned so the link sits on the title's
   baseline rather than floating in the middle of its line box. */
.pagehead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; max-width: var(--measure);
}
.pagehead h1 { margin-bottom: .2rem; }

/* Housekeeping, on one line. A button that does a POST but should read as a
   quiet link, because it is maintenance rather than the page's purpose. */
.toolline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1.2rem;
  margin: .2rem 0 1.4rem; font-size: var(--t-small);
}
.toolline { color: var(--dim); }
.toolitem { white-space: normal; }
.toolitem form.inline { gap: 0; vertical-align: baseline; }
button.linky {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: var(--dim);
  text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
button.linky:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* The base td rule is vertical-align: top. Here the numbers are set larger
   and bolder than the recipe names and the repeat box carries its own
   padding and border, so top alignment put three baselines in one row and
   dropped the repeat value 8px below its neighbours. */
table.library td { vertical-align: baseline; }
/* An inline-block input takes its baseline from its text, so this is what
   lines its digits up with the plain-text numbers beside it. */
table.library .rotdays { vertical-align: baseline; }

/* A page led by a wide table. The prose measure is 40rem; the library's table
   wants about 49rem with real recipe names; the filter chips ran to 63rem on
   one line and the red banner to the full 67rem of the page. Four right edges.
   On such a page everything shares one measure, wide enough for the table.
   Overriding the variable rather than each rule means anything already capped
   at var(--measure), the intro and the cards among them, lines up without
   being named here. */
.tablepage { --measure: 50rem; }
.tablepage .breakdown,
.tablepage .toolline,
.tablepage .rowbar,
.tablepage .alert { max-width: var(--measure); }
/* The scroll container takes the measure and the table fills it. Tables are
   display: block site-wide so they can scroll sideways on a phone, which also
   makes a table's visible width whatever its content happens to be, and so a
   different right edge on every page. */
.tablewrap { max-width: var(--measure); overflow-x: auto; }
.tablewrap > table { display: table; width: 100%; }

/* Stacked chips: the label in its own column, categories on the first line,
   sources on the next, both hanging under the first category rather than
   under the label. No divider, because the line break is the divider. */
.breakdown.stacked {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 1.1rem; row-gap: .45rem;
}
/* Library's housekeeping line, under the table it looks after. */
.toolline.aftertable { margin-top: 1.4rem; }
.breakdown.stacked .chipset {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.1rem;
}

/* Home: the cart box under the week, the rating check-in, and the store. */
.homesend { max-width: var(--measure); margin-top: 1rem; }

.checkin { max-width: var(--measure); margin-top: 2.2rem; }
.checkrow {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--rule);
}
.checkthumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.checkbody { display: flex; flex-direction: column; gap: .25rem; flex: 1; min-width: 0; }
.checkwhat { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.checkwhat a { color: var(--ink); text-decoration: none; font-weight: 600; }
.checkwhat a:hover { color: var(--accent); }
.checkacts { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.2rem;
  font-size: var(--t-small); }
.checkact { display: inline-flex; align-items: center; gap: 1.2rem; margin: 0; }
/* Drawn one to five from markup that runs five to one, so "this star and
   the ones before it" is "this star and its following siblings". */
.starbar { display: inline-flex; flex-direction: row-reverse; }
.star {
  background: none; border: none; margin: 0; padding: 0 .08rem; cursor: pointer;
  font-size: 1.35rem; line-height: 1; color: var(--line);
}
.starbar .star:hover, .starbar .star:hover ~ .star,
.starbar .star:focus-visible, .starbar .star:focus-visible ~ .star { color: var(--warn); }


/* The proposal's save bar sits between the lede and the weights. */
.savebar { margin: .4rem 0 1.4rem; }

/* The proposal's shopping table. Fixed column shares, so the product name
   gets room to wrap onto two lines rather than being squeezed to a word a
   line by the no-wrap number columns beside it. Every cell wraps and sits on
   one baseline, since the price is set larger than the rest. */
/* The proposal's shopping list (see plan.html). No scroll box, so its notes
   float free; the figures size their own columns and the product takes the
   rest. "anywhere" wrapping is gone: it let "$8.49" break between digits. */
table.buylist { display: table; overflow: visible; }
table.buylist td { vertical-align: baseline; }
table.buylist th { white-space: normal; vertical-align: bottom; }
table.buylist td.num { width: 1%; white-space: nowrap; }
table.buylist td.product { overflow-wrap: break-word; }
table.buylist td.product { color: var(--dim); font-size: var(--t-small); }
table.buylist .by { display: block; color: var(--dim); font-size: var(--t-micro);
  font-weight: 400; }
/* An oversized pack: a plain amber line, not a pill, which wrapped into a
   ring of text around nothing. */
table.buylist a.toobig { display: block; margin-top: .2rem; color: var(--warn);
  font-size: var(--t-micro); text-decoration: underline;
  text-decoration-color: rgb(var(--warn-rgb) / .4); }
table.buylist tfoot td { border-top: 1px solid var(--ink); border-bottom: none;
  font-weight: 600; padding-top: .6rem; }
.why.count.warn { color: var(--warn); }

/* What is inside a product, on the picker: under its name, quiet, so the
   names still read as the list and the contents as the detail. */
.contains { display: block; margin-top: .2rem; color: var(--dim);
  font-size: var(--t-micro); line-height: 1.45; overflow-wrap: anywhere; }
.recommend .contains { font-size: var(--t-small); margin: .1rem 0 .7rem; }

/* What the send box says before the tick about products Kroger last reported
   out of stock or not carried. Amber, as the list's own tags are: worth
   reading, not an error. */
.sendbox .stocknote { border-left: 3px solid var(--warn); padding: .1rem 0 .1rem .8rem;
  margin: .6rem 0 .9rem; font-size: var(--t-small); }
.sendbox .stocknote p { margin: .25rem 0; }
.sendbox .stocknote b { color: var(--warn); }

/* The plan's "Before you save" readout uses the home page's .readout. It sits
   above the save bar, so it keeps a little air beneath it. */
.planattention { margin: 1.6rem 0 1.2rem; }

/* The recipe editor. Its own class names: .field is taken, and this page's
   last layout was borrowed from Settings and cut a title to "Hot Spic". */
/* The ingredient check shares the form's right edge, not the prose measure. */
.ef, .tablewrap.ef-check { max-width: 52rem; }
.ef-section { margin-top: 1.8rem; }
.ef-section h2 { margin-bottom: .7rem; }
.ef-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.ef-field > span:first-child, .ef-field > label:first-child {
  font-weight: 600; font-size: var(--t-small); }
.ef-field > i { color: var(--dim); font-size: var(--t-micro); font-style: normal; line-height: 1.45; }
.ef-field input[type=text], .ef-field input[type=url],
.ef-field select, .ef-field textarea, .ef textarea { width: 100%; box-sizing: border-box; }
.ef-pair { display: grid; gap: 0 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.ef-nums { display: grid; gap: 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(7.5rem, 100%), 1fr)); }
.ef-nums input { width: 100%; box-sizing: border-box; }
.ef-unit { display: flex; align-items: center; gap: .5rem; color: var(--dim); }
.ef-unit input { width: 5rem; }
.ef-photo { display: flex; align-items: center; gap: .8rem; }
.ef-photo input { flex: 1; min-width: 0; }
.ef-photo img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); flex: none; }
.ef-warn { color: var(--warn); font-size: var(--t-small); margin: -.2rem 0 .6rem; }
.ef-delete { margin-top: 2.5rem; }
/* Four columns fit a 320px phone once the cells give up a little padding. */
@media (max-width: 640px) {
  .ef-check th, .ef-check td { padding-inline: .35rem; }
}

/* The shopping list on a narrow screen: one block per ingredient. Name and
   cost, then the product, then Need, Buy and Left over under their labels,
   then what is likely thrown out under its own, where its note has the width
   of the screen to open into. Seven columns cannot share 360px, and below
   860px the product and the name were squeezed to three lines apiece. */
@media (max-width: 860px) {
  table.buylist, table.buylist tbody, table.buylist tfoot { display: block; }
  table.buylist thead { display: none; }
  table.buylist tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .3rem .8rem; align-items: baseline;
    padding: .8rem 0; border-bottom: 1px solid var(--rule);
  }
  table.buylist td, table.buylist td.num {
    display: block; width: auto; padding: 0; border: 0; text-align: left;
    white-space: normal; }
  table.buylist td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: .1rem;
    color: var(--dim); font-size: var(--t-micro); font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
  }
  table.buylist .b-name { grid-area: 1 / 1 / 2 / 3; font-weight: 600; }
  table.buylist td.b-cost { grid-area: 1 / 3; text-align: right; }
  table.buylist .product { grid-area: 2 / 1 / 3 / -1; }
  table.buylist .b-need { grid-area: 3 / 1; }
  table.buylist .b-buy { grid-area: 3 / 2; }
  table.buylist .b-left { grid-area: 3 / 3; }
  table.buylist .b-waste { grid-area: 4 / 1 / 5 / -1; }
  table.buylist td.b-waste > .why > .tip { left: 0; right: auto; }
  table.buylist td.b-waste > .why > .tip::after { left: 1rem; right: auto; }
  table.buylist tfoot tr { border-bottom: 0; border-top: 1px solid var(--ink); }
  table.buylist tfoot td { border: 0; padding: 0; }
  table.buylist tfoot .b-waste { grid-area: 2 / 1 / 3 / -1; }
}
/* With room for four, what is likely thrown out sits beside what is left
   over, and its note opens to the left again. */
@media (min-width: 521px) and (max-width: 860px) {
  table.buylist tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  table.buylist .b-name { grid-area: 1 / 1 / 2 / 4; }
  table.buylist td.b-cost { grid-area: 1 / 4; }
  table.buylist .b-waste { grid-area: 3 / 4; }
  table.buylist tfoot .b-waste { grid-area: 2 / 4; }
  table.buylist td.b-waste > .why > .tip { left: auto; right: 0; }
  table.buylist td.b-waste > .why > .tip::after { left: auto; right: 1rem; }
}

/* The recipes an ingredient is in, on Groceries: read beside the name, and
   each one a link to itself. Quiet rules, not the page's blue: a dozen of
   them in a column would read as the point of the row. */
td.usedin { color: var(--dim); font-size: var(--t-small); }
td.usedin a { color: inherit; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgb(var(--ink-rgb) / .25); }
td.usedin a:hover { color: var(--accent); text-decoration-color: currentColor; }
/* Groceries lists: figures, "fixed"/"weight" and the links take only what
   they need, and the recipes and the product share the rest. A long recipe
   list had squeezed product names onto three lines beside an empty column. */
/* No wider than the Library's table: on a wide screen the lists stretched
   across it with gaps between the columns. Wrapped like the Library's, so the
   table is a real table (a block table ignores column shares) and still
   scrolls on its own on a phone. */
.tablewrap.grocwrap { max-width: 50rem; }
table.groclist td.num, table.groclist td.fit, table.groclist td.acts { width: 1%; }
table.groclist td.fit { white-space: nowrap; }
/* The recipes and the product take what the name and the figures leave.
   Shares that summed to 64% had the rest spread into the figure columns, as
   gaps. */
/* Kept names: the product takes the slack, and the two actions sit on one
   baseline at the right rather than in two columns of their own. */
table.groclist.keptlist td.product { width: 28%; }
/* The reason takes the slack: it is the column that grows with what you type,
   and the one worth reading down. */
table.groclist.keptlist td.whycell { width: 46%; }
table.groclist td.whycell form { display: flex; gap: .4rem; align-items: center; }
table.groclist td.whycell input { flex: 1; min-width: 0; }
.keepbox label { display: inline-flex; align-items: center; gap: .4rem; }
table.groclist td.keptacts { white-space: nowrap; }
table.groclist td.keptacts form { display: inline; margin-left: .8rem; }

table.groclist.products td.usedin { width: 42%; }
table.groclist.products td.product { width: 48%; }
/* An ingredient's name is the control that renames it, drawn as the chip it
   was. */
button.namechip {
  margin: 0; padding: .1rem .35rem; border: 0; border-radius: 4px;
  background: var(--field); color: #4d5c66; font-weight: 400; font-size: .85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: inherit;
  text-align: left; cursor: pointer;
  /* One line, always: a name that wrapped turned its chip into a box. The
     longest (26 letters) fits in about 200px, and the column sizes to it. */
  white-space: nowrap;
}
button.namechip:hover, button.namechip:focus-visible {
  background: var(--field); color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}

/* Renaming an ingredient, on Groceries. One form, moved under whichever row's
   name was clicked: a row of its own the width of the table. */
tr.renamerow > td, tbody tr.renamerow:hover > td {
  background: var(--panel); padding-block: .8rem; }
.renamebox { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin: 0; }
.renamebox label {
  display: flex; align-items: center; gap: .6rem; flex: 1 1 16rem; min-width: 0;
  font-weight: 600; font-size: var(--t-small);
}
.renamebox input[name=to] { flex: 1; min-width: 0; font-weight: 400; }
/* Save and Cancel wrap as a pair on a phone, never one without the other. */
.renameacts { display: flex; gap: .5rem; }
.renamebox button { margin-top: 0; }
.renamebox .caption { flex-basis: 100%; margin: 0; color: var(--dim); font-size: var(--t-micro); }
.renamebox .renameinfo { flex-basis: 100%; margin: 0; font-size: var(--t-small); }
.renamebox .renameinfo:empty { display: none; }

/* Pantry staples: the staples, and every other ingredient folded under them.
   The count and the two controls take only what they need. */
table.staplelist td { vertical-align: baseline; }
table.staplelist td.num, table.staplelist td.fit { width: 1%; white-space: nowrap; }
table.staplelist form { margin: 0; }
table.staplelist button { margin-top: 0; }
/* One width for "staple ✓" and "mark staple", or the two tables' columns
   sat 20px apart. */
table.staplelist td.switch button { min-width: 6.5rem; }
table.staplelist input[name=shelf_life_days] { width: 5rem; }
table.staplelist .unit { margin: 0 .6rem 0 .3rem; }
/* A name too long for its line wraps as chips, not as half a chip per line. */
table.staplelist code { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* On a phone each ingredient is two lines: its name and how many recipes use
   it, then the staple switch and the shelf life. As four columns the shelf
   life box ran off the screen and names broke inside their chips. The two
   lines share only their outer columns: with two columns the shelf life box
   set the width beside every name too, and on a 320px phone "yellow onion"
   broke in two with room to spare. */
@media (max-width: 640px) {
  .tablewrap > table.staplelist, table.staplelist tbody { display: block; }
  table.staplelist thead { display: none; }
  table.staplelist tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .55rem .75rem; align-items: center;
    padding: .75rem 0; border-bottom: 1px solid var(--rule);
  }
  table.staplelist td, table.staplelist td.num, table.staplelist td.fit {
    display: block; width: auto; padding: 0; border: 0; }
  table.staplelist td:first-child { grid-area: 1 / 1 / 2 / 3; }
  table.staplelist td.num { grid-area: 1 / 3; }
  table.staplelist td.switch { grid-area: 2 / 1; }
  table.staplelist td.shelf { grid-area: 2 / 2 / 3 / 4; justify-self: end; }
  table.staplelist td[data-unit]::after { content: " " attr(data-unit); }
  /* Room for 3650, and for a gap after the switch on a 320px phone. */
  table.staplelist input[name=shelf_life_days] { width: 4.5rem; }
  table.staplelist .unit { margin: 0 .45rem 0 .25rem; }
}

/* A dinner's sides, on its recipe page. */
.sides { margin: 0 0 1.8rem; max-width: var(--measure); }
.sidelist { list-style: none; padding: 0; margin: .4rem 0; display: flex; flex-direction: column; gap: .35rem; }
.sidelist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.sidelist form, .sidesuggest form, .sideadd { margin: 0; }
.sidesuggest { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .6rem; margin: .7rem 0; }
.sidesuggest button, .sideadd button { margin-top: 0; font-size: var(--t-small); padding: .3rem .7rem; }
.sideadd { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sideadd select { max-width: 100%; }
.card-side { margin: -.2rem 0 .3rem; font-size: var(--t-small); color: var(--dim); }
