/* HELIUM UI V1.7.1 — shared art direction and functional QA fixes */
:root{
 --he-base-font:16px;
 --he-health-ink:var(--he-p-102444);
 --he-quiet:var(--he-p-3E5C68);
 --he-canvas:var(--he-p-BCD7E6);
 --he-dialog-duration:250ms;
 --he-mist-opacity:.83;
}
html{font-size:16px}
body{font-size:var(--he-base-font);line-height:1.52}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select,button){font-family:var(--sa-font,var(--helium-font-family,system-ui,sans-serif))}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea){font-size:16px!important;line-height:1.45;color:var(--he-p-102647)!important;background:var(--he-p-F2F7F8)!important;caret-color:var(--he-p-072E6A)!important}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea):is(:hover,:focus,:focus-visible){background:var(--he-p-FFFFFF)!important;color:var(--he-p-0E203B)!important;border-color:transparent!important;outline:none!important;box-shadow:inset 0 0 0 1.5px var(--he-p-193C7061)!important}
body :is(input,textarea)::placeholder{color:var(--he-p-58677D)!important;opacity:1!important}
body :is(.health-main,.finance-main,.screen.desktop-page,.portal .content>main,.hm-main>main){background-color:var(--he-canvas)!important}
/* Sidebars never expose system scrollbars, but remain wheel/keyboard scrollable. */
body :is(.health-aside,.rail,.sidebar,.finance-aside,.side-nav){scrollbar-width:none!important;-ms-overflow-style:none!important;overscroll-behavior:contain}
body :is(.health-aside,.rail,.sidebar,.finance-aside,.side-nav)::-webkit-scrollbar{display:none!important;width:0!important}
/* No card lift; quiet sidebar state changes use colour rather than displacement. */
body.health-page .category-item,
body .rail a{transition:background-color 200ms ease,color 200ms ease,opacity 200ms ease!important;transform:none!important}
body.health-page .category-item:hover,body.health-page .category-item:focus-visible{background:var(--he-p-D9E0EB)!important;color:var(--he-p-132D54)!important;transform:none!important;box-shadow:none!important}
body.health-page .category-item.selected{background:var(--he-p-F9FCFC)!important;color:var(--he-p-11284A)!important;box-shadow:none!important}
body.health-page .category-item :is(span,small){line-height:1.4!important}
body.health-page :is(.health-logo,.health-aside-tabs,.health-aside,.health-main) {font-family:var(--sa-font,var(--helium-font-family,system-ui,sans-serif))}
body.health-page .category-item span{font-size:clamp(14px,.35vw + 12px,16px)!important;color:var(--he-p-122646)!important}
body.health-page .health-logo{font-size:17px!important;font-weight:650!important;letter-spacing:-.025em!important;color:var(--he-p-102444)!important}
body.health-page :is(.section-head p,.health-footer,.result-main small,.health-action-card small){font-size:clamp(13px,.3vw + 11px,15px)!important;color:var(--he-p-4E6772)!important;line-height:1.5!important}
body.health-page .bio-overline{font-size:15px!important;font-weight:500!important}
/* Harmonious, soft multi-source light. Illumination stays inside card. */
body.health-page .biomarker-green{background:
 radial-gradient(ellipse at 4% 0%,var(--he-p-F4DCC0E0),transparent 54%),
 radial-gradient(ellipse at 95% 90%,var(--he-p-7AA0D1D4),transparent 55%),
 radial-gradient(ellipse at 52% 50%,var(--he-p-B9D5ED85),transparent 65%),
 linear-gradient(135deg,var(--he-p-C8D7E4),var(--he-p-A0B5D0) 53%,var(--he-p-B8CAE0))!important}
body.health-page .biomarker-orange{background:
 radial-gradient(ellipse at 4% 3%,var(--he-p-C1D2EAF2),transparent 53%),
 radial-gradient(ellipse at 90% 85%,var(--he-p-EDA3A6A6),transparent 56%),
 radial-gradient(ellipse at 53% 36%,var(--he-p-FAE0B0A8),transparent 68%),
 linear-gradient(135deg,var(--he-p-C4D2E6),var(--he-p-F3C8AD) 72%,var(--he-p-E9BDB7))!important}
body.health-page .biomarker-gradient:hover{filter:saturate(1.055) brightness(1.015)!important;transform:none!important}
/* Mobile chrome stays visible but never covers the form or chat. */
body .phone-nav{box-sizing:border-box!important;max-width:100%;border:0!important;outline:0!important;isolation:auto;overflow:visible;box-shadow:0 10px 29px -25px var(--he-p-00223047)!important}
body .phone-nav button{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;min-width:0!important;white-space:nowrap}
body .phone-nav :is(svg,i){flex:0 0 auto}
body .helium-assistant .phone-nav{grid-row:4!important;position:relative!important;inset:auto!important;margin:0!important;border:none!important;padding:5px!important;min-height:68px!important;z-index:1}
body .helium-assistant .ha-bottom{grid-row:3!important;min-width:0!important}
body .helium-assistant .ha-conversation{grid-row:2!important;min-height:0!important}
body .helium-assistant .ha-form{border:0!important;outline:none!important;box-shadow:none!important}
body .helium-assistant .ha-form textarea{background:transparent!important;box-shadow:none!important;border:0!important;color:var(--he-p-102444)!important}
body .helium-assistant .ha-form textarea:is(:hover,:focus-visible){background:transparent!important;box-shadow:none!important;border:0!important}
/* Dialog scrim and panel use the SAME transition cycle in both directions. */
body .modal-backdrop.he-dialog-animated{display:grid!important;opacity:0;visibility:visible;pointer-events:none;backdrop-filter:blur(0px)!important;-webkit-backdrop-filter:blur(0px)!important;
 transition:opacity var(--he-dialog-duration) ease,backdrop-filter var(--he-dialog-duration) ease,-webkit-backdrop-filter var(--he-dialog-duration) ease!important}
body .modal-backdrop.he-dialog-animated.he-dialog-visible{opacity:1;pointer-events:auto;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}
body .modal-backdrop.he-dialog-animated :is(.dialog,.modal-inner){opacity:0;transform:translateY(12px) scale(.985);transition:opacity var(--he-dialog-duration) cubic-bezier(.2,.7,.2,1),transform var(--he-dialog-duration) cubic-bezier(.2,.7,.2,1)!important}
body .modal-backdrop.he-dialog-animated.he-dialog-visible :is(.dialog,.modal-inner){opacity:1;transform:translateY(0) scale(1)}
body .modal-backdrop[hidden]{display:none!important}
body .modal-backdrop :is(.dialog,.modal-inner){max-height:min(88dvh,850px);overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain}
/* Ensure floating overlays are never clipped by component card masks. */
body .he-floating-popover{position:fixed!important;z-index:2147482400!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;box-shadow:0 20px 48px -32px var(--he-p-0A182D4C)!important}
body .he-floating-popover[hidden]{display:none!important}
/* Support full-size icons with coherent inline text alignment. */
body button :is(svg,i){vertical-align:middle}



/* Performance: isolate distant showcase cards without freezing live overlays. */
body .demo-panel,body .material-card{contain:layout style;will-change:auto}
@media (hover:none){body .biomarker-gradient:hover{filter:none!important}}
@media (max-width:720px){body .health-main{padding:24px 18px!important}body .phone-inner{min-height:0}}
@media (prefers-reduced-motion:reduce){:root{--he-dialog-duration:0ms}body .modal-backdrop.he-dialog-animated,body .modal-backdrop.he-dialog-animated :is(.dialog,.modal-inner){transition:none!important}body .biomarker-gradient:hover{filter:none!important}}
/* V1.7.1 QA follow-through: keep regular phone navigation in view while content scrolls. */
@media(max-width:780px){
 body .mobile-stage:has(.phone-inner:not(.helium-assistant)){height:calc(100dvh - 65px)!important;min-height:0!important;padding:0!important;overflow:hidden!important}
 body .phone-shell:has(.phone-inner:not(.helium-assistant)){height:100%!important;max-height:100%!important;overflow:hidden!important;min-height:0!important}
 body .phone-inner:not(.helium-assistant){height:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;padding-bottom:max(18px,env(safe-area-inset-bottom))!important;scrollbar-width:none!important}
 body .phone-inner:not(.helium-assistant)::-webkit-scrollbar{display:none!important}
 body .phone-inner:not(.helium-assistant) .phone-nav{position:sticky!important;bottom:max(8px,env(safe-area-inset-bottom))!important;left:auto!important;right:auto!important;width:100%!important;margin:16px 0 0!important;z-index:20!important}
}
/* Allow Rare UI disclosures to escape white showcase cards; the disclosure itself is body-portalled. */
body .he-rare-card,body .ru-card{overflow:visible!important}
body .ru-notifications.he-floating-popover{background:var(--he-p-FCFEFFFA)!important;border:0!important;max-height:min(65dvh,390px)!important;padding:16px!important;overflow-y:auto!important}
/* Unify input and composer surfaces without a second rectangular inset. */
body .helium-assistant :is(.ha-form,.ha-form textarea,.ha-form textarea:hover,.ha-form textarea:focus-visible){box-shadow:none!important;outline:none!important}
body .helium-assistant .ha-form textarea{appearance:none!important;display:block!important;box-sizing:border-box!important;padding:10px 0!important;background:transparent!important;border:0!important}
/* Wallet and challenge: use actual layout rows instead of sticky nav overlay. */
body .phone-shell.he-phone-split{display:grid!important;grid-template-rows:minmax(0,1fr) auto!important;overflow:hidden!important;align-content:stretch!important}
body .phone-shell.he-phone-split>.phone-inner{grid-row:1!important;height:auto!important;min-height:0!important;max-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important;overscroll-behavior:contain!important;padding-bottom:20px!important}
body .phone-shell.he-phone-split>.phone-inner::-webkit-scrollbar{display:none!important}
body .phone-shell.he-phone-split>.phone-nav{grid-row:2!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;position:relative!important;inset:auto!important;left:auto!important;right:auto!important;bottom:auto!important;width:auto!important;margin:0 14px max(12px,env(safe-area-inset-bottom))!important;min-height:68px!important;z-index:5!important;background:var(--he-p-F9FCFCF0)!important;border:0!important;box-shadow:0 8px 26px -20px var(--he-p-00223033)!important}
@media(max-width:780px){body .phone-shell.he-phone-split{height:100%!important}body .phone-shell.he-phone-split>.phone-nav{margin:0 12px max(9px,env(safe-area-inset-bottom))!important}}
