:root {
  --brand-gold: #ffd84d;
  --brand-gold-hover: #efc944;
  --brand-gold-strong: #d6a900;
  --brand-gold-soft: #fff7d6;
  --brand-black: #0d0d0d;
  --brand-ink: #1d1d1f;
  --brand-muted: #68707d;
  --brand-line: #ebe7dc;
  --brand-surface: #ffffff;
  --brand-card: #faf9f6;
  --brand-card-strong: #f5f3ed;
  --status-green: #16834f;
  --status-yellow: #b7791f;
  --status-red: #c2413b;
  --status-blue: #2f6f9f;

  /* FoxFlow Design System v1 */
  --ff-space-1: 4px;
  --ff-space-2: 8px;
  --ff-space-3: 12px;
  --ff-space-4: 16px;
  --ff-space-6: 24px;
  --ff-space-8: 32px;

  --ff-color-bg: #fbfaf7;
  --ff-color-surface: #ffffff;
  --ff-color-surface-subtle: #f7f5ef;
  --ff-color-surface-muted: #f1eee6;
  --ff-color-text: #171717;
  --ff-color-text-muted: #68707d;
  --ff-color-border: #e7e1d5;
  --ff-color-border-strong: #d8d1c4;
  --ff-color-accent: var(--brand-gold);
  --ff-color-accent-hover: var(--brand-gold-hover);
  --ff-color-accent-soft: var(--brand-gold-soft);

  --ff-color-success: #16834f;
  --ff-color-success-bg: #edfdf5;
  --ff-color-warning: #9a6417;
  --ff-color-warning-bg: #fff8e5;
  --ff-color-error: #b43530;
  --ff-color-error-bg: #fff1f0;
  --ff-color-info: #2f6f9f;
  --ff-color-info-bg: #edf7fb;
  --ff-color-neutral: #68707d;
  --ff-color-neutral-bg: #f3f1ec;
  --ff-workspace-bg: var(--ff-color-bg);
  --ff-panel-bg: var(--ff-color-surface-subtle);

  --ff-radius-sm: 6px;
  --ff-radius-md: 8px;
  --ff-radius-lg: 12px;
  --ff-radius-xl: 16px;
  --ff-radius-pill: 999px;

  --ff-shadow-xs: 0 1px 2px rgba(13, 13, 13, 0.04);
  --ff-shadow-sm: 0 8px 20px rgba(13, 13, 13, 0.045);
  --ff-shadow-md: 0 16px 42px rgba(13, 13, 13, 0.08);

  --ff-transition-fast: 120ms ease;
  --ff-transition-base: 160ms ease;
  --ff-transition-slow: 240ms ease;

  --ff-focus-ring: 0 0 0 4px rgba(255, 216, 77, 0.22);
  --ff-control-height: 40px;
  --ff-control-height-sm: 34px;
  --ff-control-height-lg: 48px;
  --ff-icon-size-sm: 18px;
  --ff-icon-size-md: 20px;
}

.ff-button-primary,
.ff-button-secondary,
.ff-button-ghost,
.ff-button-danger,
.ff-icon-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--ff-radius-pill);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 760;
  gap: var(--ff-space-2);
  justify-content: center;
  min-height: var(--ff-control-height);
  padding: 0 var(--ff-space-4);
  text-decoration: none;
  transition:
    background var(--ff-transition-base),
    border-color var(--ff-transition-base),
    box-shadow var(--ff-transition-base),
    color var(--ff-transition-base),
    opacity var(--ff-transition-base),
    transform var(--ff-transition-base);
  user-select: none;
  white-space: nowrap;
}

.ff-button-primary svg,
.ff-button-secondary svg,
.ff-button-ghost svg,
.ff-button-danger svg,
.ff-icon-button svg {
  height: 17px;
  width: 17px;
}

.ff-button-primary {
  background: var(--ff-color-accent);
  border-color: var(--ff-color-accent);
  box-shadow: 0 10px 22px rgba(214, 169, 0, 0.14);
  color: var(--ff-color-text);
}

.ff-button-primary:hover {
  background: var(--ff-color-accent-hover);
  border-color: var(--ff-color-accent-hover);
  box-shadow: 0 12px 26px rgba(214, 169, 0, 0.18);
  color: var(--ff-color-text);
  transform: translateY(-1px);
}

.ff-button-secondary {
  background: var(--ff-color-surface);
  border-color: var(--ff-color-border);
  box-shadow: var(--ff-shadow-xs);
  color: var(--ff-color-text);
}

.ff-button-secondary:hover {
  background: var(--ff-color-surface-subtle);
  border-color: var(--ff-color-border-strong);
  color: var(--ff-color-text);
  transform: translateY(-1px);
}

.ff-button-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--ff-color-text-muted);
}

.ff-button-ghost:hover,
.ff-button-ghost.is-active,
.ff-button-ghost[aria-current="true"] {
  background: var(--ff-color-surface-subtle);
  color: var(--ff-color-text);
}

.ff-button-danger {
  background: var(--ff-color-surface);
  border-color: rgba(180, 53, 48, 0.24);
  box-shadow: none;
  color: var(--ff-color-error);
}

.ff-button-danger:hover {
  background: var(--ff-color-error-bg);
  border-color: rgba(180, 53, 48, 0.38);
  color: #812521;
}

.ff-icon-button {
  background: var(--ff-color-surface);
  border-color: var(--ff-color-border);
  box-shadow: var(--ff-shadow-xs);
  color: var(--ff-color-text);
  height: var(--ff-control-height);
  padding: 0;
  width: var(--ff-control-height);
}

.ff-icon-action {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: var(--ff-control-height-sm);
  justify-content: center;
  line-height: 1;
  min-height: var(--ff-control-height-sm);
  min-width: var(--ff-control-height-sm);
  overflow: visible;
  padding: 0;
  position: relative;
  text-align: center;
  width: var(--ff-control-height-sm);
}

.ff-icon-action .ff-action-icon {
  align-items: center;
  display: grid;
  flex: 0 0 auto;
  font-size: 0.98rem;
  height: 18px;
  justify-content: center;
  line-height: 0;
  margin: 0;
  min-width: 0;
  place-items: center;
  text-align: center;
  width: 18px;
}

.ff-icon-action .ff-action-icon svg {
  display: block;
  fill: none;
  height: 18px;
  overflow: visible;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 18px;
}

.ff-icon-action .ff-action-label {
  display: none;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
}

.ff-icon-action.is-active .ff-action-label,
.ff-icon-action[aria-pressed="true"] .ff-action-label,
.ff-icon-action[data-expanded="true"] .ff-action-label,
.ff-icon-action--labeled .ff-action-label {
  display: inline-flex;
  margin-left: var(--ff-space-1);
  opacity: 1;
}

.ff-icon-action.is-active,
.ff-icon-action[aria-pressed="true"],
.ff-icon-action[data-expanded="true"],
.ff-icon-action--labeled {
  min-width: var(--ff-control-height-sm);
  padding: 0 var(--ff-space-3);
  width: auto;
}

.ff-icon-action:disabled,
.ff-icon-action[aria-disabled="true"] {
  width: var(--ff-control-height-sm);
}

.ff-icon-action:disabled .ff-action-label,
.ff-icon-action[aria-disabled="true"] .ff-action-label {
  display: none;
}

.ff-tooltip {
  position: relative;
}

.ff-tooltip::after {
  background: rgba(23, 23, 23, 0.94);
  border-radius: var(--ff-radius-sm);
  bottom: calc(100% + var(--ff-space-2));
  box-shadow: var(--ff-shadow-sm);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.74rem;
  font-weight: 650;
  left: 50%;
  line-height: 1;
  opacity: 0;
  padding: var(--ff-space-2) var(--ff-space-3);
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 4px);
  transition:
    opacity var(--ff-transition-fast),
    transform var(--ff-transition-fast);
  visibility: hidden;
  white-space: nowrap;
  z-index: 1000;
}

.ff-tooltip::before {
  border: 5px solid transparent;
  border-top-color: rgba(23, 23, 23, 0.94);
  bottom: calc(100% - 1px);
  content: "";
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 4px);
  transition:
    opacity var(--ff-transition-fast),
    transform var(--ff-transition-fast);
  visibility: hidden;
  z-index: 1001;
}

.ff-tooltip:hover::after,
.ff-tooltip:focus-visible::after,
.ff-tooltip:hover::before,
.ff-tooltip:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 280ms;
  visibility: visible;
}

.ff-icon-button:hover,
.ff-icon-button.is-active,
.ff-icon-button[aria-pressed="true"] {
  background: var(--ff-color-surface-subtle);
  border-color: var(--ff-color-border-strong);
  color: var(--ff-color-text);
  transform: translateY(-1px);
}

.ff-button-primary:active,
.ff-button-secondary:active,
.ff-button-ghost:active,
.ff-button-danger:active,
.ff-icon-button:active {
  transform: translateY(0);
}

.ff-button-primary:focus-visible,
.ff-button-secondary:focus-visible,
.ff-button-ghost:focus-visible,
.ff-button-danger:focus-visible,
.ff-icon-button:focus-visible {
  box-shadow: var(--ff-focus-ring);
  outline: none;
}

.ff-button-primary:disabled,
.ff-button-secondary:disabled,
.ff-button-ghost:disabled,
.ff-button-danger:disabled,
.ff-icon-button:disabled,
.ff-button-primary[aria-disabled="true"],
.ff-button-secondary[aria-disabled="true"],
.ff-button-ghost[aria-disabled="true"],
.ff-button-danger[aria-disabled="true"],
.ff-icon-button[aria-disabled="true"] {
  background: var(--ff-color-surface-muted);
  border-color: var(--ff-color-surface-muted);
  box-shadow: none;
  color: var(--ff-color-text-muted);
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.ff-button-primary.is-loading,
.ff-button-secondary.is-loading,
.ff-button-ghost.is-loading,
.ff-button-danger.is-loading,
.ff-icon-button.is-loading,
.ff-button-primary[aria-busy="true"],
.ff-button-secondary[aria-busy="true"],
.ff-button-ghost[aria-busy="true"],
.ff-button-danger[aria-busy="true"],
.ff-icon-button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.78;
  pointer-events: none;
}

.ff-status-badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--ff-radius-pill);
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 800;
  gap: var(--ff-space-1);
  line-height: 1;
  min-height: 24px;
  padding: 0 var(--ff-space-2);
  white-space: nowrap;
}

.ff-status-badge-success {
  background: var(--ff-color-success-bg);
  border-color: rgba(22, 131, 79, 0.22);
  color: var(--ff-color-success);
}

.ff-status-badge-warning {
  background: var(--ff-color-warning-bg);
  border-color: rgba(154, 100, 23, 0.24);
  color: var(--ff-color-warning);
}

.ff-status-badge-error {
  background: var(--ff-color-error-bg);
  border-color: rgba(180, 53, 48, 0.24);
  color: var(--ff-color-error);
}

.ff-status-badge-info {
  background: var(--ff-color-info-bg);
  border-color: rgba(47, 111, 159, 0.22);
  color: var(--ff-color-info);
}

.ff-status-badge-neutral {
  background: var(--ff-color-neutral-bg);
  border-color: var(--ff-color-border);
  color: var(--ff-color-neutral);
}

.ff-card,
.ff-panel,
.ff-section {
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-text);
}

.ff-card {
  background: var(--ff-color-surface);
  box-shadow: var(--ff-shadow-xs);
  padding: var(--ff-space-6);
}

.ff-panel {
  background: var(--ff-color-surface-subtle);
  padding: var(--ff-space-4);
}

.ff-dialog {
  background: transparent;
  border: 0;
  max-width: min(520px, calc(100vw - 32px));
  padding: 0;
}

.ff-dialog::backdrop {
  background: rgba(23, 23, 23, 0.32);
}

body.is-production-reset-dialog-open {
  overflow: hidden;
}

.production-reset-dialog-panel {
  background: var(--ff-color-surface);
  box-shadow: var(--ff-shadow-md);
  display: grid;
  gap: var(--ff-space-4);
  min-width: min(480px, calc(100vw - 32px));
}

.production-reset-dialog-panel h2 {
  font-size: 1.15rem;
  margin: var(--ff-space-1) 0 var(--ff-space-2);
}

.production-reset-dialog-panel p {
  color: var(--ff-color-text-muted);
  line-height: 1.55;
  margin: 0;
}

.production-reset-dialog-actions,
.production-reset-actions {
  justify-content: flex-start;
}

.production-reset-dialog-error {
  background: var(--ff-color-error-bg);
  border: 1px solid rgba(180, 53, 48, 0.24);
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-error);
  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.45;
  margin: 0;
  padding: var(--ff-space-3);
}

.ff-section {
  background: transparent;
  border-color: transparent;
  padding: var(--ff-space-2) 0;
}

.ff-card.is-active,
.ff-panel.is-active {
  border-color: var(--ff-color-border-strong);
  box-shadow: var(--ff-shadow-sm);
}

.ff-card.is-loading,
.ff-panel.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.ff-field {
  display: grid;
  gap: var(--ff-space-2);
}

.ff-field label,
.ff-field-label {
  color: var(--ff-color-text);
  font-size: 0.84rem;
  font-weight: 760;
}

.ff-input,
.ff-textarea,
.ff-select {
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-text);
  font: inherit;
  min-height: var(--ff-control-height);
  padding: 0 var(--ff-space-3);
  transition:
    background var(--ff-transition-base),
    border-color var(--ff-transition-base),
    box-shadow var(--ff-transition-base),
    color var(--ff-transition-base);
  width: 100%;
}

.ff-textarea {
  line-height: 1.5;
  min-height: 112px;
  padding: var(--ff-space-3);
  resize: vertical;
}

.ff-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ff-color-text-muted) 50%),
    linear-gradient(135deg, var(--ff-color-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: var(--ff-space-2);
}

.ff-input::placeholder,
.ff-textarea::placeholder {
  color: #9aa0aa;
}

.ff-input:hover,
.ff-textarea:hover,
.ff-select:hover {
  border-color: var(--ff-color-border-strong);
}

.ff-input:focus,
.ff-textarea:focus,
.ff-select:focus {
  border-color: var(--ff-color-accent-hover);
  box-shadow: var(--ff-focus-ring);
  outline: none;
}

.ff-input:disabled,
.ff-textarea:disabled,
.ff-select:disabled {
  background: var(--ff-color-surface-muted);
  color: var(--ff-color-text-muted);
  cursor: not-allowed;
}

.ff-slider {
  accent-color: var(--ff-color-accent);
  cursor: pointer;
  width: 100%;
}

.ff-slider:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ff-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  justify-content: space-between;
  overflow: visible;
}

.ff-toolbar-group {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  overflow: visible;
}

.ff-split-layout {
  --ff-split-left: 300px;
  --ff-split-right: 320px;
  --ff-split-center-min: 500px;
  --ff-split-handle-size: 12px;
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns:
    var(--ff-split-left)
    var(--ff-split-handle-size)
    minmax(var(--ff-split-center-min), 1fr)
    var(--ff-split-handle-size)
    var(--ff-split-right);
  min-width: 0;
  overflow: visible;
}

.ff-split-panel {
  min-width: 0;
  overflow: auto;
}

.ff-split-handle {
  align-self: stretch;
  background: transparent;
  border: 0;
  border-radius: var(--ff-radius-pill);
  cursor: col-resize;
  display: flex;
  justify-content: center;
  min-width: var(--ff-split-handle-size);
  padding: 0;
  position: relative;
  touch-action: none;
}

.ff-split-handle::before {
  background: var(--ff-color-border);
  border-radius: var(--ff-radius-pill);
  content: "";
  display: block;
  margin: var(--ff-space-2) 0;
  transition:
    background var(--ff-transition-fast),
    box-shadow var(--ff-transition-fast),
    width var(--ff-transition-fast);
  width: 2px;
}

.ff-split-handle:hover::before,
.ff-split-handle:focus-visible::before,
.ff-split-layout.is-resizing .ff-split-handle[aria-valuenow]::before {
  background: var(--ff-color-accent);
  box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.16);
  width: 3px;
}

.ff-split-handle:focus-visible {
  box-shadow: var(--ff-focus-ring);
  outline: none;
}

.ff-split-layout.is-resizing,
body.ff-split-resizing {
  cursor: col-resize;
  user-select: none;
}

body {
  background: var(--brand-surface);
  color: var(--brand-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.drawer-open {
  overflow: hidden;
}

svg {
  stroke-width: 1.8;
}

.app-shell-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--brand-line);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-bar,
.top-nav-inner,
.app-main {
  margin: 0 auto;
  max-width: 1440px;
}

.brand-bar {
  align-items: center;
  display: flex;
  gap: 1.75rem;
  justify-content: space-between;
  min-height: 96px;
  padding: 1.65rem 2.25rem 1.28rem;
}

.brand-lockup {
  align-items: center;
  color: var(--brand-black);
  display: inline-flex;
  gap: 1rem;
  text-decoration: none;
}

.creator-logo {
  display: block;
  height: 66px;
  max-width: 220px;
  object-fit: contain;
}

.brand-divider {
  background: var(--brand-gold);
  border-radius: 999px;
  display: inline-block;
  height: 44px;
  width: 2px;
}

.product-lockup {
  display: grid;
  gap: 0.14rem;
}

.product-lockup strong {
  font-size: 1.08rem;
  font-weight: 740;
  line-height: 1.05;
}

.product-lockup span {
  color: #565d68;
  font-size: 0.74rem;
  font-weight: 520;
  line-height: 1.25;
}

.workspace-switcher {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(13, 13, 13, 0.045);
  color: var(--brand-black);
  display: inline-flex;
  font-weight: 760;
  gap: 0.58rem;
  min-height: 50px;
  padding: 0 1.22rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.workspace-switcher:hover {
  background: #fffdf4;
  border-color: rgba(255, 216, 77, 0.78);
  box-shadow: 0 10px 28px rgba(13, 13, 13, 0.06);
  transform: translateY(-1px);
}

.workspace-switcher svg {
  height: 16px;
  width: 16px;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-black);
  cursor: pointer;
  display: inline-flex;
  gap: 0.62rem;
  min-height: 50px;
  padding: 0 1rem;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu summary span {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  text-align: left;
}

.user-menu summary strong,
.user-menu summary small {
  display: block;
  line-height: 1.2;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu summary strong {
  font-size: 0.9rem;
  font-weight: 820;
}

.user-menu summary small {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 740;
}

.user-menu svg {
  height: 16px;
  width: 16px;
}

.user-menu-dropdown {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(13, 13, 13, 0.12);
  display: grid;
  gap: 0.25rem;
  min-width: 230px;
  padding: 0.45rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 50;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--brand-black);
  display: grid;
  font: inherit;
  font-weight: 760;
  gap: 0.65rem;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 40px;
  padding: 0.58rem 0.7rem;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  background: var(--brand-card);
}

.user-menu-dropdown form {
  margin: 0;
}

.top-nav {
  border-top: 1px solid #f4f1e8;
}

.top-nav-inner {
  display: flex;
  gap: 0.4rem;
  padding: 0 2.25rem;
}

.top-nav-link {
  align-items: center;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: var(--brand-muted);
  display: inline-flex;
  font-weight: 740;
  gap: 0.5rem;
  padding: 1.02rem 1.08rem 1rem;
  position: relative;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.top-nav-link:hover {
  background: rgba(250, 249, 246, 0.86);
  color: var(--brand-black);
}

.top-nav-link.active {
  background: linear-gradient(180deg, rgba(255, 216, 77, 0.14), rgba(255, 216, 77, 0));
  color: var(--brand-black);
}

.top-nav-link.active::after {
  background: var(--brand-gold);
  border-radius: 999px;
  bottom: 0;
  content: "";
  height: 1px;
  left: 28%;
  position: absolute;
  right: 28%;
}

.top-nav-link svg {
  height: 18px;
  width: 18px;
}

.app-main {
  padding: 2.5rem 2.25rem 3rem;
}

.section-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 2.15rem;
}

.section-header h1 {
  color: var(--brand-black);
  font-size: 2.38rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 0.42rem;
}

.section-header p {
  color: var(--brand-muted);
  font-size: 1.03rem;
  line-height: 1.55;
  margin: 0;
  max-width: 720px;
}

.eyebrow {
  color: var(--brand-gold);
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.btn-brand,
.btn-brand-secondary,
.btn-primary,
.btn-ghost,
.btn-link,
.btn-danger-subtle,
.btn-danger,
.btn-outline-danger,
.btn-secondary,
.btn-outline-secondary {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 780;
  gap: 0.5rem;
  justify-content: center;
  cursor: pointer;
  min-height: 42px;
  padding: 0 1.08rem;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
  white-space: nowrap;
}

.btn-brand,
.btn-brand-secondary,
.btn-primary {
  --bs-btn-active-bg: var(--brand-gold-hover);
  --bs-btn-active-border-color: var(--brand-gold-hover);
  --bs-btn-active-color: var(--brand-black);
  --bs-btn-bg: var(--brand-gold);
  --bs-btn-border-color: var(--brand-gold);
  --bs-btn-color: var(--brand-black);
  --bs-btn-disabled-bg: var(--brand-gold);
  --bs-btn-disabled-border-color: var(--brand-gold);
  --bs-btn-disabled-color: var(--brand-black);
  --bs-btn-hover-bg: var(--brand-gold-hover);
  --bs-btn-hover-border-color: var(--brand-gold-hover);
  --bs-btn-hover-color: var(--brand-black);
  background: var(--brand-gold);
  border: 1px solid var(--brand-gold);
  box-shadow: 0 12px 28px rgba(255, 216, 77, 0.2);
  color: var(--brand-black);
}

.btn-brand:hover,
.btn-brand-secondary:hover,
.btn-primary:hover,
.btn-check:checked + .btn-brand,
.btn-check:checked + .btn-brand-secondary,
.btn-check:checked + .btn-primary,
.btn-brand:first-child:active,
.btn-brand-secondary:first-child:active,
.btn-primary:first-child:active,
:not(.btn-check) + .btn-brand:active,
:not(.btn-check) + .btn-brand-secondary:active,
:not(.btn-check) + .btn-primary:active {
  background: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
  box-shadow: 0 14px 30px rgba(239, 201, 68, 0.24);
  color: var(--brand-black);
  transform: translateY(-1px);
}

.btn-ghost,
.btn-link {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: var(--brand-gold-strong);
  text-decoration: none;
}

.btn-ghost:hover,
.btn-link:hover {
  background: var(--brand-gold-soft);
  border-color: transparent;
  box-shadow: none;
  color: var(--brand-black);
  transform: none;
}

.btn-secondary,
.btn-outline-secondary {
  --bs-btn-active-bg: var(--brand-gold-hover);
  --bs-btn-active-border-color: var(--brand-gold-hover);
  --bs-btn-active-color: var(--brand-black);
  --bs-btn-bg: var(--brand-gold);
  --bs-btn-border-color: var(--brand-gold);
  --bs-btn-color: var(--brand-black);
  --bs-btn-disabled-bg: #f5efcf;
  --bs-btn-disabled-border-color: #eadb9a;
  --bs-btn-disabled-color: var(--brand-muted);
  --bs-btn-hover-bg: var(--brand-gold-hover);
  --bs-btn-hover-border-color: var(--brand-gold-hover);
  --bs-btn-hover-color: var(--brand-black);
  background: var(--brand-gold);
  border: 1px solid var(--brand-gold);
  box-shadow: 0 8px 18px rgba(214, 169, 0, 0.14);
  color: var(--brand-black);
}

.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-check:checked + .btn-secondary,
.btn-check:checked + .btn-outline-secondary,
.btn-secondary:first-child:active,
.btn-outline-secondary:first-child:active,
:not(.btn-check) + .btn-secondary:active,
:not(.btn-check) + .btn-outline-secondary:active {
  background: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
  box-shadow: 0 12px 24px rgba(214, 169, 0, 0.2);
  color: var(--brand-black);
  transform: translateY(-1px);
}

.btn-secondary svg,
.btn-outline-secondary svg {
  color: var(--brand-black);
  stroke: currentColor;
}

.btn-secondary:hover svg,
.btn-outline-secondary:hover svg {
  color: var(--brand-black);
}

.btn-compact {
  font-size: 0.84rem;
  min-height: 42px;
  padding: 0 0.76rem;
}

.btn-danger-subtle,
.btn-danger,
.btn-outline-danger {
  background: #fff;
  border: 1px solid rgba(194, 65, 59, 0.24);
  box-shadow: none;
  color: #9f332d;
}

.btn-danger-subtle:hover,
.btn-danger:hover,
.btn-outline-danger:hover {
  background: #fff1f0;
  border-color: rgba(194, 65, 59, 0.38);
  box-shadow: 0 10px 24px rgba(194, 65, 59, 0.08);
  color: #7f2722;
  transform: none;
}

.btn-danger-subtle:disabled,
.btn-danger-subtle:disabled:hover,
.btn-danger:disabled,
.btn-danger:disabled:hover,
.btn-outline-danger:disabled,
.btn-outline-danger:disabled:hover {
  background: #f5efed;
  border-color: #eadbd8;
  box-shadow: none;
  color: #9d8d8a;
  cursor: not-allowed;
}

.btn-brand svg,
.btn-brand-secondary svg,
.btn-primary svg,
.btn-ghost svg,
.btn-link svg,
.btn-danger-subtle svg,
.btn-danger svg,
.btn-outline-danger svg,
.btn-secondary svg,
.btn-outline-secondary svg {
  height: 18px;
  width: 18px;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-black);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
  width: 42px;
}

.icon-button:hover {
  background: var(--brand-card-strong);
  border-color: #d9d4c8;
  transform: translateY(-1px);
}

.icon-button svg {
  height: 18px;
  width: 18px;
}

.drawer-backdrop {
  background: rgba(13, 13, 13, 0.24);
  inset: 0;
  position: fixed;
  z-index: 40;
}

.app-feedback[hidden],
.drawer-backdrop[hidden],
.drawer-info[hidden] {
  display: none;
}

.app-feedback {
  align-items: center;
  background: #edfdf5;
  border: 1px solid rgba(22, 131, 79, 0.22);
  border-radius: 14px;
  color: var(--status-green);
  display: flex;
  font-weight: 740;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding: 0.88rem 1rem;
}

.app-feedback.is-error {
  background: #fff1f0;
  border-color: rgba(194, 65, 59, 0.26);
  color: #8d2823;
}

.app-feedback.is-warning {
  background: #fff8e5;
  border-color: rgba(199, 139, 24, 0.32);
  color: #805516;
}

.app-feedback svg {
  height: 18px;
  width: 18px;
}

.settings-layout {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 260px minmax(0, 1fr);
}

.settings-nav {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  position: sticky;
  top: 156px;
}

.settings-nav-item {
  align-items: center;
  border-radius: 7px;
  color: var(--brand-muted);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 0.72rem 0.78rem;
  text-decoration: none;
}

.settings-nav-item.active {
  background: #fff;
  color: var(--brand-black);
  font-weight: 780;
  box-shadow: 0 8px 20px rgba(13, 13, 13, 0.045);
}

.settings-nav-item.disabled {
  cursor: default;
  opacity: 0.68;
}

.settings-nav-item svg {
  height: 18px;
  width: 18px;
}

.settings-nav-item small {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.settings-main {
  min-width: 0;
}

.settings-panel {
  max-width: 980px;
}

.settings-panel-wide {
  max-width: none;
}

.security-profile-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.security-profile-grid div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.8rem;
}

.security-profile-grid dt {
  color: var(--brand-muted);
  font-size: 0.76rem;
  font-weight: 820;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.security-profile-grid dd {
  color: var(--brand-black);
  font-weight: 780;
  margin: 0;
  overflow-wrap: anywhere;
}

.settings-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-row {
  align-items: center;
  color: var(--brand-black);
  display: inline-flex;
  font-weight: 780;
  gap: 0.5rem;
  min-height: 44px;
}

.user-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.user-actions form {
  margin: 0;
}

.users-table td {
  vertical-align: middle;
}

.settings-intro {
  color: var(--brand-muted);
  line-height: 1.55;
  margin: -0.25rem 0 1.4rem;
  max-width: 760px;
}

.settings-form {
  display: grid;
  gap: 1.3rem;
}

.settings-provider-list {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-option {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 72px;
  padding: 0.9rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.provider-option:has(input:checked) {
  border-color: rgba(255, 216, 77, 0.92);
  box-shadow: 0 10px 26px rgba(13, 13, 13, 0.06);
}

.provider-option:hover {
  transform: translateY(-1px);
}

.provider-option input {
  margin-top: 0.28rem;
}

.provider-option span {
  align-items: flex-start;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
  min-width: 0;
}

.provider-option strong {
  color: var(--brand-black);
  font-size: 0.98rem;
}

.provider-option em {
  font-style: normal;
  white-space: nowrap;
}

.provider-fields {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem;
}

.provider-fields[hidden] {
  display: none;
}

.ai-provider-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-provider-card {
  align-content: start;
  display: grid;
  gap: 1rem;
}

.ai-provider-card > form {
  display: grid;
  gap: 1rem;
}

.ai-provider-header {
  align-items: center;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.ai-provider-logo {
  align-items: center;
  background: var(--brand-black);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 860;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.ai-provider-header h2 {
  color: var(--brand-black);
  font-size: 1.05rem;
  font-weight: 850;
  margin: 0 0 0.3rem;
}

.ai-provider-fields {
  grid-template-columns: 1fr;
}

.ai-provider-fields .form-field label span {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.field-help {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
  margin: 0.35rem 0 0;
}

.ai-provider-advanced {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.75rem;
}

.ai-provider-advanced > summary {
  color: var(--brand-black);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
}

.ai-provider-advanced .provider-fields {
  border: 0;
  margin-top: 0.75rem;
  padding: 0;
}

.ai-provider-advanced-note {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0.75rem 0 0;
}

.ai-provider-dashboard {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-provider-dashboard div {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.65rem;
}

.ai-provider-dashboard span,
.ai-provider-models > span {
  color: var(--brand-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.ai-provider-dashboard strong {
  color: var(--brand-black);
  display: block;
  font-size: 0.92rem;
  font-weight: 850;
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
}

.ai-provider-models {
  display: grid;
  gap: 0.5rem;
}

.ai-provider-models ul {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-provider-models li {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  display: grid;
  gap: 0.18rem;
  font-size: 0.82rem;
  font-weight: 760;
  padding: 0.55rem 0.65rem;
}

.ai-provider-models li strong,
.ai-provider-models li small,
.ai-provider-models li em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-provider-models li small,
.ai-provider-models li em {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 720;
}

.ai-provider-other-models {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.75rem;
}

.ai-provider-other-models > summary {
  color: var(--brand-black);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 850;
}

.ai-provider-other-models ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.ai-provider-other-models li {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-black);
  font-size: 0.78rem;
  font-weight: 760;
  padding: 0.28rem 0.5rem;
}

.ai-provider-diagnostics {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.75rem;
}

.ai-provider-diagnostics > summary {
  color: var(--brand-black);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 850;
}

.ai-provider-diagnostics dl {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.ai-provider-diagnostics dl div {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 110px minmax(0, 1fr);
}

.ai-provider-diagnostics dt {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.ai-provider-diagnostics dd {
  color: var(--brand-black);
  font-size: 0.82rem;
  font-weight: 760;
  margin: 0;
  overflow-wrap: anywhere;
}

.ai-provider-actions {
  margin-top: 0;
}

.ai-provider-health {
  background: rgba(55, 160, 110, 0.08);
  border: 1px solid rgba(55, 160, 110, 0.28);
  border-radius: 8px;
  color: var(--brand-black);
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
}

.ai-provider-health strong {
  color: #166b45;
  font-weight: 850;
}

.ai-provider-health span {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.ai-provider-health ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-provider-health li {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
  padding: 0.28rem 0.5rem;
}

.ai-provider-more {
  margin-top: 1rem;
}

.ai-provider-more > summary,
.ai-provider-history > summary {
  color: var(--brand-black);
  cursor: pointer;
  font-weight: 850;
}

.ai-provider-more[open] > summary {
  border-bottom: 1px solid var(--brand-line);
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
}

.ai-provider-history {
  border-top: 1px solid var(--brand-line);
  padding-top: 0.75rem;
}

.ai-provider-history ol {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.ai-provider-history li {
  align-items: baseline;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.ai-provider-history time,
.ai-provider-history em {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 760;
}

.ai-provider-history span {
  color: var(--brand-black);
  font-weight: 760;
}

.settings-actions {
  align-items: center;
  border-top: 1px solid var(--brand-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.2rem;
}

.settings-action-note {
  color: var(--brand-muted);
  font-size: 0.9rem;
}

.schedule-panel {
  max-width: 1180px;
}

.schedule-table td:first-child {
  min-width: 240px;
}

.schedule-table td strong,
.schedule-table td small {
  display: block;
}

.schedule-table td small {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 0.18rem;
  max-width: 420px;
}

.schedule-table form {
  margin: 0;
}

.ai-studio-layout,
.ai-detail-layout {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
}

.ai-studio-main,
.ai-detail-main {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.ai-strategy-form-card {
  align-self: start;
  position: sticky;
  top: 156px;
}

.ai-form-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-standard-params {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-expert-settings {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.85rem;
}

.ai-expert-settings summary {
  color: var(--brand-black);
  cursor: pointer;
  font-weight: 840;
}

.ai-expert-settings[open] summary {
  border-bottom: 1px solid var(--brand-line);
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
}

.prompt-textarea {
  min-height: 170px;
}

.code-textarea,
.prompt-read-grid pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
}

.code-textarea {
  min-height: 126px;
}

.ai-strategy-hero p {
  color: var(--brand-muted);
  line-height: 1.55;
  margin: 0.85rem 0 0;
  max-width: 820px;
}

.prompt-read-grid {
  display: grid;
  gap: 1rem;
}

.prompt-read-grid > div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.5rem;
  padding: 0.95rem;
}

.prompt-read-grid span {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prompt-read-grid pre {
  color: var(--brand-black);
  line-height: 1.5;
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.version-list {
  display: grid;
  gap: 0.75rem;
}

.ai-ide-header {
  align-items: end;
  border-bottom: 1px solid var(--brand-line);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  margin-bottom: 1rem;
  padding-bottom: 1.25rem;
}

.ai-ide-header h1 {
  color: var(--brand-black);
  font-size: clamp(2rem, 3vw, 3.3rem);
  font-weight: 860;
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0.2rem 0 0;
}

.ai-ide-header p {
  color: var(--brand-muted);
  line-height: 1.55;
  margin: 0.8rem 0 0;
  max-width: 820px;
}

.ai-ide-status {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.ai-ide-status div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.75rem;
}

.ai-ide-status dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.ai-ide-status dd {
  color: var(--brand-black);
  font-weight: 820;
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}

.ai-ide-tabs {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
}

.ai-ide-tabs a {
  align-items: center;
  border-radius: 6px;
  color: var(--brand-muted);
  display: inline-flex;
  font-weight: 820;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.ai-ide-tabs a.active {
  background: var(--brand-black);
  color: #fff;
}

.ai-ide-shell,
.ai-test-layout {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.ai-ide-main,
.ai-ide-sidebar {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.ai-ide-sidebar {
  position: sticky;
  top: 156px;
}

.ai-ide-fields {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.markdown-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  min-height: 180px;
  resize: vertical;
}

.ai-variable-list {
  display: grid;
  gap: 0.7rem;
}

.ai-variable-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.85rem;
}

.ai-variable-card > i {
  color: var(--brand-black);
  margin-top: 0.12rem;
}

.ai-variable-card strong {
  color: var(--brand-black);
  display: block;
  font-size: 0.95rem;
  font-weight: 840;
}

.ai-variable-card p {
  color: var(--brand-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0.18rem 0 0.65rem;
}

.ai-variable-card button {
  background: var(--brand-black);
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 820;
  min-height: 34px;
  padding: 0.4rem 0.65rem;
}

.ai-test-form {
  align-items: end;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ai-test-run {
  margin: 1rem 0;
}

.ai-debug-panel {
  margin-top: 1.25rem;
}

.ai-debug-panel summary {
  align-items: center;
  color: var(--brand-black);
  cursor: pointer;
  display: flex;
  font-weight: 840;
  gap: 0.5rem;
  list-style: none;
}

.ai-debug-panel summary::-webkit-details-marker {
  display: none;
}

.ai-debug-panel[open] summary {
  border-bottom: 1px solid var(--brand-line);
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
}

.version-timeline {
  display: grid;
  gap: 0;
  position: relative;
}

.version-timeline::before {
  background: var(--brand-line);
  bottom: 0.8rem;
  content: "";
  left: 0.75rem;
  position: absolute;
  top: 0.8rem;
  width: 2px;
}

.version-timeline-item {
  display: grid;
  gap: 0.7rem;
  padding: 0 0 1.1rem 2.1rem;
  position: relative;
}

.version-timeline-item::before {
  background: var(--brand-black);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--brand-line);
  content: "";
  height: 1rem;
  left: 0.28rem;
  position: absolute;
  top: 0.18rem;
  width: 1rem;
}

.version-timeline-item .version-item-header {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.9rem;
}

.version-timeline-item p {
  color: var(--brand-muted);
  line-height: 1.45;
  margin: 0;
}

.ai-playground-layout {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(280px, 380px);
}

.ai-playground-control,
.ai-playground-response {
  align-self: start;
  position: sticky;
  top: 156px;
}

.ai-playground-params {
  border-top: 1px solid var(--brand-line);
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.ai-playground-params dl,
.ai-playground-metrics {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.ai-playground-params dl div,
.ai-playground-metrics div {
  align-items: baseline;
  border-bottom: 1px solid var(--brand-line);
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding-bottom: 0.55rem;
}

.ai-playground-params dt,
.ai-playground-metrics dt {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-playground-params dd,
.ai-playground-metrics dd {
  color: var(--brand-black);
  font-weight: 800;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.ai-response-body,
.ai-raw-json {
  margin-top: 1rem;
}

.ai-response-body pre,
.ai-raw-json pre {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 0.9rem;
  white-space: pre-wrap;
}

.ai-raw-json summary {
  color: var(--brand-muted);
  cursor: pointer;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.ai-result-section,
.ai-provider-comparison {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.ai-result-grid,
.ai-comparison-cards {
  display: grid;
  gap: 1rem;
}

.ai-result-card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.ai-result-card-header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ai-result-card-header span {
  color: var(--brand-muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-result-card-header h4 {
  color: var(--brand-black);
  font-size: 1.08rem;
  line-height: 1.25;
  margin: 0.2rem 0 0;
}

.ai-result-card-header strong {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.75);
  border-radius: 8px;
  color: var(--brand-black);
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 900;
  justify-content: center;
  min-width: 54px;
  padding: 0.45rem 0.6rem;
}

.ai-result-meta {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0;
}

.ai-result-meta div {
  background: var(--brand-surface);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.ai-result-meta dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-result-meta dd {
  color: var(--brand-black);
  font-weight: 800;
  margin: 0.12rem 0 0;
  overflow-wrap: anywhere;
}

.ai-result-card > p,
.ai-result-reason p {
  color: var(--brand-muted);
  line-height: 1.55;
  margin: 0;
}

.ai-result-reason {
  border-left: 3px solid var(--brand-gold);
  padding-left: 0.85rem;
}

.ai-result-reason span {
  color: var(--brand-black);
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.ai-test-history {
  border-top: 1px solid var(--brand-line);
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.ai-test-history h3 {
  font-size: 0.95rem;
  margin: 0;
}

.ai-test-history ol {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-test-history li {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}

.ai-test-history strong,
.ai-test-history span,
.ai-test-history small {
  overflow-wrap: anywhere;
}

.ai-test-history small {
  color: var(--brand-muted);
}

.ai-playground-history {
  margin-top: 1.25rem;
}

.ai-history-preview {
  max-width: 380px;
  overflow-wrap: anywhere;
}

.version-item {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
}

.version-item-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.version-item-header > div {
  display: grid;
  gap: 0.18rem;
}

.version-item-header strong {
  color: var(--brand-black);
  font-size: 0.98rem;
  font-weight: 820;
}

.version-item-header span {
  color: var(--brand-muted);
  font-size: 0.84rem;
}

.version-item p {
  color: var(--brand-muted);
  line-height: 1.45;
  margin: 0;
}

.production-drawer {
  background: linear-gradient(180deg, #fff, var(--brand-card));
  border-left: 1px solid rgba(232, 228, 219, 0.9);
  box-shadow: -24px 0 60px rgba(13, 13, 13, 0.14);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  max-width: min(460px, 100vw);
  padding: 1.45rem;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(100%);
  transition: transform 150ms ease;
  width: 460px;
  z-index: 50;
}

.production-drawer:not(.secondary-drawer) {
  max-width: min(640px, 100vw);
  padding: 32px;
  width: 640px;
}

.production-drawer.is-open {
  transform: translateX(0);
}

.production-drawer-header {
  align-items: flex-start;
  display: flex;
  flex: 0 0 auto;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.production-drawer:not(.secondary-drawer) .production-drawer-header {
  margin-bottom: 1.35rem;
}

.production-drawer-header h2 {
  color: var(--brand-black);
  font-size: 1.45rem;
  font-weight: 780;
  line-height: 1.12;
  margin: 0.3rem 0 0;
}

.production-drawer:not(.secondary-drawer) .production-drawer-header h2 {
  font-size: 1.35rem;
  margin-top: 0.18rem;
}

.production-drawer-header p {
  color: var(--brand-muted);
  line-height: 1.45;
  margin: 0.45rem 0 0;
}

.production-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.drawer-content {
  display: grid;
  flex: 1 1 auto;
  gap: 1.15rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.production-drawer:not(.secondary-drawer) .drawer-content {
  align-content: start;
  gap: 22px;
  padding: 0 0.2rem 1rem 0;
}

.drawer-progress-area[hidden] {
  display: none;
}

.drawer-progress-area {
  background: linear-gradient(180deg, rgba(250, 249, 246, 0), var(--brand-card) 22%);
  flex: 0 0 auto;
  padding: 0.9rem 0.1rem 0;
}

.remote-import-observability {
  display: grid;
  gap: var(--ff-space-3);
  margin-top: var(--ff-space-3);
}

.remote-import-observability[hidden] {
  display: none;
}

.remote-import-metrics {
  display: grid;
  gap: var(--ff-space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.remote-import-metrics > div {
  background: var(--ff-panel-bg, rgba(255, 255, 255, 0.72));
  border: 1px solid var(--ff-border-subtle, rgba(232, 228, 219, 0.86));
  border-radius: var(--ff-radius-sm, 8px);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: var(--ff-space-2) var(--ff-space-3);
}

.remote-import-metrics dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 720;
  margin: 0;
}

.remote-import-metrics dd {
  color: var(--brand-black);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.remote-import-activity,
.remote-import-stale-warning {
  border-radius: var(--ff-radius-sm, 8px);
  color: var(--brand-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
}

.remote-import-stale-warning {
  background: rgba(255, 214, 102, 0.18);
  border: 1px solid rgba(214, 165, 0, 0.28);
  color: #7a5a00;
  padding: var(--ff-space-2) var(--ff-space-3);
}

.remote-import-stale-warning.is-error {
  background: rgba(197, 48, 48, 0.1);
  border-color: rgba(197, 48, 48, 0.24);
  color: var(--status-red);
}

.remote-import-technical {
  border: 1px solid var(--ff-border-subtle, rgba(232, 228, 219, 0.86));
  border-radius: var(--ff-radius-sm, 8px);
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.remote-import-technical summary {
  align-items: center;
  color: var(--brand-black);
  cursor: pointer;
  display: flex;
  font-size: 0.88rem;
  font-weight: 780;
  justify-content: space-between;
  list-style: none;
  padding: var(--ff-space-3);
}

.remote-import-technical summary::-webkit-details-marker {
  display: none;
}

.remote-import-technical summary:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(255, 216, 77, 0.32);
  outline: 0;
}

.remote-import-technical summary svg {
  color: var(--brand-muted);
  height: 17px;
  transition: transform 150ms ease;
  width: 17px;
}

.remote-import-technical[open] summary svg {
  transform: rotate(180deg);
}

.remote-import-technical-panel {
  border-top: 1px solid rgba(232, 228, 219, 0.72);
  display: grid;
  gap: var(--ff-space-4);
  padding: var(--ff-space-3);
}

.remote-import-technical-panel section {
  display: grid;
  gap: var(--ff-space-2);
  min-width: 0;
}

.remote-import-technical-panel h4 {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.remote-import-technical-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.remote-import-technical-list > div {
  display: grid;
  gap: 0.2rem;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  min-width: 0;
}

.remote-import-technical-list dt {
  color: var(--brand-muted);
  font-size: 0.75rem;
  font-weight: 720;
}

.remote-import-technical-list dd {
  color: var(--brand-black);
  font-size: 0.78rem;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.remote-import-attempts {
  display: grid;
  gap: 0.35rem;
}

.remote-import-attempt-row {
  align-items: center;
  border: 1px solid rgba(232, 228, 219, 0.74);
  border-radius: var(--ff-radius-sm, 8px);
  display: grid;
  gap: 0.45rem;
  grid-template-columns: auto minmax(74px, 0.8fr) minmax(0, 1fr) auto auto;
  min-width: 0;
  padding: 0.48rem 0.55rem;
}

.remote-import-attempt-row.is-current {
  background: rgba(255, 216, 77, 0.14);
  border-color: rgba(255, 216, 77, 0.54);
}

.remote-import-attempt-row__status {
  background: var(--brand-muted);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.remote-import-attempt-row.is-current .remote-import-attempt-row__status {
  background: var(--brand-gold);
}

.remote-import-attempt-row strong,
.remote-import-attempt-row span {
  font-size: 0.75rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.remote-import-attempt-row strong {
  color: var(--brand-black);
}

.production-drawer.is-file-dialog-open .drawer-content {
  overflow: hidden;
}

.production-drawer.is-file-dialog-open .drawer-content,
.production-drawer.is-file-dialog-open .drawer-progress-area,
.production-drawer.is-file-dialog-open .drawer-actions {
  filter: saturate(0.9);
  opacity: 0.64;
  pointer-events: none;
}

.production-drawer.is-file-dialog-open .import-source-card {
  transform: none;
  transition: none;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.production-drawer:not(.secondary-drawer) .form-field {
  gap: 0.5rem;
}

.form-field label {
  color: var(--brand-black);
  font-size: 0.88rem;
  font-weight: 760;
}

.production-drawer:not(.secondary-drawer) .form-field label {
  font-size: 0.84rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  appearance: none;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  color: var(--brand-black);
  font: inherit;
  padding: 0 0.9rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field input,
.form-field select {
  min-height: 46px;
}

.production-drawer:not(.secondary-drawer) .form-field input,
.production-drawer:not(.secondary-drawer) .form-field select {
  border-radius: 10px;
  min-height: 42px;
}

.production-drawer:not(.secondary-drawer) .form-field input {
  line-height: 42px;
}

.form-field textarea {
  line-height: 1.45;
  min-height: 108px;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2368707d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 0.9rem center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  padding-right: 2.65rem;
}

.form-field select:invalid {
  color: var(--brand-muted);
}

.form-field optgroup,
.form-field option {
  color: var(--brand-black);
}

.form-field optgroup {
  font-weight: 800;
}

.workflow-native-select {
  display: none;
}

.production-drawer:not(.secondary-drawer) .workflow-native-select {
  display: block;
}

.production-drawer:not(.secondary-drawer) .workflow-selector {
  display: none;
}

.workflow-selector {
  position: relative;
}

.workflow-selector-trigger {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  color: var(--brand-black);
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 0.95rem 0 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.workflow-selector-trigger:focus,
.workflow-selector.is-open .workflow-selector-trigger {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.18);
  outline: 0;
}

.workflow-selector-trigger > svg {
  color: var(--brand-muted);
  height: 18px;
  width: 18px;
}

.workflow-selected {
  align-items: center;
  display: inline-flex;
  gap: 0.72rem;
  min-width: 0;
}

.workflow-selected svg {
  color: var(--brand-black);
  height: 18px;
  width: 18px;
}

.workflow-placeholder {
  color: var(--brand-muted);
}

.workflow-menu {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.95);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(13, 13, 13, 0.12);
  display: grid;
  gap: 0.16rem;
  left: 0;
  margin-top: 0.55rem;
  padding: 0.8rem;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 60;
}

.workflow-menu[hidden] {
  display: none;
}

.workflow-group-heading {
  align-items: center;
  color: var(--brand-muted);
  display: flex;
  font-size: 0.68rem;
  font-weight: 840;
  gap: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.36rem 0.32rem 0.42rem;
  text-transform: uppercase;
}

.workflow-group-heading:not(:first-child) {
  margin-top: 0.7rem;
}

.workflow-group-heading::before,
.workflow-group-heading::after {
  background: var(--brand-line);
  content: "";
  flex: 1;
  height: 1px;
}

.workflow-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: var(--brand-black);
  display: flex;
  font: inherit;
  font-weight: 690;
  gap: 0.72rem;
  min-height: 42px;
  padding: 0.56rem 0.72rem;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
  width: 100%;
}

.workflow-option:hover,
.workflow-option:focus {
  background: var(--brand-card);
  color: var(--brand-black);
  outline: 0;
}

.workflow-option svg {
  color: var(--brand-muted);
  height: 18px;
  width: 18px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.2);
  outline: 0;
}

.btn-brand:disabled,
.btn-brand:disabled:hover,
.btn-brand-secondary:disabled,
.btn-brand-secondary:disabled:hover,
.btn-primary:disabled,
.btn-primary:disabled:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  box-shadow: none;
  color: var(--brand-black);
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.drawer-info {
  align-items: flex-start;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.8);
  border-radius: 14px;
  color: var(--brand-black);
  display: flex;
  gap: 0.65rem;
  line-height: 1.45;
  padding: 0.9rem;
}

.drawer-info.is-error {
  background: #fff1f0;
  border-color: rgba(194, 65, 59, 0.26);
  color: #8d2823;
}

.drawer-info.is-success {
  background: #edfdf5;
  border-color: rgba(22, 131, 79, 0.22);
  color: var(--status-green);
}

.drawer-info svg {
  color: #7c6400;
  flex: 0 0 auto;
  height: 18px;
  margin-top: 0.1rem;
  width: 18px;
}

.drawer-info.is-error svg {
  color: var(--status-red);
}

.drawer-info.is-success svg {
  color: var(--status-green);
}

.drawer-actions {
  align-items: center;
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.88), var(--brand-card));
  border-top: 1px solid rgba(232, 228, 219, 0.86);
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  justify-content: flex-end;
  margin: 1rem -0.1rem 0;
  padding: 1rem 0.1rem 0;
}

.production-drawer:not(.secondary-drawer) .drawer-actions {
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.88), var(--brand-card) 34%);
  bottom: 0;
  margin: auto -0.2rem 0;
  padding: 1rem 0.2rem 0;
  position: sticky;
}

.production-drawer[data-import-drawer] .drawer-actions {
  background: var(--brand-card);
  border-top: 1px solid rgba(232, 228, 219, 0.86);
  flex: 0 0 auto;
  margin: 0;
  padding: 1rem 1.45rem 1.15rem;
  position: static;
  z-index: auto;
}

.production-drawer[data-import-drawer] {
  padding: 0;
}

.production-drawer[data-import-drawer] .production-drawer-header {
  border-bottom: 1px solid rgba(232, 228, 219, 0.86);
  margin: 0;
  padding: 1.45rem 1.45rem 1rem;
}

.production-drawer[data-import-drawer] .production-form {
  overflow: hidden;
}

.production-drawer[data-import-drawer] .drawer-content {
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.45rem 1.5rem;
}

.production-drawer[data-import-drawer] .drawer-actions > [hidden] {
  display: none !important;
}

.production-drawer[data-import-drawer] .drawer-actions > button,
.production-drawer[data-import-drawer] .drawer-actions > label {
  justify-content: center;
  min-width: 0;
  white-space: normal;
}

.production-drawer[data-import-drawer] .drawer-actions > :only-child {
  width: 100%;
}

.import-step-header {
  display: grid;
  gap: 0.25rem;
}

.import-step-header h3 {
  color: var(--brand-black);
  font-size: 1.02rem;
  font-weight: 780;
  line-height: 1.25;
  margin: 0;
}

.import-source-grid {
  display: grid;
  gap: 0.75rem;
}

.remote-import-form {
  display: grid;
  gap: 0.75rem;
}

.remote-import-credentials {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-resolver-result {
  display: grid;
}

.media-resolver-result[hidden] {
  display: none;
}

.media-resolution-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: var(--ff-radius-lg);
  display: grid;
  gap: var(--ff-space-3);
  padding: var(--ff-space-4);
}

.media-resolution-summary {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: 112px minmax(0, 1fr);
}

.media-resolution-summary img {
  aspect-ratio: 16 / 9;
  border-radius: var(--ff-radius-md);
  object-fit: cover;
  width: 100%;
}

.media-resolution-summary h3 {
  color: var(--ff-color-text);
  font-size: 0.98rem;
  line-height: 1.22;
  margin: var(--ff-space-2) 0 var(--ff-space-1);
}

.media-resolution-summary p {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  color: var(--ff-color-text-muted);
  display: -webkit-box;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
}

.media-resolution-summary small {
  color: var(--ff-color-text-muted);
  display: block;
  font-size: 0.78rem;
  margin-top: var(--ff-space-2);
}

.media-resolution-resolver {
  color: var(--ff-color-text-muted);
  display: block;
  font-size: 0.78rem;
  margin-top: var(--ff-space-1);
}

.media-variant-section {
  display: grid;
  gap: var(--ff-space-3);
}

.media-variant-section-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  justify-content: space-between;
}

.media-variant-section-header > strong {
  color: var(--ff-color-text);
  font-size: 0.88rem;
  font-weight: 820;
}

.media-variant-toggle {
  min-height: 30px;
  padding: 0 var(--ff-space-3);
}

.media-variant-list {
  display: grid;
  gap: var(--ff-space-2);
}

.media-variant-group {
  display: grid;
  gap: var(--ff-space-2);
}

.media-variant-group + .media-variant-group {
  margin-top: var(--ff-space-2);
}

.media-variant-group h4 {
  color: var(--ff-color-text-muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.media-variant-group__list {
  display: grid;
  gap: var(--ff-space-2);
}

.media-variant-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(232, 228, 219, 0.8);
  border-radius: var(--ff-radius-lg);
  color: var(--ff-color-text);
  cursor: pointer;
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--ff-space-3);
  transition: background var(--ff-transition-base), border-color var(--ff-transition-base), box-shadow var(--ff-transition-base);
}

.media-variant-card:hover {
  background: #fff;
  border-color: rgba(214, 169, 0, 0.32);
}

.media-variant-card:focus-visible {
  box-shadow: var(--ff-focus-ring);
  outline: 0;
}

.media-variant-card--selected {
  background: rgba(255, 248, 222, 0.78);
  border-color: rgba(214, 169, 0, 0.58);
  box-shadow: 0 10px 24px rgba(31, 29, 24, 0.045);
}

.media-variant-card--extra {
  display: none;
}

.media-variant-list--expanded .media-variant-card--extra {
  display: grid;
}

.media-variant-card__input {
  accent-color: var(--ff-color-accent);
  height: 1rem;
  margin: 0.15rem 0 0;
  width: 1rem;
}

.media-variant-card__body,
.media-variant-card__header {
  min-width: 0;
}

.media-variant-card__body {
  display: grid;
  gap: 0.28rem;
}

.media-variant-card__header {
  align-items: center;
  display: flex;
  gap: var(--ff-space-2);
  justify-content: space-between;
}

.media-variant-card__title {
  color: var(--ff-color-text);
  font-size: 0.92rem;
  font-weight: 820;
}

.media-variant-card__badge {
  background: var(--ff-color-accent-soft);
  border: 1px solid rgba(214, 169, 0, 0.3);
  border-radius: var(--ff-radius-pill);
  color: #6f5200;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  padding: 0.28rem 0.45rem;
  text-transform: uppercase;
}

.media-variant-card__badges {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: var(--ff-space-1);
  justify-content: flex-end;
}

.media-variant-card__badge--source {
  background: rgba(246, 244, 238, 0.9);
  border-color: rgba(31, 29, 24, 0.08);
  color: var(--ff-color-text-muted);
}

.media-variant-card__meta {
  color: var(--ff-color-text-muted);
  font-size: 0.82rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.media-variant-card__size {
  color: var(--ff-color-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.media-variant-card__details {
  color: var(--ff-color-text-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.import-source-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.92);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(13, 13, 13, 0.03);
  color: var(--brand-black);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.92rem;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  width: 100%;
}

.import-source-card.has-file-selected {
  border-color: rgba(22, 131, 79, 0.34);
  box-shadow: 0 12px 30px rgba(13, 13, 13, 0.045), 0 0 0 1px rgba(22, 131, 79, 0.08);
  position: relative;
}

.import-source-card.is-recommended {
  border-color: rgba(214, 169, 0, 0.46);
  box-shadow: 0 12px 28px rgba(13, 13, 13, 0.045), 0 0 0 1px rgba(255, 216, 77, 0.12);
}

.import-source-card:not(.is-future):hover,
.import-source-card:not(.is-future):focus {
  background: #fffdf4;
  border-color: rgba(255, 216, 77, 0.72);
  box-shadow: 0 14px 32px rgba(13, 13, 13, 0.055);
  outline: 0;
  transform: translateY(-1px);
}

.import-source-card.is-selected {
  background: #fffdf4;
  border-color: rgba(214, 169, 0, 0.64);
  box-shadow: 0 14px 34px rgba(13, 13, 13, 0.06), 0 0 0 1px rgba(255, 216, 77, 0.18);
}

.import-source-card.is-future {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.54;
}

.import-source-card.is-future:hover,
.import-source-card.is-future:focus {
  background: #fff;
  border-color: rgba(232, 228, 219, 0.92);
  box-shadow: none;
  outline: 0;
  transform: none;
}

.import-source-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.78);
  border-radius: 8px;
  color: #7c6400;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.import-source-icon svg {
  height: 21px;
  width: 21px;
}

.import-source-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.import-source-copy strong {
  color: var(--brand-black);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.22;
}

.import-source-copy span {
  color: var(--brand-muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.import-source-copy small {
  color: #77715f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.connector-provider-list {
  align-items: start;
  display: grid;
  gap: 0.42rem;
  margin-top: 0.28rem;
  min-width: 0;
}

.connector-provider-list__label {
  color: #77715f;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.connector-provider-list__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  min-width: 0;
}

.connector-provider-badge {
  align-items: center;
  background: #f5f1e6;
  border: 1px solid rgba(43, 43, 39, 0.08);
  border-radius: 999px;
  color: var(--brand-black);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  min-height: 1.35rem;
  max-width: 100%;
  padding: 0.22rem 0.52rem;
  white-space: nowrap;
}

.connector-provider-badge.is-unavailable {
  color: var(--brand-muted);
  opacity: 0.72;
}

.import-file-input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.import-file-action[hidden] {
  display: none;
}

.import-file-action {
  cursor: pointer;
}

.import-file-action.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
  pointer-events: none;
}

.import-file-card-meta[hidden],
.import-file-selected-status[hidden],
.import-selected-badge[hidden] {
  display: none;
}

.import-file-card-meta {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.42rem 0 0;
}

.import-file-card-meta div {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.48rem 0.52rem;
}

.import-file-card-meta div[data-file-card-mime-row] {
  grid-column: 1 / -1;
}

.import-file-card-meta dt {
  color: var(--brand-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 0.18rem;
  text-transform: uppercase;
}

.import-file-card-meta dd {
  color: var(--brand-black);
  font-size: 0.82rem;
  font-weight: 740;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.import-file-selected-status {
  color: var(--status-green);
  margin-top: 0.36rem;
}

.import-selected-badge {
  align-self: start;
  background: #edfdf5;
  border: 1px solid rgba(22, 131, 79, 0.22);
  border-radius: 999px;
  color: var(--status-green);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.28rem 0.46rem;
  white-space: nowrap;
}

.creater-progress[hidden] {
  display: none;
}

.creater-progress {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.92);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(13, 13, 13, 0.045);
  display: grid;
  gap: 0.72rem;
  padding: 0.95rem;
  width: 100%;
}

.creater-progress-header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.creater-progress-header h3 {
  color: var(--brand-black);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

.creater-progress-header strong {
  color: var(--brand-black);
  font-size: 0.92rem;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.creater-progress-header strong[hidden] {
  display: none;
}

.creater-progress-track {
  background: #f0ede4;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  width: 100%;
}

.creater-progress-track span {
  background: linear-gradient(90deg, var(--brand-gold-strong), var(--brand-gold));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 240ms ease;
  width: 0;
}

.creater-progress[data-progress-mode="indeterminate"] .creater-progress-track span {
  animation: creater-progress-indeterminate 1.12s ease-in-out infinite;
  width: 42%;
}

.creater-progress p {
  color: var(--brand-ink);
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.4;
  margin: 0;
}

.creater-progress > span {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.creater-progress > span[hidden] {
  display: none;
}

.creater-progress[data-progress-state="FAILED"] {
  background: #fff8f7;
  border-color: rgba(194, 65, 59, 0.28);
  box-shadow: 0 12px 30px rgba(194, 65, 59, 0.08);
}

.creater-progress[data-progress-state="FAILED"] .creater-progress-track span {
  animation: none;
  background: var(--status-red);
  width: 100%;
}

.creater-progress[data-progress-state="FAILED"] .creater-progress-header h3,
.creater-progress[data-progress-state="FAILED"] .creater-progress-header strong,
.creater-progress[data-progress-state="FAILED"] p {
  color: var(--status-red);
}

.workflow-runner {
  display: grid;
  gap: 1rem;
}

.workflow-progress {
  box-shadow: 0 10px 24px rgba(13, 13, 13, 0.04);
}

.workflow-step-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-step {
  align-items: center;
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: 8px;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.78rem 0.86rem;
}

.workflow-step-icon {
  align-items: center;
  background: #f5f2ea;
  border-radius: 999px;
  color: var(--brand-muted);
  display: inline-flex;
  height: 1.8rem;
  justify-content: center;
  width: 1.8rem;
}

.workflow-step-icon svg {
  height: 1rem;
  width: 1rem;
}

.workflow-step strong {
  color: var(--brand-black);
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
}

.workflow-step small {
  color: var(--brand-muted);
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 0.16rem;
}

.workflow-step em {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.workflow-step.is-running {
  border-color: rgba(191, 151, 77, 0.42);
  box-shadow: 0 8px 20px rgba(191, 151, 77, 0.08);
}

.workflow-step.is-running .workflow-step-icon {
  background: #fff4d8;
  color: var(--brand-gold-strong);
}

.workflow-step.is-running em {
  color: var(--brand-gold-strong);
}

.workflow-step.is-completed .workflow-step-icon {
  background: #edfdf5;
  color: var(--status-green);
}

.workflow-step.is-completed em {
  color: var(--status-green);
}

.workflow-step.is-no_result .workflow-step-icon,
.workflow-step.is-no_result em {
  color: var(--brand-muted);
}

.workflow-step.is-failed {
  border-color: rgba(194, 65, 59, 0.34);
  box-shadow: inset 3px 0 0 rgba(194, 65, 59, 0.84);
}

.workflow-step.is-failed .workflow-step-icon,
.workflow-step.is-failed em {
  color: var(--status-red);
}

.workflow-step.is-skipped .workflow-step-icon,
.workflow-step.is-skipped em {
  color: var(--brand-muted);
}

.workflow-actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes creater-progress-indeterminate {
  0% {
    margin-left: -44%;
  }

  100% {
    margin-left: 102%;
  }
}

@media (max-height: 820px) {
  .production-drawer {
    padding: 1.05rem;
  }

  .production-drawer-header {
    margin-bottom: 0.8rem;
  }

  .production-drawer-header h2 {
    font-size: 1.28rem;
    margin-top: 0.18rem;
  }

  .production-drawer-header p {
    font-size: 0.9rem;
    line-height: 1.34;
    margin-top: 0.32rem;
  }

  .drawer-content {
    gap: 0.75rem;
  }

  .drawer-progress-area {
    padding-top: 0.64rem;
  }

  .drawer-actions {
    margin-top: 0.72rem;
    padding-top: 0.72rem;
  }

  .import-step-header h3 {
    font-size: 0.98rem;
  }

  .import-source-grid {
    gap: 0.48rem;
  }

  .remote-import-credentials {
    grid-template-columns: 1fr;
  }

  .media-resolution-summary {
    grid-template-columns: 1fr;
  }

  .media-variant-card {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
    padding: var(--ff-space-3);
  }

  .media-variant-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-variant-card__badge {
    align-self: flex-start;
  }

  .remote-import-metrics {
    grid-template-columns: 1fr;
  }

  .remote-import-technical-list > div {
    grid-template-columns: 1fr;
  }

  .remote-import-attempt-row {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .import-source-card {
    gap: 0.62rem;
    padding: 0.68rem;
  }

  .import-source-icon {
    height: 36px;
    width: 36px;
  }

  .import-source-icon svg {
    height: 18px;
    width: 18px;
  }

  .import-source-copy {
    gap: 0.1rem;
  }

  .import-source-copy strong {
    font-size: 0.89rem;
  }

  .import-source-copy span {
    font-size: 0.8rem;
    line-height: 1.32;
  }

  .import-source-copy small {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .import-file-card-meta {
    gap: 0.34rem;
    margin-top: 0.34rem;
  }

  .import-file-card-meta div {
    padding: 0.4rem 0.46rem;
  }

  .import-selected-badge {
    font-size: 0.64rem;
    padding: 0.24rem 0.4rem;
  }

  .creater-progress {
    gap: 0.58rem;
    padding: 0.78rem;
  }

  .creater-progress-track {
    height: 8px;
  }

  .creater-progress-header h3 {
    font-size: 0.92rem;
  }

  .creater-progress p {
    font-size: 0.84rem;
  }

  .drawer-info {
    border-radius: 10px;
    font-size: 0.88rem;
    padding: 0.72rem;
  }
}

@media (max-height: 720px) {
  .production-drawer {
    padding: 0.82rem;
  }

  .production-drawer-header {
    margin-bottom: 0.62rem;
  }

  .production-drawer-header h2 {
    font-size: 1.18rem;
  }

  .production-drawer-header p {
    font-size: 0.84rem;
    line-height: 1.28;
  }

  .drawer-content {
    gap: 0.58rem;
  }

  .drawer-progress-area {
    padding-top: 0.5rem;
  }

  .drawer-actions {
    gap: 0.55rem;
    margin-top: 0.58rem;
    padding-top: 0.58rem;
  }

  .btn-brand,
  .btn-brand-secondary,
  .btn-primary,
  .btn-ghost,
  .btn-link,
  .btn-danger-subtle,
  .btn-danger,
  .btn-outline-danger,
  .btn-secondary,
  .btn-outline-secondary {
    min-height: 38px;
    padding: 0 0.9rem;
  }

  .import-source-grid {
    gap: 0.4rem;
  }

  .import-source-card {
    gap: 0.52rem;
    padding: 0.58rem;
  }

  .import-source-icon {
    height: 32px;
    width: 32px;
  }

  .import-source-icon svg {
    height: 16px;
    width: 16px;
  }

  .import-source-copy strong {
    font-size: 0.86rem;
  }

  .import-source-copy span {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .import-source-copy small {
    font-size: 0.68rem;
  }

  .import-file-card-meta {
    grid-template-columns: 1fr;
  }

  .import-file-card-meta div[data-file-card-mime-row] {
    grid-column: auto;
  }
}

.app-card,
.empty-state {
  background: linear-gradient(180deg, #fff, var(--brand-card));
  border: 1px solid rgba(232, 228, 219, 0.78);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(13, 13, 13, 0.035);
  padding: 1.35rem;
}

.app-card {
  height: 100%;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.app-card:hover {
  border-color: rgba(220, 214, 200, 0.88);
  box-shadow: 0 14px 36px rgba(13, 13, 13, 0.05);
  transform: translateY(-1px);
}

.app-card h2,
.empty-state h2 {
  color: var(--brand-black);
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.app-card p,
.empty-state p {
  color: var(--brand-muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.info-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.card-icon,
.empty-state-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.75);
  border-radius: 14px;
  color: #7c6400;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 46px;
}

.card-icon svg {
  height: 24px;
  width: 24px;
}

.card-title-row {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.card-title-row h2 {
  margin: 0;
}

.card-title-row svg {
  color: var(--brand-gold-strong);
  height: 20px;
  width: 20px;
}

.empty-state {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
}

.empty-state-large {
  align-items: center;
  background:
    radial-gradient(circle at top, rgba(255, 216, 77, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #fff, var(--brand-card));
  min-height: 480px;
  justify-content: center;
  padding: 5rem 1.5rem;
  text-align: center;
}

.empty-state-large p {
  font-size: 1.02rem;
  margin-bottom: 1.55rem;
  max-width: 560px;
}

.next-steps-preview {
  border-top: 1px solid rgba(232, 228, 219, 0.78);
  color: var(--brand-muted);
  margin-top: 1.9rem;
  max-width: 520px;
  padding-top: 1.1rem;
  width: 100%;
}

.next-steps-preview span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
}

.next-steps-preview ol {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.next-steps-preview li {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 999px;
  font-size: 0.88rem;
  line-height: 1;
  padding: 0.58rem 0.78rem;
}

.empty-state.compact {
  background: #fff;
  box-shadow: none;
  padding: 1rem;
}

.empty-state.compact h3 {
  color: var(--brand-black);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.home-continue-card {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 1.3rem;
}

.home-continue-card h2 {
  font-size: 1.72rem;
  line-height: 1.12;
  margin: 0.35rem 0 1rem;
}

.home-continue-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.home-continue-facts div {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 14px;
  min-width: 150px;
  padding: 0.72rem 0.82rem;
}

.home-continue-facts dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.26rem;
  text-transform: uppercase;
}

.home-continue-facts dd {
  color: var(--brand-black);
  font-size: 0.94rem;
  font-weight: 760;
  margin: 0;
}

.home-production-card {
  margin-top: 1.3rem;
}

.home-section-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  padding: 1.2rem 1.25rem 0;
}

.home-section-heading h2 {
  color: var(--brand-black);
  font-size: 1.08rem;
  font-weight: 780;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

.home-section-heading p {
  color: var(--brand-muted);
  margin: 0;
}

.studio-storage-card {
  margin-top: 1.3rem;
}

.storage-check {
  align-items: center;
  color: var(--brand-muted);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 720;
  gap: 0.42rem;
  white-space: nowrap;
}

.storage-check svg {
  height: 16px;
  width: 16px;
}

.storage-stat-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 1.1rem 1.25rem 1.25rem;
}

.storage-stat {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 8px;
  display: grid;
  gap: 0.28rem;
  min-height: 88px;
  padding: 0.9rem;
}

.storage-stat-primary {
  background: #fffdf4;
  border-color: rgba(255, 216, 77, 0.72);
}

.storage-stat span {
  color: var(--brand-muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.storage-stat strong {
  color: var(--brand-black);
  font-size: 1.24rem;
  font-weight: 820;
  line-height: 1.2;
}

.ai-cost-card {
  margin-top: 1.3rem;
}

.ai-cost-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 1.1rem 1.25rem 1.25rem;
}

.ai-cost-period {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 8px;
  padding: 0.95rem;
}

.ai-cost-period h3 {
  color: var(--brand-black);
  font-size: 0.98rem;
  font-weight: 820;
  margin: 0 0 0.7rem;
}

.ai-cost-period dl {
  display: grid;
  gap: 0.52rem;
  margin: 0;
}

.ai-cost-period dl div {
  align-items: baseline;
  display: flex;
  gap: 0.85rem;
  justify-content: space-between;
}

.ai-cost-period dt {
  color: var(--brand-muted);
  font-weight: 760;
}

.ai-cost-period dd {
  color: var(--brand-black);
  display: grid;
  gap: 0.12rem;
  font-weight: 820;
  margin: 0;
  text-align: right;
}

.ai-cost-period dd small,
.production-ai-cost-card dd small {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 760;
  white-space: nowrap;
}

.ai-cost-exchange-rate {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 760;
  margin: 0;
  padding: 0 1.25rem 1.1rem;
}

.ai-cost-total {
  border-top: 1px solid var(--brand-line);
  padding-top: 0.55rem;
}

.ai-cost-total dt,
.ai-cost-total dd {
  color: var(--brand-black);
  font-weight: 900;
}

.activity-section {
  margin-top: 1.55rem;
}

.activity-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.activity-item {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 8px;
  color: var(--brand-black);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 0.82rem 0.95rem;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.activity-item:hover {
  background: #fffdf4;
  border-color: rgba(255, 216, 77, 0.72);
  box-shadow: 0 12px 28px rgba(13, 13, 13, 0.045);
  color: var(--brand-black);
  transform: translateY(-1px);
}

.activity-icon {
  align-items: center;
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.activity-icon svg {
  height: 20px;
  width: 20px;
}

.activity-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.activity-copy strong {
  color: var(--brand-black);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.activity-copy span {
  color: var(--brand-muted);
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.activity-item time {
  color: var(--brand-muted);
  font-size: 0.84rem;
  font-weight: 740;
  white-space: nowrap;
}

.production-subpage-header {
  align-items: center;
  display: flex;
  margin-bottom: 1.25rem;
}

.desk-back-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--brand-muted);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 780;
  gap: 0.48rem;
  min-height: 36px;
  padding: 0.35rem 0.58rem;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.desk-back-link:hover,
.desk-back-link:focus {
  background: var(--brand-gold-soft);
  border-color: rgba(255, 216, 77, 0.78);
  color: var(--brand-black);
}

.desk-back-link svg {
  height: 17px;
  width: 17px;
}

.transcript-summary {
  display: grid;
  gap: 1.1rem;
}

.transcript-summary .btn-brand {
  justify-self: start;
}

.transcript-view {
  display: grid;
  gap: 1.25rem;
}

.transcript-text {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font-size: 1rem;
  line-height: 1.72;
  min-height: 280px;
  padding: 1.2rem;
  white-space: pre-wrap;
}

.transcript-segment-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.transcript-segment-list li {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 86px minmax(0, 1fr);
  padding: 0.9rem;
}

.transcript-segment-list time {
  color: var(--brand-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 760;
}

.transcript-segment-list strong {
  color: var(--brand-black);
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.24rem;
}

.transcript-segment-list p {
  color: var(--brand-black);
  line-height: 1.58;
  margin: 0;
}

.home-next-steps {
  margin-left: auto;
  margin-right: auto;
}

.cockpit-page {
  display: grid;
  gap: var(--ff-space-6);
}

.cockpit-header {
  align-items: center;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
  margin-bottom: 0;
}

.cockpit-header h1 {
  color: var(--ff-color-text);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.cockpit-header p,
.cockpit-date,
.cockpit-next-step,
.cockpit-section-heading p {
  color: var(--ff-color-text-muted);
}

.cockpit-date {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 640;
  margin-bottom: var(--ff-space-1);
}

.cockpit-header p {
  font-size: 0.98rem;
  line-height: 1.45;
  margin: var(--ff-space-1) 0 0;
}

.cockpit-focus {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.18), rgba(255, 255, 255, 0.92) 42%),
    var(--ff-color-surface);
  border: 1px solid rgba(216, 209, 196, 0.9);
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-sm);
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 210px;
  padding: clamp(var(--ff-space-6), 4vw, var(--ff-space-2));
}

.cockpit-focus-empty {
  background: var(--ff-color-surface);
}

.cockpit-focus-copy {
  min-width: 0;
}

.cockpit-kicker {
  color: var(--ff-color-accent);
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 720;
  margin-bottom: var(--ff-space-2);
}

.cockpit-focus-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-3);
}

.cockpit-focus h2 {
  color: var(--ff-color-text);
  font-size: clamp(2rem, 4vw, 3.45rem);
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  max-width: 980px;
  overflow-wrap: anywhere;
}

.cockpit-next-step {
  font-size: 1.02rem;
  line-height: 1.5;
  margin: var(--ff-space-3) 0 0;
}

.cockpit-focus-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-6);
  margin: var(--ff-space-6) 0 0;
}

.cockpit-focus-meta div {
  display: grid;
  gap: var(--ff-space-1);
}

.cockpit-focus-meta dt {
  color: var(--ff-color-text-muted);
  font-size: 0.76rem;
  font-weight: 680;
  margin: 0;
}

.cockpit-focus-meta dd {
  color: var(--ff-color-text);
  font-size: 0.95rem;
  font-weight: 620;
  margin: 0;
}

.cockpit-primary-action {
  align-self: end;
}

.cockpit-attention {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
  padding: var(--ff-space-3) var(--ff-space-4);
}

.cockpit-attention-main,
.cockpit-system-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-3);
  min-width: 0;
}

.cockpit-attention-main strong {
  color: var(--ff-color-text);
  font-size: 0.95rem;
  font-weight: 620;
}

.cockpit-system-line {
  color: var(--ff-color-text-muted);
  font-size: 0.86rem;
  justify-content: flex-end;
}

.cockpit-system-line span,
.cockpit-system-line a {
  color: var(--ff-color-text-muted);
  font-weight: 560;
  white-space: nowrap;
}

.cockpit-system-line a {
  text-decoration: none;
}

.cockpit-system-line a:hover {
  color: var(--ff-color-text);
}

.cockpit-main-grid {
  align-items: start;
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.cockpit-panel {
  background: transparent;
  border: 0;
  display: grid;
  gap: var(--ff-space-4);
  min-width: 0;
}

.cockpit-section-heading {
  align-items: flex-start;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
}

.cockpit-section-heading h2 {
  color: var(--ff-color-text);
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.2;
  margin: 0;
}

.cockpit-section-heading p {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: var(--ff-space-1) 0 0;
}

.cockpit-section-link {
  min-height: 32px;
  padding: 0 var(--ff-space-3);
}

.cockpit-row-list,
.cockpit-activity-list {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  display: grid;
  overflow: hidden;
}

.cockpit-production-row,
.cockpit-activity-row {
  align-items: center;
  border-bottom: 1px solid var(--ff-color-border);
  color: var(--ff-color-text);
  display: grid;
  gap: var(--ff-space-3);
  min-width: 0;
  padding: var(--ff-space-3) var(--ff-space-4);
  text-decoration: none;
  transition: background var(--ff-transition-base), color var(--ff-transition-base);
}

.cockpit-production-row:last-child,
.cockpit-activity-row:last-child {
  border-bottom: 0;
}

.cockpit-production-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cockpit-production-row:hover,
.cockpit-activity-row:hover {
  background: rgba(255, 216, 77, 0.08);
  color: var(--ff-color-text);
}

.cockpit-row-copy,
.cockpit-activity-copy {
  color: inherit;
  display: grid;
  gap: var(--ff-space-1);
  min-width: 0;
  text-decoration: none;
}

.cockpit-row-copy strong,
.cockpit-activity-copy strong {
  color: var(--ff-color-text);
  font-size: 0.96rem;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-row-copy span,
.cockpit-activity-copy span,
.cockpit-activity-row time {
  color: var(--ff-color-text-muted);
  font-size: 0.84rem;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.cockpit-row-status {
  align-items: center;
  display: flex;
  gap: var(--ff-space-2);
}

.cockpit-activity-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.cockpit-activity-icon {
  align-items: center;
  color: var(--ff-color-text-muted);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.cockpit-activity-icon svg {
  height: 17px;
  width: 17px;
}

.cockpit-empty-state {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-text-muted);
  display: grid;
  gap: var(--ff-space-1);
  padding: var(--ff-space-4);
}

.cockpit-empty-state strong {
  color: var(--ff-color-text);
  font-weight: 640;
}

.cockpit-operations {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-text);
}

.cockpit-operations summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 0.9rem;
  font-weight: 620;
  justify-content: space-between;
  list-style: none;
  padding: var(--ff-space-3) var(--ff-space-4);
}

.cockpit-operations summary::-webkit-details-marker {
  display: none;
}

.cockpit-operations summary svg {
  height: 16px;
  transition: transform var(--ff-transition-base);
  width: 16px;
}

.cockpit-operations[open] summary svg {
  transform: rotate(180deg);
}

.cockpit-operations-grid {
  border-top: 1px solid var(--ff-color-border);
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: var(--ff-space-4);
}

.cockpit-operations h2 {
  font-size: 0.96rem;
  font-weight: 680;
  margin: 0 0 var(--ff-space-3);
}

.cockpit-operations dl {
  display: grid;
  gap: var(--ff-space-2);
  margin: 0;
}

.cockpit-operations dl div {
  align-items: baseline;
  display: flex;
  gap: var(--ff-space-3);
  justify-content: space-between;
}

.cockpit-operations dt,
.cockpit-operations p {
  color: var(--ff-color-text-muted);
  margin: 0;
}

.cockpit-operations dd {
  color: var(--ff-color-text);
  font-weight: 620;
  margin: 0;
  text-align: right;
}

.cockpit-operations .ff-button-secondary {
  margin-top: var(--ff-space-4);
}

.status-chip {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  min-height: 26px;
  padding: 0 0.65rem;
}

.status-chip-green {
  background: #e4f5eb;
  color: var(--status-green);
}

.status-chip-yellow {
  background: #fff6cc;
  color: var(--status-yellow);
}

.status-chip-red {
  background: #fde8e7;
  color: var(--status-red);
}

.status-chip-blue {
  background: #e4f1f6;
  color: var(--status-blue);
}

.status-chip-neutral {
  background: #fff;
  border: 1px solid var(--brand-line);
  color: var(--brand-muted);
  margin: 0.25rem 0.25rem 0 0;
}

.system-grid > [class*="col-"] {
  display: flex;
}

.system-card {
  width: 100%;
}

.plugin-item-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.plugin-capability-primary {
  flex: 0 0 auto;
  margin: 0;
}

.plugin-capability-list {
  margin-top: 0.45rem;
}

.table-card {
  padding: 0;
}

.app-table {
  margin-bottom: 0;
}

.app-table thead th {
  background: #fff;
  border-bottom: 1px solid var(--brand-line);
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1rem;
  text-transform: uppercase;
}

.app-table tbody td {
  border-color: var(--brand-line);
  padding: 1rem;
}

.production-actions {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.delete-confirmation {
  background: #fff;
  border: 1px solid rgba(194, 65, 59, 0.2);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(13, 13, 13, 0.08);
  margin-left: auto;
  margin-top: 0.7rem;
  max-width: 320px;
  padding: 0.92rem;
  text-align: left;
}

.delete-confirmation strong {
  color: var(--brand-black);
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.delete-confirmation p {
  color: var(--brand-muted);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.delete-confirmation-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.app-list .list-group-item {
  background: transparent;
  border-color: var(--brand-line);
  padding: 1rem 0;
}

.app-list .list-group-item:first-child {
  padding-top: 0;
}

.app-list .list-group-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline {
  list-style: none;
  padding-left: 0;
}

.timeline li {
  border-left: 3px solid var(--brand-gold);
  margin-bottom: 1rem;
  padding-left: 1rem;
}

.timeline time {
  color: var(--brand-muted);
  display: block;
  font-size: 0.85rem;
}

.timeline pre {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  margin-top: 0.5rem;
  padding: 0.75rem;
  white-space: pre-wrap;
}

.desk-breadcrumb {
  align-items: center;
  color: var(--brand-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.desk-breadcrumb a {
  color: var(--brand-black);
  font-weight: 740;
  text-decoration: none;
}

.desk-breadcrumb strong {
  color: var(--brand-black);
  font-weight: 800;
}

.desk-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 216, 77, 0.17), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #fff, var(--brand-card));
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(13, 13, 13, 0.04);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 1.3rem;
  padding: 1.55rem;
}

.desk-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.35rem;
}

.desk-title-row h1 {
  color: var(--brand-black);
  font-size: 2.2rem;
  font-weight: 780;
  line-height: 1.08;
  margin: 0;
}

.desk-facts {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1.35rem 0 0;
}

.desk-facts div,
.desk-overview-grid div {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: 14px;
  padding: 0.78rem 0.86rem;
}

.desk-facts dt,
.desk-meta-list dt,
.desk-overview-grid span {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.28rem;
  text-transform: uppercase;
}

.desk-facts dd,
.desk-meta-list dd,
.desk-overview-grid strong {
  color: var(--brand-black);
  font-size: 0.95rem;
  font-weight: 760;
  margin: 0;
}

.desk-next-step {
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(13, 13, 13, 0.045);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem;
}

.desk-next-step span {
  color: var(--brand-muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-next-step strong {
  color: var(--brand-black);
  font-size: 1.35rem;
  font-weight: 780;
  line-height: 1.18;
}

.desk-next-step p {
  color: var(--brand-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.desk-progress-card {
  margin-bottom: 1.3rem;
}

.production-monitor {
  border-color: rgba(255, 216, 77, 0.9);
  box-shadow: 0 18px 42px rgba(101, 78, 0, 0.1);
  display: grid;
  gap: 1.15rem;
  margin-bottom: 1.3rem;
  scroll-margin-top: 1.2rem;
}

.production-monitor-compact {
  align-items: center;
  display: none;
  gap: 1rem;
  justify-content: space-between;
}

.production-monitor-compact strong {
  color: var(--brand-black);
  display: block;
  font-size: 1rem;
  margin-top: 0.2rem;
}

.production-monitor.is-production-mode .production-monitor-compact {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(360px, 2fr) auto;
  min-width: 0;
}

.production-monitor-content {
  display: grid;
  gap: 1.15rem;
}

.production-monitor.is-collapsed {
  border-color: var(--brand-line);
  box-shadow: none;
}

.production-monitor.is-collapsed .production-monitor-content {
  display: none;
}

.production-monitor[data-progress-state="RUNNING"] {
  border-color: rgba(191, 151, 77, 0.72);
}

.production-monitor[data-progress-state="FAILED"] {
  border-color: rgba(194, 65, 59, 0.32);
  box-shadow: 0 18px 42px rgba(194, 65, 59, 0.08);
}

.production-monitor-heading {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
}

.production-monitor-heading > div {
  min-width: 0;
}

.production-monitor-heading h2 {
  color: var(--brand-black);
  font-size: 1.65rem;
  line-height: 1.12;
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.production-monitor-heading p {
  color: var(--brand-ink);
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.45;
  margin: 0.5rem 0 0;
}

.production-monitor-heading > strong {
  color: var(--brand-black);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 880;
  line-height: 1;
  white-space: nowrap;
}

.production-monitor-heading-actions {
  align-items: flex-end;
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.production-monitor-heading-actions > strong {
  color: var(--brand-black);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 880;
  line-height: 1;
  white-space: nowrap;
}

.production-monitor-meta-toolbar {
  align-items: center;
  border-top: 1px solid rgba(232, 228, 219, 0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  margin-top: -0.4rem;
  padding-top: 0.7rem;
}

.production-monitor-meta-toolbar > span {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.production-monitor-expert-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: 999px;
  color: var(--brand-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 760;
  gap: 0.42rem;
  min-height: 30px;
  padding: 0 0.7rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.production-monitor-expert-toggle:hover,
.production-monitor-expert-toggle:focus-within {
  background: #fff;
  border-color: rgba(214, 169, 0, 0.48);
  box-shadow: 0 8px 20px rgba(31, 29, 24, 0.07);
  color: var(--brand-black);
}

.production-monitor-expert-toggle input {
  accent-color: var(--brand-gold);
  margin: 0;
}

.production-monitor-bar {
  background: #f0ede4;
  border-radius: 999px;
  height: 16px;
  overflow: hidden;
}

.production-monitor-bar span {
  background: linear-gradient(90deg, var(--brand-gold-strong), var(--brand-gold));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 240ms ease;
}

.production-monitor[data-progress-state="FAILED"] .production-monitor-bar span {
  background: var(--status-red);
}

.production-monitor-live {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
}

.production-monitor-live dl {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0;
}

.production-monitor-live dt,
.workflow-step-live-progress dt {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.production-monitor-live dd,
.workflow-step-live-progress dd {
  color: var(--brand-black);
  font-size: 0.95rem;
  font-weight: 820;
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.production-monitor-live[data-heartbeat-status="active"] {
  border-color: rgba(22, 131, 79, 0.24);
}

.production-monitor-live[data-heartbeat-status="completed"],
.production-monitor-live[data-heartbeat-status="idle"],
.production-monitor-live[data-heartbeat-status="pending"] {
  border-color: var(--brand-line);
}

.production-monitor-live[data-heartbeat-status="quiet"],
.production-monitor-live[data-heartbeat-status="unresponsive"] {
  border-color: rgba(199, 139, 24, 0.36);
}

.production-monitor-live[data-heartbeat-status="stalled"] {
  border-color: rgba(194, 65, 59, 0.34);
}

.workflow-step-live-progress {
  display: grid;
  gap: 0.45rem;
}

.workflow-step-live-progress > div:first-child {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.workflow-step-live-progress > div:first-child span {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.workflow-step-live-progress > div:first-child strong {
  color: var(--brand-black);
  font-size: 0.92rem;
}

.workflow-step-live-bar {
  background: #f0ede4;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.workflow-step-live-bar span {
  background: var(--brand-gold-strong);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 0;
}

.workflow-step-live-progress p {
  color: var(--brand-muted);
  font-size: 0.86rem;
  font-weight: 740;
  margin: 0;
}

.workflow-step-live-progress dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.production-monitor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
}

.production-monitor-current,
.production-monitor-facts div {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  min-width: 0;
  padding: 0.9rem;
}

.production-monitor-current span,
.production-monitor-facts dt,
.production-monitor-activity h3 {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.production-monitor-current strong {
  color: var(--brand-black);
  display: block;
  font-size: 1.22rem;
  font-weight: 830;
  line-height: 1.2;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}

.production-monitor-current small {
  color: var(--brand-muted);
  display: block;
  font-size: 0.9rem;
  font-weight: 760;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.production-monitor-facts {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 0;
}

.production-monitor-facts dd {
  color: var(--brand-black);
  font-size: clamp(0.88rem, 1vw, 1.05rem);
  font-weight: 820;
  margin: 0.3rem 0 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.production-monitor-steps {
  margin-top: 0;
}

.production-monitor-simple-note {
  background: rgba(250, 249, 245, 0.72);
  border: 1px solid rgba(232, 228, 219, 0.82);
  border-radius: var(--ff-radius-sm);
  color: var(--brand-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
  padding: var(--ff-space-3);
}

.production-monitor-simple-note[hidden] {
  display: none;
}

.production-workspace {
  display: grid;
  gap: var(--ff-space-6);
  margin-bottom: 1.3rem;
}

.production-workspace[hidden] {
  display: none;
}

.production-workspace-group {
  display: grid;
  gap: var(--ff-space-3);
}

.production-workspace-group[hidden] {
  display: none;
}

.production-workspace-heading {
  align-items: center;
  display: flex;
  gap: var(--ff-space-3);
}

.production-workspace-heading-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.72);
  border-radius: var(--ff-radius-sm);
  color: var(--brand-black);
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.production-workspace-heading-icon svg {
  height: 18px;
  width: 18px;
}

.production-workspace-heading h2,
.production-workspace-heading p {
  margin: 0;
}

.production-workspace-heading h2 {
  color: var(--brand-black);
  font-size: 1.08rem;
  font-weight: 740;
}

.production-workspace-heading p {
  color: var(--brand-muted);
  font-size: 0.84rem;
  margin-top: 0.12rem;
}

.production-workspace-grid {
  display: grid;
  gap: var(--ff-space-3);
}

.production-work-card {
  align-items: center;
  border-color: rgba(255, 216, 77, 0.62);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.production-work-card-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.78);
  border-radius: 8px;
  color: var(--brand-black);
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.production-work-card-icon svg {
  height: 1.35rem;
  width: 1.35rem;
}

.production-work-card-body {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.production-work-card h2,
.production-work-card h3 {
  color: var(--brand-black);
  font-size: 1.28rem;
  line-height: 1.2;
  margin: 0;
}

.production-work-card p {
  color: var(--brand-ink);
  font-size: 0.96rem;
  line-height: 1.45;
  margin: 0.28rem 0 0;
}

.production-work-card-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.production-work-card-meta strong,
.production-work-card-meta span {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font-size: 0.8rem;
  font-weight: 820;
  padding: 0.34rem 0.52rem;
}

.production-work-card-meta span {
  color: var(--brand-muted);
}

.production-work-card-action {
  min-width: 220px;
}

.workflow-start-failure {
  border-left: 3px solid var(--status-red);
  display: grid;
  gap: 0.75rem;
  padding-left: 0.85rem;
}

.workflow-start-failure strong {
  color: var(--status-red);
  display: block;
  font-size: 0.95rem;
}

.workflow-start-failure p {
  color: var(--brand-black);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0.25rem 0 0;
}

.workflow-start-failure dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0.65rem 0 0;
}

.workflow-start-failure dl div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  max-width: 100%;
  padding: 0.42rem 0.55rem;
}

.workflow-start-failure dt {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-start-failure dd {
  color: var(--brand-black);
  font-size: 0.84rem;
  font-weight: 760;
  margin: 0.12rem 0 0;
  overflow-wrap: anywhere;
}

.workflow-step-body {
  display: grid;
  gap: 0.55rem;
}

.workflow-step-mainline {
  align-items: start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
}

.workflow-step-mainline > div {
  min-width: 0;
}

.workflow-step-mainline-meta {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-width: fit-content;
}

.workflow-step-provider {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 820;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.workflow-step-retry {
  min-height: 32px;
  white-space: nowrap;
}

.workflow-step-retry.is-loading i {
  animation: workflow-retry-spin 0.9s linear infinite;
}

@keyframes workflow-retry-spin {
  to {
    transform: rotate(360deg);
  }
}

.workflow-step-retry-failed {
  background: #fff1f0;
  border-color: rgba(194, 65, 59, 0.42);
  color: var(--status-red);
}

.workflow-step-retry-failed:hover {
  background: #ffe7e4;
  border-color: rgba(194, 65, 59, 0.64);
  color: var(--status-red);
}

.workflow-step-info,
.workflow-step-error dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0;
}

.workflow-step-info div,
.workflow-step-error dl div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  max-width: 100%;
  padding: 0.42rem 0.55rem;
}

.workflow-step-info dt,
.workflow-step-error dt {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-step-info dd,
.workflow-step-error dd {
  color: var(--brand-black);
  font-size: 0.84rem;
  font-weight: 760;
  margin: 0.12rem 0 0;
  overflow-wrap: anywhere;
}

.workflow-step-artifact {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  max-width: 360px;
  padding: 0.48rem 0.62rem;
}

.workflow-step-artifact span {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-step-artifact strong {
  align-items: center;
  display: inline-flex;
  font-size: 0.84rem;
  gap: 0.32rem;
}

.workflow-step-artifact svg {
  height: 0.95rem;
  width: 0.95rem;
}

.workflow-step-artifact.is-present strong {
  color: var(--status-green);
}

.workflow-step-artifact.is-none strong {
  color: var(--brand-muted);
}

.workflow-step-artifact.is-invalid strong {
  color: var(--status-red);
}

.workflow-step-output-details {
  border: 1px solid rgba(214, 169, 0, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.35rem 0.55rem;
}

.workflow-step-output-details > summary {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(214, 169, 0, 0.36);
  border-radius: 999px;
  color: var(--brand-gold-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 820;
  gap: 0.35rem;
  list-style: none;
  min-height: 34px;
  padding: 0 0.72rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
  width: fit-content;
}

.workflow-step-output-details > summary:hover {
  background: var(--brand-gold-soft);
  border-color: rgba(214, 169, 0, 0.62);
  box-shadow: 0 8px 20px rgba(214, 169, 0, 0.11);
  color: var(--brand-black);
  transform: translateY(-1px);
}

.workflow-step-output-details[open] > summary {
  background: var(--brand-gold-soft);
  border-color: rgba(214, 169, 0, 0.62);
  color: var(--brand-black);
}

.workflow-step-output-details > summary::-webkit-details-marker {
  display: none;
}

.workflow-step-output-details > summary svg {
  color: var(--brand-gold-strong);
  height: 0.95rem;
  stroke: currentColor;
  width: 0.95rem;
}

.workflow-step-output-sections {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.65rem;
}

.workflow-step-output-section {
  display: grid;
  gap: 0.55rem;
}

.workflow-step-output-section h4 {
  font-size: 0.86rem;
  margin: 0;
}

.workflow-step-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin: 0;
}

.workflow-step-detail-grid div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
}

.workflow-step-detail-grid dt {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-step-detail-grid dd {
  color: var(--brand-black);
  font-size: 0.84rem;
  font-weight: 760;
  margin: 0.12rem 0 0;
}

.workflow-step-detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.workflow-step-file-list,
.workflow-step-clip-list {
  display: grid;
  gap: 0.45rem;
}

.workflow-step-file-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.5rem 0.62rem;
}

.workflow-step-file-row > div:first-child {
  min-width: 0;
}

.workflow-step-file-row strong,
.workflow-step-file-row small {
  display: block;
  overflow-wrap: anywhere;
}

.workflow-step-file-row small {
  color: var(--brand-muted);
  font-size: 0.74rem;
  margin-top: 0.12rem;
}

.story-card-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.story-card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
}

.story-card h4 {
  font-size: 0.95rem;
  margin: 0;
}

.story-card dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0;
}

.story-card dt {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.story-card dd {
  color: var(--brand-black);
  font-size: 0.84rem;
  font-weight: 760;
  margin: 0.1rem 0 0;
}

.workflow-step-error {
  border-left: 3px solid var(--status-red);
  display: grid;
  gap: 0.55rem;
  padding-left: 0.75rem;
}

.workflow-step-error > strong {
  color: var(--status-red);
}

.workflow-step-error > span {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.workflow-step-error p {
  color: var(--brand-black);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.workflow-step-error-meta {
  gap: 0.4rem 0.55rem;
}

.workflow-step-technical-details {
  border-top: 1px solid rgba(232, 228, 219, 0.72);
  padding-top: 0.45rem;
}

.workflow-recovery-actions,
.workflow-provider-retry-group {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.workflow-provider-retry {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.18rem;
  min-height: 48px;
}

.workflow-provider-retry span {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.workflow-provider-retry small {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 720;
  margin-top: 0;
  white-space: normal;
}

.workflow-step-details {
  display: grid;
  gap: 0.6rem;
}

.workflow-step-details summary {
  align-items: center;
  background: var(--brand-gold);
  border: 1px solid var(--brand-gold);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(214, 169, 0, 0.14);
  color: var(--brand-black);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 820;
  gap: 0.5rem;
  list-style: none;
  min-height: 42px;
  padding: 0 0.76rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
  width: fit-content;
}

.workflow-step-details summary:hover {
  background: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
  box-shadow: 0 12px 24px rgba(214, 169, 0, 0.2);
  color: var(--brand-black);
  transform: translateY(-1px);
}

.workflow-step-details[open] > summary {
  background: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
  color: var(--brand-black);
}

.workflow-step-details summary::-webkit-details-marker {
  display: none;
}

.workflow-step-details summary svg {
  color: var(--brand-black);
  height: 18px;
  stroke: currentColor;
  width: 18px;
}

.workflow-step-details summary:hover svg {
  color: var(--brand-black);
}

.workflow-step-details[open] summary svg {
  transform: rotate(90deg);
}

@media (max-width: 760px) {
  .workflow-step-mainline {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-step-mainline-meta {
    align-items: flex-start;
  }
}

.quality-review {
  display: grid;
  gap: var(--ff-space-4);
}

.quality-review-heading,
.quality-review-dialog header,
.quality-review-dialog footer {
  align-items: center;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
}

.quality-review-heading p,
.quality-review-dialog header p {
  color: var(--ff-color-text-muted);
  margin: var(--ff-space-1) 0 0;
}

.editorial-flow {
  display: grid;
  gap: var(--ff-space-4);
}

.editorial-flow-steps {
  display: grid;
  gap: var(--ff-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.editorial-flow-steps li {
  align-items: center;
  background: var(--ff-color-surface-subtle);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: var(--ff-space-3);
}

.editorial-flow-steps li.is-current {
  background: #fff8d8;
  border-color: #d6aa12;
}

.editorial-flow-steps li.is-complete {
  background: #eef9f2;
  border-color: #9acdaf;
}

.editorial-flow-steps li.is-complete .editorial-flow-number {
  background: #17663d;
}

.editorial-flow-number {
  align-items: center;
  background: var(--brand-black);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.editorial-flow-steps div {
  display: grid;
  gap: var(--ff-space-1);
}

.editorial-flow-steps small,
.editorial-flow-waiting {
  color: var(--ff-color-text-muted);
}

.quality-review-purpose {
  background: #eef5ff;
  border: 1px solid #bfd4f5;
  border-radius: var(--ff-radius-md);
  line-height: 1.5;
  margin: 0;
  padding: var(--ff-space-3);
}

.quality-review-refocus {
  display: grid;
  gap: var(--ff-space-4);
  margin: 0 0 var(--ff-space-2);
  padding: var(--ff-space-4);
}

.quality-review-refocus-copy,
.quality-review-refocus label {
  display: grid;
  gap: var(--ff-space-2);
}

.quality-review-refocus-copy h3,
.quality-review-refocus-copy p,
.quality-review-refocus-actions p {
  margin: 0;
}

.quality-review-refocus-copy p,
.quality-review-refocus > small,
.quality-review-refocus-actions p {
  color: var(--ff-color-text-muted);
}

.quality-review-refocus label {
  font-weight: 650;
}

.quality-review-refocus textarea {
  min-height: 7rem;
  resize: vertical;
  font-weight: 400;
}

.quality-review-refocus-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ff-space-3);
}

.quality-review-refocus-actions p.is-error {
  color: var(--ff-color-error);
}

.quality-review-kpis {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 var(--ff-space-4);
}

.quality-review-kpis div {
  background: var(--ff-color-surface-subtle);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-3);
}

.quality-review-kpis dt {
  color: var(--ff-color-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.quality-review-kpis dd {
  font-size: 1.15rem;
  font-weight: 750;
  margin: var(--ff-space-1) 0 0;
}

.quality-review-table-wrap {
  overflow-x: auto;
}

.quality-review-table {
  border-collapse: collapse;
  min-width: 920px;
  width: 100%;
}

.quality-review-table th,
.quality-review-table td {
  border-bottom: 1px solid var(--ff-color-border);
  padding: var(--ff-space-3);
  text-align: left;
  vertical-align: top;
}

.quality-review-table th {
  color: var(--ff-color-text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.quality-review-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
}

.quality-review-status[data-verdict="directly_usable"] {
  background: #e4f6ed;
  color: #17663d;
}

.quality-review-status[data-verdict="usable_with_revision"] {
  background: #fff2cf;
  color: #7b5500;
}

.quality-review-status[data-verdict="unusable"] {
  background: #fde5e5;
  color: #8b2020;
}

.quality-review-status[data-verdict="unreviewed"] {
  background: var(--ff-color-surface-subtle);
  color: var(--ff-color-text-muted);
}

.quality-review-dialog {
  border: 0;
  border-radius: var(--ff-radius-lg);
  box-shadow: 0 24px 80px rgba(22, 27, 31, 0.28);
  max-height: min(90vh, 980px);
  max-width: 820px;
  padding: 0;
  width: min(92vw, 820px);
}

.quality-review-dialog::backdrop {
  background: rgba(22, 27, 31, 0.56);
}

.quality-review-dialog-shell,
.quality-review-dialog-body {
  display: grid;
  gap: var(--ff-space-4);
}

@media (max-width: 760px) {
  .editorial-flow-steps li {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .editorial-flow-steps li > a,
  .editorial-flow-steps li > .editorial-flow-waiting {
    grid-column: 2;
  }
}

.quality-review-dialog header,
.quality-review-dialog footer {
  background: var(--ff-color-surface);
  padding: var(--ff-space-4);
}

.quality-review-dialog header {
  border-bottom: 1px solid var(--ff-color-border);
}

.quality-review-dialog footer {
  border-top: 1px solid var(--ff-color-border);
  justify-content: flex-end;
}

.quality-review-dialog-body {
  max-height: 65vh;
  overflow-y: auto;
  padding: 0 var(--ff-space-4);
}

.quality-review-close {
  background: transparent;
  border: 0;
  color: var(--ff-color-text-muted);
  font-size: 1.8rem;
}

.quality-review-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  list-style: none;
  margin: var(--ff-space-2) 0 0;
  padding: 0;
}

.quality-review-criteria li,
.quality-review-reasons label {
  background: var(--ff-color-surface-subtle);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-2) var(--ff-space-3);
}

.quality-review-verdicts,
.quality-review-reasons {
  display: grid;
  gap: var(--ff-space-2);
}

.quality-review-reasons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quality-review-text {
  display: grid;
  gap: var(--ff-space-2);
  font-weight: 700;
}

.quality-review-text textarea {
  resize: vertical;
}

.quality-review-preview pre {
  background: #182026;
  border-radius: var(--ff-radius-md);
  color: #f4f7f9;
  max-height: 240px;
  overflow: auto;
  padding: var(--ff-space-3);
  white-space: pre-wrap;
}

.quality-review-history {
  display: grid;
  gap: var(--ff-space-2);
  margin-top: var(--ff-space-2);
}

.quality-review-history article {
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-3);
}

.quality-review-error {
  color: var(--ff-color-danger);
  font-weight: 700;
}

@media (max-width: 900px) {
  .quality-review-kpis,
  .quality-review-reasons {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .quality-review-heading,
  .quality-review-dialog header {
    align-items: stretch;
    flex-direction: column;
  }

  .quality-review-kpis,
  .quality-review-reasons {
    grid-template-columns: 1fr;
  }

  .quality-review-refocus-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quality-review-refocus-actions .ff-button-secondary {
    justify-content: center;
    width: 100%;
  }
}

.production-monitor-steps .workflow-step {
  align-items: start;
  gap: 0.72rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.58rem 0.72rem;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.production-monitor-steps .workflow-step-body {
  display: grid;
  gap: 0;
  min-width: 0;
}

.production-monitor-steps .workflow-step-mainline {
  align-items: center;
  flex-direction: row;
  gap: 0.75rem;
}

.workflow-step-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.36rem;
  justify-content: flex-end;
}

.workflow-step-icon-action {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-muted);
  cursor: pointer;
  display: inline-flex;
  gap: 0.32rem;
  min-height: 30px;
  justify-content: center;
  padding: 0 0.58rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.workflow-step-icon-action svg {
  height: 0.95rem;
  flex: 0 0 auto;
  width: 0.95rem;
}

.workflow-step-icon-action span {
  font-size: 0.74rem;
  font-weight: 820;
  line-height: 1;
}

.workflow-step-icon-action:hover {
  background: var(--brand-gold-soft);
  border-color: rgba(214, 169, 0, 0.5);
  color: var(--brand-black);
  transform: translateY(-1px);
}

.workflow-step-retry-failed {
  background: #fff;
  border-color: rgba(194, 65, 59, 0.34);
  color: var(--status-red);
}

.workflow-step-retry-failed:hover {
  background: #fff1f0;
  border-color: rgba(194, 65, 59, 0.58);
  color: var(--status-red);
}

.workflow-step-toggle[aria-expanded="true"] {
  background: var(--brand-gold-soft);
  border-color: rgba(214, 169, 0, 0.5);
  color: var(--brand-black);
}

.workflow-step-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.workflow-step-panel {
  border-top: 1px solid rgba(232, 228, 219, 0.78);
  display: grid;
  gap: 0.72rem;
  margin-top: 0.55rem;
  overflow: hidden;
  padding-top: 0.72rem;
}

.workflow-step-failure-summary {
  background: #fff8f7;
  border: 1px solid rgba(194, 65, 59, 0.2);
  border-left: 3px solid var(--status-red);
  border-radius: 8px;
  display: grid;
  gap: 0.2rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.62rem;
}

.workflow-step-failure-summary span,
.workflow-step-failure-summary small {
  color: var(--brand-muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.workflow-step-failure-summary p {
  color: var(--brand-black);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.38;
  margin: 0;
  overflow-wrap: anywhere;
}

.workflow-step-panel[hidden] {
  display: none;
}

.workflow-step-panel .workflow-step-error {
  background: #fff8f7;
  border: 1px solid rgba(194, 65, 59, 0.22);
  border-left: 3px solid var(--status-red);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.workflow-step-expert {
  background: rgba(250, 249, 245, 0.92);
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: 10px;
  display: grid;
  gap: 0.72rem;
  padding: 0.72rem;
}

.workflow-step-expert[hidden] {
  display: none;
}

.workflow-step-expert-heading {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.workflow-step-expert-heading strong {
  color: var(--brand-black);
  font-size: 0.84rem;
  font-weight: 820;
}

.workflow-step-expert-heading span {
  color: var(--brand-muted);
  font-size: 0.76rem;
  font-weight: 680;
}

.workflow-step-expert-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.workflow-step-expert-grid dd {
  display: grid;
  gap: 0.18rem;
}

.workflow-step-expert-grid small {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.workflow-ai-diagnosis,
.workflow-ai-quality,
.workflow-ai-prompt-analysis,
.workflow-ai-interpretation {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.86);
  border-radius: 10px;
  display: grid;
  gap: 0.62rem;
  padding: 0.78rem;
}

.workflow-ai-diagnosis.is-failed {
  background: #fff8f7;
  border-color: rgba(194, 65, 59, 0.24);
}

.workflow-ai-diagnosis h4,
.workflow-ai-quality h4,
.workflow-ai-prompt-analysis h4,
.workflow-ai-interpretation h4 {
  color: var(--brand-black);
  font-size: 0.9rem;
  font-weight: 820;
  margin: 0;
}

.workflow-ai-diagnosis p,
.workflow-ai-interpretation p,
.workflow-ai-recommendation p {
  color: var(--brand-ink);
  font-size: 0.84rem;
  line-height: 1.42;
  margin: 0;
}

.workflow-ai-diagnosis-columns {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-ai-diagnosis-columns strong,
.workflow-ai-recommendation strong,
.workflow-ai-interpretation strong {
  color: var(--brand-black);
  font-size: 0.78rem;
  font-weight: 820;
}

.workflow-ai-diagnosis ul,
.workflow-ai-hints {
  color: var(--brand-ink);
  display: grid;
  font-size: 0.8rem;
  gap: 0.28rem;
  line-height: 1.35;
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.workflow-ai-quality-grid {
  display: grid;
  gap: 0.36rem;
}

.workflow-ai-quality-row {
  align-items: center;
  border: 1px solid rgba(232, 228, 219, 0.78);
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(160px, 1fr) 2rem minmax(0, 1.6fr);
  padding: 0.42rem 0.55rem;
}

.workflow-ai-quality-row span {
  color: var(--brand-black);
  font-size: 0.8rem;
  font-weight: 760;
}

.workflow-ai-quality-row strong {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  height: 1.45rem;
  justify-content: center;
  width: 1.45rem;
}

.workflow-ai-quality-row.is-ok strong {
  background: #e9f8ef;
  color: #14803c;
}

.workflow-ai-quality-row.is-failed strong {
  background: #fff1f0;
  color: var(--status-red);
}

.workflow-ai-quality-row.is-neutral strong {
  background: rgba(244, 241, 233, 0.92);
  color: var(--brand-muted);
}

.workflow-ai-quality-row small {
  color: var(--brand-muted);
  font-size: 0.76rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-step-events {
  display: grid;
  gap: 0.45rem;
}

.workflow-step-events h4 {
  color: var(--brand-black);
  font-size: 0.82rem;
  margin: 0;
}

.workflow-step-events ol {
  display: grid;
  gap: 0.32rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-step-events li {
  align-items: baseline;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 3.2rem 1.4rem minmax(0, 1fr);
}

.workflow-step-events time {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 740;
}

.workflow-step-events span {
  color: var(--brand-ink);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.workflow-step-events li > strong {
  color: var(--brand-gold-strong);
  font-size: 0.8rem;
  text-align: center;
}

.workflow-step-codeblock {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  margin-top: 0.55rem;
  min-width: 0;
  position: relative;
}

.workflow-step-debug-details pre,
.workflow-step-codeblock pre {
  background: #191815;
  border-radius: 8px;
  color: #f7f2e8;
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 0;
  max-height: 18rem;
  max-width: 100%;
  overflow: auto;
  padding: 0.7rem;
  width: 100%;
  white-space: pre-wrap;
  word-break: normal;
}

.workflow-step-panel .workflow-step-output-sections {
  margin-top: 0;
}

.workflow-pipeline-details {
  display: grid;
  gap: 0.55rem;
}

.workflow-pipeline-details h4 {
  color: var(--brand-black);
  font-size: 0.86rem;
  font-weight: 820;
  margin: 0;
}

@media (max-width: 760px) {
  .production-monitor-steps .workflow-step-mainline {
    align-items: center;
    flex-direction: row;
  }

  .workflow-step-actions {
    align-self: center;
  }

  .workflow-step-icon-action span {
    display: none;
  }

  .workflow-step-icon-action {
    padding: 0;
    width: 30px;
  }
}

.pipeline-diagnosis {
  display: grid;
  gap: 0.7rem;
}

.pipeline-stage {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
}

.pipeline-stage header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.pipeline-stage header strong {
  font-size: 0.9rem;
}

.pipeline-stage header span {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 840;
}

.pipeline-stage dl {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.pipeline-stage dl div {
  min-width: 0;
}

.pipeline-field-report {
  overflow-x: auto;
}

.pipeline-field-report > span {
  color: var(--brand-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 820;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.pipeline-field-report table {
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 620px;
  width: 100%;
}

.pipeline-field-report th,
.pipeline-field-report td {
  border-bottom: 1px solid var(--brand-line);
  padding: 0.34rem 0.42rem;
  text-align: left;
  vertical-align: top;
}

.pipeline-field-report th {
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.production-monitor-activity {
  border-top: 1px solid var(--brand-line);
  padding-top: 1rem;
}

.production-monitor-activity h3 {
  margin: 0 0 0.65rem;
}

.production-monitor-activity-heading {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.production-monitor-activity-heading h3 {
  margin: 0;
}

.production-monitor-activity ol {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.production-monitor-activity li {
  align-items: center;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 5rem minmax(0, 1fr);
}

.production-monitor-activity time {
  color: var(--brand-muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.production-monitor-activity span,
.production-monitor-activity p {
  color: var(--brand-black);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.desk-next-action-card {
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(255, 216, 77, 0.22), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #fff, #fff9e8);
  border-color: rgba(255, 216, 77, 0.9);
  box-shadow: 0 18px 42px rgba(101, 78, 0, 0.12);
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1.3rem;
  padding: 1.35rem;
}

.next-action-main {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.next-action-icon {
  align-items: center;
  background: var(--brand-black);
  border-radius: 18px;
  color: var(--brand-gold);
  display: inline-flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.next-action-icon svg {
  height: 28px;
  width: 28px;
}

.desk-next-action-card h2 {
  color: var(--brand-black);
  font-size: 1.55rem;
  font-weight: 820;
  line-height: 1.16;
  margin: 0.2rem 0 0;
}

.desk-next-action-card p {
  color: var(--brand-black);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

.desk-next-action-card small {
  color: var(--brand-muted);
  display: block;
  font-size: 0.86rem;
  font-weight: 760;
  margin-top: 0.5rem;
}

.next-action-control {
  display: flex;
  justify-content: flex-end;
}

.next-action-button {
  min-height: 48px;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  white-space: nowrap;
}

.desk-progress-header {
  align-items: center;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.desk-progress-header span {
  color: var(--brand-black);
  font-size: 1.35rem;
  font-weight: 820;
}

.desk-progress-track {
  background: var(--brand-card-strong);
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.desk-progress-fill {
  background: var(--brand-gold);
  border-radius: inherit;
  height: 100%;
}

.desk-step-list {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
}

.desk-step-list li {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-muted);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 740;
  gap: 0.45rem;
  justify-content: center;
  min-height: 38px;
  padding: 0 0.72rem;
  text-align: center;
}

.desk-step-list li > span {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  line-height: 0;
  width: 22px;
}

.desk-step-list li.is-done {
  background: var(--brand-gold-soft);
  border-color: rgba(255, 216, 77, 0.88);
  color: var(--brand-black);
}

.desk-step-list svg {
  display: block;
  height: 14px;
  width: 14px;
}

.desk-layout {
  align-items: start;
  display: grid;
  gap: 1.3rem;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.desk-main {
  display: grid;
  gap: 1.3rem;
  min-width: 0;
}

.desk-tabs {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.28rem;
}

.desk-tabs-top {
  margin-bottom: 1rem;
}

.production-ai-settings {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.production-ai-settings-form {
  display: grid;
  gap: 0.9rem;
}

.production-ai-settings-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.production-ai-settings.is-readonly select,
.production-ai-settings.is-readonly input {
  color: var(--brand-muted);
}

.production-ai-settings-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.production-ai-settings-grid label,
.production-ai-settings-grid > div {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.production-ai-settings-grid span {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.production-ai-settings-grid select,
.production-ai-settings-grid input {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font: inherit;
  font-weight: 760;
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  width: 100%;
}

.production-ai-settings-grid strong {
  align-items: center;
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: flex;
  min-height: 42px;
  padding: 0.55rem 0.65rem;
}

.production-ai-settings-grid small {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.production-ai-strategy-section {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  margin-top: 1.05rem;
  padding: 1rem;
}

.production-editorial-brief {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  margin-top: 1.05rem;
  padding: 1rem;
}

.production-editorial-brief-field {
  display: grid;
  margin: 0;
}

.production-goal-field {
  display: grid;
  gap: 0.35rem;
  max-width: 18rem;
}

.production-goal-field span {
  color: var(--brand-black);
  font-size: 0.82rem;
  font-weight: 820;
}

.production-goal-field select {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
  min-height: 42px;
  padding: 0 0.7rem;
}

.production-editorial-brief-field textarea {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 10rem;
  padding: 0.75rem;
  resize: vertical;
  width: 100%;
}

.production-editorial-brief-field textarea:focus {
  border-color: rgba(22, 122, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(22, 122, 92, 0.12);
  outline: none;
}

.production-editorial-brief small {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.production-briefing-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.production-briefing-hints span {
  background: rgba(22, 122, 92, 0.08);
  border: 1px solid rgba(22, 122, 92, 0.18);
  border-radius: 999px;
  color: var(--brand-black);
  font-size: 0.76rem;
  font-weight: 760;
  padding: 0.28rem 0.5rem;
}

.production-ai-strategy-heading h3 {
  font-size: 1.04rem;
  letter-spacing: 0;
  margin: 0;
}

.production-ai-strategy-heading p,
.production-ai-strategy-empty,
.production-ai-strategy-blocked {
  color: var(--brand-muted);
  font-size: 0.86rem;
  font-weight: 650;
  margin: 0.2rem 0 0;
}

.production-ai-strategy-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-ai-pipeline-summary {
  display: grid;
  gap: 0.45rem;
}

.production-ai-pipeline-row {
  align-items: center;
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-width: 0;
  padding: 0.65rem 0.75rem;
}

.production-ai-pipeline-row strong,
.production-ai-pipeline-row span {
  display: block;
}

.production-ai-pipeline-row strong {
  color: var(--brand-black);
  font-size: 0.88rem;
  font-weight: 820;
}

.production-ai-pipeline-row div > span {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 680;
  margin-top: 0.1rem;
}

.production-ai-pipeline-row a {
  color: var(--status-blue);
  font-size: 0.78rem;
  font-weight: 820;
  text-decoration: none;
  white-space: nowrap;
}

.production-ai-pipeline-row .production-ai-strategy-status-missing {
  background: rgba(104, 112, 125, 0.1);
  border-color: rgba(104, 112, 125, 0.22);
  color: var(--brand-muted);
}

.production-ai-strategy-expert {
  border-top: 1px solid var(--brand-line);
  padding-top: 0.75rem;
}

.production-ai-strategy-expert summary {
  color: var(--brand-black);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 820;
  list-style-position: outside;
}

.production-ai-strategy-expert .production-ai-strategy-list {
  margin-top: 0.8rem;
}

.production-ai-strategy-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem;
}

.production-ai-strategy-card-header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
}

.production-ai-strategy-card-header h4 {
  color: var(--brand-black);
  font-size: 0.92rem;
  font-weight: 840;
  line-height: 1.25;
  margin: 0;
}

.production-ai-strategy-card-header p {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  margin: 0.2rem 0 0;
}

.production-ai-strategy-status {
  border: 1px solid transparent;
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
  padding: 0.32rem 0.48rem;
}

.production-ai-strategy-status-active {
  background: rgba(22, 131, 79, 0.1);
  border-color: rgba(22, 131, 79, 0.26);
  color: var(--status-green);
}

.production-ai-strategy-status-default {
  background: rgba(183, 121, 31, 0.11);
  border-color: rgba(183, 121, 31, 0.28);
  color: var(--status-yellow);
}

.production-ai-strategy-status-missing {
  background: rgba(194, 65, 59, 0.1);
  border-color: rgba(194, 65, 59, 0.26);
  color: var(--status-red);
}

.production-ai-strategy-status-archived {
  background: rgba(104, 112, 125, 0.1);
  border-color: rgba(104, 112, 125, 0.24);
  color: var(--brand-muted);
}

.production-ai-strategy-field {
  display: grid;
  margin: 0;
  min-width: 0;
}

.production-ai-strategy-select {
  appearance: none;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2368707d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 0.85rem center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--brand-black);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 780;
  min-height: 44px;
  padding: 0 2.55rem 0 0.75rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.production-ai-strategy-select:focus {
  border-color: rgba(22, 122, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(22, 122, 92, 0.12);
  outline: none;
}

.production-ai-strategy-select:disabled {
  background-color: rgba(248, 250, 252, 0.85);
  color: var(--brand-muted);
  cursor: not-allowed;
}

.production-ai-strategy-meta {
  color: var(--brand-muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.3;
  min-height: 1rem;
}

.production-ai-strategy-meta-row {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
}

.production-ai-strategy-version {
  color: var(--brand-muted);
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.3;
}

.production-ai-strategy-setup {
  background: rgba(199, 139, 24, 0.08);
  border: 1px solid rgba(199, 139, 24, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem 0.65rem;
}

.production-ai-strategy-setup p {
  color: var(--brand-black);
  font-size: 0.82rem;
  font-weight: 760;
  margin: 0;
}

.production-ai-strategy-setup a {
  color: var(--status-blue);
  font-size: 0.82rem;
  font-weight: 820;
  text-decoration: none;
}

.production-ai-strategy-warning {
  background: rgba(199, 139, 24, 0.1);
  border: 1px solid rgba(199, 139, 24, 0.28);
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 0.55rem 0.65rem;
}

.production-ai-strategy-warning p,
.production-ai-strategy-blocked {
  color: var(--brand-black);
  font-weight: 760;
}

.production-ai-strategy-warning p {
  margin: 0;
}

@media (max-width: 760px) {
  .production-ai-strategy-list {
    grid-template-columns: 1fr;
  }

  .production-ai-pipeline-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.production-ai-warning {
  align-items: flex-start;
  background: rgba(199, 139, 24, 0.1);
  border: 1px solid rgba(199, 139, 24, 0.28);
  border-radius: 8px;
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
}

.production-ai-warning p {
  color: var(--brand-black);
  font-weight: 740;
  margin: 0 0 0.25rem;
}

.production-ai-warning a {
  color: var(--brand-black);
  font-weight: 800;
}

.production-ai-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.production-ai-save-status {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 760;
  margin: 0 auto 0 0;
}

.production-ai-save-status[data-status="error"] {
  color: var(--status-red);
}

.production-ai-save-status[data-status="success"] {
  color: var(--status-green);
}

.desk-tabs a {
  border-radius: 999px;
  color: var(--brand-muted);
  font-size: 0.9rem;
  font-weight: 760;
  padding: 0.62rem 0.9rem;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.desk-tabs a:hover,
.desk-tabs a.active {
  background: var(--brand-gold-soft);
  color: var(--brand-black);
}

.desk-panel {
  scroll-margin-top: 160px;
}

.desk-summary {
  color: var(--brand-muted);
  line-height: 1.6;
  margin: 0;
}

.desk-summary strong {
  color: var(--brand-black);
}

.desk-overview-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.desk-overview-list {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desk-overview-list div {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.88);
  border-radius: 12px;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  min-height: 56px;
  padding: 0.78rem 0.86rem;
}

.desk-overview-list span {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-overview-list strong {
  color: var(--brand-black);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-align: right;
}

.production-ai-cost-card {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.88);
  border-radius: 12px;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.9rem;
}

.production-ai-cost-card h3 {
  font-size: 1rem;
  margin: 0;
}

.production-ai-cost-card dl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.production-ai-cost-card dl div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.production-ai-cost-card dt {
  color: var(--brand-muted);
  font-weight: 760;
}

.production-ai-cost-card dd {
  color: var(--brand-black);
  display: grid;
  gap: 0.1rem;
  font-weight: 820;
  margin: 0;
  text-align: right;
}

.production-ai-cost-card p {
  color: var(--brand-muted);
  margin: 0;
}

.production-ai-cost-card .ai-cost-exchange-rate {
  padding: 0;
}

.production-ai-cost-total {
  border-top: 1px solid var(--brand-line);
  margin-top: 0.25rem;
  padding-top: 0.55rem;
}

.production-status-card {
  border-top: 1px solid var(--brand-line);
  display: grid;
  gap: 0.8rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
}

.production-status-card h3 {
  color: var(--brand-black);
  font-size: 1rem;
  margin: 0;
}

.production-status-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-status-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.62rem 0.72rem;
}

.production-status-row span {
  color: var(--brand-black);
  font-size: 0.86rem;
  font-weight: 760;
}

.production-status-row strong {
  align-items: center;
  display: inline-flex;
  font-size: 0.82rem;
  gap: 0.32rem;
  text-align: right;
}

.production-status-row svg {
  height: 0.95rem;
  width: 0.95rem;
}

.production-status-row.is-present strong {
  color: var(--status-green);
}

.production-status-row.is-none strong {
  color: var(--brand-muted);
}

.production-status-row.is-invalid strong {
  color: var(--status-red);
}

.production-status-card p {
  color: var(--brand-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.production-result-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.production-result-item {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.production-status-card.production-result-item {
  border-top: 1px solid var(--brand-line);
  margin-top: 0;
  padding-top: 0;
}

.production-result-header {
  align-items: center;
  background: #fff;
  border: 0;
  color: var(--brand-black);
  cursor: pointer;
  display: flex;
  gap: 0.85rem;
  justify-content: space-between;
  min-height: 64px;
  padding: 0.72rem 0.85rem;
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.production-result-header:hover,
.production-result-header[aria-expanded="true"] {
  background: rgba(255, 251, 232, 0.66);
}

.production-result-title {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  min-width: 0;
}

.production-result-title > svg,
.production-result-title > i {
  color: var(--brand-gold-strong);
  flex: 0 0 auto;
  height: 1.05rem;
  width: 1.05rem;
}

.production-result-title strong,
.production-result-title small {
  display: block;
  overflow-wrap: anywhere;
}

.production-result-title strong {
  font-size: 0.96rem;
  font-weight: 860;
}

.production-result-summary {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 720;
  margin-top: 0.12rem;
}

.production-result-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.production-result-status {
  background: rgba(23, 23, 23, 0.04);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-muted);
  font-size: 0.68rem;
  font-weight: 860;
  letter-spacing: 0.03em;
  padding: 0.26rem 0.52rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.production-result-status[data-status="vorhanden"] {
  background: rgba(47, 125, 75, 0.08);
  border-color: rgba(47, 125, 75, 0.24);
  color: var(--status-green);
}

.production-result-status[data-status="fehlt"] {
  background: rgba(117, 111, 98, 0.08);
  color: var(--brand-muted);
}

.production-result-actions svg {
  color: var(--brand-muted);
  height: 1rem;
  transition: transform 160ms ease, color 160ms ease;
  width: 1rem;
}

.production-result-header[aria-expanded="true"] .production-result-actions svg {
  color: var(--brand-black);
  transform: rotate(180deg);
}

.production-result-panel {
  border-top: 1px solid rgba(232, 228, 219, 0.78);
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.production-result-panel[hidden] {
  display: none;
}

.production-result-panel .btn-secondary.btn-compact {
  min-height: 32px;
  padding-left: 0.62rem;
  padding-right: 0.62rem;
}

.desk-note {
  align-items: flex-start;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.78);
  border-radius: 14px;
  color: var(--brand-black);
  display: flex;
  gap: 0.65rem;
  line-height: 1.48;
  margin-top: 1rem;
  padding: 0.85rem;
}

.desk-note svg {
  color: #7c6400;
  flex: 0 0 auto;
  height: 18px;
  margin-top: 0.1rem;
  width: 18px;
}

.desk-status-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.95rem;
}

.desk-status-card {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.88);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(13, 13, 13, 0.03);
  display: grid;
  gap: 0.55rem;
  min-height: 150px;
  padding: 0.95rem;
}

.desk-status-card > span,
.production-mini-stats dt,
.knowledge-stat-grid dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desk-status-card > strong {
  align-items: center;
  color: var(--brand-black);
  display: inline-flex;
  font-size: 1.06rem;
  font-weight: 820;
  gap: 0.48rem;
  line-height: 1.28;
}

.desk-status-card > strong svg {
  color: var(--status-green);
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.desk-status-card small {
  color: var(--brand-muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

.production-status-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.production-status-tile {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  display: grid;
  gap: 0.72rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 86px;
  padding: 0.82rem;
}

.production-status-tile.is-done {
  background: var(--brand-gold-soft);
  border-color: rgba(255, 216, 77, 0.82);
}

.production-status-icon {
  align-items: center;
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--brand-muted);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.production-status-tile.is-done .production-status-icon {
  background: #fff;
  border-color: rgba(255, 216, 77, 0.82);
  color: var(--status-green);
}

.production-status-icon svg {
  height: 18px;
  width: 18px;
}

.production-status-tile strong,
.production-status-tile span,
.production-status-tile small {
  display: block;
}

.production-status-tile strong {
  color: var(--brand-black);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}

.production-status-tile div > span {
  color: var(--brand-muted);
  font-size: 0.86rem;
  font-weight: 740;
  margin-top: 0.12rem;
}

.production-status-tile small {
  color: var(--brand-muted);
  font-size: 0.8rem;
  margin-top: 0.18rem;
}

.production-mini-stats {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.production-mini-stats div {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  padding: 0.58rem 0.64rem;
}

.production-mini-stats dd {
  color: var(--brand-black);
  font-size: 0.94rem;
  font-weight: 760;
  margin: 0.18rem 0 0;
}

.knowledge-stat-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.knowledge-stat-grid div {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  padding: 0.8rem;
}

.knowledge-stat-grid dd {
  color: var(--brand-black);
  font-size: 1rem;
  font-weight: 800;
  margin: 0.24rem 0 0;
}

.highlight-block-list {
  display: grid;
  gap: 0.75rem;
}

.highlight-block {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  display: grid;
  gap: 1rem;
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 0.9rem;
}

.highlight-block-time {
  display: grid;
  gap: 0.2rem;
}

.highlight-block-time strong {
  color: var(--brand-black);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.98rem;
  font-weight: 800;
}

.highlight-block-time span {
  color: var(--brand-muted);
  font-size: 0.84rem;
  font-weight: 740;
}

.highlight-block-body {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.highlight-block-body > strong {
  color: var(--brand-black);
  font-size: 1rem;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.highlight-block-body h3 {
  color: var(--brand-black);
  font-size: 1rem;
  font-weight: 820;
  line-height: 1.3;
  margin: 0;
}

.highlight-block-body p {
  color: var(--brand-muted);
  line-height: 1.45;
  margin: 0;
}

.highlight-editorial-reason {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  display: grid;
  gap: 0.28rem;
  padding: 0.72rem;
}

.highlight-editorial-reason span {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.highlight-selected-chip {
  justify-self: start;
}

.highlight-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.highlight-reason-list span {
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.72);
  border-radius: 999px;
  color: var(--brand-black);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1;
  padding: 0.38rem 0.58rem;
}

.result-list {
  display: grid;
  gap: 0.75rem;
}

.result-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.85rem;
}

.result-item > svg {
  color: var(--status-green);
  height: 20px;
  width: 20px;
}

.result-item strong,
.result-item span {
  display: block;
}

.result-item strong {
  color: var(--brand-black);
  font-weight: 800;
}

.result-item span {
  color: var(--brand-muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.asset-card-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.asset-card {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.88);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(13, 13, 13, 0.035);
  display: grid;
  gap: 1rem;
  padding: 1.05rem;
}

.asset-card-main {
  align-items: flex-start;
  display: flex;
  gap: 0.9rem;
}

.asset-card-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.78);
  border-radius: 14px;
  color: #7c6400;
  display: inline-flex;
  flex: 0 0 auto;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.asset-card-icon svg {
  height: 22px;
  width: 22px;
}

.asset-card-content {
  min-width: 0;
}

.asset-card-content span {
  color: var(--brand-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.18rem;
  text-transform: uppercase;
}

.asset-card-content h3 {
  color: var(--brand-black);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.asset-card-content p {
  color: var(--brand-muted);
  line-height: 1.48;
  margin: 0.45rem 0 0;
}

.asset-card-meta {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.asset-card-meta div {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  padding: 0.68rem 0.72rem;
}

.asset-card-meta dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.22rem;
  text-transform: uppercase;
}

.asset-card-meta dd {
  color: var(--brand-black);
  font-size: 0.92rem;
  font-weight: 740;
  margin: 0;
}

.asset-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.asset-empty-state {
  align-items: center;
  min-height: 280px;
  justify-content: center;
  text-align: center;
}

.asset-empty-state p {
  margin-bottom: 1.1rem;
}

.desk-timeline {
  display: grid;
  gap: 1rem;
}

.desk-timeline > li {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.88);
  border-left: 0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(13, 13, 13, 0.035);
  display: grid;
  gap: 0.9rem;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 0;
  padding: 1rem;
}

.timeline-event-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.78);
  border-radius: 999px;
  color: #7c6400;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.timeline-event-icon svg {
  height: 18px;
  width: 18px;
}

.timeline-event-body {
  min-width: 0;
}

.timeline-event-body time {
  color: var(--brand-muted);
  font-size: 0.82rem;
  margin-bottom: 0.18rem;
}

.timeline-event-body strong {
  color: var(--brand-black);
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.28;
}

.timeline-event-details {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0.9rem 0 0;
}

.timeline-event-details div {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  padding: 0.65rem 0.72rem;
}

.timeline-event-details dt {
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.22rem;
  text-transform: uppercase;
}

.timeline-event-details dd {
  color: var(--brand-black);
  font-size: 0.92rem;
  font-weight: 740;
  margin: 0;
}

.timeline-change-list {
  margin-top: 0.9rem;
}

.timeline-change-list span {
  color: var(--brand-muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.timeline-change-list ul {
  display: grid;
  gap: 0.38rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-change-list li {
  align-items: center;
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-left: 1px solid var(--brand-line);
  border-radius: 999px;
  box-shadow: none;
  color: var(--brand-black);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 720;
  margin: 0;
  min-height: 32px;
  padding: 0 0.72rem;
}

.timeline-change-list li::before {
  color: var(--status-green);
  content: "✓";
  font-weight: 820;
  margin-right: 0.42rem;
}

.timeline-technical-details {
  margin-top: 0.85rem;
}

.timeline-technical-details summary {
  color: var(--brand-gold-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 760;
  list-style: none;
  transition: color 150ms ease;
}

.timeline-technical-details summary:hover {
  color: var(--brand-black);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 3px;
}

.timeline-technical-details summary::-webkit-details-marker {
  display: none;
}

.timeline-technical-details pre {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  color: var(--brand-muted);
  font-size: 0.8rem;
  margin: 0.55rem 0 0;
  padding: 0.8rem;
  white-space: pre-wrap;
}

.desk-sidebar {
  position: sticky;
  top: 160px;
}

.desk-meta-list {
  display: grid;
  gap: 0.95rem;
  margin: 0;
}

.desk-meta-list div {
  border-bottom: 1px solid var(--brand-line);
  padding-bottom: 0.85rem;
}

.desk-meta-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.desk-id {
  color: var(--brand-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .brand-bar,
  .section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-switcher,
  .user-menu summary {
    justify-content: space-between;
    width: 100%;
  }

  .user-menu-dropdown {
    position: static;
    margin-top: 0.45rem;
  }

  .top-nav-inner {
    overflow-x: auto;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .storage-stat-grid,
  .ai-cost-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-continue-card {
    align-items: stretch;
    flex-direction: column;
  }

  .cockpit-header,
  .cockpit-attention {
    align-items: stretch;
    flex-direction: column;
  }

  .cockpit-focus {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .cockpit-primary-action {
    align-self: start;
  }

  .cockpit-main-grid,
  .cockpit-operations-grid {
    grid-template-columns: 1fr;
  }

  .cockpit-system-line {
    justify-content: flex-start;
  }

  .desk-hero,
  .desk-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
  }

  .desk-facts,
  .desk-overview-grid,
  .desk-overview-list,
  .desk-status-grid,
  .production-ai-settings-grid,
  .production-monitor-grid,
  .production-status-grid,
  .knowledge-stat-grid,
  .asset-card-meta,
    .settings-provider-list,
  .provider-fields,
  .security-profile-grid,
  .settings-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-next-action-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .production-work-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .production-work-card-action {
    min-width: 0;
    width: 100%;
  }

  .next-action-control {
    justify-content: flex-start;
  }

  .desk-sidebar {
    position: static;
  }

  .next-steps-preview ol {
    align-items: center;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .brand-bar,
  .top-nav-inner,
  .app-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .creator-logo {
    height: 53px;
    max-width: 176px;
  }

  .section-header h1 {
    font-size: 1.55rem;
  }

  .settings-provider-list,
  .provider-fields,
  .security-profile-grid,
  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .ai-provider-grid {
    grid-template-columns: 1fr;
  }

  .home-section-heading {
    gap: 0.75rem;
  }

  .cockpit-page {
    gap: var(--ff-space-4);
  }

  .cockpit-focus {
    min-height: 0;
    padding: var(--ff-space-6);
  }

  .cockpit-production-row,
  .cockpit-activity-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .cockpit-row-status {
    justify-content: space-between;
  }

  .cockpit-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .storage-stat-grid,
  .ai-cost-grid {
    grid-template-columns: 1fr;
  }

  .activity-item {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .activity-item time {
    grid-column: 2;
  }

  .provider-option span,
  .settings-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .desk-title-row h1 {
    font-size: 1.65rem;
  }

  .desk-facts,
  .desk-overview-grid,
  .desk-overview-list,
  .desk-status-grid,
  .production-ai-settings-grid,
  .production-monitor-grid,
  .production-monitor-facts,
  .production-status-grid,
  .knowledge-stat-grid,
  .desk-progress-header,
  .desk-step-list,
  .asset-card-meta {
    grid-template-columns: 1fr;
  }

  .production-monitor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-monitor-compact {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .production-monitor-activity li {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .production-monitor-activity-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-action-main {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .next-action-button {
    justify-content: center;
    width: 100%;
  }

  .desk-overview-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .desk-overview-list strong {
    text-align: left;
  }

  .transcript-segment-list li {
    grid-template-columns: 1fr;
  }

  .highlight-block {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .ai-studio-layout,
  .ai-detail-layout,
  .ai-ide-header,
  .ai-ide-shell,
  .ai-test-layout,
  .ai-playground-layout {
    grid-template-columns: 1fr;
  }

  .ai-strategy-form-card,
  .ai-ide-sidebar,
  .ai-playground-control,
  .ai-playground-response {
    position: static;
  }

  .ai-form-grid,
  .ai-standard-params,
  .ai-ide-fields,
  .ai-test-form {
    grid-template-columns: 1fr;
  }

  .ai-ide-tabs {
    overflow-x: auto;
  }

  .production-drawer {
    max-width: 100vw;
    width: 100vw;
  }

  .import-source-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .drawer-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .production-drawer[data-import-drawer] .drawer-actions {
    padding: 0.85rem 1.05rem 1rem;
  }
}

.production-file-sections,
.rough-cut-clip-section,
.rough-cut-clip-list {
  display: grid;
  gap: 1rem;
}

.production-file-section h3,
.rough-cut-clip-section h3 {
  margin: 0 0 0.75rem;
}

.production-file-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.production-file-row {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(12rem, 1.4fr) minmax(7rem, 0.8fr) minmax(5rem, 0.5fr) minmax(8rem, 0.8fr) auto;
  padding: 0.65rem 0.75rem;
}

.production-file-row + .production-file-row {
  border-top: 1px solid var(--line);
}

.production-file-head {
  background: rgba(23, 23, 23, 0.04);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rough-cut-clip-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.8fr);
  padding: 1rem;
}

.rough-cut-clip-main h4 {
  font-size: 1rem;
  margin: 0.25rem 0 0.75rem;
}

.rough-cut-clip-main dl {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 0.85rem;
}

.rough-cut-clip-main dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rough-cut-clip-main dd {
  font-weight: 800;
  margin: 0.15rem 0 0;
}

.rough-cut-selection {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  font-weight: 800;
}

.rough-cut-clip-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.rough-cut-clip-actions details {
  width: 100%;
}

.rough-cut-clip-actions summary:not(.btn-secondary):not(.btn-outline-secondary) {
  color: var(--brand-gold-strong);
  cursor: pointer;
  list-style: none;
  width: fit-content;
}

.rough-cut-clip-actions summary:not(.btn-secondary):not(.btn-outline-secondary):hover {
  color: var(--brand-black);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 3px;
}

.rough-cut-clip-actions summary {
  cursor: pointer;
  list-style: none;
  width: fit-content;
}

.rough-cut-clip-actions summary::-webkit-details-marker {
  display: none;
}

.rough-cut-clip-actions video {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  display: block;
  margin-top: 0.65rem;
  max-height: 360px;
  max-width: 720px;
  width: 100%;
}

.rough-cut-selection-actions,
.rough-cut-export-note {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.rough-cut-export-note p,
.rough-cut-export-note small {
  margin: 0;
}

.timeline-technical-details summary {
  color: var(--brand-gold-strong);
  cursor: pointer;
}

.timeline-technical-details summary:hover {
  color: var(--brand-black);
  text-decoration-color: var(--brand-gold);
}

.auth-page {
  background: #f7f6f1;
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-shell,
.auth-layout {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  width: 100%;
}

.auth-card {
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(13, 13, 13, 0.1);
  margin: 0 auto;
  max-width: 520px;
  padding: 2rem;
  transform: none;
  width: min(100%, 520px);
}

.auth-card:hover {
  transform: none;
}

.auth-brand {
  align-items: center;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.55rem;
  min-width: 0;
}

.auth-logo {
  display: block;
  flex: 0 0 auto;
  height: 44px;
  max-height: 44px;
  max-width: 150px;
  object-fit: contain;
  width: auto;
}

.auth-brand h1 {
  color: var(--brand-black);
  font-size: 1.72rem;
  font-weight: 780;
  line-height: 1.1;
  margin: 0;
}

.auth-brand p,
.auth-intro p,
.auth-hint {
  color: var(--brand-muted);
  line-height: 1.55;
  margin: 0;
}

.auth-brand p {
  font-size: 0.92rem;
  font-weight: 620;
  margin-top: 0.22rem;
}

.auth-intro {
  margin: -0.2rem 0 1.25rem;
}

.auth-hint {
  margin: 0 0 1.1rem;
}

.auth-alert {
  border-radius: 8px;
  margin-bottom: 1.2rem;
}

.auth-form {
  gap: 1.05rem;
}

.auth-form .form-field input {
  border-radius: 10px;
  min-height: 48px;
  width: 100%;
}

.auth-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  margin-top: 0.15rem;
}

.auth-actions .btn-brand,
.auth-actions .btn-brand-secondary {
  min-width: 150px;
}

.auth-secondary-link {
  color: var(--brand-gold-strong);
  font-size: 0.92rem;
  font-weight: 780;
  text-decoration: none;
}

.auth-secondary-link:hover {
  color: var(--brand-black);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 3px;
}

.auth-inline-button {
  margin-top: 0.2rem;
}

.totp-setup-grid {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  margin-bottom: 1.15rem;
}

.totp-qr-card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 0.75rem;
}

.totp-qr {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.secret-input,
.secret-box {
  background: var(--brand-card);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.secret-input {
  color: var(--brand-black);
}

.secret-box {
  padding: 0.85rem;
}

@media (max-width: 840px) {
  .production-file-row,
  .rough-cut-clip-card,
  .rough-cut-clip-main dl {
    grid-template-columns: 1fr;
  }

  .production-result-header {
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 58px;
    padding: 0.68rem;
  }

  .production-result-title {
    align-items: flex-start;
  }

  .production-result-actions {
    gap: 0.35rem;
  }

  .production-result-status {
    font-size: 0.62rem;
    padding: 0.22rem 0.42rem;
  }

  .production-result-panel {
    padding: 0.72rem;
  }

  .production-file-head {
    display: none;
  }

  .rough-cut-clip-actions {
    justify-content: flex-start;
  }

  .totp-setup-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell,
  .auth-layout {
    align-items: stretch;
    padding: 1rem;
  }

  .auth-card {
    align-self: center;
    max-width: 100%;
    padding: 1.35rem;
    width: 100%;
  }

  .auth-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .auth-logo {
    height: 38px;
    max-height: 38px;
    max-width: 132px;
  }

  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-actions .btn-brand,
  .auth-actions .btn-brand-secondary,
  .auth-secondary-link {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
}

/* Production Desk v1: production-first information architecture. */
.production-desk-page {
  align-content: start;
  align-items: start;
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: minmax(0, 1fr);
  max-width: min(1500px, calc(100vw - 48px));
  padding-bottom: var(--ff-space-8);
}

.production-desk-page > * {
  min-width: 0;
}

.production-desk-breadcrumb {
  align-items: center;
  color: var(--brand-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: var(--ff-space-2);
  order: 1;
  grid-column: 1 / -1;
}

.production-desk-breadcrumb a {
  color: var(--brand-muted);
  font-weight: 680;
  text-decoration: none;
}

.production-desk-breadcrumb a:hover {
  color: var(--brand-black);
}

.production-desk-breadcrumb strong {
  color: var(--brand-black);
  font-weight: 720;
}

.production-desk-header {
  align-items: end;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
  order: 2;
  padding: 0;
  grid-column: 1 / -1;
}

.production-desk-title-block {
  display: grid;
  gap: var(--ff-space-4);
  min-width: 0;
}

.production-desk-kicker {
  color: var(--brand-muted);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.production-desk-title-block h1 {
  color: var(--brand-black);
  font-size: clamp(1.85rem, 3vw, 3rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
  overflow-wrap: anywhere;
}

.production-desk-title-block p {
  color: var(--brand-muted);
  font-size: 0.94rem;
  font-weight: 620;
  margin: 0;
}

.production-desk-header-meta {
  align-items: center;
  color: var(--brand-muted);
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: var(--ff-space-2);
  justify-content: flex-end;
}

.production-desk-quick-nav {
  align-items: center;
  border-bottom: 1px solid rgba(232, 228, 219, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  order: 3;
  padding-bottom: var(--ff-space-3);
  grid-column: 1 / -1;
}

.production-desk-quick-nav a {
  border-radius: var(--ff-radius-sm);
  color: var(--brand-muted);
  font-size: 0.86rem;
  font-weight: 680;
  min-height: 32px;
  padding: 0 var(--ff-space-3);
  text-decoration: none;
  transition: background var(--ff-transition-fast), color var(--ff-transition-fast);
  align-items: center;
  display: inline-flex;
}

.production-desk-quick-nav a:hover,
.production-desk-quick-nav a:focus-visible {
  background: rgba(23, 23, 23, 0.045);
  color: var(--brand-black);
}

.production-desk-page .desk-next-action-card {
  align-items: center;
  background: linear-gradient(180deg, #fff, rgba(255, 252, 238, 0.78));
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-sm);
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  order: 4;
  padding: var(--ff-space-20, 20px);
  grid-column: 1 / -1;
  grid-row: auto;
}

.production-desk-page .next-action-main {
  align-items: center;
  display: flex;
  gap: var(--ff-space-4);
  min-width: 0;
}

.production-desk-page .next-action-icon {
  align-items: center;
  background: var(--brand-gold-soft);
  border: 1px solid rgba(255, 216, 77, 0.72);
  border-radius: var(--ff-radius-md);
  color: var(--brand-black);
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.production-desk-page .next-action-icon svg {
  height: 20px;
  width: 20px;
}

.production-desk-page .next-action-main h2 {
  color: var(--brand-black);
  font-size: clamp(1.18rem, 1.7vw, 1.55rem);
  font-weight: 740;
  line-height: 1.16;
  margin: 0.14rem 0 0;
}

.production-desk-page .next-action-main p,
.production-desk-page .next-action-main small {
  color: var(--brand-muted);
  line-height: 1.45;
  margin: 0.28rem 0 0;
}

.production-desk-page .next-action-control {
  justify-content: flex-end;
}

.production-desk-page .desk-progress-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: var(--ff-space-10, 10px);
  margin: 0;
  order: 5;
  padding: 0;
  grid-column: 1 / -1;
  grid-row: auto;
}

.production-desk-page .desk-progress-card .card-title-row {
  display: none;
}

.production-desk-page .desk-progress-header {
  align-items: center;
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: auto minmax(0, 1fr);
}

.production-desk-page .desk-progress-header > span {
  color: var(--brand-muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.production-desk-page .desk-progress-track {
  height: 8px;
}

.production-desk-page .desk-step-list {
  display: none;
}

.production-desk-page .production-monitor {
  background: #fff;
  border: 1px solid rgba(232, 228, 219, 0.92);
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-sm);
  margin: 0;
  order: 7;
  padding: var(--ff-space-2) var(--ff-space-3);
  grid-column: 1 / -1;
  grid-row: auto;
}

.production-desk-page .production-monitor-heading {
  align-items: center;
  gap: var(--ff-space-4);
}

.production-desk-page .production-monitor-compact {
  align-items: center;
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: minmax(280px, 1.1fr) minmax(360px, 2fr) auto;
  min-height: 46px;
  width: 100%;
}

.production-desk-page .production-monitor-compact-main,
.production-desk-page .production-monitor-compact-status {
  min-width: 0;
}

.production-desk-page .production-monitor-compact-main {
  display: grid;
  gap: 2px;
}

.production-desk-page .production-monitor-compact-main strong,
.production-desk-page .production-monitor-compact-main small {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.production-desk-page .production-monitor-compact-main strong {
  color: var(--brand-black);
  font-size: 0.98rem;
  font-weight: 720;
  line-height: 1.2;
}

.production-desk-page .production-monitor-compact-main small {
  color: var(--brand-muted);
  font-size: 0.78rem;
  font-weight: 640;
}

.production-desk-page .production-monitor-compact-status {
  align-items: end;
  color: var(--brand-muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 680;
  gap: var(--ff-space-2);
  justify-items: end;
  min-width: 0;
}

.production-desk-page .production-monitor-compact-status strong {
  color: var(--brand-black);
  font-size: 1.32rem;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.production-desk-page .production-monitor:not(.is-collapsed) .production-monitor-compact {
  grid-template-columns: 1fr;
  min-height: 0;
}

.production-desk-page .production-monitor:not(.is-collapsed) [data-monitor-compact-summary] {
  display: none;
}

.production-desk-page .production-monitor:not(.is-collapsed) [data-monitor-toggle] {
  justify-self: end;
}

.production-desk-page .production-monitor.is-collapsed {
  box-shadow: none;
  min-height: 64px;
}

.production-desk-page .production-monitor:not(.is-collapsed) {
  padding: var(--ff-space-20, 20px);
}

.production-desk-page .production-monitor-heading h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
  font-weight: 740;
}

.production-desk-page .production-monitor-heading p {
  color: var(--brand-muted);
  font-size: 0.94rem;
  font-weight: 620;
}

.production-desk-page .production-monitor-heading > strong,
.production-desk-page .production-monitor-heading-actions > strong {
  color: var(--brand-black);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 840;
}

.production-desk-page .production-monitor-grid {
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
}

.production-desk-page .production-monitor-current,
.production-desk-page .production-monitor-facts div,
.production-desk-page .production-monitor-live {
  background: rgba(250, 249, 245, 0.72);
  border-color: rgba(232, 228, 219, 0.82);
}

.production-desk-page .production-monitor-activity {
  display: none;
}

.production-desk-page .production-workspace {
  order: 6;
  grid-column: 1 / -1;
  grid-row: auto;
}

.production-desk-page .desk-layout {
  align-self: start;
  display: contents;
  gap: var(--ff-space-4);
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  order: 6;
  grid-column: 1 / -1;
  grid-row: auto;
}

.production-desk-page .desk-main {
  display: contents;
  gap: var(--ff-space-4);
}

.production-desk-page .desk-sidebar {
  order: 12;
  position: static;
}

.production-desk-page .desk-sidebar .app-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--ff-radius-md);
  box-shadow: none;
}

.production-desk-page .production-ai-settings {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(232, 228, 219, 0.9);
  border-radius: var(--ff-radius-lg);
  box-shadow: none;
  margin: 0;
  order: 13;
  padding: var(--ff-space-20, 20px);
  grid-column: 1 / -1;
  grid-row: auto;
}

.production-desk-page .production-ai-settings > .card-title-row h2::after {
  color: var(--brand-muted);
  content: "Kontext";
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  margin-left: var(--ff-space-2);
  text-transform: uppercase;
}

.production-desk-page .desk-panel,
.production-desk-page .production-work-card,
.production-desk-page .production-result-item,
.production-desk-page .asset-card,
.production-desk-page .desk-sidebar .app-card {
  border: 1px solid rgba(232, 228, 219, 0.86);
}

.production-desk-page .production-work-modules {
  background: #fff;
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-sm);
  order: 8;
}

.production-desk-section-copy {
  color: var(--brand-muted);
  font-size: 0.92rem;
  line-height: 1.48;
  margin: -0.2rem 0 var(--ff-space-3);
  max-width: 760px;
}

.production-work-modules .desk-overview-list,
.production-work-modules .production-ai-cost-card {
  display: none;
}

.production-work-modules .production-result-list {
  gap: var(--ff-space-10, 10px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.production-work-modules .production-result-item {
  min-height: 76px;
}

.production-desk-page .production-result-header {
  min-height: 58px;
  padding: var(--ff-space-2) var(--ff-space-3);
}

.production-desk-page .production-result-title > svg,
.production-desk-page .production-result-title > i {
  color: var(--brand-black);
  height: 1rem;
  width: 1rem;
}

.production-desk-page .production-result-title strong {
  font-size: 0.94rem;
  font-weight: 720;
}

.production-desk-page .production-result-summary {
  font-size: 0.76rem;
}

.production-desk-page .production-result-status {
  align-items: center;
  background: var(--ff-status-neutral-bg, rgba(23, 23, 23, 0.04));
  border: 1px solid var(--ff-status-neutral-border, rgba(23, 23, 23, 0.08));
  border-radius: var(--ff-radius-pill);
  color: var(--brand-muted);
  display: inline-flex;
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.03em;
  line-height: 1;
  min-height: 24px;
  padding: 0 var(--ff-space-2);
  text-transform: uppercase;
  white-space: nowrap;
}

.production-desk-page .production-result-status[data-status="vorhanden"] {
  background: rgba(47, 125, 75, 0.08);
  border-color: rgba(47, 125, 75, 0.22);
  color: var(--status-green);
}

.production-desk-page .production-result-status[data-status="fehlt"] {
  background: rgba(117, 111, 98, 0.07);
  border-color: rgba(117, 111, 98, 0.16);
}

.production-desk-page .production-analysis-section,
.production-desk-page .production-material-section,
.production-desk-page .production-diagnostics-section {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--ff-radius-lg);
  box-shadow: none;
}

.production-desk-page .production-material-section {
  order: 9;
}

.production-desk-page .production-analysis-section {
  order: 10;
}

.production-desk-page .production-diagnostics-section {
  order: 11;
  padding: 0;
}

.production-analysis-section .production-result-list,
.production-material-section .asset-card-list {
  gap: var(--ff-space-2);
}

.production-desk-page .asset-card {
  background: #fff;
  border-radius: var(--ff-radius-md);
  box-shadow: none;
  gap: var(--ff-space-3);
  padding: var(--ff-space-14, 14px);
}

.production-desk-page .asset-card-icon {
  background: rgba(23, 23, 23, 0.035);
  border-color: rgba(23, 23, 23, 0.06);
  border-radius: var(--ff-radius-sm);
  color: var(--brand-muted);
  height: 36px;
  width: 36px;
}

.production-desk-page .asset-card-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.production-diagnostics-accordion {
  background: transparent;
  border-radius: inherit;
}

.production-diagnostics-accordion > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
  list-style: none;
  min-height: 74px;
  padding: var(--ff-space-20, 20px);
}

.production-diagnostics-accordion > summary::-webkit-details-marker {
  display: none;
}

.production-diagnostics-summary-title {
  align-items: center;
  display: flex;
  gap: var(--ff-space-3);
  min-width: 0;
}

.production-diagnostics-summary-title > svg,
.production-diagnostics-summary-title > i {
  color: var(--brand-muted);
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.production-diagnostics-summary-title strong,
.production-diagnostics-summary-title small {
  display: block;
}

.production-diagnostics-summary-title strong {
  color: var(--brand-black);
  font-size: 1rem;
  font-weight: 720;
}

.production-diagnostics-summary-title small {
  color: var(--brand-muted);
  font-size: 0.82rem;
  margin-top: 0.12rem;
}

.production-diagnostics-summary-action {
  align-items: center;
  color: var(--brand-muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 680;
  gap: 6px;
}

.production-diagnostics-summary-action svg {
  height: 16px;
  transition: transform var(--ff-transition-fast);
  width: 16px;
}

.production-diagnostics-accordion[open] .production-diagnostics-summary-action svg {
  transform: rotate(180deg);
}

.production-diagnostics-panel {
  border-top: 1px solid rgba(232, 228, 219, 0.78);
  padding: var(--ff-space-4);
}

.production-desk-page .desk-timeline > li {
  border-radius: var(--ff-radius-md);
  box-shadow: none;
  padding: var(--ff-space-3);
}

.production-desk-page .ff-button-primary,
.production-desk-page .ff-button-secondary,
.production-desk-page .next-action-button {
  border-radius: var(--ff-radius-sm);
  min-height: 36px;
}

.production-desk-page .ff-button-primary {
  font-weight: 680;
}

.production-desk-page .ff-button-secondary {
  font-weight: 640;
}

.production-desk-page .production-work-card-action {
  min-width: 0;
  white-space: nowrap;
}

.production-desk-page .status-chip,
.production-desk-page .status-chip-blue,
.production-desk-page .status-chip-neutral {
  border-radius: var(--ff-radius-pill);
}

@media (max-width: 1100px) {
  .production-desk-page {
    grid-template-columns: 1fr;
  }

  .production-desk-page .production-monitor,
  .production-desk-page .desk-layout {
    grid-column: 1;
    grid-row: auto;
  }

  .production-desk-page .desk-next-action-card,
  .production-desk-page .desk-progress-card,
  .production-desk-page .production-workspace,
  .production-desk-page .production-ai-settings {
    grid-column: 1;
    grid-row: auto;
  }

  .production-work-modules .production-result-list,
  .production-desk-page .production-monitor-grid,
  .production-desk-page .asset-card-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .production-desk-page {
    max-width: 100%;
  }

  .production-desk-header,
  .production-desk-page .desk-next-action-card,
  .production-desk-page .next-action-main,
  .production-desk-page .production-monitor-heading {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .production-desk-header-meta,
  .production-desk-page .next-action-control {
    justify-content: flex-start;
  }

  .production-diagnostics-accordion > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* FoxFlow UX Sprint 5: KI Studio as creative strategy workspace */
.ai-studio-page {
  display: grid;
  gap: var(--ff-space-8);
  margin: 0 auto;
  max-width: 1380px;
}

.ai-studio-hero,
.ai-ide-header {
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.18), rgba(255, 255, 255, 0) 42%),
    var(--ff-color-surface);
  border: 1px solid rgba(231, 225, 213, 0.92);
  border-radius: var(--ff-radius-xl);
  box-shadow: var(--ff-shadow-sm);
  margin-bottom: 0;
  padding: var(--ff-space-6);
}

.ai-studio-hero h1,
.ai-ide-header h1 {
  color: var(--ff-color-text);
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.98;
  margin: var(--ff-space-2) 0 0;
  max-width: 860px;
}

.ai-studio-hero p,
.ai-ide-header p {
  color: var(--ff-color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: var(--ff-space-3) 0 0;
  max-width: 720px;
}

.ai-studio-hero-actions {
  justify-content: flex-end;
}

.ai-section-heading {
  align-items: end;
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  margin-bottom: var(--ff-space-4);
}

.ai-section-heading h2 {
  color: var(--ff-color-text);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 720;
  letter-spacing: 0;
  margin: var(--ff-space-1) 0 0;
}

.ai-section-heading p {
  color: var(--ff-color-text-muted);
  line-height: 1.55;
  margin: 0;
}

.ai-strategy-card-grid {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-learning-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.ai-learning-metrics article {
  display: grid;
  gap: var(--space-2);
}

.ai-learning-metrics strong {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.ai-strategy-card {
  align-content: start;
  display: grid;
  gap: var(--ff-space-4);
  min-height: 310px;
}

.ai-strategy-card-header {
  align-items: start;
  display: flex;
  gap: var(--ff-space-3);
  justify-content: space-between;
}

.ai-strategy-card h3 {
  color: var(--ff-color-text);
  font-size: 1.28rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.15;
  margin: var(--ff-space-1) 0 0;
}

.ai-strategy-category,
.ai-history-time {
  color: var(--ff-color-text-muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-strategy-card-description {
  color: var(--ff-color-text-muted);
  line-height: 1.5;
  margin: 0;
  min-height: 3rem;
}

.ai-strategy-legacy-note {
  align-self: start;
  background: var(--ff-color-surface-subtle);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-sm);
  color: var(--ff-color-text-muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  margin: calc(var(--ff-space-2) * -1) 0 0;
  padding: var(--ff-space-1) var(--ff-space-2);
}

.ai-strategy-card-meta {
  border-top: 1px solid var(--ff-color-border);
  display: grid;
  gap: var(--ff-space-3);
  margin: 0;
  padding-top: var(--ff-space-4);
}

.ai-strategy-card-meta div,
.ai-ide-status div {
  background: var(--ff-color-surface-subtle);
  border: 1px solid rgba(231, 225, 213, 0.74);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-3);
}

.ai-strategy-card-meta dt,
.ai-ide-status dt,
.ai-history-row dt {
  color: var(--ff-color-text-muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ai-strategy-card-meta dd,
.ai-ide-status dd,
.ai-history-row dd {
  color: var(--ff-color-text);
  font-weight: 650;
  margin: var(--ff-space-1) 0 0;
  overflow-wrap: anywhere;
}

.ai-strategy-card-actions,
.ai-create-actions {
  align-self: end;
  justify-content: flex-start;
}

.ai-strategy-library-filter {
  justify-content: flex-end;
}

.ai-strategy-danger-zone {
  margin-top: var(--ff-space-5);
}

.ai-strategy-action-row {
  align-items: center;
  gap: var(--ff-space-3);
  margin-top: var(--ff-space-4);
}

.ai-strategy-action-row form {
  margin: 0;
}

.ai-strategy-delete-disclosure {
  margin: 0;
}

.ai-strategy-delete-disclosure summary.ff-button-danger {
  cursor: pointer;
  list-style: none;
}

.ai-strategy-delete-disclosure summary.ff-button-danger::-webkit-details-marker {
  display: none;
}

.ai-strategy-delete-panel {
  border-top: 1px solid var(--ff-color-border);
  display: grid;
  gap: var(--ff-space-4);
  margin-top: var(--ff-space-4);
  min-width: min(520px, 100%);
  padding-top: var(--ff-space-4);
}

.ai-strategy-usage-list {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--ff-space-4) 0;
}

.ai-strategy-usage-list div {
  background: var(--ff-color-surface-subtle);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-3);
}

.ai-strategy-usage-list dt {
  color: var(--ff-color-text-muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ai-strategy-usage-list dd {
  color: var(--ff-color-text);
  font-size: 1.1rem;
  font-weight: 720;
  margin: var(--ff-space-1) 0 0;
}

.ai-strategy-usage-productions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  margin-bottom: var(--ff-space-4);
}

.ai-strategy-usage-productions strong {
  color: var(--ff-color-text);
  font-size: 0.9rem;
}

.ai-strategy-usage-productions a {
  color: var(--ff-color-text);
  text-decoration: underline;
  text-decoration-color: var(--ff-color-border-strong);
  text-underline-offset: 0.18em;
}

.ai-studio-empty-state {
  max-width: 620px;
}

.ai-strategy-create-form {
  display: grid;
  gap: var(--ff-space-6);
}

.ai-create-overview-grid {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-create-description {
  grid-column: span 2;
}

.ai-prompt-create-grid {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-prompt-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.62;
  min-height: 300px;
  resize: vertical;
}

.ai-studio-accordion {
  border-radius: var(--ff-radius-lg);
}

.ai-studio-accordion > summary {
  align-items: center;
  color: var(--ff-color-text);
  cursor: pointer;
  display: flex;
  font-weight: 700;
  gap: var(--ff-space-2);
  list-style: none;
}

.ai-studio-accordion > summary::-webkit-details-marker {
  display: none;
}

.ai-studio-accordion[open] > summary {
  border-bottom: 1px solid var(--ff-color-border);
  margin-bottom: var(--ff-space-4);
  padding-bottom: var(--ff-space-3);
}

.ai-accordion-body {
  display: grid;
  gap: var(--ff-space-4);
}

.ai-ide-header {
  align-items: end;
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}

.ai-ide-status {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.ai-ide-tabs {
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-pill);
  box-shadow: var(--ff-shadow-xs);
  display: inline-flex;
  margin: var(--ff-space-4) 0 var(--ff-space-6);
  padding: var(--ff-space-1);
}

.ai-ide-tabs .ff-button-ghost {
  min-height: 34px;
}

.ai-ide-shell,
.ai-test-layout {
  align-items: start;
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.ai-ide-main,
.ai-ide-sidebar {
  display: grid;
  gap: var(--ff-space-4);
  min-width: 0;
}

.ai-ide-sidebar {
  position: sticky;
  top: 104px;
}

.ai-prompt-workspace {
  min-height: 720px;
}

.ai-prompt-workspace-header {
  align-items: start;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
  margin-bottom: var(--ff-space-4);
}

.ai-prompt-workspace-header h2 {
  color: var(--ff-color-text);
  font-size: 1.6rem;
  font-weight: 720;
  letter-spacing: 0;
  margin: var(--ff-space-1) 0 0;
}

.ai-ide-fields {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-ide-fields .form-field:first-child,
.ai-ide-fields .form-field:nth-child(2) {
  grid-column: span 2;
}

.ai-ide-fields .ai-prompt-editor {
  min-height: 260px;
}

.ai-variable-card {
  background: var(--ff-color-surface);
  border-color: var(--ff-color-border);
  border-radius: var(--ff-radius-md);
}

.ai-variable-card button.ff-button-ghost {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--ff-radius-pill);
  color: var(--ff-color-text-muted);
  min-height: 32px;
  padding: 0 var(--ff-space-3);
}

.ai-variable-card button.ff-button-ghost:hover {
  background: var(--ff-color-surface-subtle);
  color: var(--ff-color-text);
}

.ai-test-workbench {
  min-height: 560px;
}

.ai-test-form {
  align-items: end;
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: var(--ff-space-4);
}

.ai-test-run {
  display: inline-flex;
  margin: 0 var(--ff-space-2) var(--ff-space-4) 0;
}

.ai-provider-compare-fieldset {
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-3);
  margin: 0 0 var(--ff-space-3);
  padding: var(--ff-space-3);
}

.ai-history-list {
  display: grid;
  gap: var(--ff-space-3);
}

.ai-history-row {
  align-items: start;
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-lg);
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  padding: var(--ff-space-4);
}

.ai-history-row h3 {
  color: var(--ff-color-text);
  font-size: 1rem;
  font-weight: 700;
  margin: var(--ff-space-1) 0 var(--ff-space-2);
}

.ai-history-row p {
  color: var(--ff-color-text-muted);
  line-height: 1.45;
  margin: 0;
}

.ai-history-row dl {
  display: grid;
  gap: var(--ff-space-2);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}

.ai-debug-panel {
  margin-top: var(--ff-space-6);
}

@media (max-width: 1180px) {
  .ai-strategy-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-create-overview-grid,
  .ai-prompt-create-grid,
  .ai-ide-shell,
  .ai-test-layout,
  .ai-ide-header {
    grid-template-columns: 1fr;
  }

  .ai-ide-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .ai-studio-hero,
  .ai-section-heading,
  .ai-studio-hero-actions,
  .ai-prompt-workspace-header,
  .ai-history-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .ai-strategy-card-grid,
  .ai-create-overview-grid,
  .ai-prompt-create-grid,
  .ai-ide-fields,
  .ai-history-row dl {
    grid-template-columns: 1fr;
  }

  .ai-create-description,
  .ai-ide-fields .form-field:first-child,
  .ai-ide-fields .form-field:nth-child(2) {
    grid-column: auto;
  }

  .ai-test-form {
    grid-template-columns: 1fr;
  }
}

/* FoxFlow UX Sprint 6: System Center */
.system-center-page {
  display: grid;
  gap: var(--ff-space-8);
  margin: 0 auto;
  max-width: 1320px;
}

.system-center-hero {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.16), rgba(255, 255, 255, 0) 42%),
    var(--ff-color-surface);
  border: 1px solid rgba(231, 225, 213, 0.92);
  border-radius: var(--ff-radius-xl);
  box-shadow: var(--ff-shadow-sm);
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: var(--ff-space-6);
}

.system-center-hero h1 {
  color: var(--ff-color-text);
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.98;
  margin: var(--ff-space-2) 0 0;
}

.system-center-hero p {
  color: var(--ff-color-text-muted);
  line-height: 1.6;
  margin: var(--ff-space-3) 0 0;
  max-width: 680px;
}

.system-center-actions {
  justify-content: flex-end;
}

.system-health-overview {
  display: grid;
  gap: var(--ff-space-6);
}

.system-health-main {
  align-items: stretch;
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
}

.system-health-status {
  align-items: center;
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: auto minmax(0, 1fr);
}

.system-health-indicator {
  border-radius: 999px;
  display: block;
  height: 18px;
  position: relative;
  width: 18px;
}

.system-health-indicator::after {
  border-radius: inherit;
  content: "";
  inset: -8px;
  opacity: 0.14;
  position: absolute;
}

.system-health-indicator.is-ready,
.system-health-indicator.is-ready::after {
  background: var(--ff-color-success);
}

.system-health-indicator.is-error,
.system-health-indicator.is-error::after {
  background: var(--ff-color-error);
}

.system-health-status h2 {
  color: var(--ff-color-text);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  margin: var(--ff-space-1) 0 0;
}

.system-health-status p {
  color: var(--ff-color-text-muted);
  line-height: 1.55;
  margin: var(--ff-space-3) 0 0;
}

.system-health-summary {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-health-summary div,
.system-storage-item {
  background: var(--ff-color-surface-subtle);
  border: 1px solid rgba(231, 225, 213, 0.74);
  border-radius: var(--ff-radius-md);
  display: grid;
  gap: var(--ff-space-1);
  padding: var(--ff-space-3);
}

.system-health-summary span,
.system-storage-item span {
  color: var(--ff-color-text-muted);
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-health-summary strong,
.system-storage-item strong {
  color: var(--ff-color-text);
  font-size: 1rem;
  font-weight: 700;
}

.system-section-heading {
  align-items: end;
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  margin-bottom: var(--ff-space-4);
}

.system-section-heading h2 {
  color: var(--ff-color-text);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 720;
  letter-spacing: 0;
  margin: var(--ff-space-1) 0 0;
}

.system-section-heading p {
  color: var(--ff-color-text-muted);
  line-height: 1.55;
  margin: 0;
}

.system-attention-line,
.system-attention-item {
  align-items: center;
  display: flex;
  gap: var(--ff-space-3);
}

.system-attention-line strong,
.system-attention-item strong {
  color: var(--ff-color-text);
  font-weight: 700;
}

.system-attention-line span:last-child,
.system-attention-item p {
  color: var(--ff-color-text-muted);
  margin: 0;
}

.system-attention-list,
.system-service-list {
  display: grid;
  gap: var(--ff-space-3);
}

.system-service-row {
  align-items: center;
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.system-service-icon {
  align-items: center;
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-text);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.system-service-icon svg,
.system-service-icon i {
  height: 18px;
  width: 18px;
}

.system-service-copy {
  display: grid;
  gap: var(--ff-space-1);
}

.system-service-copy strong {
  color: var(--ff-color-text);
  font-size: 1rem;
  font-weight: 700;
}

.system-service-copy span {
  color: var(--ff-color-text-muted);
  font-size: 0.9rem;
}

.system-storage-grid {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-storage-item small {
  color: var(--ff-color-text-muted);
  line-height: 1.45;
}

.system-logs-accordion,
.system-diagnostics-accordion {
  overflow: visible;
}

.system-logs-accordion > summary,
.system-diagnostics-accordion > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
  list-style: none;
}

.system-logs-accordion > summary::-webkit-details-marker,
.system-diagnostics-accordion > summary::-webkit-details-marker {
  display: none;
}

.system-logs-accordion summary strong,
.system-diagnostics-accordion summary strong {
  color: var(--ff-color-text);
  display: block;
  font-size: 1rem;
  font-weight: 720;
  margin-top: var(--ff-space-1);
}

.system-logs-accordion[open] > summary,
.system-diagnostics-accordion[open] > summary {
  border-bottom: 1px solid var(--ff-color-border);
  margin-bottom: var(--ff-space-4);
  padding-bottom: var(--ff-space-3);
}

.system-log-list,
.system-diagnostic-list {
  display: grid;
  gap: var(--ff-space-3);
}

.system-log-list > p {
  color: var(--ff-color-text-muted);
  margin: 0;
}

.system-log-row {
  align-items: start;
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--ff-space-3);
}

.system-log-row strong,
.system-diagnostic-list strong {
  color: var(--ff-color-text);
  font-weight: 700;
}

.system-log-row p,
.system-diagnostic-list span,
.system-diagnostic-list small {
  color: var(--ff-color-text-muted);
  margin: 0;
}

.system-diagnostics-grid {
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-diagnostics-grid h3 {
  color: var(--ff-color-text);
  font-size: 1rem;
  font-weight: 720;
  margin: 0 0 var(--ff-space-3);
}

.system-diagnostic-list article {
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
  display: grid;
  gap: var(--ff-space-1);
  padding: var(--ff-space-3);
}

.system-diagnostic-list em {
  color: var(--ff-color-text-muted);
  font-style: normal;
  font-weight: 650;
}

.system-capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  margin-top: var(--ff-space-2);
}

@media (max-width: 1100px) {
  .system-health-main,
  .system-section-heading,
  .system-diagnostics-grid {
    grid-template-columns: 1fr;
  }

  .system-storage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .system-center-hero,
  .system-health-summary,
  .system-storage-grid,
  .system-service-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .system-center-actions,
  .system-logs-accordion > summary,
  .system-diagnostics-accordion > summary {
    align-items: stretch;
    flex-direction: column;
  }
}

/* FoxFlow UX Sprint 7: Settings as product configuration */
.settings-product-page {
  display: grid;
  gap: var(--ff-space-6);
  margin: 0 auto;
  max-width: 1320px;
}

.settings-product-header {
  background: var(--ff-color-surface);
  border: 1px solid rgba(231, 225, 213, 0.92);
  border-radius: var(--ff-radius-xl);
  box-shadow: var(--ff-shadow-sm);
  padding: var(--ff-space-6);
}

.settings-product-header h1 {
  color: var(--ff-color-text);
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  margin: var(--ff-space-2) 0 0;
}

.settings-product-header p {
  color: var(--ff-color-text-muted);
  line-height: 1.55;
  margin: var(--ff-space-3) 0 0;
  max-width: 620px;
}

.settings-product-layout {
  align-items: start;
  display: grid;
  gap: var(--ff-space-6);
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.settings-product-nav {
  display: grid;
  gap: var(--ff-space-1);
  position: sticky;
  top: 104px;
}

.settings-product-nav-item {
  align-items: center;
  border-radius: var(--ff-radius-md);
  color: var(--ff-color-text-muted);
  display: grid;
  font-weight: 680;
  gap: var(--ff-space-2);
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 0 var(--ff-space-3);
  text-decoration: none;
  transition:
    background var(--ff-transition-base),
    color var(--ff-transition-base);
}

.settings-product-nav-item:hover,
.settings-product-nav-item.is-active {
  background: var(--ff-color-surface);
  color: var(--ff-color-text);
}

.settings-product-nav-item.is-active {
  box-shadow: var(--ff-shadow-xs);
}

.settings-product-nav-item.is-disabled {
  cursor: default;
  opacity: 0.62;
}

.settings-product-nav-item svg,
.settings-product-nav-item i {
  height: 17px;
  width: 17px;
}

.settings-product-nav-item small {
  color: var(--ff-color-text-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.settings-product-main,
.settings-product-form {
  display: grid;
  gap: var(--ff-space-6);
  min-width: 0;
}

.settings-category-header {
  padding-bottom: 0;
}

.settings-category-header h2 {
  color: var(--ff-color-text);
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  font-weight: 740;
  letter-spacing: 0;
  margin: var(--ff-space-1) 0 0;
}

.settings-category-header p {
  color: var(--ff-color-text-muted);
  line-height: 1.55;
  margin: var(--ff-space-2) 0 0;
  max-width: 680px;
}

.settings-config-card,
.settings-provider-config-card {
  display: grid;
  gap: var(--ff-space-6);
}

.settings-card-heading {
  align-items: start;
  display: flex;
  gap: var(--ff-space-4);
  justify-content: space-between;
}

.settings-card-heading h3 {
  color: var(--ff-color-text);
  font-size: 1.28rem;
  font-weight: 720;
  margin: 0;
}

.settings-card-heading p {
  color: var(--ff-color-text-muted);
  line-height: 1.5;
  margin: var(--ff-space-2) 0 0;
  max-width: 680px;
}

.settings-provider-card-grid {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-provider-card {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 86px;
  transition:
    border-color var(--ff-transition-base),
    box-shadow var(--ff-transition-base),
    transform var(--ff-transition-base);
}

.settings-provider-card:hover,
.settings-provider-card.is-active {
  border-color: var(--ff-color-border-strong);
  box-shadow: var(--ff-shadow-sm);
}

.settings-provider-card.is-active {
  background: linear-gradient(135deg, rgba(255, 216, 77, 0.12), rgba(255, 255, 255, 0));
}

.settings-provider-card input {
  accent-color: var(--ff-color-accent);
  height: 18px;
  width: 18px;
}

.settings-provider-card-copy {
  display: grid;
  gap: var(--ff-space-1);
  min-width: 0;
}

.settings-provider-card-copy strong,
.ai-provider-header h2 {
  color: var(--ff-color-text);
  font-size: 1.05rem;
  font-weight: 720;
  margin: 0;
}

.settings-provider-card-copy small {
  color: var(--ff-color-text-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.settings-field-panel {
  background: var(--ff-color-surface-subtle);
  border: 1px solid rgba(231, 225, 213, 0.74);
  border-radius: var(--ff-radius-lg);
  padding: var(--ff-space-4);
}

.settings-field-grid,
.ai-provider-fields {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-product-actions {
  border-top: 1px solid var(--ff-color-border);
  padding-top: var(--ff-space-4);
}

.settings-provider-config-card > form {
  display: grid;
  gap: var(--ff-space-4);
}

.settings-provider-config-card .ai-provider-dashboard {
  display: grid;
  gap: var(--ff-space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-provider-config-card .ai-provider-dashboard div {
  background: var(--ff-color-surface-subtle);
  border: 1px solid rgba(231, 225, 213, 0.74);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-3);
}

.settings-provider-config-card .ai-provider-dashboard span,
.settings-provider-config-card .ai-provider-models > span {
  color: var(--ff-color-text-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-provider-config-card .ai-provider-dashboard strong {
  color: var(--ff-color-text);
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: var(--ff-space-1);
  overflow-wrap: anywhere;
}

.settings-provider-config-card .ai-provider-advanced,
.settings-provider-config-card .ai-provider-other-models,
.settings-provider-config-card .ai-provider-diagnostics,
.settings-provider-config-card .ai-provider-history,
.ai-provider-more {
  background: var(--ff-color-surface-subtle);
  border: 1px solid rgba(231, 225, 213, 0.74);
  border-radius: var(--ff-radius-lg);
  padding: var(--ff-space-4);
}

.settings-provider-config-card .ai-provider-advanced > summary,
.settings-provider-config-card .ai-provider-other-models > summary,
.settings-provider-config-card .ai-provider-diagnostics > summary,
.settings-provider-config-card .ai-provider-history > summary,
.ai-provider-more > summary {
  color: var(--ff-color-text);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.settings-provider-config-card .ai-provider-advanced > summary::-webkit-details-marker,
.settings-provider-config-card .ai-provider-other-models > summary::-webkit-details-marker,
.settings-provider-config-card .ai-provider-diagnostics > summary::-webkit-details-marker,
.settings-provider-config-card .ai-provider-history > summary::-webkit-details-marker,
.ai-provider-more > summary::-webkit-details-marker {
  display: none;
}

.settings-provider-config-card .ai-provider-models ul {
  display: grid;
  gap: var(--ff-space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: var(--ff-space-2) 0 0;
  padding: 0;
}

.settings-provider-config-card .ai-provider-models li {
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: var(--ff-radius-md);
}

.settings-provider-config-card .ai-provider-actions {
  border-top: 1px solid var(--ff-color-border);
  padding-top: var(--ff-space-4);
}

@media (max-width: 1100px) {
  .settings-product-layout {
    grid-template-columns: 1fr;
  }

  .settings-product-nav {
    display: flex;
    flex-wrap: wrap;
    position: static;
  }

  .settings-product-nav-item {
    flex: 1 1 160px;
  }

  .settings-provider-config-card .ai-provider-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .settings-provider-card-grid,
  .settings-field-grid,
  .ai-provider-fields,
  .settings-provider-config-card .ai-provider-dashboard,
  .settings-provider-config-card .ai-provider-models ul {
    grid-template-columns: 1fr;
  }

  .settings-card-heading,
  .settings-product-actions,
  .settings-provider-card {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}
/* YouTube channel workspace – Phase 1 */
.channel-page {
  display: grid;
  gap: var(--ff-space-6);
}

.channel-header {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  gap: var(--ff-space-6);
}

.channel-header h1,
.channel-header p,
.channel-video-card h2,
.channel-task h2 {
  margin: 0;
}

.channel-header p {
  color: var(--ff-color-text-muted);
}

.channel-subnav {
  border-bottom: 1px solid var(--ff-color-border);
  display: flex;
  gap: var(--ff-space-2);
  overflow-x: auto;
}

.channel-subnav a {
  border-bottom: 2px solid transparent;
  color: var(--ff-color-text-muted);
  padding: var(--ff-space-3) var(--ff-space-4);
  text-decoration: none;
  white-space: nowrap;
}

.channel-subnav a.is-active {
  border-color: var(--ff-color-accent);
  color: var(--ff-color-text);
  font-weight: 750;
}

.channel-period,
.channel-video-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--ff-space-3);
}

.channel-period-links,
.channel-custom-period {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
}

.channel-custom-period label {
  align-items: center;
  display: flex;
  gap: var(--ff-space-2);
}

.channel-kpis {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.channel-kpis article {
  display: grid;
  gap: var(--ff-space-2);
}

.channel-kpis span,
.channel-kpis small,
.channel-result-count,
.channel-section-heading span,
.channel-video-card p {
  color: var(--ff-color-text-muted);
}

.channel-kpis strong {
  font-size: 1.8rem;
  white-space: nowrap;
}

.channel-section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: var(--ff-space-4);
}

.channel-bars {
  align-items: end;
  display: flex;
  gap: 3px;
  height: 190px;
  margin-top: var(--ff-space-6);
}

.channel-bar {
  background: var(--ff-color-surface-subtle);
  border-radius: 3px 3px 0 0;
  flex: 1 1 4px;
  height: 100%;
  min-width: 2px;
  position: relative;
}

.channel-bar span {
  background: var(--ff-color-accent);
  border-radius: inherit;
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
}

.channel-data-note,
.ff-inline-alert {
  background: var(--ff-color-info-bg);
  border: 1px solid var(--ff-color-info);
  border-radius: var(--ff-radius-md);
  padding: var(--ff-space-4);
}

.ff-inline-alert.is-error,
.channel-error {
  background: var(--ff-color-error-bg);
  border-color: var(--ff-color-error);
}

.channel-video-filters .ff-input {
  flex: 1 1 280px;
}

.channel-video-grid {
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.channel-video-card {
  overflow: hidden;
  padding: 0;
}

.channel-video-card > img {
  aspect-ratio: 16 / 9;
  background: var(--ff-color-surface-subtle);
  display: block;
  object-fit: cover;
  width: 100%;
}

.channel-video-body {
  display: grid;
  gap: var(--ff-space-3);
  padding: var(--ff-space-4);
}

.channel-video-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-space-2);
  min-height: 24px;
}

.channel-video-card h2 {
  display: -webkit-box;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.35;
  min-height: 4.05em;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.channel-video-date {
  font-size: 0.86rem;
  margin: 0;
}

.channel-video-stats {
  display: grid;
  gap: var(--ff-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.channel-video-stats div,
.channel-definition-list div {
  display: grid;
  gap: var(--ff-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
}

.channel-video-stats dt,
.channel-definition-list dt {
  color: var(--ff-color-text-muted);
  font-weight: 500;
}

.channel-video-stats dd,
.channel-definition-list dd {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.channel-video-stats .channel-video-stat-wide {
  grid-column: 1 / -1;
}

.channel-pagination {
  align-items: center;
  display: flex;
  justify-content: center;
  gap: var(--ff-space-4);
}

.channel-task-list,
.channel-settings-grid {
  display: grid;
  gap: var(--ff-space-4);
}

.channel-task {
  align-items: center;
  display: grid;
  gap: var(--ff-space-4);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.channel-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-definition-list {
  display: grid;
  gap: var(--ff-space-3);
}

.channel-danger-zone {
  border-color: var(--ff-color-error);
}

.channel-danger-zone form {
  display: inline-block;
  margin: 0 var(--ff-space-2) var(--ff-space-3) 0;
}

@media (max-width: 760px) {
  .channel-header,
  .channel-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .channel-settings-grid {
    grid-template-columns: 1fr;
  }

  .channel-task {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .channel-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-video-stats {
    grid-template-columns: 1fr;
  }

  .channel-video-stats .channel-video-stat-wide {
    grid-column: auto;
  }
}

.archive-progress {
  background: linear-gradient(145deg, #fff 0%, #fffdf6 100%);
  border: 1px solid #e9e3d6;
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(45, 38, 20, .13);
  display: grid;
  gap: 16px;
  margin: 20px 0;
  overflow: hidden;
  padding: 20px 22px;
}

.archive-progress[hidden] { display: none; }
.highlight-player [data-player-download][hidden],
.highlight-player [data-player-open][hidden] { display: none !important; }
.archive-progress-header { align-items: center; display: grid; gap: 14px; grid-template-columns: auto minmax(0, 1fr) auto; }
.archive-progress-icon { align-items: center; background: #fff3bd; border: 1px solid #f2d45a; border-radius: 13px; color: #8c7000; display: inline-flex; height: 44px; justify-content: center; width: 44px; }
.archive-progress-icon svg { height: 21px; width: 21px; }
.archive-progress-copy { display: grid; gap: 3px; min-width: 0; }
.archive-progress-copy > span { color: #9a7a00; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.archive-progress-copy strong { color: #171717; font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-progress-percent { color: #171717; font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.archive-progress-track { background: #eeeae0; border-radius: 999px; height: 10px; overflow: hidden; position: relative; }
.archive-progress-track > span { background: linear-gradient(90deg, #e4b600 0%, #ffd84b 100%); border-radius: inherit; box-shadow: 0 0 14px rgba(228, 182, 0, .38); display: block; height: 100%; min-width: 4px; transition: width .45s ease; width: 0; }
.archive-progress-footer { align-items: center; color: #6d6a61; display: flex; font-size: 12px; gap: 16px; justify-content: space-between; }
.archive-progress-footer small:first-child { color: #37352f; font-variant-numeric: tabular-nums; font-weight: 700; }
.archive-progress-floating { bottom: 26px; left: 50%; margin: 0; max-width: 720px; position: fixed; transform: translateX(-50%); width: calc(100% - 48px); z-index: 1000; }
@media (max-width: 640px) {
  .archive-progress { border-radius: 16px; padding: 16px; }
  .archive-progress-copy strong { white-space: normal; }
  .archive-progress-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* Editorial Command Center -------------------------------------------------
   Global shell and shared surface contract approved in the 2026-08-20 UX sprint. */
:root {
  --ff-command-sidebar-width: 236px;
  --ff-command-topbar-height: 68px;
  --ff-color-bg: #f5f3ed;
  --ff-color-surface-subtle: #f8f7f3;
  --ff-color-surface-muted: #efede6;
  --ff-color-border: #e6e1d7;
  --ff-color-border-strong: #d6d0c4;
  --ff-radius-md: 9px;
  --ff-radius-lg: 12px;
  --ff-radius-xl: 16px;
  --ff-shadow-sm: 0 5px 18px rgba(35, 31, 23, 0.045);
  --ff-shadow-md: 0 18px 48px rgba(35, 31, 23, 0.1);
}

html { background: var(--ff-color-bg); overflow-x: hidden; }
body.ff-command-body {
  background: var(--ff-color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}
body.command-navigation-open { overflow: hidden; }

.ff-command-shell,
.ff-command-main,
.ff-command-topbar,
.ff-command-sidebar,
.app-main,
.ff-page-shell { min-width: 0; }

.ff-command-shell { min-height: 100vh; width: 100%; }
.ff-command-sidebar {
  background: #fbfaf7;
  border-right: 1px solid var(--ff-color-border);
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 22px 14px 14px;
  position: fixed;
  top: 0;
  width: var(--ff-command-sidebar-width);
  z-index: 60;
}
.ff-command-brand {
  gap: 10px;
  min-height: 50px;
  overflow: hidden;
  padding: 0 8px 20px;
}
.ff-command-brand .creator-logo { height: 29px; max-width: 88px; }
.ff-command-brand .brand-divider { height: 28px; }
.ff-command-brand .product-lockup strong { font-size: .95rem; }
.ff-command-brand .product-lockup span {
  font-size: .63rem;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ff-command-nav { display: grid; gap: 5px; padding-top: 12px; }
.ff-command-nav-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--ff-radius-md);
  color: #65645f;
  display: grid;
  font-size: .9rem;
  font-weight: 680;
  gap: 12px;
  grid-template-columns: 20px minmax(0, 1fr);
  min-height: 43px;
  padding: 0 12px;
  text-decoration: none;
  transition: background var(--ff-transition-base), color var(--ff-transition-base), border-color var(--ff-transition-base);
}
.ff-command-nav-link svg { height: 18px; width: 18px; }
.ff-command-nav-link:hover { background: #f2f0ea; color: var(--ff-color-text); }
.ff-command-nav-link.active {
  background: var(--ff-color-accent);
  border-color: rgba(190, 148, 0, .18);
  color: #201c10;
  box-shadow: 0 5px 14px rgba(189, 151, 16, .12);
}
.ff-command-nav-link:focus-visible,
.ff-command-brand:focus-visible { box-shadow: var(--ff-focus-ring); outline: 2px solid #9a7800; outline-offset: 2px; }
.ff-command-sidebar-footer { border-top: 1px solid var(--ff-color-border); margin-top: auto; padding-top: 12px; }
.ff-command-user { width: 100%; }
.ff-command-user summary {
  background: transparent;
  border: 0;
  border-radius: var(--ff-radius-md);
  display: grid;
  gap: 9px;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  min-height: 52px;
  padding: 7px 8px;
  width: 100%;
}
.ff-command-user summary:hover { background: #f2f0ea; }
.ff-command-user summary > span:nth-child(2) { min-width: 0; }
.ff-command-avatar {
  align-items: center;
  background: #23221f;
  border-radius: 50%;
  color: white;
  display: inline-flex !important;
  font-weight: 760;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.ff-command-user .user-menu-dropdown { bottom: calc(100% + 6px); left: 0; right: auto; top: auto; width: 100%; }
.ff-command-user-placeholder { align-items: center; color: var(--ff-color-text-muted); display: flex; gap: 10px; padding: 10px; }
.ff-command-user-placeholder svg { height: 18px; width: 18px; }

.ff-command-main { margin-left: var(--ff-command-sidebar-width); min-height: 100vh; }
.ff-command-topbar {
  align-items: center;
  background: rgba(245, 243, 237, .92);
  border-bottom: 1px solid rgba(214, 208, 196, .72);
  backdrop-filter: blur(14px);
  display: flex;
  gap: 16px;
  height: var(--ff-command-topbar-height);
  justify-content: flex-end;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.ff-command-menu-button { display: none; }
.ff-command-topbar-context { display: none; margin-right: auto; }
.ff-command-topbar .workspace-switcher {
  box-shadow: none;
  min-height: 38px;
  padding: 0 13px;
}
.ff-workspace-dot { background: var(--ff-color-accent); border-radius: 50%; height: 8px; width: 8px; }
.app-main {
  margin: 0;
  max-width: none;
  padding: 28px clamp(22px, 3vw, 44px) 42px;
  width: 100%;
}
.app-main > .ff-page-shell,
.app-main > .today-page,
.app-main > .productions-page,
.app-main > .settings-page,
.app-main > .system-page,
.app-main > .ai-studio-page,
.app-main > .channel-page { margin-inline: auto; max-width: 1500px; width: 100%; }

.ff-page-header,
.section-header { margin-bottom: 24px; }
.ff-page-header h1,
.section-header h1 { font-size: clamp(1.75rem, 2.5vw, 2.35rem); letter-spacing: -.035em; }
.ff-card,
.ff-panel,
.ff-section,
.app-card {
  background: var(--ff-color-surface);
  border-color: var(--ff-color-border);
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-xs);
}
.ff-input,
.ff-select,
.ff-textarea,
.form-field :is(input, select, textarea) { border-radius: var(--ff-radius-md); }
.ff-button-primary,
.ff-button-secondary,
.ff-button-ghost,
.ff-button-danger,
.ff-icon-button { border-radius: var(--ff-radius-md); }
.ff-button-primary { box-shadow: none; }
.ff-button-primary:hover { box-shadow: 0 7px 18px rgba(190, 148, 0, .16); }
.ff-status-badge-success,
.ff-status-badge-warning,
.ff-status-badge-error,
.ff-status-badge-info,
.ff-status-badge-neutral { border-radius: var(--ff-radius-pill); }
.ff-command-backdrop { background: rgba(20, 19, 16, .4); inset: 0; position: fixed; z-index: 55; }
.ff-command-backdrop[hidden] { display: none; }

@media (max-width: 1100px) {
  :root { --ff-command-sidebar-width: 216px; }
  .ff-command-sidebar { padding-inline: 10px; }
  .app-main { padding-inline: 24px; }
}

@media (max-width: 900px) {
  .ff-command-sidebar {
    box-shadow: var(--ff-shadow-md);
    transform: translateX(-105%);
    transition: transform var(--ff-transition-slow);
    width: min(82vw, 280px);
  }
  .ff-command-shell.is-navigation-open .ff-command-sidebar { transform: translateX(0); }
  .ff-command-main { margin-left: 0; }
  .ff-command-topbar { height: 60px; justify-content: space-between; padding: 0 18px; }
  .ff-command-menu-button { display: inline-flex; flex: 0 0 auto; }
  .ff-command-topbar-context { display: grid; gap: 1px; min-width: 0; }
  .ff-command-topbar-context span { color: var(--ff-color-text-muted); font-size: .68rem; text-transform: uppercase; }
  .ff-command-topbar-context strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ff-command-topbar .workspace-switcher { display: none; }
  .app-main { padding: 22px 18px 34px; }
}

@media (max-width: 560px) {
  .app-main { padding-inline: 14px; }
  .ff-page-header,
  .section-header { align-items: flex-start; flex-direction: column; }
  .ff-card,
  .ff-panel,
  .ff-section,
  .app-card { border-radius: 10px; }
}

/* Live recording lead screen */
.live-page {
  --live-channel-width: 150px;
  display: grid;
  gap: 22px;
  max-width: 100%;
  overflow-x: clip;
}
.live-header { align-items: end; display: flex; gap: 24px; justify-content: space-between; }
.live-header h1 { margin-bottom: 7px; }
.live-header p { margin: 0; }
.live-status-overview { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.live-stat { align-items: center; display: grid; gap: 13px; grid-template-columns: 40px minmax(0, 1fr); padding: 15px 17px; }
.live-stat-icon { align-items: center; background: var(--ff-color-surface-subtle); border-radius: 10px; color: var(--ff-color-text-muted); display: inline-flex; height: 40px; justify-content: center; width: 40px; }
.live-stat-icon.is-live { background: var(--ff-color-error-bg); color: var(--ff-color-error); }
.live-stat-icon svg { height: 19px; width: 19px; }
.live-stat div { display: grid; min-width: 0; }
.live-stat strong { font-size: .96rem; line-height: 1.2; overflow-wrap: anywhere; }
.live-stat div span { color: var(--ff-color-text-muted); font-size: .82rem; margin-top: 4px; }
.live-stat small { color: var(--ff-color-text-muted); font-size: .72rem; white-space: nowrap; }
.live-storage-stat { grid-template-columns: 40px minmax(0, 1fr); }
.live-storage-stat small,
.live-storage-progress { grid-column: 1 / -1; }
.live-storage-progress { background: var(--ff-color-surface-muted); border-radius: var(--ff-radius-pill); height: 6px; overflow: hidden; }
.live-storage-progress span { background: var(--ff-color-success); display: block; height: 100%; }
.live-storage-stat[data-storage-tone="warning"] .live-storage-progress span { background: var(--ff-color-warning); }
.live-storage-stat[data-storage-tone="error"] .live-storage-progress span { background: var(--ff-color-error); }
.live-storage-stat small { overflow: hidden; text-overflow: ellipsis; }
.live-section-heading { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 16px; min-width: 0; }
.live-section-heading h2 { font-size: 1.08rem; margin: 0; }
.live-section-heading p { color: var(--ff-color-text-muted); font-size: .84rem; margin: 4px 0 0; }

.tv-guide-panel { overflow: hidden; padding: 0; }
.tv-guide-panel > .live-section-heading { padding: 20px 22px 0; }
.tv-guide-toolbar { align-items: end; border-bottom: 1px solid var(--ff-color-border); display: flex; gap: 14px; justify-content: space-between; padding: 0 22px 16px; }
.tv-guide-periods { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.tv-guide-days { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 7px; }
.tv-guide-date { display: grid; gap: 3px; margin: 0; }
.tv-guide-date > span { color: var(--ff-color-text-muted); font-size: .68rem; font-weight: 700; }
.tv-guide-date .ff-input { box-sizing: border-box; color-scheme: light; height: 40px; min-height: 40px; padding: 7px 42px 7px 12px; width: 188px; }
.tv-guide-date .ff-input::-webkit-calendar-picker-indicator { cursor: pointer; height: 18px; margin: 0 -29px 0 8px; opacity: .72; padding: 4px; width: 18px; }
.tv-guide-toolbar .ff-icon-button { height: 40px; min-height: 40px; width: 40px; }
.tv-guide-toolbar .ff-icon-button.is-disabled { opacity: .38; pointer-events: none; }
.tv-guide-toolbar .ff-button-secondary,
.tv-guide-toolbar .ff-button-ghost { min-height: 40px; }
.tv-guide-periods { background: var(--ff-color-surface-subtle); border-radius: 10px; padding: 3px; }
.tv-guide-periods .ff-button-ghost { border-radius: 7px; padding-inline: 12px; }
.tv-guide-periods .is-active { background: var(--ff-color-surface); box-shadow: var(--ff-shadow-xs); color: var(--ff-color-text); }
.tv-guide-day-navigation { border-bottom: 1px solid var(--ff-color-border); display: flex; gap: 5px; max-width: 100%; overflow-x: auto; padding: 8px 22px; scrollbar-width: thin; }
.tv-guide-day-navigation .ff-button-ghost { flex: 0 0 auto; font-size: .72rem; min-height: 32px; padding: 6px 10px; }
.tv-guide-day-navigation .is-active { background: var(--ff-color-accent-soft); color: var(--ff-color-text); }
.tv-timeline-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; }
.tv-timeline-scroll:focus-visible { box-shadow: inset var(--ff-focus-ring); outline: 0; }
.tv-timeline-stage { min-width: calc(var(--live-channel-width) + 1120px); position: relative; }
.tv-time-axis,
.tv-channel-row { display: grid; grid-template-columns: var(--live-channel-width) minmax(0, 1fr); min-width: 0; }
.tv-time-axis { background: var(--ff-color-surface-subtle); border-bottom: 1px solid var(--ff-color-border); height: 38px; }
.tv-channel-spacer { align-items: center; background: var(--ff-color-surface-subtle); border-right: 1px solid var(--ff-color-border); color: var(--ff-color-text-muted); display: flex; font-size: .7rem; font-weight: 720; left: 0; padding-inline: 16px; position: sticky; text-transform: uppercase; z-index: 7; }
.tv-time-track { position: relative; }
.tv-time-tick { border-left: 1px solid var(--ff-color-border); bottom: 0; color: var(--ff-color-text-muted); font-size: .68rem; padding: 10px 0 0 7px; position: absolute; top: 0; transform: translateX(-1px); }
.tv-channel-row { border-bottom: 1px solid var(--ff-color-border); min-height: 92px; position: relative; }
.tv-channel-head { align-items: center; background: #fbfaf7; border-right: 1px solid var(--ff-color-border); display: flex; justify-content: center; padding: 8px; position: sticky; left: 0; z-index: 6; }
.tv-channel-logo { display: block; height: 40px; max-width: 100%; object-fit: contain; width: 124px; }
.tv-channel-track { background: linear-gradient(90deg, transparent 24.9%, rgba(230,225,215,.45) 25%, transparent 25.1%, transparent 49.9%, rgba(230,225,215,.45) 50%, transparent 50.1%, transparent 74.9%, rgba(230,225,215,.45) 75%, transparent 75.1%); min-width: 0; position: relative; }
.tv-programme { appearance: none; background: #f7f6f1; border: 1px solid #e1ddd3; border-radius: 8px; bottom: 10px; color: var(--ff-color-text); cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 42px; overflow: hidden; padding: 9px 10px; position: absolute; text-align: left; top: 10px; transition: background var(--ff-transition-fast), border-color var(--ff-transition-fast), box-shadow var(--ff-transition-fast); }
.tv-programme:hover,
.tv-programme:focus-visible { background: #fffdf4; border-color: #cfb94c; box-shadow: 0 5px 14px rgba(39,34,20,.08); outline: 0; z-index: 4; }
.tv-programme.is-selected { background: var(--ff-color-accent-soft); border-color: #d4ad16; box-shadow: inset 3px 0 0 var(--ff-color-accent); z-index: 3; }
.tv-programme strong,
.tv-programme small,
.tv-programme-time { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-programme strong { font-size: .78rem; line-height: 1.28; }
.tv-programme small,
.tv-programme-time { color: var(--ff-color-text-muted); font-size: .66rem; }
.tv-now-line { border-left: 2px solid var(--ff-color-error); bottom: 0; pointer-events: none; position: absolute; top: 38px; z-index: 5; }
.tv-now-line span { background: var(--ff-color-error); border-radius: 4px; color: white; font-size: .62rem; left: 0; padding: 2px 5px; position: absolute; top: 2px; transform: translateX(-50%); }
.tv-now-line[hidden] { display: none; }
.tv-guide-state { align-items: flex-start; color: var(--ff-color-text-muted); display: flex; flex-direction: column; font-size: .78rem; inset: 0; justify-content: center; margin: 0; padding: 14px 20px; position: absolute; }
.tv-guide-state span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.tv-guide-state.is-error { background: var(--ff-color-error-bg); color: var(--ff-color-error); }
.tv-guide-loading { background: rgba(255,255,255,.9); color: var(--ff-color-text); z-index: 8; }
.tv-channel-details { position: absolute; right: 7px; top: 6px; z-index: 7; }
.tv-channel-details summary { color: var(--ff-color-text-muted); cursor: pointer; list-style: none; }
.tv-channel-details summary::-webkit-details-marker { display: none; }
.tv-channel-details svg { height: 15px; width: 15px; }
.tv-channel-details p { background: #fff; border: 1px solid var(--ff-color-border); border-radius: 8px; box-shadow: var(--ff-shadow-md); font-size: .7rem; margin: 5px 0 0; padding: 8px 10px; position: absolute; right: 0; width: 260px; }
.tv-channel-warning { color: var(--ff-color-warning); display: block; margin-top: 4px; }
.tv-guide-details { margin: 0; padding: 10px 22px 14px; }
.tv-guide-details summary { color: var(--ff-color-text-muted); cursor: pointer; font-size: .74rem; }
.tv-guide-details p { font-size: .74rem; margin: 8px 0 0; }

.live-series-section { padding: 18px 20px; }
.live-series-list,
.live-list { display: grid; }
.live-series-row { align-items: center; display: grid; gap: 13px; grid-template-columns: 36px minmax(0, 1fr) auto auto; min-width: 0; padding: 12px 2px; }
.live-series-row + .live-series-row,
.live-recording-row + .live-recording-row { border-top: 1px solid var(--ff-color-border); }
.live-series-row h3,
.live-recording-row h3 { font-size: .88rem; margin: 0 0 3px; overflow-wrap: anywhere; }
.live-series-row p,
.live-recording-row p { color: var(--ff-color-text-muted); font-size: .74rem; margin: 0; overflow-wrap: anywhere; }
.live-series-icon { align-items: center; background: var(--ff-color-surface-subtle); border-radius: 8px; color: var(--ff-color-text-muted); display: inline-flex; height: 34px; justify-content: center; width: 34px; }
.live-series-icon svg { height: 16px; width: 16px; }
.live-status-sections { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.live-status-sections > .ff-section { min-width: 0; padding: 17px; }
.live-recording-row { align-items: center; display: grid; gap: 10px; grid-template-columns: auto minmax(0, 1fr) auto; min-width: 0; padding: 11px 0; }
.live-recording-state { align-items: center; display: grid; gap: 5px; justify-items: start; }
.live-state-dot { background: var(--ff-color-border-strong); border-radius: 50%; height: 7px; width: 7px; }
.live-recording-row[data-status="recording"] .live-state-dot { animation: live-pulse 1.5s infinite; background: var(--ff-color-error); }
.live-recording-copy { min-width: 0; }
.live-recording-copy strong { color: var(--ff-color-text-muted); font-size: .7rem; }
.live-progress { background: var(--ff-color-surface-muted); border-radius: var(--ff-radius-pill); grid-column: 1 / -1; height: 5px; overflow: hidden; }
.live-progress > span { background: var(--ff-color-accent); display: block; height: 100%; transition: width var(--ff-transition-base); }
.live-recording-row > .alert { grid-column: 1 / -1; margin: 0; }
.live-row-actions { align-items: center; display: flex; gap: 3px; }
.live-row-actions > .ff-button-ghost { font-size: .72rem; min-height: 32px; padding-inline: 8px; }
.live-action-menu { position: relative; }
.live-action-menu > summary { height: 32px; list-style: none; min-height: 32px; width: 32px; }
.live-action-menu > summary::-webkit-details-marker { display: none; }
.live-action-menu-content { background: white; border: 1px solid var(--ff-color-border); border-radius: 9px; box-shadow: var(--ff-shadow-md); display: grid; min-width: 172px; padding: 5px; position: absolute; right: 0; top: calc(100% + 5px); z-index: 20; }
.live-action-menu-content form { margin: 0; }
.live-action-menu-content :is(a,button) { background: transparent; border: 0; border-radius: 6px; color: var(--ff-color-text); display: block; font: inherit; font-size: .78rem; padding: 8px 9px; text-align: left; text-decoration: none; width: 100%; }
.live-action-menu-content :is(a,button):hover { background: var(--ff-color-surface-subtle); }
.live-action-menu-content .is-destructive { color: var(--ff-color-error); }
.live-empty-state { align-items: center; color: var(--ff-color-text-muted); display: flex; font-size: .78rem; gap: 8px; justify-content: center; margin: 0; min-height: 62px; text-align: center; }
.live-empty-state svg { height: 16px; width: 16px; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 5px rgba(180,53,48,.12); } }

.live-inspector-backdrop { background: rgba(24,22,18,.28); inset: 0; position: fixed; z-index: 75; }
.live-inspector-backdrop[hidden] { display: none; }
.live-inspector { background: var(--ff-color-surface); bottom: 0; box-shadow: -18px 0 48px rgba(27,24,18,.14); display: flex; flex-direction: column; max-width: 100%; position: fixed; right: 0; top: 0; transform: translateX(105%); transition: transform var(--ff-transition-slow); width: min(440px, 100vw); z-index: 80; }
.has-inspector-open .live-inspector { transform: translateX(0); }
.has-inspector-open .live-create-action { visibility: hidden; }
body.live-inspector-open { overflow: hidden; }
.live-inspector-header { align-items: flex-start; border-bottom: 1px solid var(--ff-color-border); display: flex; gap: 16px; justify-content: space-between; padding: 21px 22px 15px; }
.live-inspector-header h2 { font-size: 1.25rem; margin: 3px 0 0; }
.live-inspector-intro { font-size: .75rem; margin: 12px 22px 0; }
.live-inspector form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.live-inspector-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 17px 22px 24px; }
.live-form-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live-form-grid .wide { grid-column: 1 / -1; }
.live-form-grid :is(input,select,textarea) { box-sizing: border-box; max-width: 100%; min-width: 0; width: 100%; }
.live-mode { background: var(--ff-color-surface-subtle); border: 0; border-radius: 10px; display: grid; gap: 3px; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: 3px; }
.live-mode label { cursor: pointer; min-width: 0; }
.live-mode input { opacity: 0; pointer-events: none; position: absolute; }
.live-mode span { border-radius: 7px; display: block; font-size: .82rem; font-weight: 700; padding: 8px; text-align: center; }
.live-mode input:checked + span { background: white; box-shadow: var(--ff-shadow-xs); }
.live-mode input:focus-visible + span,
.live-weekday input:focus-visible + span { box-shadow: var(--ff-focus-ring); outline: 2px solid #9a7800; }
.live-source-hint { background: var(--ff-color-surface-subtle); border-radius: 7px; font-size: .7rem; margin: -5px 0 0; padding: 8px; overflow-wrap: anywhere; }
.live-series-fields { border-top: 1px solid var(--ff-color-border); display: grid; gap: 12px; grid-column: 1 / -1; padding-top: 14px; }
.live-series-fields p { font-size: .72rem; margin: 2px 0 0; }
.live-weekdays { display: grid; gap: 5px; grid-template-columns: repeat(7,minmax(0,1fr)); }
.live-weekday input { opacity: 0; position: absolute; }
.live-weekday span { align-items: center; border: 1px solid var(--ff-color-border); border-radius: 7px; display: flex; font-size: .7rem; font-weight: 700; justify-content: center; min-height: 32px; }
.live-weekday input:checked + span { background: var(--ff-color-accent-soft); border-color: #d4ad16; }
.live-series-preview { background: var(--ff-color-surface-subtle); border-radius: 8px; display: grid; font-size: .74rem; gap: 2px; padding: 10px; }
.live-advanced { border-top: 1px solid var(--ff-color-border); margin-top: 17px; padding-top: 15px; }
.live-advanced > summary { cursor: pointer; font-size: .82rem; font-weight: 720; margin-bottom: 14px; }
.live-inspector-actions { align-items: center; background: white; border-top: 1px solid var(--ff-color-border); display: flex; gap: 8px; justify-content: flex-end; padding: 13px 22px; }

@media (max-width: 1180px) {
  .live-status-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-status-sections { grid-template-columns: minmax(0,1fr); }
  .live-recording-row { grid-template-columns: auto minmax(0,1fr) auto; }
}
@media (max-width: 760px) {
  .live-header { align-items: flex-start; flex-direction: column; }
  .live-status-overview { grid-template-columns: minmax(0,1fr); }
  .live-stat { padding-block: 12px; }
  .tv-guide-toolbar { align-items: flex-start; flex-direction: column; }
  .tv-guide-periods { max-width: 100%; overflow-x: auto; }
  .live-series-row { align-items: start; grid-template-columns: 36px minmax(0,1fr) auto; }
  .live-series-row > .live-action-menu { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (max-width: 520px) {
  .live-page { --live-channel-width: 140px; }
  .live-create-action { width: 100%; }
  .live-stat small { display: none; }
  .tv-guide-panel > .live-section-heading,
  .tv-guide-toolbar,
  .tv-guide-day-navigation { padding-inline: 14px; }
  .tv-guide-days { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; width: 100%; }
  .tv-guide-days .ff-button-secondary { grid-column: 1 / -1; }
  .tv-guide-date .ff-input { width: 100%; }
  .live-form-grid { grid-template-columns: minmax(0,1fr); }
  .live-form-grid .wide { grid-column: auto; }
  .live-weekdays { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .live-inspector-header,
  .live-inspector-content,
  .live-inspector-actions { padding-inline: 16px; }
  .live-recording-row { grid-template-columns: minmax(0,1fr) auto; }
  .live-recording-state { grid-column: 1; grid-row: 1; }
  .live-recording-copy { grid-column: 1 / -1; grid-row: 2; }
  .live-row-actions { grid-column: 2; grid-row: 1; }
}

/* Production variant dialog -------------------------------------------------
   Kept at the end of the cascade because this component belongs to the
   Editorial Command Center and must not inherit the legacy detail-page form. */
.production-variant-dialog {
  background: transparent;
  border: 0;
  color: var(--ff-color-text);
  max-height: calc(100dvh - 32px);
  max-width: none;
  overflow: hidden;
  padding: 0;
  width: min(760px, calc(100vw - 32px));
}
.production-variant-dialog::backdrop {
  backdrop-filter: blur(2px);
  background: rgba(24, 22, 18, .48);
}
.production-variant-form {
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(30, 27, 20, .22);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 32px);
  min-width: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
}
.production-variant-header {
  align-items: flex-start;
  background: linear-gradient(145deg, #fff 0%, #fffdf6 100%);
  border-bottom: 1px solid var(--ff-color-border);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 23px 26px 20px;
}
.production-variant-header > div { min-width: 0; }
.production-variant-eyebrow {
  color: #9a7800;
  display: block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.production-variant-header h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -.035em;
  line-height: 1.12;
  margin: 0;
}
.production-variant-close {
  background: var(--ff-color-surface);
  flex: 0 0 auto;
  height: 38px;
  min-height: 38px;
  width: 38px;
}
.production-variant-close svg { height: 18px; width: 18px; }
.production-variant-body {
  display: grid;
  gap: 17px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 21px 26px 24px;
  scrollbar-gutter: stable;
}
.production-variant-intro {
  color: var(--ff-color-text-muted);
  font-size: .88rem;
  line-height: 1.55;
  margin: 0;
}
.variant-source-card {
  align-items: center;
  background: var(--ff-color-surface-subtle);
  border: 1px solid var(--ff-color-border);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 13px 14px;
}
.variant-source-icon {
  align-items: center;
  background: var(--ff-color-accent-soft);
  border-radius: 10px;
  color: #8f7000;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.variant-source-icon svg { height: 20px; width: 20px; }
.variant-source-copy { display: grid; gap: 2px; min-width: 0; }
.variant-source-copy > span {
  color: var(--ff-color-text-muted);
  font-size: .68rem;
  font-weight: 760;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.variant-source-copy strong {
  font-size: .9rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.variant-source-copy small {
  color: var(--ff-color-text-muted);
  font-size: .72rem;
  line-height: 1.4;
}
.variant-source-status {
  align-items: center;
  background: var(--ff-color-success-bg);
  border: 1px solid rgba(22, 131, 79, .2);
  border-radius: var(--ff-radius-pill);
  color: var(--ff-color-success);
  display: inline-flex;
  font-size: .68rem;
  font-weight: 760;
  gap: 5px;
  padding: 5px 8px;
  white-space: nowrap;
}
.variant-source-status svg { height: 13px; width: 13px; }
.production-variant-fields {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.production-variant-field { display: grid; gap: 7px; min-width: 0; }
.production-variant-field > span,
.production-variant-settings > legend {
  color: var(--ff-color-text);
  font-size: .78rem;
  font-weight: 760;
  line-height: 1.3;
}
.production-variant-field > small {
  color: var(--ff-color-text-muted);
  font-size: .68rem;
  line-height: 1.4;
}
.production-variant-field :is(input, select, textarea) {
  box-sizing: border-box;
  font: inherit;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.production-variant-field :is(input, select) { min-height: 42px; }
.production-variant-briefing textarea {
  line-height: 1.5;
  min-height: 106px;
  resize: vertical;
}
.production-variant-settings {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}
.production-variant-settings > legend { margin-bottom: 9px; padding: 0; }
.production-variant-settings-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.variant-settings-choice {
  align-items: start;
  background: var(--ff-color-surface);
  border: 1px solid var(--ff-color-border);
  border-radius: 11px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 13px;
  transition: background var(--ff-transition-fast), border-color var(--ff-transition-fast), box-shadow var(--ff-transition-fast);
}
.variant-settings-choice:hover { border-color: var(--ff-color-border-strong); }
.variant-settings-choice:has(input:checked) {
  background: #fffdf4;
  border-color: #d5ae17;
  box-shadow: inset 0 0 0 1px rgba(213, 174, 23, .2);
}
.variant-settings-choice input {
  accent-color: #c79d00;
  height: 17px;
  margin: 2px 0 0;
  width: 17px;
}
.variant-settings-choice > span { display: grid; gap: 4px; min-width: 0; }
.variant-settings-choice strong { font-size: .78rem; line-height: 1.35; }
.variant-settings-choice small {
  color: var(--ff-color-text-muted);
  font-size: .68rem;
  line-height: 1.45;
}
.production-variant-actions {
  align-items: center;
  background: #fbfaf7;
  border-top: 1px solid var(--ff-color-border);
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  padding: 15px 26px;
}
.production-variant-actions .ff-button-primary { min-width: 286px; }

@media (max-width: 680px) {
  .production-variant-dialog {
    max-height: calc(100dvh - 20px);
    width: calc(100vw - 20px);
  }
  .production-variant-form { max-height: calc(100dvh - 20px); }
  .production-variant-header { padding: 19px 18px 16px; }
  .production-variant-body { padding: 18px; scrollbar-gutter: auto; }
  .production-variant-fields,
  .production-variant-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .variant-source-card { grid-template-columns: 42px minmax(0, 1fr); }
  .variant-source-status { grid-column: 2; justify-self: start; }
  .production-variant-actions { padding: 13px 18px; }
}

@media (max-width: 480px) {
  .production-variant-header h2 { font-size: 1.32rem; }
  .production-variant-body { gap: 15px; padding: 16px; }
  .variant-source-card { gap: 10px; padding: 12px; }
  .variant-source-copy strong { white-space: normal; }
  .production-variant-actions { align-items: stretch; flex-direction: column-reverse; }
  .production-variant-actions :is(.ff-button-primary, .ff-button-secondary) { min-width: 0; width: 100%; }
}
