#theme-toggle{white-space:nowrap;flex:none;border:1px solid #b7cbd8;color:#365871;background:#f2f6fa;border-radius:8px}.topbar .toast{flex-basis:200px;width:200px;font-size:11px}
html[data-theme=dark]{color-scheme:dark;--ink:#e3eef5;--muted:#aec3d2;--paper:#0a1c2b;--surface:#122b3e;--line:#355166;--focus:#c5b2ff}
[data-theme=dark] body{background:#0a1c2b;color:#e3eef5}
[data-theme=dark] .topbar{background:#102739;border-bottom-color:#3b576c}[data-theme=dark] .brand img{background:#fff;border-radius:6px;padding:5px;width:170px}[data-theme=dark] .brand-product{color:#b7cbd8;border-color:#466177}[data-theme=dark] .topbar .toast{color:#c5e2ed}[data-theme=dark] #theme-toggle{color:#e5f0f6;background:#203f55;border-color:#57718b}
[data-theme=dark] h1,[data-theme=dark] h2,[data-theme=dark] h3,[data-theme=dark] label,[data-theme=dark] .stage-top h2,[data-theme=dark] .app-heading h1,[data-theme=dark] .classroom-heading h2,[data-theme=dark] .fhir-dialog h2,[data-theme=dark] .welcome-heading h1{color:#e8f1f7}
[data-theme=dark] p,[data-theme=dark] .field-help,[data-theme=dark] .home-copy>p,[data-theme=dark] .classroom-heading p,[data-theme=dark] .fhir-dialog p,[data-theme=dark] .scope-card p,[data-theme=dark] .stage-top p,[data-theme=dark] .scene-feedback p,[data-theme=dark] .app-heading p,[data-theme=dark] footer{color:#aec3d2}
[data-theme=dark] .eyebrow,[data-theme=dark] .button.text-button,[data-theme=dark] a,[data-theme=dark] .tab.active,[data-theme=dark] .guided-toggle,[data-theme=dark] .home-extra summary{color:#c5b2f1}
[data-theme=dark] .button.primary{background:#a995df;border-color:#a995df;color:#142235}[data-theme=dark] .button.primary:hover{background:#c4b3ee}[data-theme=dark] .button.secondary{background:#18364c;border-color:#527088;color:#deebf3}[data-theme=dark] .button:disabled{opacity:.48}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:#102b3f!important;color:#e6f1f7!important;border-color:#527088!important}[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#a6bdcd;opacity:1}
[data-theme=dark] dialog,[data-theme=dark] .classroom-dialog,[data-theme=dark] .fhir-dialog,[data-theme=dark] .slides-dialog,[data-theme=dark] .setup-card,[data-theme=dark] .avatar-preview,[data-theme=dark] .result-card,[data-theme=dark] .resource-list,[data-theme=dark] .franklin-guide,[data-theme=dark] .lab-layout>.conversation,[data-theme=dark] .scenario-actions,[data-theme=dark] .lab-layout>.event-details{background:#122b3e;color:#e4eef5;border-color:#3e5c72}
[data-theme=dark] .franklin-guide:not([data-context=franklin-home-slot]),[data-theme=dark] .app-shell>.franklin-slot{background:#11283a}[data-theme=dark] .franklin-guide h2,[data-theme=dark] .franklin-guide-top>strong,[data-theme=dark] .franklin-guide #franklin-status,[data-theme=dark] .franklin-guide details summary{color:#c9dfe9}[data-theme=dark] .franklin-guide #franklin-status[data-ready=true]{color:#91dfbf}
[data-theme=dark] .home-scope,[data-theme=dark] .scope-card,[data-theme=dark] .fhir-origin,[data-theme=dark] .classroom-identity{background:#123b40;border-color:#4a9e9b}[data-theme=dark] .home-scope strong,[data-theme=dark] .fhir-origin summary,[data-theme=dark] .classroom-identity strong{color:#b4e5dd}
[data-theme=dark] .home-extra,[data-theme=dark] .tabs,[data-theme=dark] .intake-section,[data-theme=dark] .patient-manager,[data-theme=dark] .classroom-access,[data-theme=dark] .intake-learning-review,[data-theme=dark] .intake-problem,[data-theme=dark] .intake-allergy,[data-theme=dark] .disease-builder,[data-theme=dark] .intake-avatar-card,[data-theme=dark] .clinical-form,[data-theme=dark] .scenario-choice,[data-theme=dark] .case-brief,[data-theme=dark] .case-history,[data-theme=dark] .clinical-observations,[data-theme=dark] .scene-status,[data-theme=dark] .scene-bottom,[data-theme=dark] .scene-feedback,[data-theme=dark] .patient-quote,[data-theme=dark] .time-controls{background:#153145;border-color:#3d5a70}
[data-theme=dark] .intake-section>summary,[data-theme=dark] .patient-manager h3,[data-theme=dark] .clinical-form h3,[data-theme=dark] .clinical-form label,[data-theme=dark] .clinical-observations strong,[data-theme=dark] .clinical-observations span,[data-theme=dark] .scene-status>span,[data-theme=dark] .scene-bottom>span,[data-theme=dark] .simulation-clock span,[data-theme=dark] .fhir-patient{color:#d8e7ef}
[data-theme=dark] .action-tabs,[data-theme=dark] .compare-action,[data-theme=dark] .json-heading,[data-theme=dark] .fhir-patient,[data-theme=dark] .fhir-patient.selected,[data-theme=dark] .resource-item.selected,[data-theme=dark] .dialog-close{background:#20384d;border-color:#496079;color:#e1eaf5}[data-theme=dark] .action-tabs button{color:#bed2df}[data-theme=dark] .action-tabs button[aria-selected=true]{color:#d1bffa;border-color:#bd9fed}
[data-theme=dark] .environment-actions .action-button,[data-theme=dark] .conversation .quick-questions button,[data-theme=dark] .disease-presets button,[data-theme=dark] .patient-manager-actions .button,[data-theme=dark] .avatar-choice{background:#1b394f;color:#e0ebf2;border-color:#4c6880}[data-theme=dark] .environment-actions .action-button small,[data-theme=dark] .scenario-choice small,[data-theme=dark] .conversation p,[data-theme=dark] .conversation .field-help{color:#b9cddc}
[data-theme=dark] .conversation .dialogue-message.patient{background:#1c3b4c;border-color:#4b737e;color:#e0f0f4}[data-theme=dark] .conversation .dialogue-message.user{background:#352e52;color:#e6ddf9}
[data-theme=dark] .alert-banner{background:#193d35;border-color:#3e9a7f;color:#b8f0d8}[data-theme=dark] .alert-banner[data-tier=amber]{background:#423519;border-color:#b8954b}[data-theme=dark] .alert-banner[data-tier=red]{background:#492538;border-color:#bc6686}[data-theme=dark] .alert-message h2,[data-theme=dark] .alert-message p{color:inherit}
[data-theme=dark] .metric-flag{color:inherit}[data-theme=dark] .result-card p,[data-theme=dark] .chart-notes,[data-theme=dark] .chart-caption,[data-theme=dark] .method-note{color:#b9cddc}[data-theme=dark] .lab-order,[data-theme=dark] .rx-row,[data-theme=dark] .learning-grid,[data-theme=dark] .intro-content,[data-theme=dark] .intro-slide{background:#153145;border-color:#46647b;color:#e0ebf2}[data-theme=dark] th,[data-theme=dark] td{border-color:#3e586f;color:#d4e4ee}[data-theme=dark] .research-prompt{background:#2b2944}
[data-theme=dark] .patient-stage{background:#183344;border-color:#48677d}[data-theme=dark] .live-avatar{background:#e7eff5}[data-theme=dark] .franklin-target{outline-color:#c5b2ff!important}
@media(max-width:760px){.topbar .toast.visible{font-size:13px;flex-basis:100%;width:100%}}
/* Explicit dark-theme overrides for the legacy component colour declarations. */
[data-theme=dark] h1,[data-theme=dark] h2,[data-theme=dark] h3,[data-theme=dark] legend{color:#e6f0f7!important}
[data-theme=dark] label,[data-theme=dark] .conversation-identity strong,[data-theme=dark] .dialogue-patient strong,[data-theme=dark] .patient-status strong{color:#dcebf4!important}
[data-theme=dark] p,[data-theme=dark] .field-help,[data-theme=dark] #franklin-progress,[data-theme=dark] .conversation-status,[data-theme=dark] .conversation .empty-chat{color:#b9cedd!important}
[data-theme=dark] .button.primary{background:#b6a0e5!important;color:#112239!important;border-color:#b6a0e5!important}
[data-theme=dark] .button.secondary,[data-theme=dark] #theme-toggle{background:#203f55!important;color:#e7f1fa!important;border-color:#69859a!important}
[data-theme=dark] .button.text-button{background:transparent!important;color:#d0bff5!important}
[data-theme=dark] #theme-toggle{background:#203f55!important}
[data-theme=dark] .scene-feedback strong{color:#d5c4ff!important}
[data-theme=dark] .scene-status>span{background:#1c3b4f!important;color:#d8edf4!important;border-color:#587889!important}
[data-theme=dark] .scene-status>span:first-child{background:#164437!important;color:#b2eed4!important;border-color:#438b74!important}
[data-theme=dark] .stage-file,[data-theme=dark] .map-toggle,[data-theme=dark] .phase-badge{background:#203f55!important;color:#d5e9f5!important;border-color:#58778d!important}
[data-theme=dark] .scene-caption{color:#365b70!important}
[data-theme=dark] .chat-identity strong,[data-theme=dark] #chat-status,[data-theme=dark] .dialogue-log:empty::before{color:#c7dce9!important}
@media(prefers-reduced-motion:no-preference){html[data-theme=dark] .button{transition:color .12s ease,border-color .12s ease}}

[data-theme=dark] .topbar .reset-device-button{color:#ffd0dd!important;border-color:#976075!important;background:transparent!important}[data-theme=dark] .local-reset-dialog .reset-access-note{background:#402637;color:#f3cad8!important;border-color:#d57d9b}[data-theme=dark] .danger-button{background:#8d3451;color:#fff;border-color:#c77996}

[data-theme=dark] .reset-device-button{color:#ffd0dd!important;border-color:#976075!important;background:transparent!important}
