/* PrepSheet — static stylesheet. No build step, no external fonts. */

/* A class that sets display (.btn is inline-flex) beats the browser’s own rule
   for the hidden attribute, which is how a "Cancel" button stayed on screen when
   nothing was being edited. Everything the planner shows and hides uses .hidden,
   so make the attribute win everywhere. */
[hidden] { display: none !important; }

:root {
  --ink: #16211f;
  --ink-soft: #46524f;
  --ink-faint: #6d7a76;
  --green: #0a6150;
  --green-dark: #074a3d;
  --green-soft: #5d8c80;
  --pale: #eaf3ef;
  --cream: #fbf8f2;
  --paper: #ffffff;
  --line: #e2e0d8;
  --line-soft: #efede6;
  --amber: #c8841f;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 33, 31, .05), 0 2px 8px rgba(22, 33, 31, .04);
  --shadow: 0 2px 6px rgba(22, 33, 31, .06), 0 14px 40px rgba(22, 33, 31, .09);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1em; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
img, svg { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 248, 242, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 24px; height: 24px; flex: 0 0 24px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500; }
.nav a:hover { color: var(--green); }
@media (max-width: 760px) {
  .nav .hide-sm { display: none; }
  .site-head .wrap { gap: 12px; }
}
/* Phones: the header must stay one 64px line. Without nowrap, "Free planner"
   and the pill both broke onto two lines and spilled past the header border. */
@media (max-width: 560px) {
  .site-head .wrap { padding: 0 16px; gap: 10px; }
  .site-head .nav { gap: 14px; }
  .site-head .nav a { white-space: nowrap; font-size: .9rem; }
  .site-head .btn.small { padding: 8px 15px; font-size: .9rem; }
  .brand { font-size: 1.05rem; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn.primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--green-soft); color: var(--green-dark); }
.btn.small { padding: 9px 18px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-note { font-size: .85rem; color: var(--ink-faint); margin: 10px 0 0; }

/* ------------------------------------------------------------------ hero */

.hero { padding: 68px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green-soft); margin-bottom: 18px;
}
.hero h1 { margin-bottom: .45em; }
.hero .lede { font-size: 1.16rem; color: var(--ink-soft); max-width: 34em; }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.paper-stack { position: relative; }
.paper-stack .sheet { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow); background: #fff; }
.paper-stack .sheet.back {
  position: absolute; inset: 0; transform: rotate(-3.2deg) translate(-16px, 10px); z-index: 0; opacity: .85;
}
.paper-stack .sheet.front { position: relative; z-index: 1; }
@media (max-width: 860px) {
  .hero { padding: 44px 0 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  /* NOT margin: 0 auto — an auto inline margin stops a grid item stretching, so
     the stack sized itself to its content, and its content (an SVG with only a
     viewBox) sizes itself to its container: the whole illustration collapsed to
     0x0 on every phone. justify-self centres it without breaking the sizing. */
  .paper-stack { max-width: 380px; width: 100%; justify-self: center; padding: 0 18px; }
  /* the tilted back sheet must stay inside the phone: absolute positioning
     ignores the padding above, so shrink and straighten it a little. */
  .paper-stack .sheet.back { transform: rotate(-2.2deg) translate(-6px, 8px) scale(.94); }
}

/* --------------------------------------------------------------- section */

section { padding: 56px 0; }
section.tight { padding: 40px 0; }
.band { background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.band.pale { background: var(--pale); border-color: #d8e7e0; }
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head p { color: var(--ink-soft); margin: 0; }
.sec-head h2 { margin-bottom: .35em; }

.grid { display: grid; gap: 20px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.card .tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-soft); display: block; margin-bottom: 10px; }

/* Steps — the label-beside-text rows on the home and free pages.
   SCOPED TO .steps ON PURPOSE: the Week Builder also calls its sections
   .step, and when these rules were unscoped they turned that whole page into
   a 112px/1fr two-column grid — the twenty dinner cards ended up stacked in
   one narrow column with the "add your own" box beside them. */
.steps { counter-reset: step; display: grid; gap: 4px; }
.steps .step { display: grid; grid-template-columns: 112px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.steps .step:first-child { border-top: 0; }
.steps .step .chip {
  align-self: start; background: var(--pale); color: var(--green-dark);
  font-size: .8rem; font-weight: 700; padding: 5px 0; border-radius: 999px; text-align: center;
}
.step h3 { margin-bottom: .25em; }
.steps .step p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
@media (max-width: 620px) {
  .steps .step { grid-template-columns: 1fr; gap: 8px; }
  .steps .step .chip { justify-self: start; padding: 4px 14px; }
}

/* contents list */
.contents { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 32px; }
.contents li { list-style: none; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.contents ul { margin: 0; padding: 0; }
.contents .ck { color: var(--green); font-weight: 700; }
.contents b { display: block; font-size: .98rem; }
.contents span { color: var(--ink-faint); font-size: .89rem; }
@media (max-width: 760px) { .contents { grid-template-columns: 1fr; } }

/* rotations */
.rot { background: var(--paper); border: 1px solid var(--line-soft); border-left: 3px solid var(--green); border-radius: 10px; padding: 20px 22px; }
.rot h3 { margin-bottom: .2em; }
.rot .blurb { color: var(--ink-soft); font-size: .93rem; margin: 0 0 12px; }
.rot ol { margin: 0; padding-left: 1.15em; color: var(--ink-soft); font-size: .9rem; }
.rot ol li { padding: 2px 0; }

/* price */
.price-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 34px; display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start;
}
.price-card .amount { font-family: var(--serif); font-size: 3.1rem; line-height: 1; color: var(--ink); }
.price-card .amount sup { font-size: 1.3rem; top: -1.1em; position: relative; margin-right: 2px; }
.price-card .once { color: var(--ink-faint); font-size: .9rem; margin: 8px 0 20px; }
.price-card ul { margin: 0 0 22px; padding: 0; }
.price-card li { list-style: none; padding: 7px 0 7px 26px; position: relative; font-size: .96rem; color: var(--ink-soft); }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.price-side { background: var(--pale); border-radius: 12px; padding: 22px; }
.price-side p { font-size: .88rem; color: var(--ink-soft); margin: 0 0 10px; }
.price-side p:last-child { margin: 0; }
.price-side b { color: var(--ink); }
@media (max-width: 820px) { .price-card { grid-template-columns: 1fr; gap: 26px; padding: 26px; } }

/* honesty / note blocks */
.note { background: #fdf6e8; border: 1px solid #f0e2c4; border-radius: var(--radius); padding: 24px 26px; }
.note h3 { margin-bottom: .4em; }
.note p { margin: 0 0 .8em; color: #5c5341; font-size: .96rem; }
.note p:last-child { margin: 0; }

/* faq */
details { border-bottom: 1px solid var(--line-soft); }
details summary {
  cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  /* the whole row is the tap target, never just the line of text (>=44px on a phone) */
  padding: 13px 0; min-height: 44px; box-sizing: border-box;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--green); font-size: 1.3rem; font-weight: 400; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 2px 0 16px; color: var(--ink-soft); font-size: .96rem; max-width: 62em; }

/* download rows */
.dl { display: grid; gap: 12px; }
.dl-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 20px;
}
.dl-row .meta { flex: 1 1 220px; }
.dl-row b { display: block; }
.dl-row span { color: var(--ink-faint); font-size: .87rem; }

/* footer */
.site-foot { background: var(--ink); color: #b9c4c0; padding: 44px 0 36px; font-size: .9rem; }
.site-foot a { color: #e6efeb; }
.site-foot .cols { display: flex; gap: 48px; flex-wrap: wrap; justify-content: space-between; }
.site-foot .brand { color: #fff; margin-bottom: 10px; }
.site-foot nav { display: grid; gap: 7px; }
.site-foot .fine { margin-top: 30px; padding-top: 18px; border-top: 1px solid #2b3835; color: #8a9793; font-size: .82rem; max-width: 60em; }

/* article */
.article { max-width: 700px; margin: 0 auto; padding: 48px 24px 64px; }
.article h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); }
.article .meta { color: var(--ink-faint); font-size: .88rem; margin-bottom: 32px; }
.article h2 { font-size: 1.45rem; margin-top: 1.8em; }
.article h3 { font-size: 1.1rem; margin-top: 1.5em; }
.article ul, .article ol { color: var(--ink-soft); padding-left: 1.3em; }
.article li { margin: .4em 0; }
.article blockquote { margin: 1.5em 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--green-soft); color: var(--ink-soft); font-style: italic; }
.article .cta-inline { background: var(--pale); border-radius: var(--radius); padding: 24px 26px; margin: 2em 0; }
.article .cta-inline h3 { margin-top: 0; }
.article .cta-inline p { font-size: .95rem; color: var(--ink-soft); }

.center { text-align: center; }
.mt0 { margin-top: 0; }
.lede { font-size: 1.12rem; color: var(--ink-soft); }

/* ======================================================= free week builder */

.tool-head { padding: 52px 0 10px; }
.tool-head h1 { margin-bottom: .3em; }
.tool-head .lede { margin: 0 auto; max-width: 36em; }
.tool { padding: 34px 0 10px; }

.step { margin: 0 0 40px; }
.step h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.step h2 .num {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff; font-family: var(--sans); font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.step-note { color: var(--ink-soft); font-size: .95rem; max-width: 48em; margin: 0 0 18px; }
.presets { margin-top: -6px; }
.presets a { font-weight: 600; }
.fine-note { font-size: .85rem; color: var(--ink-faint); margin: 10px 0 0; }

.tool-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 18px; }
.counter {
  font-weight: 700; font-size: .95rem; color: var(--green-dark);
  background: var(--pale); border-radius: 999px; padding: 7px 16px;
}
.counter.is-full { background: #fdf0e0; color: #8a5a10; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.chip {
  font: inherit; font-size: .85rem; cursor: pointer;
  background: var(--paper); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.chip:hover { border-color: var(--green-soft); color: var(--green-dark); }
.chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

.dinner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dcard {
  font: inherit; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 15px 16px 13px; box-shadow: var(--shadow-sm);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.dcard:hover { border-color: var(--green-soft); transform: translateY(-1px); }
.dcard.is-on { border-color: var(--green); background: #f4faf7; box-shadow: inset 0 0 0 1px var(--green); }
.dcard.is-dim { opacity: .5; }
.dcard-top { display: grid; grid-template-columns: 22px 1fr; gap: 9px; align-items: start; }
.dcard .tick {
  width: 20px; height: 20px; border-radius: 50%; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink-faint); font-size: .85rem; font-weight: 700;
}
.dcard.is-on .tick { background: var(--green); border-color: var(--green); color: #fff; }
.dcard .dname { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; line-height: 1.25; color: var(--ink); }
.dcard .dmeta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0 31px; }
.dcard .dmeta span { font-size: .76rem; padding: 2px 9px; border-radius: 999px; background: var(--pale); color: var(--green-dark); }
.dcard .dmeta .hands { background: #f4f1e8; color: #7a6a44; }
.dcard .dprep { margin: 9px 0 0 31px; font-size: .84rem; color: var(--ink-faint); line-height: 1.45; }

.own { margin-top: 22px; background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 18px 20px; }
.own label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.own h3 { font-family: var(--serif); font-size: 1.12rem; margin: 0 0 6px; }
.own .step-note { margin-top: 0; }
.own-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.own-lab { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.own-lab .fine { font-weight: 400; color: var(--ink-faint); }
.own-row input, .own-row textarea {
  font: inherit; width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink);
}
.own-row textarea { resize: vertical; line-height: 1.5; }
.own-row input:focus, .own-row textarea:focus { outline: 2px solid var(--green-soft); outline-offset: 1px; }
.own-row-btn { margin: 2px 0 12px; }
/* the "this step cooks food" tick: a checkbox, not a full-width text input */
.own-check { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 6px; }
.own-check input[type="checkbox"] {
  width: auto; flex: none; margin: 3px 0 0; padding: 0;
  border: 0; border-radius: 0; background: none; accent-color: var(--green-dark);
}
.own-check label { display: inline; font-weight: 400; font-size: .92rem; margin: 0; }
#aisle-mem { margin-top: 10px; }
@media print { #aisle-mem { display: none !important; } }
.own code, .note code {
  font-size: .86em; background: var(--pale); color: var(--green-dark);
  padding: 1px 6px; border-radius: 5px;
}

/* "Your dinners" — the family's own, typed in and kept in their browser */
.own-fix { margin-top: 10px; }
.own-fix .fix-head { font-size: .9rem; margin: 0 0 8px; }
.fix-list { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 14px; }
.fix-item { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .88rem; padding: 4px 0; border-bottom: 1px dotted var(--line, #ddd); }
.fix-item label { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 400; }
.fix-item select { font: inherit; font-size: .82rem; padding: 3px 4px; width: 150px; flex: none; }
.fix-guess label { font-weight: 600; color: var(--ink); }
.fix-guess select { outline: 2px solid var(--green-soft); }
/* "wk 1 / wk 2 / both" on the two-week grocery list: which week needs this line */
.wkb {
  display: inline-block; margin-left: 7px; padding: 0 5px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green-dark); background: var(--pale); border-radius: 4px; vertical-align: 2px;
}
@media print { .wkb { background: none; border: 1px solid #bbb; color: #333; } }
@media print { .own-fix { display: none !important; } }
.own-bank { margin-top: 26px; }
.own-bank h3 { font-family: var(--serif); font-size: 1.12rem; margin: 0 0 10px; }
.dcard.is-own {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start;
  padding: 13px 13px 11px 16px; cursor: default;
}
.dcard.is-own:hover { transform: none; }
.dcard-pick {
  font: inherit; text-align: left; color: inherit; cursor: pointer;
  background: none; border: 0; padding: 2px 0; width: 100%;
}
.dcard.is-own .dmeta .time { background: #f6efdf; color: #7a6a44; }
.dcard.is-own.is-editing { border-color: var(--green); box-shadow: 0 0 0 3px var(--pale); }
.own-ctl { display: flex; flex-direction: column; gap: 6px; }
.own-prepnote { color: var(--green-dark); }
.mini.ed:hover { border-color: var(--green-soft); color: var(--green-dark); }

/* A week that arrived in a link someone sent, and the link box itself */
.link-banner {
  margin: 0 0 22px; padding: 13px 16px; font-size: .95rem; line-height: 1.55;
  border: 1px solid var(--green-soft); border-left-width: 4px; border-radius: 10px;
  background: var(--cream); color: var(--ink);
}
.share-box {
  font: inherit; width: 100%; margin-top: 10px; padding: 11px 14px; line-height: 1.5;
  word-break: break-all; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink);
}
#share-note code {
  font-size: .95em; padding: 1px 5px; border-radius: 5px;
  background: var(--line-soft); color: var(--ink);
}
@media print { .link-banner, .share-box { display: none !important; } }

/* Copying the dinner bank out as text, and pasting it back in */
.bank-io { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.bank-io-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bank-io textarea {
  font: inherit; width: 100%; padding: 11px 14px; line-height: 1.5; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink);
}
.bank-io textarea:focus { outline: 2px solid var(--green-soft); outline-offset: 1px; }
.bank-io .own-row { margin-top: 14px; }

.linkish {
  font: inherit; background: none; border: 0; padding: 0;
  color: var(--green-dark); text-decoration: underline; cursor: pointer;
}

.chosen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.crow {
  display: grid; grid-template-columns: 104px 1fr auto; gap: 14px; align-items: center;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px;
}
.crow.is-blank { background: transparent; border-style: dashed; color: var(--ink-faint); }
.crow .cday { font-weight: 700; font-size: .9rem; color: var(--green-dark); }
.crow.is-blank .cday { color: var(--ink-faint); }
.crow .cmid b { display: block; font-size: .99rem; }
.crow .ctime { font-size: .82rem; color: var(--ink-faint); }
.cctl { display: flex; gap: 6px; }
.mini {
  font: inherit; cursor: pointer; width: 32px; height: 32px; line-height: 1;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-soft);
}
.mini:hover:not(:disabled) { border-color: var(--green-soft); color: var(--green-dark); }
.mini:disabled { opacity: .35; cursor: default; }
.mini.rm:hover { border-color: #d9a0a0; color: #a33; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------- the printable sheet */

.sheet-wrap { padding: 20px 0 56px; }
.sheet-wrap .sheet {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 36px 30px; box-shadow: var(--shadow); max-width: 860px; margin: 0 auto;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 20px; }
.sheet-head h2 { margin: 0; font-size: 1.6rem; }
.sheet-head .sheet-sub { margin: 4px 0 0; font-size: .86rem; color: var(--ink-faint); }
.sheet-brand { font-family: var(--serif); font-weight: 700; color: var(--green); white-space: nowrap; }
.sheet-head.second { margin-top: 34px; }

.plan-table { width: 100%; border-collapse: collapse; }
.plan-table th, .plan-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.plan-table thead th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-family: var(--sans); border-bottom: 1px solid var(--line); }
.plan-table tbody th.d { width: 110px; font-family: var(--sans); font-size: .92rem; color: var(--green-dark); }
.plan-table td.m { font-family: var(--serif); font-size: 1.04rem; }
.plan-table td.t { width: 92px; font-size: .86rem; color: var(--ink-faint); white-space: nowrap; }
.plan-table tr.open-night td.m { font-family: var(--sans); font-size: .9rem; color: var(--ink-faint); font-style: italic; }

.tonight { margin-top: 26px; }
.tonight h3, .prep-block h3, .gsec h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--sans); color: var(--green); margin: 0 0 10px; }
.nights { margin: 0; }
.nights dt { font-weight: 700; font-size: .9rem; margin-top: 10px; }
.nights dd { margin: 2px 0 0; font-size: .89rem; color: var(--ink-soft); line-height: 1.5; }

.prep-block { margin-top: 26px; background: var(--pale); border-radius: 10px; padding: 18px 20px; }
.prep-block .prep-rule { margin: 12px 0 0; font-size: .82rem; color: var(--green-dark); font-style: italic; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 5px 0; align-items: start; }
.checklist .box { width: 13px; height: 13px; margin-top: 4px; border: 1px solid var(--ink-faint); border-radius: 3px; display: inline-block; }
.checklist .txt { font-size: .93rem; line-height: 1.45; }
.checklist .txt b { font-weight: 600; }
.checklist .qty { color: var(--ink-soft); }
.checklist .forwhat { display: block; font-size: .76rem; color: var(--ink-faint); }
/* The food-safety note under a cooked prep step (set by planner-core's buildPrep). */
.checklist .prep-safe { display: block; margin-top: 2px; font-size: .78rem; line-height: 1.4;
  color: var(--green-dark); border-left: 2px solid var(--green); padding-left: 8px; }
/* The rice note sits under the day-count note and is deliberately a different
   colour: it is not our arithmetic, it is a country difference in official
   guidance, and a reader should see it is a separate point. */
.checklist .prep-rice { color: #8a5a10; border-left-color: var(--amber); }
.checklist .txt.rule { border-bottom: 1px solid var(--line); min-height: 1.3em; display: block; }
.blank-lines li { padding: 7px 0; }

.glist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 36px; }
.gsec { break-inside: avoid; page-break-inside: avoid; }
@media (max-width: 720px) {
  .glist { grid-template-columns: 1fr; }
  .sheet-wrap .sheet { padding: 22px 18px; }
  .crow { grid-template-columns: 1fr auto; }
  .crow .cday { grid-column: 1; }
}

.band-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 0; }
.page-break { height: 0; }

/* ------------------------------------------------------------------ print */

@media print {
  :root { --cream: #fff; }
  body { background: #fff; font-size: 11pt; }
  .no-print, .site-head, .site-foot, .tool, .tool-head, noscript { display: none !important; }
  main > section { padding: 0; }
  .sheet-wrap { padding: 0; }
  .sheet-wrap .sheet { border: 0; border-radius: 0; box-shadow: none; padding: 0; max-width: none; }
  .page-break { break-before: page; page-break-before: always; height: 0; }
  .sheet-head.second { margin-top: 0; padding-top: 0; }
  .prep-block { background: #fff; border: 1px solid #ccc; }
  .plan-table th, .plan-table td { padding: 7px 6px; }
  .nights dd { color: #333; }
  a[href]::after { content: ""; }
  @page { margin: 12mm; }

  /* The pages promise "the week on one sheet, the grocery list on the other",
     so the printed sheet has to actually fit two pages at Letter and A4. The
     screen version is roomy on purpose; print tightens every vertical gap
     rather than shrinking the text to something a kitchen cannot read.
     check-site has a page-count check that fails if this stops being true. */
  body { font-size: 9.6pt; }
  .sheet-head { padding-bottom: 7px; margin-bottom: 10px; }
  .sheet-head h2 { font-size: 1.32rem; }
  .sheet-head .sheet-sub { font-size: .8rem; }
  .sheet-head.second { margin-top: 0; }
  .plan-table th, .plan-table td { padding: 3px 6px; }
  .plan-table td.m { font-size: .98rem; }
  .tonight { margin-top: 11px; }
  .tonight h3, .prep-block h3, .gsec h3 { margin-bottom: 6px; }
  .nights dt { margin-top: 6px; font-size: .86rem; }
  .nights dd { font-size: .85rem; line-height: 1.34; }
  .prep-block { margin-top: 9px; padding: 8px 14px; }
  .prep-block .prep-rule { margin-top: 6px; font-size: .76rem; }
  .checklist li { padding: 2px 0; }
  .checklist .txt { font-size: .88rem; line-height: 1.32; }
  .checklist .prep-safe { font-size: .74rem; line-height: 1.24; margin-top: 1px; }
  .blank-lines li { padding: 4px 0; }
  /* On screen the list is a 2x4 grid, which leaves a tall gap next to the long
     pantry column. In print it becomes two balanced text columns instead, so
     the whole list packs onto one page without shrinking anything. */
  .glist { display: block; columns: 2; column-gap: 30px; }
  /* Sections may flow across the column break so the two columns balance
     evenly (a whole-section break-inside:avoid left one column 90% full and
     pushed the footer onto a third page). A heading never ends a column, and
     an item never splits. */
  .gsec { margin-bottom: 9px; break-inside: auto; page-break-inside: auto; }
  .gsec h3 { break-after: avoid; page-break-after: avoid; }
  .checklist li { break-inside: avoid; page-break-inside: avoid; }
  .sheet-foot { margin-top: 11px; padding-top: 8px; font-size: .68rem; line-height: 1.35; }
}

.sheet-foot { margin: 26px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--ink-faint); }
.dcard .dmeta .time { font-weight: 600; }

.rot-list .card ul { list-style: none; margin: 0; padding: 0; }
.rot-list .card li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }
.rot-list .card li:last-child { border-bottom: 0; }
.rot-list .card li span { display: block; font-size: .78rem; color: var(--ink-faint); }

.sheet-foot .url { white-space: nowrap; font-size: .95em; color: var(--green-dark); }
@media (max-width: 620px) { .sheet-foot .url { white-space: normal; word-break: break-all; } }

/* ------------------------------------------- free finished weeks (weeks/) */

.wk-list { list-style: none; margin: 0 0 1.4em; padding: 0; }
.wk-list li { position: relative; padding: 10px 0 10px 20px; border-bottom: 1px solid var(--line-soft); font-size: .98rem; }
.wk-list li:last-child { border-bottom: 0; }
.wk-list li::before { content: "\2014"; position: absolute; left: 0; top: 10px; color: var(--green-soft); }
.wk-card ul { list-style: none; margin: 0 0 14px; padding: 0; }
.wk-card li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: .94rem; }
.wk-card li:last-child { border-bottom: 0; }
.wk-card li .when { display: block; font-size: .78rem; color: var(--ink-faint); }
.wk-card h3 { margin-bottom: .5em; }
.wk-card h3 a { text-decoration: none; }

/* notes/: engineering write-ups with code samples */
.article pre { background: #f4f1ea; border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: .82rem; line-height: 1.5; max-width: 100%; }
.article code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.article p code, .article li code { background: #f4f1ea; padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }

/* ------------------------------------------------- simple article tables */
.article table.simple { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; }
.article table.simple th, .article table.simple td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.article table.simple thead th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--line); }
