/* SassPan — calm pass (11/27). Loaded last.
   One accent (green) for "where you are" and "what's selected" everywhere; color is saved for meaning
   (macros, goal gold, warnings). Tabs say what they are. Quips are a line of text, not a purple box.
   Search sits in the same spot on every list screen. */

/* ---------- Bottom bar: every active tab looks the same ---------- */
#tab-foods.is-active,
#tab-me.is-active,
#tab-reports.is-active,
#tab-kitchen.is-active,
#tab-today.is-active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), var(--basil-deep, #2c7a59));
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 75%, transparent);
}

/* ---------- Chips: selected = green, not purple ---------- */
.chip.is-active,
.chip--loc.is-active,
#report-ranges .chip.is-active,
#recipe-tags .chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.chip.is-active .chip__count { background: rgba(255, 255, 255, 0.22); color: inherit; }
.chip--icon { color: var(--accent-text); }

/* ---------- Quips: a line of personality, not a banner ---------- */
.report__quip {
  background: none;
  color: var(--muted);
  padding: 0 2px;
  margin: 2px 0 12px;
  border-radius: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- Tabs with words (Foods filters, Kitchen sections) ---------- */
.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--elev-1);
}
.tabs .tabs__opt,
.tabs .tabs__opt.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 6px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: 600 0.74rem/1.1 var(--font-body);
  letter-spacing: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tabs .tabs__opt .icon { width: 20px; height: 20px; }
.tabs .tabs__opt:hover { color: var(--ink); }
.tabs .tabs__opt.is-active,
.tabs .tabs__opt.chip.is-active {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: none;
}
.tabs .tabs__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#foods-caption, .segmented__caption { display: none !important; }

/* Same search spot on every list screen */
.view > .search-row { margin: 4px 0 12px; }

/* ---------- Cook: clear groups ---------- */
.cook-group { margin: 6px 0 18px; }
.cook-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 8px;
  font: 700 0.78rem/1.2 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cook-group__count {
  min-width: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  letter-spacing: 0;
}
.cook-group--ready .cook-group__title { color: var(--accent-text); }
.cook-group--ready .cook-group__count { background: var(--accent-soft); color: var(--accent-text); }
.cook-group--plan .cook-group__title { color: var(--ink); }
.cook-group--far .k-row { opacity: 0.78; }
.cook-row .k-row__tap { align-items: center; }
.cook-row.is-ready { box-shadow: inset 3px 0 0 var(--accent); }
.cook-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font: 700 0.75rem var(--font-body);
  white-space: nowrap;
}
.cook-pill .icon { width: 14px; height: 14px; }
.cook-pill--ready { background: var(--accent-soft); color: var(--accent-text); }
.cook-pill--short { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---------- + sheet: the "other things" fold ---------- */
.onhand--more > summary { list-style: none; cursor: pointer; }
.onhand--more > summary::-webkit-details-marker { display: none; }
.onhand--more > summary .icon:last-child { margin-left: auto; transition: transform 0.15s ease; }
.onhand--more[open] > summary .icon:last-child { transform: rotate(180deg); }
.onhand--more { margin-bottom: 14px; }

/* Batch sheet hint sits tight under its heading */
.b-hint { margin: -4px 0 10px; }

/* ---------- Less noise ---------- */
.food-group__title { margin-top: 18px; }
.k-row .from, .food-row .from { font-size: 0.82rem; }

@media (prefers-reduced-motion: reduce) {
  .tabs .tabs__opt, .onhand--more > summary .icon:last-child { transition: none; }
}

/* Group headings: quiet, not purple */
.food-group__title, .food-group__title span { color: var(--muted); }
.food-group__title .loc-title, .use-soon .food-group__title span { color: var(--accent-text); }
.cook-row:not(:has(.check)) .k-row__tap { padding-left: 4px; }

/* ---------- Shopping: list / deals switch, your store, aisles ---------- */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 14px; background: var(--surface-2); }
.seg2__opt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 0.88rem var(--font-body); cursor: pointer; }
.seg2__opt .icon { width: 17px; height: 17px; }
.seg2__opt.is-active { background: var(--surface); color: var(--accent-text); box-shadow: var(--elev-1); }
.seg2__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.store-bar { display: grid; gap: 4px; margin: 0 0 10px; }
.store-bar__pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.store-bar__pick > .icon:first-child { width: 22px; height: 22px; color: var(--accent-text); flex: none; }
.store-bar__pick > .icon:last-child { margin-left: auto; color: var(--muted); }
.store-bar__text { display: grid; gap: 1px; min-width: 0; }
.store-bar__text small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.store-bar__learned { font-size: 0.76rem; color: var(--muted); padding-left: 4px; }
.food-group__title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.aisle-sub { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.aisle-set { font-size: 0.78rem; letter-spacing: 0; text-transform: none; }
.sp-add > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; margin: 10px 0; cursor: pointer; }
.sp-add > summary::-webkit-details-marker { display: none; }

/* ---------- Deals ---------- */
.deal-add { display: grid; gap: 6px; margin: 0 0 14px; }
.deal-add .btn { justify-self: start; }
.deals { display: grid; gap: 1px; overflow: hidden; border-radius: 14px; background: var(--hairline); box-shadow: var(--elev-1); }
.deal { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); }
.deal__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.deal__main b { font-weight: 600; overflow-wrap: anywhere; }
.deal__main small { color: var(--muted); font-size: 0.8rem; }
.deal__match { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text) !important; font-weight: 600; }
.deal__match .icon { width: 13px; height: 13px; }
.deal__note { color: var(--goal) !important; font-weight: 600; }
.deal__price { display: grid; justify-items: end; line-height: 1.15; font-variant-numeric: tabular-nums; }
.deal__price b { font-size: 1.05rem; color: var(--ink); }
.deal__price s { font-size: 0.78rem; color: var(--muted); }
.deal__price em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--accent-text); }
.flyer-status { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.88rem; }
.flyer-status .icon { width: 16px; height: 16px; flex: none; }
.flyer-status--failed { color: var(--danger); }
.flyer-status .link-btn { margin-left: auto; }

/* Focus is green like everything else that is "selected" */
.search:focus-within, .field__input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent) !important; outline: none; }
.link-btn { color: var(--accent-text); }

/* ---------- Cooking screen ---------- */
.cook-start {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 16px; padding: 14px 16px;
  border: 0; border-radius: 16px; color: #fff; text-align: left; font: inherit; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), var(--basil-deep, #2c7a59));
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.cook-start > .icon { width: 24px; height: 24px; flex: none; }
.cook-start > .icon:last-child { margin-left: auto; width: 20px; height: 20px; opacity: 0.85; }
.cook-start__text { display: grid; gap: 2px; }
.cook-start__text b { font-size: 1.05rem; }
.cook-start__text small { opacity: 0.88; font-size: 0.82rem; }
.cook-start:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.is-cooking-sheet .sheet__panel { max-height: 96dvh; }
.ck-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.ck-awake { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font: 600 0.78rem var(--font-body); }
.ck-awake .icon { width: 14px; height: 14px; }
.ck-progress { font: 700 0.85rem var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.ck-h { margin: 16px 0 6px; font: 700 1.02rem var(--font-display); color: var(--ink); }
.ck-hint { margin: 0 0 10px; }
.ck-section { margin: 14px 2px 6px; font: 700 0.76rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.ck-list { display: grid; gap: 8px; }
.ck-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px 8px 12px;
  border-radius: 14px; background: var(--surface); box-shadow: var(--elev-1);
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.ck-row.is-done { background: var(--surface-2); box-shadow: none; }
.ck-row.is-done .ck-text { color: var(--muted); }
.ck-row.is-done .ck-line { text-decoration: line-through; text-decoration-color: var(--accent); }
.ck-row.is-done .ck-text strong { color: inherit; }
.ck-row.is-changed .ck-note { color: var(--accent-text); }
.ck-row.is-skipped .ck-text { color: var(--muted); }
.ck-tick {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); color: #fff; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ck-tick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.ck-tick .icon { width: 17px; height: 17px; }
.ck-tick:focus-visible, .ck-change:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ck-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.ck-note { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-decoration: none; display: inline-block; }
.ck-change {
  flex: none; min-width: 40px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font: 700 0.82rem var(--font-body); cursor: pointer; white-space: nowrap;
}
.ck-change .icon { width: 15px; height: 15px; }
.ck-row.is-changed .ck-change { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.ck-row.is-editing { box-shadow: 0 0 0 2px var(--accent); }
.ck-edit { display: grid; gap: 10px; margin: -2px 0 6px; padding: 12px; border-radius: 14px; background: var(--accent-soft); }
.ck-edit__label { font: 600 0.85rem var(--font-body); color: var(--ink); }
.ck-edit .amt { justify-content: flex-start; }
.ck-edit__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ck-edit__btns .btn { margin-left: auto; }
.ck-addlink { display: inline-flex; align-items: center; gap: 6px; margin: 10px 2px 0; }
.ck-steps { display: grid; gap: 8px; margin: 0; padding-left: 1.6em; }
.ck-step { padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--elev-1); font-size: 1.02rem; line-height: 1.5; cursor: pointer; }
.ck-step.is-done { background: var(--surface-2); box-shadow: none; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }
.ck-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ck-steps .ck-step:not(.is-done):first-of-type, .ck-step.is-done + .ck-step:not(.is-done) { box-shadow: 0 0 0 2px var(--accent); }
.ck-foot {
  position: sticky; bottom: calc(-1 * var(--sheet-pad, 16px)); z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 18px calc(-1 * var(--sheet-pad, 16px)) calc(-1 * var(--sheet-pad, 16px)); padding: 12px var(--sheet-pad, 16px) calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--hairline);
}
.ck-foot .btn--primary { flex: 1; justify-content: center; }
.b-changes { display: grid; gap: 6px; margin: 10px 0 4px; }
.b-changes .link-btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .ck-row, .ck-tick { transition: none; } }

.loc-strip__opt.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: none; }

/* ---------- One settings button per screen ---------- */
.topbar__gear {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; margin-left: 8px;
  border: 0; border-radius: 14px; background: var(--surface); color: var(--muted); box-shadow: var(--elev-1); cursor: pointer;
}
.topbar__gear .icon { width: 20px; height: 20px; }
.topbar__gear:hover { color: var(--ink); }
.topbar__gear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar .datenav { margin-left: auto; }
.settings { display: grid; gap: 18px; padding-bottom: 8px; }
.set-section__title { margin: 0 2px 8px; font: 700 0.76rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.set-section__body { display: grid; gap: 8px; }
.set-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 14px;
  border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--elev-1); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
}
.set-row > .icon:first-child { width: 22px; height: 22px; color: var(--accent-text); flex: none; }
.set-row > .icon:last-child { margin-left: auto; color: var(--muted); width: 18px; height: 18px; flex: none; }
.set-row__text { display: grid; gap: 2px; min-width: 0; }
.set-row__text small { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.set-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-toggle { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--elev-1); }
.set-reminder { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding-right: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--elev-1); }
.set-reminder .set-toggle { box-shadow: none; background: none; }
.set-reminder__time .field__input { width: 138px; padding: 8px 10px; }
.set-chips { display: flex; flex-wrap: wrap; gap: 8px; }
