/* Holobiome mockups — shared component library. Tokens live in tokens.css; nothing here uses a raw colour.
   Screen files add rules only under their own .scr-sNN root. Class prefix: hb- (member UI). */

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-width: 0;
  background: var(--surface-0); color: var(--text-1);
  font-family: var(--font-sans); font-size: var(--t-body); line-height: var(--t-body-lh);
  font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--interactive); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--brand-soft); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, [data-autofocus][tabindex="-1"]:focus { outline: none; }
.hb-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hb-skip { position: absolute; left: var(--s-4); top: -200px; z-index: 1000; background: var(--brand); color: var(--on-brand); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.hb-skip:focus-visible { top: var(--s-2); }
:root[data-motion="on"]:focus-within { scroll-behavior: smooth; }
/* The sticky top of the page: the staff view band while it shows (app.js measures --viewas-h), the header and, from
   768 px, the tabs. Sticky panels sit below it, and it never covers a focused control or a section jumped to. */
:root { --chrome-h: calc(var(--viewas-h, 0px) + var(--header-h)); }
@media (min-width: 768px) { :root { --chrome-h: calc(var(--viewas-h, 0px) + var(--header-h) + var(--nav-h)); } }
html { scroll-padding-top: calc(var(--chrome-h) + var(--s-2)); }
@media (max-width: 767px) { html { scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--s-4)); } }

/* ------------------------------------------------------------------ type */
.hb-display { font-family: var(--font-display); font-size: var(--t-display); line-height: var(--t-display-lh); font-weight: 380; letter-spacing: -0.018em; font-variation-settings: 'opsz' 72; color: var(--text-1); text-wrap: balance; }
.hb-h1 { font-family: var(--font-display); font-size: var(--t-h1); line-height: var(--t-h1-lh); font-weight: 420; letter-spacing: -0.012em; font-variation-settings: 'opsz' 36; color: var(--text-1); text-wrap: balance; }
.hb-h2 { font-size: var(--t-h2); line-height: var(--t-h2-lh); font-weight: 600; letter-spacing: -0.006em; color: var(--text-1); }
.hb-h3 { font-size: var(--t-body); line-height: var(--t-body-lh); font-weight: 600; color: var(--text-1); }
.hb-eyebrow { font-size: var(--t-caption); line-height: var(--t-caption-lh); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.hb-lede { font-size: 1.0625rem; line-height: 1.625rem; color: var(--text-2); max-width: 62ch; }
.hb-body { font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--text-1); max-width: 66ch; }
.hb-text-2 { color: var(--text-2); }
.hb-small { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-caption { font-size: var(--t-caption); line-height: var(--t-caption-lh); color: var(--text-3); }
.hb-num { font-size: var(--t-num); line-height: var(--t-num-lh); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hb-tnum { font-variant-numeric: tabular-nums; }
.hb-you-ink { color: var(--you-ink); font-weight: 600; }
.hb-mono { font-family: var(--font-mono); font-size: 0.9em; }
.hb-taxon { font-style: italic; }
.hb-wrap { overflow-wrap: anywhere; }
/* Reflow at large text sizes: long words break rather than push the page sideways. */
.hb-page, .hb-sheet__body { overflow-wrap: break-word; }
.hb-display, .hb-h1, .hb-h2 { overflow-wrap: break-word; }
.hb-btn { max-width: 100%; }
.hb-btn > span, .hb-disc > span { min-width: 0; overflow-wrap: anywhere; }
.hb-disc { max-width: 100%; }
.hb-nowrap { white-space: nowrap; }
@media (max-width: 479px) { .hb-nowrap { white-space: normal; } }

/* ------------------------------------------------------------------ layout */
.hb-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.hb-main { flex: 1; width: 100%; outline: none; }
.hb-page { width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s-8) var(--gutter) var(--s-12); min-width: 0; }
@media (max-width: 767px) { .hb-page { padding-top: var(--s-6); } }
.hb-read { max-width: var(--read-max); }
.hb-read--center { margin-left: auto; margin-right: auto; }
.hb-stack { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.hb-stack--lg { gap: var(--s-6); }
.hb-stack--xl { gap: var(--s-10); }
.hb-stack--sm { gap: var(--s-2); }
.hb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); min-width: 0; }
.hb-row--between { justify-content: space-between; }
.hb-row--top { align-items: flex-start; }
.hb-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.hb-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.hb-split { display: grid; gap: var(--s-8); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .hb-split { grid-template-columns: minmax(0, 1fr) 340px; } }
.hb-divider { height: 1px; background: var(--border-subtle); border: 0; margin: var(--s-2) 0; }
.hb-section { display: flex; flex-direction: column; gap: var(--s-4); }
.hb-section + .hb-section { margin-top: var(--s-10); }

/* depth helpers: elements marked with a minimum depth are hidden below it (screens may also branch in render) */
.hb-page[data-depth="simple"] [data-min-depth="more"],
.hb-page[data-depth="simple"] [data-min-depth="data"],
.hb-page[data-depth="more"] [data-min-depth="data"] { display: none !important; }

/* ------------------------------------------------------------------ icons */
.hb-ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hb-ic--sm { width: 16px; height: 16px; }
.hb-ic--lg { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ app bar (member shell) */
.hb-header { position: sticky; top: 0; z-index: 50; background: var(--surface-bar); border-bottom: 1px solid var(--border-subtle); }
@supports (backdrop-filter: blur(8px)) { .hb-header { backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); } }
.hb-appbar { max-width: calc(var(--page-max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); min-height: var(--header-h); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); }
.hb-appbar__spacer { flex: 1; }
.hb-logo { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 4px; margin-left: -4px; color: var(--logo-wordmark); text-decoration: none; border-radius: var(--r-sm); flex: 0 1 auto; min-width: 0; }
.hb-logo svg { display: block; }
/* The real mark and traced wordmark at the landing header's sizes (58 × 29 and 20 px); a little smaller on phones. */
.hb-logo .mark { flex: none; }
.hb-logo__word { display: inline-flex; align-items: center; line-height: 0; }
.hb-logo .hbword { height: 20px; }
@media (max-width: 767px) { .hb-logo { gap: 8px; } .hb-logo .mark { width: 46px; height: 23px; } .hb-logo .hbword { height: 14px; } }
.hb-logo__tag { font-size: var(--t-caption); color: var(--text-3); font-weight: 500; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border-subtle); line-height: 1.2; }
.hb-ctxbtn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); min-width: var(--tap); max-width: 100%; padding: 0 var(--s-3); border-radius: var(--r-pill); border: 1px solid var(--border-subtle); background: var(--surface-1); color: var(--text-1); font-size: var(--t-small); font-weight: 500; cursor: pointer; min-width: 0; }
.hb-ctxbtn:hover { border-color: var(--border-strong); }
.hb-ctxbtn__avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: var(--t-caption); font-weight: 700; display: inline-grid; place-items: center; flex: none; letter-spacing: 0.02em; }
.hb-ctxbtn__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hb-ctxbtn__sep { color: var(--text-3); }
.hb-ctxbtn__ctx { color: var(--text-2); }
.hb-iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: var(--tap); min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-pill); border: 1px solid transparent; background: transparent; color: var(--text-1); font-size: var(--t-small); font-weight: 500; cursor: pointer; text-decoration: none; }
.hb-iconbtn:hover { background: var(--surface-2); }
.hb-iconbtn[aria-expanded="true"] { background: var(--surface-2); }
.hb-demo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill); background: var(--demo-bg); color: var(--demo-ink); border: 1px dashed var(--demo-border); font-size: var(--t-caption); line-height: 1.25rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; flex: none; max-width: 100%; }
.hb-page .hb-demo { white-space: normal; }
/* Narrow screens at large text sizes: the shell's Demonstration chip may wrap rather than overflow (WCAG 1.4.10). */
@media (max-width: 479px) { .hb-appbar .hb-demo, .hb-ctxrow .hb-demo { white-space: normal; flex: 0 1 auto; min-width: 0; } }
.hb-demo svg { width: 12px; height: 12px; }
.hb-appbar__appearance { display: inline-flex; }
.hb-appbar__appearance .hb-appearance-now { font-size: var(--t-small); }
/* Narrow phones keep the Help and Appearance text labels (never an icon alone); the wordmark yields instead (the link keeps its accessible name). */
@media (max-width: 379px) { .hb-logo__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .hb-logo__tag { display: none; } .hb-appbar { gap: var(--s-1) var(--s-2); } .hb-appbar .hb-iconbtn { padding: 0 var(--s-2); } }
@media (max-width: 639px) { .hb-logo__tag { display: none; } }
/* 380–419 px phones (390 is the common width): the full mark, the wordmark and both labels stay on one row with the
   narrow phones' tighter spacing, so Appearance never wraps onto a second header row. */
@media (min-width: 380px) and (max-width: 419px) { .hb-appbar { gap: var(--s-1) var(--s-2); } .hb-appbar .hb-iconbtn { padding: 0 var(--s-2); } }
/* Appearance popover (desktop): the same control as the phone sheet, anchored under its button. */
.hb-pop { position: fixed; z-index: 300; width: 240px; max-width: calc(100vw - 16px); display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); background: var(--surface-1); color: var(--text-1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.hb-pop__title { font-size: var(--t-small); line-height: var(--t-small-lh); font-weight: 600; }
:root[data-motion="on"] .hb-pop { transform-origin: top right; animation: hb-drop var(--dur-base) var(--ease-out); }
:root[data-motion="on"] .hb-pop.is-closing { animation: hb-lift var(--dur-fast) var(--ease-in) forwards; pointer-events: none; }
.hb-pop .hb-segwrap__label, .hb-sheet .hb-segwrap__label { font-size: var(--t-small); font-weight: 600; }

/* ------------------------------------------------------------------ brand mark (the real Holobiome mark)
   shared/logo.css is the landing page's own CSS (generated by tools/build_logo.php) and shared/brand.js runs it. Portal
   rules only: the finished state, stages, Motion: Off and pausing. */
/* Finished: the choreography's end state held without animation (Motion: Off, after the intro, before a replay). */
.hbmark.is-done .hblogo-intro .trace .e { stroke-dashoffset: 0; opacity: 1; }
.hbmark.is-done .hblogo-intro .trace .n { transform: scale(1); opacity: 1; }
.hbmark.is-done .hblogo-intro .wipe { transform: scaleX(1); }
.login-logo.is-done .hbword .w1, .login-logo.is-done .hbword .w2 { opacity: 1; transform: none; }
/* The header's glow rests on the landing's own header shadow (style.css .logo .mark), not on the larger sign-in-card
   shadow its glow keyframes end on: on the warm paper canvas that one reads as a smudge under the bar. */
.logo .hbmark.play { animation: hb-header-glow calc(1.1s * var(--spd)) ease-out calc(2.7s * var(--spd)) both !important; }
.logo .hbmark.outro { animation: hb-header-glow calc(1s * var(--spd)) ease-out calc(1.1s * var(--spd)) both !important; }
@keyframes hb-header-glow { 0%, 100% { filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--pill-b) 35%, transparent)); }
  40% { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--pill-a) 85%, transparent)); } }
/* Calm: the landing's endless breathing of the white network is not used; nothing in the portal loops forever. */
.hbmark .hblogo-intro .fill .net .n, .hbmark .hblogo-intro .fill .net .e { animation: none !important; }
/* A brand stage: the big mark with the landing page's network radiating from behind it. brand.js aligns the network to
   the mark's own nodes (network viewBox -260 -260 1095 806 against the mark's -6 -6 587 298), so the rays leave from
   behind the pill. Decorative (aria-hidden); only on the sign-in door and the launcher; still under Motion: Off. */
.hb-stage { position: relative; overflow: hidden; display: grid; place-items: center; height: 176px; isolation: isolate;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-composite: intersect; }
.hb-stage__mark { position: relative; width: 172px; aspect-ratio: 587 / 298; }
.hb-stage .hb-bigmark { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.hb-stage .hb-bigmark .mark { width: 100%; height: 100%; }
.hb-stage__net { position: absolute; z-index: 0; left: -43.2709%; top: -85.2349%; width: 186.5417%; height: 270.4698%; pointer-events: none; }
.hb-stage .bg .hbnet { inset: 0; width: 100%; height: 100%; min-width: 0; animation: none; stroke-width: 1.5px; }
.hb-stage .bg .hbnet .e, .hb-stage .bg .hbnet .n { opacity: var(--net-a-login); }
.hb-stage .bg .hbnet .gl { opacity: calc(var(--net-a-login) * 0.6); }
.hb-stage[data-phase="wait"] .hb-stage__net { opacity: 0; }
/* The network fades in as the fill finishes its wipe (2.05 s + 0.75 s at the big mark's --spd 1.25). */
.hb-stage[data-phase="intro"] .hb-stage__net { animation: hb-stage-net-in 0.9s ease-out 2.9s both; }
@keyframes hb-stage-net-in { from { opacity: 0; } }
/* A replay: brand.js settles the network onto the mark's own nodes as the fill un-wipes, and the bare network the trace
   is drawn on stands out while the trace is away. Its nodes and inner edges (not the rays or glows) rise to twice their
   ink over the outro's last 0.6 s, as the last of the trace retracts, and sink back as the fill wipes in over them
   (the intro's 2.05 s; both at the big mark's --spd 1.25). */
.hb-stage[data-phase="outro"] .hbnet :is(.n, .e:not(.ray)) { animation: hb-stage-lift 0.6s ease-out 2.2125s both; }
.hb-stage[data-phase="replay"] .hbnet :is(.n, .e:not(.ray)) { animation: hb-stage-sink 0.6s ease-in 2.5625s both; }
@keyframes hb-stage-lift { to { opacity: calc(var(--net-a-login) * 2); } }
@keyframes hb-stage-sink { from { opacity: calc(var(--net-a-login) * 2); } }
/* A hidden tab pauses every animation (the landing's .motion-paused, at a specificity that beats its !important timings). */
:root.hb-tab-hidden *, :root.hb-tab-hidden *::before, :root.hb-tab-hidden *::after,
:root.hb-tab-hidden .hbmark.hbmark.hbmark, :root.hb-tab-hidden .hbmark.hbmark.hbmark * { animation-play-state: paused !important; }
/* Motion: Off (or the device's reduced motion under System): brand.js shows every mark finished; this is the safety net. */
:root[data-motion="off"] .hbmark.hbmark.hbmark, :root[data-motion="off"] .hbmark.hbmark.hbmark *, :root[data-motion="off"] .hb-stage__net, :root[data-motion="off"] .hb-stage__net * { animation: none !important; }
:root[data-motion="off"] .hbmark .hblogo-intro .wipe { transform: scaleX(1); }
@media print { .hbmark, .hbmark * { animation: none !important; } .hbmark .hblogo-intro .wipe { transform: scaleX(1) !important; } }

/* primary navigation: desktop tab row, phone bottom bar */
.hb-topnav { max-width: calc(var(--page-max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: none; gap: var(--s-1); min-height: var(--nav-h); align-items: stretch; }
.hb-topnav a { position: relative; display: inline-flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-4); min-height: var(--tap); color: var(--text-2); font-weight: 500; font-size: 0.9375rem; text-decoration: none; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.hb-topnav a:first-child { margin-left: calc(-1 * var(--s-4)); }
.hb-topnav a:hover { color: var(--text-1); background: var(--brand-softer); }
.hb-topnav a[aria-current="page"] { color: var(--text-1); font-weight: 600; }
.hb-topnav a[aria-current="page"]::after { content: ''; position: absolute; left: var(--s-4); right: var(--s-4); bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.hb-ctxrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-3) var(--gutter) 0; max-width: 100%; }
.hb-ctxrow .hb-ctxbtn { flex: 0 1 auto; border-radius: 14px; padding: 4px 10px 4px var(--s-3); text-align: left; gap: 6px; }
.hb-ctxrow .hb-demo { font-size: var(--t-caption); letter-spacing: 0.03em; padding: 2px 8px 2px 7px; }
.hb-ctxrow .hb-ctxbtn__avatar { display: none; }
.hb-ctxrow .hb-ctxbtn__text { display: flex; flex-direction: column; line-height: 1.15rem; white-space: normal; }
.hb-ctxrow .hb-ctxbtn__name { font-weight: 600; }
.hb-ctxrow .hb-ctxbtn__sep { display: none; }
.hb-ctxrow .hb-ctxbtn__ctx { font-size: var(--t-caption); line-height: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
/* Phones: the persistent Demonstration label is the person control's second line (no separate chip). */
.hb-ctxbtn__dot { color: var(--text-3); }
.hb-demo--inline { padding: 0 6px 0 5px; gap: 4px; font-size: var(--t-caption); line-height: 1rem; letter-spacing: 0.03em; }
.hb-demo--inline svg { width: 10px; height: 10px; }
.hb-ctxrow--bare { display: none !important; }
.hb-appbar__ctx { display: none; }
@media (min-width: 768px) {
  .hb-topnav { display: flex; }
  .hb-ctxrow { display: none; }
  .hb-appbar__ctx { display: inline-flex; align-items: center; gap: var(--s-3); min-width: 0; }
}
.hb-tabbar { position: sticky; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-bar); border-top: 1px solid var(--border-subtle); padding-bottom: env(safe-area-inset-bottom, 0px); }
@supports (backdrop-filter: blur(8px)) { .hb-tabbar { backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); } }
.hb-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tabbar-h); min-width: 0; padding: 6px 2px; color: var(--text-2); text-decoration: none; font-size: 0.75rem; line-height: 1rem; font-weight: 500; letter-spacing: 0.01em; position: relative; text-align: center; overflow-wrap: anywhere; }
.hb-tabbar a .hb-ic { width: 22px; height: 22px; }
.hb-tabbar a[aria-current="page"] { color: var(--brand); font-weight: 650; }
.hb-tabbar a[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--brand); }
@media (min-width: 768px) { .hb-tabbar { display: none; } }
.hb-appbar--public .hb-appbar__spacer { flex: 1; }

/* ------------------------------------------------------------------ page head and sample orientation */
.hb-pagehead { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-8); }
.hb-pagehead__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); }
.hb-pagehead__titles { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; flex: 1 1 320px; }
.hb-pagehead__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
@media (max-width: 767px) {
  .hb-pagehead > .hb-pagehead__top { display: contents; }
  .hb-pagehead > .hb-pagehead__top > .hb-pagehead__titles { order: 1; flex: none; }
  .hb-pagehead > .hb-lede { order: 2; }
  .hb-pagehead > .hb-pagehead__top > .hb-pagehead__tools { order: 3; }
  .hb-pagehead > .hb-samplebar { order: 4; }
}
.hb-samplebar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-2) 0 0; color: var(--text-2); font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-samplebar__what { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.hb-samplebar__dot { width: 10px; height: 10px; flex: none; transform: rotate(45deg); background: var(--you); border-radius: 2px; box-shadow: 0 0 0 2px var(--you-halo); }
.hb-samplebar__sep { color: var(--text-3); }
/* Release date and report version share one line, also on phones (one separator inside the line, never dangling). */
.hb-samplebar__meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
/* Phones: one fact per line rather than a wrapped line with dangling separators. */
@media (max-width: 559px) { .hb-samplebar__sep { display: none; } .hb-samplebar__what { flex-direction: column; align-items: flex-start; gap: 2px; padding-left: 18px; position: relative; } .hb-samplebar__what > .hb-samplebar__dot { position: absolute; left: 0; top: 6px; } }

/* A report the member hid: one quiet status line where another report is shown instead. */
.hb-hiddenline { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-hiddenline .hb-ic { flex: none; margin-top: 3px; }
.hb-hiddenline .hb-btn--link { min-height: var(--tap); display: inline-flex; align-items: center; }

/* ------------------------------------------------------------------ cards */
.hb-card { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: var(--s-6); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
@media (max-width: 767px) { .hb-card { padding: var(--s-5) var(--s-4); } }
.hb-card--inset { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.hb-card--quiet { background: transparent; box-shadow: none; }
.hb-card--action { position: relative; cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); text-decoration: none; color: inherit; }
.hb-card--action:hover { border-color: var(--border-strong); box-shadow: var(--shadow-raise); transform: translateY(-1px); }
.hb-card--action:focus-within { border-color: var(--focus); }
.hb-card__link { color: inherit; text-decoration: none; }
.hb-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.hb-card__link:focus-visible { outline: none; }
.hb-card__link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.hb-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.hb-card__chev { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); display: inline-grid; place-items: center; flex: none; }
.hb-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding-top: var(--s-3); margin-top: var(--s-1); border-top: 1px solid var(--border-subtle); color: var(--text-2); font-size: var(--t-small); }

/* ------------------------------------------------------------------ letter layout (Home) */
.hb-letter { max-width: var(--read-max); display: flex; flex-direction: column; gap: var(--s-6); }
.hb-letter__head { display: flex; flex-direction: column; gap: var(--s-3); padding-bottom: var(--s-6); border-bottom: 1px solid var(--border-subtle); }
.hb-letter__body { display: flex; flex-direction: column; gap: var(--s-5); font-size: 1.0625rem; line-height: 1.75rem; color: var(--text-1); }
.hb-letter__body p { max-width: 62ch; }
.hb-letter__body strong { font-weight: 600; }
.hb-obs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-2) var(--s-5); align-items: baseline; padding: var(--s-5) var(--s-6); background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.hb-obs__fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.hb-obs__num { font-size: var(--t-num); line-height: var(--t-num-lh); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text-1); }
.hb-obs__unit { font-size: var(--t-small); line-height: var(--t-small-lh); font-weight: 500; color: var(--text-2); }
.hb-obs__text { font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--text-1); }
.hb-obs__more { grid-column: 2; }
@media (max-width: 479px) { .hb-obs { grid-template-columns: minmax(0, 1fr); padding: var(--s-4); } .hb-obs__more { grid-column: 1; } }
.hb-limit { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: var(--t-body); line-height: var(--t-body-lh); color: var(--text-1); }
.hb-limit .hb-ic { margin-top: 2px; color: var(--text-2); }
.hb-finish { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding: var(--s-8) 0 var(--s-2); position: relative; }
.hb-finish::before { content: ''; display: block; width: 100%; height: 1px; background: linear-gradient(90deg, var(--border-strong), var(--border-subtle) 60%, transparent); margin-bottom: var(--s-4); }
.hb-finish__mark { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-size: var(--t-h1); line-height: var(--t-h1-lh); font-weight: 420; }
.hb-finish__mark .hb-ic { width: 28px; height: 28px; color: var(--brand); stroke-width: 1.5; }
/* "Your move" (ui.move): one concrete step that ends a finite screen */
.hb-move {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--brand-softer);
}
.hb-move__icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.hb-move__text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--text-1); }
.hb-move__label { font-size: var(--t-caption); line-height: var(--t-caption-lh); letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600; color: var(--text-2); }
.hb-below { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-2); }
.hb-below__label { font-size: var(--t-caption); letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600; color: var(--text-3); }

/* ------------------------------------------------------------------ buttons */
.hb-btn { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--tap); min-width: var(--tap); padding: 0 var(--s-5); border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-1); font-size: 0.9375rem; font-weight: 600; line-height: 1.25rem; letter-spacing: -0.003em; text-decoration: none; cursor: pointer; text-align: center; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.hb-btn:hover { background: var(--surface-2); }
.hb-btn:active { transform: translateY(1px); }
.hb-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.hb-btn--primary:hover { background: var(--interactive); border-color: var(--interactive); }
.hb-btn--quiet { background: transparent; border-color: transparent; color: var(--interactive); padding: 0 var(--s-3); }
.hb-btn--quiet:hover { background: var(--brand-softer); }
.hb-btn--link { display: inline; background: none; border: 0; min-width: 0; min-height: 0; padding: 0; color: var(--interactive); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; font-size: inherit; line-height: inherit; text-align: left; }
.hb-btn--link:hover { background: none; text-decoration-thickness: 2px; }
/* Inline text buttons keep their flow but get a 44 px-tall hit area. */
.hb-btn--link { position: relative; }
.hb-btn--link::after { content: ''; position: absolute; inset: -12px -8px; }
.hb-btn--block { width: 100%; }
.hb-btn--lg { min-height: 52px; padding: 0 var(--s-6); font-size: 1rem; border-radius: 12px; }
.hb-btn[disabled], .hb-btn[aria-disabled="true"] { cursor: not-allowed; background: var(--surface-2); border-color: var(--border-subtle); color: var(--text-3); transform: none; }
.hb-btn .hb-ic { margin: 0 -2px; }
.hb-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
@media (max-width: 479px) { .hb-actions--stack > .hb-btn { flex: 1 1 100%; } }

/* ------------------------------------------------------------------ segmented control (theme, depth, view) */
.hb-segwrap { display: inline-flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; min-width: 0; }
.hb-segwrap__label { font-size: var(--t-small); color: var(--text-2); font-weight: 500; }
.hb-seg { display: inline-flex; flex-wrap: wrap; align-items: stretch; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: 12px; max-width: 100%; }
.hb-seg__opt { -webkit-appearance: none; appearance: none; border: 1px solid transparent; background: transparent; color: var(--text-2); min-height: var(--tap); min-width: var(--tap); padding: 0 var(--s-3); border-radius: 9px; font-size: var(--t-small); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; position: relative; }
.hb-seg__opt:hover { color: var(--text-1); }
.hb-seg__opt[aria-checked="true"], .hb-seg__opt[aria-pressed="true"], .hb-seg__opt[aria-selected="true"] { background: var(--surface-1); color: var(--text-1); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.hb-seg__opt[aria-checked="true"] .hb-seg__tick, .hb-seg__opt[aria-pressed="true"] .hb-seg__tick { display: inline-block; }
.hb-seg__tick { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hb-seg--block { display: flex; width: 100%; }
.hb-seg--block .hb-seg__opt { flex: 1; }
/* Sliding thumb (2–4 equal options): equal columns; the chosen option's surface slides instead of jumping.
   Only where :has() works; elsewhere the plain selected style stays. */
@supports selector(:has(a)) {
  .hb-seg--thumb { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: relative; flex-wrap: nowrap; }
  .hb-seg--thumb.hb-seg--block { display: grid; }
  .hb-seg--thumb::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px - (var(--n) - 1) * 2px) / var(--n)); border-radius: 9px; background: var(--surface-1); border: 1px solid var(--border-strong); box-shadow: var(--shadow-1); transform: translateX(calc(var(--k, 0) * (100% + 2px))); transition: transform var(--dur-base) var(--ease-in-out); pointer-events: none; }
  .hb-seg--n2 { --n: 2; } .hb-seg--n3 { --n: 3; } .hb-seg--n4 { --n: 4; }
  .hb-seg--thumb:has(> :nth-child(2)[aria-checked="true"]) { --k: 1; }
  .hb-seg--thumb:has(> :nth-child(3)[aria-checked="true"]) { --k: 2; }
  .hb-seg--thumb:has(> :nth-child(4)[aria-checked="true"]) { --k: 3; }
  .hb-seg--thumb:not(:has(> [aria-checked="true"]))::before { display: none; }
  .hb-seg--thumb .hb-seg__opt { z-index: 1; }
  .hb-seg--thumb .hb-seg__opt[aria-checked="true"] { background: transparent; border-color: transparent; box-shadow: none; }
}
/* underline-style view tabs (List / Hierarchy / Map), and the same look for a row of section pages (Samples) */
.hb-tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); border-bottom: 1px solid var(--border-subtle); max-width: 100%; }
.hb-tabs__opt { -webkit-appearance: none; appearance: none; background: none; border: 0; min-height: var(--tap); padding: 0 var(--s-4); color: var(--text-2); font-weight: 500; font-size: 0.9375rem; cursor: pointer; position: relative; white-space: normal; overflow-wrap: break-word; text-align: left; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; }
.hb-tabs__opt:hover { color: var(--text-1); }
.hb-tabs__opt[aria-selected="true"], .hb-tabs__opt[aria-current="page"] { color: var(--text-1); font-weight: 600; }
a.hb-tabs__opt { text-decoration: none; }
.hb-subnav { margin-bottom: var(--s-6); }
.hb-tabpanel { outline: none; }
.hb-tabpanel:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.hb-tabs__opt:is([aria-selected="true"], [aria-current="page"])::after { content: ''; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
/* Four section links keep one row on a phone. */
@media (max-width: 479px) { .hb-subnav .hb-tabs__opt { padding: 0 var(--s-2); } .hb-subnav .hb-tabs__opt::after { left: var(--s-2); right: var(--s-2); } }

/* ------------------------------------------------------------------ forms */
.hb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hb-label { font-size: var(--t-small); line-height: var(--t-small-lh); font-weight: 600; color: var(--text-1); }
.hb-hint { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-input, .hb-select, .hb-textarea { width: 100%; min-height: 48px; padding: 0 var(--s-4); border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-1); font-size: 1rem; line-height: 1.5rem; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.hb-textarea { padding: var(--s-3) var(--s-4); min-height: 112px; resize: vertical; }
.hb-select { -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.hb-input::placeholder, .hb-textarea::placeholder { color: var(--text-3); }
.hb-input:focus-visible, .hb-select:focus-visible, .hb-textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 1px var(--focus); }
.hb-field--error .hb-input, .hb-field--error .hb-textarea, .hb-field--error .hb-code { border-color: var(--error-ink); }
.hb-errtext { display: flex; gap: 6px; align-items: flex-start; font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--error-ink); font-weight: 500; }
.hb-errtext .hb-ic { width: 16px; height: 16px; margin-top: 2px; }
.hb-code { width: 100%; max-width: 280px; min-height: 60px; padding: 0 var(--s-4); border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-1); font-family: var(--font-mono); font-size: 1.75rem; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.hb-code:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 1px var(--focus); }
.hb-choices { display: flex; flex-direction: column; gap: var(--s-2); border: 0; margin: 0; padding: 0; min-width: 0; }
.hb-choices legend { padding: 0; margin-bottom: var(--s-2); }
.hb-choice { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--row-h); padding: var(--s-3) var(--s-4); border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--surface-1); cursor: pointer; transition: border-color var(--dur-fast); }
.hb-choice:hover { border-color: var(--border-strong); }
.hb-choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-softer); }
.hb-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.hb-choice input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 2px 0 0; flex: none; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface-1); display: inline-grid; place-items: center; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast); }
.hb-choice input:checked { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px var(--surface-1); }
.hb-choice input[type="checkbox"] { border-radius: 5px; }
.hb-choice input[type="checkbox"]:checked { box-shadow: none; }
.hb-choice input[type="checkbox"]:checked::after { content: ''; width: 10px; height: 5px; border: solid var(--on-brand); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.hb-choice input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hb-choice__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hb-choice__title { font-weight: 600; }
.hb-choice__desc { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-choice--disabled { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.hb-choice--disabled:hover { border-color: var(--border-subtle); }
.hb-choice--disabled input { cursor: not-allowed; border-color: var(--border-subtle); background: var(--surface-2); }
.hb-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); border: 0; margin: 0; padding: 0; }
.hb-pill { position: relative; display: inline-flex; }
.hb-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hb-pill span { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-1); font-size: 0.9375rem; font-weight: 500; }
.hb-pill input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.hb-pill input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ banners and labels */
.hb-banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--surface-2); color: var(--text-1); font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-banner .hb-ic { margin-top: 1px; flex: none; }
.hb-banner__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hb-banner__title { font-weight: 600; font-size: 0.9375rem; line-height: 1.375rem; }
.hb-banner__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.hb-banner--info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-ink); }
.hb-banner--caution { background: var(--caution-bg); border-color: var(--caution-border); color: var(--caution-ink); }
.hb-banner--error { background: var(--error-bg); border-color: var(--error-border); color: var(--error-ink); }
.hb-banner--demo { background: var(--demo-bg); border: 1px dashed var(--demo-border); color: var(--demo-ink); }
.hb-banner--note { background: var(--surface-2); border-color: transparent; color: var(--text-1); }
.hb-banner--note .hb-ic { color: var(--text-2); }
.hb-banner--correction { background: var(--surface-1); border: 1px solid var(--border-strong); border-left: 4px solid var(--caution-ink); color: var(--text-1); }
.hb-banner--correction .hb-banner__title { font-size: var(--t-h2); line-height: var(--t-h2-lh); }
.hb-banner--info .hb-btn--quiet, .hb-banner--caution .hb-btn--quiet, .hb-banner--error .hb-btn--quiet { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hb-banner .hb-btn--quiet { padding: 0; min-width: 0; }
.hb-banner .hb-btn--quiet:hover { background: none; text-decoration-thickness: 2px; }
.hb-banner__actions { margin-top: var(--s-1); }
.hb-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-subtle); font-size: var(--t-caption); line-height: 1rem; font-weight: 600; letter-spacing: 0.01em; max-width: 100%; overflow-wrap: anywhere; }
.hb-chip--outline { background: transparent; border-color: var(--border-strong); color: var(--text-1); }
.hb-chip--info { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-border); }
.hb-chip--caution { background: var(--caution-bg); color: var(--caution-ink); border-color: var(--caution-border); }
.hb-chip--error { background: var(--error-bg); color: var(--error-ink); border-color: var(--error-border); }
.hb-chip--you { background: transparent; color: var(--you-ink); border-color: var(--you); }
.hb-chip--estimate { background: transparent; color: var(--text-2); border: 1px dashed var(--border-strong); }
.hb-chip__x { -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: inherit; width: 32px; height: 32px; margin: -8px -9px -8px -2px; border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; position: relative; }
.hb-chip__x::after { content: ''; position: absolute; inset: -6px; }
.hb-chip__x:hover { background: var(--brand-soft); }

/* ------------------------------------------------------------------ kit tracker (three independent axes) */
.hb-tracker { display: flex; flex-direction: column; gap: 0; background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-1); }
.hb-tracker__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4); padding: var(--s-5) var(--s-6) var(--s-4); }
.hb-tracker__axes { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--border-subtle); }
@media (min-width: 768px) { .hb-tracker__axes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hb-axis + .hb-axis { border-left: 1px solid var(--border-subtle); border-top: 0 !important; } }
.hb-axis { display: flex; flex-direction: column; gap: 6px; padding: var(--s-4) var(--s-6) var(--s-5); min-width: 0; }
.hb-axis + .hb-axis { border-top: 1px solid var(--border-subtle); }
.hb-axis__label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-caption); line-height: var(--t-caption-lh); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--text-3); }
.hb-axis__state { display: flex; align-items: flex-start; gap: var(--s-2); font-weight: 600; color: var(--text-1); font-size: 1rem; line-height: 1.375rem; }
.hb-axis__src { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-axis--caution .hb-axis__state { color: var(--caution-ink); }
.hb-glyph { width: 12px; height: 12px; margin-top: 5px; flex: none; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; }
.hb-glyph--done { background: var(--brand); border-color: var(--brand); }
.hb-glyph--partial { background: linear-gradient(90deg, var(--brand) 50%, transparent 50%); border-color: var(--brand); }
.hb-glyph--review { border-radius: 2px; transform: rotate(45deg) scale(0.85); border-color: var(--caution-ink); background: var(--caution-bg); }
.hb-glyph--unknown { border-width: 1.5px; }
.hb-tracker__events { list-style: none; margin: 0; padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: var(--s-3); background: var(--surface-0); }
.hb-tracker__events li { display: grid; grid-template-columns: 8.75rem minmax(0, 1fr); gap: var(--s-3); font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-1); }
.hb-tracker__events time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.hb-tracker__events .hb-src { color: var(--text-3); }
@media (max-width: 479px) { .hb-tracker__events li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (max-width: 767px) { .hb-tracker__head, .hb-axis, .hb-tracker__events { padding-left: var(--s-4); padding-right: var(--s-4); } }

/* ------------------------------------------------------------------ list rows, stats, tables, disclosures */
.hb-list { list-style: none; margin: 0; padding: 0; background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; }
.hb-list > li + li { border-top: 1px solid var(--border-subtle); }
.hb-listrow { display: flex; align-items: center; gap: var(--s-3); min-height: var(--row-h); padding: var(--s-3) var(--s-5); color: inherit; text-decoration: none; width: 100%; background: none; border: 0; text-align: left; cursor: default; }
a.hb-listrow, button.hb-listrow { cursor: pointer; }
a.hb-listrow:hover, button.hb-listrow:hover { background: var(--brand-softer); }
.hb-listrow[aria-current="true"], .hb-listrow[aria-selected="true"] { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.hb-listrow__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hb-listrow__title { font-weight: 500; overflow-wrap: anywhere; }
.hb-listrow__meta { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-listrow__value { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }
.hb-listrow__chev { color: var(--text-3); }
.hb-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hb-stat__num { font-size: var(--t-num); line-height: var(--t-num-lh); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hb-stat__label { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-stats { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.hb-tablewrap { width: 100%; overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface-1); }
.hb-table { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-table caption { text-align: left; padding: var(--s-3) var(--s-4); font-weight: 600; color: var(--text-1); font-size: 0.9375rem; caption-side: top; position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }
.hb-table th, .hb-table td { padding: 10px var(--s-4); text-align: left; border-top: 1px solid var(--border-subtle); vertical-align: top; }
.hb-table thead th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: var(--t-caption); letter-spacing: 0.04em; text-transform: uppercase; border-top: 0; white-space: nowrap; }
.hb-table td.num, .hb-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-table tbody tr:hover { background: var(--brand-softer); }
/* A member's health-context answers (HB.checkin.summary): compact label · answer rows. */
.hb-checkin { margin: 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 2px var(--s-3); font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-checkin > div { display: contents; }
.hb-checkin dt { color: var(--text-2); }
.hb-checkin dd { margin: 0; color: var(--text-1); overflow-wrap: anywhere; }
/* Compare with someone: the kinds two people have in common, in columns. */
.hb-share__names { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: var(--s-4); font-size: var(--t-small); line-height: 1.6; }
/* A row across every column (an item expanded under its own row): no hover tint, and like the caption it stays in view
   while a wide table scrolls sideways. */
.hb-table tbody tr.hb-table__full:hover { background: none; }
.hb-table .hb-table__full > td { padding: 0; }
.hb-table__fullin { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }
.hb-disc { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 2px; border: 0; background: none; color: var(--interactive); font-weight: 600; font-size: 0.9375rem; cursor: pointer; text-align: left; }
.hb-disc .hb-ic { transition: transform var(--dur-base) var(--ease-out); }
.hb-disc[aria-expanded="true"] .hb-ic { transform: rotate(90deg); }
.hb-disc__panel { padding: var(--s-2) 0 var(--s-3) var(--s-6); border-left: 2px solid var(--border-subtle); margin-left: 9px; display: flex; flex-direction: column; gap: var(--s-3); color: var(--text-1); }

/* ------------------------------------------------------------------ empty, loading, error states */
.hb-state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding: var(--s-8) var(--s-6); border-radius: var(--r-md); border: 1px dashed var(--border-strong); background: var(--surface-1); }
.hb-state__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.hb-state--error { border-style: solid; border-color: var(--error-border); background: var(--error-bg); color: var(--error-ink); }
.hb-state--error .hb-state__icon { background: var(--surface-1); color: var(--error-ink); }
.hb-state--error .hb-h2, .hb-state--error .hb-small { color: inherit; }
.hb-skel { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--border-subtle); }
.hb-skel__line { height: 14px; border-radius: 7px; background: var(--surface-2); position: relative; overflow: hidden; }
.hb-skel__line--title { height: 22px; width: 55%; }
.hb-skel__line--short { width: 35%; }
:root[data-motion="on"] .hb-skel__line::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--brand-softer), transparent); animation: hb-shimmer 1.6s ease-in-out infinite; }
@keyframes hb-shimmer { to { transform: translateX(100%); } }

/* ------------------------------------------------------------------ passive feedback prompt */
.hb-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-1); font-size: 0.9375rem; }
.hb-prompt__q { font-weight: 500; }
.hb-prompt__opts { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.hb-prompt__opts .hb-btn { min-height: var(--tap); padding: 0 var(--s-4); font-weight: 500; font-size: var(--t-small); }

/* ------------------------------------------------------------------ toasts */
.hb-toasts { position: fixed; z-index: 400; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: var(--s-2); pointer-events: none; }
@media (min-width: 768px) { .hb-toasts { bottom: 24px; } }
.hb-toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-2) var(--s-3) var(--s-4); border-radius: 14px; background: var(--text-1); color: var(--surface-0); box-shadow: var(--shadow-2); font-size: 0.9375rem; line-height: 1.375rem; }
.hb-toast__msg { flex: 1; min-width: 0; }
.hb-toast .hb-btn--quiet { color: inherit; text-decoration: underline; min-height: var(--tap); }
.hb-toast__x { -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: inherit; width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.hb-toast__x:focus-visible { outline-color: var(--surface-0); }
/* Phone width: the message keeps the first row (with ×), so an action moves under it instead of squeezing the words. */
@media (max-width: 479px) {
  .hb-toast { flex-wrap: wrap; row-gap: 0; }
  .hb-toast__msg { flex-basis: calc(100% - var(--tap) - var(--s-3)); }
  .hb-toast__x { order: 1; }
  .hb-toast .hb-btn--quiet { order: 2; margin-left: calc(-1 * var(--s-3)); }
}
:root[data-motion="on"] .hb-toast { animation: hb-rise var(--dur-base) var(--ease-out); }
:root[data-motion="on"] .hb-toast.is-closing { animation: hb-fade-out var(--dur-fast) var(--ease-in) forwards; pointer-events: none; }

/* ------------------------------------------------------------------ sheets: native <dialog>; bottom sheet on phone, side/centre on desktop */
.hb-sheet { padding: 0; border: 0; color: var(--text-1); background: var(--surface-1); box-shadow: var(--shadow-sheet); overflow: hidden; display: none; flex-direction: column; max-width: 100vw; }
.hb-sheet[open] { display: flex; }
.hb-sheet::backdrop { background: var(--scrim); }
.hb-sheet__head { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-3) var(--s-6); border-bottom: 1px solid var(--border-subtle); background: var(--surface-1); position: relative; }
.hb-sheet__handle { display: none; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--border-strong); opacity: 0.6; }
.hb-sheet__titles { flex: 1; min-width: 0; padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.hb-sheet__title { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.75rem; font-weight: 450; letter-spacing: -0.01em; outline: none; }
.hb-sheet__close { flex: none; }
.hb-sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-5) var(--s-6) var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); }
/* The body scrolls; its children keep their natural height (otherwise cards and choices collapse into each other). Its
   basis is its content (auto, not flex: 1's 0%): WebKit sizes a fit-content dialog from that basis, so a 0% basis left every
   phone sheet at its head on iPhone. min-height: 0 lets it shrink below its content and scroll. */
.hb-sheet__body > * { flex-shrink: 0; }
.hb-sheet__foot { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: flex-end; padding: var(--s-3) var(--s-6); border-top: 1px solid var(--border-subtle); background: var(--surface-1); }
.hb-sheet__confirm { margin: 0 var(--s-6) var(--s-4); }
@media (min-width: 768px) {
  .hb-sheet--center { width: min(var(--sheet-center-w), calc(100vw - 48px)); max-height: 86dvh; border-radius: var(--r-lg); margin: auto; }
  .hb-sheet--side { width: min(var(--sheet-side-w), 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: var(--r-lg) 0 0 var(--r-lg); }
  .hb-sheet--side.hb-sheet--left { margin: 0 auto 0 0; border-radius: 0 var(--r-lg) var(--r-lg) 0; }
}
/* Phone: a bottom sheet. HB.sheet sizes it to its detents (its content, or about 60% of the visible height for a long one, then
   full) from the visual viewport, which follows the browser's toolbars and the keyboard; the CSS here is the frame and the
   fallback. Full height leaves the status bar and a strip of the page above (svh, then dvh where supported); the home
   indicator's safe area pads the sheet's bottom, under the body or the footer alike. The head is the drag handle. */
@media (max-width: 767px) {
  .hb-sheet { width: 100vw; max-height: calc(100svh - 24px); max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px); margin: auto 0 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .hb-sheet__handle { display: block; }
  .hb-sheet__handle::before { content: ''; position: absolute; inset: -14px -32px; }
  .hb-sheet__head { padding: var(--s-5) var(--s-3) var(--s-3) var(--s-4); touch-action: none; }
  .hb-sheet__body { padding: var(--s-4) var(--s-4) var(--s-6); }
  .hb-sheet__foot { padding-left: var(--s-4); padding-right: var(--s-4); }
  .hb-sheet__confirm { margin: 0 var(--s-4) var(--s-4); }
}
/* A sheet enters from where it belongs (a phone's bottom edge, a side, or a fade-drop onto the page when centred) with
   the scrim fading in, and leaves on the same path, quicker (HB.sheet adds .is-closing and waits for it). A sheet that
   replaces another (.is-swap) finds the scrim already there. */
:root[data-motion="on"] .hb-sheet[open] { animation: hb-sheet-up var(--dur-slow) var(--ease-out); }
:root[data-motion="on"] .hb-sheet[open].is-closing { animation: hb-sheet-down var(--dur-base) var(--ease-in) forwards; }
:root[data-motion="on"] .hb-sheet[open]::backdrop { animation: hb-fade var(--dur-slow) var(--ease-out); }
:root[data-motion="on"] .hb-sheet[open].is-swap::backdrop { animation: none; }
:root[data-motion="on"] .hb-sheet[open].is-closing::backdrop { animation: hb-fade-out var(--dur-base) var(--ease-in) forwards; }
@media (min-width: 768px) {
  :root[data-motion="on"] .hb-sheet--side[open] { animation-name: hb-sheet-in; }
  :root[data-motion="on"] .hb-sheet--side[open].is-closing { animation-name: hb-sheet-out; }
  :root[data-motion="on"] .hb-sheet--side.hb-sheet--left[open] { animation-name: hb-sheet-in-left; }
  :root[data-motion="on"] .hb-sheet--side.hb-sheet--left[open].is-closing { animation-name: hb-sheet-out-left; }
  :root[data-motion="on"] .hb-sheet--center[open] { animation-name: hb-drop; }
  :root[data-motion="on"] .hb-sheet--center[open].is-closing { animation-name: hb-lift; }
}
body.hb-noscroll { overflow: hidden; }

/* feedback sheet pieces */
.hb-autoctx { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; color: var(--text-1); }
.hb-autoctx__line { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.hb-autoctx__line p { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); min-width: 0; }
.hb-autoctx__edit { flex: none; }
.hb-autoctx__more { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-1) var(--s-2) var(--s-2) 0; }
.hb-autoctx__more[hidden] { display: none; }
.hb-autoctx__chips { display: flex; flex-wrap: wrap; gap: 12px 14px; flex-shrink: 0; }
.hb-autoctx .hb-chip { background: var(--surface-1); color: var(--text-1); border-color: var(--border-subtle); min-height: 32px; font-weight: 500; font-size: var(--t-small); letter-spacing: 0; }
.hb-fieldlist { display: grid; gap: 2px; margin: 0; font-size: var(--t-caption); line-height: var(--t-caption-lh); }
.hb-fieldlist > div { display: flex; gap: var(--s-2); }
.hb-fieldlist dt { color: var(--text-3); min-width: 5.5em; }
.hb-fieldlist dd { margin: 0; color: var(--text-1); overflow-wrap: anywhere; }
.hb-autoctx .hb-chip b { font-weight: 600; color: var(--text-2); }
.hb-receipt { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--surface-0); }
.hb-receipt__status { display: flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.hb-receipt__status .hb-ic { color: var(--brand); }
.hb-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: var(--s-2); }

/* ------------------------------------------------------------------ charts (inline SVG; classes keep them theme-reactive) */
.hb-fig { margin: 0; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.hb-fig__svg svg { display: block; width: 100%; height: auto; overflow: visible; }
.hb-fig__cap { font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
.hb-fig__legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-2); }
/* A long key wraps beside its glyph (never leaving the glyph alone on a line). */
.hb-fig__key { display: inline-flex; flex-wrap: nowrap; align-items: flex-start; gap: 2px 6px; white-space: normal; max-width: 100%; min-width: 0; }
.hb-fig__key svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.hb-fig__well { background: var(--surface-2); border-radius: var(--r-sm); padding: var(--s-4); }
.c-axis { stroke: var(--border-strong); stroke-width: 1; fill: none; }
.c-grid { stroke: var(--grid); stroke-width: 1; fill: none; }
.c-label { fill: var(--text-2); font-family: var(--font-sans); font-size: 12px; font-variant-numeric: tabular-nums; }
.c-label--strong { fill: var(--text-1); font-weight: 600; }
.c-label--you { fill: var(--you-ink); font-weight: 600; }
.c-halo { stroke: var(--surface-1); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; }
.hb-fig__well .c-halo { stroke: var(--surface-2); }
.c-you { fill: var(--you); stroke: var(--you-halo); stroke-width: 2; paint-order: stroke; }
.c-you-line { stroke: var(--you); stroke-width: 2; fill: none; }
.c-earlier { fill: none; stroke: var(--earlier); stroke-width: 2; }
.c-cohort { fill: var(--cohort); }
.c-cohort-line { stroke: var(--cohort); stroke-width: 2; fill: none; }
.c-world { fill: var(--world); opacity: 0.88; }
.c-you-soft { fill: color-mix(in srgb, var(--you) 22%, var(--surface-1)); stroke: var(--you); stroke-width: 2; }
.c-pill { fill: var(--surface-1); }
.c-hair { stroke: var(--surface-1); stroke-width: 1; }
.c-leader { stroke: var(--text-2); stroke-width: 1; }
.c-leader-dot { fill: var(--text-1); }
.c-label--ribbon { font-size: 13px; fill: var(--text-1); }
.c-hitrow { fill: transparent; }
.c-hitrow--sel { fill: var(--band-80); }
.c-band80 { fill: var(--band-80); }
.c-band50 { fill: var(--band-50); }
.c-endpoint { stroke: var(--brand); stroke-width: 2; }
.c-median { stroke: var(--text-1); stroke-width: 2; }
/* chart.stripMini: the reference strip at row size (a blood-test style range), in the strip's colours. The band is the
   middle 80% with brand endpoints, its darker middle the middle 50%, the line the median, the diamond this sample. With
   Motion on, a first draw fades the bands in and then settles the marker (the data-draw tokens; staggered by row). */
.hb-rb { position: relative; display: block; height: 18px; min-width: 72px; }
.hb-rb__axis { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border-strong); opacity: 0.6; }
.hb-rb__b80, .hb-rb__b50 { position: absolute; top: 3px; height: 12px; min-width: 2px; }
.hb-rb__b80 { background: var(--band-80); }
.hb-rb__b80::before, .hb-rb__b80::after { content: ''; position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--brand); }
.hb-rb__b80::before { left: -1px; }
.hb-rb__b80::after { right: -1px; }
.hb-rb__b50 { background: var(--band-50); }
.hb-rb__med { position: absolute; top: 5px; width: 2px; height: 8px; margin-left: -1px; background: var(--text-1); border-radius: 1px; }
.hb-rb__you { position: absolute; top: 50%; width: 9px; height: 9px; background: var(--you); box-shadow: 0 0 0 2px var(--you-halo); border-radius: 1px; transform: translate(-50%, -50%) rotate(45deg); }
:root[data-motion="on"] .hb-rb--enter :is(.hb-rb__b80, .hb-rb__b50, .hb-rb__med) { animation: hb-fade var(--dur-data-fill) var(--ease-out) calc(var(--i, 0) * var(--stagger-data)) both; }
:root[data-motion="on"] .hb-rb--enter .hb-rb__you { animation: hb-rb-settle var(--dur-data-pop) var(--ease-pop) calc(var(--dur-draw) * 0.35 + var(--i, 0) * var(--stagger-data)) both; }
@keyframes hb-rb-settle { from { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.2); } }
.c-bar { fill: var(--brand); }
.c-bar-bg { fill: var(--surface-2); }
.c-tax-1 { fill: var(--tax-1); } .c-tax-2 { fill: var(--tax-2); } .c-tax-3 { fill: var(--tax-3); } .c-tax-4 { fill: var(--tax-4); } .c-tax-5 { fill: var(--tax-5); }
.c-stroke-tax-1 { stroke: var(--tax-1); } .c-stroke-tax-2 { stroke: var(--tax-2); } .c-stroke-tax-3 { stroke: var(--tax-3); } .c-stroke-tax-4 { stroke: var(--tax-4); } .c-stroke-tax-5 { stroke: var(--tax-5); }
.c-sel { fill: none; stroke: var(--text-1); stroke-width: 2; }
.c-labelbg { fill: var(--surface-1); stroke: var(--border-strong); stroke-width: 1; }
.hb-chart-hit { cursor: pointer; }
.hb-chart-hit:hover .c-hitrow:not(.c-hitrow--sel) { fill: var(--brand-softer); }
.hb-chart-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hb-chart-hit:focus-visible .c-hitrow { stroke: var(--focus); stroke-width: 2; }
.c-sel--focus { stroke: var(--focus); stroke-width: 2.5; }
/* charts over time (rv4-timeview): trend, stack, spark, columns, the reading line and the first-draw animation.
   .hb-fig--enter (set by chart.hydrate for o.enter) or .c-enter (any container of sparklines) plays it once. */
.c-label--axis { font-size: 11px; fill: var(--text-3); }
.c-grid--x { stroke-dasharray: 2 4; }
.c-tr-line { fill: none; stroke: var(--brand); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.c-tr-g0 { stop-color: var(--brand); stop-opacity: 0.2; }
.c-tr-g1 { stop-color: var(--brand); stop-opacity: 0; }
.c-tr-pt { fill: var(--brand); stroke: var(--surface-1); stroke-width: 2; }
.c-tr-pt--hollow { fill: var(--surface-1); stroke: var(--brand); stroke-width: 1.75; }
.c-st-band { stroke: var(--surface-1); stroke-width: 1; stroke-linejoin: round; }
.c-st-tag { fill: var(--surface-1); opacity: 0.94; }
.c-st-tick { fill: var(--text-2); }
.c-spark { display: block; overflow: visible; max-width: 100%; height: auto; }
.c-sp-line { fill: none; stroke: var(--brand); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.c-sp-area { fill: var(--brand); opacity: 0.1; }
.c-sp-dot { fill: var(--brand); }
.c-sp-dot--hollow { fill: var(--surface-1); stroke: var(--brand); stroke-width: 1.5; }
.c-col { fill: var(--band-50); }
.c-col--strong { fill: var(--brand); }
.c-insp__line { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.c-insp__dot { fill: var(--surface-1); stroke: var(--you); stroke-width: 3; }
/* ui.readout: a reading as wide as its widest value (the hidden ::before), digits on the right, so scrubbing never moves
   what sits beside it. */
.hb-readout { display: inline-grid; font-variant-numeric: tabular-nums; }
.hb-readout::before { content: attr(data-widest); grid-area: 1 / 1; visibility: hidden; }
.hb-readout > span { grid-area: 1 / 1; justify-self: end; }
.c-st-val { font-weight: 700; }
.hb-fig__svg[tabindex] { border-radius: var(--r-xs); touch-action: pan-y; cursor: crosshair; }
.hb-fig__svg[tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
/* The reading marker: one line and one dot per chart, kept between readings and moved by a single transform each (the
   dot by translate(x, y)), on the same duration and curve in every linked chart, so all of them glide together along
   straight paths. It fades in where it first appears and out when the reading ends. */
.c-insp { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
.c-insp.is-on { opacity: 1; }
.c-insp__line, .c-insp__dot { transition: transform var(--dur-base) var(--ease-out); }
.c-insp__dot.is-off { visibility: hidden; }
/* First draw (the data tokens: 30% slower than UI moves): the line draws itself over --dur-draw and each point pops as the line reaches it (--at: its arrival, as a
   share of the draw, set by the chart); the area under it fills in once the line is complete (never ahead of it); bands
   wipe in; columns rise in turn. */
:root[data-motion="on"] :is(.hb-fig--enter, .c-enter) :is(.c-tr-line, .c-sp-line) { stroke-dasharray: 1; stroke-dashoffset: 1; animation: c-draw var(--dur-draw) var(--ease-in-out) forwards; }
:root[data-motion="on"] :is(.hb-fig--enter, .c-enter) :is(.c-tr-area, .c-sp-area) { animation: hb-fade var(--dur-data-fill) var(--ease-out) var(--dur-draw) both; }
:root[data-motion="on"] .hb-fig--enter .c-tr-pt { transform-box: fill-box; transform-origin: center; animation: c-pop var(--dur-data-pop) var(--ease-pop) both; animation-delay: calc(var(--at, 0) * var(--dur-draw)); }
:root[data-motion="on"] .hb-fig--enter .c-st-tags { animation: hb-fade var(--dur-data-fill) var(--ease-out) calc(var(--dur-draw) * 0.8) both; }
:root[data-motion="on"] .hb-fig--enter .c-st-reveal { transform-box: fill-box; transform-origin: left; animation: c-wipe var(--dur-draw) var(--ease-in-out) both; }
:root[data-motion="on"] .hb-fig--enter .c-col { transform-box: fill-box; transform-origin: bottom; animation: c-grow var(--dur-data-fill) var(--ease-out) both; animation-delay: calc(var(--i) * var(--stagger-data)); }
@keyframes c-draw { to { stroke-dashoffset: 0; } }
@keyframes c-pop { from { transform: scale(0); opacity: 0; } }
@keyframes c-wipe { from { transform: scaleX(0); } }
@keyframes c-grow { from { transform: scaleY(0); } }
/* end charts over time */
svg[data-map-pick] { cursor: pointer; touch-action: manipulation; }
/* The catalog map (chart.map): every dot on a canvas; the taps, the labels and the selected marker's ring on an svg above. */
.c-map { position: relative; }
.c-map__dots { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-map > svg { position: relative; }
:root[data-motion="on"] .c-map__ring--new { transform-box: fill-box; transform-origin: center; animation: c-pop var(--dur-base) var(--ease-pop) both; }
:root[data-motion="on"] .c-map__tag--new { animation: hb-fade var(--dur-fast) var(--ease-out) both; }
/* The People network (chart.network): the mark's pill and gradient (logo.css tokens, deepened in dark so white names keep
   their contrast), white nodes and round-capped edges, rays fading to the pill's edge, names in white with a soft halo.
   First draw (data tokens): the member's node pops; rays and edges unroll from it in turn (--k, 6 data staggers apart);
   each person's node pops as its edge arrives; names fade in after. */
.c-net { display: block; overflow: visible; --net-a: var(--pill-a); --net-m: var(--pill-m); --net-b: var(--pill-b); }
:root[data-theme="dark"] .c-net { --net-a: #5a6b92; --net-m: #34426b; --net-b: #222d52; }
.c-net .pa { stop-color: var(--net-a); } .c-net .pm { stop-color: var(--net-m); } .c-net .pb { stop-color: var(--net-b); }
.c-net-pill { filter: drop-shadow(0 10px 24px color-mix(in srgb, var(--net-b) 35%, transparent)); }
:root[data-theme="dark"] .c-net-pill { filter: none; }
.c-net-edge { stroke: #fff; stroke-linecap: round; opacity: 0.92; }
.c-net-ray { stroke-width: 1.5; stroke-linecap: round; }
.c-net-you, .c-net-node { fill: #fff; }
.c-net-halo { fill: none; stroke: #fff; stroke-width: 1.5; opacity: 0.45; }
.c-net-mark { fill: var(--net-b); font-size: var(--net-fs, 13px); font-weight: 700; font-variant-numeric: tabular-nums; }
.c-net-label { fill: #fff; font-size: var(--net-fs, 13px); font-weight: 600; paint-order: stroke; stroke: color-mix(in srgb, var(--net-b) 70%, transparent); stroke-width: 3px; stroke-linejoin: round; }
.c-net-label--sub { font-size: calc(var(--net-fs, 13px) - 1.5px); font-weight: 500; fill-opacity: 0.88; }
.c-net-label--you { font-weight: 700; }
.c-net-person { cursor: pointer; outline: none; }
.c-net-focus { fill: none; stroke: transparent; stroke-width: 2.5; }
.c-net-person:hover .c-net-focus { stroke: rgba(255, 255, 255, 0.45); }
.c-net-person:focus-visible .c-net-focus { stroke: #fff; }
.hb-fig__svg:has(> .c-net) { position: relative; }
.c-net-invite { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); color: #fff; }
.c-net-invite__t { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.5rem; }
.c-net-invite__b { font-size: var(--t-small); line-height: var(--t-small-lh); opacity: 0.9; max-width: 34ch; }
@media (max-width: 479px) { .c-net-invite__b { display: none; } }   /* a phone's pill keeps the title and the button; the page says the rest */
.c-net-invite__btn { margin-top: var(--s-1); min-height: 40px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: #fff; color: var(--net-b, var(--pill-b)); font: inherit; font-weight: 650; font-size: var(--t-small); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.c-net-invite__btn:hover { background: color-mix(in srgb, #fff 88%, var(--pill-a)); }
.c-net-invite__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
:root[data-motion="on"] .hb-fig--enter :is(.c-net-you, .c-net-halo) { transform-box: fill-box; transform-origin: center; animation: c-pop var(--dur-data-pop) var(--ease-pop) both; }
:root[data-motion="on"] .hb-fig--enter :is(.c-net-edge, .c-net-ray) { --at: calc(var(--dur-data-pop) + var(--k, 0) * var(--stagger-data) * 6); stroke-dasharray: 1; stroke-dashoffset: 1; animation: c-draw var(--dur-unroll) var(--ease-in-out) var(--at) both; }
:root[data-motion="on"] .hb-fig--enter .c-net-ray { animation-duration: calc(var(--dur-unroll) * 1.25); }
:root[data-motion="on"] .hb-fig--enter .c-net-person { --at: calc(var(--dur-data-pop) + var(--k, 0) * var(--stagger-data) * 6 + var(--dur-unroll) * 0.92); }
:root[data-motion="on"] .hb-fig--enter .c-net-person :is(.c-net-node, .c-net-mark) { transform-box: fill-box; transform-origin: center; animation: c-pop var(--dur-data-pop) var(--ease-pop) var(--at) both; }
:root[data-motion="on"] .hb-fig--enter .c-net-person .c-net-label, :root[data-motion="on"] .hb-fig--enter .c-net-label--you { animation: hb-fade var(--dur-data-fill) var(--ease-out) calc(var(--at, var(--dur-data-pop)) + var(--dur-data-pop)) both; }
:root[data-motion="on"] .hb-fig--enter .c-net-invite { animation: hb-fade var(--dur-data-fill) var(--ease-out) calc(var(--dur-unroll) * 0.6) both; }
.hb-ribbon__groups { margin-top: calc(-1 * var(--s-1)); }

/* ------------------------------------------------------------------ shared page footer (purpose and provenance, member pages) */
.hb-foot { width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) var(--s-10); }
.hb-foot__inner { display: flex; flex-direction: column; gap: var(--s-1); padding-top: var(--s-5); border-top: 1px solid var(--border-subtle); color: var(--text-2); font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-foot__inner p { max-width: 72ch; }
@media (max-width: 767px) { .hb-foot { padding-bottom: var(--s-8); } }

/* ------------------------------------------------------------------ motion vocabulary (tokens.css; MOTION_AUDIT.md)
   The shared keyframes. Every rule that runs one is declared under :root[data-motion="on"], so Motion Off leaves nothing
   to run; transitions read the duration tokens, which Motion Off zeroes. Entrances: fade, drop (a floating surface
   settling a few pixels down onto the page, its shadow landing from the raise elevation to its own), settle (the same
   without a surface: a notice, a mark), rise (from below: a toast), band-in and the sheets' slides. Exits reverse them,
   quicker and accelerating. Content re-rendered in place enters through app.js (page, view, grow). */
@keyframes hb-fade { from { opacity: 0; } }
@keyframes hb-fade-out { to { opacity: 0; } }
@keyframes hb-drop { from { opacity: 0; transform: translateY(-8px) scale(0.98); box-shadow: var(--shadow-raise); } }
@keyframes hb-settle { from { opacity: 0; transform: translateY(-6px); } }
@keyframes hb-lift { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes hb-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes hb-sheet-up { from { transform: translateY(100%); } }
@keyframes hb-sheet-down { to { transform: translateY(100%); } }
@keyframes hb-sheet-in { from { transform: translateX(100%); } }
@keyframes hb-sheet-out { to { transform: translateX(100%); } }
@keyframes hb-sheet-in-left { from { transform: translateX(-100%); } }
@keyframes hb-sheet-out-left { to { transform: translateX(-100%); } }
@keyframes hb-band-in { from { transform: translateY(-100%); } }

/* ------------------------------------------------------------------ print */
@page { size: A4; margin: 16mm 14mm; }
.hb-printdoc { display: none; }
@media print {
  .hb-viewas, .hb-header, .hb-tabbar, .hb-ctxrow, .hb-toasts, .hb-skip, .hb-prompt, .hb-sheet, .hb-pop, .hb-pagehead__tools .hb-seg, #hb-foot { display: none !important; }
  body { background: var(--surface-0); }
  .hb-page { padding: 0; max-width: none; }
  .hb-card, .hb-tracker, .hb-obs { box-shadow: none; break-inside: avoid; }
  a { color: inherit; }
  /* Printing a document sheet (HB.sheet.open({printDoc:true}) → Print): only that document prints, full width, in flow. */
  html.is-print-doc #hb-app, html.is-print-doc #hb-viewas, html.is-print-doc #hb-foot { display: none !important; }
  html.is-print-doc .hb-printdoc { display: block; color: var(--text-1); }
  html.is-print-doc .hb-printdoc .hb-sheet__close, html.is-print-doc .hb-printdoc .hb-sheet__handle, html.is-print-doc .hb-printdoc [data-sheet-print] { display: none !important; }
  html.is-print-doc .hb-printdoc__head { padding-bottom: var(--s-3); margin-bottom: var(--s-4); border-bottom: 1px solid var(--border-subtle); }
  html.is-print-doc .hb-printdoc__body { display: flex; flex-direction: column; gap: var(--s-4); }
}


.hb-obs__more .hb-btn--quiet { margin-left: calc(-1 * var(--s-3)); }

.hb-appbar__ctx .hb-ctxbtn { max-width: min(420px, 34vw); }
/* Desktop app bar: the person · context chip yields space (ellipsis) before the bar ever wraps. */
@media (min-width: 768px) { .hb-appbar__ctx { flex: 1000 1 0%; min-width: 0; justify-content: flex-end; } .hb-appbar__ctx .hb-ctxbtn { flex: 0 1 auto; min-width: 0; } }

/* ------------------------------------------------------------------ beta shell: staff view, gates, account, loading */
.hb-logo__tag--beta { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; font-size: 0.6875rem; color: var(--text-2); }
.hb-noscript { padding: var(--s-8) 0; }
.hb-bootwait { max-width: 640px; margin: var(--s-8) auto 0; }
/* Staff "view as member": a fixed band above the app; the header sits below it (--viewas-h is measured by app.js). */
.hb-viewas { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: var(--caution-bg); color: var(--caution-ink); border-bottom: 2px solid var(--caution-border); }
.hb-viewas__inner { max-width: calc(var(--page-max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s-1) var(--gutter); min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); }
.hb-viewas__inner > .hb-ic { flex: none; }
.hb-viewas__text { flex: 1 1 260px; min-width: 0; margin: 0; font-size: var(--t-small); line-height: var(--t-small-lh); }
.hb-viewas__text b { font-weight: 700; }
.hb-viewas__end { flex: none; background: var(--surface-1); color: var(--text-1); border-color: var(--caution-border); }
html.hb-has-viewas body { padding-top: var(--viewas-h, 52px); }
html.hb-has-viewas .hb-header { top: var(--viewas-h, 52px); }
/* The band slides down from the top while the header and page make room for it, so nothing jumps. */
:root[data-motion="on"] .hb-viewas { animation: hb-band-in var(--dur-slow) var(--ease-out); }
body:has(> #hb-viewas) { transition: padding-top var(--dur-slow) var(--ease-out); }
body:has(> #hb-viewas) .hb-header { transition: top var(--dur-slow) var(--ease-out); }
/* A save control in a read-only session carries its reason. */
.hb-ronote { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; color: var(--text-2); }
.hb-ronote .hb-ic { flex: none; margin-top: 3px; color: var(--caution-ink); }
/* Profile gates: a protected household profile (Kit ID) and a guardian's one-time confirmation. */
.hb-gate { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
@media (min-width: 768px) { .hb-gate { padding-top: var(--s-4); } }
.hb-gate__head { display: flex; flex-direction: column; gap: var(--s-3); }
.hb-gate__card { gap: var(--s-5); padding: var(--s-8); border-radius: var(--r-lg); }
@media (max-width: 767px) { .hb-gate__card { padding: var(--s-5) var(--s-4); border-radius: var(--r-md); } }
.hb-gate .hb-btn--link { min-height: var(--tap); display: inline-flex; align-items: center; }
/* Account sheet and its sub-sheets. */
.hb-acct .hb-sheet__body > section { padding-top: var(--s-4); border-top: 1px solid var(--border-subtle); }
.hb-acct .hb-sheet__body > section:first-child { border-top: 0; padding-top: 0; }
.hb-acct .hb-sheet__body > section > .hb-btn { align-self: flex-start; }
.hb-acct .hb-sync { display: flex; flex-direction: column; gap: var(--s-2); }
.hb-acct .hb-sync__copy { padding: 0 var(--s-2); }
.hb-acct__ic { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--brand); flex: none; }
.hb-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.hb-activity li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s-3); font-size: var(--t-small); line-height: var(--t-small-lh); color: var(--text-1); }
.hb-activity time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.hb-activity .hb-src { color: var(--text-3); }
@media (max-width: 479px) { .hb-activity li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
/* Before the first password change the bar holds the logo, Sign out and Appearance: on small phones Appearance shows only
   its icon (its name stays for assistive technology), so Sign out keeps its words and the bar keeps one row. */
@media (max-width: 479px) { .hb-appbar--gate .hb-appearance-now { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
