/* Appearance layer. Load last. Imaging pixels, palettes and original brand/icon
   geometry are not transformed. Print and forced-color modes remain independent. */
html[data-theme="dark"]{color-scheme:dark;--theme-bg:#0d1114;--theme-surface:#172127;--theme-soft:#202d32;--theme-input:#10171c;--theme-ink:#e5eeeb;--theme-muted:#b8cbc5;--theme-line:#5f7b78;--theme-edge:#91aaa4;--theme-accent:#c7f69e;--theme-accent-bg:#293f2d;--theme-focus:#d3ffae;--theme-error:#ffbdb4;--theme-error-bg:#3c2726;--theme-info:#b9deef;--theme-info-bg:#203842;--theme-warn:#f3d79f;--theme-warn-bg:#3c3424}
html[data-theme="light"]{color-scheme:light;--theme-bg:#edf3f0;--theme-surface:#ffffff;--theme-soft:#e6eeea;--theme-input:#ffffff;--theme-ink:#142c34;--theme-muted:#354b53;--theme-line:#a7bab5;--theme-edge:#627b73;--theme-accent:#285523;--theme-accent-bg:#e1efcf;--theme-focus:#205c39;--theme-error:#9b2929;--theme-error-bg:#fff0ec;--theme-info:#20536b;--theme-info-bg:#e4f1f8;--theme-warn:#795018;--theme-warn-bg:#fff3d9}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;max-width:100%;padding:10px 13px;border:1px solid var(--theme-edge,#708b83);border-radius:9px;background:var(--theme-soft,#e6eeea);color:var(--theme-ink,#183038);font:600 13px/1.45 var(--font-ui);white-space:normal;cursor:pointer}
.theme-toggle svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.65}
.theme-toggle:hover{background:var(--theme-accent-bg,#e1efcf)}
.theme-toggle:focus-visible{outline:3px solid var(--theme-focus,#205c39);outline-offset:3px}
.pt-utility-bar,.entry-appearance{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:22px}
.entry-appearance{position:relative;z-index:2}
.brand-tile{display:grid;place-items:center;min-width:44px;min-height:44px;flex-shrink:0;border-radius:10px;background:linear-gradient(145deg,#34444b,#101b20 72%);box-shadow:inset 0 1px 1px #ffffff45,inset 0 -1px 2px #00000070,0 2px 4px #101b2026}

@media screen{
html[data-theme]{--a11y-text:var(--theme-ink);--a11y-muted:var(--theme-muted);--a11y-control-edge:var(--theme-edge);--a11y-focus:var(--theme-focus);--a11y-input-bg:var(--theme-input);--a11y-placeholder:var(--theme-muted);--a11y-selected-bg:var(--theme-accent-bg);--surface:var(--theme-surface);--line:var(--theme-line);--muted:var(--theme-muted);--accent:var(--theme-accent);background:var(--theme-bg);color:var(--theme-ink)}
html[data-theme] body{background:var(--theme-bg);color:var(--theme-ink)}
html[data-theme] .brand-tile{background:linear-gradient(145deg,#34444b,#101b20 72%)}
.pt-mobile-brand .brand-tile>.brand-mark{width:27px;height:27px;border:5px solid #bbf879}
.pt-mobile-brand .brand-tile>.brand-mark:after{width:12px;height:5px;right:-7px;bottom:-4px;background:#bbf879}
html[data-theme] body :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline-color:var(--theme-focus);box-shadow:0 0 0 1px var(--theme-surface)}
html[data-theme] ::selection{color:#152616;background:#c4ee9a}
html[data-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:var(--theme-input);border-color:var(--theme-edge);color:var(--theme-ink)}
html[data-theme] body :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
html[data-theme] body input:is([type=checkbox],[type=radio],[type=range]){accent-color:var(--theme-accent)}
html[data-theme] body :is(.theme-toggle,.btn.theme-toggle,.pt-button.theme-toggle){color:var(--theme-ink);background:var(--theme-soft);border-color:var(--theme-edge)}
html[data-theme] body :is(.theme-toggle,.btn.theme-toggle,.pt-button.theme-toggle):hover{background:var(--theme-accent-bg)}
html[data-theme] dialog:not(.tq-tour){background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-edge)}
html[data-theme="light"] dialog:not(.tq-tour)::backdrop{background:#152c326e}

/* Workspace, entry, navigation and shared components. */
html[data-theme="light"] :is(.entry-world){background:radial-gradient(ellipse at 48% 57%,#d5e7dd 0,#eaf2ed 55%,#f6faf7 90%);color:var(--theme-ink)}
html[data-theme="light"] :is(.entry-form-side,.rail,.topbar,.panel,.journey,.scan-heading,.scan-toolbar,.scan-bottom,.viewer-footer,.volume-card,.volume-toolbar,.volume-bottom,.research-panel,.research-card,.linked-slice,.coverage-card,.demo-pass-card,.ew-panel,.gq-therapeutics,.gq-result-panel,.gq-therapy-card,.dc-card){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="light"] :is(.brand,.top-brand,.entry-hero h1,.entry-form-side h2,.page-heading h1,.panel-title h3,.study-card-top strong,.scan-heading h2,.content-panel h2,.research-panel h3,.research-card h3,.ew-item-top strong,.ew-detail-title h2,.gq-heading h2,.gq-therapy-card h3,.demo-pass-card h4,.demo-pass-form-heading h3){color:var(--theme-ink)}
html[data-theme="light"] body :is(.muted,.field-note,.label,.eyebrow,.brand small,.boot p,.top-brand>span:last-child,.user-chip small,.entry-local,.entry-step,.entry-foot,.entry-legal,.entry-privacy,.entry-form-side .intro,.entry-hero p,.page-heading p,.panel-title small,.study-card p,.study-card-bottom,.study-bottom,.settings-label,.settings-label span:last-child,.study-facts dt,.study-facts dd,.viewer-footer,.bottom-status,.chart-labels,.metric small,.toggle-row,.modal-description,.empty-state,.locked-view p,.slice-control,.slice-control .mono,.slice-control button,.plane-tab span,.plan-step p,.checklist span small){color:var(--theme-muted)}
html[data-theme="light"] body .workspace :is(.journey-label,.journey-end){color:var(--theme-muted)}
html[data-theme="light"] body :is(.entry-form-side .label,dialog .label,.coordinate-controls label,.research-panel>label,.layer-line label,.brats-source label,.brats-import label){color:var(--theme-ink)}
html[data-theme="light"] body :is(.label,.settings-label,.research-panel>label,.layer-line label,.brats-source label,.brats-import label,.coordinate-controls label){font-weight:600}
html[data-theme="light"] :is(.entry-hero p,.entry-form-side .intro){font-weight:500}
html[data-theme="light"] body :is(.rail-link,.journey-step,.study-search svg,.ew-search svg){color:var(--theme-muted)}
html[data-theme="light"] .study-card-top svg{color:var(--theme-warn)}
html[data-theme="light"] :is(.accent,.entry-hero h1 em,.boot span,.note-card .panel-title svg,.case-banner .icon,.series-card>svg,.metric strong,.welcome-path b,.learn-card .eyebrow,.learn-card button,.research-empty>svg,.legal-link,.third-party-license summary){color:var(--theme-accent)}
html[data-theme="light"] body :is(.btn,.icon-btn,.tool-button,.filter,.window-presets button,.plane-tab,.orientation-buttons button,.research-tabs button,.entry-auth-modes button,.ew-tabs button){color:var(--theme-ink);border-color:var(--theme-edge)}
html[data-theme="light"] :is(.btn:not(.primary):not(.ghost):not(.danger),.window-presets button,.entry-auth-modes,.research-tabs,.ew-tabs,.keys kbd,.shortcut-list kbd,.view-plane-tabs){background:var(--theme-soft);border-color:var(--theme-edge)}
html[data-theme="light"] body :is(.btn,.icon-btn,.tool-button,.filter,.window-presets button,.study-card,.rail-link,.ew-queue-item):hover{background:var(--theme-soft);color:var(--theme-ink)}
html[data-theme="light"] body .btn.primary{background:#bcf881;border-color:#5b7c42;color:#1c2914}
html[data-theme="light"] body .btn.primary:hover{background:#aee768;color:#1c2914}
html[data-theme="light"] body :is(.btn,.filter,.window-presets button):disabled{background:#edf0ee;border-color:#8da39b;color:#53695f;opacity:1}
html[data-theme="light"] :is(.rail-link.active,.study-card.active,.filter.active,.tool-button.active,.orientation-buttons button:is(.active,[aria-pressed=true]),.entry-auth-modes button[aria-pressed=true],.research-tabs button.active,.ew-tabs button[aria-selected=true],.ew-queue-item[aria-pressed=true],.gq-mode-tabs button[aria-pressed=true],.dc-source-choices .btn[aria-pressed=true]){background:var(--theme-accent-bg);border-color:#638449;color:var(--theme-accent)}
html[data-theme="light"] body :is(.rail-link.active,.plane-tab.active,.journey-step.active,.orientation-buttons button:is(.active,[aria-pressed=true])){color:var(--theme-accent)}
html[data-theme="light"] :is(.entry-auth-modes button[aria-pressed=true],.research-tabs button.active,.ew-tabs button[aria-selected=true]){box-shadow:inset 0 0 0 1px var(--theme-edge)}
html[data-theme="light"] :is(.rail-link.active:before,.study-card.active:before,.plane-tab.active:after,.learn-progress div,.readiness-bar div){background:#568438}
html[data-theme="light"] :is(.journey-step .number,.journey-step.complete .number){border-color:#68825e;color:var(--theme-accent)}
html[data-theme="light"] .journey-step.active .number{background:var(--theme-accent-bg);border-color:#638449;color:var(--theme-accent)}
html[data-theme="light"] :is(.divider,.journey-line,.tool-separator,.ew-divider){background:var(--theme-line)}
html[data-theme="light"] :is(.study-facts div,.study-bottom,.viewer-footer,.scan-toolbar,.view-plane-tabs,.scan-bottom,.entry-privacy,.volume-card-head,.volume-toolbar,.volume-bottom,.layer-control,.provenance-row,.linked-slice header,.linked-slice footer,.parameter-notice,.demo-pass-card-actions,.demo-pass-edit,.demo-pass-closed,.demo-pass-revoke-confirm,.coverage-lineage,.coverage-results,.coverage-evidence,.ew-ledger div,.gq-details,.gq-therapy-card details,.dc-readout>div,.dc-security-path){border-color:var(--theme-line)}
html[data-theme="light"] :is(.learn-card,.note-card,.under-viewer,.case-banner,.info-callout,.series-card,.security-tile,.welcome-path div,.file-help,.demo-access-banner,.demo-access-boundary,.demo-pass-secret,.ew-notice,.model-ribbon,.gq-callout,.dc-envelope){background:var(--theme-accent-bg);border-color:#9cb886;color:var(--theme-accent)}
html[data-theme="light"] :is(.learn-card p,.learn-card .learn-count,.note-card p,.note-card .panel-title h3,.under-viewer h3,.under-viewer p,.case-banner small,.series-card small,.security-tile strong,.security-tile small,.security-tile svg,.welcome-path span,.file-help p,.demo-access-banner,.demo-access-banner strong,.demo-access-boundary>svg,.demo-pass-secret p,.demo-pass-secret p b,.demo-pass-secret .label,.demo-pass-secret-heading,.demo-pass-secret #demo-pass-code-help,.ew-notice strong,.ew-notice svg,.model-ribbon small,.model-ribbon svg,.dc-envelope strong){color:var(--theme-accent)}
html[data-theme="light"] :is(.checklist label,.plan-step,.research-checklist label,.evidence-item,.spatial-stat,.ew-readonly,.ew-callout,.dc-message,.gq-boundary,.source-display,.field-metrics div,.simulation-playbar,.viewer-access-tools,.reconstruction-controls,.reconstruction-text-summary,.tissue-legend){background:var(--theme-soft);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="light"] :is(.entry-step span,.avatar,.plan-step .step-no,.demo-access-emblem,.demo-pass-step,.dc-step,.dc-capability-icon,.gq-heading-symbol,.gq-orbit){background:var(--theme-accent-bg);border-color:#9cb886;color:var(--theme-accent)}
html[data-theme="light"] :is(.research-notice,.research-callout,.clinical-gate,.ew-critical){background:var(--theme-warn-bg);border-color:#b69b60;color:var(--theme-warn)}
html[data-theme="light"] :is(.research-notice strong,.research-notice svg,.research-callout strong,.clinical-gate h3,.clinical-gate p,.clinical-gate button:disabled,.ew-critical .ew-note,.ew-danger-hint,.demo-pass-revoke-confirm>p){color:var(--theme-warn)}
html[data-theme="light"] :is(.therapy-info,.simulation-state){background:var(--theme-info-bg);border-color:#88b0c3;color:var(--theme-info)}
html[data-theme="light"] :is(.therapy-info strong,.therapy-info svg){color:var(--theme-info)}
html[data-theme="light"] body :is(.form-error,.dc-card .form-error){color:var(--theme-error)}
html[data-theme="light"] :is(.btn.danger,.demo-pass-revoke){color:var(--theme-error);border-color:#b5786d}
html[data-theme="light"] .ew-error{color:var(--theme-error);background:var(--theme-error-bg);border-color:#b5786d}
html[data-theme="light"] :is(.toast,.session-notice){background:#e4f0d8;border-color:#76965b;color:#234924}
html[data-theme="light"] :is(th,td,.diagnosis-table th,.diagnosis-table td){color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme="light"] body :is(th,td small,.diagnosis-table td small){color:var(--theme-muted)}
html[data-theme="light"] :is(.product-notice-body,.product-notice-body h3,.product-notice-body .legal-copyright,.third-party-license pre,.product-footer .product-copyright){color:var(--theme-muted)}
/* A control boundary uses the stronger edge token; the lighter line token is
   reserved for separators and noninteractive panel frames. */
html[data-theme="light"] :is(.reconstruction-control-group,.coordinate-controls fieldset,.pt-button.secondary,.pt-button.quiet,.pt-icon-button,.pt-feelings button,.pt-auth-modes){border-color:var(--theme-edge)}
html[data-theme="light"] body input[type=file]::file-selector-button{background:var(--theme-soft);color:var(--theme-ink);border:1px solid var(--theme-edge);border-radius:5px;padding:7px 10px;margin-inline-end:10px;font:inherit;cursor:pointer}
html[data-theme="light"] body input[type=file]::file-selector-button:hover{background:var(--theme-accent-bg)}

/* Status colors have their own readable foregrounds; they remain meaningful. */
html[data-theme="light"] :is(.tag,.pill,.ew-status,.demo-pass-status,.demo-pass-approved span){color:#405d68;border-color:#96adb3;background:#eaf0f3}
html[data-theme="light"] :is(.tag.green,.ew-status.reported,.ew-status.approved,.ew-status.paid,.demo-pass-status.active,.gq-badge){color:#2f5425;background:#e2f0d2;border-color:#8bac72}
html[data-theme="light"] :is(.tag.orange,.ew-status.urgent,.ew-status.denied,.demo-pass-status.expired,.gq-badge.selected-indication){color:#795018;background:#fff1d5;border-color:#b59763}
html[data-theme="light"] :is(.tag.blue,.ew-status.in_review,.ew-status.submitted,.gq-badge.supportive){color:#20536b;background:#e1f1f7;border-color:#8aafbc}
html[data-theme="light"] :is(.ew-status.critical,.gq-result.conflict .gq-badge){color:#962929;background:#fff0ed;border-color:#be8b81}
html[data-theme="light"] .gq-badge.investigational{color:#594182;background:#eee5fb;border-color:#a594be}
html[data-theme="light"] :is(.ew-status.draft,.demo-pass-status.revoked){color:#4e6069;background:#e9edef;border-color:#9caeb5}

/* Enterprise and administrative workflows. */
html[data-theme="light"] .enterprise-workspace{--ew-border:var(--theme-line);--ew-muted:var(--theme-muted);--ew-panel:var(--theme-surface)}
html[data-theme="light"] :is(.ew-metric,.demo-pass-create,.demo-pass-section,.demo-pass-empty,.coverage-card){background:var(--theme-surface);border-color:var(--theme-line)}
html[data-theme="light"] .demo-pass-section:has(input:checked){background:var(--theme-accent-bg);border-color:#7c9b62}
html[data-theme="light"] :is(.ew-field,.ew-check,.ew-ledger dd,.ew-timeline li>strong,.demo-pass-section strong,.demo-pass-permissions legend,.demo-pass-empty strong){color:var(--theme-ink)}
html[data-theme="light"] :is(.ew-item-top small,.ew-item-subject,.ew-item-bottom span:last-child,.ew-field small,.ew-money-wrap span,.ew-check small,.ew-ledger dt,.ew-timeline li,.ew-timeline small,.ew-count,.ew-empty,.ew-loading,.ew-footer,.demo-pass-section small,.demo-pass-section-icon,.demo-pass-dates dt,.demo-pass-dates dd,.demo-pass-form-heading p,.demo-pass-list-heading p,.demo-pass-card-heading p,.demo-pass-permissions legend>span,.demo-access-footer,.demo-pass-closed,.demo-pass-empty p,.coverage-card p,.coverage-lineage p,.coverage-toolbar label,.coverage-evidence small,.coverage-evidence span){color:var(--theme-muted)}
html[data-theme="light"] :is(.ew-metric small,.ew-save-state,.ew-callout strong,.ew-empty svg,.demo-access-heading .eyebrow,.demo-pass-section:has(input:checked) .demo-pass-section-icon,.coverage-card small,.coverage-lineage summary){color:var(--theme-accent)}
html[data-theme="light"] .ew-step{background:#a4b8b6}html[data-theme="light"] .ew-step.done{background:#587d3c}
html[data-theme="light"] .coverage-results{scrollbar-color:#7c9790 #edf3ef}

/* Glioma evidence, therapy, reconstruction controls and device workflows. */
html[data-theme="light"] :is(.gq-workspace,.gq-example label,.gq-filters label,.gq-field label,.gq-molecular strong,.dc-card label,.dc-readout dd,.dc-policy legend,.dc-next strong){color:var(--theme-ink)}
html[data-theme="light"] :is(.gq-heading p,.gq-field small,.gq-origin,.gq-note,.gq-result-panel p,.gq-result-panel li,.gq-topic-count,.gq-therapy-card p,.gq-therapy-card small,.volume-card-head p,.volume-toolbar .tools-hint,.volume-bottom,.volume-bottom strong,.volume-bottom .point-coordinates,.layer-volume,.layer-opacity output,.research-panel .compact-note,.research-panel .control-label,.research-panel .control-label output,.spatial-stat small,.provenance-row,.provenance-row span:last-child,.slice-heading small,.linked-slice header,.linked-slice header small,.linked-slice footer output,.link-note,.research-tabs button span,.research-card>p,.evidence-item p,.research-checklist small,.review-status,.simulation-playbar label,.simulation-playbar output,.intensity-legend,.source-display,.parameter-notice,.field-metrics span,.model-point,.research-empty p,.research-subtle-link,.research-panel .assumption-list){color:var(--theme-muted)}
html[data-theme="light"] :is(.gq-workspace legend,.gq-details summary,.gq-actions a,.gq-result-panel h4,.gq-sources a,.gq-therapy-card summary,.gq-model-details>summary,.gq-heading-symbol svg,.research-panel h3 svg,.evidence-item a){color:var(--theme-accent)}
html[data-theme="light"] :is(.spatial-stat strong,.evidence-item strong,.source-display strong,.field-metrics strong){color:var(--theme-ink)}
html[data-theme="light"] :is(.research-subtle-link,.brats-source a,.entry-legal a,.entry-privacy a){color:var(--theme-accent);text-decoration:underline;text-underline-offset:3px}
html[data-theme="light"] .linked-slice.active{border-color:var(--theme-accent)}
html[data-theme="light"] :is(.readiness-bar,.learn-progress){background:#b8cbb6}
html[data-theme="light"] .device-workspace{--dc-bg:var(--theme-surface);--dc-line:var(--theme-line);--dc-muted:var(--theme-muted)}
html[data-theme="light"] .dc-hero{background:radial-gradient(ellipse at 90% 20%,#e0eecf 0,transparent 65%),#f7faf5;border-color:#a8bd98}
html[data-theme="light"] :is(.dc-capability,.dc-next,.dc-unlock pre){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="light"] :is(.dc-node){background:var(--theme-accent-bg);border-color:#7b9c6a}
html[data-theme="light"] :is(.dc-node svg,.dc-hero a,.dc-next a,.dc-next svg){color:var(--theme-accent)}
html[data-theme="light"] :is(.dc-orbit small,.dc-security-path span,.dc-capability span:not(.dc-capability-icon)){color:var(--theme-muted)}
html[data-theme="light"] .dc-policy fieldset{border-color:var(--theme-edge)}

/* Docs and policy reader. These ID selectors also override print-era defaults
   only on screen; the document's existing print stylesheet stays authoritative. */
html[data-theme="light"] :is(.docs-header,.docs-footer,.article-version,.feedback-section,.table-scroll,th,td){border-color:var(--theme-line)}
html[data-theme="light"] :is(.docs-brand,.docs-header nav a,#article-title,.article-section h3,.checkbox-label>span){color:var(--theme-ink)!important}
html[data-theme="light"] :is(.docs-hero>p:not(.eyebrow),.docs-hero .docs-version,.sidebar-heading,.result-count,.topic-description,.article-meta,.article-summary,.article-version,.external-note,.field-hint,#feedback-form label span,.docs-footer){color:var(--theme-muted)!important}
html[data-theme="light"] :is(.docs-header a,.docs-hero a,.docs-layout a,.docs-footer a,#clear-search,.docs-status){color:var(--theme-accent)}
html[data-theme="light"] :is(#doc-article,.license-text,.no-results){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="light"] :is(.reader-actions button,#feedback-form button,.docs-sidebar button){background:var(--theme-soft);border-color:var(--theme-edge);color:var(--theme-ink)}
html[data-theme="light"] #docs-categories button{background:transparent;color:var(--theme-ink)}
html[data-theme="light"] :is(#docs-categories button:hover,#docs-topic-list a:hover){background:var(--theme-soft)}
html[data-theme="light"] #docs-categories button[aria-pressed=true]{background:var(--theme-accent-bg);border-color:#789c5b;color:var(--theme-accent)}
html[data-theme="light"] #docs-topic-list a{color:var(--theme-ink)}
html[data-theme="light"] #docs-topic-list a[aria-current=page]{background:var(--theme-accent-bg);border-left-color:#548333}
html[data-theme="light"] #search-icon{color:var(--theme-muted)}
html[data-theme="light"] .docs-sidebar{scrollbar-color:#7c9790 #edf3ef}
html[data-theme="light"] :is(th,thead th){background:var(--theme-soft)}
html[data-theme="light"] .article-kind{background:var(--theme-accent-bg);border-color:#8aaa6c;color:var(--theme-accent)}
html[data-theme="light"] .article-kind.draft{background:var(--theme-warn-bg);border-color:#b49960;color:var(--theme-warn)}
html[data-theme="light"] #feedback-form .feedback-actions button:first-child{background:#bcf881;color:#1c2914;border-color:#5b7c42}

/* Patient portal: the original light palette remains its unsaved default;
   an explicit dark choice themes every reading, auth and navigation surface. */
html[data-theme="dark"]{--pt-ink:var(--theme-ink);--pt-muted:var(--theme-muted);--pt-line:var(--theme-line);--pt-bg:var(--theme-bg);--pt-dark:#101b20}
html[data-theme="dark"] :is(.pt-card,.pt-topbar,.pt-mobile-nav,.pt-entry-form-wrap){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="dark"] :is(.pt-page-heading p,.pt-card p,.pt-small,.pt-muted,.pt-visit-copy p,.pt-preparation,.pt-task small,.pt-checkin-note,.pt-study p,.pt-pending,.pt-question-help,.pt-question-toolbar span,.pt-question small,.pt-export-note,.pt-care-step p,.pt-facts dt,.pt-profile-card p,.pt-privacy-list,.pt-support p,.pt-install p,.pt-entry-form-wrap .pt-intro,.pt-entry-form-wrap .pt-fineprint,.pt-footer,.pt-mobile-brand small,.pt-topbar>p){color:var(--theme-muted)}
html[data-theme="dark"] :is(.pt-card h2,.pt-card h3,.pt-task strong,.pt-facts dd,.pt-question p,.pt-mobile-brand,.pt-entry-form-wrap h2,.pt-question-form label,.pt-auth-form label){color:var(--theme-ink)}
html[data-theme="dark"] :is(.pt-eyebrow,.pt-mini-heading,.pt-metric,.pt-link-button,.pt-main a,.pt-entry-form-wrap a){color:var(--theme-accent)}
html[data-theme="dark"] :is(.pt-date-block,.pt-card-icon,.pt-avatar,.pt-step-number,.pt-demo-chip,.pt-tag,.pt-tag.neutral,.pt-imaging-intro,.pt-release-detail,.pt-question-empty,.pt-suggestion){background:var(--theme-soft);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="dark"] :is(.pt-date-block span,.pt-release-detail p,.pt-release-detail .pt-report-note,.pt-tag,.pt-suggestion){color:var(--theme-muted)}
html[data-theme="dark"] :is(.pt-task,.pt-care-step,.pt-question,.pt-facts>div,.pt-divider,.pt-footer,.pt-pending,.pt-entry-form-wrap .pt-entry-links){border-color:var(--theme-line)}
html[data-theme="dark"] :is(.pt-button,.pt-button.secondary,.pt-button.quiet,.pt-icon-button){background:var(--theme-soft);border-color:var(--theme-edge);color:var(--theme-ink)}
html[data-theme="dark"] :is(.pt-button.primary,.pt-auth-form .pt-button){background:#bcf881;border-color:#bcf881;color:#1c2914}
html[data-theme="dark"] :is(.pt-welcome){background:#273d2b;border-color:#658052;color:#e2f2d7}
html[data-theme="dark"] :is(.pt-welcome h2,.pt-welcome p,.pt-welcome .pt-eyebrow){color:#d9efc7}
html[data-theme="dark"] .pt-welcome .pt-button{background:#c4ee9a;color:#1c2914}
html[data-theme="dark"] .pt-q-art{background:#42603c}
html[data-theme="dark"] :is(.pt-q-art:before,.pt-q-art:after){border-color:#668653}
html[data-theme="dark"] .pt-q-art img{filter:none;opacity:.85}
html[data-theme="dark"] :is(.pt-feelings button,.pt-auth-modes){background:var(--theme-soft);border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme="dark"] :is(.pt-feelings button[aria-pressed=true],.pt-auth-modes button[aria-pressed=true],.pt-mobile-nav button[aria-pressed=true]){background:var(--theme-accent-bg);color:var(--theme-accent);border-color:#8cae70}
html[data-theme="dark"] :is(.pt-auth-modes button,.pt-mobile-nav button){color:var(--theme-muted)}
html[data-theme="dark"] :is(.pt-task.done strong){color:#c7d9ba}
html[data-theme="dark"] .pt-mini-progress{background:#3e5543}
html[data-theme="dark"] .pt-mini-progress>span{background:#b0dd84}
html[data-theme="dark"] .pt-error{color:var(--theme-error)}
html[data-theme="dark"] .pt-denied{background:var(--theme-warn-bg);border-color:#a58c58;color:var(--theme-warn)}
html[data-theme="dark"] :is(.pt-toast,.pt-session-notice){background:#273d2b;border-color:#8daa72;color:#e2f2d7}
html[data-theme="dark"] .pt-session-notice .btn.primary{background:#bcf881;color:#1c2914}
html[data-theme="dark"] .pt-mobile-brand .brand-mark{border-color:#bbf879}
html[data-theme="dark"] .pt-mobile-brand .brand-mark:after{background:#bbf879}
html[data-theme="light"] :is(.pt-sidebar,.pt-entry-story){background:#e2eddf;color:#203927}
html[data-theme="light"]{--pt-ink:var(--theme-ink);--pt-muted:var(--theme-muted)}
html[data-theme="light"] :is(.pt-mini-heading,.pt-metric,.pt-task.done strong,.pt-mobile-nav button){color:var(--theme-muted)}
html[data-theme="light"] :is(.pt-feelings button[aria-pressed=true],.pt-auth-modes button[aria-pressed=true],.pt-mobile-nav button[aria-pressed=true]){color:var(--theme-accent);background:var(--theme-accent-bg);border-color:var(--theme-edge)}
html[data-theme="light"] .pt-mobile-nav button[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--theme-edge)}
html[data-theme="light"] :is(.pt-sidebar .pt-brand,.pt-entry-story .pt-brand,.pt-entry-copy h1){color:#18382a}
html[data-theme="light"] :is(.pt-sidebar .pt-brand small,.pt-entry-story .pt-brand small,.pt-side-label,.pt-sidebar-bottom p,.pt-sidebar-bottom a,.pt-sidebar .pt-signout,.pt-entry-copy>p,.pt-entry-points>div,.pt-entry-foot){color:#45614c}
html[data-theme="light"] :is(.pt-entry-copy h1 em,.pt-entry-copy .pt-eyebrow,.pt-entry-points svg){color:#345f2d}
html[data-theme="light"] .pt-nav button{color:#43604c}
html[data-theme="light"] .pt-nav button[aria-pressed=true]{color:#214a2a;background:#c6dfb3}
html[data-theme="light"] .pt-nav button[aria-pressed=true] svg{color:#27542b}
html[data-theme="light"] .pt-entry-story:after{border-color:#b6cfae;box-shadow:0 0 0 45px #d7e5d0,0 0 0 46px #b6cfae,0 0 0 90px #dce8d6,0 0 0 91px #b6cfae}

/* Always retain existing display colors inside imaging regions. The UI
   around them changes appearance; canvas/image pixels and tissue colors do not. */
html[data-theme] :is(.scan-stage,.volume-stage){--a11y-text:#e5eeee;--a11y-muted:#c1d2dd;--theme-ink:#e5eeee;--theme-muted:#c1d2dd;color:#c1d2dd}
html[data-theme] body .workspace :is(.scan-overlay,.orientation,.volume-watermark,.volume-help,.volume-axis-key,.volume-axis-key span){color:#c1d2dd}
html[data-theme] body .workspace :is(.scan-overlay,.volume-watermark,.volume-help,.volume-axis-key){background:#0d1114e6}
html[data-theme] body .workspace :is(.scan-overlay strong,.volume-watermark strong){color:#e5eeee}
html[data-theme] .volume-badge{background:#1b2c26e6;color:#d0efb8;border-color:#789269}
html[data-theme] .volume-error{color:#dbe8ef}html[data-theme] .volume-error small{color:#b8ccd8}
html[data-theme="light"] .chart-wrap{background-color:#142128;border-color:#6c8586}
html[data-theme="light"] .entry-scan .scan-card{background:#f5faf5ee;color:var(--theme-ink);border-color:#9bb39f}
html[data-theme="light"] .entry-reconstruction{border-color:var(--theme-edge)}
html[data-theme="light"] :is(.scan-card small,.scan-callout){color:#3c644b}
html[data-theme="light"] .scan-card b svg{color:#416d30}
html[data-theme] .patient-offline :is(p,small){color:var(--theme-muted)}
html[data-theme] .patient-offline a{background:#c3f290;color:#172212;border:1px solid #68834f}
}

@media(max-width:680px){.theme-toggle{font-size:12px;padding:9px 11px}.pt-utility-bar,.entry-appearance{gap:8px;margin-bottom:18px}.rail>.brand-tile{display:none}}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
@media print{.theme-toggle,.pt-utility-bar,.entry-appearance{display:none!important}}
@media(forced-colors:active){
html[data-theme] body,html[data-theme] dialog:not(.tq-tour),html[data-theme] :is(.panel,.ew-panel,.research-card,.research-panel,.gq-therapy-card,.gq-result-panel,.dc-card,.pt-card,#doc-article,.license-text){background:Canvas;color:CanvasText;border-color:CanvasText}
html[data-theme] body :is(button,input,select,textarea,.btn,.pt-button,.theme-toggle){forced-color-adjust:auto;border-color:ButtonText}
html[data-theme] body :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline-color:Highlight;box-shadow:none}
html[data-theme] :is(.rail-link.active,.study-card.active,.ew-queue-item[aria-pressed=true],.pt-nav button[aria-pressed=true],.pt-mobile-nav button[aria-pressed=true],#docs-categories button[aria-pressed=true]){background:Highlight;color:HighlightText;border-color:Highlight}
html[data-theme] :is(.scan-stage,.volume-stage){--a11y-text:CanvasText;--a11y-muted:CanvasText;--theme-ink:CanvasText;--theme-muted:CanvasText}
html[data-theme] body .workspace :is(.scan-overlay,.scan-overlay strong,.orientation,.volume-watermark,.volume-watermark strong,.volume-help,.volume-axis-key,.volume-axis-key span){background:Canvas;color:CanvasText}
}
