:root {
  color: #f5f2eb;
  background: #101214;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
  --surface: #171a1d;
  --surface-raised: #1e2226;
  --line: #30363b;
  --muted: #9ba4aa;
  --accent: #e7ff56;
  --accent-ink: #111508;
  --success: #63d39b;
  --danger: #ff827a;
  --warning: #f5bf65;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at 75% 0%, #273026 0, transparent 28rem), #101214;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(13, 15, 17, 0.94);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  padding: 0 8px 30px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 900;
}
.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.brand small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
nav {
  display: grid;
  gap: 8px;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
}
nav a:hover,
nav a.active {
  color: #fff;
  background: var(--surface-raised);
}
nav a.active {
  box-shadow: inset 3px 0 var(--accent);
}
.sidebar-foot {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 8px;
  display: grid;
  gap: 6px;
}
.sidebar-foot > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-foot small {
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.environment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px var(--success);
}

main {
  width: min(1440px, 100%);
  padding: 34px clamp(24px, 4vw, 64px) 72px;
}
.topbar,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.topbar {
  margin-bottom: 32px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.045em;
}
h2 {
  margin-bottom: 8px;
  font-size: 25px;
  letter-spacing: -0.025em;
}
.eyebrow {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.identity {
  color: var(--muted);
  text-align: right;
  font-size: 13px;
}
.identity strong {
  color: #fff;
  display: block;
  font-size: 14px;
}
.page-description {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}
.session-error {
  border: 1px solid #70423f;
  background: #2b1c1d;
  padding: 20px;
  border-radius: 14px;
  display: grid;
  gap: 6px;
  color: #ffd5d1;
}
.session-error[hidden] {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 44px;
}
.summary-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(37, 42, 45, 0.9), rgba(22, 25, 28, 0.9));
}
.summary-grid span,
.summary-grid small {
  display: block;
  color: var(--muted);
}
.summary-grid strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 34px;
  letter-spacing: -0.04em;
}
.content-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.section-heading p:not(.eyebrow) {
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 22px;
}

.account-list,
.route-list {
  display: grid;
  gap: 10px;
}
.account-card,
.route-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(140px, 0.7fr)) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.account-card h3,
.provider-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}
.account-card p,
.account-card small,
.route-card small {
  margin: 0;
  color: var(--muted);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status.connected {
  color: var(--success);
  background: rgba(99, 211, 155, 0.11);
}
.status.failed,
.status.disabled {
  color: var(--danger);
  background: rgba(255, 130, 122, 0.1);
}
.status.rate-limited,
.status.expired {
  color: var(--warning);
  background: rgba(245, 191, 101, 0.1);
}
.status.working {
  color: #8bc7ff;
  background: rgba(83, 164, 238, 0.12);
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}
.provider-task-groups {
  display: grid;
  gap: 18px;
}
.provider-task-group .provider-grid {
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
}
.provider-task-group .provider-card {
  min-height: 165px;
}
.provider-task-group {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(23, 26, 29, 0.72);
}
.provider-task-group.ready {
  border-color: rgba(99, 211, 155, 0.42);
}
.provider-task-group.not-ready {
  border-color: rgba(245, 191, 101, 0.35);
}
.provider-task-head,
.provider-task-title,
.provider-task-actions,
.provider-route-chain {
  display: flex;
  align-items: center;
}
.provider-task-head {
  justify-content: space-between;
  gap: 24px;
}
.provider-task-head h3,
.provider-task-head p {
  margin: 0;
}
.provider-task-head p,
.provider-task-head small {
  color: var(--muted);
}
.provider-task-head p {
  max-width: 760px;
  margin-top: 8px;
  line-height: 1.5;
}
.provider-task-head small {
  display: block;
  margin-top: 6px;
}
.provider-task-title {
  flex-wrap: wrap;
  gap: 10px;
}
.provider-task-actions {
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 9px;
}
.task-requirement {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.task-requirement.required {
  color: var(--warning);
  background: rgba(245, 191, 101, 0.12);
}
.task-requirement.conditional {
  color: #8bc7ff;
  background: rgba(83, 164, 238, 0.12);
}
.provider-route-chain {
  min-height: 70px;
  gap: 10px;
  padding: 13px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111416;
}
.route-chain-member {
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-raised);
}
.route-chain-member small,
.route-chain-member strong,
.route-chain-member span {
  display: block;
}
.route-chain-member small,
.route-chain-member span,
.route-empty,
.route-warning {
  color: var(--muted);
  font-size: 11px;
}
.route-chain-member strong {
  margin: 4px 0;
  font-size: 13px;
}
.route-chain-member.unavailable {
  border: 1px solid rgba(255, 130, 122, 0.38);
}
.route-arrow {
  color: var(--muted);
}
.route-empty {
  margin: 0;
}
.route-warning {
  color: var(--danger);
}
.provider-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.provider-card:hover {
  transform: translateY(-2px);
  border-color: #505960;
}
.provider-card .provider-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 900;
}
.provider-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.provider-card .card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.provider-card a {
  color: var(--muted);
  font-size: 12px;
}

button {
  border: 0;
  cursor: pointer;
  border-radius: 9px;
  padding: 10px 13px;
  font-weight: 750;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.primary {
  color: var(--accent-ink);
  background: var(--accent);
}
.primary:hover {
  background: #f0ff8b;
}
.secondary,
.ghost {
  color: #f5f2eb;
  background: #2b3034;
}
.ghost {
  padding: 7px 9px;
  font-size: 12px;
}
.danger {
  color: #ffd4d0;
  background: #422426;
}
.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  color: #fff;
  background: transparent;
  font-size: 25px;
}

.route-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
label {
  display: grid;
  gap: 7px;
  color: #c8ced2;
  font-size: 12px;
  font-weight: 700;
}
input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #3a4248;
  border-radius: 9px;
  padding: 9px 11px;
  color: #fff;
  background: #111416;
}
.toggle {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 9px;
}
.toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
.route-card {
  grid-template-columns: 1fr 1fr 1fr auto;
}
.route-card strong,
.route-card small {
  display: block;
}
.route-card small {
  margin-top: 4px;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -4px 0 30px;
}
.section-lead {
  max-width: 720px;
  margin: 0;
  color: #c2c9cd;
  font-size: 17px;
  line-height: 1.55;
}
.primary-large {
  min-height: 48px;
  padding-inline: 18px;
  white-space: nowrap;
}
.compact-control {
  min-width: 170px;
}
.settings-first {
  padding-top: 0;
  border-top: 0;
}
.product-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.product-settings-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.product-settings-card header {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-swatch {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
}
.product-settings-card h3,
.product-settings-card p {
  margin: 0;
}
.product-settings-card p {
  min-height: 42px;
  margin: 13px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.knowledge-state {
  color: var(--muted);
  font-size: 11px;
}
.knowledge-state.ready {
  color: var(--success);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.project-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(34, 39, 42, 0.96), rgba(20, 23, 25, 0.96)), var(--surface);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
}
.project-card::before {
  content: '';
  height: 3px;
  margin: -20px -20px 20px;
  background: linear-gradient(90deg, var(--accent), transparent 78%);
}
.project-card-top,
.project-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.project-card-top small,
.project-card-foot small,
.project-card > p {
  color: var(--muted);
}
.project-card h3 {
  margin: 22px 0 6px;
  font-size: 21px;
  letter-spacing: -0.025em;
}
.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 24px;
}
.project-card-meta span {
  padding: 5px 8px;
  color: #c8d0d4;
  background: #252a2e;
  border-radius: 6px;
  font-size: 11px;
}
.project-card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.project-open,
.back-button {
  padding: 7px 0;
  color: var(--accent);
  background: transparent;
}
.empty-projects {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
}
.empty-projects strong {
  color: #fff;
  font-size: 20px;
}
.empty-projects p {
  max-width: 520px;
  margin: 8px auto 18px;
}

.back-button {
  margin-bottom: 18px;
}
.project-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--line);
}
.project-hero h2 {
  margin: 10px 0 8px;
  font-size: clamp(27px, 3vw, 40px);
}
.project-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.project-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.project-metrics {
  display: flex;
  gap: 10px;
}
.project-metrics span {
  min-width: 108px;
  padding: 12px 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 11px;
}
.project-metrics strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-size: 16px;
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(350px, 0.86fr) minmax(500px, 1.4fr);
  gap: 16px;
  padding-top: 20px;
}
.director-panel,
.creative-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(23, 26, 29, 0.94);
}
.director-panel {
  display: flex;
  flex-direction: column;
  min-height: 720px;
  max-height: calc(100vh - 110px);
  position: sticky;
  top: 20px;
}
.creative-panel {
  min-height: 720px;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3,
.panel-head p {
  margin: 0;
}
.panel-head h3 {
  font-size: 16px;
}
.panel-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.director-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 12px;
  font-weight: 900;
}
.online-label {
  margin-left: auto;
  color: var(--success);
  font-size: 11px;
}
.online-label::before {
  content: '●';
  margin-right: 5px;
}
.message-list {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
  overflow: auto;
}
.message {
  max-width: 92%;
  padding: 13px 14px;
  border-radius: 13px;
  line-height: 1.5;
  font-size: 13px;
}
.message strong,
.message small {
  display: block;
}
.message p {
  margin: 4px 0 6px;
  white-space: pre-wrap;
}
.message small {
  color: var(--muted);
  font-size: 10px;
}
.message.director {
  background: #252a2e;
  border-top-left-radius: 4px;
}
.message.user {
  justify-self: end;
  background: #35401f;
  border-top-right-radius: 4px;
}
.proposal-card {
  margin: 0 14px 12px;
  padding: 15px;
  border: 1px solid #66752e;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(64, 76, 31, 0.72), rgba(36, 43, 24, 0.75));
}
.proposal-card > div:first-child {
  display: grid;
  gap: 6px;
}
.proposal-card p {
  margin: 0;
  color: #d7ddc6;
  font-size: 12px;
  line-height: 1.45;
}
.proposal-label,
.version-badge {
  width: fit-content;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.proposal-actions button {
  padding: 8px 10px;
  font-size: 11px;
}
.director-composer {
  padding: 14px;
  border-top: 1px solid var(--line);
}
.director-composer textarea,
.wizard-grid textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #3a4248;
  border-radius: 10px;
  padding: 11px;
  color: #fff;
  background: #111416;
  font: inherit;
}
.composer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}
.composer-foot small {
  color: var(--muted);
}
.creative-head {
  justify-content: space-between;
}
.tabs {
  display: flex;
  gap: 3px;
  padding: 10px 12px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  flex: 0 0 auto;
  padding: 10px 11px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
}
.tabs button[aria-selected='true'] {
  color: #fff;
  box-shadow: inset 0 -2px var(--accent);
}
.creative-content {
  display: grid;
  gap: 12px;
  padding: 20px;
}
.creative-empty {
  min-height: 470px;
  display: grid;
  place-content: center;
}
.concept-hero {
  padding: 24px;
  border: 1px solid #465125;
  border-radius: 14px;
  background: radial-gradient(circle at 95% 0%, rgba(231, 255, 86, 0.13), transparent 45%), #20251e;
}
.concept-hero h4 {
  margin: 0 0 9px;
  font-size: 27px;
  letter-spacing: -0.035em;
}
.concept-logline {
  margin: 0;
  color: #d6ddcf;
  font-size: 16px;
  line-height: 1.55;
}
.detail-block {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(19, 22, 24, 0.7);
}
.detail-block h4 {
  margin: 0 0 7px;
  color: #cbd1d4;
  font-size: 12px;
}
.detail-block p,
.detail-block ul {
  margin: 0;
  color: #f0f1ed;
  line-height: 1.55;
  white-space: pre-wrap;
}
.detail-list {
  padding-left: 20px;
  color: #d5dade;
  line-height: 1.55;
}
.scene-list {
  display: grid;
  gap: 12px;
}
.scene-card {
  display: grid;
  gap: 9px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #141719;
}
.scene-card header {
  display: flex;
  gap: 11px;
  align-items: center;
}
.scene-card header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.scene-number {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent);
  background: #272d24;
  border-radius: 9px;
  font-weight: 850;
}
.scene-card .detail-block {
  padding: 11px 12px;
}
.claim-warning {
  padding: 11px;
  color: #ffd9a0;
  background: rgba(111, 70, 15, 0.28);
  border-radius: 9px;
  font-size: 12px;
}
.claim-warning p {
  margin: 5px 0 0;
}
.creative-revise {
  justify-self: start;
}
.storyboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.storyboard-card {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #141719;
}
.frame-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  overflow: hidden;
  border-radius: 8px;
  color: #e6e9e0;
  background:
    linear-gradient(145deg, rgba(16, 20, 22, 0.38), rgba(16, 20, 22, 0.9)),
    repeating-linear-gradient(135deg, #343b3e 0 1px, #24292c 1px 12px);
}
.frame-placeholder span {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.frame-placeholder strong {
  font-size: 12px;
  line-height: 1.35;
}
.storyboard-card h4 {
  margin: 12px 0 6px;
}
.storyboard-card p,
.storyboard-card small {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  line-height: 1.45;
}
.technical-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.technical-summary span {
  padding: 13px;
  color: var(--muted);
  background: #24282b;
  border-radius: 10px;
  font-size: 11px;
}
.technical-summary strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-size: 15px;
}
.version-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.version-card p {
  margin: 4px 0;
}
.version-card small {
  color: var(--muted);
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.project-wizard {
  min-height: min(760px, calc(100vh - 28px));
}
.wizard-progress {
  height: 4px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #30363a;
}
.wizard-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #dbe68a);
  transition: width 180ms ease;
}
.wizard-step {
  min-height: 470px;
}
.wizard-question {
  max-width: 760px;
  margin: 32px 0 18px;
}
.wizard-question h3,
.wizard-question p {
  margin: 0;
}
.wizard-question h3 {
  font-size: clamp(22px, 3vw, 34px);
}
.wizard-question p,
.wizard-grid small,
.consent-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}
.choice-row {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 0;
  border: 0;
}
.choice-row label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 120px;
  padding: 15px 18px;
  border: 1px solid #3a4248;
  border-radius: 12px;
  background: #15191b;
  cursor: pointer;
}
.choice-row input,
.consent-card > input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
.nested-fields {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.consent-card {
  display: flex !important;
  align-items: flex-start;
  flex-direction: row !important;
  gap: 12px;
  padding: 15px;
  border: 1px solid #435047;
  border-radius: 12px;
  background: #18201c;
}
.safe-note {
  margin: 0;
  padding: 13px;
  border-radius: 10px;
  color: #cbd3cc;
  background: #17201b;
}
.dialog-action-spacer {
  flex: 1;
}
.media-kind-picker {
  margin-top: 18px;
}
.media-catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 22px;
}
.project-media-repository {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #141719;
}
.project-media-repository .panel-head {
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
}
.project-media-help {
  color: var(--muted);
  font-size: 13px;
  max-width: 100ch;
}
.project-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
  margin-top: 18px;
}
.project-media-gallery .media-catalog-item {
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-media-preview {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  margin: 12px 0;
  background: #fff;
}
.project-media-preview[hidden] {
  display: none;
}
.media-catalog-item button {
  margin: 12px 0 0;
}
.media-description {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.6;
}
.media-catalog-item details {
  font-size: 12px;
  overflow-wrap: anywhere;
}
#project-media-inputs {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
#project-media-inputs legend {
  margin-bottom: 14px;
  font-weight: 700;
}
.media-catalog-layout aside {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #141719;
}
.media-catalog-layout aside h3 {
  margin-top: 0;
}
.media-catalog-list {
  display: grid;
  gap: 9px;
}
.media-catalog-item {
  padding: 12px;
  border: 1px solid #343b40;
  border-radius: 10px;
  background: #1b1f21;
}
.media-catalog-item strong,
.media-catalog-item span {
  display: block;
}
.media-catalog-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.span-full,
.platform-picker {
  grid-column: 1 / -1;
}
.platform-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 13px;
  border: 1px solid #3a4248;
  border-radius: 10px;
}
.platform-picker legend {
  padding: 0 5px;
  color: #c8ced2;
  font-size: 12px;
  font-weight: 700;
}
.platform-picker label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.platform-picker input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}
.estimate-total {
  display: grid;
  gap: 5px;
  padding: 18px;
  margin: 20px 0;
  border: 1px solid #5b682b;
  border-radius: 13px;
  background: #252c1d;
}
.estimate-total span,
.estimate-total small {
  color: #bdc5ac;
}
.estimate-total strong {
  color: var(--accent);
  font-size: 30px;
}
.busy {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: rgba(8, 10, 11, 0.82);
  backdrop-filter: blur(5px);
}
.busy[hidden] {
  display: none;
}
.busy span {
  width: 38px;
  height: 38px;
  border: 3px solid #464d42;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #41494f;
  border-radius: 18px;
  padding: 24px;
  color: #fff;
  background: #171a1d;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
}
.wide-dialog {
  width: min(1120px, calc(100vw - 28px));
}
.risk-review-dialog {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
}
.risk-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.risk-review-header h2 {
  margin: 0;
  font-size: 20px;
}
.risk-review-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.risk-review-form p {
  margin: 0;
}
.risk-review-item {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.risk-review-item legend {
  padding: 0 6px;
  color: var(--warning);
}
.risk-review-item label {
  display: grid;
  gap: 8px;
}
.risk-review-item textarea,
.risk-review-item select {
  width: 100%;
  min-width: 0;
  padding: 10px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
.risk-review-item textarea {
  resize: vertical;
}
.risk-review-original {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface-raised);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.risk-review-original h3,
.risk-review-original h4 {
  margin: 0;
  font-size: 14px;
}
.risk-review-item small {
  color: var(--muted);
  line-height: 1.5;
}
.risk-review-summary {
  padding: 0 20px;
  color: var(--warning);
}
.risk-review-notice[role='alert'] {
  color: var(--danger);
}
dialog::backdrop {
  background: rgba(3, 5, 6, 0.76);
  backdrop-filter: blur(5px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dialog-description {
  color: var(--muted);
  line-height: 1.55;
}
.field-grid {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
.field-grid .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.manage-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.manage-section {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #131618;
}
.manage-section h3 {
  margin: 0 0 5px;
}
.manage-section > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.color-grid input[type='color'] {
  height: 42px;
  padding: 3px;
}
.manage-section textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #3a4248;
  border-radius: 9px;
  padding: 9px 11px;
  color: #fff;
  background: #111416;
  font: inherit;
}
.knowledge-choice {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.button-link {
  display: inline-block;
  width: fit-content;
  padding: 10px 13px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 750;
}
.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
}
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.divider::before,
.divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}
.knowledge-version-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.knowledge-version-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.knowledge-version-card p,
.knowledge-version-card small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
}
.knowledge-version-actions {
  display: flex;
  gap: 6px;
}
.knowledge-version-actions button {
  padding: 7px 9px;
  font-size: 11px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.history-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.history-entry {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.history-entry p {
  margin: 0;
}
.history-entry small {
  color: var(--muted);
}
.empty {
  padding: 22px;
  border: 1px dashed #3a4248;
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
}
.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;
}
.timeline-editor {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(81, 102, 130, 0.13), transparent 34rem), #15191c;
  box-shadow: var(--shadow);
}
.timeline-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}
.timeline-heading h3,
.timeline-heading p {
  margin: 0;
}
.timeline-heading h3 {
  font-size: 19px;
}
.timeline-heading > div:first-child > p:last-child {
  max-width: 720px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.timeline-platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.timeline-platforms span {
  padding: 6px 9px;
  border: 1px solid #43505a;
  border-radius: 999px;
  color: #d7dde0;
  background: #20262a;
  font-size: 10px;
  font-weight: 750;
}
.timeline-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, 0.75fr);
  gap: 14px;
}
.timeline-monitor,
.clip-inspector {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #101315;
}
.timeline-preview {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #2d353b;
  border-radius: 9px;
  background:
    linear-gradient(rgba(16, 19, 21, 0.34), rgba(7, 9, 10, 0.85)),
    repeating-linear-gradient(135deg, #20262a 0 1px, #171b1e 1px 18px);
}
.timeline-preview::after {
  content: '';
  position: absolute;
  inset: 7%;
  pointer-events: none;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 5px;
}
.timeline-preview video,
.timeline-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #07090a;
}
.timeline-preview-safe {
  position: relative;
  z-index: 1;
  width: min(560px, 82%);
  padding: 28px;
  text-align: center;
}
.timeline-preview-safe span,
.timeline-preview-safe strong,
.timeline-preview-safe p {
  display: block;
}
.timeline-preview-safe span {
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.timeline-preview-safe strong {
  font-size: clamp(18px, 2.3vw, 30px);
  line-height: 1.14;
}
.timeline-preview-safe p {
  margin: 10px 0 0;
  color: #c5cdd1;
  font-size: 12px;
  line-height: 1.55;
}
.timeline-preview-mode {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: #d7dde0;
  background: rgba(10, 12, 13, 0.78);
  font-size: 9px;
  letter-spacing: 0.04em;
}
.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.transport-button {
  width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #3c454b;
  border-radius: 7px;
  color: #e5e9eb;
  background: #252b2f;
  font-size: 11px;
}
.transport-button:hover {
  border-color: #66747c;
  background: #30373c;
}
.transport-primary {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent);
}
.timeline-timecode {
  min-width: 102px;
  margin-left: 8px;
  color: #f5f7f0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.timeline-scrubber {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}
.timeline-scrubber input {
  width: 100%;
  min-height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: ew-resize;
}
.timeline-scrubber > span:last-child {
  min-width: 38px;
  color: var(--muted);
  font:
    11px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  text-align: right;
}
.timeline-status {
  min-height: 17px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.clip-inspector {
  align-content: start;
}
.clip-inspector h4 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.35;
}
.clip-inspector dl {
  display: grid;
  gap: 0;
  margin: 0;
}
.clip-inspector dl div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #262c30;
}
.clip-inspector dt {
  color: var(--muted);
  font-size: 10px;
}
.clip-inspector dd {
  margin: 0;
  color: #e8ecee;
  font-size: 11px;
  line-height: 1.4;
}
.inspector-note {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #39444b;
  border-radius: 9px;
  background: #171c1f;
}
.inspector-note h5,
.inspector-note p {
  margin: 0;
}
.inspector-note h5 {
  color: #d8dfe2;
  font-size: 10px;
}
.inspector-note p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.alignment-note {
  border-color: #4c582d;
  background: #1b2118;
}
.alignment-note h5 {
  color: var(--accent);
}
.timeline-sequence {
  --track-label-width: 146px;
  position: relative;
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid #30383e;
  border-radius: 11px;
  background: #0d1012;
}
.timeline-ruler {
  position: relative;
  height: 30px;
  min-width: 740px;
  margin-left: var(--track-label-width);
  border-bottom: 1px solid #293137;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(10% - 1px),
    #354047 calc(10% - 1px) 10%
  );
}
.ruler-label {
  position: absolute;
  top: 7px;
  color: #77838a;
  font:
    9px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  transform: translateX(-50%);
}
.ruler-label:first-child {
  transform: none;
}
.ruler-label:last-child {
  transform: translateX(-100%);
}
.timeline-tracks {
  min-width: calc(740px + var(--track-label-width));
}
.timeline-track {
  display: grid;
  grid-template-columns: var(--track-label-width) minmax(740px, 1fr);
  min-height: 46px;
  border-bottom: 1px solid #22292e;
}
.timeline-track:last-child {
  border-bottom: 0;
}
.track-label {
  position: sticky;
  z-index: 4;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-right: 1px solid #30383e;
  color: #bfc7cb;
  background: #171b1e;
  font-size: 10px;
  font-weight: 750;
}
.track-label::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--track-color, #71808a);
}
.track-rail {
  position: relative;
  min-height: 45px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.025) 0 calc(10% - 1px),
    rgba(255, 255, 255, 0.075) calc(10% - 1px) 10%
  );
}
.timeline-clip {
  position: absolute;
  z-index: 1;
  top: 6px;
  height: 33px;
  min-width: 4px;
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--clip-color) 76%, white 12%);
  border-radius: 5px;
  color: #f8fafb;
  background: color-mix(in srgb, var(--clip-color) 46%, #15191c);
  font-size: 9px;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-clip:hover,
.timeline-clip[aria-pressed='true'] {
  z-index: 2;
  border-color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--clip-color) 50%, transparent);
}
.timeline-empty-track {
  position: absolute;
  top: 14px;
  left: 10px;
  color: #566169;
  font-size: 9px;
}
.timeline-playhead {
  position: absolute;
  z-index: 3;
  top: 23px;
  bottom: 0;
  left: var(--track-label-width);
  width: 1px;
  pointer-events: none;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(231, 255, 86, 0.7);
}
.timeline-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.timeline-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.track-violet {
  --track-color: #a889f5;
}
.track-cyan {
  --track-color: #5fc7d3;
}
.track-blue {
  --track-color: #609ee8;
}
.track-pink {
  --track-color: #df77b6;
}
.track-amber {
  --track-color: #edbd58;
}
.track-lime {
  --track-color: #b4d966;
}
.track-green {
  --track-color: #5ec997;
}
.track-orange {
  --track-color: #e68a55;
}
.timeline-clip.track-violet,
.timeline-clip.track-cyan,
.timeline-clip.track-blue,
.timeline-clip.track-pink,
.timeline-clip.track-amber,
.timeline-clip.track-lime,
.timeline-clip.track-green,
.timeline-clip.track-orange {
  --clip-color: var(--track-color);
}
.production-control {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #20262a, #1b2024);
  box-shadow: var(--shadow);
}
.production-control-head {
  align-items: flex-start;
}
.production-control-head h3,
.production-control-head p {
  margin: 0;
}
.production-control-head > div:first-child {
  display: grid;
  gap: 5px;
}
.production-control-head > div:first-child > p:last-child {
  color: var(--muted);
}
.production-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.production-readiness {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #181d20;
}
.production-readiness p {
  margin: 0;
  color: var(--muted);
}
.workflow-list {
  display: grid;
  gap: 10px;
}
.workflow-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #171c1f;
}
.workflow-card-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px 10px;
  min-width: 0;
}
.workflow-card-main p,
.workflow-card-main small {
  grid-column: 2;
  margin: 0;
}
.workflow-card-main p {
  color: var(--text);
}
.workflow-card-main small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.field-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field-grid .full-width {
  grid-column: 1 / -1;
}
.approval-checklist {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.approval-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #181d20;
}
.approval-checklist input {
  margin-top: 3px;
}
.form-note {
  color: var(--muted);
  line-height: 1.55;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 18px;
  border: 1px solid #4b565d;
  border-radius: 11px;
  background: #252b2f;
  box-shadow: 0 18px 50px #0008;
}
.toast.error {
  color: #ffd4d0;
  border-color: #764743;
  background: #321f20;
}

@media (max-width: 1050px) {
  .route-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-card {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    justify-content: flex-start;
  }
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .director-panel {
    position: static;
    min-height: 620px;
    max-height: none;
  }
  .message-list {
    max-height: 520px;
  }
  .project-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .timeline-workspace {
    grid-template-columns: 1fr;
  }
  .clip-inspector {
    display: grid;
    grid-template-columns: minmax(180px, 0.75fr) 1fr 1fr;
    gap: 12px;
  }
  .clip-inspector > .eyebrow,
  .clip-inspector > h4,
  .clip-inspector > dl {
    grid-column: 1;
  }
  .clip-inspector .inspector-note {
    grid-row: 1 / span 3;
    margin: 0;
  }
  .clip-inspector .inspector-note:first-of-type {
    grid-column: 2;
  }
  .clip-inspector .alignment-note {
    grid-column: 3;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .brand {
    padding: 0;
    margin-right: auto;
  }
  .brand small {
    display: none;
  }
  .sidebar-foot {
    flex: 0 0 100%;
    margin-top: 0;
    padding: 0 8px;
    display: flex;
    justify-content: flex-end;
  }
  .sidebar-foot > span {
    display: none;
  }
  nav {
    display: flex;
  }
  nav a {
    padding: 10px;
  }
  main {
    padding: 24px 16px 56px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .identity {
    max-width: none;
    text-align: left;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .account-card,
  .route-card,
  .route-form {
    grid-template-columns: 1fr;
  }
  .field-grid .split {
    grid-template-columns: 1fr;
  }
  .manage-columns {
    grid-template-columns: 1fr;
  }
  .color-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .page-actions,
  .section-heading,
  .provider-task-head {
    align-items: stretch;
    flex-direction: column;
  }
  .provider-task-actions {
    align-items: stretch;
  }
  .primary-large {
    width: 100%;
  }
  .project-grid,
  .storyboard-grid,
  .wizard-grid {
    grid-template-columns: 1fr;
  }
  .span-full,
  .platform-picker {
    grid-column: auto;
  }
  .wizard-step {
    min-height: 0;
  }
  .choice-row,
  .dialog-actions {
    flex-wrap: wrap;
  }
  .choice-row label {
    flex: 1;
  }
  .media-catalog-layout {
    grid-template-columns: 1fr;
  }
  .project-metrics {
    width: 100%;
    overflow-x: auto;
  }
  .project-metrics span {
    flex: 1 0 105px;
  }
  .studio-layout {
    margin-inline: -5px;
  }
  .director-panel,
  .creative-panel {
    border-radius: 13px;
  }
  .creative-content {
    padding: 14px;
  }
  .technical-summary {
    grid-template-columns: 1fr;
  }
  .composer-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .composer-foot button {
    width: 100%;
  }
  .production-control-head,
  .production-readiness,
  .workflow-card {
    align-items: stretch;
    flex-direction: column;
  }
  .production-actions {
    justify-content: stretch;
  }
  .production-actions button,
  .workflow-card > button {
    width: 100%;
  }
  .field-grid.two-columns {
    grid-template-columns: 1fr;
  }
  .field-grid .full-width {
    grid-column: auto;
  }
  .timeline-editor {
    margin-inline: -5px;
    padding: 14px;
    border-radius: 13px;
  }
  .timeline-heading {
    flex-direction: column;
  }
  .timeline-platforms {
    justify-content: flex-start;
  }
  .timeline-preview {
    min-height: 200px;
  }
  .timeline-preview-safe {
    width: 92%;
    padding: 18px;
  }
  .clip-inspector {
    display: block;
  }
  .clip-inspector .inspector-note {
    margin-top: 12px;
  }
  .timeline-sequence {
    --track-label-width: 106px;
  }
  .timeline-track {
    grid-template-columns: var(--track-label-width) minmax(740px, 1fr);
  }
  .track-label {
    padding: 0 7px;
    font-size: 9px;
  }
  .timeline-ruler {
    margin-left: var(--track-label-width);
  }
  .transport {
    justify-content: flex-start;
    overflow-x: auto;
  }
  .timeline-timecode {
    margin-left: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.workflow-monitor-panel {
  grid-column: 1 / -1;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 0;
}
.monitor-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0;
}
.monitor-summary > div:first-child {
  font-size: 1.1rem;
}
.monitor-clock {
  font-variant-numeric: tabular-nums;
}
.monitor-costs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px;
  background: var(--surface-raised);
  border-radius: 10px;
}
.monitor-costs strong,
.monitor-costs > small:last-child {
  width: 100%;
}
.monitor-costs p {
  margin: 0;
}
.monitor-costs small {
  display: block;
}
.monitor-lifecycle {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 12px 2px;
}
.lifecycle-object {
  position: relative;
  flex: 1 0 160px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  color: inherit;
}
.lifecycle-object strong,
.lifecycle-object small {
  display: block;
}
.lifecycle-object:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -23px;
  top: 34%;
  color: var(--muted);
}
.lifecycle-object:disabled {
  opacity: 0.7;
}
.monitor-run {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 12px;
}
.monitor-run select {
  max-width: 100%;
}
.monitor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.monitor-scroll {
  overflow: auto;
  max-height: 720px;
  padding: 8px;
  background: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 16px 16px;
}
.monitor-graph {
  position: relative;
  min-height: 174px;
}
.monitor-edges {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.monitor-edges path {
  stroke: var(--muted);
  stroke-width: 1.5;
  fill: none;
}
.monitor-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 214px;
  height: 156px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  background: var(--surface-raised);
  color: inherit;
  overflow: hidden;
}
.monitor-node strong {
  line-height: 1.2;
  font-size: 0.9rem;
}
.monitor-node small {
  font-size: 0.73rem;
  overflow-wrap: anywhere;
}
.monitor-node[aria-pressed='true'] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.monitor-done {
  border-color: var(--success);
}
.monitor-running {
  border-color: var(--accent);
}
.monitor-failed {
  border-color: var(--danger);
}
.monitor-pending {
  border-color: var(--line);
}
.monitor-inspector {
  border-left: 1px solid var(--line);
  padding: 18px;
  background: var(--surface-raised);
  max-height: 720px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.monitor-inspector h4 {
  margin-top: 0;
}
.monitor-inspector h5 {
  margin: 22px 0 8px;
  font-size: 0.9rem;
}
.monitor-inspector h6 {
  margin: 12px 0 6px;
  font-size: 0.8rem;
}
.monitor-inspector p {
  font-size: 0.85rem;
  white-space: pre-wrap;
}
.monitor-value {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}
.monitor-value dt,
.muted {
  color: var(--muted);
}
.monitor-value dd {
  margin: 0;
}
.monitor-inspector .ghost {
  display: block;
  text-align: left;
  font-size: 0.8rem;
}
.monitor-error {
  color: var(--danger);
}
.monitor-future {
  padding-top: 18px;
  font-size: 0.85rem;
}
.agent-decisions details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 0.85rem;
}
.agent-decisions summary {
  cursor: pointer;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.activity-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.activity-card:hover {
  border-color: var(--accent);
}
@media (max-width: 760px) {
  .monitor-workspace,
  .monitor-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .monitor-inspector {
    border-left: none;
    border-top: 1px solid var(--line);
    max-height: 520px;
  }
  .monitor-scroll {
    max-height: 440px;
  }
  .monitor-run {
    flex-direction: column;
    align-items: flex-start;
  }
  .workflow-monitor-panel {
    padding: 12px;
  }
}
