/* Theme switch and optional light palette. Dark remains the default. */
.theme-toggle{display:grid;place-items:center;flex:0 0 auto;width:38px;height:38px;padding:0;border:1px solid var(--line);border-radius:50%;background:rgba(255,255,255,.035);color:var(--muted);cursor:pointer;transition:border-color .18s,background-color .18s,color .18s,transform .18s}.theme-toggle:hover{border-color:var(--line2);background:var(--cyan-soft);color:var(--cyan);transform:translateY(-1px)}.theme-toggle__icon{position:relative;width:14px;height:14px;border:1.7px solid currentColor;border-radius:50%;box-shadow:0 -8px 0 -6px currentColor,0 8px 0 -6px currentColor,8px 0 0 -6px currentColor,-8px 0 0 -6px currentColor,6px 6px 0 -6px currentColor,-6px -6px 0 -6px currentColor,6px -6px 0 -6px currentColor,-6px 6px 0 -6px currentColor}
.site-header__inner>.theme-toggle{margin-left:auto}
html[data-theme="light"] .theme-toggle__icon{width:15px;height:15px;border:0;border-radius:50%;background:currentColor;box-shadow:-5px -3px 0 1px var(--panel);transform:rotate(-18deg)}
html[data-theme="light"]{color-scheme:light;--bg:#f4f8fb;--panel:#fff;--panel2:#edf4f8;--line:rgba(35,83,110,.18);--line2:rgba(14,118,153,.38);--text:#132b3a;--muted:#587183;--cyan:#087fa6;--cyan2:#0792bd;--cyan-soft:rgba(8,127,166,.09);--amber:#9b5d09;--green:#237451;--red:#b83c45;--shadow:0 22px 58px rgba(40,72,91,.13)}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}html[data-theme="light"] a:hover{color:#075f7c}
html[data-theme="light"] .atmosphere{background:radial-gradient(circle at 24% 14%,rgba(94,184,214,.2) 0,transparent 38%),linear-gradient(132deg,#f8fbfd,#eef5f9 52%,#f7fafc)}html[data-theme="light"] .atmosphere__grid{opacity:.45;background-image:linear-gradient(rgba(35,120,153,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(35,120,153,.1) 1px,transparent 1px)}html[data-theme="light"] .atmosphere__glow--one{background:rgba(48,173,211,.11)}html[data-theme="light"] .atmosphere__glow--two{background:rgba(255,180,82,.09)}
html[data-theme="light"] .site-header,html[data-theme="light"] .site-header--compact{background:rgba(248,251,253,.88);box-shadow:0 12px 30px rgba(40,72,91,.08)}html[data-theme="light"] .brand__text strong{color:#496779}html[data-theme="light"] .main-nav__link{color:#3d5c6f}html[data-theme="light"] .main-nav__link:hover,html[data-theme="light"] .main-nav__link[aria-current="page"]{color:#0e6f90}html[data-theme="light"] .nav-toggle i{background:#48697c}html[data-theme="light"] .theme-toggle{background:#fff;color:#496b7e}
html[data-theme="light"] .main-nav,html[data-theme="light"] .main-nav__submenu,html[data-theme="light"] .main-nav__submenu:before,html[data-theme="light"] .admin-actions-menu__panel{background:rgba(255,255,255,.98)}

/* Shared surfaces, including feature-specific stylesheets loaded before this file. */
html[data-theme="light"] :is(.login-panel,.form-section,.preregistration-card,.registration-panel,.structure-storage-summary,.resource-hub__card,.structure-documents,.official-rubric){background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(237,245,249,.94))}
html[data-theme="light"] :is(.flash,.data-table-wrap,.structure-card,.metric-card,.role-grid,.module-card,.resource-strip,.command-status,.structure-files-panel,.structure-file-row,.group-responsibility-card,.group-management-card,.resource-intro,.resource-subsection,.resource-admin__list,.document-card,.job-card,.official-qcm-summary,.official-question-list li,.official-question-card,.qcm-editor-form fieldset,.qcm-editor-answer,.quiz-builder,.quiz-session,.quiz-question,.quiz-result,.candidate-card,.candidate-profile-card,.candidate-section,.flight-control-card,.flight-force-card,.roll-call-card,.guide-card,.onboarding-card){background:rgba(255,255,255,.9)}
html[data-theme="light"] :is(.document-card,.job-card,.official-rubric,.module-card,.structure-card):hover{background:#fff}
html[data-theme="light"] :is(.setting-control,.group-responsibility-card__trainers label,.registration-panel__actions--summary>span,.official-rubric__years a,.official-question-list .qcm-answer-list>li,.qcm-editor-answer,.quiz-answer,.consent-control,.preregistration-document){background:rgba(229,239,245,.65)}
html[data-theme="light"] .form-actions{background:linear-gradient(transparent,rgba(244,248,251,.98) 35%)}

/* Native controls and rich-text fields. */
html[data-theme="light"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.wysiwyg__editor){background:#fff!important;color:var(--text)!important}html[data-theme="light"] :is(input,select,textarea)::placeholder{color:#8296a3!important}html[data-theme="light"] :is(input[readonly],input:disabled,select:disabled,textarea:disabled){background:#eaf0f3!important;color:#6e828e!important}html[data-theme="light"] option{background:#fff;color:var(--text)}html[data-theme="light"] .wysiwyg__toolbar{background:#eaf2f6}html[data-theme="light"] .wysiwyg__toolbar button{color:#36596d}

/* Text colors originally tuned for dark surfaces. */
html[data-theme="light"] :is(.field label,.data-table td,.data-table td strong,.job-card__content,.job-card__content h3,.qcm-answer p,.qcm-answer--correct p,.qcm-explanation__content,.qcm-editor-form label,.consent-control,.preregistration-document,.trainer-form select,.search-form select,.structure-upload-form select,.structure-upload-form input[type=file]){color:var(--text)}
html[data-theme="light"] :is(.site-footer,.site-footer strong,.login-panel__footer,.field__control>svg,.field input::placeholder,.form-section__heading p,.entity-form .field small,.setting-control small,.registration-panel__status,.data-table th,.module-card__coverage,.module-card__coverage strong,.official-question-card>footer){color:var(--muted)}
html[data-theme="light"] :is(.button--ghost,.main-nav__submenu a,.admin-actions-menu__panel a){color:#294a5d}html[data-theme="light"] :is(.button--ghost:hover,.admin-actions-menu__panel a:hover){color:#075f7c}html[data-theme="light"] .form-alert{color:#8c2931;background:rgba(184,60,69,.08)}html[data-theme="light"] .status-pill{color:#256a4d;background:rgba(35,116,81,.08)}

/* QCM training: its visible panels use more specific component classes than the generic quiz wrappers. */
html[data-theme="light"] .quiz-training-page{--quiz-green:#237451;--quiz-red:#b83c45}
html[data-theme="light"] :is(.quiz-coverage,.quiz-builder__modes,.quiz-builder__section,.quiz-history,.quiz-question-card){background:rgba(255,255,255,.94);box-shadow:0 16px 42px rgba(40,72,91,.1)}
html[data-theme="light"] :is(.quiz-mode-card span,.quiz-rubric-card,.quiz-options-row fieldset,.quiz-switch,.quiz-history__list a,.quiz-structure-set-card){background:rgba(237,244,248,.78);color:var(--text)}
html[data-theme="light"] :is(.quiz-mode-card span,.quiz-rubric-card,.quiz-options-row fieldset,.quiz-switch,.quiz-history__list a,.quiz-structure-set-card):hover{background:#fff}
html[data-theme="light"] .quiz-mode-card input:checked+span{border-color:var(--cyan);background:var(--cyan-soft);box-shadow:inset 0 0 0 1px rgba(8,127,166,.12)}
html[data-theme="light"] .quiz-mode-card--exam input:checked+span{border-color:var(--amber);background:rgba(155,93,9,.08)}
html[data-theme="light"] .quiz-rubric-card:has(.quiz-rubric-card__check input:checked){border-color:rgba(8,127,166,.48);background:var(--cyan-soft)}
html[data-theme="light"] .quiz-rubric-card__check input:checked+i{box-shadow:inset 0 0 0 4px #fff}
html[data-theme="light"] .quiz-switch>span{background:#aebfc9}
html[data-theme="light"] .quiz-switch input:checked+span{background:var(--cyan)}
html[data-theme="light"] .quiz-session__progress{background:rgba(35,83,110,.14)}
html[data-theme="light"] .quiz-timer{color:var(--amber)}
html[data-theme="light"] .quiz-answer:hover,html[data-theme="light"] .quiz-answer:has(input:checked){background:var(--cyan-soft)}
html[data-theme="light"] .quiz-answer--correct,html[data-theme="light"] .quiz-answer--correct:hover{background:rgba(35,116,81,.1)!important}
html[data-theme="light"] .quiz-answer--wrong,html[data-theme="light"] .quiz-answer--wrong:hover{background:rgba(184,60,69,.09)!important}
html[data-theme="light"] .quiz-correction{background:rgba(35,116,81,.08);color:var(--text)}
html[data-theme="light"] .quiz-correction--error{background:rgba(184,60,69,.07)}
html[data-theme="light"] .quiz-correction .qcm-explanation__content,html[data-theme="light"] .quiz-correction .qcm-explanation__content :is(h1,h2,h3,h4,h5,h6){color:var(--text)}
html[data-theme="light"] .quiz-catchup{border-color:rgba(184,60,69,.25);background:rgba(184,60,69,.055)}

/* Media viewers and aviation instruments intentionally retain dark cockpits. */
html[data-theme="light"] :is(.qcm-image-button,.qcm-media-dialog,.structure-photo-dialog,.structure-photo-preview,.instrument-panel,.flight-control-simulator,.flight-force-simulator){color:#f3f8fb}html[data-theme="light"] :is(.qcm-media-dialog,.structure-photo-dialog){background:#102331;box-shadow:0 24px 90px rgba(15,35,49,.42)}html[data-theme="light"] :is(.qcm-media-dialog,.structure-photo-dialog)::backdrop{background:rgba(20,42,56,.72)}
/* Presentation page: keep every surface readable in the light palette. */
html[data-theme="light"] .presentation-hero__facts span{background:rgba(255,255,255,.82);color:#496779}
html[data-theme="light"] .presentation-trust{background:rgba(255,255,255,.58)}
html[data-theme="light"] .presentation-feature-card{background:linear-gradient(150deg,rgba(255,255,255,.98),rgba(237,245,249,.94));box-shadow:0 12px 34px rgba(40,72,91,.08)}
html[data-theme="light"] .presentation-feature-card li{color:#3f5f72}
html[data-theme="light"] .presentation-section--roles{background:linear-gradient(135deg,rgba(208,235,244,.62),rgba(244,248,251,.72))}
html[data-theme="light"] .presentation-role-grid article{background:rgba(255,255,255,.88);box-shadow:0 12px 34px rgba(40,72,91,.07)}
html[data-theme="light"] .presentation-steps li{background:rgba(255,255,255,.9)}
html[data-theme="light"] .presentation-cta{background:linear-gradient(135deg,#245f73,#0b2637);color:#f3f8fb;box-shadow:0 18px 46px rgba(26,70,91,.2)}
html[data-theme="light"] .presentation-cta :is(h2,.section-kicker){color:#f3f8fb}
html[data-theme="light"] .presentation-cta p{color:#c5d6df}
html[data-theme="light"] .presentation-cta .button--ghost{border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.06);color:#f3f8fb}
html[data-theme="light"] .presentation-cta .button--ghost:hover{border-color:rgba(255,255,255,.58);background:rgba(255,255,255,.13);color:#fff}
html[data-theme="light"] .back-to-top{background:rgba(255,255,255,.94);box-shadow:0 12px 34px rgba(40,72,91,.16)}
html[data-theme="light"] .structure-file-selection-bar>span:first-child{color:#36596d;font-weight:600}html[data-theme="light"] .structure-file-row small{color:#496779}html[data-theme="light"] .structure-file-row--selected{border-color:rgba(8,127,166,.72);background:rgba(8,127,166,.11)}html[data-theme="light"] .structure-file-selector span{border-color:#557383;background:#fff}html[data-theme="light"] .structure-file-selector input:checked+span{border-color:#087fa6;background:#087fa6}html[data-theme="light"] .structure-file-selector input:checked+span::after{color:#fff}html[data-theme="light"] .structure-file-selection-bar .button:disabled{opacity:.62;color:#6c7f8a}html[data-theme="light"] .structure-file-selection-bar .button--danger:not(:disabled){border-color:rgba(184,60,69,.5);background:rgba(184,60,69,.1);color:#9d2f38}

/* Administration dashboards and shared cards. */
html[data-theme="light"] :is(.command-status strong,.metric-card>strong,.structure-card__metrics strong,.registration-panel__actions--summary strong,.candidate-metrics strong,.profile-summary strong){color:var(--text)}
html[data-theme="light"] :is(.metric-card>span,.metric-card>small,.command-status small,.structure-card__metrics span,.structure-card__footer>span,.section-index,.module-card__meta,.document-editor summary small,.document-editor summary em){color:var(--muted)}
html[data-theme="light"] .module-card__meta strong{color:var(--text)}
html[data-theme="light"] :is(.collapsible-admin,.collapsible-admin[open],.document-editor,.candidate-group-row){background:rgba(255,255,255,.9)}
html[data-theme="light"] .collapsible-admin>.section-heading:after{background:#fff;color:#294a5d}
html[data-theme="light"] .preview-banner{color:var(--text)}

/* Candidate lists, candidate.php and profile pages. */
html[data-theme="light"] :is(.candidates-page,.candidate-detail-page,.trombinoscope-page){--candidate-panel:rgba(255,255,255,.92)}
html[data-theme="light"] :is(.candidate-metrics,.candidate-filters,.candidate-panel,.group-assign-list,.trombi-card,.profile-summary,.profile-card,.profile-form,.profile-request-card){background:rgba(255,255,255,.92)}
html[data-theme="light"] :is(.candidate-row,.trombi-card):hover{background:#fff}
html[data-theme="light"] :is(.candidate-filters label>span,.candidate-form label>span,.profile-summary span,.profile-form .field small){color:#496779}
html[data-theme="light"] :is(.candidate-empty strong,.profile-summary strong,.profile-request-card p){color:var(--text)}
html[data-theme="light"] .status-badge{color:#496779}
html[data-theme="light"] .candidate-form input[readonly]{opacity:1}
html[data-theme="light"] .document-card i{background:rgba(35,83,110,.08);color:#496779}
html[data-theme="light"] .group-assign-item:hover{background:var(--cyan-soft)}

/* QCM progress and printable QCM builders. */
html[data-theme="light"] :is(.student-progress-summary>div,.student-progress-filters,.student-progress-table-wrap,.student-progress-table tbody tr,.qcm-print-field,.qcm-print-rubrics span,.qcm-print-disabled__body){background:rgba(255,255,255,.92);color:var(--text)}
html[data-theme="light"] :is(.student-progress-table thead th,.student-progress-table tbody>tr>th){background:#eaf2f6}
html[data-theme="light"] .student-progress-filters label>span{color:#496779}
html[data-theme="light"] .student-progress-meter{background:rgba(35,83,110,.16)}

/* Roll calls. */
html[data-theme="light"] .roll-call-scroll{background:rgba(255,255,255,.92)}
html[data-theme="light"] .roll-call-table thead th{background:#eaf2f6}
html[data-theme="light"] .roll-call-table__remove{background:#fff;color:#496779}
html[data-theme="light"] .roll-call-table tbody tr:hover{background:var(--cyan-soft)}

/* Community questions and QCM editor content. */
html[data-theme="light"] .custom-question-nav{background:rgba(248,251,253,.96)}
html[data-theme="light"] :is(.custom-question-card,.qcm-selected-image){background:rgba(255,255,255,.92);color:var(--text)}
html[data-theme="light"] .custom-question-nav a{color:#36596d}
html[data-theme="light"] .custom-question-warning{background:rgba(155,93,9,.09);color:#754707}
html[data-theme="light"] .custom-answer-list li{background:rgba(237,244,248,.72);color:#36596d}
html[data-theme="light"] .custom-answer-list li.is-correct{background:rgba(35,116,81,.1);color:#1d5f43}
html[data-theme="light"] :is(.custom-vote-form label,.custom-feedback-list p,.custom-rich-explanation,.qcm-explanation__content h1,.qcm-explanation__content h2,.qcm-explanation__content h3,.qcm-explanation__content h4,.qcm-explanation__content h5,.qcm-explanation__content h6){color:var(--text)}
html[data-theme="light"] :is(.qcm-explanation__content blockquote,.custom-rich-explanation blockquote){background:var(--cyan-soft);color:#36596d}
html[data-theme="light"] .custom-feedback-list article{background:rgba(155,93,9,.06)}

/* Flight lesson panels: diagrams stay dark, surrounding reading panels become light. */
html[data-theme="light"] :is(.fc__cockpit,.fc__axis,.ff__panel){background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(237,245,249,.94))}
html[data-theme="light"] :is(.fc__pedal,.fc__stat,.ff__stat,.ff__slider-value){background:rgba(255,255,255,.9)}
html[data-theme="light"] :is(.fc__readout>p,.fc__axis-note,.ff__readout>p,.ff__legend-strip span,.fc__pedal,.ff__slider-wrap label,.structure-request-form label){color:#36596d}
@media(max-width:700px){html[data-theme="light"] .main-nav{background:rgba(255,255,255,.98)}}@media print{.theme-toggle{display:none!important}}
