:root {
  --bg: #f4efe6;
  --bg-accent: #efe4d2;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-strong: #fffaf2;
  --line: rgba(74, 60, 44, 0.12);
  --text: #2d241b;
  --muted: #6d5c4d;
  --accent: #b1512f;
  --accent-2: #0f726c;
  --accent-3: #d3a737;
  --shadow: 0 24px 70px rgba(61, 41, 19, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(209, 167, 55, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 114, 108, 0.18), transparent 28%),
    linear-gradient(180deg, #faf5ed 0%, var(--bg) 100%);
  font-family: "Avenir Next", "Gill Sans", ui-sans-serif, system-ui, sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 36, 27, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 36, 27, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 75%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 26px 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.footer-links a:hover {
  border-color: rgba(177, 81, 47, 0.35);
  color: var(--accent);
}

.auth-shell {
  max-width: 760px;
  min-height: 100vh;
  display: grid;
  align-content: center;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 248, 237, 0.92), rgba(245, 235, 221, 0.92));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: 30px 32px;
  margin-bottom: 24px;
}

.auth-hero {
  margin-bottom: 18px;
}

.hero-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.hero-auth-actions {
  margin: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(177, 81, 47, 0.22), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero h1,
.hero h2,
.section-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  margin: 0;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.3rem);
}

.hero p {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.auth-card {
  max-width: 560px;
}

.auth-form {
  gap: 14px;
}

.auth-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav a:hover,
.nav a.active {
  transform: translateY(-1px);
  border-color: rgba(177, 81, 47, 0.35);
  color: var(--accent);
}

.nav-utility {
  margin-top: 12px;
  align-items: center;
}

.nav-more {
  position: relative;
}

.nav-more summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

.nav-more summary::-webkit-details-marker {
  display: none;
}

.nav-more[open] summary {
  border-color: rgba(177, 81, 47, 0.35);
  color: var(--accent);
}

.nav-more-links {
  margin-top: 10px;
  max-width: 760px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.summary {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.quick-link-grid a {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.quick-link-grid a:hover {
  border-color: rgba(177, 81, 47, 0.35);
  color: var(--accent);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  backdrop-filter: blur(12px);
}

.card.soft {
  background: rgba(255, 255, 255, 0.64);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric .label {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric .value {
  font-size: 2rem;
  font-weight: 700;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 14px;
}

.glossary-intro {
  max-width: 900px;
}

.glossary-section-title {
  margin-bottom: 10px;
}

.glossary-blocks {
  display: grid;
  gap: 12px;
  max-width: 920px;
}

.glossary-blocks p {
  margin: 0;
  line-height: 1.65;
}

.legal-intro,
.legal-copy p {
  margin: 0;
  line-height: 1.72;
}

.legal-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.legal-sections {
  align-items: start;
}

.glossary-subheading {
  margin: 10px 0 0;
  font-size: 1.08rem;
  color: var(--accent-2);
}

.subtle {
  color: var(--muted);
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

form.stack {
  display: grid;
  align-items: stretch;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

input,
select,
button,
.button {
  font: inherit;
}

input,
textarea,
select {
  min-width: 180px;
  flex: 1 1 220px;
  border: 1px solid rgba(74, 60, 44, 0.18);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--text);
}

select {
  appearance: auto;
  cursor: pointer;
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

button,
.button {
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--accent), #c76f48);
  color: white;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(177, 81, 47, 0.18);
}

.secondary-button,
.button.secondary {
  background: linear-gradient(135deg, var(--accent-2), #159188);
}

.list {
  display: grid;
  gap: 14px;
}

.video-row,
.inference-row {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  background: var(--panel-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.video-row {
  grid-template-columns: 180px 1fr;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.episode-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.episode-card,
.workspace-tile {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  background: var(--panel-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 140ms ease, border-color 140ms ease;
}

.episode-card:hover,
.workspace-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 81, 47, 0.35);
}

.autopsy-grid {
  align-items: start;
}

.autopsy-card {
  align-content: start;
}

.autopsy-note {
  margin-top: 2px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.workspace-tile strong {
  font-size: 1rem;
}

.workspace-tile span {
  color: var(--muted);
  font-size: 0.92rem;
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(177, 81, 47, 0.2), rgba(15, 114, 108, 0.18));
  overflow: hidden;
  border: 1px solid rgba(74, 60, 44, 0.1);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-brief-hero {
  overflow: hidden;
}

.video-brief-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.detail-thumb {
  max-width: 420px;
}

.clamp-copy {
  max-height: 10.5em;
  overflow: auto;
  padding-right: 6px;
}

.video-title {
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.94rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 114, 108, 0.1);
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 700;
}

.chip.warn {
  background: rgba(211, 167, 55, 0.18);
  color: #8a6808;
}

.chip.alert {
  background: rgba(177, 81, 47, 0.14);
  color: var(--accent);
}

.stack {
  display: grid;
  gap: 12px;
}

.kv {
  display: grid;
  gap: 10px;
}

.kv .item {
  border-top: 1px solid rgba(74, 60, 44, 0.08);
  padding-top: 10px;
}

.kv .key {
  color: var(--muted);
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.kv .val {
  font-size: 1rem;
  line-height: 1.5;
}

.note {
  border-left: 4px solid var(--accent-3);
  padding: 14px 16px;
  background: rgba(211, 167, 55, 0.1);
  border-radius: 14px;
  color: #755b11;
}

.success-note {
  border-left-color: var(--accent-2);
  background: rgba(15, 114, 108, 0.1);
  color: var(--accent-2);
}

.error-note {
  border-left-color: var(--accent);
  background: rgba(177, 81, 47, 0.12);
  color: var(--accent);
}

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-soft);
}

.inline-checkbox input {
  width: auto;
}

.bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.table-like {
  display: grid;
  gap: 10px;
}

.table-like .row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(74, 60, 44, 0.08);
  min-width: 0;
}

.table-like .row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inference-row,
.card,
.kv .val {
  min-width: 0;
  overflow-wrap: anywhere;
}

.small {
  font-size: 0.9rem;
}

.mono {
  font-family: "SF Mono", ui-monospace, monospace;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.split-hero {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
}

.panel-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.scoreline {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.score-pill {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(177, 81, 47, 0.12);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
}

.metric-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.metric-chip {
  border: 1px solid rgba(74, 60, 44, 0.1);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  padding: 14px;
  display: grid;
  gap: 6px;
}

.metric-chip .label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-chip .value {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.metric-chip .hint {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.metric-chip-strong {
  border-color: rgba(15, 114, 108, 0.24);
  background: rgba(15, 114, 108, 0.07);
}

.metric-chip-strong .value {
  color: var(--accent-2);
}

.metric-chip-weak {
  border-color: rgba(177, 81, 47, 0.24);
  background: rgba(177, 81, 47, 0.07);
}

.metric-chip-weak .value {
  color: var(--accent);
}

.metric-chip-mixed,
.metric-chip-waiting {
  border-color: rgba(211, 167, 55, 0.24);
  background: rgba(211, 167, 55, 0.09);
}

.metric-chip-mixed .value,
.metric-chip-waiting .value {
  color: #8a6808;
}

.empty {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px dashed rgba(74, 60, 44, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.preprod-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 14px;
  align-items: start;
  justify-content: stretch;
  margin: 18px 0;
}

.preprod-board.is-sorting .preprod-unit:not(.is-floating):not(.preprod-drag-placeholder) {
  opacity: 0.94;
}

.preprod-toolbar {
  padding: 14px;
}

.preprod-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.preprod-inline-create {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
}

.preprod-inline-create.compact {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.preprod-inline-create input,
.preprod-episode-create input {
  min-width: 0;
}

.preprod-unit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 452px;
  height: 452px;
  overflow: hidden;
  transition: box-shadow 140ms ease, opacity 140ms ease, transform 140ms ease;
  padding: 14px 14px 12px;
  will-change: transform;
  box-shadow: 0 12px 22px rgba(61, 41, 19, 0.05);
}

.preprod-unit,
.preprod-episode {
  cursor: grab;
}

.preprod-unit:active,
.preprod-episode:active {
  cursor: grabbing;
}

.preprod-unit.is-dragging,
.preprod-episode.is-dragging {
  opacity: 0.58;
  box-shadow: 0 24px 40px rgba(61, 41, 19, 0.12);
}

.preprod-unit.is-floating,
.preprod-episode.is-floating {
  margin: 0;
  cursor: grabbing;
  box-shadow: 0 28px 60px rgba(61, 41, 19, 0.22);
  transform: scale(0.975);
}

.preprod-unit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-height: 82px;
}

.preprod-unit-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.preprod-unit h2,
.preprod-type-card h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  line-height: 1.08;
}

.preprod-unit h2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.16em;
}

.preprod-unit-statusline,
.preprod-unit-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.preprod-unit-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.preprod-status-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.preprod-status-form-episode {
  grid-column: 1 / -1;
}

.preprod-status-select {
  min-width: 0;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(74, 60, 44, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
}

.preprod-unit-summary {
  display: grid;
  gap: 8px;
  min-height: 44px;
}

.preprod-unit-settings {
  margin-top: auto;
  border-top: 1px solid rgba(74, 60, 44, 0.1);
  padding-top: 10px;
}

.preprod-unit-settings summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.preprod-statusline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.preprod-statusline.tight {
  justify-content: flex-end;
}

.drag-handle {
  flex: 0 0 auto;
  border: 1px solid rgba(74, 60, 44, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: grab;
  touch-action: none;
}

.preprod-episode-list {
  display: grid;
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, 54px);
  gap: 8px;
  min-height: 240px;
  flex: 0 0 auto;
  overflow: hidden;
  padding-right: 2px;
  padding-bottom: 2px;
}

.preprod-episode-list.is-drop-target {
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px rgba(15, 114, 108, 0.14);
  background: rgba(15, 114, 108, 0.04);
}

.preprod-drag-placeholder {
  border: 2px dashed rgba(15, 114, 108, 0.32);
  background: rgba(15, 114, 108, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  border-radius: 24px;
}

.preprod-unit.preprod-drag-placeholder,
.preprod-episode.preprod-drag-placeholder {
  min-height: 0;
}

.preprod-drag-placeholder > * {
  opacity: 0;
  pointer-events: none;
}

.preprod-episode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  border-radius: 14px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  min-height: 62px;
  height: 62px;
  align-items: center;
  touch-action: none;
}

.preprod-episode:hover {
  border-color: rgba(15, 114, 108, 0.22);
  box-shadow: 0 10px 24px rgba(61, 41, 19, 0.08);
}

.preprod-episode-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.22;
}

.preprod-episode-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.preprod-episode-actions form {
  margin: 0;
}

.preprod-episode-actions .secondary-button,
.preprod-unit-actions .secondary-button {
  padding: 5px 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.preprod-episode .meta {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
}

.preprod-episode-placeholder {
  grid-template-columns: 1fr;
  grid-template-areas: "placeholder";
  border-style: dashed;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.preprod-episode-placeholder:hover {
  transform: none;
  border-color: rgba(74, 60, 44, 0.1);
  box-shadow: none;
}

.preprod-episode-placeholder-label {
  grid-area: placeholder;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

body.preprod-sort-active {
  user-select: none;
}

.preprod-episode-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid rgba(74, 60, 44, 0.1);
  padding-top: 10px;
  flex: 0 0 auto;
}

.preprod-episode-create-full .note {
  margin: 0;
}

.retention-chart,
.metric-history-chart {
  margin-top: 16px;
  position: relative;
}

.retention-chart svg,
.metric-history-chart svg {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 114, 108, 0.08), rgba(177, 81, 47, 0.04)),
    rgba(255, 255, 255, 0.55);
}

.retention-chart polyline,
.metric-history-chart polyline {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.retention-chart .guide,
.metric-history-chart .guide {
  stroke: rgba(74, 60, 44, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.retention-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chart-hover {
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  pointer-events: none;
  z-index: 2;
}

.chart-hover-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(15, 114, 108, 0.24);
  transform: translateX(-0.5px);
  z-index: 1;
}

.chart-hover-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(31, 24, 18, 0.18);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.chart-hover-card {
  position: absolute;
  top: 12px;
  min-width: 132px;
  max-width: 220px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(31, 24, 18, 0.12);
  transform: translateX(-50%);
  z-index: 3;
}

.chart-hover-card strong {
  font-size: 0.9rem;
}

.chart-hover-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.analytics-lab-layout {
  align-items: start;
}

.analytics-lab-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.analytics-lab-controls label {
  display: grid;
  gap: 6px;
}

.analytics-lab-controls span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.analytics-lab-controls select,
.analytics-lab-controls input {
  width: 100%;
}

.analytics-chart {
  margin-top: 12px;
}

.analytics-chart svg {
  display: block;
  width: 100%;
  height: 280px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 114, 108, 0.08), rgba(177, 81, 47, 0.04)),
    rgba(255, 255, 255, 0.55);
}

.analytics-chart polyline {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.analytics-chart .guide {
  stroke: rgba(74, 60, 44, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.analytics-chart .guide-vertical {
  stroke-dasharray: 2 2;
}

.analytics-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.analytics-chart-ticks {
  display: block;
  position: relative;
  min-height: 1.25rem;
}

.analytics-chart-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.scatter-point {
  fill: var(--accent-2);
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.analytics-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.analytics-legend-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.analytics-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin-top: 3px;
}

.bullets.compact {
  margin: 0;
  padding-left: 18px;
}

.bullets.compact li + li {
  margin-top: 8px;
}

.type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.type-picker label {
  cursor: pointer;
}

.type-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-picker span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(74, 60, 44, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.type-picker input:checked + span {
  border-color: rgba(15, 114, 108, 0.28);
  background: rgba(15, 114, 108, 0.12);
  color: var(--accent-2);
}

.type-picker.large span {
  min-height: 40px;
  padding: 9px 13px;
}

.preprod-add summary,
.google-preview summary {
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
}

.preprod-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.preprod-doc {
  padding: 16px;
}

.preprod-doc textarea {
  min-height: 220px;
}

.preprod-workspace-hero {
  margin-bottom: 18px;
}

.preprod-hero-actions {
  align-items: flex-end;
  min-width: 240px;
}

.preprod-workspace-layout {
  display: block;
  margin-top: 18px;
}

.preprod-cockpit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.preprod-cockpit-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.preprod-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.preprod-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.preprod-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.preprod-editor-shell {
  display: grid;
  gap: 14px;
  min-height: 640px;
}

.preprod-doc-tabbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.preprod-google-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.preprod-google-doc-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(74, 60, 44, 0.1);
  background: rgba(255, 255, 255, 0.72);
  align-content: start;
  min-height: 168px;
}

.preprod-google-doc-card.compact {
  min-height: 0;
}

.preprod-google-doc-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
}

.preprod-google-doc-card .subtle.small {
  line-height: 1.4;
}

.preprod-support-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.preprod-doc-tab {
  display: grid;
  gap: 4px;
  align-items: start;
  justify-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: none;
}

.preprod-doc-tab.is-active {
  border-color: rgba(15, 114, 108, 0.3);
  background: rgba(15, 114, 108, 0.12);
  color: var(--accent-2);
}

.preprod-doc-tab-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.preprod-editor-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.preprod-doc-title-input {
  font-size: 1.55rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 700;
  border: none;
  padding: 0;
  background: transparent;
}

.preprod-doc-title-input:focus {
  outline: none;
  box-shadow: none;
}

.preprod-save-cluster {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.preprod-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preprod-reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.preprod-editor-toolbar button {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(74, 60, 44, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.preprod-editor-toolbar button.is-active {
  border-color: rgba(15, 114, 108, 0.3);
  background: rgba(15, 114, 108, 0.12);
  color: var(--accent-2);
}

.preprod-rich-editor {
  min-height: 560px;
  border-radius: 22px;
  border: 1px solid rgba(74, 60, 44, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 28px 28px 64px;
}

.preprod-reader-surface {
  min-height: 420px;
  border-radius: 22px;
  border: 1px solid rgba(74, 60, 44, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 28px 28px 64px;
  font-size: 1.08rem;
  line-height: 1.72;
}

.preprod-reader-surface p {
  margin: 0 0 1.1em;
}

.preprod-rich-editor .ProseMirror {
  min-height: 480px;
  outline: none;
  font-size: 1.08rem;
  line-height: 1.72;
}

.preprod-rich-editor .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: rgba(109, 92, 77, 0.55);
  pointer-events: none;
  height: 0;
}

.preprod-rich-editor .ProseMirror h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 1.2em 0 0.45em;
}

.preprod-rich-editor .ProseMirror blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid rgba(15, 114, 108, 0.25);
  color: var(--muted);
}

.preprod-rich-editor .ProseMirror ul,
.preprod-rich-editor .ProseMirror ol {
  padding-left: 1.5rem;
}

.preprod-editor-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.preprod-link-panel {
  border: 1px solid rgba(74, 60, 44, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  padding: 12px 14px;
}

.preprod-foldout > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.preprod-foldout > summary::-webkit-details-marker {
  display: none;
}

.preprod-foldout[open] > summary {
  margin-bottom: 14px;
}

.preprod-link-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}

.preprod-link-panel[open] summary {
  margin-bottom: 12px;
}

.preprod-picker-search {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.preprod-picker-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.preprod-picker-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.preprod-picker-item button {
  justify-self: start;
}

.preprod-doc-launch.is-active {
  border-color: rgba(15, 114, 108, 0.3);
  background: rgba(15, 114, 108, 0.12);
  color: var(--accent-2);
}

.preprod-version-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid rgba(74, 60, 44, 0.08);
}

.preprod-version-item:first-child {
  border-top: none;
  padding-top: 0;
}

.preprod-version-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.preprod-version-snippet {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.preprod-checklist {
  display: grid;
  gap: 10px;
}

.preprod-chat-shell {
  display: grid;
  gap: 16px;
  min-height: 0;
}

.preprod-chat-thread {
  display: grid;
  gap: 14px;
  align-content: start;
  max-height: min(68vh, 960px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}

.preprod-chat-thread::-webkit-scrollbar {
  width: 10px;
}

.preprod-chat-thread::-webkit-scrollbar-thumb {
  background: rgba(74, 60, 44, 0.2);
  border-radius: 999px;
}

.preprod-chat-thread::-webkit-scrollbar-track {
  background: transparent;
}

.preprod-chat-message {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.preprod-chat-message.is-user {
  border-color: rgba(15, 114, 108, 0.14);
  background: rgba(15, 114, 108, 0.06);
}

.preprod-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preprod-chat-body {
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
}

.preprod-chat-form textarea {
  min-height: 120px;
  max-height: 280px;
  resize: vertical;
}

.preprod-chat-dropzone {
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 114, 108, 0.18);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.preprod-chat-dropzone.is-dragover {
  border-color: rgba(15, 114, 108, 0.48);
  background: rgba(15, 114, 108, 0.08);
  box-shadow: 0 0 0 4px rgba(15, 114, 108, 0.08);
}

.assistant-pending-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.assistant-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(15, 114, 108, 0.18);
  border-top-color: var(--accent-2);
  animation: assistant-spin 0.9s linear infinite;
}

.preprod-chat-message.is-pending {
  border-color: rgba(15, 114, 108, 0.18);
  background: rgba(15, 114, 108, 0.04);
}

@keyframes assistant-spin {
  to {
    transform: rotate(360deg);
  }
}

.preprod-chat-attachment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.secondary-button.compact,
.button.compact,
button.compact {
  padding: 8px 12px;
  font-size: 0.88rem;
  border-radius: 12px;
}

.preprod-generated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.preprod-generated-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.preprod-generated-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(236, 228, 214, 0.5);
}

.preprod-output-shell {
  display: grid;
  gap: 16px;
}

.preprod-output-list {
  display: grid;
  gap: 14px;
}

.preprod-output-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.preprod-insight-stack {
  display: grid;
  gap: 12px;
}

.preprod-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.preprod-assistant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.preprod-assistant-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.preprod-assistant-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.preprod-assistant-panel summary::-webkit-details-marker {
  display: none;
}

.preprod-assistant-panel[open] summary {
  margin-bottom: 14px;
}

.model-eval-grid {
  align-items: start;
}

.model-eval-provider-stack {
  display: grid;
  gap: 14px;
}

.model-eval-provider-card {
  padding: 18px;
}

.model-eval-compare {
  display: grid;
  gap: 14px;
}

.model-eval-compare-header,
.model-eval-compare-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.model-eval-compare-category {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding-top: 10px;
}

.model-eval-compare-models {
  display: grid;
  gap: 14px;
}

.model-eval-compare-modelhead {
  border: 1px solid rgba(74, 60, 44, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.model-eval-compare-cell {
  min-width: 0;
}

.model-eval-compare-models-1 {
  grid-template-columns: minmax(0, 1fr);
}

.model-eval-compare-models-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-eval-compare-models-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.model-eval-compare-models-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.model-eval-compare-models-5,
.model-eval-compare-models-6,
.model-eval-compare-models-7,
.model-eval-compare-models-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.model-eval-run-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.model-eval-run-summary-item {
  border: 1px solid rgba(74, 60, 44, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.model-eval-history-row.is-active {
  border: 1px solid rgba(15, 114, 108, 0.18);
  background: rgba(15, 114, 108, 0.08);
  border-radius: 16px;
  padding: 10px 12px;
}

.model-eval-pre {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(74, 60, 44, 0.12);
  border-radius: 16px;
  padding: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.model-eval-structured {
  display: grid;
  gap: 12px;
}

.model-eval-section {
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.model-eval-section-title,
.model-eval-node-key {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.model-eval-section-body,
.model-eval-node-value {
  min-width: 0;
}

.model-eval-tree,
.model-eval-list {
  display: grid;
  gap: 10px;
}

.model-eval-node,
.model-eval-list-item {
  border-left: 2px solid rgba(74, 60, 44, 0.1);
  padding-left: 12px;
  display: grid;
  gap: 6px;
}

.model-eval-list-item {
  border: 1px solid rgba(74, 60, 44, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.58);
}

.model-eval-tree-depth-0 > .model-eval-node,
.model-eval-list-depth-0 > .model-eval-list-item {
  border-left-color: rgba(15, 114, 108, 0.18);
}

.model-eval-leaf,
.model-eval-bool {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
}

@media (max-width: 1080px) {
  .model-eval-compare-header,
  .model-eval-compare-row {
    grid-template-columns: 1fr;
  }

  .model-eval-compare-models-3,
  .model-eval-compare-models-4,
  .model-eval-compare-models-5,
  .model-eval-compare-models-6,
  .model-eval-compare-models-7,
  .model-eval-compare-models-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.preprod-insight-group {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.preprod-insight-group + .preprod-insight-group {
  padding-top: 12px;
  border-top: 1px solid rgba(74, 60, 44, 0.08);
}

.preprod-checkitem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.preprod-checkitem.is-done {
  border-color: rgba(15, 114, 108, 0.2);
  background: rgba(15, 114, 108, 0.08);
}

.preprod-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(193, 112, 67, 0.14);
  color: var(--accent);
}

.preprod-checkitem.is-done .preprod-checkmark {
  background: rgba(15, 114, 108, 0.14);
  color: var(--accent-2);
}

.preprod-action-prompt {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.preprod-thumbnail-brief {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.preprod-thumbnail-brief.is-compact {
  padding: 12px;
}

.preprod-thumbnail-brief-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preprod-thumbnail-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preprod-thumbnail-brief-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(74, 60, 44, 0.06);
  background: rgba(255, 255, 255, 0.64);
  line-height: 1.4;
}

.preprod-thumbnail-brief-item-wide {
  grid-column: 1 / -1;
}

.preprod-balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preprod-balance-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.preprod-balance-card.is-current {
  border-color: rgba(15, 114, 108, 0.24);
  background: rgba(15, 114, 108, 0.08);
}

.preprod-balance-count {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
}

.preprod-unit-lineup {
  display: grid;
  gap: 10px;
}

.preprod-unit-lineup-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-decoration: none;
}

.preprod-unit-lineup-item.is-current {
  border-color: rgba(193, 112, 67, 0.22);
  background: rgba(193, 112, 67, 0.08);
}

.button.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.google-preview {
  margin-top: 12px;
}

.google-preview iframe {
  width: 100%;
  min-height: 420px;
  margin-top: 12px;
  border: 1px solid rgba(74, 60, 44, 0.12);
  border-radius: 18px;
  background: white;
}

.preprod-control-stack {
  display: grid;
  gap: 8px;
}

.preprod-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.preprod-control-row {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(74, 60, 44, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

@media (max-width: 880px) {
  .shell {
    padding: 18px;
  }

  .split-hero,
  .video-row,
  .video-brief-layout,
  .preprod-toolbar-grid,
  .preprod-inline-create,
  .preprod-workspace-grid,
  .preprod-workspace-layout {
    grid-template-columns: 1fr;
  }

  .preprod-section-head,
  .preprod-foldout > summary {
    align-items: start;
  }

  .preprod-board {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .preprod-thumbnail-brief-grid {
    grid-template-columns: 1fr;
  }

  .preprod-unit {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
  }

  .preprod-editor-shell {
    min-height: 0;
  }

  .preprod-rich-editor {
    padding: 20px 18px 40px;
  }

  .preprod-balance-grid {
    grid-template-columns: 1fr;
  }

  .preprod-cockpit-grid {
    grid-template-columns: 1fr;
  }

  .preprod-setup-grid,
  .preprod-insight-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px 22px;
  }
}
