/* Original soft green palette, preserved exactly. */
:root{--palette-22372c14:#22372c14;--palette-183d3033:#183d3033;--palette-2a4b3020:#2a4b3020;--palette-17382e66:#17382e66;--palette-153c2a22:#153c2a22;--palette-f4f8f6:#f4f8f6;--palette-95a399:#95a399;--palette-7c9384:#7c9384;--palette-98a39b:#98a39b;--palette-8ba18f:#8ba18f;--palette-75a68e:#75a68e;--palette-8c9a92:#8c9a92;--palette-74818a:#74818a;--palette-dce5df:#dce5df;--palette-f8faf6:#f8faf6;--palette-24343b:#24343b;--palette-786d8a:#786d8a;--palette-eef2ee:#eef2ee;--palette-f0edf6:#f0edf6;--palette-183e47:#183e47;--palette-d6e7dd:#d6e7dd;--palette-486654:#486654;--palette-85928f:#85928f;--palette-d5e8dc:#d5e8dc;--palette-89958e:#89958e;--palette-eeedf3:#eeedf3;--palette-f6f8f4:#f6f8f4;--palette-4d9a82:#4d9a82;--palette-d4e9df:#d4e9df;--palette-53695b:#53695b;--palette-176d64:#176d64;--palette-7f708f:#7f708f;--palette-798d80:#798d80;--palette-86729c:#86729c;--palette-96a098:#96a098;--palette-11554e:#11554e;--palette-7b8980:#7b8980;--palette-8a968f:#8a968f;--palette-7c9587:#7c9587;--palette-68757a:#68757a;--palette-a2ada5:#a2ada5;--palette-8a9e8f:#8a9e8f;--palette-8d7ca2:#8d7ca2;--palette-6e8077:#6e8077;--palette-637d6b:#637d6b;--palette-8c9c90:#8c9c90;--palette-f8faf7:#f8faf7;--palette-dce4df:#dce4df;--palette-eaf4ed:#eaf4ed;--palette-9aa69e:#9aa69e;--palette-d5e5dd:#d5e5dd;--palette-a0a9a3:#a0a9a3;--palette-4f625b:#4f625b;--palette-396654:#396654;--palette-5b9a86:#5b9a86;--palette-e4e9e7:#e4e9e7;--palette-d2e2d6:#d2e2d6;--palette-7ea98a:#7ea98a;--palette-fafcfa:#fafcfa;--palette-214f42:#214f42;--palette-8b9b90:#8b9b90;--palette-edf0ed:#edf0ed;--palette-84938b:#84938b;--palette-6d6283:#6d6283;--palette-61716c:#61716c;--palette-e5eee7:#e5eee7;--palette-e9eee7:#e9eee7;--palette-e4e1ec:#e4e1ec;--palette-f1edf5:#f1edf5;--palette-91a198:#91a198;--palette-f5f7f6:#f5f7f6;--palette-375f4c:#375f4c;--palette-f5f8f3:#f5f8f3;--palette-87938f:#87938f;--palette-98a49b:#98a49b;--palette-73877b:#73877b;--palette-a0aaa4:#a0aaa4;--palette-9cac9f:#9cac9f;--palette-f7f9f6:#f7f9f6;--palette-edf4ef:#edf4ef;--palette-dae2de:#dae2de;--palette-7b8e80:#7b8e80;--palette-e8e6ef:#e8e6ef;--palette-929b9d:#929b9d;--palette-8b9890:#8b9890;--palette-edf1ed:#edf1ed;--palette-e7f3ee:#e7f3ee;--palette-e2eae3:#e2eae3;--palette-f1f3f0:#f1f3f0;--palette-f1f7f3:#f1f7f3;--palette-fafbf9:#fafbf9;--palette-678375:#678375;--palette-f6f8f5:#f6f8f5;--palette-98a29c:#98a29c;--palette-e8f0eb:#e8f0eb;--palette-77628a:#77628a;--palette-7a8b7e:#7a8b7e;--palette-7e8f83:#7e8f83;--palette-66a08c:#66a08c;--palette-f4f8f3:#f4f8f3;--palette-d9e3dc:#d9e3dc;--palette-e1eee5:#e1eee5;--palette-53625b:#53625b;--palette-99a39d:#99a39d;--palette-7c8c82:#7c8c82;--palette-e9ede8:#e9ede8;--palette-f0f7f2:#f0f7f2;--palette-f4f6f3:#f4f6f3;--palette-74837e:#74837e;--palette-97a19c:#97a19c;--palette-91b29c:#91b29c;--palette-8a9490:#8a9490;--palette-9aa4a3:#9aa4a3;--palette-f2f5f0:#f2f5f0;--palette-849089:#849089;--palette-5a9a80:#5a9a80;--palette-eef6f2:#eef6f2;--palette-eff2f0:#eff2f0;--palette-99a29f:#99a29f}
/* Airway Care palette sampled from the supplied PulseIQ logo. */
:root:is([data-theme="airway"],[data-theme="clarity"]){--palette-22372c14:#212b3814;--palette-183d3033:#18293d33;--palette-2a4b3020:#2a394b20;--palette-17382e66:#17263866;--palette-153c2a22:#15273c22;--palette-f4f8f6:#f4f6f8;--palette-95a399:#73869c;--palette-7c9384:#607187;--palette-98a39b:#75879d;--palette-8ba18f:#6c7f97;--palette-75a68e:#5f7693;--palette-8c9a92:#697c94;--palette-74818a:#5f7c9f;--palette-dce5df:#dae0e7;--palette-f8faf6:#f6f8fa;--palette-24343b:#242e3b;--palette-786d8a:#5d789a;--palette-eef2ee:#eef0f2;--palette-f0edf6:#edf1f6;--palette-183e47:#204b86;--palette-d6e7dd:#d6dee7;--palette-486654:#41556d;--palette-85928f:#63758b;--palette-d5e8dc:#d5dee8;--palette-89958e:#66798f;--palette-eeedf3:#edf0f3;--palette-f6f8f4:#f4f6f8;--palette-4d9a82:#3484a1;--palette-d4e9df:#d4dde9;--palette-53695b:#465c76;--palette-176d64:#204b86;--palette-7f708f:#607c9f;--palette-798d80:#5c6d81;--palette-86729c:#5f7187;--palette-96a098:#72859b;--palette-11554e:#183c6d;--palette-7b8980:#5b6c80;--palette-8a968f:#677991;--palette-7c9587:#607288;--palette-68757a:#556e8d;--palette-a2ada5:#8191a5;--palette-8a9e8f:#6a7d95;--palette-8d7ca2:#66798f;--palette-6e8077:#597495;--palette-637d6b:#546d8c;--palette-8c9c90:#6a7d95;--palette-f8faf7:#f7f8fa;--palette-dce4df:#dadfe6;--palette-eaf4ed:#eaeef4;--palette-9aa69e:#788a9f;--palette-d5e5dd:#d5dce5;--palette-a0a9a3:#7d8ea3;--palette-4f625b:#42566f;--palette-396654:#204b86;--palette-5b9a86:#5b779a;--palette-e4e9e7:#e3e6ea;--palette-d2e2d6:#d2d9e2;--palette-7ea98a:#667d99;--palette-fafcfa:#fafbfc;--palette-214f42:#204b86;--palette-8b9b90:#697c94;--palette-edf0ed:#eceef1;--palette-84938b:#63758b;--palette-6d6283:#56708f;--palette-61716c:#4f6683;--palette-e5eee7:#e5e9ee;--palette-e9eee7:#e7eaee;--palette-e4e1ec:#e1e6ec;--palette-f1edf5:#edf1f5;--palette-91a198:#708399;--palette-f5f7f6:#f5f6f7;--palette-375f4c:#204b86;--palette-f5f8f3:#f3f5f8;--palette-87938f:#64778d;--palette-98a49b:#76889e;--palette-73877b:#5e7a9c;--palette-a0aaa4:#7e8fa3;--palette-9cac9f:#7d8ea3;--palette-f7f9f6:#f6f7f9;--palette-edf4ef:#edf0f4;--palette-dae2de:#d7dde5;--palette-7b8e80:#5d6e83;--palette-e8e6ef:#e6eaef;--palette-929b9d:#6e8198;--palette-8b9890:#687b92;--palette-edf1ed:#eceff2;--palette-e7f3ee:#e7ecf3;--palette-e2eae3:#e2e6ea;--palette-f1f3f0:#eff1f4;--palette-f1f7f3:#f1f4f7;--palette-fafbf9:#f9fafb;--palette-678375:#587292;--palette-f6f8f5:#f5f6f8;--palette-98a29c:#74879d;--palette-e8f0eb:#e8ecf0;--palette-77628a:#587394;--palette-7a8b7e:#5b6c81;--palette-7e8f83:#5f7085;--palette-66a08c:#3484a1;--palette-f4f8f3:#f3f5f8;--palette-d9e3dc:#d7dde5;--palette-e1eee5:#e1e7ee;--palette-53625b:#445871;--palette-99a39d:#76889e;--palette-7c8c82:#5d6e83;--palette-e9ede8:#e7eaee;--palette-f0f7f2:#f0f3f7;--palette-f4f6f3:#f3f4f6;--palette-74837e:#5d789a;--palette-97a19c:#73869c;--palette-91b29c:#798ba1;--palette-8a9490:#66798f;--palette-9aa4a3:#77899e;--palette-f2f5f0:#f0f2f5;--palette-849089:#62748a;--palette-5a9a80:#3484a1;--palette-eef6f2:#eef2f6;--palette-eff2f0:#eef0f3;--palette-99a29f:#75879d;--brand-accent:#66c2dd;--brand-navy:#204b86}
:root{--brand-accent:#176d64;--brand-navy:#24343b}
.theme-control{display:flex;align-items:center;gap:7px;margin-left:auto;font-size:10px;color:var(--muted);white-space:nowrap}.theme-control select{width:126px;font-size:11px;padding:7px 26px 7px 10px;border-color:var(--border);background:#fff}.topbar .practice-name{margin-left:0}.brand-iq{color:var(--brand-accent)}.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:18px}.theme-option{position:relative;text-align:left;border:1px solid var(--border);border-radius:9px;padding:20px;background:#fff;color:var(--ink)}.theme-option[aria-pressed=true]{border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal)}.theme-option strong{display:block;font-size:14px;margin-top:14px}.theme-option small{display:block;font-size:11px;margin-top:5px;color:var(--muted)}.theme-selected{display:none;position:absolute;top:21px;right:17px;font-size:10px;color:var(--teal)}.theme-option[aria-pressed=true] .theme-selected{display:block}.theme-swatch{display:flex;gap:5px}.theme-swatch>span{width:23px;height:23px;border-radius:50%;border:1px solid #00000008}.sage-swatch>span:nth-child(1){background:#176d64}.sage-swatch>span:nth-child(2){background:#a6dec9}.sage-swatch>span:nth-child(3){background:#e7f3ee}.airway-swatch>span:nth-child(1){background:#204b86}.airway-swatch>span:nth-child(2){background:#66c2dd}.airway-swatch>span:nth-child(3){background:#eaf3fa}:root:is([data-theme=airway],[data-theme=clarity]) .patient-avatar{background:#e8f1fa;color:#204b86;border-color:#d5e4f3}:root:is([data-theme=airway],[data-theme=clarity]) nav a.active{background:#e9f3fa;color:#204b86;box-shadow:inset 3px 0 #66c2dd}:root:is([data-theme=airway],[data-theme=clarity]) .study-metrics strong,:root:is([data-theme=airway],[data-theme=clarity]) .reference-study strong{color:#204b86}:root:is([data-theme=airway],[data-theme=clarity]) .reference-study{background:#eef6fb;border-color:#daeaf3}:root:is([data-theme=airway],[data-theme=clarity]) .rich-toolbar{background:#f1f6fb}:root:is([data-theme=airway],[data-theme=clarity]) .rich-content h2{color:#204b86}:root:is([data-theme=airway],[data-theme=clarity]) input:focus,:root:is([data-theme=airway],[data-theme=clarity]) select:focus,:root:is([data-theme=airway],[data-theme=clarity]) textarea:focus,:root:is([data-theme=airway],[data-theme=clarity]) .rich-editor:focus{border-color:#30809b;outline-color:#d3eef7}:root:is([data-theme=airway],[data-theme=clarity]) .integration-card{background:#edf3fa;border-color:#dae6f3;color:#355a82}:root:is([data-theme=airway],[data-theme=clarity]) .integration-card a{color:#204b86}:root:is([data-theme=airway],[data-theme=clarity]) .timeline-dot{background:#3484a1}@media(max-width:1150px){.theme-control>span{display:none}.topbar{gap:12px}.search-wrap{width:55%}}@media(max-width:850px){.theme-control select{width:112px;font-size:10px}.search-wrap{flex:1;width:auto}.topbar{gap:10px}.theme-options{grid-template-columns:1fr}}@media(max-width:520px){.theme-control select{width:98px;font-size:9px;padding:7px}.theme-control{margin-left:0}.search-wrap input{font-size:10px}.topbar{padding:0 12px}.theme-selected{font-size:9px}.theme-option{padding:16px}.theme-selected{top:19px}}
/* Airway Clarity is opt-in. Colour distinguishes the shell and working panels;
   authored clinical content, letter previews and PDFs retain their own styling. */
:root[data-theme="clarity"] {
  --ink:#182b42; --text:#182b42; --muted:#4d6077;
  --teal:#174b7a; --teal-light:#e0edf7; --border:#c5d2df;
  --bg:#e9eff5; --surface:#fff; --surface-alt:#edf3f8; --panel:#fff;
  --brand-navy:#163e6f; --brand-accent:#238aa2;
  
  --palette-95a399:#4d6077; --palette-7c9384:#4d6077; --palette-98a39b:#4d6077; --palette-8ba18f:#4d6077; --palette-75a68e:#4d6077; --palette-8c9a92:#4d6077; --palette-74818a:#4d6077; --palette-786d8a:#4d6077; --palette-85928f:#4d6077; --palette-89958e:#4d6077; --palette-7f708f:#4d6077; --palette-798d80:#4d6077; --palette-86729c:#4d6077; --palette-96a098:#4d6077; --palette-7b8980:#4d6077; --palette-8a968f:#4d6077; --palette-7c9587:#4d6077; --palette-68757a:#4d6077; --palette-a2ada5:#4d6077; --palette-8a9e8f:#4d6077; --palette-8d7ca2:#4d6077; --palette-6e8077:#4d6077; --palette-637d6b:#4d6077; --palette-8c9c90:#4d6077; --palette-9aa69e:#4d6077; --palette-a0a9a3:#4d6077; --palette-5b9a86:#4d6077; --palette-7ea98a:#4d6077; --palette-8b9b90:#4d6077; --palette-84938b:#4d6077; --palette-6d6283:#4d6077; --palette-91a198:#4d6077; --palette-87938f:#4d6077; --palette-98a49b:#4d6077; --palette-73877b:#4d6077; --palette-a0aaa4:#4d6077; --palette-9cac9f:#4d6077; --palette-7b8e80:#4d6077; --palette-929b9d:#4d6077; --palette-8b9890:#4d6077; --palette-678375:#4d6077; --palette-98a29c:#4d6077; --palette-77628a:#4d6077; --palette-7a8b7e:#4d6077; --palette-7e8f83:#4d6077; --palette-99a39d:#4d6077; --palette-7c8c82:#4d6077; --palette-74837e:#4d6077; --palette-97a19c:#4d6077; --palette-91b29c:#4d6077; --palette-8a9490:#4d6077; --palette-9aa4a3:#4d6077; --palette-849089:#4d6077; --palette-99a29f:#4d6077;
  --palette-24343b:#182b42; --palette-11554e:#143e68;
  --clarity-line:#9aacbe; --clarity-header:#e1ebf4;
  --clarity-shadow:0 2px 6px #182b4209;
}
.clarity-swatch>span:nth-child(1){background:#163e6f}
.clarity-swatch>span:nth-child(2){background:#238aa2}
.clarity-swatch>span:nth-child(3){background:#dce8f2}
.theme-options{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.theme-option{min-width:0}
.theme-option:focus-visible{outline:3px solid var(--teal);outline-offset:4px}
.theme-option small{line-height:1.6;max-width:36ch}

@media screen {
  :root[data-theme="clarity"] .sidebar{background:#f9fbfd;border-right-color:#c5d2df}
  :root[data-theme="clarity"] .topbar{border-bottom-color:#c5d2df;box-shadow:0 2px 7px #182b4207}
  :root[data-theme="clarity"] .eyebrow,
  :root[data-theme="clarity"] .workspace-label,
  :root[data-theme="clarity"] .nav-group-heading{color:#52657b}
  :root[data-theme="clarity"] nav a{color:#41576f}
  :root[data-theme="clarity"] nav a>span:first-child{color:#526b85}
  :root[data-theme="clarity"] nav a.active{background:#dceaf6;color:#143d6b;box-shadow:inset 3px 0 #238aa2}
  :root[data-theme="clarity"] .patient-nav-group{background:#e5eef7;border-color:#bacddd}
  :root[data-theme="clarity"] .patient-nav-links>a.active{background:#fff;color:#143d6b;border-color:#9eb8d0;box-shadow:0 1px 3px #163e6f0c}
  :root[data-theme="clarity"] .patient-header{background:#fff;border:1px solid #c5d2df;border-top:3px solid #163e6f;border-radius:13px;padding:18px 20px;box-shadow:var(--clarity-shadow)}
  :root[data-theme="clarity"] .patient-header .patient-avatar{background:#163e6f;color:#fff;border:2px solid #75c5d7;box-shadow:0 2px 4px #163e6f14}
  :root[data-theme="clarity"] .patient-header h1>a{color:var(--ink)}
  :root[data-theme="clarity"] .patient-meta{color:#4d6077}
  :root[data-theme="clarity"] .patient-contact-bar{background:#edf4fa;border-color:#c7d9e8;margin-top:14px;grid-column:2 / -1}
  :root[data-theme="clarity"] .patient-tabs{background:#fff;border:1px solid #c5d2df;border-radius:10px;gap:4px;padding:5px;overflow-x:auto;box-shadow:var(--clarity-shadow)}
  :root[data-theme="clarity"] .patient-tabs>a{display:flex;align-items:center;justify-content:center;border:0;border-radius:6px;padding:9px 13px;color:#41576f;font-weight:550;flex-shrink:0}
  :root[data-theme="clarity"] .patient-tabs>a:hover{background:#edf3f8;color:#143d6b}
  :root[data-theme="clarity"] .patient-tabs>a.active{background:#163e6f;color:#fff;font-weight:650}
  :root[data-theme="clarity"] :is(.card,.metric,.notes-history){border-color:#c5d2df;box-shadow:var(--clarity-shadow)}
  :root[data-theme="clarity"] .patient-editor-navigation{background:#fff;border-color:#c5d2df}
  :root[data-theme="clarity"] .patient-editor-navigation button{color:#263d55}
  :root[data-theme="clarity"] .patient-editor-navigation button:hover{background:#f1f5f8}
  :root[data-theme="clarity"] .patient-editor-navigation button small{color:#4d6077}
  :root[data-theme="clarity"] .patient-editor-navigation .patient-section-number{background:#f3f6f9;color:#41576f;border-color:#bac8d6}
  :root[data-theme="clarity"] .patient-editor-navigation button[aria-current]{background:#163e6f;border-color:#163e6f;color:#fff;box-shadow:inset 3px 0 #75c5d7}
  :root[data-theme="clarity"] .patient-editor-navigation button[aria-current] strong{color:#fff}
  :root[data-theme="clarity"] .patient-editor-navigation button[aria-current] small{color:#e4eef7}
  :root[data-theme="clarity"] .patient-editor-navigation button[aria-current] .patient-section-number{background:#fff;color:#163e6f;border-color:#fff}
  :root[data-theme="clarity"] .patient-editor-navigation button:focus-visible{outline:2px solid #14758a;outline-offset:3px}
  :root[data-theme="clarity"] .patient-details-content{border-top:3px solid #174b7a}
  :root[data-theme="clarity"] :is(.card-heading,.section-heading,.page-heading) h2{color:#163e6f}
  :root[data-theme="clarity"] .metric{border-top:3px solid #238aa2}
  :root[data-theme="clarity"] :is(.metric>span,.metric small,.details dt){color:#4d6077}
  :root[data-theme="clarity"] .details dd{color:#233b53}
  :root[data-theme="clarity"] .button.secondary{color:#28445f;border-color:#71889f}
  :root[data-theme="clarity"] .button.secondary:hover{background:#e8f1f8;border-color:#597a99}
  :root[data-theme="clarity"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select,textarea,.term-picker-trigger){border-color:#6f859b}
  :root[data-theme="clarity"] input::placeholder,
  :root[data-theme="clarity"] textarea::placeholder{color:#586c82;opacity:1}
  :root[data-theme="clarity"] :is(input,select,textarea,.term-picker-trigger):focus-visible{outline:2px solid #174b7a;outline-offset:3px}
  :root[data-theme="clarity"] :is(.term-picker-popup,.note-view-options-panel,.correspondence-menu-panel,.profile-panel){border-color:#9aacbe;box-shadow:0 10px 30px #182b4220}
  :root[data-theme="clarity"] .badge.positive{background:#dff1e8;color:#246349}
  :root[data-theme="clarity"] .badge.neutral{background:#e4eaf3;color:#3f5573}
  :root[data-theme="clarity"] .badge.negative{background:#fbe6e3;color:#9b3736}

  /* Neutral history layers and a restrained teal selection frame the reading sheet. */
  :root[data-theme="clarity"] .note-care-context{background:#fff;border:1px solid #c5d2df;border-top:3px solid #238aa2;border-radius:9px;padding:0;margin-bottom:16px}
  :root[data-theme="clarity"] .note-care-context small{color:#4d6077}
  :root[data-theme="clarity"] .note-care-context strong{color:#182b42}
  :root[data-theme="clarity"] .notes-history{background:#f4f6f8}
  :root[data-theme="clarity"] .notes-history-controls{background:#fff;border-bottom:1px solid #c5d2df}
  :root[data-theme="clarity"] .notes-history-heading h3{color:#163e6f}
  :root[data-theme="clarity"] .notes-history #note-list{background:#f4f6f8}
  :root[data-theme="clarity"] .note-month-group>summary{background:#e8edf2;border:1px solid #cbd5df;color:#293b50}
  :root[data-theme="clarity"] .note-month-group>summary:hover{background:#dfe7ee}
  :root[data-theme="clarity"] .note-month-group .note-month-heading{color:#293b50}
  :root[data-theme="clarity"] .note-month-chevron{color:#41576f}
  :root[data-theme="clarity"] .note-month-count{color:#4d6077}
  :root[data-theme="clarity"] .notes-layout .note-list-item{background:#fff;border-color:#c5d2df}
  :root[data-theme="clarity"] .notes-layout .note-select:hover{background:#f0f5f8}
  :root[data-theme="clarity"] .notes-layout .note-list-item.selected{background:#eaf6f8;border-color:#14758a;box-shadow:inset 3px 0 #14758a}
  :root[data-theme="clarity"] .notes-layout .note-list-item.selected .note-select:hover{background:#dff1f4}
  :root[data-theme="clarity"] .notes-layout .note-list-item.selected h3{color:#143d6b}
  :root[data-theme="clarity"] .note-list-context{color:#4d6077}
  :root[data-theme="clarity"] :is(.note-list-context,.note-month-count,.notes-history-heading>span){font-size:11px}
  :root[data-theme="clarity"] .note-month-group .note-month-heading{font-size:12px}
  :root[data-theme="clarity"] .notes-layout .note-list-item .note-excerpt{font-size:12px;line-height:1.55}
  :root[data-theme="clarity"] .badge{font-size:10px}
  :root[data-theme="clarity"] .notes-layout #note-reader{border-color:#b8cbdc;border-top:3px solid #174b7a;box-shadow:var(--clarity-shadow);background:#fff}
  :root[data-theme="clarity"] .note-reader-navigation{background:#f5f7f9;border-bottom-color:#c5d2df;color:#41576f}
  :root[data-theme="clarity"] :is(.notes-patient-reference>.card,.patient-reference>.card){background:#f3f8fb;border-top:3px solid #238aa2}
  :root[data-theme="clarity"] .note-pane-splitter::before{background:#a7bacb}
  :root[data-theme="clarity"] .note-pane-splitter>span{border-color:#7c94aa}
  :root[data-theme="clarity"] .note-pane-splitter:hover::before,
  :root[data-theme="clarity"] .note-pane-splitter:focus-visible::before{background:#174b7a}
  :root[data-theme="clarity"] .composer-card{border-top:3px solid #174b7a}
  :root[data-theme="clarity"] .rich-toolbar{background:#e5eef7;border-color:#c5d2df}
  :root[data-theme="clarity"] .rich-editor{border-color:#6f859b;background:#fff}
  :root[data-theme="clarity"] .editor-footer{background:#edf3f8;border-color:#c5d2df}
  :root[data-theme="clarity"] .clinical-form-block{border-color:#b9cddd;background:#fff}

  /* Letters and document libraries share the same scan / expand treatment. */
  :root[data-theme="clarity"] :is(.letter-compose-card,.letter-history,.document-library,.comm-log-card,.contact-log-history){border-top:3px solid #174b7a}
  :root[data-theme="clarity"] .correspondence-action-bar{background:#e5eef7;border-color:#b9cddd}
  :root[data-theme="clarity"] :is(.letter-history-filters,.document-filters,.contact-log-filters){padding:14px;background:#edf3f8;border:1px solid #c5d2df;border-radius:9px}
  :root[data-theme="clarity"] .letter-history-entry>summary{padding-inline:12px;border-radius:7px}
  :root[data-theme="clarity"] .letter-history-entry:nth-child(even)>summary{background:#f1f6fa}
  :root[data-theme="clarity"] .letter-history-entry>summary:hover{background:#e1edf7}
  :root[data-theme="clarity"] .letter-history-entry[open]>summary{background:#dfeaf4;box-shadow:inset 3px 0 #174b7a}
  :root[data-theme="clarity"] .letter-history-content{border-left-color:#6aa5c5;margin-top:10px}
  :root[data-theme="clarity"] :is(.document-table,.comm-table) th{background:#244f79;color:#fff;border-color:#244f79}
  :root[data-theme="clarity"] :is(.document-record,.comm-record):nth-child(4n+3)>td{background:#f2f6fa}
  :root[data-theme="clarity"] :is(.document-record,.comm-record):hover>td,
  :root[data-theme="clarity"] .document-record.is-expanded>td{background:#e0edf7}
  :root[data-theme="clarity"] :is(.document-detail,.comm-detail,.contact-log-entry-body){background:#e5eef6}
  :root[data-theme="clarity"] :is(.document-file-icon,.note-file-kind){color:#174b7a}
  :root[data-theme="clarity"] .contact-log-entry[open]>summary{background:#e5eef7;border-radius:8px;padding-inline:12px}
  :root[data-theme="clarity"] .info-box{background:#e5eff7;color:#41576f;border-color:#b9cddd}
}
@media screen and (max-width:650px){
  :root[data-theme="clarity"] .patient-header{padding:15px 14px}
  :root[data-theme="clarity"] .patient-tabs>a{padding:9px 11px}
  :root[data-theme="clarity"] :is(.letter-history-filters,.document-filters,.contact-log-filters){padding:12px}
}


@media screen and (max-width:520px){:root[data-theme="clarity"] .patient-header>.patient-heading-details>.patient-contact-bar{grid-column:1 / -1}}
