/* Health Age Simulator demo — component and screen styles. Tokens only (tokens.css);
   v5 (9 Oct 2026): tokens rebased on Genomics v17; .btn-primary / .btn-ghost = Genomics button primitives (these sheets
   are not in Figma); dark-only teal replaced by --accent tints (HS-08). v5.1: segmented labels, insight-card stroke and
   tag follow the Wellness file again — it is the latest My Wellness design; the Genomics copy is a placeholder (Mihir).
   measurements from get_design_context on the frames named in HS-01 §2. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--stage-bg); /* desktop stage, outside the app */ color: var(--text-primary);
  font-family: var(--font-default); font-weight: var(--weight-book); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 6px; }
.num { }

/* ---------------------------------------------------------------- stage */
.stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
/* The phone is always 390 × 844, ZOOMED to fit by ui.js (--s). CSS zoom (not transform) so text,
   SVG and Lottie re-render sharp at any size — needed for the 85" 4K portrait screen. */
.device-col { flex: 0 0 auto; position: relative; width: var(--dev-ow, 424px); height: var(--dev-oh, 896px); zoom: var(--s, 1); }
.device { position: absolute; left: var(--dev-bz, 11px); top: var(--dev-bz, 11px); width: var(--dev-w, 402px); height: var(--dev-h, 874px);
  border-radius: 55px; overflow: hidden; clip-path: inset(0 round 55px); background: var(--bg-page); isolation: isolate; }
/* bezel: drawn behind the screen (clip-path on .device would cut a box-shadow off) — a black phone in both themes */
.device-col::before { content: ''; position: absolute; inset: 0; border-radius: 66px; background: #1b1b22;
  box-shadow: inset 0 0 0 1px #2c2c35, 0 40px 80px var(--device-shadow, rgba(0,0,0,.6)); }
.statusbar { position: absolute; inset: 0 0 auto 0; height: 46px; z-index: 40; display: flex; align-items: center;
  justify-content: space-between; padding: 12px 27px; pointer-events: none; }
.sb-time { width: 54px; text-align: center; font: 600 17px/22px -apple-system, "SF Pro Text", system-ui; letter-spacing: -.408px; color: var(--neutral-secondary); }
.sb-right { width: 77.4px; height: 13px; color: var(--neutral-secondary); }
.sb-right svg { width: 100%; height: 100%; display: block; }
.home-ind { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; border-radius: 100px;
  background: var(--neutral-secondary); transform: translateX(-50%); z-index: 60; pointer-events: none; }
.viewport { position: absolute; inset: 0; overflow: hidden; }

/* ---------------------------------------------------------------- screens + transitions */
.screen { position: absolute; inset: 0; background: var(--bg-page); display: flex; flex-direction: column; will-change: transform; }
.screen .scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 66px; }
.screen .scroll::-webkit-scrollbar { display: none; }
.screen.enter-push   { animation: pushIn var(--m-push) both; z-index: 2; }
.screen.leave-push   { animation: pushOut var(--m-push) both; z-index: 1; }
.screen.enter-pop    { animation: popIn var(--m-push) both; z-index: 1; }
.screen.leave-pop    { animation: popOut var(--m-push) both; z-index: 2; }
@keyframes pushIn  { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pushOut { from { transform: none; filter: brightness(1); } to { transform: translateX(-30%); filter: brightness(.55); } }
@keyframes popIn   { from { transform: translateX(-30%); filter: brightness(.55); } to { transform: none; filter: brightness(1); } }
@keyframes popOut  { from { transform: none; } to { transform: translateX(100%); } }
.screen.enter-push, .screen.leave-pop { box-shadow: var(--shadow-push); }

/* ---------------------------------------------------------------- app header (App Header 12003:1366) */
.appbar { flex: 0 0 auto; height: 106px; padding-top: 46px; position: relative; z-index: 20; background: var(--bg-page); }
.appbar .wrap { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 20px; position: relative; }
.appbar .title { position: absolute; left: 50%; top: 19px; transform: translateX(-50%); width: 310px; text-align: center;
  font-weight: var(--weight-medium); font-size: 16px; line-height: 1.4; }
.icon-btn { width: 36px; height: 36px; margin: -8px; display: grid; place-items: center; border-radius: 50%; transition: background var(--m-fast); }
.icon-btn:active { background: var(--card-bg); }
.icon-btn .ic { width: 20px; height: 20px; }
.ic { display: inline-block; flex: 0 0 auto; color: inherit; }
.ic svg { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- typography */
.h4 { font-weight: var(--weight-medium); font-size: 20px; line-height: 1.2; letter-spacing: -.4px; margin: 0; }
.h5 { font-weight: var(--weight-medium); font-size: 16px; line-height: 1.2; letter-spacing: -.32px; margin: 0; }
.body-r { font-size: 14px; line-height: 1.4; margin: 0; }
.body-s { font-size: 12px; line-height: 1.4; margin: 0; }
.t2 { color: var(--text-secondary); } .t3 { color: var(--text-tertiary); } .t4 { color: var(--text-quarternary); }
.link { color: var(--link); font-weight: var(--weight-medium); display: inline-flex; align-items: center; gap: 4px; }
.link-s { font-size: 12px; line-height: 1.4; } .link-r { font-size: 14px; line-height: 1.4; } .link-l { font-size: 16px; line-height: 1.4; }
.link .ic { width: 12px; height: 12px; }
.link[aria-disabled="true"] { color: var(--text-tertiary); pointer-events: none; }
.section { padding: 16px 20px; }
.sec-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }

/* ---------------------------------------------------------------- orb */
.orb { position: relative; margin: 0 auto; }
.orb .ring { position: absolute; left: 50%; top: 8.572%; width: 82.857%; aspect-ratio: 1; transform: translateX(-50%); }
.orb .ring svg { position: absolute; inset: -1.64% -1.52% -1.64% -1.53%; width: 103.05%; height: 103.28%; overflow: visible; }
.orb .ring .outer { transform-origin: 50% 50%; transform-box: fill-box; animation: orbSpin 60s linear infinite; }
.orb .ring .inner { transform-origin: 50% 50%; transform-box: fill-box; animation: orbSpin 90s linear infinite reverse; }
.orb .ring .glow { transform-origin: 50% 50%; transform-box: fill-box; animation: orbBreathe 7s ease-in-out infinite; }
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbBreathe { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.018); opacity: .86; } }
.orb.pulse .ring { animation: orbPulse 520ms var(--ease-out); }
/* Lottie orb (supplied animations). Comp 1080², ring ≈ 69 % of the comp, so the player is 112 % of the orb box (measured: ring 209 px in the 250 px orb)
   to land the ring on the Figma ring size (207 px in the 250 px orb, 290 px in the 350 px orb). */
.orb .lotwrap { position: absolute; left: 50%; top: 50%; width: 112%; height: 112%; transform: translate(-50%,-50%); pointer-events: none; }
.orb .lot { position: absolute; inset: 0; transition: opacity 700ms var(--ease-out); }
.orb .lot svg { width: 100% !important; height: 100% !important; display: block; }
.orb.pulse .lotwrap { animation: orbPulse2 520ms var(--ease-out); }
@keyframes orbPulse2 { 0% { transform: translate(-50%,-50%) scale(1); } 35% { transform: translate(-50%,-50%) scale(.965); } 100% { transform: translate(-50%,-50%) scale(1); } }
@keyframes orbPulse { 0% { transform: translateX(-50%) scale(1); } 35% { transform: translateX(-50%) scale(.965); } 100% { transform: translateX(-50%) scale(1); } }
.orb .ring stop, .orb .ring path { transition: stop-color 700ms var(--ease-out), stroke 700ms var(--ease-out); }
.orb .center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; text-align: center; white-space: nowrap; }
.orb .val { font-weight: var(--weight-medium); line-height: 1.2; }
.orb .lbl { font-size: 16px; line-height: 1.4; }
.orb .state { line-height: 1.4; transition: color 500ms var(--ease-out); }
.orb.lg { width: 350px; height: 350px; } .orb.lg .val { font-size: 48px; letter-spacing: -.96px; } .orb.lg .center { gap: 8px; } .orb.lg .state { font-size: 16px; }
.orb.sm { width: 250px; height: 250px; } .orb.sm .val { font-size: 36px; letter-spacing: -.69px; } .orb.sm .lbl { font-size: 12px; } .orb.sm .center { gap: 5.7px; } .orb.sm .state { font-size: 12px; }
.state.up { color: var(--alert); } .state.up.up8 { color: var(--alert-strong); } .state.down { color: var(--tag-success-text); } .state.steady { color: var(--text-secondary); }
.orb-btn { display: block; margin: 0 auto; border-radius: 50%; -webkit-tap-highlight-color: transparent; transition: transform var(--m-fast); }
.orb-btn:active { transform: scale(.975); }
.orb-btn .orb { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .orb .ring .outer, .orb .ring .inner, .orb .ring .glow { animation: none; } }

/* ---------------------------------------------------------------- dashboard */
/* v5.1 — Segmented Control 21268:20851 (Wellness file, the latest My Wellness design — Mihir, 9 Oct):
   track segmented-control/default r XL pad XXS; selected segmented-control/selected r Full, Body/Regular/Medium 14;
   unselected Body/Small/Book 12. Light = DLS light mode of the same variables. */
.seg { height: 36px; border-radius: var(--r-xl); background: var(--segmented-bg); padding: var(--sp-xxs); display: flex; align-items: center; width: 350px; margin: 0 auto; }
.seg button { flex: 1; height: 32px; border-radius: var(--r-xl); font-size: 12px; line-height: 1.4; font-weight: var(--weight-book); color: var(--text-secondary); }
.seg button.on { background: var(--segmented-on); color: var(--text-primary); font-weight: var(--weight-medium); font-size: 14px; border-radius: var(--r-full); }
.wearable { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 4px 8px 4px 4px; position: relative; margin: 8px auto 0; width: max-content; }
.wearable .ic { width: 17px; height: 17px; } .wearable .dot { position: absolute; left: 15px; top: 13px; width: 4px; height: 4px; border-radius: 50%; background: var(--tag-success-text); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--card-bg); border-radius: var(--r-card-l); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 88px; }
.tile .v { font-weight: var(--weight-medium); font-size: 20px; line-height: 1.2; }
.tile .k { display: flex; gap: 4px; align-items: center; font-size: 14px; color: var(--text-secondary); }
.tile .k .ic { width: 12px; height: 12px; }
.card { background: var(--card-bg); border-radius: var(--r-card-l); }
.insight { background: var(--card-bg); border: 1px solid var(--card-stroke-outline); /* v5.1 — Actionable Insights 21268:20869: card/stroke-outline, Card Small r16 (latest design) */ border-radius: var(--r-card-s); padding: 16px; width: 350px; flex: 0 0 350px; user-select: none; }
.insight .d { font-size: 12px; line-height: 1.4; margin-top: 2px; }
/* v5.2 — vertical breathing room: overflow-x:auto forces overflow-y to clip, and the later `padding: 0 20px` had cancelled
   the padding-block, so at the zoomed event sizes the card's bottom border was cut. 4 px in, 4 px out: layout unchanged. */
.hscroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: -4px -20px; padding: 4px 20px; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; } .hscroll::-webkit-scrollbar { display: none; }
.hscroll, .pills { cursor: grab; scroll-padding-inline: 20px; }
.hscroll.dragging, .pills.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.hscroll.dragging * , .pills.dragging * { pointer-events: none; }
.hscroll img { -webkit-user-drag: none; user-select: none; }
.promo { border-radius: var(--r-card-l); background: linear-gradient(100deg, #0e4a5c, #0b2f3d); /* raw — Exploration Banner Background */
  padding: 16px; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; color: var(--static-white); }
.promo .copy { flex: 1; } .promo .h5 { display: flex; gap: 6px; align-items: center; } .promo .h5 .ic { width: 20px; height: 20px; }
.btn-white { background: var(--static-white); color: var(--static-black); height: 36px; min-width: 120px; padding: 0 16px; border-radius: var(--r-full);
  font-weight: var(--weight-medium); font-size: 14px; line-height: 1.15; transition: transform var(--m-fast), opacity var(--m-fast); }
.btn-white:active { transform: scale(.97); opacity: .9; }
/* v5 — Genomics .btn--primary shape (14 px, 48 high, pad 16). Fill: dark DLS #0eecda + ink; light teal/60 + white as an AA override (Mihir, 9 Oct) (HS-08 D1) */
.btn-primary { background: var(--btn-primary-bg); color: var(--button-text-active); height: 48px; border-radius: var(--r-full); padding: 0 var(--sp-l); font-weight: var(--weight-medium); font-size: 14px; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-s); }
.markers { position: relative; height: 380px; }
.markers svg.rings { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 350px; height: 350px; }
.markers .count { position: absolute; left: 50%; top: 175px; transform: translate(-50%,-50%); font-weight: var(--weight-medium); font-size: 56px; }
.markers .tested { position: absolute; left: 50%; top: 240px; transform: translateX(-50%); background: var(--static-white); color: var(--static-black);
  border-radius: var(--r-full); padding: 8px 16px; display: flex; gap: 8px; align-items: center; font-size: 14px; white-space: nowrap; }
.markers .tested .ic { width: 16px; height: 16px; color: var(--tag-success-text); }
.stats { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg-secondary); border-radius: var(--r-card-l); display: flex; padding: 12px 0; }
.stats > div { flex: 1; text-align: center; } .stats > div + div { border-left: 1px solid var(--card-stroke); }
.stats .n { font-weight: var(--weight-medium); font-size: 18px; } .stats .l { font-size: 14px; color: var(--text-tertiary); }

/* ---------------------------------------------------------------- Health Age screen */
.ha-copy { text-align: center; font-size: 14px; line-height: 1.4; padding: 0 4px; }
.explore { position: relative; overflow: hidden; border-radius: var(--r-card-l); border: 1px solid rgba(16,77,59,.2); /* raw */
  background: linear-gradient(174deg, #104d3b 0%, #000000 69%); /* raw — frame 21268:20777 */ padding: 16px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.explore .bgimg { position: absolute; left: -35px; top: -111px; width: 538.5px; height: 359px; object-fit: cover; pointer-events: none; opacity: .9; }
.explore > *:not(.bgimg) { position: relative; }
.explore .h5 { max-width: 266px; color: var(--static-white); }
.factors { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 20px; }
.frow { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--card-stroke); gap: 12px; }
.frow:last-of-type { border-bottom: 0; padding-bottom: 0; }
.frow .n { font-size: 12px; color: var(--text-secondary); }
/* v5.1 — Tag 21268:20808 (latest design): Body/xSmall/Book 10, radius XXS 4, padding XXS/XS. Not the Genomics pill tag. */
.tag { display: inline-flex; align-items: center; padding: var(--sp-xxs) var(--sp-xs); border-radius: var(--r-xxs); font-size: 10px; line-height: 1.4; font-weight: var(--weight-book); white-space: nowrap; }
.tag.opt { background: var(--tag-success-bg); color: var(--tag-success-text); }
.tag.in  { background: var(--tag-warn-bg); color: var(--tag-warn-text); }
.tag.out { background: var(--tag-error-bg); color: var(--tag-error-text); }
.askai { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-card-s); border: 1px solid var(--card-stroke); background: var(--card-bg); width: 100%; text-align: left; transition: transform var(--m-fast); }
.askai:active { transform: scale(.985); }
.askai .ic.big { width: 28px; height: 28px; color: var(--link); }
.askai .chev { width: 16px; height: 16px; color: var(--text-tertiary); margin-left: auto; }
.article { width: 280px; flex: 0 0 280px; height: 300px; border-radius: var(--r-card-l); overflow: hidden; clip-path: inset(0 round var(--r-card-l)); isolation: isolate; position: relative; background: var(--card-bg); display: flex; flex-direction: column; justify-content: flex-end; }
.article img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article .cb { position: relative; padding: 12px; border-radius: 0 0 var(--r-card-l) var(--r-card-l); backdrop-filter: blur(50px); -webkit-backdrop-filter: blur(50px); background: rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 8px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- factors list */
.flist .grp { margin-bottom: 20px; }
.flist .grp-h { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.flist .grp-h .ic { width: 20px; height: 20px; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; transition: background var(--m-fast); }
.lrow + .lrow { border-top: 1px solid var(--card-stroke); }
.lrow:active { background: var(--press); }
.lrow .main { flex: 1; min-width: 0; } .lrow .v { font-size: 14px; color: var(--text-secondary); }
.lrow .imp { font-size: 12px; color: var(--text-tertiary); min-width: 54px; text-align: right; }
.lrow .chev { width: 12px; height: 12px; color: var(--text-tertiary); }

/* ---------------------------------------------------------------- simulator */
.orbcard { margin: 0 20px; border: 1px solid var(--card-stroke); border-radius: var(--r-card-l); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.orbcard .cap { font-weight: var(--weight-medium); font-size: 14px; color: var(--text-secondary); transition: opacity var(--m-base); }
.orbcard .from { font-size: 12px; color: var(--text-quarternary); height: 17px; display: flex; gap: 6px; align-items: center; }
.delta-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--tag-success-text); opacity: 0; transform: translateY(4px); transition: opacity var(--m-base), transform var(--m-base); }
.delta-chip.show { opacity: 1; transform: none; } .delta-chip.worse { color: var(--alert); }
.ask-title { padding: 32px 20px 0; }
.pills-wrap { position: relative; margin-top: 20px; }
.pills { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px; scrollbar-width: none; position: relative; scroll-behavior: smooth; }
.pills::-webkit-scrollbar { display: none; }
.pill { height: 48px; padding: 0 16px; border-radius: var(--r-full); background: var(--pill-bg); font-size: 16px; line-height: 1.4; white-space: nowrap; flex: 0 0 auto;
  position: relative; z-index: 1; transition: color var(--m-base), transform var(--m-fast); }
.pill:active { transform: scale(.96); }
.pill.on { color: var(--pill-text-on); }
.pill-hl { position: absolute; left: 0; top: 0; height: 48px; border-radius: var(--r-full); background: var(--pill-bg-on); z-index: 1; pointer-events: none;
  transition: transform var(--m-spring), width var(--m-spring); }
.pill-hl + .pill, .pills .pill { z-index: 2; }
.pill.on { background: transparent; }
.domains { padding: 32px 20px 0; display: flex; flex-direction: column; gap: 32px; }
.domain { display: flex; flex-direction: column; gap: 16px; transition: opacity var(--m-base); }
.domain.hide { display: none; }
.domain.fade-in { animation: fadeUp var(--m-base) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dhead { display: flex; gap: 12px; align-items: flex-start; }
.dhead .ic { width: 24px; height: 24px; }
.dhead .ic.bolt { width: 14.26px; height: 21px; margin-top: 3px; }
.dhead .main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dhead .row { display: flex; justify-content: space-between; align-items: center; }
.ddelta { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--tag-success-text); overflow: hidden; max-height: 0; opacity: 0; transition: max-height var(--m-base), opacity var(--m-base), margin var(--m-base); }
.ddelta.show { max-height: 24px; opacity: 1; margin-top: -4px; }
.ddelta.worse { color: var(--alert); }
.ddelta .arr { font-size: 16px; line-height: 1; }
.domain.boxed { background: var(--card-bg); border-radius: var(--r-card-l); padding: 16px; gap: 12px; backdrop-filter: blur(20px); }
.domain.boxed .dhead .ic { width: 16px; height: 16px; margin-top: 4px; } .domain.boxed .dhead .ic.bolt { width: 11px; height: 16px; }
.domain.boxed .mcard { background: transparent; border: 1px solid var(--card-stroke); }
.mcard { background: var(--card-bg); border-radius: var(--r-card-l); padding: 16px; display: flex; flex-direction: column; gap: 16px; transition: box-shadow var(--m-base); }
.mcard.flash { animation: flash 1.4s var(--ease-out); }
@keyframes flash { 0%,100% { box-shadow: 0 0 0 0 transparent; } 20% { box-shadow: 0 0 0 2px var(--accent-a70); } }
.mcard .hd { display: flex; flex-direction: column; gap: 4px; }
.mcard .base { font-size: 14px; color: var(--text-tertiary); margin: 0; }

/* slider — _Element/Selector + Divider + Underlay + _Element/Tooltip (21529:40396) */
.slider { position: relative; padding: 32px 0 16px; }
.slider .track { position: relative; height: 15px; pointer-events: none; }
.slider .under { position: absolute; left: 0; right: 0; top: 6.25px; height: 2.5px; border-radius: 2px; background: var(--slider-track); }
.slider .fill { position: absolute; left: 0; top: 5px; height: 5px; border-radius: 2.5px 0 0 2.5px; background: var(--slider-fill); }
.slider .tick { position: absolute; top: 1.5px; width: 2px; height: 12px; margin-left: -1px; background: var(--slider-tick); border-radius: 1px; transition: background var(--m-fast), transform var(--m-fast); }
.slider .tick.hit { animation: tickHit 360ms var(--ease-out); }
@keyframes tickHit { 40% { transform: scaleY(1.6); background: var(--slider-fill); } }
.slider .thumb { position: absolute; top: 0; width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%; background: var(--slider-thumb);
  box-shadow: inset 0 0 0 2px var(--slider-fill); transition: transform var(--m-fast); pointer-events: none; }
.slider .base-mark { position: absolute; top: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--text-tertiary); opacity: 0; transition: opacity var(--m-base); }
.slider.moved .base-mark { opacity: .9; }
.slider .tipw { position: absolute; top: -31px; transform: translateX(-50%); padding-bottom: 8px; pointer-events: none; transition: transform var(--m-fast); }
.slider .tip { background: var(--bg-tertiary); color: var(--static-white); border-radius: var(--r-xxs); padding: 4px; min-width: 25px; text-align: center; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.slider .tipw::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 8px; height: 8px; background: var(--bg-tertiary); transform: translateX(-50%) rotate(45deg); }
.slider.drag .thumb { transform: scale(1.2); }
.slider.drag .tipw { transform: translateX(-50%) translateY(-4px); }
.slider input[type=range] { position: absolute; left: -8px; right: -8px; top: 22px; height: 36px; width: calc(100% + 16px); margin: 0; opacity: 0; cursor: pointer; touch-action: pan-y; z-index: 5; }
.slider input[type=range]:focus-visible ~ .track .thumb { box-shadow: inset 0 0 0 2px var(--slider-fill), 0 0 0 4px var(--accent-a35); }
.slider .caps { display: flex; justify-content: space-between; font-size: 14px; line-height: 1.4; color: var(--text-secondary); margin-top: 0; }

/* docked header (frame 21305:34466) + docked pills */
.dock { position: absolute; left: 0; right: 0; top: 106px; z-index: 15; background: var(--bg-page); transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform var(--m-spring), opacity var(--m-base); }
.dock.show { transform: none; opacity: 1; pointer-events: auto; }
.dock .mini { padding: 8px 20px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dock .mini .v { font-weight: var(--weight-medium); font-size: 20px; line-height: 1.2; letter-spacing: -.4px; transition: color 500ms; }
.dock .mini .c { font-size: 12px; color: var(--text-tertiary); }
.dock .pills { padding-bottom: 12px; }
.dock::after { content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px; background: linear-gradient(var(--bg-page), transparent); pointer-events: none; }
.model-note { margin: 24px 20px 0; font-size: 12px; color: var(--text-quarternary); line-height: 1.4; text-align: center; }

/* ---------------------------------------------------------------- sheets */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 70; opacity: 0; transition: opacity var(--m-base); }
.scrim.show { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 71; background: var(--sheet-bg); border-radius: 28px 28px 0 0;
  transform: translateY(100%); transition: transform var(--m-push); max-height: 86%; display: flex; flex-direction: column; }
.sheet.show { transform: none; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--grab); margin: 8px auto 4px; flex: 0 0 auto; }
.sheet .sbody { padding: 12px 20px 48px; overflow-y: auto; }
.sheet .sbody > * + * { margin-top: 16px; }
.detail-val { display: flex; align-items: baseline; gap: 8px; }
.detail-val .big { font-weight: var(--weight-medium); font-size: 36px; line-height: 1.2; }
.rangebar { position: relative; height: 8px; border-radius: 4px; background: var(--slider-track); margin: 24px 0 8px; }
.rangebar .seg { position: absolute; top: 0; height: 8px; border-radius: 4px; }
.rangebar .you { position: absolute; top: -6px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--slider-thumb); box-shadow: inset 0 0 0 3px var(--text-primary); }
.rangebar .you::after { content: attr(data-l); position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.sheet-actions { display: flex; gap: 12px; }
/* v5 — Genomics .btn--secondary */
.btn-ghost { height: 48px; border-radius: var(--r-full); background: var(--button-secondary); color: var(--text-primary); backdrop-filter: blur(var(--blur-30)); -webkit-backdrop-filter: blur(var(--blur-30)); padding: 0 var(--sp-l); font-weight: var(--weight-medium); font-size: 14px; line-height: 1.2; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ghost .ic { width: 18px; height: 18px; color: var(--link); }
.sheet-actions .btn-primary { flex: 1; }

/* ---------------------------------------------------------------- chat */
.chat { position: absolute; inset: 0; z-index: 80; background: var(--bg-page); display: flex; flex-direction: column; transform: translateY(100%); transition: transform var(--m-push); }
.chat.show { transform: none; }
.chat .appbar .ai-title { display: flex; gap: 6px; align-items: center; justify-content: center; }
.chat .appbar .ai-title .ic { width: 16px; height: 16px; color: var(--link); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.msg { max-width: 86%; font-size: 14px; line-height: 1.45; animation: msgIn 260ms var(--ease-out) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.user { align-self: flex-end; background: var(--ai-bubble-user); color: var(--ai-bubble-user-ink); padding: 10px 14px; border-radius: 18px 18px 4px 18px; }
.msg.ai { align-self: flex-start; display: flex; gap: 10px; }
.msg.ai .av { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--ai-input-bg); display: grid; place-items: center; }
.msg.ai .av .ic { width: 16px; height: 16px; color: var(--link); }
.msg.ai .bub { color: var(--text-primary); }
.msg.ai .bub p { margin: 0 0 8px; } .msg.ai .bub p:last-child { margin: 0; }
.msg.ai .bub ul { margin: 0 0 8px; padding-left: 18px; } .msg.ai .bub li + li { margin-top: 4px; }
.msg.ai .bub .disc { color: var(--text-quarternary); font-size: 12px; margin-top: 8px; }
.msg.ai .bub .cta { margin-top: 10px; }
.typing { display: inline-flex; gap: 4px; padding: 10px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); animation: blink 1.1s infinite both; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%,80%,100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: var(--r-full); border: 1px solid var(--accent-a40); color: var(--text-primary); font-size: 14px; white-space: nowrap; transition: background var(--m-fast), transform var(--m-fast); animation: msgIn 260ms var(--ease-out) both; }
.chip:active { transform: scale(.96); background: var(--accent-a12); }
.composer { flex: 0 0 auto; background: var(--ai-input-bg); padding: 12px 16px 40px; display: flex; gap: 10px; align-items: center; }
.composer input { flex: 1; height: 44px; border-radius: var(--r-full); border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-primary); /* v5 — DLS input tokens (v4 used dark-only values) */ padding: 0 16px; font: inherit; font-size: 14px; outline: none; }
.composer input:focus { border-color: var(--input-border-active); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; background: var(--btn-primary-bg); color: var(--button-text-active); display: grid; place-items: center; font-size: 18px; font-weight: var(--weight-medium); }
.ctx-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-secondary); background: var(--card-bg); border-radius: var(--r-full); padding: 4px 10px; align-self: center; }

/* ---------------------------------------------------------------- toast */
.toast { position: absolute; left: 50%; bottom: 56px; transform: translate(-50%, 20px); background: var(--bg-tertiary); color: var(--static-white); font-size: 13px; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: opacity var(--m-base), transform var(--m-base); z-index: 90; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- review panel (outside the device — not UI) */
.panel { width: 420px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--panel-bg); border: 1px solid var(--panel-line); border-radius: 16px;
  padding: 20px; font-size: 13px; color: var(--panel-ink); scrollbar-width: thin; }
.panel h2 { font-size: 15px; color: var(--panel-ink-strong); margin: 0 0 4px; font-weight: var(--weight-medium); }
.panel h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-muted); margin: 20px 0 8px; font-weight: var(--weight-medium); }
.panel .warn { background: var(--panel-warn-bg); border: 1px solid var(--panel-warn-line); color: var(--panel-warn-ink); border-radius: 10px; padding: 10px 12px; line-height: 1.45; }
.panel .seg2 { display: flex; background: var(--panel-ctrl); border-radius: 10px; padding: 3px; gap: 3px; }
.panel .seg2 button { flex: 1; padding: 7px 6px; border-radius: 8px; color: var(--panel-ctrl-ink); font-size: 12.5px; transition: background var(--m-fast), color var(--m-fast); }
.panel .seg2 button.on { background: var(--panel-ctrl-on); color: #ffffff; }
.panel .jump { display: flex; flex-wrap: wrap; gap: 6px; }
.panel .jump button { padding: 6px 10px; border-radius: 8px; background: var(--panel-ctrl); color: var(--panel-ink); font-size: 12px; }
.panel .jump button:hover { background: var(--panel-row); }
.panel .ha { display: flex; gap: 16px; align-items: baseline; }
.panel .ha b { font-size: 26px; color: var(--panel-ink-strong); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.panel #pl-ins th { text-align: start; }
.panel table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.panel td, .panel th { padding: 5px 4px; border-bottom: 1px solid var(--panel-row); text-align: right; }
.panel th { color: var(--panel-muted); font-weight: var(--weight-book); }
.panel td:first-child, .panel th:first-child { text-align: left; }
.panel td.pos { color: var(--panel-pos); } .panel td.neg { color: var(--panel-neg); }
.panel input[type=number] { width: 58px; background: var(--panel-ctrl); border: 1px solid var(--panel-line); color: var(--panel-ink-strong); border-radius: 6px; padding: 3px 5px; font: inherit; font-size: 12px; text-align: right; }
.panel .row { display: flex; gap: 10px; align-items: center; margin: 6px 0; }
.panel .btnp { padding: 7px 12px; border-radius: 8px; background: var(--panel-ctrl); color: var(--panel-ink-strong); font-size: 12px; }
.panel .btnp:hover { background: var(--panel-row); }
.panel .muted { color: var(--panel-muted); line-height: 1.5; }
.panel .bar { height: 6px; border-radius: 3px; background: var(--panel-pos); display: inline-block; vertical-align: middle; }
.panel .bar.neg { background: var(--panel-neg); }


/* Static dark surfaces (image overlays, banners): text stays white in either theme */
.article .cb, .explore, .promo { --text-primary: #ffffff; --text-secondary: #d0d0d1; --text-tertiary: #c9c9cf; --text-quarternary: #a0a0a4; color: var(--text-primary); }

/* ===================================================================== v3 — Actionable Insights (8 Oct 2026)
   Cards keep the Figma insight card (title + description). The detail screen is PROPOSED (no Figma frame):
   built only from tokens and components already in this file. */
.ins-btn { text-align: start; color: inherit; display: block; transition: transform var(--m-fast), border-color var(--m-base); }
.ins-btn:active { transform: scale(.98); }
.ins-btn .h5 { margin-bottom: 2px; }
.ins-btn .d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ins-new { animation: insNew 520ms cubic-bezier(.2,0,0,1) both; border-color: var(--slider-fill); }
@keyframes insNew { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.sim-ins { padding-top: 24px; padding-bottom: 8px; }
.sim-ins .sec-title { margin-bottom: 12px; }
@keyframes insPulse { 50% { opacity: .3; } }

.h3 { font-weight: var(--weight-medium); font-size: 24px; line-height: 1.2; letter-spacing: -.48px; margin: 0; }
.ins-hero { position: relative; overflow: hidden; border-radius: var(--r-card-l); padding: 20px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--card-stroke); background: var(--card-bg); }
.ins-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background: radial-gradient(120% 90% at 100% 0%, var(--ih-glow) 0%, transparent 60%); }
.ins-hero > * { position: relative; }
.ins-hero.act  { --ih-glow: rgba(250,201,65,.28); --ih-ink: var(--tag-warn-text); } /* orb amber glow; tag-warn ink for AA */
.ins-hero.care { --ih-glow: var(--accent-a20); --ih-ink: var(--link); } /* v4: calm teal — copy rules: never alarming */
.ins-hero.pos  { --ih-glow: rgba(21,193,143,.28); --ih-ink: var(--tag-success-text); } /* orb green */
.ih-top { display: flex; align-items: center; gap: 8px; }
.ih-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-page); color: var(--ih-ink); box-shadow: 0 0 0 1px var(--card-stroke); }
.ih-ic .ic { width: 18px; height: 18px; }
.ih-cat { font-size: 12px; line-height: 1.4; color: var(--ih-ink); font-weight: var(--weight-medium); }
.ih-sim { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); }
.ih-sim .ic { width: 14px; height: 14px; color: var(--link); }
.ins-gain { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--r-card-s); background: var(--tag-success-bg); }
.ins-gain .g-num { font-size: 32px; line-height: 1; font-weight: var(--weight-medium); color: var(--tag-success-text); white-space: nowrap; letter-spacing: -.64px; }
.ins-gain .g-num span { font-size: 14px; letter-spacing: 0; }
.ins-gain b { font-weight: var(--weight-medium); color: var(--text-primary); }
.ins-why { padding: 4px 16px; }
.iw-row { display: block; width: 100%; text-align: start; padding: 14px 0; color: inherit; }
.iw-row + .iw-row { border-top: 1px solid var(--card-stroke); }
.iw-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.iw-val { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.iw-val .num { font-size: 16px; font-weight: var(--weight-medium); }
.rangebar.mini { height: 6px; margin: 12px 0 4px; }
.rangebar.mini .seg { height: 6px; }
.rangebar.mini .you { top: -4px; width: 14px; height: 14px; margin-left: -7px; box-shadow: inset 0 0 0 2.5px var(--text-primary); }
.ins-acts { display: flex; flex-direction: column; gap: 12px; }
.ins-act { display: flex; gap: 12px; padding: 16px; border-radius: var(--r-card-s); border: 1px solid var(--card-stroke); background: var(--card-bg); }
.ia-n { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pill-bg-on); color: var(--pill-text-on); font-size: 14px; font-weight: var(--weight-medium); }
.ia-b { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ia-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-s { font-size: 12px; line-height: 1.4; padding: 2px 8px; border-radius: var(--r-full); background: var(--pill-bg); color: var(--text-secondary); }
.chip-s.when { background: var(--ai-input-bg); color: var(--link); }
:root[data-theme="dark"] .chip-s.when { background: var(--accent-a12); }
.ia-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-full); border: 1px solid var(--link); color: var(--link); font-size: 13px; font-weight: var(--weight-medium); transition: background var(--m-base), color var(--m-base); }
.ia-add .ic { width: 14px; height: 14px; }
.ia-add.on { background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); color: var(--button-text-active); }
.ins-care { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-card-s); background: var(--tag-error-bg); }
.ins-care > div { flex: 1; }
.btn-primary.sm { height: 36px; font-size: 14px; padding: 0 18px; }
.ins-disc { text-align: center; padding: 8px 20px 32px; }
.ins-detail .explore { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .ins-new { animation: none; } }

/* v4 — closing line / payoff (revised-copy sheet) */
.ins-close { position: relative; padding: 4px 0 4px 16px; }
.ins-close::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; border-radius: 2px; background: var(--slider-fill); }
.ins-close.pos::before { background: var(--tag-success-text); }
.ins-close p { margin: 0; font-size: 16px; line-height: 1.45; font-weight: var(--weight-medium); color: var(--text-primary); letter-spacing: -.2px; }
.ins-hero .h3 { font-size: 22px; letter-spacing: -.44px; }

/* v6.6 (13 Oct 2026, Mihir) — back to a real phone: iPhone 17 Pro, 402 × 874 pt screen, 11 px bezel (424 × 896),
   Dynamic Island. The 9:16 shapes stay available in the configurator (Phone shape), now 402 wide.
   Stage behind the phone: Mihir's gradient. */
/* v6.9 (Mihir): gradient inverted — lighter blue at the centre, dark navy at the edges (was #000428 → #004E92) */
body { background: #000428; background: radial-gradient(circle at center, #004E92 0%, #000428 100%); background-attachment: fixed; }
.island { position: absolute; left: 50%; top: 11px; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; z-index: 70; pointer-events: none; }
body[data-ff="phone"] .island { display: none; }
html[data-aspect="916"] { --dev-h: 731.778px; --dev-oh: 753.778px; }   /* 424 × 753.78 = 9:16 */
html[data-aspect="916"][data-bezel="0"] { --dev-bz: 0px; --dev-ow: 402px; --dev-h: 714.667px; --dev-oh: 714.667px; }
html[data-bezel="0"] .device-col::before { display: none; }
html[data-bezel="0"] .device { border-radius: 0; clip-path: none; }
