:root {
  color-scheme: dark;
  --canvas: #101112;
  --sidebar: #141516;
  --surface: #191a1c;
  --surface-raised: #202124;
  --line: #2c2d30;
  --line-strong: #3a3b3f;
  --muted: #a2a3a8;
  --ink: #f2f2f3;
  --accent: #d99a63;
  --accent-hover: #e7aa75;
  --accent-soft: #30271f;
  --success-soft: #1e2a22;
  --danger-soft: #2e211f;
  --blue-soft: #1e272e;
  --radius: 12px;
  --display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 13px/1.55 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: #edb782; text-underline-offset: 3px; }
.shell { display: grid; grid-template-columns: 204px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .18s ease; }
.shell.rail-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
#sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; background: var(--sidebar); border-right: 1px solid var(--line); padding: 28px 18px 20px; display: flex; flex-direction: column; }
.brand-row { display: flex; align-items: center; gap: 10px; min-height: 38px; overflow: hidden; }
.brand-mark { display: block; flex: 0 0 30px; width: 30px; height: 36px; object-fit: contain; }
.brand { white-space: nowrap; line-height: 1; }
.brand .wordmark { display: block; margin: 0; color: var(--ink); font: 800 17px/1 var(--display); letter-spacing: -.7px; }
.brand .business, .mobile-brand .business { color: var(--accent); }
.brand .product-name { display: block; margin-top: 5px; color: var(--muted); font: 500 10px/1.1 var(--body); letter-spacing: .6px; }
.workspace-label { margin: 42px 12px 14px; color: #77797f; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.rail-toggle { position: absolute; top: 82px; right: -10px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); z-index: 2; }
nav { display: grid; gap: 4px; min-height: 0; overflow-y: auto; }
nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; white-space: nowrap; }
nav button:hover { background: #1b1c1e; color: var(--ink); }
nav button.active { background: #262321; color: #efb987; font-weight: 600; }
.nav-glyph { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; color: currentColor; }
.nav-glyph svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-text { overflow: hidden; text-overflow: ellipsis; }
.aside-note { margin-top: auto; color: var(--muted); font-size: 10px; overflow: hidden; }
.aside-kicker { display: block; margin-bottom: 2px; color: #77797f; text-transform: uppercase; letter-spacing: .9px; }
.aside-note > b { color: var(--ink); font-size: 11px; font-weight: 500; }
.profile-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 55px; margin-top: 18px; padding: 15px 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.profile-button b, .profile-button small { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button b { font-size: 11px; color: var(--ink); font-weight: 600; }
.profile-button small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.rail-collapsed #sidebar { padding: 20px 12px; align-items: center; }
.rail-collapsed .brand-row { justify-content: center; }
.rail-collapsed .brand, .rail-collapsed .workspace-label, .rail-collapsed .nav-text, .rail-collapsed .aside-kicker, .rail-collapsed .aside-note > b, .rail-collapsed .profile-button > span:last-child { display: none; }
.rail-collapsed nav { width: 100%; margin-top: 54px; overflow: visible; }
.rail-collapsed nav button { justify-content: center; padding-inline: 8px; }
.rail-collapsed .aside-note { width: 100%; }
.rail-collapsed .profile-button { justify-content: center; }
main { min-width: 0; }
.topbar { min-height: 58px; padding: 12px 32px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
.topbar > div { display: flex; align-items: center; gap: 8px; }
.topbar-right { gap: 18px !important; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #d99a6317; }
.mobile-bar { display: none; }
.content { width: 100%; max-width: none; padding: 27px 32px 50px; }
.dev-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: #151618; color: var(--muted); font-size: 11px; }
.dev-banner b { color: var(--ink); font-weight: 600; }
header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { display: block; margin-bottom: 7px; color: #85868b; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; }
h1 { margin: 0 0 5px; font: 700 clamp(25px, 2.4vw, 30px)/1.25 var(--display); letter-spacing: -.8px; }
h2 { margin: 0 0 7px; font: 700 15px/1.4 var(--display); letter-spacing: -.25px; }
h3 { margin: 0 0 7px; font: 650 12px/1.4 var(--display); }
p { margin: 6px 0 15px; }
.muted { color: var(--muted); }
header .muted { margin: 0; font-size: 12px; }
.header-actions, .actions, .toolbar, .tabs, .annotation-tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.header-actions { justify-content: flex-end; }
.header-actions select { width: min(320px, 30vw); }
.identity, .btn, .icon-button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; color: var(--ink); font-weight: 550; transition: background .15s, border-color .15s, color .15s; }
.identity:hover, .btn:hover, .icon-button:hover { background: var(--surface-raised); border-color: #4a4b50; }
.identity { min-height: 34px; padding: 6px 10px; color: var(--muted); font-size: 11px; }
.primary { border-color: var(--accent); background: var(--accent); color: #18130f; font-weight: 700; box-shadow: inset 0 1px #ffffff29; }
.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.danger { color: #e59c88; }
.hidden { display: none !important; }
.context { margin-bottom: 22px; }
.context dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #151618; overflow: hidden; }
.context dl > div { padding: 9px 13px; border-right: 1px solid var(--line); }
.context dl > div:last-child { border-right: 0; }
.context dt { color: var(--accent); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.context dd { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.context ol { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; }
.context li { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 10px 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.context li:last-child { border-right: 0; }
.context li span { color: var(--accent); font-size: 9px; font-weight: 700; }
#status:empty { display: none; }
.success, .error { margin: 0 0 16px; padding: 10px 13px; border: 1px solid; border-radius: 7px; font-size: 12px; }
.success { border-color: #365641; background: var(--success-soft); color: #b4d9bd; }
.error { border-color: #654139; background: var(--danger-soft); color: #efb3a3; }
.panel { min-width: 0; margin-bottom: 18px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .78fr); gap: 18px; align-items: start; }
.review-grid > .panel:first-child { padding: 14px; }
.metric-card { min-height: 140px; padding: 20px 22px; background: linear-gradient(145deg, #202123, #191a1c); }
.metric-label { color: var(--muted); font-size: 11px; }
.metric { margin: 16px 0 7px; font: 550 34px/1 var(--display); letter-spacing: -1px; }
.metric-note { color: var(--muted); font-size: 10px; }
.metric-note .pill { margin-right: 6px; }
.queue-panel { padding: 0; overflow: hidden; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 14px; }
.panel-heading.compact { padding: 0; margin-bottom: 14px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.table-wrap, .scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 14px; border-block: 1px solid var(--line); color: #7f8086; font-size: 9px; font-weight: 650; letter-spacing: .7px; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
td strong { display: block; margin-bottom: 3px; font-weight: 600; }
.queue-meta { color: var(--muted); font-size: 10px; }
.open-item { min-width: 68px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row > div { min-width: 0; }
.row b { font-weight: 600; }
.pill { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: #202124; color: #bebfc3; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.pill.orange { border-color: #604630; background: var(--accent-soft); color: #efb987; }
.pill.green { border-color: #365641; background: var(--success-soft); color: #acd3b6; }
.pill.blue { border-color: #334b60; background: var(--blue-soft); color: #abc8e0; }
.notice { margin: 13px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: #17181a; color: var(--muted); font-size: 11px; }
.notice b { color: var(--ink); }
.blocked { border-color: #563d35; background: var(--danger-soft); color: #deb1a4; }
.empty { padding: 26px 8px; color: #85868c; text-align: center; }
.top-gap { margin-top: 18px; }
.section-gap { margin-top: 22px; }
label { display: block; margin: 13px 0 5px; color: #d6d6d8; font-size: 11px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; background: #141517; padding: 10px 11px; }
input::placeholder, textarea::placeholder { color: #696b70; }
input:hover, select:hover, textarea:hover { border-color: #515257; }
textarea { resize: vertical; }
.script { min-height: 460px; padding: 28px clamp(20px, 8vw, 160px); background: #151618; line-height: 1.85; font-size: 14px; }
.script-layout { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); align-items: start; }
.document-panel { width: 100%; min-width: 0; }
.secondary-column { min-width: 0; }
.script-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.details-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 14px; overflow: hidden; }
.details-panel > summary { cursor: pointer; padding: 14px 16px; color: #d9d9db; font-weight: 600; list-style: none; }
.details-panel > summary::-webkit-details-marker { display: none; }
.details-panel > summary::after { content: "+"; float: right; color: var(--muted); }
.details-panel[open] > summary::after { content: "−"; }
.details-panel > .details-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
pre { max-width: 100%; overflow: auto; white-space: pre-wrap; color: #d9d9db; font: 12px/1.7 var(--body); }
.item-context { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: #151618; }
.item-context strong { margin-right: auto; font-size: 12px; }
.tabs { margin-bottom: 16px; padding: 4px; width: max-content; max-width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #141517; overflow-x: auto; flex-wrap: nowrap; }
.tabs .btn { min-height: 34px; border: 0; white-space: nowrap; color: var(--muted); }
.tabs .btn.active { background: var(--accent-soft); color: #efb987; }
.board { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; }
.lane { min-height: 180px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #151618; }
.lane h3 { color: var(--muted); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; }
.task { display: block; width: 100%; margin: 11px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; }
.task:hover { border-color: #4b4c51; background: var(--surface-raised); }
.task b { display: block; margin-bottom: 7px; }
.assignment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.summary-cell { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #151618; }
.summary-cell span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }
.summary-cell b { font-size: 11px; }
progress { width: 100%; height: 6px; border: 0; border-radius: 8px; overflow: hidden; background: #2b2c2f; }
progress::-webkit-progress-bar { background: #2b2c2f; }
progress::-webkit-progress-value { background: var(--accent); }
.stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 420px; height: min(62vw, 670px); overflow: hidden; border-radius: 9px; background: #080909; }
.stage video { z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #080909; }
.stage canvas { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); touch-action: none; cursor: crosshair; }
.stage canvas.playing { visibility: hidden; }
.video-loading { position: absolute; z-index: 2; padding: 8px 10px; border-radius: 6px; background: #17181acc; color: #d8d8da; pointer-events: none; }
.video-toolbar { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; gap: 10px; align-items: center; margin-top: 12px; }
.video-toolbar input[type="range"] { padding: 0; accent-color: var(--accent); }
.annotation-tools { margin-top: 10px; }
.annotation-tools .selected { border-color: #6b4e37; background: var(--accent-soft); color: #efb987; }
.review-side { max-height: calc(100vh - 160px); overflow: auto; position: sticky; top: 76px; }
.version-list { max-height: 420px; overflow: auto; padding-right: 4px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment button.link { padding: 0; border: 0; background: transparent; color: var(--accent); font-weight: 650; }
.comment p { color: #d2d2d5; }
.comment .notice { margin-left: 12px; }
.compact-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.compact-label select { width: auto; max-width: 280px; }
.compact-select { width: auto; }
code { color: #c7c8cb; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.thumb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.thumb-card { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #151618; }
.thumb-card.selected { border-color: #6b4e37; background: var(--accent-soft); }
.thumb-card input[type="radio"] { width: auto; margin-right: 6px; accent-color: var(--accent); }
.thumb-card input:not([type="radio"]) { margin-top: 8px; }
.package-layout { grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); align-items: start; }
.sticky-side { position: sticky; top: 76px; }
.calendar-toolbar { justify-content: flex-start; margin-bottom: 14px; }
.calendar-toolbar strong { margin-inline: 5px auto; font-size: 14px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; background: var(--line); }
.cal-head { padding: 9px 10px; background: #151618; color: #888a8f; font-size: 9px; font-weight: 650; text-transform: uppercase; }
.day { min-height: 125px; padding: 9px; background: var(--surface); }
.day.outside { background: #141517; color: #626369; }
.date { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.post { width: 100%; margin: 4px 0; padding: 8px; border: 0; border-left: 2px solid var(--accent); border-radius: 5px; background: var(--accent-soft); color: #e8c29f; text-align: left; font-size: 9px; }
.post b { display: block; margin-bottom: 2px; color: #f1d0af; }
.calendar.day-mode { grid-template-columns: 1fr; }
.day-mode .day { min-height: 280px; }
dialog { width: min(560px, 92vw); max-height: 90vh; overflow: auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface); color: var(--ink); box-shadow: 0 25px 80px #000a; }
dialog::backdrop { background: #0009; backdrop-filter: blur(3px); }
#loginChoices button { display: block; width: 100%; margin: 8px 0; text-align: left; }
#toast { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: 370px; padding: 0; border-radius: 8px; background: #243429; color: #dceee1; box-shadow: 0 10px 40px #0007; }
#toast.show { padding: 14px; }
.automation-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.source-list, .candidate-grid { display: grid; gap: 9px; margin-top: 14px; }
.source-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 180px; align-items: center; gap: 10px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #151618; }
.source-row input { width: auto; }
.candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.candidate-review-deck { grid-template-columns: minmax(0, 1fr); }
.proposal-step { border: 1px solid var(--line); border-radius: 9px; background: #151618; }
.proposal-step > summary { padding: 14px; font-weight: 700; cursor: pointer; }
.proposal-step .candidate-card { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.candidate-card, .job-row { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #151618; }
.candidate-card video, .job-row video { width: min(100%, 260px); max-height: 360px; margin-top: 10px; border-radius: 7px; background: #08090a; }
.job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 9px; }
.job-row video, .job-row details { grid-column: 1 / -1; }
.error-text { color: #f0a0a0; }
@media (max-width: 1080px) {
  .content { padding-inline: 24px; }
  .review-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
  .two { grid-template-columns: 1fr; }
  .automation-status, .candidate-grid { grid-template-columns: 1fr; }
  .package-layout { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .board { grid-template-columns: repeat(4, 220px); }
}
@media (max-width: 800px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .shell, .shell.rail-collapsed { display: block; }
  #sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(300px, 84vw); height: 100dvh; transform: translateX(-105%); transition: transform .18s ease; box-shadow: 24px 0 60px #0009; }
  .shell.mobile-nav-open #sidebar { transform: translateX(0); }
  .rail-toggle { display: none; }
  .workspace-label { margin-top: 34px; }
  .shell.rail-collapsed .brand, .shell.rail-collapsed .workspace-label, .shell.rail-collapsed .nav-text, .shell.rail-collapsed .aside-kicker, .shell.rail-collapsed .aside-note > b, .shell.rail-collapsed .profile-button > span:last-child { display: block; }
  .shell.rail-collapsed #sidebar { padding: 28px 18px 20px; align-items: stretch; }
  .shell.rail-collapsed nav { width: auto; margin-top: 0; }
  .shell.rail-collapsed nav button, .shell.rail-collapsed .profile-button { justify-content: flex-start; }
  .topbar { display: none; }
  .mobile-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: #121315eb; backdrop-filter: blur(12px); font: 700 13px var(--display); }
  .mobile-bar .icon-button { width: 42px; padding: 0; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; color: var(--ink); font: 800 13px/1 var(--display); letter-spacing: -.4px; }
  .mobile-brand img { width: 21px; height: 26px; object-fit: contain; }
  .mobile-identity { max-width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 18px 16px 36px; max-width: 100%; overflow: hidden; }
  .dev-banner { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 18px; }
  header { display: block; margin-bottom: 18px; }
  h1 { font-size: 25px; }
  .header-actions { margin-top: 14px; justify-content: stretch; }
  .header-actions select { width: 100%; }
  .header-actions .btn { flex: 1; }
  .context { overflow-x: auto; max-width: 100%; }
  .context dl { grid-template-columns: 1fr; }
  .context dl > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .context dl > div:last-child { border-bottom: 0; }
  .context ol { grid-template-columns: repeat(5, 132px); width: max-content; }
  .context li { min-height: 44px; padding: 9px 11px; }
  .grid { grid-template-columns: 1fr; gap: 9px; }
  .metric-card { min-height: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 15px; }
  .metric { grid-row: 1 / 3; grid-column: 2; margin: 0; font-size: 29px; }
  .metric-note { margin-top: 5px; }
  .panel { padding: 17px; }
  .panel-heading { padding: 17px; }
  .queue-panel { padding: 0; }
  .queue-panel table, .queue-panel thead, .queue-panel tbody, .queue-panel tr, .queue-panel th, .queue-panel td { display: block; }
  .queue-panel thead { display: none; }
  .queue-panel tr { position: relative; padding: 15px 88px 15px 16px; border-bottom: 1px solid var(--line); }
  .queue-panel td { padding: 2px 0; border: 0; }
  .queue-panel td:last-child { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); }
  .item-context { align-items: flex-start; flex-wrap: wrap; }
  .item-context strong { width: 100%; }
  .script { min-height: 420px; padding: 20px 16px; }
  .review-grid { display: block; }
  .review-side { position: static; max-height: none; }
  .stage { min-height: 260px; height: 56vw; }
  .video-toolbar { grid-template-columns: auto minmax(60px, 1fr) auto; }
  .annotation-tools .btn { flex: 1; padding-inline: 7px; }
  .board { grid-template-columns: repeat(4, calc(100vw - 46px)); max-width: 100%; }
  .assignment-summary { grid-template-columns: 1fr; }
  .thumb-grid { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .calendar-toolbar strong { order: -1; width: 100%; margin-bottom: 3px; }
  .calendar { grid-template-columns: repeat(7, 124px); max-width: 100%; }
  .compact-label { width: 100%; align-items: flex-start; flex-direction: column; }
  .compact-label select { width: 100%; max-width: none; }
  .toolbar { min-width: 0; }
  .row { align-items: flex-start; }
  .source-row { grid-template-columns: auto minmax(0, 1fr); }
  .source-row select { grid-column: 2; }
  input, select, textarea { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .shell, #sidebar, .identity, .btn, .icon-button { transition: none; } }

/* Publishing uses one focused form while retaining all five approved choices. */
.pub-clips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:20px}.pub-clip{display:flex;flex-direction:column;gap:9px;text-align:left;padding:18px;background:#181a1b;border:1px solid #303235;border-radius:12px;color:inherit;cursor:pointer;min-width:0}.pub-clip.selected{border-color:#d99b62;background:#262019}.pub-clip strong{font-size:14px;line-height:1.5}.pub-clip .eyebrow{font-size:11px;color:#d99b62}.pub-tabs{margin-bottom:20px}.pub-layout{display:grid;grid-template-columns:minmax(250px,360px) minmax(0,1fr);gap:22px;align-items:start}.pub-preview{position:sticky;top:22px}.pub-preview video{display:block;width:100%;height:min(55vh,490px);object-fit:contain;background:#090909;border-radius:10px;margin-bottom:18px}.pub-form{min-width:0}.pub-form textarea{line-height:1.6}.pub-form .actions{flex-wrap:wrap}#pubBlockers li{margin:7px 0}.pub-preview a{color:#dda168}.pub-clip:focus-visible{outline:2px solid #dda168;outline-offset:3px}@media(max-width:1050px){.pub-clips{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.pub-clips{grid-template-columns:repeat(2,minmax(0,1fr))}.pub-layout{grid-template-columns:1fr}.pub-preview{position:static}.pub-preview video{height:340px}.pub-tabs{flex-wrap:wrap}}

/* Research screen: proposal cards, their source trail and the batch controls. */
.proposal-card .details-panel { margin-top: 10px; }
.proposal-card pre { margin: 6px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); color: var(--ink); white-space: pre-wrap; }
.proposal-card .source-list { display: grid; gap: 8px; }
.proposal-card .source-row { display: flex; align-items: flex-start; gap: 12px; }
.proposal-card .source-row a { font-weight: 600; }
.batch-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.job-list { display: grid; gap: 8px; margin-top: 12px; }
.feedback-form { display: grid; gap: 8px; margin-top: 10px; }
