/* Dark is an account theme. Its geometry is shared with Clear; colors are explicit. */
:root[data-theme=dark]{color-scheme:dark;--bg:#15191f;--ink:#e6ebf3;--muted:#a1aec0;--line:#2d3643;--purple:#8cbaff;--green:#7dbb96;--shadow:none;--surface:#1c222b;--raised:#242d39;--subtle:#181e26;--accent-bg:#243a57}
:root[data-theme=dark] body{background:var(--bg);color:var(--ink)}
:root[data-theme=dark] :is(h1,h2,h3,h4){color:#e7ecf5}
:root[data-theme=dark] :is(.eyebrow,.fine,.muted){color:var(--muted)}
:root[data-theme=dark] a,:root[data-theme=dark] .text-btn{color:#96beff}
:root[data-theme=dark] :is(button,input,select,textarea,a,summary):focus-visible{outline:2px solid #8cbaff;outline-offset:3px}
:root[data-theme=dark] :is(input,select,textarea){color:#e2e9f5;background:#171d25;border-color:#39465a;accent-color:#8cbaff}
:root[data-theme=dark] :is(input,textarea)::placeholder{color:#8d9bb0;opacity:1}
:root[data-theme=dark] :is(input,select,textarea):disabled{background:#222a35;color:#8e9aae}
:root[data-theme=dark] select option{background:#1b222c;color:#e2e9f5}
:root[data-theme=dark] form label{color:#b3bfd1}
:root[data-theme=dark] .primary{background:#316fca;color:#fff;border-color:#316fca;box-shadow:none}
:root[data-theme=dark] .primary:hover{background:#3d7dd6;box-shadow:none}
:root[data-theme=dark] .outline{background:#1c2430;color:#c2cfe1;border-color:#364356}
:root[data-theme=dark] .outline:hover,:root[data-theme=dark] .icon:hover{background:#29384e;color:#b8d4ff}
:root[data-theme=dark] .icon{color:#a4b4cb}
:root[data-theme=dark] .sidebar{background:#11161d;border-color:var(--line)}
:root[data-theme=dark] .sidebar .wordmark{color:#ecf1f9}
:root[data-theme=dark] .sidebar .logo{background:#223247;color:#9ec5ff}
:root[data-theme=dark] .side-label{color:#9aabc1}
:root[data-theme=dark] .sidebar .nav{color:#aebdd1}
:root[data-theme=dark] .sidebar .nav.active{color:#a4caff;background:#243a57}
:root[data-theme=dark] .sidebar .nav:hover{background:#202b3c}
:root[data-theme=dark] .sidebar .nav.active:hover{background:#2a4263}
:root[data-theme=dark] .nav small{background:#2d3a4e;color:#c3d6f1}
:root[data-theme=dark] .class-filter{color:#b1bed1}
:root[data-theme=dark] .class-filter:hover{background:#222d3d}
:root[data-theme=dark] .profile{border-color:var(--line)}
:root[data-theme=dark] .profile strong{color:#d5dfed}
:root[data-theme=dark] .profile small{color:#a6b5c9}
:root[data-theme=dark] .profile>span:first-child{background:#2b394b;color:#c7d9f2}
:root[data-theme=dark] .online{background:#8cc4a0}
:root[data-theme=dark] .side-divider{border-color:var(--line)}
:root[data-theme=dark] .summary{background:var(--bg);border-color:var(--line);box-shadow:none}
:root[data-theme=dark] .summary>div{border-color:var(--line)}
:root[data-theme=dark] .summary strong{color:#e3eaf6}
:root[data-theme=dark] .summary :is(small,em){color:#a9b6c9}
:root[data-theme=dark] .gpa-mode-select{background:#1c2430;color:#bfcee4;border-color:#39485e}
:root[data-theme=dark] :is(.calendar-card,.school-month-card,.school-day-card,.school-events-card,.school-week-card,.custom-class-list,.school-unavailable){background:var(--surface);border-color:var(--line);box-shadow:none}
:root[data-theme=dark] .calendar-toolbar{background:var(--surface)}
:root[data-theme=dark] .view-switch{background:#161d27;border-color:#364153}
:root[data-theme=dark] .view-switch button{color:#acbdd5}
:root[data-theme=dark] .view-switch .selected{color:#b6d3ff;background:#253c5b;box-shadow:none}
:root[data-theme=dark] .search-line{background:#1a212a;border-color:var(--line);color:#95a8c2}
:root[data-theme=dark] .search-line input{background:transparent;color:#dce5f3}
:root[data-theme=dark] .keycap{border-color:#3a4557;color:#9db0c9}
:root[data-theme=dark] .day-headings{background:#181f28;border-color:var(--line)}
:root[data-theme=dark] .day-headings span{color:#adbbd0}
:root[data-theme=dark] .day{background:var(--surface);border-color:var(--line)}
:root[data-theme=dark] .day.other{background:#171d25}
:root[data-theme=dark] .day.other .day-number{color:#7e8da4}
:root[data-theme=dark] .day.today{background:#1c293b}
:root[data-theme=dark] .day-number{color:#bac8dc}
:root[data-theme=dark] .day.today .day-number{background:#316fca;color:#fff}
:root[data-theme=dark] .p0{--course:#7da9e5;--tint:#21334a;--text:#b5d3ff}
:root[data-theme=dark] .p1{--course:#d8b875;--tint:#383123;--text:#edcf91}
:root[data-theme=dark] .p2{--course:#80bb98;--tint:#22372d;--text:#b4dec2}
:root[data-theme=dark] .p3{--course:#aa8dd7;--tint:#302940;--text:#d0b9f2}
:root[data-theme=dark] .p4{--course:#d18fa4;--tint:#3b2933;--text:#edb9c9}
:root[data-theme=dark] .p5{--course:#79bdc2;--tint:#21383d;--text:#b0dfe2}
:root[data-theme=dark] .event-chip{border-color:var(--course);background:var(--tint);color:var(--text)}
:root[data-theme=dark] .event-chip:hover{filter:brightness(1.12)}
:root[data-theme=dark] .event-chip.done{opacity:.7}
:root[data-theme=dark] .more{color:#acbdd7}
:root[data-theme=dark] .calendar-footer{background:var(--surface);border-color:var(--line);color:#a7b6cb}
:root[data-theme=dark] .panel-intro{color:#a0afc4}
:root[data-theme=dark] .badge{background:#2a374b;color:#bed0ed}
:root[data-theme=dark] .radar-item{background:transparent;border-color:var(--line)}
:root[data-theme=dark] .radar-title{color:#e0e8f5}
:root[data-theme=dark] :is(.due-label,.course-label,.dismiss,.radar-bottom){color:#acbad0}
:root[data-theme=dark] .radar-bottom{border-color:var(--line)}
:root[data-theme=dark] .type-badge{background:var(--tint);color:var(--text)}
:root[data-theme=dark] .check-circle{border-color:#778ba8;color:#b6d4ff}
:root[data-theme=dark] .dismiss:hover{color:#b8d5ff}
:root[data-theme=dark] .grades-head>span{color:#a7b6cb}
:root[data-theme=dark] .grade-track{background:#3b3440}
:root[data-theme=dark] .grade-track>div{background:#be91a0}
:root[data-theme=dark] .grade-alert{background:#34262e;border-color:#624052}
:root[data-theme=dark] .grade-alert small{color:#d3aebb}
:root[data-theme=dark] .grade-alert .grade-row>span{color:var(--score)}
:root[data-theme=dark] .score-gold{--score:#f0d18b;--score-bg:#3a3323;--score-border:#776338}
:root[data-theme=dark] .score-green{--score:#a0d6b2;--score-bg:#24392e;--score-border:#416b51}
:root[data-theme=dark] .score-red{--score:#efa9b5;--score-bg:#3b2831;--score-border:#765060}
:root[data-theme=dark] .score-flagged{--score:#d6b4e7;--score-bg:#352b40;--score-border:#725583}
:root[data-theme=dark] .score-neutral{--score:#b6c1d3;--score-bg:#293242;--score-border:#4c5c72}
:root[data-theme=dark] :is(.score-chip,.published-grade,.course-overall){background:var(--score-bg);color:var(--score);border-color:var(--score-border);box-shadow:none}
:root[data-theme=dark] :is(.score-chip.score-gold,.published-grade.score-gold,.course-overall.score-gold){background:#3a3323;box-shadow:none;color:#f0d18b}
:root[data-theme=dark] .grade-alert[class*=score-]{background:var(--score-bg);border-color:var(--score-border)}
:root[data-theme=dark] .grade-alert small{color:#bec8d9}
:root[data-theme=dark] .grade-alert .grade-track>div{background:var(--score)}
:root[data-theme=dark] .agenda-heading{background:#202a38;color:#bfceed;border-color:var(--line)}
:root[data-theme=dark] .task{border-color:var(--line);background:var(--surface)}
:root[data-theme=dark] .task-title{color:#e3eaf7}
:root[data-theme=dark] .task-time{color:#a9b9d0}
:root[data-theme=dark] .agenda-filters{background:#1b232e;border-color:var(--line)}
:root[data-theme=dark] .agenda-filter-options{color:#b4c1d5}
:root[data-theme=dark] .period-switch{background:#161d27;border-color:#344155}
:root[data-theme=dark] .period-switch button{color:#b0bfd5}
:root[data-theme=dark] .period-switch button:hover{background:#26344a}
:root[data-theme=dark] .period-switch [aria-pressed=true]{background:#29415f;color:#bad5ff;box-shadow:none}
:root[data-theme=dark] .empty{color:#aab9ce}
:root[data-theme=dark] .empty strong{color:#c8d6ea}
:root[data-theme=dark] .banner{background:#27354a;color:#bed1ef}
:root[data-theme=dark] .grade-card{border-color:var(--line)}
:root[data-theme=dark] .grade-card p{color:#acbad0}
:root[data-theme=dark] .grades-intro{background:#1b2431;border-color:var(--line)}
:root[data-theme=dark] .grades-intro h2{color:#dce7f8}
:root[data-theme=dark] .grades-intro p{color:#aabbd3}
:root[data-theme=dark] .class-progress-line{color:#abbcd4}
:root[data-theme=dark] .class-progress-line>button{color:#a2c7ff}
:root[data-theme=dark] .gpa-panel{background:#1b2430;border-color:var(--line)}
:root[data-theme=dark] .gpa-panel h2{color:#dbe7f7}
:root[data-theme=dark] :is(.gpa-selected-value strong,.gpa-totals strong){color:#b6d4ff}
:root[data-theme=dark] :is(.gpa-explainer,.gpa-method,.gpa-live,.gpa-totals span,.gpa-selected-value span,.gpa-controls label,.gpa-class-settings summary){color:#afbed4}
:root[data-theme=dark] .gpa-method summary{color:#a6caff}
:root[data-theme=dark] .gpa-totals>div+div{border-color:#3b4657}
:root[data-theme=dark] .gpa-choices button{background:#1b222d;border-color:#3b4960;color:#b7c8e1}
:root[data-theme=dark] .gpa-choices button[aria-pressed=true]{background:#263c58;border-color:#688fca}
:root[data-theme=dark] .gpa-choices button:hover{background:#28364b}
:root[data-theme=dark] .gpa-history{background:#19202a;border-color:#3a485d}
:root[data-theme=dark] .gpa-history p,:root[data-theme=dark] .gpa-history-fields label{color:#b3c1d6}
:root[data-theme=dark] .gpa-calculator-expand>summary{color:#afceff}
:root[data-theme=dark] .gpa-calculator-expand>summary span{color:#acbbd2}
:root[data-theme=dark] .course-hero{background:#1b2532;border-color:var(--line)}
:root[data-theme=dark] .course-title-row p{color:#b1bfd5}
:root[data-theme=dark] .course-stats strong{color:inherit}
:root[data-theme=dark] .course-stats span{color:#acbdd6}
:root[data-theme=dark] .course-stats>div+div{border-color:#3d4c62}
:root[data-theme=dark] .score-legend span[class*=score-]{color:var(--score)}
:root[data-theme=dark] .score-legend>span:last-child{color:#aab9d0}
:root[data-theme=dark] .course-notice{background:#382f22;color:#e6cf9d;border-color:#665537}
:root[data-theme=dark] .grade-drivers{background:#19212b;border-color:var(--line)}
:root[data-theme=dark] .grade-drivers>p{color:#aebed6}
:root[data-theme=dark] .grade-drivers h4{color:#c1d1e9}
:root[data-theme=dark] :is(.driver-category,.category-card){background:#222c39;border-color:#3c4b61}
:root[data-theme=dark] .driver-category small{color:#adbed7}
:root[data-theme=dark] .driver-gap{border-color:var(--line);color:#e0e9f6}
:root[data-theme=dark] .driver-gap:hover{background:#263246}
:root[data-theme=dark] .driver-gap strong{color:#d8e5f7}
:root[data-theme=dark] .driver-gap small{color:#acbdd5}
:root[data-theme=dark] .driver-gap b{color:#e3bf91}
:root[data-theme=dark] .driver-clear{background:#24382f;color:#b0d7bf}
:root[data-theme=dark] .grade-context{background:#1b242f;color:#b2c3dc;border-color:var(--line)}
:root[data-theme=dark] .grade-context summary{color:#aaceff}
:root[data-theme=dark] .category-card strong{color:#e1e9f7}
:root[data-theme=dark] .category-card p{color:#aabdd7}
:root[data-theme=dark] .scale-bands span{background:#253146;color:#bacbe4;border-color:#3c4f69}
:root[data-theme=dark] .scale-bands strong{color:#dbe7fa}
:root[data-theme=dark] .gradebook-toolbar{background:#1a2330;border-color:var(--line)}
:root[data-theme=dark] .gradebook-count{color:#a9bdd8}
:root[data-theme=dark] .gradebook-row{border-color:var(--line)}
:root[data-theme=dark] .gradebook-row:hover{background:#263144}
:root[data-theme=dark] .gradebook-name strong{color:#dfe8f7}
:root[data-theme=dark] .gradebook-name small{color:#a8bad4}
:root[data-theme=dark] :is(.gradebook-status,.gradebook-points,.gradebook-arrow){color:#b1c4de}
:root[data-theme=dark] .gradebook-status.score-flagged{color:var(--score)}
:root[data-theme=dark] .course-footer{background:#19212d;color:#a6b9d6;border-color:var(--line)}
:root[data-theme=dark] .assignment-score>span:last-child{color:#b2c3dc}
:root[data-theme=dark] .detail-meta{color:#b1c1d8}
:root[data-theme=dark] .detail-note{background:#253044;color:#c2cee1}
:root[data-theme=dark] .plain-copy{color:#bac8dc}
:root[data-theme=dark] .feedback-comment{background:#222d3d;border-color:#3b4c65}
:root[data-theme=dark] .feedback-comment strong{color:#dae6f7}
:root[data-theme=dark] .feedback-comment small{color:#a4b8d3}
:root[data-theme=dark] .submission-facts{border-color:var(--line)}
:root[data-theme=dark] .submission-facts span{background:#263348;color:#bed0e8}
:root[data-theme=dark] .rubric-row{border-color:var(--line)}
:root[data-theme=dark] .rubric-row strong{color:#d7e3f5}
:root[data-theme=dark] .rubric-row :is(span,p){color:#b3c5df}
:root[data-theme=dark] .school-heading h2{color:#dfe8f5}
:root[data-theme=dark] .school-heading h2 span{color:#8cbaff}
:root[data-theme=dark] .school-heading p:last-child{color:#a8bad4}
:root[data-theme=dark] .school-next{background:#1b2430;border-color:var(--line)}
:root[data-theme=dark] .school-next strong{color:#d9e5f7}
:root[data-theme=dark] .school-next :is(small,.eyebrow){color:#a8bdd8}
:root[data-theme=dark] .school-next-divider{background:#344359}
:root[data-theme=dark] .school-day-card .school-next{background:#1b2430;border-color:var(--line)}
:root[data-theme=dark] .school-month-toolbar{border-color:var(--line)}
:root[data-theme=dark] .school-month-toolbar h3{color:#e0e9f7}
:root[data-theme=dark] .school-legend{color:#acbdd3}
:root[data-theme=dark] .school-date{background:#1e2532;color:#b7c8e5;border-color:var(--line)}
:root[data-theme=dark] .school-date.school-b{background:#1f2b28;color:#b7d1c1}
:root[data-theme=dark] .school-date.school-off{background:#181e26;color:#a5b2c5}
:root[data-theme=dark] .school-date.school-unknown{background:#1a202a;color:#a4b2c8}
:root[data-theme=dark] .school-date.school-collab{background:#322c21;color:#e2ca91}
:root[data-theme=dark] .school-date.school-minimum{background:#34272a;color:#deb6b7}
:root[data-theme=dark] .school-date.school-finals{background:#272b40;color:#c1c3ec}
:root[data-theme=dark] .school-date.school-rally{background:#31273c;color:#d8bae9}
:root[data-theme=dark] .school-date:hover{filter:brightness(1.2)}
:root[data-theme=dark] .school-date.school-selected{box-shadow:inset 0 0 0 2px #86aee8}
:root[data-theme=dark] .school-date-event{color:#b9c9e5}
:root[data-theme=dark] .school-source{border-color:var(--line)}
:root[data-theme=dark] .school-source a,:root[data-theme=dark] .school-footnote a{color:#a6caff}
:root[data-theme=dark] .school-day-heading{border-color:var(--line)}
:root[data-theme=dark] .school-day-heading h3{color:#dce7f6}
:root[data-theme=dark] :is(.school-badge,.school-live-pill){background:#293e5d;color:#bbd6ff;border-color:#405d84}
:root[data-theme=dark] .school-slot{border-color:var(--line)}
:root[data-theme=dark] .school-slot :is(strong,button){color:#d6e3f5}
:root[data-theme=dark] .school-slot :is(small,.school-slot-time){color:#aabdd7}
:root[data-theme=dark] .school-slot-dot{background:#293950;color:#a6c8f8}
:root[data-theme=dark] .school-slot-break,:root[data-theme=dark] .school-slot-free{background:#1a222d}
:root[data-theme=dark] .school-slot-active{background:#243b58}
:root[data-theme=dark] .school-slot-break .school-slot-dot,:root[data-theme=dark] .school-slot-free .school-slot-dot{background:#2b3647;color:#bbcadf}
:root[data-theme=dark] .school-dismissal{background:#1c2832;color:#b6cdcf}
:root[data-theme=dark] .school-day-empty>span{color:#9bb1ce}
:root[data-theme=dark] .school-day-empty h4{color:#c9daf0}
:root[data-theme=dark] .school-day-empty p{color:#acbed7}
:root[data-theme=dark] .school-events-card h3{color:#dbe7f7}
:root[data-theme=dark] .school-events-card>label{color:#aebed5}
:root[data-theme=dark] .school-event{border-color:var(--line)}
:root[data-theme=dark] .school-event>span{color:#acc7ed}
:root[data-theme=dark] .school-event :is(strong,a){color:#cfdef4}
:root[data-theme=dark] .school-event small{color:#a5b8d1}
:root[data-theme=dark] :is(.school-footnote,.tt-footnote){color:#a5b6ce;border-color:var(--line)}
:root[data-theme=dark] .school-notice{background:#332d21;border-color:#625436;color:#e2cca1}
:root[data-theme=dark] .timetable-scroll{background:var(--surface)}
:root[data-theme=dark] .tt-header{background:#1d2530;border-color:var(--line)}
:root[data-theme=dark] .tt-date{border-color:var(--line)}
:root[data-theme=dark] .tt-date[aria-pressed=true]{background:#253953}
:root[data-theme=dark] .tt-date>small,:root[data-theme=dark] .tt-zone,:root[data-theme=dark] .tt-times>span{color:#a8bad3}
:root[data-theme=dark] .tt-date.tt-today>strong{background:#316fca;color:white}
:root[data-theme=dark] .tt-allday{background:#19212b;border-color:var(--line)}
:root[data-theme=dark] .tt-allday>div{border-color:var(--line)}
:root[data-theme=dark] .tt-allday>span{color:#a8bcd7}
:root[data-theme=dark] .tt-allday>div>span{background:#2a3545;color:#c0cfe4}
:root[data-theme=dark] .tt-allday>div>.tt-no-event{background:none;color:#889ab4}
:root[data-theme=dark] .tt-column{border-color:var(--line)}
:root[data-theme=dark] .tt-column-today{background-color:#1e2a3b}
:root[data-theme=dark] .tt-block{background:var(--tint);color:var(--text);border-color:var(--course)}
:root[data-theme=dark] .tt-block:is(button):hover{filter:brightness(1.15);box-shadow:none}
:root[data-theme=dark] .tt-break{--tint:#272f3b;--text:#c0ccde;--course:#667a96}
:root[data-theme=dark] .tt-passing{background:none;color:#94a7c2}
:root[data-theme=dark] .tt-now,:root[data-theme=dark] .tt-now i{background:#df8790}
:root[data-theme=dark] .timeline-hero{background:#1b2532;border-color:var(--line)}
:root[data-theme=dark] .timeline-numbers strong,:root[data-theme=dark] .timeline-numbers>div:nth-child(2) strong,:root[data-theme=dark] .timeline-numbers>div:nth-child(3) strong{color:#bad5ff}
:root[data-theme=dark] :is(.timeline-numbers span,.timeline-hero p,.timeline-overline){color:#afc2dc}
:root[data-theme=dark] .timeline-numbers>div{border-color:var(--line)}
:root[data-theme=dark] .timeline-info-grid section{background:var(--surface);border-color:var(--line)}
:root[data-theme=dark] .timeline-info-grid section>span{background:#293b55;color:#b6d0f6}
:root[data-theme=dark] .timeline-info-grid h3{color:#d1e1f7}
:root[data-theme=dark] .timeline-info-grid p{color:#a9bdd8}
:root[data-theme=dark] .timeline-milestones{background:var(--surface);border-color:var(--line)}
:root[data-theme=dark] .timeline-milestones button{border-color:var(--line);color:#cfdef5}
:root[data-theme=dark] .timeline-milestones strong{color:#d1def1}
:root[data-theme=dark] .timeline-milestones small{color:#a9bcd6}
:root[data-theme=dark] .timeline-milestones>button>span:last-child{color:#a0badf}
:root[data-theme=dark] progress{background:#303e52;color:#83a7d7;accent-color:#83a7d7}
:root[data-theme=dark] progress::-webkit-progress-bar{background:#303e52}
:root[data-theme=dark] progress::-webkit-progress-value{background:#83a7d7}
:root[data-theme=dark] progress::-moz-progress-bar{background:#83a7d7}
:root[data-theme=dark] .weekly-heading h2 span{color:#8cbaff}
:root[data-theme=dark] .weekly-heading p:last-child{color:#a7bad4}
:root[data-theme=dark] .weekly-private{color:#a9bcd7}
:root[data-theme=dark] :is(.weekly-meta,.weekly-fine,.weekly-footnote){color:#a5b9d4}
:root[data-theme=dark] .weekly-status{background:#273d59;color:#bad5ff}
:root[data-theme=dark] .weekly-metrics article{background:var(--surface);border-color:var(--line);box-shadow:none}
:root[data-theme=dark] .weekly-metrics h3{color:#d6e1f3}
:root[data-theme=dark] .weekly-metrics p{color:#a7bad6}
:root[data-theme=dark] .weekly-metrics strong small{color:#b1c5e3}
:root[data-theme=dark] .weekly-metric-icon{background:#293b55;color:#b2cdf3}
:root[data-theme=dark] .weekly-metric-alert .weekly-metric-icon{background:#3b2934;color:#edb1c6}
:root[data-theme=dark] .weekly-metric-alert>strong{color:#dfb2a8}
:root[data-theme=dark] .weekly-story{background:#1d2835;border-color:var(--line)}
:root[data-theme=dark] .weekly-story h3{color:#d8e5f7}
:root[data-theme=dark] .weekly-story :is(p,.eyebrow){color:#b5c7df}
:root[data-theme=dark] .weekly-next-step{border-color:#3a4b62}
:root[data-theme=dark] .weekly-next-step>span,:root[data-theme=dark] .weekly-activity>span{color:#a9c1df}
:root[data-theme=dark] .weekly-day b,:root[data-theme=dark] .weekly-day small{color:#b2c6e1}
:root[data-theme=dark] .weekly-bar{background:#7599c8}
:root[data-theme=dark] .weekly-bar.level-0{background:#34465f}
:root[data-theme=dark] .weekly-card{background:var(--surface);border-color:var(--line)}
:root[data-theme=dark] .weekly-card .eyebrow{color:#a4b8d5}
:root[data-theme=dark] .weekly-card-heading>span{color:#acbed8}
:root[data-theme=dark] .weekly-course,:root[data-theme=dark] .weekly-item,:root[data-theme=dark] .weekly-win{border-color:var(--line)}
:root[data-theme=dark] .weekly-course:hover,:root[data-theme=dark] .weekly-item:hover,:root[data-theme=dark] .weekly-win:hover{background:#253247}
:root[data-theme=dark] .weekly-course small,:root[data-theme=dark] .weekly-item small,:root[data-theme=dark] .weekly-win small{color:#a9bcd8}
:root[data-theme=dark] .weekly-delta{color:#acbfdc}
:root[data-theme=dark] .weekly-delta.up{color:#a1d7b3}
:root[data-theme=dark] .weekly-delta.down{color:#f0b0bc}
:root[data-theme=dark] .weekly-win>b,:root[data-theme=dark] .weekly-item>b{color:#a4bee4}
:root[data-theme=dark] .weekly-course-score.score-gold,:root[data-theme=dark] .weekly-win>.score-gold{color:#f0d18b}
:root[data-theme=dark] .weekly-course-score.score-green,:root[data-theme=dark] .weekly-win>.score-green{color:#a0d6b2}
:root[data-theme=dark] .weekly-course-score.score-red{color:#efa9b5}
:root[data-theme=dark] .weekly-course-score.score-flagged{color:#d6b4e7}
:root[data-theme=dark] .weekly-tabs{background:#171e28}
:root[data-theme=dark] .weekly-tabs button{color:#b3c4df}
:root[data-theme=dark] .weekly-tabs [aria-pressed=true]{background:#2b4262;color:#c4dcff;box-shadow:none}
:root[data-theme=dark] .weekly-item-icon{color:#abc8ed}
:root[data-theme=dark] .weekly-empty{background:#1d2633;color:#b3c5df}
:root[data-theme=dark] .weekly-notice{background:#353022;color:#e4d1a6;border-color:#625b3c}
:root[data-theme=dark] .weekly-error{background:#3b2830;color:#efb7c5;border-color:#6c4350}
:root[data-theme=dark] .weekly-control-label{color:#a7bddb}
:root[data-theme=dark] .weekly-step{color:#acc4e6}
:root[data-theme=dark] .weekly-step:hover:not(:disabled){background:#2b405e;color:#c1d9ff}
:root[data-theme=dark] .weekly-date-tile{color:#bed0e9}
:root[data-theme=dark] .weekly-date-tile:hover{background:#243348}
:root[data-theme=dark] .weekly-date-tile>span{color:#a9bdd8}
:root[data-theme=dark] .weekly-date-tile>strong{color:#c2d7f2}
:root[data-theme=dark] .weekly-date-tile[aria-pressed=true]{background:#263e5b;border-color:#5478ac;color:#c4dcff;box-shadow:none}
:root[data-theme=dark] .weekly-date-tile[aria-pressed=true]>span{color:#bbd4f6}
:root[data-theme=dark] .weekly-date-tile[aria-pressed=true] i{background:#a6c9ff}
:root[data-theme=dark] .weekly-zone-trigger{background:#1e2938;border-color:#3a4b65;color:#c3d7f4;box-shadow:none}
:root[data-theme=dark] .weekly-zone-trigger:hover{background:#293c56}
:root[data-theme=dark] .weekly-zone-trigger :is(small,em){color:#b0c4e0}
:root[data-theme=dark] .weekly-zone-trigger strong{color:#c6dafa}
:root[data-theme=dark] .weekly-zone-icon,:root[data-theme=dark] .weekly-trigger-arrow{color:#a4c5f2}
:root[data-theme=dark] .weekly-refresh-control{color:#c1d3ee}
:root[data-theme=dark] .weekly-refresh-control:hover:not(:disabled){background:#283b56;color:#d1e3ff}
:root[data-theme=dark] .weekly-picker-dialog{background:#1d2633;border-color:#3d4e68}
:root[data-theme=dark] .weekly-picker-dialog::backdrop{background:#050a12aa;backdrop-filter:blur(3px)}
:root[data-theme=dark] .weekly-picker-mark{background:#2a4160;color:#bcdaff}
:root[data-theme=dark] .weekly-picker-close{background:#2a3649;color:#bfd1ed}
:root[data-theme=dark] .weekly-picker-close:hover{background:#354966}
:root[data-theme=dark] .weekly-picker-dialog :is(.eyebrow,.weekly-picker-intro,.weekly-picker-note){color:#adbed6}
:root[data-theme=dark] .weekly-zone-option{background:#202c3c;border-color:#40516b}
:root[data-theme=dark] .weekly-zone-option:hover{background:#2b3b52}
:root[data-theme=dark] .weekly-zone-option strong{color:#d0ddf0}
:root[data-theme=dark] .weekly-zone-option>small{color:#afc0d9}
:root[data-theme=dark] .weekly-zone-option[aria-pressed=true]{background:#2b4363;border-color:#7198d0;box-shadow:none}
:root[data-theme=dark] .weekly-zone-option[aria-pressed=true] strong{color:#c5ddff}
:root[data-theme=dark] .weekly-zone-check{color:#a9bfdc}
:root[data-theme=dark] .weekly-zone-option[aria-pressed=true] .weekly-zone-check{background:#8cbaff;color:#17243b}
:root[data-theme=dark] .weekly-zone-clock{border-color:#40506a;color:#bfd0e9}
:root[data-theme=dark] .weekly-zone-clock b{color:#d5e4fb}
:root[data-theme=dark] .weekly-zone-clock>span{color:#adc1dd}
:root[data-theme=dark] .weekly-zone-option[aria-pressed=true] .weekly-zone-clock{color:#c4daf9}
:root[data-theme=dark] .assistant-panel{background:var(--surface);border-color:var(--line);box-shadow:none}
:root[data-theme=dark] .assistant-heading{background:#1c2633;border-color:var(--line)}
:root[data-theme=dark] .assistant-heading h2{color:#e0eafb}
:root[data-theme=dark] .assistant-heading p{color:#b2c4df}
:root[data-theme=dark] .assistant-mark{background:#2b405e;color:#bbd7ff}
:root[data-theme=dark] .assistant-context{background:#19222e;border-color:var(--line)}
:root[data-theme=dark] .assistant-context :is(label,span){color:#adbed7}
:root[data-theme=dark] .assistant-context select{background:#202c3c;color:#c9dbf5;border-color:#3e526e}
:root[data-theme=dark] .assistant-welcome-mark{background:#2b405e;color:#bfdcff}
:root[data-theme=dark] .assistant-welcome h3{color:#e0eafb}
:root[data-theme=dark] .assistant-welcome p{color:#b0c3df}
:root[data-theme=dark] .assistant-prompt{background:#202b3a;border-color:#3c4b63;color:#c5d6f0}
:root[data-theme=dark] .assistant-prompt:hover{background:#2d405b;border-color:#688ab8}
:root[data-theme=dark] .assistant-prompt>span{color:#adc9f0}
:root[data-theme=dark] .assistant-composer{background:#1a2330;border-color:var(--line)}
:root[data-theme=dark] .assistant-composer textarea{background:#151d29;color:#dfeafa}
:root[data-theme=dark] .assistant-composer textarea::placeholder{color:#93a6c3}
:root[data-theme=dark] .composer-bottom>span{color:#a8bbd6}
:root[data-theme=dark] .chat-avatar{background:#2b4263;color:#bcd8ff}
:root[data-theme=dark] .chat-user .chat-avatar{background:#374356;color:#d0dff4}
:root[data-theme=dark] .chat-author{color:#c0d7f9}
:root[data-theme=dark] .chat-copy,:root[data-theme=dark] .chat-copy strong{color:#d4e0f4}
:root[data-theme=dark] .chat-user .chat-body{background:#263a55;border-color:#405c83}
:root[data-theme=dark] .chat-user .chat-copy{color:#dfebff}
:root[data-theme=dark] .assistant-sources{border-color:#405573;color:#c5d8f3}
:root[data-theme=dark] .assistant-sources summary{color:#b7d4fc}
:root[data-theme=dark] .assistant-sources a{color:#a8cbff}
:root[data-theme=dark] .assistant-thinking>span{background:#8cbaff}
:root[data-theme=dark] .assistant-thinking small{color:#b3c8e5}
:root[data-theme=dark] .assistant-error{background:#392932;border-color:#785063;color:#f1bac9}
:root[data-theme=dark] .assistant-ad{background:#262b30;border-color:#454749}
:root[data-theme=dark] .assistant-ad :is(p,strong,span){color:#b6bec7}
:root[data-theme=dark] .assistant-ad-pending{background:#333c45;color:#c2cbd6}
:root[data-theme=dark] dialog{background:#1c2430;color:#e1eaf7;border-color:#3c4d65;box-shadow:0 20px 80px #0008}
:root[data-theme=dark] dialog::backdrop{background:#050a12aa;backdrop-filter:blur(3px)}
:root[data-theme=dark] dialog :is(h2,h3){color:#dce8f9}
:root[data-theme=dark] dialog>p:not(.eyebrow){color:#afc2dd}
:root[data-theme=dark] dialog .close{background:#263448;color:#bfd1ec;box-shadow:none}
:root[data-theme=dark] .detail-note{color:#bfd0e9}
:root[data-theme=dark] .setting-details{border-color:var(--line)}
:root[data-theme=dark] .setting-details p{color:#afc0db}
:root[data-theme=dark] .connection-host{background:#273c59;color:#c1d8f9;border-color:#405d85}
:root[data-theme=dark] .saved-connection{background:#243a30;border-color:#426952;color:#b2dfc3}
:root[data-theme=dark] .saved-connection p{color:#b5cfbf}
:root[data-theme=dark] .settings-hub h2>span{color:#8cbaff}
:root[data-theme=dark] .settings-hub-profile{color:#a9bbd6}
:root[data-theme=dark] .settings-hub-row{background:#202c3b;border-color:#3c4c63}
:root[data-theme=dark] .settings-hub-row:hover{background:#2a3c57;border-color:#5c7ca7}
:root[data-theme=dark] .settings-row-icon{background:#304867;color:#bdd8fe}
:root[data-theme=dark] .settings-hub-row strong{color:#dbe7f8}
:root[data-theme=dark] .settings-hub-row small{color:#afc0d9}
:root[data-theme=dark] .settings-hub-row>span:last-child{color:#a8c1e6}
:root[data-theme=dark] .settings-hub-lock .settings-hub-row{background:#2f2530;border-color:#5f445b}
:root[data-theme=dark] .settings-hub-lock .settings-row-icon{background:#493349;color:#edc7e4}
:root[data-theme=dark] .settings-hub-lock strong{color:#e3bfdc}
:root[data-theme=dark] .account-save-status{background:#253b57!important;color:#c4dcff!important;border-color:#44648f}
:root[data-theme=dark] .seventh-question{background:#1f3040!important;border-color:#3d5873}
:root[data-theme=dark] .seventh-question label{color:#c5d6ef}
:root[data-theme=dark] .seventh-question select{background:#1a2636;color:#c4d6f0;border-color:#476081}
:root[data-theme=dark] .survey-status{color:#b0c9ed!important;background:transparent}
:root[data-theme=dark] .period-field{color:#bfd0e9}
:root[data-theme=dark] .period-field select{background:#192330;color:#d6e4f7;border-color:#405572}
:root[data-theme=dark] #accountDialog .fine{color:#acbdd7}
:root[data-theme=dark] #schoolSupport{background:#263b58!important;color:#c3dafb!important}
:root[data-theme=dark] .account-auth-note,:root[data-theme=dark] .account-saved-check{color:#b5c5dc}
:root[data-theme=dark] .schedule-weekdays{border-color:var(--line)}
:root[data-theme=dark] .schedule-weekdays legend{color:#b6c8e1}
:root[data-theme=dark] .custom-period-row{border-color:var(--line)}
:root[data-theme=dark] .custom-period-fields label{color:#b3c5df}
:root[data-theme=dark] .custom-period-fields input:disabled{background:#253042;color:#8e9fb9}
:root[data-theme=dark] .custom-week-tabs [aria-pressed=true]{background:#2d486b;border-color:#5c82b7;color:#c4deff}
:root[data-theme=dark] .custom-class{border-color:var(--line)}
:root[data-theme=dark] .custom-class>span,:root[data-theme=dark] .custom-class small{color:#afc4e0}
:root[data-theme=dark] .custom-break{background:#222d3c;color:#aec5e3}
:root[data-theme=dark] .school-unavailable p{color:#afc2df}
:root[data-theme=dark] :is(.recovery-info,.recovery-notice){background:#25394e;border-color:#426581;color:#bed5ec}
:root[data-theme=dark] .recovery-feedback{color:#bcd3ee}
:root[data-theme=dark] .recovery-methods [aria-pressed=true]{background:#2b4262;color:#c5deff;border-color:#6183b4}
:root[data-theme=dark] #recoveryKeyDialog>label:not(.recovery-saved){color:#bed2ec}
:root[data-theme=dark] .recovery-saved{color:#b6d8c6}
:root[data-theme=dark] .recovery-events p{color:#bacde7}
:root[data-theme=dark] .recovery-events time{color:#a2b7d2}
:root[data-theme=dark] .recovery-setup-prompt{background:#293a4a;border-color:#425c77;color:#c5d6eb}
:root[data-theme=dark] .course-loading{background:#1c2430}
:root[data-theme=dark] .course-loading-mark{background:#2e4567;color:#b5d4ff}
:root[data-theme=dark] .course-loading-heading h2{color:#dfebfa}
:root[data-theme=dark] .course-loading-heading p{color:#b0c5e0}
:root[data-theme=dark] .course-loading-lines i{background:#344358}
:root[data-theme=dark] #toast{background:#243448;color:#d7e5f7;border-color:#466386;box-shadow:0 8px 30px #0005}
:root[data-theme=dark] #toast button{color:#add0ff}
:root[data-theme=dark] footer{color:#9fb1cc}
:root[data-theme=dark] .error{color:#ffb5be!important}
:root[data-theme=dark] .auth{background:#15191f}
:root[data-theme=dark] .auth-copy{background:#1b2737}
:root[data-theme=dark] .auth-copy .intro{color:#b6c9e3}
:root[data-theme=dark] .auth h1 span{color:#8cbaff}
:root[data-theme=dark] .auth-form>p{color:#afc4e0}
:root[data-theme=dark] .pill{background:#253b59;border-color:#466286;color:#c2d8f5}
:root[data-theme=dark] .privacy-note{color:#a7bad5;border-color:var(--line)}
/* Mobile navigation and sticky controls use the same dark surfaces. */
:root[data-theme=dark] .mobile-app-bar{background:#151b24;border-color:var(--line)}
:root[data-theme=dark] #mobileMenuButton{background:#222e40;border-color:#3c506d;color:#c3d7f4}
:root[data-theme=dark] .mobile-navigation{background:#11161d}
:root[data-theme=dark] body.mobile-layout .mobile-navigation .sidebar{background:#11161d}
:root[data-theme=dark] .mobile-navigation-close{background:#293c57;color:#c4dbfa}
:root[data-theme=dark] .month-scroll-hint{background:#192330;color:#afc4e1;border-color:var(--line)}
:root[data-theme=dark] .mobile-app-bar #mobileCurrentView{color:#b2c5e1}
/* Theme previews remain faithful to their own palettes, even inside Dark. */
.appearance-dialog{width:760px}.theme-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.theme-choices>button{min-width:0}
.theme-preview-dark{background:#1b222d;border-color:#3d4a5e}
.theme-preview-dark .theme-preview-side{background:#11161d;border-color:#344154}
.theme-preview-dark .theme-preview-side:before{background:#2d4668}
.theme-preview-dark .theme-preview-side:after{background:#293447}
.theme-preview-dark .theme-preview-bar{background:#53627a}
.theme-preview-dark .theme-preview-grid i{background:#1d2736;border-color:#344157}
.theme-preview-dark .theme-preview-grid i:nth-child(2){background:#26394f;border-left:3px solid #80a9df}
.theme-preview-dark .theme-preview-grid i:nth-child(6){background:#263b30;border-left:3px solid #83ba97}
.theme-preview-dark .theme-preview-grid i:nth-child(7){background:#392e43;border-left:3px solid #af92d7}
:root[data-theme=dark] .theme-choices>button{background:#202b3b;border-color:#405473}
:root[data-theme=dark] .theme-choices>button[aria-pressed=true]{border-color:#93baf3;box-shadow:0 0 0 2px #80a9df22}
:root[data-theme=dark] .theme-choice-title{color:#dfeafb}
:root[data-theme=dark] .theme-choice-check{color:#a4caff}
:root[data-theme=dark] .theme-choices small{color:#afc3de}
:root[data-theme=dark] :is(.theme-save-note,#appearanceStatus){color:#b6cbe8}
.theme-choices>button{display:flex;flex-direction:column;align-items:stretch}.theme-preview{flex-shrink:0}
@media(max-width:600px){body.mobile-layout .theme-choices{grid-template-columns:1fr;gap:12px}body.mobile-layout .theme-choices>button{display:grid;grid-template-columns:95px minmax(0,1fr);column-gap:15px;padding:12px;text-align:left}body.mobile-layout .theme-choices .theme-preview{grid-row:1/3;height:90px}body.mobile-layout .theme-choice-title{margin:6px 0 4px;align-self:end}body.mobile-layout .theme-choices small{align-self:start;font-size:12px;line-height:1.6}}
:root[data-theme=dark] .connection-host{color:#c1d8f9!important}
:root[data-theme=dark] .saved-connection{color:#b2dfc3!important}
:root[data-theme=dark] .seventh-question{color:#bfd0e9!important}

:root[data-theme=dark] #accountDialog h2{color:#dce8f9}
:root[data-theme=dark] :is(#newCodePanel,#accountSetup)>p:not(.fine){color:#b5c8e3}
:root[data-theme=dark] #recoveryDialog h2,:root[data-theme=dark] #recoveryKeyDialog h2,:root[data-theme=dark] #recoverySettingsDialog h2,:root[data-theme=dark] #recoverySettingsDialog h3{color:#dce8f9}
:root[data-theme=dark] .gradebook-count{background:#202b3a;border-color:var(--line)}
