/* The look parted from the Trainersight coach hub on 26 October 2026, by
   instruction: rounded corners, calmer colours, a quieter header.
   Newsreader for headings, Barlow for reading and controls, JetBrains Mono
   for figures. Colour still carries meaning: red only ever means outside range
   or destructive, gold is the benchmark, green is in range; actions are
   teal so a button never looks like an alarm. Fonts are served from this
   site (OFL), so no page calls Google. */
@font-face { font-family: "Newsreader"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/newsreader-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
/* Dark is the coach hub's default. Light follows the phone's setting unless
   the person picks one in Settings (data-theme on <html>, set by theme.js
   before the page paints). Brand colours darken in light so text clears AA. */
:root {
  --ink: #111412; --coal: #1A1E1B; --coal2: #232825; --coal3: #2E3430;
  --bone: #F2EEE8; --body: #DCD8D2; --grey: #AEAEB4; --faint: #AEAEB4; /* one secondary grey: --faint is kept as a name and is the same colour (9 Nov 2026) */
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.14); --tint: rgba(255,255,255,.02);
  --red: #B64434; --red-hot: #E06552; --gold: #EFC94C; --gold-fill: #EFC94C; --green: #63B983; --orange: #E67E22;
  --s1: #63B983; --s2: #7E9BD6; --s3: #E06552;
  --band: rgba(99,185,131,.30); --out: #E06552; --out-bg: rgba(224,101,82,.12);
  --ok-bg: rgba(95,179,122,.12); --warn-bg: rgba(255,210,31,.10); --track: rgba(255,255,255,.10);
  --act: #4FAE9B; --act-ink: #0F1613; --act-hot: #65C3B0;
  --r: 6px; --rs: 4px; --pill: 6px;
  --head: "Barlow", system-ui, sans-serif; --serif: "Newsreader", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #F4F2EE; --coal: #FFFFFF; --coal2: #F1EEE9; --coal3: #E5E1DA;
    --bone: #121215; --body: #26262B; --grey: #4A4A50; --faint: #4A4A50;
    --line: rgba(0,0,0,.09); --line-2: rgba(0,0,0,.16); --tint: rgba(0,0,0,.015);
    --red: #A32E22; --red-hot: #B3311F; --gold: #826600; --gold-fill: #E0B416; --green: #2F7A48;
    --s1: #2F7A48; --s2: #3D63B0; --s3: #B3311F;
    --band: rgba(47,122,72,.20); --out: #B3311F; --out-bg: rgba(179,49,31,.08);
    --ok-bg: rgba(47,122,72,.09); --warn-bg: rgba(224,180,22,.14); --track: rgba(0,0,0,.08);
    --act: #2E7466; --act-ink: #FFFFFF; --act-hot: #27655A;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ink: #F4F2EE; --coal: #FFFFFF; --coal2: #F1EEE9; --coal3: #E5E1DA;
  --bone: #121215; --body: #26262B; --grey: #4A4A50; --faint: #4A4A50;
  --line: rgba(0,0,0,.09); --line-2: rgba(0,0,0,.16); --tint: rgba(0,0,0,.015);
  --red: #A32E22; --red-hot: #B3311F; --gold: #826600; --gold-fill: #E0B416; --green: #2F7A48;
  --s1: #2F7A48; --s2: #3D63B0; --s3: #B3311F;
  --band: rgba(47,122,72,.20); --out: #B3311F; --out-bg: rgba(179,49,31,.08);
  --ok-bg: rgba(47,122,72,.09); --warn-bg: rgba(224,180,22,.14); --track: rgba(0,0,0,.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ink); color: var(--body); font: 16px/1.5 "Barlow", system-ui, sans-serif; }
a { color: var(--bone); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 56px; }
[hidden] { display: none !important; }

/* top bar */
header.top { border-bottom: 1px solid var(--line); background: var(--coal); }
header.top .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.brand { font-family: var(--head); font-weight: 700; font-size: 18px; letter-spacing: 0; color: var(--bone); text-decoration: none; }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; }
nav.main a { font: 600 13.5px "Barlow", system-ui, sans-serif; color: var(--grey); text-decoration: none; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--bone); }
nav.main a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--act); }

/* type */
h1 { font-family: var(--head); font-weight: 700; font-size: 30px; letter-spacing: -.01em; color: var(--bone); margin: 22px 0 2px; line-height: 1.12; }
h2 { font-family: var(--head); font-weight: 600; font-size: 18px; letter-spacing: 0; color: var(--bone); margin: 0 0 12px; }
.k { font-family: var(--mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.sub { color: var(--grey); margin: 0 0 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--grey); font-size: 14px; }

/* panels */
/* One card style (9 Nov 2026): a surface with a 1px --line edge. A
   3px left bar is only ever a TONE (red, gold, green, blue) and never grey:
   a grey bar carried no meaning and read as a second card style. Where a
   row's icon and word already carry the tone (.tle), there is no bar. */
.card { background: var(--coal); border: 1px solid var(--line); padding: 18px; margin-bottom: 14px; }
.two { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; } }

/* section tabs, as on an athlete page in the hub */
.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 16px 0 18px; scrollbar-width: none; }
.tabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--grey); font: 600 14px "Barlow", system-ui, sans-serif; padding: 0 11px; min-height: 44px; cursor: pointer; }
.tabs button:hover { background: none; color: var(--bone); }
.tabs button[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--act); }
.tabs button .n { color: var(--red-hot); margin-left: 6px; }

/* hero figures */
.hero { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
@media (min-width: 760px) { .hero { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--coal); padding: 16px; min-height: 124px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.stat .v { font-family: var(--head); font-weight: 600; font-size: 34px; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.stat .v small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--grey); margin-left: 4px; letter-spacing: .04em; }
.stat .d { font-family: var(--mono); font-size: 12px; color: var(--grey); }
.stat .d.up { color: var(--green); } .stat .d.down { color: var(--red-hot); }
.stat.none .v { color: var(--faint); font-size: 22px; }
.ringwrap { display: flex; align-items: center; gap: 12px; }
.ring { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.cbadge .ring { transform: none; } /* the gauge ring turns so its arc starts at the top; a check badge borrows the class and must not turn its icon */
.ring circle { fill: none; stroke-width: 9; }
.ring .tr { stroke: var(--line-2); }
.ring .fg { stroke: var(--grey); }
.ring.green .fg { stroke: var(--green); } .ring.gold .fg { stroke: var(--gold-fill); } .ring.red .fg { stroke: var(--red-hot); }

/* the ranked list: a word in the gutter, so tone is never colour alone */
.trow { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; min-height: 52px; padding: 10px 14px; margin: 0 0 6px; cursor: pointer; background: var(--tint); border: 1px solid var(--line); color: var(--body); font: 15px/1.4 "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; text-decoration: none; }
.trow:hover { background: var(--coal2); }
.trow .tg { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.trow .tb b { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: 0; color: var(--bone); margin-right: 8px; }
.trow .tb .fig { font-family: var(--mono); font-size: 13px; color: var(--grey); }
.trow .tb .fig em { font-style: normal; color: var(--bone); }
.trow .ta { color: var(--faint); font-size: 20px; line-height: 1; }
.trow.bad { border-left: 3px solid var(--red-hot); } .trow.bad .tg { color: var(--red-hot); }
.trow.warn { border-left: 3px solid var(--gold); } .trow.warn .tg { color: var(--gold); }
.trow.ok { border-left: 3px solid var(--green); cursor: default; } .trow.ok .tg { color: var(--green); }
.trow.ok:hover { background: var(--tint); }
@media (max-width: 560px) { .trow { grid-template-columns: 64px 1fr auto; gap: 10px; padding: 9px 12px; } }

/* charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--faint); font-size: 17px; font-family: var(--mono); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--grey); margin-top: 8px; text-transform: uppercase; }
.legend i { display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; }

/* blood tables */
.labs { width: 100%; border-collapse: collapse; }
.labs td, .labs th { padding: 11px 6px; border-top: 1px solid var(--line); vertical-align: middle; text-align: left; }
.labs th { font-family: var(--mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 400; border-top: 0; }
.labs .name { color: var(--bone); }
.labs .note { display: block; font-size: 13px; color: var(--grey); margin-top: 3px; font-weight: 400; }
.labs .val { font-family: var(--mono); font-size: 14px; color: var(--bone); white-space: nowrap; }
.labs .val .u { color: var(--grey); font-size: 12px; }
.labs .rng { width: 36%; min-width: 130px; }
.labs tr.out .val { color: var(--red-hot); }
.labs td.muted { font-family: var(--mono); font-size: 12px; }
@media (max-width: 640px) { .labs .hide-sm { display: none; } .labs .rng { width: 42%; } }
.flag { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--red-hot); margin-left: 8px; }
button.link { background: none; border: 0; color: var(--bone); padding: 0; min-height: 0; font: 600 16px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
button.link:hover { background: none; }
button.link[aria-expanded="true"] { text-decoration-color: var(--act); }
.labs tr.trend td { background: var(--ink); border-top: 0; }
.labs tr.trend .chart, .labs tr.trend p { max-width: calc(100vw - 88px); }
@media (min-width: 1132px) { .labs tr.trend .chart, .labs tr.trend p { max-width: 1030px; } }
details.fold { border-top: 1px solid var(--line); }
details.fold summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--grey); list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: "+"; width: 20px; color: var(--faint); }
details.fold[open] summary::before { content: "-"; }
details.fold[open] summary { color: var(--bone); }
.meets td, .meets th { text-align: right; }
.meets td:first-child, .meets th:first-child, .meets td:nth-child(2), .meets th:nth-child(2) { text-align: left; }
.meets td { font-family: var(--mono); font-size: 14px; color: var(--bone); }
.meets td.meet { font-family: "Barlow", system-ui, sans-serif; font-size: 15px; }
.meets td.total { font-family: var(--head); font-size: 18px; font-weight: 600; }
.scroll { overflow-x: auto; }

/* states */
.empty { padding: 28px 18px; }
.banner { background: var(--out-bg); border-left: 3px solid var(--red-hot); color: var(--bone); padding: 12px 16px; margin: 16px 0; }

/* forms */
form.f { display: grid; gap: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
/* two fields side by side keep their boxes level and the same height when one
   label runs to a second line (it stretched the other field's box) */
.row > label { align-content: end; }
/* a switch inside a form is as wide as the form, so its segments share that
   width (they sat at the left of a long empty box); a medicine's strength
   and how it is taken is a sentence, so it has the whole row */
form.f > .seg > button { flex: 1 1 0; padding: 0 8px; }
#man-detlab { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font: 500 14px/1.3 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--body); } /* a field label is a sentence in the body face; mono capitals are for short figures (audit, 9 Nov 2026) */
input, select, textarea { font: 16px "Barlow", system-ui, sans-serif; color: var(--bone); background: var(--ink); border: 1px solid var(--line-2); border-radius: 0; padding: 10px 12px; min-height: 46px; width: 100%; text-transform: none; letter-spacing: 0; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
/* the skip link sits off screen until a keyboard lands on it */
.skip { position: fixed; left: 8px; top: -80px; z-index: 400; padding: 10px 14px; background: var(--solid); color: var(--bone); border: 1px solid var(--line); border-radius: var(--rs); font: 600 14px var(--head); text-decoration: none; }
.skip:focus { top: 8px; }
main:focus, .obgate:focus { outline: none; }
button, .btn { font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: 0; border: 0; border-radius: var(--pill); padding: 0 22px; min-height: 46px; cursor: pointer; background: var(--act); color: var(--act-ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .btn:hover { background: var(--act-hot); }
button.ghost, .btn.ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); }
button.ghost:hover, .btn.ghost:hover { background: var(--coal2); }
button.danger { background: transparent; color: var(--red-hot); box-shadow: inset 0 0 0 1px var(--red); }
button:disabled { opacity: .6; cursor: wait; }
.check { display: flex; gap: 10px; align-items: center; color: var(--bone); font: 15px "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
.check input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--act); }
.msg { font-family: var(--mono); font-size: 13px; min-height: 1.5em; color: var(--grey); }
.msg.err { color: var(--red-hot); }
.msg.good { color: var(--green); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.auth { max-width: 400px; margin: 12vh auto 0; }

/* The GP summary prints light. */
@media print {
  :root { --ink: #fff; --coal: #fff; --coal2: #fff; --bone: #000; --body: #111; --grey: #444; --faint: #444; --line: #bbb; --line-2: #999; --red-hot: #a32e22; }
  body { font-size: 12px; }
  header.top, .no-print { display: none !important; }
  .card { break-inside: avoid; }
  .wrap { padding: 0; max-width: none; }
}

@media (max-width: 420px) { header.top .in { padding: 6px 8px; } .brand { font-size: 16px; } nav.main a { padding: 0 8px; } }
.labs tr.trend p.note { color: var(--bone); border-left: 2px solid var(--gold); padding-left: 10px; font-size: 14px; }

/* ---------------------------------------------------------- visual layer */
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.hi { fill: currentColor; stroke: none; }
.ico.hi path { fill: currentColor; }

.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.sec h2 { margin: 0; }
.sec .k { white-space: nowrap; }
/* On a phone a long label squeezed the heading to one word a line: let the
   label wrap under the heading instead. */
@media (max-width: 480px) {
  .sec { flex-wrap: wrap; row-gap: 2px; }
  .sec h2 { flex: 1 1 auto; }
  .sec .k { white-space: normal; }
}

/* issue cards: what it is, where it sits, in one look */
.issues { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .issues { grid-template-columns: 1fr 1fr; } }
.issue { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 14px; align-items: start; background: var(--coal); border: 1px solid var(--line); border-top: 3px solid var(--red-hot); padding: 14px 16px 12px; text-decoration: none; color: var(--body); }
.issue:hover { background: var(--coal2); }
.issue .badge { grid-row: span 2; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--out-bg); color: var(--red-hot); }
.issue .sys { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.issue .nm { font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: 0; color: var(--bone); line-height: 1.18; }
.issue .plain { grid-column: 2; font-size: 14px; color: var(--grey); margin-top: -2px; }
.issue .val { grid-row: 1 / 3; grid-column: 3; text-align: right; }
.issue .val b { display: block; font-family: var(--head); font-weight: 600; font-size: 28px; line-height: 1; color: var(--red-hot); font-variant-numeric: tabular-nums; }
.issue .val small { font-family: var(--mono); font-size: 12.5px; color: var(--grey); }
.issue .gauge { grid-column: 1 / 4; margin-top: 6px; }
.pill { display: inline-block; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; margin-top: 6px; }
.pill.hi, .pill.lo { background: var(--out-bg); color: var(--red-hot); }
.pill.ok { background: var(--ok-bg); color: var(--green); }
.gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.gauge text { font-family: var(--mono); font-size: 12.5px; fill: var(--faint); }

/* quick actions */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; background: var(--coal); border: 1px solid var(--line-2); color: var(--bone); text-decoration: none; font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: 0; }
.chip:hover { background: var(--coal2); }
.chip.warn { border-color: var(--gold-fill); background: var(--warn-bg); }
.chip .ico { width: 18px; height: 18px; }
.chip small { font-family: var(--mono); font-size: 12.5px; color: var(--grey); text-transform: none; letter-spacing: 0; }

/* vitals with a sparkline each */
.vitals { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .vitals { grid-template-columns: repeat(4, 1fr); } }
.vital { background: var(--coal); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--body); min-height: 150px; }
.vital:hover { background: var(--coal2); }
.vital .top { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.vital .v { font-family: var(--head); font-weight: 600; font-size: 32px; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.vital .v small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--grey); margin-left: 4px; }
.vital .d { font-family: var(--mono); font-size: 12.5px; color: var(--grey); }
.vital .spark { margin-top: auto; height: 34px; }
.vital .spark svg { width: 100%; height: 34px; display: block; }
.vital.none .v { font-size: 18px; color: var(--faint); }
.vital .ringrow { display: flex; align-items: center; gap: 12px; }

/* body systems */
.systems { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .systems { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .systems { grid-template-columns: repeat(5, 1fr); } }
.sys-t { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--coal); border: 1px solid var(--line); border-bottom: 3px solid var(--green); text-decoration: none; color: var(--body); min-height: 112px; }
.sys-t:hover { background: var(--coal2); }
.sys-t.bad { border-bottom-color: var(--red-hot); }
.sys-t .ib { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--green); }
.sys-t.bad .ib { background: var(--out-bg); color: var(--red-hot); }
.sys-t .nm { font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: 0; color: var(--bone); line-height: 1.25; }
.sys-t .st { font-family: var(--mono); font-size: 12.5px; color: var(--green); margin-top: auto; }
.sys-t.bad .st { color: var(--red-hot); }
.dots { display: flex; gap: 3px; flex-wrap: wrap; }
.dots i { width: 8px; height: 8px; background: var(--green); display: block; }
.dots i.o { background: var(--red-hot); }

/* bloods tab: one block per body system */
.group { background: var(--coal); border: 1px solid var(--line); margin-bottom: 12px; scroll-margin-top: 12px; }
.group > summary { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.group > summary::-webkit-details-marker { display: none; }
.group .ib { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--green); }
.group.bad .ib { background: var(--out-bg); color: var(--red-hot); }
.group .gn { font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: 0; color: var(--bone); line-height: 1.2; }
.group .gw { font-size: 14px; color: var(--grey); }
.group .gs { font-family: var(--mono); font-size: 12px; color: var(--green); text-align: right; }
.group.bad .gs { color: var(--red-hot); }
.group[open] > summary { border-bottom: 1px solid var(--line); }
.trs { padding: 4px 16px 8px; }
.tr { display: grid; grid-template-columns: 1fr minmax(120px, 42%) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.tr:first-child { border-top: 0; }
.tr .tn button.link { font-size: 15px; }
.tr .tp { display: block; font-size: 13px; color: var(--grey); }
.tr .tv { font-family: var(--mono); font-size: 14px; color: var(--bone); text-align: right; white-space: nowrap; }
.tr .tv .u { display: block; font-size: 12.5px; color: var(--grey); }
.tr.o .tv { color: var(--red-hot); }
.tr.hist { display: block; background: var(--ink); padding: 12px; border-top: 0; }
.tr.hist p.note { color: var(--bone); border-left: 2px solid var(--gold-fill); padding-left: 10px; font-size: 14px; }
.key { display: flex; gap: 16px; align-items: center; font-family: var(--mono); font-size: 12.5px; color: var(--grey); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; flex-wrap: wrap; }
.key i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.key .kb { width: 22px; height: 10px; background: var(--band); }
.key .kd { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.key .kr { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--grey); }
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg button, button.segb { background: transparent; color: var(--grey); box-shadow: none; font: 600 13px "Barlow", system-ui, sans-serif; letter-spacing: 0; min-height: 44px; padding: 0 16px; }
.seg button[aria-pressed="true"] { background: var(--coal2); color: var(--bone); }

/* performance chips: what a result touches */
.pchips { display: flex; gap: 6px; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line-2); color: var(--faint); transition: background .15s, color .15s; }
.pchip .ico { width: 14px; height: 14px; }
.pchip.on { color: var(--bone); border-color: var(--gold-fill); background: var(--warn-bg); }
.pill.warn { background: var(--warn-bg); color: var(--gold); }

/* body figure */
.bodywrap { display: grid; gap: 16px; grid-template-columns: 1fr; background: var(--coal); border: 1px solid var(--line); padding: 16px; }
@media (min-width: 700px) { .bodywrap { grid-template-columns: 220px 1fr; align-items: start; } }
.figbox { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: start; }
.figure { width: 100%; height: auto; display: block; }
.bm path { stroke: var(--coal); stroke-width: 2; transition: fill .2s, opacity .2s; }
.bm-m path { fill: var(--coal3); }
.bm-j path, .bm-x path { fill: var(--coal2); }
.figbox.allm .bm-m path { fill: var(--green); opacity: .55; }
.figbox.allm.bad .bm-m path { fill: var(--red-hot); }
.figbox.whole .bm path { fill: var(--green); opacity: .35; }
.figbox.whole.bad .bm path { fill: var(--red-hot); }
.org { color: var(--faint); cursor: pointer; transition: filter .15s, opacity .15s; }
.org.ok { color: var(--green); } .org.bad { color: var(--red-hot); }
.org .halo { fill: var(--solid); opacity: .82; }
.org path { fill: currentColor; }
.org.on .halo { fill: var(--bone); opacity: .18; }
.org.on { filter: drop-shadow(0 0 10px currentColor); }
@media (min-width: 700px) { .bodywrap { grid-template-columns: 440px 1fr; } }
.syslist { display: grid; gap: 4px; margin-top: 12px; }
.sysrow { display: grid; grid-template-columns: 32px 1fr auto 44px; gap: 10px; align-items: center; min-height: 44px; padding: 4px 8px; text-decoration: none; color: var(--body); border-left: 3px solid var(--green); background: var(--tint); }
.sysrow:hover, .sysrow:focus-visible { background: var(--coal2); }
.sysrow.bad { border-left-color: var(--red-hot); }
.sysrow .ib { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--green); }
.sysrow.bad .ib { color: var(--red-hot); }
.sysrow .nm { font-family: var(--head); font-weight: 500; font-size: 15px; letter-spacing: 0; color: var(--bone); }
.sysrow .st { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; color: var(--green); text-align: right; }
.sysrow.bad .st { color: var(--red-hot); }

/* performance tab */
.pareas { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .pareas { grid-template-columns: repeat(4, 1fr); } }
.parea { background: var(--coal); border: 1px solid var(--line); border-top: 3px solid var(--green); padding: 14px; display: grid; gap: 6px; }
.parea.warn { border-top-color: var(--gold-fill); }
.parea .pi { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--green); }
.parea.warn .pi { background: var(--warn-bg); color: var(--gold); }
.parea .nm { font-family: var(--head); font-weight: 600; font-size: 18px; letter-spacing: 0; color: var(--bone); }
.pcards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pcards { grid-template-columns: 1fr 1fr; } }
.pcard { display: grid; gap: 8px; background: var(--coal); border: 1px solid var(--line); border-left: 3px solid var(--green); padding: 14px 16px; text-decoration: none; color: var(--body); }
.pcard:hover { background: var(--coal2); }
.pcard.warn { border-left-color: var(--gold-fill); } .pcard.bad { border-left-color: var(--red-hot); }
.pcard.none { border-left-color: var(--line-2); border-style: dashed; }
.pcard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pcard .nm { font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: 0; color: var(--bone); }
.pcard .val b { font-family: var(--head); font-weight: 600; font-size: 24px; color: var(--bone); }
.pcard.bad .val b { color: var(--red-hot); }
.pcard .val small { font-family: var(--mono); font-size: 12.5px; color: var(--grey); margin-left: 4px; }

/* the result sheet */
body.noscroll { overflow: hidden; }
/* over a pop-up (60), since a result opens from a row inside one; it sat at 20 and opened unseen behind it */
.sheet { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet-in { position: relative; background: var(--coal); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px 28px; border-top: 3px solid var(--act); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-in { border: 1px solid var(--line-2); border-top: 3px solid var(--act); } }
.sh-x { position: absolute; top: 10px; right: 10px; background: transparent; color: var(--grey); min-height: 44px; min-width: 44px; padding: 0; }
.sh-x:hover { background: var(--coal2); color: var(--bone); }
.sh-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding-right: 44px; }
.sh-head .badge { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--green); }
.sh-head .badge.bad { background: var(--out-bg); color: var(--red-hot); }
.sh-head .sys { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sh-head .nm { font-family: var(--head); font-weight: 600; font-size: 22px; letter-spacing: 0; color: var(--bone); }
.sh-head .plain { font-size: 14px; color: var(--grey); }
.sh-head .val { text-align: right; }
.sh-head .val b { display: block; font-family: var(--head); font-weight: 600; font-size: 32px; line-height: 1; color: var(--bone); }
.sh-head .val b.o { color: var(--red-hot); }
.sh-head .val small { font-family: var(--mono); font-size: 12.5px; color: var(--grey); }
.sh-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 4px; }
.sh-pills .pill { margin-top: 0; }
.sheet h3 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 20px 0 8px; }
.sheet .why { color: var(--body); font-size: 15px; margin: 8px 0 0; }
.levers { display: grid; gap: 8px; }
.lever { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; background: var(--tint); border: 1px solid var(--line); padding: 10px 12px; font-size: 15px; color: var(--body); }
.lever .li { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--green); }
.lever b, .gpline b { display: block; font-family: var(--head); font-weight: 500; font-size: 14px; letter-spacing: 0; color: var(--bone); }
.gpline { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--gold-fill); background: var(--warn-bg); font-size: 15px; color: var(--body); }
.gpline .ico { justify-self: center; color: var(--gold); }
.sheet .note { color: var(--bone); border-left: 2px solid var(--gold-fill); padding-left: 10px; font-size: 14px; }
.sheet .srcs { font-size: 13px; color: var(--grey); }
.sheet .srcs a { color: var(--body); }
.sheet .disc { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-top: 16px; }
.key .kg { width: 22px; height: 3px; background: var(--gold-fill); }
#systems { display: block; }

/* record tab: the rest of the GP record, as written. The tiles and the
   history rows are restyled in the redesign block at the end of this file. */
.ri { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--coal2); color: var(--grey); }
.ri .ico { width: 24px; height: 24px; }
.rtile.bad .ri, .ritem.bad .ri { background: var(--out-bg); color: var(--red-hot); }
.rlist { display: grid; gap: 8px; }
@media (min-width: 760px) { .rlist { grid-template-columns: repeat(2, 1fr); } }
.ritem { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: var(--coal); border: 1px solid var(--line); padding: 10px 14px 10px 12px; }
.ritem.bad { border-left: 3px solid var(--red-hot); }
.ritem .nm { font-family: var(--head); font-weight: 500; font-size: 16px; letter-spacing: 0; color: var(--bone); line-height: 1.2; }
.ritem .pill { margin-top: 0; }
.ritem .rd { text-align: right; white-space: nowrap; }
.ritem .rd b { display: block; font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--bone); }
.ritem .rd small { font-family: var(--mono); font-size: 12.5px; color: var(--grey); }
details.fold .rlist { padding-bottom: 12px; }
.tls { display: grid; gap: 0; padding-bottom: 8px; }
.tl { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tl .ty { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: 0; color: var(--bone); }
.tl .tc { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 14px; padding: 3px 9px; background: var(--coal2); border: 1px solid var(--line); color: var(--body); }
.vgrid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .vgrid { grid-template-columns: repeat(4, 1fr); } }
.vcard { background: var(--coal); border: 1px solid var(--line); padding: 14px; display: grid; gap: 4px; }
.vcard .ri { color: var(--green); background: var(--ok-bg); margin-bottom: 4px; }
.vcard .nm { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: 0; color: var(--bone); }
.vcard .vd { font-family: var(--head); font-weight: 500; font-size: 20px; color: var(--bone); }
.mbars { display: flex; align-items: flex-end; gap: 3px; height: 110px; border-bottom: 1px solid var(--line-2); }
.mbars .mb { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.mbars .mb i { display: block; width: 100%; background: var(--s2); }
.mlabels { display: flex; gap: 3px; margin-top: 6px; }
.mlabels span { flex: 1; font-family: var(--mono); font-size: 11.5px; color: var(--grey); white-space: nowrap; overflow: visible; }
.rsrc { margin-top: 18px; }

/* ---- body explorer
   One system at a time. The muscle model is a dim silhouette; the chosen
   system lights up and everything else steps back. Motion is slow and
   carries meaning: the heart beats at your resting rate, the lungs at your
   breathing rate, blood flows along the arteries. All of it stops for
   anyone who asks the system for reduced motion. */
.explorer { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 6px; }
@media (min-width: 900px) { .explorer { grid-template-columns: 360px 220px 1fr; align-items: start; } }
.stage { background: radial-gradient(ellipse at 50% 40%, var(--coal2), var(--coal) 70%); border: 1px solid var(--line); padding: 16px 12px 12px; display: grid; gap: 12px; justify-items: center; }
@media (min-width: 900px) { .stage { position: sticky; top: 12px; } }
.xfig { --sel: var(--bone); width: 100%; max-width: 290px; perspective: 1400px; }
@media (max-width: 899px) { .xfig { max-width: 270px; } }
.xfig.st-ok { --sel: var(--green); } .xfig.st-bad { --sel: var(--red-hot); } .xfig.st-info { --sel: var(--s2); }
/* Three stacked views: Inside (anatomy), Muscles, Back. A crossfade,
   because a 3D flip between three faces reads as a trick, not a turn. */
.xfig .frame { position: relative; aspect-ratio: 724 / 1400; }
.xfig .face { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s; }
.xfig[data-face="inside"] .face.inside, .xfig[data-face="front"] .face.front, .xfig[data-face="back"] .face.back { opacity: 1; pointer-events: auto; }
.xfig svg.figure { width: 100%; height: 100%; display: block; overflow: visible; }
.xfig .bm path { fill: var(--coal3); stroke: var(--line-2); stroke-width: 1.5; transition: fill .5s, opacity .5s; }
.xfig .bm-j path, .xfig .bm-x path { fill: var(--coal2); }
.xfig.sel .bm path { opacity: .55; }
/* organs: dim at rest, the chosen one grows and glows */
.xfig .org { color: var(--faint); cursor: pointer; outline: none; transform-box: fill-box; transform-origin: center; transition: opacity .45s, transform .55s cubic-bezier(.2,.9,.25,1.2), filter .45s; }
.xfig .org.ok { color: var(--green); } .xfig .org.bad { color: var(--red-hot); } .xfig .org.info { color: var(--s2); }
.xfig .org path { fill: currentColor; }
.xfig .org .ring { fill: none; stroke: currentColor; stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.xfig .org .pulse { transform-box: fill-box; transform-origin: center; }
.xfig.sel .org { opacity: .14; }
.xfig.sel .org.on { opacity: 1; transform: scale(1.14); filter: drop-shadow(0 0 14px currentColor); }
.xfig .org:hover, .xfig .org:focus-visible { opacity: 1; filter: drop-shadow(0 0 8px currentColor); }
.xfig .org.on .ring { animation: ping 2.2s ease-out infinite; }
.xfig .org[data-org="heart"] .pulse { animation: beat var(--beat, 1s) ease-in-out infinite; }
.xfig .org[data-org="lungs"] .pulse { animation: breathe var(--breath, 4s) ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.09); } 24% { transform: scale(1); } 36% { transform: scale(1.05); } 50% { transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scale(.97, .96); } 45% { transform: scale(1.03, 1.05); } }
@keyframes ping { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.7); } }
/* blood: the arterial tree draws in, then flows */
.xfig .vessels path { fill: none; stroke: var(--sel); stroke-width: 6; stroke-linecap: round; opacity: 0; stroke-dasharray: 2 18; transition: opacity .6s; }
.xfig.v-on .vessels path { opacity: .85; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
/* muscle: a wave that runs down the body */
.xfig.m-on .bm-m path { fill: var(--sel); opacity: .35; animation: wave 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes wave { 0%, 100% { opacity: .22; } 40% { opacity: .8; } }
/* whole body: a slow tide of colour */
.xfig.w-on .bm path { fill: var(--sel); animation: tide 3.2s ease-in-out infinite; }
@keyframes tide { 0%, 100% { opacity: .18; } 50% { opacity: .5; } }
/* what is lit, under the figure */
.readout { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; min-height: 28px; }
.readout i { width: 10px; height: 10px; background: var(--faint); align-self: center; }
.readout.ok i { background: var(--green); } .readout.bad i { background: var(--red-hot); } .readout.info i { background: var(--s2); }
.readout b { font: 600 18px var(--head); letter-spacing: 0; color: var(--bone); }
.readout span { font: 12.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.readout.bad span { color: var(--red-hot); } .readout.ok span { color: var(--green); }
.readout.in { animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg button, button.segb { min-height: 40px; padding: 0 16px; background: transparent; border: 0; color: var(--grey); font: 600 13px "Barlow", system-ui, sans-serif; letter-spacing: 0; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--coal3); color: var(--bone); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font: 12.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; display: inline-block; }
.lg.ok { background: var(--green); } .lg.bad, .lg.cond { background: var(--red-hot); } .lg.info { background: var(--s2); }
/* system list: a column on desktop, a swipeable row on phones */
.sysnav { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 899px) { .sysnav button.sysbtn { min-height: 40px; padding: 0 10px; gap: 8px; } .sysnav .sysbtn .nm { font-size: 13px; } }
@media (min-width: 900px) { .sysnav { flex-direction: column; flex-wrap: nowrap; } }
.sysbtn, button.sysbtn { flex: 0 0 auto; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; justify-content: stretch; min-height: 44px; padding: 0 12px; background: var(--coal); border: 1px solid var(--line); border-left: 3px solid var(--line-2); color: var(--body); cursor: pointer; text-align: left; transition: background .2s, border-color .2s, transform .2s; }
.sysbtn .ico { width: 20px; height: 20px; color: var(--faint); }
.sysbtn .nm { font: 600 14px/1.15 var(--head); letter-spacing: 0; color: var(--bone); }
.sysbtn, button.sysbtn { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
.sysbtn .st { font: 600 13px var(--head); color: var(--red-hot); }
.sysbtn.info .st { color: var(--s2); font: italic 600 12px Georgia, serif; } /* colour never alone: an i on a system that is on the record (audit, 9 Nov 2026) */
.sysbtn .pl { font: 500 12.5px var(--mono); color: var(--ink); background: var(--gold-fill); min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.sysbtn .pl[hidden] { display: none; }
.sysbtn.ok { border-left-color: var(--green); } .sysbtn.bad { border-left-color: var(--red-hot); } .sysbtn.info { border-left-color: var(--s2); }
.sysbtn.none .nm { color: var(--faint); }
button.sysbtn:hover { background: var(--coal2); }
button.sysbtn[aria-pressed="true"] { background: var(--coal3); transform: translateX(3px); }
.sysbtn[aria-pressed="true"] .ico { color: var(--bone); }
@media (max-width: 899px) { .sysbtn[aria-pressed="true"] { transform: none; } }
/* the detail panel */
.sysdetail { background: var(--coal); border: 1px solid var(--line); padding: 18px; min-height: 300px; }
.sysdetail.enter > * { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.sysdetail.enter > *:nth-child(2) { animation-delay: .05s; } .sysdetail.enter > *:nth-child(3) { animation-delay: .1s; }
.sysdetail.enter > *:nth-child(4) { animation-delay: .15s; } .sysdetail.enter > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sd-head { display: grid; grid-template-columns: 64px 1fr; gap: 6px 16px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sd-head .pill { grid-column: 2; justify-self: start; margin-top: 0; }
.sd-head h2 { margin: 2px 0 4px; font-size: 24px; }
.sd-head p { margin: 0; color: var(--grey); font-size: 15px; }
.sd-ic { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: var(--coal2); color: var(--faint); grid-row: span 2; }
.sd-ic svg { width: 44px; height: 44px; fill: currentColor; }
.sd-ic svg path { fill: currentColor; }
.sd-head.ok .sd-ic { color: var(--green); background: var(--ok-bg); } .sd-head.bad .sd-ic { color: var(--red-hot); background: var(--out-bg); } .sd-head.info .sd-ic { color: var(--s2); }
.sd-sec { padding-top: 14px; }
.sd-sec h3 { margin: 0 0 10px; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.sd-sec .trs { padding: 0; }
.sd-sec .tc { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-sec .tag { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sd-sec .tag small { font: 12.5px var(--mono); color: var(--grey); }
.sd-sec .tag .ico { width: 16px; height: 16px; }
.sd-stats { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sd-stats div { background: var(--coal2); padding: 10px 12px; display: grid; gap: 2px; }
.sd-stats b { font: 600 24px var(--head); color: var(--bone); font-variant-numeric: tabular-nums; }
.sd-stats b small { font: 12.5px var(--mono); color: var(--grey); margin-left: 4px; }
.sd-stats span { font: 12.5px var(--mono); color: var(--grey); }
.sd-sup { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 12px; margin-bottom: 6px; background: var(--coal2); text-decoration: none; color: var(--body); font-size: 14px; border-left: 3px solid var(--gold-fill); }
.sd-sup b { font: 500 14px var(--head); letter-spacing: 0; color: var(--bone); }
.sd-sup:hover { background: var(--coal3); }
/* today's chips into the explorer */
.syschips { display: flex; flex-wrap: wrap; gap: 8px; }
.syschip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--coal); border: 1px solid var(--line); border-left: 3px solid var(--green); color: var(--bone); text-decoration: none; font: 500 14px var(--head); letter-spacing: 0; transition: background .2s; }
.syschip:hover { background: var(--coal2); }
.syschip .ico { width: 20px; height: 20px; color: var(--green); }
.syschip small { font: 12.5px var(--mono); color: var(--grey); }
.syschip.bad { border-left-color: var(--red-hot); } .syschip.bad .ico, .syschip.bad small { color: var(--red-hot); }
.syschip.info { border-left-color: var(--s2); } .syschip.info .ico { color: var(--s2); }
/* the small figure on supplement cards */
.xfig.mini { max-width: 140px; perspective: none; }
.xfig.mini svg.figure { height: auto; }
@media (prefers-reduced-motion: reduce) {
  .xfig *, .xfig .face, .sysdetail.enter > *, .sysbtn { animation: none !important; transition: none !important; }
}

/* ---- supplements */
.xfig.st-supp { --sel: var(--gold-fill); }
.xfig.mini .org.on { color: var(--gold-fill); }
.supp { display: grid; grid-template-columns: 1fr; gap: 16px; background: var(--coal); border: 1px solid var(--line); border-top: 3px solid var(--gold-fill); padding: 18px; margin-bottom: 14px; scroll-margin-top: 12px; }
@media (min-width: 760px) { .supp { grid-template-columns: 150px 1fr; } }
.supp.fresh { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.supp-fig { display: flex; justify-content: center; align-items: flex-start; }
@media (max-width: 759px) { .supp-fig { display: none; } }
.supp-h { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.supp-h .nm { font: 600 20px var(--head); letter-spacing: 0; color: var(--bone); }
.supp-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
button.small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.supp .what { margin: 12px 0 4px; font-size: 16px; color: var(--body); }
.supp h3 { margin: 16px 0 8px; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.acts { display: grid; gap: 6px; }
@media (min-width: 1000px) { .acts { grid-template-columns: 1fr 1fr; } }
.act { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 12px; background: var(--coal2); text-decoration: none; color: var(--body); font-size: 14px; transition: background .2s; }
.act:hover { background: var(--coal3); }
.act .ico { color: var(--gold); width: 22px; height: 22px; }
.act b { font: 500 14px var(--head); letter-spacing: 0; color: var(--bone); }
.moves { display: grid; gap: 6px; }
.move { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--tint); border: 1px solid var(--line); }
.mv-dir { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font: 600 20px var(--head); background: var(--coal2); color: var(--bone); }
.move.test .mv-dir { background: var(--warn-bg); color: var(--gold); }
.move b { font: 500 15px var(--head); letter-spacing: 0; color: var(--bone); }
.mv-k { font: 12.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); margin-left: 6px; }
.mv-t { font-size: 14px; color: var(--grey); }
.yv, button.yv { text-align: right; font: 600 18px var(--head); color: var(--bone); white-space: nowrap; display: grid; justify-items: end; gap: 2px; background: none; border: 0; padding: 0; cursor: pointer; }
.yv small { font: 12.5px var(--mono); color: var(--grey); margin-left: 4px; font-weight: 400; }
.yv .pill { margin-top: 0; }
.yv.none { font: 12.5px var(--mono); color: var(--faint); cursor: default; }
@media (max-width: 560px) { .move { grid-template-columns: 34px 1fr; } .yv { grid-column: 2; justify-items: start; text-align: left; } }
.note { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold-fill); background: var(--warn-bg); color: var(--body); font-size: 14px; }
.scat-find { display: block; margin: 0 0 10px; }
.scat-find input { width: 100%; max-width: 360px; }
.srcs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font: 12.5px var(--mono); }
.srcs a { color: var(--grey); }
.srcs a::before { content: "Source: "; color: var(--faint); }
/* drawn by CSS, so lang.js never sees it: said per language here */
html[lang="it"] .srcs a::before { content: "Fonte: "; } html[lang="es"] .srcs a::before { content: "Fuente: "; }
html[lang="fr"] .srcs a::before { content: "Source : "; } html[lang="de"] .srcs a::before { content: "Quelle: "; }
.scat { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.scard, button.scard { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--coal); border: 1px solid var(--line); color: var(--body); text-align: left; cursor: pointer; font: inherit; text-transform: none; letter-spacing: 0; min-height: 60px; transition: background .2s, border-color .2s; }
button.scard:hover { background: var(--coal2); border-color: var(--gold-fill); }
.scard .nm { font: 500 15px var(--head); letter-spacing: 0; color: var(--bone); }
.scard .k { font-size: 12.5px; }
.scard .plus { font: 600 22px var(--head); color: var(--gold); }
form.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
form.inline label { display: grid; gap: 4px; font: 500 13px/1.3 "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; color: var(--grey); }
form.inline .msg { flex-basis: 100%; margin: 0; }
@media (prefers-reduced-motion: reduce) { .supp.fresh { animation: none; } }
.seg button:hover { background: var(--coal2); color: var(--bone); }
.seg button[aria-pressed="true"]:hover { background: var(--coal3); }
button.yv:hover { background: none; }
button.yv.link { text-decoration: none; }
.pill.info { background: rgba(126,155,214,.14); color: var(--s2); }
@media (max-width: 560px) {
  .supp-h { grid-template-columns: 40px 1fr; }
  .supp-act { grid-column: 1 / -1; justify-content: flex-start; }
  button.yv, .yv { justify-content: start; justify-items: start; text-align: left; }
}

/* since the last draw */
.moved { display: grid; gap: 6px; }
@media (min-width: 760px) { .moved { grid-template-columns: 1fr 1fr; } .moved > p { grid-column: 1 / -1; } }
.mv { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--coal); border: 1px solid var(--line); text-decoration: none; color: var(--body); transition: background .2s; }
.mv:hover { background: var(--coal2); }
.mv .arr { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font: 600 20px var(--head); background: var(--coal2); color: var(--bone); }
.mv.left { border-left: 3px solid var(--red-hot); } .mv.left .arr { background: var(--out-bg); color: var(--red-hot); }
.mv.back { border-left: 3px solid var(--green); } .mv.back .arr { background: var(--ok-bg); color: var(--green); }
.mv.moved { border-left: 3px solid var(--gold-fill); } .mv.moved .arr { background: var(--warn-bg); color: var(--gold); }
.mv .nm { font: 500 15px var(--head); letter-spacing: 0; color: var(--bone); }
.mv .nums { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv .nums.word { font-size: 14px; font-weight: 600; }
.crv b.w { font-size: 16px; }
.crv b.w + small { font: 12.5px/1.2 "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; max-width: 130px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsizes.caps { display: grid; grid-template-columns: 1fr 1fr; }
.tsizes.caps button { font-size: 14px; min-height: 44px; }
.mv .was { font: 14px var(--mono); color: var(--grey); text-decoration: line-through; margin-right: 8px; }
.mv .now { font: 600 20px var(--head); color: var(--bone); }
.mv.left .now { color: var(--red-hot); } .mv.back .now { color: var(--green); }
.mv small { font: 12.5px var(--mono); color: var(--grey); margin-left: 4px; }

/* timeline */
/* history filters and rows: see the redesign block at the end */
.tly h3 { position: sticky; top: 0; z-index: 1; margin: 0 0 8px; padding: 8px 0 6px; background: var(--ink); font: 600 22px var(--head); color: var(--bone); border-bottom: 1px solid var(--line-2); }
.tly h3 small { margin-left: 10px; font: 12.5px var(--mono); color: var(--grey); }

/* pressure */
.bpstats { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
@media (min-width: 760px) { .bpstats { grid-template-columns: 2fr 1fr 1fr; } }
.bpstat { background: var(--coal); border: 1px solid var(--line); border-top: 3px solid var(--line-2); padding: 14px; display: grid; gap: 4px; }
.bpstat.big { grid-column: 1 / -1; }
@media (min-width: 760px) { .bpstat.big { grid-column: auto; } }
.bpstat b { font: 600 34px var(--head); line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.bpstat.big b { font-size: 48px; }
.bpstat span { font: 12.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.bpstat small { font: 12px var(--mono); color: var(--bone); }
.bpstat.ok { border-top-color: var(--green); } .bpstat.ok small { color: var(--green); }
.bpstat.none b { font-size: 20px; color: var(--faint); }
.t-ok { color: var(--green); } .t-warn { color: var(--gold); } .t-bad { color: var(--red-hot); }
.protodays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pd { display: grid; gap: 3px; justify-items: center; padding: 8px 2px; background: var(--coal2); border-top: 3px solid var(--line-2); }
.pd.half { border-top-color: var(--gold-fill); } .pd.done { border-top-color: var(--green); }
.pdl { font: 12.5px var(--mono); text-transform: uppercase; color: var(--grey); }
.pdm { font: 11.5px var(--mono); padding: 2px 5px; color: var(--faint); border: 1px solid var(--line); }
.pdm.on { color: var(--bone); background: var(--coal3); border-color: var(--line-2); }

/* meets */
.mtiles { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
@media (min-width: 760px) { .mtiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .mtiles { grid-template-columns: repeat(6, 1fr); } }
.mtile { background: var(--coal); border: 1px solid var(--line); border-top: 3px solid var(--gold-fill); padding: 12px 14px; display: grid; gap: 3px; }
.mtile b { font: 600 28px var(--head); line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.mtile b small { font: 12.5px var(--mono); color: var(--grey); margin-left: 3px; }
.mtile span { font: 12.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.mtile > small { font-size: 12px; color: var(--faint); }
/* recovery */
.rtop { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 900px) { .rtop { grid-template-columns: 1fr 1fr 1fr; } }
.rtop .card { margin: 0; }
.rtop .sec { margin-top: 0; }
.recbar { display: flex; height: 14px; background: var(--track); overflow: hidden; }
.recbar i { display: block; height: 100%; transition: width .6s; }
.recbar .g { background: var(--green); } .recbar .y { background: var(--gold-fill); } .recbar .r { background: var(--red-hot); }
.wdbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; height: 110px; align-items: end; }
.wdb { display: grid; grid-template-rows: 1fr auto auto; height: 100%; justify-items: center; gap: 2px; }
.wdb i { display: block; width: 70%; align-self: end; background: var(--s1); opacity: .8; transition: height .6s; }
.wdb b { font: 600 13px var(--head); color: var(--bone); }
.wdb span { font: 11.5px var(--mono); text-transform: uppercase; color: var(--grey); }

/* share links */
.sharenew { margin: 12px 0; padding: 12px; background: var(--coal2); border: 1px solid var(--gold-fill); display: grid; gap: 8px; }
.sharenew code { font: 13px var(--mono); color: var(--bone); word-break: break-all; }
form.inline select { width: auto; min-width: 120px; }
header.top .in > .k { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.labs.wk .val { white-space: normal; }

/* bloods grid */
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gridt th.gd { font-size: 12.5px; text-align: right; line-height: 1.3; }
.gridt td.gc { text-align: right; font: 14px var(--mono); color: var(--bone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gridt td.gc.o { color: var(--red-hot); background: var(--out-bg); }
.gridt td.gc.none { color: var(--faint); }
.gridt tr.gh td { padding: 14px 6px 4px; font: 12.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); border-top: 0; }
.gridt td.name { position: sticky; left: 0; background: var(--coal); z-index: 1; }
.gridt th:first-child { position: sticky; left: 0; background: var(--coal); z-index: 1; }

/* ---- plan tab */
.planhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.planhead h2 { margin: 2px 0 0; font-size: 22px; }
.plist { display: grid; gap: 6px; margin-bottom: 16px; }
.pitem { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; background: var(--coal); border: 1px solid var(--line); padding: 10px 12px; }
.pitem.done { opacity: .55; } .pitem.late { border-left: 3px solid var(--red-hot); }
.pitem button.tick { width: 34px; height: 34px; min-height: 34px; padding: 0; border: 1px solid var(--line-2); background: var(--coal2); color: var(--green); font-size: 15px; cursor: pointer; }
.pitem button.tick:hover { background: var(--coal); }
.pitem .nm { color: var(--bone); } .pitem .pn { font-size: 13px; color: var(--grey); }
.pitem .pdue { display: flex; gap: 6px; align-items: center; }
.pitem .pdue input { font: inherit; font-size: 13px; padding: 4px 6px; background: var(--coal2); color: var(--body); border: 1px solid var(--line); max-width: 140px; }
.pitem button.x { background: none; border: 0; color: var(--grey); font-size: 20px; cursor: pointer; padding: 0 4px; min-height: 26px; }
.pitem button.x:hover { background: none; color: var(--red-hot); }
.psec { border: 1px solid var(--line); background: var(--coal); margin-bottom: 8px; }
.psec > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.psec > summary::-webkit-details-marker { display: none; }
.psec > summary .nm { font-family: var(--head); font-weight: 600; letter-spacing: 0; color: var(--bone); }
.psec > summary::after { content: "+"; color: var(--grey); margin-left: auto; font-size: 18px; }
.psec[open] > summary::after { content: "\2212"; }
.psec .pbody { padding: 0 14px 12px; display: grid; gap: 6px; }
.prow { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow .pi { color: var(--grey); display: flex; } .prow .pi .ico { width: 20px; height: 20px; }
.prow .nm { color: var(--bone); } .prow .k { font-size: 13px; }
.inplan { font-size: 12px; color: var(--green); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.inplan .ico { width: 14px; height: 14px; }
button.small, .btn.small { font-size: 13px; padding: 0 12px; min-height: 36px; white-space: nowrap; }
.psec a.ghost.small { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); }
.fold summary { cursor: pointer; color: var(--grey); font-size: 13px; padding: 6px 0; }
.rsrc { margin-top: 10px; }
@media (max-width: 600px) { .prow { grid-template-columns: 24px 1fr; } .prow > :last-child { grid-column: 2; justify-self: start; } .pitem { grid-template-columns: 28px 1fr; } .pitem .pdue { grid-column: 2; } }
.prow .k, .pitem .pn, .pitem .k { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--grey); }
.pitem .k { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; }

/* ---- basic and pro. Pro is everything; basic hides what is marked .pro */
html[data-mode="basic"] .pro { display: none !important; }
nav.main .cog { align-self: center; position: relative; }
.tr .tstat { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--green); display: inline-flex; align-items: center; gap: 8px; }
.tr .tstat::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.tr .tstat.o { color: var(--red-hot); } .tr .tstat.o::before { background: var(--red-hot); }
html[data-mode="basic"] .tr { grid-template-columns: 1fr auto auto; }
.bodyline { margin: 0 0 12px; font-size: 15px; color: var(--body); }
.bodyline a { color: var(--gold-fill); text-decoration: none; }
.bodyline a:hover { text-decoration: underline; }

/* ---- first visit */
.start { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .start { grid-template-columns: 240px 1fr; gap: 32px; } }
.start .xfig { max-width: 200px; margin: 0 auto; }
/* On a phone the figure sits beside the heading rather than above it, so
   all four doors are on screen at 390x664 (audit, 9 Nov 2026: two were under
   the bar). .steps gives up its box so its children lay out on the grid. */
@media (max-width: 759px) {
  .start { grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
  .start .xfig { max-width: 92px; margin: 0; grid-row: 1 / 3; grid-column: 1; }
  .start .steps { display: contents; }
  .start .steps > span.k { grid-column: 2; align-self: end; }
  .start h2 { grid-column: 2; align-self: start; font-size: 20px; margin: 0; }
  .start .tiles, .start p.k { grid-column: 1 / -1; }
  .start .tiles { margin: 8px 0 4px; gap: 8px; }
  .start .tile { padding: 11px 12px; gap: 5px; }
  .start p.k { margin: 0; }
}
.start .xfig.still { aspect-ratio: 724 / 1400; } /* holds its place while bodymap.js arrives, so the doors beside it do not move */
.start .xfig.still * { animation: none !important; }
.start h2 { margin: 2px 0 8px; }
.start p.k { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; }
/* Big doors on the start screen: an icon, two or three words, nothing else. */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: grid; gap: 7px; justify-items: start; align-content: start; padding: 14px; background: var(--coal); border: 1px solid var(--line); color: var(--body); text-decoration: none; }
.tile:hover { background: var(--coal2); border-color: var(--line-2); }
.tile .ico { width: 26px; height: 26px; color: var(--gold-fill); }
.tile.done .ico { color: var(--green); }
.tile .nm { color: var(--bone); font-family: var(--head); font-weight: 600; letter-spacing: 0; font-size: 16px; line-height: 1.15; }
.tile .k { text-transform: none; letter-spacing: 0; }

/* ---- the intro: four cards, swiped or stepped, shown once (hp-onb) */
body.ob-open { overflow: hidden; }
.ob { position: fixed; inset: 0; z-index: 70; background: var(--ink); display: flex; flex-direction: column; }
.obtop { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 0; }
.obstage { position: relative; flex: 0 0 46vh; min-height: 260px; margin: 4px 0 0; background: radial-gradient(60% 55% at 50% 50%, color-mix(in srgb, var(--gold-fill) 18%, transparent) 0%, transparent 70%); }
.obstage .an3d { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; background: transparent; }

.ob.no3d .obstage { display: none; }
.ob .obcard { justify-content: flex-start; padding-top: 6px; }
.obsex { margin-top: 4px; }
@media (min-width: 900px) { .obstage { flex-basis: 52vh; } }
.obtrack { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.obtrack::-webkit-scrollbar { display: none; }
.obcard { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 10px 26px 20px; overflow-y: auto; }
.obcard h2 { margin: 4px 0 0; font-size: 26px; }
.obcard p { margin: 0; max-width: 360px; color: var(--body); }
.obcard .obfig { max-width: 130px; margin: 0; }
.obcard .obfig svg.figure { height: auto; }
.obcard .xfig.still * { animation: none !important; }
.oblegend .dot { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; }
.oblegend .dot.ok { background: var(--green); } .oblegend .dot.bad { background: var(--red-hot); }
.obletter { width: 180px; background: var(--coal); border: 1px solid var(--line-2); padding: 16px 14px; display: grid; gap: 9px; position: relative; margin-bottom: 10px; }
.obletter span { height: 8px; background: var(--coal3); }
.obletter .hl { height: auto; background: var(--warn-bg); border: 1px solid var(--gold-fill); color: var(--bone); font-family: var(--mono); font-size: 12px; padding: 4px 6px; text-align: left; }
.obletter .ico { position: absolute; right: -13px; bottom: -13px; width: 34px; height: 34px; background: var(--gold-fill); color: var(--ink); padding: 7px; box-sizing: border-box; }
.obmodes { display: flex; gap: 12px; width: 100%; max-width: 440px; }
.obmode { flex: 1; min-width: 0; display: grid; gap: 8px; justify-items: center; padding: 14px 10px 12px; background: var(--coal); border: 1px solid var(--line-2); color: var(--body); cursor: pointer; font: 400 13px "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; min-height: 0; }
.obmode:hover { background: var(--coal2); }
.obmode[aria-pressed="true"] { border-color: var(--gold-fill); box-shadow: inset 0 0 0 1px var(--gold-fill); }
.obmode .nm { font-family: var(--head); font-weight: 600; font-size: 17px; color: var(--bone); letter-spacing: 0; }
.obmode .k { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 13px; }
.obcard p.k { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; max-width: 360px; }
.obrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--bone); background: var(--coal2); border: 1px solid var(--line); padding: 8px 10px; width: 100%; box-sizing: border-box; }
.obrow .pill { margin-top: 0; }
.gmini { position: relative; width: 72px; height: 8px; background: var(--track); display: inline-block; flex: none; }
.gmini::before { content: ""; position: absolute; left: 28%; right: 24%; top: 0; bottom: 0; background: var(--band); }
.gmini i { position: absolute; left: 58%; top: -3px; width: 2px; height: 14px; background: var(--bone); }
.gmini b { position: absolute; left: 80%; top: -1px; width: 2px; height: 10px; background: var(--gold-fill); }
.obok .ico { width: 44px; height: 44px; color: var(--green); }
.obconsent { max-width: 440px; max-height: 32vh; overflow: auto; text-align: left; font-size: 13px; line-height: 1.5; color: var(--body); border: 1px solid var(--line); padding: 10px 12px; background: var(--coal); }
.obbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
.obdots { display: flex; gap: 8px; } .obdots i { width: 8px; height: 8px; background: var(--line-2); } .obdots i.on { background: var(--gold-fill); }
.obbar button[hidden] { display: none; }
.asklist { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.asklist .nm { color: var(--bone); } .asklist .k { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; }
.pitem .cal { color: var(--grey); display: inline-flex; padding: 4px; } .pitem .cal:hover { color: var(--bone); } .pitem .cal .ico { width: 18px; height: 18px; }
@media (max-width: 600px) {
  html[data-mode="basic"] .tr { grid-template-columns: 1fr auto; row-gap: 6px; }
  html[data-mode="basic"] .tr .tn { grid-column: 1 / -1; }
  html[data-mode="basic"] .tr .tv { text-align: left; }
  html[data-mode="basic"] .tr .tv .u { display: inline; margin-left: 4px; }
}

/* ---- find in the record */
.segrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.segrow .seg.wide { margin-bottom: 0; }
#rec-q { flex: 1 1 220px; min-height: 40px; padding: 0 12px; background: var(--coal); color: var(--bone); border: 1px solid var(--line); font: 15px "Barlow", system-ui, sans-serif; }
#rec-q::placeholder { color: var(--grey); }
.hits { display: grid; gap: 6px; }
.hit { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; background: var(--coal); border: 1px solid var(--line); color: var(--body); text-decoration: none; font: inherit; min-height: 0; text-transform: none; letter-spacing: 0; }
.hit:hover { background: var(--coal2); }
.hit .hk { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.hit .nm { color: var(--bone); } .hit .k { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--grey); }
.hit .hv { font-family: var(--mono); font-size: 13px; color: var(--bone); text-align: right; } .hit .hv small { color: var(--grey); }
@media (max-width: 600px) { .hit { grid-template-columns: 1fr auto; } .hit .hk { grid-column: 1 / -1; } }
.strainnote { display: flex; gap: 8px; align-items: flex-start; font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--body); border-left: 2px solid var(--gold-fill); padding-left: 10px; }
.strainnote .ico { width: 18px; height: 18px; flex: none; color: var(--gold-fill); }

/* ---- results read off a letter */
#letter-review { margin-top: 12px; }
.ldate { display: inline-flex; gap: 10px; align-items: center; margin: 8px 0 12px; }
.lrows { display: grid; gap: 6px; }
.lrow { display: grid; grid-template-columns: 28px minmax(140px, 1.6fr) 90px 90px 70px 70px; gap: 6px; align-items: center; padding: 8px; background: var(--coal); border: 1px solid var(--line); }
.lrow.unk { border-left: 3px solid var(--gold-fill); }
.cbook { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.lrow.med { grid-template-columns: 28px minmax(140px, 1fr) minmax(160px, 1.4fr); }
@media (max-width: 700px) { .lrow.med { grid-template-columns: 28px 1fr; } .lrow.med .lt, .lrow.med .lv { grid-column: 2 / -1; } }
.lrow input:not([type=checkbox]) { min-height: 36px; padding: 0 8px; font-size: 14px; }
.lrow .check { justify-content: center; }
.lrow .lraw { grid-column: 2 / -1; font-family: var(--mono); font-size: 12.5px; color: var(--grey); white-space: pre-wrap; }
@media (max-width: 700px) { .lrow { grid-template-columns: 28px 1fr 1fr; } .lrow .lt { grid-column: 2 / -1; } .lrow .lv, .lrow .ll { grid-column: 2 / 3; } .lrow .lu, .lrow .lh { grid-column: 3 / 4; } }
.lrow input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; }
#letter-review p.k { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; }
#letter-review .ldate { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; }

/* ---- file pickers, on brand: one dashed zone, the native control hidden */
.drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 1px dashed var(--line-2); background: var(--coal); color: var(--body); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--bone); background: var(--coal2); }
.drop:focus-within { outline: 2px solid var(--bone); outline-offset: 2px; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.drop .di { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); color: var(--grey); margin-bottom: 6px; }
.drop .di .ico { width: 22px; height: 22px; }
.drop .dt { font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: 0; color: var(--bone); }
.drop .ds { font-size: 14px; color: var(--grey); }
.drop .dn { display: none; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--green); text-transform: none; letter-spacing: 0; }
.drop.has { border-style: solid; border-color: var(--green); }
.drop.has .dn { display: block; } .drop.has .ds { display: none; }
.drop.busy { border-color: var(--gold-fill); }
.drop.busy .di { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
label.btn.camera { gap: 8px; cursor: pointer; } label.btn.camera .ico { width: 18px; height: 18px; }
.camera, .camrow { display: none; } @media (max-width: 700px), (hover: none) and (pointer: coarse) { .camera { display: inline-flex; } .camrow { display: flex; } .drop .ds { display: none; } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .drop.busy .di { animation: none; } }
h2.grouphead { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin: 26px 0 8px; }
h2.grouphead { border: 0; padding: 0; }
.drop .ds { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
p.hint { margin: -4px 0 12px; font-size: 14px; color: var(--grey); }

/* The trained-day mark in a chart legend: a small gold triangle, matching the
   baseline ticks, not a line swatch. */
.legend i.tri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--gold, #a07c1f); background: none; }

/* Each reading, inside a result sheet: date, source and a way to take a
   mistyped or misread row off the record. */
.shl { margin-top: 10px; }
.shrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shrow > span:first-child { min-width: 90px; }
.shrow .k { flex: 1; }

/* ---- the Inside view: a live 3D body (anat3d/anatomy3d.js). The canvas
   fills the frame; the page around it keeps its own tones and buttons. */
.an3d { position: absolute; inset: 0; touch-action: none; cursor: grab; border-radius: var(--r); }
.an3d:active { cursor: grabbing; }
.an3d canvas { display: block; width: 100%; height: 100%; outline: none; }
.an3d-msg { position: absolute; inset: 40% 8px auto; margin: 0; text-align: center; font: 13px "Barlow", system-ui, sans-serif; color: var(--grey); }
.an3dsex button { min-height: 32px; padding: 6px 14px; }
/* the backlight: a soft pool behind the figure that takes the chosen tone */
.xfig .frame::before { content: ""; position: absolute; inset: -4% -14%; background: radial-gradient(closest-side at 50% 36%, color-mix(in srgb, var(--sel, #8A8A90) 13%, transparent), transparent 72%); transition: opacity .6s; opacity: .7; pointer-events: none; }
.xfig.sel .frame::before { opacity: 1; }
.flowline { margin: 0; min-height: 1.2em; max-width: 330px; text-align: center; font: 13px "Barlow", system-ui, sans-serif; color: var(--grey); }

/* ---- the cogwheel: view and theme in one quiet menu */
.cogbtn { background: transparent; color: var(--grey); border: 1px solid var(--line-2); min-height: 0; width: 38px; height: 38px; padding: 0; border-radius: 999px; box-shadow: none; }
.cogbtn:hover, .cogbtn[aria-expanded="true"] { background: var(--coal2); color: var(--bone); }
.cogbtn .ico { width: 19px; height: 19px; }
.cogpop { position: absolute; right: 0; top: 46px; z-index: 50; background: var(--coal); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; display: grid; gap: 7px; min-width: 230px; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
.cogpop .seg { display: flex; }
.cogppl { display: grid; gap: 7px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.whose { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; background: var(--gold-fill); color: var(--ink-on-gold, #1c1f1d); font: 500 14px "Barlow", system-ui, sans-serif; }
.whose .k { color: inherit; opacity: .75; margin-right: 4px; }
.whose button { color: inherit; border-color: currentColor; }
.plist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.plist .acts { display: flex; gap: 6px; }
.cogpop .seg button { flex: 1; min-width: 0; padding-left: 4px; padding-right: 4px; }
.cogpop a { color: var(--bone); font: 14px "Barlow", system-ui, sans-serif; margin-top: 4px; }

/* ---- rounded corners, the sweep. Red stayed for danger; square stayed nowhere. */
.card, .stage, .sysdetail, .sheet-in, .tile, .obmode, .obletter, .obconsent, .sharenew, .banner, .start li a { border-radius: var(--r); }
input, select, textarea, .drop, .seg, .sysbtn, .obrow, .hint, .gpline, .prow, .pitem, .trow { border-radius: var(--rs); }
.seg { overflow: hidden; }
.seg button { border-radius: 0; }
.obdots i, .oblegend .dot, .readout i, .lg { border-radius: 999px; }
.pill, .pchip, .chip { border-radius: var(--pill); }
.gmini, .gmini::before { border-radius: 999px; }

/* ---- navigation: icons with labels; on a phone a tab bar along the bottom */
nav.main a { gap: 7px; }
nav.main a .ico { width: 18px; height: 18px; }
.cogbtn.withav { width: auto; padding: 0 9px 0 4px; gap: 6px; display: inline-flex; align-items: center; }
.cogbtn.here { border-color: var(--act); color: var(--bone); }
.av { width: 28px; height: 28px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--act); color: var(--act-ink); font: 700 13px "Barlow", system-ui, sans-serif; }
.av.other { background: var(--gold-fill); color: #1c1f1d; }
.cogpop .setlink { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 680px) {
  header.top .in { flex-wrap: nowrap; }
  nav.main { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--coal); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
  nav.main a { flex-direction: column; justify-content: center; gap: 3px; min-height: 58px; padding: 0 2px; font-size: 13px; border-bottom: 0; border-top: 2px solid transparent; text-align: center; }
  nav.main a .ico { width: 22px; height: 22px; }
  nav.main a[aria-current="page"] { border-top-color: var(--act); color: var(--bone); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  html[data-caps] body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .wrap { padding-bottom: 0; } /* the body already clears the bar; two paddings pushed every page 56px past the fold */
  /* sign-in has no bar to clear: the 64px kept for one made the sign-up form scroll on an 844 phone */
  html body[data-page="login"] { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  /* the longer forms start nearer the top, so Create my account and the links under it are on the first screen */
  .auth:has(#signup:not([hidden])), .auth:has(#join:not([hidden])), .auth:has(#setup:not([hidden])), .auth:has(#forgot:not([hidden])) { margin-top: clamp(16px, 5vh, 48px); }
  .whose { position: sticky; top: 0; z-index: 30; }
}
@media print { nav.main { display: none !important; } }
.tabs button { display: inline-flex; align-items: center; gap: 6px; }
.tabs button .ico { width: 17px; height: 17px; }
.sec h2 .ico { width: 20px; height: 20px; vertical-align: -4px; margin-right: 8px; color: var(--act); }

/* ---- conditions */
.cintro { margin: 0 0 12px; }
.cond { border: 1px solid var(--line); background: var(--coal); border-radius: var(--r); margin-bottom: 10px; }
.cond > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.cond > summary::-webkit-details-marker { display: none; }
.cond > summary .ch { flex: 1; min-width: 0; }
.cond > summary .nm { font: 600 17px var(--head); color: var(--bone); }
.cond > summary .pill { margin-top: 0; }
.cic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--coal2); color: var(--act); flex: none; }
.cic .ico { width: 26px; height: 26px; }
.cond > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--grey); border-bottom: 2px solid var(--grey); transform: rotate(45deg); margin: -4px 4px 0; transition: transform .2s; }
.cond[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.cbody { padding: 0 16px 16px; }
.cbody h3 { font: 600 12.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 18px 0 8px; }
.cbody .what { margin: 0 0 4px; color: var(--body); }
.csys { display: flex; flex-wrap: wrap; gap: 8px; }
.csys .chip { min-height: 38px; padding: 0 12px; font-size: 13px; }
.cmk { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cmk .cmn button, .cmk .cmn a { font-weight: 600; color: var(--bone); }
.cmk .cms svg { width: 100%; height: 34px; display: block; }
.cmk .cmv { text-align: right; }
.cmk .cmv b { font: 600 18px var(--head); color: var(--bone); }
.cmk .cmv small { margin-left: 3px; color: var(--grey); }
.cmk .pill { margin-top: 4px; }
@media (max-width: 560px) { .cmk { grid-template-columns: 1fr auto; } .cmk .cms { grid-column: 1 / -1; grid-row: 2; } }
.csteps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.csteps li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--coal2); border-radius: var(--r); }
.csteps li > span:first-child { flex: 1; }
.chk .cw { font-weight: 600; }
.chk .cw.due { color: var(--red-hot); }
.chk .cw.soon { color: var(--gold); }
.chk .cw.ok { color: var(--green); }
.chk .cw.none { color: var(--grey); }
.okmark { color: var(--green); }

/* ---- daily routine */
.rtcard .rt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rtick { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 999px; border: 2px solid var(--line-2); background: transparent; color: #fff; font-size: 18px; box-shadow: none; }
.rtick.on { background: var(--act); border-color: var(--act); }
.rtw { display: flex; gap: 4px; }
.rd { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--grey); font: 600 12.5px "Barlow", system-ui, sans-serif; box-shadow: none; }
.rd.on { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.rtcard .x { background: none; border: 0; color: var(--grey); font-size: 20px; min-height: 0; padding: 0 4px; box-shadow: none; }
.rtsugg { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.rtsugg .chip { min-height: 36px; padding: 0 12px; font-size: 13px; }
.rtadd { display: flex; gap: 8px; margin-top: 12px; }
.rtadd input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .rtcard .rt { grid-template-columns: auto minmax(0, 1fr) auto; } .rtw { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; padding-left: 52px; } .rd { width: 32px; height: 32px; } }
.cmw { font-size: 13px; color: var(--grey); line-height: 1.4; }

/* ---- conditions, visual: tiles to pick, then one compact view */
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ctile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; row-gap: 2px; align-items: center; text-align: left; padding: 12px; min-height: 0; background: var(--coal); border: 1px solid var(--line); border-radius: var(--r); color: var(--bone); box-shadow: none; font: inherit; cursor: pointer; }
.ctile .cic { grid-row: 1 / 3; width: 40px; height: 40px; }
.ctile .nm { font: 600 14px/1.2 var(--head); }
.ctile .yrs { grid-column: 2; font-size: 12px; color: var(--grey); }
.ctile .cdots { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 8px; }
.ctile[aria-pressed="true"] { border-color: var(--act); box-shadow: 0 0 0 2px var(--act) inset; background: var(--coal); }
.ctile.due .cic { background: var(--out-bg); color: var(--red-hot); }
.cdots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line-2); }
.cdots i.ok { background: var(--green); } .cdots i.soon { background: var(--gold-fill); } .cdots i.due { background: var(--red-hot); }
.cdet { padding: 18px; }
.cdh { display: flex; align-items: center; gap: 14px; }
.cdh h2 { margin: 0; font-size: 22px; }
.cdh > span:nth-child(2) { flex: 1; min-width: 0; }
.cic.big { width: 56px; height: 56px; border-radius: 16px; } .cic.big .ico { width: 32px; height: 32px; }
.cdh .csys { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sysic { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--coal2); color: var(--bone); }
.sysic .ico { width: 20px; height: 20px; }
.cwhat { margin: 12px 0 0; color: var(--body); font-size: 15px; }
.cdet h3 { font: 600 12.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 20px 0 10px; }
.cdet h3 .k { text-transform: none; letter-spacing: 0; font-family: "Barlow", system-ui, sans-serif; margin-left: 6px; }
.cnums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cnum { display: grid; gap: 4px; text-align: left; padding: 12px; min-height: 0; background: var(--coal2); border: 1px solid transparent; border-radius: var(--r); color: var(--bone); box-shadow: none; font: inherit; cursor: pointer; }
.cnum:hover { border-color: var(--line-2); background: var(--coal2); }
.cnum.o { border-color: var(--red-hot); }
.cnl { font-size: 12.5px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnv { font: 600 24px/1 var(--head); } .cnv small { font: 500 12px "Barlow", system-ui, sans-serif; color: var(--grey); margin-left: 3px; }
.cns svg { width: 100%; height: 30px; display: block; }
.cnd { font-size: 12px; color: var(--grey); }
.cbadges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.cbadge { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 10px 6px; background: var(--coal2); border-radius: var(--r); }
.cbadge .ring { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; border: 3px solid var(--line-2); color: var(--grey); margin-bottom: 4px; }
.cbadge .ring .ico { width: 24px; height: 24px; }
.cbadge.ok .ring { border-color: var(--green); color: var(--green); }
.cbadge.soon .ring { border-color: var(--gold-fill); color: var(--gold); }
.cbadge.due .ring { border-color: var(--red-hot); color: var(--red-hot); }
.cbadge.info .ring { border-color: var(--act); color: var(--act); }
.cbn { font: 600 13px/1.2 "Barlow", system-ui, sans-serif; color: var(--bone); }
.cbd { font-size: 12px; color: var(--grey); }
.cbt { font: 600 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.cbadge.due .cbt { color: var(--red-hot); } .cbadge.ok .cbt { color: var(--green); } .cbadge.soon .cbt { color: var(--gold); }
.cbadd { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; font-size: 17px; line-height: 1; background: var(--act); color: var(--act-ink); border: 0; box-shadow: none; }
.cbp { position: absolute; top: 6px; right: 6px; color: var(--act); } .cbp .ico { width: 18px; height: 18px; }
.chelps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; align-items: start; }
.hchip { background: var(--coal2); border-radius: var(--r); border: 1px solid transparent; }
.hchip[open] { grid-column: 1 / -1; border-color: var(--line-2); }
.hchip > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font: 600 13.5px/1.2 "Barlow", system-ui, sans-serif; color: var(--bone); min-height: 44px; }
.hchip > summary::-webkit-details-marker { display: none; }
.hchip > summary .ico { width: 22px; height: 22px; color: var(--act); }
.hchip > summary span { flex: 1; }
.hchip .rmark .ico { width: 16px; height: 16px; color: var(--green); }
.hchip .hbody { padding: 0 12px 12px 42px; }
.hchip .hbody p { margin: 0 0 8px; }
.cgp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.cgp > .ico { color: var(--grey); }
.cgp .chip { min-height: 38px; padding: 0 12px; font-size: 13px; }
.cgp .chip.on { border-color: var(--act); }
.csrc { margin-top: 16px; } .csrc > summary { cursor: pointer; font-size: 13px; color: var(--grey); }
@media (max-width: 560px) { .ctiles { grid-template-columns: 1fr 1fr; } .cdh { flex-wrap: wrap; } .cdh .csys { width: 100%; justify-content: flex-start; } .cnums { grid-template-columns: 1fr 1fr; } .cbadges { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cbadge { min-width: 0; } .cbn, .cbt { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; } .chelps { grid-template-columns: 1fr 1fr; } .cdet { padding: 14px; } }
.hchip { position: relative; }
.hchip > summary .rmark { position: absolute; top: 5px; right: 6px; flex: none; }
.hchip > summary { padding-right: 22px; }

/* ---- 27 Oct: less chrome, no sideways scrolling */
.brand { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.whose { display: none !important; }
@media (max-width: 680px) {
  header.top { position: absolute; top: 0; right: 0; left: auto; z-index: 40; background: transparent; border: 0; }
  header.top .in { padding: 12px 14px 0; }
  h1 { font-size: 26px; margin-top: 14px; padding-right: 70px; }
  .sub { margin-bottom: 10px; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; margin: 8px 0 12px; }
  .tabs button { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 2px; min-height: 52px; font-size: 12px; }
  .tabs button[hidden] { display: none; }
  .tabs button .ico { width: 20px; height: 20px; }
}
@media (max-width: 380px) { .tabs button { font-size: 12.5px; } }

/* the body: one model, chips under it */
.explorer { gap: 12px; }
.stage { position: relative; display: block; padding: 0; height: clamp(300px, calc(100svh - 380px), 620px); overflow: hidden; }
.stage .an3d { position: absolute; inset: 0; touch-action: pan-y; cursor: default; }
.stage .an3d.live { touch-action: none; cursor: grab; }
.stage .an3d .xfig { max-width: 220px; margin: 12px auto; height: calc(100% - 24px); }
.stage .readout { position: absolute; top: 10px; left: 12px; right: 90px; display: flex; align-items: flex-start; justify-content: flex-start; gap: 8px; text-align: left; pointer-events: none; z-index: 2; }
.stage .readout > i { margin-top: 8px; flex: none; align-self: flex-start; }
.stage .readout > span { display: grid; gap: 2px; }
.stage .readout b { font-size: 17px; line-height: 1.2; }
.stage .legend { position: absolute; left: 0; right: 0; bottom: 8px; gap: 12px; font-size: 11.5px; pointer-events: none; z-index: 2; }
.movebtn { position: absolute; top: 8px; right: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--pill); background: var(--coal); color: var(--bone); border: 1px solid var(--line-2); font: 600 13px "Barlow", system-ui, sans-serif; box-shadow: none; }
.movebtn .ico { width: 17px; height: 17px; }
.zoombtns { position: absolute; right: 8px; bottom: 34px; z-index: 3; display: flex; flex-direction: column; border-radius: var(--pill); overflow: hidden; border: 1px solid var(--line-2); background: var(--coal); }
.zoombtns button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--bone); font: 600 20px/1 "Barlow", system-ui, sans-serif; box-shadow: none; min-height: 0; padding: 0; }
.zoombtns button + button { border-top: 1px solid var(--line-2); }
@media (hover: hover) { .zoombtns button:hover { background: var(--line-2); } }
.movebtn[aria-pressed="true"] { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.sysnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sysnav .sysbtn, .sysnav button.sysbtn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 2px; border-left: 1px solid var(--line); border-top: 3px solid var(--line-2); text-align: center; transform: none !important; }
.sysnav .sysbtn .nm { font: 600 12px/1.1 "Barlow", system-ui, sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sysnav .sysbtn .ico { width: 19px; height: 19px; }
.sysnav .sysbtn .st { position: absolute; top: 3px; right: 6px; font-size: 12.5px; }
.sysnav .sysbtn .pl { position: absolute; top: 4px; left: 5px; min-width: 14px; height: 14px; font-size: 11px; padding: 0 3px; }
.sysnav .sysbtn.ok { border-top-color: var(--green); } .sysnav .sysbtn.bad { border-top-color: var(--red-hot); } .sysnav .sysbtn.info { border-top-color: var(--s2); }
.sysnav .sysbtn.bad .ico { color: var(--red-hot); } .sysnav .sysbtn.ok .ico { color: var(--green); }
.sysnav .sysbtn.all { border-top-color: var(--act); }
.sysnav button.sysbtn[aria-pressed="true"] { background: var(--coal3); border-color: var(--bone); }
.sysdetail { min-height: 0; padding: 14px; }
.sysdetail .flowline { margin: 0 0 10px; font-size: 13.5px; color: var(--grey); }
.sd-over .sd-lead { margin: 0 0 10px; font: 600 16px var(--head); color: var(--bone); }
.sd-pick { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 6px; background: var(--coal2); border: 0; border-left: 3px solid var(--red-hot); color: var(--body); min-height: 0; box-shadow: none; font: inherit; cursor: pointer; }
.sd-pick .ico { width: 20px; height: 20px; color: var(--red-hot); }
.sd-pick b { font: 600 14px var(--head); color: var(--bone); }
.sd-pick .st { font: 600 14px var(--head); color: var(--red-hot); }
@media (min-width: 900px) {
  .explorer { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); grid-template-areas: "stage nav" "stage detail"; align-items: start; }
  .stage { grid-area: stage; height: clamp(440px, calc(100vh - 210px), 760px); position: sticky; top: 12px; }
  .sysnav { grid-area: nav; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sysdetail { grid-area: detail; }
}
.stage .readout .rt { font: inherit; text-transform: none; letter-spacing: 0; color: inherit; }
.stage .readout .rt b { font: 600 17px/1.2 var(--head); color: var(--bone); }
.stage .readout .rt span { font: 12.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.stage .readout.bad .rt span { color: var(--red-hot); } .stage .readout.ok .rt span { color: var(--green); }

/* tile hubs: Add and Settings open each card in a panel */
section.inhub { display: none !important; }
.hub { margin: 4px 0 8px; }
.hubk { display: block; margin: 14px 0 8px; }
.hubgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .hubgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hubtile { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; min-height: 64px; padding: 10px 12px; background: var(--coal); border: 1px solid var(--line); color: var(--body); box-shadow: none; font: inherit; cursor: pointer; border-radius: var(--r); }
.hubtile:hover { background: var(--coal2); }
.hubtile .ico { width: 24px; height: 24px; color: var(--act); }
.hubtile b { display: block; font: 600 14.5px/1.2 var(--head); color: var(--bone); }
.hubtile small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: flex; justify-content: center; align-items: flex-start; }
.panel-in { background: var(--ink); width: 100%; max-width: 680px; max-height: 100%; overflow: auto; overscroll-behavior: contain; }
@media (min-width: 700px) { .panel { padding: 6vh 16px; } .panel-in { border-radius: var(--r); max-height: 88vh; border: 1px solid var(--line-2); } }
@media (max-width: 699px) { .panel-in { height: 100%; } }
.panel-hd { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: inherit; border-bottom: 1px solid var(--line); }
.panel-hd b { font: 600 17px var(--head); color: var(--bone); }
.panel-x { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 999px; border: 0; }
.panel-x .ico { width: 22px; height: 22px; }
.panel-bd { padding: 12px; display: grid; gap: 12px; }
.panel-bd > section.card { margin: 0; }
body.panel-open { overflow: hidden; }
.stiles .stile { position: relative; }
.stile .sdot { display: block; width: max-content; line-height: 12px; margin-top: 1px; padding: 0 7px; border-radius: var(--pill); border: 1px solid var(--red-hot); color: var(--red-hot); font: 600 11px "Barlow", system-ui, sans-serif; white-space: nowrap; } /* a count in words under the name, not a dot */
.stile.fresh { animation: rise .5s both; }
#mine .muted { margin: 4px 0 8px; }
.panel .scat { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.panel .scard, .panel button.scard { grid-template-columns: 26px 1fr auto; gap: 8px; min-height: 48px; padding: 6px 8px; }
.panel .scard .ri .ico { width: 20px; height: 20px; }
.panel .scard .nm { font-size: 13.5px; }
.panel .scard .k { font-size: 12px; line-height: 1.25; display: block; }
.panel .scat-find input { max-width: none; }
.panel .supp { border: 0; padding: 0; margin: 0; background: transparent; }
.panel .scard, .panel button.scard { border-radius: var(--rs); }
.panel .scard .ri { background: none; width: auto; height: auto; }
.panel .scard .k { letter-spacing: .02em; text-transform: none; font-family: "Barlow", system-ui, sans-serif; font-size: 13px; }
/* For your GP: short on screen, the PDF has it all */
.gptop { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gptop .sub { margin: 0; }
.gpact { display: flex; gap: 8px; flex-wrap: wrap; }
.gpact button, .gpact .btn { display: inline-flex; align-items: center; gap: 8px; }
.gpact .ico { width: 18px; height: 18px; }
.gpgrid { display: grid; gap: 10px; }
@media (min-width: 860px) { .gpgrid { grid-template-columns: 1fr 1fr; align-items: start; } }
.gpc { margin: 0; padding: 12px 14px; }
.gpc h2 { font-size: 15px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gpc h2 small { font-size: 12.5px; }
.gstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gst { background: var(--coal2); padding: 8px 10px; border-radius: var(--rs); display: grid; gap: 1px; }
.gst b { font: 600 17px var(--head); color: var(--bone); font-variant-numeric: tabular-nums; }
.gst b small { font: 11.5px var(--mono); color: var(--grey); margin-left: 3px; }
.gst { padding: 7px 8px; }
.gst span { font-size: 13px; line-height: 1.25; color: var(--grey); }
.gout { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.gout:first-child { border-top: 0; }
.gout .nm { font-weight: 600; color: var(--bone); font-size: 14px; }
.gout b { font: 600 15px var(--head); color: var(--red-hot); text-align: right; }
.gout b small { font: 12.5px var(--mono); margin-left: 3px; }
.gout.nor b { color: var(--bone); } /* no range given: a figure to judge, not a result outside range */
.gout .k { grid-column: 1 / -1; font: 12px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--grey); }
#srec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.grec { background: var(--coal2); border-radius: var(--rs); }
.grec[open] { grid-column: 1 / -1; }
.grec summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; color: var(--bone); min-height: 40px; }
.grec summary::-webkit-details-marker { display: none; }
.grec summary span { flex: 1; line-height: 1.2; }
.grec summary b { font: 600 15px var(--head); color: var(--act); }
.grec summary .ico { width: 18px; height: 18px; color: var(--act); }
.grec .tc { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 10px 10px; }
.grec .tag { font-size: 12.5px; padding: 3px 8px; }
.grec .tag .self { font: 500 11px var(--mono); color: var(--grey); text-transform: uppercase; letter-spacing: .04em; margin-left: 2px; }
.gpc .asklist { margin: 0; padding-left: 20px; font-size: 14px; }
.gpnote { margin-top: 10px; }
.msg .famgo { display: inline-flex; align-items: center; margin-top: 8px; }
/* the shared page names the product, on every width, so whoever it was sent to can find it (audit, 9 Nov 2026) */
.gpmade { margin: 18px 0 6px; text-align: center; } .gpmade a { color: var(--grey); }
@media (min-width: 900px) {
  .explorer { grid-template-rows: auto 1fr; }
  .stage { height: clamp(440px, calc(100vh - 250px), 760px); }
  .sysdetail { align-self: start; }
}
.sd-pick, button.sd-pick { border-radius: var(--rs); }
.sd-pick .k { font: 12.5px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--grey); }
.sysdetail .flowline { text-align: left; max-width: none; padding: 0; }

/* ---- 27 Oct: share next to the cog; the record's five parts along the bottom on a phone */
header.top .in { flex-wrap: nowrap; }
.hact { display: flex; align-items: center; gap: 8px; margin-left: auto; }
header.top .cog { margin-left: 8px; }
.hbtn { background: transparent; color: var(--grey); border: 1px solid var(--line-2); min-height: 0; width: 42px; height: 42px; padding: 0; border-radius: 999px; box-shadow: none; display: inline-grid; place-items: center; }
.hbtn:hover, .hbtn[aria-expanded="true"], .hbtn[aria-current="page"] { background: var(--coal2); color: var(--bone); }
.hbtn[aria-current="page"] { border-color: var(--act); }
.hbtn .ico { width: 19px; height: 19px; }
.hbtn.mob { display: none; }
.sharebox { position: relative; }
.sharepop { min-width: 220px; }
.sharerow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 6px; margin: 0 !important; border: 0; border-radius: var(--r); background: transparent; color: var(--bone); font: 600 14.5px "Barlow", system-ui, sans-serif; text-decoration: none; justify-content: flex-start; box-shadow: none; }
.sharerow:hover { background: var(--coal2); }
.sharerow .ico { width: 19px; height: 19px; color: var(--act); }
nav.bar { display: none; }
@media (max-width: 680px) {
  nav.main { display: none !important; }
  .hbtn.mob { display: inline-grid; }
  header.top .cog { margin-left: 0; }
  .hact { gap: 6px; margin-right: 6px; }
  h1 { padding-right: var(--hdr-w, 186px); }
  #tabs { display: none !important; }
  nav.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--coal); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
  nav.bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 0 2px; color: var(--grey); font: 600 13px "Barlow", system-ui, sans-serif; text-decoration: none; border-top: 2px solid transparent; }
  nav.bar a[hidden] { display: none; }
  nav.bar a .ico { width: 22px; height: 22px; }
  nav.bar a[aria-current="page"] { border-top-color: var(--act); color: var(--bone); }
}
@media (max-width: 360px) { h1 { font-size: 22px; } nav.bar a { font-size: 12px; } html[data-caps] nav.bar a span { font-size: 11px; } /* Conditions and Medicines need the pixel on a 360 screen */ }
@media print { nav.bar, .hact { display: none !important; } }
/* one control style in the share and add menus: every row, link or button,
   is a plain row with an icon and left-aligned text (audit, 9 Nov 2026) */
.cogpop .sharerow, button.sharerow, button.sharerow.ghost, .cogpop a.sharerow { border: 0 !important; box-shadow: none !important; text-align: left; font: 500 14.5px "Barlow", system-ui, sans-serif; margin: 0 !important; }
.sharepop .langs button { box-shadow: none; border: 1px solid var(--line-2); font: 500 14px "Barlow", system-ui, sans-serif; }
/* 27 Oct: the body view's small type made legible */
.stage .legend { font-size: 12px; gap: 16px; }
.stage .readout .rt span { font-size: 12.5px; }
.stage .readout .rt b { font-size: 19px; }
/* 27 Oct: the All view lists every system; pro draws a line under each result */
.sd-g { margin: 14px 0 8px; font: 600 12px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--grey); }
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sd-grid .sd-pick { margin: 0; }
.sd-pick.ok { border-left-color: var(--green); } .sd-pick.info { border-left-color: var(--s2, #4a6fb0); } .sd-pick.none { border-left-color: var(--line-2); opacity: .8; }
.tsp { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.tsp svg { width: 110px; height: 22px; flex: none; }
.tsp small { font: 12.5px var(--mono); color: var(--grey); }
/* a tap on a phone must not leave a button looking pressed */
@media (hover: none) {
  .movebtn:hover:not([aria-pressed="true"]) { background: var(--coal); color: var(--bone); }
  .hbtn:hover:not([aria-current]):not([aria-expanded="true"]) { background: transparent; color: var(--grey); }
  .seg button:hover:not([aria-pressed="true"]) { background: transparent; color: var(--grey); }
}
/* 27 Oct: conditions open in a pop-up; tiles carry the main number */
.ctiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ctile .cmain { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ctile .cml { font-size: 12px; color: var(--grey); }
.ctile .cmain b { font: 600 18px var(--head); color: var(--bone); white-space: nowrap; }
.ctile .cmain b small { font: 12.5px var(--mono); color: var(--grey); margin-left: 3px; }
.ctile .cmain.o b { color: var(--red-hot); }
.ctile .cmain svg { grid-column: 1 / -1; width: 100%; height: 30px; }
.ctile:hover { border-color: var(--act); }
.cdet.pop { padding: 0; border: 0; background: none; }
.cdet.pop h3 { margin: 18px 0 8px; font: 600 12px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--grey); }
.cchart { background: var(--coal); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-top: 12px; }
.cchart svg { width: 100%; height: auto; display: block; font: 12.5px var(--mono); fill: var(--grey); }
.cpick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cpick button { display: inline-flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--pill); background: var(--coal2); color: var(--grey); border: 1px solid transparent; box-shadow: none; font: 600 13px "Barlow", system-ui, sans-serif; }
.cpick button b { color: var(--bone); font-family: var(--mono); font-size: 12px; }
.cpick button.o b { color: var(--red-hot); } .cpick button b small { font-size: 10px; margin-left: 3px; color: var(--grey); }
.cpick button[aria-pressed="true"] { border-color: var(--act); color: var(--bone); background: var(--coal2); }
.chelps { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
button.hchip { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; min-height: 44px; text-align: left; background: var(--coal2); color: var(--bone); border: 1px solid transparent; border-radius: var(--r); box-shadow: none; font: 600 13.5px/1.2 "Barlow", system-ui, sans-serif; position: relative; }
button.hchip .ico { width: 22px; height: 22px; color: var(--act); flex: none; }
button.hchip span:not(.rmark) { flex: 1; }
button.hchip[aria-pressed="true"] { border-color: var(--act); }
.cdet.pop .hbody { margin-top: 8px; padding: 12px 14px; background: var(--coal2); border-radius: var(--r); border-left: 3px solid var(--act); }
.cdet.pop .hbody p { margin: 6px 0; }
.cdet.pop .cmw { margin-top: 18px; font-size: 13px; color: var(--grey); }
.cdet.pop .cmw .srcs a { margin-right: 10px; }
.cchart svg { font-size: 19px; }
.cchart .legend { font-size: 12px; margin-top: 4px; }
.cnote { margin: 8px 0 0; font-size: 13.5px; color: var(--body); }
/* 27 Oct: results groups as tiles that open in a pop-up */
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.gtile { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; text-align: left; padding: 12px; min-height: 0; background: var(--coal); border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: var(--r); color: var(--bone); box-shadow: none; font: inherit; cursor: pointer; }
.gtile.bad { border-top-color: var(--red-hot); }
.gtile:hover { background: var(--coal); border-color: var(--act); }
.gtile .ib { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); background: var(--ok-bg); color: var(--green); }
.gtile.bad .ib { background: var(--out-bg); color: var(--red-hot); }
.gtile .ib .ico { width: 20px; height: 20px; }
.gtile .gn { font: 600 14.5px/1.2 var(--head); }
.gtile .gs { font: 13px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.gtile.bad .gs { color: var(--red-hot); }
.gtile .go { grid-column: 1 / -1; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--body); line-height: 1.35; }
.panel .gwhat { margin: 0 0 6px; color: var(--grey); }
.panel .trs { padding: 0; }
/* plan rows: two lines, the rest in a pop-up */
#plan .prow { cursor: pointer; }
#plan .prow .k { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panel .prow.full { border: 0; padding: 0; }
.panel .prow.full .k { font-size: 15px; line-height: 1.5; color: var(--body); }
.sd-pick.ok .ico { color: var(--green); } .sd-pick.info .ico { color: var(--s2, #4a6fb0); } .sd-pick.none .ico { color: var(--grey); }
.sd-every { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.sd-every .ico { width: 18px; height: 18px; }
.panel .sd-over .sd-g:first-child { margin-top: 0; }
.sd-pick.ok .ico { color: var(--green); } .sd-pick.info .ico { color: var(--s2, #4a6fb0); } .sd-pick.none .ico { color: var(--grey); }
.sd-every { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.sd-every .ico { width: 18px; height: 18px; }
.panel .sd-over .sd-g:first-child { margin-top: 0; }
/* custom buttons keep their own colours on hover; the global green hover is for plain buttons */
.sd-pick:hover { background: var(--coal2); color: var(--body); box-shadow: inset 0 0 0 1px var(--line-2); }
button.hchip:hover, .cpick button:hover { background: var(--coal2); color: var(--bone); border-color: var(--line-2); }
.ctile:hover, .gtile:hover { background: var(--coal); color: var(--bone); }
@media (min-width: 700px) { .cchart svg { font-size: 14px; } }

/* Body tab, October: the model's own key says only what the model shows
   (red), the chips carry the other colours with their key above them */
.stage .redkey { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font: 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); pointer-events: none; z-index: 2; }
.lg.none { background: var(--line-2); }
.chipkey { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 2px 6px; font: 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.chipkey span { display: inline-flex; align-items: center; gap: 6px; }
.chipkey .lg { width: 14px; height: 3px; border-radius: 2px; }
.zoombtns { bottom: 30px; }
.zoombtns button .ico { width: 18px; height: 18px; }
.stage.lost::after { content: "The 3D body paused. It comes back on its own, or reload the page."; position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; font: 14px "Barlow", system-ui, sans-serif; color: var(--grey); background: var(--coal); z-index: 4; }
html[lang="it"] .stage.lost::after { content: "Il corpo in 3D si è fermato. Riparte da solo, oppure ricarica la pagina."; }
html[lang="es"] .stage.lost::after { content: "El cuerpo en 3D se ha detenido. Vuelve solo, o recarga la página."; }
html[lang="fr"] .stage.lost::after { content: "Le corps en 3D s'est mis en pause. Il revient tout seul, ou rechargez la page."; }
html[lang="de"] .stage.lost::after { content: "Der 3D-Körper pausiert. Er kommt von selbst zurück, oder laden Sie die Seite neu."; }
.an3d-fail { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; color: var(--grey); font: 14px "Barlow", system-ui, sans-serif; }
.an3d-fail p { margin: 0; }
.sd-compact { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--coal2); }
.sd-compact .flowline { margin: 0; text-align: left; max-width: none; font-size: 13.5px; }
.cxs { display: flex; flex-wrap: wrap; gap: 6px; }
.cx { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: var(--pill); font: 600 12.5px "Barlow", system-ui, sans-serif; background: var(--line); color: var(--bone); }
.cx.bad { background: color-mix(in srgb, var(--red-hot) 14%, transparent); color: var(--red-hot); }
.cx.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.cxa { display: flex; flex-wrap: wrap; gap: 8px; }
.cxa .btn { text-decoration: none; display: inline-flex; align-items: center; }

.mobonly { display: none !important; }
@media (max-width: 680px) {
  .seg .mobonly, .seg.mobonly { display: inline-flex !important; }
  .seg.mobonly { display: flex !important; margin-bottom: 12px; }
  nav.bar a span { font-size: 12.5px; }
}
.cfound { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.cfr { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 12px; border-top: 1px solid var(--line); font: 14px "Barlow", system-ui, sans-serif; }
.cfr:first-child { border-top: 0; }
.cfr .d { font: 12px var(--mono); color: var(--grey); }
.cfr .w { font: 12.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--grey); text-align: right; }
.cfr.hit .t { font-weight: 600; }
.cfr.hit .w { color: var(--act); }
.cmore summary { padding: 9px 12px; border-top: 1px solid var(--line); cursor: pointer; font: 600 13px "Barlow", system-ui, sans-serif; color: var(--act); }
@media (max-width: 480px) { .cfr { grid-template-columns: 1fr auto; } .cfr .d { grid-column: 1 / -1; } }

/* Plan: one short list at a time */
.pseg { margin: 4px 0 14px; }
.pseg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pn2 { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--act); color: var(--act-ink); font: 700 12.5px "Barlow", system-ui, sans-serif; }
.pseg button[aria-pressed="true"] .pn2 { background: var(--bone); color: var(--ink); }
.ppane { display: grid; gap: 12px; }
.ppane .card { margin: 0; }
.pcard { border: 1px solid var(--line); border-radius: var(--r); background: var(--coal2); padding: 2px 14px; }
#plan .pcard .prow, .panel .ppane .pcard .prow { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; }
#plan .pcard .prow > :last-child, .panel .ppane .pcard .prow > :last-child { grid-column: auto; justify-self: end; }
#plan .pcard .prow + .prow, .panel .ppane .pcard .prow + .prow { border-top: 1px solid var(--line); }
/* a day on the calendar is an icon and its words, with no button after them: the words start at the icon, not at the far edge */
#plan #pcal .pcard .prow > :last-child { justify-self: start; }
.panel .ppane .pcard .prow .k { font-size: 13px; }
#plan .pcard .prow .k { -webkit-line-clamp: 2; font-size: 13px; } /* two lines, never one: the cut half of a sentence is the half with the information (audit, 9 Nov 2026) */
.padd { min-height: 34px; padding: 0 12px; white-space: nowrap; }
.inplan { display: inline-flex; align-items: center; gap: 4px; font: 600 12px "Barlow", system-ui, sans-serif; color: var(--green); white-space: nowrap; }
.inplan .ico { width: 15px; height: 15px; }
.ph { margin: 6px 2px 0; font: 12.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.pempty { padding: 18px 4px; }
.pgo { justify-self: start; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.pgo .ico { width: 17px; height: 17px; }
/* ---- 27 Oct, second pass */
html[data-text="large"] { zoom: 1.12; }
html[data-text="larger"] { zoom: 1.25; }
@media (max-width: 680px) { h1 + .sub { padding-right: var(--hdr-w, 186px); } }
/* the model sits under the readout band and above the key, never behind text */
.stage .an3d { top: 58px; bottom: 28px; }
.movebtn { width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; }
.movebtn .ico { width: 20px; height: 20px; }
.stage .readout.tap { pointer-events: auto; cursor: pointer; }
.stage .readout.tap .rt b::after { content: " \203A"; color: var(--grey); }
/* the key under the body: each colour opens its systems */
.chipkey { gap: 6px; }
.chipkey .ck { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--coal); color: var(--grey); font: 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; box-shadow: none; }
.chipkey .ck b { font: 600 12px "Barlow", system-ui, sans-serif; color: var(--bone); letter-spacing: 0; }
.chipkey .ck:disabled { opacity: .45; }
.chipkey .ck[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.chipkey .ck[aria-pressed="true"] b { color: var(--ink); }
@media (hover: hover) { .chipkey .ck:not(:disabled):hover { background: var(--coal2); } }
/* a sheet over the lower part of a phone screen: the body stays in view */
.panel.peek { background: transparent; align-items: flex-end; pointer-events: none; bottom: calc(59px + env(safe-area-inset-bottom)); }
.panel.peek .panel-in { pointer-events: auto; height: auto; max-height: 46vh; border-radius: 16px 16px 0 0; border: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, .22); }
.panel.peek .panel-hd { border-radius: 16px 16px 0 0; }
@media (min-width: 681px) { .panel.peek { bottom: 0; } }
/* Add, as a menu like Share */
.addbox .hbtn { display: inline-grid; }
.addpop .k + .sharerow { margin-top: 2px !important; }
.addpop .k:not(:first-child) { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.addpop .sharerow .ico { color: var(--act); }
.cogpop .setlink.tut { border-top: 0; padding-top: 4px; }
/* Conditions: where the record comes from */
.cimport { margin-top: 14px; }
.cimport .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cimport .btn .ico, .cimport button .ico { width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; }
.sar p { margin: 0 0 8px; }
.sarfacts { margin: 0 0 10px; padding-left: 18px; color: var(--bone); }
.sarletter { white-space: pre-wrap; font: 13px/1.5 var(--mono); background: var(--coal2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0 0 10px; max-height: 40vh; overflow: auto; }
/* Plan: the month */
.pcal { display: grid; gap: 8px; }
.pcalh { display: flex; align-items: center; justify-content: space-between; }
.pcalh b { font: 600 16px var(--head); color: var(--bone); }
.pcalh button { width: 40px; min-height: 36px; padding: 0; font-size: 20px; }
.pcalg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pcw { text-align: center; font: 12px var(--mono); color: var(--grey); }
.pcd { display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 46px; padding: 6px 0 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--coal); color: var(--bone); font: 600 13px "Barlow", system-ui, sans-serif; box-shadow: none; }
.pcd.now { border-color: var(--act); }
.pcd.sel { background: var(--coal2); border-color: var(--bone); }
.pcd i { display: flex; gap: 2px; min-height: 6px; }
.pcd em, .pcalkey em, .pi em { display: inline-flex; width: 11px; height: 11px; color: var(--grey); }
.pcd em .ico, .pcalkey em .ico, .pi em .ico { width: 11px; height: 11px; }
.pi em { width: 18px; height: 18px; } .pi em .ico { width: 18px; height: 18px; }
.pi em { width: 10px; height: 10px; }
.k-late { color: var(--red-hot) !important; } .k-due { color: var(--gold, #c69a2b) !important; } .k-done { color: var(--green) !important; }
.k-draw { color: var(--s2, #4e7fb8) !important; } .k-bp { color: #9b67a8 !important; } .k-visit { color: var(--bone) !important; } .k-routine { color: var(--act) !important; }
.k-cond { color: var(--bone) !important; } .k-med { color: var(--s2, #4e7fb8) !important; } .k-vax { color: var(--green) !important; } .k-alg { color: var(--red-hot) !important; }
.pcalkey { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.pcalkey span { display: inline-flex; align-items: center; gap: 5px; }
.pnote { margin: -4px 0 4px; }
/* Record: the sources */
.conns { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.conn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--pill); border: 1px dashed var(--line-2); color: var(--grey); font: 600 13px "Barlow", system-ui, sans-serif; text-decoration: none; }
.conn .ico { width: 16px; height: 16px; }
.conn b { font-weight: 600; color: var(--act); }
.conn.on { border-style: solid; color: var(--bone); }
.conn.on b { color: var(--green); }
/* Medicines */
.msec { margin: 18px 0 8px; font: 600 18px var(--head); }
.rxl { display: grid; gap: 2px; margin: 4px 0 8px; }
.rxr { display: grid; grid-template-columns: 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rxr .nm { font: 600 15px "Barlow", system-ui, sans-serif; color: var(--bone); }
/* Settings: Basic and Pro side by side */
table.modes { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font: 13.5px "Barlow", system-ui, sans-serif; }
table.modes th { text-align: left; font: 600 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); padding: 6px 6px 6px 0; }
table.modes td { padding: 7px 8px 7px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--bone); }
table.modes td:first-child { color: var(--grey); width: 28%; }
.pseg button { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.pgrp { border-bottom: 1px solid var(--line); }
.pgrp:last-child { border-bottom: 0; }
.pgrp > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; cursor: pointer; list-style: none; font: 600 15px "Barlow", system-ui, sans-serif; color: var(--bone); }
.pgrp > summary::-webkit-details-marker { display: none; }
.pgrp > summary::after { content: "\203A"; transform: rotate(90deg); color: var(--grey); font-size: 20px; }
.pgrp[open] > summary::after { transform: rotate(-90deg); }
.pgrp > summary b { margin-left: auto; font: 600 12px var(--mono); color: var(--grey); }
nav.main a[data-for="add"] { display: none; }
.modecards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 4px; }
.modecard { border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; }
.modecard h3 { margin: 0; font-size: 16px; }
.modecard .k { margin: 2px 0 6px; }
.modecard ul { margin: 0; padding-left: 18px; font: 13.5px "Barlow", system-ui, sans-serif; color: var(--bone); }
.modecard li { margin: 3px 0; }
@media (max-width: 420px) { .modecards { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .chipkey { flex-wrap: nowrap; gap: 4px; } .chipkey .ck { padding: 0 7px; letter-spacing: 0; gap: 4px; } .chipkey .ck .lg { width: 8px; } }
html[data-mode="basic"] .modecard:first-child, html[data-mode="pro"] .modecard:last-child { border-color: var(--bone); }
/* ---- teeth */
.teethempty { text-align: center; }
.teethempty > .ico { width: 34px; height: 34px; color: var(--grey); }
.ttiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0 12px; }
@media (min-width: 700px) { .ttiles { grid-template-columns: repeat(4, 1fr); } }
.tt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--coal); color: var(--bone); text-align: left; font: inherit; box-shadow: none; min-height: 0; }
.tt .k { font: 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); }
.tt b { font: 600 16px "Barlow", system-ui, sans-serif; }
.tt .s { font-size: 12.5px; color: var(--grey); }
.tt.bpe.bad { border-color: var(--out); } .tt.bpe.bad b { color: var(--out); }
.tt.bpe.ok b { color: var(--green); }
.bpegrid { display: inline-grid; grid-template-columns: repeat(3, 22px); gap: 2px; }
.bpegrid i, .bpekey i { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; border-radius: 6px; font: 600 12px var(--mono); font-style: normal; background: var(--ok-bg); color: var(--green); }
.bpegrid i.c3, .bpegrid i.c4, .bpekey i.c3, .bpekey i.c4 { background: var(--out-bg); color: var(--out); }
.bpegrid i.c2, .bpekey i.c2 { background: var(--warn-bg); color: var(--orange); }
.bpekey { list-style: none; padding: 0; margin: 8px 0; } .bpekey li { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
/* tooth colours: the natural palette the 3D mouth uses, so chart, key and model agree */
:root { --t-crown: #d8c197; --t-fill: #9fb2c6; --t-watch: #dcb27e; --t-root: #c08883; }
.chartwrap { overflow-x: auto; }
.toothchart { width: 100%; min-width: 330px; height: auto; display: block; }
.toothchart .midline { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.toothchart .th { cursor: pointer; outline: none; }
/* every tooth keeps its ivory; work done is an outline in the state colour (9 Nov 2026), missing a dashed ghost */
.toothchart .th .body { fill: #ece4d4; stroke: var(--grey); stroke-width: .9; stroke-linejoin: round; }
.toothchart .th .root { fill: #e3d8c4; stroke: var(--grey); stroke-width: .7; opacity: .75; }
.toothchart .th.e-crown .body { stroke: var(--t-crown); stroke-width: 2.4; }
.toothchart .th.e-root .body, .toothchart .th.e-root .root { stroke: var(--t-root); stroke-width: 2; opacity: 1; }
.toothchart .th.e-filling .body { stroke: var(--t-fill); stroke-width: 1.8; }
.toothchart .th.e-watch .body { stroke: var(--t-watch); stroke-width: 1.8; stroke-dasharray: 2.4 1.6; }
.toothchart .th.miss .body, .toothchart .th.miss .root { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 2; opacity: 1; }
.toothchart .th .fill { fill: var(--t-fill); stroke: none; }
.toothchart .th .rc { stroke: var(--t-root); stroke-width: 1.6; stroke-linecap: round; }
.toothchart .th text { font: 8px var(--mono); fill: var(--grey); text-anchor: middle; }
.toothchart .th:hover .body, .toothchart .th:focus .body { stroke: var(--act); stroke-width: 2.4; stroke-dasharray: none; }
.tkey { display: flex; flex-wrap: nowrap; overflow: hidden; gap: 4px 12px; margin: 8px 0 2px; font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.tkey > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex: none; }
.tkey.tight .kl { display: none; }
.tkey.tight { gap: 4px 16px; }
.tkey i { width: 12px; height: 12px; border-radius: 4px; border: 1.2px solid var(--grey); }
.tkey .kc { border: 2.4px solid var(--t-crown); }
.tkey .kf { border-radius: 50%; border: 2px solid var(--t-fill); }
.tkey .kr { border: 2px solid var(--t-root); }
.tkey .kw { border: 1.8px dashed var(--t-watch); }
.tkey .km { border-style: dashed; }
.tkey .kx { background: #bdb6a8; border-color: #bdb6a8; }
.thist { list-style: none; padding: 0; margin: 4px 0 10px; }
.thist li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.thist li .k { font-size: 12.5px; color: var(--grey); text-align: right; }
.dchk { list-style: none; padding: 0; margin: 4px 0 8px; max-height: 50vh; overflow: auto; }
.dchk li { padding: 5px 0; border-top: 1px solid var(--line); }
.dchk label { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; margin: 0; font: 14px "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; color: var(--bone); }
.dchk input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 1px 0 0; }
.dchk .k { white-space: nowrap; font: 12.5px "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; color: var(--grey); }
.dchk span .k { white-space: normal; display: block; }
#dental-review { margin-top: 12px; }
.sharepop .langs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 4px 4px; }
.sharepop .langs button { min-height: 38px; }
.thist li .k { font: 13px "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; }

/* the mouth in 3D, on Record > Teeth */
.t3d { position: relative; height: 300px; margin: 10px 0 6px; border-radius: 14px; background: radial-gradient(ellipse at 50% 40%, var(--coal2, rgba(255,255,255,.04)), transparent 70%); overflow: hidden; touch-action: pan-y; }
.t3d canvas { display: block; width: 100%; height: 100%; }
.t3d .zoombtns { bottom: 8px; }
.t3d:not(.moving) .zoombtns { display: none; }
.t3d[hidden] { display: none; }
@media (min-width: 700px) { .t3d { height: 380px; } }

/* the one agreement, asked once before the app opens */
.obgate { align-items: center; justify-content: center; padding: 24px 16px; }
.obgate-in { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 12px; }
/* the wording takes the height the screen has (21 Nov 2026): at a fixed
   46vh the Italian text was cut mid-sentence at 664 with nothing to say
   there was more. Where it still does not fit, the box fades at the cut
   until it has been scrolled to the end (.cut, set in agreeGate). */
.obgate-in { max-height: 100%; min-height: 0; }
.obgate-in h2, .obgate-in > p { margin: 0; }
.obgate-in .obconsent { max-height: none; flex: 0 1 auto; min-height: 96px; }
.obconsent.cut { -webkit-mask-image: linear-gradient(#000 calc(100% - 40px), transparent); mask-image: linear-gradient(#000 calc(100% - 40px), transparent); }
/* the same in the tutorial's last card, where the model steps back to make
   the room (.ob-read, set in intro): at 52vh of model the wording had seven
   lines and was cut mid-line */
.obcard .obconsent { max-height: none; flex: 0 1 auto; min-height: 96px; width: 100%; }
.obcard .actions { flex: none; }
.ob.ob-read .obstage { flex-basis: 16vh; min-height: 100px; }
@media (prefers-reduced-motion: no-preference) { .obstage { transition: flex-basis .3s ease; } }
/* the model in the tutorial fades at its edges like the Body tab's, so a
   body cut by the stage never shows a straight line */
.obstage canvas {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 7%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 7%, #000 88%, transparent 100%);
  mask-composite: intersect;
}
.obgate-in .actions, .obgate-in > h2, .obgate-in > p { flex: none; }
.obgate-in .actions button { width: 100%; }
.tlayers { margin: 0 0 8px; }
.tlayers[hidden] { display: none; }
.tlayers .tbite { display: inline-flex; align-items: center; gap: 6px; }
.tlayers .tbite .ico { width: 15px; height: 15px; }

/* medicine reminders */
.rml { display: flex; flex-direction: column; margin: 4px 0 10px; }
.rmr { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); }
.rmr b { font: 600 15px var(--mono); }
.rmadd { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.rmadd select, .rmadd input { min-height: 44px; min-width: 0; }
.rtn .k.late { color: var(--out); }
.rmr .x { background: none; border: 0; color: var(--grey); font-size: 20px; min-height: 44px; min-width: 44px; padding: 0; box-shadow: none; }
.sd-cond { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 6px; }
.sd-cond b { font-weight: 600; }

/* compact phone layout (28 Oct 2026): symbols without captions, one line of filters */
a.btn.small, button.small, .ghost.small { display: inline-flex; align-items: center; gap: 6px; }
.chipkey { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chipkey::-webkit-scrollbar { display: none; }
.chipkey .ck { flex: 0 0 auto; white-space: nowrap; min-height: 36px; }
@media (max-width: 899px) {
  nav.bar a { min-height: 52px; }
  nav.bar a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html[data-caps] nav.bar a { min-height: 56px; }
  html[data-caps] nav.bar a span { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 12px; line-height: 1; margin-top: 2px; } /* 12px, the floor for a label; the bar is sized by min-height so it does not grow (audit, 9 Nov 2026) */
  html[data-caps] nav.bar a .ico { width: 22px; height: 22px; }
  nav.bar a .ico { width: 25px; height: 25px; }
  .sysnav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .sysnav .sysbtn, .sysnav button.sysbtn { min-height: 46px; padding: 0; }
  .sysnav .sysbtn .nm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sysnav .sysbtn .ico { width: 22px; height: 22px; }
  .ttiles .tt { padding: 8px 10px; }
  .ttiles .tt b { font-size: 15px; }
  .card { padding: 14px; margin-bottom: 10px; }
  .card > .sec:first-child, .card > :first-child > .sec:first-child { margin-top: 0; }
  #sysdetail .sd-lead { display: none; }
}

/* design pass, 28 Oct 2026 */
/* sentences read in the body face; mono capitals stay for short labels */
p.k, p.sub, .rxr .k, .ttiles .tt .s { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 1.45; color: var(--grey); }
.planline { margin: 0 0 10px; font: 600 15px "Barlow", system-ui, sans-serif; color: var(--bone); }
/* a tile's note gets two lines rather than an ellipsis */
.hubtile small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 899px) {
  /* where you are, without captions: the current symbol sits in a pill */
  nav.bar a { border-top: 0; position: relative; }
  nav.bar a .ico { padding: 7px 14px; box-sizing: content-box; border-radius: var(--pill); transition: background .2s; }
  nav.bar a[aria-current="page"] .ico { background: var(--coal3); color: var(--act); }
  /* with names the pill is 4px shorter, so the caption has room under it: it sat 1px off the screen's edge */
  html[data-caps] nav.bar a .ico { padding: 5px 14px; }
}
.tprac { margin: 0 0 4px; }

/* conditions: one even row each, like a pinned card in a health app */
.crows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.crow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 64px auto; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 10px 14px 10px 10px; text-align: left; background: var(--coal); border: 1px solid var(--line); border-radius: var(--r); color: var(--bone); box-shadow: none; font: inherit; }
.crow .cic { width: 44px; height: 44px; }
.crow.cflag .cic { background: var(--out-bg); color: var(--red-hot); }
.crn { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crn b { font: 600 16px/1.2 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crn small { font-size: 13px; color: var(--grey); }
.crs svg { width: 64px; height: 28px; display: block; }
.crv { display: flex; flex-direction: column; align-items: flex-end; min-width: 56px; }
.crv b { font: 600 19px/1 var(--head); color: var(--bone); white-space: nowrap; }
.crv small { font: 12.5px var(--mono); color: var(--grey); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.crv.o b, .crv.due b { color: var(--red-hot); }
.crv.none { color: var(--faint); } .crv.none .ico { width: 20px; height: 20px; }
@media (hover: hover) { .crow:hover { border-color: var(--act); } }
.cmore { display: flex; flex-wrap: wrap; gap: 6px; }
.cmore a, .cmore button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--line-2); background: none; color: var(--grey); font: 600 13px "Barlow", system-ui, sans-serif; text-decoration: none; box-shadow: none; }
.cmore .ico { width: 15px; height: 15px; }
/* one dot per test in a results group: red outside, green inside */
.gdots { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.gdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); opacity: .8; }
.gdots i.o { background: var(--red-hot); opacity: 1; }
/* teeth: four figures on one line, no sentences */
.tstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.tstats > div, .tstats > button { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: var(--rs); background: var(--coal); color: var(--bone); text-align: left; font: inherit; box-shadow: none; min-height: 0; }
.tstats > button { align-items: stretch; justify-content: flex-start; } /* the Gums figure is a button: without this it centred, beside three figures set left */
.tstats .k { font-size: 11.5px; }
.tstats b { font: 600 14px/1.15 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tstats .bpe.ok b { color: var(--green); } .tstats .bpe.bad b { color: var(--red-hot); }
.tkey .tnote { color: var(--faint); }
.tlayers .tbite { padding: 0 12px; }

/* One screen on a phone (28 Oct 2026): nothing below the body's
   buttons; the readout opens the list instead. */
@media (max-width: 899px) {
  .explorer .sysdetail { display: none; }
}
@media (max-width: 899px) {
  .stage { height: clamp(300px, calc(100svh - 224px), 640px); }
  /* Record, Results: three small tiles a row, the dots carry the count */
  .ggrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gtile { grid-template-columns: 1fr; padding: 9px 9px 10px; row-gap: 4px; }
  .gtile .ib { grid-row: auto; width: 28px; height: 28px; }
  .gtile .ib .ico { width: 17px; height: 17px; }
  .gtile .gn { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
  .gtile .gs { display: none; }
  .gtile:not(.bad) .gs { display: block; grid-column: 1 / -1; font: 12px/1.2 "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; } .gtile:not(.bad) .gdots { display: none; } /* a tick and the words rather than green dots alone */
  .gtile .gdots { margin-top: 2px; gap: 3px; }
  .gtile .gdots i { width: 6px; height: 6px; }
  /* fitRecord's last step when the tiles still push the page past the bar */
  .ggrid.rtight { gap: 6px; }
  .ggrid.rtight .gtile { padding: 6px 8px 7px; row-gap: 2px; }
  .ggrid.rtight .gtile .gn { min-height: 0; }
  #moved-wrap { padding: 12px 14px; }
  #moved-wrap .sec { margin-bottom: 8px; }
  #moved-wrap .sec h2 { font-size: 15px; }
  #moved { display: grid; gap: 8px; }
  #moved .mv { padding: 8px 10px; }
  #moved .mvall { justify-self: start; }
  #labs-more { margin-top: 10px; }
}
.mvlist { display: grid; gap: 8px; margin-bottom: 10px; }
@media (max-width: 899px) {
  .stage { height: clamp(300px, calc(100svh - 290px), 640px); }
  .gtile { grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: start; }
  .gtile .ib { width: 26px; height: 26px; }
  .gtile .gn { min-height: 0; align-self: center; }
  #moved-wrap .sec { display: none; }
  #moved-wrap { padding: 8px; }
  #moved { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  #moved .mv { grid-template-columns: 28px 1fr auto; gap: 8px; }
  #moved .mv .arr { width: 28px; height: 28px; font-size: 16px; }
  #moved .mv .k { display: none; }
  #moved .mv .now { font-size: 17px; }
  #moved .mvall { min-height: 36px; padding: 0 10px; }
}
@media (max-width: 899px) {
  #moved .mvall { min-width: 40px; padding: 0 10px; font-size: 16px; }
  .gtile .gn { hyphens: auto; overflow-wrap: anywhere; }
}
@media (max-width: 899px) {
  [data-more]:not(.inpanel) { display: none !important; }
  .morerow { margin-top: 12px; }
  /* Trends: four small figures across, the chart below does the showing */
  .vitals { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .vital { min-height: 0; padding: 8px 6px; gap: 4px; align-items: center; text-align: center; }
  .vital .top .k, .vital .d, .vital .spark, .vital .ring { display: none; }
  .vital .top .ico { width: 18px; height: 18px; }
  .vital .v { font-size: 17px; }
  .vital .v small { display: block; margin: 2px 0 0; font-size: 11.5px; }
  .vital.none .v { font-size: 12px; }
  /* an empty tile names what it is for in both views, so "Add" never stands alone (Pro too; audit, 9 Nov 2026) */
  .vital.none .top { flex-direction: column; gap: 3px; }
  .vital.none .top .k { display: block; font-size: 11.5px; line-height: 1.2; color: var(--body); text-transform: none; letter-spacing: 0; }
  .vital .ringrow { justify-content: center; }
  .bpstats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .bpstat, .bpstat.big { grid-column: auto; padding: 8px; gap: 3px; }
  .bpstat b, .bpstat.big b { font-size: 21px; }
  .bpstat span { font-size: 11.5px; letter-spacing: .03em; }
  .bpstat small { display: none; }
}
@media (min-width: 900px) { .morerow { display: none; } }
@media (max-width: 899px) { .gtile .gn { overflow-wrap: normal; font-size: 12.5px; } }
.tlyears { display: none; }
@media (max-width: 899px) {
  .rtiles + .k.rsrc, .rsrc { margin-top: 10px; }
}
@media (max-width: 899px) {
  .rsrc, .gpnote { display: none; }
  /* Medicines: reminders are one row until one is set */
  .rmcard { padding: 10px 12px; }
  .rmcard .sec { margin-bottom: 6px; }
  .rmcard .sec h2 { font-size: 15px; }
  .rmcard .msg:empty { display: none; }
  .hubgrid { gap: 8px; }
}
@media (max-width: 899px) {
  .hubtile { min-height: 0; padding: 9px 10px; gap: 8px; }
  .hubtile b { font-size: 13.5px; }
  .hubtile small { -webkit-line-clamp: 2; font-size: 12px; }
  @media (max-height: 700px) { .hubtile { padding: 8px 10px; } } /* two-line subtitles must not push Add past the fold at 664 */
  .hubk { margin: 10px 0 6px; }
  .gpact { flex-wrap: nowrap; gap: 6px; }
  .gpact button, .gpact .btn { padding: 0 12px; min-height: 40px; font-size: 13.5px; white-space: nowrap; }
}
@media (max-width: 899px) {
  .gpgrid { gap: 10px; }
  .gpc { padding: 12px 14px; }
  .gptop { margin-bottom: 8px; }
}
.tly.inpanel > h3 { display: none; }
/* the one drop on Add: a short row, not a big box */
.anyfile { padding: 12px; margin-bottom: 12px; }
.anyfile .drop { min-height: 0; padding: 14px; }
.anyfile .msg:empty { display: none; }
.anyfile .msg a { white-space: nowrap; }
.anyfile .msg { font: 14px/1.45 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; margin-top: 10px; }
.anyfile .dsrc { display: flex; gap: 14px; color: var(--grey); margin-top: 2px; }
.anyfile .dsrc .ico { width: 20px; height: 20px; }
/* a short phone: the drop gives up a little height so the tiles under it
   clear the bar (21 Nov 2026, a ninth way in on Add) */
@media (max-height: 700px) and (max-width: 899px) { .anyfile .drop { padding: 10px 14px; } .anyfile .drop .di { margin-bottom: 0; } }

/* Legibility (28 Oct 2026): labels in the body face, sentence case,
   nothing under 12px; mono is kept for figures only. */
.k { font-family: "Barlow", system-ui, sans-serif; font-size: 13px; letter-spacing: .01em; text-transform: none; color: var(--grey); }
.msg { font-family: "Barlow", system-ui, sans-serif; font-size: 14px; }
.stage .readout .rt span { font: 500 14px/1.35 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.ck { font-family: "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; }
.muted { font-size: 14.5px; }
/* the red, named on the body */
.stage .readout .rlines { display: grid; gap: 3px; margin-top: 6px; }
.stage .readout .rlines:empty { display: none; }
.stage .readout .rli { display: flex; align-items: center; gap: 7px; width: max-content; max-width: 100%; padding: 3px 9px 3px 7px; border-radius: var(--pill); background: rgba(17,20,18,.78); font: 500 14px/1.3 "Barlow", system-ui, sans-serif; color: var(--bone); }
.stage .readout .rli i { width: 7px; height: 7px; border-radius: 50%; background: var(--red-hot); flex: none; margin: 0; }
.stage .readout .rli em { font-style: normal; color: var(--red-hot); font-weight: 600; }
.stage .readout .rli small { color: var(--grey); font-size: 12.5px; }
.stage .readout .rli.more { color: var(--grey); padding-left: 9px; }
:root[data-theme="light"] .stage .readout .rli { background: rgba(255,255,255,.85); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .stage .readout .rli { background: rgba(255,255,255,.85); } }
/* A condition, opened in its own tab: back, name, one section at a time */
#conds .cdet { padding: 0; }
#conds .cdh { gap: 10px; }
#conds .cback { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; }
#conds .cback .ico { width: 20px; height: 20px; }
#conds .cdt { flex: 1; min-width: 0; display: grid; gap: 1px; }
#conds .cdt b { font: 600 20px/1.2 var(--head); color: var(--bone); }
#conds .cdt small { font-size: 14px; color: var(--grey); }
#conds .cwhat { margin: 10px 0 12px; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#conds .cdtabs { margin-bottom: 12px; display: flex; overflow-x: auto; scrollbar-width: none; }
#conds .cdtabs button { white-space: nowrap; flex: 1 0 auto; }
#conds .cdbody { min-height: 0; }
#conds .cdbody h3 { font: 600 15px var(--head); letter-spacing: 0; text-transform: none; color: var(--bone); margin: 14px 0 8px; }
#conds .cnote { font-size: 14px; color: var(--grey); margin: 6px 0 0; }
.chelps button.hchip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; font: 600 14px/1.2 "Barlow", system-ui, sans-serif; color: var(--bone); box-shadow: none; text-align: left; }
.chelps button.hchip .ico { width: 22px; height: 22px; color: var(--act); flex: none; }
.chelps button.hchip[aria-pressed="true"] { border-color: var(--act); }
#conds .hbody { margin-top: 10px; padding: 12px 14px; background: var(--coal2); border-radius: var(--r); }
#conds .hbody p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: var(--body); }
#conds .clist { display: grid; gap: 6px; }
#conds .cli { display: grid; gap: 2px; padding: 10px 12px; background: var(--coal); border: 1px solid var(--line); border-radius: var(--rs); }
#conds .cli b { font: 600 15px/1.3 "Barlow", system-ui, sans-serif; color: var(--bone); }
#conds .cli span { font-size: 13.5px; color: var(--grey); }
#conds .cli.hit { border-left: 3px solid var(--act); }
#conds .cmw { font-size: 13px; color: var(--grey); margin-top: 10px; }
#conds .cdh > .cic { flex: none; width: 44px; height: 44px; }
#conds .cdh > .cdt { flex: 1; }
#conds .cdh .csys { display: none; }
html[data-text="small"] { zoom: 0.92; }
html[data-text="large"] { zoom: 1.1; }
html[data-text="larger"] { zoom: 1.2; }
html[data-text="largest"] { zoom: 1.32; }
.tsizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tsizes button { min-height: 56px; padding: 0; display: grid; place-items: center; background: var(--coal2); color: var(--bone); border: 1px solid var(--line); box-shadow: none; font-family: var(--head); font-weight: 600; }
.tsizes button[aria-pressed="true"] { border-color: var(--act); background: var(--coal3); }
.tsizes .ts0 { font-size: 15px; } .tsizes .ts1 { font-size: 18px; } .tsizes .ts2 { font-size: 21px; } .tsizes .ts3 { font-size: 24px; } .tsizes .ts4 { font-size: 28px; }
.tsizes.langs button { font-size: 13px; min-height: 44px; }
@media (max-width: 420px) { .tsizes.langs { grid-template-columns: repeat(3, 1fr); } }
.tsample { margin: 12px 0 0; font-size: 16px; color: var(--body); }
@media (max-width: 680px) { h1 { min-height: 52px; display: flex; align-items: center; margin-top: 0; } }
/* the tutorial's first card: the two views side by side */
.obmode { justify-items: stretch; text-align: left; padding: 12px; }
.obmode .nm { justify-self: start; }
.obprev { display: grid; gap: 6px; }
.obprev .obrow { font-size: 14px; padding: 7px 8px; }
.obfeat { font-size: 13px; line-height: 1.35; color: var(--grey); }
.gmini.lo::before { left: 40%; }
.gmini.lo i { left: 22%; background: var(--red-hot); }
.pill.hi { background: var(--out-bg); color: var(--red-hot); }
.pill { font-family: "Barlow", system-ui, sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; white-space: nowrap; border-radius: var(--pill); }
.recfind { display: none; }
@media (max-width: 899px) {
  /* Record: sources live in Settings; search is a symbol until opened */
  #conns { display: none; }
  .recfind { display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; flex: none; margin-left: auto; }
  .recfind .ico { width: 20px; height: 20px; }
  .segrow { flex-wrap: nowrap; }
  .segrow #rec-q { display: none; }
  .segrow.searching #rec-q { display: block; flex: 1; min-width: 0; }
  .segrow.searching > .seg { display: none; }
  /* Trends: the four figures pick the chart */
  [data-segs="trends"] { display: none !important; }
  .vital.on { border-color: var(--act); background: var(--coal2); }
  .vitals { margin-bottom: 10px; }
  /* Medicines */
  .rxcard .rxr .k { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .rxcard { padding: 12px 14px; }
  .msec { font-size: 17px; margin: 14px 0 8px; }
}
@media (max-width: 899px) {
  .bpstat span { font: 500 13px/1.3 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
  /* the chart's note on Trends, not the field of the same id on Add, Blood
     pressure: that was hidden too, leaving "Anything to note" with no box */
  p#bp-note { display: none !important; }
  .rmcard .sec:has(+ .rmadd), .rmcard .sec:has(+ .msg) { display: none; }
  .rmcard { display: block; }
  [data-page="supplements"] .rxcard .sec .k { display: none; }
  .stiles .hubtile small { display: none; }
  .stiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-page="settings"] .hubtile small { display: none; }
  [data-page="settings"] .hubtile { min-height: 52px; }
  [data-page="summary"] .gpact button, [data-page="summary"] .gpact .btn { font-size: 13px; padding: 0 10px; }
}
.rmbell { display: none; }
@media (max-width: 899px) { .rmbell { display: grid; place-items: center; color: var(--act); } .rmbell .ico { width: 22px; height: 22px; } }
@media (max-width: 899px) { .rmadd { grid-template-columns: auto minmax(0, 1fr) auto auto; } .rmadd select { max-width: 100%; } }
@media (max-width: 899px) {
  [data-page="supplements"] .hubtile small { display: none; }
  [data-page="supplements"] .hubtile { min-height: 50px; }
  .rxcard .rxr { padding: 7px 0; }
  .rxcard .rxr:last-child { border-bottom: 0; }
  .rxcard .sec { margin-bottom: 4px; }
  [data-page="supplements"] .msec { margin-top: 10px; }
}
.msecadd { display: none; }
@media (max-width: 899px) {
  .msec { display: flex; align-items: center; justify-content: space-between; }
  .msecadd { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--act); font: 600 22px/1 var(--head); text-decoration: none; }
  [data-page="supplements"] .hubtile[data-open="Add a supplement"] { display: none; }
}
.chipkey .ck { font: 600 14px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.chipkey .ck b { font-size: 14px; }
@media (max-width: 899px) {
  .stage .redkey { display: none !important; }
  .crow .crn b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }
  [data-segs="record"] button, .recstrip button { padding-left: 8px; padding-right: 8px; white-space: nowrap; font-size: 14px; }
  /* every sub-tab bar on a phone (Record, Trends, Plan, a condition) spans
     the page and its segments share the width, like the Plan tabs and the
     Body filter; the Record bar sat left with a void to its right
     (audit, 9 Nov 2026, a screenshot) */
  .seg.wide { display: flex; width: 100%; }
  .seg.wide > button { flex: 1 1 auto; min-width: 0; text-align: center; }
  .segrow .seg.wide { flex: 1 1 auto; width: auto; }
}
.tkey { font: 500 12px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.tkey i { width: 10px; height: 10px; border-radius: 3px; }
.tkey .kr { width: 3px; }
@media (max-width: 899px) {
  /* Teeth: the mouth takes what the screen has left */
  .t3d { height: clamp(200px, calc(100svh - 291px), 620px); margin-top: 4px; }
  html[data-mode="pro"] .t3d { height: clamp(200px, calc(100svh - 317px), 620px); }
  html[data-caps] .t3d { height: clamp(200px, calc(100svh - 297px), 620px); }   /* names under the bar: 4px taller */
  html[data-caps][data-mode="pro"] .t3d { height: clamp(200px, calc(100svh - 323px), 620px); }   /* the Gums tile carries the BPE grid in pro, two rows taller */
  /* with no dental record the prompt and its two buttons stand taller than
     the row of figures, and the Head tab scrolled 9px in Basic (21 Nov 2026) */
  html:not([data-mode="pro"]) .teethcard:has(.tnone) .t3d { height: clamp(200px, calc(100svh - 303px), 620px); }
  html[data-caps]:not([data-mode="pro"]) .teethcard:has(.tnone) .t3d { height: clamp(200px, calc(100svh - 307px), 620px); }
  /* the ear: depth control and two lines under it, the same in basic and pro */
  .t3d.e3d, html[data-mode="pro"] .t3d.e3d { height: clamp(200px, calc(100svh - 292px), 620px); }
  html[data-caps] .t3d.e3d, html[data-caps][data-mode="pro"] .t3d.e3d { height: clamp(200px, calc(100svh - 298px), 620px); }
  .teethcard { padding: 12px; }
  .tprac { margin: 0; }
}
@media (max-width: 899px) { .gtile .gn { hyphens: auto; -webkit-hyphens: auto; } }

/* A red results tile names what is outside, so it reads without a tap. */
.gtile .gw { display: none; }
@media (max-width: 899px) {
  .gtile.bad .gw { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; grid-column: 1 / -1; font-size: 12.5px; line-height: 1.12; color: var(--red-hot); }
  .gtile .gw b { font-weight: 400; color: var(--grey); }
  .gtile.bad .gdots { display: none; }
}
@media (max-width: 899px) { .rmadd input[type="time"] { width: 6.2em; padding-right: 6px; } .rmadd input[type="time"]::-webkit-calendar-picker-indicator { display: none; } }
.crv.chk b { color: var(--body); font-size: 17px; }

/* Medical ID card on Conditions: a bank-card shape with depth. Dark in
   both themes, like a real card. Tilts under the finger (--rx, --ry), turns
   over on a tap, and sways gently at rest unless motion is reduced. */
.mid { --rx: 0deg; --ry: 0deg; --sx: 30%; perspective: 1100px; container-type: inline-size; width: min(100%, 440px, calc(clamp(170px, 100svh - 414px, 280px) * 1.586)); margin: 0 auto 12px; aspect-ratio: 1.586; touch-action: none; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.mid-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.2,.8,.2,1); animation: midsway 7s ease-in-out infinite; }
.mid.live .mid-in { transition: transform .08s linear; animation: none; }
.mid.back .mid-in { transform: rotateX(var(--rx)) rotateY(calc(180deg + var(--ry))); animation: none; }
@keyframes midsway { 0%, 100% { transform: rotateX(4deg) rotateY(-7deg); } 50% { transform: rotateX(-2deg) rotateY(7deg); } }
.mid-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4.47cqw; padding: 3.91cqw 4.47cqw 3.35cqw; display: flex; flex-direction: column; gap: 2.23cqw; overflow: hidden; color: #F2EEE8;
  background: radial-gradient(120% 90% at 100% 0%, rgba(214, 74, 58, .38), transparent 55%), linear-gradient(150deg, #262A29 0%, #171A19 60%, #101211 100%);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 -2px 0 rgba(0,0,0,.4) inset, 0 5.03cqw 8.38cqw -3.35cqw rgba(0,0,0,.7), 0 1.12cqw 2.79cqw rgba(0,0,0,.35); }
.mid-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.13) 45%, rgba(140,220,200,.10) 52%, rgba(255,190,150,.08) 58%, transparent 70%) var(--sx) 0 / 260% 100% no-repeat; mix-blend-mode: screen; transition: background-position .2s; }
.mid-b { transform: rotateY(180deg); }
.mid-h { display: flex; align-items: center; gap: 2.23cqw; }
.mid-sym { width: 7.26cqw; height: 7.26cqw; border-radius: 50%; background: #D64A3A; color: #fff; display: grid; place-items: center; flex: none; }
.mid-sym .ico { width: 4.75cqw; height: 4.75cqw; }
.mid-t { font: 600 3.63cqw var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #F2EEE8; }
.mid-bg { margin-left: auto; font: 600 4.19cqw var(--mono); padding: 2px 2.51cqw; border-radius: 279.05cqw; background: rgba(214, 74, 58, .22); color: #FFB3A8; border: 1px solid rgba(214,74,58,.5); }
.mid-n { display: flex; flex-direction: column; }
.mid-n b { font: 600 5.31cqw/1.15 var(--head); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.mid-n small { font-size: 3.49cqw; color: #B8B4AE; min-height: 1em; }
.mid-c { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.84cqw; min-height: 0; overflow: hidden; }
.mid-c li { display: flex; align-items: baseline; gap: 2.23cqw; font-size: 3.91cqw; line-height: 1.25; }
.mid-c li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mid-c code { font: 600 3.63cqw var(--mono); color: #FFB3A8; letter-spacing: .03em; }
.mid-c li.more, .mid-l li.more { color: #B8B4AE; font-size: 3.49cqw; }
.mid-foot { margin-top: auto; font: 3.35cqw var(--mono); color: #8F8B86; letter-spacing: .06em; text-align: right; }
.mid-foot a { color: #B8B4AE; }
.mid-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3.35cqw; min-height: 0; }
.mid-k { display: block; font-size: 3.35cqw; color: #B8B4AE; margin-bottom: 2px; }
.mid-l { list-style: none; margin: 0; padding: 0; font-size: 3.77cqw; line-height: 1.3; }
.mid-l li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mid-l.al li { color: #FFB3A8; }
.mid-e { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1.12cqw 2.23cqw; font-size: 3.91cqw; }
.mid-e .mid-k { width: 100%; margin: 0; }
.mid-e .tel { font: 600 3.91cqw var(--mono); }
.mid:focus-visible .mid-face { outline: 2px solid var(--act); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .mid-in { animation: none; transition: none; } }
/* labelled, not bare symbols: three round icons in a row read as a mess (2 Nov 2026) */

/* Hologram: rainbow foil under a dark engraving. --ha turns the hue with
   the tilt; at rest it drifts slowly. */
@property --ha { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.mid { --ha: 0deg; }
.mid-holo { position: absolute; top: 2.79cqw; right: 3.35cqw; width: 16.20cqw; height: 16.20cqw; border-radius: 50%; overflow: hidden; color: rgba(40, 24, 56, .55);
  background:
    radial-gradient(circle at var(--sx) 30%, rgba(255,255,255,.75), transparent 38%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.18) 0 1px, transparent 1px 0.84cqw),
    conic-gradient(from var(--ha), #ff7ac6, #ffc46b, #f5ff7a, #7affb2, #6fe3ff, #8f8bff, #e27aff, #ff7ac6);
  box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 1px 0.84cqw rgba(0,0,0,.5), 0 0 3.91cqw rgba(160, 220, 255, .18);
  filter: saturate(.85) brightness(1.02); animation: holodrift 9s linear infinite; }
.mid-holo svg { width: 100%; height: 100%; display: block; mix-blend-mode: multiply; }
.mid.live .mid-holo { animation: none; }
@keyframes holodrift { to { --ha: 360deg; } }
.mid-n { padding-right: 17.88cqw; }
.mid-h .mid-bg { margin-right: 18.44cqw; }
@media (prefers-reduced-motion: reduce) { .mid-holo { animation: none; } }

/* Full screen: the same card in an overlay, scaled from a fixed base size so
   nothing reflows; sideways on a portrait phone. */
.midfs { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(6, 7, 7, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: rise .3s cubic-bezier(.2,.8,.2,1) both; overflow: hidden; }
.midfs .midrot { position: absolute; left: 50%; top: 50%; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.midfs .mid { max-width: none; margin: 0; }
.midx { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; z-index: 1; }
.midx .ico { width: 20px; height: 20px; }

/* Results outside range sit in a swipeable line under the model, not over
   it, so the figure stays clear. */
.rstrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px 0 2px; padding: 0 1px; }
.rstrip::-webkit-scrollbar { display: none; }
.rstrip:empty { display: none; }
.rstrip .rli { display: flex; align-items: center; gap: 7px; flex: none; padding: 6px 12px 6px 10px; border-radius: var(--pill); background: var(--out-bg); border: 1px solid color-mix(in srgb, var(--red-hot) 35%, transparent); font: 500 14px/1.2 "Barlow", system-ui, sans-serif; color: var(--bone); white-space: nowrap; }
.rstrip .rli i { width: 7px; height: 7px; border-radius: 50%; background: var(--red-hot); flex: none; }
.rstrip .rli em { font-style: normal; color: var(--red-hot); font-weight: 600; }
.rstrip .rli small { color: var(--grey); font-size: 12.5px; }
.rstrip .rli.more { color: var(--grey); background: none; }
@media (max-width: 899px) { .explorer:has(.rstrip:not(:empty)) .stage { height: clamp(250px, calc(100svh - 350px), 600px); } }
.tnone { display: grid; gap: 10px; text-align: center; }
.tnone .muted { margin: 0; }
.tnone .actions { justify-content: center; }

/* Medicines: each prescribed line carries its strength from the record and
   the times it sits on the schedule; the schedule is four slots of the day. */
.rxr { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.rxn { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rxn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* two lines, never one: a strength typed in as a sentence ("5mg, one in the
   morning") was cut to "5mg, one in the morn..." beside its time (21 Nov 2026) */
.rxs { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; overflow: hidden; white-space: normal; overflow-wrap: anywhere; vertical-align: bottom; padding: 1px 8px; border-radius: var(--pill); background: var(--coal2); color: var(--body); font: 500 12.5px/1.35 var(--mono); }
.rxt { display: flex; align-items: center; gap: 4px; }
.rxtime { font: 600 13px var(--mono); padding: 4px 8px; border-radius: var(--pill); background: var(--ok-bg); color: var(--green); }
.rxadd { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: none; border: 1px solid var(--line-2); color: var(--act); box-shadow: none; }
.rxadd .ico { width: 18px; height: 18px; }
.rmcard .sec { display: flex; align-items: center; gap: 8px; }
.rmcard .sec .rmring { margin-left: 6px; } .rmcard .sec .rmplus { margin-left: 4px; } .rmcard .sec .rmring + .rmplus { margin-left: 4px; }
.slots { margin-bottom: 0; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; }
.slot { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; min-height: 0; padding: 8px; min-height: 0; background: var(--coal2); border: 1px solid var(--line); border-radius: var(--r); color: var(--grey); text-align: left; box-shadow: none; font: inherit; }
.slot.on { color: var(--bone); border-color: color-mix(in srgb, var(--act) 40%, var(--line)); }
.slot:disabled { opacity: .7; cursor: default; }
.sl-h { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--grey); }
.sl-h .ico { width: 14px; height: 14px; }
.slot b { font: 600 20px/1 var(--head); min-height: 20px; }
.sl-l { display: flex; flex-direction: column; font: 12px var(--mono); color: var(--body); min-width: 0; max-width: 100%; }
.sl-l span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rmform { display: grid; gap: 12px; }
.rmform label { display: grid; gap: 4px; font-size: 13px; color: var(--grey); }
.rmform select, .rmform input { min-height: 44px; }
@media (max-width: 899px) {
  .rxcard .rxl { margin: 0; }
  .rxcard .rxr { padding: 6px 0; }
  .rxcard .rxr:last-child { border-bottom: 0; }
  .slot { flex-direction: row; align-items: center; justify-content: space-between; padding: 7px 8px; }
  .slot .sl-h { font-size: 12px; min-width: 0; }
  .slot .sl-h { overflow: hidden; white-space: nowrap; }
  .slot b { font-size: 17px; min-height: 0; }
}
/* on a phone a slot is its symbol and its count; the name is its label */
@media (max-width: 899px) { .slot .sl-h { font-size: 0; } .slot .sl-h .ico { width: 20px; height: 20px; } .slot { justify-content: center; gap: 10px; } }
@media (max-width: 899px) and (max-height: 700px) { [data-page="supplements"] .msec { margin: 6px 0 6px; } [data-page="supplements"] .card { margin-bottom: 8px; } [data-page="supplements"] main { padding-bottom: 36px; } }
.pageback { display: inline-grid; place-items: center; width: 36px; height: 36px; margin: 0 6px 0 -6px; border-radius: 50%; color: var(--bone); vertical-align: middle; text-decoration: none; }
.pageback .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pageback:active { background: var(--coal2); }

/* A red system's icon under the model; tap for what is outside. */
.rstrip { overflow: visible; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
/* a quiet chip like the Systems button: thin outline, no filled ground, the
   red on the icon and the count only (audit, 9 Nov 2026, a screenshot:
   the filled red pills read heavy) */
.rsys { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; min-height: 40px; padding: 0 12px 0 10px; border-radius: var(--pill); background: var(--coal); border: 1px solid var(--line-2); color: var(--red-hot); box-shadow: none; font: 600 15px var(--head); }
.rsys .ico { width: 20px; height: 20px; }
.rsys b { font: inherit; }
.isslist { display: grid; gap: 0; margin: 4px 0 12px; }
.iss { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.iss-n { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iss-n b { font: 600 16px var(--head); color: var(--bone); }
.iss-v { display: flex; flex-direction: column; align-items: flex-end; font: 600 15px var(--head); color: var(--red-hot); }
.iss-v small { font: 13px var(--mono); color: var(--body); margin-top: 2px; }
.mid-c li .ico { width: 4.5cqw; height: 4.5cqw; flex: none; align-self: center; color: #FFB3A8; }
.mid-sweep { position: absolute; inset: -10%; pointer-events: none; z-index: 3; opacity: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.08) 42%, rgba(255,255,255,.55) 50%, rgba(190,240,255,.25) 54%, transparent 62%); transform: translateX(-70%); }
.mid.sweep .mid-sweep { animation: midsweep .9s cubic-bezier(.3,.6,.2,1) both; }
@keyframes midsweep { 0% { opacity: 1; transform: translateX(-70%); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(70%); } }
.midturn { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; z-index: 1; }
.midturn .ico { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .mid.sweep .mid-sweep { animation: none; } }
/* a tapped tooth, named under the model */
.tinfo { margin: 6px 0 2px; padding: 8px 10px 8px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--coal); }
.tinfo[hidden] { display: none; }
.tinfo .tih { display: flex; align-items: center; gap: 8px; }
.tinfo .tih b { font: 600 15px "Barlow", system-ui, sans-serif; }
.tinfo .tih .k { font: 12px var(--mono); color: var(--grey); }
.tinfo .tix { margin-left: auto; width: 36px; height: 36px; min-height: 0; padding: 0; display: grid; place-items: center; }
.tinfo .tix .ico { width: 16px; height: 16px; }
.tinfo .tichips { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 13.5px "Barlow", system-ui, sans-serif; color: var(--bone); }
.tinfo .tichips span { display: inline-flex; align-items: center; gap: 6px; }
.tinfo .tichips i { width: 12px; height: 12px; border-radius: 4px; border: 1.2px solid var(--grey); }
.tinfo .tichips .kc { border: 2.4px solid var(--t-crown); }
.tinfo .tichips .kf { border-radius: 50%; border: 2px solid var(--t-fill); }
.tinfo .tichips .kr { border: 2px solid var(--t-root); }
.tinfo .tichips .kw { border: 1.8px dashed var(--t-watch); }
.tinfo .tichips .km { border-style: dashed; }
.tinfo .tichips .kx { background: #bdb6a8; border-color: #bdb6a8; }
.tinfo .tok { color: var(--grey); } .tinfo .tok .ico { width: 14px; height: 14px; }
.tinfo .tihist { margin-top: 6px; }
.teethcard:has(.tinfo:not([hidden])) .tnone p { display: none; }
/* picking a supplement asks how much */
#add .scat-find[hidden], #add #catalogue[hidden], #add #custom-form[hidden] { display: none; }
.sstep { display: grid; gap: 12px; }
.sstep-h { display: flex; align-items: center; gap: 10px; }
.sstep-h b { font: 600 18px "Barlow", system-ui, sans-serif; }
.sstep-h .ri .ico { width: 22px; height: 22px; }
.sstep-back { width: 40px; height: 40px; min-height: 0; padding: 0; display: grid; place-items: center; }
.sstep label .k { margin-left: 4px; }
.mid-foot a { position: relative; } .mid-foot a::after { content: ""; position: absolute; inset: -12px -6px; }
/* ---- public pages: welcome, purpose, privacy */
.wel { max-width: 1080px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-left, 0px)) 40px max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 28px; }
.wel-top { display: flex; align-items: center; justify-content: space-between; }
.wel-brand { font: 700 18px var(--head); letter-spacing: -.01em; }
.wel-hero { display: grid; gap: 24px; align-items: center; min-width: 0; }
.wel > *, .wel-copy { min-width: 0; }
.wel-hero h1 { font: 700 clamp(32px, 7vw, 54px)/1.05 var(--head); letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
.wel-lede { font-size: 17px; line-height: 1.55; color: var(--body); max-width: 52ch; margin: 0 0 18px; }
.wel-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.wel-nofile { margin: -8px 0 18px; color: var(--body); }
.wel-tour { margin: 12px 0 0; } .wel-tour a { color: var(--body); }
.wel-shots { display: flex; gap: 14px; justify-content: center; }
.wel-shots img { width: min(44%, 230px); height: auto; border-radius: 26px; border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0,0,0,.35); background: var(--coal); }
.wel-shots img:nth-child(2) { margin-top: 36px; }
.wel-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.wel-pt { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--coal); }
.wel-pt h2 { font: 600 17px var(--head); margin: 0 0 6px; }
.wel-pt p { margin: 0; color: var(--body); line-height: 1.5; }
.wel-note p { max-width: 70ch; line-height: 1.55; }
.wel-wait { max-width: 560px; }
.wel-wait textarea, #contact textarea { width: 100%; font: inherit; color: inherit; background: var(--coal2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wel-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--grey); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 16px; }
.wel-foot a { color: var(--grey); padding: 8px 0; display: inline-block; }
@media (min-width: 860px) { .wel-hero { grid-template-columns: 1.1fr 1fr; } }
.doc .card h2 { margin-top: 18px; }
.doc .card p, .doc .card li { line-height: 1.6; max-width: 70ch; }
/* ---- account tools */
.tsqr { width: 190px; padding: 10px; background: #fff; border-radius: 12px; margin: 6px 0 10px; }
.tsqr svg { display: block; width: 100%; height: auto; }
.tskey, .invlink { font: 13px var(--mono); word-break: break-all; }
.tsbackup { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tsbackup code { font: 15px var(--mono); }
.steps { padding-left: 18px; margin: 0 0 6px; line-height: 1.5; }
.invnew { margin: 10px 0; padding: 12px; border: 1px dashed var(--act); border-radius: 12px; }
.invnew code { font: 600 15px var(--mono); }
#wl-list li.done { opacity: .6; }
.wlnote { display: block; margin-top: 4px; color: var(--body); font-size: 13.5px; }
.wlact { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.usage td, .usage th { font-size: 13px; white-space: nowrap; } .usage td:last-child { white-space: normal; }
label.check { display: flex; align-items: center; gap: 8px; }
.cogdemo { padding: 4px 2px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cogdemo p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); max-width: min(92vw, 440px); padding: 12px 16px; border-radius: 14px; background: var(--bone); color: var(--ink); font-size: 14px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; transition: opacity .25s, transform .25s; z-index: 80; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.authalt { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.authalt[hidden] { display: none; }
.howget { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.howget summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.howget p, .howget dd { line-height: 1.5; font-size: 14px; color: var(--body); }
.gpsys dt { font-weight: 600; margin-top: 10px; } .gpsys dd { margin: 2px 0 0; }
/* The GP record guide (21 Nov 2026): pick the app, see its steps */
.gpguide .gpq { margin: 0 0 8px; font-size: 15px; color: var(--bone); }
.gpguide .gppicks button span { text-align: center; }
.gpguide .gpout { margin-top: 12px; }
.gpguide .gpout p { margin: 0 0 8px; line-height: 1.5; font-size: 14.5px; color: var(--body); }
.gpguide .gpout p.k { font-size: 13.5px; color: var(--grey); }
.gpsteps { margin: 0 0 8px; padding-left: 22px; line-height: 1.5; font-size: 14.5px; color: var(--body); }
.gpsteps li { margin: 0 0 4px; }
.gpsys .gpsteps { font-size: 14px; }
.gpacts { flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.dotsep { margin: 0 8px; color: var(--grey); }
.anyhow { display: inline-flex; align-items: center; min-height: 36px; font-size: 13.5px; color: var(--grey); margin-top: 2px; }
/* medicines today: one line a dose */
.rtcard .rt.rtmed { padding: 6px 0; grid-template-columns: auto minmax(0, 1fr); }
.rtmed .rtick { width: 34px; height: 34px; font-size: 15px; }
.rtmed .rtn { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.rtmed .mt { font: 600 13px var(--mono); color: var(--grey); flex-shrink: 0; }
.rtmed .mt.late { color: var(--red-hot); }
.rtmed .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rtfoot { display: flex; gap: 14px; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 32px; color: var(--act-hot); font: inherit; box-shadow: none; text-decoration: underline; cursor: pointer; }
.anyhow.linkbtn { color: var(--grey); font-size: 13.5px; min-height: 36px; text-align: left; }
@media (min-width: 900px) { .rt.rtx { display: grid; } .rtmore { display: none; } }
@media (max-width: 899px) {
  .rt.rtx { display: none; }
  /* suggestions from conditions wrap onto lines: a swipeable line showed
     one chip cut off with no cue that five more followed (audit, 9 Nov 2026) */
  .rtsugg { gap: 6px 8px; }
  .rtsugg .k { flex-basis: 100%; }
  .rtsugg .chip { min-height: 34px; padding: 5px 12px; white-space: normal; text-align: left; line-height: 1.2; }
}
.ppane, .rtcard { min-width: 0; max-width: 100%; }
.rtsugg { max-width: 100%; min-width: 0; }
/* the open count repeats the tabs' own counts, so a phone leaves it out */
@media (max-width: 899px) { #plan .planline { display: none; } }
/* short phones: condition rows a little tighter so four fit with the card */
@media (max-width: 899px) and (max-height: 700px) {
  .crows { gap: 6px; }
  .crow { min-height: 54px; padding-top: 6px; padding-bottom: 6px; }
  .crow .cic { width: 38px; height: 38px; }
  .mid { width: min(100%, 440px, calc(clamp(160px, 100svh - 438px, 280px) * 1.586)); }
  html[data-caps] .mid { width: min(100%, 440px, calc(clamp(150px, 100svh - 460px, 280px) * 1.586)); }   /* names under the bar take 4px, and the lay label a line */
  .pseg { margin: 2px 0 8px; }
  .rtcard .rt.rtmed { padding: 4px 0; }
}
/* Plan on a phone: rows past the fold wait behind a pill */
.pfx { display: none !important; }
.ppane > .pfit { margin-top: 0; }
@media (max-width: 899px) and (max-height: 700px) { .pcd { min-height: 40px; padding: 4px 0 3px; } }
/* Trends on a phone: a tile is a figure and its change on the period before */
.dl { display: inline-flex; align-items: center; gap: 2px; font: 12px var(--mono); padding: 1px 7px; border-radius: var(--pill); background: var(--track); color: var(--grey); width: max-content; }
.dl.ok { background: var(--ok-bg); color: var(--green); }
.dl.warn { background: var(--out-bg); color: var(--out); }
.nonev { font: 600 13px "Barlow", system-ui, sans-serif; color: var(--act); }
.chart text.halo { paint-order: stroke; stroke: var(--solid); stroke-width: 4px; stroke-linejoin: round; }
@media (max-width: 899px) {
  .vital .dl { display: inline-flex; margin: 2px auto 0; font-size: 11px; padding: 0 6px; }
  .vital.none { border-style: dashed; }
  .vital.none .v { font-size: 13px; }
  /* the three averages in one row of figures */
  .bpstats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .bpstat, .bpstat.big { grid-column: auto; padding: 10px 10px 8px; gap: 2px; border-top-width: 3px; }
  .bpstat b, .bpstat.big b { font-size: 22px; }
  .bpstat.none b { color: var(--faint); font-size: 18px; }
}
/* medicines today: a ring for the day's doses, a colour per medicine */
.dring { position: relative; width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; }
.dring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 3.5; stroke-linecap: round; }
.dring circle:first-child { stroke: var(--line-2); }
.dring circle + circle { stroke: var(--act); stroke-dasharray: 0 100; transition: stroke-dasharray .4s ease; }
.dring .dn { font: 600 10.5px var(--mono); color: var(--grey); letter-spacing: -.02em; }
.rtcard .rt.rtmed { grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; }
.mpill { width: 22px; height: 11px; border-radius: 999px; background: linear-gradient(90deg, hsl(var(--hue, 180) 55% 58%) 50%, hsl(var(--hue, 180) 45% 38%) 50%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18); transform: rotate(-30deg); }
.rtmed .nm .md { color: var(--grey); font-size: .92em; }
.rtmed .rtick.on + .mpill { opacity: .55; }
.dring.z circle + circle { stroke-linecap: butt; }
/* Body on a phone: a rail of systems down one side (Settings, Look: left or
   right) and the model taking the full height beside it. The chips row and
   the strip of what is outside range sit under the model. */
@media (max-width: 899px) {
  .explorer { grid-template-columns: minmax(0, 1fr) 46px; grid-template-areas: "stage nav" "strip nav" "chips chips"; gap: 8px 10px; align-items: stretch; }
  :root[data-rail="left"] .explorer { grid-template-columns: 46px minmax(0, 1fr); grid-template-areas: "nav stage" "nav strip" "chips chips"; }
  .explorer .stage { grid-area: stage; height: clamp(300px, calc(100svh - 221px), 720px); }
  .explorer:has(.rstrip:not(:empty)) .stage { height: clamp(300px, calc(100svh - 221px), 720px); }
  .explorer .rstrip { grid-area: strip; margin: 0; flex-wrap: wrap; overflow: visible; gap: 6px; }
  .explorer .chipkey { grid-area: chips; margin: 0; }
  .explorer .sysnav { grid-area: nav; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
  .explorer .sysnav .sysbtn, .explorer .sysnav button.sysbtn { flex: 1 1 0; min-height: 30px; max-height: 56px; padding: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-right: 3px solid var(--line-2); }
  :root[data-rail="left"] .explorer .sysnav .sysbtn, :root[data-rail="left"] .explorer .sysnav button.sysbtn { border-right: 1px solid var(--line); border-left: 3px solid var(--line-2); }
  .explorer .sysnav .sysbtn.ok { border-left-color: var(--green); border-right-color: var(--green); }
  .explorer .sysnav .sysbtn.bad { border-left-color: var(--red-hot); border-right-color: var(--red-hot); }
  .explorer .sysnav .sysbtn.info { border-left-color: var(--s2); border-right-color: var(--s2); }
  .explorer .sysnav .sysbtn.all { border-left-color: var(--act); border-right-color: var(--act); }
  :root:not([data-rail="left"]) .explorer .sysnav .sysbtn.ok, :root:not([data-rail="left"]) .explorer .sysnav .sysbtn.bad, :root:not([data-rail="left"]) .explorer .sysnav .sysbtn.info, :root:not([data-rail="left"]) .explorer .sysnav .sysbtn.all { border-left-color: var(--line); }
  :root[data-rail="left"] .explorer .sysnav .sysbtn.ok, :root[data-rail="left"] .explorer .sysnav .sysbtn.bad, :root[data-rail="left"] .explorer .sysnav .sysbtn.info, :root[data-rail="left"] .explorer .sysnav .sysbtn.all { border-right-color: var(--line); }
  .explorer .sysnav .sysbtn .ico { width: 20px; height: 20px; }
  .explorer .sysnav .sysbtn .st { top: 1px; right: 3px; font-size: 11px; }
  .explorer .sysnav .sysbtn .pl { top: 1px; left: 4px; min-width: 12px; height: 12px; font-size: 9.5px; padding: 0 2px; }
}
/* the rail setting's two pictures */
.rails button { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.railpic { display: flex; gap: 3px; width: 34px; height: 24px; }
.railpic i { width: 7px; border-radius: 2px; background: var(--act); }
.railpic b { flex: 1; border-radius: 3px; border: 1px solid var(--line-2); }
.railpic.r { flex-direction: row-reverse; }
.railh { margin-top: 18px; }
.rails { justify-content: flex-start; }
.rails button { width: auto; height: auto; aspect-ratio: auto; padding: 10px 16px 8px; border-radius: 14px; }
/* Body, the filter under the model: three equal segments with a symbol each */
.segk.chipkey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 3px; border-radius: var(--pill); background: var(--coal2); border: 1px solid var(--line); overflow: visible; }
.segk.chipkey .ck { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 6px; border: 0; border-radius: var(--pill); background: transparent; color: var(--grey); font: 600 13px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segk.chipkey .ck .ico { width: 17px; height: 17px; flex: none; }
.segk.chipkey .ck[aria-pressed="true"] { background: var(--coal3); color: var(--bone); }
.segk.chipkey .ck:disabled { opacity: .4; }
@media (max-width: 360px) { .segk.chipkey .ck span { display: none; } }
/* one system picked: the strip names each result outside range */
.rsys.rword { white-space: nowrap; gap: 5px; font: 500 13.5px "Barlow", system-ui, sans-serif; }
.rsys.rword b { font-weight: 600; color: var(--red-hot); }
.cnext { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--coal2); border-left: 3px solid var(--act); font-size: 14px; line-height: 1.45; }
.cnext b { font-weight: 600; }
.cnext a { color: var(--act-hot); }
.plead { margin: 0 0 8px; }
/* six Plan tabs (Pro adds Training) must still fit a phone's width: no page
   overflow, which would widen the layout viewport and push the bar down */
@media (max-width: 899px) {
  .pseg { max-width: 100%; display: flex; }
  .pseg button { flex: 1 1 auto; min-width: 0; padding-left: 6px; padding-right: 6px; }
  .pseg:has(> :nth-child(6)) button { font-size: 12.5px; gap: 4px; padding-left: 4px; padding-right: 4px; }
  .pseg:has(> :nth-child(6)) .pn2 { min-width: 16px; height: 16px; font-size: 10.5px; padding: 0 3px; }
}
/* Medicines: the day as a timeline, a group per part of the day */
.smtl { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
.smg { display: flex; flex-direction: column; }
.smh { display: flex; align-items: center; gap: 6px; font: 500 11.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--grey); padding: 4px 0 2px; }
.smh .ico { width: 14px; height: 14px; }
.rt.rtmed.smrow { display: grid; grid-template-columns: 46px 30px minmax(0, 1fr) 34px; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); min-height: 44px; }
.smrow .smt { font: 600 13px var(--mono); color: var(--grey); }
.smrow.late .smt { color: var(--red-hot); }
.smrow.next .smt { color: var(--act-hot); } .smrow.next .smt::after { content: " ›"; }
.smrow .smn { display: flex; flex-wrap: wrap; justify-content: flex-start; width: 100%; align-items: baseline; column-gap: 8px; row-gap: 2px; min-width: 0; padding: 0; min-height: 40px; align-content: center; background: none; border: 0; box-shadow: none; text-align: left; color: var(--bone); font: inherit; }
.smrow .smn .nm { flex: 0 0 auto; font: 600 15px "Barlow", system-ui, sans-serif; }
.smrow .smn .md { color: var(--grey); font-size: 13px; }
.smk { font: 600 10.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--act-hot); padding: 1px 6px; border-radius: var(--pill); background: color-mix(in srgb, var(--act) 14%, transparent); }
.smk.lt { color: var(--red-hot); background: color-mix(in srgb, var(--red-hot) 14%, transparent); }
.smrow .rtick.on ~ .smn { opacity: .6; }
/* Prescribed: one line a medicine, the name then its strength, with room
   between them; the issue date sits in the strength's title */
.rxcard .rxr { padding: 6px 0; min-height: 48px; }
.rxcard .rxn { flex-direction: row; align-items: center; gap: 10px; }
.rxcard .rxn .nm { flex: 0 0 auto; font-size: 15.5px; }
.rxcard .rxs { flex: 0 1 auto; }
.rmcard .rtfoot { margin: 2px 0 0; }
.smrow .smn { flex-wrap: nowrap; white-space: nowrap; } .smrow .smn .md { flex: 1 1 auto; min-width: 0; white-space: normal; } .smrow .smk { flex: 0 0 auto; } /* a long dose wraps inside its own space rather than being cut (audit, 9 Nov 2026) */
/* GP record: the history under the four tiles, kind filters as symbols */
.hist { margin-top: 14px; }
.hist .sec { margin-bottom: 8px; }
.sarnote { margin: 10px 0 0; line-height: 1.5; }
.sarnote .linkbtn, .rsrc .linkbtn { font-size: inherit; min-height: 0; }
@media (max-width: 759px) {
  .rsrc { display: none; }
}
@media (max-width: 759px) { .viewbar .key { gap: 8px 12px; font-size: 11px; margin-bottom: 8px; } }
/* Settings, Teeth: the chart's three colours as a swatch on each option */
.tsw { display: inline-flex; gap: 2px; margin-right: 6px; vertical-align: middle; }
.tsw i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
/* A short phone (Safari with its bars) cannot fit twelve 44px buttons in
   one column, so the rail goes two across and every button keeps 44px */
@media (max-width: 899px) and (max-height: 720px) {
  .explorer { grid-template-columns: minmax(0, 1fr) 88px; }
  :root[data-rail="left"] .explorer { grid-template-columns: 88px minmax(0, 1fr); }
  .explorer .sysnav { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(44px, 1fr); gap: 4px; align-content: stretch; }
  .explorer .sysnav .sysbtn, .explorer .sysnav button.sysbtn { min-height: 44px; max-height: none; }
}
/* a code shown once: carer codes and invite links */
#carer-code { margin: 10px 0; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); }
#carer-code p { margin: 0 0 6px; }
#carer-code .code { font-family: var(--mono); letter-spacing: .06em; word-break: break-all; }
#carer-code b.code { font-size: 20px; }
/* welcome: what it costs */
.wel-plans { margin: 18px 0; }
.wel-tiers { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .wel-tiers { grid-template-columns: 1fr 1fr; } }
.wel-tiers > div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.wel-tiers h3 { margin: 0 0 4px; font-size: 18px; }
.wel-tiers p { margin: 0; color: var(--grey); font-size: 15px; }

.mid-n b.mid-noname { font-size: 3.8cqw; font-weight: 500; opacity: .7; }
/* Body on a phone, uncluttered (2 Nov 2026): the twelve systems sit
   behind one Systems button that opens them in a sheet, and zoom shows only
   while Move is on. The model takes the full width. */
.sysopen { display: none; }
@media (max-width: 899px) {
  .explorer, :root[data-rail="left"] .explorer { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "strip" "chips"; }
  .explorer .sysnav { display: none; }
  .sysopen { position: absolute; left: 8px; bottom: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 11px; border-radius: var(--pill); background: var(--coal); color: var(--bone); border: 1px solid var(--line-2); font: 600 14px "Barlow", system-ui, sans-serif; box-shadow: none; max-width: calc(100% - 70px); }
  .sysopen span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sysopen .ico { width: 19px; height: 19px; flex: none; }
  .zoombtns { bottom: 8px; }
  .syspick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .syspick .sysbtn, .syspick button.sysbtn { min-height: 74px; padding: 8px 4px; border-top: 3px solid var(--line-2); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .syspick .sysbtn .nm { position: static; width: auto; height: auto; overflow: hidden; clip: auto; font-size: 13px; }
  .syspick .sysbtn .ico { width: 24px; height: 24px; }
  .syspick .sysbtn .st { top: 4px; right: 7px; font-size: 12.5px; }
}
@media (max-width: 899px) and (pointer: coarse) {
  .explorer .stage:not(.moving) .zoombtns { display: none; }
}

/* redesign 2 Nov: medicines */
/* Prescribed: the medicine's colour pill ties each row to its schedule rows,
   the name leads, the strength sits under it as a small pill, and the times
   already scheduled read as neutral chips beside the add button. */
.rxcard .sec, .rmcard .sec { align-items: center; }
.rxcard .rxl { margin: 2px 0 0; gap: 0; }
.rxr { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rxr:last-child { border-bottom: 0; padding-bottom: 4px; }
.rxr .mpill { width: 26px; height: 13px; }
.rxr .rxn { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.rxr .nm { font: 600 15.5px "Barlow", system-ui, sans-serif; line-height: 1.2; }
/* a repeat with the person's own count: the days left, under the name (21 Nov 2026) */
/* the days left by the person's own count, one line under the name and times */
.rxr .rxleft { grid-column: 2 / -1; margin-top: -6px; font: 13.5px/1.3 "Barlow", system-ui, sans-serif; color: var(--grey); }
.rxcard .rxfoot { margin: 2px 0 0; }
.rxr .rxleft.soon { color: var(--bone); font-weight: 600; }
.pitem.prep .pi { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--grey); }
.pitem.prep .pi .ico { width: 20px; height: 20px; }
.rxtime { background: var(--coal2); color: var(--body); font-weight: 500; }
.rxt { gap: 6px; }
/* Schedule: parts of the day breathe, the next dose is the one green thing,
   a late one is the one red thing, and the tick answers the press. */
.smtl { gap: 16px; margin: 10px 0 2px; }
.smh { font-size: 12px; padding: 0 0 4px; }
:root { --act-bg: rgba(79,174,155,.13); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --act-bg: rgba(46,116,102,.10); } }
:root[data-theme="light"] { --act-bg: rgba(46,116,102,.10); }
.rt.rtmed.smrow { grid-template-columns: 44px 26px minmax(0, 1fr) 40px; gap: 10px; padding: 6px 8px; margin: 0 -8px; min-height: 48px; border-radius: var(--rs); }
.smrow .mpill { width: 24px; height: 12px; }
.smrow .smn .nm { font-size: 15.5px; }
.smrow .smn .md { font-size: 13px; }
.smrow.next { background: var(--act-bg); border-top-color: transparent; }
.smrow.next + .smrow { border-top-color: transparent; }
.smrow.next .smt::after { content: none; }
.smk { font: 600 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--pill); }
.smk.nx { background: var(--act); color: var(--act-ink); }
.smrow.next .rtick { border-color: var(--act); }
.rtick { transition: background .15s ease, border-color .15s ease, transform .1s ease; }
.rtick:active { transform: scale(.92); }
.dring .dn { color: var(--body); }
.smwhole { width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: var(--pill); text-decoration: none; font: 600 14px "Barlow", system-ui, sans-serif; }
.rmcard .rtfoot { margin: 10px 0 0; }
.msecadd { width: 40px; height: 40px; }
@media (max-width: 899px) and (max-height: 700px) {
  .rxr { padding: 5px 0; gap: 10px; }
  .rxr .rxn { gap: 1px; }
  .rxr .rxs { font-size: 12px; padding: 0 7px; }
  .smtl { gap: 10px; margin-top: 6px; }
  .rt.rtmed.smrow { min-height: 44px; padding: 4px 8px; }
}
/* redesign 2 Nov: trends */
/* The pressure lead: the NICE band in words with the count beside it. The
   7-day figure itself lives in the tile above, so no number prints twice. */
.bplead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 2px 16px; }
.bplead b { font: 600 15px/1.3 "Barlow", system-ui, sans-serif; color: var(--bone); }
.bplead span { font: 13px/1.4 "Barlow", system-ui, sans-serif; color: var(--grey); }
.bplead.quiet { font: 13.5px/1.45 "Barlow", system-ui, sans-serif; color: var(--grey); }
/* at most two split cards, side by side everywhere, no band word repeated */
.bpstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.bpstat { padding: 12px 14px; gap: 5px; }
.bpstat.ok { border-top-color: var(--line-2); }
.bpstat.ok small { color: var(--bone); }
.bpstat b { font-size: 24px; }
/* the chart card: a title row saying what is plotted and over what period */
.card.chart > h2 { margin: 0 0 4px; }
.chartsub { margin: 0 0 8px; font: 13px/1.4 "Barlow", system-ui, sans-serif; color: var(--grey); }
.card.chart svg text { font-size: 19px; }
.chart text.halo { fill: var(--grey); }
/* a quieter legend: sentence case, round swatches, grey */
.card.chart .legend { text-transform: none; letter-spacing: 0; font: 12.5px "Barlow", system-ui, sans-serif; color: var(--grey); gap: 14px; margin-top: 10px; }
.card.chart .legend i:not(.tri) { width: 9px; height: 9px; border-radius: 999px; margin-right: 5px; }
/* This week's log and Week by week: a quiet row of equal secondary controls */
@media (max-width: 899px) { [data-panel="trends"] .morerow { display: grid; }}
[data-panel="trends"] .morerow { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 10px; }
[data-panel="trends"] .morerow button { justify-content: center; min-height: 40px; border-radius: 12px; border-color: var(--line); color: var(--grey); font-weight: 500; }
/* the four tiles: icon row, one figure, a chip pinned to the same baseline */
@media (max-width: 899px) {
  .vitals { gap: 8px; margin-bottom: 12px; }
  .vital { min-height: 96px; padding: 10px 6px 9px; gap: 5px; justify-content: flex-start; }
  .vital .top { height: 18px; }
  .vital .v { margin-top: 2px; }
  .vital .dl { margin-top: auto; }
  .vital.none { justify-content: center; }
  .vital.none .top { height: auto; }
  .bpstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .bpstat b, .bpstat.big b { font-size: 24px; }
  .bplead { margin: 2px 2px 12px; }
}
/* redesign 2 Nov: gp record */
/* The four tiles: one label, one figure, one icon, all four even. The
   figure's breakdown lives in the tile's own list, not in a sub-line. */
.rtiles { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); margin: 6px 0 20px; }
@media (min-width: 760px) { .rtiles { grid-template-columns: repeat(4, 1fr); } }
.rtile { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 8px; align-items: center; min-height: 64px; padding: 10px 12px; background: var(--coal); border: 1px solid var(--line); text-decoration: none; color: var(--body); }
.rtile:hover { background: var(--coal2); }
.rtile:active { background: var(--coal3); }
.rtile .rl { grid-column: 1; font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtile .rn { grid-column: 1; font: 600 22px/1 var(--head); color: var(--bone); font-variant-numeric: tabular-nums; }
.rtile .ri { grid-column: 2; grid-row: 1 / span 2; width: auto; height: auto; background: none; color: var(--faint); }
.rtile .ri .ico { width: 20px; height: 20px; }
.rtile.bad { border-left: 3px solid var(--red-hot); }
.rtile.bad .ri { background: none; color: var(--red-hot); }
/* History: the block keeps its distance from the tiles, and the rows breathe */
.hist { margin-top: 24px; }
.hist .sec { margin-bottom: 12px; }
.tlfilters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; overflow: visible; }
button.tlf { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; font: 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; background: var(--coal); color: var(--bone); border: 1px solid var(--line-2); }
button.tlf .ico { width: 16px; height: 16px; color: var(--act); }
button.tlf small { color: var(--grey); font-size: 12px; }
button.tlf[aria-pressed="false"] { background: none; color: var(--faint); border-color: var(--line); }
button.tlf[aria-pressed="false"] .ico { color: var(--faint); }
button.tlf:hover { background: var(--coal2); }
@media (max-width: 759px) { button.tlf .tlfw { display: none; } }
/* One row: a fixed date column, the icon in its own, the words truncating.
   The date is "12 Mar", a short month, or a bare year, never wider. */
.tlrail { margin: 0 0 20px; }
.tle { display: grid; grid-template-columns: 52px 36px minmax(0, 1fr); gap: 0 10px; align-items: center; min-height: 48px; padding: 6px 12px 6px 10px; margin-bottom: 6px; background: var(--coal); border: 1px solid var(--line); text-decoration: none; color: var(--body); transition: background .2s; }
/* a Latest row says its tone in the icon tile and the word under the name; no bar as well (9 Nov 2026) */
.tle:hover { background: var(--coal2); }
.tld { font: 11.5px var(--mono); color: var(--grey); white-space: nowrap; }
.tli { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--coal2); color: var(--faint); }
.tli .ico { width: 20px; height: 20px; }
.tle.ok .tli { color: var(--green); } .tle.bad .tli { color: var(--red-hot); background: var(--out-bg); } .tle.info .tli { color: var(--s2); }
.tlb { min-width: 0; }
.tle .nm { display: block; font: 500 15px/1.3 var(--head); letter-spacing: 0; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tle .k { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12.5px; line-height: 1.3; overflow: hidden; }
@media (min-width: 760px) { .tlrail { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; } .tlrail .tle { margin: 0; } }
/* The phone's year grid: even buttons, year over count */
.tlsub { display: block; margin: 16px 0 6px; font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
@media (max-width: 899px) {
  .tlyears { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tlyb { display: grid; gap: 2px; justify-items: center; align-content: center; min-height: 48px; padding: 6px 2px; background: var(--coal); color: var(--bone); border: 1px solid var(--line); box-shadow: none; font: inherit; border-radius: 0; }
  .tlyb b { font: 600 15px var(--head); }
  .tlyb small { font: 11px var(--mono); color: var(--grey); display: inline-flex; align-items: center; gap: 3px; }
  .tlyb .tlyf .ico { width: 11px; height: 11px; color: var(--red-hot); }
  .tlyb.bad { border-left: 3px solid var(--red-hot); }
  .tllatest.mobonly { display: block !important; }
}
/* The lists inside the tiles' pop-ups keep the same row height, and the
   words give way so the date column never leaves the row */
.ritem { min-height: 48px; grid-template-columns: 40px minmax(0, 1fr) auto; }
.ritem .k { overflow-wrap: anywhere; }
.sarnote { margin: 16px 0 0; }
/* .rd is also a round day button elsewhere; the record row's date is not one */
.ritem .rd { width: auto; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
/* In a tile's pop-up the panel head already names the block: keep the hint,
   drop the repeated heading */
[id^="rw-"].inpanel > .sec > h2 { display: none; }

/* Add and Settings are reached from the header, so they do not carry its
   Add and Share buttons again (2 Nov 2026: ghost buttons) */
body[data-page="add"] header.top .hact, body[data-page="settings"] header.top .hact { display: none; }

/* medical ID: a mark bottom right that says a tap opens it (2 Nov 2026) */
.mid-f .mid-foot { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.mid-turn { display: inline-flex; align-items: center; gap: 1.4cqw; padding: 1.2cqw 2.6cqw 1.2cqw 2cqw; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #E6E1DA; letter-spacing: 0; }
.mid-turn .ico { width: 4.2cqw; height: 4.2cqw; }
.mid-turn small { font: 600 3.2cqw "Barlow", system-ui, sans-serif; }
.midfs .mid-turn { display: none; }
@media (prefers-reduced-motion: no-preference) { .mid-turn .ico { animation: midturn 4s ease-in-out 1.2s infinite; } }
@keyframes midturn { 0%, 84%, 100% { transform: scale(1); } 92% { transform: scale(1.25); } }

/* GP summary: routine checks and doses ticked, one line each (2 Nov 2026) */
.gchk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.gchk:first-child { border-top: 0; }
.gchk .nm { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.gchk .nm small { font-weight: 400; font-size: 13px; color: var(--grey); }
.gchk b { font: 600 13px var(--mono); white-space: nowrap; color: var(--act); }
.gchk.due b { color: var(--red-hot); } .gchk.none b, .gchk.info b { color: var(--grey); }
.gout .self { font: 500 11.5px var(--mono); color: var(--grey); text-transform: uppercase; letter-spacing: .04em; }
.gstats > p { grid-column: 1 / -1; margin: 0; }

/* How I feel: tap to log a symptom */
.symq { font: 600 14px "Barlow", system-ui, sans-serif; color: var(--bone); margin: 14px 0 8px; letter-spacing: 0; text-transform: none; }
.symq .k { font-weight: 400; color: var(--grey); margin-left: 4px; }
.symgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.symgrid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 6px 4px; background: var(--coal2); border: 1px solid var(--line-2); border-radius: var(--rs); color: var(--body); font: 500 13px/1.2 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; box-shadow: none; }
.symgrid button .ico { width: 22px; height: 22px; }
.symchips { display: flex; flex-wrap: wrap; gap: 6px; }
/* blood sugar: the time of day, optional, under the reading (21 Nov 2026) */
#gl-ctx { margin: -4px 0 0; }
#rd-pick { margin-bottom: 14px; }
#readings form.f .msg:empty { min-height: 0; margin: 0; }
.cplot { display: contents; }
/* the sugar and peak flow charts are fitted to the bar like the others; as
   the last thing on Trends the card keeps no margin under it */
[data-subpanel="sugar"], [data-subpanel="peakflow"] { margin-bottom: 0; }
.howget.tgt { margin-top: 2px; }
.howget.tgt .f { margin-top: 8px; }
.symchips button { min-height: 40px; padding: 0 14px; background: var(--coal2); border: 1px solid var(--line-2); border-radius: var(--pill); color: var(--body); font: 500 14px "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; box-shadow: none; }
.symlvl { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.symlvl button { min-height: 42px; padding: 0; background: var(--coal2); border: 1px solid var(--line-2); border-radius: 8px; color: var(--body); font: 600 14px var(--mono); box-shadow: none; }
.symgrid button[aria-pressed="true"], .symchips button[aria-pressed="true"], .symlvl button[aria-pressed="true"] { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.symf .seg { margin-bottom: 6px; }
.gsym { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.gsym:first-child { border-top: 0; }
.gsym .nm { color: var(--bone); font-weight: 600; }
.gsym .q { font-style: italic; }
.k-sym { color: var(--orange) !important; }
.pcard:has(.prow):not(:has(.prow:not(.pfx))) { display: none; }
.rtsugg:not(:has(.chip:not(.pfx))) { display: none; } /* every chip folded: the "From your conditions" label goes with them */

/* Body tab on a wide screen (2 Nov 2026, "this looks a mess"): the
   model with its filter under it on the left, a plain grid of systems and
   the list on the right. One way to say red: a red icon. No counts on the
   tiles, no coloured top edges, no strip of icons repeating the grid. */
@media (min-width: 900px) {
  .explorer, :root[data-rail="left"] .explorer { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "stage nav" "stage detail" "chips detail"; gap: 16px 20px; align-items: start; }
  .explorer .stage { grid-area: stage; }
  .explorer .rstrip { display: none; }
  .explorer .chipkey { grid-area: chips; margin: 0; }
  .explorer .sysnav { grid-area: nav; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .explorer .sysnav .sysbtn, .explorer .sysnav button.sysbtn { min-height: 58px; border: 1px solid var(--line); border-radius: var(--rs); background: var(--coal); }
  .explorer .sysnav .sysbtn.ok, .explorer .sysnav .sysbtn.bad, .explorer .sysnav .sysbtn.info, .explorer .sysnav .sysbtn.all { border-color: var(--line); }
  .explorer .sysnav .sysbtn .st, .explorer .sysnav .sysbtn .pl { display: none; }
  .explorer .sysnav .sysbtn .ico { color: var(--faint); }
  .explorer .sysnav .sysbtn.bad .ico, .explorer .sysnav .sysbtn.bad .nm { color: var(--red-hot); }
  .explorer .sysnav .sysbtn.ok .ico { color: var(--faint); }
  .explorer .sysnav button.sysbtn[aria-pressed="true"] { background: var(--coal3); border-color: var(--bone); }
  .explorer .sysnav button.sysbtn[aria-pressed="true"] .ico { color: var(--bone); }
  .explorer .readout > i { display: none; }
  .explorer:has(.sysbtn.all[aria-pressed="true"]) .readout .rt > span:not(.rlines) { display: none; }
  .explorer .sysdetail { grid-area: detail; }
}
.explorer .readout > i { display: none; }
/* wide screens too: a card's first heading sits at the top of the card,
   and the schedule's ring, bell and plus sit together on the right */
.card > .sec:first-child, .card > :first-child > .sec:first-child { margin-top: 0; }
.rmcard .sec { justify-content: flex-start; }
.rmcard .sec h2 { margin-right: auto; }
@media (min-width: 900px) { [data-segs="trends"] { margin-top: 14px; } }

/* How I communicate best */
.commlist { display: grid; gap: 6px; margin-bottom: 10px; }
.commlist .check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--rs); background: var(--coal2); color: var(--body); font: 500 15px/1.35 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.commlist .check input { margin-top: 2px; width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--act); }
.gcomm { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--bone); }
.gcomm .q { list-style: none; margin-left: -18px; font-style: italic; color: var(--body); }
button.mid-turn { min-height: 0; width: auto; margin: 0; font: inherit; cursor: pointer; box-shadow: none; }

/* Trends: the card's title with the range beside it, and the latest figure at
   the end of each line (7 Nov 2026) */
.chead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chead h2 { margin: 0; }
@media (max-width: 899px) { .chead h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.trange { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--pill); overflow: hidden; }
.trange button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 0; background: transparent; color: var(--grey); font: 500 13px "Barlow", system-ui, sans-serif; box-shadow: none; }
.trange button + button { border-left: 1px solid var(--line-2); }
.trange button[aria-pressed="true"] { background: var(--coal3); color: var(--bone); }
svg text.end { font-weight: 600; }

/* Teeth or ear: a small switch on the model, top left (7 Nov 2026) */
.tview { position: absolute; left: 8px; top: 8px; z-index: 3; display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--pill); overflow: hidden; background: var(--coal); }
.tview button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--grey); font: 500 13.5px "Barlow", system-ui, sans-serif; box-shadow: none; }
.tview button[aria-pressed="true"] { background: var(--coal3); color: var(--bone); }
.teethcard[hidden] { display: none; }
.edepth { margin: 6px 0 4px; display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
.edepth button { justify-content: center; }
.einfo { margin: 6px 2px 2px; min-height: 2.9em; font-size: 14.5px; line-height: 1.4; }
.einfo b { font-weight: 600; }
.enote { margin: 0 2px; font-size: 12.5px; }

/* Record, Results (9 Nov 2026, "the record looks a bit empty"): the
   latest blood test heads the page, what moved since the test before sits
   under it, the group tiles, then the NHS checks for the person's
   conditions. Trends, All: one row per series, a small chart with the
   lab's range behind it. On a phone fitRecord folds rows past the fold. */
.rlatest { padding: 14px 16px; }
.rlat { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: center; }
.rlat .rli { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--rs); background: var(--tint); border: 1px solid var(--line); color: var(--bone); }
.rlat .rli .ico { width: 19px; height: 19px; }
.rlat .rlw { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rlat .rlw b { font: 600 16px/1.2 var(--head); color: var(--bone); }
.rlat .rlw .k { font-size: 13.5px; color: var(--grey); }
.rlat .rln { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--green); }
.rlat .rln.o { color: var(--red-hot); }
.rlat .rln .ico { width: 18px; height: 18px; flex: none; }
#moved { display: block; }
#moved .mvh { margin: 12px 0 6px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
#moved button.mvh { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 36px; background: none; box-shadow: none; color: var(--grey); font: 13.5px "Barlow", system-ui, sans-serif; text-transform: none; letter-spacing: 0; text-align: left; cursor: pointer; }
#moved button.mvh span { flex: 1 1 auto; }
#moved button.mvh b { font: 600 13px var(--mono); color: var(--bone); padding: 2px 8px; border: 1px solid var(--line-2); border-radius: var(--pill); }
#moved button.mvh .ico { width: 16px; height: 16px; color: var(--grey); }
#moved .mvnone { margin: 0; }
.mv .nums .wm { display: none; }
@media (max-width: 899px) { #moved .mv .nums .wd { display: none; } #moved .mv .nums .wm { display: inline; } }
.gkey { margin: 4px 0 10px; }
.gtile .glast { grid-column: 1 / -1; font-size: 12px; color: var(--grey); }
#moved .mvrows { display: grid; gap: 6px; }
#moved .mvall { margin-top: 8px; }
.rfx { display: none !important; }
.rchecks .sec { margin: 0 0 10px; align-items: center; }
.rchecks .sec h2 { font-size: 16px; }
.rcks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rck { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--rs); background: var(--tint); }
.rck .rci { width: 30px; height: 30px; display: grid; place-items: center; color: var(--grey); }
.rck .rci .ico { width: 19px; height: 19px; }
.rck .rcw { display: flex; flex-direction: column; min-width: 0; }
.rck .nm { font: 600 14.5px/1.25 var(--head); color: var(--bone); }
.rck .k { font-size: 13px; line-height: 1.3; }
.rck .cb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--grey); }
.rck .cb .ico { width: 15px; height: 15px; }
.rck .cb.due { color: var(--gold); } .rck .cb.ok { color: var(--green); }
.tgrps { display: grid; gap: 14px; }
.tgrp h3 { margin: 0 0 6px; font: 600 13.5px var(--head); color: var(--grey); letter-spacing: 0; text-transform: none; }
.trow2 { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(64px, auto); grid-template-areas: "nm mw val" "st st ch"; column-gap: 12px; row-gap: 2px; align-items: center; padding: 9px 12px; margin-bottom: 6px; background: var(--coal); border: 1px solid var(--line); border-radius: var(--rs); text-decoration: none; color: var(--body); }
.trow2:hover { border-color: var(--act); }
.trow2 .tnm { grid-area: nm; font: 600 15px/1.2 var(--head); color: var(--bone); min-width: 0; }
.trow2 .tmw { grid-area: mw; display: block; height: 34px; }
.trow2 .tmw svg { display: block; }
.trow2 .tval { grid-area: val; justify-self: end; display: inline-flex; align-items: baseline; gap: 4px; font: 600 16px/1.1 var(--head); color: var(--bone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trow2 .tval.o { color: var(--red-hot); }
.trow2 .tval .ico { width: 15px; height: 15px; align-self: center; }
.trow2 .tval small { font: 11.5px var(--mono); color: var(--grey); }
.trow2 .tst { grid-area: st; font-size: 12.5px; line-height: 1.3; color: var(--grey); }
.trow2.o .tst { color: var(--red-hot); }
.trow2 .tch { grid-area: ch; justify-self: end; display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.trow2 .tchg { font: 13.5px "Barlow", system-ui, sans-serif; color: var(--grey); }
.trow2 .tchg small { font-size: 11px; }
.trow2 .tword { font-size: 12.5px; font-weight: 600; color: var(--green); } .trow2 .tword.o { color: var(--red-hot); }

@media (min-width: 900px) {
  .tgrps { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 899px) {
  .rlatest { padding: 10px 12px; }
  #moved { display: block; grid-template-columns: none; }
  #moved .mvh { margin: 10px 0 4px; padding-top: 6px; }
  .viewbar .key { display: none; }
  #moved .mv { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 6px 8px; }
  #moved .mv .arr { width: 26px; height: 26px; font-size: 15px; }
  #moved .mv .k { display: none; }
  #moved .mv .nm { font-size: 14.5px; }
  #moved .mv .nums.word { font-size: 13px; }
  #moved .mvall { min-height: 36px; padding: 0 12px; font-size: 13px; min-width: 0; }
  .rchecks { padding: 12px; margin-top: 10px; }
  .rck { padding: 6px 8px; }
  .trow2 { padding: 7px 10px; margin-bottom: 5px; column-gap: 10px; }
  .trow2 .tnm { font-size: 14.5px; }
}
/* ------------------------------------------------------------------
   UI options, 13 Nov 2026 (prototype; :root set from ?skin=).
   Shared by every option: one line-icon family at one weight, a 14px
   floor for words (13 for a figure's unit), sentence-case labels in the
   body face, one radius, and a Systems sheet that fills the screen.
   a = Line: bare icons, hairline cards.
   b = Badge: icons in soft tinted circles, calmer surfaces.
   c = Bold: solid brand badges, borderless cards, larger headings.
   ------------------------------------------------------------------ */
:root .ico { stroke-width: 1.7; }
:root .gtile, :root .rtile, :root .crow, :root .tly, :root .tle, :root .sysnav .sysbtn { border-radius: 14px; }
:root .gtile, :root .gtile.bad, :root .rtile, :root .sysnav .sysbtn { border-top-color: var(--line); border-left-color: var(--line); }
:root .rl, :root .tlsub, :root .gtile .gs { font: 500 14px/1.2 "Barlow", system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
:root .rl { color: var(--grey); }
:root .rtile .rl::first-letter { text-transform: uppercase; }
/* "Médicaments renouvelés" and "Medicamentos de repetición" were cut to "Médicaments ren…": the label takes a second line */
:root .rtile .rl { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (max-width: 899px) {
  :root .gtile .gn { font-size: 15px; -webkit-line-clamp: 2; min-height: 0; }
  :root .gtile.bad .gw, :root .gtile:not(.bad) .gs { font-size: 13.5px; line-height: 1.25; }
  :root .gtile { padding: 12px; row-gap: 6px; }
  :root .crow small, :root .crow .tx, :root .tle small, :root .tld, :root .tly small { font-size: 13.5px; }
  :root nav.main a span { font-size: 12.5px; }
  /* the Systems sheet: twelve tiles share the whole screen */
  :root .panel .syspick { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 10px; height: calc(100svh - 150px); padding: 12px; }
  :root .panel .syspick .sysbtn { min-height: 0; gap: 10px; padding: 10px 6px; border: 1px solid var(--line); background: var(--coal); }
  :root .panel .syspick .sysbtn .ico { width: 34px; height: 34px; }
  :root .panel .syspick .sysbtn .nm { font-size: 15px; line-height: 1.15; white-space: normal; text-align: center; }
  :root .panel .syspick .sysbtn .st { font-size: 13.5px; }
}


@media (max-width: 899px) {
  :root .panel .syspick .sysbtn .ico { width: 52px; height: 52px; padding: 13px; border-radius: 50%; background: color-mix(in srgb, var(--act) 16%, transparent); color: var(--act); box-sizing: border-box; }
}

/* c: Bold. Solid brand badges, cards without edges, larger headings */
:root .cic, :root .gtile .ib, :root .ri, :root .tle .tli { border-radius: 12px; background: var(--act); color: var(--act-ink); }
:root .crow.cflag .cic, :root .gtile.bad .ib, :root .rtile.bad .ri { background: var(--red-hot); color: var(--bad-ink); }
:root h1 { font-size: 30px; } :root h2, :root h3 { font-size: 21px; }
:root .gtile .ib { width: 34px; height: 34px; } :root .gtile .ib .ico { width: 20px; height: 20px; }
@media (max-width: 899px) {
  :root .panel .syspick .sysbtn .ico { border-radius: 14px; background: var(--act); color: var(--act-ink); }
  :root .panel .syspick .sysbtn.bad .ico { background: var(--red-hot); color: var(--bad-ink); }
}
/* skins: a results tile is icon, then the name on its own full line */
@media (max-width: 899px) {
  :root .gtile { grid-template-columns: 1fr; align-items: start; }
  :root .gtile .ib { grid-row: auto; justify-self: start; }
  :root .gtile .gn { overflow-wrap: normal; hyphens: manual; -webkit-hyphens: manual; display: block; overflow: visible; white-space: normal; align-self: start; }
  :root .tlyb { border-radius: 12px; min-height: 54px; } :root .tlyb.bad { border-left: 1px solid var(--line); } :root .tlyb.bad b { color: var(--red-hot); }
  :root .tlyb small { font: 13px "Barlow", system-ui, sans-serif; }
  :root .tle { border-radius: 14px; }
  :root .tle .tli { width: 34px; height: 34px; display: grid; place-items: center; }
}

/* ------------------------------------------------------------------
   C, four ways (14 Nov 2026: C was picked, and more asked for). All keep
   C's solid badges, edgeless cards and larger headings.
   c1 Gradient: lit badges, soft raised cards.
   c2 Spectrum: one colour per part of the body; red is a dot and words.
   c3 Glass: frosted cards over a deep teal page, glowing badges.
   c4 Editorial: ivory badges, a serif for names and headings.
   ------------------------------------------------------------------ */
@media (max-width: 899px) {
  :root .gtile.bad .gw { -webkit-line-clamp: 3; }
  :root .tllatest .tle:nth-of-type(n+4) { display: none; }
  :root .cic, :root .gtile .ib { position: relative; }
  :root .crow { min-height: 76px; gap: 14px; }
  :root .crow .cic { width: 48px; height: 48px; border-radius: 14px; }
}



/* Glass (14 Nov 2026, picked from four): a deep teal page that
   lightens toward the top, and every surface a pane of it. The surfaces
   are the tokens themselves, so each card, tile and row on every page
   follows without its own rule. No blur on cards: a blur of a smooth
   gradient shows nothing and costs a phone; only what content scrolls
   under (the bar, a menu, a sheet) is frosted, over --solid. */
:root { --page: linear-gradient(#10201d, #0c1211 420px); --ink: #0c1211; --solid: #15221f; --coal: rgba(255,255,255,.035); --coal2: rgba(255,255,255,.06); --coal3: rgba(255,255,255,.11); --line: rgba(255,255,255,.12); --glow: transparent; --glow-bad: transparent; --bad-ink: #1a0d0a; --edge: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --page: linear-gradient(#dfeae5, #F3F0EA 420px); --ink: #F3F0EA; --solid: #FBFAF7; --coal: rgba(255,255,255,.7); --coal2: rgba(24,72,62,.055); --coal3: rgba(24,72,62,.11); --line: rgba(20,50,44,.16); --glow: transparent; --glow-bad: transparent; --bad-ink: #fff; --edge: none; } }
:root[data-theme="light"] { --page: linear-gradient(#dfeae5, #F3F0EA 420px); --ink: #F3F0EA; --solid: #FBFAF7; --coal: rgba(255,255,255,.7); --coal2: rgba(24,72,62,.055); --coal3: rgba(24,72,62,.11); --line: rgba(20,50,44,.16); --glow: transparent; --glow-bad: transparent; --bad-ink: #fff; --edge: none; }
html { background: var(--ink); }
body { background: var(--page) fixed; min-height: 100svh; }
.card, .gtile, .rtile, .crow, .tlyb, .tle, .pcard, .hubtile, .stat, .vital, .panel .syspick .sysbtn { border: 1px solid var(--line); box-shadow: var(--edge); }
.panel-in, .ob { background: var(--page), var(--ink); }
.sheet-in, .cogpop, .tt, .stage.lost::after, .gridt td.name, .gridt th:first-child { background: var(--solid); }
.tly h3 { background: var(--solid); }
nav.main, nav.bar { background: color-mix(in srgb, var(--solid) 74%, transparent); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.sheet-in, .cogpop { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
/* Quiet glass (15 Nov 2026, picked from three): no glow and no filled icon circles. An icon is a plain line drawing, teal, red when its result is outside range. */
:root .cic, :root .gtile .ib, :root .panel .syspick .sysbtn .ico, :root .tle .tli, :root .ri, :root .rlat .rli { background: transparent; box-shadow: none; border: 0; border-radius: 0; color: var(--act); width: auto; height: auto; padding: 0; }
:root .crow.cflag .cic, :root .gtile.bad .ib, :root .rtile.bad .ri, :root .panel .syspick .sysbtn.bad .ico { background: transparent; color: var(--red-hot); }
:root .gtile .ib .ico, :root .cic .ico, :root .tle .tli .ico, :root .ri .ico { width: 22px; height: 22px; }
:root h1 { font-weight: 500; letter-spacing: -.01em; }
:root .gtile, :root .rtile, :root .crow, :root .tly, :root .tle, :root .tlyb, :root .sysnav .sysbtn { border-radius: var(--r); }
:root .crow .crn b { overflow-wrap: anywhere; -webkit-line-clamp: 3; }
:root .crow .crn { min-width: 96px; }
/* the models stand on the page itself, in a soft pool of light, not in a box */
@media (max-width: 899px) { .explorer .stage, .t3d { background: radial-gradient(ellipse at 50% 48%, color-mix(in srgb, var(--act) 15%, transparent), transparent 70%); border-color: transparent; box-shadow: none; } }
@media (max-width: 899px) and (max-height: 700px) { :root .gtile { padding: 9px 12px; row-gap: 4px; } }
/* the code a clinician scans (15 Nov 2026): black on white in both themes, as a camera needs */
.qrbox { display: grid; justify-items: center; gap: 10px; text-align: center; max-width: 380px; margin: 0 auto; padding: 8px 4px 20px; }
.qrcode { width: min(72vw, 300px); padding: 14px; background: #fff; border-radius: 20px; box-shadow: 0 10px 40px var(--glow); }
.qrcode svg { display: block; width: 100%; height: auto; }
.qrlead { margin: 6px 0 0; font-size: 16px; line-height: 1.4; }
.qrstat { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--coal); font-weight: 600; font-size: 14.5px; }
.qrstat::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--grey); }
.qrstat.seen { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.qrstat.seen::before { background: var(--green); }
.qrstat b { font: 500 13.5px "JetBrains Mono", ui-monospace, monospace; }
.qrurl { margin: 0; font: 12.5px "JetBrains Mono", ui-monospace, monospace; color: var(--grey); overflow-wrap: anywhere; user-select: all; }
.qrbox .actions { justify-content: center; }
.gtrend { margin: 0 0 14px; }
.gtrend h3 { margin: 0 0 4px; font-size: 15px; }
.gtrend h3 small { font-weight: 400; color: var(--grey); }
/* the group headings on Trends stay small under the glass headings */
:root .tgrp h3 { font-size: 14px; }
/* a short phone: a results tile carries its badge beside the name, so the latest test and every group fit above the bar */
@media (max-width: 899px) and (max-height: 700px) {
  :root .gtile { grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: center; }
  :root .gtile .ib { width: 26px; height: 26px; grid-row: 1; grid-column: 1; }
  :root .gtile .ib .ico { width: 15px; height: 15px; }
  :root .gtile .gn { grid-column: 2; align-self: center; font-size: 14px; }
  :root .gtile .gw, :root .gtile .gs, :root .gtile .glast { grid-column: 1 / -1; }
  #moved .mvh { margin: 4px 0 0; padding-top: 2px; }
  #moved button.mvh { min-height: 34px; }
  .rlatest { padding: 8px 12px 4px; }
  :root .gtile { padding: 8px 10px; }
  .viewbar { margin: 4px 0; }
}
/* the tutorial (15 Nov 2026): the body choice carries its symbol, and a view is its name, two words and one example */
.obsex button { display: inline-flex; align-items: center; gap: 6px; }
.obsex button .ico { width: 18px; height: 18px; }
.obmode .obsub { font: 500 14px/1.2 "Barlow", system-ui, sans-serif; color: var(--grey); }
.obprev .obrow { flex-direction: column; align-items: flex-start; gap: 6px; }
.obmode { align-content: start; justify-items: stretch; text-align: left; }
.obmode .obprev, .obmode .obrow { width: 100%; box-sizing: border-box; }

/* audit, 16 Nov 2026: the serif is for page titles and card headings only; buttons, chips, row names and figures are in the plain face */
:root h1, :root h2:not(.grouphead), :root h3 { font-family: var(--serif); }
:root .tgrp h3, :root h2.railh { font-family: var(--head); }
.segk.chipkey .ck[aria-pressed="true"] b { color: var(--bone); }
/* one selected style for every switch: the grey fill */
@media (max-width: 899px) {
  /* a results tile carries its icon beside the name at every phone height */
  :root .gtile { grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; align-items: center; }
  :root .gtile .ib { grid-row: 1; grid-column: 1; }
  :root .gtile .gn { grid-column: 2; align-self: center; }
  :root .gtile .gw, :root .gtile .gs, :root .gtile .glast { grid-column: 1 / -1; }
  /* the head models stand on the page like the body, not in a box */
  .teethcard, #earcard, #eyecard { border-color: transparent; background: transparent; }
}
@media (max-width: 899px) and (max-height: 700px) {
  :root .gtile { grid-template-columns: 18px minmax(0, 1fr); }
  :root .gtile .ib .ico { width: 16px; height: 16px; }
  :root .crow { min-height: 56px; }
}

/* night audit, 16 Nov 2026 */
/* the first child's top margin used to collapse through the body, and the strip above it showed the plain html colour as a band on /login */
body { display: flow-root; }
/* the title leaves room for the header's buttons only where there is a header */
@media (max-width: 680px) { body[data-page="login"] h1, .doc h1 { padding-right: 0; } }
/* a label heading is a plain sentence, never serif capitals; the serif is for titles */
:root h3.ph, :root h3.sd-g, :root .sd-sec h3, :root .sheet h3, :root .supp h3 { font: 600 13.5px var(--head); letter-spacing: 0; text-transform: none; color: var(--grey); }
:root .srcs { font: 13px var(--head); }
/* the tutorial's track is focused so the arrow keys turn its cards; the dots say where it is, so no ring */
.ob .obtrack:focus-visible { outline: none; box-shadow: none; }
@media (max-width: 899px) and (min-height: 800px) { .obstage { flex-basis: 52vh; } }
/* the systems sheet: one count a tile (outside range, in red); the plan count stays on the Plan */
.syspick .sysbtn .pl { display: none; }
.panel-in h2.dup { display: none; }
/* the systems sheet: a fixed icon, so the name under it always shows (at 664 the icon took the whole tile) */
:root .panel .syspick .sysbtn .ico { width: 44px; height: 44px; flex: none; }
@media (max-height: 700px) { :root .panel .syspick .sysbtn .ico { width: 30px; height: 30px; } :root .panel .syspick .sysbtn { gap: 6px; } :root .panel .syspick .sysbtn .nm { font-size: 13.5px; } }
/* Outside English the bar names (Erkrankungen, Medicamentos, Médicaments) are wider than a
   sixth of a phone, the page title runs into the header buttons, and the Body filter clips */
/* at 664 two condition names on two lines pushed Import, Full record, Lock screen 2px under the bar */
@media (max-width: 899px) and (max-height: 700px) { :root .crows { gap: 4px; margin-bottom: 5px; } }
@media (max-width: 480px) {
  html:not([lang="en"]) nav.bar a span { font-size: 10px; letter-spacing: -0.02em; }
  html:not([lang="en"]) h1 { font-size: 25px; }
  html:not([lang="en"]) .segk.chipkey .ck { font-size: 12.5px; padding-inline: 5px; gap: 4px; }
  html:not([lang="en"]) .gtile.bad .gw { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
  /* Import, Full record, Lock screen: longer words share one row and wrap inside their own button */
  html:not([lang="en"]) .cmore:not(.morerow):not(#labs-more):not(:has(> :nth-child(4))) { flex-wrap: nowrap; }
  html:not([lang="en"]) .cmore:not(.morerow):not(#labs-more):not(:has(> :nth-child(4))) > * { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 5px; font-size: 12px; line-height: 1.15; text-align: left; }
  /* Flat chart, Visits, Add under the mouth: the same, or the third wraps under and the Head tab scrolls */
  html:not([lang="en"]) .teethcard > .actions { flex-wrap: nowrap; gap: 6px; }
  html:not([lang="en"]) .teethcard > .actions > * { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 5px; font-size: 12px; line-height: 1.15; text-align: left; }
  /* One-page PDF, Full PDF, Share a link: in Italian and Spanish the row ran 23 and 51px off the side */
  html:not([lang="en"]) .gpact > * { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 5px; font-size: 12px; line-height: 1.15; white-space: normal; text-align: left; }
  html:not([lang="en"]) .gpact > * .ico { flex: none; }
}

/* 3D polish (16 Nov 2026): on a phone the canvas of a model fades out at its
   edges, so a body outline, a ghosted ear or a gum that runs past the stage
   dissolves into the page and never shows the straight cut of a box */
@media (max-width: 899px) {
  .explorer .stage canvas, .t3d canvas {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 7%, #000 91%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 7%, #000 91%, transparent 100%);
    mask-composite: intersect;
  }
}
/* The system sheet on a phone opens on the results: a count, the rows, then
   one grey paragraph saying what the system is. */
.sd-brief { display: flex; }
.sd-brief + .sd-sec { padding-top: 0; }
.sd-what { margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--grey); font-size: 14.5px; line-height: 1.45; }
/* A dose on the Medicines schedule breaks between its strength and the
   person's own dose ("5mg," then "1 capsule"), never inside a short one. */
.smrow .smn .md .nb { white-space: nowrap; }
/* For your GP: the count of tests in range drops under the heading when the
   two do not fit on one line, so neither wraps into two. */
.gpc h2 { flex-wrap: wrap; }
.gpc h2 small { white-space: nowrap; }
/* Pro on a phone: a result row in a pop-up or the system sheet had three
   columns (name with its small chart, the gauge, the figure) in 360px, and
   the figure and its unit ran off the right edge ("mL/min/1.7"). The name
   and its chart take the first line, the gauge and the figure the second. */
@media (max-width: 600px) {
  html[data-mode="pro"] .tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  html[data-mode="pro"] .tr .tn { grid-column: 1 / -1; min-width: 0; }
  html[data-mode="pro"] .tr .gauge { min-width: 0; }
  .tsp small { white-space: nowrap; }
}
/* Sign-up on a short phone (390x664, Safari with its bars showing): the form
   ran 87 to 125px past the screen, the links under the button with it. On a
   short screen the longer forms start at the top with a smaller title, the
   fields sit closer, an empty message line takes no room and the links under
   the button are one size down. Nothing a finger hits goes under 36px. */
/* the 52px a phone's h1 keeps is for the round buttons beside an app page's title; /login has none */
@media (max-width: 680px) { .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) h1 { min-height: 0; margin-bottom: 8px; } }
@media (max-width: 680px) and (max-height: 700px) {
  html body[data-page="login"] .wrap:has(.auth :is(#signup, #join, #setup, #forgot):not([hidden])) { padding-top: 8px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) { margin-top: 0; padding-top: 12px; padding-bottom: 10px; margin-bottom: 0; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) h1 { font-size: 23px; margin: 0 0 6px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) .sub { margin-bottom: 8px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) form.f { gap: 8px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) form.f input:not([type="checkbox"]) { min-height: 40px; padding: 7px 12px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) form.f button[type="submit"] { min-height: 44px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) .msg:empty { min-height: 0; margin: 0; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) .authalt { margin-top: 8px; gap: 6px; }
  .auth:has(:is(#signup, #join, #setup, #forgot):not([hidden])) .authalt button { min-height: 36px; padding-top: 0; padding-bottom: 0; }
}

/* /privacy, /terms and /purpose (21 Nov 2026): the way back and the language on one line, and a line saying the page is a translation, shown in every language but English */
.doctop { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 10px 0 12px; }
html[lang^="en"] .trnote { display: none; }
/* Appointments (21 Nov 2026): the day's heading carries Add, an appointment
   is a row that opens it, and the opened one lists its parts and actions */
.pcdh { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.pcdh .ph { margin: 0 2px; }
.pcdh .ghost.small { gap: 6px; min-height: 34px; padding: 0 12px; }
.pcdh .ghost.small .ico, .apact .ico { width: 16px; height: 16px; }
.k-appt { color: var(--act) !important; }
.pcard button.prow { display: grid; width: 100%; min-height: 0; padding: 11px 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; text-align: left; justify-content: stretch; }
.pcard button.prow .nm { font-weight: 600; }
.prow .pgo { display: inline-flex; color: var(--grey); }
.prow .pgo .ico { width: 16px; height: 16px; }
.pitem.papp .pdue .ghost.small { min-height: 36px; }
.apv .pcard { padding: 2px 14px; }
.apv .pcard .prow { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 0; }
.apv .pcard .prow + .prow { border-top: 1px solid var(--line); }
.apv .pi .ico { width: 18px; height: 18px; color: var(--grey); }
.apv .ph { margin: 14px 2px 6px; }
.apact { display: grid; gap: 8px; margin-top: 14px; }
.apact .ghost, .apact .btn { gap: 8px; justify-content: center; }
.apform .seg { margin-bottom: 2px; }
/* Send feedback (21 Nov 2026): one box from the cog menu; the owner's list in Settings */
.fbform textarea { min-height: 150px; resize: vertical; }
.fbform .k { margin: 0; }
.fbdone { margin: 8px 0; font-size: 15px; color: var(--bone); }
.fblist li { align-items: start; }
.fblist .fbtext { display: block; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--bone); }
/* on a phone the cog menu scrolls inside itself, so its last links (the
   tutorial, Send feedback, All settings) are never left under the bar */
@media (max-width: 899px) { #cogpop { max-height: calc(100svh - 130px); overflow-y: auto; overscroll-behavior: contain; } }

/* "Forgotten your password?" was a 16px-high link, under the 34px floor
   for anything a finger hits. Padding gives it a 36px target; the same
   negative margin keeps the line where it was, so sign-in still fits 664. */
#showforgot { display: inline-block; padding: 10px 6px; margin: -10px -6px; }

/* Count what you have sits in the Prescribed card's heading, not on a row
   of its own under the list (21 Nov 2026): the row it had cost Medicines
   about 35px at 664. It wraps inside itself in a long language. */
.rxcard .sec .rxcount { margin-left: auto; min-height: 36px; font-size: 13.5px; text-align: right; white-space: normal; }
@media (max-width: 899px) { [data-page="supplements"] .rxcard .sec { gap: 8px; } }

/* What was said at an appointment, kept as the person wrote it (22 Nov 2026) */
.apnote .own { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.apsaid textarea { width: 100%; min-height: 96px; resize: vertical; }
.apsaid .actions { margin-top: 8px; }
