/* Family Health Companion — calm, readable, phone-first.
   Type: Bricolage Grotesque (headlines, numbers) + Atkinson Hyperlegible Next (body).
   Palette: paper, deep slate ink, eucalyptus for actions, honey for wins.
   Chart series follow the data-viz palette (blue / orange / aqua). */

@font-face { font-family: "Bricolage"; src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700; font-display: swap; }

:root {
  --paper: #f5f7f4;
  --surface: #ffffff;
  --ink: #1f2a2e;
  --ink-2: #5b686b;
  --ink-3: #8a9598;
  --line: #e1e6e2;
  --line-2: #cfd7d2;
  --sage: #3f7d6e;
  --sage-deep: #2b5d51;
  --sage-wash: #e5efea;
  --honey: #d99a2b;
  --honey-wash: #fbf0d9;
  --note: #b4572a;
  --note-wash: #fbe9df;
  --s1: #257de0; --s2: #f47230; --s3: #00b894;
  --radius-s: 6px; --radius-m: 12px; --radius-l: 20px;
  --head: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --body: "Atkinson", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 232px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: var(--sage-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--s1); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.32rem; margin-top: 1.6em; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; max-width: 68ch; }
small, .muted { color: var(--ink-2); }
.num { font-family: var(--head); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Frame ─────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.brand { font-family: var(--head); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 8px; }
.brand svg { width: 26px; height: 26px; }
.who { margin-left: auto; position: relative; }
.who summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: .95rem; }
.who summary::-webkit-details-marker { display: none; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff;
  font: 700 .8rem var(--head); flex: none; }
.who .menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-m); box-shadow: 0 12px 32px rgba(31,42,46,.14); min-width: 240px; padding: 6px; }
.who .menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink);
  text-decoration: none; }
.who .menu a:hover, .who .menu a[aria-current] { background: var(--sage-wash); }
.who .menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.who .menu .rel { margin-left: auto; color: var(--ink-3); font-size: .8rem; }

.shell { display: block; }
main { padding: 20px 16px 104px; max-width: 1080px; margin: 0 auto; }
.rail { display: none; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; color: var(--ink-2); text-decoration: none;
  font-size: .74rem; border-radius: 10px; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current] { color: var(--sage-deep); background: var(--sage-wash); font-weight: 700; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--rail) 1fr; }
  .tabs { display: none; }
  .rail { display: block; position: sticky; top: 53px; height: calc(100vh - 53px); overflow: auto; padding: 18px 12px;
    border-right: 1px solid var(--line); }
  .rail a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2);
    text-decoration: none; font-weight: 700; font-size: .95rem; }
  .rail a svg { width: 20px; height: 20px; }
  .rail a[aria-current] { background: var(--sage-wash); color: var(--sage-deep); }
  .rail a:hover { color: var(--ink); }
  .rail .group { margin: 16px 12px 6px; color: var(--ink-3); font-size: .8rem; }
  main { padding: 28px 36px 64px; }
  h1 { font-size: 2.3rem; }
}

/* ── Building blocks ───────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; }
.panel + .panel { margin-top: 14px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; align-items: start; }
.grid > .panel + .panel { margin-top: 0; }

.metrics { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) { .metrics .metric .v { font-size: 1.6rem; } }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.stack > * + * { margin-top: 14px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .end { margin-left: auto; text-align: right; }
.rows .title { font-weight: 700; }
.rows .sub { color: var(--ink-2); font-size: .92rem; }

.metric { display: grid; gap: 2px; }
.metric .v { font-family: var(--head); font-size: 2rem; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.metric .v small { font-size: .95rem; color: var(--ink-2); font-weight: 500; margin-left: 3px; }
.metric .k { color: var(--ink-2); font-size: .9rem; }

.meter { height: 8px; background: var(--sage-wash); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.meter.honey > span { background: var(--honey); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .82rem;
  background: var(--sage-wash); color: var(--sage-deep); font-weight: 700; white-space: nowrap; }
.chip.honey { background: var(--honey-wash); color: #7a5410; }
.chip.note { background: var(--note-wash); color: var(--note); }
.chip.plain { background: #eef1ef; color: var(--ink-2); }

.flash { padding: 12px 16px; border-radius: var(--radius-m); background: var(--sage-wash); color: var(--sage-deep);
  margin-bottom: 16px; font-weight: 700; }
.flash.err { background: var(--note-wash); color: var(--note); }
.empty { padding: 22px; text-align: center; color: var(--ink-2); border: 1.5px dashed var(--line-2); border-radius: var(--radius-m); }
.callout { padding: 14px 16px; border-radius: var(--radius-m); background: var(--honey-wash); color: #5c430f; }
.callout.plain { background: #eef1ef; color: var(--ink-2); }

/* ── Forms ─────────────────────────────────────────── */
form.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
label { display: grid; gap: 4px; font-size: .9rem; color: var(--ink-2); font-weight: 700; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%; }
textarea { min-height: 90px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--sage); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--s1); outline: none; box-shadow: 0 0 0 3px #257de033; }
.field-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (min-width: 640px) { .field-row.three { grid-template-columns: 2fr 1fr 1fr; } .field-row.four { grid-template-columns: 2fr 1fr 1fr 1.3fr; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }

.btn { font: 700 .98rem var(--body); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--sage); background: var(--sage);
  color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--sage-deep); }
.btn.ghost:hover { background: var(--sage-wash); color: var(--sage-deep); }
.btn.quiet { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); background: #eef1ef; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn.danger { background: transparent; color: var(--note); border-color: #e9c3b0; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--sage-deep); list-style: none; padding: 8px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "– "; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-weight: 700; color: var(--ink-2); font-size: .85rem; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ── Today hero ────────────────────────────────────── */
.hero { padding: 6px 0 4px; }
.hero .greet { color: var(--ink-2); font-size: 1rem; margin-bottom: 6px; }
.hero .say { font-family: var(--head); font-weight: 600; font-size: clamp(1.7rem, 5.4vw, 2.9rem); line-height: 1.08;
  letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 14px; }
.ribbon { position: relative; height: 170px; margin: 6px -4px 8px; }
.ribbon .chart { height: 100%; }
.ribbon canvas { width: 100% !important; height: 100% !important; }
.wins { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wins li { display: flex; gap: 10px; align-items: flex-start; }
.wins li::before { content: ""; flex: none; width: 12px; height: 12px; margin-top: 7px; border-radius: 50%;
  background: var(--honey); box-shadow: 0 0 0 3px var(--honey-wash); }
.wins li.big { font-weight: 700; }

.today-grid { display: grid; gap: 14px; margin-top: 18px; }
@media (min-width: 860px) { .today-grid { grid-template-columns: 1.25fr 1fr; } }

.meal-slot { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--line); }
.meal-slot:last-child { border-bottom: 0; }
.meal-slot.wide { grid-template-columns: 92px 1fr; }
@media (max-width: 600px) { .meal-slot { grid-template-columns: 1fr auto; } .meal-slot.wide { grid-template-columns: 1fr; } .meal-slot .slot { grid-column: 1 / -1; } }
.meal-slot .slot { font-weight: 700; color: var(--ink-2); text-transform: capitalize; }
.portion-list { margin: 4px 0 0; padding-left: 18px; color: var(--ink); }

.chart { position: relative; height: 240px; }
.chart.tall { height: 300px; }
.chart.short { height: 150px; }
.chart-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 6px; }
.chart-title h3 { margin: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }

.seg { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.seg a { padding: 8px 14px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9rem; }
.seg a[aria-current] { background: var(--sage); color: #fff; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--sage); }
.timeline li.labs::before { border-color: var(--s1); }
.timeline li.hormone::before { border-color: var(--s2); }
.timeline li.supplement::before { border-color: var(--s3); }
.timeline li.injury::before { border-color: var(--ink-3); }
.timeline time { display: block; font-size: .85rem; color: var(--ink-2); }

.plan-grid { display: grid; gap: 10px; }
@media (min-width: 900px) { .plan-grid { grid-template-columns: repeat(7, 1fr); } }
.plan-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; }
.plan-day h3 { font-size: .95rem; margin-bottom: 6px; }
.plan-day .m { font-size: .9rem; padding: 6px 0; border-top: 1px solid var(--line); }
.plan-day .m b { display: block; font-size: .78rem; color: var(--ink-3); text-transform: capitalize; }
.plan-day.today { border-color: var(--sage); box-shadow: inset 0 0 0 1px var(--sage); }

.shop-group h3 { font-size: 1rem; text-transform: capitalize; margin: 14px 0 4px; }
.shop-group label.check { padding: 8px 0; border-bottom: 1px solid var(--line); }
.shop-group input:checked + span { text-decoration: line-through; color: var(--ink-3); }

.marker-flag { font-weight: 700; }
.marker-flag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--honey); margin-right: 6px; vertical-align: 1px; }
.range-bar { position: relative; height: 6px; background: #eef1ef; border-radius: 99px; min-width: 90px; }
.range-bar .in { position: absolute; top: 0; bottom: 0; background: var(--sage-wash); border-radius: 99px; }
.range-bar .pt { position: absolute; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--s1);
  border: 2px solid var(--surface); transform: translateX(-50%); }
.range-bar .pt.out { background: var(--note); }

.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
footer.foot { color: var(--ink-3); font-size: .82rem; margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.badge-ver { padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); }

/* Sign-in & standalone pages */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.solo .card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 28px; }
.solo .card h1 { font-size: 1.9rem; }

@media print {
  .top, .tabs, .rail, .no-print { display: none !important; }
  body { background: #fff; }
  .panel { border: 0; padding: 0; }
}

/* v1.0.6: version beside the title; food-today macros */
.brand-ver { font-family: var(--body); font-weight: 600; font-size: .72rem; color: var(--ink-2); background: #eef1ef;
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; letter-spacing: .01em; }
.macros { display: inline-flex; gap: 10px; white-space: nowrap; }
.macros small { color: var(--ink-2); font-weight: 600; margin-left: 2px; }
.food-split { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .food-split { grid-template-columns: 1fr; } }
.donut-box { position: relative; height: 180px; }
.donut-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: .85rem; color: var(--ink-2); }
.donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.macro-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.macro-bars .top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 4px; }
.macro-bars .meter > span.p { background: var(--s1); } .macro-bars .meter > span.c { background: var(--s2); }
.macro-bars .meter > span.f { background: var(--s3); } .macro-bars .meter > span.fi { background: var(--sage); }
.draw-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.draw-nav select { min-width: 12rem; }
.draw-nav [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; }
.date-grid label { display: grid; gap: 4px; font-size: .9rem; }
.update-banner { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex;
  align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: var(--ink); color: #fff; border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .95rem; max-width: calc(100vw - 32px); }
.update-banner .btn.quiet { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
@media print { .update-banner { display: none; } }

/* ── Shopping (v1.0.10) ─────────────────────────────── */
.shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.shop-head h1 { margin: 0; }
.shop-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: #e9eeeb; }
.shop-tabs a { padding: 7px 18px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 700; }
.shop-tabs a[aria-current] { background: var(--surface); color: var(--sage-deep); box-shadow: 0 1px 3px rgba(31,42,46,.12); }
.back { display: inline-flex; gap: 4px; align-items: center; color: var(--sage-deep); text-decoration: none; font-weight: 700; margin-bottom: 8px; }
.count { display: inline-block; min-width: 1.6em; padding: 0 7px; border-radius: 999px; background: var(--sage-wash);
  color: var(--sage-deep); font: 700 .8rem/1.6 var(--body); text-align: center; vertical-align: middle; }
.count.warn { background: var(--honey-wash); color: #7a5410; }
.sub { color: var(--ink-2); font-size: .9rem; }
.err-text { color: var(--note); }
.flash.fade { opacity: 0; transition: opacity .6s; }
form.busy { opacity: .6; }

/* pictures: real thumbnails, or a lettered tile tinted by aisle */
.thumb { flex: none; width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.thumb.sm { width: 32px; height: 32px; border-radius: 7px; }
.thumb.xs { width: 26px; height: 26px; border-radius: 6px; margin-right: -6px; box-shadow: 0 0 0 2px var(--surface); }
.thumb.xl { width: 160px; height: 160px; border-radius: 18px; font-size: 3.4rem; }
.thumb.ph { display: inline-grid; place-items: center; font: 700 1.1rem var(--head); color: var(--ink-2); background: #eef1ef; border-color: transparent; }
.thumb.sm.ph { font-size: .85rem; } .thumb.xs.ph { font-size: .7rem; }
.ph.sec-produce { background: #e3f1df; color: #3c6b2f; } .ph.sec-bakery { background: #f6ecdc; color: #84592a; }
.ph.sec-meat-fish { background: #f7e3e0; color: #93412f; } .ph.sec-dairy-eggs { background: #e6eef8; color: #33598a; }
.ph.sec-pantry { background: #f4efd9; color: #77621d; } .ph.sec-frozen { background: #e1f0f4; color: #2b6878; }
.ph.sec-drinks { background: #e9e6f6; color: #574a93; } .ph.sec-snacks { background: #fbe9df; color: #9a4e22; }
.ph.sec-household { background: #ebeeef; color: #4c5a60; } .ph.sec-health-beauty { background: #f5e4ee; color: #8a3f69; }

/* who uses it */
.users { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.who-chip { --c: #5b686b; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 6px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--c) 14%, white); }
.who-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Plan: add */
.add-panel { padding: 14px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.add-row .combo { flex: 1 1 240px; }
.add-row input, .add-row select, .add-bar input { min-height: 46px; }
.add-row .qty-in input { width: 4.2em; }
.combo { position: relative; }
.combo input { width: 100%; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-m); box-shadow: 0 10px 28px rgba(31,42,46,.16);
  max-height: 340px; overflow: auto; }
.suggest.up { top: auto; bottom: calc(100% + 4px); }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.suggest li.active, .suggest li:hover { background: var(--sage-wash); }
.suggest .opt-text { display: grid; line-height: 1.25; } .suggest small { color: var(--ink-2); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick-d { flex: 1 1 100%; }
.quick-d > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; padding: 7px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; font-weight: 700; color: var(--sage-deep); background: var(--surface); }
.quick-d > summary::-webkit-details-marker { display: none; }
.quick-d[open] > summary { background: var(--sage-wash); border-color: var(--sage-wash); }
.quick { flex-direction: column; }
.quick-body { padding: 12px 2px 4px; }
.quick-body .sub { margin: 8px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips form { margin: 0; }
.pick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); font: 700 .92rem var(--body); color: var(--ink); cursor: pointer; }
.pick:hover { border-color: var(--sage); }
.pick .plus { color: var(--sage-deep); font-size: 1.1rem; }

/* Plan: needs a store */
.panel-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.panel-top h2 { margin: 0; }
.triage { border-color: #ecd9ad; background: #fffcf4; }
.inline.tight { gap: 6px; align-items: center; }
.tri-lines { list-style: none; margin: 10px 0 0; padding: 0; }
.tri-lines li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.tri-lines .thumb { width: 36px; height: 36px; border-radius: 8px; font-size: .9rem; }
.tri-more > summary { cursor: pointer; color: var(--sage-deep); font-weight: 700; padding: 10px 0 2px; }
.tri-lines .what { min-width: 0; display: grid; line-height: 1.3; }
.tri-lines .what .sub { font-size: .82rem; }
.tri-lines .title { font-weight: 700; color: var(--ink); text-decoration: none; }
.tri-lines select { min-height: 40px; width: 8.5em; }
.qty-badge { display: inline-block; padding: 0 6px; border-radius: 6px; background: #eef1ef; font: 700 .8rem/1.5 var(--body); color: var(--ink); }

/* Plan: store cards */
.stores-grid { display: grid; gap: 10px; margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid-top h2 { margin: 0; }
.grid-tools { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.grid-tools .toggle { padding: 6px 12px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .88rem; }
.grid-tools .toggle.on { background: var(--sage-wash); color: var(--sage-deep); }
.store-card { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius-l); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.store-card:hover { border-color: var(--sage); }
.store-card:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.store-card.empty { background: transparent; }
.store-card.last { border-color: var(--sage); }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-name { font: 650 1.2rem var(--head); }
.sc-count b { font-size: 1.15rem; }
.sc-peek { display: flex; align-items: center; gap: 0; }
.sc-peek .sub { margin-left: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-go { color: var(--sage-deep); font-weight: 700; }
.store-card.manage { border-style: dashed; background: transparent; align-content: center; }

/* Shop mode */
.trip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.trip .back { margin: 0; }
.trip-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.trip-title h1 { margin: 0; font-size: 1.9rem; }
.trip-left { color: var(--ink-2); font-weight: 700; }
.trip-stores { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.trip-stores a { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9rem; }
.trip-stores a[aria-current] { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.trip-stores a[aria-current] .count { background: rgba(255,255,255,.2); color: #fff; }
.seg, .layout-switch { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.layout-switch { border: 0; gap: 6px; margin: 0 0 6px; }
.seg button, .layout-switch button { font: 700 .88rem var(--body); border: 0; background: transparent; color: var(--ink-2); padding: 7px 13px; cursor: pointer; }
.layout-switch button { border: 1px solid var(--line-2); border-radius: 999px; }
.seg button[aria-pressed="true"], .layout-switch button[aria-pressed="true"] { background: var(--sage-wash); color: var(--sage-deep); border-color: var(--sage-wash); }
.cart-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; margin-bottom: 8px;
  border-radius: var(--radius-m); background: var(--sage-wash); }
.cart-bar .total { margin-left: auto; font-weight: 700; }
.trip-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 4px 14px 10px; }
.aisle { font: 700 .82rem var(--body); letter-spacing: .02em; color: var(--sage-deep); margin: 14px 0 0; padding-bottom: 4px;
  border-bottom: 2px solid var(--sage-wash); }
.lines { list-style: none; margin: 0; padding: 0; }
.ln { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 64px; }
.lines .ln:last-child { border-bottom: 0; }
.ln .what { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ln .title { font-weight: 700; font-size: 1.05rem; }
.ln .title a { color: inherit; }
.ln .note { font-size: .84rem; color: var(--ink-3); }
.ln.done .title, .ln.have .title { text-decoration: line-through; color: var(--ink-3); }
.ln.done .thumb, .ln.have .thumb { opacity: .5; }
.tick { margin: 0; }
.tick-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; margin: -4px; }
.tick-btn .box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface); transition: background .12s; }
.ln.done .tick-btn .box { background: var(--sage); border-color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  background-size: 18px; background-position: center; background-repeat: no-repeat; }
.tick-btn:focus-visible .box { outline: 3px solid var(--sage); outline-offset: 2px; }
details.line-more { position: relative; }
details.line-more > summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: var(--ink-2); font-size: 1.3rem; }
details.line-more > summary::-webkit-details-marker { display: none; }
details.line-more[open] > summary { background: #eef1ef; }
details.line-more .menu { position: absolute; right: 0; top: 100%; z-index: 15; display: grid; gap: 8px; min-width: 230px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-m); box-shadow: 0 10px 28px rgba(31,42,46,.16); }
details.line-more .menu form { margin: 0; } details.line-more .menu .btn { width: 100%; }
details.line-more .menu select { width: 100%; margin-top: 4px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .sub { flex: 1; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); font: 700 1.1rem var(--body); cursor: pointer; }
.stepper button:disabled { opacity: .35; }
.fold { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.fold > summary { cursor: pointer; font-weight: 700; padding: 8px 0; color: var(--ink-2); }
.empty-note { padding: 18px 4px; color: var(--ink-2); }
.add-bar { position: sticky; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 12; display: flex; gap: 8px; margin-top: 14px;
  padding: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-l); box-shadow: 0 6px 24px rgba(31,42,46,.14); }
.add-bar .combo { flex: 1; }
.add-bar .qty-mini { width: 3.6em; }
@media (min-width: 960px) { .add-bar { bottom: 14px; } }

/* Items */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.filters .grow { flex: 1 1 240px; } .filters .grow input { width: 100%; }
.count-line { margin: 6px 2px 8px; }
.catalog { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.catalog li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.catalog li:last-child { border-bottom: 0; }
.cat-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.cat-main:hover .title { color: var(--sage-deep); text-decoration: underline; }
.cat-main .what { display: grid; gap: 2px; min-width: 0; }
.cat-main .title { font-weight: 700; }
.star { color: var(--honey); }
.stores-line { display: flex; flex-wrap: wrap; gap: 4px; }
.store-chip { padding: 0 8px; border-radius: 6px; background: #eef1ef; font-size: .78rem; color: var(--ink-2); }
.store-chip.usual { background: var(--honey-wash); color: #7a5410; font-weight: 700; }
.on-list { flex: none; }

/* Item page */
.item-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.item-hero .pic img { width: 160px; height: 160px; object-fit: contain; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.item-hero .facts { flex: 1 1 260px; display: grid; gap: 6px; }
.item-hero h1 { margin: 0; }
.item-hero .lede { margin: 0; }
.plain-list { margin: 0 0 10px; padding-left: 18px; }
.people-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.people-toggle form { margin: 0; }
.person { --c: #5b686b; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); font: 700 .95rem var(--body); color: var(--ink-2); }
.person::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c); }
.person.on { background: color-mix(in srgb, var(--c) 14%, white); border-color: var(--c); color: var(--ink); }
.person.on::before { background: var(--c); }
.person:disabled { cursor: not-allowed; opacity: .55; }
.where { list-style: none; margin: 0 0 8px; padding: 0; }
.where li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.where li.nc .title { color: var(--ink-3); }
.where-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.where-top .title { font-weight: 700; }
.where-top .price { font-weight: 700; margin-left: auto; }
.where-top form { margin: 0; }
details.edit > summary { cursor: pointer; color: var(--sage-deep); font-weight: 700; padding: 4px 0; }
details.edit[open] { padding-bottom: 6px; }
.grid-form { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 10px; }
.grid-form label { display: grid; gap: 4px; }
.grid-form .pair { display: flex; gap: 6px; }
.grid-form .btn { justify-self: start; }
@media (min-width: 720px) { .grid-form { grid-template-columns: 1fr 1fr; } .grid-form .wide { grid-column: 1 / -1; } }

/* Stores */
.store-admin { list-style: none; margin: 0; padding: 0; }
.store-admin li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.store-admin li:last-child { border-bottom: 0; }
.sa-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sa-top .title { font-weight: 700; font-size: 1.05rem; }
.sa-move { margin-left: auto; display: inline-flex; gap: 4px; }
.sa-move form { margin: 0; }

@media (max-width: 520px) {
  .trip { grid-template-columns: auto 1fr; }
  .trip .seg { grid-column: 1 / -1; justify-self: start; }
  .add-row .store-in { flex: 1; } .add-row .store-in select { width: 100%; }
}

/* v1.0.11: prices, product links */
.price-tag { white-space: nowrap; font-weight: 700; color: var(--ink); }
.price-tag small { font-weight: 400; color: var(--ink-2); }
.price-tag.old { color: var(--ink-2); }
.price-tag.hint { font-weight: 400; color: var(--ink-2); }
.price-tag.none { font-weight: 400; font-size: .82rem; color: var(--ink-3); }
.line-price { flex: none; text-align: right; min-width: 4.2em; }
.ln.done .line-price, .ln.have .line-price { opacity: .5; }
.trip-total { margin: 0 0 8px; }
.sc-total b { font-size: 1.05rem; }
.prod-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.prod-link:hover { color: var(--sage-deep); border-bottom-color: var(--sage); }
.prod-link .ext { font-size: .75em; margin-left: 3px; color: var(--sage-deep); }
.cat-price { flex: none; display: grid; justify-items: end; line-height: 1.2; min-width: 4.5em; }
.cat-price small { color: var(--ink-2); font-size: .75rem; }
.catalog li { flex-wrap: wrap; }
.catalog li > .stores-line { flex-basis: 100%; padding-left: 60px; }
a.store-chip { text-decoration: none; }
a.store-chip:hover { background: var(--sage-wash); color: var(--sage-deep); }
.where-top .price { display: grid; justify-items: end; line-height: 1.2; }
.where-top .price small { font-weight: 400; color: var(--ink-2); font-size: .75rem; }
.where-top .price small.old { color: var(--note); }
.pic-remove { margin-top: 6px; }
.linkish { border: 0; background: none; padding: 0; color: var(--ink-2); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
@media (max-width: 520px) {
  .ln { gap: 8px; }
  .line-price { min-width: 0; max-width: 4.6em; font-size: .92rem; }
  .line-price .price-tag.none { white-space: normal; display: inline-block; text-align: right; line-height: 1.2; font-size: .76rem; }
  .ln .thumb { width: 40px; height: 40px; }
}

/* v1.0.12: food against daily goals */
.macro-bars .meter > span.k { background: var(--ink-2); }
.food-goals { margin-top: 14px; }
.legend .goal-key { display: inline-block; width: 18px; height: 0; border-top: 2px dashed var(--ink-2); background: none !important; vertical-align: middle; }
.goal-cap { margin: 8px 0 0; font-size: .9rem; }
.week-goals { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wg-head h3 { margin: 0; }
.wg-head a { font-weight: 700; color: var(--sage-deep); font-size: .9rem; }
.wg { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.wg th, .wg td { padding: 5px 2px; text-align: center; }
.wg tbody th { text-align: left; font-weight: 700; color: var(--ink); padding-right: 8px; white-space: nowrap; }
.wg thead th { color: var(--ink-2); font-weight: 700; font-size: .8rem; }
.wg thead th.today { color: var(--sage-deep); }
.wg abbr { text-decoration: none; }
.wg td.today { background: var(--sage-wash); }
.wg-n { text-align: right !important; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; }
.cell.hit { background: var(--sage); }
.cell.under { border: 2px solid var(--s1); }
.cell.over { border: 2px solid var(--s2); }
.cell.none { width: auto; height: auto; color: var(--ink-3); }
.cell.sofar { border: 2px solid var(--sage); background: conic-gradient(var(--sage) var(--pct), transparent 0); }
.wg-key { margin: 8px 0 0; font-size: .8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.wg-key .cell { width: 11px; height: 11px; }

/* v1.0.18: calorie goal breakdown, burned line */
.cal-basis { margin-top: 12px; }
.cal-basis > summary { cursor: pointer; color: var(--sage-deep); font-weight: 700; }
.cb-parts { list-style: none; margin: 8px 0 0; padding: 0; max-width: 460px; }
.cb-parts li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.cb-parts li small { color: var(--ink-2); }
.cb-parts li.total { border-bottom: 0; border-top: 1px solid var(--line-2); font-weight: 700; }

/* v1.0.19: goals */
.goal-now { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.goal-now li { display: flex; align-items: baseline; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.goal-now li span:first-child { flex: 1; color: var(--ink-2); }
.goal-now b { font-size: 1.15rem; }
.goal-form { display: grid; gap: 12px; }
.goal-form fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px 14px; margin: 0; }
.goal-form legend { font-weight: 700; padding: 0 6px; }
.seg-radio { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.seg-radio label { margin: 0; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: inline-block; padding: 8px 16px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg-radio input:checked + span { background: var(--sage-wash); color: var(--sage-deep); }
.seg-radio input:focus-visible + span { outline: 3px solid var(--sage); outline-offset: -3px; }
.goal-form .rate .pair { display: flex; align-items: center; gap: 6px; }
.preview { border-color: var(--sage); }
.conflicts { display: grid; gap: 8px; margin: 10px 0; }
.conflicts .callout .btn { margin-top: 6px; }
table.diff tr.changed td:first-child { font-weight: 700; }
.delta { font-size: .8rem; font-weight: 700; margin-left: 4px; }
.delta.up { color: var(--sage-deep); } .delta.down { color: var(--note); }
.ex-week { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ex-week li { display: grid; grid-template-columns: 9.5em 1fr auto; align-items: center; gap: 10px; }
.ex-week .meter { height: 8px; border-radius: 999px; background: #eef1ef; overflow: hidden; display: block; }
.ex-week .meter > span { display: block; height: 100%; background: var(--sage); }
.pips { display: flex; gap: 4px; }
.pips i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sage); }
.pips i.on { background: var(--sage); }

/* v1.0.20: goals — choices left, live summary right (a pull-up bar on phones) */
.goals-layout { display: grid; gap: 16px; align-items: start; }
.goal-choices { display: grid; gap: 14px; }
.g-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.seg-radio.big span { padding: 10px 20px; font-size: 1rem; }
.pace-block { display: grid; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.pace-block .seg-radio { margin: 0; justify-self: start; }
.g-row { display: grid; gap: 10px; }
.g-row.two { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.g-row label, .ex-grid label { display: grid; gap: 4px; font-weight: 700; }
.pair { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.body-goals { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.body-chip { position: relative; display: block; cursor: pointer; }
.body-chip input { position: absolute; opacity: 0; }
.body-chip > span { display: grid; gap: 2px; padding: 12px 14px 12px 40px; border: 1px solid var(--line-2); border-radius: var(--radius-m);
  background: var(--surface); transition: border-color .12s, background .12s; }
.body-chip > span::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 5px;
  border: 2px solid var(--line-2); background: var(--surface); }
.body-chip small { color: var(--ink-2); font-weight: 400; }
.body-chip input:checked + span { border-color: var(--sage); background: var(--sage-wash); }
.body-chip input:checked + span::before { background: var(--sage); border-color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat; }
.body-chip input:focus-visible + span { outline: 3px solid var(--sage); outline-offset: 2px; }
.ex-grid { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ex-grid label > span small { display: block; font-weight: 400; color: var(--ink-2); font-size: .8rem; }
.goal-summary .gs { background: var(--surface); border: 1px solid var(--sage); border-radius: var(--radius-l); }
.gs-bar { list-style: none; cursor: pointer; display: grid; gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.gs-bar::-webkit-details-marker { display: none; }
.gs-title { font: 650 1.05rem var(--head); }
.gs-key { color: var(--ink-2); font-size: .92rem; }
.gs-key b { color: var(--ink); }
.gs-open { display: none; }
.gs-body { padding: 12px 16px 16px; }
.gs-body h3 { font-size: .95rem; margin: 14px 0 4px; color: var(--sage-deep); }
.gs-head { margin: 0; } .gs-eta { margin: 6px 0 0; }
.gs-note { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-m); background: #f3f6f4; font-size: .92rem; }
.gs-note.warn { background: var(--honey-wash); }
.gs-note .for { display: inline-block; font-weight: 700; color: var(--sage-deep); margin-right: 4px; }
.gs-note .btn { margin-top: 6px; }
.gs-list { list-style: none; margin: 0; padding: 0; }
.gs-list li { border-bottom: 1px solid var(--line); }
.gs-list li > details > summary, .gs-list li > .lbl { list-style: none; cursor: pointer; }
.gs-list li > details > summary::-webkit-details-marker { display: none; }
.gs-list summary, .gs-list li:not(:has(details)) { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; }
.gs-list li.changed .lbl { font-weight: 700; }
.gs-list .vals { text-align: right; white-space: nowrap; }
.gs-list .why { margin: 0 0 8px; color: var(--ink-2); font-size: .88rem; }
.small-print { font-size: .82rem; margin-top: 10px; }
.gs-save { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.gs-save label { display: grid; gap: 4px; font-weight: 700; }
.gs-save .btn { justify-self: start; }
.goal-summary.loading .gs-body { opacity: .55; }
@media (min-width: 1000px) {
  .goals-layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .goal-summary { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
  .gs-bar { cursor: default; pointer-events: none; }
}
@media (max-width: 999px) {
  .goal-summary { position: sticky; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 12; }
  .goal-summary .gs { box-shadow: 0 -6px 24px rgba(31,42,46,.14); }
  .gs:not([open]) .gs-bar { border-bottom: 0; }
  .gs-open { display: inline; position: absolute; right: 16px; top: 16px; color: var(--sage-deep); font-weight: 700; font-size: .9rem; }
  .gs { position: relative; }
  .gs[open] .gs-body { max-height: 60vh; overflow: auto; }
}
.goal-choices [hidden] { display: none !important; }
@media (max-width: 999px) {
  .gs-bar { padding-right: 84px; }
  .gs-open::before { content: "Details"; }
  .gs[open] .gs-open::before { content: "Hide"; }
}
/* v1.0.21 — goals: will this work? */
.gs-check{border-radius:10px;padding:10px 12px;margin:0 0 12px;border:1px solid var(--line,#ddd)}
.gs-check.ok{background:#eef7ef;border-color:#9cc9a3}
.gs-check.bad{background:#fff4e5;border-color:#e3b26b}
.gs-check h3{margin:0 0 4px}
.gs-check p{margin:4px 0}
.gs-math{display:flex;gap:18px;margin:6px 0}
.gs-math div{display:flex;gap:6px}.gs-math dt{color:var(--muted,#666)}.gs-math dd{margin:0;font-weight:600}
.gs-fixes{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.gs-fixed .check{display:flex;justify-content:space-between;gap:8px;align-items:center;width:100%}
.gs-math{flex-wrap:wrap}.gs-math dt{white-space:nowrap}.gs-math dd{white-space:nowrap}
/* v1.0.22 — linked goals, tips */
.tip{position:relative;display:inline-flex;vertical-align:middle;margin-left:2px;cursor:help;outline:none}
.tip-i{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;border:1px solid currentColor;font:600 11px/1 Georgia,serif;font-style:italic;opacity:.55}
.tip:hover .tip-i,.tip:focus .tip-i,.tip:focus-within .tip-i{opacity:1}
.tip-box{display:none;position:absolute;z-index:30;left:50%;top:calc(100% + 6px);transform:translateX(-50%);width:min(300px,80vw);padding:10px 12px;border-radius:10px;background:#fff;color:#1d2b25;border:1px solid #cfd8d3;box-shadow:0 6px 24px rgba(20,40,30,.16);font-size:13.5px;line-height:1.45;font-weight:400;text-align:left;white-space:normal;cursor:auto}
.tip:hover .tip-box,.tip:focus .tip-box,.tip:focus-within .tip-box{display:block}
.tip-more{margin-top:6px}.tip-more summary{cursor:pointer;color:var(--accent,#2f6b55);font-weight:600;list-style:none}
.tip-more summary::-webkit-details-marker{display:none}
.tip-long{display:block;margin:4px 0}.tip-src{display:block;font-size:12px;margin-top:4px;color:var(--muted,#5b6b64)}
.link-note{margin:-4px 0 10px;padding:8px 10px;border-radius:8px;background:#eef5f1;font-size:14px}
.focus-block{border:0;padding:0;margin:14px 0 0}.focus-block legend{font-weight:600;margin-bottom:6px;padding:0}
.gs-acts{display:inline-flex;gap:6px;flex-wrap:wrap;margin-top:4px}.gs-note.quiet{opacity:.75;font-size:13.5px}
.btn.link{background:none;border:0;padding:2px 4px;color:var(--accent,#2f6b55);text-decoration:underline;box-shadow:none}
@media (max-width:999px){.tip-box{position:fixed;left:50%;top:auto;bottom:16px;transform:translateX(-50%);width:calc(100vw - 32px)}}
.sess-min{display:flex;align-items:center;gap:4px;margin-top:6px}.sess-min select{padding:4px 8px;font-size:13px;min-height:0;width:auto}
.sess-min[hidden]{display:none!important}
.tip-used{display:block;margin:6px 0 0;font-size:12.5px}.tip-more .tip-used{display:none}
.me-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px 16px;align-items:start}
.me-grid label,.me-w{display:flex;flex-direction:column;gap:6px;font-weight:600}
.me-val{display:flex;align-items:center;gap:8px}.me-val input{flex:1;min-width:0}
.me-w{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}.me-w>span:first-child{width:100%}
.me-weigh{margin-left:auto;font-weight:400}
.tip-more{display:block;margin-top:6px}.tip-mbtn{cursor:pointer;color:var(--accent,#2f6b55);font-weight:600}
.tip-long-wrap{display:none}.tip-more.open .tip-long-wrap{display:block}.tip-more.open .tip-mbtn{display:none}
.tip-used{display:block}
/* v1.0.26 */
.need{color:#b3261e}p.need{background:#fdecea;border-radius:8px;padding:8px 10px;color:#8c1d18}
.me-ro{display:flex;flex-direction:column;gap:6px;font-weight:600}.me-ro a.small{font-weight:400;font-size:13px}
.tune>summary{list-style:none;cursor:pointer;display:flex;flex-direction:column;gap:2px}.tune>summary::-webkit-details-marker{display:none}
.tune>summary h2{margin:0}.tune>summary::after{content:"Show";position:absolute;right:20px;top:20px;font-size:13px;color:var(--accent,#2f6b55);font-weight:600}
.tune[open]>summary::after{content:"Hide"}.tune{position:relative}
.tune-rows{display:grid;gap:10px;margin:14px 0 8px}
.tune-row{display:grid;grid-template-columns:minmax(150px,1fr) auto minmax(120px,1fr);gap:8px;align-items:center}
.tune-row .lbl{font-weight:600;display:flex;flex-direction:column}.tune-row .lbl small{font-weight:400}
.tune-row input[hidden]{display:none}
.tune-vars{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-top:12px}
.tune-vars label{display:flex;flex-direction:column;gap:6px;font-weight:600}.tune-vars label.check{flex-direction:row;grid-column:1/-1;font-weight:400}
@media (max-width:640px){.tune-row{grid-template-columns:1fr 1fr}.tune-row .lbl{grid-column:1/-1}}
.tune-row .lbl{display:block}.tune-row .lbl small{display:block}
.steps-field{display:flex;flex-direction:column;gap:6px}.steps-field label{font-weight:600}
.steps-hist{margin:0;font-size:13px;color:var(--muted,#5b6b64)}
.linkish{background:none;border:0;padding:0;color:var(--accent,#2f6b55);text-decoration:underline;font:inherit;cursor:pointer}
/* v1.0.28 — better / okay / limit sources */
:root{--q-better:#1f9d6b;--q-okay:#a7b0b4;--q-limit:#e8590c}
.meter.q-meter{display:flex;overflow:visible;gap:2px}
.q-seg{position:relative;height:100%;display:block;cursor:help;outline:none}
.q-seg:first-child{border-radius:999px 0 0 999px}.q-seg:last-child{border-radius:0 999px 999px 0}.q-seg:only-child{border-radius:999px}
.q-better{background:var(--q-better)}.q-okay{background:var(--q-okay)}.q-limit{background:var(--q-limit)}
.q-seg:hover .tip-box,.q-seg:focus .tip-box{display:block}
.q-seg .tip-box{top:calc(100% + 8px)}
.q-key{display:flex;gap:12px;flex-wrap:wrap;margin:4px 0 0;font-size:12.5px;color:var(--muted,#5b6b64)}
.q-key i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px;vertical-align:baseline}
.q-chip{font-size:12px}.q-better-chip{background:#e3f4ec;color:#145c40}.q-okay-chip{background:#eef0f1;color:#4a5458}.q-limit-chip{background:#fdeadd;color:#9a3b06}
.meter.q-meter > .q-seg.q-better{background:var(--q-better)}.meter.q-meter > .q-seg.q-okay{background:var(--q-okay)}.meter.q-meter > .q-seg.q-limit{background:var(--q-limit)}
.meter.q-meter > .q-seg{border-radius:0}.meter.q-meter > .q-seg:first-child{border-radius:999px 0 0 999px}.meter.q-meter > .q-seg:last-child{border-radius:0 999px 999px 0}.meter.q-meter > .q-seg:only-child{border-radius:999px}
/* v1.0.31 — day navigation on Today */
.day-bar{display:flex;align-items:center;gap:10px;margin:0 0 14px;flex-wrap:wrap}
.day-arrow{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;border:1px solid var(--line,#d9dfdc);font-size:22px;line-height:1;text-decoration:none;color:inherit;background:var(--card,#fff)}
.day-arrow:hover{background:var(--sage-wash,#eef4f1)}.day-arrow.off{opacity:.3}
.day-pick label{display:flex;align-items:center;gap:8px;font-weight:600}.day-pick input{padding:6px 8px;font:inherit;font-weight:400}
.hero.past{padding-top:4px}
@media (max-width:640px){.day-name{display:none}}
.past-note{margin:0 0 4px;font-size:17px;line-height:1.45;color:var(--ink2,#3b4a44)}
/* v1.0.32 — a logged meal's ingredients on Today */
.meal-items>summary{cursor:pointer;list-style:none}.meal-items>summary::-webkit-details-marker{display:none}
.meal-items>summary::before{content:"▸";display:inline-block;width:1em;color:var(--muted,#5b6b64);transition:transform .15s}
.meal-items[open]>summary::before{transform:rotate(90deg)}
.meal-items .portion-list{margin:6px 0 0}.meal-items .portion-list li{display:flex;justify-content:space-between;gap:10px}
@media (prefers-reduced-motion:reduce){.meal-items>summary::before{transition:none}}
/* v1.0.33 — Goals: Save always in reach */
.save-bar{position:fixed;left:0;right:0;bottom:0;z-index:25;display:flex;align-items:center;justify-content:flex-end;gap:14px;
  padding:10px max(16px, calc((100vw - 1180px) / 2)) calc(10px + env(safe-area-inset-bottom));background:var(--surface,#fff);
  border-top:1px solid var(--line,#d9dfdc);box-shadow:0 -4px 16px rgba(31,42,46,.08)}
.save-bar .save-what{color:var(--ink-2,#3b4a44);font-size:.92rem}
.save-bar .btn[disabled]{opacity:.45;cursor:not-allowed;filter:grayscale(1)}
.save-bar.ready .save-what{color:var(--ink,#1f2a2e);font-weight:600}
body:has(.save-bar) main{padding-bottom:84px}
@media (max-width:999px){
  .save-bar{padding:8px 14px}.save-bar .save-what{font-size:.85rem}
  .goal-summary{bottom:calc(58px + env(safe-area-inset-bottom))}
  body:has(.save-bar) main{padding-bottom:150px}
}
@media (max-width:959px){
  .save-bar{bottom:calc(68px + env(safe-area-inset-bottom))}
  .goal-summary{bottom:calc(68px + 58px + env(safe-area-inset-bottom))}
  body:has(.save-bar) main{padding-bottom:200px}
}
/* v1.0.34 — sources list opens by tap on every device */
.q-more>summary.q-key{cursor:pointer;list-style:none;align-items:center}.q-more>summary::-webkit-details-marker{display:none}
.q-more>summary::before{content:"▸";color:var(--muted,#5b6b64);margin-right:2px;transition:transform .15s}
.q-more[open]>summary::before{transform:rotate(90deg)}
.q-group{margin:8px 0 0;font-size:13.5px}.q-group b{display:flex;align-items:center;gap:6px}
.q-group i{display:inline-block;width:9px;height:9px;border-radius:2px}.q-group ul{margin:4px 0 0 15px;padding:0}
@media (hover:none){.q-seg:hover .tip-box,.q-seg:focus .tip-box{display:none}}
@media (prefers-reduced-motion:reduce){.q-more>summary::before{transition:none}}
/* v1.0.35 — supplements by time of day */
.supp-times{display:grid;gap:10px;margin-top:6px}
.supp-time{border:1px solid var(--line,#d9dfdc);border-radius:12px;padding:10px 12px}
.supp-time.done{background:#eef7ef;border-color:#b9dcbf}.supp-time.due{border-color:var(--honey,#e0a43a);background:var(--honey-wash,#fff8ea)}
.st-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.st-head .st-status{color:var(--ink-2,#3b4a44);font-size:.9rem}
.st-head form{margin-left:auto}
.st-items{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px}
.st-items li{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.95rem}
.st-items li.taken>span{color:var(--ink-2,#3b4a44)}
/* v1.0.36 — tips: the Today bar labels reuse the class "top", which picked up the header's sticky layer and covered tips */
.macro-bars .top{position:static;z-index:auto;backdrop-filter:none;-webkit-backdrop-filter:none}
@media print{.macro-bars .top{display:flex!important}}
@media (min-width:1000px){.tip-box::before{content:"";position:absolute;left:0;right:0;top:-10px;height:10px}}
/* v1.0.37 — tips on phones open as a bottom sheet over a dimmed page */
@media (max-width:999px){
  .tip:hover .tip-box,.tip:focus .tip-box,.tip:focus-within .tip-box{display:none}
  .tip-i{width:20px;height:20px;font-size:13px}
}
.tip-sheet-wrap{position:fixed;inset:0;z-index:100;background:rgba(20,32,26,.45);display:flex;align-items:flex-end;justify-content:center;animation:tipFade .15s ease-out}
.tip-sheet-wrap[hidden]{display:none}
.tip-sheet{width:100%;max-width:640px;max-height:75vh;display:flex;flex-direction:column;background:#fff;color:#1d2b25;border-radius:18px 18px 0 0;
  box-shadow:0 -8px 32px rgba(20,40,30,.28);border-top:4px solid var(--accent,#2f6b55);padding:6px 18px calc(18px + env(safe-area-inset-bottom));outline:none;animation:tipUp .2s ease-out}
.tip-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0 6px;border-bottom:1px solid #e3e9e5}
.tip-sheet-head h2{margin:0;font-size:1.15rem}
.tip-sheet-x{border:0;background:#eef3f0;color:#1d2b25;width:40px;height:40px;border-radius:50%;font-size:18px;line-height:1;cursor:pointer;flex:none}
.tip-sheet-body{overflow:auto;padding-top:10px;font-size:16px;line-height:1.5;-webkit-overflow-scrolling:touch}
.tip-sheet-body .tip-short{display:block}.tip-sheet-body .tip-used{font-size:14px;margin-top:10px}
.tip-sheet-body .tip-more{margin-top:12px}.tip-sheet-body .tip-mbtn{display:inline-block;padding:8px 14px;border-radius:999px;background:#eef5f1}
.tip-sheet-body .tip-src{font-size:14px;margin-top:8px}
html.tip-sheet-on,html.tip-sheet-on body{overflow:hidden}
@keyframes tipUp{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes tipFade{from{opacity:0}to{opacity:1}}
/* v1.0.39 — workouts win opens the list behind it */
.win-more summary{cursor:pointer;list-style:none}
.win-more summary::-webkit-details-marker{display:none}
.win-more summary::after{content:" Show";color:var(--accent,#2f6b55);font-weight:600;font-size:.9em}
.win-more[open] summary::after{content:" Hide"}
.win-list{list-style:none;margin:8px 0 0;padding:0}
.wins .win-more{flex:1;min-width:0}
.wins .win-list li{display:flex;flex-direction:column;gap:1px;padding:6px 0;border-top:1px solid #e3e9e5;font-size:.95em;font-weight:400}
.wins .win-list li::before{content:none;display:none}
.win-note{margin:8px 0 0;font-size:.9em}
/* v1.0.40 — quick add */
.quick-add-btn{width:100%;margin:10px 0 4px;font-size:1rem;padding:12px 16px}
.food-empty{margin:8px 0}
.qa-slots{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 6px}
.qa-slot{border:1px solid #cfdcd5;background:#fff;color:#1d2b25;border-radius:999px;padding:8px 14px;font-size:15px;cursor:pointer}
.qa-slot.on{background:var(--sage-deep,#2f6b55);border-color:var(--sage-deep,#2f6b55);color:#fff;font-weight:600}
.qa-note{margin:2px 0 8px;font-size:14px}
.qa-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.qa-list form{margin:0}
.qa-pick{width:100%;text-align:left;display:grid;gap:2px;border:1px solid #dfe7e2;background:#f7faf8;border-radius:12px;padding:12px 14px;cursor:pointer;color:inherit;font:inherit}
.qa-pick:hover,.qa-pick:focus-visible{border-color:var(--sage-deep,#2f6b55);background:#eef5f1}
.qa-pick.busy{opacity:.6}
.qa-name{font-weight:700}
.qa-sub{font-size:14px;color:#4b5a53}
.qa-macros{font-size:13px;color:#4b5a53}
.qa-hint{margin:4px 4px 0;font-size:13px;color:#7a5b16}
.qa-foot{margin:12px 0 0;font-size:15px}
@media (min-width:1000px){.tip-sheet-wrap{align-items:center}.tip-sheet{border-radius:18px;max-height:80vh}}
/* v1.0.40 — one Exercise panel: that day next to the week */
.ex-table{width:100%;border-collapse:collapse;margin-top:6px}
.ex-table th,.ex-table td{padding:8px 6px;border-top:1px solid #e3e9e5;vertical-align:middle;text-align:left}
.ex-table thead th{border-top:0;font-size:13px;font-weight:600;color:#4b5a53;padding-top:0}
.ex-table tbody th{font-weight:600;font-size:15px}
.ex-table .ex-today{text-align:right;font-weight:700;white-space:nowrap}
.ex-table thead th.num{text-align:right}
.ex-table .ex-today small{font-weight:500;color:#4b5a53}
.ex-wk{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ex-wk .meter{width:64px;height:8px;border-radius:999px;background:#eef1ef;overflow:hidden;display:inline-block}
.ex-wk .meter>span{display:block;height:100%;background:var(--sage)}
.ex-wk-n{font-size:14px;white-space:nowrap}
.ex-sub{margin-top:14px}.ex-sub h4{margin:0}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ex-table thead th{white-space:nowrap}
@media (max-width:480px){.ex-wk .meter{width:44px}.ex-table th,.ex-table td{padding:8px 4px}.ex-wk{gap:6px}}
/* v1.0.41 — Exercise columns line up: Today | This week number | progress */
.ex-table th.ex-today,.ex-table td.ex-today{text-align:right;width:5.5em}
.ex-table .ex-wk-h,.ex-table td.ex-wk-n{text-align:left;padding-left:14px}
.ex-table td.ex-wk-n{font-weight:700;white-space:nowrap}
.ex-table td.ex-wk-n small{font-weight:500;color:#4b5a53}
.ex-table td.ex-vis{width:72px;text-align:right}
.ex-table td.ex-vis .meter{width:64px;height:8px;border-radius:999px;background:#eef1ef;overflow:hidden;display:inline-block;vertical-align:middle}
.ex-table td.ex-vis .meter>span{display:block;height:100%;background:var(--sage)}
.ex-table td.ex-vis .pips{justify-content:flex-end}
@media (max-width:480px){.ex-table th.ex-today,.ex-table td.ex-today{width:4.2em}.ex-table .ex-wk-h,.ex-table td.ex-wk-n{padding-left:10px}.ex-table td.ex-vis{width:50px}.ex-table td.ex-vis .meter{width:44px}}
.qa-list li[hidden]{display:none}
/* v1.0.43 — blood work summary */
.lab-sum h3{margin:16px 0 6px}
.lab-stand{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.lab-stand li{border:1px solid #e3e9e5;border-left:4px solid #c9a23a;border-radius:10px;padding:10px 12px;background:#fffdf6}
.lab-stand li.far{border-left-color:#b4442c;background:#fff6f3}
.ls-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ls-val{margin-left:auto;font-weight:700}
.ls-sub{margin-top:4px;font-size:15px}
.ls-cav{margin-top:6px;font-size:14px;color:#6b4e12}
.ls-next{margin-top:6px;font-size:14px;font-weight:600;color:#4b5a53}
.lab-stand li.far .ls-next{color:#8f3320}
.lab-far-note{background:#fff0eb;border:1px solid #f0c4b6;border-radius:10px;padding:10px 12px;margin:0 0 10px;font-weight:600;color:#7b2b1a}
.lab-q{margin:0 0 10px;padding-left:20px;display:grid;gap:6px}
.lab-ctx{margin-top:16px}.lab-ctx summary{cursor:pointer;font-weight:600}
.lab-ctx-form{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;margin-top:10px}
.lab-ctx-form .check,.lab-ctx-checks .check{display:flex;gap:8px;align-items:center;flex-basis:100%}
.lab-ctx-checks{display:grid;gap:6px;margin:8px 0}
@media print{body:has(.lab-sum) :is(nav,header,footer,form,.btn,.lab-ctx,#results,.page-head .lede,.draw-nav,.tip){display:none!important}body:has(.lab-sum) .lab-sum{border:0;box-shadow:none}}
/* v1.0.44 — saves happen in place; the confirmation shows here */
.live-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom));z-index:120;width:min(92vw,460px);pointer-events:none}
@media (min-width:1000px){.live-toast{bottom:24px}}
.toast-msg{pointer-events:auto;display:flex;align-items:center;gap:10px;background:#1f3a2f;color:#fff;border-radius:12px;padding:12px 14px;box-shadow:0 8px 24px rgba(20,40,30,.25);font-size:15px;animation:tipFade .15s ease-out}
.toast-msg.err{background:#7b2b1a}
.toast-msg a{color:#fff;font-weight:700;text-decoration:underline}
.toast-x{margin-left:auto;background:transparent;border:0;color:#fff;font-size:16px;cursor:pointer;padding:2px 6px}
form.busy{opacity:.7}
/* v1.0.45 — edit a workout in place */
.w-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;justify-content:flex-end}
.w-edit{flex:0 0 auto}
.w-edit[open]{flex-basis:100%}  /* v1.0.47: closed Edit sits at the right; full width only when open */
.rows li:has(.w-edit[open]){flex-wrap:wrap}
.w-edit>summary{list-style:none;display:inline-block}
.w-edit>summary::-webkit-details-marker{display:none}
.w-edit[open]>summary{margin-bottom:8px}
.w-edit-form{border:1px solid #dfe7e2;border-radius:12px;padding:12px;background:#f7faf8;margin-top:4px}
.w-actions:has(.w-edit[open]){flex-basis:100%;justify-content:flex-start}
.ex-table td.ex-wk-n{white-space:normal}
/* v1.0.47 — weigh-in more, recent weigh-ins, custom water */
.weigh-more{margin-top:8px}.weigh-more summary,.weigh-list summary{cursor:pointer;font-size:14px;color:var(--sage-deep,#2f6b55);font-weight:600}
.weigh-list{margin-top:12px}.weigh-list .rows{margin-top:6px}
.water-custom{display:flex;gap:6px;align-items:center}.water-custom input{width:7.5em}
.rows li:has(> .w-edit){flex-wrap:wrap}
/* v1.0.48 — edit a logged meal (in the pop-up panel) */
.meal-edit-form fieldset.me-line{border:1px solid #dfe7e2;border-radius:10px;padding:8px 10px;margin:0}
.meal-edit-form legend{font-weight:600;font-size:14px;padding:0 4px}
.meal-edit-form .me-est input{width:6em}
.meal-edit-form .field-row{gap:8px 12px}
.meal-slot{flex-wrap:wrap}
