:root {
  /* DESIGN.md color tokens (light). */
  --bg: #fbf8f3;
  --surface: #fffdf6;
  --fg: #1f1d1a;
  --muted: #6b665e;
  --line: #e7e1d6;
  --line-soft: #eee7da;
  --accent: #b5532d;
  --accent-soft: #f6e3d9;
  --ink: #4f73a0;
  --ok: #2f6b3a;
  --warn: #8a6a12;
  --warn-soft: #ebe4d4; /* warn at 14% over bg */
  --danger: #a12a1b;
  --on-accent: #fff; /* text on an accent or danger fill */
  /* Form-control borders need 3:1 against the page (WCAG 1.4.11). */
  --control-line: var(--muted);
  --radius: 8px;
  --tabbar: 0px;
  color-scheme: light; /* light only on the web (owner, 2026-11-29) */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  /* Keep the focused element clear of the phone tab bar (WCAG 2.4.11). */
  scroll-padding-bottom: calc(var(--tabbar) + 1rem);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; background: var(--bg); color: var(--fg); }
a { color: var(--accent); }
img { max-width: 100%; }
h1 { line-height: 1.2; margin: 0 0 .5rem; font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { margin-top: 2.5rem; font-size: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.error { color: var(--danger); }
.narrow { max-width: 26rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--surface); padding: .5rem; z-index: 10; }

/* Header and navigation. On phones the tabs move to a bar at the bottom. */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--bg);
}
.site-header nav a { color: var(--fg); }
.brand { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 1.25rem; }
.tabs { display: flex; gap: .25rem; }
.tabs a {
  text-decoration: none; padding: .4rem .75rem; border-radius: 999px;
  display: flex; align-items: center; gap: .35rem;
}
.tabs a:hover { background: var(--line-soft); }
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--fg); font-weight: 600; }

main { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
/* The footer clears the phone tab bar. */
.site-footer {
  max-width: 64rem; margin: 0 auto; padding: 1rem 1.25rem calc(1.5rem + var(--tabbar));
  border-top: 1px solid var(--line-soft); display: flex; gap: 1.5rem; font-size: .875rem;
}
.site-footer a { color: var(--muted); }

@media (max-width: 40rem) {
  html:has(body.app) { --tabbar: calc(3.5rem + env(safe-area-inset-bottom)); }
  body.app .tabs {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
    justify-content: space-around; gap: 0;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: .25rem 0 calc(.25rem + env(safe-area-inset-bottom));
  }
  body.app .tabs a {
    font-size: .8rem; padding: .6rem .3rem; border-radius: var(--radius); min-height: 2.75rem;
  }
  body.app .tabs a[aria-current="page"] { background: var(--accent-soft); }
}

/* Controls */
button, .button {
  font: inherit; color: var(--on-accent); background: var(--accent); text-decoration: none; display: inline-block;
  border: 1px solid var(--accent); border-radius: var(--radius); padding: .5rem 1rem; cursor: pointer; line-height: 1.3;
}
button.secondary, .button.secondary { background: transparent; color: var(--accent); }
button.danger, .button.danger { background: var(--danger); border-color: var(--danger); }
button.link { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

form { display: grid; gap: .5rem; margin: 1rem 0; }
form.inline { display: inline; margin: 0; }
label { font-weight: 600; }
input, select, textarea {
  font: inherit; padding: .5rem .75rem; border: 1px solid var(--control-line);
  border-radius: var(--radius); background: var(--surface); color: var(--fg);
}
textarea { line-height: 1.5; resize: vertical; }
input.copy { width: 100%; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--danger); }
p.error { margin: 0; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.empty { padding: 2rem 0; color: var(--muted); }
.empty strong { color: var(--fg); }

/* First visit: an empty recipe box */
.welcome { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 1rem 0 2.5rem; }
.welcome h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.1; letter-spacing: -.01em; margin-bottom: .75rem; }
.welcome .lede { font-size: 1.125rem; color: var(--muted); margin: 0 0 1.5rem; max-width: 32rem; }
.welcome .cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.welcome .cta .button { font-size: 1.0625rem; padding: .7rem 1.4rem; font-weight: 600; }
.welcome .typed { transform: rotate(-1deg); }
.typed-title { font-size: 1.25rem; font-weight: 700; margin: .1rem 0 .5rem; }
.welcome .typed .provenance { margin: -.35rem 0 .6rem; }
.first-run > h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.start-ways { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.start-ways a { display: block; height: 100%; padding: 1.1rem 1.25rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); text-decoration: none; }
.start-ways a:hover { border-color: var(--accent); }
.start-ways a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.start-ways strong { display: block; margin-bottom: .3rem; color: var(--accent); font-size: 1.0625rem; }
.start-ways span { color: var(--muted); }
.together { background: var(--accent-soft); border-radius: 12px; padding: 1.5rem 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.together h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.together p { margin: 0; max-width: 36rem; }
.together .button.secondary { background: var(--surface); }
@media (max-width: 52rem) {
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome .typed { max-width: 24rem; margin: 0; }
}
@media (max-width: 40rem) {
  .start-ways { grid-template-columns: minmax(0, 1fr); }
}
.sent h1 { margin-bottom: .75rem; }
.sent .lede { font-size: 1.125rem; }
.sent ol { padding-left: 1.25rem; color: var(--muted); }
.sent ol li { margin: .25rem 0; }
.code-form { margin: 1.25rem 0; }
.code-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.code-row input { width: 9rem; font-size: 1.25rem; letter-spacing: .15em; font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; font-size: .75rem; padding: .05rem .5rem; border-radius: 999px;
  background: var(--line-soft); color: var(--muted);
}

/* Landing and account */
#feedback-message { width: 100%; }
/* Privacy and terms */
.legal { max-width: 40rem; }
.legal h2 { margin-top: 2rem; }
.legal li { margin: .25rem 0; }
.members { list-style: none; padding: 0; }
.members li { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }

/* Library */
.search { display: flex; gap: .5rem; flex-wrap: wrap; }
.search input[type=search] { flex: 1 1 16rem; }
.recipe-grid {
  list-style: none; padding: 0; margin: 1rem 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}
.recipe-card {
  display: flex; flex-direction: column; gap: .15rem; height: 100%;
  text-decoration: none; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding-bottom: .6rem;
}
.recipe-card:hover { border-color: var(--accent); }
.recipe-card img, .recipe-card .placeholder {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: .4rem; background: var(--line-soft);
}
.recipe-card .placeholder {
  display: grid; place-items: center; font-size: 2.5rem; color: var(--accent);
}
.recipe-card .title, .recipe-card .by, .recipe-card .badge { margin: 0 .75rem; }
.recipe-card .title { font-weight: 600; }
.recipe-card .by { font-size: .85rem; }
.recipe-card .badge { align-self: flex-start; margin-top: .25rem; }

/* Recipe */
.crumbs { margin: 0 0 .5rem; }
.recipe-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.recipe-head p { margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.recipe h3 { font-size: 1rem; margin: 1rem 0 .25rem; color: var(--muted); }
.recipe .title-block h1 { margin-bottom: .25rem; }
.recipe .title-block .provenance { font-size: 1.0625rem; }
.recipe .actions .button, .recipe .actions button { padding: .4rem .85rem; font-size: .9375rem; }
.recipe .lede { font-size: 1.125rem; margin: 1rem 0 .75rem; max-width: 44rem; }
.facts { list-style: none; padding: 0; margin: .75rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.byline { margin: .5rem 0 0; font-size: .9375rem; }

/* Wide screens without a card photo: ingredients beside the steps. */
.recipe-body.split .recipe-text { display: grid; gap: 2.5rem; grid-template-columns: minmax(17rem, 2fr) minmax(0, 3fr); align-items: start; margin-top: 1.5rem; }
.recipe-body.split #ingredients { position: sticky; top: 1rem; }
#ingredients { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .25rem 1.25rem 1.25rem; margin-top: 1.5rem; }
.recipe-body.split #ingredients { margin-top: 0; }
#ingredients .section-head h2 { margin: 1rem 0 .5rem; }
.recipe-main > section:first-child > h2 { margin-top: 1rem; }
@media (max-width: 52rem) {
  .recipe-body.split .recipe-text { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .recipe-body.split #ingredients { position: static; margin-top: 1rem; }
}
.recipe-body.with-card { display: grid; gap: 2rem; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
.card-photo { margin: 1rem 0 0; position: sticky; top: 1rem; }
.card-photo img { border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.card-photo figcaption { font-size: .8rem; margin-top: .25rem; }
@media (max-width: 48rem) {
  .recipe-body.with-card { grid-template-columns: 1fr; gap: 0; }
  .card-photo { position: static; }
  .card-photo img { max-height: 40vh; width: auto; margin: 0 auto; }
}
img.card { max-width: 100%; border-radius: var(--radius); margin: 1rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin: 1.5rem 0 .5rem; }
.scaler { display: flex; align-items: center; gap: .4rem; }
.scaler .step {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-size: 1.1rem;
}
.scaler span.step { opacity: .3; }
.scaler .amount { min-width: 6.5rem; text-align: center; font-weight: 600; }
.scaler .reset { font-size: .85rem; }
.ingredients { list-style: none; padding: 0; margin: 0 0 1rem; }
.ingredients li { border-bottom: 1px solid var(--line-soft); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients label { display: flex; gap: .65rem; align-items: baseline; padding: .45rem 0; margin: 0; font-weight: 400; cursor: pointer; }
.ingredients input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; margin: 0; transform: translateY(.15rem); }
.ingredients b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ingredients input:checked + span { color: var(--muted); text-decoration: line-through; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .25rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); font-size: 1.0625rem; line-height: 1.6; }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(step); font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.notes { white-space: pre-line; }
.nutrition-panel { margin-top: 2rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.nutrition-panel h2 { margin-top: 0; }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 .5rem; }
.macros div { text-align: center; }
.macros dt { font-size: .8rem; color: var(--muted); }
.macros dd { margin: 0; font-size: 1.25rem; font-weight: 600; }
table.lines { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: .5rem; }
table.lines th, table.lines td { text-align: left; padding: .35rem .25rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.lines .num { text-align: right; white-space: nowrap; }
.save { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.recipe-list { list-style: none; padding: 0; }
.recipe-list li { padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }

@media print {
  .site-header, .site-footer, .no-print, .skip, .scaler .step, .scaler .reset { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .recipe-body.with-card { grid-template-columns: 1fr 2fr; }
  .card-photo { position: static; }
  a { color: inherit; text-decoration: none; }
  .nutrition-panel { border: 0; padding: 0; }
  #ingredients { border: 0; background: none; padding: 0; }
  .recipe-body.split #ingredients { position: static; }
}

/* Cook mode: iPad first. Ingredients beside the step on wide screens; the
   step alone (ingredients folded above it) on a phone. */
body.cooking .site-header, body.cooking .site-footer { display: none; }
html:has(body.cooking) { --tabbar: 0px; }
body.cooking main { max-width: 90rem; padding-bottom: 0; }
.cook { min-height: 100dvh; display: flex; flex-direction: column; padding-top: 1rem; }
.cook-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cook-title { margin: 0; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cook-progress { color: var(--fg); }
.cook-body { flex: 1; display: grid; gap: 2.5rem; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); align-items: start; align-content: start; margin-top: 1.25rem; }
.cook-ingredients { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem 1.25rem 1rem; position: sticky; top: 1rem; }
.cook-ingredients summary { list-style: none; display: flex; align-items: baseline; gap: .75rem; padding: .5rem 0; cursor: pointer; }
.cook-ingredients summary::-webkit-details-marker { display: none; }
.cook-ingredients summary h2 { margin: 0; font-size: 1.25rem; }
.cook-ingredients .ingredients { margin: 0; }
.cook-steps ol { list-style: none; padding: 0; margin: 0; }
.cook-step { padding: 0 0 2rem; }
.cook-section { margin: 0 0 .25rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .875rem; }
.cook-n { margin: 0 0 .5rem; color: var(--accent); font-weight: 700; font-size: 1.125rem; }
.cook.js .cook-n { display: none; }
.cook-text { margin: 0 0 1.25rem; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); line-height: 1.45; max-width: 38em; }
.cook-uses { margin: 0; color: var(--muted); font-size: 1.125rem; max-width: 46em; }
.cook-uses strong { color: var(--fg); }
.timer-start {
  font: inherit; line-height: inherit; color: var(--fg); background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 6px; padding: 0 .3em; margin: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: .15em;
}
.timer-start:hover { background: var(--surface); }
.cook-foot { position: sticky; bottom: 0; background: var(--bg); padding: .75rem 0 max(.75rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); margin-top: 1rem; }
.timers { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.timer { display: flex; align-items: center; gap: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .35rem .3rem 1rem; font-variant-numeric: tabular-nums; }
.timer-label { color: var(--muted); }
.timer-left { font-weight: 700; font-size: 1.25rem; min-width: 3.5rem; }
.timer button { padding: .3rem .9rem; border-radius: 999px; }
.timer.done { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.timer.done .timer-label { color: var(--on-accent); }
.timer.done button { background: var(--surface); }
@media (prefers-reduced-motion: no-preference) {
  .timer.done { animation: timer-pulse 1s ease-in-out infinite alternate; }
  @keyframes timer-pulse { to { opacity: .75; } }
}
.cook-nav { display: grid; grid-template-columns: 1fr 2fr; gap: .75rem; }
.cook-nav button { min-height: 4.5rem; font-size: 1.375rem; font-weight: 600; border-radius: 12px; }
.cook-awake { margin: .5rem 0 0; text-align: center; }
@media (max-width: 52rem) {
  .cook-body { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .cook-ingredients { position: static; }
  .cook-nav button { min-height: 3.75rem; }
}

/* Recipe editor */
.editor { max-width: 44rem; }
.editor:has(.compare) { max-width: none; }
.recipe-form { grid-template-columns: minmax(0, 1fr); }
.recipe-form label { margin-top: .5rem; }
.recipe-form textarea, .recipe-form input:not([type=checkbox]):not([type=file]) { width: 100%; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.row { display: grid; gap: .75rem; grid-template-columns: 2fr 1fr; }
.row.three { grid-template-columns: repeat(3, 1fr); }
.row > div { display: grid; gap: .25rem; }
fieldset { min-width: 0; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: .75rem 0 0; display: grid; gap: .4rem; }
legend { font-weight: 600; padding: 0 .25rem; }
label.check { font-weight: 400; display: flex; gap: .5rem; align-items: center; margin: 0; }
img.thumb { max-width: 10rem; border-radius: var(--radius); border: 1px solid var(--line); }
details > summary { cursor: pointer; color: var(--accent); margin: .75rem 0 .25rem; }
details[open] > summary { margin-bottom: .5rem; }
.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: .25rem 1rem; }
.notice a { color: var(--fg); }
.compare { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.theirs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1rem 1rem; }
.theirs pre { white-space: pre-wrap; font: inherit; margin: 0; }
.theirs h4 { margin: 1rem 0 .25rem; color: var(--muted); }
.danger-zone { margin-top: 2.5rem; border-top: 1px solid var(--line-soft); padding-top: .5rem; }
.danger-zone summary { color: var(--danger); }
@media (max-width: 40rem) {
  .row, .row.three, .compare { grid-template-columns: minmax(0, 1fr); }
}
.wide-ish { max-width: 36rem; }
.line-quote { font-size: 1.15rem; font-weight: 600; margin: .5rem 0; }
label.food { align-items: flex-start; padding: .35rem 0; border-bottom: 1px solid var(--line-soft); }
label.food input { margin-top: .3rem; }
label.food small { display: block; }
input[type=file] { max-width: 100%; }

/* Imports */
.import { max-width: 40rem; }
.import-options { display: grid; gap: .75rem; margin: 1rem 0; }
.option { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1rem; }
.option > summary { font-weight: 600; color: var(--fg); padding: .5rem 0; }
.option form { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
.option input, .option textarea { min-width: 0; max-width: 100%; }
.recent-imports { list-style: none; padding: 0; }
.recent-imports li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.working { text-align: center; padding: 3rem 0; }
.spinner {
  width: 2.5rem; height: 2.5rem; margin: 0 auto 1rem; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.draft { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.review { display: grid; gap: 2rem; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
@media (max-width: 48rem) { .review { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.unsure { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); padding: .25rem 1rem; }
.unsure ul { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.saved { color: var(--ok); font-weight: 600; }
.discard { display: block; margin-top: 2rem; }
.photos { display: grid; gap: .5rem; }
form > button, form > .form-actions { justify-self: start; }

/* Grocery */
.grocery { max-width: 40rem; }
.list-switch { display: flex; gap: .25rem; flex-wrap: wrap; }
.list-switch a { text-decoration: none; padding: .2rem .7rem; border-radius: 999px; border: 1px solid var(--line); }
.list-switch a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--fg); font-weight: 600; }
.add-item { display: flex; gap: .5rem; }
.add-item input { flex: 1; min-width: 0; }
h2.aisle { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.5rem 0 .25rem; }
.items { list-style: none; padding: 0; margin: 0; }
.item { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.item .what { flex: 1; min-width: 0; }
.item .what small { display: block; }
.item .amount { font-weight: 600; }
.item .edit { font-size: .85rem; color: var(--muted); }
.tick-form { margin: 0; display: block; }
button.tick {
  width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
}
button.tick[aria-pressed="true"] { background: var(--accent); }
button.tick[aria-pressed="true"]::after { content: "✓"; color: var(--on-accent); font-size: .9rem; }
.item.checked .what { text-decoration: line-through; color: var(--muted); }
.in-cart { margin-top: 1rem; }
.in-cart form { margin-top: .75rem; }
.lists-admin { margin-top: 2.5rem; border-top: 1px solid var(--line-soft); padding-top: .5rem; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
.inline-form label { grid-column: 1 / -1; }

/* Meal plan */
.week-nav { display: flex; gap: .25rem; }
.week-nav a { text-decoration: none; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; }
.week-to-list { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1rem; }
.days { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem .75rem; }
.day.today { border-color: var(--accent); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.day-head h2 { margin: 0; font-size: 1.05rem; }
.day-kcal { margin: 0; font-size: .85rem; }
.day-macros { margin: 0; font-size: .85rem; color: var(--muted); flex-basis: 100%; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem 1rem; margin: .5rem 0; }
.slot dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.slot dd { margin: 0; display: grid; gap: .2rem; }
.entry .edit {
  display: inline-block; min-width: 24px; min-height: 24px; padding: .15rem .4rem; margin-left: .5rem;
  font-size: .85rem; color: var(--muted); line-height: 1.4;
}
.add-entry { font-size: .9rem; }
@media (max-width: 40rem) {
  .slots { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .slot.empty { display: none; }
  .slot { display: grid; grid-template-columns: 6rem minmax(0, 1fr); align-items: baseline; }
}

/* Cookbooks */
.cookbooks { max-width: 44rem; }
.cookbook { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1.25rem 1rem; margin: 1rem 0; }
.cookbook h2 { margin: .5rem 0; }
.cookbook h2 a { color: var(--fg); text-decoration: none; }
.cookbook h3 { font-size: .9rem; margin: 1rem 0 .25rem; color: var(--muted); }
.cookbook form { margin: .5rem 0; }
.new-cookbook { margin-top: 1.5rem; }

/* Signed-out home (landing page) */
.landing { padding: 1rem 0 1rem; }
.landing section { padding: 3rem 0; }
.landing section + section { border-top: 1px solid var(--line-soft); }
.landing h2 { margin: 0 0 1.5rem; font-size: clamp(1.4rem, 3.5vw, 1.75rem); line-height: 1.25; }
.landing h3 { margin: 0 0 .35rem; font-size: 1.0625rem; }
.landing p { margin: 0; }
.hero {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-top: 1.5rem !important;
}
.hero h1 { font-size: clamp(2.125rem, 5.5vw, 3rem); line-height: 1.1; letter-spacing: -.01em; margin-bottom: 1rem; }
.hero .lede { font-size: 1.1875rem; margin-bottom: 1.75rem; max-width: 32rem; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.hero .cta .button { font-size: 1.0625rem; padding: .7rem 1.4rem; font-weight: 600; }
.hero-demo { margin: 0; padding: .5rem .5rem 0; }
.provenance { color: var(--ink); font-style: italic; font-size: .9375rem; }
.landing .typed .provenance { margin: -.35rem 0 .6rem; }
.typed {
  margin: 0 auto; width: min(100%, 24rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem 1.1rem;
  box-shadow: 0 8px 24px rgba(60,40,20,.08);
}
.typed-label { font-size: .8125rem; color: var(--muted); }
.landing .typed h2 { font-size: 1.25rem; margin: .1rem 0 .5rem; }
.typed ul { list-style: none; padding: 0; margin: 0 0 .6rem; }
.typed li { padding: .2rem 0; border-bottom: 1px solid var(--line-soft); }
.typed li b { font-variant-numeric: tabular-nums; font-weight: 600; }
.typed .step { font-size: .9375rem; }
mark { background: var(--accent-soft); color: var(--fg); border-radius: 4px; padding: 0 .2rem; }

.steps-3 { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps-3 li { counter-increment: step; }
.steps-3 li::before {
  content: counter(step); display: block; margin-bottom: .5rem;
  font-size: 2rem; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums;
}
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem 1.25rem; }
.feature-grid p, .steps-3 p, .promises dd { color: var(--muted); }
.promises dl { margin: 0; display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promises dt { font-weight: 600; margin-bottom: .35rem; }
.promises dd { margin: 0; }
.closing { text-align: center; }
.landing .closing h2 { margin-bottom: .5rem; }
.closing p + p { margin-top: 1.25rem; }
@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-demo { max-width: 30rem; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .landing section { padding: 2.25rem 0; }
  .steps-3, .feature-grid, .promises dl { grid-template-columns: minmax(0, 1fr); }
}
.site-footer { flex-wrap: wrap; row-gap: .5rem; }
.site-footer .company { color: var(--muted); margin-left: auto; }
