:root {
  --paper: #FBF7F0;
  --card: #FFFFFF;
  --ink: #17120D;
  --ink-soft: #5B5147;
  --ink-faint: #8A7F73;
  --line: #E4DACA;
  --accent: #B4472A;
  --accent-soft: #FBEDE7;
  --green: #2C6049;
  --green-soft: #E8F1EC;
  --amber: #8A5A00;
  --amber-soft: #FDF2DC;
  --radius: 16px;
  --tap: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
}

body { padding-bottom: 96px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 18px 40px; }

h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 23px; margin-bottom: 4px; }
h3 { font-size: 19px; }

p { margin: 0 0 12px; }

.sub { color: var(--ink-soft); font-size: 16px; }
.faint { color: var(--ink-faint); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; }

/* ---------- header ---------- */
header {
  padding: 18px 18px 10px;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-size: 21px; font-weight: 600; font-family: inherit; color: var(--ink);
  background: none; border: none; padding: 6px 2px; cursor: pointer; min-height: 44px;
}
.brand:active { opacity: 0.6; }
.brand span { color: var(--accent); }
/* The mark rides on the wordmark's baseline rather than in a flex row, so the
 * date on the other side of the header keeps its baseline alignment. Served
 * from img/ as the artifact's own file: a hotlinked mark renders nothing (§5). */
.brand-mark { height: 30px; width: auto; vertical-align: -8px; margin-right: 9px; }
/* The wordmark is the drawn one from the logo artwork rather than type set in
 * the page's own serif, so the app and the identity are the same thing. Both
 * are served from img/ as the artifact's own files (§5). */
.brand-word { height: 24px; width: auto; vertical-align: -3px; }
.tagline { font-size: 14px; color: var(--ink-faint); }

/* ---------- big home buttons ---------- */
.tiles { display: grid; gap: 14px; }
.tile {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: var(--tap);
}
.tile:active { background: #F6F1E8; }
.tile .t-title { font-size: 22px; font-weight: 600; display: block; }
.tile .t-sub { font-size: 16px; color: var(--ink-soft); display: block; margin-top: 3px; }
.tile.primary { background: var(--accent-soft); border-color: #EBCFC3; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
}
.btn:active { opacity: 0.85; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.quiet { background: transparent; color: var(--ink-soft); border-color: transparent; min-height: 44px; padding: 8px 10px; font-size: 16px; font-weight: 500; text-decoration: underline; }
.btn.full { width: 100%; }
.btn.mic { background: var(--accent); border-color: var(--accent); }
.btn.mic.on { background: var(--green); border-color: var(--green); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

/* ---------- review rows ---------- */
.row {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.row.low { border-color: #E6C9A8; background: #FFFCF6; }
.row-top { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.row-label { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.row-name {
  font-size: 20px; font-weight: 600; font-family: inherit; color: var(--ink);
  width: 100%; padding: 10px 10px; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.row-name::placeholder { color: #BBAE9E; font-weight: 400; }
.row-name:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.fields { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.field { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select {
  font: inherit; font-size: 18px; padding: 10px 10px; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field input::placeholder { color: #BBAE9E; }
.field.unknown input { background: #FFFDF8; border-style: dashed; }
.del { background: transparent; border: none; color: var(--ink-faint); font-size: 26px; line-height: 1; padding: 6px 10px; cursor: pointer; min-height: 44px; }

.badge {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap;
}
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.low { background: var(--amber-soft); color: var(--amber); }
.badge.gone { background: #F3EDE4; color: var(--ink-faint); }
.badge.check { background: var(--accent-soft); color: var(--accent); }

/* ---------- larder list ---------- */
.lard { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.lard:last-child { border-bottom: none; }
.lard-l { display: flex; flex-direction: column; }
.lard-name { font-size: 19px; font-weight: 600; }
.lard-meta { font-size: 15px; color: var(--ink-faint); }
.lard-r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lard-qty { font-size: 18px; }
.lard-acts { display: flex; gap: 6px; margin-top: 4px; }
.mini {
  font: inherit; font-size: 15px; padding: 8px 12px; min-height: 40px;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink-soft); cursor: pointer;
}
.mini:active { background: #F6F1E8; }
.mini.danger { color: var(--accent); border-color: #EBCFC3; }
.lard { padding: 15px 0; }

.group-head { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 20px 0 2px; }

/* ---------- suggestions ---------- */
.sugg { border-left: 4px solid var(--green); padding: 12px 0 12px 14px; margin-bottom: 14px; }
.sugg.maybe { border-left-color: var(--amber); }
.sugg.short { border-left-color: var(--ink-faint); }
.sugg-name { font-size: 21px; font-weight: 600; }
.sugg-line { font-size: 17px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- misc ---------- */
.notice { font-size: 16px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); margin-bottom: 14px; }
.notice.good { background: var(--green-soft); color: var(--green); }
textarea {
  width: 100%; min-height: 120px; font: inherit; font-size: 19px; padding: 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.hint { font-size: 15px; color: var(--ink-faint); margin-top: 8px; }
.back { background: none; border: none; font: inherit; font-size: 17px; color: var(--ink-soft); padding: 8px 0; cursor: pointer; min-height: 44px; }
.hidden { display: none !important; }
.listening { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--green); font-weight: 600; margin-top: 10px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green); animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.82); } }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ask { background: var(--accent-soft); border: 1.5px solid #EBCFC3; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  font: inherit; font-size: 16px; padding: 10px 16px; min-height: 48px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink); cursor: pointer; -webkit-appearance: none; appearance: none;
}
.chip:active { background: #F6F1E8; }
.chip.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.outcome { margin-top: 8px; color: var(--ink-soft); }
button { color: inherit; -webkit-appearance: none; appearance: none; }
.foot { text-align: center; font-size: 14px; color: var(--ink-faint); padding: 26px 0 10px; }

/* ---------- bottom action bar: the primary controls stay under the thumb ---------- */
.bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--paper);
  border-top: 1.5px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(23, 18, 13, 0.07);
}
.bottombar .bar-btns { display: flex; gap: 10px; max-width: 524px; margin: 0 auto; }
.bottombar .bar-btns .btn { flex: 1; min-height: 62px; font-size: 20px; }
.bottombar .bar-state { max-width: 524px; margin: 0 auto; }
.bottombar .bar-state .listening { margin: 0 0 10px; justify-content: center; }
.bottombar .bar-state .waiting { margin: 0 0 10px; text-align: center; font-size: 15px; color: var(--ink-faint); }
.btn.mic[disabled] { opacity: 0.45; }

/* room for the bar */
#view-add { padding-bottom: 120px; }

/* ---------- save confirmation, rendered in place ---------- */
.saved-card { text-align: center; padding: 26px 20px; border-color: #BBD6C6; background: var(--green-soft); }
.saved-tick {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 30px; line-height: 54px;
}
.saved-card h2 { color: var(--green); }
.saved-card .btn-row { justify-content: center; }
.saved-card .btn { flex: 1; }

.sugg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sugg-mins { font-size: 14px; color: var(--ink-faint); white-space: nowrap; }

a.btn { text-decoration: none; }

.tick { display: flex; align-items: center; gap: 12px; padding: 13px 2px; font-size: 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tick:last-child { border-bottom: none; }
.tick input { width: 24px; height: 24px; accent-color: var(--green); flex: none; }
#view-staples { padding-bottom: 120px; }

/* ---- kitchen & household (§7, §9.2c) ---- */
.equip-row, .equip-ask {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.equip-row:last-child, .equip-ask:last-child { border-bottom: none; }
.equip-q { font-size: 17px; font-weight: 600; }
.equip-ask .chips, .equip-row .chips { margin-top: 0; }
.cap-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; color: var(--ink-soft); padding: 6px 0;
}
.cap-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.cap-dot.yes { background: var(--green); }
.cap-dot.no { background: var(--accent); }
.cap-dot.unknown { background: var(--line); border: 1.5px solid var(--ink-faint); }

/* ---- §9.1 the one way in ---- */
.wish {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 18px;
}
.wish-label { display: block; font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.wish textarea { min-height: 56px; }
.wish .bar-btns { display: flex; gap: 10px; margin-top: 12px; }
.wish .bar-btns .btn { flex: 1; }
.wish .bar-state { font-size: 15px; color: var(--ink-faint); margin-top: 8px; min-height: 0; }

/* ---- §9.2 a recipe on screen ---- */
.badge.good { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.ing-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.ing-row:last-child { border-bottom: none; }
.ing-name { font-size: 17px; }
.ing-tag { font-size: 14px; white-space: nowrap; flex: 0 0 auto; }
.ing-tag.yes { color: var(--green); }
.ing-tag.no { color: var(--accent); }
.ing-tag.unknown { color: var(--ink-faint); }
.step-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: none; }
.step-n {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step-body { flex: 1; font-size: 17px; line-height: 1.45; }
.caution {
  margin-top: 8px; padding: 9px 11px; border-radius: 10px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 15px; font-weight: 600;
}

/* ---- microphone glyph ---- */
.btn.mic { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.mic-glyph {
  width: 21px; height: 21px; flex: 0 0 21px;
  fill: currentColor; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* ---- the Go button ---- */
.btn.go { background: var(--green); border-color: var(--green); color: #fff; }
.btn.go:active { background: var(--green-deep, var(--green)); }

/* ---- §9.4 guided cooking, sized for someone at the stove ---- */
#view-cooking h1 { font-size: 24px; color: var(--ink-soft); margin-bottom: 6px; }
.cook-prog { margin-bottom: 14px; }
.cook-prog-n { font-size: 16px; color: var(--ink-faint); }
.cook-bar { height: 7px; border-radius: 4px; background: var(--line); margin-top: 7px; overflow: hidden; }
.cook-bar-fill { height: 100%; background: var(--green); transition: width .25s ease; }
.step-card { padding: 24px 20px; }
.step-text { font-size: 27px; line-height: 1.42; margin: 0; }
.caution-card { border-color: var(--amber); }
.caution-card .caution { font-size: 18px; margin-top: 0; margin-bottom: 14px; }
.cook-pad { margin-top: 20px; }
.btn.big {
  display: block; width: 100%; font-size: 23px; padding: 22px 20px;
  margin-bottom: 12px; min-height: 68px;
}
.btn.go.held { opacity: .45; }
.cook-pad .btn-row { display: flex; gap: 10px; }
.cook-pad .btn-row .btn { flex: 1; }
.timer-card { text-align: center; }
.timer-time {
  font-size: 46px; font-variant-numeric: tabular-nums;
  letter-spacing: 1px; margin-bottom: 12px;
}

/* ---- photographs: only of this household's own cooking ---- */
.photo-slot { margin-top: 16px; }
.dish-photo {
  display: block; width: 100%; height: auto; max-height: 320px;
  object-fit: cover; border-radius: 12px; margin-bottom: 12px;
  background: var(--line);
}

/* ---- what the larder is actually contributing ---- */
.using-card { border-color: var(--green); }
.ing-using { font-size: 15px; color: var(--green); padding: 0 0 9px; margin-top: -4px; }

/* ---- reading speed, at the stove ---- */
.speed-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 16px;
}
.speed-label { font-size: 16px; color: var(--ink-faint); }
.speed-row .chips { margin-top: 0; }

/* the ask: still first, but no longer half the screen */
.wish { padding: 14px 14px 12px; margin-bottom: 20px; }
.wish-label { font-size: 18px; margin-bottom: 8px; }
.wish textarea {
  min-height: 52px; font-size: 18px; padding: 12px 13px;
}
.wish textarea::placeholder { color: #C3B7A7; }
.wish-btns { display: flex; gap: 10px; margin-top: 10px; }
.wish-btns .btn { min-height: 54px; font-size: 18px; padding: 12px 16px; }
.wish-btns .btn.mic { flex: 0 0 auto; }
.wish-btns .btn.go { flex: 1; }
.wish .bar-state:empty { display: none; }
.wish .bar-state { font-size: 15px; color: var(--ink-faint); margin-top: 8px; }

/* the microphone is a way in, not the main event */
.btn.mic.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn.mic.ghost .mic-glyph { opacity: 0.75; }
.btn.mic.listening,
.btn.mic.ghost.listening {
  background: var(--green); border-color: var(--green); color: #fff;
}
.btn.mic.listening .mic-glyph { opacity: 1; }

/* daily things: two tiles, side by side where there is room */
.tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 16px 15px; border-radius: 14px; min-height: 104px; }
.tile .t-title { font-size: 19px; line-height: 1.25; }
.tile .t-sub { font-size: 14px; margin-top: 5px; line-height: 1.35; }
.tile.primary { background: var(--card); border-color: var(--line); }

/* everything else: quiet rows, full tap target, no box each */
.group-head { margin: 26px 0 8px; }
.links {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.link-row {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px; min-height: 64px;
  font: inherit; color: inherit; cursor: pointer;
}
.link-row:last-child { border-bottom: none; }
.link-row:active { background: #F6F1E8; }
.l-title { display: block; font-size: 18px; font-weight: 600; }
.l-sub { display: block; font-size: 14px; color: var(--ink-faint); margin-top: 2px; }

/* the bottom bar only exists on two screens; everywhere else that padding
   was dead space at the end of a scroll */
body { padding-bottom: 0; }
#view-add, #view-staples { padding-bottom: 130px; }

header { padding: 16px 18px 6px; }
.wrap { padding: 14px 18px 36px; }
.foot { padding: 22px 0 8px; }

/* narrow phones: stack the two daily tiles rather than cramping them */
@media (max-width: 380px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
}

/* the ask box is one line that grows; a drag-handle in the corner is clutter */
.wish textarea { resize: none; }

/* ---- the stove: one button to reach for, the rest within reach ---- */
.cook-pad .btn.big.ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line); font-size: 20px;
  min-height: 60px; padding: 16px 18px;
}
.cook-pad .btn.mic.big.ghost.listening {
  background: var(--green); border-color: var(--green); color: #fff;
}
.cook-pad .btn-row { margin-top: 0; margin-bottom: 12px; }
.cook-pad .btn-row .btn { min-height: 56px; font-size: 17px; padding: 12px 14px; }
.btn.quiet.wide { display: block; width: 100%; text-align: center; }
.cook-pad .hint { margin-top: -4px; margin-bottom: 4px; }

/* the acknowledgement belongs to the warning it is under */
.caution-card .btn.ack {
  display: block; width: 100%;
  background: var(--amber); border-color: var(--amber); color: #fff;
}
.caution-card .hint { margin-top: 10px; }

/* an action that belongs to a card fills it */
.card > .btn:not(.quiet):not(.mini) { display: block; width: 100%; }
.card > .btn-row { display: flex; gap: 10px; }
.card > .btn-row > .btn { flex: 1; }
#request-body > .btn-row { display: flex; gap: 10px; margin-bottom: 14px; }
#request-body > .btn-row > .btn { flex: 1; }


/* ==========================================================================
   THE FRONT PAGE

   A grid of six identical tiles is a slide, not a design: everything the same
   size says everything matters the same, which is the same as saying nothing
   matters. So this page is set like a front page instead.

     one lede      the question the household actually asks, set as a headline
     two hands     the things you do with your own hands: ask, or cook
     one shelf     everything about stock, small, in a row
     a rule        and the setup nobody opens twice

   Colour is rationed. The lede owns turmeric; the two hands own plum and
   green; the shelf is ink on cream and gets no colour at all, because it is
   not where anybody is going. Small caps and a hairline rule do the work
   that six colours were doing badly.
   ========================================================================== */

/* ---- masthead ---- */
header {
  padding: 20px 20px 12px; display: flex; align-items: baseline;
  justify-content: space-between; gap: 12px; max-width: 560px; margin: 0 auto;
}
.brand { font-size: 25px; font-weight: 700; letter-spacing: -0.015em; }
.brand-mark { height: 34px; vertical-align: -9px; margin-right: 10px; }
.brand-word { height: 27px; vertical-align: -3px; }
.masthead-date {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); white-space: nowrap;
}
.wrap { padding: 4px 20px 40px; }

/* ---- the lede ---- */
.lede {
  position: relative; overflow: hidden;
  display: block; width: 100%; text-align: left;
  background: #9A6508; color: #FDF6E7;
  border: none; border-radius: 4px 22px 4px 22px;   /* not a rounded rectangle */
  padding: 22px 22px 20px; margin-bottom: 20px;
  font: inherit; cursor: pointer;
  box-shadow: 0 10px 28px -16px rgba(60, 38, 0, 0.75);
}
.lede:active { transform: translateY(1px); }

/* a faint seed pattern, so the block is a surface and not a swatch */
.lede-grain {
  position: absolute; inset: 0; opacity: 0.09; pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 1.4px, transparent 1.5px),
    radial-gradient(circle at 62% 42%, #fff 1.1px, transparent 1.2px),
    radial-gradient(circle at 34% 78%, #fff 1.3px, transparent 1.4px),
    radial-gradient(circle at 86% 88%, #fff 1px, transparent 1.1px);
  background-size: 54px 48px, 38px 44px, 64px 58px, 44px 40px;
}
.lede > *:not(.lede-grain) { position: relative; }

.lede-kicker {
  display: block; font-size: 11.5px; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.72; margin-bottom: 8px;
}
.lede-q {
  display: block; font-size: 37px; line-height: 1.04;
  font-weight: 700; letter-spacing: -0.025em; margin-bottom: 14px;
}
.lede-body { display: block; }
.lede-line {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 0; border-top: 1px solid rgba(253, 246, 231, 0.22);
}
.lede-line:first-child { border-top: none; }
.lede-slot {
  flex: 0 0 76px; font-size: 10.5px; letter-spacing: 0.13em;
  text-transform: uppercase; opacity: 0.66;
}
.lede-dish { flex: 1; font-size: 17px; font-weight: 600; line-height: 1.3; }
.lede-none { display: block; font-size: 18px; opacity: 0.8; font-style: italic; }
.lede-go {
  display: inline-block; margin-top: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  border-bottom: 1.5px solid rgba(253, 246, 231, 0.55); padding-bottom: 2px;
}
.lede-cook { display: block; font-size: 13px; margin-top: 12px; opacity: 0.85; }
.lede-cook.warn { opacity: 1; font-weight: 600; }

/* ---- the two hands ---- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.act {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; width: 100%; min-height: 168px;
  padding: 18px 16px 16px; border: none; border-radius: 22px 4px 22px 4px;
  font: inherit; cursor: pointer; color: #FDF6E7;
}
.act:active { transform: translateY(1px); }
.act-ask  { background: #6E4157; }
.act-cook { background: #2C6049; }
.act-ico { display: block; margin-bottom: auto; }
.act-ico svg {
  width: 42px; height: 42px; fill: currentColor; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.act-t {
  display: block; font-size: 20px; font-weight: 700;
  line-height: 1.12; letter-spacing: -0.015em; margin-top: 14px;
}
.act-s { display: block; font-size: 12.5px; opacity: 0.72; margin-top: 5px; line-height: 1.3; }

/* ---- what is being made today ----
   Settled already, so it is information rather than an invitation: no button,
   no colour, nothing to tap. It sits above the lede because at breakfast it is
   the question the household has, and reads as a note pinned to the kitchen
   door rather than a second headline competing with the one below it. */
.today {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 17px 16px; margin-bottom: 14px;
}
.today-kicker {
  display: block; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
}
.today-date {
  display: block; font-size: 15.5px; font-weight: 700; color: var(--ink);
  margin: 3px 0 10px;
}
.today-line {
  display: flex; gap: 12px; align-items: baseline;
  padding: 5px 0; border-top: 1px solid var(--line);
}
.today-slot-name {
  flex: none; width: 92px; font-size: 10.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--ink-faint);
}
.today-dish { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* ---- the shelf ---- */
.shelf {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 22px;
}
.chip-nav {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 14px 6px 12px; background: transparent;
  border: 1px solid var(--line); border-radius: 14px;
  font: inherit; color: inherit; cursor: pointer; min-height: 104px;
}
.chip-nav:active { background: #F4EEE4; }
.chip-ico svg {
  width: 25px; height: 25px; stroke: var(--ink-soft);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none;
}
.chip-t { font-size: 16px; font-weight: 700; line-height: 1.2; margin-top: 10px; }
.chip-s { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; line-height: 1.25; }

/* The shelf was deliberately colourless (§4.13: colour is rationed, and the
 * shelf is not where anybody is going). The owner asked for colour and weight
 * here on 21 November. The compromise that keeps the hierarchy: the icons
 * carry the colour, the tiles stay cream. The lede still owns the screen,
 * because a tinted 25px icon cannot outshout a turmeric headline. */
.shelf:not(.shelf-quiet) > .chip-nav:nth-child(1) .chip-ico svg { stroke: var(--green); }
.shelf:not(.shelf-quiet) > .chip-nav:nth-child(2) .chip-ico svg { stroke: var(--accent); }
.shelf:not(.shelf-quiet) > .chip-nav:nth-child(3) .chip-ico svg { stroke: var(--amber); }
.shelf:not(.shelf-quiet) > .chip-nav .chip-ico svg { width: 30px; height: 30px; stroke-width: 2.1; }

/* ---- a hairline, then the things nobody opens twice ---- */
.rule { height: 1px; background: var(--line); margin: 4px 0 18px; }
.links { background: transparent; border: none; border-radius: 0; }
.link-row {
  display: block; width: 100%; text-align: left; background: transparent;
  border: none; border-bottom: 1px solid var(--line);
  padding: 13px 2px; min-height: 56px; font: inherit; color: inherit; cursor: pointer;
}
.link-row:last-child { border-bottom: none; }
.link-row:active { opacity: 0.6; }
.l-title { display: block; font-size: 16px; font-weight: 600; }
.l-sub { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

body { padding-bottom: 0; }
#view-add, #view-staples { padding-bottom: 130px; }

@media (max-width: 360px) {
  .lede-q { font-size: 31px; }
  .act { min-height: 146px; }
  .act-t { font-size: 17px; }
  .chip-t { font-size: 14.5px; }
}

/* both hands carry the same parts, so they sit on the same lines */
.act-t { margin-top: 14px; }
.act-s { min-height: 2.6em; }

/* the one question the app asks back, in the same language as the rest */
.ask {
  background: transparent;
  border: 1px solid var(--line); border-left: 3px solid var(--add);
  border-radius: 4px 14px 14px 4px;
  padding: 16px 16px 14px; margin-bottom: 18px;
}
.ask h3 { font-size: 17px; margin-bottom: 4px; }
.ask .sub { font-size: 14px; }
.ask textarea { min-height: 76px; font-size: 17px; }
.ask .btn { min-height: 50px; font-size: 17px; }

/* ==========================================================================
   PHOTOGRAPHY

   Three photographs, published as the artifact's OWN files under img/. The
   viewer's content security policy serves only the artifact's own files, so
   a hotlink to any CDN — Unsplash included — is blocked by the browser and
   renders nothing. They were fetched once, cropped, compressed to about
   40KB each and shipped with the page.

   They are ambience and nothing more. A recipe's photograph is still only
   ever one somebody in this house took: stock food under "I made this"
   would be a lie, and this app does not tell those.

   They are DECORATION and never stand in for this household's own cooking.
   A recipe's photograph is still only ever one somebody here took — stock
   food under "I made this" would be a lie, and the app does not tell those.

   Every photograph sits on top of a solid colour, so if the host is blocked
   or slow the page looks exactly as it did before and nothing breaks.
   ========================================================================== */
.lede { padding: 0; background: #9A6508; }
.lede-photo {
  display: block; position: relative; overflow: hidden;
  height: 132px; width: 100%; background: #6F4A06;
  border-radius: 4px 22px 0 0;
}
.lede-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
  display: block;
}
/* the photograph fades into the colour block below it, so there is no seam */
.lede-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(154,101,8,0) 0%, rgba(154,101,8,0.18) 52%,
    rgba(154,101,8,0.82) 88%, #9A6508 100%);
}
/* and if it never arrives, the band goes with it rather than leaving a hole */
.lede.no-photo .lede-photo { display: none; }
.lede.no-photo .lede-panel { padding-top: 20px; }

.lede-panel { display: block; position: relative; padding: 2px 22px 20px; }
.lede-q { margin-bottom: 4px; }
.lede-kicker {
  display: block; font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.7; margin: 0 0 14px;
}
.lede-body:empty { display: none; }

.act { position: relative; overflow: hidden; }
.act-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-size: cover; background-position: center;
}
.act > *:not(.act-bg) { position: relative; }
/* The washed photographs these carried were replaced by the objects that now
 * stand on the colour; the element stays as the hook, with nothing in it. */

/* ---- the setup row: adults fill these in, so they are the quietest thing ---- */
.shelf-quiet .chip-nav { border-color: transparent; min-height: 84px; padding: 8px 4px; }
.shelf-quiet .chip-ico svg { width: 26px; height: 26px; stroke: var(--ink-faint); stroke-width: 2; }
.shelf-quiet .chip-t { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.shelf-quiet .chip-s { font-size: 11px; }
/* the setup row carries colour too, a shade quieter than the shelf above it */
.shelf-quiet > .chip-nav:nth-child(1) .chip-ico svg { stroke: #6E4157; }
.shelf-quiet > .chip-nav:nth-child(2) .chip-ico svg { stroke: var(--green); }
.shelf-quiet > .chip-nav:nth-child(3) .chip-ico svg { stroke: var(--amber); }
.rule { margin: 6px 0 6px; }

.credit {
  font-size: 10.5px; color: #B6A897; text-align: center;
  padding: 18px 0 6px; letter-spacing: 0.02em;
}

/* the host app floats its own controls over the top of the page */
header { padding-top: calc(26px + env(safe-area-inset-top, 0px)); }

/* ---- the lede with nothing settled yet ----
   A headline and a text link left 300px of turmeric doing nothing. With no
   menu to show, the block closes up and the one thing worth doing becomes a
   button you could not miss. */
.lede.no-menu .lede-panel { padding-bottom: 22px; }
.lede.no-menu .lede-kicker { margin-bottom: 20px; }
.lede.no-menu .lede-go {
  display: block; width: 100%; text-align: center;
  background: #FDF6E7; color: #7A5006;
  border: none; border-radius: 12px;
  padding: 15px 18px; font-size: 18px; font-weight: 700; margin-top: 0;
}

/* ==========================================================================
   THE FOOD CARRIES THE COLOUR
   The two hands used to be a photograph under an 80–94% colour wash, which
   is a flat rectangle that happens to cost 36KB. The objects now sit ON the
   colour instead of under it, and the lede's photograph runs at full strength
   with the type on paper beneath it. Nothing here is a brand colour standing
   in for food.
   ========================================================================== */

/* ---- the lede: photograph first, type on paper ---- */
.lede {
  background: var(--card); color: var(--ink);
  box-shadow: 0 14px 34px -20px rgba(60, 38, 0, 0.55);
}
/* the hero is a wide banner, so it runs as a band rather than a crop of
 * itself: a taller original would let this grow. */
.lede-photo { height: 176px; }
/* only enough shade at the very top for the masthead to breathe */
.lede-photo::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 40%);
}
.lede-grain { display: none; }
.lede-panel { padding: 16px 20px 18px; }
.lede-kicker { color: var(--amber); opacity: 1; font-weight: 700; }
.lede-q { color: var(--ink); }
.lede-line { border-top: 1px solid var(--line); }
.lede-slot { color: var(--ink-faint); opacity: 1; }
.lede-dish { color: var(--ink); }
.lede-cook { color: var(--ink-soft); opacity: 1; }
.lede-cook.warn { color: var(--accent); font-weight: 700; }
.lede-go { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- the two hands: flat colour, with the food standing on it ---- */
.act { position: relative; overflow: hidden; min-height: 200px; }
.act-ask  { background: #A8452A; }
.act-cook { background: #1F5B41; }
.act .act-bg { display: none; }          /* the washed photograph it replaces */
/* The object sits on a white disc rather than straight on the colour. The
 * artwork carries its own soft shadow, and a shadow cut out of white and
 * dropped onto terracotta reads as a smudge; on white it reads as a shadow.
 * It also gives the food a plate to stand on. */
/* `.act > *:not(.act-bg)` forces position:relative on every child, so this
 * selector has to match its weight to win. */
.act > .act-obj {
  position: absolute; right: 12px; top: 12px;
  width: 98px; height: 98px; object-fit: contain;
  background: #FFFFFF; border-radius: 50%; padding: 7px;
  box-sizing: border-box; pointer-events: none;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.45);
}
.act-t, .act-s { position: relative; }
.act-s { max-width: 92%; }

/* ---- the shelf and the setup row ---- */
.chip-obj {
  width: 54px; height: 54px; object-fit: contain; display: block;
}
.shelf-quiet .chip-obj { width: 46px; height: 46px; }

/* How long a meal takes, beside the dishes it is made of. Quiet: it answers a
 * question somebody has while reading, and is not the reason they looked. */
.meal-time {
  flex: none; margin-left: auto; padding-left: 12px;
  font-size: 11.5px; color: var(--ink-faint); white-space: nowrap;
}
.lede-line .meal-time { color: var(--ink-faint); }
