/* Workout Planner: ember orange on warm brown. Light and dark themes from the same tokens; every text colour meets WCAG 2.2 AA on its background. */
:root {
  --bg: #fbf4ef; --card: #ffffff; --ink: #1f1712; --muted: #5f4b40; --line: #eadfd8;
  --brand: #b23c0c; --brand-ink: #ffffff; --link: #9a3409; --head: #3b1407; --head-ink: #ffffff; --head-soft: #f4d3c1;
  --danger: #b42318; --danger-ink: #ffffff; --focus: #1d4ed8;
  --ok-bg: #e5f4ea; --ok-ink: #14532d; --warn-bg: #fff3d4; --warn-ink: #5e4100; --err-bg: #fde8e6; --err-ink: #8a1c12;
  --tag-bg: #f6ebe3; --track: #eadfd8; --chart-line: #b23c0c; --chart-grid: #eadfd8; --chart-target: #5f4b40;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140d0a; --card: #1d1410; --ink: #f2e9e4; --muted: #c3b1a6; --line: #3a2b24;
    --brand: #ffa47a; --brand-ink: #2a0e03; --link: #ffb592; --head: #0c0705; --head-ink: #ffffff; --head-soft: #f4d3c1;
    --danger: #ff8f80; --danger-ink: #2a0905; --focus: #93c5fd;
    --ok-bg: #143823; --ok-ink: #c8efd2; --warn-bg: #3a2e0c; --warn-ink: #ffe3a3; --err-bg: #3d1611; --err-ink: #ffd2cb;
    --tag-bg: #2b1f19; --track: #3a2b24; --chart-line: #ffa47a; --chart-grid: #3a2b24; --chart-target: #c3b1a6;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 1.2rem 0 .6rem; }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
p { margin: 0 0 .8rem; }
:is(a, button, input, select, textarea, summary, label.btn, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--card); color: var(--ink); padding: 8px 12px; z-index: 2000; }
.skip:focus { left: 8px; top: 8px; }
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; }
main:focus { outline: none; }

/* Header */
.site-header { background: var(--head); color: var(--head-ink); }
.site-header .hbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { color: var(--head-ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; padding: 8px 0; }
.brand span, .hero h1 span { margin-right: .3em; }
.nav-out { color: var(--head-soft); padding: 8px 0; }
.site-header .btn.small { background: var(--head-ink); color: var(--head); }
.menu { border-top: 1px solid rgba(255,255,255,.12); }
.menu-row { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.menu a { color: var(--head-soft); text-decoration: none; padding: 10px 0; display: inline-block; border-bottom: 3px solid transparent; min-height: 24px; }
.menu a:hover { color: var(--head-ink); }
.menu a.active { color: var(--head-ink); border-bottom-color: var(--head-soft); font-weight: 600; }

/* Blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; }
.card.narrow { max-width: 560px; margin: 24px auto; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } }
/* Two cards side by side (My Finds: found | added; Groups: yours | everyone's), stacked on phones. */
.cols-2 { align-items: start; margin-bottom: 16px; }
.cols-2 > .card { margin: 0; min-width: 0; }
.grid.two.tight { grid-template-columns: 1fr 1fr; gap: 12px; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.wrap-row { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .3rem 0 .6rem; }
.center { text-align: center; }
.plain { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); justify-content: space-between; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--tag-bg); color: var(--muted); vertical-align: middle; }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.guess-tag { background: var(--err-bg); color: var(--err-ink); }
.more-added summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 10px 0; min-height: 24px; }
.lm > span:last-child .tag { align-self: flex-start; margin: 2px 0; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 .2rem; }
.found-badge { color: var(--ok-ink); background: var(--ok-bg); display: inline-block; padding: 4px 10px; border-radius: 8px; font-weight: 600; }
.stat strong { font-size: 2rem; }
/* Alerts */
.alert, .flash { padding: 12px 14px; border-radius: 8px; margin: 0 0 14px; }
.alert.ok, .flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert.error, .flash.error { background: var(--err-bg); color: var(--err-ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--brand);
  border-radius: 10px; padding: 9px 16px; min-height: 44px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--link); }
.btn.big { font-size: 1.1rem; padding: 12px 22px; min-height: 52px; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: .92rem; }
.btn.wide { width: 100%; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.linkish { background: none; border: 0; padding: 4px 0; min-height: 24px; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: var(--danger); }
form { margin: 0; }

/* Forms */
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 750; font-size: 1.1rem; margin-bottom: 8px; padding: 0; }
.field { margin: 0 0 14px; }
.field > label, .field > .label { display: block; font-weight: 650; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=file], select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted);
  border-radius: 8px; background: var(--card); color: var(--ink); }
input[type=file] { padding: 8px; }
textarea { resize: vertical; }
.check label { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.check input { width: 22px; height: 22px; margin-top: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.preview { display: block; max-height: 280px; width: auto; border-radius: 10px; margin-top: 10px; }
.inline-form .field { max-width: 420px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
/* Home */
.hero { padding: 16px 0 8px; }
.hero h1 { font-size: 2.2rem; }
.hero .how-card { margin: 12px 0 16px; }
.lead { font-size: 1.3rem; font-weight: 600; }
.steps { padding-left: 1.3rem; margin: 0 0 1rem; }
.steps li { margin-bottom: .6rem; }
.site-footer { margin-top: 24px; color: var(--ink); }   /* the shared footer fades its own text */
.site-footer a { color: var(--ink); }
@media print { .site-header, .site-footer, .actions, .btn, .day-nav, .ex-actions { display: none !important; } body { background: #fff; } .card { border: 0; } }
/* Dashboard (admins) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0 0 14px; }
.tile { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile .lbl { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tile .num { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .num.good { color: var(--ok-ink); }
.tile .num.bad { color: var(--danger); }
.tile .sub { font-size: .85rem; color: var(--muted); }
.table-wrap { position: relative; overflow-x: auto; margin: 0 0 16px; border-radius: 6px; }   /* (relative: hidden labels inside stay inside) */
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data caption { text-align: left; font-weight: 700; padding: 6px 0; }
table.data th, table.data td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.data tbody th { font-weight: 600; }
table.data .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Cards that open and close (app.js) */
.card-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 24px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: none; color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.card-toggle::after { content: ''; flex: none; margin-left: auto; margin-right: 4px; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .75; }
.card-toggle[aria-expanded="false"]::after { transform: rotate(-45deg); }
.card-toggle:hover { color: var(--link); }
.card.collapsed > h1, .card.collapsed > h2 { margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) { .card-toggle::after { transition: transform .15s; } }
@media print { .card-body[hidden] { display: block !important; } .card-toggle::after { display: none; } }
.search-row input[type=search] { flex: 1 1 240px; width: auto; font: inherit; font-size: 16px; padding: 8px 12px; border: 1px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--ink); }
.review h3, .card-body > h3 { font-size: 1.05rem; margin: 14px 0 6px; }
input[type=search], input[type=url], input[type=date], input[type=number] { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--ink); }
.grid.three { grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.grid.two.tight-cols { gap: 0 14px; }
.check-inline { display: inline-flex; gap: 6px; align-items: center; min-height: 24px; }
.check-inline input { width: 20px; height: 20px; }
h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.lead-small { font-size: 1.15rem; margin: 0 0 .4rem; }
.facts.three { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.chips { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 28px; background: var(--tag-bg); color: var(--ink); border-radius: 99px; padding: 2px 12px; font-size: .92rem; text-decoration: none; }
a.chip:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.hero-search { max-width: 560px; margin: 0 0 12px; }
.filters select { width: auto; }
.spread { justify-content: space-between; }
/* A lone button, not a card (cards fold; a single button has nothing to fold). */
.actions-bar { margin: 0 0 16px; }
/* A card heading with a link in it keeps the link; its fold button sits beside it, named for the heading. */
.has-side-toggle { display: flex; align-items: center; gap: 10px; }
.card-toggle.card-toggle-side { width: auto; min-width: 32px; min-height: 32px; margin-left: auto; justify-content: center; flex: none; }
.card-toggle.card-toggle-side::after { margin: 0; }
input[type=time] { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--ink); }
.status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .85rem; font-weight: 700; background: var(--tag-bg); color: var(--ink); }
.status.reading { background: var(--ok-bg); color: var(--ok-ink); }
.status.next { background: var(--warn-bg); color: var(--warn-ink); }
.status.dropped { background: var(--err-bg); color: var(--err-ink); }
.data { width: 100%; border-collapse: collapse; }
fieldset { min-width: 0; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.inline-fields .field { margin: 0 0 8px; flex: 1 1 11rem; } .inline-fields .narrow-field { flex: 0 1 9rem; }
input[type=number], input[type=tel], input[type=date], input[type=time], input[type=url] { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--ink); }
.check-row { display: flex; gap: 10px; align-items: center; min-height: 32px; margin: 0 0 4px; }
.check-row input { width: 22px; height: 22px; flex: none; }
.check-row.pill { display: inline-flex; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-weight: 600; margin: 0; }
.check-row.pill:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--tag-bg); }
form.inline { display: inline-block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 12px 0 0; }
.search .filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; margin: 10px 0 0; }
.search .filters .field { margin: 0 0 10px; }
.search .filters select { width: 100%; }
.rows { list-style: none; padding: 0; margin: 0 0 10px; }
.rows > li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; }
.rows > li:first-child { border-top: 0; }
.rows .main { flex: 1 1 16rem; min-width: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 8px; }
.ticks li { padding: 4px 0 4px 26px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 10px; height: 5px; border-left: 2px solid var(--ok-ink); border-bottom: 2px solid var(--ok-ink); transform: rotate(-45deg); }
.jump { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.jump a { min-height: 24px; display: inline-block; padding: 4px 0; }
.card > input[type="hidden"] + :is(h1, h2), .card > input[type="hidden"] + input[type="hidden"] + :is(h1, h2), .card > input[type="hidden"] + input[type="hidden"] + input[type="hidden"] + :is(h1, h2),
.card > input[type="hidden"] + input[type="hidden"] + input[type="hidden"] + input[type="hidden"] + :is(h1, h2) { margin-top: 0; }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }
.crumbs { margin: 0 0 10px; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--tag-bg); color: var(--muted); vertical-align: middle; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
table.list { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
table.list caption { text-align: left; font-weight: 700; padding: 4px 0 8px; }
table.list th, table.list td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.choice-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.small-hero h1 { font-size: 1.9rem; }
.note-text { white-space: normal; background: var(--tag-bg); border-radius: 8px; padding: 8px 12px; }

/* ── Workout Planner ───────────────────────────────────────────────────── */
/* An exercise in a plan */
.exlist { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: ex; }
.exlist > li { counter-increment: ex; border-top: 1px solid var(--line); padding: 10px 0 10px 38px; position: relative; }
.exlist > li:first-child { border-top: 0; }
.exlist > li::before { content: counter(ex); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--tag-bg); color: var(--link); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.ex-main { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.ex-name { font-size: 1.05rem; }
.ex-dose { font-weight: 750; color: var(--link); font-variant-numeric: tabular-nums; }
.ex-rest { font-size: .88rem; color: var(--muted); }
.ex-note { margin: 2px 0 0; font-style: italic; }
.ex-how { margin: 4px 0 0; }
.ex-how > summary { cursor: pointer; color: var(--link); font-size: .92rem; min-height: 24px; display: inline-flex; align-items: center; }
.ex-how p { margin: 6px 0 0; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; }
.ex-actions .btn.small { min-width: 40px; }
.day-sub { font-weight: 700; margin: 0 0 6px; }
.rest-day { background: var(--tag-bg); border-radius: 10px; padding: 12px 14px; }
.day-edit { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.day-edit > summary { cursor: pointer; color: var(--link); min-height: 32px; display: flex; align-items: center; font-weight: 600; }
.day-edit form { margin-top: 10px; }
.copy-form { margin-top: 12px; }
.lib-list { list-style: none; padding: 0; margin: 0; }
.lib-list > li { border-top: 1px solid var(--line); padding: 12px 0; }
.lib-list > li:first-child { border-top: 0; padding-top: 0; }
.lib-list h3 { margin: 0 0 2px; }
.lib-list p { margin: 0 0 6px; }
.add-to { margin-top: 4px; }
ul.rows.lib .main { flex: 1 1 18rem; }

/* The week (home) */
.week { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd a { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); min-height: 76px; height: 100%; }
.wd a:hover .wd-title { text-decoration: underline; }
.wd-name { font-weight: 800; font-size: .9rem; }
.wd-title { font-size: .82rem; line-height: 1.25; overflow-wrap: anywhere; }
.wd-state { font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: auto; }
.wd.st-done a { background: var(--ok-bg); border-color: transparent; }
.wd.st-done .wd-state { color: var(--ok-ink); }
.wd.st-rest a { background: var(--tag-bg); border-color: transparent; }
.wd.is-today a { border: 2px solid var(--brand); }
@media (max-width: 640px) {
  .week { grid-template-columns: 1fr; gap: 0; }
  .wd a { flex-direction: row; align-items: baseline; gap: 10px; min-height: 44px; border-radius: 0; border-width: 0 0 1px; padding: 10px 8px; }
  .wd.is-today a { border-width: 2px; border-radius: 10px; }
  .wd-name { flex: 0 0 2.6rem; } .wd-title { font-size: .95rem; flex: 1; } .wd-state { margin: 0; }
}

/* A day: moving between days, and the log form */
.day-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; margin: 0 0 12px; }
.day-nav a { min-height: 32px; display: inline-flex; align-items: center; }
.log-row { border-top: 1px solid var(--line); padding: 10px 0 2px; margin: 0; }
.log-row legend { font-size: 1.02rem; margin: 0 0 4px; padding: 0; }
.log-nums { display: flex; flex-wrap: wrap; gap: 0 10px; }
.log-nums .field { flex: 0 1 7.5rem; margin-bottom: 8px; }
.log-nums .field.grow { flex: 1 1 14rem; }
.log-row:has(input[name$="[done]"][type=checkbox]:not(:checked)) .log-nums { opacity: .55; }
.log-row.extra { border-top-style: dashed; }
ul.logged .main { flex-basis: 100%; }

/* The month */
table.cal { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; margin: 0 -4px 6px; width: calc(100% + 8px); }
table.cal th { font-size: .8rem; color: var(--muted); font-weight: 700; padding: 2px 0; }
table.cal th abbr { text-decoration: none; }
table.cal td { vertical-align: top; padding: 0; height: 74px; }
table.cal td a { display: flex; flex-direction: column; height: 100%; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; }
table.cal td a:hover .cal-t { text-decoration: underline; }
.cal-n { font-weight: 800; font-size: .9rem; }
.cal-mark { font-weight: 800; color: var(--ok-ink); min-height: 1.1em; }
.cal-t { font-size: .74rem; line-height: 1.2; overflow-wrap: anywhere; color: var(--muted); }
td.st-done a { background: var(--ok-bg); border-color: transparent; }
td.st-done .cal-t { color: var(--ok-ink); }
td.st-rest a { background: var(--tag-bg); border-color: transparent; }
td.st-skipped .cal-mark, td.st-missed .cal-mark { color: var(--muted); }
td.is-today a { border: 2px solid var(--brand); }
@media (max-width: 560px) { table.cal td { height: 54px; } .cal-t { display: none; } table.cal td a { padding: 4px; align-items: center; } }

/* Goals, bars, and charts */
.bar { height: 10px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 6px 0 2px; max-width: 420px; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.wbar-row { display: flex; align-items: center; gap: 8px; }
.wbar { display: inline-block; height: 12px; min-width: 2px; background: var(--brand); border-radius: 0 4px 4px 0; max-width: 70%; }
.wbar.met { background: var(--ok-ink); }
table.bars td:first-child { white-space: nowrap; width: 9rem; }
svg.chart { width: 100%; height: auto; display: block; margin: 8px 0 6px; }
svg.chart .grid line { stroke: var(--chart-grid); stroke-width: 1; }
svg.chart text { fill: var(--muted); font-size: 12px; font-family: inherit; }
svg.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .pt { fill: var(--chart-line); stroke: var(--card); stroke-width: 2; }
svg.chart .pt:hover { r: 6; }
svg.chart .target { stroke: var(--chart-target); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg.chart .target-l { fill: var(--muted); font-weight: 700; }
.table-view > summary { cursor: pointer; color: var(--link); min-height: 32px; display: inline-flex; align-items: center; }

/* Food */
.food-tiles .tile { background: var(--tag-bg); }
.food-lines { padding-left: 1.2rem; margin: 0 0 8px; }
.tip { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 8px 12px; }
.tip strong { color: inherit; }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr 1fr; } .tile .num { font-size: 1.3rem; } }
