@font-face {
  font-family: Barlow;
  src: url('/assets/barlow-bold.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--page);
  --display: Barlow, "Avenir Next", system-ui, sans-serif;
  --page: #101011;
  --ink: #eeece9;
  --ink-strong: #f4f1ee;
  --ink-secondary: #d7d2cf;
  --muted: #b0adaa;
  --line: #333234;
  --line-strong: #454345;
  --nav: #121213;
  --surface: #19191b;
  --surface-raised: #232325;
  --row-alternate: #1d1d1f;
  --row-hover: #282628;
  --accent: #ff8b53;
  --accent-strong: #ed6c32;
  --accent-soft: #39241d;
  --accent-ink: #ffb08a;
  --accent-border: #935637;
  --on-accent: #15100d;
  --logo-bg: #000;
  --button-hover: #302d2b;
  --hover-border: #736056;
  --metric-glow: #4a2a1f;
  --progress-track: #383639;
  --modal-overlay: #080708b8;
  --shadow: #0008;
  --error: #ff9dac;
  --pill-neutral: #d0ccce;
  --pill-neutral-bg: #302e33;
  --pill-good: #a1e1c5;
  --pill-good-bg: #20362f;
  --pill-warn: #ffd692;
  --pill-warn-bg: #3b2d20;
  --pill-bad: #ffc1c8;
  --pill-bad-bg: #441f2b;
  --pill-active: #b2d8f6;
  --pill-active-bg: #24344a;
  --radius: 9px;
  --dept: var(--accent);
  --dept-surface: #26201e;
}
[data-dept="aaf"] { --dept: #ff9155; --dept-surface: #32231e; }
[data-dept="dx"] { --dept: #71cdf7; --dept-surface: #1b2b34; }
[data-dept="adr"] { --dept: #c3a5fc; --dept-surface: #2b2338; }
[data-dept="sfx"] { --dept: #ff8faf; --dept-surface: #35242d; }
[data-dept="mx"] { --dept: #f1c960; --dept-surface: #302a1c; }
[data-dept="mix"] { --dept: #68dbbf; --dept-surface: #1b2e29; }
[data-dept="qc"] { --dept: #c0db76; --dept-surface: #29301f; }
[data-dept="delivery"] { --dept: #a1b5ff; --dept-surface: #262b41; }
[data-theme="light"] {
  color-scheme: light;
  --page: #f5f2ee;
  --ink: #272321;
  --ink-strong: #1c1917;
  --ink-secondary: #4b4541;
  --muted: #645c56;
  --line: #d9d1c9;
  --line-strong: #b7aaa0;
  --nav: #fffdfa;
  --surface: #fff;
  --surface-raised: #f3eee9;
  --row-alternate: #faf7f4;
  --row-hover: #f3ebe3;
  --accent: #a13e16;
  --accent-strong: #a13e16;
  --accent-soft: #f9e5d8;
  --accent-ink: #873612;
  --accent-border: #c8815d;
  --on-accent: #fff;
  --logo-bg: #fdfdfd;
  --button-hover: #f5e8de;
  --hover-border: #ac795e;
  --metric-glow: #f6d6c3;
  --progress-track: #ded5ce;
  --modal-overlay: #29211b80;
  --shadow: #2a211d38;
  --error: #a12340;
  --pill-neutral: #534d57;
  --pill-neutral-bg: #eee9ee;
  --pill-good: #225d46;
  --pill-good-bg: #deefe4;
  --pill-warn: #75430e;
  --pill-warn-bg: #f9ead5;
  --pill-bad: #91263b;
  --pill-bad-bg: #fae2e6;
  --pill-active: #224f78;
  --pill-active-bg: #e0edf9;
  --dept-surface: #f7e8de;
}
[data-theme="light"] [data-dept="aaf"] { --dept: #9d3a13; --dept-surface: #fae9dd; }
[data-theme="light"] [data-dept="dx"] { --dept: #166286; --dept-surface: #e4f1f8; }
[data-theme="light"] [data-dept="adr"] { --dept: #634098; --dept-surface: #f0e8fa; }
[data-theme="light"] [data-dept="sfx"] { --dept: #a0345e; --dept-surface: #f9e7ee; }
[data-theme="light"] [data-dept="mx"] { --dept: #795306; --dept-surface: #f8efd8; }
[data-theme="light"] [data-dept="mix"] { --dept: #146751; --dept-surface: #e3f3ed; }
[data-theme="light"] [data-dept="qc"] { --dept: #4c641d; --dept-surface: #edf3dc; }
[data-theme="light"] [data-dept="delivery"] { --dept: #3c5199; --dept-surface: #e9edfb; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
a { color: var(--accent); font-weight: 650; text-underline-offset: 3px; }
.layout { display: grid; grid-template-columns: 223px minmax(0, 1fr); min-height: 100vh; }
.layout.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
.sidebar {
  background: var(--nav); color: var(--ink-strong); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: auto; border-right: 1px solid var(--line);
}
.sidebar[hidden], .brand-art[hidden] { display: none; }
.brand {
  margin: 0 13px; padding: 12px 3px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  border-bottom: 1px solid var(--line);
}
.brand-art {
  display: grid; place-items: center; width: 100%; background: var(--logo-bg); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
}
.brand-logo {
  display: block; width: 150px; height: 104px; object-fit: cover; object-position: center;
}
.brand span {
  color: var(--muted); font-size: 12px; letter-spacing: .035em;
}
#navigation { padding: 13px 12px 24px; }
.nav-label {
  display: block; margin: 21px 11px 7px; color: var(--muted); font-weight: 650;
  font-size: 12px; letter-spacing: .11em; text-transform: uppercase;
}
.nav-button {
  width: 100%; border: 1px solid transparent; background: transparent; color: var(--ink-secondary); border-radius: 6px;
  text-align: left; padding: 8px 9px; margin: 1px 0; min-height: 39px; font-size: 14px; font-weight: 600;
}
.nav-button:hover { background: var(--surface-raised); color: var(--ink-strong); }
.nav-button[aria-current="page"] {
  color: var(--ink-strong); background: var(--dept-surface); border-color: var(--line-strong);
  box-shadow: inset 2px 0 var(--dept);
}
.nav-icon { display: inline-flex; width: 26px; color: var(--dept); font-weight: 700; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 17px 20px; }
.sidebar-footer strong { font: 700 15px/1.2 var(--display); color: var(--ink); }
.sidebar-footer span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.topbar {
  height: 63px; padding: 0 clamp(15px, 3vw, 38px); border-bottom: 1px solid var(--line);
  background: var(--nav); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; color: var(--ink-secondary); font-size: 14px; font-weight: 600;
}
.topbar label { white-space: nowrap; }
.topbar-start { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar select { margin-left: 5px; width: auto; }
.topbar-controls { display: flex; align-items: center; gap: 10px; }
.topbar-controls [hidden], .sidebar-footer[hidden] { display: none; }
.project-menu { position: relative; flex: none; }
.project-menu summary { display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; }
.project-menu summary::-webkit-details-marker { display: none; }
.project-menu summary::after {
  content: ""; width: 5px; height: 5px; margin-top: -3px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg);
}
.project-menu summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.project-menu-actions {
  display: grid; gap: 3px; position: absolute; top: calc(100% + 5px); left: 0; z-index: 5;
  min-width: 160px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--surface); box-shadow: 0 8px 25px var(--shadow);
}
.project-menu-actions .button { text-align: left; background: transparent; border-color: transparent; }
.project-menu-actions .button:hover { background: var(--surface-raised); }
.workflow-menu { border-top: 1px solid var(--line); padding-top: 4px; }
.workflow-menu :is(.button, a, small) { display: block; }
.workflow-menu a, .workflow-menu small { padding: 3px 9px; font-size: 12px; }
.workflow-menu small { color: var(--muted); }
.workflow-instructions { padding: 10px; background: var(--surface-raised); border-radius: 6px; }
.workflow-instructions p { margin: 6px 0 0; white-space: pre-wrap; }
.task-history { padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.task-history summary { cursor: pointer; font-weight: 650; }
.task-history-item { margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.task-history-item p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#project-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.project-shell { max-width: 680px; margin: 15px auto 0; }
.project-shell-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.project-library { padding: 16px; }
.project-library + .project-library { margin-top: 12px; }
.team-login-actions { margin-top: 14px; }
.team-role-guide { font-size: 14px; line-height: 1.6; }
[data-role="reviewer"] :is([data-edit-task], [data-add-task], [data-edit-review], [data-action="add-review"],
  [data-edit-section]:not(.section-status), [data-scene-details]) { display: none; }
[data-role="reviewer"] .section-status:disabled { opacity: 1; cursor: default; }
[data-role="reviewer"] .section-status:disabled:hover { background: var(--surface); border-color: var(--line-strong); }
:is([data-role="reviewer"], [data-role="editor"]) :is([data-admin-only], [data-project-action="new"],
  [data-project-action="save"], [data-project-action="refresh-workflow"], [data-action="project-dates"], [data-action="add-scene"],
  [data-add-scene], [data-action="add-episode"]) { display: none; }
.project-library ul { display: grid; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.project-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.saved-project { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.saved-project.button { text-align: left; white-space: normal; }
.project-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.button.danger { color: var(--pill-bad); }
.button.danger:hover { background: var(--pill-bad-bg); border-color: currentColor; }
.timeline-board { padding: 0 16px; }
.timeline-schedule-notice {
  margin: -4px 0 14px; padding: 9px 12px; border-left: 3px solid var(--accent);
  background: var(--surface); color: var(--ink-secondary); font-size: 14px;
}
.timeline-row { padding: 11px 0 10px; border-top: 1px solid var(--line); }
.timeline-row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.timeline-row h2 { color: var(--dept); }
.timeline-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.timeline-count { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.timeline-count strong { color: var(--ink); margin-right: 6px; }
.timeline-rows { position: relative; }
.timeline-midpoint {
  position: absolute; inset: 0 auto 5px 50%; width: 2px; background: var(--ink-secondary);
  transform: translateX(-50%); pointer-events: none;
}
.timeline-row-head > * { position: relative; z-index: 1; background: var(--surface); }
.timeline-axis {
  height: 12px; margin: 9px 0 3px;
}
.timeline-axis progress { display: block; width: 100%; height: 100%; border-radius: 4px; }
.timeline-dates {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 12px 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums;
}
.timeline-dates span:nth-child(2) { text-align: center; }
.timeline-dates span:last-child { text-align: right; }
.timeline-dates strong { color: var(--ink-secondary); }
form label.checkbox-label { display: flex; align-items: center; gap: 7px; }
form label.checkbox-label input { flex: 0 0 auto; width: 18px; }
.workspace { padding: 32px clamp(15px, 3vw, 38px) 48px; max-width: 1630px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 25px; }
h1, h2, p { margin: 0; }
h1 { font: 700 clamp(30px, 4vw, 42px)/1.04 var(--display); letter-spacing: -.025em; }
h2 { font: 700 19px/1.15 var(--display); }
.subtitle { margin-top: 7px; color: var(--muted); font-size: 15px; }
.button, select, input:not([type="checkbox"]), textarea {
  border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); padding: 8px 11px;
  min-height: 36px; font-size: 14px;
}
.button { font-weight: 650; white-space: nowrap; }
.button:hover { background: var(--button-hover); border-color: var(--hover-border); }
.button.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); }
.button.compact { padding: 5px 8px; min-height: 31px; }
.sidebar-toggle.button { display: grid; place-items: center; flex: 0 0 34px; padding: 0; min-height: 34px; }
.sidebar-toggle[aria-expanded="false"] { color: var(--accent); }
.view-toggle { display: inline-flex; align-items: center; gap: 7px; }
.view-toggle[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-border); }
.theme-switch { display: inline-flex; align-items: center; gap: 6px; }
.switch-track {
  display: inline-flex; align-items: center; width: 26px; height: 15px; padding: 2px;
  background: var(--progress-track); border: 1px solid var(--line-strong); border-radius: 99px;
}
.switch-track::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-strong);
}
.theme-switch[aria-checked="true"] .switch-track {
  justify-content: end; background: var(--accent-strong); border-color: var(--accent-strong);
}
.theme-switch[aria-checked="true"] .switch-track::before { background: var(--on-accent); }
.split-icon, .arrange-icon { position: relative; width: 15px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; }
.split-icon::after, .arrange-icon::after { content: ""; position: absolute; inset: 0 auto 0 45%; border-left: 1.5px solid currentColor; }
.arrange-icon::before { content: ""; position: absolute; inset: 45% 0 auto; border-top: 1.5px solid currentColor; }
select {
  appearance: none; padding-right: 30px;
  background: linear-gradient(45deg, transparent 50%, var(--ink-secondary) 50%) calc(100% - 13px) 53% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--ink-secondary) 50%, transparent 50%) calc(100% - 8px) 53% / 5px 5px no-repeat, var(--surface-raised);
}
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 25px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.metric:first-child {
  border-top: 3px solid var(--accent-strong); padding-top: 13px;
  background: radial-gradient(ellipse at 97% -30%, var(--metric-glow), transparent 75%), var(--surface);
}
.metric:first-child .metric-value { color: var(--accent); }
.metric-label { color: var(--muted); font-weight: 650; font-size: 14px; }
.metric-value { display: block; font: 700 34px/1 var(--display); margin: 7px 0 5px; font-variant-numeric: tabular-nums; letter-spacing: -.022em; }
.metric-detail { color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 17px; overflow: hidden; }
.card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--dept-surface); border-left: 3px solid var(--dept); color: var(--ink-strong);
}
.card-head h2 { color: var(--dept); }
.card-head small { color: var(--ink-secondary); font-size: 13px; white-space: nowrap; }
.department-progress { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-variant-numeric: tabular-nums; }
.department-progress strong { color: var(--dept); white-space: nowrap; }
.department-progress span { white-space: nowrap; }
.card-head .button { background: var(--surface); border-color: var(--line-strong); color: var(--ink-strong); }
.card-head .button:hover { background: var(--surface-raised); border-color: var(--dept); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.task-card-head { flex-wrap: wrap; }
.task-card-head small { white-space: normal; }
.section-status.button {
  display: flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 3px; padding: 3px 4px;
}
.section-status .pill {
  padding: 2px 4px; font-size: 12px; line-height: 1.2; white-space: normal; text-align: left;
}
.card-head:has(.collapse-button) { position: relative; }
.collapse-button { position: absolute; inset: 0; border: 0; border-radius: 4px; background: transparent; }
.collapse-button:hover { background: color-mix(in srgb, var(--dept) 8%, transparent); }
.collapse-button:focus-visible { outline: 2px solid var(--dept); outline-offset: -2px; }
.card-actions > button { position: relative; z-index: 1; }
.department-view .page-heading h1 { color: var(--dept); }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; margin: 0 0 16px; }
.filters label { display: grid; gap: 4px; }
.filters input, .filters select { width: auto; max-width: 100%; }
.filters .spacer { flex-grow: 1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { background: var(--surface-raised); color: var(--ink-secondary); font-size: 13px; font-weight: 720; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--row-alternate); }
tbody tr:hover { background: var(--row-hover); }
th:first-child, td:first-child { padding-left: 15px; }
td.scene { font-weight: 700; min-width: 130px; }
.backup-status { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.text-button { background: none; border: 0; padding: 0; color: var(--dept); font-weight: 700; text-align: left; }
.text-button:hover { text-decoration: underline; }
.pill {
  display: inline-block; font-size: 13px; font-weight: 650; border-radius: 4px; padding: 3px 6px;
  white-space: nowrap; color: var(--pill-neutral); background: var(--pill-neutral-bg);
}
.pill.good { color: var(--pill-good); background: var(--pill-good-bg); }
.pill.warn { color: var(--pill-warn); background: var(--pill-warn-bg); }
.pill.bad { color: var(--pill-bad); background: var(--pill-bad-bg); }
.pill.active { color: var(--pill-active); background: var(--pill-active-bg); }
.progress { display: flex; align-items: center; gap: 7px; min-width: 108px; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
progress { appearance: none; border: 0; width: 60px; height: 6px; border-radius: 4px; overflow: hidden; background: var(--progress-track); color: var(--dept); }
progress::-webkit-progress-bar { background: var(--progress-track); }
progress::-webkit-progress-value { background: var(--dept); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--dept); }
.links { display: flex; flex-wrap: wrap; gap: 3px 8px; min-width: 74px; font-size: 13px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.task-table { min-width: 850px; }
.task-table .description { width: 45%; min-width: 270px; }
.process-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.process-text .inline-control { max-width: 100%; line-height: inherit; }
.task-table .task-note { min-width: 130px; max-width: 240px; overflow-wrap: anywhere; white-space: pre-line; }
.inline-control {
  color: inherit; background: transparent; border: 0; border-radius: 3px; padding: 2px 3px;
  text-align: left; white-space: inherit; overflow-wrap: anywhere;
}
.inline-control:hover { color: var(--dept); text-decoration: underline; text-underline-offset: 3px; }
.inline-editor { min-width: 130px; white-space: normal; }
.inline-editor textarea { min-height: 88px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.inline-actions .button { min-height: 27px; padding: 3px 6px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--dept); cursor: pointer; }
.empty { padding: 28px; }
.empty p { margin: 7px 0 14px; color: var(--muted); }
.setup-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.setup-item { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 14px; display: grid; gap: 6px; }
dialog { background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 14px; width: min(94vw, 610px); max-height: 90vh; padding: 0; box-shadow: 0 12px 60px var(--shadow); }
dialog::backdrop { background: var(--modal-overlay); }
.dialog-header { padding: 15px 20px; background: var(--surface-raised); color: var(--ink-strong); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-body { padding: 18px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-grid .wide { grid-column: 1 / -1; }
label { color: inherit; font-size: 14px; font-weight: 650; }
form label { display: grid; gap: 4px; min-width: 0; }
form input, form select, form textarea { width: 100%; }
form textarea { min-height: 71px; resize: vertical; }
.dialog-footer { display: flex; justify-content: end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); }
.form-error { color: var(--error); margin-top: 10px; }
.dialog-hint { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.status-help { color: var(--muted); font-size: 13px; line-height: 1.4; }
.scene-details {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 15px;
  border-bottom: 1px solid var(--line); margin: 0 0 5px; padding: 0 0 13px; font-size: 14px;
}
.scene-details dt { color: var(--muted); font-weight: 650; }
.scene-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.scene-details .scene-notes { white-space: pre-wrap; }
.notice { position: fixed; right: 16px; bottom: 16px; max-width: min(440px, 92vw); background: var(--accent-soft); color: var(--ink-strong); border-radius: 8px; box-shadow: 0 5px 20px var(--shadow); padding: 10px 14px; z-index: 3; }
.notice:empty { display: none; }
.split-workspace {
  display: grid; grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  padding: 0; max-width: none; margin: 0;
}
.split-pane {
  min-width: 0; height: calc(100dvh - 63px); overflow: auto;
  scrollbar-gutter: stable; padding: 23px clamp(10px, 1.5vw, 22px) 28px;
  container-type: inline-size;
}
.split-pane + .split-pane { border-left: 1px solid var(--line-strong); }
.split-pane:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.split-pane .page-heading { flex-wrap: wrap; align-items: start; gap: 9px; margin-bottom: 17px; }
.split-pane h1 { font-size: clamp(23px, 2.6vw, 31px); }
.split-pane .card-head { flex-wrap: wrap; gap: 6px; }
.split-pane .card-head small { white-space: normal; }
.split-pane th, .split-pane td { padding-inline: 8px; }
#dashboard-pane td.scene { min-width: 106px; }
#dashboard-pane .table-wrap :is(th, td):first-child {
  position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 var(--line);
}
#dashboard-pane .table-wrap td:first-child { background: var(--surface); }
#dashboard-pane .table-wrap tr:nth-child(even) td:first-child { background: var(--row-alternate); }
#dashboard-pane .table-wrap tr:hover td:first-child { background: var(--row-hover); }
.arranged-workspace:not(.split-workspace) { padding-top: 22px; }
.arranged-workspace .page-heading,
.arranged-workspace .metrics,
.arranged-workspace .filters { margin-bottom: 12px; }
.arranged-workspace .page-heading h1 { font-size: clamp(23px, 2.6vw, 30px); }
.arranged-workspace .subtitle { margin-top: 4px; }
.arranged-workspace .metric { padding: 8px 10px; }
.arranged-workspace .metric:first-child { padding-top: 6px; }
.arranged-workspace .metric-value { font-size: 22px; margin-block: 4px; }
.arranged-workspace .view-blocks {
  --block-gap: 10px;
  display: grid; gap: var(--block-gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(185px, (100% - var(--block-gap)) / 2)), 1fr));
  align-items: start;
}
.arranged-workspace .view-blocks .card { min-width: 0; margin: 0; }
.arranged-workspace .view-blocks .card-head { padding: 7px 9px; flex-wrap: wrap; gap: 4px 8px; }
.arranged-workspace .view-blocks .card-head h2 { font-size: 16px; }
.arranged-workspace .view-blocks .card-head small { white-space: normal; }
.arranged-workspace .overview-blocks {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(355px, (100% - var(--block-gap)) / 2)), 1fr));
}
.arranged-workspace .overview-blocks .card { container-type: inline-size; }
.compact-overview {
  table-layout: fixed; width: 100%; font-size: clamp(.625rem, 2.55cqi, .79rem);
  font-variant-numeric: tabular-nums;
}
.compact-overview col:nth-child(1) { width: 18%; }
.compact-overview col:is(:nth-child(2), :nth-child(3)) { width: 10%; }
.compact-overview col:nth-child(4) { width: 11%; }
.compact-overview col:is(:nth-child(8), :nth-child(9)) { width: 9%; }
.compact-overview col:is(:nth-child(5), :nth-child(6), :nth-child(10)) { width: 7%; }
.compact-overview col:is(:nth-child(7), :nth-child(11)) { width: 6%; }
.compact-overview :is(th, td) {
  padding: 3px 2px; text-align: center; line-height: 1.2;
  overflow-wrap: anywhere;
}
.compact-overview :is(th, td):first-child { padding-left: 6px; text-align: left; }
.compact-overview thead th { font-size: .92em; white-space: normal; }
.compact-scene { max-width: 100%; overflow-wrap: anywhere; }
.compact-field {
  max-width: 100%; min-width: 0; min-height: 22px; padding: 1px 1px; border: 1px solid var(--line-strong);
  border-radius: 4px; background: var(--surface-raised); color: inherit;
  font: inherit; font-weight: 650; line-height: 1.15; overflow-wrap: anywhere;
}
.compact-field:has(.pill) { padding: 0; }
.compact-field .pill { font-size: inherit; white-space: normal; padding: 2px; }
.compact-field:hover, .compact-field[aria-expanded="true"] { border-color: var(--dept); }
.compact-update { width: 100%; padding-inline: 0; }
.dashboard-preview {
  position: fixed; z-index: 4; width: max-content; max-width: min(340px, calc(100vw - 16px));
  max-height: min(360px, calc(100dvh - 16px)); overflow: auto; overscroll-behavior: contain;
  padding: 10px 12px; border: 1px solid var(--accent-border); border-radius: 7px;
  background: var(--surface-raised); box-shadow: 0 6px 24px var(--shadow); font-size: 14px;
}
.dashboard-preview strong { display: block; color: var(--accent); margin-bottom: 4px; }
.preview-body { line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.compact-tasks { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.compact-tasks li {
  display: grid; align-items: center; gap: 7px; min-height: 29px; padding: 3px 8px;
  border-bottom: 1px solid var(--line); grid-template-columns: auto minmax(0, 1fr) auto;
}
.compact-tasks li:last-child { border-bottom: 0; }
.compact-tasks li:nth-child(even) { background: var(--row-alternate); }
.compact-tasks li:hover { background: var(--row-hover); }
.compact-tasks .button { min-height: 24px; padding: 1px 5px; }
.compact-tasks input { margin: 0; }
@container (max-width: 330px) {
  .compact-overview :is(td, th) { padding-inline: 1px; }
  .compact-field { padding-inline: 0; }
}
@container (max-width: 385px) {
  .split-pane .metrics { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 7px; }
  .split-pane .metric { padding-inline: 10px; }
}
@media (max-width: 840px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; overflow: clip; }
  .brand { flex-direction: row; gap: 10px; padding: 8px 3px; }
  .brand-art { width: auto; }
  .brand-logo { width: 99px; height: 69px; }
  #navigation { display: flex; overflow-x: auto; gap: 4px; padding: 0 10px 10px; }
  .nav-label, .sidebar-footer { display: none; }
  .nav-icon { width: 19px; }
  .nav-button { white-space: nowrap; width: auto; }
  .workspace { padding-top: 22px; }
  .split-workspace { padding-top: 0; }
  .split-pane { height: 62dvh; height: max(62dvh, 310px); }
}
@media (max-width: 690px) {
  .split-workspace { grid-template-columns: minmax(0, 1fr); }
  .split-pane + .split-pane { border-left: 0; border-top: 1px solid var(--line-strong); }
}
@media (max-width: 510px) {
  .page-heading { align-items: start; flex-direction: column; }
  .metrics { gap: 6px; }
  .metric { padding: 10px 8px; }
  .metric:first-child { padding-top: 8px; }
  .metric-value { font-size: 22px; }
  .topbar { height: auto; min-height: 62px; flex-wrap: wrap; padding-block: 8px; gap: 7px; }
  .topbar-controls { flex-wrap: wrap; gap: 8px; }
  .topbar label { display: grid; }
  .topbar select { margin: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .view-toggle { padding-inline: 8px; }
}
@media print {
  .brand { border: 0; }
  .brand-art { background: white; border: 0; }
  .brand span { color: #222; }
}
