:root{color-scheme:light;--soft:#e9f2e9}
:root[data-theme=night]{color-scheme:dark;--canvas:#101a18;--paper:#1b2925;--ink:#edf4ed;--muted:#c1d2c7;--line:#40594b;--control-line:#60836a;--green:#a8dfaf;--soft:#243b2e;--coral:#a8dfaf;--coral-dark:#a8dfaf;--feature:#1b2925;--feature-ink:#edf4ed;--feature-muted:#c1d2c7;--action:#a8dfaf;--action-ink:#13251a;--strip:#243b2e;--strip-ink:#edf4ed}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:7px 10px;border:1px solid #b6c4b9;border-radius:8px;background:#f5f8f3;color:#205f46;font:700 12px Inter,sans-serif;cursor:pointer;white-space:nowrap}.theme-toggle span:first-child{font-size:19px;line-height:1}
@media(max-width:480px){.theme-toggle{width:40px;padding:4px}.theme-toggle span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
html[data-theme=night],html[data-theme=night] body{background:#101a18;color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner){--canvas:#101a18;--paper:#1b2925;--ink:#edf4ed;--muted:#c1d2c7;--line:#40594b;--control-line:#60836a;--green:#a8dfaf;--soft:#243b2e;--coral:#a8dfaf;--coral-dark:#a8dfaf;background:#101a18;color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.app-header,.floating-pill,.card,.form-card,.v3-data-card,.trends-card,.v3-ledger,.v3-visit,.v3-appointment,.v3-checklist,.records-lab-card,.labs-v3__status,.labs-v3__analyte,.labs-v3__older,.cc-card,.trends-share-preview){background:#1b2925;color:#edf4ed;border-color:#40594b}
html[data-theme=night] .app-frame:has(.demo-banner) .demo-banner{background:#23382b;color:#d1e8d4;border-color:#40594b}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.viewing-switch,.tour-launch,.theme-toggle,.language-toggle button,.trends-period button){background:#243b2e;color:#d8efdc;border-color:#60836a}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.v3-return,.v3-journey-entry,.inline-status,.trends-empty,.labs-v3__empty,.records-empty){background:#243b2e;color:#d8efdc;border-color:#40594b}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.page-heading h1,.v3-today h1,.v3-reading,.v3-journey-entry h2,.trends-heading h1,.trends-reading strong,.labs-v3__title,.labs-v3__latest,.cc-title,.cc-card-title,.v3-visit strong,.trends-card h2){color:#edf4ed!important}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.page-heading p,.v3-verdict,.v3-ledger-row strong,.v3-journey-entry>span,.trends-heading p,.trends-note,.trends-card-head p,.labs-v3__note,.labs-v3__change,.labs-v3__band-label,.labs-v3__spark-dates,.labs-v3__latest span,.cc-subtitle,.cc-card-desc,.cc-row p){color:#c1d2c7!important}
html[data-theme=night] .app-frame:has(.demo-banner) .floating-pill a:not(.pill-sos){color:#c1d2c7}
html[data-theme=night] .app-frame:has(.demo-banner) .floating-pill a[aria-current=page]{background:#31533a;color:#e4f9e8}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey-status,.v3-visit-status){background:#31533a;color:#e4f9e8}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey-time-item.current .journey-status,.journey-filter[aria-pressed=true]){background:#a8dfaf;color:#13251a}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.labs-v3,.care-v3,.trends-screen){background:transparent;color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner) .care-v3{--cc-ink:#edf4ed;--cc-secondary:#c1d2c7;--cc-accent:#a8dfaf;--cc-rule:#40594b;--cc-card:#1b2925;--cc-page:#101a18}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.labs-v3__step,.labs-v3__status-heading,.labs-v3__analyte h2,.cc-row strong){color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner) .labs-v3__step.is-later{color:#c1d2c7}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.labs-v3__band,.trends-bp-svg .trends-band,.trends-glucose-svg .trends-band,.v3-chart-band){fill:#385943;fill-opacity:1}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-legend-band){background:#385943}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.labs-v3__spark-svg polyline,.labs-v3__spark-svg circle){stroke:#b8e3bc;fill:#b8e3bc}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-card svg text,.v3-week-chart text){fill:#cde2d0}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.v3-chart-point,.trends-point){fill:#b8e3bc;stroke:#1b2925}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey,.journey-timeline-card,.journey-suggestion,.journey-provider-section,.journey-cover,.journey-note,.journey-provider,.journey-record-grid a){color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner) .journey-room{background:#0c1714;border:1px solid #40594b}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey-time-item.current .journey-time-body,.journey-action){background:#243b2e}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey-provider button,.journey-filter,.journey-cover button,.journey-note button){background:#243b2e;color:#d8efdc;border-color:#60836a}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey-source,.journey-disclaimer,.journey-safety,.journey-lead,.journey-time-body p,.journey-time-body small,.journey-time-top time,.journey-provider p,.journey-cover p:not(.journey-eyebrow),.journey-note p){color:#c1d2c7}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey-next,.journey-record-grid a,.journey-eyebrow,.journey-kicker){color:#a8dfaf}
html[data-theme=night] .app-frame:has(.demo-banner) .journey-time-item.current .journey-status{color:#13251a}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.cc-toggle,.labs-v3__older summary){color:#a8dfaf}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.journey a,.labs-v3__explainer summary,.cc-row button):focus-visible{outline:3px solid #d3f2d4;outline-offset:2px}
@media(prefers-reduced-motion:reduce){html[data-theme=night] *,html[data-theme=day] *{animation:none!important;transition:none!important}}
.labs-v3__marker-head{display:flex;align-items:start;justify-content:space-between;gap:8px}.labs-v3__marker-chip{background:var(--soft,#e9f2e9);color:var(--green,#205f46);padding:5px 8px;border-radius:5px;font-size:11px;font-weight:700}.labs-v3__explainer{margin-top:14px;border-top:1px solid var(--line,#d8dfd7);padding-top:12px;font-size:12px}.labs-v3__explainer summary{color:var(--green,#205f46);cursor:pointer;font-weight:700}.labs-v3__explainer p{color:var(--muted,#52615a);line-height:1.5}
.brand-night{display:none}.brand-night b{color:#fb706b;font-weight:400}
html[data-theme=night] .brand-lockup img{display:none}
html[data-theme=night] .brand-lockup .brand-night{display:inline;font:400 27px/1 Inter,sans-serif;letter-spacing:-.08em;color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.v3-data-card p,.v3-ritual,.v3-ledger small,.v3-visit p,.v3-replay,.v3-crisis-demo,.v3-today .v3-demo-scenario,.v3-today .v3-reading span,.v3-checklist,.v3-journey-entry a,.v3-journey-entry p,.v3-bp-link-label){color:#c1d2c7!important}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.v3-journey-entry a,.v3-bp-link-label){color:#a8dfaf!important}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.v3-ledger-row,.v3-checklist,.v3-ritual){border-color:#40594b}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-journey-entry{background:#243b2e}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-visit-label{color:#a8dfaf}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-visit-status{background:#31533a;color:#e4f9e8}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-reading span{color:#c1d2c7!important}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-legend,.trends-glucose-count,.trends-reading-time,.trends-reading small,.trends-card p,.labs-v3__analyte p,.labs-v3__older-row,.cc-consent,.cc-notshared){color:#c1d2c7!important}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-legend-dot,.trends-legend-ring){background:#b8e3bc;outline-color:#b8e3bc}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-a1c-svg path){stroke:#b8e3bc}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-a1c-svg circle){fill:#b8e3bc;stroke:#1b2925}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-a1c-svg .trends-a1c-value){fill:#e4f9e8}
html[data-theme=night] .app-frame:has(.demo-banner) :is(.trends-period button[aria-pressed=true]){background:#a8dfaf;color:#13251a}
.cc-stop{min-height:44px;margin:16px 0 0;padding:9px 14px;border:1px solid #9b4141;border-radius:7px;background:transparent;color:#8a3030;font-weight:700;cursor:pointer}
html[data-theme=night] .cc-stop{border-color:#e6aaaa;color:#ffd1d1}
.v3-origin{margin:24px 0;padding:24px;background:var(--paper,#fffefa);border:1px solid var(--line,#d8dfd7);border-radius:12px}.v3-origin p{margin:0 0 14px;color:var(--green,#205f46);font-size:11px;font-weight:800;letter-spacing:.1em}.v3-origin blockquote{margin:0 0 14px;max-width:35ch;font-size:21px;line-height:1.3;font-weight:600;letter-spacing:-.035em}.v3-origin span{color:var(--muted,#52615a);font-size:13px;line-height:1.5}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-origin{background:#1b2925;border-color:#40594b}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-origin p{color:#a8dfaf}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-origin blockquote{color:#edf4ed}
html[data-theme=night] .app-frame:has(.demo-banner) .v3-origin span{color:#c1d2c7}
/* Lab progress and personal-range exceptions use distinct, readable states. */
.app-frame:has(.demo-banner) .labs-v3__step.is-done .labs-v3__step-dot{background:#246448;border:1px solid #174e37}
.app-frame:has(.demo-banner) .labs-v3__step.is-current .labs-v3__step-dot{background:#fffefa;border:2px solid #246448;box-shadow:0 0 0 3px #d7e8d8}
.app-frame:has(.demo-banner) .labs-v3__step.is-later .labs-v3__step-dot{background:transparent;border:2px solid #87968c}
html[data-theme=night] .app-frame:has(.demo-banner) .labs-v3__step.is-done .labs-v3__step-dot{background:#a8dfaf;border:1px solid #a8dfaf}
html[data-theme=night] .app-frame:has(.demo-banner) .labs-v3__step.is-current .labs-v3__step-dot{background:#1b2925;border:2px solid #a8dfaf;box-shadow:0 0 0 3px #476f52}
html[data-theme=night] .app-frame:has(.demo-banner) .labs-v3__step.is-later .labs-v3__step-dot{background:transparent;border:2px solid #a1b6a5}
.app-frame:has(.demo-banner) .labs-v3__marker-chip.is-outside{background:#f7ecd7;color:#654718;border:1px solid #c9a35f}
html[data-theme=night] .app-frame:has(.demo-banner) .labs-v3__marker-chip.is-outside{background:#514021;color:#ffdfa4;border-color:#ba9659}
.app-frame:has(.demo-banner) .labs-v3__band[data-outside]:not([data-outside=""]){fill:#e5c996;fill-opacity:.55;stroke:#a67c38;stroke-width:1}
html[data-theme=night] .app-frame:has(.demo-banner) .labs-v3__band[data-outside]:not([data-outside=""]){fill:#66512d;fill-opacity:1;stroke:#e7c57e;stroke-width:1}
/* Preserve the always reachable SOS control over open sheets. */
.app-frame:has(.demo-banner) .floating-pill{z-index:80}
/* Keep EN/SW available after the v2 header rules. */
.app-frame:has(.demo-banner) .language-toggle{display:flex}
.app-frame:has(.demo-banner) .language-toggle{display:flex!important}
.app-frame:has(.demo-banner) .floating-pill{z-index:80!important}
.app-frame:has(.demo-banner) .demo-banner{position:sticky!important;top:0;z-index:90}

/* Live and demo screens share the same surface palette. Keep each surface with its text. */
html[data-theme=night] :is(.quick-card,.up-next-button,.sheet-member-row,.member-list,.list-row,.bottom-sheet,.consent-row,.chip,.input,.partner-card){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme=night] :is(.form-card,.card,.records-lab-card,.journey-timeline-card,.journey-suggestion,.journey-provider,.journey-cover,.journey-note){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme=night] :is(.badge-neutral,.badge-soft,.badge-coming,.status-badge,.up-next-avatar,.avatar,.icon-button,.record-summary){background:var(--soft);color:var(--ink)}
html[data-theme=night] :is(.floating-pill a,.up-next-chevron,.quick-card small,.row-copy small){color:var(--muted)}
html[data-theme=night] :is(.feature-card,.feature-card h2){background:var(--feature);color:var(--feature-ink)}
html[data-theme=night] .feature-card p{color:var(--feature-muted)}
html[data-theme=night] .feature-card .button-primary{background:var(--action);color:var(--action-ink)}
html[data-theme=night] :is(input:not([type=checkbox]),textarea,select){background:var(--paper);color:var(--ink);border-color:var(--control-line)}
