/* Local appearance controls and graphite companion to Silver Studio. */
.app-bar { position: relative; z-index: 30; }
.theme-control { display: flex; align-items: center; flex: none; }
.app-bar-actions .theme-trigger { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; min-height: 30px; color: var(--ink); background: var(--paper); }
.theme-trigger svg { width: 15px; height: 15px; }
.theme-panel { position: fixed; z-index: 60; padding: 20px; border-radius: 18px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 16px 50px #171c2921,0 2px 8px #171c2909; max-height: calc(100vh - 24px); overflow-y: auto; }
.theme-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.theme-panel header strong { display: block; font-size: 16px; font-weight: 600; }
.theme-panel header small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.theme-panel .theme-close { font-size: 23px; line-height: 1; padding: 1px 5px; color: var(--muted); border-radius: 6px; }
.theme-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 19px 0 16px; }
.theme-panel .theme-modes button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 14px 5px; border: 1px solid var(--line); background: var(--bg); border-radius: 11px; color: var(--muted); font-size: 12px; }
.theme-modes svg { width: 23px; height: 23px; }
.theme-panel .theme-modes button[aria-pressed=true] { border-color: var(--accent); background: var(--soft); color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-auto-settings { background: var(--bg); padding: 14px; border-radius: 11px; border: 1px solid var(--line); }
.theme-auto-settings label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.theme-auto-settings select { width: 100%; background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 7px 9px; border-radius: 7px; font-size: 12px; }
.theme-auto-settings p { font-size: 11px; margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.theme-auto-settings #theme-next-switch { color: var(--accent); margin: 7px 0 8px; }
.theme-auto-settings small, .theme-storage-note { color: var(--muted); font-size: 10px; line-height: 1.7; }
.theme-storage-note { margin: 14px 0 0; }

:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #16171b;
  --paper: #202126;
  --ink: #eeeeF2;
  --muted: #a0a1ad;
  --line: #34353d;
  --accent: #80b4ff;
  --dark: #15161a;
  --soft: #273650;
  --amber: #dfb46d;
  --amber-bg: #3b3224;
  --red: #ef9c9c;
  --red-bg: #3b282d;
  --surface-shadow: 0 2px 5px #00000012,0 12px 32px #00000013;
  --float-shadow: 0 24px 80px #00000070,0 3px 12px #00000030;
}
html[data-theme=dark] ::selection { background: #315987; color: #fff; }
html[data-theme=dark] .app-bar { background: #1d1e24ed; border-color: var(--line); color: var(--muted); }
html[data-theme=dark] :is(.workspace-label,.app-bar-actions button,#connection-state) { color: #afb0ba; }
html[data-theme=dark] .app-bar-actions button:hover { color: #dce9ff; }
html[data-theme=dark] .workspace-divider { color: #555660; }
html[data-theme=dark] .app-bar-actions :is(#account-entry,#account-signout) { border-color: #41434d; color: #b3b5c0; }
html[data-theme=dark] .app-bar-actions #account-signout:hover { background: #30333c; }
html[data-theme=dark] .role-test-bar { background: #24252d; border-color: #373843; color: #c1c2cc; }
html[data-theme=dark] .role-test-bar :is(small,label) { color: #999ba9; }
html[data-theme=dark] .role-test-actions button { color: #a5a7b4; }
html[data-theme=dark] .role-test-actions button[aria-pressed=true] { background: #3a3c47; border-color: #4a4d5b; color: #f1f2fa; }
html[data-theme=dark] .role-test-actions select { background: #2c2d36; border-color: #424450; color: #bfc1cd; }
html[data-theme=dark] .sidebar { background: linear-gradient(170deg,#202127,#1b1c22); border-color: #33343d; }
html[data-theme=dark] .sidebar nav button { color: #a7a8b6; }
html[data-theme=dark] .sidebar nav button:hover { color: #e9eaf3; background: #2b2d37; }
html[data-theme=dark] .sidebar nav button.active { background: #303541; color: #adcfff; box-shadow: inset 0 0 0 1px #43495755,0 3px 12px #00000010; }
html[data-theme=dark] .sidebar nav :is([data-team-record-nav],[data-admin-nav]) { border-color: #3a3c45; }
html[data-theme=dark] .sidebar-note .text-button { color: #a0a2b1; }
html[data-theme=dark] .sidebar-feedback:is(:hover,.active) { background: #303b52; color: #adcfff; }
html[data-theme=dark] .profile { color: #dddfea; border-color: #363843; }
html[data-theme=dark] .profile small { color: #999baa; }
html[data-theme=dark] :is(.breadcrumb,.subtitle,.help-line,.schedule-note,.date-note) { color: #a2a3b1; }
html[data-theme=dark] .breadcrumb .slash { color: #616372; }
html[data-theme=dark] .primary { background: #447bd9; border-color: #5187e3; color: #fff; box-shadow: inset 0 1px 0 #ffffff18; }
html[data-theme=dark] .primary:hover { background: #5189e7; border-color: #6399f1; }
html[data-theme=dark] .secondary { background: #292b34; border-color: #414450; color: #d4d6e2; box-shadow: none; }
html[data-theme=dark] .secondary:hover { background: #343744; border-color: #626b81; }
html[data-theme=dark] .quiet { color: #a1a4b3; }
html[data-theme=dark] .quiet:hover { background: #2d303b; color: #e0e3ef; }
html[data-theme=dark] :is(.text-button,.episode-tabs .add-episode,.result) { color: var(--accent); }
html[data-theme=dark] .more-button { color: #a6a9b9; }
html[data-theme=dark] .more-button:is(:hover,[aria-expanded=true]) { color: #d3e4ff; background: #333a4c; border-color: #4b5870; }
html[data-theme=dark] :is(.panel,.project-group,.schedule-panel,.month-panel,.activity-panel,.attendance-panel,.feedback-panel,.change-log-panel,.account-card,.person-activity-card) { background: var(--paper); border-color: var(--line); }
html[data-theme=dark] :is(th,.attendance-table th,.people-table th,.bulk-table th,.change-log-table th,.date-preview-table th) { background: #26272e; color: #a6a8b5; }
html[data-theme=dark] :is(td,.table-footer,.panel-heading,.activity-heading) { border-color: var(--line); }
html[data-theme=dark] :is(.table-footer,.people-rules) { color: #9699a8; }
html[data-theme=dark] :is(.filters input,.filters select,.field input,.field select,.field textarea,.schedule-options input,.schedule-options select,.people-rules select,.month-options input,.daily-toolbar input,.attendance-controls input,.attendance-controls select,.bulk-context select,.bulk-toolbar input,.bulk-toolbar select,.bulk-table input:not([type=checkbox]),.bulk-table select,.phase-name-label input,.phase-transfer select,.calendar-project-title select,.account-row select) { background: #24262e; border-color: #454854; color: #e0e2ed; }
html[data-theme=dark] input::placeholder, html[data-theme=dark] textarea::placeholder { color: #8f92a1; }
html[data-theme=dark] .field label { color: #bdc0cd; }
html[data-theme=dark] :is(.field input,.field select,.field textarea):focus { border-color: #80b4ff; box-shadow: 0 0 0 3px #80b4ff22; }
html[data-theme=dark] .avatar { background: #343b4c; color: #bfcee8; }
html[data-theme=dark] .avatar.gold { background: #403a31; color: #dec191; }
html[data-theme=dark] .avatar.blue { background: #2d3c52; color: #abcaec; }
html[data-theme=dark] .status.doing { background: #2a3b55; color: #a5caff; }
html[data-theme=dark] .status.todo { background: #373943; color: #b8bac7; }
html[data-theme=dark] .status.done { background: #2a3c33; color: #a0cfb4; }
html[data-theme=dark] .status.wait { background: #453824; color: #edc98c; }
html[data-theme=dark] :is(.notice,.daily-notice,.board-unassigned,.sync-notice) { background: #332e24; border-color: #504532; color: #d6bd91; }
html[data-theme=dark] .project-row:hover { background: #272930; }
html[data-theme=dark] .project-group[open]>.project-row { background: linear-gradient(110deg,#292c36,#242833); color: var(--ink); border-color: var(--line); }
html[data-theme=dark] :is(.project-row-name p,.project-group[open]>.project-row p,.project-row-meta,.project-group[open]>.project-row .project-row-meta) { color: #a4a8b8; }
html[data-theme=dark] :is(.project-row-meta strong,.project-group[open]>.project-row .project-row-meta strong) { color: #d2d6e4; }
html[data-theme=dark] .project-arrow, html[data-theme=dark] .project-group[open]>.project-row .project-arrow { color: #a1a9ba; }
html[data-theme=dark] .project-header-button, html[data-theme=dark] .project-group[open]>.project-row .project-header-button { background: #35394588; border-color: #4a4f61; color: #bdc8df; }
html[data-theme=dark] .project-header-button:hover, html[data-theme=dark] .project-group[open]>.project-row .project-header-button:hover { background: #3a4358; color: #d5e5ff; border-color: #677fa6; }
html[data-theme=dark] .project-group[open]>.project-row .more-button { color: #a4b0c8; }
html[data-theme=dark] :is(.episode-tabs,.stage-label,.stage-task) { border-color: #363840; }
html[data-theme=dark] .episode-tabs button { color: #9ea3b3; }
html[data-theme=dark] .episode-tabs button.active { color: #93beff; border-color: #7caef3; }
html[data-theme=dark] .episode-tabs [aria-expanded=true] { background: #2b3547; }
html[data-theme=dark] .stage-label { background: #25262d; }
html[data-theme=dark] .stage-label h3 { color: #c7cad6; }
html[data-theme=dark] .stage-label span { color: #9295a7; }
html[data-theme=dark] :is(.stage-task .owner,.days,.schedule-estimate) { color: #a6aab9; }
html[data-theme=dark] :is(.project-team,.collaboration-overview,.film-summary,.project-summary) { background: #252a34; border-color: #3c4351; color: var(--ink); }
html[data-theme=dark] :is(.project-teammate,.collaboration-project) { background: #2c313d; border-color: #414a5d; color: #dde4f1; }
html[data-theme=dark] :is(.project-teammate,.collaboration-project):hover { background: #354054; border-color: #5b749b; }
html[data-theme=dark] :is(.project-team h2 small,.project-teammate small,.collaboration-project small,.collaboration-overview .section-line p,.collaboration-scope-note) { color: #a6aebf; }
html[data-theme=dark] .month-weekdays { background: #25262e; border-color: #373943; }
html[data-theme=dark] .month-weekdays span { color: #a5a7b6; }
html[data-theme=dark] .month-day { border-color: #373943; }
html[data-theme=dark] .month-day.weekend { background: #23242b; }
html[data-theme=dark] .month-day.outside-month { background: #1c1d23; }
html[data-theme=dark] .month-day.is-today { background: #232f43; }
html[data-theme=dark] .month-day-heading { color: #adb0be; }
html[data-theme=dark] .outside-month .month-day-heading { color: #747887; }
html[data-theme=dark] .is-today time { background: #4e83d5; color: #fff; }
html[data-theme=dark] .month-date-pick:hover { background: #354963; }
html[data-theme=dark] .month-event:not(.has-delivery) { background: #30333e; color: #b3b8ca; border-left-color: color-mix(in srgb,var(--project-color) 55%,#5a6480); }
html[data-theme=dark] .month-event:not(.has-delivery)>span { color: #999fb2; }
html[data-theme=dark] .month-event:not(.has-delivery):is(:hover,.selected) { background: #394358; color: #d4ddf3; }
html[data-theme=dark] .a-copy { --delivery-ink:#ebc48b; --delivery-fill:#926a35; --delivery-bg:#3a3023; --delivery-border:#6e5636; }
html[data-theme=dark] .b-copy { --delivery-ink:#b4d3ff; --delivery-fill:#466d9f; --delivery-bg:#29394f; --delivery-border:#486588; }
html[data-theme=dark] .final-copy { --delivery-ink:#efb6c8; --delivery-fill:#95586d; --delivery-bg:#402b36; --delivery-border:#794d61; }
html[data-theme=dark] .month-event.delivery-only { background: var(--delivery-bg); border-color: var(--delivery-border); }
html[data-theme=dark] .month-event.has-delivery, html[data-theme=dark] .month-event.has-delivery:is(:hover,.selected) { background: var(--delivery-bg); color: var(--delivery-ink); border-color: var(--delivery-border); border-left-color: var(--delivery-fill); }
html[data-theme=dark] .calendar-project-detail { background: #24262e; border-color: var(--line); }
html[data-theme=dark] :is(.schedule-table th,.schedule-table th.schedule-task,.schedule-table .schedule-delivery-row>.schedule-task) { background: #282a33; color: #aeb3c3; }
html[data-theme=dark] .schedule-table .schedule-task { background: #202228; }
html[data-theme=dark] .schedule-table .phase-schedule-heading td { background: #303540; border-color: #434956; }
html[data-theme=dark] .phase-schedule-heading span { color: #a5aec2; }
html[data-theme=dark] .schedule-table .weekend { background: #262830; }
html[data-theme=dark] .schedule-table .is-today { background: #273751; }
html[data-theme=dark] .schedule-table .is-today :is(strong,small) { color: #a3c9ff; }
html[data-theme=dark] .schedule-date strong { color: #b2bbcd; }
html[data-theme=dark] .schedule-background>span { border-color: #333641; }
html[data-theme=dark] .schedule-bar.doing { background: #344968; border-color: #526e95; color: #d2e4ff; }
html[data-theme=dark] .schedule-bar.planned { background: #353944; border-color: #525766; color: #c2c9d9; }
html[data-theme=dark] .schedule-bar.waiting { background: #493b28; border-color: #7b603a; color: #e9c88e; }
html[data-theme=dark] .schedule-bar.finished { background: #2e4137; border-color: #4e6c5b; color: #acd3bb; }
html[data-theme=dark] .schedule-placeholder { color: #a2aabb; }
html[data-theme=dark] .project-milestones { background: var(--line); border-color: var(--line); }
html[data-theme=dark] .project-milestones>div { background: var(--paper); }
html[data-theme=dark] .project-milestones>:is(.a-copy,.b-copy,.final-copy) { background: var(--delivery-bg); color: var(--delivery-ink); }
html[data-theme=dark] .film-schedule-card { background: #252832; border-color: #424753; color: #d9dfed; }
html[data-theme=dark] .film-schedule-card:hover { background: #2e3a50; border-color: #536b91; }
html[data-theme=dark] .film-schedule-card>span { color: #a0abc0; }
html[data-theme=dark] :is(.board-scope button,.board-scope small) { color: #a8acba; }
html[data-theme=dark] .board-scope button.selected { color: #dce3f3; background: #343a49; border-color: #475269; box-shadow: none; }
html[data-theme=dark] :is(.board-metric,.board-metric.due,.board-metric.urgent,.board-metric.blocked,.people-summary>div) { background: #23252d; border-color: #373a46; }
html[data-theme=dark] :is(.board-metric>span,.board-metric>p,.board-metric strong small) { color: #a6aab9; }
html[data-theme=dark] .board-metric.urgent>strong { color: #e29b9f; }
html[data-theme=dark] .board-metric.blocked>strong { color: #b3a9da; }
html[data-theme=dark] .board-metric.due>strong { color: #d4b87a; }
html[data-theme=dark] .board-delivery { background: #383026; border-color: #665637; color: #d6b981; }
html[data-theme=dark] .board-delivery.bCopy { background: #29354c; border-color: #445d84; color: #a6c3ee; }
html[data-theme=dark] .board-delivery.final { background: #3d2e3a; border-color: #725268; color: #dfaec5; }
html[data-theme=dark] :is(.board-empty-line,.board-no-people) { color: #a4a8b7; border-color: #414654; }
html[data-theme=dark] .board-unassigned>summary small { color: #b5aa92; }
html[data-theme=dark] .board-unassigned-list>div { border-color: #544a37; }
html[data-theme=dark] .board-focus-toggle { color: #b9bbc8; background: #2e313c; border-color: #454b5b; }
html[data-theme=dark] .board-focus-toggle.selected { color: #deb4ac; background: #453535; border-color: #735451; }
html[data-theme=dark] .board-person { background: linear-gradient(145deg,#2b3140,#272d3b 55%,#252a35); border-color: #3e465b; }
html[data-theme=dark] .board-person.due { background:var(--paper); border-color:var(--line); }
html[data-theme=dark] .board-person.urgent { background:var(--paper); border-color:var(--line); }
html[data-theme=dark] .board-person.blocked { background:var(--paper); border-color:var(--line); }
html[data-theme=dark] :is(.board-person .avatar,.staff-card .avatar) { background: #ffffff0d; color: #bfcee7; }
html[data-theme=dark] :is(.board-person-state,.board-task-meta .status) { background: #ffffff0b; color: #b8c4db; }
html[data-theme=dark] .board-person.urgent .board-person-state { color: #e5abb7; }
html[data-theme=dark] .board-person.blocked .board-person-state { color: #c5b8e7; }
html[data-theme=dark] :is(.board-person>header p,.board-person h3 small,.board-person-metrics,.board-task>small,.board-task-meta,.board-last-update,.board-clock,.board-card-empty) { color: #a7aec1; }
html[data-theme=dark] :is(.board-person-metrics b,.board-last-update p) { color: #c3cbdc; }
html[data-theme=dark] :is(.board-person-metrics,.board-task,.board-card-actions) { border-color: #ffffff12; }
html[data-theme=dark] .board-tag.due { background: #5a4929; color: #ecd7a2; }
html[data-theme=dark] .board-tag.blocked { background: #504360; color: #dac9ec; }
html[data-theme=dark] .board-block-note { background: #ffffff08; color: #d1b997; border-color: #947657; }
html[data-theme=dark] .people-company-heading h2>span { background: #343847; color: #b0b8ce; }
html[data-theme=dark] .staff-card { background: linear-gradient(145deg,#39352e,#30323b 50%,#283345); border-color: #504a41; }
html[data-theme=dark] .staff-card.free { background: linear-gradient(145deg,#283d34,#29383e 50%,#273347); border-color: #3e554c; }
html[data-theme=dark] .staff-card.busy { background: linear-gradient(145deg,#442f37,#38303e 50%,#2b3147); border-color: #624650; }
html[data-theme=dark] .staff-card :is(.staff-card-metrics>div>span,.staff-card-projects>span,.staff-card-estimate,.staff-card-name small) { color: #b0b5c6; }
html[data-theme=dark] .staff-card .secondary { background: #ffffff0a; border-color: #ffffff20; color: #d1d8e8; }
html[data-theme=dark] .staff-card .secondary:hover { background: #ffffff13; }
html[data-theme=dark] :is(.staff-card .member-projects button,.member-projects button,.member-projects span) { background: #ffffff10; color: #c5cddf; }
html[data-theme=dark] .staff-card-footer { border-color: #ffffff13; }
html[data-theme=dark] .staff-card .load-status { background: #ffffff0a; }
html[data-theme=dark] :is(.load-count.free,.load-status.free,.people-summary .free strong) { color: #a2cbb2; }
html[data-theme=dark] :is(.load-count.active,.staff-card .load-count.active,.load-status.active) { color: #d8bd81; }
html[data-theme=dark] :is(.load-count.busy,.staff-card .load-count.busy,.load-status.busy,.people-summary .busy strong) { color: #e4a6b4; }
html[data-theme=dark] .company-empty { background: #222631; border-color: #3d4558; color: #a3adc2; }
html[data-theme=dark] .daily-self { background: linear-gradient(120deg,#293850,#29303e); border-color: #3d506e; }
html[data-theme=dark] .daily-self p { color: #aabbD8; }
html[data-theme=dark] .person-activity-card { background: linear-gradient(145deg,#292e3a,#232b3a); border-color: #3e475c; }
html[data-theme=dark] :is(.person-activity-heading,.daily-task,.daily-card-footer,.daily-updates,.daily-updates>div) { border-color: #ffffff12; }
html[data-theme=dark] :is(.daily-card-footer,.daily-review-status,.daily-empty,.daily-updates small,.daily-due,.person-update-count,.person-activity-empty) { color: #a7b0c3; }
html[data-theme=dark] :is(.daily-card-footer b,.daily-task-state,.daily-updates summary,.daily-checkin-intro) { color: #b9c7df; }
html[data-theme=dark] .daily-chip { background: #393d48; color: #b7bfD0; }
html[data-theme=dark] :is(.daily-chip.working,.daily-added-badge,.attendance-status.working) { background: #4a3e2c; color: #e5c590; }
html[data-theme=dark] :is(.daily-chip.complete,.attendance-status.out) { background: #2e4338; color: #b2d7c1; }
html[data-theme=dark] :is(.daily-due.late,.daily-unfinished,.attendance-table .attendance-unfinished,.attendance-table .attendance-next-day) { color: #e1b578; }
html[data-theme=dark] :is(.daily-task-number,.daily-review-group>h3>span,.person-update-count.has-updates) { background: #31486b; color: #bcdaff; }
html[data-theme=dark] .daily-review-group>h3 { color: #c0d4f6; }
html[data-theme=dark] :is(.activity-context,.activity-heading h2 span) { background: #323b4e; color: #b4c2dc; }
html[data-theme=dark] .activity-context:hover { background: #3e5071; color: #d8e8ff; }
html[data-theme=dark] :is(.activity-content>p,.activity-content .activity-block) { color: #c2c9d9; }
html[data-theme=dark] .attendance-modes { background: #272b35; border-color: #3c4250; }
html[data-theme=dark] .attendance-modes button[aria-pressed=true] { background: #3c465c; color: #d5e3ff; }
html[data-theme=dark] .attendance-status { background: #333741; color: #b3bacb; }
html[data-theme=dark] .attendance-status.missing-out { background: #46332a; color: #e4b396; }
html[data-theme=dark] :is(.attendance-muted,.attendance-table small,.attendance-note) { color: #a2a8b8; }
html[data-theme=dark] :is(.bulk-toolbar,.bulk-table .bulk-name,.bulk-table th.bulk-name) { background: #272c36; }
html[data-theme=dark] :is(.bulk-new,.bulk-new .bulk-name,.bulk-add-row) { background: #26354b; }
html[data-theme=dark] .bulk-add-row:hover { background: #35476a; }
html[data-theme=dark] .bulk-footer { background: #292f3c; border-color: #45516a; }
html[data-theme=dark] :is(.phase-editor-row,.schedule-optional,.episode-copy-preview,.backup-review,.discussion,.detail-note) { background: #292d36; border-color: #424857; }
html[data-theme=dark] :is(.phase-add,.phase-editor-row.is-removed) { background: #31323a; border-color: #505465; }
html[data-theme=dark] :is(.phase-create-tasks,.schedule-choice,.backup-stats,.backup-review>small,.backup-stats small,.intro,.discussion p) { color: #b6bece; }
html[data-theme=dark] :is(.episode-copy-list>div,.account-row,.backup-account) { border-color: #424653; }
html[data-theme=dark] .change-filters { background: #272b36; border-color: #3b4252; }
html[data-theme=dark] :is(.change-diff-heading,.change-diff-row) { background: #282e3a; border-color: #444d60; }
html[data-theme=dark] :is(.change-log-table time,.change-kind,.change-summary,.change-diff-row b) { color: #a8b2c7; }
html[data-theme=dark] :is(.change-action,.change-diff-row span:last-child) { color: #a1c8ff; }
html[data-theme=dark] .change-test { background: #463b29; color: #dac394; }
html[data-theme=dark] .feedback-item { background: #242935; border-color: #3b4458; }
html[data-theme=dark] :is(.feedback-preview,.feedback-meta) { color: #a8b2c7; }
html[data-theme=dark] .feedback-response { background: #2b3549; }
html[data-theme=dark] .feedback-status.pending { background: #433722; color: #e2c088; }
html[data-theme=dark] .feedback-status.working { background: #2e4157; color: #afcfe9; }
html[data-theme=dark] .feedback-status.resolved { background: #2b4037; color: #b0d3bf; }
html[data-theme=dark] dialog { background: var(--paper); border-color: #444752; }
html[data-theme=dark] dialog::backdrop { background: #060810a3; }
html[data-theme=dark] :is(.modal-head,.modal-actions) { border-color: #383d49; }
html[data-theme=dark] .modal-head p { color: #a5aaba; }
html[data-theme=dark] .modal-actions { background: #242831; }
html[data-theme=dark] .close { color: #b7bed1; }
html[data-theme=dark] .close:hover { background: #3b4254; color: #eef2ff; }
html[data-theme=dark] :is(.calendar-project-choice,.project-calendar-field) { background: #292d38; border-color: #444c5e; }
html[data-theme=dark] .calendar-project-choice:hover, html[data-theme=dark] .project-calendar-field.is-active { background: #303e55; border-color: #6695d1; box-shadow: none; }
html[data-theme=dark] .project-calendar-field:is(.a-copy,.b-copy,.final-copy) { border-left-color: var(--delivery-fill); }
html[data-theme=dark] .project-calendar-field:is(.a-copy,.b-copy,.final-copy) strong { color: var(--delivery-ink); }
html[data-theme=dark] :is(.project-calendar-field input,.project-calendar-toolbar>input) { background: #212734; border-color: #4b5973; color: #dbe7ff; }
html[data-theme=dark] .calendar-selection-hint { background: #2c3d59; color: #bacdec; }
html[data-theme=dark] .project-calendar-day { background: #20252f; border-color: #3c4555; }
html[data-theme=dark] .project-calendar-day.weekend { background: #272e3c; }
html[data-theme=dark] .project-calendar-day.other-month { background: #20232a; color: #848da2; }
html[data-theme=dark] .project-calendar-day.in-range { background: #2e4263; }
html[data-theme=dark] .project-calendar-day.range-start, html[data-theme=dark] .project-calendar-day.range-end { background: #385b87; }
html[data-theme=dark] .calendar-boundary { color: #c2deff; }
html[data-theme=dark] .account-gate { background: radial-gradient(ellipse at 20% 10%,#202d47,transparent 50%),radial-gradient(ellipse at 90% 90%,#342f2a,transparent 45%),#16171b; }
html[data-theme=dark] .account-card>p { color: #a4acbc; }
html[data-theme=dark] .account-card>.brand-icon { background: #32312e; color: #d5ab64; }
html[data-theme=dark] :is(.account-more[open]>button,.episode-context-menu) { background: #2c303beb; border-color: #4d566a; color: var(--ink); }
html[data-theme=dark] .episode-context-menu button:is(:hover,:focus-visible) { background: #3b4861; color: #c6dfff; }
html[data-theme=dark] .episode-context-menu .danger-text:is(:hover,:focus-visible) { background: #513139; color: #ffb4bf; }
html[data-theme=dark] #toast { background: #343a49f5; border-color: #555f74; color: #eef2ff; }
html[data-theme=dark] .theme-panel { box-shadow: 0 16px 50px #00000060,0 2px 8px #00000020; }
@media(max-width:760px) {
  .app-bar-actions { column-gap: 10px; row-gap: 8px; }
  .app-bar-actions .theme-trigger { padding: 5px 8px; }
  .theme-panel { padding: 18px; }
  html[data-theme=dark] .sidebar { border-bottom-color: #363c49; }
}

/* White light theme: neutral surfaces, color reserved for state and priority. */
:root:not([data-theme=dark]) {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --muted: #62656d;
  --line: #e1e3e8;
  --accent: #006edb;
  --soft: #edf5ff;
  --clarity-soft: #f7f8fa;
  --clarity-field: #ffffff;
  --surface-shadow: 0 2px 4px #1d1d1f04,0 8px 24px #1d1d1f07;
}
html:not([data-theme=dark]) :is(.sidebar,.app-bar,.role-test-bar) { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) :is(.sidebar nav button,.app-bar-actions button,.workspace-label,.role-test-bar,.role-test-bar small,.role-test-actions label,#connection-state,.profile small) { color: var(--muted); }
html:not([data-theme=dark]) .sidebar nav button:hover { background: #f5f5f7; color: var(--ink); }
html:not([data-theme=dark]) .sidebar nav button.active { background: #edf5ff; color: #005bb8; box-shadow: inset 3px 0 #0071e3; }
html:not([data-theme=dark]) .role-test-actions button[aria-pressed=true] { background: #edf5ff; border-color: #b8d7fa; color: #005bb8; }
html:not([data-theme=dark]) :is(.breadcrumb,.subtitle,.help-line,.schedule-note,.date-note,.form-hint,.intro,.discussion p,.table-footer,.people-rules) { color: var(--muted); }
html:not([data-theme=dark]) :is(.panel,.project-group,.schedule-panel,.month-panel,.activity-panel,.attendance-panel,.feedback-panel,.change-log-panel,.account-card,.calendar-project-detail,.feedback-item) { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) :is(.secondary,.theme-trigger) { background: #fff; border-color: #d3d6dc; color: #373a41; }
html:not([data-theme=dark]) .secondary:hover { background: #f5f5f7; border-color: #aeb4be; }
html:not([data-theme=dark]) :is(.quiet,.more-button) { color: var(--muted); }
html:not([data-theme=dark]) :is(.quiet,.more-button):hover { background: #f2f3f5; color: var(--ink); }
html:not([data-theme=dark]) .text-button { color: #0066cc; }
html:not([data-theme=dark]) :is(.filters input,.filters select,.field input,.field select,.field textarea,.schedule-options input,.schedule-options select,.people-rules select,.month-options input,.daily-toolbar input,.attendance-controls input,.attendance-controls select,.bulk-context select,.bulk-toolbar input,.bulk-toolbar select,.bulk-table input:not([type=checkbox]),.bulk-table select,.phase-name-label input,.phase-transfer select,.calendar-project-title select,.project-calendar-field input,.project-calendar-toolbar>input,.role-test-actions select,.theme-auto-settings select,.account-row select) { background: #fff; border-color: #cbd0d8; color: var(--ink); }
html:not([data-theme=dark]) :is(input,textarea)::placeholder { color: #737780; }
html:not([data-theme=dark]) .field label { color: #42464e; font-weight: 550; }
html:not([data-theme=dark]) :is(.status.todo,.daily-chip,.attendance-status) { background: #f0f1f4; color: #5c6069; }
html:not([data-theme=dark]) :is(.status.doing,.attendance-status.working,.feedback-status.working) { background: #eaf3ff; color: #165faa; }
html:not([data-theme=dark]) :is(.status.wait,.daily-chip.working,.daily-added-badge,.attendance-status.missing-out,.feedback-status.pending) { background: #fff2d9; color: #885508; }
html:not([data-theme=dark]) :is(.status.done,.daily-chip.complete,.attendance-status.out,.feedback-status.resolved) { background: #e8f6ed; color: #217044; }

/* Dashboard: white cards, colored figures, slim accents and readable badges. */
html:not([data-theme=dark]) :is(.board-metric,.board-person) {
  --board-surface-accent: #5c6574;
  --board-status-bg: #f0f2f5;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--surface-shadow);
}
html:not([data-theme=dark]) :is(.board-metric,.board-person).due { --board-surface-accent: #946008; --board-status-bg: #fff3dc; }
html:not([data-theme=dark]) :is(.board-metric,.board-person).urgent { --board-surface-accent: #bf3547; --board-status-bg: #fff0f2; }
html:not([data-theme=dark]) :is(.board-metric,.board-person).blocked { --board-surface-accent: #7045ae; --board-status-bg: #f3edff; }
html:not([data-theme=dark]) .board-metric { border-left: 4px solid var(--board-surface-accent); }
html:not([data-theme=dark]) .board-metric>span { color: #484b53; font-size: 13px; font-weight: 600; }
html:not([data-theme=dark]) .board-metric>strong { color: var(--board-surface-accent); }
html:not([data-theme=dark]) .board-metric :is(p,strong small) { color: var(--muted); }
html:not([data-theme=dark]) .board-person { border-top: 3px solid var(--board-surface-accent); }
html:not([data-theme=dark]) .board-person :is(.avatar,.board-person-state) { color: var(--board-surface-accent); background: var(--board-status-bg); }
html:not([data-theme=dark]) .board-person-state { font-weight: 600; }
html:not([data-theme=dark]) :is(.board-person>header p,.board-person h3 small,.board-person-metrics,.board-task>small,.board-task-meta,.board-last-update,.board-last-update p,.board-clock,.board-card-empty) { color: var(--muted); font-size: 11px; }
html:not([data-theme=dark]) .board-person-metrics b { color: var(--ink); }
html:not([data-theme=dark]) :is(.board-person-metrics,.board-task,.board-card-actions) { border-color: var(--line); }
html:not([data-theme=dark]) .board-task-title .task-link { color: var(--ink); font-size: 14px; }
html:not([data-theme=dark]) .board-card-empty { font-size: 12px; line-height: 1.65; }
html:not([data-theme=dark]) .board-block-note { background: #fff8ea; color: #815210; border-left-color: #d49b32; }
html:not([data-theme=dark]) .board-tag.urgent { background: #bf3547; color: #fff; }
html:not([data-theme=dark]) .board-tag.due { background: #fff0d0; color: #895500; }
html:not([data-theme=dark]) .board-tag.blocked { background: #f0e7ff; color: #7045ae; }
html:not([data-theme=dark]) :is(.board-section-heading>span,.board-empty-line) { color: var(--muted); font-size: 11px; }
html:not([data-theme=dark]) .board-scope button.selected { background: #edf5ff; border-color: #b8d7fa; color: #005bb8; }
html:not([data-theme=dark]) .board-focus-toggle { background: #fff; border-color: #d3d6dc; color: var(--muted); }
html:not([data-theme=dark]) .board-focus-toggle.selected { background: #fff0f2; border-color: #efbfca; color: #bf3547; }
html:not([data-theme=dark]) .board-delivery { background: #fff7e6; border-color: #eed6a6; border-left-color: #c3871b; color: #895600; }
html:not([data-theme=dark]) .board-delivery.bCopy { background: #edf5ff; border-color: #bfd8f5; border-left-color: #367dc5; color: #165fa9; }
html:not([data-theme=dark]) .board-delivery.final { background: #fff0f5; border-color: #ecc4d5; border-left-color: #bd507e; color: #a33163; }

/* Daily work and projects stay white, with quiet gray grouping. */
html:not([data-theme=dark]) .daily-self { background: #fff; border-color: var(--line); border-left: 4px solid #0071e3; box-shadow: var(--surface-shadow); }
html:not([data-theme=dark]) .person-activity-card { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) .person-activity-heading { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) :is(.daily-task,.daily-card-footer,.daily-updates,.daily-updates>div) { border-color: var(--line); }
html:not([data-theme=dark]) :is(.daily-self p,.daily-card-footer,.daily-review-status,.daily-empty,.daily-updates small,.daily-task>small,.daily-due,.person-activity-name p,.person-update-count,.person-activity-empty,.daily-checkin-intro) { color: var(--muted); }
html:not([data-theme=dark]) :is(.daily-task>small,.daily-due,.daily-card-footer,.daily-review-status) { font-size: 11px; }
html:not([data-theme=dark]) :is(.daily-card-footer b,.daily-task-state,.daily-updates summary) { color: #454a54; }
html:not([data-theme=dark]) .daily-task-heading .task-link { color: var(--ink); font-size: 14px; }
html:not([data-theme=dark]) :is(.daily-due.late,.daily-unfinished,.attendance-table .attendance-unfinished,.attendance-table .attendance-next-day) { color: #bf3547; }
html:not([data-theme=dark]) :is(.daily-task-number,.daily-review-group>h3>span,.activity-context,.activity-heading h2 span) { background: #f2f3f5; color: #555d6b; }
html:not([data-theme=dark]) :is(.collaboration-overview,.project-team,.film-summary,.project-summary) { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) :is(.collaboration-project,.project-teammate) { background: #f7f8fa; border-color: var(--line); color: #3f4754; }
html:not([data-theme=dark]) :is(.collaboration-project,.project-teammate):hover { background: #edf5ff; border-color: #b8d7fa; }
html:not([data-theme=dark]) :is(.collaboration-project small,.collaboration-overview .section-line p,.collaboration-scope-note,.project-team h2 small,.project-teammate small) { color: var(--muted); }
html:not([data-theme=dark]) .project-row { background: #fff; }
html:not([data-theme=dark]) .project-row:hover { background: #fafafa; }
html:not([data-theme=dark]) .project-group[open]>.project-row { background: #f7f8fa; border-color: var(--line); }
html:not([data-theme=dark]) :where(.project-row-name p,.project-group[open]>.project-row p,.project-row-meta,.project-group[open]>.project-row .project-row-meta,.episode-meta,.stage-task .owner,.days,.task-name small) { color: var(--muted); }
html:not([data-theme=dark]) :is(.project-arrow,.project-group[open]>.project-row .project-arrow) { color: #697384; }
html:not([data-theme=dark]) .episode-tabs { border-color: var(--line); }
html:not([data-theme=dark]) .episode-tabs button { color: var(--muted); }
html:not([data-theme=dark]) .episode-tabs button.active { color: #0066cc; border-color: #0071e3; }
html:not([data-theme=dark]) .stage-label { background: #f7f8fa; border-color: var(--line); }
html:not([data-theme=dark]) .stage-label h3 { color: #414650; }
html:not([data-theme=dark]) .stage-label span { color: var(--muted); }
html:not([data-theme=dark]) .stage-task, html:not([data-theme=dark]) .stage-task:nth-child(even) { background: #fff; border-color: var(--line); }

/* Calendars: production is neutral; delivery, today and date selection use color. */
html:not([data-theme=dark]) .month-weekdays { background: #fafafa; border-color: var(--line); }
html:not([data-theme=dark]) .month-weekdays span { color: var(--muted); }
html:not([data-theme=dark]) .month-day { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) .month-day.weekend { background: #fafafa; }
html:not([data-theme=dark]) .month-day.outside-month { background: #f5f5f7; }
html:not([data-theme=dark]) .month-day.is-today { background: #f3f8ff; }
html:not([data-theme=dark]) .month-day-heading { color: #565d69; }
html:not([data-theme=dark]) .outside-month .month-day-heading { color: #777e89; }
html:not([data-theme=dark]) .month-event:not(.has-delivery) { background: #f1f2f4; color: #565e6c; border-left-color: color-mix(in srgb,var(--project-color) 45%,#c3c8d0); }
html:not([data-theme=dark]) .month-event:not(.has-delivery)>span { color: #69717e; }
html:not([data-theme=dark]) .a-copy { --delivery-ink:#895600; --delivery-fill:#966109; --delivery-bg:#fff7e6; --delivery-border:#eed6a6; }
html:not([data-theme=dark]) .b-copy { --delivery-ink:#165fa9; --delivery-fill:#2669ad; --delivery-bg:#edf5ff; --delivery-border:#bfd8f5; }
html:not([data-theme=dark]) .final-copy { --delivery-ink:#a33163; --delivery-fill:#ac3c6a; --delivery-bg:#fff0f5; --delivery-border:#ecc4d5; }
html:not([data-theme=dark]) .film-schedule-card { background: #fff; border-color: var(--line); color: var(--ink); }
html:not([data-theme=dark]) .film-schedule-card>span { color: var(--muted); }
html:not([data-theme=dark]) .film-schedule-card:hover { background: #f5f9ff; border-color: #a3c7ee; }
html:not([data-theme=dark]) .project-milestones>div:not(.a-copy):not(.b-copy):not(.final-copy) { background: #fff; }
html:not([data-theme=dark]) :is(.schedule-table,.schedule-table .schedule-task) { background: #fff; }
html:not([data-theme=dark]) :is(.schedule-table th,.schedule-table th.schedule-task,.schedule-table .schedule-delivery-row>.schedule-task) { background: #f7f8fa; color: #535c6a; }
html:not([data-theme=dark]) .schedule-table .phase-schedule-heading td { background: #f1f2f5; border-color: var(--line); }
html:not([data-theme=dark]) :is(.phase-schedule-heading span,.schedule-date strong,.schedule-task small,.schedule-estimate,.schedule-placeholder) { color: var(--muted); }
html:not([data-theme=dark]) .schedule-table .weekend { background: #fafafa; }
html:not([data-theme=dark]) .schedule-table .is-today { background: #edf5ff; }
html:not([data-theme=dark]) .schedule-background>span { border-color: #e9ebef; }
html:not([data-theme=dark]) .schedule-bar.doing { background: #edf2f8; border-color: #c8d3e2; color: #4b627f; }
html:not([data-theme=dark]) .schedule-bar.planned { background: #f0f1f4; border-color: #d8dbe1; color: #606875; }
html:not([data-theme=dark]) .schedule-bar.waiting { background: #fff2d9; border-color: #e7c887; color: #885508; }
html:not([data-theme=dark]) .schedule-bar.finished { background: #eaf5ee; border-color: #bfddca; color: #2e6945; }

/* Availability: color sits on the card edge, workload number and status. */
html:not([data-theme=dark]) :is(.people-summary>div,.people-summary>.free,.people-summary>.busy) { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) .staff-card { background: #fff; border-color: var(--line); border-top: 3px solid #b8801b; }
html:not([data-theme=dark]) .staff-card.free { background: #fff; border-color: var(--line); border-top-color: #31935b; }
html:not([data-theme=dark]) .staff-card.busy { background: #fff; border-color: var(--line); border-top-color: #bf3547; }
html:not([data-theme=dark]) .staff-card .avatar { background: #f2f3f5; color: #566174; }
html:not([data-theme=dark]) .staff-card :is(.staff-card-metrics>div>span,.staff-card-projects>span,.staff-card-estimate,.staff-card-name small) { color: var(--muted); }
html:not([data-theme=dark]) .staff-card .member-projects button { background: #f5f6f8; color: #505968; border: 1px solid var(--line); }
html:not([data-theme=dark]) .staff-card-footer { border-color: var(--line); }
html:not([data-theme=dark]) :is(.load-count.free,.load-status.free,.people-summary .free strong) { color: #217044; }
html:not([data-theme=dark]) :is(.load-count.active,.staff-card .load-count.active,.load-status.active) { color: #946008; }
html:not([data-theme=dark]) :is(.load-count.busy,.staff-card .load-count.busy,.load-status.busy,.people-summary .busy strong) { color: #bf3547; }
html:not([data-theme=dark]) .staff-card .load-status.free { background: #e8f6ed; }
html:not([data-theme=dark]) .staff-card .load-status.active { background: #fff3dc; }
html:not([data-theme=dark]) .staff-card .load-status.busy { background: #fff0f2; }
html:not([data-theme=dark]) :is(.company-empty,.people-company-heading h2>span) { background: #f7f8fa; border-color: var(--line); color: var(--muted); }

/* White ledgers, feedback, working forms and overlays. */
html:not([data-theme=dark]) :is(.attendance-table th,.people-table th,.bulk-table th,.change-log-table th,.date-preview-table th) { background: #f7f8fa; color: #535b68; border-color: var(--line); }
html:not([data-theme=dark]) :is(.attendance-table td,.change-log-table td,.date-preview-table td,.bulk-table td) { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) .collection-surface[data-collection-view=list] :is(.attendance-table,.change-log-table) tbody tr:nth-child(even)>td { background: #fafafa; }
html:not([data-theme=dark]) :is(.attendance-muted,.attendance-table small,.attendance-note,.change-log-table time,.change-kind,.change-summary,.change-diff-row b,.feedback-preview,.feedback-meta,.feedback-kind) { color: var(--muted); }
html:not([data-theme=dark]) :is(.attendance-modes,.change-filters,.bulk-toolbar,.bulk-footer,.bulk-table .bulk-name) { background: #f7f8fa; border-color: var(--line); }
html:not([data-theme=dark]) .attendance-modes button[aria-pressed=true] { background: #fff; color: #0066cc; }
html:not([data-theme=dark]) :is(.change-diff-heading,.change-diff-row) { background: #f7f8fa; border-color: var(--line); }
html:not([data-theme=dark]) :is(.change-action,.change-diff-row span:last-child) { color: #0066cc; }
html:not([data-theme=dark]) :is(.bulk-new td,.bulk-new .bulk-name,.bulk-add-row) { background: #f0f6ff; }
html:not([data-theme=dark]) .feedback-response { background: #f3f8ff; border: 1px solid #c5dcf5; }
html:not([data-theme=dark]) :is(.notice,.daily-notice) { background: #fff8e9; border-color: #edd7aa; color: #815510; }
html:not([data-theme=dark]) :is(dialog,.theme-panel,.episode-context-menu) { background: #fff; border-color: #d3d6dc; color: var(--ink); }
html:not([data-theme=dark]) :is(.modal-head,.modal-actions) { background: #fff; border-color: var(--line); }
html:not([data-theme=dark]) .modal-head p { color: var(--muted); }
html:not([data-theme=dark]) :is(.detail-note,.discussion,.phase-editor-row,.schedule-optional,.episode-copy-preview,.backup-review,.calendar-project-choice,.project-calendar-field,.theme-auto-settings) { background: #f8f9fb; border-color: var(--line); }
html:not([data-theme=dark]) :is(.close,.episode-menu-label,.phase-create-tasks,.schedule-choice,.backup-stats,.backup-review>small) { color: var(--muted); }
html:not([data-theme=dark]) .episode-context-menu button:is(:hover,:focus-visible) { background: #edf5ff; color: #005bb8; }
html:not([data-theme=dark]) .episode-context-menu .danger-text:is(:hover,:focus-visible) { background: #fff0f2; color: #b32f42; }
html:not([data-theme=dark]) .project-calendar-field.is-active { background: #edf5ff; border-color: #72a7df; }
html:not([data-theme=dark]) .project-calendar-day { background: #fff; border-color: var(--line); color: #4c5666; }
html:not([data-theme=dark]) .project-calendar-day.weekend { background: #fafafa; }
html:not([data-theme=dark]) .project-calendar-day.other-month { background: #f5f5f7; color: #737b88; }
html:not([data-theme=dark]) .project-calendar-day.in-range { background: #edf5ff; }
html:not([data-theme=dark]) :is(.project-calendar-day.range-start,.project-calendar-day.range-end) { background: #cce3ff; color: #124f94; }
html:not([data-theme=dark]) .calendar-selection-hint { background: #edf5ff; color: #215a98; }
html:not([data-theme=dark]) .account-gate { background: #fff; }

/* List/card presentation uses the same live data and form controls. */
:root { --collection-card: #fff; --collection-line: #e1e3e8; --collection-rule: #e1e3e8; --collection-head: #edf5ff; }
:root[data-theme=dark] { --collection-card: linear-gradient(145deg,#252b37,#212631); --collection-line: #424e63; --collection-rule: #414c60; --collection-head: #303b4e; }
.collection-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:20px 0 14px; }
.collection-toolbar>span { color:var(--muted); font-size:12px; font-weight:550; }
.collection-switch { display:inline-flex; gap:3px; padding:4px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.collection-switch button { display:flex; align-items:center; gap:7px; padding:7px 13px; border:1px solid transparent; border-radius:8px; font-size:12px; color:var(--muted); }
.collection-switch svg { width:16px; height:16px; }
.collection-switch button[aria-pressed=true] { color:var(--ink); background:var(--collection-head); border-color:var(--collection-line); box-shadow:0 2px 5px #17294409; font-weight:600; }
.collection-switch button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.schedule-card-state,.schedule-card-deliveries,.collection-select-label { display:none; }

/* Table records become labelled cards; their table semantics remain explicit. */
html .collection-surface[data-collection-view=cards]:is(.attendance-panel,.change-log-panel,.schedule-panel,.bulk-panel) { background:none; border:0; box-shadow:none; overflow:visible; }
html .collection-surface[data-collection-view=cards] :is(.attendance-scroll,.change-log-scroll,.schedule-scroll,.table-wrap) { overflow:visible; }
html .collection-surface[data-collection-view=cards] table { display:block; width:100%; min-width:0!important; background:none; }
.collection-surface[data-collection-view=cards] thead { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.collection-surface[data-collection-view=cards] tbody { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr)); gap:16px; }
html .collection-surface[data-collection-view=cards] tbody>tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:16px 18px; padding:22px; border:1px solid var(--collection-line); border-radius:18px; background:var(--collection-card); box-shadow:var(--surface-shadow); min-width:0; }
html .collection-surface[data-collection-view=cards] tbody>tr>:is(td,th) { display:block; width:auto; min-width:0; border:0; background:none; padding:0; overflow-wrap:anywhere; color:var(--ink); }
.collection-surface[data-collection-view=cards] [data-card-label]::before { content:attr(data-card-label); display:block; color:var(--muted); font-size:11px; font-weight:500; margin-bottom:7px; }
.collection-surface[data-collection-view=cards] :is(td,th)[colspan]:not([colspan="1"]) { grid-column:1/-1; }
.collection-surface[data-collection-view=cards] tr:has(.attendance-empty,.change-empty) { grid-column:1/-1; }
html .collection-surface[data-collection-view=cards] .table-footer { border:0; padding:18px 2px 0; gap:15px; flex-wrap:wrap; }

/* Attendance: name first, date and status, clock-in/out side by side. */
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(2) { grid-column:1/-1; order:-3; padding-bottom:14px; border-bottom:1px solid var(--collection-rule); }
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(2)::before { display:none; }
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(2)>strong { font-size:18px; }
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(1) { order:-2; }
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(5) { order:-1; }
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(6) { grid-column:1/-1; padding-top:14px; border-top:1px solid var(--collection-rule); }
.collection-surface[data-collection-view=cards] .attendance-table time { font-size:17px; font-variant-numeric:tabular-nums; }

/* Change history and editable task forms keep every field available. */
.collection-surface[data-collection-view=cards] .change-log-table tbody { grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr)); }
.collection-surface[data-collection-view=cards] .change-log-table td:is(:first-child,:last-child) { grid-column:1/-1; }
.collection-surface[data-collection-view=cards] .change-log-table td:last-child { border-top:1px solid var(--collection-rule); padding-top:14px; }
.collection-surface[data-collection-view=cards] .change-diff-row { grid-template-columns:minmax(48px,.7fr) repeat(2,minmax(0,1fr)); }
.collection-surface[data-collection-view=cards] .bulk-toolbar { border:1px solid var(--collection-line); border-radius:14px; margin-bottom:14px; }
.collection-surface[data-collection-view=cards] .bulk-table tbody { grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr)); }
.collection-surface[data-collection-view=cards] .bulk-table thead { position:static; width:auto; height:auto; overflow:visible; clip-path:none; white-space:normal; display:block; margin:0 0 12px; }
.collection-surface[data-collection-view=cards] .bulk-table thead tr { display:block; }
html .collection-surface[data-collection-view=cards] .bulk-table thead th { display:none; }
html .collection-surface[data-collection-view=cards] .bulk-table thead th:first-child { display:flex; align-items:center; gap:9px; border:0; padding:6px 2px; background:none; width:auto; }
.collection-surface[data-collection-view=cards] .collection-select-label { display:inline; font-size:12px; color:var(--muted); }
.collection-surface[data-collection-view=cards] .bulk-table :is(.bulk-check,.bulk-remove) { order:-2; }
.collection-surface[data-collection-view=cards] .bulk-table .bulk-remove { justify-self:end; }
.collection-surface[data-collection-view=cards] .bulk-table .bulk-name { grid-column:1/-1; }
html .collection-surface[data-collection-view=cards] .bulk-table .bulk-name { position:static; background:none; }
.collection-surface[data-collection-view=cards] .bulk-table .bulk-check { text-align:left; }
.collection-surface[data-collection-view=cards] .bulk-table :is(input:not([type=checkbox]),select) { width:100%; min-width:0; }
.collection-surface[data-collection-view=cards] .bulk-table .bulk-new { border-color:var(--accent); }
.collection-surface[data-collection-view=cards] .bulk-add-row { margin-top:16px; border-radius:12px; border:1px dashed var(--collection-line); }

/* Project task cards retain production phase grouping and existing action menus. */
.project-list[data-collection-view=cards] { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr)); gap:18px; }
.project-list[data-collection-view=cards] .project-group { margin:0; min-width:0; }
.project-list[data-collection-view=cards] .project-group[open] { grid-column:1/-1; }
.project-list[data-collection-view=cards] .project-group:not([open])>.project-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:15px; }
.project-list[data-collection-view=cards] .project-group:not([open]) .project-row-meta { grid-column:2; justify-content:flex-start; gap:16px; }
.project-list[data-collection-view=cards] .project-group:not([open]) .project-header-actions { grid-column:3; grid-row:1; }
html .collection-surface[data-collection-view=cards] .stage { display:block; border:0; margin-top:20px; }
html .collection-surface[data-collection-view=cards] .project-body>.panel { border:0; background:none; box-shadow:none; }
html .collection-surface[data-collection-view=cards] .stage-label { display:flex; align-items:center; gap:10px; padding:10px 2px 14px; background:none; border:0; }
.collection-surface[data-collection-view=cards] .stage-label :is(h3,span) { margin:0; }
.collection-surface[data-collection-view=cards] .stage-label small { margin-left:auto; }
.collection-surface[data-collection-view=cards] .stage>div:last-child { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)); gap:14px; }
html .collection-surface[data-collection-view=cards] .stage-task { grid-template-columns:1fr auto; gap:16px 10px; background:var(--collection-card); border:1px solid var(--collection-line); border-radius:15px; padding:20px; }
.collection-surface[data-collection-view=cards] .stage-task .task-name { grid-column:1/-1; }
.collection-surface[data-collection-view=cards] .stage-task .task-link { font-size:15px; }
.collection-surface[data-collection-view=cards] .stage-task :is(.owner,.issue-owner)::before { content:'负责人 · '; color:var(--muted); }
.collection-surface[data-collection-view=cards] .stage-task .days { display:block; text-align:right; }
.collection-surface[data-collection-view=cards] .stage-task>.status { justify-self:start; }
.collection-surface[data-collection-view=cards] .stage-task>button { justify-self:end; }

/* A timeline can be read as task cards without hiding start/end dates or ownership. */
.collection-surface[data-collection-view=cards] :is(.schedule-toolbar,.schedule-note) { display:none; }
html .collection-surface[data-collection-view=cards] .schedule-table .phase-schedule-heading { display:block; grid-column:1/-1; border:0; padding:12px 0 0; background:none; box-shadow:none; }
html .collection-surface[data-collection-view=cards] .schedule-table .phase-schedule-heading td { display:flex; align-items:center; gap:10px; }
html .collection-surface[data-collection-view=cards] .schedule-table td { height:auto; background:none; }
html .collection-surface[data-collection-view=cards] .schedule-table .schedule-task { position:static; box-shadow:none; background:none; }
html .collection-surface[data-collection-view=cards] .schedule-table .schedule-delivery-row { display:none; }
.collection-surface[data-collection-view=cards] .schedule-card-deliveries { display:block; }
.collection-surface[data-collection-view=cards] .schedule-table .schedule-task { grid-column:1/-1; }
.collection-surface[data-collection-view=cards] .schedule-task .task-link { font-size:15px; }
.collection-surface[data-collection-view=cards] .schedule-task small { display:block; margin-top:10px; }
.collection-surface[data-collection-view=cards] .schedule-card-state { display:block; margin-top:16px; }
html .collection-surface[data-collection-view=cards] .schedule-table .timeline-cell { display:none; }
.collection-surface[data-collection-view=cards] .schedule-table .schedule-actions { grid-column:1/-1; justify-self:end; }
.schedule-panel[data-collection-view=cards] .table-footer>span:last-child,.schedule-panel[data-collection-view=cards]+.schedule-note { display:none; }

.feedback-list[data-collection-view=cards] { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:16px; }
html .feedback-list[data-collection-view=cards] .feedback-item { margin:0; background:var(--collection-card); border-color:var(--collection-line); }
.feedback-list[data-collection-view=cards] .no-data { grid-column:1/-1; }
.collection-surface[data-collection-key=date-preview][data-collection-view=cards] { overflow:visible; }
.collection-surface[data-collection-view=cards] .date-preview-table td:first-child { grid-column:1/-1; font-weight:600; }
@media(max-width:600px) {
  .collection-toolbar { gap:8px; }
  html .collection-surface[data-collection-view=cards] tbody { grid-template-columns:minmax(0,1fr); }
  html .collection-surface[data-collection-view=cards] tbody>tr { padding:18px; }
  .collection-switch button { padding:7px 10px; }
}

/* Explicit column counts must match the slider, including in narrow panels. */
.collection-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px 20px; }
.card-density { display:inline-flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; white-space:nowrap; }
.card-density[hidden] { display:none; }
html .card-density input[type=range] { width:112px; height:22px; min-width:0; padding:0; margin:0; border:0; border-radius:0; box-shadow:none; background:transparent; accent-color:var(--accent); cursor:pointer; }
.card-density input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }
.card-density output { min-width:30px; color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.native-card-toolbar { justify-content:flex-end; margin:0 0 14px; }
html .collection-surface [data-card-grid][data-card-layout=cards],
html [data-card-grid][data-card-layout=cards] { --card-gap:clamp(8px,calc(28px - var(--card-columns) * 4px),16px); grid-template-columns:repeat(var(--card-columns),minmax(0,1fr)); gap:var(--card-gap); container-type:inline-size; }
html [data-card-grid][data-card-layout=cards]>:is(tr,article,.project-group,.stage-task) { container:density-card / inline-size; min-width:0; overflow-wrap:anywhere; }
html .collection-surface[data-collection-view=cards] tbody>tr,
html [data-card-layout=cards]>:is(.staff-card,.board-person,.feedback-item,.stage-task) { padding:clamp(8px,calc(7cqi / var(--card-columns)),22px); }
html [data-card-grid]>.board-no-people { grid-column:1/-1; }
@container density-card (max-width:240px) {
  html .collection-surface[data-collection-view=cards] tbody>tr>:is(td,th) { grid-column:1/-1; }
  html .collection-surface[data-collection-view=cards] .change-diff-row { grid-template-columns:minmax(0,1fr); gap:4px; }
  .change-diff-heading { display:none; }
  .change-diff-row span:nth-child(2)::before { content:'原来：'; color:var(--muted); }
  .change-diff-row span:last-child::before { content:'现在：'; color:var(--muted); }
  .staff-card-header,.staff-card-header .person,.staff-card-footer,.board-person>header,.board-person-metrics,.board-clock,.board-card-actions,.board-task-title,.board-task-meta,.person-activity-heading,.daily-task-heading,.feedback-item>header { flex-wrap:wrap; }
  .staff-card-metrics { grid-template-columns:minmax(0,1fr); }
  .person-activity-heading,.daily-task-list,.person-activity-updates,.person-activity-footer { padding:10px; }
  .board-person-state,.board-tag { margin-left:0; flex-shrink:1; }
  :is(.status,.load-status,.daily-chip,.feedback-status,.board-tag,.board-person-state) { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  :is(.staff-card-footer,.board-card-actions) button { max-width:100%; padding:6px; white-space:normal; }
  html .project-list[data-collection-view=cards] .project-group:not([open])>.project-row { grid-template-columns:minmax(0,1fr); padding:12px; gap:8px; }
  html .project-list[data-collection-view=cards] .project-group:not([open]) :is(.project-row-meta,.project-header-actions) { grid-column:auto; grid-row:auto; flex-wrap:wrap; }
  html .collection-surface[data-collection-view=cards] .stage-task>* { grid-column:1/-1; }
  html .collection-surface[data-collection-view=cards] .stage-task .days { text-align:left; }
}
@media(max-width:600px) {
  .collection-toolbar { flex-wrap:wrap; }
  .collection-controls { flex:1 1 auto; gap:10px 14px; }
  html .card-density input[type=range] { width:94px; }
}

/* Compact workspace: color carries urgency, space follows information density. */
:root { --surface-shadow:0 1px 3px #18253804; }
.app-bar { min-height:38px; padding:0 20px; }
.app-bar-actions { gap:14px; }
.role-test-bar { padding:5px 20px; gap:8px; }
.role-test-actions button { padding:4px 10px; }
.app-shell { grid-template-columns:184px minmax(0,1fr); }
.sidebar { padding:20px 12px 16px; min-height:480px; }
.sidebar .brand { min-height:68px; padding:0 10px; }
.brand-logo { width:76px; }
.sidebar nav { margin-top:22px; gap:3px; }
.sidebar nav button { padding:10px; gap:10px; font-size:12px; border-radius:8px; }
.nav-icon,.nav-icon svg { width:17px; height:17px; }
.sidebar-note { padding:18px 8px 14px; }
.profile { padding:14px 8px 0; }
main,main:has(.month-panel) { max-width:1680px; padding:26px 30px 40px; }
.page-head,.employee-view .page-head { min-height:0; margin-bottom:20px; gap:16px; align-items:center; }
h1,.page-head h1 { font-size:26px; line-height:1.25; letter-spacing:-.6px; margin-bottom:5px; }
.breadcrumb { font-size:10px; margin-bottom:5px; }
.subtitle { font-size:12px; line-height:1.5; }
h2 { font-size:16px; }
h3 { font-size:14px; }
.actions { gap:8px; }
.primary,.secondary,.quiet,.danger-button { min-height:34px; padding:7px 13px; border-radius:8px; }
.small { min-height:30px; padding:4px 9px; }
.text-button { font-size:12px; }
:is(.panel,.project-group,.schedule-panel,.month-panel,.activity-panel,.attendance-panel,.feedback-panel,.change-log-panel) { border-radius:12px; box-shadow:none; }
.panel-heading { padding:14px 18px; }
.section-line { margin:20px 0 10px; }
.filters { gap:8px; margin-bottom:16px; }
.filters :is(select,input) { padding:7px 10px; min-height:34px; font-size:12px; border-radius:7px; }
th { padding:10px 16px; }
td { padding:13px 16px; }
.table-footer { padding:10px 16px; font-size:11px; }
.help-line,.schedule-note,.date-note { font-size:11px; line-height:1.6; }
.board-scope { margin-bottom:14px; gap:3px; }
.board-scope button { padding:5px 11px; font-size:12px; border-radius:7px; }
.board-scope small { font-size:10px; }

/* Compact metrics and deadlines keep the actual work above the fold. */
.board-metrics,.employee-view .board-metrics,.board-delivery-grid { --board-tile-size:128px; grid-template-columns:repeat(auto-fill,minmax(0,var(--board-tile-size))); gap:10px; justify-content:start; }
.board-metrics,.employee-view .board-metrics { margin-bottom:20px; }
html .board-metrics>.board-metric {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between;
  gap:4px; padding:12px; width:100%; height:var(--board-tile-size); aspect-ratio:1; min-height:0; border-radius:10px;
  border-left-width:3px; box-shadow:none;
}
html .board-metrics>.board-metric>span { font-size:12px; font-weight:550; }
html .board-metrics>.board-metric>strong { margin:0; font-size:32px; letter-spacing:-1px; line-height:1.1; }
html .board-metrics>.board-metric strong small { font-size:10px; margin-left:5px; }
html .board-metrics>.board-metric>p { font-size:10px; margin:2px 0 0; line-height:1.4; }
.board-section-heading { gap:9px; margin-bottom:10px; }
.board-section-heading h2 { font-size:16px; letter-spacing:-.2px; }
.board-section-heading>span { font-size:11px; }
.board-focus-toggle { padding:5px 9px; font-size:11px; border-radius:7px; }
.board-deliveries,.employee-view .board-deliveries { margin-bottom:20px; }
.board-delivery-grid { align-items:start; }
html .board-delivery { grid-template-columns:minmax(0,1fr); grid-template-rows:auto 1fr auto; align-items:start; padding:12px; width:100%; height:var(--board-tile-size); aspect-ratio:1; min-height:0; gap:6px; border-radius:9px; border-left-width:3px; box-shadow:none; }
.board-delivery time { grid-row:auto; font-size:18px; letter-spacing:-.4px; line-height:1.2; }
.board-delivery>strong { font-size:12px; line-height:1.45; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.board-delivery>span { font-size:12px; align-self:end; white-space:nowrap; }
.board-delivery b { font-size:10px; margin-left:4px; }
.board-empty-line { grid-column:1/-1; padding:13px 16px; margin:0; border-radius:8px; }
.board-unassigned { margin-bottom:18px; border-radius:8px; }
.board-unassigned>summary { padding:9px 13px; }
html .board-person { min-height:0; border-radius:12px; box-shadow:none; }
html [data-card-layout=cards]>.board-person { padding:14px; }
.board-person .avatar { width:30px; height:30px; border-radius:8px; }
.board-person>header { gap:8px; }
.board-person h3 { font-size:14px; }
.board-person-state { font-size:10px; padding:2px 6px; }
.board-person-metrics { padding:12px 0 9px; gap:7px; font-size:10px; }
.board-person-metrics b { margin-left:3px; font-size:15px; }
.board-task { padding:10px 0; }
.board-task-title .task-link { font-size:13px; line-height:1.45; }
.board-task-meta { margin-top:5px; gap:5px; }
.board-block-note { padding:5px 8px; margin-top:6px; }
.board-card-empty { padding:18px 0; font-size:11px; }
.board-person footer { padding-top:10px; }
.board-card-actions { padding-top:8px; margin-top:8px; gap:6px; }
.board-card-actions .text-button { font-size:11px; }
.board-last-update { margin-top:8px; }
.board-no-people { padding:24px 16px; }

/* Project and scheduling pages retain their full hierarchy and actions. */
.project-list { gap:12px; }
.project-row { padding:17px 20px; gap:12px; }
.project-row-name h2 { font-size:19px; letter-spacing:-.3px; }
.project-row-name p,.project-group[open]>.project-row p { margin-top:3px; }
.project-body { padding:4px 20px 20px; }
.episode-tabs { gap:20px; }
.episode-tabs button { padding:12px 0 10px; }
.episode-head { margin:16px 0 10px; }
.stage { grid-template-columns:104px minmax(0,1fr); }
.stage-label { padding:16px; }
.stage-task { padding:13px 16px; }
.project-team { padding:12px 14px; border-radius:10px; margin:14px 0; }
.project-team .section-line { margin:0; }
.project-team-grid { margin-top:10px; gap:8px; }
.project-team h2 { font-size:15px; }
.project-teammate { padding:8px 10px; border-radius:8px; }
.project-teammate small { margin-top:2px; font-size:10px; }
html .collection-surface[data-collection-view=cards] .stage { margin-top:12px; }
html .collection-surface[data-collection-view=cards] .stage-label { padding:6px 2px 8px; }
html .collection-surface[data-collection-view=cards] .stage-task { padding:13px 14px; gap:9px 10px; border-radius:10px; }
.collection-surface[data-collection-view=cards] .stage-task .task-link { font-size:13px; }
.collection-surface[data-collection-view=cards] .schedule-task small { margin-top:6px; }
.collection-surface[data-collection-view=cards] .schedule-card-state { margin-top:10px; }
.project-summary,.film-summary { padding:18px 20px; border-radius:12px; }
.project-milestones { border-radius:10px; margin-bottom:18px; }
.project-milestones>div { padding:12px 16px; }
.project-milestones strong { font-size:15px; }
.film-schedule-card { padding:12px 14px; border-radius:9px; }
.film-schedule-card>strong { font-size:14px; margin-bottom:5px; }
.film-schedule-grid { gap:10px; }
.month-toolbar,.schedule-toolbar { padding:13px 16px; gap:12px; }
.month-navigation h2 { font-size:20px; }
.month-navigation { gap:12px; }
.month-weekdays span { padding:8px 0; }
.month-day { padding:7px 6px; min-height:96px; }
.month-day-heading { margin-bottom:5px; }
.month-day-events { gap:4px; }
.month-event:not(.has-delivery) { padding:4px 6px; }
.month-event.has-delivery { padding:6px; }
.delivery-label { padding:2px 5px; }
.calendar-project-detail { padding:14px 16px; border-radius:10px; }
.schedule-table .schedule-task { padding:11px 14px; }
.schedule-table .phase-schedule-heading td { padding:8px 14px; }
.schedule-table .schedule-actions { padding:10px; }
.collaboration-overview { padding:16px; border-radius:12px; }
.collaboration-projects { grid-template-columns:repeat(auto-fill,min(180px,100%)); gap:12px; margin-top:12px; }
.collaboration-project { display:flex; flex-direction:column; align-items:stretch; width:100%; aspect-ratio:1; box-sizing:border-box; min-width:0; padding:14px; border-radius:12px; overflow:hidden; }
.collaboration-project>strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; font-size:15px; line-height:1.4; }
.collaboration-project small { margin-top:8px; font-size:11px; }
.collaboration-project p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; margin:6px 0 10px; font-size:11px; line-height:1.5; }
.collaboration-project-link { margin-top:auto; font-size:11px; font-weight:500; color:var(--accent); }
@media(max-width:600px){.collaboration-projects{grid-template-columns:repeat(auto-fill,min(148px,100%));gap:10px;}.collaboration-project{padding:12px;}.collaboration-project>strong{font-size:14px;}}

/* People, daily work and ledgers use the same compact rhythm. */
.people-company { margin-top:22px; }
.people-summary { gap:10px; margin-bottom:18px; }
.people-summary>div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; min-height:68px; border-radius:10px; box-shadow:none; }
.people-summary small { margin:0; font-size:12px; }
.people-summary strong { font-size:28px; }
.people-company-heading { margin-bottom:12px; }
.people-company-heading h2 { font-size:18px; }
html .staff-card { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); min-height:0; aspect-ratio:auto; border-radius:12px; box-shadow:none; }
.staff-card>* { grid-column:1/-1; }
html [data-card-layout=cards]>.staff-card { padding:16px; }
.staff-card-name h3 { font-size:15px; }
.staff-card-metrics { margin-top:14px; gap:12px; }
.staff-card-metrics strong { font-size:28px; letter-spacing:-.6px; }
.staff-card-estimate { margin:6px 0 10px; }
.staff-card-footer { padding-top:12px; margin-top:14px; }
.company-empty { padding:20px; border-radius:10px; }
.daily-self { padding:14px 16px; border-radius:10px; margin-bottom:16px; }
.daily-self strong { font-size:14px; }
.daily-self p { font-size:12px; margin-top:4px; }
.activity-grid { align-items:start; }
.person-activity-card { min-height:0; border-radius:12px; box-shadow:none; }
.person-activity-heading { padding:14px 16px; }
.person-activity-heading .avatar { width:30px; height:30px; }
.daily-task-list { padding:0 16px; }
.daily-task { padding:11px 0; }
.daily-empty { padding:22px 0; }
.daily-card-footer { margin:0 16px; padding:11px 0; }
.daily-review-status { padding:0 16px 12px; }
.collection-toolbar { gap:10px; margin:14px 0 10px; }
.collection-toolbar h2 { font-size:15px; }
.collection-switch { padding:3px; border-radius:9px; }
.collection-switch button { padding:5px 10px; font-size:11px; border-radius:6px; }
.native-card-toolbar { margin:0 0 10px; }
.card-density { font-size:11px; gap:7px; }
html .card-density input[type=range] { width:90px; }
html .collection-surface[data-collection-view=cards] tbody>tr { padding:14px; gap:12px 14px; border-radius:12px; box-shadow:none; }
html .collection-surface[data-collection-view=cards] td::before { margin-bottom:4px; font-size:10px; }
.collection-surface[data-collection-view=cards] .attendance-table td:nth-child(2) strong { font-size:16px; }
.feedback-item { padding:16px; border-radius:12px; }
.attendance-summary,.feedback-summary { gap:20px; margin:16px 0; }
.attendance-table th,.change-log-table th { padding:10px 16px; }
.attendance-table td,.change-log-table td { padding:12px 16px; }
.change-filters { padding:12px 14px; border-radius:10px; gap:10px; }
.change-record-note { margin:11px 0; }
.change-summary { margin:6px 0; }
.change-diff { margin-top:7px; }
html .collection-surface[data-collection-view=cards] .change-log-table td:first-child { display:flex; flex-wrap:wrap; gap:4px 12px; align-items:center; }
html .collection-surface[data-collection-view=cards] .change-log-table td:first-child::before { margin:0; }
.bulk-toolbar { padding:12px 14px; }
.bulk-footer { padding:12px 16px; border-radius:10px; }
dialog { border-radius:16px; }
.modal-head { padding:20px 22px 16px; }
.modal-head h2 { font-size:21px; }
.modal-head p { margin-top:5px; }
.modal-body { padding:20px 22px; }
.modal-actions { padding:14px 22px; }
.form-grid { gap:14px; }
.field :is(input,select,textarea) { padding:9px 11px; border-radius:7px; }

@container density-card (min-width:560px) {
  .staff-card-header { grid-column:1; grid-row:1/span 2; align-self:start; }
  .staff-card-metrics { grid-column:2/span 2; grid-row:1; margin:0 16px; }
  .staff-card-estimate { grid-column:2/span 2; grid-row:2; margin:4px 16px 0; }
  .staff-card-projects { grid-column:1/-1; grid-row:3; display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:12px; }
  .staff-card-footer { grid-column:4; grid-row:1/span 2; flex-direction:column; align-items:flex-end; justify-content:center; gap:10px; border:0; margin:0; padding:0; }
}
@container density-card (min-width:150px) and (max-width:240px) {
  html .collection-surface[data-collection-view=cards] .attendance-table td:not(:nth-child(2)) { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:3px 6px; }
  html .collection-surface[data-collection-view=cards] .attendance-table td:not(:nth-child(2))::before { margin:0; }
  .collection-surface[data-collection-view=cards] .attendance-table time { font-size:14px; }
}
@container density-card (max-width:240px) {
  html [data-card-layout=cards]>:is(.staff-card,.board-person) { padding:10px; }
  .board-person-metrics { gap:4px 8px; }
  .board-card-actions { align-items:flex-start; }
  .board-card-actions .text-button { padding:3px 0; }
}
@media(max-width:1100px) and (min-width:761px) {
  .app-shell { grid-template-columns:170px minmax(0,1fr); }
  main,main:has(.month-panel) { padding:24px; }
  .page-head { flex-wrap:wrap; }
}
@media(max-width:760px) {
  .app-bar { padding:7px 14px; gap:6px; }
  .app-bar-actions { gap:10px; }
  .role-test-bar { padding:5px 14px; }
  .role-test-bar>div:first-child { gap:6px; }
  .app-shell { display:block; }
  .sidebar,body:has(.role-test-bar:not([hidden])) .sidebar {
    display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center;
    height:auto; min-height:0; padding:10px 14px 8px; gap:8px 16px;
  }
  .sidebar .brand { grid-row:1; grid-column:1; min-height:0; padding:0; }
  .brand-logo { width:46px; }
  .sidebar nav { grid-row:2; grid-column:1/-1; margin:0; gap:4px; }
  .sidebar nav button { padding:8px 10px; font-size:11px; gap:7px; min-height:36px; }
  .sidebar-note { grid-row:1; grid-column:2; margin:0; padding:0; justify-content:flex-end; gap:12px; }
  main,main:has(.month-panel) { padding:20px 16px 30px; }
  .page-head,.employee-view .page-head { flex-direction:row; flex-wrap:wrap; gap:10px; margin-bottom:16px; align-items:center; }
  .page-head h1 { font-size:23px; margin-bottom:0; }
  .page-head .actions { width:auto; margin-top:0; }
  .page-head .primary { font-size:11px; }
  .subtitle { margin-top:5px; }
  .board-metrics,.employee-view .board-metrics,.board-delivery-grid { --board-tile-size:112px; gap:8px; }
  html .board-metrics>.board-metric { padding:10px!important; }
  html .board-metrics>.board-metric>strong { font-size:28px; }
  .board-metrics,.employee-view .board-metrics { margin-bottom:16px; gap:8px; }
  html .board-delivery { padding:10px; gap:5px; }
  .board-delivery time { font-size:17px; }
  .board-section-heading>button { font-size:11px; }
  .project-row { padding:14px 16px; }
  .project-body { padding:4px 16px 16px; }
  .stage-label { padding:13px 10px; }
  .stage-task { padding:12px; }
  .month-toolbar,.schedule-toolbar { padding:12px; }
  .modal-head,.modal-body { padding:18px; }
  .modal-actions { padding:12px 18px; }
}
@media(max-width:520px) {
  .app-bar-actions { gap:8px; }
  .board-metrics,.employee-view .board-metrics,.board-delivery-grid { --board-tile-size:104px; gap:6px; }
  html .board-metrics>.board-metric { padding:9px 10px!important; gap:4px; }
  html .board-metrics>.board-metric>span { font-size:11px; }
  html .board-metrics>.board-metric>strong { font-size:26px; }
  html .board-delivery { padding:9px; }
  .board-delivery time { font-size:16px; }
  .board-section-heading { flex-wrap:wrap; gap:7px; }
  .board-section-heading h2 { font-size:15px; }
  .page-head .actions { flex-wrap:wrap; }
  .project-row-name h2 { font-size:18px; }
  .project-milestones>div { padding:10px 12px; }
}

/* Compact handover workflow: one card per leave, task-level ownership and history. */
.handover-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;margin:16px 0;border:1px solid var(--line);border-left:3px solid #9270d6;border-radius:12px;background:rgba(130,95,210,.07)}
.handover-notice strong{margin-right:12px}.handover-notice span{font-size:12px;color:var(--muted)}
.handover-tabs{display:flex;gap:8px;margin:0 0 18px}.handover-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.handover-card{border:1px solid var(--line);border-radius:16px;padding:18px;background:var(--paper)}
.handover-card header,.handover-item header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.handover-card h2{font-size:17px;margin:0 0 6px}.handover-card small,.handover-item small,.handover-events small{display:block;color:var(--muted);font-size:12px;line-height:1.6}
.handover-card p{font-size:13px;margin:12px 0}.handover-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;min-height:38px}
.handover-card footer{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px}
.handover-status{display:inline-flex;flex-shrink:0;font-size:11px;padding:4px 8px;border-radius:6px;background:rgba(149,111,37,.1);color:#946000}.handover-status.active{background:rgba(0,113,227,.1);color:#0071e3}.handover-status.returned,.handover-status.retained,.handover-status.completed{background:rgba(22,132,89,.1);color:#168459}.handover-status.interrupted,.handover-status.cancelled{color:var(--muted);background:rgba(128,128,128,.1)}
.handover-select-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 8px}.handover-task-options{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:10px;margin-bottom:16px}.handover-task-choice{display:flex;align-items:center;gap:10px;padding:12px;border-bottom:1px solid var(--line);cursor:pointer}.handover-task-choice:last-child{border-bottom:0}.handover-task-choice input{flex:0 0 auto;width:17px;height:17px;accent-color:#0071e3}.handover-task-choice strong{font-size:13px}.handover-task-choice small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.handover-note{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.handover-items{display:grid;gap:12px;margin:20px 0}.handover-item{border:1px solid var(--line);border-radius:12px;padding:14px}.handover-item header .task-link{font-weight:650}.handover-owner{font-size:13px;margin:10px 0}.handover-item .actions{margin-top:12px;flex-wrap:wrap}.handover-more summary,.handover-events summary{color:var(--muted);cursor:pointer;font-size:12px}.handover-more button{margin-top:8px}.handover-events p{font-size:12px;border-bottom:1px solid var(--line);padding:8px 0;line-height:1.6}#handover-assign-form{margin-top:20px;padding:14px;border:1px solid var(--line);border-radius:12px}#handover-assign-form h3{font-size:15px;margin:0 0 8px}
[data-theme="dark"] .handover-card{background:var(--surface,#1c1c1e)}[data-theme="dark"] .handover-status{color:#ebbc6a}[data-theme="dark"] .handover-status.active{color:#72b6ff}[data-theme="dark"] .handover-status.returned,[data-theme="dark"] .handover-status.retained,[data-theme="dark"] .handover-status.completed{color:#73ccac}
@media(max-width:600px){.handover-grid{grid-template-columns:1fr}.handover-notice{align-items:flex-start}.handover-notice span{display:block;margin-top:5px}.handover-item header{flex-wrap:wrap}.handover-notice .text-button{flex-shrink:0}}

#handover-create-form .field + .field,#handover-assign-form .field + .field{margin-top:12px}#handover-create-form .form-grid .field + .field{margin-top:0}#handover-assign-form > button{margin-top:12px}

/* 2026-10-14 · Content hierarchy
   Linear: quiet chrome and separate view controls; Apple: alignment and grouping;
   Carbon: reserve strong contrast for actionable content. Shared across every route. */
:root {
  --ui-chrome:#f6f6f8;
  --ui-wash:#f8f9fb;
  --ui-edge:#e8e9ee;
  --ui-secondary:#6b6f79;
  --ui-strong:#22252d;
  --ui-danger:#bf3547;
  --ui-danger-soft:#fff2f4;
  --ui-purple:#7045ae;
  --ui-purple-soft:#f5f0fc;
  --ui-gold:#946008;
  --ui-gold-soft:#fff7e8;
  --ui-selected:#e9f2ff;
  --ui-progress:#2673d8;
}
:root[data-theme=dark] {
  --ui-chrome:#1b1c21;
  --ui-wash:#25262d;
  --ui-edge:#363740;
  --ui-secondary:#a7a9b5;
  --ui-strong:#f0f1f5;
  --ui-danger:#ff9aac;
  --ui-danger-soft:#3a262e;
  --ui-purple:#c5a8ff;
  --ui-purple-soft:#312b40;
  --ui-gold:#efc27a;
  --ui-gold-soft:#373023;
  --ui-selected:#29384e;
  --ui-progress:#80b4ff;
}
/* A grid child's auto block margins were vertically centering short pages. */
main,main:has(.month-panel) { margin:0 auto; align-self:start; min-width:0; padding:28px 32px 48px; }
html:root .sidebar { background:var(--ui-chrome); border-color:var(--ui-edge); padding:22px 12px 16px; }
html:root .app-bar { height:40px; min-height:40px; background:var(--paper); border-color:var(--ui-edge); }
html:root .role-test-bar { background:var(--ui-chrome); border-color:var(--ui-edge); min-height:36px; padding:4px 20px; font-size:10px; }
html:root .role-test-actions button { padding:3px 9px; font-size:10px; min-height:26px; }
html:root .role-test-actions button[aria-pressed=true] { background:var(--paper); border-color:var(--ui-edge); color:var(--ink); box-shadow:0 1px 2px #00000005; }
html:root .sidebar nav { margin-top:28px; gap:5px; }
html:root .sidebar nav button { font-size:13px; font-weight:450; min-height:39px; border-radius:7px; color:var(--ui-secondary); }
html:root .sidebar nav button.active { background:var(--ui-selected); color:var(--accent); font-weight:650; box-shadow:none; }
html:root .sidebar nav button:hover:not(.active) { background:var(--ui-edge); color:var(--ink); }
html:root .sidebar nav [data-page=attendance] { margin-top:18px; border-top:0; }
html:root .sidebar .brand { padding-left:13px; min-height:72px; }
html:root .brand-logo { width:76px; }
html:root .profile { border-color:var(--ui-edge); }
html:root .page-head { margin-bottom:24px; gap:18px; align-items:center; }
html:root .page-head h1 { color:var(--ui-strong); font-size:28px; line-height:1.3; font-weight:720; letter-spacing:-.7px; margin:0; }
html:root .breadcrumb { font-size:10px; color:var(--ui-secondary); margin-bottom:7px; }
html:root .subtitle { color:var(--ui-secondary); font-size:12px; margin-top:7px; }
html:root .primary { font-weight:600; box-shadow:none; }
html:root .secondary { background:var(--paper); border-color:var(--line); font-weight:500; box-shadow:none; }
html:root .page-head .secondary { background:var(--ui-wash); border-color:transparent; }
html:root .page-head .secondary:hover { background:var(--ui-edge); }
html:root .actions { gap:6px; }
html:root :is(.section-line,.board-section-heading) h2 { font-size:17px; font-weight:680; color:var(--ui-strong); letter-spacing:-.3px; }
html:root :is(.section-line small,.board-section-heading>span) { font-size:11px; color:var(--ui-secondary); }
html:root :is(.help-line,.attendance-note,.daily-rule,.schedule-note) { color:var(--ui-secondary); font-size:11px; }
html:root .panel { box-shadow:none; }
/* View controls have a common low-contrast strip, separate from the work. */
.board-viewbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 18px; padding-bottom:16px; margin-bottom:20px; border-bottom:1px solid var(--ui-edge); }
.board-viewbar .board-scope { margin:0; }
html:root .board-scope { gap:4px; }
html:root .board-scope>span { font-size:11px; color:var(--ui-secondary); margin-right:5px; }
html:root .board-scope button { border-color:transparent; color:var(--ui-secondary); padding:6px 10px; }
html:root .board-scope button.selected { background:var(--ui-selected); border-color:transparent; color:var(--accent); font-weight:600; box-shadow:none; }
html:root :is(.collection-toolbar,.native-card-toolbar) { margin:12px 0; gap:12px; }
html:root .collection-toolbar>span { color:var(--ui-secondary); font-size:11px; font-weight:500; }
html:root .collection-switch { padding:2px; background:var(--ui-wash); border:0; border-radius:7px; }
html:root .collection-switch button { border:0; padding:5px 9px; min-height:28px; font-size:11px; border-radius:5px; }
html:root .collection-switch button[aria-pressed=true] { background:var(--paper); box-shadow:0 1px 4px #0000000c; color:var(--ink); }
html:root .card-density { font-size:10px; gap:7px; }
html:root .card-density input[type=range] { width:66px; height:20px; accent-color:var(--ui-secondary); }
html:root .card-density output { min-width:25px; font-size:10px; color:var(--ui-secondary); }
.board-section-heading>.native-card-toolbar,.daily-toolbar>.native-card-toolbar { margin:0; }
html:root .board-section-heading { flex-wrap:wrap; gap:8px 12px; min-height:28px; }
html:root .board-section-heading .board-focus-toggle { margin-left:auto; }
html:root :is(.filters,.attendance-controls) { gap:8px; }
html:root .filters :is(input,select),html:root .attendance-controls :is(input,select) { border-color:var(--line); font-size:12px; }
/* Two clear groups: today's exceptions and upcoming deliverables. Small squares stay small. */
.board-overview { display:flex; align-items:flex-start; flex-wrap:wrap; gap:20px 32px; padding-bottom:22px; margin-bottom:24px; border-bottom:1px solid var(--ui-edge); }
.board-attention { flex:0 1 auto; min-width:0; }
html:root .board-overview .board-deliveries { flex:1 1 280px; margin:0; min-width:0; }
html:root .board-overview .board-section-heading { margin-bottom:10px; }
html:root .board-overview :is(.board-metrics,.board-delivery-grid) { --board-tile-size:104px; gap:8px; }
html:root .board-overview .board-metrics { display:flex; flex-wrap:wrap; margin:0; }
html:root .board-metrics>.board-metric { width:104px; flex:0 0 104px; border:0; border-radius:9px; padding:12px; background:var(--ui-wash); box-shadow:none; }
html:root .board-metrics>.board-metric.due { background:var(--ui-gold-soft); }
html:root .board-metrics>.board-metric.urgent { background:var(--ui-danger-soft); }
html:root .board-metrics>.board-metric.blocked { background:var(--ui-purple-soft); }
html:root .board-metrics>.board-metric>span { color:var(--ui-secondary); font-size:11px; }
html:root .board-metrics>.board-metric>strong { color:var(--ui-strong); font-size:34px; font-weight:650; letter-spacing:-1.2px; }
html:root .board-metrics>.board-metric.due>strong { color:var(--ui-gold); }
html:root .board-metrics>.board-metric.urgent>strong { color:var(--ui-danger); }
html:root .board-metrics>.board-metric.blocked>strong { color:var(--ui-purple); }
html:root .board-metric>p { display:none; }
html:root .board-delivery { border-width:0 0 0 2px; padding:11px; border-radius:8px; }
html:root .board-delivery time { font-size:18px; font-weight:700; letter-spacing:-.5px; }
html:root .board-delivery>strong { font-size:12px; font-weight:500; }
html:root .board-delivery>span { font-weight:650; font-size:12px; }
html:root .board-delivery b { display:none; }
html:root .board-empty-line { border:0; background:var(--ui-wash); padding:18px; }
html:root .board-person { border:1px solid var(--ui-edge); border-top:1px solid var(--ui-edge); border-radius:10px; background:var(--paper); box-shadow:none; }
html:root .board-person>header { padding-bottom:12px; border-bottom:1px solid var(--ui-edge); }
html:root .board-person h3 { font-size:17px; font-weight:680; }
html:root .board-person-state { font-size:10px; }
html:root .board-person.normal .board-person-state { color:var(--ui-secondary); background:var(--ui-wash); font-weight:400; }
html:root .board-person-metrics { margin:0; padding:10px 0; border:0; gap:10px; }
html:root .board-person-metrics span { font-size:10px; color:var(--ui-secondary); }
html:root .board-person-metrics b { font-size:13px; font-weight:550; }
html:root .board-task { padding:12px 0; border-color:var(--ui-edge); }
html:root .board-task-title .task-link { font-size:14px; font-weight:630; line-height:1.5; }
html:root .board-task.urgent { padding:10px; margin:0 -4px 7px; background:var(--ui-danger-soft); border:0; border-radius:7px; }
html:root .board-task.blocked { padding:10px; margin:0 -4px 7px; background:var(--ui-purple-soft); border:0; border-radius:7px; }
html:root .board-task.urgent .board-task-title .task-link { color:var(--ui-danger); }
html:root .board-tag.urgent { color:var(--ui-danger); background:transparent; padding:1px 0; }
html:root .board-task-meta { font-size:10px; gap:6px; }
html:root .board-task>small { font-size:10px; }
html:root .board-last-update { background:var(--ui-wash); border:0; border-radius:6px; margin:6px 0; padding:9px; }
html:root .board-clock { color:var(--ui-secondary); font-size:10px; }
html:root .board-card-actions { border-color:var(--ui-edge); gap:6px; }
html:root .board-card-actions button { font-size:11px; }
/* Project title > film tabs > production phase > task. No equal-sized nested panels. */
html:root .project-list { gap:16px; }
html:root .project-group { border-color:var(--ui-edge); border-radius:12px; }
html:root .project-row { padding:19px 20px; gap:14px; }
html:root .project-group[open]>.project-row { background:var(--ui-wash); color:var(--ink); border-color:var(--ui-edge); }
html:root .project-row-name h2 { color:var(--ui-strong); font-size:21px; letter-spacing:-.4px; font-weight:700; }
html:root .project-row-name p { color:var(--ui-secondary); font-size:11px; margin-top:5px; }
html:root .project-row-meta { font-size:11px; gap:12px; color:var(--ui-secondary); }
html:root .project-row-meta strong { color:var(--ui-strong); font-size:12px; font-weight:550; }
html:root .project-header-actions { width:auto; margin:0; }
.project-progress { margin-left:auto; width:88px; flex:none; }
.project-progress>span { display:block; width:100%; height:3px; background:var(--ui-edge); border-radius:2px; overflow:hidden; }
.project-progress i { display:block; height:100%; background:var(--ui-progress); }
.project-progress small { display:block; font-size:10px; color:var(--ui-secondary); margin-top:5px; }
html:root .project-body { padding:0 20px 18px; }
html:root .episode-tabs { padding-top:6px; margin-bottom:18px; gap:22px; }
html:root .episode-tabs button { padding:12px 0 10px; font-size:12px; }
html:root .episode-tabs button.active { font-weight:650; }
html:root .episode-head { margin-bottom:12px; align-items:center; }
html:root .episode-head h3 { font-size:17px; font-weight:680; margin:0; }
html:root .episode-meta { font-size:10px; gap:12px; }
html:root .project-body>.panel { border:0; border-radius:0; background:transparent; }
html:root .stage { grid-template-columns:96px minmax(0,1fr); border-color:var(--ui-edge); }
html:root .stage-label { padding:17px 14px 17px 0; border:0; background:transparent; }
html:root .stage-label h3 { font-size:15px; font-weight:650; color:var(--ui-strong); }
html:root .stage-label span { color:var(--ui-secondary); font-size:10px; margin-bottom:4px; }
html:root .stage-label small { font-size:10px; color:var(--ui-secondary); }
html:root .stage-task { grid-template-columns:minmax(100px,1fr) 52px 62px 70px 24px; gap:10px; padding:16px 10px; border-color:var(--ui-edge); }
html:root .stage-task .task-link { color:var(--ui-strong); font-size:14px; font-weight:600; }
html:root .stage-task[data-priority=late] .task-name small { color:var(--ui-danger); font-weight:550; }
html:root .stage-task[data-priority=due] .task-name small { color:var(--ui-gold); font-weight:550; }
html:root .stage-task .task-name small { font-size:11px; margin-top:5px; }
html:root .stage-task .owner { color:var(--ink); font-size:12px; }
html:root .stage-task .days { color:var(--ui-secondary); font-size:11px; }
html:root .stage-task[data-priority=done] .task-link { color:var(--ui-secondary); font-weight:450; }
html:root .status { border-radius:5px; font-size:10px; font-weight:500; padding:3px 6px; }
html:root .status.todo { background:var(--ui-wash); color:var(--ui-secondary); }
html:root .project-team { background:transparent; border:0; border-top:1px solid var(--ui-edge); padding:16px 0 0; margin:16px 0 0; border-radius:0; }
html:root .project-team .section-line { margin:0 0 10px; }
html:root .project-team .section-line h2 { color:var(--ui-secondary); font-size:12px; font-weight:500; }
html:root .project-team .text-button { font-size:11px; }
html:root .project-team-grid { display:flex; flex-wrap:wrap; gap:8px; }
html:root .project-teammate { border:0; background:var(--ui-wash); padding:8px 12px; flex:0 1 auto; border-radius:7px; min-width:130px; }
html:root .project-teammate strong { font-size:12px; }
html:root .project-teammate .avatar { width:26px; height:26px; font-size:10px; }
html:root .project-teammate small { font-size:10px; }
html:root .collection-surface[data-collection-view=cards] .stage-task { padding:14px; grid-template-columns:1fr auto; border-radius:9px; gap:12px 8px; }
html:root .collection-surface[data-collection-view=cards] .stage { display:block; }
/* Dates and submission milestones are focal points in schedule views. */
html:root .month-title strong { font-size:22px; font-weight:680; }
html:root .month-toolbar,html:root .schedule-toolbar { padding:16px; background:var(--paper); border-color:var(--ui-edge); }
html:root .month-weekdays { background:var(--ui-wash); }
html:root .month-event:not(.has-delivery) { background:var(--ui-wash); border-left-color:color-mix(in srgb,var(--project-color) 30%,var(--ui-edge)); color:var(--ui-secondary); }
html:root .month-event:not(.has-delivery)>strong { font-weight:500; }
html:root .month-event.has-delivery { box-shadow:none; }
html:root .month-event.has-delivery strong { font-size:12px; font-weight:650; }
html:root .project-milestones>div { padding:14px 16px; }
html:root .project-milestones small { font-size:11px; }
html:root .project-milestones strong { font-size:19px; letter-spacing:-.4px; }
html:root .film-schedule-card { border-color:var(--ui-edge); padding:13px 15px; box-shadow:none; }
html:root .film-schedule-card strong { font-size:14px; }
html:root .schedule-table .phase-schedule-heading td { background:var(--ui-wash); color:var(--ink); }
html:root .schedule-task .task-link { font-size:13px; font-weight:600; }
/* People and work: identity and task first; metadata and routine states second. */
html:root .daily-self { background:var(--soft); border:0; border-left:3px solid var(--accent); border-radius:8px; padding:16px 18px; }
html:root .daily-self strong { font-size:18px; font-weight:650; }
html:root .daily-self p { margin:5px 0 0; font-size:11px; color:var(--ui-secondary); }
html:root .daily-toolbar { gap:10px; flex-wrap:wrap; }
html:root .daily-rule { margin-bottom:15px; }
html:root .person-activity-card { border-color:var(--ui-edge); box-shadow:none; border-radius:10px; }
html:root .person-activity-heading { padding:16px; background:var(--ui-wash); }
html:root .person-activity-name h3 { font-size:17px; font-weight:680; }
html:root .daily-task-heading .task-link { font-size:14px; font-weight:600; }
html:root .daily-due.late { font-weight:600; color:var(--ui-danger); }
html:root .daily-card-footer,html:root .daily-review-status { background:var(--ui-wash); font-size:10px; }
html:root .collaboration-overview { background:var(--ui-wash); border:0; padding:14px 16px; border-radius:9px; }
html:root .staff-card { border-color:var(--ui-edge); border-radius:11px; box-shadow:none; }
html:root .staff-card-name h3 { font-size:18px; font-weight:680; }
html:root .staff-card-metrics strong { font-size:30px; font-weight:650; }
html:root .people-company-heading { border-color:var(--ui-edge); }
/* Records use a quiet header band and readable values, with the same card hierarchy. */
html:root :is(.attendance-table,.change-log-table) th { background:var(--ui-wash); border-color:var(--ui-edge); font-size:11px; font-weight:500; }
html:root :is(.attendance-table,.change-log-table) td { padding:15px 16px; border-color:var(--ui-edge); }
html:root .attendance-table td>strong { font-size:14px; font-weight:650; }
html:root .attendance-muted { color:var(--ui-secondary); font-size:11px; }
html:root .attendance-table time { color:var(--ui-strong); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
html:root .collection-surface[data-collection-view=cards] tbody>tr { border-color:var(--ui-edge); background:var(--paper); border-radius:10px; box-shadow:none; }
html:root .collection-surface[data-collection-view=cards] tbody>tr>td { padding:0; }
html:root .collection-surface[data-collection-view=cards] .attendance-table time { font-size:20px; }
html:root .collection-surface[data-collection-view=cards] .attendance-table td:nth-child(2)>strong { font-size:18px; }
html:root .change-filters { background:var(--ui-wash); border:0; border-radius:8px; }
html:root .change-summary { color:var(--ink); font-size:13px; }
html:root .feedback-item h3,html:root .handover-card h3 { font-size:17px; font-weight:650; }
html:root .handover-card { border-color:var(--ui-edge); border-radius:10px; }
html:root .handover-card>header { background:var(--ui-wash); }
html:root .no-data { padding:32px 20px; font-size:12px; }
html:root :is(button,a):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(min-width:761px) and (max-width:1150px) {
  main,main:has(.month-panel) { padding:26px 24px 40px; }
  html:root .page-head { flex-wrap:wrap; gap:12px; }
  html:root .page-head .actions { margin-left:auto; }
  .board-overview { gap:20px 24px; }
}
@media(max-width:760px) {
  main,main:has(.month-panel) { padding:22px 16px 36px; }
  html:root .app-bar { height:auto; min-height:40px; }
  html:root .sidebar { padding:10px 14px 0; }
  html:root .sidebar .brand { min-height:0; padding:0; }
  html:root .brand-logo { width:42px; }
  html:root .sidebar nav { margin:0; gap:3px; }
  html:root .sidebar nav button { min-height:36px; font-size:11px; padding:7px 10px; }
  html:root .sidebar nav [data-page=attendance] { margin-top:0; }
  html:root .page-head { margin-bottom:18px; flex-wrap:wrap; }
  html:root .page-head h1 { font-size:25px; }
  .board-viewbar { gap:9px; margin-bottom:18px; }
  .board-overview { gap:20px; padding-bottom:20px; margin-bottom:20px; }
  html:root .board-overview .board-deliveries { flex-basis:100%; }
  html:root .board-overview :is(.board-metrics,.board-delivery-grid) { --board-tile-size:100px; }
  html:root .board-metrics>.board-metric { width:100px; flex-basis:100px; }
  html:root .board-section-heading>.native-card-toolbar { width:100%; justify-content:flex-end; margin:0; }
  html:root .project-row { flex-wrap:wrap; padding:15px; gap:10px; }
  html:root .project-row-name { flex:1 1 calc(100% - 34px); }
  html:root .project-row-meta { margin:0; }
  .project-progress { margin-left:24px; width:75px; }
  html:root .project-header-actions { margin-left:auto; }
  html:root .project-body { padding:0 14px 14px; }
  html:root .episode-head { display:flex; flex-wrap:wrap; gap:4px; }
  html:root .stage { display:block; }
  html:root .stage-label { padding:11px 0; border-bottom:1px solid var(--ui-edge); }
  html:root .stage-label h3 { margin:0; font-size:14px; }
  html:root .stage-task { grid-template-columns:minmax(80px,1fr) 38px 61px 20px; gap:7px; padding:13px 2px; }
  html:root .stage-task .task-link { font-size:13px; }
  html:root .stage-task .days { display:none; }
  html:root .project-milestones strong { font-size:16px; }
  html:root .project-milestones>div { padding:12px; }
  html:root .daily-self { padding:14px; }
  html:root .daily-self strong { font-size:16px; }
}
/* Use current chrome height, not the older 104px test toolbar allowance. */
@media(min-width:761px) {
  body { --workspace-header-height:40px; }
  body:has(.role-test-bar:not([hidden])) { --workspace-header-height:78px; }
  .app-shell { min-height:calc(100dvh - var(--workspace-header-height)); }
  html:root .sidebar,html:root body:has(.role-test-bar:not([hidden])) .sidebar { height:calc(100dvh - var(--workspace-header-height)); }
}
html:root .board-metrics>.board-metric.is-empty { background:var(--ui-wash); }
html:root .board-metrics>.board-metric.is-empty>strong { color:var(--ui-secondary); }
main:has(.schedule-panel)>.project-team { margin-top:24px; }
main:has(.schedule-panel)>.film-schedule-list { margin-bottom:20px; }
@media(max-width:520px) {
  /* Duplicate help remains in the sidebar; keep the mobile utility bar compact. */
  html:root .app-bar { padding:8px 14px; gap:0; }
  html:root .workspace-label { display:none; }
  html:root .app-bar-actions { margin:0; width:100%; justify-content:space-between; gap:6px; }
  html:root .app-bar-actions #help-top { display:none; }
  html:root .app-bar-actions button { font-size:10px; min-height:26px; padding:4px 6px; }
  html:root .app-bar-actions #account-entry { padding-left:7px; }
  html:root .role-test-bar { padding:7px 14px; gap:5px; }
  html:root .role-test-bar>div:first-child { display:flex; align-items:center; gap:8px; }
  html:root .role-test-bar small { margin:0; font-size:9px; }
  html:root .board-overview .board-attention:has(.board-metric:nth-child(4)) .board-metrics { --board-tile-size:min(100px,calc((100vw - 56px) / 4)); flex-wrap:nowrap; }
  html:root .board-overview .board-metrics>.board-metric { width:var(--board-tile-size); flex-basis:var(--board-tile-size); padding:8px!important; }
  html:root .board-metrics>.board-metric>strong { font-size:28px; }
  html:root .board-attention .board-section-heading h2 { font-size:16px; }
}
html:root .daily-checkin-task small { color:var(--ui-secondary); font-size:11px; }
/* A wide one-column person card uses its width for the work, not empty space. */
@container density-card (min-width:560px) {
  html:root .board-focus-tasks { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; align-items:start; }
  html:root .board-person-metrics { justify-content:flex-start; gap:24px; }
  html:root .board-focus-tasks .board-task { margin:0; border:0; padding:10px; min-width:0; }
  html:root .board-person>footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:10px; margin-top:10px; border-top:1px solid var(--ui-edge); }
  html:root .board-person>footer .board-card-actions { border:0; margin:0; padding:0; gap:18px; }
}
/* Personal inbox: compact rows, a persistent unread cue, and explicit handover action. */
html:root .app-bar-actions #notification-entry { display:inline-flex; align-items:center; gap:5px; color:var(--ink); }
html:root .app-bar-actions #notification-entry[hidden] { display:none; }
#notification-entry svg { width:17px; height:17px; }
#notification-entry[aria-current=page] { color:var(--accent); }
.notification-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.notification-toolbar>span { font-size:11px; color:var(--muted); }
.notification-list { border:1px solid var(--ui-edge); border-radius:12px; overflow:hidden; background:var(--paper); }
.notification-item { display:flex; gap:14px; padding:20px 24px; border-bottom:1px solid var(--ui-edge); }
.notification-item:last-child { border-bottom:0; }
.notification-item.is-unread { background:color-mix(in srgb,var(--ui-selected) 40%,var(--paper)); }
.notification-symbol { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:9px; background:var(--ui-selected); color:var(--accent); font-size:23px; }
.notification-symbol.handover { color:var(--ui-purple); background:var(--ui-purple-soft); }
.notification-content { flex:1; min-width:0; }
.notification-heading { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.notification-heading strong { font-size:13px; color:var(--ink); }
.notification-heading time { margin-left:auto; font-size:11px; color:var(--muted); }
.notification-unread-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); }
.notification-task-name { color:var(--ink); font-weight:650; font-size:16px; margin:9px 0 4px; overflow-wrap:anywhere; }
.notification-description { margin:0; white-space:pre-line; overflow-wrap:anywhere; color:var(--muted); font-size:12px; line-height:1.8; }
.notification-actions { display:flex; gap:18px; align-items:center; margin-top:12px; }
.notification-actions small { color:var(--muted); font-size:11px; }
.notification-empty { text-align:center; padding:52px 20px; color:var(--ink); }
.notification-empty p { font-size:12px; color:var(--muted); margin-top:10px; }
.notification-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:18px; font-size:12px; color:var(--muted); }
.notification-pagination span { margin-right:auto; }
@media(max-width:600px) {
  .notification-item { padding:16px 12px; gap:10px; }
  .notification-heading time { width:100%; margin-left:0; }
  .notification-toolbar { gap:8px; }
  .notification-toolbar>span { font-size:10px; }
}

/* Unread state belongs to the related navigation item, at its upper-right corner. */
html:root .sidebar nav button[data-page] { position:relative; }
html:root .sidebar nav .nav-notification-dot { position:absolute; top:5px; right:6px; display:block; width:7px; height:7px; flex:none; padding:0; border:0; border-radius:50%; background:#ef4444; box-shadow:0 0 0 2px var(--ui-chrome); pointer-events:none; }
html:root .sidebar nav button.active .nav-notification-dot { box-shadow:0 0 0 2px var(--ui-selected); }
html:root .sidebar nav .nav-notification-dot[hidden] { display:none; }
.section-notification { display:flex; align-items:center; gap:12px; margin:-10px 0 20px; color:var(--muted); font-size:12px; }
.section-notification[hidden] { display:none; }
.section-notification .text-button { font-size:12px; }

/* Clear entry points, compact contextual alerts, and drill-down summaries. */
.page-title-line { display:flex; align-items:center; gap:10px; }
.page-help { width:23px; height:23px; padding:0; border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--muted); font-size:12px; flex:none; }
.page-help:hover { color:var(--accent); border-color:var(--accent); }
html:root .section-notification { display:block; margin:0 0 20px; padding:12px 16px; background:var(--ui-wash); border:1px solid var(--ui-edge); border-radius:10px; color:var(--ink); }
html:root .section-notification[hidden] { display:none; }
.notice-preview-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:4px; }
.notice-preview-heading strong { font-size:12px; }
.notice-preview-heading strong span { color:var(--red); margin-left:6px; }
.notice-preview { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 0; border-top:1px solid var(--ui-edge); }
.notice-preview:first-of-type { border-top:0; }
.notice-preview>div { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; min-width:0; }
.notice-preview strong { color:var(--accent); font-size:12px; }
.notice-preview span { font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.notice-preview small { grid-column:1/-1; color:var(--muted); line-height:1.5; overflow-wrap:anywhere; }
.notice-preview>.text-button { flex:none; }
.detail-notifications:empty { display:none; }
.detail-notifications { margin-bottom:18px; padding:12px 14px; background:var(--ui-wash); border-left:3px solid var(--accent); border-radius:6px; }
.detail-notifications>strong { font-size:13px; }
.detail-notice { padding:10px 0; border-bottom:1px solid var(--ui-edge); }
.detail-notice b { font-size:12px; color:var(--accent); }
.detail-notice p { white-space:pre-line; font-size:12px; line-height:1.6; margin:5px 0; }
.detail-notifications small { display:block; font-size:11px; color:var(--muted); margin-top:5px; }
html:root button.board-metric { text-align:left; cursor:pointer; font:inherit; }
html:root button.board-metric:hover { background:var(--ui-wash); border-color:var(--accent); }
html:root button.board-metric:focus-visible,.page-help:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.metric-task { padding:12px 0; border-bottom:1px solid var(--line); }
.metric-task>small { font-size:11px; color:var(--muted); }
.metric-task:last-child { border-bottom:0; }
.feature-flow { font-size:12px; color:var(--accent); line-height:1.8; padding:12px; background:var(--ui-wash); border-radius:8px; margin:0 0 16px; }
.feature-guide-item { border-bottom:1px solid var(--line); padding:13px 0; }
.feature-guide-item summary { cursor:pointer; display:flex; gap:12px; align-items:center; }
.feature-guide-item summary strong { font-size:13px; min-width:95px; }
.feature-guide-item summary span { font-size:12px; color:var(--muted); }
.feature-guide-item summary::after { content:'＋'; margin-left:auto; color:var(--muted); }
.feature-guide-item[open] summary::after { content:'−'; }
.feature-definitions { margin:12px 0; }
.feature-definitions div { padding:8px 0; }
.feature-definitions dt { font-size:12px; font-weight:650; margin-bottom:4px; }
.feature-definitions dd { font-size:12px; color:var(--muted); line-height:1.8; margin:0; }
@media(max-width:600px) {
  .notice-preview>div { grid-template-columns:1fr; }
  .notice-preview { gap:8px; }
  .feature-guide-item summary { align-items:flex-start; gap:8px; }
  .feature-guide-item summary strong { min-width:84px; }
}

/* Account approval is an administrator-only workspace. */
.auth-links { display:flex; flex-direction:column; align-items:flex-start; gap:12px; margin-top:20px; }
.auth-links small { color:var(--muted); font-size:12px; }
.account-board-tabs { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
.account-board-tabs button { display:flex; align-items:center; gap:20px; padding:14px 18px; border:1px solid var(--line); border-radius:14px; background:var(--paper); color:var(--ink); }
.account-board-tabs button strong { font-size:24px; line-height:1; font-variant-numeric:tabular-nums; }
.account-board-tabs button[aria-pressed=true] { border-color:#8bb6ef; background:#edf5ff; color:#155eb3; }
.account-board-tabs button[data-account-tab=pending] strong { color:#b57412; }
.account-board-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.account-board-tools p { color:var(--muted); font-size:12px; margin:0; }
.account-board-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr)); gap:16px; align-items:start; }
.account-board-grid>.no-data { grid-column:1/-1; }
.account-board-card { border:1px solid var(--line); border-radius:16px; background:var(--paper); padding:20px; min-width:0; }
.account-board-card header { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.account-board-card h2 { font-size:17px; margin:0; overflow-wrap:anywhere; }
.account-state { border-radius:7px; background:#eff2f6; color:#5a6575; padding:4px 7px; font-size:11px; white-space:nowrap; }
.account-state.pending { color:#98600e; background:#fff1d6; }
.account-state.active { color:#20724e; background:#e9f6ee; }
.account-state.rejected { color:#b43d52; background:#fcecef; }
.account-username { display:block; margin:9px 0 18px; font-size:14px; color:var(--ink); overflow-wrap:anywhere; }
.account-board-card dl { display:grid; gap:11px; margin:0; font-size:12px; }
.account-board-card dl>div { display:grid; grid-template-columns:60px 1fr; gap:12px; }
.account-board-card dt { color:var(--muted); }
.account-board-card dd { margin:0; overflow-wrap:anywhere; }
.account-board-card footer { border-top:1px solid var(--line); margin-top:18px; padding-top:14px; }
.account-board-more summary { color:var(--muted); cursor:pointer; font-size:12px; }
.account-board-more>div { display:flex; flex-wrap:wrap; gap:12px; padding-top:12px; }
#account-review-dialog { width:min(530px,calc(100vw - 32px)); }
#account-review-dialog .modal-actions { padding:18px 0 0; }
html[data-theme=dark] .account-board-tabs button[aria-pressed=true] { background:#202f49; border-color:#4a6f9f; color:#a7cfff; }
html[data-theme=dark] .account-state { background:#30343f; color:#c1c6d3; }
html[data-theme=dark] .account-state.pending { background:#46351e; color:#e5bf79; }
html[data-theme=dark] .account-state.active { background:#203c33; color:#8ed4ae; }
html[data-theme=dark] .account-state.rejected { background:#482833; color:#f1a7b3; }
@media(max-width:600px){.account-board-tabs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }.account-board-tabs button { justify-content:space-between;gap:8px; }.account-board-tools{align-items:flex-start;}.account-board-card{padding:16px;}}

/* Utilities live above the identity control; account actions are in its menu. */
html:root .sidebar .sidebar-note.app-bar-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:5px; margin-top:auto; padding:16px 0 12px; width:100%; flex:none; }
html:root .sidebar-note.app-bar-actions>button,html:root .sidebar-note .theme-trigger { display:flex; align-items:center; justify-content:flex-start; gap:6px; width:100%; min-height:32px; border:1px solid transparent; border-radius:7px; padding:6px 8px; color:var(--ui-secondary); background:transparent; font-size:11px; font-weight:400; white-space:nowrap; }
html:root .sidebar-note.app-bar-actions>button:hover,html:root .sidebar-note .theme-trigger:hover { background:var(--ui-edge); color:var(--ink); }
html:root .sidebar-note.app-bar-actions>[hidden] { display:none; }
html:root .sidebar-note .theme-control { min-width:0; }
html:root .sidebar-note #notification-entry { position:relative; }
.utility-notification-dot { width:6px; height:6px; border-radius:50%; background:#ef4444; margin-left:auto; flex:none; }
.utility-notification-dot[hidden] { display:none; }
html:root .sidebar #account-entry.profile { display:flex; align-items:center; flex:none; width:100%; max-width:none; min-height:58px; padding:12px 8px 0; gap:10px; border:0; border-top:1px solid var(--ui-edge); border-radius:0; color:var(--ink); text-align:left; white-space:normal; overflow:visible; }
.profile-name { min-width:0; flex:1; overflow-wrap:anywhere; font-weight:600; }
.profile-name small { display:block; font-weight:400; color:var(--muted); }
.profile-more { color:var(--muted); font-size:18px; }
html:root .sidebar #account-entry:hover .profile-more,html:root .sidebar #account-entry[aria-expanded=true] .profile-more { color:var(--accent); }
.account-context-menu { position:fixed; z-index:80; width:220px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:6px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); box-shadow:0 10px 32px #0003; }
.account-context-menu[hidden] { display:none; }
.account-menu-heading { padding:9px 10px 12px; border-bottom:1px solid var(--line); margin-bottom:4px; font-size:13px; font-weight:650; overflow-wrap:anywhere; }
.account-menu-heading small { display:block; margin-top:3px; color:var(--muted); font-size:10px; font-weight:400; }
.account-menu-hint { font-size:10px; color:var(--muted); margin:6px 10px; }
.account-context-menu button { display:block; width:100%; padding:9px 10px; border-radius:6px; text-align:left; font-size:12px; }
.account-context-menu button:hover,.account-context-menu button:focus-visible { background:var(--ui-selected); outline:none; }
.account-context-menu button:disabled { opacity:.45; cursor:default; }
.account-context-menu .account-menu-logout { color:var(--red); border-top:1px solid var(--line); border-radius:0 0 6px 6px; margin-top:5px; }
.account-identity { font-size:12px; color:var(--muted); }
@media(min-width:761px){html:root .sidebar { min-height:0; }.sidebar nav { min-height:0; overflow-y:auto; flex-shrink:1; }.sidebar .brand{flex-shrink:0;}}
@media(max-width:760px){
  html:root .sidebar .sidebar-note.app-bar-actions { grid-row:3; grid-column:1/-1; display:flex; flex-wrap:wrap; gap:4px; margin:0; padding:4px 0 10px; justify-content:flex-start; }
  html:root .sidebar-note.app-bar-actions>button,html:root .sidebar-note .theme-trigger { width:auto; min-height:34px; }
  html:root .sidebar #account-entry.profile { grid-row:1; grid-column:2; justify-self:end; width:auto; max-width:190px; min-height:40px; padding:3px 4px; border:0; }
  html:root .workspace-label { display:flex; }
}

/* Compact work identity and shared ownership in assignment forms. */
html:root .bulk-table { min-width:1010px; }
html:root .bulk-table .bulk-category { min-width:250px; width:28%; }
html:root .bulk-work-category { display:grid; grid-template-columns:minmax(85px,.8fr) minmax(120px,1.2fr); gap:6px; }
html:root .bulk-work-category select { margin:0; min-width:0; }
.bulk-work-detail { margin-top:7px; }
.bulk-work-detail summary { color:var(--muted); font-size:10px; cursor:pointer; }
.bulk-work-detail input { margin-top:6px; }
html:root .bulk-table .bulk-owner { width:160px; }
html:root .bulk-table .bulk-days { min-width:105px; width:105px; }
.bulk-days [data-days-mode] { display:block; margin-top:5px; font-size:10px; color:var(--muted); }
.owner-picker { min-width:0; width:100%; border:1px solid var(--line); border-radius:7px; background:var(--paper); font-size:12px; text-align:left; }
.owner-picker>summary { display:flex; align-items:center; gap:8px; cursor:pointer; padding:7px 9px; min-height:34px; list-style:none; }
.owner-picker>summary::-webkit-details-marker { display:none; }
.owner-picker>summary>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.owner-picker>summary>small { color:var(--muted); font-size:10px; white-space:nowrap; }
.owner-picker[open] { border-color:var(--accent); }
.owner-options { display:grid; max-height:160px; overflow-y:auto; padding:4px 6px 7px; gap:2px; border-top:1px solid var(--line); }
.owner-options label { display:flex; align-items:center; gap:7px; padding:5px 3px; cursor:pointer; font-size:12px; }
html:root .owner-options input[type=checkbox] { width:14px; height:14px; flex:none; margin:0; padding:0; accent-color:var(--accent); }
html[data-theme=dark] .owner-picker { background:var(--ui-chrome); }
html:root .collection-surface[data-collection-view=cards] .bulk-table .bulk-category { grid-column:1/-1; width:auto; min-width:0; }

.bulk-toolbar>.owner-picker { width:170px; flex:none; }
/* Task detail / editing share one compact side panel. */
#modal.task-drawer {
  position:fixed; inset:0 0 0 auto; margin:0; width:min(560px,100vw);
  max-width:100vw; height:100dvh; max-height:100dvh; padding:0;
  border-radius:16px 0 0 16px; border:1px solid var(--line);
  background:var(--paper); color:var(--ink); overflow:hidden;
  box-shadow:-16px 0 60px #00000020;
}
#modal.task-drawer::backdrop { background:#10182838; backdrop-filter:none; }
#modal.task-drawer #modal-content { height:100%; display:flex; flex-direction:column; min-height:0; }
#modal.task-drawer .modal-head { flex:none; padding:22px 24px 18px; border-bottom:1px solid var(--line); }
#modal.task-drawer .modal-head h2 { font-size:21px; line-height:1.4; overflow-wrap:anywhere; }
#modal.task-drawer .modal-head p { margin-top:6px; font-size:12px; }
#modal.task-drawer #modal-content>form { display:flex; flex-direction:column; min-height:0; flex:1; }
#modal.task-drawer .modal-body { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:22px 24px; }
#modal.task-drawer .modal-actions { flex:none; padding:14px 24px; background:var(--paper); border-top:1px solid var(--line); gap:10px; }
#modal.task-drawer .detail-facts { gap:18px; padding:0 0 22px; border-bottom:1px solid var(--line); }
.task-progress,.task-related { margin-top:24px; }
.task-progress h3,.task-related h3 { margin:0 0 14px; font-size:15px; }
.task-progress h3 small { color:var(--muted); font-size:11px; font-weight:400; margin-left:6px; }
.task-progress-item { padding:14px 0; border-bottom:1px solid var(--line); }
.task-progress-item:first-of-type { padding-top:0; }
.task-progress-item header { display:flex; gap:12px; justify-content:space-between; font-size:12px; }
.task-progress-item time,.task-detail-empty { color:var(--muted); font-size:12px; }
.task-progress-item p { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.7; margin:9px 0; }
.task-progress-item .task-progress-block { color:var(--red); background:var(--red-bg); padding:9px 12px; border-radius:8px; }
.task-related-link { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; text-align:left; padding:12px 0; color:var(--accent); }
.task-related-link small { display:block; margin-top:5px; color:var(--muted); }
.task-save-result { margin:0 0 18px; padding:10px 12px; border-radius:8px; background:var(--soft); color:var(--accent); font-size:13px; }
dialog.discard-dialog { width:min(420px,calc(100vw - 32px)); padding:0; border:1px solid var(--line); border-radius:16px; background:var(--paper); color:var(--ink); }
dialog.discard-dialog .modal-head { padding:20px 24px 0; border:0; }
dialog.discard-dialog h2 { font-size:18px; }
dialog.discard-dialog .modal-body { padding:12px 24px 20px; font-size:13px; line-height:1.8; }
dialog.discard-dialog .modal-actions { padding:14px 24px; background:var(--paper); border-color:var(--line); }
.operation-error { margin:16px 0; }
@media(max-width:600px){
  #modal.task-drawer { width:100vw; border-radius:0; border:0; }
  #modal.task-drawer .modal-head { padding:18px 18px 14px; }
  #modal.task-drawer .modal-body { padding:18px; }
  #modal.task-drawer .modal-actions { padding:12px 18px max(12px,env(safe-area-inset-bottom)); }
}

/* Monthly workload: compact overview, clear plan/actual distinction. */
.monthly-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px}
.monthly-toolbar label{display:flex;gap:10px;align-items:center}.monthly-toolbar input{width:160px}
.monthly-schedule,.monthly-status{font-size:13px;color:var(--muted);margin:10px 0}
.monthly-status{min-height:20px}.monthly-metrics{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0 12px}
.monthly-metrics>button{width:130px;min-height:105px;box-sizing:border-box;border:1px solid var(--line);border-radius:14px;padding:16px;background:var(--paper)}
.monthly-metrics small{display:block;color:var(--muted)}.monthly-metrics strong{display:block;font-size:30px;line-height:1.3;margin-top:10px;color:var(--accent,#007aff)}
.monthly-table{margin-top:16px;overflow:auto;border:1px solid var(--line);border-radius:12px}.monthly-table table{width:100%;min-width:680px;border-collapse:collapse}
.monthly-table th,.monthly-table td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--line)}.monthly-table td small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.monthly-notes{font-size:13px;margin-top:18px;color:var(--muted)}.monthly-notes summary{cursor:pointer}.monthly-archives{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.monthly-people{display:grid;gap:10px;margin:16px 0}
.monthly-person{border:1px solid var(--line);border-radius:12px;background:var(--paper);min-width:0}
.monthly-person>summary{display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;list-style:none}
.monthly-person>summary::-webkit-details-marker{display:none}
.monthly-person>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:12px}
.monthly-person-chevron{font-size:24px;line-height:1;color:var(--muted);transition:transform .15s}
.monthly-person[open]>summary .monthly-person-chevron{transform:rotate(90deg)}
.monthly-person-name{min-width:110px}.monthly-person-name strong{font-size:16px}.monthly-person-name small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.monthly-person-metrics{display:flex;gap:20px;flex-wrap:wrap;margin-left:auto;font-size:12px;color:var(--muted)}
.monthly-person-metrics b{color:var(--accent);font-size:17px;font-variant-numeric:tabular-nums}
.monthly-person-body{border-top:1px solid var(--line);padding:12px 16px;min-width:0}
.monthly-person-project{margin:14px 0}.monthly-person-project>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.monthly-person-project h3{margin:0;font-size:15px;color:var(--accent);overflow-wrap:anywhere}.monthly-person-project header small{color:var(--muted);white-space:nowrap}
.monthly-person-project .table-wrap{overflow:auto;max-width:100%}.monthly-person-project table{width:100%;min-width:650px;border-collapse:collapse;font-size:12px}
.monthly-person-project th,.monthly-person-project td{padding:10px;text-align:left;border-bottom:1px solid var(--line)}
.monthly-person-project td small{display:block;color:var(--muted);margin-top:4px}.monthly-completed{color:var(--accent);font-weight:600}
.monthly-person-empty{color:var(--muted);font-size:13px}
@media(max-width:600px){.monthly-person>summary{flex-wrap:wrap;gap:10px}.monthly-person-metrics{margin-left:24px;width:100%;gap:12px}.monthly-person-body{padding:10px}.monthly-person-name{min-width:0;overflow-wrap:anywhere}}
@media(max-width:600px){.monthly-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.monthly-metrics>button{width:auto}.monthly-toolbar label{width:100%}}

/* Project phases open only when needed; shared by list and card views. */
html:root .project-list .project-stage { display:block; margin:0; border:0; border-bottom:1px solid var(--ui-edge); }
html:root .project-list .project-stage:last-child { border-bottom:0; }
html:root .project-list .project-stage>.stage-label { display:flex; align-items:center; gap:10px; padding:12px 8px; min-height:46px; margin:0; cursor:pointer; list-style:none; background:transparent; border:0; border-radius:6px; }
html:root .project-stage>.stage-label::-webkit-details-marker { display:none; }
html:root .project-stage>.stage-label:hover { background:var(--ui-wash); }
html:root .project-stage>.stage-label:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
html:root .project-stage>.stage-label h3 { margin:0; flex:1; min-width:0; font-size:14px; font-weight:600; }
html:root .project-stage>.stage-label small { margin-left:auto; flex:none; font-size:11px; font-weight:400; }
html:root .project-stage>.stage-label .stage-arrow { display:inline-block; flex:none; width:14px; font-size:23px; line-height:1; margin:0; color:var(--ui-secondary); transition:transform .15s; text-align:center; }
html:root .project-stage[open]>.stage-label .stage-arrow { transform:rotate(90deg); }
html:root .project-stage>.stage-content { padding:4px 8px 14px 32px; }
html:root .project-stage:not([open])>.stage-content { display:none; }
html:root .project-list .project-row { padding:13px 16px; }
html:root .project-list .episode-head { justify-content:flex-start; gap:12px; }
html:root .project-list .episode-head .episode-meta { margin-left:auto; }
@media(max-width:760px) {
  html:root .project-stage>.stage-content { padding:4px 0 12px; }
  html:root .project-list .episode-head .episode-meta { margin-left:0; flex-basis:100%; }
}
@media(prefers-reduced-motion:reduce) { html:root .project-stage>.stage-label .stage-arrow { transition:none; } }

/* Move tasks between phases without opening the task editor. */
html:root .project-stage .stage-task[data-task-movable] { cursor:grab; }
html:root .project-stage .stage-task.dragging { opacity:.45; cursor:grabbing; }
html:root .project-list .project-stage.drop-target>.stage-label { background:var(--soft); outline:2px solid var(--accent); outline-offset:-2px; }
html:root .project-stage.drop-target>.stage-label :is(h3,.stage-arrow) { color:var(--accent); }

html:root .project-stage .task-drag-handle { float:right; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; margin:-4px -2px 2px 8px; border-radius:5px; color:var(--ui-secondary); font-size:23px; cursor:grab; touch-action:none; user-select:none; }
html:root .project-stage .task-drag-handle:hover { color:var(--accent); background:var(--ui-wash); }
html:root .project-stage .stage-task[data-task-movable] .task-link { -webkit-user-drag:none; }
body.project-task-dragging,body.project-task-dragging * { user-select:none!important; cursor:grabbing!important; }
.project-drag-hint { position:fixed; z-index:10000; width:max-content; max-width:250px; pointer-events:none; padding:9px 12px; background:var(--paper); color:var(--ink); border:1px solid var(--accent); border-radius:8px; box-shadow:0 4px 18px #0003; font-size:12px; }

/* Compact company disclosures and movable personnel cards. */
html:root details.people-company { margin:12px 0; border:1px solid var(--ui-edge); border-radius:10px; overflow:hidden; }
html:root details.people-company>.people-company-heading { display:flex; align-items:center; justify-content:flex-start; gap:12px; margin:0; padding:14px 16px; cursor:pointer; list-style:none; background:var(--ui-wash); }
html:root .people-company-heading::-webkit-details-marker { display:none; }
html:root .people-company-heading>div { flex:1; min-width:0; }
html:root .people-company-heading h2 { margin:0; font-size:17px; }
html:root .people-company-heading p { margin-top:4px; }
html:root .people-company-arrow { font-size:24px; line-height:1; color:var(--ui-secondary); transition:transform .15s; }
html:root details.people-company[open] .people-company-arrow { transform:rotate(90deg); }
html:root .people-company-content { padding:16px; }
html:root details.people-company:not([open])>.people-company-content { display:none; }
html:root .people-company-heading:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
html:root details.people-company.drop-target>.people-company-heading { outline:2px solid var(--accent); outline-offset:-2px; background:var(--soft); }
html:root .staff-card.drop-target { outline:2px solid var(--accent); outline-offset:-2px; }
html:root .staff-card[data-person-movable] { cursor:grab; }
html:root .staff-card.dragging { opacity:.45; }
.staff-card-tools { display:flex; align-items:center; gap:5px; }
html:root .staff-card .task-drag-handle { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; color:var(--ui-secondary); font-size:23px; border-radius:5px; cursor:grab; touch-action:none; user-select:none; }
html:root .staff-card .task-drag-handle:hover { color:var(--accent); background:var(--ui-wash); }
@media(max-width:760px){html:root details.people-company>.people-company-heading { padding:12px; gap:8px; }html:root .people-company-content { padding:12px; }}
@media(prefers-reduced-motion:reduce){html:root .people-company-arrow { transition:none; }}

/* Functional motion: short feedback, explicit destination, no decorative loops. */
.drag-card-preview { position:fixed; z-index:10000; pointer-events:none; width:240px; max-width:calc(100vw - 24px); padding:12px 14px; border:1px solid var(--accent); border-radius:10px; background:var(--paper); color:var(--ink); box-shadow:0 10px 30px #0004; }
.drag-card-preview strong { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:14px; }
.drag-card-preview small { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
.drag-drop-slot { position:fixed; pointer-events:none; z-index:9998; border:2px dashed var(--accent); border-radius:8px; background:color-mix(in srgb,var(--accent) 8%,transparent); }
.drag-drop-slot.insertion { border:0; border-left:5px solid var(--accent); border-radius:0; background:transparent; }
.drag-drop-slot[hidden] { display:none; }
html:root details[data-fold-closing]>.stage-label .stage-arrow,
html:root details[data-fold-closing]>.people-company-heading .people-company-arrow,
html:root details[data-fold-closing]>.project-row .project-arrow { transform:rotate(0); }
.interaction-highlight { outline:2px solid var(--accent); outline-offset:2px; animation:interaction-arrival 1.2s ease-out; }
@keyframes interaction-arrival { from { box-shadow:0 0 0 7px color-mix(in srgb,var(--accent) 25%,transparent); } to { box-shadow:0 0 0 0 transparent; } }
#detail-notifications.interaction-highlight { border-radius:8px; padding:12px; margin-bottom:16px; }
.monthly-metrics>button { text-align:left; cursor:pointer; font:inherit; color:var(--ink); transition:background .15s, border-color .15s; }
.monthly-metrics>button span { display:block; margin-top:8px; font-size:11px; color:var(--accent); }
.monthly-metrics>button:is(:hover,[aria-expanded=true]) { background:var(--soft); border-color:var(--accent); }
.monthly-metrics>button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.monthly-detail { margin:16px 0; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.monthly-detail[hidden] { display:none; }
.monthly-detail>header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.monthly-detail h3 { margin:0; font-size:16px; }
.monthly-detail h3 small { font-weight:normal; color:var(--muted); font-size:12px; }
.monthly-detail .table-wrap { max-height:420px; overflow:auto; }
.monthly-detail th { position:sticky; top:0; background:var(--paper); }
.monthly-detail td { font-size:13px; white-space:normal; min-width:70px; }
@media(prefers-reduced-motion:reduce) { .interaction-highlight { animation:none; }.monthly-metrics>button { transition:none; } }

/* Local trial: actionable overview and outcome review. */
.project-risk-summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px}.project-risk-summary b{font-weight:600}.review-pending{color:#397ad3}.review-changes{color:#c65b27}.review-approved{color:#278162}
.board-actions{margin:20px 0 28px;border:1px solid var(--border,#d4d7df);border-radius:14px;padding:16px}.action-work-row{display:flex;gap:16px;align-items:center;padding:12px 0;border-top:1px solid var(--border,#d4d7df)}.action-work-row>div{flex:1;min-width:0}.action-work-row small{display:block;opacity:.7;margin-top:5px}.action-work-row>span{font-size:13px}.task-review{padding:16px;border:1px solid var(--border,#d4d7df);border-radius:12px;margin:16px 0}.task-review h3{display:flex;gap:12px;align-items:center}.task-review details{margin:12px 0;font-size:13px}.task-review details small{display:block;opacity:.65}.review-note{white-space:pre-wrap}.board-actions details>summary{cursor:pointer;padding-top:12px}
.board-metrics{display:flex!important;flex-wrap:wrap;gap:8px!important}.board-metrics .board-metric{width:auto!important;min-height:0!important;aspect-ratio:auto!important;flex:1;padding:10px 14px!important;display:flex!important;align-items:center;gap:12px;border-radius:10px!important}.board-metrics .board-metric strong{font-size:26px!important;margin:0!important}.board-metrics .board-metric p{display:none}.board-metrics .board-metric>span{font-size:13px!important}
@media(max-width:700px){.action-work-row{flex-wrap:wrap}.action-work-row>div{flex-basis:100%}.project-risk-summary{width:100%}.board-metrics .board-metric{flex-basis:40%}}

.board-metrics .board-metric{flex-direction:row!important;height:auto!important;min-width:100px!important;justify-content:space-between!important}.board-metrics .board-metric strong{align-self:center!important}.board-actions .board-section-heading{margin-bottom:10px}

.optional-copy-toggle{display:flex;align-items:center;gap:7px;font-size:12px;margin-bottom:7px;cursor:pointer}
html:root .optional-copy-toggle input[type=checkbox]{width:15px;height:15px;min-height:0;padding:0;margin:0;accent-color:var(--accent)}
.project-calendar-field input:disabled{opacity:.45}

/* Credit ledger uses the same compact controls in both themes. */
#credits-root input,#credits-root select{border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);padding:8px 10px;min-height:36px;max-width:100%;font:inherit;color-scheme:inherit}
#credits-root .form-grid>label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:var(--muted)}
#credits-root .form-grid input,#credits-root .form-grid select{width:100%;color:var(--ink)}
#credits-root .monthly-toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:12px 0}
#credits-root .monthly-toolbar label{display:flex;gap:6px;flex-direction:column;font-size:12px}
#credits-root h2{font-size:16px;margin:20px 0 10px}
#credits-root .panel h2{margin-top:0}
#credits-root .membership-panel{padding:16px;margin-bottom:16px}
#membership-entry summary{cursor:pointer;color:var(--accent);padding:8px 0}
#membership-entry .form-grid{margin-top:12px}
#membership-status{font-size:13px;color:var(--muted)}
#membership-status:empty{display:none}
#credits-root #membership-records{margin-top:12px;margin-bottom:0}
#membership-records td:nth-child(7){white-space:normal;min-width:120px}
#credits-root .table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin-bottom:18px}
#credits-root table{width:100%;border-collapse:collapse}
#credits-root td,#credits-root th{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
#credits-root #credit-records td:nth-child(5){white-space:normal;min-width:160px}
#credits-root input:focus,#credits-root select:focus{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:600px){#credits-root .form-grid{grid-template-columns:1fr}}

#credit-rate-panel>summary,#credit-use-panel>summary{cursor:pointer;font-size:15px;font-weight:600;color:var(--ink)}
#credit-use-panel[open]>summary{margin-bottom:16px}
#credit-rate-panel>summary:focus-visible,#credit-use-panel>summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:4px}

/* Compact ledger: separate data views, consistent collapsed editors. */
#credits-root [hidden]{display:none!important}
#credits-root .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#credits-root .credit-period{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:14px}
#credits-root .credit-period label{font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:5px}
#credits-root .credit-period-shortcuts{display:flex;gap:4px;align-self:end}
#credits-root .credit-period input{width:146px}
#credits-root .credit-range-caption{font-size:11px;color:var(--muted);margin-left:auto;align-self:center}
#credit-status:empty,#credit-entry-status:empty{display:none}
#credit-status{font-size:13px;color:var(--muted);margin:8px 0}
#credits-root .credit-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:16px}
#credits-root .credit-tabs button{transition:none;border:0;background:transparent;padding:10px 2px;color:var(--muted);font:inherit;font-weight:600;cursor:pointer;border-bottom:2px solid transparent}
#credits-root .credit-tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}
#credits-root .credit-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#credits-root .credit-editors{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
#credits-root .credit-editor{padding:12px 14px;min-width:0;box-shadow:none}
#credits-root .credit-editor[open]{grid-column:1/-1}
#credits-root .credit-editor>summary{font-size:13px;padding:2px 0;color:var(--accent)}
#credits-root .credit-editor .form-grid{max-width:960px;margin-top:14px}
#credits-root .credit-editor .form-grid>label{font-size:13px}
#credits-root .credit-editor small{font-size:11px;color:var(--muted)}
#credits-root .credit-estimate{padding:12px;border-radius:8px;background:var(--soft);color:var(--accent);font-weight:600;font-size:14px;align-self:center}
#credits-root .credit-entry-status{grid-column:1/-1;margin:0;color:var(--accent);font-size:13px}
#credits-root .credit-data-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:12px}
#credits-root .credit-data-toolbar label{min-width:0}
#credits-root .credit-search-label{flex:1;min-width:190px!important}
#credits-root .credit-search-label input{width:100%}
#credits-root .credit-data-toolbar select{max-width:180px;font-size:12px}
#credits-root .credit-view-switch{display:flex;gap:4px;margin-bottom:10px}
#credits-root .credit-view-switch button{border:0;background:transparent;font:inherit;font-size:12px;padding:7px 10px;border-radius:6px;color:var(--muted);cursor:pointer}
#credits-root .credit-view-switch button[aria-pressed=true]{background:var(--soft);color:var(--accent);font-weight:600}
#credits-root th{font-size:11px;color:var(--muted);font-weight:500}
#credits-root td{font-size:13px;vertical-align:top}
#credits-root td>strong,#credits-root td>span,#credits-root td>small{display:block}
#credits-root td>span{margin-top:5px}
#credits-root td>small{font-size:11px;color:var(--muted);margin-top:5px}
#credits-root td.credit-amount{font-size:16px;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums}
#credits-root td.credit-work-cell{white-space:normal;min-width:180px;max-width:360px;overflow-wrap:anywhere}
#credits-root #credit-records td:nth-child(5){min-width:0;white-space:nowrap}
#credits-root #credit-membership-view .membership-panel{margin:0;padding:14px;box-shadow:none}
#credits-root #membership-entry summary{font-size:13px;font-weight:600;padding:0;color:var(--accent)}
#credits-root #membership-form{max-width:960px}
@media(max-width:700px){#credits-root .credit-range-caption{width:100%;margin:0}#credits-root .credit-editors{grid-template-columns:1fr}#credits-root .credit-period-shortcuts{width:100%}#credits-root .credit-period label{flex:1}#credits-root .credit-period input{width:100%}#credits-root .credit-data-toolbar select{max-width:145px}#credits-root .credit-search-label{flex-basis:100%}#credits-root .credit-editor .form-grid{grid-template-columns:1fr}}

/* Personnel counts are a compact inline summary, not separate cards. */
html:root .people-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;margin-bottom:14px}
html:root .people-summary.people-summary>div{display:flex;align-items:baseline;justify-content:flex-start;gap:8px;padding:2px 0;min-height:0;border:0;border-radius:0;background:transparent;box-shadow:none}
html:root .people-summary small{margin:0;font-size:12px}
html:root .people-summary strong{font-size:19px;line-height:1.3;letter-spacing:0;font-variant-numeric:tabular-nums}
html:root .people-summary strong span{font-size:11px;margin-left:3px}

/* Unified workbench: one scope bar and one set of member work cards. */
html:root .workbench-toolbar { align-items:center; margin:0 0 16px; }
html:root .workbench-toolbar .board-viewbar { display:flex; flex-wrap:wrap; gap:8px 20px; margin:0; padding:0; border:0; }
html:root .workbench-toolbar .board-scope { margin:0; }
html:root .workbench-toolbar + .daily-self { margin-bottom:18px; padding:12px 16px; }
html:root .workbench-people-heading { flex-wrap:wrap; gap:10px; margin-bottom:12px; }
html:root .workbench-person-links { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; padding-top:10px; margin-top:10px; border-top:1px solid var(--ui-edge); }
html:root .workbench-projects { margin-top:20px; border-top:1px solid var(--ui-edge); padding-top:14px; }
html:root .workbench-projects > summary { cursor:pointer; font-weight:600; }
html:root .workbench-projects .collaboration-overview { margin-top:12px; }
html:root .workbench-projects .section-line h2 { display:none; }
html:root .board-metric.review { color:var(--accent,#06c); background:var(--accent-light,#edf5ff); }
html[data-theme=dark] .board-metric.review { background:#24334a; color:#8bbbff; }
html:root .daily-review-status:empty { display:none; }
@media(max-width:640px){
  html:root .board-overview .board-attention:has(.board-metric:nth-child(4)) .board-metrics { flex-wrap:wrap; }
  html:root .workbench-toolbar .board-viewbar { width:100%; }
  html:root .workbench-toolbar .board-scope { flex-wrap:wrap; }
  html:root .workbench-toolbar + .daily-self { flex-wrap:wrap; gap:10px; }
}
html:root .board-overview .board-metrics > .board-metric { gap:4px!important; padding:10px!important; }
html:root .board-overview .board-metric > span { white-space:nowrap; }
html:root .board-overview .board-metric strong { display:flex; align-items:baseline; gap:5px; }
html:root .workbench-person-links { padding:12px 16px; }
@media(max-width:640px){
  html:root .activity-grid[data-card-grid][data-card-layout=cards] { grid-template-columns:minmax(0,1fr); }
  html:root .activity-board > .native-card-toolbar { display:none; }
  html:root .board-overview .board-metrics > .board-metric { flex:0 1 104px; }
  html:root .workbench-toolbar > div:last-child { margin-left:auto; }
}

/* Compact delivery tiles: date and stage above the project name. */
html:root .board-overview .board-delivery-grid { grid-template-columns:repeat(auto-fill,minmax(0,148px)); gap:8px; }
html:root .board-overview .board-delivery { width:100%; height:62px; min-height:0; aspect-ratio:auto; padding:8px 10px; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto; align-content:center; gap:4px 6px; }
html:root .board-overview .board-delivery time { grid-area:1 / 1; font-size:16px; line-height:1.2; white-space:nowrap; }
html:root .board-overview .board-delivery > span { grid-area:1 / 2; align-self:center; font-size:10px; line-height:1.2; }
html:root .board-overview .board-delivery > strong { grid-area:2 / 1 / 3 / 3; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.4; }

#credits-root .membership-end-field { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:12px; color:var(--muted); }
#credits-root .membership-expiry-controls { display:flex; align-items:center; gap:8px; }
#credits-root .membership-expiry-controls input { flex:1; min-width:0; }
#credits-root .membership-expiry-controls button { flex:none; white-space:nowrap; }
