:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f4f8fb;
  --panel:#ffffff;
  --ink:#16324a;
  --muted:#66798a;
  --line:#dfe8ef;
  --brand:#147d88;
  --brand2:#245e8f;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#243943;
  --panel:#334c58;
  --ink:#f5fafc;
  --muted:#d4e1e6;
  --line:#6f8995;
  --brand:#7bd9d2;
  --brand2:#a9d8ff;
  --soft:#315d5d;
  --soft2:#36546c;
  --good:#8ce0b6;
  --warn:#ffe09a;
  --danger:#ffb6b0;
  --shadow:0 18px 44px rgba(8,25,33,.18);
}

.themeToggle{
  flex:0 0 auto;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid #c7dce3;
  border-radius:12px;
  background:#fff;
  color:#234d61;
  padding:9px 12px;
  font-size:12px;
  font-weight:850;
  box-shadow:0 5px 15px rgba(38,70,91,.06);
}
.themeToggle:hover{border-color:#68b5b1;background:#f1faf8}
.themeToggle:focus-visible,.mobileIconBtn:focus-visible{outline:3px solid #f2a93b;outline-offset:3px}
.themeToggleIcon{font-size:16px;line-height:1}

html[data-theme="light"]{background:#edf7f7}
html[data-theme="light"] body{
  background:linear-gradient(180deg,#edf7f7 0,#f6f9fc 28%,#f4f8fb 100%);
  color:var(--ink);
}
html[data-theme="light"] .themeToggle{
  background:#fff;
  color:#173f52;
  border-color:#b8d6df;
  box-shadow:0 7px 20px rgba(38,70,91,.09);
}
html[data-theme="light"] .themeToggle:hover{background:#eef9f8;border-color:#68b5b1}
html[data-theme="light"] .laneHero{
  background:linear-gradient(180deg,#ffffff,#f8fbfc);
  border-color:var(--line);
}
html[data-theme="light"] .laneHero .libCard{
  background:#fff;
  border-color:var(--line);
  color:var(--ink);
}

html[data-theme="dark"] body{
  background:linear-gradient(180deg,#243943 0,#29414c 48%,#223741 100%);
  color:var(--ink);
}
html[data-theme="dark"] .sidebar{background:#173440}
html[data-theme="dark"] .mobileAppBar{background:rgba(23,52,64,.98)}
html[data-theme="dark"] .mobileBottomNav{background:rgba(32,57,69,.98);border-top-color:var(--line)}
html[data-theme="dark"] .mobileTab{color:#d4e1e6}
html[data-theme="dark"] .mobileTab.active{color:#fff;background:#315d5d}
html[data-theme="dark"] .themeToggle{background:#304b58;color:var(--ink);border-color:#78919c;box-shadow:none}
html[data-theme="dark"] .themeToggle:hover{background:#3a5966;border-color:#7bd9d2}

html[data-theme="dark"] :is(
  .hero,.card,.quickCard,.libCard,.goal,
  .systemCard,.specialistCard,.trustedCard,.governanceCard,.phase1Card,.phase2Card,
  .phase4Card,.specialtyAudit,.sourceRegistryCard,.evidencePanel,.auditTableWrap,
  .convPicker,.convPanel,.convQ,.carePlanComposer,.compactComposerCard,.compactDraftCard,
  .convStat,.symReviewCard,.symSummary,.symQuestionCard,.resourceToolbar,.resourceCard,
  .resourceHeroMeta,.monthlyShell,.monthlyCard,.educationResult,.smartBoxWrap,.medResult,.modeResult,
  .resultCard,.labCard,.medCard,.ipUseNotice,dialog
){
  background-color:var(--panel)!important;
  border-color:var(--line)!important;
  color:var(--ink);
  box-shadow:none;
}
html[data-theme="dark"] :is(
  .convHero,.modeHero,.medHero,.resourceHero,.findhelpFeature,.medResourcePrompt,
  .panoramicPdfBlock,.educationResult,.eduScript,.teachBack,.evidencePanel,
  .ipUseNotice,.conversationResourceBar
){
  background:linear-gradient(135deg,#102b35,#0d222c)!important;
  border-color:var(--line)!important;
  color:var(--ink);
}
html[data-theme="dark"] :is(
  input,select,textarea,.askRow input,.modeSearchRow input,.medSearchRow input,
  .specialistSearch input,.libraryToolbar input,.resourceToolbar input,.resourceToolbar select
){
  background:#243b47!important;
  border-color:#78919c!important;
  color:var(--ink)!important;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#b9cbd2;opacity:1}
html[data-theme="dark"] option{background:#334c58;color:var(--ink)}

html[data-theme="dark"] :is(
  .secondary,.chip,.tabBtn,.levelBtn,.laneShortcuts button,.scenarioBtn,.teamLaunch,.convModeSwitch button,
  .ccmCard,.resourceQuickChip,.convQCopy,.convResourceLink,.conversationResourceActions button,
  .pdfLink,.inlinePdfLink,.sidebarUtility
){
  background:#3a5562!important;
  color:#f2f8fa!important;
  border-color:#78919c!important;
}
html[data-theme="dark"] :is(
  .secondary,.chip,.tabBtn,.levelBtn,.laneShortcuts button,.scenarioBtn,.teamLaunch,.convModeSwitch button,
  .ccmCard,.resourceQuickChip,.convQCopy,.convResourceLink,.conversationResourceActions button,
  .pdfLink,.inlinePdfLink
):hover{background:#466572!important;border-color:#8ce2dc!important}
html[data-theme="dark"] :is(.tabBtn.active,.levelBtn.active,.resourceQuickChip.active){
  background:#26757b!important;
  color:#fff!important;
  border-color:#74d6cf!important;
}
html[data-theme="dark"] .convModeSwitch button.active{
  background:#26757b!important;
  color:#fff!important;
  border-color:#74d6cf!important;
}

html[data-theme="dark"] :is(
  .header h1,.cardTitle,.answerTitle,.convHero h2,.resourceHero h2,.findhelpCopy h3,
  .ipUseNotice h3,.moduleHeader h2,.moduleHeader h3,.goal h3,.libCard h3,
  .quickCard strong,.systemCard strong,.specialistCard h3,.trustedCard h3,
  .resourceCard h3,.carePlanComposer h2,.compactComposerCard h3,.symReviewCard h3,.convStat b
){color:var(--ink)!important}
html[data-theme="dark"] :is(
  .header p,.creatorCredit,.muted,.detail,.searchInfo,.answerEmpty,.quickCard span,
  .systemCard span,.libCard p,.goal p,.source,.convHero p,.resourceHero p,
  .findhelpCopy p,.resourceCard p,.resourceMeta span,.monthlyIntro,.pdfSourceNote,
  .footer,.footer span,.convStat span,.convPanelHead p,.convFooterNote,.convAskedSummary,
  .convSelectionBar span
){color:var(--muted)!important}
html[data-theme="dark"] .convQ .convQText{
  color:#f2f8fa!important;
}
html[data-theme="dark"] a{color:#a9d8ff}
html[data-theme="dark"] .footer strong{color:#d9e8ed}

html[data-theme="dark"] .sayBox{background:#315857;border-left-color:#8ce2dc;color:#f3fbfa}
html[data-theme="dark"] .alert.warn,
html[data-theme="dark"] .resourceSafety{background:#5a4724!important;border-color:#a88948!important;color:#fff1c9!important}
html[data-theme="dark"] .alert.danger{background:#5b3235!important;border-color:#b76b70!important;color:#ffe2df!important}
html[data-theme="dark"] .alert.warn b,
html[data-theme="dark"] .resourceSafety b{color:#ffe7b7!important}
html[data-theme="dark"] .alert.danger b{color:#ffd0cc!important}
html[data-theme="dark"] .launchTopStrip{background:#315363}
html[data-theme="dark"] .badge{background:#315d5d;color:#b9f0ec}
html[data-theme="dark"] .badge.blue{background:#36546c;color:#cce4ff}
html[data-theme="dark"] .badge.warn{background:#5a4724;color:#ffe09a}
html[data-theme="dark"] .badge.danger{background:#5b3235;color:#ffc7c2}
html[data-theme="dark"] .source{border-top-color:var(--line)}
html[data-theme="dark"] .mobileScrim{background:rgba(0,0,0,.68)}

/* Panoramic CKD and medication education surfaces */
html[data-theme="dark"] :is(.monthlyHeader h2,.monthlyTop h3){color:#f2f8fa!important}
html[data-theme="dark"] .monthlyBlock h4{color:#bfd3dc!important}
html[data-theme="dark"] .monthlySource{color:#a9bec8!important}
html[data-theme="dark"] .sourceNotice{
  background:#5a4724!important;
  border-color:#a88948!important;
  color:#fff1c9!important;
}
html[data-theme="dark"] .monthBtn{
  background:#3a5562!important;
  border-color:#78919c!important;
  color:#f2f8fa!important;
}
html[data-theme="dark"] .monthBtn span{color:#d4e1e6!important}
html[data-theme="dark"] .monthBtn.active{
  background:linear-gradient(135deg,#145059,#173b55)!important;
  border-color:#74d6cf!important;
  color:#fff!important;
}
html[data-theme="dark"] .monthlyScript,
html[data-theme="dark"] .medEduFull{
  background:#243b47!important;
  border-color:#78919c!important;
  color:#f5fafc!important;
}
html[data-theme="dark"] .medEduKey{
  background:#315857!important;
  border-color:#6f9f9b!important;
  color:#f3fbfa!important;
}
html[data-theme="dark"] .medEduShort{
  background:#354d6a!important;
  border-left-color:#8fa7ff!important;
  color:#edf1ff!important;
}
html[data-theme="dark"] .medEduFlag{
  background:#5b3235!important;
  border-color:#b76b70!important;
  color:#ffe2df!important;
}
html[data-theme="dark"] .medEduDoc,
html[data-theme="dark"] .monthlyGoal{
  background:#2e5a46!important;
  border-left-color:#72d28d!important;
  color:#effbf3!important;
}
html[data-theme="dark"] .medEduNext,
html[data-theme="dark"] .monthlyNote{
  background:#5a4724!important;
  border-color:#a88948!important;
  border-left-color:#e7b553!important;
  color:#fff1c9!important;
}
html[data-theme="dark"] .monthlyExpectation{
  background:#36546c!important;
  border-left-color:#83aaf0!important;
  color:#f0f6ff!important;
}
html[data-theme="dark"] :is(.surveyItem,.surveyCopyBar){
  background:#3a5562!important;
  border-color:#78919c!important;
  color:#f5fafc!important;
}
html[data-theme="dark"] :is(.surveyHelper,.surveyProgress,.surveyScoreLabel){color:#bfd3dc!important}
html[data-theme="dark"] .panoramicPdfBlock{
  background:#3a5562!important;
  border-color:#78919c!important;
  color:#f5fafc!important;
}
html[data-theme="dark"] :is(.panoramicPdfBlock .sourceType,.pdfSourceNote,.panoramicNavHint){color:#b9ced7!important}

/* Soft-dark contrast layer: keeps every workflow readable without an almost-black canvas. */
html[data-theme="dark"] .main{color:var(--ink)}
html[data-theme="dark"] .main :is(h1,h2,h3,h4,h5,h6,strong,b,summary){color:var(--ink)}
html[data-theme="dark"] .main :is(p,li,label,small,td,.fieldLabel){color:var(--muted)}
html[data-theme="dark"] .main :is(a,.sourceType){color:#a9d8ff}

html[data-theme="dark"] :is(
  .answerDepthBar,.auditFoot,.auditTable th,.candidateList button,.careReviewHero,.careReviewSectionIcon,
  .careReviewPanel,.careReviewQuestion,.careReviewQuestion[open],.chatBubble.assistant,
  .compactCarePlanDialog,.compactCarePlanQuestion,.compactCarePlanPreview,
  .compactGuidedEditor,.convCarePlanGuide,.convSelectionBar,.deepDiveCard,.demoStat,
  .depthContextBox,.depthExpansion,.depthExpansion summary,.depthQuickCard,
  .discoveryHead,.discoveryMatches,.docOutput,.educationDocDialog,.educationDocHead,
  .educationDocRow,.educationDocSource,.evidenceCallout,.evidenceSource,.evidenceStat,
  .followupChips button,.labSide,.medClassBtn,.medMatch,.onboardStep,.patientViewNote,
  .resourceEmpty,.resourceMeta div,.resourcePhrase,.searchInterpretation,.searchNoMatch,
  .sourcePolicyTable th,.sourceRow,.surveyScore,.symFollowUp,.symModeIntro,
  .symReviewHero,.symReviewItem,.symReviewSummary,.symSearchDetails,.symSummaryCount,
  .symSummaryPreview,.teamSearchCard,.tierCard,.toolCard,.viewToggle,.v28Note
){
  background:#334c58!important;
  border-color:#6f8995!important;
  color:var(--ink)!important;
}

html[data-theme="dark"] :is(
  .answerDepthChoice,.carePlanComposerTabs button,.carePlanDraftCard,
  .carePlanDraftCard button,.carePlanDraftFooter button,.carePlanDraftToggle,
  .carePlanPilotActions button,.careReviewTab,.careReviewConversationJump,.careReviewSectionActions button,
  .careReviewQuestionActions button,.compactCarePlanButton,.compactCarePlanButtons button,.compactCarePlanTabs button,
  .compactQuestionNav button,.convControls button,.convGroupFilter,.convSelectionActions button,
  .convSetBtn,.convStart,.depthSourceLinks a,.dialogSecondary,.discoveryButtons button,
  .educationDocClose,.educationDocRow button,.educationDocFooter button,.labIndex button,
  .medExamples button,.modeExamples button,.modeQuick button,.relatedGrid button,
  .resourceCardActions a,.resourceCardActions button,.searchSuggestions button,
  .searchToolChoices button,.smartPreset,.sourceMiniLinks a,.symClearReview,
  .symCopySecondary,.symItemCopy,.symSearchJump,.templateBtn,.viewToggle button.active
){
  background:#3a5562!important;
  border-color:#78919c!important;
  color:#f2f8fa!important;
}
html[data-theme="dark"] .careReviewTab[aria-selected="true"],
html[data-theme="dark"] .careReviewQuestionActions .build{
  background:#26757b!important;
  border-color:#74d6cf!important;
  color:#fff!important;
}

html[data-theme="dark"] .assistantResetButton{
  background:#3a5562!important;
  border-color:#8aa7b2!important;
  color:#f5fafc!important;
  box-shadow:0 0 0 1px rgba(245,250,252,.06);
}
html[data-theme="dark"] .assistantResetButton:hover{
  background:#466572!important;
  border-color:#8ce2dc!important;
  color:#fff!important;
  filter:none;
}

html[data-theme="dark"] :is(
  .carePlanComposerEditor,.carePlanDraftCard textarea,.carePlanFillSentence input,
  .carePlanFillSentence select,.compactGuidedAnswer select,.compactGuidedEditor textarea,
  .compactMadLibBlank input,.compactMadLibBlank select,.educationDocControls input,
  .educationDocControls select,.educationDocRow textarea,.monthNavRow select,
  .smartField input,.symField input,.symField select,.symField textarea,
  .teamSearchRow input,.toolCard input,.toolCard select,.toolCard textarea
){
  background:#243b47!important;
  border-color:#78919c!important;
  color:#f5fafc!important;
}

html[data-theme="dark"] :is(
  .medSection p,.medNames,.medSource,.medAliasNote,.sideEffect,.resourceCard p,
  .resourceMeta span,.resourceDetailBody,.resourceContactText,.searchPrivacy,
  .searchNoMatch p,.sourcePolicyTable td,.symItemTitle span,.symSummaryMode,
  .symSummaryPrivacy,.teamSearchCard>p,.templateBtn span,.toolCard p
){color:#d4e1e6!important}

html[data-theme="dark"] :is(
  .medClassBtn strong,.medMatch b,.resourceResultsHead b,.sourceRow b,
  .symItemTitle b,.symReviewSummary h3,.teamSearchCard h3,.templateBtn b
){color:#f5fafc!important}

html[data-theme="dark"] :is(.sideEffect,.resourceTag,.miniBadge,.countPill,.sourceBadge){
  background:#405b67!important;
  border-color:#78919c!important;
  color:#edf5f7!important;
}

html[data-theme="dark"] :is(.convQ:hover,.convQ.asked,.compactCarePlanButton:hover,.discoveryButtons button:hover,.resourceCardActions a:hover,.resourceCardActions button:hover,.smartPreset:hover,.smartTile:hover){
  background:#466572!important;
  border-color:#8ce2dc!important;
}

html[data-theme="dark"] :is(.careReviewSafety,.convSafety,.depthCallCue,.guideSafety,.medSafety,.reviewGate,.searchHint,.symModeNote,.symSafetyStrip,.yellowBox){
  background:#5a4724!important;
  border-color:#a88948!important;
  color:#fff1c9!important;
}
html[data-theme="dark"] :is(.careReviewSafety,.convSafety,.depthCallCue,.guideSafety,.medSafety,.reviewGate,.searchHint,.symModeNote,.symSafetyStrip,.yellowBox) :is(b,strong,p,span){color:#fff1c9!important}

html[data-theme="dark"] :is(.redFlagBox,.symUrgent){
  background:#5b3235!important;
  border-color:#b76b70!important;
  color:#ffe2df!important;
}
html[data-theme="dark"] :is(.redFlagBox,.symUrgent) :is(b,strong,p,span){color:#ffe2df!important}

html[data-theme="dark"] :is(.teachBack,.smartHint,.smartOutput,.carePlanDraftPilot,.carePlanPilotBadge,.compactCarePlanKicker,.educationDocKicker,.resourceTag.core){
  background:#2e5a46!important;
  border-color:#70aa88!important;
  color:#effbf3!important;
}

html[data-theme="dark"] .symStatusGroup{background:#2a414c!important;border-color:#6f8995!important}
html[data-theme="dark"] .symStatusBtn{color:#e2edf1!important}
html[data-theme="dark"] .symStatusBtn.active-not-asked{background:#4a606b!important;color:#fff!important}
html[data-theme="dark"] .symStatusBtn.active-denied{background:#315d50!important;color:#eafff6!important}
html[data-theme="dark"] .symStatusBtn.active-reported{background:#684047!important;color:#ffe9e7!important}
html[data-theme="dark"] .symReviewTab{background:#3a5562!important;border-color:#78919c!important;color:#f2f8fa!important}
html[data-theme="dark"] .symReviewTab[aria-selected="true"]{background:#26757b!important;border-color:#8ce2dc!important;color:#fff!important}
html[data-theme="dark"] .symSummaryCount.reported{background:#5b3235!important}
html[data-theme="dark"] .symSummaryCount.reported :is(b,span){color:#ffe2df!important}
html[data-theme="dark"] .symSummaryCount.denied{background:#315d50!important}
html[data-theme="dark"] .symSummaryCount.denied :is(b,span){color:#eafff6!important}

html[data-theme="dark"] :is(.dialogBody,.carePlanComposerHead,.compactCarePlanHead){background:#334c58!important;color:var(--ink)!important}
html[data-theme="dark"] :is(.dialogLead,.onboardStep small){color:#d4e1e6!important}
html[data-theme="dark"] .dialogClose{background:#46616d!important;color:#fff!important}

html[data-theme="dark"] :is(button,a,input,select,textarea,summary):focus-visible{
  outline-color:#ffd27f!important;
}

/* Complete page coverage -------------------------------------------------
   Several modules are assembled after load and use their own light gradients.
   Keep structural surfaces on the shared dark tokens so newly rendered cards
   cannot become white-on-white when the theme changes. */
html[data-theme="dark"] :is(
  .laneHero,.libraryEmpty,.recentPanel,.recentList,.resourceResults,
  .careReviewQuestions,.symReviewQuestions,.symReviewMain,.discoveryGroups,
  .educationDocBody,.educationDocControls,.educationDocRows,.dialogBody,
  .compactBuilderStepContent,.compactCarePlanBody,.compactCarePlanContent
){
  background-color:transparent!important;
  color:var(--ink)!important;
}

html[data-theme="dark"] .laneHero{
  background:linear-gradient(180deg,#334c58,#2d4652)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] .laneHero :is(.libCard,.quickCard){
  background:#2a414c!important;
  border-color:var(--line)!important;
  color:var(--ink)!important;
}
html[data-theme="dark"] .laneHero :is(h2,h3,strong,b){color:#f5fafc!important}
html[data-theme="dark"] .laneHero :is(p,small,.muted){color:#d4e1e6!important}
html[data-theme="dark"] .laneHero .laneShortcuts button{
  background:#3a5562!important;
  border-color:#78919c!important;
  color:#f2f8fa!important;
}
html[data-theme="dark"] .laneHero .laneShortcuts button:hover{
  background:#466572!important;
  border-color:#8ce2dc!important;
}

/* Common late-rendered controls and information blocks. */
html[data-theme="dark"] :is(
  .recentChip,.sourceType,.libraryEmpty,.searchHint,.searchPrivacy,
  .educationDocStatus,.compactCarePlanStatus,.compactMadLibHint,
  .resourceResultsHead,.discoveryGroupLabel,.symField small
){color:var(--muted)!important}
html[data-theme="dark"] .recentChip{
  background:#3a5562!important;
  border-color:#78919c!important;
  color:#f2f8fa!important;
}

/* Browser-native and dynamically inserted form states. */
html[data-theme="dark"] :is(input,select,textarea,button){accent-color:#74d6cf}
html[data-theme="dark"] :is(input,select,textarea):disabled{
  background:#2b424d!important;
  color:#bdcdd4!important;
  border-color:#607986!important;
  opacity:1;
}
html[data-theme="dark"] select option{background:#243b47;color:#f5fafc}
html[data-theme="dark"] dialog::backdrop{background:rgba(4,18,24,.76)}

/* Connected-call controls use their own light palette. Keep the call setup,
   review dialog, and source cards legible when the Assistant is in dark mode. */
html[data-theme="dark"] :is(.sharedShell,.sharedBuilderDialog){
  --ccm-ink:#f5fafc;
  --ccm-muted:#d4e1e6;
  --ccm-line:#78919c;
  background:#2d4652!important;
  border-color:var(--ccm-line)!important;
  color:var(--ccm-ink)!important;
}
html[data-theme="dark"] :is(.sharedShell,.sharedBuilderDialog) :is(h2,h3,strong,summary,label,#sharedConnection){color:#f5fafc!important}
html[data-theme="dark"] :is(.sharedShell,.sharedBuilderDialog) :is(#sharedCallId,.sharedPrivacy,#sharedLibraryStatus,.sharedEmpty,.sharedItem [data-meta],.sharedItem [data-item-message]){color:#d4e1e6!important}
html[data-theme="dark"] :is(.sharedShell,.sharedBuilderDialog) a{color:#b6e0ff!important}
html[data-theme="dark"] :is(.sharedShell,.sharedBuilderDialog) :is(button,input,select,textarea){
  background:#203b48!important;
  border-color:#78919c!important;
  color:#f5fafc!important;
}
html[data-theme="dark"] :is(.sharedShell,.sharedBuilderDialog) button:hover{background:#3a606c!important;border-color:#8ce2dc!important}
html[data-theme="dark"] .sharedBuilderDialog :is(.sharedItem,.alStandaloneTray,.alCoverage){background:#263f4b!important;border-color:#78919c!important;color:#f5fafc!important}
html[data-theme="dark"] .sharedBuilderDialog :is(blockquote,.sharedItem details){background:#334f5a!important;border-color:#8ce2dc!important;color:#f5fafc!important}
html[data-theme="dark"] .sharedBuilderDialog .sharedConflict{background:#554b35!important;border-color:#d2ae69!important;color:#fff4dc!important}
html[data-theme="dark"] .sharedBuilderDialog .sharedSectionTabs button[aria-pressed="true"]{background:#26757b!important;border-color:#8ce2dc!important;color:#fff!important}

/* The shared question-set / care-plan builder is appended outside .main. */
.compactCarePlanDialog #compactCarePlanFinalSentence{
  width:100%;min-height:110px;padding:12px;border:1px solid var(--line);
  border-radius:10px;background:var(--panel);color:var(--ink);
  font:inherit;font-size:16px;line-height:1.55;resize:vertical;
}
.compactCarePlanDialog #compactCarePlanRebuild{
  min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;
  background:var(--panel);color:var(--ink);font:inherit;font-size:14px;cursor:pointer;
}
.compactCarePlanDialog .compactBuilderStepContent h5{font-size:15px}
.compactCarePlanDialog :is(.compactCarePlanTabs button,.compactGuidedAnswer select,.compactMadLibBlank input,.compactMadLibBlank select,.compactCarePlanButtons button){font-size:14px}
.compactCarePlanDialog :is(.compactCarePlanHead p,.compactBuilderStepContent>p,.compactMadLibHint,.compactCarePlanStatus,.compactCarePlanQuestion,.compactGuidedAnswer label){font-size:13px;line-height:1.5}
html[data-theme="dark"] .compactCarePlanDialog :is(h4,h5,b,label,.compactMadLibSentence,.compactMadLibConnector){color:var(--ink)!important}
html[data-theme="dark"] .compactCarePlanDialog :is(p,.compactCarePlanStatus,.compactQuestionNav strong){color:var(--muted)!important}
html[data-theme="dark"] .compactCarePlanDialog :is(.compactMadLib,.compactGuidedSource){background:#2a414c!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme="dark"] .compactCarePlanClose{background:#3a5562!important;border-color:#78919c!important;color:var(--ink)!important}
html[data-theme="dark"] .compactCarePlanTabs button[aria-selected="true"]{background:#26757b!important;border-color:#74d6cf!important;color:#fff!important;box-shadow:inset 0 -3px 0 #74d6cf}

/* Keep the call workspace from looking broken when the browser selects the whole page.
   Question text is copied with the dedicated buttons; editable fields remain selectable. */
.convHero,.convModeSwitch,.convPicker,.convPanel,
.careReviewHero,.careReviewSafety,.careReviewTabs,.careReviewPanel{
  -webkit-user-select:none;
  user-select:none;
}
.convHero :is(input,textarea),
.convPicker :is(input,textarea),
.convPanel :is(input,textarea),
.careReviewPanel :is(input,textarea),
.compactCarePlanDialog :is(input,textarea){
  -webkit-user-select:text;
  user-select:text;
}
::selection{
  background:rgba(123,217,210,.34);
  color:inherit;
}

@media(max-width:820px){
  .header .themeToggle{display:none}
  html[data-theme="dark"] body{background:#243943}
}
@media(min-width:821px){
  #mobileThemeToggle{display:none}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

/* Readability and density pass: keep secondary text legible without enlarging headings. */
.navBtn,.navDropdown summary,.sidebarUtility{font-size:14px;line-height:1.35}
.main :is(input,select,textarea,button){font-size:14px}
.main :is(p,li,label,.detail,.promptList,.answerBody){font-size:max(14px,1em);line-height:1.5}
.main :is(small,.source,.searchInfo,.searchPrivacy,.creatorCredit,.footer,.heroLabel,.providerReviewNote){font-size:12px;line-height:1.45}
.mobileTab b{font-size:12px}
.compactLaunchGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
.compactLaunchGrid .launchCard{min-height:0;padding:14px!important}
@media(max-width:980px){.compactLaunchGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.compactLaunchGrid{grid-template-columns:1fr!important}}
