/* Dr Visit: deep indigo. Light and dark themes from the same tokens; every text colour meets WCAG 2.2 AA on its background.
   Charts use the validated reference palette (slots 1 and 2) with its own chrome tokens. */
:root {
  --bg: #f4f5fb; --card: #ffffff; --ink: #151a2d; --muted: #4b5168; --line: #dadded;
  --brand: #3730a3; --brand-ink: #ffffff; --link: #3730a3; --head: #1e1b4b; --head-ink: #ffffff; --head-soft: #d9d7f7;
  --danger: #b42318; --danger-ink: #ffffff; --focus: #b45309;
  --ok-bg: #e5f4ea; --ok-ink: #14532d; --warn-bg: #fff3d4; --warn-ink: #5e4100; --err-bg: #fde8e6; --err-ink: #8a1c12;
  --tag-bg: #eceef8; --radius: 12px;
  --surface: #ffffff; --grid: #e3e4ec; --axis: #c3c5d3; --tick: #5f6377;
  --s1: #2a78d6; --s2: #eb6834;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1120; --card: #171a2b; --ink: #e8e9f3; --muted: #a9adc6; --line: #2b2f47;
    --brand: #a5b4fc; --brand-ink: #1e1b4b; --link: #b4c0fd; --head: #0b0c1a; --head-ink: #ffffff; --head-soft: #d9d7f7;
    --danger: #ff8f80; --danger-ink: #2a0905; --focus: #f5c542;
    --ok-bg: #143823; --ok-ink: #c8efd2; --warn-bg: #3a2e0c; --warn-ink: #ffe3a3; --err-bg: #3d1611; --err-ink: #ffd2cb;
    --tag-bg: #23263b;
    --surface: #171a2b; --grid: #2a2e44; --axis: #3b3f58; --tick: #a3a7c0;
    --s1: #3987e5; --s2: #d95926;
  }
}
* { 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; }

/* Lists */
.lm-list { list-style: none; padding: 0; margin: 0 0 .8rem; }
.lm-list li + li { border-top: 1px solid var(--line); }
.lm { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); text-decoration: none; }
.lm:hover strong { text-decoration: underline; }
.lm > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.lm img, .noimg { width: 72px; height: 72px; flex: 0 0 72px; object-fit: cover; border-radius: 8px; background: var(--tag-bg); }
.noimg { display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.lm .meta { color: var(--muted); font-size: .9rem; }
.lm-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.lm-pick > .lm { flex: 1 1 240px; min-width: 0; }
.lm-pick > .btn { margin-left: auto; flex: none; }   /* "Show on map" stays on the right, even when it wraps under a long name (Tom, 2026-11-25) */

/* Page parts */
.cover { margin: 0 0 16px; }
.cover img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: var(--radius); background: #000; display: block; }
.facts { display: grid; gap: 4px 16px; grid-template-columns: 1fr; margin: 12px 0 0; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts dt { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0 0 8px; }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery li { display: flex; flex-direction: column; gap: 4px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }

.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 { 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; }

/* ── Shared bits ─────────────────────────────────────────────────────────── */
input[type=search], input[type=url], input[type=date], input[type=number], input[type=time], input[type=tel] { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--ink); }
fieldset { min-width: 0; }
h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.grid.two.tight-cols { gap: 0 14px; }
.check-inline { display: inline-flex; gap: 8px; align-items: center; min-height: 24px; font-weight: 600; }
.check-inline input { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 14px 0 0; }
.actions-bar { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.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; }
.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; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-weight: 600; }
.choice input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.choice .hint { font-weight: 400; margin: 0; display: inline; }
.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); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.cats { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.cats a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border-radius: 99px; background: var(--tag-bg); color: var(--ink); text-decoration: none; font-weight: 600; }
.cats a:hover { text-decoration: underline; }
.cats a[aria-current] { background: var(--brand); color: var(--brand-ink); }
.small-cats a { min-height: 32px; padding: 3px 12px; font-size: .92rem; }
.pager { display: flex; gap: 12px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 16px; }
.pager a { min-height: 24px; padding: 4px 0; }
.crumbs { margin: 0 0 10px; }
.crumbs a { display: inline-block; padding: 4px 0; min-height: 24px; }
.count { color: var(--muted); font-weight: 500; font-size: .9em; }
.unit { color: var(--muted); font-weight: 500; font-size: .9em; }
.lead-small { font-size: 1.1rem; margin: 0 0 .6rem; }
.h-small { font-size: 1.15rem; margin: 0 0 10px; }
.narrow-field { max-width: 260px; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert p:last-child { margin-bottom: 0; }
.example-note { border-left: 4px solid var(--brand); }
.disclaimer { color: var(--muted); text-align: center; margin: 0 0 6px; }
.prose p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.facts.one { grid-template-columns: 1fr; }
.facts dd { overflow-wrap: anywhere; }

/* ── People ──────────────────────────────────────────────────────────────── */
.people { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.people a { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); height: 100%; }
.people a:hover .p-name, .people a:focus-visible .p-name { text-decoration: underline; }
.p-body { display: flex; flex-direction: column; min-width: 0; }
.p-name { font-weight: 800; font-size: 1.08rem; overflow-wrap: anywhere; }
.p-meta { font-size: .88rem; color: var(--muted); }
.pic { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; background: var(--tag-bg); color: var(--ink); }
.pic.big { width: 96px; height: 96px; font-size: 2.4rem; }
.hue0 { background: #dfe7fb; color: #1d3a7a; } .hue1 { background: #fde4d4; color: #7a3410; } .hue2 { background: #d9f1e6; color: #0f5236; }
.hue3 { background: #efe0f7; color: #5b2477; } .hue4 { background: #fbefc9; color: #5e4100; } .hue5 { background: #d7eef4; color: #0f4c5c; }
@media (prefers-color-scheme: dark) {
  .hue0 { background: #22335c; color: #dfe7fb; } .hue1 { background: #4f2a17; color: #fde4d4; } .hue2 { background: #17402f; color: #d9f1e6; }
  .hue3 { background: #3e2550; color: #efe0f7; } .hue4 { background: #46380f; color: #fbefc9; } .hue5 { background: #163f4a; color: #d7eef4; }
}
.person-head .ph-row { display: flex; gap: 16px; align-items: flex-start; }
.person-head .ph-row > div { min-width: 0; flex: 1; }
.person-head h1 { margin-bottom: .3rem; }
.allergy { margin: 14px 0 0; }
@media (max-width: 520px) { .person-head .ph-row { flex-direction: column; } }

/* ── Visits ──────────────────────────────────────────────────────────────── */
.vlist { list-style: none; padding: 0; margin: 0 0 6px; }
.vlist li + li { border-top: 1px solid var(--line); }
.vline { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; color: var(--ink); text-decoration: none; }
.vline:hover strong, .vline:focus-visible strong { text-decoration: underline; }
.v-icon { font-size: 1.5rem; line-height: 1.2; flex: none; width: 1.8rem; text-align: center; }
.v-body { display: flex; flex-direction: column; min-width: 0; }
.v-body strong { overflow-wrap: anywhere; }
.v-meta { font-size: .9rem; color: var(--muted); }
.vlist .tag { vertical-align: baseline; }

/* ── Latest numbers ──────────────────────────────────────────────────────── */
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px; margin: 0 0 6px; }
.tile { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; height: 100%; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.tile:hover, .tile:focus-visible { border-color: var(--brand); }
.tile:hover .more, .tile:focus-visible .more { text-decoration: underline; }
.tile .lbl { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tile .num { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: .85rem; color: var(--muted); }
.tile .more { color: var(--link); font-weight: 600; margin-top: 2px; }

/* ── Number fields ───────────────────────────────────────────────────────── */
.mgroup { margin: 0 0 16px; }
.mgroup > legend { font-size: 1.02rem; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 16px; }
.mgrid.one { grid-template-columns: minmax(0, 320px); margin: 0 0 14px; }
.mf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mlabel { font-weight: 650; }
.mf input { width: 100%; font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--muted); border-radius: 8px; background: var(--card); color: var(--ink); font-variant-numeric: tabular-nums; }
.mf .pair { display: flex; align-items: flex-end; gap: 8px; }
.mf .sub { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mf .sub label, .mf .pct label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.mf .slash { font-size: 1.3rem; color: var(--muted); padding-bottom: 8px; }
.mf .pct { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.mf .pct input { max-width: 7rem; padding: 6px 8px; }
.crow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .crow { grid-template-columns: 1fr 1fr; } .crow > :first-child { grid-column: 1 / -1; } .srow { grid-template-columns: 1fr; } }
.rows-wrap .crow + .crow, .rows-wrap .srow + .srow { border-top: 1px dashed var(--line); padding-top: 8px; }
.js .child-only.is-hidden { display: none; }

/* ── Files ───────────────────────────────────────────────────────────────── */
.files { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.files li { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.f-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.f-link img, .f-icon { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--tag-bg); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.f-name { font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.f-link:hover .f-name, .f-link:focus-visible .f-name { text-decoration: underline; }
.f-meta { font-size: .85rem; color: var(--muted); }
a.f-meta { color: var(--link); }
.files form { margin: 0; }
.files .linkish.small { font-size: .88rem; }
.add-files { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }

/* ── Charts ──────────────────────────────────────────────────────────────── */
.chart-box { position: relative; margin: 6px 0 12px; border-radius: 8px; }
.chart-box:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; } .chart .grid.base { stroke: var(--axis); }
.chart .tick { fill: var(--tick); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart .direct { fill: var(--ink); font-size: 13px; font-weight: 650; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series.s1 { stroke: var(--s1); } .chart .series.s2 { stroke: var(--s2); }
.chart .end.s1, .chart .hover-dot.s1 { fill: var(--s1); } .chart .end.s2, .chart .hover-dot.s2 { fill: var(--s2); }
.chart .end, .chart .hover-dot { stroke: var(--surface); stroke-width: 2; }
.chart .hover-dot { pointer-events: none; }
.chart .crosshair { stroke: var(--tick); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-box .tip { position: absolute; pointer-events: none; background: var(--card); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.14); border-radius: 8px; padding: 6px 10px; font-size: .84rem; white-space: nowrap; z-index: 5; display: flex; flex-direction: column; }
.chart-box .tip strong { font-size: .98rem; font-variant-numeric: tabular-nums; }
.chart-box .tip span { color: var(--muted); }
.legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .88rem; color: var(--ink); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .key { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.legend .key.s1 { background: var(--s1); } .legend .key.s2 { background: var(--s2); }
.ref { border-left: 3px solid var(--line); padding-left: 10px; }

/* ── The health summary (and printing) ───────────────────────────────────── */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 16px; }
.summary section { margin: 18px 0 0; }
.summary h2 { font-size: 1.1rem; margin: 0 0 6px; border-bottom: 2px solid var(--line); padding-bottom: 3px; }
.summary .data { font-size: .92rem; }
.allergy-text { font-weight: 700; }
@media print {
  .site-header, .site-footer, .no-print, .crumbs, .actions, .actions-bar, .pager, .add-files, .btn, form.danger-zone { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, .summary { border: 0; padding: 0; margin: 0 0 14px; }
  .summary section { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
.examples-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.examples-form p { margin-top: 0; }
@media (max-width: 480px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 8px 10px; }
  .tile .num { font-size: 1.15rem; overflow-wrap: anywhere; }
}
