:root {
  --ink: #19332a;
  --forest: #204c3c;
  --sage: #adc4a0;
  --lime: #dbe790;
  --rose: #c64f72;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --line: rgba(25, 51, 42, .22);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #e5ecdc; font: 15px/1.55 var(--sans); }
a { color: inherit; }
button, input, textarea { font: inherit; }
.resource-shell { width: min(1080px, calc(100% - 2rem)); margin: 2rem auto; background: var(--paper); box-shadow: 14px 16px 0 rgba(25,51,42,.1); }
.resource-header { padding: 3rem clamp(1.5rem, 6vw, 5rem); color: white; background: var(--forest); }
.resource-header nav { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 3rem; font-size: .75rem; font-weight: 700; }
.resource-header nav a { text-decoration: none; }
.resource-header .kicker { color: var(--lime); text-transform: uppercase; font-size: .68rem; font-weight: 700; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 1rem; font: 500 clamp(3.2rem, 8vw, 6.7rem)/.88 var(--serif); }
h1 em, h2 em { color: var(--lime); font-weight: 400; }
.resource-header .intro { max-width: 700px; margin: 0; font: 400 1.25rem/1.5 var(--serif); }
.resource-main { padding: clamp(2rem, 6vw, 5rem); }
.notice { margin-bottom: 3rem; padding: 1rem 1.25rem; border-left: 3px solid var(--rose); background: var(--cream); font-size: .82rem; }
.action-bar { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.action-bar button, .action-bar a { min-height: 44px; display: inline-flex; align-items: center; padding: .65rem 1rem; border: 1px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 700; }
.action-bar .primary { border-color: var(--forest); background: var(--forest); color: white; }
.section-title { margin: 4rem 0 1.5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--ink); font: 500 clamp(2rem, 4vw, 3.5rem)/1 var(--serif); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.panel { padding: 1.4rem; border: 1px solid var(--line); background: white; break-inside: avoid; }
.panel h2, .panel h3 { font: 500 1.65rem/1.05 var(--serif); }
.panel .number { display: block; margin-bottom: 2rem; color: var(--rose); font-size: .68rem; font-weight: 700; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { border-bottom: 1px solid var(--line); }
.check-list label { display: grid; grid-template-columns: 22px 1fr; gap: .7rem; padding: .65rem 0; cursor: pointer; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--forest); }
.write-line { width: 100%; min-height: 38px; padding: .4rem 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; }
textarea.write-line { min-height: 90px; resize: vertical; }
.rating { display: flex; gap: .45rem; flex-wrap: wrap; }
.rating label { position: relative; }
.rating input { position: absolute; opacity: 0; }
.rating span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); cursor: pointer; }
.rating input:checked + span { background: var(--lime); border-color: var(--forest); font-weight: 700; }
.week-table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.week-table th, .week-table td { padding: .65rem .45rem; border: 1px solid var(--line); text-align: center; }
.week-table th:first-child, .week-table td:first-child { text-align: left; font-weight: 700; }
.week-table input { width: 100%; min-width: 40px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: center; }
.resource-footer { padding: 2rem clamp(1.5rem, 6vw, 5rem); background: var(--cream); font-size: .72rem; }
.resource-footer strong { font-family: var(--serif); font-size: 1rem; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.recipe { padding: 1.6rem; border: 1px solid var(--line); background: white; break-inside: avoid; }
.recipe:last-child:nth-child(odd) { grid-column: 1 / -1; }
.recipe .tag { display: inline-block; margin-bottom: 1rem; color: var(--rose); text-transform: uppercase; font-size: .64rem; font-weight: 700; letter-spacing: .12em; }
.recipe h2 { margin-bottom: .6rem; font: 500 clamp(2rem, 4vw, 3.2rem)/1 var(--serif); }
.recipe h3 { margin: 1.5rem 0 .5rem; font: 600 1rem var(--sans); }
.recipe ul, .recipe ol { padding-left: 1.2rem; }
.recipe li { margin-bottom: .35rem; }
.recipe-note { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; }
.plate { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.plate > div { padding: 1.4rem; border: 1px solid var(--line); }
.plate .vegetables { grid-row: span 2; background: #e5ecdc; }
.plate strong { display: block; margin-bottom: .5rem; font: 500 1.5rem var(--serif); }
.meal-day { margin-bottom: 1rem; border: 1px solid var(--line); break-inside: avoid; }
.meal-day h2 { margin: 0; padding: 1rem 1.2rem; background: var(--forest); color: white; font: 500 1.7rem var(--serif); }
.meal-slots { display: grid; grid-template-columns: repeat(4, 1fr); }
.meal-slots > div { min-height: 150px; padding: 1rem; border-right: 1px solid var(--line); }
.meal-slots > div:last-child { border: 0; }
.meal-slots strong { display: block; margin-bottom: .5rem; color: var(--rose); text-transform: uppercase; font-size: .62rem; letter-spacing: .1em; }
.meal-slots p { margin: 0; font-size: .86rem; }
.source-note { font-size: .72rem; }
.source-note a { color: #464feb; text-decoration: none; }
.resource-dialog { width: min(1040px, calc(100% - 2rem)); max-height: 92vh; padding: 0; border: 0; color: var(--ink); background: var(--paper); overflow-y: auto; }
.resource-dialog::backdrop { background: rgba(19,42,34,.82); backdrop-filter: blur(5px); }
.prep-guide { padding: clamp(1.5rem, 5vw, 4rem); }
.prep-header { display: flex; align-items: start; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--ink); }
.prep-header > div { min-width: 0; }
.prep-header .kicker { margin-bottom: .6rem; color: var(--rose); text-transform: uppercase; font-size: .65rem; font-weight: 700; letter-spacing: .14em; }
.prep-header h2 { margin: 0; font: 500 clamp(2.7rem, 6vw, 5.6rem)/.9 var(--serif); }
.prep-header h2 em { color: var(--rose); }
.dialog-close { flex: 0 0 44px; width: 44px; height: 44px; border: 0; background: var(--cream); cursor: pointer; font-size: 1.7rem; }
.prep-lead { max-width: 760px; margin: 2rem 0; font: 400 1.3rem/1.5 var(--serif); }
.prep-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.prep-actions { display: flex; gap: 1rem; margin-top: 1rem; }
.prep-actions button { min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-weight: 700; }
.prep-actions .primary { border-color: var(--forest); background: var(--forest); color: white; }
.cabinet-book { display: grid; grid-template-columns: minmax(220px, .3fr) 1fr; min-height: 660px; border: 1px solid var(--ink); background: white; box-shadow: 12px 14px 0 rgba(25,51,42,.1); }
.cabinet-toc { border-right: 1px solid var(--ink); background: var(--cream); }
.cabinet-toc button { width: 100%; display: grid; grid-template-columns: 32px 1fr; gap: .6rem; padding: 1rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.cabinet-toc button:hover, .cabinet-toc button[aria-current="page"] { background: var(--lime); }
.cabinet-toc span { color: var(--rose); font-size: .65rem; font-weight: 700; }
.cabinet-toc strong { font: 500 .95rem/1.2 var(--serif); }
.cabinet-pages { min-width: 0; }
.cabinet-page { padding: clamp(1.6rem, 4vw, 3.6rem); }
.cabinet-page .page-kicker { color: var(--rose); text-transform: uppercase; font-size: .65rem; font-weight: 700; letter-spacing: .13em; }
.cabinet-page > h2 { margin-bottom: 2rem; font: 500 clamp(2.6rem, 5vw, 5rem)/.92 var(--serif); }
.cabinet-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.cabinet-controls p { margin: 0; font-size: .72rem; font-weight: 700; text-align: center; }
.cabinet-controls button { min-height: 44px; padding: .6rem 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-weight: 700; }
.cabinet-controls button:last-child { justify-self: end; }
.cabinet-controls button:disabled { opacity: .35; cursor: default; }

@media (max-width: 700px) {
  .resource-shell { width: 100%; margin: 0; box-shadow: none; }
  .resource-header { padding-top: 2rem; }
  .resource-header nav { margin-bottom: 2rem; }
  .grid-2, .grid-3, .recipe-grid, .plate { grid-template-columns: 1fr; }
  .recipe:last-child:nth-child(odd) { grid-column: auto; }
  .plate .vegetables { grid-row: auto; }
  .meal-slots { grid-template-columns: 1fr; }
  .meal-slots > div { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .week-scroll { overflow-x: auto; }
  .week-table { min-width: 720px; }
  .resource-dialog { inset: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; }
  .prep-header { display: block; position: relative; padding-right: 52px; }
  .prep-header h2 { overflow-wrap: anywhere; font-size: clamp(2.4rem, 12vw, 4.5rem); }
  .prep-header .dialog-close { position: absolute; top: 0; right: 0; }
  .prep-actions { align-items: stretch; flex-direction: column; }
  .cabinet-book { grid-template-columns: 1fr; min-height: 0; box-shadow: 7px 8px 0 rgba(25,51,42,.1); }
  .cabinet-toc { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ink); scroll-snap-type: x mandatory; scrollbar-width: none; }
  .cabinet-toc::-webkit-scrollbar { display: none; }
  .cabinet-toc button { min-width: 190px; scroll-snap-align: start; }
  .cabinet-page { padding: 1.5rem; }
  .cabinet-controls { grid-template-columns: 1fr 1fr; }
  .cabinet-controls p { grid-column: 1 / -1; grid-row: 1; }
}

@media print {
  @page { size: letter; margin: .45in; }
  body { background: white; font-size: 10pt; }
  .resource-shell { width: auto; margin: 0; box-shadow: none; }
  .resource-header { padding: .4in; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .resource-header nav, .action-bar { display: none; }
  .resource-main { padding: .35in 0; }
  .resource-footer { padding: .2in 0; }
  .section-title { margin-top: .35in; }
  .panel { page-break-inside: avoid; }
  input, textarea { color: black; }
  body.printing-region > .resource-shell { display: none; }
  body.printing-region .resource-dialog { position: static; width: auto; max-height: none; display: block; overflow: visible; }
  body.printing-region .prep-guide { padding: 0; }
  body.printing-region .dialog-close, body.printing-region .prep-actions { display: none; }
  body.printing-region .prep-header { padding-bottom: .2in; }
  body.printing-region .prep-lead { margin: .2in 0; }
  .cabinet-book { display: block; min-height: 0; border: 0; box-shadow: none; }
  .cabinet-toc, .cabinet-controls { display: none; }
  .cabinet-page, .cabinet-page[hidden] { display: block !important; padding: .2in 0; break-before: page; }
  .cabinet-page:first-child { break-before: auto; }
}