/* Shared interface tokens. Printed documents keep their own styles. */
:root{
 --ui-navy:#123b56;
 --ui-navy-deep:#102f45;
 --ui-teal:#086d76;
 --ui-teal-dark:#055b63;
 --ui-teal-soft:#e6f4f2;
 --ui-text:#193445;
 --ui-muted:#536c78;
 --ui-border:#d4e1e5;
 --ui-bg:#f1f5f6;
 --ui-surface:#fff;
 --ui-radius:12px;
 --ui-shadow:0 8px 25px #18384a0d;
 font-family:Tahoma,"Segoe UI",Arial,sans-serif;
}
body{background:var(--ui-bg);color:var(--ui-text)}
.top{background:var(--ui-navy);border-bottom:1px solid #ffffff20}
.brand{letter-spacing:.01em}
body .site-sidebar{background:var(--ui-navy-deep);box-shadow:-6px 0 30px #102f4533}
.site-sidebar .sidebar-group h2{color:#abd0d5;font-size:12px;margin-bottom:9px}
.site-sidebar .view-tabs button.active,.site-sidebar .sidebar-navigation>.home-nav-button.active{background:#e6f4f2;color:#104653;border-color:#b8dedb}
body .site-sidebar .sidebar-project #saveNamedProject,body .site-sidebar .sidebar-output #exportTop{background:var(--ui-teal);color:#fff}
.site-sidebar button:not(.sidebar-close){border-radius:var(--ui-radius)}
.panel,.home-projects,.home-card{border:1px solid var(--ui-border);border-radius:16px;box-shadow:var(--ui-shadow)}
.editor,.bank-panel{color:var(--ui-text)}
.editor h2,.bank-heading h2,.home-heading h2{color:var(--ui-navy);font-weight:800;line-height:1.5}
.preview-title h2{color:var(--ui-navy);font-weight:800}
.section-head{border-color:#e5ebed;color:var(--ui-navy)}
.question-card,.schedule-row,.day-editor,.bank-item{border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#f9fcfc}
.hint,.bank-heading p,.home-heading p,.home-local-note{color:var(--ui-muted)}
:is(#examView,#scheduleView,#timetableView,#bankView,.school-profile-dialog,.name-dialog,.home-projects) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select){
 border:1px solid #b9cbd1;border-radius:9px;background:var(--ui-surface);color:var(--ui-text);
 min-height:43px;
}
:is(#examView,#scheduleView,#timetableView,#bankView,.school-profile-dialog,.name-dialog,.home-projects) :is(input,textarea)::placeholder{color:#71838c;opacity:1}
:is(#examView,#scheduleView,#timetableView,#bankView,.school-profile-dialog,.name-dialog,.home-projects) :is(input:not([type=checkbox]):not([type=radio]),textarea,select):focus-visible{outline:2px solid var(--ui-teal);outline-offset:1px;border-color:var(--ui-teal)}
:is(.editor,.bank-panel,.home-view,.school-profile-dialog,.history-dialog,.install-dialog,.preflight-dialog,.name-dialog) button:not(.danger):not(.home-card){border-radius:9px;font-weight:700}
.primary,.editor .primary,.preflight-actions .primary{background:var(--ui-teal);color:#fff;min-height:44px}
.primary:hover,.editor .primary:hover,.preflight-actions .primary:hover{background:var(--ui-teal-dark)}
.subtle,.history-actions button,.project-item button,.home-project-tools button,.name-actions button{background:var(--ui-surface);border:1px solid #b7cbd0;color:#164958;min-height:40px}
.subtle:hover,.history-actions button:hover,.project-item button:hover,.home-project-tools button:hover,.name-actions button:hover{background:var(--ui-teal-soft)}
.add{background:var(--ui-teal-soft);border:1px dashed #69adb0;color:#075d65;min-height:46px}
.add:hover{background:#d5edeb;border-color:var(--ui-teal)}
.danger{border:1px solid #e6c4c4;background:#fff7f7;color:#9e343c;min-height:40px}
.danger:hover{background:#fce9e9}
.home-card{min-height:182px}.home-card-icon{background:var(--ui-teal-soft);color:var(--ui-teal)}
.home-hero{background:linear-gradient(112deg,var(--ui-navy) 0%,#186878 68%,#217d83 100%)}
.project-item{border-radius:var(--ui-radius);background:#fcfefe}
.project-item-actions button.action-open{background:var(--ui-teal);border-color:var(--ui-teal);color:#fff}
.project-item-actions button.action-open:hover{background:var(--ui-teal-dark)}
body :is(.preflight-dialog,.school-profile-dialog,.history-dialog,.install-dialog,.desktop-help,.name-dialog){border:1px solid var(--ui-border);border-radius:16px;box-shadow:0 24px 65px #102f4540;color:var(--ui-text)}
body :is(.preflight-dialog,.school-profile-dialog,.history-dialog,.install-dialog,.desktop-help,.name-dialog) h2{color:var(--ui-navy)}
.project-toolbar{row-gap:8px}
.project-toolbar #activeProjectLabel,.project-toolbar #projectStatus,.project-toolbar #draftStatus{display:inline-flex;align-items:center;width:auto;border:1px solid var(--ui-border);border-radius:999px;background:#fff;padding:7px 11px;color:#3e6270;font-size:12px;line-height:1.5}
.project-toolbar #activeProjectLabel{background:var(--ui-teal-soft);border-color:#c1deda;color:#075c64;font-weight:800}
.project-toolbar #projectStatus.error,.project-toolbar #draftStatus.error{background:#fff1f1;border-color:#e6c4c4;color:#a33137}
body .mobile-mode-switch{background:var(--ui-bg)}
.mobile-mode-switch button{border-radius:9px}
.mobile-mode-switch button[aria-pressed=true]{background:var(--ui-navy)}
:where(button,input,select,textarea,a):focus-visible{outline:3px solid #22a6a6;outline-offset:2px}
button:disabled{opacity:.58;cursor:not-allowed}
@media(max-width:700px){
 .layout,.bank-layout{gap:14px}
 .editor,.bank-panel{padding:18px}
 .project-toolbar #activeProjectLabel,.project-toolbar #projectStatus,.project-toolbar #draftStatus{max-width:100%;white-space:normal}
 .home-card{min-height:142px}
 .question-card,.schedule-row,.day-editor{padding:14px}
 :is(.qactions,.project-item-actions) button{min-height:44px}
}
@media(prefers-reduced-motion:reduce){.home-card,.site-sidebar{transition:none!important}}
@media print{body{background:white!important}.project-toolbar{display:none!important}}
