:root {
  --bg: #f6f9f7; --card: #fff; --ink: #10261d; --muted: #5a6d64; --line: #dde7e2;
  --brand: #0f766e; --brand-ink: #fff; --brand-soft: #e3f3ef; --good: #15803d; --warn: #b45309; --warn-soft: #fff6e6;
  --bad: #b91c1c; --bad-soft: #fdecec; --chip: #eef4f1; --shadow: 0 1px 2px rgba(16,38,29,.06), 0 4px 16px rgba(16,38,29,.06);
  --r: 14px; --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1513; --card: #14201c; --ink: #e5efe9; --muted: #9db1a7; --line: #24342e; --brand: #2dd4bf; --brand-ink: #062320;
    --brand-soft: #123a33; --good: #4ade80; --warn: #fbbf24; --warn-soft: #2f2410; --bad: #f87171; --bad-soft: #351616; --chip: #1b2b26;
    --shadow: none; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-underline-offset: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* CTA strip — always visible */
.cta-strip { position: sticky; top: 0; z-index: 40; background: var(--brand); color: var(--brand-ink); font-size: .9rem; }
.cta-strip a { color: inherit; text-decoration: none; display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .55rem 16px; font-weight: 600; text-align: center; }
.cta-strip a span.arrow { background: rgba(255,255,255,.2); border-radius: 999px; padding: .1rem .6rem; white-space: nowrap; }

header.site { background: var(--card); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.logo svg { width: 28px; height: 28px; }
nav.main { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav.main a { color: var(--ink); text-decoration: none; padding: .4rem .7rem; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
nav.main a:hover, nav.main a[aria-current] { background: var(--chip); }
nav.main a.btn { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 640px) { nav.main { margin-left: 0; width: 100%; padding-bottom: 8px; flex-wrap: wrap; } nav.main a { padding: .35rem .6rem; } header.site .wrap { padding-top: 6px; } }

main { padding: 18px 0 64px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 999px; padding: .7rem 1.2rem; font: inherit; font-weight: 650;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; cursor: pointer; min-height: 44px; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.soft { background: var(--brand-soft); color: var(--ink); }
.btn.small { padding: .35rem .8rem; min-height: 34px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--chip); border-radius: 999px; padding: .2rem .65rem; font-size: .82rem; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-eu { background: #e8eefc; color: #1e3a8a; }
.badge-src { background: var(--brand-soft); }
@media (prefers-color-scheme: dark) { .badge-eu { background: #1b2647; color: #c7d4ff; } }

/* hero */
.hero { padding: 28px 0 8px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 46em; }
.search { display: flex; gap: 8px; margin: 16px 0 6px; max-width: 640px; }
.search input { flex: 1; min-width: 0; font: inherit; padding: .75rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.search input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--muted); margin-top: 14px; }
.trust b { color: var(--ink); }

.goal-card { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.goal-card .ic { font-size: 1.5rem; line-height: 1; }
.goal-card b { display: block; }
.goal-card small { color: var(--muted); }
.goal-card:hover { border-color: var(--brand); }

/* evidence blocks */
.claim { border-left: 4px solid var(--brand); padding: 10px 12px; background: var(--card); border-radius: 0 10px 10px 0; margin: 8px 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.claim q { font-weight: 600; quotes: "“" "”"; }
.claim .how { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.note { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 12px; padding: 12px 14px; }
.note.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.note h3 { margin-top: 0; }
ul.src { padding-left: 1.1em; }
ul.src li { margin: .3em 0; }
.cite { font-size: .8rem; white-space: nowrap; }
.cite a { text-decoration: none; background: var(--chip); padding: .05rem .45rem; border-radius: 6px; margin-left: 2px; }

/* tables */
.tbl { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; background: var(--chip); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
details summary { cursor: pointer; }
details.ref summary { font-size: .8rem; color: var(--muted); }
details.ref div { font-size: .78rem; color: var(--muted); max-width: 34em; }

.food-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.food-row:last-child { border-bottom: 0; }
.food-row a.fname { font-weight: 650; }
.kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.kpi { background: var(--chip); border-radius: 10px; padding: 6px 10px; font-size: .85rem; }
.kpi b { display: block; font-size: 1.05rem; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 90px; font-size: .85rem; color: var(--muted); background: var(--card); }
footer.site a { color: var(--muted); }

/* ---------- Planner app ---------- */
.app main { padding-bottom: 96px; }
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--brand); }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field label { font-weight: 600; }
.field input, .field select { font: inherit; padding: .65rem .8rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); min-height: 44px; overflow-y: hidden; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .pick { font: inherit; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .45rem .9rem; cursor: pointer; min-height: 40px; }
.seg button[aria-pressed="true"], .pick[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); font-weight: 650; }
.pick { display: inline-flex; gap: .35rem; align-items: center; }
.bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width .4s; }
.bar.done > span { background: var(--good); }
.bar.over > span { background: var(--bad); }
.target { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; }
.target .bar { grid-column: 1 / -1; }
.target .lab { font-weight: 600; font-size: .95rem; }
.target .val { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meal { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--card); }
.meal.eaten { border-color: var(--good); background: color-mix(in srgb, var(--good) 7%, var(--card)); }
.meal-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meal-h .slot { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.meal-h h3 { margin: 2px 0; }
.items { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.items button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 999px; padding: .25rem .65rem; cursor: pointer; }
.items button:hover { border-color: var(--brand); }
.why { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.check { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 1.2rem; cursor: pointer; flex: none; color: var(--good); }
.meal.eaten .check { background: var(--good); color: #fff; border-color: var(--good); }
.items .item { display: inline-flex; }
.items .item > button:first-child { border-radius: 999px 0 0 999px; }
.items .item > .iswap { border-left: 0; border-radius: 0 999px 999px 0; padding: .25rem .55rem; color: var(--brand); font-weight: 700; }
.items .item.ate > button:first-child { color: var(--good); font-weight: 650; }
.items .item.changed > button:first-child { border-style: dashed; border-color: var(--brand); }
.meal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.view-h { margin-top: 1em; flex-wrap: wrap; gap: 8px; }
.view-h h2 { margin: 0; }
.view-h .seg button { min-height: 36px; padding: .3rem .75rem; font-size: .88rem; }
.checklist { list-style: none; padding: 0; margin: 4px 0 0; }
.checklist li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.checklist .check { width: 38px; height: 38px; font-size: 1.05rem; }
.checklist li.ate .check { background: var(--good); color: #fff; border-color: var(--good); }
.checklist li.ate .cl-name b { text-decoration: line-through; opacity: .65; }
.cl-name { font: inherit; background: none; border: 0; color: var(--ink); text-align: left; padding: 0; cursor: pointer; }
.cl-why { text-align: right; max-width: 11em; }
.nowrap { white-space: nowrap; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: space-around; z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: 8px 4px 10px; color: var(--muted); text-decoration: none; font-size: .75rem; display: grid; gap: 2px; }
.tabbar a span { font-size: 1.25rem; }
.tabbar a[aria-current] { color: var(--brand); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; z-index: 80; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.win { background: color-mix(in srgb, var(--good) 12%, var(--card)); border: 1px solid var(--good); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px 28px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }
.sheet .close { float: right; }
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.day-tabs button { font: inherit; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: .4rem .7rem; cursor: pointer; min-width: 56px; }
.day-tabs button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.water { display: flex; gap: 6px; flex-wrap: wrap; }
.water button { width: 38px; height: 44px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: 1.1rem; }
.water button.on { background: #dbeafe; border-color: #60a5fa; }
@media (prefers-color-scheme: dark) { .water button.on { background: #17305a; } }
.suggest { display: flex; flex-direction: column; gap: 4px; }
.suggest button { text-align: left; font: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; cursor: pointer; color: var(--ink); }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.ring b { background: var(--card); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; }

/* "How it works" flows */
.note.good { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.flow-wrap { margin-top: 8px; }
.flow-map { list-style: none; padding: 0; margin: 12px 0 18px; display: flex; flex-wrap: wrap; gap: 6px 4px; }
.flow-map li { display: flex; align-items: center; }
.flow-map li + li::before { content: "→"; color: var(--muted); margin: 0 4px; }
.flow-map a { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem .3rem .3rem; text-decoration: none; color: var(--ink); font-size: .85rem; font-weight: 600; }
.flow-map a:hover { border-color: var(--brand); }
.flow-map .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .75rem; }
.flow { list-style: none; padding: 0; margin: 0; }
.flow .step { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding-bottom: 18px; scroll-margin-top: 60px; }
.flow .step:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: linear-gradient(var(--brand), var(--line)); }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; position: relative; z-index: 1; }
.step-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.step-t { margin: .1em 0 .4em; font-size: 1.08rem; }
.step-body p { margin: .3em 0 .6em; }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0; }
.step-body .col { border-radius: 10px; padding: 10px 12px; }
.step-body .col h5 { margin: 0 0 4px; font-size: .9rem; }
.step-body .col ul { margin: 0; padding-left: 1.1em; font-size: .9rem; }
.step-body .col li { margin: 3px 0; }
.col.hinder { background: var(--bad-soft); }
.col.help { background: var(--brand-soft); }
.col.nutr { background: var(--chip); margin-top: 8px; }
.nclaim { padding: 8px 0; border-top: 1px dashed var(--line); }
.nclaim:first-of-type { border-top: 0; }
.nclaim q { font-weight: 600; font-size: .92rem; quotes: "“" "”"; }
.nclaim .how { font-size: .8rem; color: var(--muted); }
.nclaim .chips { margin-top: 6px; }
.chip.food { background: var(--card); border-color: var(--line); color: var(--brand); font-weight: 600; }
.chip.food:hover { border-color: var(--brand); }
.chip.step-chip { font-size: .75rem; background: var(--brand-soft); }
.opt-slot h3 { margin-top: 1.2em; }
.card.opt b { display: block; }
@media (max-width: 640px) { .flow .step { grid-template-columns: 28px 1fr; gap: 8px; } .step-n { width: 28px; height: 28px; font-size: .85rem; } .flow .step:not(:last-child)::before { left: 13px; top: 30px; } .step-body { padding: 12px; } }
.how-link { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); margin: 8px 0; font-size: 1.4rem; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.how-link b { font-size: 1rem; }

/* Quick answer + solution-first steps */
.quick { background: var(--card); border: 2px solid var(--brand); border-radius: var(--r); padding: 14px 16px 10px; margin: 12px 0 8px; box-shadow: var(--shadow); }
.quick > h2, .quick > h3 { margin: .1em 0 .2em; }
.quick-grid, .step-solve { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 18px; margin-top: 8px; }
.qcol h3, .qcol h5 { margin: .3em 0 .3em; font-size: .95rem; }
.qlist { list-style: none; margin: 0; padding: 0; }
.qlist > li { border-bottom: 1px solid var(--line); }
.qlist > li:last-child { border-bottom: 0; }
.qlist summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 2px; cursor: pointer; list-style: none; }
.qlist summary::-webkit-details-marker { display: none; }
.qlist summary::after { content: "›"; color: var(--muted); transition: transform .15s; margin-left: 2px; }
.qlist details[open] summary::after { transform: rotate(90deg); }
.qn { font-weight: 650; }
.qw { color: var(--muted); font-size: .82rem; text-align: right; margin-left: auto; }
.qcol.eat .qn { color: var(--brand); }
.qcol.avoid .qn { color: var(--bad); }
.qd { padding: 2px 4px 10px; font-size: .88rem; }
.qr { padding: 6px 0; border-top: 1px dashed var(--line); }
.qr:first-child { border-top: 0; }
.qgoal { background: var(--brand-soft); border-radius: 8px; padding: 8px 10px; margin: 4px 0 6px; }
.qgoal p { margin: 4px 0 0; }
.qev { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; margin: 6px 0 0; }
.lvl { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; border-radius: 6px; padding: .05rem .4rem; vertical-align: 1px; white-space: nowrap; }
.lvl-eu { background: #1d4ed8; color: #fff; }
.lvl-official { background: var(--brand); color: var(--brand-ink); }
.lvl-trial { background: #7c3aed; color: #fff; }
.lvl-cohort { background: #b45309; color: #fff; }
.lvl-review { background: var(--chip); color: var(--ink); border: 1px solid var(--line); }
.legend { margin: 10px 0 2px; line-height: 2; }
.steplink { font-size: .78rem; font-weight: 600; margin-right: 4px; }
.root { background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; font-size: .9rem; margin: 4px 0 8px; }
.how-detail { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.how-detail > summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--brand); padding: 4px 0; }
.how-detail .col { margin: 8px 0; }
details.more { margin-top: 1.4em; }
details.more > summary { cursor: pointer; }
details.more > summary h2 { display: inline; font-size: 1.15rem; }

/* ---------- Ask (AI assistant) ---------- */
.ask { max-width: 760px; }
.chat { display: grid; gap: 12px; margin: 16px 0; }
.msg { border-radius: 14px; padding: 10px 14px; line-height: 1.5; }
.msg p { margin: .35em 0; }
.msg ul { margin: .35em 0; padding-left: 1.2em; }
.msg li { margin: .2em 0; }
.msg.user { background: var(--brand-soft); justify-self: end; max-width: 85%; }
.msg.bot { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ask-status { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.ask-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: askpulse 1s ease-in-out infinite; }
@keyframes askpulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ask-status .dot { animation: none; } }
.ask-err { color: var(--bad); }
.ask-src, .ask-next { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ask-form { align-items: flex-end; position: sticky; bottom: 0; background: var(--bg); padding: 8px 0; margin: 0; max-width: none; }
.ask-form textarea { flex: 1; font: inherit; resize: none; border: 1.5px solid var(--line); border-radius: 14px; padding: .6rem .8rem; background: var(--card); color: var(--ink); min-height: 44px; }
#examples { margin: 4px 0 12px; }
#examples[hidden] { display: none; }
#examples .chip { cursor: pointer; font: inherit; font-size: .85rem; }
.ask-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 700; padding: .65rem 1rem; border-radius: 999px; box-shadow: var(--shadow); }
.ask-fab:hover { filter: brightness(1.08); }
.src-ref { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 650; line-height: 1; padding: .2rem .45rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); text-decoration: none; vertical-align: .1em; white-space: nowrap; }
.src-ref svg { width: 11px; height: 11px; }
.src-ref:hover { background: var(--brand); color: var(--brand-ink); }

/* ---------- food photos ---------- */
.fimg { display: inline-block; width: 24px; height: 24px; object-fit: cover; border-radius: 7px; vertical-align: middle; margin: -3px 7px -1px 0; flex: none; background: var(--chip); box-shadow: 0 0 0 1px var(--line); }
.fimg[width="18"] { width: 18px; height: 18px; border-radius: 5px; margin-right: 5px; }
.fimg[width="20"] { width: 20px; height: 20px; border-radius: 6px; margin-right: 5px; }
.fimg[width="22"] { width: 22px; height: 22px; border-radius: 6px; }
.fimg[width="28"] { width: 28px; height: 28px; border-radius: 8px; }
.fimg[width="44"] { width: 44px; height: 44px; border-radius: 12px; margin: 0; }
.fimg.big { width: 96px; height: 96px; border-radius: 20px; margin: 0; box-shadow: var(--shadow); }
.sheet .fimg.big { width: 64px; height: 64px; border-radius: 16px; }
.food-head { display: flex; align-items: center; gap: 14px; margin: .4em 0; }
.food-head h1, .food-head h2 { margin: 0; }
.goal-card .fimg { align-self: center; }
.food-link { white-space: nowrap; }
.qlist summary { align-items: center; }
.qn { display: inline-flex; align-items: center; gap: 9px; }
.qn .fimg { width: 32px; height: 32px; border-radius: 9px; margin: 0; }
.cl-name { display: flex; align-items: center; gap: 10px; }
.cl-name .fimg { width: 36px; height: 36px; border-radius: 10px; margin: 0; }
.suggest button .fimg { float: left; margin: 2px 10px 4px 0; }

/* official amounts on nutrient pages: one line per authority */
.amounts { list-style: none; padding: 0; margin: 8px 0 4px; }
.amounts li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.amounts li:last-child { border-bottom: 0; }
.amounts .who { display: inline-block; min-width: 4.6em; margin-right: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: .1rem .4rem; text-align: center; }

/* calories & macros chart (planner); colors validated for colour-blind separation on both surfaces */
:root { --m-pro: #1baf7a; --m-fat: #eb6834; --m-carb: #2a78d6; --m-oth: #a3aba7; }
@media (prefers-color-scheme: dark) { :root { --m-pro: #199e70; --m-fat: #d95926; --m-carb: #3987e5; --m-oth: #5d6a64; } }
.macro-card { margin: 10px 0; }
.macro { text-align: center; }
.mtop { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.mkcal { font-size: 2rem; line-height: 1; color: var(--ink); }
.mbody { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; flex: none; }
.donut circle { fill: none; stroke-width: 22; }
.donut circle:hover { stroke-width: 26; }
.donut.empty { border-radius: 50%; border: 22px solid var(--line); box-sizing: border-box; }
.donut .m-pro, .mleg i.m-pro, .mval i.m-pro { stroke: var(--m-pro); background: var(--m-pro); }
.donut .m-fat, .mleg i.m-fat, .mval i.m-fat { stroke: var(--m-fat); background: var(--m-fat); }
.donut .m-carb, .mleg i.m-carb, .mval i.m-carb { stroke: var(--m-carb); background: var(--m-carb); }
.donut .m-oth, .mleg i.m-oth { stroke: var(--m-oth); background: var(--m-oth); }
.mlist { display: grid; gap: 6px; text-align: left; }
.mrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mval { display: inline-flex; align-items: center; gap: 6px; min-width: 7.5em; }
.mval b { font-size: 1.15rem; }
.mval i, .mleg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mchip { font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.mchip.ok { color: var(--good); border-color: currentColor; }
.mlegend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.mleg { display: inline-flex; align-items: center; gap: 5px; }
