/* Theme overrides load after feature styles; all layout geometry stays with those styles. */
.theme-control{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:inherit;white-space:nowrap}
.theme-control select{width:auto;margin:0;padding:5px 8px;font-size:12px}
.sidebar .theme-control{display:flex;margin-bottom:15px}
html[data-theme=dark]{color-scheme:dark;--ink:#e1e9f5;--muted:#a6b5cb;--line:#35455c;--paper:#111b2b;--accent:#8db6ff;--soft:#253c5c;--surface:#1b293d;--raised:#24344c}
html[data-theme=dark] body{background:var(--paper);color:var(--ink)}
html[data-theme=dark] :is(.topbar,.panel,.editor,.overview-entry,.timeline-panel,.time-axis,.identity,.inspection-drawer,.help-panel,.help-page,.help-card,.public-header,.public-footer,.presentation-header,.presentation-summary,.interruption-register,#planning-dialog,.mobile-header,.skip-link){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,select,textarea,#planning-dialog input:not([type=hidden]):not([type=checkbox]),#planning-dialog select){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(label,nav a,.metrics span,.status-text,.help-lead,.help-card p,.range-label,.group-label,.date-cell,.identity small,.date-cell small,.hour-ticks,.detail-facts dt,.planning-dialog-heading p,#planning-dialog label,.planning-caption,.baseline-switch,.full-day-toggle,.impact-people){color:var(--muted)}
html[data-theme=dark] :is(th,.project-row td,.timeline-note,.timeline-footer,.axis-identity,.date-cell.weekend,.unavailable,.unavailable.break,.unavailable.off-hours,.unavailable.commitment,.badge,.topbar .badge,.help-prose code,.help-panel button,.drawer-close,.dialog-close,.duration-presets button){background:var(--raised);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] :is(td,th,.person-row,.date-cell,.identity,.time-axis,.timeline-note,.calendar-column-boundary,.section-heading,.compact-deadline,.impact-project,.help-panel>header){border-color:var(--line)}
html[data-theme=dark] :is(.button,.mobile-quick-action){background:#356fda;border-color:#5689e7;color:#fff}
html[data-theme=dark] .button:hover{background:#285cbc}
html[data-theme=dark] :is(.button.secondary,.secondary,.text-button,.future-action){background:var(--raised);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.button.secondary:hover,.secondary:hover,.text-button:hover){background:#314766}
html[data-theme=dark] :is(.notice,.scenario-banner,.presentation-state,.duration-presets .active,.zoom-controls .active){background:var(--soft);color:#b9d2ff;border-color:#44618a}
html[data-theme=dark] :is(.warning,.validation,.status-text.late,.target-risk,.outside-hours){color:#ffc18b}
html[data-theme=dark] :is(.integration-error,.planning-form-error:not(:empty),.button.danger,.text-button.danger){background:#472c39;color:#ffc0cc;border-color:#815064}
html[data-theme=dark] .planning-hero{background:linear-gradient(120deg,#243c5c,#1b293d);border-color:var(--line)}
html[data-theme=dark] :is(.planning-hero .intro,.planning-hero .eyebrow,.scenario-banner strong,.scenario-banner small,.planning-dialog-heading .eyebrow,.help-card span,.period-controls a,.zoom-controls a,.text-button){color:#b0ccfa}
html[data-theme=dark] :is(.avatar,.person-avatar,.help-icon){background:#2d4565;color:#c3dcff;border-color:#567293}
html[data-theme=dark] .unavailable.exception{background:repeating-linear-gradient(135deg,#293a51,#293a51 2px,#1b293d 2px,#1b293d 6px)}
html[data-theme=dark] #timeline-workspace .date-cell.compressed{background:#24344c}
html[data-theme=dark] .person-track{background-image:linear-gradient(to right,transparent calc(100% - 1px),var(--line) 1px)}
html[data-theme=dark] :is(.milestone span,.milestone.focused b,.today-line span){background:var(--surface)}
html[data-theme=dark] .milestone{color:#a9c4ee}
html[data-theme=dark] .timeline-scroll{scrollbar-color:#526784 var(--paper)}
/* Project fills retain their identity and contrasting dark labels. */
html[data-theme=dark] .work-block{color:#172c4d}
html[data-theme=dark] .work-block small{color:#354b68}
html[data-theme=dark] .span-block{background:repeating-linear-gradient(135deg,var(--surface),var(--surface) 3px,var(--fill) 3px,var(--fill) 4px)}
@media print{html[data-theme=dark] body{background:white;color:black}.theme-control{display:none}}
html[data-theme=dark] :is(.public-document,.auth-card,.account-form,.monday-result,.meeting-card,.history-events,.forecast-trend,.history-filters a,.presentation-summary>div,.effort-dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.public-hero,.auth-scene){background:linear-gradient(120deg,#243c5c,#1b293d);border-color:var(--line)}
html[data-theme=dark] :is(.public-hero .intro,.public-tagline,.public-points span,.public-points p,.public-document p,.auth-intro p,.auth-intro small,.auth-card>p,.auth-card label,.account-form>label,.meeting-form label){color:var(--muted)}
html[data-theme=dark] :is(.auth-card input,.account-form input,.account-form select,.meeting-form input:not([type=hidden]),.meeting-form textarea,.meeting-form select){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.integration-status,.monday-context,.monday-tag,.baseline-note,.history-filters .active,.effort-calculator){background:var(--soft);color:#b9d2ff;border-color:#44618a}
html[data-theme=dark] .risk-badge{background:#203d35;color:#a6e7c3;border-color:#426c58}
html[data-theme=dark] :is(.risk-badge.tight,.risk-badge.target,.demo-banner,.presentation-state.hypothetical){background:#433a26;color:#ffdc97;border-color:#77663f}
html[data-theme=dark] :is(.risk-badge.threatened,.risk-badge.missed,.meeting-form .validation-summary-errors){background:#472c39;color:#ffc0cc;border-color:#815064}
html[data-theme=dark] .risk-badge.blocked{background:var(--raised);color:var(--muted);border-color:var(--line)}
.public-header nav{flex-wrap:wrap}

/* Page headings reuse the Overview hero across every theme. */
.planning-hero.page-heading{margin-bottom:22px}
.planning-hero.page-heading .hero-actions{margin-top:0}
.planning-hero.help-intro{max-width:none;padding:28px 32px 25px}
@media(max-width:1100px){.planning-hero.help-intro{padding:24px}}
@media(max-width:720px){.planning-hero.help-intro{padding:21px 18px}}
