/* Unified day/night theme for all user-facing pages. Night remains the existing design. */

.site-theme-floating-host{position:fixed;z-index:2147481500;top:max(12px,env(safe-area-inset-top));right:12px;display:block}
.site-theme-floating-host.is-unused{display:none}
.site-theme-switch{
  position:relative;isolation:isolate;display:grid;grid-template-columns:1fr 1fr;width:158px;height:38px;padding:3px;
  border:1px solid rgba(105,180,216,.25);border-radius:13px;background:#0a2030;color:#88a8b7;cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.035);backdrop-filter:blur(16px);
  font:inherit;overflow:hidden;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease
}
.site-theme-switch::before{
  content:"";position:absolute;z-index:-1;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);border-radius:10px;
  background:linear-gradient(145deg,#173f56,#12606a);box-shadow:0 4px 12px rgba(0,0,0,.18);
  transform:translateX(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1),background .28s ease
}
.site-theme-switch.is-day::before{transform:translateX(0);background:linear-gradient(145deg,#fff4bc,#ffd66f);box-shadow:0 4px 12px rgba(168,120,31,.17)}
.site-theme-switch-option{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;opacity:.52;transition:opacity .2s,color .2s}
.site-theme-switch-option i{font-style:normal;font-size:15px;line-height:1}.site-theme-switch-option b{font-size:10px;font-weight:900}
.site-theme-switch.is-night .site-theme-switch-night{opacity:1;color:#f4ffff}.site-theme-switch.is-day .site-theme-switch-day{opacity:1;color:#664b08}
[data-site-theme-mount]{display:flex;align-items:center;justify-content:flex-end}
[data-site-theme-mount] .site-theme-switch{width:176px;box-shadow:none}
@media(max-width:560px){.site-theme-floating-host{top:max(8px,env(safe-area-inset-top));right:8px}.site-theme-switch{width:104px;height:36px}.site-theme-switch-option b{display:none}.site-theme-switch-option i{font-size:17px}[data-site-theme-mount] .site-theme-switch{width:144px}[data-site-theme-mount] .site-theme-switch-option b{display:inline;font-size:9px}}

html[data-site-theme="day"]{
  color-scheme:light;
  --app-bg:#edf5f8;--app-panel:#ffffff;--app-panel2:#f2f7fa;--app-blue:#2579e8;--app-green:#128b5e;--app-gold:#a96c12;
  --app-text:#183348;--app-muted:#647d8e;--app-border:rgba(47,100,127,.18);
  --fc-bg:#edf5f7;--fc-panel:#ffffff;--fc-panel2:#f3f8fa;--fc-line:rgba(42,112,132,.18);--fc-text:#183646;--fc-muted:#657f8b;
  --fc-accent:#168fb2;--fc-accent2:#21966f;--fc-danger:#c64d61;--fc-shadow:0 16px 38px rgba(43,77,92,.10);
  --ecg-bg:#edf5f8;--ecg-panel:#ffffff;--ecg-border:rgba(47,106,130,.18);--ecg-text:#17384a;--ecg-muted:#647e8d;--ecg-cyan:#1688b5;--ecg-green:#1b936b
}
html[data-site-theme="day"] body{background:#edf5f8!important;color:#183348!important}

/* Core app shell */
html[data-site-theme="day"] body:has(.app-root){background:#edf5f8!important}
html[data-site-theme="day"] .app-root{
  background:radial-gradient(circle at 5% 0,rgba(55,142,191,.11),transparent 27rem),radial-gradient(circle at 100% 24rem,rgba(46,170,128,.08),transparent 25rem),#edf5f8!important;
  color:#183348!important
}
html[data-site-theme="day"] .app-header{background:rgba(248,252,253,.92)!important;border-color:rgba(47,100,127,.16)!important}
html[data-site-theme="day"] .app-header strong,html[data-site-theme="day"] .page-head h1,html[data-site-theme="day"] .section-title,html[data-site-theme="day"] .app-loader strong{color:#17384a!important}
html[data-site-theme="day"] .hero-card,html[data-site-theme="day"] .app-card,html[data-site-theme="day"] .quick-card,
html[data-site-theme="day"] .chat-item,html[data-site-theme="day"] .transaction,html[data-site-theme="day"] .template-card,
html[data-site-theme="day"] .start-composer,html[data-site-theme="day"] form.start-composer.prompt-bar{
  background:linear-gradient(145deg,#ffffff,#f4f9fb)!important;border-color:rgba(47,100,127,.16)!important;color:#183348!important;box-shadow:0 12px 30px rgba(44,76,91,.07)!important
}
html[data-site-theme="day"] .quick-card strong,html[data-site-theme="day"] .chat-item h3,html[data-site-theme="day"] .template-card h3{color:#1e4052!important}
html[data-site-theme="day"] .secondary,html[data-site-theme="day"] .icon-btn,html[data-site-theme="day"] .chat-action,html[data-site-theme="day"] .drawer-trigger{
  background:#f2f7fa!important;border-color:rgba(47,100,127,.18)!important;color:#31596b!important
}
html[data-site-theme="day"] .secondary:hover,html[data-site-theme="day"] .chat-action:hover,html[data-site-theme="day"] .drawer-trigger:hover{background:#e8f2f5!important;color:#173e50!important}
html[data-site-theme="day"] .search,html[data-site-theme="day"] .field,html[data-site-theme="day"] input:not([type="checkbox"]):not([type="radio"]),
html[data-site-theme="day"] textarea,html[data-site-theme="day"] select{
  background:#ffffff!important;color:#23485a!important;border-color:rgba(47,100,127,.19)!important
}
html[data-site-theme="day"] input::placeholder,html[data-site-theme="day"] textarea::placeholder{color:#8499a3!important}
html[data-site-theme="day"] .prompt-bar{background:#fff!important;border-color:rgba(47,100,127,.18)!important;box-shadow:0 12px 26px rgba(43,76,91,.07)!important}
html[data-site-theme="day"] .prompt-bar textarea{background:transparent!important;color:#23485a!important}
html[data-site-theme="day"] .prompt-bar select{background:#f4f8fa!important;color:#5c7481!important}
html[data-site-theme="day"] .bottom-nav{background:rgba(248,252,253,.97)!important;border-color:rgba(47,100,127,.17)!important;box-shadow:0 -8px 24px rgba(45,75,89,.06)!important}
html[data-site-theme="day"] .nav-link{color:#728894!important}html[data-site-theme="day"] .nav-link.active{color:#2579e8!important}
html[data-site-theme="day"] .composer{background:rgba(248,252,253,.95)!important;border-color:rgba(47,100,127,.16)!important}
html[data-site-theme="day"] .chats-start-area{background:linear-gradient(180deg,transparent,rgba(237,245,248,.97) 18%)!important}
html[data-site-theme="day"] .history-panel{background:#f7fbfc!important;border-color:rgba(47,100,127,.16)!important;box-shadow:18px 0 45px rgba(42,71,85,.14)!important}
html[data-site-theme="day"] .history-panel-head{background:rgba(247,251,252,.97)!important;border-color:rgba(47,100,127,.15)!important}
html[data-site-theme="day"] .history-close,html[data-site-theme="day"] .answer-action,html[data-site-theme="day"] .copy-code{background:#edf4f7!important;color:#315568!important;border-color:rgba(47,100,127,.18)!important}
html[data-site-theme="day"] .bubble.assistant{background:#ffffff!important;border-color:rgba(47,100,127,.16)!important;color:#294d5f!important;box-shadow:0 5px 14px rgba(45,78,92,.04)}
html[data-site-theme="day"] .message-content blockquote{background:#edf5fb!important;color:#405f73!important}
html[data-site-theme="day"] .message-content code:not(pre code),html[data-site-theme="day"] .bubble pre{background:#edf3f6!important;color:#294f61!important}
html[data-site-theme="day"] .message-content table{background:#fff!important}html[data-site-theme="day"] .message-content th{background:#e5eff4!important;color:#244b5d!important}
html[data-site-theme="day"] .message-content td,html[data-site-theme="day"] .message-content th{border-color:rgba(47,100,127,.14)!important}
html[data-site-theme="day"] .chart-block{background:#fff!important;border-color:rgba(47,100,127,.17)!important}
html[data-site-theme="day"] .toast{background:#fff!important;color:#24495b!important;border-color:rgba(47,100,127,.18)!important;box-shadow:0 12px 35px rgba(43,74,88,.14)!important}

/* Home */
html[data-site-theme="day"] .home-brand-med,html[data-site-theme="day"] .home-brand-rest{
  background:linear-gradient(104deg,#17394d 0%,#245e7a 32%,#178c9a 52%,#1ca287 68%,#245e7a 84%,#17394d 100%)!important;
  -webkit-background-clip:text!important;background-clip:text!important
}
html[data-site-theme="day"] .home-new-chat-button,html[data-site-theme="day"] .home-nav-card{
  background:linear-gradient(145deg,#ffffff,#f2f8fa)!important;border-color:rgba(47,105,132,.17)!important;color:#23495b!important;
  box-shadow:0 10px 25px rgba(44,78,94,.07)!important
}
html[data-site-theme="day"] .home-new-chat-button:hover,html[data-site-theme="day"] .home-nav-card:hover{background:linear-gradient(145deg,#fafdfe,#eaf5f7)!important;border-color:rgba(28,138,150,.30)!important}
html[data-site-theme="day"] .home-new-chat-placeholder{color:#617b8b!important}
html[data-site-theme="day"] .home-nav-icon{background:#eaf3fb!important;border-color:rgba(49,112,160,.16)!important;color:#3574a8!important}
html[data-site-theme="day"] .home-history,html[data-site-theme="day"] .home-visits-panel,html[data-site-theme="day"] .home-like-button{
  background:linear-gradient(145deg,#ffffff,#f3f8fa)!important;border-color:rgba(47,100,127,.17)!important;color:#516f7e!important;box-shadow:0 10px 25px rgba(44,78,94,.06)!important
}
html[data-site-theme="day"] .home-history h2,html[data-site-theme="day"] .home-visits-panel strong,html[data-site-theme="day"] .home-like-button strong{color:#24495a!important}

/* Flashcards */
html[data-site-theme="day"] .fc-root{background:radial-gradient(circle at 20% 0,rgba(34,154,190,.08),transparent 34%),radial-gradient(circle at 86% 16%,rgba(48,170,128,.07),transparent 28%),#edf5f7!important;color:#183646!important}
html[data-site-theme="day"] .fc-title{background:linear-gradient(90deg,#173c51,#168eaa 58%,#228d6c)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important}
html[data-site-theme="day"] .fc-balance,html[data-site-theme="day"] .fc-card,html[data-site-theme="day"] .fc-modal,
html[data-site-theme="day"] .fc-editor-card,html[data-site-theme="day"] .fc-generator,html[data-site-theme="day"] .fc-face{
  background:linear-gradient(180deg,#ffffff,#f3f8fa)!important;border-color:rgba(42,112,132,.17)!important;color:#183646!important;box-shadow:0 14px 34px rgba(44,78,94,.08)!important
}
html[data-site-theme="day"] .fc-tab,html[data-site-theme="day"] .fc-chip,html[data-site-theme="day"] .fc-btn{background:#f3f8fa!important;color:#315767!important;border-color:rgba(42,112,132,.17)!important}
html[data-site-theme="day"] .fc-tab.active,html[data-site-theme="day"] .fc-chip.active,html[data-site-theme="day"] .fc-btn.primary{background:linear-gradient(135deg,#e1f4f7,#e6f6ef)!important;color:#176f78!important}
html[data-site-theme="day"] .fc-modal-backdrop{background:rgba(43,61,70,.38)!important}
html[data-site-theme="day"] .fc-toast{background:#fff!important;color:#244c5d!important;border-color:rgba(42,112,132,.17)!important}

/* Clinical trainer */
html[data-site-theme="day"] .trainer{background:radial-gradient(circle at 50% 0,rgba(40,126,190,.10),transparent 34%),#edf5f8!important;color:#17384a!important}
html[data-site-theme="day"] .trainer-top,html[data-site-theme="day"] .active-case-top{background:rgba(247,251,253,.96)!important;border-color:rgba(47,100,127,.14)!important}
html[data-site-theme="day"] .trainer-back,html[data-site-theme="day"] .case-back{background:#f5f9fb!important;color:#315b75!important;border-color:rgba(48,108,150,.19)!important}
html[data-site-theme="day"] .trainer-title h1,html[data-site-theme="day"] .active-case-title h2{color:#1c4054!important}
html[data-site-theme="day"] .trainer-title p,html[data-site-theme="day"] .active-case-title small{color:#6e8594!important}
html[data-site-theme="day"] .trainer .panel,html[data-site-theme="day"] .trainer-patient-card,html[data-site-theme="day"] .trainer-service-card{
  background:linear-gradient(145deg,#ffffff,#f4f8fa)!important;border-color:rgba(51,112,145,.17)!important;color:#23485a!important;box-shadow:0 11px 28px rgba(44,76,91,.07)!important
}
html[data-site-theme="day"] .difficulty,html[data-site-theme="day"] .catalog-item,html[data-site-theme="day"] .history-item,
html[data-site-theme="day"] .quick button{background:#f4f8fb!important;color:#3d5f72!important;border-color:rgba(48,105,143,.17)!important}
html[data-site-theme="day"] .difficulty.active{background:#e5f0fb!important;color:#245c8b!important;border-color:rgba(43,121,192,.35)!important}
html[data-site-theme="day"] .trainer-select,html[data-site-theme="day"] .catalog-filter-control{background:#fff!important;color:#294d61!important;border-color:rgba(48,105,143,.18)!important}
html[data-site-theme="day"] .trainer-chat .trainer-patient{background:#ffffff!important;color:#315364!important;border-color:rgba(51,105,145,.15)!important}
html[data-site-theme="day"] .patient-profile strong{color:#315267!important}
html[data-site-theme="day"] .trainer-service-head strong{color:#294d61!important}html[data-site-theme="day"] .trainer-service-head small{color:#728795!important}
html[data-site-theme="day"] .case-dock{background:linear-gradient(180deg,rgba(246,250,252,.9),#f5f9fb 22%)!important;border-color:rgba(48,104,144,.14)!important;box-shadow:0 -14px 25px rgba(42,70,84,.08)!important}
html[data-site-theme="day"] .composer textarea{background:#fff!important;color:#294d61!important;border-color:rgba(48,105,143,.20)!important}
html[data-site-theme="day"] .composer .trainer-actions-toggle{background:linear-gradient(145deg,#eef5fb,#f8fbfd)!important;color:#355c76!important;border-color:rgba(53,116,174,.22)!important}
html[data-site-theme="day"] .trainer-actions-menu,html[data-site-theme="day"] .progress-menu{background:linear-gradient(155deg,#ffffff,#f3f8fb)!important;border-color:rgba(50,109,169,.18)!important;box-shadow:0 18px 42px rgba(45,72,99,.16)!important}
html[data-site-theme="day"] .trainer-actions-head{background:#f4f8fb!important;border-color:rgba(52,107,160,.14)!important}
html[data-site-theme="day"] .trainer-actions-grid>button{background:#f8fbfd!important;color:#31536a!important;border-color:rgba(51,108,165,.16)!important}
html[data-site-theme="day"] .progress-menu-title,html[data-site-theme="day"] .trainer-actions-head strong{color:#2d526b!important}
html[data-site-theme="day"] .progress-menu-item{background:#edf3f8!important;color:#677e92!important}
html[data-site-theme="day"] .finish{
  border-color:#d65a70!important;background:linear-gradient(135deg,#fff1f3,#ffe7eb)!important;color:#a62f46!important;
  box-shadow:0 4px 12px rgba(174,64,85,.08)!important;opacity:1!important
}
html[data-site-theme="day"] .finish:hover{background:linear-gradient(135deg,#ffe8ed,#ffdce3)!important;border-color:#c74760!important;color:#8f2439!important}
html[data-site-theme="day"] .finish:disabled{background:#f1e7e9!important;color:#9c7a81!important;border-color:#d8c2c7!important;opacity:.82!important}
html[data-site-theme="day"] .trainer-send-button{color:#fff!important}
html[data-site-theme="day"] .error{background:#fff0f2!important;color:#a53349!important;border-color:#e3a7b2!important}

/* ECG */
html[data-site-theme="day"] .ecg-page{background:radial-gradient(circle at 50% 32%,rgba(14,135,179,.09),transparent 30%),radial-gradient(circle at 58% 50%,rgba(34,153,108,.05),transparent 34%),#edf5f8!important;color:#17384a!important}
html[data-site-theme="day"] .bailey-card,html[data-site-theme="day"] .ecg-controls,html[data-site-theme="day"] .ecg-sheet-card{background:linear-gradient(180deg,#ffffff,#f4f8fa)!important;border-color:rgba(47,106,130,.17)!important;box-shadow:0 18px 45px rgba(45,77,91,.09)!important}
html[data-site-theme="day"] .ecg-back,html[data-site-theme="day"] .speed-button,html[data-site-theme="day"] .preset,html[data-site-theme="day"] .sheet-chip{background:#f3f8fa!important;color:#31586a!important;border-color:rgba(47,106,130,.18)!important}
html[data-site-theme="day"] .lead-label{background:rgba(248,252,253,.96)!important;border-color:rgba(47,106,130,.18)!important;box-shadow:0 8px 22px rgba(43,75,90,.10)!important}
html[data-site-theme="day"] .lead-head b,html[data-site-theme="day"] .hr-title strong{color:#21495b!important}
html[data-site-theme="day"] .mini-ecg{background-color:#f8fbfc!important}
html[data-site-theme="day"] .conduction-status{background:rgba(255,250,226,.92)!important;color:#7c6316!important}
html[data-site-theme="day"] .ecg-note{background:#eef7fb!important;color:#567685!important}

/* Public landing */
html[data-site-theme="day"] body:has(.welcome-page){background:#edf5f8!important}
html[data-site-theme="day"] .welcome-page{background:#edf5f8!important;color:#17384a!important}
html[data-site-theme="day"] .welcome-step{
  background:radial-gradient(circle at 50% 45%,rgba(72,143,182,.12),transparent 48%),linear-gradient(180deg,#f8fbfc,#edf5f8)!important
}
html[data-site-theme="day"] .welcome-promo{background:radial-gradient(circle at 50% 45%,rgba(115,98,201,.12),transparent 48%),linear-gradient(180deg,#edf5f8,#f5f1fb)!important}
html[data-site-theme="day"] .welcome-start{background:radial-gradient(circle at 50% 55%,rgba(42,143,163,.10),transparent 45%),linear-gradient(180deg,#f5f1fb,#edf5f8)!important}
html[data-site-theme="day"] .welcome-content>p{color:#607786!important}
html[data-site-theme="day"] .welcome-content h1 span{background:linear-gradient(100deg,#1a4056 10%,#178dac 55%,#6655ba)!important;background-clip:text!important;-webkit-background-clip:text!important}
html[data-site-theme="day"] .welcome-slides{background:#fff!important;box-shadow:0 24px 65px rgba(43,83,104,.16),0 0 0 1px rgba(63,120,151,.13)!important}
html[data-site-theme="day"] .slide-arrow{background:rgba(255,255,255,.88)!important;color:#31586c!important;border-color:rgba(48,100,126,.18)!important}
html[data-site-theme="day"] .promo-code{background:linear-gradient(130deg,#f2eefc,#edf3fb)!important;color:#364b70!important;border-color:rgba(99,78,190,.22)!important;box-shadow:0 18px 50px rgba(75,61,140,.10)!important}
html[data-site-theme="day"] .promo-letters b{background:linear-gradient(180deg,#274963,#178ead 55%,#6959b6)!important;background-clip:text!important;-webkit-background-clip:text!important}
html[data-site-theme="day"] .telegram-link{color:#647b8c!important}

/* Existing course day theme is reused, now driven by the unified site preference. */
html[data-site-theme="day"] .courses-root.course-theme-day .course-case-finish{
  border-color:#d65a70!important;background:linear-gradient(135deg,#fff1f3,#ffe6ea)!important;color:#a62f46!important;opacity:1!important
}
html[data-site-theme="day"] .courses-root.course-theme-day .course-case-finish:hover{background:linear-gradient(135deg,#ffe7ec,#ffdae1)!important;color:#8f2439!important}
html[data-site-theme="day"] .courses-root.course-theme-day .course-case-finish:disabled{background:#f1e7e9!important;color:#96777e!important;border-color:#d8c2c7!important;opacity:.82!important}

/* Generic user-page fallbacks for sections with their own dark CSS. */
html[data-site-theme="day"] body:not(.admin-body) .panel:not(.ecg-paper),
html[data-site-theme="day"] body:not(.admin-body) [class$="-panel"]:not(.history-panel):not(.progress-menu):not(.trainer-actions-menu){
  border-color:rgba(47,100,127,.17)
}
html[data-site-theme="day"] body:not(.admin-body) dialog,
html[data-site-theme="day"] body:not(.admin-body) [class*="modal"]:not(.modal-open):not(.fc-modal-backdrop){
  color:#18384a
}

@media(prefers-reduced-motion:reduce){.site-theme-switch::before{transition:none}}


/* Cross-section day palette for pages that use their own feature stylesheets. */
html[data-site-theme="day"] body:not(.admin-body){
  background:#edf5f8!important;color:#203f50!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(
  .accreditation-root,.accreditation-page,.moodle-root,.moodle-page,.wallet-page,.wallet-root,
  .models-page,.model-page,.images-page,.image-page,.templates-page,.template-page,
  .presentation-page,.presentations-page,.mindmap-page,.mind-map-page,.clinical-guidelines-page,
  .guidelines-page,.my-files-page,.files-page,.profile-page,.updates-page,.quiz-page,
  .flashcards-page,.flashcard-page,.page-content,.section-page
){
  background-color:#edf5f8!important;color:#203f50!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(
  .accreditation-root,.accreditation-page,.moodle-root,.moodle-page,.wallet-page,.wallet-root,
  .models-page,.model-page,.images-page,.image-page,.templates-page,.template-page,
  .presentation-page,.presentations-page,.mindmap-page,.mind-map-page,.clinical-guidelines-page,
  .guidelines-page,.my-files-page,.files-page,.profile-page,.updates-page,.quiz-page,
  .flashcards-page,.flashcard-page,.page-content,.section-page
) :is(h1,h2,h3,h4,.title,.heading){color:#183b4e!important}
html[data-site-theme="day"] body:not(.admin-body) :is(
  .card,.content-card,.feature-card,.item-card,.result-card,.source-card,.model-card,
  .wallet-card,.balance-card,.settings-card,.list-card,.empty-state,.info-card,
  .panel-card,.section-card,.dialog,.dialog-content,.popover-content,.dropdown-menu,
  .context-menu,.modal-content,.modal-dialog
){
  color:#27495a!important;
  background-color:#fff!important;
  border-color:rgba(47,100,127,.19)!important;
  box-shadow:0 10px 28px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(
  .card,.content-card,.feature-card,.item-card,.result-card,.source-card,.model-card,
  .wallet-card,.balance-card,.settings-card,.list-card,.empty-state,.info-card,
  .panel-card,.section-card,.dialog,.dialog-content,.popover-content,.dropdown-menu,
  .context-menu,.modal-content,.modal-dialog
) :is(h1,h2,h3,h4,strong,b,label,legend,summary){color:#1e4052!important}
html[data-site-theme="day"] body:not(.admin-body) :is(
  .card,.content-card,.feature-card,.item-card,.result-card,.source-card,.model-card,
  .wallet-card,.balance-card,.settings-card,.list-card,.empty-state,.info-card,
  .panel-card,.section-card,.dialog,.dialog-content,.popover-content,.dropdown-menu,
  .context-menu,.modal-content,.modal-dialog
) :is(p,small,.muted,.description,.subtitle,.hint,.secondary-text){color:#526e7c!important}
html[data-site-theme="day"] body:not(.admin-body) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){
  color:#24485a!important;background-color:#fff!important;border-color:rgba(47,100,127,.22)!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(input,textarea)::placeholder{color:#718895!important;opacity:1}
html[data-site-theme="day"] body:not(.admin-body) :is(table,thead,tbody,tr){color:#294a5b}
html[data-site-theme="day"] body:not(.admin-body) th{background:#e7f1f5!important;color:#24495b!important}
html[data-site-theme="day"] body:not(.admin-body) td{color:#355665!important;border-color:rgba(47,100,127,.15)!important}
html[data-site-theme="day"] body:not(.admin-body) a:not(.primary):not(.button-primary){color:#176e91}
html[data-site-theme="day"] body:not(.admin-body) :is(button,.button,.btn):not(.primary):not(.primary-button):not(.btn-primary):not(.trainer-send-button):not(.course-primary){
  border-color:rgba(47,100,127,.20)
}
html[data-site-theme="day"] body:not(.admin-body) :is(button,.button,.btn):not(.primary):not(.primary-button):not(.btn-primary):not(.trainer-send-button):not(.course-primary):not(.site-theme-switch){
  color:#315568
}
html[data-site-theme="day"] body:not(.admin-body) :is(button,.button,.btn):not(.primary):not(.primary-button):not(.btn-primary):not(.trainer-send-button):not(.course-primary):hover{
  background-color:#eaf3f6
}
html[data-site-theme="day"] body:not(.admin-body) :focus-visible{
  outline-color:#1688a2!important
}


/* Home: keep the switch in the content flow on the left, clear of account/balance UI. */
.site-theme-home-mount{display:flex;justify-content:flex-start;align-items:center;margin:8px 0 10px}
@media(max-width:560px){
  .site-theme-home-mount .site-theme-switch{width:126px;height:36px}
  .site-theme-home-mount .site-theme-switch-option b{display:inline;font-size:9px}
}

/* Apply the shared palette to feature surfaces inside sections with local dark styles. */
html[data-site-theme="day"] body:not(.admin-body) [class*="card"]:not(.home-nav-icon),
html[data-site-theme="day"] body:not(.admin-body) [class*="panel"],
html[data-site-theme="day"] body:not(.admin-body) [class*="tile"],
html[data-site-theme="day"] body:not(.admin-body) [class*="popover"],
html[data-site-theme="day"] body:not(.admin-body) [class*="dropdown"],
html[data-site-theme="day"] body:not(.admin-body) [class*="modal"]:not([class*="backdrop"]):not([class*="overlay"]):not(.accr-modal),
html[data-site-theme="day"] body:not(.admin-body) [class*="dialog"]{
  background-color:#fff!important;
  border-color:rgba(47,100,127,.19)!important;
  color:#294b5c!important;
  box-shadow:0 10px 28px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] body:not(.admin-body) [class*="card"] :is(h1,h2,h3,h4,strong,b,label,legend,summary),
html[data-site-theme="day"] body:not(.admin-body) [class*="panel"] :is(h1,h2,h3,h4,strong,b,label,legend,summary),
html[data-site-theme="day"] body:not(.admin-body) [class*="modal"] :is(h1,h2,h3,h4,strong,b,label,legend,summary),
html[data-site-theme="day"] body:not(.admin-body) [class*="dialog"] :is(h1,h2,h3,h4,strong,b,label,legend,summary){
  color:#1e4052!important
}
html[data-site-theme="day"] body:not(.admin-body) [class*="card"] :is(p,small,.muted,.description,.subtitle,.hint),
html[data-site-theme="day"] body:not(.admin-body) [class*="panel"] :is(p,small,.muted,.description,.subtitle,.hint),
html[data-site-theme="day"] body:not(.admin-body) [class*="modal"] :is(p,small,.muted,.description,.subtitle,.hint),
html[data-site-theme="day"] body:not(.admin-body) [class*="dialog"] :is(p,small,.muted,.description,.subtitle,.hint){
  color:#526e7c!important
}
html[data-site-theme="day"] body:not(.admin-body) [class*="card"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select),
html[data-site-theme="day"] body:not(.admin-body) [class*="panel"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select),
html[data-site-theme="day"] body:not(.admin-body) [class*="modal"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select),
html[data-site-theme="day"] body:not(.admin-body) [class*="dialog"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){
  background:#fff!important;color:#24485a!important;border-color:rgba(47,100,127,.22)!important
}

/* Clinical recommendations have page-local dark palettes declared after shared CSS. */
html[data-site-theme="day"] body:has(.clinical-page),
html[data-site-theme="day"] body:has(.clinical-document-page){background:#edf5f8!important;color:#203f50!important}
html[data-site-theme="day"] .clinical-page,
html[data-site-theme="day"] .clinical-document-page{background:#edf5f8!important;color:#203f50!important}
html[data-site-theme="day"] :is(.clinical-search-card,.clinical-table-wrap,.clinical-doc-header,.clinical-toc,.clinical-reader-tools,.clinical-reader,.clinical-section,.clinical-content-card){
  background:#fff!important;border-color:rgba(47,100,127,.19)!important;color:#294b5c!important;box-shadow:0 10px 28px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] :is(.clinical-hero h1,.clinical-doc-header h1,.clinical-toc h2,.clinical-section h2,.clinical-section h3){color:#1e4052!important}
html[data-site-theme="day"] :is(.clinical-hero p,.clinical-source,.clinical-doc-source,.clinical-doc-meta,.clinical-meta,.clinical-doc-header p){color:#526e7c!important}
html[data-site-theme="day"] :is(.clinical-search,.clinical-select,.clinical-doc-search){
  background:#fff!important;color:#24485a!important;border-color:rgba(47,100,127,.22)!important
}
html[data-site-theme="day"] :is(.clinical-search,.clinical-doc-search)::placeholder{color:#718895!important}
html[data-site-theme="day"] .clinical-table th{background:#e7f1f5!important;color:#24495b!important;border-color:rgba(47,100,127,.16)!important}
html[data-site-theme="day"] .clinical-table td{background:#fff!important;color:#355665!important;border-color:rgba(47,100,127,.14)!important}
html[data-site-theme="day"] .clinical-table tbody tr:hover td{background:#f1f7f9!important}
html[data-site-theme="day"] .clinical-title a{color:#176e91!important}
html[data-site-theme="day"] .clinical-id,
html[data-site-theme="day"] .clinical-toc a,
html[data-site-theme="day"] .clinical-doc-meta,
html[data-site-theme="day"] .clinical-meta-chip{color:#526e7c!important}
html[data-site-theme="day"] .clinical-meta-chip{background:#f2f7f9!important;border-color:rgba(47,100,127,.17)!important}
html[data-site-theme="day"] .clinical-meta-chip strong{color:#24495b!important}
html[data-site-theme="day"] .clinical-reader :is(p,li,td,th,blockquote){color:#294b5c}


/* Keep text readable inside every themed surface, including feature-specific gray blocks. */
html[data-site-theme="day"] body:not(.admin-body) :is(
  [class*="card"],[class*="panel"],[class*="tile"],[class*="item"],[class*="popover"],
  [class*="dropdown"],[class*="dialog"],[class*="modal"]:not([class*="backdrop"]):not([class*="overlay"])
) :is(h1,h2,h3,h4,p,span,small,label,strong,b,li,td,th,summary,legend,dt,dd,a){
  color:#294b5c!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(
  [class*="card"],[class*="panel"],[class*="tile"],[class*="item"],[class*="popover"],
  [class*="dropdown"],[class*="dialog"],[class*="modal"]:not([class*="backdrop"]):not([class*="overlay"])
) :is(h1,h2,h3,h4,strong,b,legend,summary){color:#1e4052!important}
html[data-site-theme="day"] body:not(.admin-body) :is(
  [class*="card"],[class*="panel"],[class*="tile"],[class*="item"],[class*="popover"],
  [class*="dropdown"],[class*="dialog"],[class*="modal"]:not([class*="backdrop"]):not([class*="overlay"])
) :is(button.primary,button.primary *, .primary-button,.primary-button *, .btn-primary,.btn-primary *, .trainer-send-button,.trainer-send-button *, .course-primary,.course-primary *){
  color:#fff!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(
  [class*="card"],[class*="panel"],[class*="tile"],[class*="item"],[class*="popover"],
  [class*="dropdown"],[class*="dialog"],[class*="modal"]:not([class*="backdrop"]):not([class*="overlay"])
) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){
  background:#fff!important;color:#24485a!important;border-color:rgba(47,100,127,.24)!important
}

/* Center the shared switch on both the chats list and an open conversation. */
.site-theme-floating-host.is-chat{right:auto;left:50%;transform:translateX(-50%)}


/* Replace dark gradients, not just the color underneath them. */
html[data-site-theme="day"] body:not(.admin-body) :is(
  [class*="card"],[class*="panel"],[class*="tile"],[class*="popover"],
  [class*="dropdown"],[class*="dialog"],[class*="modal"]:not([class*="backdrop"]):not([class*="overlay"])
){
  background:#fff!important
}

/* Chat: keep the title bar, suggested prompts and template picker legible. */
html[data-site-theme="day"] .chat-titlebar{
  background:rgba(248,252,253,.97)!important;border-color:rgba(47,100,127,.16)!important;color:#183b4e!important
}
html[data-site-theme="day"] .chat-titlebar :is(h1,h2,strong,span){color:#24495b!important}
html[data-site-theme="day"] .chat-empty-suggestion{
  background:#f2f7fa!important;border-color:rgba(47,100,127,.20)!important;color:#315568!important
}
html[data-site-theme="day"] .chat-empty-suggestion:hover{background:#e7f1f5!important;color:#173e50!important}
html[data-site-theme="day"] .chat-empty-template-button{
  background:linear-gradient(145deg,#fff,#edf5f8)!important;border-color:rgba(47,100,127,.22)!important;color:#24495b!important
}
html[data-site-theme="day"] .template-picker-dialog{
  background:#fff!important;border-color:rgba(47,100,127,.20)!important;color:#24495b!important
}
html[data-site-theme="day"] .template-picker-head{background:#f5f9fb!important;border-bottom-color:rgba(47,100,127,.14)!important}
html[data-site-theme="day"] .template-picker-head strong,
html[data-site-theme="day"] .template-picker-item,
html[data-site-theme="day"] .template-picker-item-copy b{color:#24495b!important}
html[data-site-theme="day"] .template-picker-close,
html[data-site-theme="day"] .template-picker-item-copy small,
html[data-site-theme="day"] .template-picker-chevron,
html[data-site-theme="day"] .template-picker-state{color:#526e7c!important}
html[data-site-theme="day"] .template-picker-item{background:#fff!important;border-color:rgba(47,100,127,.10)!important}
html[data-site-theme="day"] .template-picker-item:hover{background:#edf5f8!important;border-color:rgba(47,100,127,.20)!important}
html[data-site-theme="day"] .template-picker-item-icon{background:#eaf3f8!important;border-color:rgba(47,100,127,.16)!important;color:#28739b!important}

/* Accreditation: the local .accr palette was dark and had no day overrides. */
html[data-site-theme="day"] .accr-root{background:#edf5f8!important;color:#203f50!important}
html[data-site-theme="day"] .accr-top{background:rgba(248,252,253,.97)!important;border-color:rgba(47,100,127,.16)!important}
html[data-site-theme="day"] .accr-top-title,
html[data-site-theme="day"] .accr-top-title strong,
html[data-site-theme="day"] .accr-home-head h1,
html[data-site-theme="day"] .accr-section-title,
html[data-site-theme="day"] .accr-question h2,
html[data-site-theme="day"] .accr-variant h3,
html[data-site-theme="day"] .accr-modal-head h2{color:#1e4052!important}
html[data-site-theme="day"] .accr-top-title small,
html[data-site-theme="day"] .accr-home-head p,
html[data-site-theme="day"] .accr-progress-row span,
html[data-site-theme="day"] .accr-stat span,
html[data-site-theme="day"] .accr-mode small,
html[data-site-theme="day"] .accr-active small,
html[data-site-theme="day"] .accr-variant p,
html[data-site-theme="day"] .accr-variant-score small,
html[data-site-theme="day"] .accr-session-meta,
html[data-site-theme="day"] .accr-question-number,
html[data-site-theme="day"] .accr-feedback small,
html[data-site-theme="day"] .accr-finish p,
html[data-site-theme="day"] .accr-ai-meta{color:#526e7c!important}
html[data-site-theme="day"] .accr-card,
html[data-site-theme="day"] .accr-stat,
html[data-site-theme="day"] .accr-mode,
html[data-site-theme="day"] .accr-question,
html[data-site-theme="day"] .accr-variant,
html[data-site-theme="day"] .accr-review,
html[data-site-theme="day"] .accr-finish,
html[data-site-theme="day"] .accr-modal-card{
  background:#fff!important;border-color:rgba(47,100,127,.18)!important;color:#294b5c!important;box-shadow:0 10px 28px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] .accr-progress-bar,
html[data-site-theme="day"] .accr-session-progress{background:#dce8ed!important}
html[data-site-theme="day"] .accr-option{background:#f6fafb!important;border-color:rgba(47,100,127,.18)!important;color:#294b5c!important}
html[data-site-theme="day"] .accr-option.selected{background:#e8f2fb!important;color:#244d75!important}
html[data-site-theme="day"] .accr-option.correct{background:#e7f7ef!important;color:#23634b!important}
html[data-site-theme="day"] .accr-option.wrong{background:#fff0f2!important;color:#96384b!important}
html[data-site-theme="day"] .accr-button.secondary,
html[data-site-theme="day"] .accr-favorite{background:#f2f7fa!important;border-color:rgba(47,100,127,.2)!important;color:#315568!important}
html[data-site-theme="day"] .accr-button:not(.secondary):not(.danger){color:#fff!important}
html[data-site-theme="day"] .accr-subscription-card{background:linear-gradient(135deg,#edf5ff,#f7fbff)!important}
html[data-site-theme="day"] .accr-subscription-card.active{background:linear-gradient(135deg,#e8f7f0,#f7fcf9)!important}

/* ECG: brighten the side controls and their mode tiles while preserving the tracing. */
html[data-site-theme="day"] .ecg-page{background:#edf5f8!important;color:#17384a!important}
html[data-site-theme="day"] .ecg-top,
html[data-site-theme="day"] .ecg-controls,
html[data-site-theme="day"] .bailey-card,
html[data-site-theme="day"] .ecg-sheet-card{background:#fff!important;border-color:rgba(47,106,130,.19)!important;color:#24495b!important}
html[data-site-theme="day"] .ecg-heading :is(h1,p),
html[data-site-theme="day"] .ecg-controls :is(h2,h3,h4,strong,b,label),
html[data-site-theme="day"] .ecg-sheet-card :is(h2,h3,h4,strong,b,label){color:#24495b!important}
html[data-site-theme="day"] .ecg-controls :is(p,small,.muted,.description,.hint),
html[data-site-theme="day"] .ecg-heading p{color:#526e7c!important}
html[data-site-theme="day"] .ecg-controls button:not(.primary),
html[data-site-theme="day"] .ecg-controls select,
html[data-site-theme="day"] .ecg-controls input:not([type="checkbox"]):not([type="radio"]){
  background:#f2f7f9!important;border-color:rgba(47,100,127,.2)!important;color:#315568!important
}

/* Flashcard set: its own stylesheet used fixed dark gradients and fixed white text. */
html[data-site-theme="day"] .fc-set-root{background:#edf5f8!important;color:#183646!important}
html[data-site-theme="day"] .fc-set-back,
html[data-site-theme="day"] .fc-set-btn:not(.primary):not(.danger){background:#f2f7fa!important;color:#315568!important;border-color:rgba(47,100,127,.2)!important}
html[data-site-theme="day"] .fc-set-hero,
html[data-site-theme="day"] .fc-study-face{background:#fff!important;border-color:rgba(47,100,127,.18)!important;color:#24495b!important}
html[data-site-theme="day"] .fc-set-title,
html[data-site-theme="day"] .fc-study-face p{color:#24495b!important}
html[data-site-theme="day"] .fc-set-description,
html[data-site-theme="day"] .fc-set-pill,
html[data-site-theme="day"] .fc-study-progress-text,
html[data-site-theme="day"] .fc-study-index{color:#526e7c!important}
html[data-site-theme="day"] .fc-study-hint{color:#607985!important}
html[data-site-theme="day"] .fc-study-progress{background:#dce8ed!important}
html[data-site-theme="day"] .fc-set-preview-note{background:#fff8e5!important;color:#795a19!important}
html[data-site-theme="day"] .fc-set-btn.primary{color:#fff!important}
html[data-site-theme="day"] .fc-set-btn.danger{background:#fff1f3!important;color:#a63d50!important}

/* Clinical trainer: strengthen labels in the patient card and action drawer. */
html[data-site-theme="day"] .trainer-actions-menu,
html[data-site-theme="day"] .progress-menu,
html[data-site-theme="day"] .trainer-patient-card,
html[data-site-theme="day"] .trainer-service-card,
html[data-site-theme="day"] .trainer-chat .panel{background:#fff!important;color:#294b5c!important}
html[data-site-theme="day"] .trainer-actions-menu :is(button,strong,b,label,span),
html[data-site-theme="day"] .progress-menu :is(button,strong,b,label,span),
html[data-site-theme="day"] .patient-profile :is(strong,b,span,small,div),
html[data-site-theme="day"] .trainer-patient-card :is(strong,b,label,span){color:#294b5c!important}
html[data-site-theme="day"] .trainer-actions-menu :is(small,p,.muted),
html[data-site-theme="day"] .progress-menu :is(small,p,.muted),
html[data-site-theme="day"] .patient-profile :is(small,.muted){color:#607985!important}
html[data-site-theme="day"] .trainer-actions-menu button,
html[data-site-theme="day"] .progress-menu button{background:#f3f8fa!important;border-color:rgba(47,100,127,.18)!important;color:#315568!important}
html[data-site-theme="day"] .trainer-actions-menu .primary,
html[data-site-theme="day"] .trainer-actions-menu .primary *,
html[data-site-theme="day"] .progress-menu .primary,
html[data-site-theme="day"] .progress-menu .primary *{background:linear-gradient(135deg,#176fdf,#287bdc)!important;color:#fff!important}


/* Disabled controls stay readable in the day theme. */
html[data-site-theme="day"] body:not(.admin-body) :is(button,input,select,textarea):disabled{
  opacity:.82!important;color:#526e7c!important;-webkit-text-fill-color:#526e7c!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(button,.button,.btn):disabled{
  background:#e8f0f3!important;border-color:rgba(47,100,127,.20)!important
}
html[data-site-theme="day"] body:not(.admin-body) :is(button.primary,button.primary-button,button.btn-primary,button.course-primary):disabled{
  background:#dce7ec!important;color:#456373!important;-webkit-text-fill-color:#456373!important
}


/* 2026-09-23: screenshot-driven contrast fixes for the unified day theme. */

/* Shared sticky return-to-home bar used by Models / Wallet / Profile and other app pages. */
html[data-site-theme="day"] .sidebar-menu-row{
  background:#ffffff!important;
  border-bottom-color:rgba(47,100,127,.12)!important;
  box-shadow:0 8px 22px rgba(43,77,92,.055)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important
}
html[data-site-theme="day"] body:not(.admin-body) .sidebar-menu-row .app-home-trigger{
  background:#ffffff!important;
  border-color:rgba(47,100,127,.18)!important;
  color:#24495b!important;
  box-shadow:0 5px 14px rgba(43,77,92,.065)!important
}
html[data-site-theme="day"] body:not(.admin-body) .sidebar-menu-row .app-home-trigger:hover{
  background:#f3f9fb!important;
  border-color:rgba(36,126,164,.30)!important;
  color:#173e50!important
}
html[data-site-theme="day"] body:not(.admin-body) .sidebar-menu-row .app-home-trigger .app-home-trigger-icon{
  color:#357aa0!important
}

/* Home: account balance and destructive history action must not remain night-theme islands. */
html[data-site-theme="day"] .home-balance-chip{
  background:linear-gradient(145deg,#ffffff,#f3f8fa)!important;
  border-color:rgba(173,116,26,.24)!important;
  color:#315568!important;
  box-shadow:0 9px 24px rgba(43,77,92,.10)!important
}
html[data-site-theme="day"] .home-balance-chip strong{color:#8b5a08!important}
html[data-site-theme="day"] .home-balance-chip:hover{
  background:linear-gradient(145deg,#ffffff,#edf5f8)!important;
  border-color:rgba(173,116,26,.38)!important
}
html[data-site-theme="day"] .home-history-clear{
  background:#fff4f6!important;
  border-color:rgba(179,70,92,.22)!important;
  color:#9d4358!important
}
html[data-site-theme="day"] .home-history-clear:hover{
  background:#ffecef!important;
  border-color:rgba(179,70,92,.34)!important;
  color:#843448!important
}
html[data-site-theme="day"] .home-history-clear:disabled{
  opacity:.78!important;
  background:#f5f0f1!important;
  border-color:rgba(108,126,136,.16)!important;
  color:#7c6b70!important;
  -webkit-text-fill-color:#7c6b70!important
}

/* Open chat: replace the dark footer fade while keeping the composer visually detached. */
html[data-site-theme="day"] .composer::before{
  background:linear-gradient(180deg,transparent 0%,rgba(237,245,248,.84) 38%,rgba(237,245,248,.985) 100%)!important
}
html[data-site-theme="day"] .composer .chat-web-search-row,
html[data-site-theme="day"] .composer .chat-model-meta,
html[data-site-theme="day"] .composer .free-reset-timer{
  color:#617b8a!important
}
html[data-site-theme="day"] .composer .web-search-toggle{color:#536f7e!important}
html[data-site-theme="day"] .composer form.chat-prompt-bar{
  background:#fff!important;
  border-color:rgba(47,100,127,.22)!important;
  box-shadow:0 14px 34px rgba(43,77,92,.12)!important
}

/* Models: the enhancement script injects dark gradients after site-theme.css, so use stronger scoped selectors. */
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .page-head{
  background:
    radial-gradient(circle at 90% 0%,rgba(38,173,164,.08),transparent 38%),
    radial-gradient(circle at 10% 0%,rgba(31,140,255,.08),transparent 40%),
    linear-gradient(180deg,#ffffff,#f2f8fa)!important;
  border-color:rgba(47,100,127,.19)!important;
  box-shadow:0 14px 34px rgba(43,77,92,.09)!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .page-head h1{color:#1e4052!important}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .page-head p{color:#526e7c!important}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-page-kicker{
  background:#e9f6fb!important;
  border-color:rgba(39,139,173,.18)!important;
  color:#16789a!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid > .model-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(var(--model-accent),.08),transparent 40%),
    linear-gradient(180deg,#ffffff,#f4f9fb)!important;
  border-color:rgba(var(--model-accent),.23)!important;
  color:#24495b!important;
  box-shadow:0 14px 34px rgba(43,77,92,.08)!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid > .model-card:hover{
  box-shadow:0 18px 42px rgba(43,77,92,.11)!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid .model-card p,
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid .model-card li{
  color:#526e7c!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid .model-card h2{
  color:#173e50!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid .price,
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .models-premium-grid .intelligence{
  color:#9a6100!important
}
html[data-site-theme="day"] body:not(.admin-body) .models-premium-page .model-selected-badge{
  background:rgba(238,248,247,.96)!important;
  border-color:rgba(var(--model-accent),.25)!important;
  color:#26716f!important
}

/* Accreditation: navigation buttons should look like light controls, not dark night-theme squares. */
html[data-site-theme="day"] .accr-back{
  background:linear-gradient(145deg,#ffffff,#edf5f8)!important;
  border-color:rgba(47,100,127,.22)!important;
  color:#315568!important;
  box-shadow:0 7px 18px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] .accr-back:hover{
  background:#e8f2f5!important;
  border-color:rgba(39,126,163,.32)!important;
  color:#173e50!important
}
html[data-site-theme="day"] .accr-button.secondary,
html[data-site-theme="day"] .accr-button[data-accr-go="/app"]{
  background:#f2f7fa!important;
  border-color:rgba(47,100,127,.22)!important;
  color:#315568!important;
  -webkit-text-fill-color:#315568!important
}

/* Global page transition loader follows the selected theme too. */
html[data-site-theme="day"] .site-navigation-loader{
  background:rgba(237,245,248,.988)!important;
  color:#1e4052!important
}
html[data-site-theme="day"] .site-navigation-loader strong{color:#1e4052!important}
html[data-site-theme="day"] .site-navigation-loader small{color:#647d8e!important}
html[data-site-theme="day"] .site-navigation-loader-logo{
  box-shadow:0 14px 36px rgba(43,77,92,.16)!important
}
html[data-site-theme="day"] .site-navigation-loader-spinner{
  border-color:rgba(49,111,151,.18)!important;
  border-top-color:#2d83c7!important
}

/* ECG: light educational guide plus classic pink ECG paper behind mini-leads around the heart. */
html[data-site-theme="day"] .ecg-mode-guide{
  background:
    radial-gradient(circle at 10% 0%,rgba(56,189,248,.07),transparent 36%),
    radial-gradient(circle at 92% 100%,rgba(52,211,153,.05),transparent 34%),
    linear-gradient(180deg,#ffffff,#f3f8fa)!important;
  border-color:rgba(47,106,130,.18)!important;
  color:#24495b!important;
  box-shadow:0 16px 38px rgba(43,77,92,.09)!important
}
html[data-site-theme="day"] .ecg-guide-title,
html[data-site-theme="day"] .ecg-guide-card-head,
html[data-site-theme="day"] .ecg-guide-card b,
html[data-site-theme="day"] .ecg-guide-check b{color:#24495b!important}
html[data-site-theme="day"] .ecg-guide-subtitle,
html[data-site-theme="day"] .ecg-guide-card p,
html[data-site-theme="day"] .ecg-guide-check{color:#587584!important}
html[data-site-theme="day"] .ecg-guide-badge{
  background:#eef6f9!important;
  border-color:rgba(47,106,130,.16)!important;
  color:#31586a!important
}
html[data-site-theme="day"] .ecg-guide-card{
  background:#f8fbfc!important;
  border-color:rgba(47,106,130,.15)!important
}
html[data-site-theme="day"] .ecg-guide-num{
  background:#e8f5fb!important;
  border-color:rgba(41,143,186,.18)!important;
  color:#187da3!important
}
html[data-site-theme="day"] .ecg-guide-leads{
  border-top-color:rgba(47,106,130,.12)!important
}
html[data-site-theme="day"] .ecg-guide-leads-label{color:#607d8c!important}
html[data-site-theme="day"] .ecg-guide-lead{
  background:#eaf7f1!important;
  border-color:rgba(32,143,100,.16)!important;
  color:#247257!important
}
html[data-site-theme="day"] .ecg-guide-check{
  background:#eef7fb!important;
  border-color:rgba(41,143,186,.13)!important
}
html[data-site-theme="day"] .mini-ecg{
  background-color:#fff7f8!important;
  background-image:
    linear-gradient(rgba(225,82,103,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(225,82,103,.12) 1px,transparent 1px),
    linear-gradient(rgba(225,82,103,.26) 1px,transparent 1px),
    linear-gradient(90deg,rgba(225,82,103,.26) 1px,transparent 1px)!important;
  background-size:4px 4px,4px 4px,20px 20px,20px 20px!important;
  box-shadow:inset 0 0 0 1px rgba(190,24,93,.08)!important
}
html[data-site-theme="day"] .lead-head span{color:#6f7880!important}
html[data-site-theme="day"] .mini-baseline{stroke:rgba(97,45,57,.16)!important}
html[data-site-theme="day"] .mini-trace{stroke:#292125!important}
html[data-site-theme="day"] .mini-sweep{stroke:#b42343!important}

/* Flashcards: remove the remaining dark/gray islands in library and study mode. */
html[data-site-theme="day"] .fc-home-button{
  background:linear-gradient(145deg,#ffffff,#edf5f8)!important;
  border-color:rgba(47,100,127,.20)!important;
  color:#315568!important;
  box-shadow:0 7px 18px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] .fc-home-button:hover,
html[data-site-theme="day"] .fc-home-button:focus-visible{
  background:#e8f2f5!important;
  border-color:rgba(39,126,163,.30)!important;
  color:#173e50!important
}
html[data-site-theme="day"] .fc-section-title h2,
html[data-site-theme="day"] .fc-study-head h2{color:#24495b!important}
html[data-site-theme="day"] .fc-pill,
html[data-site-theme="day"] .fc-set-pill{
  background:#f2f7f9!important;
  border-color:rgba(47,100,127,.16)!important;
  color:#526e7c!important
}
html[data-site-theme="day"] .fc-learning-stats span{
  background:#ffffff!important;
  border-color:rgba(47,100,127,.17)!important;
  color:#607985!important;
  box-shadow:0 5px 14px rgba(43,77,92,.04)!important
}
html[data-site-theme="day"] .fc-learning-stats b{color:#24495b!important}
html[data-site-theme="day"] .fc-study-head h2{
  background:#eef5f8!important;
  border-color:rgba(47,100,127,.17)!important
}
html[data-site-theme="day"] .fc-learning-mode-icon{
  background:#edf6fa!important;
  border-color:rgba(47,100,127,.17)!important;
  color:#2a82aa!important
}
html[data-site-theme="day"] .fc-swipe-card,
html[data-site-theme="day"] .fc-swipe-card .fc-study-face,
html[data-site-theme="day"] .fc-swipe-card-next,
html[data-site-theme="day"] .fc-swipe-card-next .fc-study-face{
  background:#fff!important;
  border-color:rgba(47,100,127,.18)!important
}
html[data-site-theme="day"] .fc-swipe-card-next .fc-study-face p{color:#718895!important}

/* Wallet / Profile: keep values readable on white cards. */
html[data-site-theme="day"] .wallet-balance .balance-value,
html[data-site-theme="day"] .topup-summary strong,
html[data-site-theme="day"] .topup-option small{
  color:#965d00!important
}
html[data-site-theme="day"] .wallet-balance .hero-label{color:#526e7c!important}
html[data-site-theme="day"] .profile-row b{color:#24495b!important}
html[data-site-theme="day"] .profile-row span{color:#607985!important}

/* My files: summary boxes and the file list need their own light surfaces and separation. */
html[data-site-theme="day"] .my-files-page{
  background:
    radial-gradient(circle at 82% 0,rgba(40,119,180,.07),transparent 34%),
    #edf5f8!important;
  color:#18384a!important
}
html[data-site-theme="day"] .my-files-header h1{color:#17384a!important}
html[data-site-theme="day"] .my-files-header p{color:#647d8e!important}
html[data-site-theme="day"] .my-files-back{
  background:#fff!important;
  border-color:rgba(47,100,127,.20)!important;
  color:#315568!important;
  box-shadow:0 7px 18px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] .my-files-summary>div{
  background:linear-gradient(145deg,#ffffff,#f1f7f9)!important;
  border-color:rgba(47,100,127,.18)!important;
  box-shadow:0 10px 26px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] .my-files-summary span{color:#607985!important}
html[data-site-theme="day"] .my-files-summary strong{color:#24495b!important}
html[data-site-theme="day"] .my-files-content{
  background:#ffffff!important;
  border-color:rgba(47,100,127,.20)!important;
  box-shadow:0 16px 38px rgba(43,77,92,.09)!important
}
html[data-site-theme="day"] .my-file-card{
  background:#ffffff!important;
  border-bottom-color:rgba(47,100,127,.12)!important
}
html[data-site-theme="day"] .my-file-name{color:#24495b!important}
html[data-site-theme="day"] .my-file-meta,
html[data-site-theme="day"] .my-file-kind,
html[data-site-theme="day"] .my-file-telegram-status{color:#607985!important}
html[data-site-theme="day"] .my-file-icon{
  background:#edf6fa!important;
  border-color:rgba(47,100,127,.16)!important;
  color:#3181a4!important
}
html[data-site-theme="day"] .my-file-card[data-kind="image"] .my-file-icon{
  background:#eaf7f2!important;
  border-color:rgba(43,155,135,.16)!important;
  color:#27846f!important
}
html[data-site-theme="day"] .my-file-action{
  background:#f2f7fa!important;
  border-color:rgba(47,100,127,.18)!important;
  color:#315568!important
}
html[data-site-theme="day"] .my-file-action:hover{
  background:#e8f2f5!important;
  border-color:rgba(39,126,163,.28)!important
}
html[data-site-theme="day"] .my-file-preview{
  background:#edf8f4!important;
  border-color:rgba(37,137,112,.18)!important;
  color:#2b725f!important
}
html[data-site-theme="day"] .my-file-telegram{
  background:#eef6fb!important;
  border-color:rgba(48,122,174,.20)!important;
  color:#2f6f96!important
}
html[data-site-theme="day"] .my-file-action:disabled,
html[data-site-theme="day"] .my-file-action[aria-disabled="true"]{
  opacity:.72!important;
  background:#eef3f5!important;
  color:#718895!important;
  -webkit-text-fill-color:#718895!important
}


/* 2026-09-23: trainer contrast + green update markers + one-shot home title typing. */

/* Home update markers: no shine sweep; daytime uses a green medical status palette. */
.home-nav-update-badge::after{
  content:none!important;
  display:none!important;
  animation:none!important
}
@keyframes homeTrainerUpdatePulseDay{
  0%,100%{
    transform:translate(-50%,-50%) scale(.96);
    filter:brightness(.99);
    box-shadow:0 7px 18px rgba(27,143,91,.16),0 0 0 0 rgba(34,197,94,.18)
  }
  50%{
    transform:translate(-50%,-50%) scale(1.075);
    filter:brightness(1.025);
    box-shadow:0 9px 22px rgba(27,143,91,.22),0 0 0 7px rgba(34,197,94,0)
  }
}
html[data-site-theme="day"] .home-nav-update-badge{
  border-color:rgba(31,154,96,.34)!important;
  background:linear-gradient(135deg,#42c887 0%,#25ae70 52%,#168d59 100%)!important;
  color:#f5fff9!important;
  box-shadow:0 7px 18px rgba(27,143,91,.18)!important;
  animation:homeTrainerUpdatePulseDay 1.75s ease-in-out infinite!important
}
html[data-site-theme="day"] .home-nav-card-update{
  border-color:rgba(31,154,96,.20)!important
}
html[data-site-theme="day"] .home-nav-card-update:hover{
  border-color:rgba(31,154,96,.34)!important
}

/* Home title: premium light med-tech treatment plus a one-shot typewriter caret. */
.home-brand-title{position:relative}
.home-brand-title.is-typing::after{
  content:"";
  width:2px;
  height:.92em;
  margin-left:.06em;
  border-radius:2px;
  background:currentColor;
  opacity:.76;
  animation:homeTitleCaretBlink .78s steps(1,end) infinite
}
.home-greeting-title.home-title-static{
  animation:none!important
}
@keyframes homeTitleCaretBlink{
  0%,48%{opacity:.76}
  49%,100%{opacity:.08}
}
html[data-site-theme="day"] .home-brand-title{
  filter:drop-shadow(0 8px 18px rgba(28,91,111,.10))
}
html[data-site-theme="day"] .home-brand-title::before{
  content:"";
  position:absolute;
  z-index:-1;
  left:10%;
  right:10%;
  top:56%;
  height:55%;
  border-radius:50%;
  background:radial-gradient(ellipse,rgba(31,146,160,.10),rgba(31,146,160,0) 70%);
  filter:blur(10px);
  pointer-events:none
}
html[data-site-theme="day"] .home-brand-med,
html[data-site-theme="day"] .home-brand-rest{
  background:linear-gradient(102deg,#16384b 0%,#235e78 30%,#128aa0 53%,#179878 72%,#235e78 88%,#16384b 100%)!important;
  background-size:220% 100%!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  -webkit-text-fill-color:transparent!important
}
html[data-site-theme="day"] .home-brand-med{
  font-weight:880!important;
  letter-spacing:-.055em
}
html[data-site-theme="day"] .home-brand-rest{
  font-weight:720!important
}

/* Clinical trainer: service events, lab conclusion and fixed case controls in day mode. */
html[data-site-theme="day"] .trainer-service-head strong{
  color:#173e50!important
}
html[data-site-theme="day"] .trainer-service-head small{
  color:#607985!important
}
html[data-site-theme="day"] .trainer-service-icon,
html[data-site-theme="day"] .trainer-service-hospital .trainer-service-icon,
html[data-site-theme="day"] .trainer-service-ems .trainer-service-icon{
  background:linear-gradient(145deg,#e9f8f1,#f7fcf9)!important;
  border-color:rgba(30,142,96,.22)!important;
  color:#24765a!important;
  box-shadow:0 6px 16px rgba(43,77,92,.07)!important
}
html[data-site-theme="day"] .trainer-chat .trainer-service-card,
html[data-site-theme="day"] .trainer-service-hospital .trainer-service-card,
html[data-site-theme="day"] .trainer-service-ems .trainer-service-card,
html[data-site-theme="day"] .trainer-service-consultation .trainer-service-card,
html[data-site-theme="day"] .trainer-service-dynamics .trainer-service-card,
html[data-site-theme="day"] .trainer-service-control .trainer-service-card,
html[data-site-theme="day"] .trainer-service-followup .trainer-service-card{
  background:linear-gradient(145deg,#ffffff,#f4f9fb)!important;
  border-color:rgba(47,100,127,.17)!important;
  color:#294b5c!important;
  box-shadow:0 9px 24px rgba(43,77,92,.06)!important
}
html[data-site-theme="day"] .trainer-service-card .message-content,
html[data-site-theme="day"] .trainer-service-card .message-content :is(p,span,li,td,th,strong,b,h1,h2,h3,h4){
  color:#294b5c!important
}
html[data-site-theme="day"] .trainer-service-card .message-content :is(h1,h2,h3,h4,strong,b){
  color:#1e4052!important
}
html[data-site-theme="day"] .lab-conclusion{
  background:linear-gradient(145deg,#eaf8f2,#f7fcf9)!important;
  border-color:rgba(31,154,96,.22)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important
}
html[data-site-theme="day"] .lab-conclusion-icon{
  background:#dff3e9!important;
  color:#237a59!important
}
html[data-site-theme="day"] .lab-conclusion-body,
html[data-site-theme="day"] .lab-conclusion-body :is(p,span,li){
  color:#456b62!important
}
html[data-site-theme="day"] .lab-conclusion-body>strong{
  color:#1f6f51!important
}

/* The active-case header is portaled to body on desktop/iOS, so style both locations. */
html[data-site-theme="day"] .trainer-fixed-case-header,
html[data-site-theme="day"] .case-open .active-case-top{
  background:rgba(248,252,253,.985)!important;
  border-color:rgba(47,100,127,.16)!important;
  box-shadow:0 9px 22px rgba(43,77,92,.09)!important
}
html[data-site-theme="day"] .trainer-fixed-case-header .active-case-name-row h2,
html[data-site-theme="day"] .trainer-fixed-case-header .active-case-title h2{
  color:#173e50!important
}
html[data-site-theme="day"] .trainer-fixed-case-header .active-case-title small{
  color:#607985!important
}
html[data-site-theme="day"] :is(.trainer-fixed-case-header,.case-open) .restart-case{
  background:linear-gradient(145deg,#ffffff,#edf5f8)!important;
  border-color:rgba(47,112,153,.22)!important;
  color:#315b75!important;
  box-shadow:0 5px 14px rgba(43,77,92,.06)!important
}
html[data-site-theme="day"] :is(.trainer-fixed-case-header,.case-open) .restart-case:hover{
  background:#e8f2f6!important;
  border-color:rgba(41,127,174,.34)!important;
  color:#194b67!important
}
html[data-site-theme="day"] :is(.trainer-fixed-case-header,.case-open) .finish-top{
  background:#fff2f4!important;
  border-color:rgba(207,68,92,.42)!important;
  color:#b2324b!important;
  box-shadow:0 5px 14px rgba(176,50,75,.07)!important;
  animation:none!important
}
html[data-site-theme="day"] :is(.trainer-fixed-case-header,.case-open) .finish-top:hover{
  background:#ffe8ec!important;
  border-color:rgba(190,52,79,.52)!important;
  color:#98263e!important;
  filter:none!important
}
html[data-site-theme="day"] :is(.trainer-fixed-case-header,.case-open) .progress-menu-toggle{
  background:linear-gradient(145deg,#ffffff,#edf5f8)!important;
  border-color:rgba(47,112,153,.22)!important;
  color:#315568!important;
  box-shadow:0 5px 14px rgba(43,77,92,.06)!important
}
html[data-site-theme="day"] :is(.trainer-fixed-case-header,.case-open) .progress-menu-toggle b{
  color:#28779b!important
}
html[data-site-theme="day"] .progress-menu-track{
  background:#dce8ed!important
}
html[data-site-theme="day"] .progress-menu-item{
  background:#f3f8fa!important;
  border:1px solid rgba(47,100,127,.10)!important;
  color:#607985!important
}
html[data-site-theme="day"] .progress-menu-item i{
  border-color:rgba(47,100,127,.22)!important;
  background:#fff!important;
  color:#66808e!important
}
html[data-site-theme="day"] .progress-menu-item.done{
  background:#e9f7f0!important;
  color:#2f7359!important
}
html[data-site-theme="day"] .progress-menu-item.done i{
  border-color:rgba(31,154,96,.34)!important;
  background:#dff3e9!important;
  color:#22825d!important
}


/* 2026-09-23: clean white day-theme switch surface. */
html[data-site-theme="day"] .site-theme-switch{
  background:#ffffff!important;
  border-color:rgba(47,100,127,.18)!important;
  color:#526f7d!important;
  box-shadow:0 7px 18px rgba(43,77,92,.08),inset 0 1px rgba(255,255,255,.9)!important
}
html[data-site-theme="day"] .site-theme-switch.is-day::before{
  background:linear-gradient(145deg,#fff2a8,#ffd365)!important;
  box-shadow:0 4px 11px rgba(168,120,31,.14)!important
}
html[data-site-theme="day"] .site-theme-switch .site-theme-switch-night{
  color:#496777!important;
  opacity:.68!important
}
html[data-site-theme="day"] .site-theme-switch.is-day .site-theme-switch-day{
  color:#684b08!important;
  opacity:1!important
}


/* Accreditation explanation modal: keep the underlying test visible in day mode. */
html[data-site-theme="day"] body:not(.admin-body) .accr-modal{
  background:rgba(23,49,63,.28)!important;
  border:0!important;
  box-shadow:none!important;
  color:inherit!important;
  backdrop-filter:blur(2px)!important;
  -webkit-backdrop-filter:blur(2px)!important
}
html[data-site-theme="day"] body:not(.admin-body) .accr-modal[hidden]{
  display:none!important
}
html[data-site-theme="day"] body:not(.admin-body) .accr-modal-card{
  background:#ffffff!important;
  border-color:rgba(47,100,127,.18)!important;
  color:#294b5c!important;
  box-shadow:0 -18px 52px rgba(43,77,92,.16)!important
}
html[data-site-theme="day"] body:not(.admin-body) .accr-modal-close{
  background:#f2f7fa!important;
  border:1px solid rgba(47,100,127,.15)!important;
  color:#315568!important
}
html[data-site-theme="day"] body:not(.admin-body) .accr-ai-loading{
  background:#f5f9fb!important;
  border-color:rgba(47,100,127,.16)!important;
  color:#526e7c!important
}

/* Give the home prompt enough definition against the pale day background. */
html[data-site-theme="day"] .chats-start-area .prompt-bar{
  border-color:rgba(37,111,149,.34)!important;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(35,93,125,.12)!important
}
html[data-site-theme="day"] .chats-start-area .prompt-bar textarea::placeholder{
  color:#536e7f!important;
  opacity:1
}
html[data-site-theme="day"] .chats-start-area .prompt-attach{color:#257ca8!important}
html[data-site-theme="day"] .chats-start-area .prompt-send{
  border-color:rgba(39,119,190,.32)!important;
  color:#2675bd!important
}

/* Preserve white lettering on the green home update badge. */
html[data-site-theme="day"] body:not(.admin-body) .home-nav-card .home-nav-update-badge,
html[data-site-theme="day"] body:not(.admin-body) .home-nav-card .home-nav-update-badge :is(span,strong,b){
  color:#ffffff!important;
  text-shadow:0 1px 2px rgba(7,73,44,.48)!important
}

/* Both "Новый раздел" and "Обновление" use this badge inside the home grid. */
html[data-site-theme="day"] body #app-root .home-nav-grid .home-nav-card .home-nav-update-badge{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-shadow:0 1px 2px rgba(8,64,38,.42)!important
}
