/* Healthspan / Health Builder - Cymetica Biosciences. House tokens (static/css/tokens.css) only; panel-bg, panel-radius and the font families still come from main.css (no house equivalent). */
.hs { max-width: 820px; margin: 0 auto; padding: 32px 16px 56px; color: var(--text); font-family: var(--font-body); }
.hs-hero { text-align: center; margin-bottom: 20px; }
.hs-kicker { color: var(--accent); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 6px; text-rendering: geometricPrecision; }
.hs h1 { font-family: var(--font-display); color: var(--text); font-size: clamp(32px, 6vw, 48px); margin: 0 0 10px; }
.hs-sub { color: var(--text-2); max-width: 620px; margin: 0 auto; line-height: 1.55; }
.hs-bb { margin: 12px 0 0; }
.hs-bb a { display: inline-block; color: var(--accent); border: 1px solid var(--hairline); border-radius: 999px;
           padding: 6px 14px; font-size: 14px; font-weight: 600; text-decoration: none; }
.hs-bb a::after { content: " \2192"; }
.hs-bb a:hover, .hs-bb a:focus-visible { border-color: var(--accent); }
.hs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.hs-chat { background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: var(--panel-radius, 12px); padding: 14px; }
.hs-log { display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow-y: auto; }
.hs-log:empty { display: none; }
.hs-form { display: flex; gap: 10px; align-items: stretch; margin-top: 10px; }
.hs-log:empty + .hs-form { margin-top: 0; }
.hs-form textarea { flex: 1; resize: vertical; min-height: 52px; background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 16px; }
.hs-form textarea:focus { outline: none; border-color: var(--accent); }
.hs-send { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 22px;
  font-family: var(--font-display); font-size: 16px; cursor: pointer; }
.hs-send:disabled { opacity: .5; cursor: wait; }
.hs-credit { color: var(--text-2); font-size: 13px; margin: 8px 2px 0; }

.hs-starters { text-align: center; margin-top: 18px; }
.hs-try { color: var(--text-2); font-size: 13px; margin: 0 0 10px; }
.hs-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hs-btn { background: transparent; color: var(--text); border: 1px solid var(--hairline-strong);
  border-radius: 999px; padding: 10px 18px; font: inherit; font-size: 15px; cursor: pointer; min-height: 44px; }
.hs-btn:hover, .hs-btn:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }

.hs-msg { line-height: 1.6; }
.hs-q { align-self: flex-end; background: var(--surface-2); border-radius: 12px 12px 2px 12px; padding: 10px 14px; max-width: 85%; }
.hs-a { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; }
.hs-a h3, .hs-a h4 { font-family: var(--font-display); color: var(--text); font-size: 16px; margin: 14px 0 6px; }
.hs-a p { margin: 0 0 10px; }
.hs-a ul { margin: 0 0 10px; padding-left: 20px; }
.hs-a a { color: var(--accent); }
.hs-safety { border-left: 4px solid var(--accent); background: var(--surface-2); color: var(--text); font-weight: 600; padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; }
.hs-wait { color: var(--text-2); font-style: italic; }
.hs-gate { border: 1px solid var(--accent); border-radius: 12px; padding: 14px 16px; }
.hs-gate .hs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.hs-gate a { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; }
.hs-gate a.primary { background: var(--accent); color: var(--accent-ink); }

.hs-cards { margin-top: 12px; display: grid; gap: 10px; }
.hs-card { border-top: 1px solid var(--hairline); padding-top: 10px; }
.hs-card h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); font-family: var(--font-body); }
.hs-card ol, .hs-card ul { margin: 0; padding-left: 20px; font-size: 14px; }
.hs-card li { margin-bottom: 4px; }
.hs-tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--hairline); margin: 0 6px 6px 0; color: var(--text-2); }
.hs-tag.pred { border-style: dashed; color: var(--accent); }
.hs-note { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.hs-boundary { text-align: center; color: var(--text-2); font-size: 13px; margin-top: 26px; }

@media (max-width: 560px) {
  .hs { padding-top: 22px; }
  .hs-form { flex-direction: column; }
  .hs-send { padding: 12px; }
  .hs-btn { flex: 1 1 calc(50% - 10px); }
}

/* New in research this week (/healthspan) */
.hs-new { margin-top: 26px; background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: var(--panel-radius, 12px); padding: 16px; }
.hs-new-h { font-family: var(--font-display); color: var(--text); font-size: 18px; margin: 0 0 4px; }
.hs-new-sub { color: var(--text-2); font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
.hs-new-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hs-new-list li { display: flex; flex-direction: column; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.hs-new-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.hs-new-pair { color: var(--text); font-weight: 600; }
.hs-new-pair a, .hs-new-paper { color: var(--accent); }
.hs-new-paper { font-size: 14px; line-height: 1.45; }
.hs-new-meta { color: var(--text-2); font-size: 12px; }
.hs-boundary a { color: var(--accent); }

/* Build it Better for Health (/build-it-better-health) */
.bbh-form { display: flex; flex-direction: column; gap: 8px; }
.bbh-label { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.bbh-input { background: var(--surface); color: var(--text); border: 1px solid var(--hairline-strong);
  border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 16px; resize: vertical; }
.bbh-input:focus { outline: none; border-color: var(--accent); }
.bbh-ideas { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.bbh-ideas .hs-btn { font-size: 14px; padding: 8px 14px; min-height: 40px; flex: 0 1 auto; }
.bbh-submit { align-self: flex-start; padding: 12px 22px; margin-top: 6px; }
.bbh-done { border: 1px solid var(--accent); border-radius: 10px; padding: 12px 14px; }
.bbh-done a { color: var(--accent); }
.bbh-panel { margin-top: 18px; }
.bbh-h2 { font-family: var(--font-display); color: var(--text); font-size: 18px; margin: 2px 0 10px; }
.bbh-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; color: var(--text); }
.bbh-ev { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bbh-ev:empty { display: none; }
.bbh-ev a { color: var(--accent); }
.bbh-ev .bbh-tag { color: var(--text-2); font-size: 12px; }
.bbh-panel code { font-family: var(--font-mono, 'IBM Plex Mono', monospace); font-size: 12px; word-break: break-all; }

/* Explore related (genes · drugs · plants · foods) */
.hs-rel { margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.hs-rel-h { margin: 0 0 4px; font-size: 15px; }
.hs-rel-h span { color: var(--accent); }
.hs-rel-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.hs-rel-tab { background: transparent; color: var(--text); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 10px 8px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 44px; font: inherit; }
.hs-rel-tab b { font-size: 15px; }
.hs-rel-tab small { color: var(--text-2); font-size: 12px; line-height: 1.3; }
.hs-rel-tab:hover, .hs-rel-tab:focus-visible { border-color: var(--accent); outline: none; }
.hs-rel-tab[aria-selected="true"] { border-color: var(--accent); background: var(--surface-2); }
.hs-rel-tab[aria-selected="true"] b { color: var(--accent); }
.hs-rel-body { margin-top: 10px; }
.hs-rel-tier { margin-bottom: 12px; }
.hs-rel-tier h5 { margin: 0; font-size: 14px; color: var(--text); }
.hs-rel-tier.t-hidden h5 { color: var(--accent); }
.hs-rel-tier .hs-note { margin: 2px 0 6px; }
/* mobile-polish.css indents every ul with !important on phones; these lists are rows, not bullets */
.hs-a .hs-rel .hs-rel-tier ul { list-style: none; padding: 0 !important; margin: 0 !important; }
.hs-a section.hs-rel { padding-left: 0 !important; padding-right: 0 !important; }
/* Related foods: one card per food, five icon-headed lists (operator 2026-11-09) */
.hs-fg { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.hs-a section.hs-fg { padding-left: 0 !important; padding-right: 0 !important; }
.hs-fg-h { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hs-fg-h span { color: var(--accent); }
.hs-fg-groups { display: grid; gap: 12px; margin-top: 10px; }
.hs-fg-group { background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.hs-fg-group > header { border-bottom: 1px solid var(--hairline); padding: 0 0 8px; margin-bottom: 4px; }
.hs-fg-group h5 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; color: var(--text); }
.hs-fg-group h5 .hs-rel-open { color: var(--text); font-family: var(--font-display); font-size: 16px; }
.hs-fg-meta { margin-top: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.hs-fg-tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.hs-fg-list { margin-top: 10px; }
.hs-fg-list h6 { margin: 0 0 2px; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 6px; }
.hs-fg-list .hs-note { margin: 0 0 4px; }
.hs-a .hs-fg ul { list-style: none; padding: 0 !important; margin: 0 !important; }
.hs-fg .hs-rel-item { overflow-wrap: anywhere; }
.hs-fg-cond { white-space: normal; }
.hs-ico { flex: none; color: var(--accent); vertical-align: -4px; }
.hs-ico-biology, .hs-ico-drugs { color: var(--text-2); }
.hs-ico-diseases { color: var(--text); }
.hs-bell { background: none; border: 1px solid transparent; border-radius: 999px; color: var(--text-2); cursor: pointer;
  padding: 2px 4px; margin-left: 4px; vertical-align: middle; line-height: 0; min-width: 28px; min-height: 28px; }
.hs-bell .hs-ico { color: inherit; vertical-align: 0; width: 16px; height: 16px; }
.hs-bell:hover, .hs-bell:focus-visible { color: var(--accent); border-color: var(--hairline); outline: none; }
.hs-bell[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.hs-bell[aria-pressed="true"] .hs-ico path:first-child { fill: currentColor; }
.hs-bell:disabled { opacity: .5; cursor: wait; }
@media (max-width: 600px) {
  .hs-fg-group { padding: 10px 8px; border-left: 0; border-right: 0; border-radius: 0; }
  .hs-fg-list h6 { letter-spacing: .02em; }
}
.hs-alert-msg { font-size: 13px; margin: 8px 0 0; color: var(--text); }
.hs-alert-msg[data-kind="ok"] { color: var(--accent); }
.hs-alert-msg a { color: var(--accent); }
.hs-rel-item { padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.hs-rel-item:last-child { border-bottom: 0; }
.hs-rel-open { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-align: left; }
.hs-rel-open:hover, .hs-rel-open:focus-visible { text-decoration: underline; outline: none; }
.hs-kind { color: var(--text-2); font-size: 12px; }
.hs-rel-why, .hs-rel-path { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.hs-rel-path i { color: var(--text); font-style: normal; }
.hs-badge { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px; margin-left: 6px; border: 1px solid; }
/* pos/neg colours are for numbers only (design-token rule 2): the arrow and the words carry the direction */
.hs-badge.up { color: var(--accent); border-color: var(--accent); }
.hs-badge.down { color: var(--text); border-color: var(--text-2); }
.hs-badge.aging { color: var(--text-2); border-color: var(--hairline); border-style: dashed; }
.hs-novel { display: inline-block; font-size: 12px; margin-top: 4px; padding: 1px 7px; border-radius: 999px;
  border: 1px dashed var(--accent); color: var(--accent); }
.hs-papers { display: inline-block; font-size: 12px; margin-top: 4px; color: var(--accent); }
.hs-rel-detail { margin: 8px 0 2px; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--surface-2); border-radius: 6px; }
.hs-rel-detail p { margin: 0 0 8px; font-size: 13px; }
.hs-rel-detail h6 { margin: 8px 0 4px; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.hs-rel-detail ul { padding-left: 18px; margin: 0 0 6px; font-size: 13px; }
.hs-rel-detail .hs-tag { cursor: pointer; background: transparent; font: inherit; font-size: 12px; }
.hs-rel-dhead { font-weight: 600; margin-bottom: 6px; }
.hs-ev-line { font-size: 13px; margin-bottom: 4px; }
.hs-ev-line .hs-badge { margin-left: 0; }
@media (max-width: 560px) { .hs-rel-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Live research map (operator 2026-11-09) — the landing's swarm engine on the Healthspan vector pulse.
   Height reserved up front (no layout shift); the canvas fades in once drawn and its edges dissolve into
   the page. A phone takes horizontal drags (a vertical swipe scrolls the page). */
.hs-pulse { margin: -16px 0 22px; text-align: center; }
/* Operator 2026-11-09: "Connect Your AI" right under the research map, as on the landing */
.hs-agent { display: flex; justify-content: center; margin: 6px 0 28px; }
/* Operator 2026-11-09: 10x the space between the sections on /healthspan and /healthbuilder (was
   18–26px). main.hs outranks each section's own margin-top (.hsp, .hs-new, .bbh-panel, …). */
main.hs > * + * { margin-top: clamp(160px, 20vw, 240px); }
main.hs { padding-bottom: clamp(160px, 20vw, 240px); }
/* /healthbuilder/apps — Health Builder's own app list (operator 2026-11-09) */
.hs-bb a + a { margin-left: 8px; }
.hsa-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.hsa-card { background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: var(--panel-radius, 12px); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.hsa-card h3 { font-family: var(--font-display); color: var(--text); font-size: 16px; margin: 0; }
.hsa-card h3 a { color: inherit; text-decoration: none; }
.hsa-card h3 a:hover { text-decoration: underline; }
.hsa-card p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; }
.hsa-card .hsa-meta { color: var(--text-2); font-size: 13px; margin-top: auto; }
.hsa-card .hsa-meta a, .hsa-empty a { color: var(--accent); }
.hsa-empty { background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: var(--panel-radius, 12px); padding: 18px; color: var(--text-2); line-height: 1.55; margin: 0; }
.hs-pulse-top { position: relative; margin: 0 -16px; height: clamp(280px, 52vh, 480px); }
.hs-pulse-stage { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  -webkit-mask-image: radial-gradient(ellipse 74% 72% at 50% 50%, rgba(0,0,0,1) 54%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse 74% 72% at 50% 50%, rgba(0,0,0,1) 54%, rgba(0,0,0,0) 100%); }
.hs-pulse-top.on .hs-pulse-stage { opacity: 1; }
.hs-pulse-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.hs-pulse-stage canvas:active { cursor: grabbing; }
.hs-pulse-toggle { position: absolute; top: 8px; right: 16px; z-index: 2; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  background: var(--panel-bg); color: var(--text-2); border: 1px solid var(--hairline); font: inherit; font-size: 12px; cursor: pointer; }
.hs-pulse-toggle[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.hs-pulse-toggle:focus-visible, .hs-pulse-zoom button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hs-pulse-toggle.hs-pulse-links { top: 52px; }
.hs-pulse-zoom { position: absolute; right: 16px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.hs-pulse-zoom button { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-bg); color: var(--text);
  border: 1px solid var(--hairline); font-size: 20px; line-height: 1; cursor: pointer; }
.hs-pulse-zoom button:hover { border-color: var(--accent); }
.hs-pulse-hud, .hs-pulse-tip { background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: 10px; padding: 8px 10px;
  font-size: 12px; line-height: 1.5; color: var(--text-2); text-align: left; }
.hs-pulse-hud { position: absolute; top: 8px; left: 16px; z-index: 2; width: 300px; pointer-events: none; }
.hs-pulse-hud .row, .hs-pulse-tip .row { display: flex; justify-content: space-between; gap: 12px; }
.hs-pulse-hud .v, .hs-pulse-tip .v { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.hs-pulse-tip { position: absolute; display: none; z-index: 3; pointer-events: none; min-width: 200px; max-width: 300px; }
.hs-pulse-tip .tip-h { font-family: var(--font-display); color: var(--text); font-size: 12px; margin: 0 0 4px; }
.hs-pulse-top .bts-pos { color: var(--pos); }
.hs-pulse-top .bts-neg { color: var(--neg); }
.hs-pulse-top .bts-acc { color: var(--accent); }
.hs-pulse-h { font-family: var(--font-display); color: var(--text); font-size: 18px; margin: 4px 0 6px; }
.hs-pulse-sub { color: var(--text-2); font-size: 14px; line-height: 1.55; max-width: 640px; margin: 0 auto 8px; }
.hs-pulse-key { color: var(--text-2); font-size: 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px;
  justify-content: center; align-items: center; }
.hs-pulse-k { display: inline-flex; align-items: center; gap: 6px; }
.hs-pulse-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
@media (max-width: 640px) {
  .hs-pulse-top { height: clamp(260px, 78vw, 360px); }
  .hs-pulse-hud { left: 12px; right: 12px; top: calc(100% + 6px); width: auto; }
  .hs-pulse-top.info { margin-bottom: 270px; }
  .hs-pulse-toggle, .hs-pulse-zoom { right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .hs-pulse-stage { transition: none; } }
/* Operator 2026-11-09: the line under Connect your AI, and its references */
.hs-tagline { max-width: 640px; margin: 0 auto 8px; color: var(--text); font-size: 16px; line-height: 1.55; text-align: center; }
.hs-tagline-ref { max-width: 640px; margin: 0 auto; color: var(--text-2); font-size: 13px; line-height: 1.55; text-align: center; }
.hs-tagline-ref a, .hs-about a, .hs-refs a { color: var(--accent); }
/* Foot of the page: the full research lab framed as on the landing, then "About our work" */
.hs-lab-title, .hs-about-title { font-family: var(--font-display); color: var(--text); font-weight: 400; font-size: clamp(20px, 3vw, 26px); margin: 0 0 6px; }
.hs-lab-hint { color: var(--text-2); font-size: 13px; margin: 0 0 12px; }
.hs-lab-frame { display: block; width: 100%; height: clamp(520px, 82vh, 860px); border: 1px solid var(--hairline); border-radius: 12px; background: var(--bg); }
.hs-about p { color: var(--text); font-size: 15px; line-height: 1.65; margin: 8px 0 0; }
.hs-about sup a { text-decoration: none; }
.hs-refs { margin: 14px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.hs-refs li + li { margin-top: 6px; }
.hs-refs a { overflow-wrap: anywhere; }
/* Magnesium Research Alerts app (/healthbuilder/apps/magnesium-alerts) */
.hs-kicker a { color: inherit; text-decoration: none; }
.mga-items { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.mga-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: 10px; }
.mga-label { color: var(--text); font-size: 15px; }
.mga-follow[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.mga-msg { margin-top: 12px; }
.mga-msg a { color: var(--accent); }
.mga-feed-item { margin-top: 16px; }
.mga-feed-item h3 { font-family: inherit; font-weight: 600; font-size: 15px; color: var(--text); margin: 0 0 6px; text-transform: capitalize; }
.mga-feed-item h3 .hs-note { text-transform: none; font-weight: 400; }
.mga-papers { margin: 8px 0 0; padding-left: 20px; line-height: 1.55; }
.mga-papers li + li { margin-top: 6px; }
.mga-papers a { color: var(--accent); }
/* Three states, never one blank box (TASK 165 item 7): the evidence component and the research map each show
   loading, live or empty, and could not load as visibly different things. */
.bbh-state { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.bbh-state[data-state="loading"] { font-style: italic; }
.bbh-state[data-state="empty"] { border: 1px dashed var(--hairline-strong); }
.bbh-state[data-state="error"] { color: var(--text); border: 1px solid var(--hairline-strong); border-left-width: 4px; }
.bbh-retry { margin-left: 8px; min-height: 36px; padding: 6px 14px; font-size: 14px; }
.hs-pulse-status { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content;
  max-width: min(420px, calc(100% - 32px)); background: var(--panel-bg); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 8px 14px; color: var(--text-2); font-size: 13px; line-height: 1.5; text-align: center; }
.hs-pulse-status p { margin: 0; }
.hs-pulse-status[data-state="loading"] { font-style: italic; }
.hs-pulse-status[data-state="empty"] { border-style: dashed; border-color: var(--hairline-strong); }
.hs-pulse-status[data-state="error"] { color: var(--text); border-color: var(--hairline-strong); border-left-width: 4px; }
.hs-pulse-top:not(.on) .hs-pulse-status { top: 50%; bottom: auto; transform: translate(-50%, -50%); }

/* clinical trials (ClinicalTrials.gov) — tab, item detail, food groups; existing tokens only */
.hs-trials { list-style: none; margin: 0; padding: 0; }
.hs-trial { padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.hs-trial a { color: var(--text); text-decoration: none; }
.hs-trial a:hover, .hs-trial a:focus-visible { color: var(--accent); text-decoration: underline; }
.hs-trial-chip { border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.hs-trial-meta { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.hs-trial-meta.live { color: var(--accent); }
.hs-trials-show { font-size: 12px; padding: 3px 10px; margin-top: 6px; }
.hs-trials-slot { margin-top: 8px; }
/* ── Visualizations (healthspan-viz.js): hidden-path map, class lens, what if ── */
.hs-viz-paths { margin: 4px 0 10px; border: 1px solid var(--hairline); border-radius: 10px; padding: 8px; background: var(--surface); }
.hs-viz-cap { font-size: 12px; color: var(--text-2); line-height: 1.4; margin-bottom: 4px; }
.hs-viz-key { white-space: nowrap; }
.hs-viz-key .k-novel { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--accent); vertical-align: middle; margin-right: 4px; }
.hs-viz-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hs-viz-svg { display: block; width: 100%; min-width: 560px; height: auto; font: 12px var(--font-body, inherit); }
.hs-viz-e { fill: none; stroke: var(--hairline-strong); stroke-width: 1.4; transition: opacity .15s, stroke .15s; }
.hs-viz-e.novel { stroke: var(--accent); stroke-dasharray: 4 3; opacity: .85; }
.hs-viz-n text { fill: var(--text); }
.hs-viz-n { cursor: pointer; outline: none; }
.n-topic rect { fill: var(--accent); }
.n-topic text { fill: var(--accent-ink, var(--bg)); font-weight: 600; cursor: default; }
.n-via rect { fill: var(--surface-2); stroke: var(--hairline-strong); }
.n-item circle { fill: var(--accent); }
.n-item.novel circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.hs-viz-svg.tracing .hs-viz-e, .hs-viz-svg.tracing .n-via, .hs-viz-svg.tracing .n-item { opacity: .22; }
.hs-viz-svg.tracing .on { opacity: 1; }
.hs-viz-svg .hs-viz-e.on { stroke: var(--accent); stroke-width: 2.4; }
.hs-viz-svg .hs-viz-e.novel.on { stroke: var(--accent); }
.n-via.on rect, .n-via:focus-visible rect { stroke: var(--accent); }

.hs-viz-sec { margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.hs-viz-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.hs-viz-open { background: transparent; color: var(--text); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 10px 8px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 44px; font: inherit; }
.hs-viz-open b { font-size: 15px; }
.hs-viz-open small { color: var(--text-2); font-size: 12px; line-height: 1.3; }
.hs-viz-open:hover, .hs-viz-open:focus-visible { border-color: var(--accent); outline: none; }
.hs-viz-open[aria-expanded="true"] { border-color: var(--accent); background: var(--surface-2); }
.hs-viz-open[aria-expanded="true"] b { color: var(--accent); }
.hs-viz-body { margin-top: 10px; }

.hs-lens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.hs-lens-col { border: 1px solid var(--hairline); border-radius: 10px; padding: 8px; min-width: 0; }
.hs-lens-col.miss { border-style: dashed; }
.hs-lens-col h6 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.hs-lens-known { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.hs-lens-pill { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--accent); color: var(--text);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-a .hs-lens-sim { list-style: none; padding: 0 !important; margin: 0 !important; }
.hs-lens-sim li { position: relative; font-size: 12px; padding: 2px 4px; margin-bottom: 3px; overflow: hidden; }
.hs-lens-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); opacity: .18; border-radius: 4px; }
.hs-lens-lab { position: relative; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

.hs-viz-words { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.hs-viz-word { font: inherit; font-size: 14px; padding: 6px 12px; min-height: 36px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--accent); }
.hs-viz-word[aria-pressed="false"] { background: transparent; color: var(--text-2); border-style: dashed; border-color: var(--hairline-strong); text-decoration: line-through; }
.hs-viz-add { font: inherit; font-size: 14px; padding: 6px 10px; min-height: 36px; border-radius: 999px; width: 140px;
  background: transparent; color: var(--text); border: 1px solid var(--hairline-strong); }
.hs-viz-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hs-viz-cat { font: inherit; font-size: 14px; padding: 6px 8px; min-height: 36px; border-radius: 8px;
  background: var(--surface); color: var(--text); border: 1px solid var(--hairline-strong); }
.hs-viz-out { margin-top: 10px; }
.hs-wi-head { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.hs-wi-head span { color: var(--accent); }
.hs-wi-tier { margin-bottom: 8px; }
.hs-wi-tier h6 { margin: 0 0 4px; font-size: 13px; color: var(--text); }
.hs-wi-tier h6 small { color: var(--text-2); font-weight: 400; }
.hs-wi-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 4px; }
.hs-wi-plus { color: var(--accent); width: 14px; }
.hs-wi-minus { color: var(--text-2); width: 14px; }
.hs-wi-chip { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid; color: var(--text); }
.hs-wi-chip.plus { border-color: var(--accent); }
.hs-wi-chip.minus { border-color: var(--hairline-strong); border-style: dashed; text-decoration: line-through; color: var(--text-2); }
@media (max-width: 520px) { .hs-viz-btns { grid-template-columns: 1fr; } .hs-lens-grid { grid-template-columns: 1fr 1fr; } }
