/* Appearance tokens. Status and event colours keep their semantic meaning. */
:root[data-theme=graphite]{--bg:#151b27;--surface:#202a3b;--surface-raised:#283449;--surface-soft:#192232;--sidebar:#111824;--field:#131e2d;--ink:#f2f5ff;--muted:#b6c4db;--line:#3c4c65;--accent:#b69aff;--accent-hover:#ccb9ff;--accent-ink:#201336;--accent-soft:#393052;--pink:#ff8dbd;--sky:#6dd6ff;--hover:#2b3850;--green:var(--accent)}
:root[data-theme=ocean]{--bg:#101e2b;--surface:#1b3040;--surface-raised:#244052;--surface-soft:#152735;--sidebar:#0c1823;--field:#10222f;--ink:#edfbff;--muted:#b1ccd8;--line:#3b5c6e;--accent:#65d7ee;--accent-hover:#91e8f8;--accent-ink:#09232c;--accent-soft:#224957;--pink:#b5a4ff;--sky:#66e2bb;--hover:#284659;--green:var(--accent)}
:root[data-theme=berry]{--bg:#231824;--surface:#352639;--surface-raised:#44304a;--surface-soft:#2b1d30;--sidebar:#1c131e;--field:#271a2b;--ink:#fff1fa;--muted:#d5b9d1;--line:#694b68;--accent:#ff9dc6;--accent-hover:#ffc1dc;--accent-ink:#351629;--accent-soft:#573047;--pink:#ffc18b;--sky:#b6adff;--hover:#4d3451;--green:var(--accent)}
/* Breadcrumbs duplicated the section heading; retain only the compact date. */
main>header{justify-content:flex-end;height:36px;background:transparent;border-bottom:0}main>header>#crumb{display:none!important}
@media(max-width:760px){main>header{display:none}}
html[data-theme]:not([data-theme=classic]){color-scheme:dark}
html[data-theme]:not([data-theme=classic]) body{background:var(--bg);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) :is(aside,aside.ux-nav-open){background:var(--sidebar);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(h1,h2,h3,td,.stat-value,.schedule-title){color:var(--ink)}
html[data-theme]:not([data-theme=classic]) :is(p,.hint,label,.date small,.taskname small,.panelhead span,.stat small,.stat-label,.nav-group-title,.header-right,.shot-list-day h3){color:var(--muted)}
html[data-theme]:not([data-theme=classic]) :is(.panel,.stats .stat,.stat,.period-toolbar,.callout,dialog,.account-menu,.shoot-controls){background:var(--surface);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(.primary,.plan-mode.active,.shots-mode.active){background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
html[data-theme]:not([data-theme=classic]) .primary:hover{background:var(--accent-hover)}
html[data-theme]:not([data-theme=classic]) :is(.action,.close){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(.action:hover,.close:hover,.nav-group button:hover,.account-menu button:hover,#accountMenuTrigger:hover){background:var(--hover);color:var(--ink);border-color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(.nav-group button.active,.account-menu button.active){background:var(--accent-soft);color:var(--ink);box-shadow:inset 3px 0 var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(.brand,.textbutton,.panelhead button){color:var(--accent)}
html[data-theme]:not([data-theme=classic]) .panelhead button.primary{color:var(--accent-ink)}
html[data-theme]:not([data-theme=classic]) :is(.nav-group button,.account-menu button){color:var(--muted)}
html[data-theme]:not([data-theme=classic]) :is(.avatarline,.account-menu hr,td,th,.summary){border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(i.avatar,#accountUnread,#browserUnread){background:var(--accent-soft);color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){background:var(--field);border-color:var(--line);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) :is(input[type=checkbox],input[type=radio]){accent-color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(input,select,textarea,button,a):focus-visible{outline-color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(input,textarea)::placeholder{color:var(--muted);opacity:.85}
html[data-theme]:not([data-theme=classic]) th{background:var(--surface-soft);color:var(--muted)}
html[data-theme]:not([data-theme=classic]) tbody tr:hover td:where(:not(.fc td)){background:var(--hover)}
html[data-theme]:not([data-theme=classic]) a{color:var(--sky)}
html[data-theme]:not([data-theme=classic]) #toast{background:var(--accent);color:var(--accent-ink)}
html[data-theme]:not([data-theme=classic]) :is(.summary pre,.ai-turn pre,.ai-prompt,.inbox-item.unread){background:var(--surface-soft);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) .bar{background:var(--surface-raised)}
html[data-theme]:not([data-theme=classic]) .bar span{background:linear-gradient(90deg,var(--accent),var(--sky))}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar){--fc-border-color:var(--line);--fc-page-bg-color:var(--surface);--fc-neutral-bg-color:var(--surface-raised);--fc-neutral-text-color:var(--muted);--fc-today-bg-color:color-mix(in srgb,var(--accent) 10%,transparent);--fc-list-event-hover-bg-color:var(--hover);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) :is(.fc-scrollgrid,.fc-list){background:var(--surface);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) :is(th,.fc-list-day-cushion){background:var(--surface-raised);border-color:var(--line);color:var(--muted)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) td{border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) a{color:inherit}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) .fc-day-other{background:var(--surface-soft)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) .fc-day-today .fc-daygrid-day-number{background:var(--accent);color:var(--accent-ink)}
html[data-theme]:not([data-theme=classic]) #publicationPlanDialog :is(.plan-writer,.ql-container,.ql-toolbar){background:var(--field);border-color:var(--line);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) #publicationPlanDialog .ql-editor{color:var(--ink)}
.theme-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;margin-bottom:20px}
.theme-choice{position:relative;border:2px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;margin:0;color:var(--ink)}
.theme-choice:has(input:checked){border-color:var(--green)}.theme-choice:focus-within{outline:2px solid var(--green);outline-offset:3px}
.theme-choice input{position:absolute;right:15px;bottom:39px;width:18px;height:18px;margin:0}
.theme-choice strong{display:block;font-size:15px;margin-top:12px;padding-right:25px}.theme-choice small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.theme-sample{height:126px;display:flex;border-radius:7px;overflow:hidden;background:var(--sample-bg);border:1px solid #ffffff25;gap:12px;padding:10px}
.theme-sample-side{width:28%;border-right:1px solid #ffffff20;padding:6px 10px 0 0}.theme-sample-side i{display:block;height:6px;background:#ffffff35;border-radius:3px;margin:9px 0}.theme-sample-side i:first-child{background:var(--sample-accent)}
.theme-sample-body{flex:1;padding-top:6px}.theme-sample-body>i{display:block;width:55%;height:7px;background:#ffffffb0;border-radius:3px;margin-bottom:12px}.theme-sample-body>span{display:flex;gap:5px;margin-bottom:10px}.theme-sample-body>span i{height:29px;flex:1;background:var(--sample-panel);border-top:3px solid var(--sample-accent);border-radius:4px}.theme-sample-body>span i:nth-child(2){border-color:var(--sample-pink)}.theme-sample-body>span i:nth-child(3){border-color:var(--sample-blue)}.theme-sample-body b{display:block;height:12px;margin-top:5px;border-radius:3px;background:var(--sample-panel)}
@media(max-width:600px){.theme-choices{grid-template-columns:1fr 1fr;gap:10px}.theme-sample{height:100px;padding:7px;gap:7px}.theme-choice{padding:9px}.theme-choice small{font-size:11px}.theme-choice strong{font-size:14px}.theme-choice input{right:9px;bottom:50px}}
html[data-theme]:not([data-theme=classic]) .stats .stat{border-top:3px solid var(--accent);background:color-mix(in srgb,var(--accent) 7%,var(--surface))}
html[data-theme]:not([data-theme=classic]) .stats .stat:nth-child(2){border-top-color:var(--pink);background:color-mix(in srgb,var(--pink) 7%,var(--surface))}
html[data-theme]:not([data-theme=classic]) .stats .stat:nth-child(3){border-top-color:var(--sky);background:color-mix(in srgb,var(--sky) 7%,var(--surface))}
html[data-theme]:not([data-theme=classic]) .stats .stat:nth-child(4){border-top-color:#89dfb9}
html[data-theme]:not([data-theme=classic]) .rating-low td{background:#4b2633;color:#ffe1e9}
html[data-theme]:not([data-theme=classic]) .rating-high td{background:#1c4236;color:#d6ffeb}
html[data-theme]:not([data-theme=classic]) .rating-low:hover td{background:#59303e}
html[data-theme]:not([data-theme=classic]) .rating-high:hover td{background:#275243}
html[data-theme]:not([data-theme=classic]){background:var(--bg);min-height:100%}
html[data-theme]:not([data-theme=classic]) body{min-height:100dvh}

html[data-theme]:not([data-theme=classic]) .action.selected{background:var(--accent-soft);border-color:var(--accent);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) #publicationPlanCalendar .plan-event{background:color-mix(in srgb,var(--plan-color,var(--accent)) 14%,var(--surface));color:var(--ink)}
html[data-theme]:not([data-theme=classic]) #publicationPlanDialog :is(.plan-rich-shell,.plan-editor-top,.plan-editor-status){background:var(--field);color:var(--muted);border-color:var(--line)}

/* Light palettes use the same component tokens, with dark text and blue actions. */
:root[data-theme=sky-light]{--bg:#eef5fc;--surface:#ffffff;--surface-raised:#e3effb;--surface-soft:#f4f8fd;--sidebar:#e4effa;--field:#ffffff;--ink:#19324d;--muted:#4c637c;--line:#b6cce0;--accent:#0864bd;--accent-hover:#074f99;--accent-ink:#ffffff;--accent-soft:#cfe5ff;--pink:#b84378;--sky:#086b86;--hover:#e5f1ff;--green:var(--accent)}
:root[data-theme=blue-light]{--bg:#f2f4f8;--surface:#ffffff;--surface-raised:#e8edf7;--surface-soft:#f6f8fc;--sidebar:#ffffff;--field:#ffffff;--ink:#1e2c43;--muted:#52617a;--line:#bbc7dc;--accent:#2757b5;--accent-hover:#1c4391;--accent-ink:#ffffff;--accent-soft:#dce7ff;--pink:#a13b78;--sky:#096b91;--hover:#eaf0fc;--green:var(--accent)}
html[data-theme$="-light"]:not([data-theme=classic]),html[data-theme$="-light"]:not([data-theme=classic]) :is(input,select,textarea){color-scheme:light}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.brand span,.avatarline small,.online,.eyebrow,.empty,.department small,.taskname small,.date small,.plan-caption,.plan-legend,.plan-legend span,.reminder-meta,.reminder-time small,.reminder-group>h2 small,.owner-media-meta small,.shoot-event-who,.shoot-event-kind){color:var(--muted)}
html[data-theme$="-light"]:not([data-theme=classic]) #ownerContent td small{color:var(--muted)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.reminder-time,.reminder-options>summary,.reminder-note summary,.reminder-past>summary,.plan-details summary){color:var(--accent)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.shot-day,.shot-list-day,.plan-preview,.inbox-item,.reminder-calendar){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.plan-preview span,.shoot-event-time,.shot-time,.plan-preview b){color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(#publicationPlanCalendar,#shootCalendar) :is(.plan-event-time,.fc-list-event-time,.fc-daygrid-day-number,.fc-col-header-cell-cushion){color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) #shootCalendar .fc-daygrid-event{background:var(--accent-soft);border-left-color:var(--accent);color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) #reminderCalendar{background:var(--surface);border-color:var(--line);--fc-event-bg-color:var(--accent-soft);--fc-event-border-color:var(--accent);--fc-event-text-color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) #reminderCalendar .reminder-event-time{color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) #reminderCalendar .reminder-event-overdue{background:#fff0ce;border-color:#9b6519;color:#6d410d}
html[data-theme$="-light"]:not([data-theme=classic]) .reminder-overdue{background:#fff4df;border-color:#a66b16}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.reminder-due-label,.reminder-attention>h2,.warning){color:#875411}
html[data-theme$="-light"]:not([data-theme=classic]) .reminder-finished{color:#236343}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.done,.planned,.late,.progress){border:1px solid transparent}
html[data-theme$="-light"]:not([data-theme=classic]) .done{background:#def3e7;color:#1d613f}html[data-theme$="-light"]:not([data-theme=classic]) .planned{background:#e8eefd;color:#354f84}html[data-theme$="-light"]:not([data-theme=classic]) .late{background:#fff0da;color:#825013}html[data-theme$="-light"]:not([data-theme=classic]) .progress{background:#dcefff;color:#215e8a}
html[data-theme$="-light"]:not([data-theme=classic]) .rating-low td{background:#fde6eb;color:#7d223e}html[data-theme$="-light"]:not([data-theme=classic]) .rating-high td{background:#def3e7;color:#20583e}html[data-theme$="-light"]:not([data-theme=classic]) .rating-low:hover td{background:#f9dce4}html[data-theme$="-light"]:not([data-theme=classic]) .rating-high:hover td{background:#d3eddd}
html[data-theme$="-light"]:not([data-theme=classic]) :is(#accountMenuTrigger>svg,.account-menu button svg){stroke:var(--accent)}
html[data-theme$="-light"]:not([data-theme=classic]) #accountMenuTrigger[aria-expanded=true]{background:var(--accent-soft);border-color:var(--line)}
html[data-theme$="-light"]:not([data-theme=classic]) .account-menu #logout{color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-snow .ql-stroke{stroke:var(--ink)}html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-snow .ql-fill{fill:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-toolbar button:hover,html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-toolbar button.ql-active{background:var(--accent-soft)}
html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-editor.ql-blank::before{color:var(--muted)}
html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-tooltip{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme$="-light"]:not([data-theme=classic]) #publicationPlanDialog .ql-tooltip :is(input,a){color:var(--ink);background:var(--field)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.plan-restore,.ai-turn,.ai-prompt,.ai-turn pre){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.plan-colors legend,.plan-color-choice:has(:checked)){color:var(--ink)}
.theme-sample{border-color:color-mix(in srgb,var(--sample-ink,#fff) 20%,transparent)}
.theme-sample-side{border-color:color-mix(in srgb,var(--sample-ink,#fff) 20%,transparent)}
.theme-sample-side i{background:color-mix(in srgb,var(--sample-ink,#fff) 30%,transparent)}
.theme-sample-side i:first-child{background:var(--sample-accent)}
.theme-sample-body>i{background:color-mix(in srgb,var(--sample-ink,#fff) 70%,transparent)}

html[data-theme$="-light"]:not([data-theme=classic]) :is(dialog,#shotDialog) .dialoghead{background:var(--surface);border-color:var(--line)}
html[data-theme$="-light"]:not([data-theme=classic]) .plan-approval{border-color:var(--line)}
html[data-theme$="-light"]:not([data-theme=classic]) .plan-max-preview .plan-max-note{color:#c5cddd}
html[data-theme$="-light"]:not([data-theme=classic]) .plan-photo>span{color:#ffffff}

/* Full message content and disclosure controls follow the active theme. */
html[data-theme]:not([data-theme=classic]) .inbox-item pre{color:var(--ink);background:transparent}
html[data-theme]:not([data-theme=classic]) .inbox-item summary{color:var(--accent)}
html[data-theme]:not([data-theme=classic]) .ai-turn>b{color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(.inbox-item-head small,.ai-turn small){color:var(--muted)}
html[data-theme]:not([data-theme=classic]) #accountMenuTrigger small{color:var(--muted)}
/* Calendar captions and result metadata must not inherit legacy pastel text. */
html[data-theme]:not([data-theme=classic]) :is(.plan-status-legend,.rating-task-summary,.reminder-empty>span){color:var(--muted)}
html[data-theme]:not([data-theme=classic]) #ratingDetail small{color:var(--muted)}
html[data-theme]:not([data-theme=classic]) #publicationPlanCalendar :is(.fc-timegrid-axis,.fc-timegrid-slot-label,.plan-weekday){color:var(--muted)}
html[data-theme]:not([data-theme=classic]) #publicationPlanCalendar .fc-day-today .plan-day-number{color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) :is(.fc-popover,.fc-list-empty){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) .fc-popover-header{background:var(--surface-raised);color:var(--ink)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.plan-status-legend .is-draft,.plan-event-status.is-draft){color:var(--muted)}
html[data-theme$="-light"]:not([data-theme=classic]) :is(.plan-status-legend .is-approved,.plan-event-status.is-approved){color:#236343}
html[data-theme$="-light"]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar) :is(.shoot-event-time,.shoot-event-title,.shoot-event-who,.shoot-event-kind){color:var(--ink)}
/* FullCalendar paints its inner event node independently of the outer card. */
html[data-theme]:not([data-theme=classic]) :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar){--fc-event-text-color:var(--ink)}
html[data-theme]:not([data-theme=classic]) #publicationPlanCalendar .plan-event-title{color:var(--ink)}
/* Editable schedule cells are buttons, so they need their own themed text. */
html[data-theme]:not([data-theme=classic]) #shotsRoot .schedule-cell{color:var(--ink)}
html[data-theme]:not([data-theme=classic]) #shotsRoot .schedule-table td:first-child .schedule-cell{color:var(--accent)}
html[data-theme]:not([data-theme=classic]) #shotsRoot .schedule-cell[data-shot-edit]:hover{background:var(--hover);border-color:var(--line);color:var(--ink)}
html[data-theme]:not([data-theme=classic]) .schedule-day{border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) .quiet-help>summary{color:var(--accent)}
html[data-theme]:not([data-theme=classic]) #publicationPlanDialog .plan-media-head>b{color:var(--ink)}
html[data-theme] :is(#shootCalendar,#publicationPlanCalendar,#reminderCalendar) .fc-day-other .fc-daygrid-day-number{opacity:1;color:var(--muted)}
html[data-theme$="-light"]:not([data-theme=classic]) .stats .stat.ux-danger .stat-value{color:#9b2548}
html[data-theme$="-light"]:not([data-theme=classic]) .stats .stat.ux-danger{border-color:#b54d67}
/* Responsive cards use the same surfaces and caption colours as desktop tables. */
html[data-theme]:not([data-theme=classic]) .mobile-cards td::before{color:var(--muted)}
html[data-theme]:not([data-theme=classic]) .mobile-cards tbody tr{border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) .assistant-chat #aiChatForm{background:var(--surface)}
html[data-theme]:not([data-theme=classic]) #publicationPlanDialog .plan-form-actions{background:var(--surface)}
html[data-theme$="-light"]:not([data-theme=classic]) .mobile-cards .rating-high{background:#def3e7}
html[data-theme$="-light"]:not([data-theme=classic]) .mobile-cards .rating-low{background:#fde6eb}

/* Compact thematic tasks; completion keeps a semantic green in every palette. */
.district-topic-group+.district-topic-group{margin-top:20px}
.topic-group-heading{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;margin:0 0 10px;color:var(--ink)}
.topic-group-heading>span{font-size:12px;font-weight:400;color:var(--muted)}
.district-topic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:10px;align-items:start}
.district-topic-card.stat{padding:13px 15px;border-radius:10px;min-height:0}
.district-topic-top{display:flex;gap:8px;align-items:start;justify-content:space-between}
.district-topic-top h3{font-size:14px;line-height:1.4;font-weight:600;margin:0;letter-spacing:0}
.district-topic-numbers{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:8px 0}
.district-topic-numbers strong{font-size:26px;line-height:1.15;white-space:nowrap;font-weight:650}
.district-topic-numbers strong>span{font-size:18px;font-weight:400}
.district-topic-numbers>span{font-size:12px}
.district-topic-card small{display:block;line-height:1.5;font-size:12px}
.district-topic-card p{margin:7px 0 0;font-size:12px;line-height:1.5}
.district-topic-card details{margin-top:9px;font-size:12px}
.topic-done{font-size:17px;font-weight:700;line-height:1.2}
html .district-topic-card.topic-complete{background:#e8f5ed;border-color:#58a37a;box-shadow:inset 3px 0 #319563;color:#185b38}
html .district-topic-card.topic-complete :is(h3,small,p,.hint,.district-topic-numbers,.topic-done,summary){color:#185b38}
html[data-theme$="-light"]:not([data-theme=classic]) .district-topic-card.topic-complete{background:#e8f5ed;border-color:#58a37a;color:#185b38}
html[data-theme]:not([data-theme=classic]):not([data-theme$="-light"]) .district-topic-card.topic-complete{background:#193d33;border-color:#56b48b;color:#d0f4df}
html[data-theme]:not([data-theme=classic]):not([data-theme$="-light"]) .district-topic-card.topic-complete :is(h3,small,p,.hint,.district-topic-numbers,.topic-done,summary){color:#d0f4df}
.owner-topic-group{padding:0 20px;margin-top:12px}
.owner-topic-group+.owner-topic-group{margin-top:24px}
.owner-topic-table [data-topic-position]{width:68px;min-width:68px;padding:7px}
.owner-topic-table [data-topic-kind]{min-width:125px;padding:7px}
.owner-topic-table td{padding:10px 8px;vertical-align:top}
.owner-topic-table small{display:block;font-size:12px;margin-top:3px}
.owner-topic-table details{font-size:12px;margin-top:5px}
@media(max-width:600px){.owner-topic-group{padding:0 12px}.district-topic-card.stat{padding:12px}.district-topic-grid{grid-template-columns:1fr}.district-topic-group+.district-topic-group{margin-top:16px}}

/* Thematic report dialog stays stable while dashboard polling continues. */
.district-topic-card[role=button]{cursor:pointer;transition:border-color .15s}
.district-topic-card[role=button]:hover{border-color:var(--accent,var(--green))}
.district-topic-card[role=button]:focus-visible{outline:2px solid var(--accent,var(--green));outline-offset:3px}
#districtReportDialog{width:min(1150px,96vw);max-width:96vw;max-height:90dvh;padding:22px;overflow:auto}
#districtReportDialog .dialoghead{position:sticky;top:-22px;z-index:3;background:var(--surface,var(--bg));padding:10px 0 14px;margin:0 0 14px;align-items:flex-start}
#districtReportDialog .dialoghead h2{font-size:19px;line-height:1.35;margin:0 40px 5px 0}
#districtReportDialog .dialoghead p{margin:0;font-size:12px}
.district-report-summary{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap;margin:12px 0}
.district-report-summary strong{font-size:25px}
.district-report-summary span{font-size:13px}
html #districtReportDialog .district-report-summary strong,html #districtReportDialog .district-report-summary span:not(.report-complete){color:var(--ink)}
html #districtReportDialog .report-complete{color:#237b4b;font-weight:600}
html[data-theme]:not([data-theme=classic]):not([data-theme$="-light"]) #districtReportDialog .report-complete{color:#a5e4bf}
.district-report-actions{gap:8px;margin:16px 0 12px;flex-wrap:wrap}
.district-report-actions [role=status]{font-size:12px;color:var(--muted)}
.district-report-table table{width:100%;table-layout:fixed}
.district-report-table th:first-child{width:35px}
.district-report-table th:nth-child(2){width:130px}
.district-report-table th:nth-child(4){width:220px}
.district-report-table th:last-child{width:100px}
.district-report-table td{vertical-align:top;padding:12px 9px;font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.district-report-table th{font-size:12px}
.district-report-table input[type=checkbox]{width:16px;height:16px;margin:3px 0;accent-color:var(--accent,var(--green))}
.report-post-text{white-space:pre-wrap;overflow-wrap:anywhere}
.district-report-table .textbutton{font-size:12px;padding:5px 0}
.district-report-timestamp{font-size:12px;margin:12px 0 0}
.district-report-cycles{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.district-report-cycles>div{display:flex;gap:8px;flex-wrap:wrap;padding:7px 10px;border:1px solid var(--line);border-radius:7px;font-size:12px}
#districtReportCopyFallback{display:block;width:100%;height:120px;margin:10px 0}
.district-report-link{text-align:left;white-space:normal}
@media(max-width:760px){#districtReportDialog{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:14px}#districtReportDialog .dialoghead{top:-14px}#districtReportDialog .dialoghead h2{font-size:17px}.district-report-table table{min-width:700px}.district-report-summary{gap:10px}.district-report-actions button{font-size:12px}}

#districtReportDialog:has(#districtRangeForm){width:min(600px,96vw)}
#districtRangeForm .formgrid{gap:14px}
#districtRangeForm .primary{margin-top:8px}
@media(max-width:760px){#districtReportDialog:has(#districtRangeForm){width:100vw}}

#ratingReportDialog{width:min(1100px,96vw);max-width:96vw;max-height:90dvh;padding:18px;overflow:auto}
#ratingReportDialog #ratingDetail{margin:0;border:0;box-shadow:none}
#ratingReportDialog .panelhead{position:sticky;top:-18px;z-index:2;background:var(--surface);gap:12px}
#ratingReportDialog .panelhead h2{font-size:18px;line-height:1.4}
#ratingReportDialog .rating-task-summary{padding:12px 0}
#ratingReportDialog .tablewrap td{font-size:13px;vertical-align:top}
#ratingReportDialog .rating-result-filters{margin:8px 0 14px}
#publicationContent>.panel>.summary{padding:16px}
#publicationContent .stat-value{font-size:22px!important}
#publicationContent .stat{padding:14px}
@media(max-width:760px){#ratingReportDialog{inset:0;margin:0;width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0;padding:14px}#ratingReportDialog .panelhead{top:-14px;flex-wrap:wrap}#ratingReportDialog table{min-width:650px}}

.head-report-history>summary{padding:16px;cursor:pointer;font-weight:600;color:var(--ink)}
#ratingCopyFallback{display:block;width:100%;min-height:100px}

html[data-theme] .plan-approval :is(.plan-approval-state,.plan-approval-state b,details,summary,details p){color:var(--ink)}
html[data-theme] .plan-approval-state{background:var(--surface-soft);border-color:var(--line)}
html[data-theme] .plan-approval-state .warning{color:var(--ink)}
.plan-max-preview-head{gap:12px;flex-wrap:wrap}

#headMonthlyList .panelhead{gap:12px;flex-wrap:wrap}
#headMonthlyList h2{font-size:18px}
.head-month-table{width:100%}.head-month-table th:first-child{width:55px}.head-month-table th:nth-child(2){width:140px}
.head-month-table td{vertical-align:top}.head-month-table .textbutton{text-align:left;white-space:normal;line-height:1.5}
#headPlanCopyFallback{width:100%;min-height:150px}
@media print{
 @page{size:A4;margin:15mm}
 body:has(#headMonthlyList),body:has(#headMonthlyList) :is(main,#page,#publicationPlanRoot,#publicationPlanCalendar,#headMonthlyList,.tablewrap){display:block!important;position:static!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;margin:0!important;padding:0!important;background:white!important;color:black!important;box-shadow:none!important;border:0!important}
 body:has(#headMonthlyList) :is(aside,main>header,main>.pagehead,.schedule-top,.plan-caption,dialog,#toast,.mobile-nav-veil,#headMonthlyList .toolbar,#headPlanCopyStatus,#headPlanCopyFallback){display:none!important}
 body:has(#headMonthlyList) #headMonthlyList .panelhead{display:block!important;padding:0 0 12pt!important;border:0!important;background:white!important}
 body:has(#headMonthlyList) #headMonthlyList h2{color:black!important;font: bold 14pt Arial,sans-serif!important}
 body:has(#headMonthlyList) .head-month-table{display:table!important;border-collapse:collapse!important;width:100%!important;min-width:0!important;color:black!important;font:11pt/1.4 Arial,sans-serif!important}
 body:has(#headMonthlyList) .head-month-table thead{display:table-header-group!important}
 body:has(#headMonthlyList) .head-month-table tbody{display:table-row-group!important}
 body:has(#headMonthlyList) .head-month-table tr{display:table-row!important;break-inside:avoid!important;background:white!important}
 body:has(#headMonthlyList) .head-month-table :is(td,th){display:table-cell!important;border:1px solid #777!important;padding:6pt!important;background:white!important;color:black!important}
 body:has(#headMonthlyList) .head-month-table td::before{display:none!important}
 body:has(#headMonthlyList) .head-month-table .textbutton{all:unset!important;color:black!important;font:inherit!important}
}

#headMonthlyList .head-month-table td{padding:10px 14px;font-size:14px;line-height:1.5}
#headMonthlyList .head-month-table .textbutton{font-size:inherit;font-weight:400;padding:0;text-decoration:none}
#publicationPlanRoot:has(#headMonthlyList) .plan-status-legend{display:none}

.reminder-row[data-reminder-open]{cursor:pointer}
.reminder-row[data-reminder-open]:hover{background:var(--surface-soft)}
.reminder-row[data-reminder-open]:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:6px}

#headMonthlyList .head-month-table :is(th,td):nth-child(2){white-space:nowrap;word-break:normal;overflow-wrap:normal}
@media print{
 body:has(#headMonthlyList) .head-month-table{table-layout:auto!important}
 body:has(#headMonthlyList) .head-month-table :is(th,td):first-child{width:10mm!important;min-width:10mm!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}
 body:has(#headMonthlyList) .head-month-table :is(th,td):nth-child(2){width:30mm!important;min-width:30mm!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}
 body:has(#headMonthlyList) .head-month-table :is(th,td):nth-child(3){width:auto!important;white-space:normal!important;overflow-wrap:anywhere!important}
}

#manualReportDialog{width:min(960px,96vw);max-height:90dvh;overflow:auto}
#manualReportDialog .dialoghead{align-items:flex-start;gap:14px}
#manualReportDialog h2{font-size:19px;line-height:1.4}
html #manualReportDialog .district-report-summary :is(strong,span){color:var(--ink)}
.manual-entry-table{width:100%}.manual-entry-table th:first-child{width:160px}.manual-entry-table th:last-child{width:180px}
.manual-entry-table td{vertical-align:top;padding:10px}.manual-entry-table textarea{width:100%;min-height:65px}.manual-entry-table input{width:100%}
@media(max-width:760px){#manualReportDialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;inset:0;border-radius:0}.manual-entry-table{min-width:620px}}

::highlight(ritm-repeats){text-decoration-line:underline;text-decoration-style:dotted;text-decoration-color:var(--accent,#94612e);text-decoration-thickness:2px}
.plan-text-review{font-size:12px;line-height:1.6;color:var(--muted);padding:8px 0}
.plan-text-review summary{cursor:pointer}.plan-text-review details>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;padding:3px 0}.plan-text-review .textbutton{font-size:12px}

.plan-text-review .review-selected{color:var(--ink);font-weight:600}

.plan-review-overlay{position:absolute;inset:0;pointer-events:none;z-index:2}.plan-review-overlay span{position:absolute;height:0;border-bottom:2px dotted var(--accent,#94612e);pointer-events:none}

/* Shared controls follow the selected palette, including tablet navigation. */
html[data-theme]:not([data-theme=classic]) #uxMenu{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) :is(dialog .dialoghead,#publicationPlanDialog .plan-form-actions,.assistant-chat #aiChatForm){background:var(--surface);border-color:var(--line)}
html[data-theme]:not([data-theme=classic]) .mobile-day-count{background:var(--accent-soft);color:var(--accent)}
html[data-theme]:not([data-theme=classic]) :is(dialog,.ql-container,.plan-max-preview,.fc-scroller,#aiMessages){scrollbar-color:var(--line) var(--surface-soft)}
.manual-entry-table :is(input,textarea),.owner-topic-table :is(input,select){border:1px solid var(--line,#62506f);border-radius:6px;padding:8px;font:inherit}

#ratingReportDialog .panelhead{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start}
#ratingReportDialog .panelhead h2{grid-column:1;grid-row:1;margin:0;align-self:center}
#ratingReportDialog .panelhead>.close{grid-column:2;grid-row:1;justify-self:end}
#ratingReportDialog .panelhead>.toolbar{grid-column:1/-1;flex-wrap:wrap;margin:0}
html[data-theme]:not([data-theme=classic]) .plan-max-preview{scrollbar-color:#738195 #263142}
