/* Shared theme: public pages and every portal use the same saved preference. */
:root[data-theme="light"]{color-scheme:light}
.theme-picker{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;font:500 12px/1.4 var(--font-body,sans-serif);color:var(--ink,#172238);background:var(--paper,#f3f5f9);border:1px solid var(--line,#bac3d2);border-radius:9px;padding:5px 9px;margin:0 44px 16px auto;letter-spacing:normal}
.theme-picker select{font:inherit!important;width:auto!important;min-width:80px;margin:0!important;padding:5px!important;color:inherit!important;background:transparent!important;border:0!important;cursor:pointer}
.theme-picker-floating{position:fixed;right:16px;bottom:16px;z-index:30;margin:0;box-shadow:0 4px 20px #0003}
.theme-picker:focus-within{outline:2px solid #789de3;outline-offset:3px}
html[data-theme="dark"]{color-scheme:dark;--blue:#89aaff;--electric:#91b1fa;--ink:#e0e7f2;--paper:#141c29;--muted:#a8b5c9;--line:#39465b;--night:#101723;--lime:#9bb773;--surface:#1c2738;--surface-raised:#243248;--accent-fill:#34558c;--success-bg:#193d32;--success-text:#a2dfbc;--warning-bg:#413623;--warning-text:#ecd09a;--danger-bg:#492c35;--danger-text:#ffb7be}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
html[data-theme="dark"] :is(.simple-page,.panel-return-bar,.hero-stage,.payment-plans-dialog){background:var(--paper)!important;color:var(--ink)}
html[data-theme="dark"] :is(.nav-wrap,.simple-nav){background:#141c29f2!important;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(dialog,.modal,.portal-modal,.auth-card,.checkout-form,.order-summary,.real-form,.real-course-list article,.course-syllabus,.course-requirements,.real-empty,.assignment-card,.teacher-layout,.inbox-item,.admin-summary-grid>div,.quick-actions,.crm-layout,.lead-row,.payment-table,.offer-grid article,.teacher-grid article,.student-welcome,.student-next,.student-task-preview,.student-course-grid>article,.comms fieldset,.curriculum-editor details,.curriculum-public details,.recording-course,.recording-card,.student-notification-center,.registered-table-wrap,.enrollment-overview,.task-course-group,.calendar-event,.calendar-day,.calendar-blank,.payment-plan-grid article,.start-calendar,.catalog-gallery-item,.catalog-image-slot,.metric,.dash-list,.portal-options button){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea){background:#141e2e!important;color:var(--ink)!important;border-color:#52617a!important;accent-color:#89aaff}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#97a6bc;opacity:1}
html[data-theme="dark"] :is(input[type=checkbox],input[type=radio]){accent-color:#6389ce}
html[data-theme="dark"] :is(button,.button,.login-button,.interest-button,.admin-secondary,.payment-plans-trigger){background:var(--surface-raised);color:var(--ink);border-color:#52617a;box-shadow:none}
html[data-theme="dark"] :is(.button.primary,.button.inverse,.admin-primary,.submit-assignment,.publish-feedback,.real-form button[type=submit],.student-nav button[aria-pressed=true]){background:var(--accent-fill)!important;color:#f1f5ff!important;border-color:#6381b5!important;box-shadow:none!important}
html[data-theme="dark"] :is(button,.button):disabled{opacity:.55;cursor:not-allowed}
html[data-theme="dark"] :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid #a8c3ff;outline-offset:3px}
html[data-theme="dark"] :is(.admin-tabs button,.student-nav button,.calendar-toolbar button,.quick-actions button,.payment-filters button,.convert-lead,.price-currency-select select){color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.student-nav button,.calendar-toolbar button,.quick-actions button,.payment-filters button,.convert-lead){background:var(--surface-raised)}
html[data-theme="dark"] :is(.admin-tabs button.active,.admin-tabs button[aria-selected=true]){color:#b6ceff;border-color:#8cadf1}
html[data-theme="dark"] :is(.modal-close,.grant-close,.payment-plans-close){background:transparent!important;color:var(--ink)!important}
html[data-theme="dark"] :is(.real-logout,.enrollment-actions button){color:var(--danger-text);border-color:#ba7884;background:transparent}
html[data-theme="dark"] :is(.admin-stats article,.student-stats>div,.master-totals,.registered-table th,.enrollment-overview th,.payment-table .table-head,.interest-group>summary,.catalog-gallery-picker,.catalog-video-picker,.catalog-image-editor,.inline-form,.feedback-mini,.role-note,.comms-preview,.comms-live,.student-notification-item,.student-status,.activity-state,.teacher-courses span,.lead-icon,.pay-icon,.avatar,.teacher-line>span,.course-timezone-notice,.curriculum-editor [role=status],.interest-message){background:var(--surface-raised)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(th,td,fieldset,.enrollment-table-scroll,.enrollment-installment,.registered-table td,.interest-group,.interest-row,.calendar-event,.student-nav,.admin-tabs,.dash-head,.panel-return-bar){border-color:var(--line)!important}
html[data-theme="dark"] :is(.calendar-day.has-event,.inbox-item.active,.inbox-item:hover,.lead-row.active,.lead-row:hover,.comms-theme:has(input:checked),.payment-choice label:has(input:checked)){background:#2a3d5c!important;color:#dbe8ff!important}
html[data-theme="dark"] :is(.start-calendar .calendar-day[aria-pressed=true],.payment-filters button.active){background:var(--accent-fill)!important;color:#fff!important}
html[data-theme="dark"] :is(.course-workload,.grant-person,.grant-note,.enrollment-overview small,.enrollment-legal-note,.real-empty,.calendar-event p,.comms-live-heading p,.teacher-line,.course-meta,.viewer-timezone,.viewer-time-note){color:var(--muted)!important}
html[data-theme="dark"] :is(.registered-status,.enrollment-badge.ok,.enrollment-overview .legal-tile.ok,.quorum-ready,.selected-file,.course-publication-badge.is-published,[data-save-state="saved"],.activity-state[data-state="active"]){background:var(--success-bg)!important;color:var(--success-text)!important;border-color:#497762!important}
html[data-theme="dark"] :is(.enrollment-badge.pending,.enrollment-overview .legal-tile.pending,[data-save-state="error"],.student-notification-item.is-unread){background:var(--danger-bg)!important;color:var(--danger-text)!important;border-color:#92616a!important}
html[data-theme="dark"] :is(.room-missing-warning,.room-missing-warning p,.course-meet-warning,.grant-course-dialog .real-form .grant-extra,[data-save-state="pending"],.activity-state[data-state="ended"],.seat-badge.last-seats){background:var(--warning-bg)!important;color:var(--warning-text)!important;border-color:#8c7652!important}
html[data-theme="dark"] :is(.enrollment-badge,.enrollment-overview .legal-tile,.course-publication-badge.is-draft,.closed-state,.student-status.past){background:#2c3547;color:#c3cddd}
html[data-theme="dark"] .registered-active{text-decoration-color:#80c49c}
html[data-theme="dark"] .student-nav [data-student-tab="legal"].legal-required-pending{background:#763442!important;color:#fff!important}
html[data-theme="dark"] .student-nav [data-student-tab="legal"].legal-required-complete{background:#28543e!important;color:#e4ffeb!important}
html[data-theme="dark"] .student-legal-bell{background:#462833;color:#ffd1d7}
html[data-theme="dark"] :is(.real-price,.cta-inner,.workshop-card.coming){background:#243b40!important;color:var(--ink)!important}
html[data-theme="dark"] :is(.hero-actions .button.primary,[data-real-catalog] .catalog-card-footer .interest-button,.interest-button){background:#2d466d!important;color:#edf3ff!important;border-color:#7c94b6!important}
html[data-theme="dark"] :is(.outcomes article:hover,.week-list article:hover,.upload-zone){background:var(--surface-raised);color:var(--ink)}
html[data-theme="dark"] .hero-stage::after{background:linear-gradient(90deg,#101a2bdb,#101a2b66)!important}
html[data-theme="dark"] .comms-frame,html[data-theme="dark"] .comms-live-frame{color-scheme:light;background:white}
@media(max-width:560px){.theme-picker-floating{right:10px;bottom:10px}.theme-picker{font-size:11px}}
html[data-theme="dark"] :is(.contact-payment,.class-library article,.delivery-receipt,.inbox-course,.inbox-delivery,.grade-master,.grade-course,.feedback-received li){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(.auth-real .auth-switch,.delivery-picker,.inbox-task,.feedback-editor,.feedback-upload,.feedback-received,.feedback-received h5 span,.dossier-button){background:var(--surface-raised)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(.auth-real .auth-switch button.active,.teacher-nav button[aria-pressed=true],.inbox-task[aria-pressed=true],.feedback-editor button,.feedback-download){background:var(--accent-fill)!important;color:#f1f5ff!important}
html[data-theme="dark"] :is(.teacher-nav button,.feedback-upload button,.class-library article>button){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.student-intro,.student-stats span,.student-footnote,.delivery-form small,.delivery-expiry,.inbox-course summary small,.inbox-delivery summary small,.feedback-grade,.feedback-editor [role=status],.feedback-upload summary small,.feedback-file-list small,.feedback-file-info small,.feedback-file-expired,.feedback-author small,.auth-real .remember,.comms small,.admin-stats span,.admin-stats small,.catalog-image-slot small,.teacher-location small,.enrollment-people small,.interest-row small,.course-free-toggle,.vixel-calendar>p,.calendar-weekdays span,.calendar-day small,.payment-plans-dialog>p,.payment-plan-grid small,.price-currency-note small,.interest-group>summary>span,.interest-person>span){color:var(--muted)!important}
html[data-theme="dark"] :is(.calendar-event time,.calendar-event strong,.calendar-event>span,.feedback-received h5,.feedback-file-info strong,.feedback-author strong,.comms legend,.admin-stats strong,.real-price .price-seat-availability){color:var(--ink)!important}
html[data-theme="dark"] :is(.delivery-success,.feedback-upload .delivery-sent,.status.paid,.offer-state.published){background:var(--success-bg)!important;color:var(--success-text)!important}
html[data-theme="dark"] .auth-error{background:var(--danger-bg)!important;color:var(--danger-text)!important}
html[data-theme="dark"] a:not([class]){color:#b0c7ff}
@media print{.theme-picker{display:none!important}}
/* Portal section navigation: shared tab appearance; existing handlers stay unchanged. */
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav){
 --tab-surface:var(--surface,#fff);
 display:flex;flex-wrap:nowrap;align-items:stretch;gap:4px;
 max-width:100%;min-width:0;margin:0 0 24px;padding:14px 2px 0;
 border:0!important;background:linear-gradient(var(--line,#cdd4e0),var(--line,#cdd4e0)) left bottom/100% 1px no-repeat;
 overflow-x:auto;scrollbar-width:thin;scrollbar-color:#9aa8bf transparent;scroll-padding-inline:8px;
}
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button{
 flex:0 0 auto;position:relative;min-height:48px;margin:0;padding:12px 16px;
 border:1px solid transparent;border-top-width:2px;border-radius:8px 8px 0 0;
 font:600 13px/1.4 var(--font-body,sans-serif);white-space:nowrap;cursor:pointer;
 box-shadow:none!important;transition:background-color .15s,border-color .15s;
}
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button:not(.legal-required-pending):not(.legal-required-complete){
 background:transparent!important;color:var(--blue,#1646ed)!important;border-color:transparent!important;
}
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button:not(.active):not([aria-pressed=true]):not(.legal-required-pending):not(.legal-required-complete):hover{
 background:color-mix(in srgb,var(--blue,#1646ed) 7%,transparent)!important;
 border-color:var(--line,#cdd4e0);border-bottom-color:transparent;
}
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button:is(.active,[aria-pressed=true],[aria-selected=true]){
 border-color:var(--line,#cdd4e0)!important;border-top-color:var(--blue,#1646ed)!important;border-bottom-color:var(--tab-surface)!important;
}
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button:is(.active,[aria-pressed=true],[aria-selected=true]):not(.legal-required-pending):not(.legal-required-complete){
 background:var(--tab-surface)!important;color:var(--ink,#172238)!important;
 border-color:var(--line,#cdd4e0)!important;border-top-color:var(--blue,#1646ed)!important;border-bottom-color:var(--tab-surface)!important;
}
.dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button:focus-visible{
 outline:2px solid var(--blue,#1646ed);outline-offset:-5px;
}
.dashboard .admin-tabs>a{flex:0 0 auto;align-self:center;white-space:nowrap;margin:0 4px 6px 12px}
@media(max-width:700px){
 .dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button{padding:12px 13px;font-size:13px}
}
@media(prefers-reduced-motion:reduce){
 .dashboard :is(.admin-tabs,.teacher-nav,.student-nav)>button{transition:none}
}

/* Student calendar: deadlines remain visible in both themes. */
.calendar-legend,.calendar-markers{display:flex;gap:12px;flex-wrap:wrap}.calendar-markers{gap:5px;margin-top:6px}.calendar-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:currentColor}.calendar-task-color{color:#c26812}.calendar-project-color{color:#bd343e}.calendar-class-color{color:#2759b2}
.calendar-event.calendar-task{border-left:4px solid #d77a1f!important;background:#fff3e3!important}.calendar-event.calendar-project{border-left:4px solid #c83c49!important;background:#fff0f1!important}.calendar-project time,.calendar-project>span{color:#9f2430}
html[data-theme=dark] .calendar-event.calendar-task{background:#392d20!important;border-left-color:#f5ac4e!important}html[data-theme=dark] .calendar-event.calendar-project{background:#3b242c!important;border-left-color:#ff8891!important}html[data-theme=dark] .calendar-task-color{color:#f5ac4e}html[data-theme=dark] .calendar-project-color{color:#ff8891}
