/* Fonts bundled in static/fonts (SIL Open Font License): Playfair Display
   for every title (Nichole, 2026-11-04) and Libre Baskerville for the
   recipe-card look. */
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/PlayfairDisplay-400.woff2) format('woff2')}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/PlayfairDisplay-600.woff2) format('woff2')}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/PlayfairDisplay-700.woff2) format('woff2')}
@font-face{font-family:'Libre Baskerville';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/LibreBaskerville-Regular.ttf) format('truetype')}
@font-face{font-family:'Libre Baskerville';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/LibreBaskerville-Bold.ttf) format('truetype')}
/* Wild Grove colours (Nichole, 2026-11-04): the blue #647dab replaces every
   green, and the cream #fffbf5 replaces every tan — the same two colours as
   the recipe-card artwork. */
:root{
  --forest:#647dab; --forest-dark:#647dab; --forest-deep:#52699a;
  --sage:#a3b3d1; --sage-light:#e9eef7;
  --cream:#fffbf5; --ink:#2b2b2b; --muted:#6d6d70;
  --gold:#c98a3b; --line:#e6e1d8; --white:#ffffff; --danger:#a8412f; --ok:#647dab;
  --title-font:'Playfair Display',Georgia,'Times New Roman',serif;
}
*{box-sizing:border-box}
body{margin:0;font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif;
  background:var(--cream);color:var(--ink);line-height:1.5}
a{color:var(--forest)}
header.topbar{background:var(--forest);color:#fff;padding:14px 26px;display:flex;
  align-items:center;justify-content:space-between;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.brand{display:flex;align-items:center;gap:12px;font-weight:600;letter-spacing:.3px}
.brand .logo{width:34px;height:34px;border-radius:50%;background:var(--sage-light);
  display:flex;align-items:center;justify-content:center;color:var(--forest);font-weight:800}
.brand .sub{font-size:12px;font-weight:400;opacity:.85;display:block}
nav.topnav a{color:#eef2f9;text-decoration:none;margin-left:18px;font-size:14px}
nav.topnav a:hover{color:#fff;text-decoration:underline}
.tag{font-size:11px;background:var(--gold);color:#fff;padding:2px 8px;border-radius:10px;margin-left:8px}
.tag.off{background:#8e8e92}
main{max-width:1080px;margin:28px auto;padding:0 22px}
h1{font-family:var(--title-font);font-weight:700;color:var(--forest-dark);margin:.2em 0}
h2{font-family:var(--title-font);font-weight:600;color:var(--forest-dark);border-bottom:2px solid var(--line);padding-bottom:6px;margin-top:34px}
.lead{color:var(--muted);margin-top:0}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;margin:18px 0;
  box-shadow:0 1px 3px rgba(0,0,0,.04)}
label{font-size:13px;color:var(--muted);display:block;margin-bottom:4px}
input[type=text],input[type=number],input[type=password],input[type=email],select,textarea{width:100%;padding:9px 10px;border:1px solid var(--line);
  border-radius:8px;font-size:14px;background:#fff;font-family:inherit}
textarea{resize:vertical}
.row{display:flex;gap:18px;flex-wrap:wrap}
.row>div{flex:1;min-width:180px}
.btn{display:inline-block;background:var(--forest);color:#fff;border:none;padding:11px 20px;border-radius:8px;
  font-size:14px;cursor:pointer;text-decoration:none;font-weight:600}
.btn:hover{background:var(--forest-deep)}
.btn.secondary{background:#fff;color:var(--forest);border:1px solid var(--sage)}
.btn.secondary:hover{background:var(--sage-light)}
.btn.ghost{background:transparent;color:var(--muted);border:1px solid var(--line)}
.btn.small{padding:6px 12px;font-size:13px}
.flash{padding:11px 16px;border-radius:8px;margin:10px 0;font-size:14px}
.flash.ok{background:var(--sage-light);color:var(--forest-dark);border:1px solid var(--sage)}
.flash.error{background:#f7e3df;color:var(--danger);border:1px solid #e2b3a9}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{border:1px solid var(--line);padding:7px 9px;text-align:left;vertical-align:top}
th{background:var(--sage-light);color:var(--forest-dark);font-weight:600}
.grid-table td{padding:4px}
.grid-table select{font-size:12px;padding:5px}
.grid-table th.daycol{min-width:120px}
/* one grid cell = the meal subtype + how many people are eating it that day */
.cellpick{display:flex;gap:4px;align-items:stretch}
.cellpick select{flex:1 1 auto;min-width:0}
.servbox{width:42px;flex:0 0 42px;font-size:12px;padding:5px 4px;text-align:center;
  border:1px solid var(--line);border-radius:6px;background:#fff;-moz-appearance:textfield}
.servbox::-webkit-outer-spin-button,.servbox::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.servbox::placeholder{color:#bbb}
.servbox:focus{outline:2px solid var(--sage);outline-offset:-1px}
.rowhead{background:var(--sage-light);font-weight:600;color:var(--forest-dark);white-space:nowrap}
.muted{color:var(--muted);font-size:13px}
.pill{display:inline-block;font-size:11px;padding:2px 8px;border-radius:10px;background:var(--sage-light);
  color:var(--forest-dark);margin-left:6px}
.pill.assembly{background:#fffbf5;color:var(--gold)}
.pill.eatout{background:#eee;color:#777}
.pill.warn{background:#f7e3df;color:var(--danger)}
.slot{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:8px 0;background:#fff}
.slot .meal{font-weight:600;font-size:15px}
.slot .meta{font-size:12px;color:var(--muted);margin-top:2px}
.daygroup{margin-bottom:20px}
.daygroup h3{margin:18px 0 6px;color:var(--forest)}
.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:18px}
.footer{max-width:1080px;margin:30px auto;padding:18px 22px;color:var(--muted);font-size:12px;border-top:1px solid var(--line)}
details.editor summary{cursor:pointer;font-weight:600;color:var(--forest)}
.json{width:100%;min-height:200px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px}
.kpi{display:inline-block;background:var(--sage-light);border-radius:10px;padding:10px 16px;margin-right:12px}
.kpi b{font-size:20px;color:var(--forest-dark);display:block}
.login-wrap{max-width:420px;margin:8vh auto}

/* --- Meal ratings + favorites (Plan a Week: "How was last week?") --- */
.rate-table{border:none}
.rate-table td{border:none;border-bottom:1px solid var(--line);padding:8px 6px;vertical-align:middle}
.rate-table tr:last-child td{border-bottom:none}
.rate-cell{white-space:nowrap;text-align:right;width:1%}
/* rows retired into the "Already rated" drawer sit quietly until edited */
#rate-done tr.rate-row .meal{color:var(--muted);font-weight:400}
#rate-queue tr.rate-row{animation:rate-in .18s ease-out}
@keyframes rate-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
.stars{display:inline-flex;gap:2px;align-items:center}
button.star{background:none;border:none;cursor:pointer;font-size:19px;line-height:1;
  padding:2px 3px;color:#d6d6d9;transition:color .12s,transform .12s}
button.star:hover{transform:scale(1.15)}
button.star.on{color:var(--gold)}
button.star.clear{font-size:12px;color:var(--muted);margin-left:4px}
button.star.clear:hover{color:var(--danger)}
button.fav{background:none;border:none;cursor:pointer;font-size:19px;line-height:1;
  padding:2px 6px;color:#d6d6d9;transition:color .12s,transform .12s}
button.fav:hover{transform:scale(1.15)}
button.fav.on{color:var(--danger)}
.fav-chip{display:inline-flex;align-items:center;gap:2px;background:var(--sage-light);
  border:1px solid var(--sage);border-radius:14px;padding:3px 6px 3px 12px;margin:4px 6px 0 0;font-size:13px}
button.fav.chip{font-size:15px;padding:0 4px}

/* Notebook paper (Nichole, 2026-11-04): the Weekly Haul lists, the review
   page's shopping lists and the grocery page's By Aisle / By Meal lists.
   One item per ruled line, a red margin line, the ✕ (or ☐) in the margin.
   .haul-layout = lists left, meals right; stacks on narrow screens. */
.haul-layout{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:22px;align-items:start;margin-top:18px}
@media (max-width:820px){.haul-layout{grid-template-columns:1fr}}
.notebook{--rule:30px;--margin:44px;background:#fffbf5;border:1px solid #e6e1d8;border-radius:4px 12px 12px 4px;
  padding:18px 16px 16px 0;box-shadow:0 2px 6px rgba(0,0,0,.08);position:relative}
.notebook::before{content:"";position:absolute;top:0;bottom:0;left:calc(var(--margin) - 2px);width:2px;background:#e79a9a}
.nb-title{margin:6px 0 2px var(--margin);padding:0 0 0 12px;border:none;font-size:19px}
.nb-title + .nb-switch, .nb-title + .nb-hint{margin-top:2px}
.nb-count{font-size:12px;font-weight:400;color:var(--muted);margin-left:6px}
.nb-switch,.nb-hint{margin-left:calc(var(--margin) + 12px)}
.nb-switch{display:flex;gap:8px;align-items:center;font-weight:600;color:var(--ink);font-size:13px;margin-bottom:0}
.nb-switch input,.nb-low input{width:auto;margin:0}
.nb-hint{font-size:12px;color:var(--muted);margin-bottom:6px}
#staples{margin-top:22px}
.notebook,.nb-page{--rule:30px;--margin:44px}
ul.lined,textarea.lined{list-style:none;margin:0 0 4px;padding:0;border-top:1px solid #a9c8e6;
  background:linear-gradient(to right,transparent calc(var(--margin) - 2px),#e79a9a calc(var(--margin) - 2px),#e79a9a var(--margin),transparent var(--margin)),
    repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--rule) - 1px),#a9c8e6 calc(var(--rule) - 1px),#a9c8e6 var(--rule))}
textarea.lined{display:block;width:100%;border:none;border-radius:0;border-top:1px solid #a9c8e6;font-size:14px;
  line-height:var(--rule);padding:0 8px 0 calc(var(--margin) + 12px);background-attachment:local;resize:vertical;
  background-color:transparent;font-family:inherit;color:var(--ink)}
textarea.lined:focus{outline:none;background-color:rgba(169,200,230,.10)}
.nb-box{width:var(--margin);flex:0 0 var(--margin);text-align:center;color:#8e8e92;font-size:15px}
ul.lined li{display:flex;align-items:center;min-height:var(--rule);line-height:calc(var(--rule) - 1px);font-size:14px}
.nb-rm{width:var(--margin);flex:0 0 var(--margin);display:flex;justify-content:center;margin:0}
.nb-rm button{border:none;background:transparent;color:#b8735f;font-size:13px;line-height:1;width:22px;height:22px;
  border-radius:50%;cursor:pointer;padding:0}
.nb-rm button:hover{background:#f4dcd4;color:var(--danger)}
.nb-text{padding-left:12px;overflow-wrap:anywhere}
.nb-tog{flex:0 0 auto;margin:0 0 0 12px;display:flex}
.nb-tog button{width:34px;height:18px;border-radius:9px;border:none;padding:0;cursor:pointer;position:relative;
  background:#cfd1d6;transition:background .15s}
.nb-tog button span{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s}
li.on .nb-tog button{background:var(--forest)}
li.on .nb-tog button span{left:18px}
li.off .nb-text{color:#9b9b9f}
.nb-tog + .nb-text{padding-left:10px}
.nb-all{white-space:nowrap;margin-left:4px}
.nb-all form{display:inline;margin:0}
.nb-all button{border:none;background:none;padding:0;color:var(--forest);text-decoration:underline;cursor:pointer;font-size:12px}
.nb-low{display:flex;align-items:center;gap:0;margin:0 0 0 12px;font-size:14px;color:var(--ink);cursor:pointer}
.nb-low .nb-text{padding-left:8px}
.nb-add form{display:flex;align-items:center;width:100%;gap:6px;margin:0}
.nb-plus{width:var(--margin);flex:0 0 var(--margin);text-align:center;color:var(--muted)}
.nb-add input[type=text]{flex:1;border:none;background:transparent;padding:0 0 0 12px;height:calc(var(--rule) - 2px);border-radius:0;font-size:14px}
.nb-add input[type=text]:focus{outline:none;background:rgba(169,200,230,.18)}
.nb-add .btn.small{padding:2px 10px;font-size:12px}
.mhead{margin:0 0 6px;font-size:15px;color:var(--forest-dark)}
table.mealrows{width:100%;border-collapse:collapse}
table.mealrows td{padding:3px 0;border:none;vertical-align:middle}
table.mealrows td.mlabel{width:96px;font-size:13px;color:var(--muted);white-space:nowrap;padding-right:10px}
table.mealrows select{padding:6px 8px}

/* Grocery page notebooks (2026-11-04): By Aisle in two ruled columns (one
   column on a phone); By Meal = a heading line + a ruled textarea per meal. */
.notebook.nb-aisles,.notebook.nb-meals{padding:14px 16px 14px 0}
.nb-aisles::before,.nb-meals::before{display:none}
.nb-aisles{columns:2;column-gap:26px}
@media (max-width:820px){.nb-aisles{columns:1}}
.nb-sec{break-inside:avoid;margin-bottom:14px}
.nb-sechead,.nb-mealhead{padding-left:calc(var(--margin) + 12px);font-weight:700;color:var(--forest-dark);
  font-size:13px;letter-spacing:.3px;line-height:var(--rule)}
.nb-mealhead{font-size:14px;letter-spacing:0;line-height:1.4;padding-top:8px;padding-bottom:4px}
.nb-mealhead .pill{font-weight:400}
.nb-meal{margin-bottom:12px}

/* "This week's meals" on notebook paper too (2026-11-04): a wider margin
   holds each row's label (Option 1, Weekday 2, Wednesday); the drop-down sits
   on the ruled line with no box around it. */
.notebook.nb-plan{--margin:112px}
.nb-plan .nb-sechead{margin-top:10px}
.nb-label{width:var(--margin);flex:0 0 var(--margin);text-align:right;padding-right:10px;font-size:12px;
  color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nb-role{font-size:11px}
select.nb-select{flex:1;min-width:0;width:auto;border:none;border-radius:0;background-color:transparent;
  height:calc(var(--rule) - 2px);padding:0 6px 0 12px;font-size:14px;color:var(--ink);cursor:pointer}
select.nb-select:hover,select.nb-select:focus{outline:none;background-color:rgba(169,200,230,.18)}

/* Wild Grove logo in the top bar (Nichole, 2026-11-04). */
.brand .logo-img{height:58px;width:auto;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}
header.topbar{padding-top:10px;padding-bottom:10px}

/* Weekly Haul: "Review last week's meals" button under the meals list. */
.rate-last{margin-top:14px}
.rate-last #rate-last-panel .card{margin-top:12px}

/* "+ Add another …" line on the Weekly Haul meals list (2026-11-04): the
   button sits up front, in the label margin. */
.nb-plusbtn{border:1px solid var(--sage);background:#fff;color:var(--forest);border-radius:10px;
  font-size:11px;font-weight:600;padding:1px 8px;cursor:pointer;line-height:1.5}
.nb-plusbtn:hover{background:var(--sage-light)}
.nb-addlink{border:none;background:none;color:var(--forest);font-size:13px;padding:0 0 0 12px;cursor:pointer}
.nb-addlink:hover{text-decoration:underline}
ul.lined li[hidden],.nb-addrow[hidden]{display:none}

/* Weekly Haul: how many people each meal is for (2026-11-04). */
input.nb-num{flex:0 0 52px;width:52px;height:calc(var(--rule) - 6px);margin:0 0 0 6px;padding:0 4px;
  border:1px solid #cdd6e6;border-radius:6px;background:#fff;font-size:13px;text-align:center}
input.nb-num::placeholder{color:#a4a4a9}
.nb-for{flex:0 0 52px;text-align:right;font-size:12px;color:var(--muted);padding-right:4px}

/* Custom meal pages on notebook paper (2026-11-04). */
.nb-custom{max-width:860px}
input.nb-input{flex:1;min-width:0;width:auto;border:none;border-radius:0;background:transparent;
  height:calc(var(--rule) - 2px);padding:0 6px 0 12px;font-size:14px;color:var(--ink);font-family:inherit}
input.nb-input:focus,input.nb-ask:focus{outline:none;background:rgba(169,200,230,.18)}
input.nb-input.nb-short{flex:0 0 90px}
input.nb-ask{flex:0 0 var(--margin);width:var(--margin);min-width:0;border:none;border-radius:0;background:transparent;
  height:calc(var(--rule) - 2px);padding:0 10px 0 6px;font-size:12px;color:var(--muted);text-align:right}
.nb-custom.nb-plan{--margin:150px}
li.nb-status{min-height:22px;line-height:20px;font-size:12px}
.nb-rmbox{flex:0 0 26px;display:flex;align-items:center;justify-content:center;margin:0 0 0 4px;cursor:pointer}
.nb-rmbox input{display:none}
.nb-rmbox span{color:#b8735f;font-size:13px;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.nb-rmbox input:checked + span{background:var(--danger);color:#fff}
.nb-rmbox:hover span{background:#f4dcd4}
ul.lined.nb-addline{border-top:none}
.nb-act{border:none;background:none;color:var(--forest);font-size:12px;text-decoration:underline;padding:0 8px;cursor:pointer;white-space:nowrap}

/* Titles in Playfair Display (Nichole, 2026-11-04). */
h3,.nb-title,.nb-sechead,.nb-mealhead,.mhead,.brand .brand-name{font-family:var(--title-font)}
.brand .brand-name{font-size:21px;font-weight:600;letter-spacing:.2px}
.nb-count{font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif}
.navbadge{display:inline-block;min-width:18px;padding:0 5px;border-radius:9px;background:var(--gold);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;margin-left:2px}
.navbadge.big{font-family:"Segoe UI",-apple-system,Helvetica,Arial,sans-serif;font-size:13px;line-height:22px;min-width:22px;vertical-align:middle}
.sandbox-bar{background:#c98a3b;color:#fff;text-align:center;font-weight:700;font-size:13px;letter-spacing:.4px;padding:5px 10px}
/* By Meal / Recipe list looks editable (Nichole, 2026-11-04). */
.edit-chip{display:inline-block;margin-left:8px;padding:2px 10px;border-radius:12px;background:var(--sage-light);
  color:var(--forest);border:1px solid var(--sage);font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif;
  font-size:12px;font-weight:600;vertical-align:middle}
.nb-editbtn{margin-left:6px;border:1px solid var(--sage);background:#fff;color:var(--forest);border-radius:10px;
  padding:0 8px;font-size:11px;line-height:18px;font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif;
  font-weight:600;cursor:pointer;vertical-align:middle}
.nb-editbtn:hover{background:var(--forest);color:#fff;border-color:var(--forest)}
.nb-edited{background:var(--gold) !important;color:#fff !important;font-weight:600 !important}
textarea.nb-editable{cursor:text;transition:background-color .12s,box-shadow .12s;
  box-shadow:inset 3px 0 0 transparent}
textarea.nb-editable:hover{background-color:rgba(100,125,171,.06);box-shadow:inset 3px 0 0 var(--sage)}
textarea.nb-editable:focus{background-color:rgba(100,125,171,.09);box-shadow:inset 3px 0 0 var(--forest)}
textarea.nb-editable::placeholder{color:#a4a4a9;font-style:italic}
.nb-savebar.dirty{position:sticky;bottom:0;z-index:5;background:var(--cream);padding:12px 14px;margin:0 -14px;
  border-top:2px solid var(--gold);box-shadow:0 -4px 12px rgba(0,0,0,.08)}
.nb-savebar.dirty .nb-savehint{color:var(--gold);font-weight:600}
.nb-edited[hidden]{display:none}
.pill,.nb-mealhead a{font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif}
.nb-cardlink{flex:0 0 auto;font-size:11px;color:var(--muted);margin:0 8px;white-space:nowrap}
.nb-cardlink:hover{color:var(--forest)}
.nb-coursehead{margin-top:14px;font-size:15px}
/* Top bar: illustration, then the Wild Grove wordmark with "Meal Planning" under it. */
.brand-text{display:flex;flex-direction:column;align-items:center;line-height:1}
.brand .wordmark{height:34px;width:auto;display:block}
.brand .brand-text .brand-name{font-size:13px;font-weight:400;letter-spacing:2.2px;text-transform:uppercase;margin-top:3px;opacity:.95}
/* "My Account" drop-down in the top bar (2026-11-04). */
nav.topnav{display:flex;align-items:center}
details.acct{position:relative;margin-left:18px}
details.acct summary{list-style:none;cursor:pointer;color:#eef2f9;font-size:14px}
details.acct summary::-webkit-details-marker{display:none}
details.acct summary:hover,details.acct[open] summary{color:#fff;text-decoration:underline}
details.acct .caret{font-size:11px;margin-left:2px}
.acct-menu{position:absolute;right:0;top:calc(100% + 10px);min-width:190px;background:#fff;border:1px solid var(--line);
  border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.16);padding:6px 0;z-index:50}
nav.topnav .acct-menu a{display:block;margin:0;padding:9px 16px;color:var(--ink) !important;text-decoration:none;font-size:14px}
nav.topnav .acct-menu a:hover{background:var(--sage-light);color:var(--forest) !important;text-decoration:none}
.acct-who{padding:6px 16px 8px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line);margin-bottom:4px}
/* Collapsible explanations (2026-11-04) */
.explain[hidden]{display:none !important}
.explain-bar{margin-top:2px;margin-bottom:6px}
p.lead + .explain-bar, h1 + .explain-bar{margin-top:-4px}
.explain-toggle{border:none;background:none;padding:2px 0;color:var(--forest);font-size:13px;font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif;
  cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.explain-toggle:hover{text-decoration-style:solid}
.nb-hint .explain-toggle{font-size:12px}
.explain-bar + .explain{margin-top:0}
/* Next-page buttons at the top of each page (Nichole, 2026-11-04). */
.actions.actions-top{margin:4px 0 18px}

/* ---------------------------------------------------------------------------
   Phones and small tablets (Nichole, 2026-11-16). Everything below only applies
   to narrow screens, so the desktop layout is unchanged.
   --------------------------------------------------------------------------- */
.nav-toggle{display:none}
@media (max-width:820px){
  /* Top bar: logo + ☰ Menu; the links open as a list underneath. */
  header.topbar{padding:10px 14px;flex-wrap:wrap;gap:8px}
  .brand .logo-img{height:44px}
  .brand .wordmark{height:26px}
  .brand .brand-text .brand-name{font-size:10px;letter-spacing:1.6px}
  .nav-toggle{display:inline-flex;align-items:center;gap:6px;background:transparent;color:#fff;
    border:1px solid rgba(255,255,255,.55);border-radius:8px;padding:8px 12px;font-size:18px;line-height:1;cursor:pointer}
  .nav-toggle span{font-size:14px}
  nav.topnav{display:none;flex-basis:100%;border-top:1px solid rgba(255,255,255,.25);margin-top:4px;padding-top:4px}
  header.nav-open nav.topnav{display:block}
  nav.topnav a{display:block;margin:0;padding:11px 4px;font-size:16px;border-bottom:1px solid rgba(255,255,255,.12)}
  details.acct{margin:0}
  details.acct summary{padding:11px 4px;font-size:16px}
  .acct-menu{position:static;box-shadow:none;border:none;background:transparent;min-width:0;padding:0 0 6px 14px}
  .acct-who{color:#dfe6f2;border-bottom:none}
  nav.topnav .acct-menu a{color:#eef2f9 !important;padding:10px 4px;font-size:15px}
  nav.topnav .acct-menu a:hover{background:transparent;color:#fff !important}

  /* Page edges: less side padding, nothing wider than the screen. */
  main{margin:18px auto;padding:0 12px}
  .card{padding:16px}
  h1{font-size:1.75em;overflow-wrap:anywhere}
  .footer{padding:14px 12px}
  .haul-layout{grid-template-columns:minmax(0,1fr)}
  /* "This week's context" goes to the very bottom of the page on a phone
     (Nichole, 2026-11-16): the two columns open up into one list so the
     context card can be moved after everything else. */
  .haul-layout{display:flex;flex-direction:column;gap:0}
  .haul-layout>div{display:contents}
  .haul-layout .ctx-card{order:99;margin-top:18px}
  .haul-layout>div:last-child>:first-child{margin-top:18px}  /* space where the columns meet */
  img,video,canvas{max-width:100%}
  .row>div{min-width:min(180px,100%)}

  /* Wide tables (History, Admin…) scroll sideways inside their own box. */
  main table:not(.mealrows){display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

  /* Rows of buttons wrap instead of running off the edge. */
  .nb-mealrow{flex-wrap:wrap;row-gap:4px}
  .actions .btn,.actions-top .btn{flex:0 1 auto}

  /* Bigger tap targets. */
  .btn{padding:12px 18px}
  .btn.small{padding:9px 14px;font-size:14px}
  .explain-toggle{padding:8px 0;font-size:14px}
  .nb-rm button{width:32px;height:32px;font-size:15px}
  .nb-all button{padding:6px 2px;font-size:13px}
  input,select,textarea{font-size:16px}          /* stops iPhone zooming in on a field */

  /* Notebook pages: taller ruled lines on a phone so every control on a line
     is finger-sized; the lined-paper look stays the same. */
  .notebook,.nb-page{--rule:40px;--margin:34px}
  ul.lined li{font-size:15px}
  .nb-tog button{width:50px;height:30px;border-radius:15px}
  .nb-tog button span{width:26px;height:26px}
  li.on .nb-tog button span{left:22px}
  input.nb-num{height:calc(var(--rule) - 6px);flex-basis:58px;width:58px}
  .nb-plusbtn{min-width:32px;min-height:32px}
  .nb-addlink{padding:10px 0 10px 12px;font-size:14px}
  .nb-act{padding:10px 8px;font-size:14px}
  .nb-editbtn{padding:8px 10px;font-size:14px}
  a.nb-cardlink{display:inline-block;padding:6px 0}
  .nb-add .btn.small{padding:8px 14px;font-size:14px}
  .nb-mealhead a.muted{display:inline-block;padding:8px 0;font-size:14px}
  input[type=checkbox],input[type=radio]{width:20px;height:20px}
  .rcard-body input[type=number],.rcard-body input[type=text]{min-height:36px}
}
/* Menu card editor: 'Select several' for touch screens, which have no Shift key. */
.mc-multi{display:none}
@media (max-width:900px),(pointer:coarse){ .mc-multi{display:inline-block} }
.mc-multi[aria-pressed="true"]{background:var(--forest);color:#fff;border-color:var(--forest)}

/* Accounts, limits and planning for a customer (PRD L, 2026-11-16) */
.acting-bar{background:#fbeed9;border-bottom:1px solid #e7c98f;color:#5a4214;padding:8px 22px;display:flex;
  gap:10px;align-items:center;flex-wrap:wrap;font-size:14px}
.acting-bar .acting-switch select{width:auto;padding:4px 8px;font-size:14px}
.plans-left{font-size:13px;margin-left:6px}
.pwlink{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--sage-light);border:1px solid var(--sage);
  border-radius:8px;padding:10px 12px;margin:10px 0}
.pwlink input{flex:1;min-width:220px;font-size:13px}
.statgrid{display:flex;gap:14px;flex-wrap:wrap;margin:6px 0 12px}
.statgrid .stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 14px;min-width:120px}
.statgrid .stat b{display:block;font-size:22px;color:var(--forest-dark)}
.meter{height:8px;background:#eee;border-radius:4px;overflow:hidden;margin-top:6px}
.meter span{display:block;height:100%;background:var(--forest)}
.meter span.hot{background:#c0623f}
.tag.warn{background:#c0623f}

/* Grocery check-off (Nichole, 2026-11-16): tap any line on the list to tick
   it off. The whole line is the tap target; ticked lines go grey and are
   crossed out, and "Hide checked" tucks them away. */
.gl-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;position:sticky;top:0;z-index:6;
  background:var(--cream);padding:8px 0;margin:4px 0 6px;border-bottom:1px solid var(--line);font-size:13px}
.gl-count{font-weight:700;color:var(--forest-dark)}
.gl-hide{display:flex;align-items:center;gap:6px;margin:0;font-weight:400;cursor:pointer;color:var(--ink)}
.gl-hide input{width:auto;margin:0}
.gl-clear{border:none;background:none;padding:0;color:var(--forest);text-decoration:underline;cursor:pointer;font-size:13px}
.gl-status{color:var(--gold);font-weight:600}
.gl-status:empty{display:none}
li.gl-item{cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
li.gl-item:hover{background-color:rgba(169,200,230,.14)}
li.gl-item:focus{outline:none;background-color:rgba(169,200,230,.22)}
li.gl-item .nb-box{color:#8e8e92;font-size:17px}
li.gl-item.got .nb-box{color:var(--forest)}
li.gl-item.got .nb-text{color:#9b9b9f;text-decoration:line-through;text-decoration-color:#b9b9bd}
body.gl-hiding li.gl-item.got,body.gl-hiding .nb-sec.gl-allgot{display:none}
ul.gl-list{margin-bottom:0}
textarea.lined[hidden],ul.lined[hidden]{display:none}
@media (max-width:820px){
  .gl-bar{font-size:15px;padding:10px 0}
  .gl-clear{font-size:15px;padding:6px 2px}
  li.gl-item .nb-box{font-size:21px}
}

/* Custom meal pages on a phone (Nichole, 2026-11-16): the red margin line
   moves in to the left like the other notebook pages, and everything to the
   right of it starts at one straight edge — headings, the Name / Date /
   Adults / Kids labels, the dish drop-downs and the "Add another" links. The
   detail labels sit right of the line in their own column so the boxes after
   them line up too. */
@media (max-width:820px){
  .nb-custom.nb-plan{--margin:34px}
  .nb-custom li.nb-field{flex-wrap:wrap}
  .nb-custom li.nb-field .nb-label{flex:0 0 calc(var(--margin) + 118px);width:auto;text-align:left;
    padding:0 6px 0 calc(var(--margin) + 12px);font-size:14px;color:var(--muted);white-space:nowrap}
  .nb-custom li.nb-field .nb-input,.nb-custom li.nb-field .nb-select{padding-left:0}
  .nb-custom li.nb-field .nb-text{flex:1 1 100%;padding-left:calc(var(--margin) + 12px)}
  .nb-custom .nb-addrow .nb-label{visibility:hidden}
  .nb-custom .nb-addlink{padding-left:12px}
  .nb-custom .nb-select{padding-left:7px}
  /* Each dish gets the whole line for its name; recipe card, serves and the
     remove ✕ go on the line underneath. */
  .nb-custom li.nb-dish{flex-wrap:wrap}
  .nb-custom li.nb-dish .nb-select{flex:1 1 calc(100% - var(--margin))}
  .nb-custom li.nb-dish .nb-cardlink{margin-left:calc(var(--margin) + 12px);font-size:14px}
  .nb-custom li.nb-dish .nb-num{margin-left:auto;height:calc(var(--rule) - 8px)}
  .nb-custom .nb-hint{margin-right:12px}
}

/* "Your custom meals" as cards (Nichole, 2026-11-16). */
.cm-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;max-width:860px}
.cm-card{background:#fff;border:1px solid var(--line);border-left:4px solid var(--sage);border-radius:12px;padding:14px 16px}
.cm-title{font-family:var(--title-font);font-weight:700;font-size:18px;color:var(--forest-dark);line-height:1.25;overflow-wrap:anywhere}
.cm-meta{color:var(--muted);font-size:13px;margin:4px 0 12px}
.cm-btns{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cm-delform{display:inline;margin:0 0 0 auto}
.cm-del{border:none;background:none;color:var(--danger);font-size:13px;text-decoration:underline;padding:6px 4px;cursor:pointer}
@media (max-width:820px){.cm-list{grid-template-columns:1fr}.cm-meta{font-size:14px}.cm-del{font-size:14px;padding:10px 4px}}

/* ---------------------------------------------------------------------------
   Weekly Haul in three steps (Nichole, 2026-11-17): the step indicator, the
   Step 1 / Step 2 layouts, Step 3's folded sections and the top bar's
   "View This Week's Meals" button.
   --------------------------------------------------------------------------- */
.steps{list-style:none;display:flex;gap:8px;margin:4px 0 14px;padding:0}
.steps li{display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;padding:8px 12px;border-radius:10px;
  background:#fff;border:1px solid var(--line);color:var(--muted);font-size:13px;line-height:1.25}
.steps .step-n{flex:0 0 26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;
  justify-content:center;background:var(--sage-light);color:var(--forest-dark);font-weight:700}
.steps li.now{border-color:var(--forest);background:var(--sage-light);color:var(--forest-dark);font-weight:600}
.steps li.now .step-n{background:var(--forest);color:#fff}
.steps li.done .step-n{background:var(--sage);color:#fff}
.prefs-layout,.review-layout{grid-template-columns:minmax(0,6fr) minmax(0,5fr)}
.prefs-layout .ctx-card{margin-top:18px}
.actions.actions-bottom{margin:22px 0 6px}
.nb-reset{margin:12px 0 0;text-align:right}

.wk-top{margin:4px 0 8px}
.wk-note{margin:0 0 10px}
details.wk-sec{background:#fff;border:1px solid var(--line);border-radius:12px;margin:12px 0;
  box-shadow:0 1px 3px rgba(0,0,0,.04)}
details.wk-sec>summary{list-style:none;cursor:pointer;display:flex;align-items:baseline;flex-wrap:wrap;
  gap:4px 12px;padding:16px 18px}
details.wk-sec>summary::-webkit-details-marker{display:none}
details.wk-sec>summary::before{content:"▸";color:var(--forest);font-size:16px;display:inline-block;transition:transform .15s}
details.wk-sec[open]>summary::before{transform:rotate(90deg)}
details.wk-sec>summary:hover .wk-title{text-decoration:underline}
.wk-title{font-family:var(--title-font);font-size:20px;font-weight:600;color:var(--forest-dark)}
.wk-sub{color:var(--muted);font-size:13px}
.wk-body{padding:0 18px 18px}
.wk-body>.actions:first-child{margin-top:0}
.wk-body h2{margin-top:22px}

/* View my Week (Nichole, 2026-11-17): every recipe title stays on one line —
   in the Weekly Meal Plan, the Recipes list and the By Meal headings — and a
   name too long for the line ends in "…" (the full name shows on hover). */
.nb-view ul.lined li{align-items:center}
.nb-view .nb-text,.nb-mealname{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nb-view .nb-text{flex:1 1 auto;min-width:0;padding-right:8px}
.nb-view .nb-for,.nb-view .nb-act,.nb-view .pill{flex:0 0 auto;white-space:nowrap}
.nb-view .pill{line-height:1.5}
.nb-mealhead{display:flex;flex-wrap:wrap;align-items:center;column-gap:6px}
.nb-mealhead .nb-editbtn,.nb-mealhead .pill{margin-left:0}
.nb-mealname{flex:0 1 auto;min-width:0;max-width:100%}

.wk-btn{margin-left:auto;margin-right:18px;color:#fff;text-decoration:none;font-size:14px;font-weight:600;
  border:1px solid rgba(255,255,255,.7);border-radius:8px;padding:8px 14px;white-space:nowrap}
.wk-btn:hover{background:rgba(255,255,255,.14);color:#fff}

@media (max-width:820px){
  /* One compact row: the current step spelled out, the others as numbers. */
  .steps{gap:6px;margin-bottom:10px}
  .steps li{flex:0 0 auto;padding:4px}
  .steps li .step-t{display:none}
  .steps li.now{flex:1 1 auto;padding:6px 10px}
  .steps li.now .step-t{display:inline}
  /* Step 1 on a phone: meals, snacks, this week's context, then the
     "Review last week's meals" button. */
  .prefs-layout .rate-last{order:100}
  /* The top bar button gets its own full-width row under the logo. */
  .wk-btn{order:3;flex-basis:100%;margin:2px 0 0;text-align:center;padding:10px 14px;font-size:15px}
  nav.topnav{order:4}
  details.wk-sec>summary{padding:14px}
  .wk-body{padding:0 12px 14px}
}

/* Notebook paper on a phone (Nichole, 2026-11-17): every box on a page is
   the same width — the full width of the screen, never wider, so nothing
   needs scrolling sideways — and the red margin line sits at the same place
   in every notebook (Weekly Haul, Keep Stocked, the meal lists, the grocery
   lists). The meal lists' row labels (Option 1, Weekday 2, Wednesday…) move
   to the right of the line in their own column, as on the Custom Meal pages,
   so headings, labels and lists all start at one straight edge. */
@media (max-width:820px){
  .haul-layout{align-items:stretch}
  .haul-layout>div>*{min-width:0;max-width:100%}
  .notebook,.card,details.wk-sec{max-width:100%}
  .notebook.nb-plan:not(.nb-custom){--margin:34px}
  .notebook.nb-plan:not(.nb-custom) ul.lined li>.nb-label{flex:0 0 calc(var(--margin) + 92px);width:auto;
    padding:0 6px 0 calc(var(--margin) + 12px);text-align:left;font-size:13px;line-height:1.15;
    white-space:normal;overflow-wrap:anywhere}
  .notebook.nb-plan:not(.nb-custom) select.nb-select{padding-left:4px}
  .notebook.nb-plan:not(.nb-custom) ul.lined li>.nb-label+.nb-text{padding-left:4px}
  .notebook.nb-plan:not(.nb-custom) .nb-addrow .nb-addlink{padding-left:4px}
  .nb-hint{margin-right:12px}
  /* Step 3: the notebooks run edge to edge inside each section, so the red
     line falls in the same place as on Steps 1 and 2. */
  .wk-body{padding:0 0 14px}
  .wk-body>:not(.notebook):not(form),.wk-body>form>:not(.notebook){margin-left:12px;margin-right:12px}
  .wk-body .notebook{border-left:none;border-right:none;border-radius:0;box-shadow:none}
}

/* View my Week on a phone (Nichole, 2026-11-17): the Weekly Meal Plan keeps
   its row labels (Option 1, Monday…) to the LEFT of the red line, as on a
   computer, with a margin just wide enough for "Wednesday". Its red line can
   sit in a different place from the grocery lists' (Nichole's call). */
@media (max-width:820px){
  .notebook.nb-plan.nb-view{--margin:84px}
  .notebook.nb-plan.nb-view ul.lined li>.nb-label{flex:0 0 var(--margin);width:var(--margin);
    padding:0 8px 0 0;text-align:right;font-size:12px;line-height:normal;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .notebook.nb-plan.nb-view ul.lined li>.nb-label+.nb-text{padding-left:12px}
  /* the sticky "checked" bar spans the whole section, so nothing shows down its side */
  .wk-sec .wk-body>.gl-bar{margin-left:0;margin-right:0;padding-left:12px;padding-right:12px}
  /* Each row of the Weekly Meal Plan and Recipes lists is exactly one ruled
     line tall, so every title sits on its line ("View card" kept its phone
     padding, which made the recipe rows taller than the lines). */
  .nb-view ul.lined li{height:var(--rule);min-height:0}
  .nb-view .nb-act{padding-top:0;padding-bottom:0;line-height:calc(var(--rule) - 1px)}
}

/* Review Meal Plan and Stock Pantry on a phone (Nichole, 2026-11-17): the
   meal and snack rows keep their labels (Option 1, Weekday 1 · Main,
   Monday…) in the margin, LEFT of the red line, like View my Week. A label
   too long for the margin wraps onto two short lines within its row. */
@media (max-width:820px){
  .notebook.nb-plan.nb-marginlabels{--margin:88px}
  .notebook.nb-plan.nb-marginlabels ul.lined li>.nb-label{flex:0 0 var(--margin);width:var(--margin);
    padding:0 8px 0 0;text-align:right;font-size:12px;line-height:1.15;white-space:normal;overflow:hidden}
  .notebook.nb-plan.nb-marginlabels select.nb-select{padding-left:12px}
  .notebook.nb-plan.nb-marginlabels ul.lined li>.nb-label+.nb-text{padding-left:12px}
}

/* Choose your Preferences on a phone (Nichole, 2026-11-17): the light-gray
   row labels (Option 1, Weekday 1, Monday, Snack 1…) and the "+ Add" buttons
   sit LEFT of the red line, like the other two steps; the drop-downs and
   "Add another…" links start just right of it. */
@media (max-width:820px){
  .notebook.nb-plan.nb-marginlabels .nb-addrow .nb-label{text-align:right}
  .notebook.nb-plan.nb-marginlabels .nb-addrow .nb-addlink{padding-left:12px}
}

/* View my Week, Recipes for the week (Nichole, 2026-11-17): "View card" sits
   in the margin, LEFT of the red line, so the margin is wide enough for it —
   on a phone and on a computer. The recipe name starts just right of the line. */
.notebook.nb-recipes{--margin:84px}
.nb-cardcell{flex:0 0 var(--margin);width:var(--margin);text-align:right;padding-right:8px;
  white-space:nowrap;line-height:calc(var(--rule) - 1px)}
.nb-view .nb-cardcell .nb-act{padding:0;line-height:inherit}

/* By Meal / Recipe: the blue details bubble is folded behind "Details"
   (Nichole, 2026-11-17). */
.nb-metabtn{border:none;background:none;padding:0 4px;color:var(--forest);font-size:12px;cursor:pointer;
  text-decoration:underline;text-decoration-style:dotted;font-family:'Segoe UI',-apple-system,Helvetica,Arial,sans-serif;font-weight:400}
.nb-meta[hidden]{display:none}
@media (max-width:820px){.nb-metabtn{padding:8px 4px;font-size:14px}}
