:root {
  color-scheme: dark;
  --bg: #0b090d;
  --base: #121015;
  --tool: #17131a;
  --glass: rgba(30, 23, 31, 0.84);
  --line: #342c36;
  --line-soft: #241f27;
  --line-bright: #514451;
  --text: #f4f0f3;
  --muted: #a9a1aa;
  --dim: #918994;
  --wine: #8f3157;
  --rose: #c35f82;
  --lilac: #a98bd0;
  --gold: #d8b964;
  --green: #73b384;
  --cyan: #69aeb3;
  --red: #d56b73;
  --dock: 72px;
  --topbar: 56px;
  font-family: Inter, "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
iframe:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

svg { width: 18px; height: 18px; stroke-width: 1.7; }

.studio-shell {
  display: grid;
  width: 100%;
  height: 100dvh;
  grid-template-columns: var(--dock) minmax(0, 1fr);
}

.rail {
  position: relative;
  z-index: 8;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--line-soft);
  background: #0e0c10;
}

.dock-home {
  flex: 0 0 55px;
  margin-top: 8px;
}

.module-nav {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 3px 0 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.module-nav::-webkit-scrollbar { display: none; }

.nav-group {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 5px 0 3px;
  border-top: 1px solid var(--line-soft);
}

.nav-group-label {
  width: 100%;
  height: 14px;
  color: #918994;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  text-transform: uppercase;
}

.nav-item,
.mobile-more-button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #817981;
  cursor: pointer;
  transition: color 140ms ease, transform 140ms ease, background 140ms ease;
}

.nav-item:hover,
.mobile-more-button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-item.active {
  color: var(--text);
  background: #201820;
}

.nav-item.active::after {
  position: absolute;
  right: -14px;
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: var(--rose);
  content: "";
}

.nav-label {
  position: fixed;
  left: 64px;
  z-index: 20;
  min-width: max-content;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #1b171d;
  box-shadow: 0 14px 34px #00000066;
  color: var(--text);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.nav-item:hover .nav-label,
.nav-item:focus-visible .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.nav-cursor {
  position: absolute;
  top: 0;
  left: 8px;
  z-index: 0;
  width: 56px;
  height: 42px;
  border: 1px solid #4f3645;
  border-radius: 7px;
  background: #1d151b;
  opacity: 0;
  transition: transform 260ms cubic-bezier(.2, .7, .2, 1), opacity 180ms ease;
}

.nav-cursor.visible { opacity: 1; }
.mobile-more-button { display: none; }

.rail-footer {
  display: grid;
  width: 100%;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border-top: 1px solid var(--line-soft);
}

.rail-footer > span:last-child { display: none; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.status-dot.ready {
  background: var(--green);
  box-shadow: 0 0 0 4px #73b38418;
}

.status-dot.error { background: var(--red); }

.stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: var(--topbar) minmax(0, 1fr);
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: #0d0b0f;
}

.route-heading,
.runtime-strip,
.product-lockup {
  display: flex;
  align-items: center;
}

.route-heading { min-width: 0; gap: 10px; }
.product-lockup { min-width: 0; gap: 12px; }
.product-lockup strong { font-size: 14px; font-weight: 650; white-space: nowrap; }
.product-lockup span {
  overflow: hidden;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease, background 140ms ease;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-bright);
  background: var(--tool);
  color: var(--text);
  transform: translateY(-1px);
}

.icon-button:disabled { opacity: .36; cursor: not-allowed; }
.rail-toggle { display: none; }

.runtime-strip { min-width: 0; }
.runtime-strip > div {
  min-width: 126px;
  max-width: 210px;
  padding: 0 17px;
  border-left: 1px solid var(--line-soft);
}

.runtime-strip span,
.runtime-strip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-strip span { color: var(--dim); font-size: 9px; }
.runtime-strip strong {
  margin-top: 3px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 550;
}

.runtime-strip .icon-button { margin-left: 8px; }

.viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
}

.view {
  display: none;
  width: 100%;
  min-height: 100%;
  padding: 32px 38px 42px;
}

.view.active {
  display: flex;
  flex-direction: column;
  animation: view-enter 300ms cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow > span {
  margin-right: 9px;
  color: var(--rose);
  font-family: "Cascadia Mono", Consolas, monospace;
}

.overview-view { gap: 0; padding-top: 20px; }

.overview-hero {
  display: grid;
  min-height: 252px;
  align-items: stretch;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  border-bottom: 1px solid var(--line);
}

.overview-title-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 18px 42px 30px 0;
}

.overview-title-group h1 {
  max-width: 100%;
  margin: 13px 0 11px;
  font-size: 72px;
  font-weight: 520;
  line-height: 1;
  overflow-wrap: anywhere;
}

.overview-edition {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

.overview-edition i {
  width: 17px;
  height: 1px;
  background: var(--line-bright);
}

.pulse-field {
  display: grid;
  min-width: 0;
  min-height: 220px;
  padding: 24px 0 20px 30px;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  border-left: 1px solid var(--line);
}

.pulse-field header,
.pulse-field footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
}

.pulse-field header strong { color: var(--muted); font-size: 9px; font-weight: 600; }
.pulse-field canvas { display: block; width: 100%; height: 100%; min-height: 120px; }

.metric-baseline {
  display: grid;
  min-height: 92px;
  grid-template-columns: 1.35fr 1fr 1fr .7fr;
  border-bottom: 1px solid var(--line);
}

.metric-baseline article {
  min-width: 0;
  padding: 19px 22px 17px 0;
}

.metric-baseline article + article {
  padding-left: 22px;
  border-left: 1px solid var(--line-soft);
}

.metric-baseline span,
.metric-baseline strong,
.metric-baseline small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-baseline span { color: var(--dim); font-size: 9px; }
.metric-baseline strong { margin-top: 8px; font-size: 16px; font-weight: 580; }
.metric-baseline small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.overview-composition {
  display: grid;
  min-height: 300px;
  padding-top: 28px;
  grid-template-columns: minmax(0, 7fr) minmax(290px, 5fr);
  gap: 34px;
}

.recent-work { min-width: 0; padding-right: 16px; }

.section-heading,
.module-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-heading { min-height: 55px; padding-bottom: 14px; }
.section-heading > div { min-width: 0; }
.section-heading > div > span,
.section-heading > span {
  color: var(--dim);
  font-size: 9px;
  font-weight: 700;
}

.section-heading h2 {
  min-width: 0;
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 540;
  overflow-wrap: anywhere;
}

.module-header {
  min-height: 106px;
  align-items: flex-end;
  padding: 10px 0 23px;
  border-bottom: 1px solid var(--line);
}

.module-header > div { min-width: 0; }
.module-header h1 {
  min-width: 0;
  margin: 8px 0 0;
  font-size: 43px;
  font-weight: 520;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.view-status {
  max-width: 38%;
  padding-bottom: 5px;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  text-align: right;
}

.text-button,
.primary-button,
.row-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}

.text-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.text-button:hover {
  border-color: var(--line);
  color: var(--text);
  transform: translateY(-1px);
}

.primary-button {
  border: 1px solid #9a4e6b;
  background: var(--wine);
  color: #fff8fb;
}

.primary-button:hover { border-color: var(--rose); background: #a13a61; transform: translateY(-1px); }
.row-action { min-height: 27px; padding: 0 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; }
.row-action:hover { border-color: var(--line-bright); color: var(--text); }
.row-actions { overflow: visible; }
.row-action-buttons { display: flex; align-items: center; gap: 4px; }
.row-action-icon { width: 27px; min-width: 27px; padding: 0; }
.row-action-icon svg { width: 13px; height: 13px; }

.glass-panel {
  border: 1px solid #443746;
  border-radius: 8px;
  background: var(--glass);
  box-shadow: 0 22px 52px #00000045, inset 0 1px #ffffff09;
  backdrop-filter: blur(18px);
}

.active-pipeline {
  min-width: 0;
  padding: 20px 20px 22px;
}

.data-list,
.activity-list { min-width: 0; }
.empty-list,
.activity-list:has(> p:only-child) {
  display: grid;
  min-height: 180px;
  place-items: center;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
}

.data-row {
  display: grid;
  min-height: 58px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 92px 150px;
  gap: 18px;
  border-top: 1px solid var(--line-soft);
  animation: row-reveal 240ms cubic-bezier(.2, .7, .2, 1) both;
}

.data-row:nth-child(2) { animation-delay: 30ms; }
.data-row:nth-child(3) { animation-delay: 60ms; }
.data-row:nth-child(4) { animation-delay: 90ms; }
.data-row:nth-child(5) { animation-delay: 120ms; }

@keyframes row-reveal {
  from { opacity: 0; transform: translateX(5px); }
  to { opacity: 1; transform: translateX(0); }
}

.data-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.data-row span { color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; }

.activity-row {
  position: relative;
  display: grid;
  min-height: 52px;
  align-items: center;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
}

.activity-row + .activity-row::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 24px;
  height: 1px;
  background: var(--line-soft);
  content: "";
}

.activity-row strong { overflow: hidden; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.activity-row span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.activity-mark { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--wine); }
.activity-mark::after { position: absolute; top: 9px; left: 3px; width: 1px; height: 35px; background: var(--wine); content: ""; }
.activity-row:last-child .activity-mark::after { display: none; }

.synthesis-view { height: 100%; padding: 0; overflow: hidden; }
.synthesis-view iframe { width: 100%; height: 100%; border: 0; background: #110b15; }

.domain-workspace,
.jobs-layout {
  display: grid;
  min-width: 0;
  min-height: 440px;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 29%);
  gap: 30px;
  padding-top: 26px;
}

.workspace-section { min-width: 0; }
.table-section { display: flex; min-height: 0; flex-direction: column; }
.domain-main { border-top: 1px solid var(--line-soft); }
.domain-main > .section-heading,
.full-height > .section-heading { padding-top: 16px; }

.inspector {
  min-width: 0;
  align-self: start;
  padding: 22px;
}

.inspector h2 { margin: 8px 0 24px; font-size: 19px; font-weight: 540; line-height: 1.35; }
.inspector dl,
.settings-section dl { margin: 0; }
.inspector dl > div,
.settings-section dl > div {
  display: grid;
  min-height: 48px;
  align-items: center;
  grid-template-columns: minmax(95px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  border-top: 1px solid var(--line-soft);
}

dt { color: var(--dim); font-size: 10px; }
dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; text-align: right; }

.table-wrap { min-width: 0; overflow: auto; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th {
  height: 38px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 9px;
  font-weight: 650;
  text-align: left;
}

td {
  height: 52px;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td:first-child { color: var(--text); font-size: 12px; }
tbody tr { transition: background 140ms ease; }
tbody tr:hover { background: #171319; }
tbody tr[data-selectable="true"] { cursor: pointer; }
tbody tr.selected { background: #241820; }
.empty-cell { height: 190px; color: var(--dim) !important; text-align: center; }

.row-select {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-select:hover { color: #f5c7d7; }

.status-label {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.status-label.ready,
.status-label.succeeded,
.status-label.available { border-color: #385943; color: var(--green); }
.status-label.running { border-color: #675671; color: var(--lilac); }
.status-label.failed,
.status-label.cancelled { border-color: #663c42; color: var(--red); }

.pipeline-inspector ol {
  position: relative;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.pipeline-inspector li {
  position: relative;
  min-height: 44px;
  padding: 8px 0 8px 26px;
  color: var(--dim);
  font-size: 11px;
}

.pipeline-inspector li::before {
  position: absolute;
  top: 12px;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background: var(--tool);
  content: "";
}

.pipeline-inspector li::after {
  position: absolute;
  top: 21px;
  bottom: -8px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.pipeline-inspector li:last-child::after { display: none; }
.pipeline-inspector li.active { color: var(--text); }
.pipeline-inspector li.active::before { border-color: var(--rose); background: var(--rose); }

.pipeline-lane,
.lineage-ruler {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 0 4px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  white-space: nowrap;
}

.pipeline-lane i,
.lineage-ruler i { min-width: 14px; height: 1px; flex: 1; background: var(--line); }
.pipeline-lane .active { color: var(--rose); }

.waveform-ruler {
  display: flex;
  height: 72px;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.waveform-ruler span { height: 1px; flex: 1; background: var(--lilac); opacity: .52; }
.waveform-ruler span:nth-child(2n) { height: 9px; }
.waveform-ruler span:nth-child(3n) { height: 25px; opacity: .78; }
.waveform-ruler span:nth-child(5n) { height: 42px; background: var(--rose); }

.training-signal {
  display: flex;
  height: 84px;
  align-items: flex-end;
  gap: 4px;
  padding: 18px 0 0;
  border-bottom: 1px solid var(--line-soft);
}

.training-signal span {
  height: var(--h);
  flex: 1;
  border-top: 1px solid var(--lilac);
  background: #a98bd00e;
}

.evaluation-decks {
  display: grid;
  min-height: 90px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.evaluation-decks section {
  display: grid;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  gap: 14px;
  padding: 0 18px 0 0;
}

.evaluation-decks section + section { padding-left: 22px; border-left: 1px solid var(--line); }
.evaluation-decks section > span { font-size: 31px; font-weight: 300; }
.evaluation-decks section > strong { font-size: 12px; font-weight: 550; }

.qualification-list ul { margin: 0; padding: 0; list-style: none; }
.qualification-list li {
  position: relative;
  padding: 11px 0 11px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
}

.qualification-list li::before { position: absolute; top: 15px; left: 3px; width: 6px; height: 6px; border: 1px solid var(--line-bright); border-radius: 50%; content: ""; }

.lineage-ruler { margin-top: 0; }

.engine-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 106px;
  gap: 10px;
  padding-top: 28px;
}

.engine-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--base);
}

.engine-item:nth-child(1),
.engine-item:nth-child(4),
.engine-item:nth-child(7) { grid-column: span 4; }
.engine-item:nth-child(2),
.engine-item:nth-child(5),
.engine-item:nth-child(8) { grid-column: span 5; }
.engine-item:nth-child(3),
.engine-item:nth-child(6),
.engine-item:nth-child(9) { grid-column: span 3; }
.engine-item:nth-child(4n) { background: #181319; }
.engine-item span,
.engine-item small { color: var(--dim); font-size: 9px; }
.engine-item strong { overflow: hidden; font-size: 14px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }

.jobs-layout { grid-template-columns: minmax(0, 1fr) minmax(270px, 30%); }
.queue-depth {
  display: flex;
  min-height: 440px;
  align-self: start;
  flex-direction: column;
  padding: 20px;
}

.queue-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 16px;
}

.queue-summary span,
.job-inspector > span { color: var(--dim); font-size: 9px; }
.queue-summary strong { margin: 0; font-size: 31px; font-weight: 300; line-height: 1; }
.queue-summary i { grid-column: 1 / -1; height: 1px; margin: 6px 0; background: var(--line-bright); }

.job-inspector { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.job-inspector > strong { display: block; margin-top: 8px; overflow-wrap: anywhere; font-size: 12px; font-weight: 560; }
.job-log-list { margin-top: 16px; }
.job-log-list > p { color: var(--dim); font-size: 10px; }
.job-log-row { display: grid; padding: 10px 0; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; border-top: 1px solid var(--line-soft); }
.job-log-row time { color: var(--dim); font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }
.job-log-row p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.job-log-level { color: var(--lilac); font-size: 8px; text-transform: uppercase; }
.job-log-level.error { color: var(--red); }
.job-log-level.warning { color: var(--gold); }

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
  padding-top: 26px;
}

.settings-section { border-top: 1px solid var(--line); }

.project-dialog,
.mobile-nav-sheet {
  padding: 0;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: #1a151c;
  box-shadow: 0 30px 90px #000000a0;
  color: var(--text);
}

.project-dialog::backdrop,
.mobile-nav-sheet::backdrop { background: #080609bc; backdrop-filter: blur(5px); }
.project-dialog { width: min(520px, calc(100vw - 32px)); }
.project-dialog form { display: grid; gap: 17px; padding: 22px; }
.project-dialog header,
.project-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.project-dialog h2 { margin: 5px 0 0; font-size: 22px; }
.project-dialog label { display: grid; gap: 7px; }
.project-dialog label > span { color: var(--muted); font-size: 11px; }
.project-dialog input,
.project-dialog select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #100d12;
  color: var(--text);
}
.project-dialog footer { justify-content: flex-end; padding-top: 5px; }
.form-error { min-height: 18px; margin: 0; color: var(--red); font-size: 11px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: var(--glass);
  box-shadow: 0 18px 50px #00000070;
  color: var(--text);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(18px);
}

.toast.show { opacity: 1; transform: translateY(0); }
.mobile-nav-sheet { display: none; }

@media (max-width: 1120px) {
  .overview-title-group h1 { font-size: 58px; }
  .runtime-strip > div { min-width: 104px; max-width: 150px; }
  .overview-hero { grid-template-columns: minmax(0, 1.45fr) minmax(270px, .8fr); }
  .overview-composition { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr); }
  .domain-workspace { grid-template-columns: minmax(0, 1fr) 250px; }
}

@media (max-width: 860px) {
  :root { --topbar: 52px; }
  .studio-shell { display: block; }
  .stage { height: calc(100dvh - 64px - env(safe-area-inset-bottom)); }
  .rail {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 12;
    display: grid;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-right: 0;
    background: #0e0c10f7;
    backdrop-filter: blur(18px);
  }

  .dock-home,
  .module-nav .nav-item.mobile-primary,
  .mobile-more-button {
    display: flex;
    width: 100%;
    height: 64px;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 0;
  }

  .dock-home { grid-column: 1; grid-row: 1; }
  .module-nav { display: contents; }
  .nav-group { display: contents; }
  .nav-group-label,
  .nav-cursor,
  .module-nav .nav-item:not(.mobile-primary),
  .rail-footer { display: none; }
  .module-nav .nav-item[data-view="synthesis"] { grid-column: 2; grid-row: 1; }
  .module-nav .nav-item[data-view="datasets"] { grid-column: 3; grid-row: 1; }
  .module-nav .nav-item[data-view="jobs"] { grid-column: 4; grid-row: 1; }
  .mobile-more-button { grid-column: 5; grid-row: 1; }
  .nav-item.active { background: #211820; }
  .nav-item.active::after { right: auto; bottom: 0; width: 20px; height: 2px; }
  .nav-label,
  .mobile-more-button span { position: static; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: inherit; font-size: 9px; opacity: 1; transform: none; }

  .topbar { padding: 0 14px; }
  .rail-toggle { display: none; }
  .product-lockup { gap: 8px; }
  .product-lockup strong { font-size: 13px; }
  .product-lockup span { max-width: 150px; padding-left: 8px; font-size: 10px; }
  .runtime-strip > div { display: none; }
  .runtime-strip > div:first-child { display: block; min-width: 0; max-width: 116px; padding: 0 10px; }
  .runtime-strip .icon-button { margin-left: 4px; }
  .view { padding: 24px 20px 34px; }
  .synthesis-view { padding: 0; }

  .overview-hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-title-group { min-height: 202px; padding: 24px 0; }
  .overview-title-group h1 { font-size: 48px; }
  .overview-edition { flex-wrap: wrap; }
  .pulse-field { min-height: 174px; padding: 20px 0; border-top: 1px solid var(--line); border-left: 0; }
  .pulse-field canvas { min-height: 96px; }
  .metric-baseline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-baseline article { min-height: 84px; padding: 16px 14px 14px 0; }
  .metric-baseline article + article { padding-left: 14px; }
  .metric-baseline article:nth-child(3) { border-top: 1px solid var(--line-soft); border-left: 0; }
  .metric-baseline article:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .overview-composition { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .recent-work { padding-right: 0; }
  .module-header { min-height: 88px; padding-top: 4px; }
  .module-header h1 { font-size: 36px; }
  .domain-workspace,
  .jobs-layout { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .inspector,
  .queue-depth { order: 0; }
  .pipeline-lane,
  .lineage-ruler { overflow-x: auto; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .engine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 100px; }
  .engine-item:nth-child(n) { grid-column: span 1; }

  .mobile-nav-sheet[open] {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    left: 10px;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 10px 16px 18px;
  }

  .sheet-handle { width: 34px; height: 3px; margin: 0 auto 10px; border-radius: 3px; background: var(--line-bright); }
  .mobile-nav-sheet header { display: flex; align-items: center; justify-content: space-between; }
  .mobile-nav-sheet nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
  .mobile-nav-sheet nav button { display: flex; min-height: 48px; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--tool); color: var(--muted); }
  .mobile-nav-sheet nav button:hover { border-color: var(--line-bright); color: var(--text); }
  .mobile-nav-sheet nav button.active {
    border-color: #6f4558;
    background: #261921;
    color: var(--text);
  }
  .toast {
    top: 62px;
    bottom: auto;
  }
}

@media (max-width: 620px) {
  .view { padding-right: 14px; padding-left: 14px; }
  .synthesis-view { padding: 0; }
  .overview-title-group h1 { font-size: 42px; }
  .module-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .module-header h1 { font-size: 31px; }
  .module-header .primary-button { align-self: stretch; }
  .view-status { max-width: 100%; padding: 0; text-align: left; }
  .data-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .data-row span:last-child { display: none; }
  .evaluation-decks { grid-template-columns: minmax(0, 1fr); }
  .evaluation-decks section { min-height: 72px; }
  .evaluation-decks section + section { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .table-wrap { overflow: visible; }
  table,
  tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { display: grid; margin-bottom: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--base); }
  td { display: grid; min-width: 0; min-height: 32px; height: auto; padding: 6px 0; grid-template-columns: minmax(82px, .7fr) minmax(0, 1.3fr); gap: 12px; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; white-space: normal; }
  td:last-child { border-bottom: 0; }
  td::before { color: var(--dim); content: attr(data-label); font-size: 9px; }
  td:first-child { font-size: 11px; }
  .empty-cell { display: block; min-height: 120px; padding-top: 50px; }
  .empty-cell::before { display: none; }
  .engine-grid { grid-template-columns: minmax(0, 1fr); }
  .runtime-strip > div:first-child { display: none; }
  .overview-edition i { display: none; }
  .settings-section dl > div,
  .inspector dl > div { grid-template-columns: minmax(88px, .8fr) minmax(0, 1.2fr); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* MotionSite-reference workstation direction --------------------------------
   Pixzen supplies the editorial hierarchy, Analytics/Kinetic the information
   rhythm, and Ostra only the selective glass material. The background film is
   an independent full-viewport media layer. */

:root {
  --bg: #08070b;
  --base: #0f0c13;
  --tool: #17111b;
  --glass: rgba(19, 14, 23, .58);
  --line: rgba(237, 229, 239, .16);
  --line-soft: rgba(237, 229, 239, .09);
  --line-bright: rgba(237, 229, 239, .28);
  --text: #f3eef4;
  --muted: #aaa1ad;
  --dim: #877e8b;
  --wine: #762b4c;
  --rose: #d27496;
  --lilac: #b79ad4;
  --gold: #dabf72;
  --green: #79bd90;
  --cyan: #6eafb8;
  --red: #dd7078;
}

body {
  background: var(--bg);
}

.ambient-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #08070b;
  opacity: 1;
  pointer-events: none;
  transition: opacity 360ms cubic-bezier(.22, 1, .36, 1);
}

.ambient-stage video,
.ambient-stage-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ambient-stage video {
  border: 0;
  border-radius: 0;
  object-fit: cover;
  filter: grayscale(.12) saturate(.68) contrast(1.08) brightness(.54);
  transform: scale(1.015);
}

.ambient-stage-shade {
  background: rgba(8, 6, 10, .42);
  box-shadow:
    inset 220px 0 240px rgba(7, 5, 9, .2),
    inset 0 -210px 230px rgba(9, 6, 11, .25);
}

body:not([data-current-view="overview"]) .ambient-stage {
  opacity: 0;
}

.studio-shell {
  position: relative;
  z-index: 1;
}

.rail,
.topbar {
  border-color: var(--line-soft);
  background: rgba(9, 7, 11, .9);
  backdrop-filter: blur(20px) saturate(1.3);
}

body[data-current-view="overview"] .rail,
body[data-current-view="overview"] .topbar {
  background: rgba(8, 6, 10, .46);
  backdrop-filter: blur(22px) saturate(1.25);
}

.viewport {
  background: var(--bg);
  transition: background-color 260ms ease;
}

body[data-current-view="overview"] .viewport {
  background: transparent;
}

.view.active {
  animation: canvas-enter 340ms cubic-bezier(.22, 1, .36, 1) both;
}

.view.active .module-header > div,
.view.active .module-header > button,
.view.active .module-header > .view-status,
.view.active .module-header > .expression-header-actions {
  animation: title-reveal 420ms cubic-bezier(.22, 1, .36, 1) both;
}

.view.active .module-header > :nth-child(2) {
  animation-delay: 45ms;
}

@keyframes canvas-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes title-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.overview-view {
  position: relative;
  gap: 0;
  min-height: 100%;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.overview-hero {
  position: relative;
  display: block;
  min-height: calc(100dvh - var(--topbar));
  padding: 84px 6vw 190px;
  border: 0;
}

.overview-title-group {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 930px;
  padding: 0;
}

.overview-title-group .eyebrow {
  color: rgba(243, 238, 244, .72);
}

.overview-title-group h1 {
  margin: 20px 0 22px;
  padding-bottom: .08em;
  color: #f8f5f8;
  font-size: 108px;
  font-weight: 520;
  line-height: 1;
  text-wrap: balance;
  text-shadow: 0 10px 48px rgba(0, 0, 0, .3);
}

.overview-edition {
  gap: 13px;
  color: rgba(243, 238, 244, .72);
  font-size: 11px;
}

.overview-edition i {
  width: 28px;
  background: rgba(243, 238, 244, .38);
}

.voice-pulse-glass {
  position: absolute;
  right: 6vw;
  bottom: 150px;
  z-index: 3;
  width: 390px;
  min-height: 184px;
  padding: 20px 22px 17px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(19, 14, 23, .47);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 24px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(24px) saturate(1.35);
}

.voice-pulse-glass::after {
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 1px;
  background: rgba(210, 116, 150, .66);
  content: "";
}

.voice-pulse-glass header,
.voice-pulse-glass footer {
  color: rgba(243, 238, 244, .62);
}

.voice-pulse-glass canvas {
  min-height: 104px;
}

.metric-baseline {
  position: absolute;
  right: 6vw;
  bottom: 28px;
  left: 6vw;
  z-index: 3;
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(12, 9, 14, .54);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px) saturate(1.25);
}

.metric-baseline article {
  padding: 19px 22px 17px;
}

.metric-baseline article + article {
  border-left-color: rgba(255, 255, 255, .1);
}

.metric-baseline article span,
.metric-baseline article small {
  color: rgba(243, 238, 244, .58);
}

.overview-composition {
  position: relative;
  z-index: 4;
  min-height: 360px;
  margin: 0;
  padding: 58px 6vw 76px;
  gap: 0;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
}

.recent-work {
  padding-right: 48px;
}

.active-pipeline {
  padding-left: 34px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.module-header {
  min-height: 138px;
  padding: 12px 0 27px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.module-header h1 {
  margin-top: 12px;
  padding-bottom: .14em;
  font-size: 62px;
  font-weight: 470;
  line-height: 1.14;
}

.module-header .eyebrow {
  color: var(--muted);
}

.view:not(.overview-view):not(.synthesis-view) {
  padding: 46px 52px 50px;
}

.domain-workspace,
.jobs-layout {
  min-height: 470px;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 0;
}

.workspace-section,
.table-section,
.settings-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.domain-main,
.jobs-layout > .workspace-section {
  min-width: 0;
  padding: 28px 34px 30px 0;
}

.inspector,
.queue-depth {
  margin: 0;
  padding: 28px 0 30px 30px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: rgba(22, 16, 25, .34);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(1.22);
}

.section-heading {
  min-height: 64px;
  margin-bottom: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading h2,
.inspector h2,
.queue-depth h2 {
  font-size: 20px;
  font-weight: 560;
}

.table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

thead th {
  height: 48px;
  border-bottom-color: var(--line);
  color: var(--dim);
  font-size: 9px;
}

tbody tr {
  background: transparent;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

tbody td {
  height: 54px;
  border-bottom-color: var(--line-soft);
}

.pipeline-lane,
.lineage-ruler {
  margin-top: auto;
  padding: 24px 0 4px;
  border-top: 1px solid var(--line);
}

.waveform-ruler,
.training-signal {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.evaluation-decks {
  min-height: 162px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.evaluation-decks section {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.evaluation-decks section + section {
  border-left: 1px solid var(--line);
}

.engine-grid {
  gap: 1px;
  background: var(--line-soft);
}

.engine-item {
  border: 0;
  border-radius: 0;
  background: var(--base);
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.settings-section {
  min-width: 0;
  padding: 30px 34px 32px;
  border: 0;
  background: color-mix(in srgb, var(--base) 94%, transparent);
}

.settings-section + .settings-section {
  padding-left: 34px;
  border-left: 0;
}

.settings-contract,
.settings-preferences {
  grid-column: span 7;
}

.settings-install,
.settings-session {
  grid-column: span 5;
  border-left: 1px solid var(--line);
}

.settings-contract,
.settings-install,
.settings-preferences,
.settings-session { border-bottom: 1px solid var(--line); }

.settings-section .section-heading {
  min-height: 72px;
  margin-bottom: 0;
}

.settings-index {
  align-self: start;
  color: rgba(229, 206, 221, .25);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .08em;
}

.settings-preferences {
  order: initial;
}

.settings-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
}

.settings-field-grid label,
.settings-toggle {
  display: grid;
  gap: 8px;
  color: var(--dim);
  font-size: 9px;
}

.settings-field-grid select,
.settings-field-grid input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  background: rgba(20, 14, 23, .54);
  color: var(--text);
  font: inherit;
  font-size: 11px;
}

.settings-field-grid .styled-select-trigger {
  min-height: 42px;
}

.settings-field-grid select:focus,
.settings-field-grid input:focus {
  border-color: rgba(226, 155, 183, .62);
  box-shadow: 0 0 0 2px rgba(195, 95, 130, .12);
}

.settings-toggle {
  display: flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
}

.settings-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--rose);
}

.settings-preferences footer {
  display: flex;
  min-height: 54px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}

.settings-preferences .form-error { margin: 0; }

.settings-history {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, auto);
  align-items: center;
  gap: 38px;
  min-height: 152px;
}

.settings-history h2 {
  margin: 8px 0 9px;
  font-size: 21px;
  font-weight: 560;
}

.settings-history p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.settings-kicker {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: .08em;
}

.settings-history-action {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.settings-history-action > span {
  color: var(--dim);
  font-size: 9px;
}

.secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid rgba(226, 155, 183, .28);
  border-radius: 5px;
  background: rgba(52, 35, 49, .5);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(226, 155, 183, .52);
  background: rgba(76, 45, 64, .68);
  transform: translateY(-1px);
}

.secondary-button svg { width: 15px; height: 15px; }

.clear-history-dialog form > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.primary-button {
  border-color: rgba(226, 155, 183, .42);
  background: rgba(118, 43, 76, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .12);
  backdrop-filter: blur(14px) saturate(1.2);
}

.primary-button:hover:not(:disabled) {
  border-color: rgba(232, 177, 199, .68);
  background: rgba(137, 50, 86, .9);
  transform: translateY(-1px);
}

.icon-button,
.text-button,
.view-status {
  border-color: var(--line);
}

dialog,
.mobile-nav-sheet {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(19, 14, 23, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 30px 100px rgba(0, 0, 0, .6);
  backdrop-filter: blur(24px) saturate(1.3);
}

.toast {
  background: rgba(19, 14, 23, .76);
  backdrop-filter: blur(22px) saturate(1.3);
}

.expression-editor {
  background: rgba(22, 16, 25, .4);
  overflow-y: auto;
}

.expression-empty-state[hidden],
.expression-editor dl[hidden],
.expression-editor-form[hidden] {
  display: none;
}

.expression-empty-state {
  margin-top: 26px;
  color: var(--muted);
  line-height: 1.6;
}

.expression-editor-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.expression-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 11px;
}

.expression-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.expression-field-wide {
  grid-column: 1 / -1;
}

.expression-field > span,
.expression-vad legend,
.expression-vad label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.expression-field input:not([type="range"]),
.expression-field select,
.expression-field textarea,
.expression-vad input,
.expression-editor-form > .expression-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: rgba(7, 6, 9, .62);
  color: var(--text);
  font: inherit;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.expression-field input:not([type="range"]),
.expression-field select,
.expression-vad input {
  height: 38px;
  padding: 0 10px;
}

.expression-field textarea,
.expression-editor-form > .expression-field textarea {
  min-height: 78px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.expression-field input:focus,
.expression-field select:focus,
.expression-field textarea:focus,
.expression-vad input:focus {
  border-color: rgba(218, 191, 114, .72);
  background: rgba(12, 9, 14, .9);
  box-shadow: 0 0 0 2px rgba(218, 191, 114, .1);
}

.expression-field input:disabled {
  color: var(--dim);
  background: rgba(255, 255, 255, .025);
}

.expression-intensity-field {
  grid-column: 1 / -1;
}

.expression-intensity-field > span {
  display: flex;
  justify-content: space-between;
}

.expression-intensity-field output {
  color: var(--gold);
  font-family: "Cascadia Mono", Consolas, monospace;
}

.expression-intensity-field input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--rose);
}

.expression-reference-analysis {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 6, 9, .34);
}

.expression-reference-analysis > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.expression-reference-analysis > header > div {
  min-width: 0;
}

.expression-reference-analysis > header span,
.expression-reference-analysis dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.expression-reference-analysis h3 {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 560;
}

.expression-reference-analysis .row-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.expression-reference-analysis canvas {
  display: block;
  width: 100%;
  height: 86px;
  border-block: 1px solid rgba(255, 255, 255, .07);
}

.expression-analysis-metrics {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.expression-analysis-metrics > div {
  min-width: 0;
}

.expression-analysis-metrics dt,
.expression-analysis-metrics dd {
  margin: 0;
}

.expression-analysis-metrics dd {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expression-reference-analysis > small {
  color: var(--dim);
  font-size: 10px;
  line-height: 1.4;
}

.expression-vad {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.expression-vad legend {
  padding: 0 6px;
}

.expression-vad label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.expression-vad input {
  padding: 0 7px;
}

.expression-editor-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.expression-editor-actions button {
  white-space: nowrap;
}

.expression-delete-button {
  color: var(--red);
}

.expression-source-section + .expression-source-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.expression-section-meta,
.expression-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1180px) {
  .overview-title-group h1 { font-size: 86px; }
  .voice-pulse-glass { width: 340px; }
  .view:not(.overview-view):not(.synthesis-view) { padding-right: 38px; padding-left: 38px; }
  .domain-workspace,
  .jobs-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .module-header h1 { font-size: 54px; }
  .runtime-strip > div:first-child { min-width: 190px; max-width: 210px; }
  .runtime-strip > div:nth-child(2) { display: none; }
  #overviewGpu {
    overflow: visible;
    font-size: 14px;
    line-height: 1.2;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 860px) {
  .ambient-stage video {
    object-position: 54% center;
  }

  .rail,
  body[data-current-view="overview"] .rail {
    background: rgba(10, 7, 12, .82);
    backdrop-filter: blur(20px) saturate(1.3);
  }

  .overview-hero {
    min-height: calc(100dvh - var(--topbar) - 64px - env(safe-area-inset-bottom));
    padding: 50px 22px 210px;
  }

  .overview-title-group h1 {
    margin-top: 15px;
    font-size: 62px;
    line-height: 1;
  }

  .voice-pulse-glass {
    right: 22px;
    bottom: 156px;
    left: 22px;
    width: auto;
    min-height: 142px;
    padding: 15px 17px 12px;
  }

  .voice-pulse-glass canvas { min-height: 76px; }

  .metric-baseline {
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 140px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    scrollbar-width: none;
  }

  .metric-baseline::-webkit-scrollbar { display: none; }
  .metric-baseline article { min-height: 70px; padding: 11px 18px 9px; }
  .metric-baseline article:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .metric-baseline article:nth-child(3) { border-left: 0; }
  .metric-baseline article + article { border-left: 1px solid rgba(255, 255, 255, .1); }

  .overview-composition {
    padding: 42px 22px 60px;
  }

  .active-pipeline {
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .view:not(.overview-view):not(.synthesis-view) {
    padding: 32px 22px 46px;
  }

  .module-header {
    min-height: 114px;
    padding-bottom: 22px;
  }

  .module-header h1 {
    font-size: 40px;
    line-height: 1.14;
  }

  .domain-workspace,
  .jobs-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .domain-main,
  .jobs-layout > .workspace-section {
    padding: 24px 0 30px;
  }

  .inspector,
  .queue-depth {
    padding: 28px 0 12px;
    border-top: 1px solid var(--line);
    border-left: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .settings-section,
  .settings-section + .settings-section {
    padding: 26px 0;
    border-left: 0;
  }

  .settings-section + .settings-section {
    border-top: 1px solid var(--line);
  }

  .settings-preferences {
    grid-column: auto;
    order: initial;
  }

  .settings-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .settings-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-preferences footer {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-title-group h1 {
    font-size: 48px;
  }

  .overview-edition {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 6px 18px;
  }

  .overview-edition i { display: none; }
  .voice-pulse-glass { bottom: 156px; }
  .module-header { align-items: start; gap: 18px; }
  .module-header h1 { font-size: 36px; }
  .module-header > button,
  .module-header > .expression-header-actions { align-self: end; }
  .expression-form-grid { grid-template-columns: minmax(0, 1fr); }
  .expression-field-wide,
  .expression-intensity-field { grid-column: 1; }
  .expression-vad { grid-template-columns: minmax(0, 1fr); }
  .expression-analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expression-editor-actions { grid-template-columns: 1fr 1fr; }
  .expression-editor-actions > span { display: none; }
  .expression-editor-actions .primary-button { grid-column: 1 / -1; }
}

@media (max-height: 680px) and (min-width: 861px) {
  .overview-hero {
    display: grid;
    min-height: calc(100dvh - var(--topbar));
    padding: 34px 6vw 118px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    align-items: center;
    gap: 48px;
  }

  .voice-pulse-glass {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .overview-title-group h1 {
    font-size: 58px;
    white-space: normal;
  }
}

@media (max-width: 860px) and (max-height: 680px) {
  .overview-hero {
    display: block;
    min-height: auto;
    padding: 28px 22px 0;
  }

  .voice-pulse-glass {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 116px;
    margin-top: 24px;
  }

  .voice-pulse-glass canvas { min-height: 54px; }

  .metric-baseline {
    position: relative;
    inset: auto;
    width: calc(100% + 44px);
    min-height: 140px;
    margin: 18px -22px 0;
  }
}

.overview-title-core,
.overview-title-suffix {
  white-space: nowrap;
}

.overview-title-suffix {
  margin-left: 0;
}

@media (max-width: 720px) {
  .overview-title-suffix {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-stage,
  .view.active,
  .view.active .module-header > * {
    animation: none !important;
    transition-duration: 120ms !important;
  }
}

/* Job orchestration ------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.module-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-action:disabled,
.primary-button:disabled,
.text-button:disabled {
  cursor: not-allowed;
  opacity: .38;
  transform: none;
}

.status-label.paused,
.status-label.pause-requested {
  border-color: #73603f;
  color: var(--gold);
}

.status-label.cancellation-requested {
  border-color: #70454d;
  color: var(--red);
}

.status-label.waiting-resource {
  border-color: #675a3f;
  color: var(--gold);
}

.job-table {
  min-width: 840px;
}

.job-table th:nth-child(1) { width: 17%; }
.job-table th:nth-child(2) { width: 16%; }
.job-table th:nth-child(3) { width: 16%; }
.job-table th:nth-child(4) { width: 15%; }
.job-table th:nth-child(5) { width: 8%; }
.job-table th:nth-child(6) { width: 13%; }
.job-table th:nth-child(7) { width: 15%; }
.job-table td { height: 66px; white-space: normal; }

.job-identity-cell,
.job-type-cell,
.job-dependency-cell {
  vertical-align: middle;
}

.job-id,
.job-type,
.job-dependency-count,
.job-dependency-none {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-id { width: 100%; }
.job-type { font-family: inherit; }
.job-status-cell { vertical-align: middle; }
.job-wait-reason {
  display: block;
  max-width: 170px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--dim);
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-lineage,
.job-priority,
.job-dependency-summary {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-dependency-summary { white-space: pre-line; }
.job-table .row-action-buttons { flex-wrap: wrap; justify-content: flex-end; }

.job-inspector-meta {
  margin: 18px 0 0;
  border-top: 1px solid var(--line-soft);
}

.job-inspector-meta > div {
  display: grid;
  min-height: 40px;
  align-items: center;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.job-inspector-meta dt { font-size: 8px; text-transform: uppercase; }
.job-inspector-meta dd {
  overflow-wrap: anywhere;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  line-height: 1.45;
}

.dependency-fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.dependency-fieldset legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.dependency-picker {
  max-height: 190px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow-y: auto;
  background: #100d12;
}

.dependency-picker > p {
  margin: 14px 0;
  color: var(--dim);
  font-size: 10px;
}

.dependency-option {
  display: grid !important;
  min-height: 48px;
  align-items: center;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px !important;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.dependency-option:last-child { border-bottom: 0; }
.dependency-option.disabled { cursor: not-allowed; opacity: .42; }
.dependency-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--rose); }
.dependency-option span { min-width: 0; }
.dependency-option strong,
.dependency-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dependency-option strong { color: var(--text); font-size: 10px; font-weight: 550; }
.dependency-option small { margin-top: 3px; color: var(--dim); font-size: 8px; }

@media (max-width: 620px) {
  .module-actions { width: 100%; }
  .module-actions > button { flex: 1; }
  .job-table { min-width: 0; }
  .job-table td { min-height: 44px; }
  .job-table .row-action-buttons { justify-content: flex-start; }
  .job-id,
  .job-type,
  .job-dependency-count,
  .job-dependency-none,
  .job-lineage,
  .job-priority,
  .job-dependency-summary { white-space: normal; }
}

/* v1.4 workstation surface QA: inspector rhythm, settings hierarchy and local path selection. */
.inspector,
.queue-depth {
  padding: 32px 30px 34px;
}

.inspector h2,
.queue-depth h2 {
  margin-top: 10px;
  margin-bottom: 28px;
}

.queue-summary {
  gap: 12px 20px;
  padding: 4px 2px 8px;
}

.queue-summary strong {
  min-width: 2ch;
  padding-right: 2px;
  text-align: right;
}

.job-inspector {
  margin-top: 28px;
  padding-top: 24px;
}

.dataset-source,
.artifact-path {
  padding-right: 2px;
  padding-left: 2px;
}

.dataset-summary {
  border-right: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.dataset-summary > div,
.dataset-summary > div:nth-child(2n) {
  min-height: 76px;
  padding: 16px 18px;
}

.dataset-summary dd {
  padding-right: 1px;
  line-height: 1.2;
}

.training-project-inspector,
.evaluation-run-controls,
.artifact-inspector,
.dataset-project-inspector {
  padding-top: 34px;
}

.evaluation-run-controls label {
  gap: 9px;
  margin-top: 17px;
}

.evaluation-run-controls select,
.evaluation-run-controls .styled-select-trigger,
.artifact-promotion-field .styled-select-trigger {
  min-height: 46px;
  padding-inline: 14px;
}

.evaluation-run-actions,
.artifact-promotion-field {
  margin-top: 22px;
}

.artifact-lineage {
  margin-right: 0;
  margin-left: 0;
}

.artifact-lineage-node {
  padding: 12px 4px;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
}

.project-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: center 38%;
  transition: opacity 190ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.project-dialog::backdrop,
.mobile-nav-sheet::backdrop {
  opacity: 1;
  transition: opacity 190ms ease;
}

.project-dialog.is-entering,
.project-dialog.is-closing {
  opacity: 0;
  transform: translateY(14px) scale(.985);
}

.project-dialog.is-entering::backdrop,
.project-dialog.is-closing::backdrop,
.mobile-nav-sheet.is-entering::backdrop,
.mobile-nav-sheet.is-closing::backdrop {
  opacity: 0;
}

.mobile-nav-sheet {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.mobile-nav-sheet.is-entering,
.mobile-nav-sheet.is-closing {
  opacity: 0;
  transform: translateY(18px);
}

.project-dialog form {
  gap: 20px;
  padding: 28px;
}

.project-dialog label {
  gap: 9px;
}

.project-dialog input:not([type="radio"]):not([type="checkbox"]),
.project-dialog select,
.project-dialog textarea,
.project-dialog .styled-select-trigger {
  min-height: 46px;
  padding-inline: 14px;
}

.project-dialog textarea {
  min-height: 92px;
  padding-block: 12px;
  resize: vertical;
}

.project-fieldset {
  padding: 19px;
  gap: 16px;
}

.surface-enter {
  animation: surface-enter 260ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes surface-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-layout {
  grid-template-areas:
    "contract contract contract contract contract contract contract contract contract contract contract contract"
    "preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences"
    "components components components components components components components components components components components components"
    "install install install install session session session session history history history history";
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
}

.settings-contract {
  display: grid;
  min-height: 190px;
  grid-area: contract;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 2fr);
  align-items: stretch;
  gap: 34px;
}

.settings-contract .section-heading {
  min-height: 0;
  align-content: start;
  border-bottom: 0;
}

.settings-contract dl {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

.settings-contract dl > div,
.settings-contract dl > div:first-child {
  display: flex;
  min-width: 0;
  min-height: 94px;
  padding: 17px 18px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.settings-contract dd {
  width: 100%;
  color: var(--text);
  font-size: 12px;
  text-align: left;
}

.settings-preferences {
  grid-area: preferences;
}

.settings-components {
  grid-area: components;
}

.settings-install {
  grid-area: install;
}

.settings-session {
  grid-area: session;
}

.settings-history {
  grid-area: history;
}

.settings-preferences,
.settings-components {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.settings-install,
.settings-session,
.settings-history {
  display: flex;
  min-height: 250px;
  padding: 30px;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid var(--line);
}

.settings-install {
  border-left: 0;
}

.settings-install .section-heading,
.settings-session .section-heading {
  width: 100%;
  min-height: 68px;
}

.settings-install dl,
.settings-session dl {
  width: 100%;
}

.settings-install .primary-button {
  width: 100%;
  margin-top: auto;
  justify-content: center;
}

.settings-history {
  grid-template-columns: none;
  justify-content: space-between;
}

.settings-history-action {
  width: 100%;
  margin-top: auto;
  justify-items: stretch;
}

.settings-history-action > span {
  text-align: left;
}

.settings-history-action .secondary-button {
  width: 100%;
}

.studio-path-picker {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 7px;
}

.path-picker-control {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid rgba(213, 134, 168, .3);
  border-radius: 6px;
  background: rgba(55, 27, 44, .58);
  box-shadow: inset 0 1px rgba(255, 255, 255, .055);
  transition: border-color 170ms ease, background-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.studio-path-picker:focus-within .path-picker-control {
  border-color: rgba(226, 155, 183, .68);
  background: rgba(67, 31, 51, .7);
  box-shadow: 0 0 0 2px rgba(195, 95, 130, .12), inset 0 1px rgba(255, 255, 255, .08);
}

.path-picker-leading-icon {
  width: 15px;
  height: 15px;
  place-self: center;
  color: rgba(226, 155, 183, .68);
  stroke-width: 1.6;
  pointer-events: none;
}

.studio-path-picker input:not([type="radio"]):not([type="checkbox"]),
.studio-path-picker textarea,
.project-dialog .studio-path-picker input:not([type="radio"]):not([type="checkbox"]),
.project-dialog .studio-path-picker textarea,
.expression-field .studio-path-picker input:not([type="range"]) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 10px 0 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.studio-path-picker textarea,
.project-dialog .studio-path-picker textarea {
  min-height: 82px;
  padding-top: 13px;
  padding-bottom: 13px;
  line-height: 1.55;
}

.path-picker-browse {
  display: inline-flex;
  min-width: 96px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid rgba(226, 155, 183, .2);
  border-radius: 0 5px 5px 0;
  background: rgba(93, 44, 68, .4);
  color: #eedce6;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms ease;
}

.path-picker-browse:hover:not(:disabled),
.path-picker-browse[aria-expanded="true"] {
  background: rgba(124, 53, 82, .58);
  color: #fff8fb;
}

.path-picker-browse:active:not(:disabled) { transform: scale(.975); }
.path-picker-browse:disabled { cursor: wait; opacity: .58; }
.path-picker-browse svg { width: 15px; height: 15px; }
.path-picker-hint { padding-left: 2px; color: var(--dim); font-size: 8px; line-height: 1.35; }

.path-picker-menu {
  position: fixed;
  z-index: 10000;
  inset: auto;
  display: grid;
  width: 210px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 7px;
  background: rgba(22, 15, 24, .96);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 20px 48px rgba(0, 0, 0, .48);
  backdrop-filter: blur(24px) saturate(1.28);
  animation: path-menu-enter 170ms cubic-bezier(.22, 1, .36, 1) both;
}

.path-picker-menu[hidden] { display: none; }
.path-picker-menu:popover-open { display: grid; }
.path-picker-menu button {
  display: grid;
  min-height: 42px;
  padding: 0 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.path-picker-menu button:hover { background: rgba(181, 137, 190, .11); color: var(--text); transform: translateX(2px); }
.path-picker-menu svg { width: 14px; height: 14px; }

.studio-path-picker.is-dragging .path-picker-control {
  border-color: var(--gold);
  background: rgba(80, 58, 29, .52);
  box-shadow: 0 0 0 3px rgba(218, 191, 114, .12), inset 0 0 28px rgba(218, 191, 114, .06);
  transform: translateY(-1px);
}

.studio-path-picker.is-dragging .path-picker-hint { color: var(--gold); }
.studio-path-picker.drop-accepted .path-picker-control { animation: path-accepted 380ms ease both; }
.studio-path-picker.drop-rejected .path-picker-control { animation: path-rejected 340ms ease both; }
.studio-path-picker.is-browsing .path-picker-leading-icon { animation: path-browse-pulse 780ms ease-in-out infinite alternate; }

@keyframes path-menu-enter {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes path-accepted {
  0%, 100% { border-color: rgba(213, 134, 168, .3); }
  45% { border-color: #65c5a0; box-shadow: 0 0 0 3px rgba(101, 197, 160, .12); }
}

@keyframes path-rejected {
  0%, 100% { transform: translateX(0); }
  30% { border-color: var(--red); transform: translateX(-3px); }
  65% { border-color: var(--red); transform: translateX(3px); }
}

@keyframes path-browse-pulse {
  from { opacity: .38; transform: scale(.92); }
  to { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 980px) {
  .settings-layout {
    grid-template-areas:
      "contract contract contract contract contract contract contract contract contract contract contract contract"
      "preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences"
      "components components components components components components components components components components components components"
      "install install install install install install session session session session session session"
      "history history history history history history history history history history history history";
  }
  .settings-contract { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .settings-history { min-height: 180px; }
}

@media (max-width: 860px) {
  .inspector,
  .queue-depth {
    padding: 26px 24px 30px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .settings-layout {
    grid-template-areas: "contract" "preferences" "components" "install" "session" "history";
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .settings-contract,
  .settings-preferences,
  .settings-components,
  .settings-install,
  .settings-session,
  .settings-history {
    grid-column: 1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .inspector,
  .queue-depth { padding: 24px 20px 28px; }
  .project-dialog form { padding: 22px 18px; }
  .project-fieldset { padding: 15px; }
  .settings-section,
  .settings-install,
  .settings-session,
  .settings-history { padding: 26px 20px 28px; }
  .settings-contract dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-contract dl > div,
  .settings-contract dl > div:first-child { min-height: 86px; padding: 14px; }
  .settings-field-grid { grid-template-columns: minmax(0, 1fr); }
  .path-picker-control { grid-template-columns: 34px minmax(0, 1fr) 48px; }
  .path-picker-browse { min-width: 48px; padding: 0; }
  .path-picker-browse span { display: none; }
  .path-picker-menu { right: 0; width: min(190px, calc(100vw - 72px)); }
  .dataset-summary > div,
  .dataset-summary > div:nth-child(2n) { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-dialog,
  .mobile-nav-sheet,
  .surface-enter,
  .path-picker-menu,
  .studio-path-picker .path-picker-control,
  .studio-path-picker .path-picker-leading-icon {
    animation: none !important;
    transition: none !important;
  }
}

/* Dataset Factory: real phase-one preparation surface. */
.dataset-project-inspector {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.dataset-project-inspector h2 {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  font-size: 19px;
  font-weight: 480;
}

.dataset-source {
  min-height: 34px;
  margin: 8px 0 18px;
  overflow-wrap: anywhere;
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  line-height: 1.55;
}

.dataset-summary {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
}

.dataset-summary > div {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.dataset-summary > div:nth-child(2n) { padding-left: 14px; border-left: 1px solid var(--line-soft); }
.dataset-summary dt { color: var(--dim); font-size: 8px; text-transform: uppercase; }
.dataset-summary dd { margin: 5px 0 0; color: var(--text); font-size: 18px; font-weight: 350; }

.dataset-inspector-actions {
  display: grid;
  margin-top: auto;
  padding-top: 18px;
  grid-template-columns: minmax(0, 1fr) auto 40px;
  gap: 8px;
}

.dataset-inspector-actions .primary-button { min-width: 0; }
.dataset-inspector-actions #datasetProcessButton { grid-column: 1 / -1; }

.dataset-process-result {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.dataset-process-result[hidden] { display: none; }
.dataset-process-result > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.dataset-process-result > div:first-child strong { color: var(--text); font-family: "Cascadia Mono", Consolas, monospace; }
.dataset-process-result progress { width: 100%; height: 4px; margin: 9px 0 0; border: 0; background: #2a222c; accent-color: var(--lilac); }
.dataset-process-result progress::-webkit-progress-bar { background: #2a222c; }
.dataset-process-result progress::-webkit-progress-value { background: var(--lilac); }
.dataset-process-result p { margin: 9px 0 0; overflow-wrap: anywhere; color: var(--dim); font-size: 9px; line-height: 1.45; }
.dataset-process-result .dataset-process-artifacts { font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }
.dataset-process-result .text-button { margin-top: 8px; padding-left: 0; }
.dataset-process-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.dataset-process-actions .text-button { margin-top: 0; }

.dataset-processing {
  min-width: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.dataset-processing-heading { padding-top: 17px; }
.dataset-toolbar { display: flex; align-items: center; gap: 7px; }
.dataset-toolbar .row-action { display: inline-flex; align-items: center; gap: 6px; }
.dataset-toolbar svg { width: 12px; height: 12px; }

.dataset-pipeline {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  list-style: none;
}

.dataset-stage {
  position: relative;
  min-width: 0;
  min-height: 74px;
  padding: 16px 12px 12px 18px;
  border-top: 2px solid transparent;
}

.dataset-stage + .dataset-stage { border-left: 1px solid var(--line-soft); }
.dataset-stage::before {
  position: absolute;
  top: 20px;
  left: 6px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  content: "";
}

.dataset-stage strong,
.dataset-stage span { display: block; overflow-wrap: anywhere; }
.dataset-stage strong { color: var(--muted); font-size: 9px; font-weight: 580; text-transform: uppercase; }
.dataset-stage span { margin-top: 7px; color: var(--dim); font-size: 8px; line-height: 1.4; }
.dataset-stage.ready { border-top-color: var(--lilac); }
.dataset-stage.ready::before { border-color: var(--lilac); background: var(--lilac); }
.dataset-stage.complete { border-top-color: #65c5a0; }
.dataset-stage.complete::before { border-color: #65c5a0; background: #65c5a0; }
.dataset-stage.complete strong { color: var(--text); }
.dataset-stage.blocked { border-top-color: var(--gold); }
.dataset-stage.blocked::before { border-color: var(--gold); background: var(--gold); }
.dataset-stage.delegated { border-top-color: #6ab9d1; }
.dataset-stage.delegated::before { border-color: #6ab9d1; background: #6ab9d1; }
.dataset-stage.unavailable { opacity: .6; }

.dataset-status {
  min-height: 38px;
  margin: 0;
  padding: 12px 0;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.4;
}

.dataset-items-wrap { max-height: min(44vh, 510px); border-top: 1px solid var(--line); }
.dataset-items-table { min-width: 1180px; }
.dataset-items-table tr.selected,
#datasetRows tr.selected { background: #ffffff07; }
.dataset-item-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dataset-blocked-label { color: var(--gold); font-size: 9px; }

.status-label.decoder-required,
.status-label.no-speech { border-color: #c6a35c66; color: var(--gold); }
.status-label.segmented,
.status-label.accepted { border-color: #65c5a066; color: #86dab9; }
.status-label.rejected { border-color: #cf748766; color: #e394a5; }

.dataset-item-inspector {
  min-width: 0;
  margin-top: 30px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.dataset-item-inspector[hidden] { display: none; }
.dataset-item-inspector-heading { padding-bottom: 14px; }
.dataset-item-inspector-heading h2 { overflow-wrap: anywhere; }

.dataset-item-inspector-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .9fr) minmax(260px, .62fr);
  gap: 22px;
}

.dataset-waveform-panel,
.dataset-annotation-form,
.dataset-quality-panel {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.dataset-inspector-kicker {
  display: flex;
  min-height: 28px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#datasetWaveform {
  display: block;
  width: 100%;
  height: 170px;
  border-bottom: 1px solid var(--line-soft);
  background: #ffffff03;
}

#datasetAudioPreview {
  display: none;
}

.dataset-audio-player { margin-top: 12px; }

.dataset-stage-message {
  min-height: 16px;
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.45;
}

.dataset-annotation-form label { display: grid; min-width: 0; gap: 7px; }
.project-fieldset .dataset-expression-requirement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 10px;
}
.project-fieldset .dataset-expression-requirement input {
  width: 16px;
  height: 16px;
  margin: 0;
  grid-row: 1 / span 2;
  accent-color: var(--wine);
}
.project-fieldset .dataset-expression-requirement small { grid-column: 2; }
.dataset-annotation-form label > span { color: var(--dim); font-size: 8px; text-transform: uppercase; }
.dataset-annotation-form textarea,
.dataset-annotation-form input,
.dataset-annotation-form select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #100d12cc;
  color: var(--text);
}
.dataset-annotation-form textarea { min-height: 96px; padding: 11px; resize: vertical; line-height: 1.55; }
.dataset-annotation-form input,
.dataset-annotation-form select { height: 38px; padding: 0 10px; }
.dataset-annotation-fields { display: grid; margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.dataset-style-fields {
  display: grid;
  margin-top: 12px;
  grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(90px, .72fr));
  gap: 9px;
}
.dataset-expression-intensity input[type="range"] {
  height: 38px;
  padding: 0;
  accent-color: var(--rose);
}
.dataset-expression-intensity output {
  margin-left: 6px;
  color: var(--text);
  font-family: "Cascadia Mono", Consolas, monospace;
}
.dataset-style-description { margin-top: 12px; }
.dataset-style-description textarea { min-height: 68px; }
.dataset-annotation-form .dataset-propagate { display: flex; margin-top: 12px; align-items: center; gap: 8px; }
.dataset-propagate input { width: 14px; height: 14px; margin: 0; accent-color: var(--lilac); }
.dataset-propagate span { text-transform: none !important; }
.dataset-review-contract {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.dataset-review-contract-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(180px, auto);
  min-height: 76px;
  padding: 12px 0;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.dataset-review-contract-row > div:first-child { display: grid; gap: 5px; }
.dataset-review-contract-row > div:first-child > span {
  color: var(--dim);
  font-size: 8px;
  text-transform: uppercase;
}
.dataset-review-contract-row strong { font-size: 12px; }
.dataset-review-contract-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dataset-review-contract-actions .primary-button,
.dataset-review-contract-actions .secondary-button,
.dataset-review-contract-actions .row-action { width: auto; min-height: 38px; margin: 0; }
.dataset-verification-status {
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  text-transform: uppercase;
}
.dataset-verification-status.verified { color: #8bc4a0; }
.dataset-verification-status.rejected { color: #da7e88; }

.dataset-quality-metrics {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
}
.dataset-quality-metrics > div { min-width: 0; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.dataset-quality-metrics > div:nth-child(2n) { border-left: 1px solid var(--line-soft); }
.dataset-quality-metrics dt { color: var(--dim); font-size: 8px; text-transform: uppercase; }
.dataset-quality-metrics dd { margin: 4px 0 0; color: var(--text); font-size: 11px; }

.dataset-item-stages { margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line-soft); list-style: none; }
.dataset-item-stage { display: grid; min-width: 0; padding: 7px 0; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; border-bottom: 1px solid var(--line-soft); }
.dataset-item-stage strong { color: var(--muted); font-size: 8px; font-weight: 560; text-transform: uppercase; }
.dataset-item-stage span { overflow-wrap: anywhere; color: var(--dim); font-size: 8px; line-height: 1.4; }
.dataset-item-stage.complete strong { color: #86dab9; }
.dataset-item-stage.blocked strong { color: var(--gold); }

/* Target Speaker Extraction: real Docker control plane and review surface. */
.tse-project-browser {
  border-top: 1px solid var(--line-soft);
}

.tse-project-browser > .section-heading { padding-top: 16px; }
#tseRows tr.selected { background: #ffffff07; }

.tse-workspace {
  display: grid;
  min-width: 0;
  margin-top: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 31%);
  gap: 30px;
}

.tse-control {
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tse-path-grid,
.tse-settings {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tse-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.tse-field-wide { grid-column: 1 / -1; }
.tse-field > span,
.tse-settings legend {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.tse-field input,
.tse-decision {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: rgba(7, 6, 9, .62);
  color: var(--text);
  font: inherit;
}

.tse-field input:focus,
.tse-decision:focus {
  border-color: rgba(218, 191, 114, .72);
  box-shadow: 0 0 0 2px rgba(218, 191, 114, .1);
}

.tse-settings {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
}

.tse-settings legend { padding: 0 7px; }
.tse-fixed-policy {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}
.tse-fixed-policy input { width: 15px; height: 15px; margin: 0; accent-color: var(--rose); }
.tse-advanced { margin-top: 13px; border-top: 1px solid var(--line-soft); }
.tse-advanced summary { padding: 13px 0; color: var(--muted); cursor: pointer; font-size: 10px; }
.tse-advanced .tse-settings { margin-top: 0; }
.tse-segmentation-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tse-run-actions,
.tse-artifact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tse-run-actions { padding-top: 3px; }
.tse-job-inspector {
  display: flex;
  min-width: 0;
  min-height: 390px;
  align-self: start;
  flex-direction: column;
  padding: 22px;
}
.tse-job-inspector h2 { margin: 8px 0 22px; overflow-wrap: anywhere; font-size: 18px; font-weight: 540; }
.tse-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 10px; }
.tse-progress strong { color: var(--text); font-family: "Cascadia Mono", Consolas, monospace; }
.tse-progress progress { width: 100%; height: 4px; margin-top: 10px; border: 0; background: #2a222c; accent-color: var(--lilac); }
.tse-progress progress::-webkit-progress-bar { background: #2a222c; }
.tse-progress progress::-webkit-progress-value { background: var(--lilac); }
.tse-job-events { min-height: 160px; margin-top: 20px; border-top: 1px solid var(--line-soft); }
.tse-job-events > p { margin-top: 14px; color: var(--dim); font-size: 10px; }
.tse-event { display: grid; padding: 10px 0; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line-soft); }
.tse-event time { color: var(--dim); font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }
.tse-event strong { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.tse-event strong.warning { color: var(--gold); }
.tse-event strong.error { color: var(--red); }
.tse-cancel-button { align-self: flex-start; margin-top: auto; }

.tse-result {
  min-width: 0;
  margin-top: 30px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.tse-result[hidden] { display: none; }
.tse-result-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 30px; }
.tse-audio-result { min-width: 0; padding: 15px 0; }
.tse-audio-result audio { width: 100%; height: 40px; color-scheme: dark; }
.tse-artifact-actions { margin-top: 9px; }
.tse-artifact-actions a { text-decoration: none; }
.tse-summary { display: grid; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.tse-summary > div { min-width: 0; padding: 13px; border-bottom: 1px solid var(--line-soft); }
.tse-summary > div:nth-child(2n) { border-left: 1px solid var(--line-soft); }
.tse-summary dt { text-transform: uppercase; }
.tse-summary dd { margin-top: 6px; color: var(--text); font-size: 12px; text-align: left; }
.tse-segment-wrap { max-height: min(44vh, 540px); margin-top: 22px; border-top: 1px solid var(--line); }
.tse-segment-wrap table { min-width: 720px; }
.tse-decision { height: 30px; padding: 0 7px; font-size: 10px; }
.tse-separation-toggle { width: 16px; height: 16px; accent-color: var(--wine); }
.tse-overlap { color: var(--gold); }

@media (max-width: 980px) {
  .dataset-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dataset-item-inspector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-quality-panel { grid-column: 1 / -1; }
  .dataset-style-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-review-contract-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dataset-review-contract-actions { grid-column: 1 / -1; justify-content: stretch; }
  .dataset-review-contract-actions > button { flex: 1; }
  .tse-workspace { grid-template-columns: minmax(0, 1fr); }
  .tse-job-inspector { min-height: 280px; }
  .tse-result-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 620px) {
  .dataset-toolbar { width: 100%; }
  .dataset-toolbar .row-action { flex: 1; justify-content: center; }
  .dataset-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-processing-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .dataset-inspector-actions { grid-template-columns: minmax(0, 1fr) 40px; }
  .dataset-inspector-actions #datasetProcessButton { grid-column: 1 / -1; grid-row: 1; }
  .dataset-inspector-actions #datasetIngestButton { grid-column: 1; grid-row: 2; }
  .dataset-inspector-actions #datasetRefreshButton { grid-column: 2; grid-row: 2; }
  .dataset-inspector-actions #datasetImportListButton { grid-column: 1 / -1; grid-row: 3; }
  .dataset-item-inspector-grid { grid-template-columns: minmax(0, 1fr); }
  .dataset-quality-panel { grid-column: 1; }
  .dataset-annotation-fields { grid-template-columns: minmax(0, 1fr); }
  .dataset-style-fields { grid-template-columns: minmax(0, 1fr); }
  .tse-path-grid,
  .tse-settings,
  .tse-segmentation-settings { grid-template-columns: minmax(0, 1fr); }
  .tse-fixed-policy,
  .tse-field-wide { grid-column: 1; }
  .tse-run-actions > button { flex: 1; }
  .tse-result-grid { display: block; }
  .tse-summary { margin-top: 12px; }
}

/* Evidence-backed qualification and artifact lineage. */
.qualification-output {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
}

.expression-qualification-panel {
  display: grid;
  min-width: 0;
  padding: 14px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 10px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.expression-qualification-panel > span,
.artifact-promotion-field > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.expression-qualification-panel select,
.artifact-promotion-field select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  background: rgba(7, 6, 9, .72);
  color: var(--text);
  font: inherit;
  font-size: 9px;
}

.expression-qualification-panel small {
  grid-column: 1 / -1;
  color: var(--dim);
  font-size: 8px;
  line-height: 1.45;
}

.evaluation-evidence-section,
.engine-artifact-section { margin-top: 28px; border-top: 1px solid var(--line); }

.qualification-list li {
  display: grid;
  gap: 4px;
}

.qualification-list li strong { color: var(--text); font-size: 10px; font-weight: 560; }
.qualification-list li span { color: var(--dim); font-size: 9px; line-height: 1.4; }
.qualification-list li.passed::before { border-color: #65c5a0; background: #65c5a0; }
.qualification-list li.failed::before { border-color: var(--red); background: var(--red); }
.qualification-list li.failed strong { color: var(--red); }

.qualification-composer {
  margin-top: 14px;
  padding: 18px;
}

.qualification-composer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.qualification-composer-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.qualification-composer-grid label > span {
  color: var(--dim);
  font-size: 9px;
  text-transform: uppercase;
}

.qualification-composer-grid select {
  width: 100%;
  min-width: 0;
}

.qualification-composer-grid .primary-button { min-height: 42px; }
.qualification-composer-grid .workstation-hint { grid-column: 1 / -1; margin: 0; }

.registry-layout {
  display: grid;
  min-width: 0;
  min-height: 500px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 30px;
  padding-top: 26px;
}

.artifact-inspector { max-height: calc(100vh - 210px); overflow-y: auto; }
.artifact-path {
  margin: -12px 0 20px;
  overflow-wrap: anywhere;
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  line-height: 1.5;
}

.artifact-open-link {
  width: fit-content;
  margin: -10px 0 18px;
  text-decoration: none;
}
.artifact-open-link svg { width: 12px; height: 12px; }

.artifact-lineage {
  display: grid;
  gap: 1px;
  margin: 0 0 18px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.artifact-lineage > p { color: var(--dim); font-size: 9px; }
.artifact-lineage-node {
  display: grid;
  min-width: 0;
  padding: 9px 0;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.artifact-lineage-node:last-child { border-bottom: 0; }
.artifact-lineage-node span,
.artifact-lineage-node small { color: var(--dim); font-size: 8px; text-transform: uppercase; }
.artifact-lineage-node strong { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; font-weight: 540; }
.artifact-lineage-node.self strong { color: var(--text); }

.artifact-metrics { display: grid; gap: 9px; }
.artifact-metric-block { min-width: 0; border-top: 1px solid var(--line-soft); }
.artifact-metric-block > span { display: block; padding: 10px 0 7px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.artifact-metric-block pre {
  max-height: 190px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  overflow: auto;
  background: rgba(5, 4, 7, .5);
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.artifact-promotion-field { display: grid; gap: 7px; margin-top: 18px; }
.artifact-inspector > .primary-button { width: 100%; margin-top: 9px; }
.artifact-promotion-hint { margin: 9px 0 0; color: var(--dim); font-size: 8px; line-height: 1.45; }

@media (max-width: 980px) {
  .registry-layout { grid-template-columns: minmax(0, 1fr); }
  .artifact-inspector { max-height: none; }
  .qualification-composer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .qualification-composer-grid { grid-template-columns: minmax(0, 1fr); }
  .expression-qualification-panel { grid-template-columns: minmax(0, 1fr); }
  .expression-qualification-panel > * { grid-column: 1; }
  .lineage-ruler { overflow-x: auto; }
}

/* Real training and evaluation control surfaces. */
.training-project-inspector,
.evaluation-run-controls { display: flex; min-height: 360px; flex-direction: column; }

.training-project-inspector > .primary-button,
.evaluation-run-controls .primary-button { width: 100%; justify-content: center; }

.training-project-inspector > .primary-button { margin-top: 18px; }
.training-action-stack { display: grid; gap: 10px; margin-top: 18px; }
.training-action-stack > button { width: 100%; justify-content: center; }
.workstation-hint { margin: 10px 0 0; color: var(--dim); font-size: 9px; line-height: 1.5; }

.run-monitor {
  min-width: 0;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.run-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 10px;
}

.run-progress strong { color: var(--text); font-family: "Cascadia Mono", Consolas, monospace; }
.run-progress progress { width: 100%; height: 4px; margin-top: 10px; border: 0; background: #2a222c; accent-color: var(--lilac); }
.run-progress progress::-webkit-progress-bar { background: #2a222c; }
.run-progress progress::-webkit-progress-value { background: var(--lilac); }

.run-metrics {
  display: grid;
  margin: 24px 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.run-metrics > div { min-width: 0; min-height: 72px; padding: 14px 16px 13px 0; }
.run-metrics > div + div { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.run-metrics dt { min-height: 23px; text-transform: uppercase; }
.run-metrics dd { margin-top: 7px; color: var(--text); font-size: 12px; text-align: left; }
.evaluation-performance { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.run-monitor-columns,
.evaluation-result-grid {
  display: grid;
  min-width: 0;
  margin-top: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.run-monitor h3,
.evaluation-result-grid h3 { margin: 0 0 12px; color: var(--muted); font-size: 10px; font-weight: 620; text-transform: uppercase; }
.run-event-list,
.run-artifact-list { min-height: 120px; border-top: 1px solid var(--line-soft); }
.run-event-list > p,
.run-artifact-list > p { margin: 14px 0; color: var(--dim); font-size: 10px; }
.run-event { display: grid; padding: 10px 0; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line-soft); }
.run-event time { color: var(--dim); font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }
.run-event span { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; line-height: 1.45; }
.run-event.error span { color: var(--red); }
.run-event.warning span { color: var(--gold); }
.run-artifact { display: grid; min-width: 0; padding: 10px 0; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; border-bottom: 1px solid var(--line-soft); }
.run-artifact strong { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.run-artifact a { color: var(--lilac); font-size: 9px; text-decoration: none; }

.evaluation-run-controls label { display: grid; gap: 7px; margin-top: 12px; }
.evaluation-run-controls label > span { color: var(--dim); font-size: 9px; text-transform: uppercase; }
.evaluation-run-controls select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(7, 6, 9, .72);
  color: var(--text);
  font: inherit;
  font-size: 10px;
}

.evaluation-run-actions { display: grid; gap: 8px; margin-top: 18px; }
.evaluation-run-actions .text-button { justify-content: center; }
.evaluation-decks section > div { display: grid; min-width: 0; gap: 6px; }
.evaluation-decks section small { overflow: hidden; color: var(--dim); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.evaluation-decks audio { width: 100%; height: 32px; color-scheme: dark; }
.evaluation-decks audio[hidden] { display: none; }
.evaluation-language-table { min-width: 700px; }
.evaluation-language-table td { white-space: normal; }
.evaluation-measured-gates { min-width: 0; padding: 0; border-left: 0; background: transparent; backdrop-filter: none; }
.evaluation-measured-gates li.unavailable::before,
.qualification-list li.unavailable::before { border-color: var(--line-bright); background: transparent; }
.evaluation-measured-gates li.measured::before { border-color: var(--gold); background: var(--gold); }
.evaluation-evidence-workspace { margin-top: 30px; padding-top: 0; border-top: 1px solid var(--line); }
.evaluation-evidence-workspace .evaluation-evidence-section { margin-top: 0; border-top: 0; }

.project-dialog:has(#projectTrainingFields:not([hidden])),
.project-dialog:has(#projectEvaluationFields:not([hidden])) { width: min(760px, calc(100vw - 32px)); }
.project-dialog form { max-height: min(88vh, 900px); overflow-y: auto; }
.project-fieldset { display: grid; margin: 0; padding: 15px; gap: 13px; border: 1px solid var(--line-soft); }
.project-fieldset[hidden],
.project-advanced-grid[hidden] { display: none; }
.project-fieldset legend { padding: 0 6px; color: var(--dim); font-size: 9px; text-transform: uppercase; }
.project-advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.project-check-field { display: flex !important; min-height: 42px; align-items: center; flex-direction: row !important; gap: 9px !important; }
.project-check-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--rose); }

@media (max-width: 980px) {
  .run-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-metrics > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .run-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .evaluation-performance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .evaluation-performance > div:nth-child(3) { padding-left: 16px; border-top: 0; border-left: 1px solid var(--line-soft); }
}

@media (max-width: 720px) {
  .run-monitor-columns,
  .evaluation-result-grid,
  .project-advanced-grid { grid-template-columns: minmax(0, 1fr); }
  .run-metrics,
  .evaluation-performance { grid-template-columns: minmax(0, 1fr); }
  .run-metrics > div,
  .run-metrics > div + div,
  .evaluation-performance > div:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line-soft); border-left: 0; }
  .run-metrics > div:first-child { border-top: 0; }
  .evaluation-decks section { grid-template-columns: 34px minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .section-heading {
    flex-wrap: wrap;
  }

  .section-heading > span,
  .section-heading > div {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .dataset-items-table,
  .tse-segment-wrap table,
  .evaluation-language-table {
    min-width: 0;
  }
}

@media (max-height: 780px) and (min-width: 621px) {
  .view:not(.overview-view):not(.synthesis-view) {
    padding-top: 30px;
    padding-bottom: 32px;
  }

  .domain-workspace,
  .jobs-layout {
    min-height: 430px;
  }
}

/* v1.4 Studio interface language and visual QA --------------------------- */
.topbar,
.runtime-strip { overflow: visible; }

.studio-locale-picker {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  margin-left: 10px;
}

.studio-locale-button {
  display: grid;
  min-width: 142px;
  height: 38px;
  padding: 0 11px;
  grid-template-columns: 18px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 7px;
  background: rgba(25, 20, 27, .68);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(1.25);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.studio-locale-button:hover,
.studio-locale-button:focus-visible,
.studio-locale-button[aria-expanded="true"] {
  border-color: rgba(220, 169, 193, .46);
  background: rgba(45, 31, 42, .82);
  box-shadow: inset 0 1px rgba(255, 255, 255, .09), 0 8px 28px rgba(0, 0, 0, .2);
  color: var(--text);
}

.studio-locale-button:active { transform: translateY(1px) scale(.985); }

.studio-locale-button svg { width: 17px; height: 17px; stroke-width: 1.6; }
.studio-locale-button > span { overflow: hidden; font-size: 11px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.studio-locale-chevron { transition: transform 150ms ease; }
.studio-locale-button[aria-expanded="true"] .studio-locale-chevron { transform: rotate(180deg); }

.studio-locale-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: 218px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(18, 14, 21, .92);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 24px 64px rgba(0, 0, 0, .48);
  backdrop-filter: blur(24px) saturate(1.35);
  transform-origin: top right;
  animation: studio-locale-menu-enter 170ms cubic-bezier(.22, 1, .36, 1) both;
}

.studio-locale-menu[hidden] { display: none; }
.studio-locale-option {
  display: grid;
  width: 100%;
  min-height: 45px;
  padding: 5px 9px;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.studio-locale-option > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  color: var(--dim);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.studio-locale-option strong { font-size: 12px; font-weight: 560; }
.studio-locale-option:hover,
.studio-locale-option:focus-visible {
  background: rgba(181, 137, 190, .1);
  color: var(--text);
  outline: none;
  transform: translateX(2px);
}
.studio-locale-option:active { transform: translateX(2px) scale(.985); transition-duration: 70ms; }
.studio-locale-option[aria-selected="true"] {
  background: rgba(143, 49, 87, .18);
  box-shadow: inset 2px 0 rgba(213, 107, 145, .72);
  color: #fff7fb;
  animation: studio-locale-choice-settle 180ms ease both;
}
.studio-locale-option[aria-selected="true"] > span { border-color: rgba(213, 107, 145, .64); color: #e9b7cb; }

@keyframes studio-locale-menu-enter {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes studio-locale-choice-settle {
  0% { opacity: .7; transform: translateX(-2px); }
  100% { opacity: 1; transform: translateX(0); }
}

.synthesis-view {
  height: auto;
  min-height: 100%;
  padding: 32px 38px 0;
  overflow: visible;
}

.synthesis-module-header { flex: 0 0 auto; }
.synthesis-frame-shell {
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  margin: 18px -18px 0;
  overflow: visible;
}

.synthesis-view .synthesis-frame-shell iframe {
  display: block;
  width: 100%;
  height: 900px;
  border: 0;
  background: #110b15;
  overflow: hidden;
}

.dataset-process-actions .text-button {
  min-width: 132px;
  padding-inline: 12px;
  justify-content: center;
  text-align: center;
}

.tse-audio-result audio { display: none; }
.studio-audio-player {
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 10px 12px;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 7px;
  background: rgba(18, 14, 21, .66);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px) saturate(1.2);
}

.studio-audio-icon {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background: rgba(45, 31, 42, .72);
  color: var(--text);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.studio-audio-icon:hover:not(:disabled) { border-color: var(--rose); background: rgba(111, 44, 75, .66); transform: scale(1.03); }
.studio-audio-icon:active:not(:disabled) { transform: scale(.97); transition-duration: 70ms; }
.studio-audio-icon:disabled { cursor: not-allowed; opacity: .38; }
.studio-audio-icon svg { width: 16px; height: 16px; stroke-width: 1.8; }
.studio-audio-track { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.studio-audio-track input[type="range"] { width: 100%; height: 3px; margin: 0; accent-color: var(--rose); cursor: pointer; }
.studio-audio-track span { color: var(--dim); font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; white-space: nowrap; }
.tse-artifact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.nav-item:active,
.mobile-more-button:active,
.icon-button:active:not(:disabled),
.text-button:active:not(:disabled),
.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.row-action:active:not(:disabled) {
  transform: translateY(1px) scale(.985);
  transition-duration: 70ms;
}

/* Every metric grid owns a continuous outer edge; cells provide the inner grid. */
.run-metrics {
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.run-metrics > div,
.run-metrics > div + div {
  min-width: 0;
  min-height: 76px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.run-metrics dt,
.run-metrics dd { max-width: 100%; overflow-wrap: anywhere; }
.run-metrics dd { line-height: 1.35; }
.training-run-monitor .run-metrics > div:last-child { grid-column: span 2; }

.dataset-lifecycle {
  display: grid;
  margin: 6px 0 22px;
  padding: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dataset-lifecycle li {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 58px;
  padding: 11px 14px;
  align-content: center;
  gap: 3px;
  color: var(--dim);
  border-left: 1px solid var(--line-soft);
  transition: color 180ms ease, background-color 180ms ease;
}

.dataset-lifecycle li:first-child { border-left: 0; }
.dataset-lifecycle li span { font: 600 9px/1 "Cascadia Mono", Consolas, monospace; color: var(--rose); }
.dataset-lifecycle li strong { overflow: hidden; font-size: 12px; font-weight: 560; text-overflow: ellipsis; text-transform: uppercase; }
.dataset-lifecycle li small { overflow: hidden; color: var(--dim); font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.dataset-lifecycle li.complete { color: var(--text); background: rgba(115, 179, 132, .055); }
.dataset-lifecycle li.active { color: var(--text); background: rgba(195, 95, 130, .09); }
.dataset-lifecycle li.active::after { position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: var(--rose); content: ""; }
.dataset-lifecycle li.blocked { color: var(--text); background: rgba(174, 66, 89, .07); }
.dataset-lifecycle li.blocked span { color: #d98298; }
.training-lifecycle { margin-top: -10px; margin-bottom: 26px; }
.training-lifecycle li { min-height: 68px; }
.training-lifecycle li.complete small { color: #8fb99a; }
.training-lifecycle li.active small { color: var(--rose-soft); }
.training-lifecycle li.blocked small { color: #d98298; }

.reference-review-panel {
  margin: 8px 0 26px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(46, 23, 39, .1);
  animation: reference-review-enter 360ms cubic-bezier(.2, .8, .2, 1) both;
}

.reference-review-panel[hidden] { display: none; }
.reference-review-heading { padding: 0 24px 20px; }
.reference-review-heading h2 { max-width: 760px; font-size: 34px; line-height: 1.08; }
.reference-review-intro { max-width: 780px; margin: 0 24px 24px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.reference-candidate-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.reference-review-loading { grid-column: 1 / -1; min-height: 160px; margin: 0; padding: 38px 24px; color: var(--dim); }

.reference-candidate {
  display: grid;
  min-width: 0;
  padding: 18px;
  align-content: start;
  gap: 16px;
  border-right: 1px solid var(--line-soft);
  background: rgba(12, 9, 14, .5);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.reference-candidate:last-child { border-right: 0; }
.reference-candidate:hover { background: rgba(35, 20, 31, .62); box-shadow: inset 0 1px rgba(255, 255, 255, .04); }
.reference-candidate-heading { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px; }
.reference-candidate-letter { color: var(--rose-soft); font: 300 42px/1 "Arial Narrow", "Segoe UI", sans-serif; }
.reference-candidate-heading small { color: var(--dim); font: 600 8px/1.2 "Cascadia Mono", Consolas, monospace; }
.reference-candidate-heading h3 { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 590; }
.reference-case-list { display: grid; border-top: 1px solid var(--line-soft); }
.reference-case {
  display: grid;
  min-width: 0;
  min-height: 82px;
  padding: 11px 0;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.reference-case audio { display: none; }
.reference-audio-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background: rgba(38, 25, 36, .75);
  color: var(--text);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.reference-audio-button:hover:not(:disabled),
.reference-audio-button.playing { border-color: var(--rose); background: rgba(121, 42, 77, .72); color: #fff; transform: scale(1.04); }
.reference-audio-button:active:not(:disabled) { transform: scale(.96); transition-duration: 70ms; }
.reference-audio-button:disabled { cursor: not-allowed; opacity: .35; }
.reference-audio-button svg { width: 14px; height: 14px; stroke-width: 1.8; }
.reference-case-copy { min-width: 0; align-self: end; }
.reference-case-copy small { color: var(--rose-soft); font: 600 8px/1.2 "Cascadia Mono", Consolas, monospace; text-transform: uppercase; }
.reference-case-copy p { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.45; }
.reference-case-time { grid-column: 2; align-self: start; margin-top: 5px; color: var(--dim); font: 500 8px/1 "Cascadia Mono", Consolas, monospace; }
.reference-select-button { width: 100%; min-width: 0; margin-top: auto; }
.reference-review-footer { display: flex; min-width: 0; padding: 20px 24px; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line-soft); }
.reference-review-footer p { display: grid; min-width: 0; margin: 0; gap: 4px; }
.reference-review-footer strong { font-size: 11px; font-weight: 580; }
.reference-review-footer span { color: var(--dim); font-size: 9px; line-height: 1.45; }
.reference-review-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.reference-reject-button { flex: 0 0 auto; color: var(--muted); }
.reference-reject-button.armed { border-color: rgba(211, 91, 117, .75); background: rgba(103, 31, 49, .34); color: #f4c3ce; }

@keyframes reference-review-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.dataset-acquisition-mode {
  width: fit-content;
  margin: 10px 0 16px;
  padding: 5px 9px;
  border: 1px solid var(--line-bright);
  border-radius: 4px;
  color: var(--text);
  font: 600 10px/1.2 "Cascadia Mono", Consolas, monospace;
  text-transform: uppercase;
}

.dataset-acquisition-counts {
  display: grid;
  margin: 13px 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.dataset-acquisition-counts div { min-width: 0; padding: 9px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.dataset-acquisition-counts dt { color: var(--dim); font-size: 9px; text-transform: uppercase; }
.dataset-acquisition-counts dd { margin: 5px 0 0; font: 600 16px/1 "Cascadia Mono", Consolas, monospace; }
.dataset-advanced-speaker { margin-top: 14px; border-top: 1px solid var(--line-soft); }
.dataset-advanced-speaker summary { padding: 12px 0; color: var(--muted); cursor: pointer; font-size: 11px; }
.dataset-advanced-speaker div { color: var(--dim); font-size: 11px; line-height: 1.65; }
.dataset-evidence-grid {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.dataset-evidence-metric {
  display: grid;
  min-width: 0;
  min-height: 92px;
  padding: 13px 14px;
  align-content: space-between;
  gap: 7px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.dataset-evidence-metric dt {
  color: var(--dim);
  font: 600 9px/1.25 "Cascadia Mono", Consolas, monospace;
  text-transform: uppercase;
}
.dataset-evidence-metric dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.dataset-evidence-metric small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.dataset-evidence-empty { margin: 0; padding: 12px 0; color: var(--muted); }
.dataset-evidence-chain { margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.dataset-evidence-job {
  display: grid;
  min-width: 0;
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.dataset-evidence-job strong { color: var(--text); font-size: 10px; font-weight: 570; text-transform: uppercase; }
.dataset-evidence-job span { color: var(--dim); font: 500 9px/1.3 "Cascadia Mono", Consolas, monospace; }
.dataset-evidence-job.succeeded span { color: var(--green); }
.dataset-evidence-job.failed span { color: var(--red); }
.dataset-lifecycle-actions { display: flex; margin: 14px 0; flex-wrap: wrap; align-items: center; gap: 8px; }
.dataset-lifecycle-actions .primary-button { margin-left: auto; }

.dataset-mode-fieldset { display: grid; gap: 16px; }
.dataset-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dataset-mode-card { position: relative; min-width: 0; cursor: pointer; }
.dataset-mode-card > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dataset-mode-card > span {
  display: grid;
  min-height: 126px;
  padding: 15px;
  align-content: start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(22, 17, 24, .76);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.dataset-mode-card:hover > span { border-color: var(--line-bright); transform: translateY(-1px); }
.dataset-mode-card > input:checked + span { border-color: var(--rose); background: rgba(106, 40, 70, .22); box-shadow: inset 0 -2px var(--rose); }
.dataset-mode-card > input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.dataset-mode-card svg { color: var(--lilac); }
.dataset-mode-card strong { font-size: 12px; line-height: 1.35; }
.dataset-mode-card small { color: var(--dim); font-size: 10px; line-height: 1.5; }
.dataset-mode-fieldset.dataset-mode-changing > :not(.dataset-mode-options):not(legend) {
  animation: dataset-mode-content-enter 260ms cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes dataset-mode-content-enter {
  from { opacity: .15; transform: translateY(7px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.project-dialog textarea { width: 100%; resize: vertical; }
.project-target-speaker-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(160px, .5fr); gap: 10px; }
.project-target-speaker-fields[hidden] { display: none; }

.settings-components { grid-column: 1 / -1; }
.component-heading-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 14px; }
.component-heading-actions > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.component-heading-actions .primary-button { min-height: 38px; padding: 9px 13px; }

.dataset-expression-candidates {
  margin: 18px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding: 20px 0 18px;
}
.dataset-expression-candidates > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.dataset-expression-candidates > header span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
}
.dataset-expression-candidates h3,
.dataset-expression-candidates h4 { margin: 5px 0 0; }
.dataset-expression-candidates > p { color: var(--muted); max-width: 760px; }
.dataset-expression-candidate-groups { display: grid; gap: 12px; }
.dataset-expression-group {
  border: 1px solid rgba(255, 255, 255, .11);
  background: rgba(18, 15, 20, .48);
  backdrop-filter: blur(18px) saturate(116%);
  padding: 16px;
}
.dataset-expression-group > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.dataset-expression-group > header span { color: var(--muted); font-size: 11px; }
.dataset-expression-group ol { list-style: none; margin: 0; padding: 0; }
.dataset-expression-candidate {
  display: grid;
  grid-template-columns: minmax(92px, .7fr) minmax(280px, 2fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.dataset-expression-candidate:last-child { border-bottom: 0; }
.dataset-expression-rank { color: var(--gold); font-size: 11px; }
.dataset-expression-evidence { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.dataset-expression-evidence strong { font-size: 18px; }
.dataset-expression-evidence span { color: var(--muted); font-size: 11px; }
.dataset-expression-candidate-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.dataset-expression-candidate-actions .active { color: var(--gold); }
.dataset-expression-empty { color: var(--muted); }

@media (max-width: 840px) {
  .dataset-expression-candidate { grid-template-columns: 1fr; gap: 8px; padding: 14px 0; }
  .dataset-expression-candidate-actions { justify-content: flex-start; }
}
.component-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.component-row { display: grid; min-width: 0; min-height: 92px; padding: 14px 16px; align-content: space-between; gap: 10px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.component-row header { display: flex; min-width: 0; justify-content: space-between; gap: 12px; }
.component-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.component-row span { color: var(--dim); font-size: 9px; text-transform: uppercase; }
.component-row small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.component-row .component-install-button { min-height: 30px; padding: 6px 10px; justify-self: start; }
.component-row.ready header span { color: var(--green); }
.component-row.invalid header span { color: var(--red); }
.component-bundle-actions { display: grid; margin-top: 18px; grid-template-columns: minmax(260px, 1fr) auto auto; align-items: end; gap: 10px; }
.component-bundle-actions label { min-width: 0; }

@media (max-width: 980px) {
  .dataset-lifecycle { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dataset-lifecycle li:nth-child(5) { border-left: 0; }
  .dataset-mode-options,
  .component-rows { grid-template-columns: minmax(0, 1fr); }
  .dataset-mode-card > span { min-height: 98px; }
  .component-bundle-actions { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .component-heading-actions { width: 100%; justify-content: space-between; }
  .dataset-evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reference-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reference-candidate:nth-child(2n) { border-right: 0; }
}

@media (max-width: 560px) {
  .dataset-evidence-grid { grid-template-columns: minmax(0, 1fr); }
  .dataset-evidence-job { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 9px 0; }
}

@media (max-width: 980px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-contract,
  .settings-install,
  .settings-preferences,
  .settings-session,
  .settings-history { grid-column: 1; }
  .settings-section,
  .settings-section + .settings-section { padding: 27px 24px; }
  .settings-install,
  .settings-session { border-left: 0; }
  .settings-history { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .settings-history-action { justify-items: start; }
  .run-metrics > div:nth-child(odd),
  .run-metrics > div:nth-child(n + 3),
  .evaluation-performance > div:nth-child(3) {
    padding: 14px 16px;
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
  }
}

@media (max-width: 860px) {
  .runtime-strip > div:first-child { display: none; }
  .runtime-strip > .studio-locale-picker {
    display: block;
    min-width: 0;
    max-width: none;
    padding: 0;
    border-left: 0;
  }
  .synthesis-view { padding: 24px 20px 0; }
  .synthesis-frame-shell { margin-right: -10px; margin-left: -10px; }
}

@media (max-width: 720px) {
  .run-metrics > div,
  .run-metrics > div + div,
  .run-metrics > div:nth-child(odd),
  .run-metrics > div:nth-child(n + 3),
  .evaluation-performance > div:nth-child(3) {
    padding: 13px 14px;
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
  }
  .training-run-monitor .run-metrics > div:last-child { grid-column: span 1; }
}

@media (max-width: 620px) {
  .settings-section,
  .settings-section + .settings-section { padding: 24px 18px; }
  .settings-history-action,
  .settings-history-action .secondary-button { width: 100%; }
  .synthesis-view { padding: 20px 14px 0; }
  .synthesis-frame-shell { margin-right: -6px; margin-left: -6px; }
  .studio-locale-button { min-width: 42px; width: 42px; padding: 0; grid-template-columns: 1fr; place-items: center; }
  .studio-locale-button > span,
  .studio-locale-chevron { display: none; }
  .studio-locale-menu { right: 0; width: min(218px, calc(100vw - 28px)); }
  .studio-audio-player { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 8px; padding-inline: 9px; }
  .studio-audio-icon { width: 36px; height: 36px; }
  .studio-audio-track { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .studio-audio-track span { text-align: right; }
  .dataset-lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-lifecycle li:nth-child(odd) { border-left: 0; }
  .dataset-acquisition-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-lifecycle-actions > button { width: 100%; }
  .dataset-lifecycle-actions .primary-button { margin-left: 0; }
  .project-target-speaker-fields { grid-template-columns: minmax(0, 1fr); }
  .reference-review-heading { padding-inline: 18px; }
  .reference-review-heading h2 { font-size: 24px; }
  .reference-review-intro { margin-inline: 18px; }
  .reference-candidate-grid { grid-template-columns: minmax(0, 1fr); }
  .reference-candidate { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .reference-review-footer { padding-inline: 18px; align-items: stretch; flex-direction: column; }
  .reference-reject-button { width: 100%; }
}

/* Final cascade guarantees for dense inspectors and the reorganized settings surface. */
.dataset-summary {
  border-right: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.dataset-summary > div,
.dataset-summary > div:nth-child(2n) {
  display: grid;
  min-height: 76px;
  padding: 16px 18px;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 8px;
}
.dataset-summary dd { margin: 0; text-align: right; }
.evaluation-run-controls select,
.evaluation-run-controls .styled-select-trigger,
.artifact-promotion-field .styled-select-trigger { min-height: 46px; padding-inline: 14px; }
.job-table-wrap:has(.empty-cell) { overflow-x: hidden; }
.job-table:has(.empty-cell) { min-width: 0; }

@media (max-width: 980px) {
  .settings-layout {
    grid-template-areas:
      "contract contract"
      "preferences preferences"
      "components components"
      "install session"
      "history history";
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-contract,
  .settings-preferences,
  .settings-components,
  .settings-history { grid-column: 1 / -1; }
  .settings-install { grid-column: 1; }
  .settings-session { grid-column: 2; }
  .settings-history { display: flex; }
}

@media (max-width: 860px) {
  .settings-layout {
    grid-template-areas: "contract" "preferences" "components" "install" "session" "history";
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-contract,
  .settings-preferences,
  .settings-components,
  .settings-install,
  .settings-session,
  .settings-history { grid-column: 1; }
}

@media (max-width: 620px) {
  .dataset-summary > div,
  .dataset-summary > div:nth-child(2n) { padding: 14px; }
}

/* Overview hierarchy and dense-surface alignment pass. */
.overview-start-model {
  display: inline-flex;
  width: fit-content;
  min-height: 46px;
  margin-top: 34px;
  padding: 0 0 8px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid rgba(248, 245, 248, .62);
  background: transparent;
  color: #f8f5f8;
  font: 560 12px/1.2 inherit;
  cursor: pointer;
  transition: gap 200ms cubic-bezier(.22, 1, .36, 1), border-color 180ms ease, color 180ms ease;
}

.overview-start-model:hover,
.overview-start-model:focus-visible {
  gap: 20px;
  border-color: var(--gold);
  color: #fff;
}

.overview-start-model:focus-visible { outline: 2px solid rgba(233, 203, 124, .72); outline-offset: 6px; }
.overview-start-model svg { width: 16px; height: 16px; stroke-width: 1.6; }

.metric-baseline { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.recent-work .section-heading { position: relative; }
.recent-work .section-heading::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: rgba(233, 203, 124, .75);
  opacity: 0;
  transform: scaleX(.2);
  content: "";
  pointer-events: none;
}
.recent-work.is-guiding .section-heading::after { animation: overview-guide-line 820ms cubic-bezier(.22, 1, .36, 1) both; }
.recent-work.is-guiding [data-open-project] { color: var(--gold); transform: translateX(-4px); }

@keyframes overview-guide-line {
  0% { opacity: 0; transform: scaleX(.18); }
  42% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1); }
}

/* Keep the path control and adjacent bundle actions on one visual baseline. */
.component-bundle-actions { align-items: start; }
.component-bundle-actions > button {
  min-height: 48px;
  margin-top: 22px;
  align-self: start;
}

/* Numbers stay inside their cells with a deliberate inset from every divider. */
.inspector .dataset-summary > div,
.inspector .dataset-summary > div:nth-child(2n) {
  overflow: hidden;
  padding-right: 22px;
  padding-left: 20px;
  grid-template-columns: minmax(0, 1fr);
}
.dataset-summary dd {
  min-width: 2.25ch;
  max-width: 100%;
  margin: 0 4px 0 0;
  justify-self: end;
  overflow: hidden;
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.15;
  text-align: right;
  text-overflow: ellipsis;
}

/* Give every dense table a calm right gutter instead of pinning its last column to the panel edge. */
.domain-main .table-wrap { padding-right: 20px; }
.table-section th:last-child,
.table-section td:last-child { padding-right: 18px; }
.domain-workspace,
.jobs-layout { grid-template-columns: minmax(0, 1fr) 360px; }

@media (max-width: 1180px) {
  .runtime-strip > div.studio-locale-picker { display: block; }
  .domain-workspace,
  .jobs-layout { grid-template-columns: minmax(0, 1fr) 310px; }
}

@media (max-width: 860px) {
  .runtime-strip > div.studio-locale-picker {
    display: block;
    min-width: 0;
    max-width: none;
    padding: 0;
    border-left: 0;
  }
  .metric-baseline {
    min-height: 92px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }
  .metric-baseline article,
  .metric-baseline article:nth-child(n + 3) {
    min-height: 92px;
    padding: 14px 12px;
    border-top: 0;
  }
  .metric-baseline article:nth-child(3) { border-left: 1px solid rgba(255, 255, 255, .1); }
  .domain-main .table-wrap { padding-right: 0; }
  .domain-workspace,
  .jobs-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .overview-start-model { margin-top: 26px; }
  .metric-baseline strong { font-size: 13px; }
  .metric-baseline small { font-size: 8px; }
  .component-bundle-actions > button { width: 100%; margin-top: 0; }
  .table-section td:last-child { padding-right: 0; }
}

/* Studio validation and independent evidence scroll surfaces. */
.field-validation-message {
  position: relative;
  margin: 1px 0 0;
  padding: 9px 11px 9px 29px;
  border: 1px solid rgba(221, 111, 126, .34);
  border-radius: 5px;
  background: rgba(77, 31, 42, .34);
  color: #f2b0b9;
  font-size: 9px;
  line-height: 1.45;
  animation: validation-enter 180ms cubic-bezier(.22, 1, .36, 1) both;
}

.field-validation-message::before {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.field-invalid:not(input):not(select):not(textarea),
.studio-path-picker.field-invalid .path-picker-control,
.styled-select.field-invalid .styled-select-trigger,
input.field-invalid,
textarea.field-invalid {
  border-color: rgba(232, 120, 135, .72) !important;
  box-shadow: 0 0 0 2px rgba(202, 69, 91, .12) !important;
}

.form-error:not(:empty) {
  min-height: 0;
  padding: 9px 11px;
  border: 1px solid rgba(221, 111, 126, .3);
  border-radius: 5px;
  background: rgba(77, 31, 42, .28);
  color: #f2b0b9;
  line-height: 1.45;
  animation: validation-enter 180ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes validation-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.path-picker-control { align-items: center; }
.path-picker-control:has(textarea) { align-items: stretch; }

.studio-path-picker input:not([type="radio"]):not([type="checkbox"]),
.project-dialog .studio-path-picker input:not([type="radio"]):not([type="checkbox"]),
.expression-field .studio-path-picker input:not([type="range"]) {
  align-self: center;
  min-height: 44px;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.studio-path-picker textarea,
.project-dialog .studio-path-picker textarea {
  align-self: stretch;
  font-size: 10px;
}

.studio-path-picker.is-empty textarea {
  padding-top: 33px;
  padding-bottom: 33px;
}

body[data-current-view="models"] .viewport { overflow-y: hidden; }

.view[data-view-panel="models"].active {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.view[data-view-panel="models"] .module-header,
.view[data-view-panel="models"] .lineage-ruler { flex: 0 0 auto; }

.view[data-view-panel="models"] .registry-layout {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.registry-layout > .table-section {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.registry-layout > .table-section > .table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.registry-layout > .artifact-inspector {
  height: 100%;
  max-height: none;
  align-self: stretch;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.settings-layout {
  grid-template-areas:
    "contract contract contract contract contract contract contract contract contract contract contract contract"
    "preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences preferences"
    "components components components components components components components components components components components components"
    "install install install install history history history history history history history history";
}

.settings-install { grid-column: span 4; }
.settings-history { grid-column: span 8; }

@media (max-width: 980px) {
  body[data-current-view="models"] .viewport { overflow-y: auto; }
  .view[data-view-panel="models"].active { height: auto; min-height: 100%; overflow: visible; }
  .view[data-view-panel="models"] .registry-layout { overflow: visible; }
  .registry-layout > .table-section,
  .registry-layout > .artifact-inspector { height: min(560px, 62dvh); }
  .settings-layout {
    grid-template-areas: "contract" "preferences" "components" "install" "history";
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-install,
  .settings-history { grid-column: 1; }
}

@media (max-width: 620px) {
  .studio-path-picker.is-empty textarea {
    padding-top: 29px;
    padding-bottom: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-validation-message,
  .form-error:not(:empty) { animation: none; }
}

/* Compact history, independently scrolling jobs, and exact path-field centering. */
.settings-history {
  display: grid;
  min-height: 132px;
  padding: 22px 26px;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 300px);
  align-items: center;
  gap: 24px;
}

.settings-history h2 {
  margin: 6px 0 6px;
  font-size: 18px;
}

.settings-history p {
  max-width: 620px;
  font-size: 10px;
  line-height: 1.55;
}

.settings-history-action {
  width: 100%;
  margin: 0;
  justify-items: stretch;
  gap: 9px;
}

.settings-history-action > span { text-align: left; }
.settings-history-action .secondary-button { width: 100%; min-height: 40px; }

body[data-current-view="jobs"] .viewport { overflow-y: hidden; }

.view[data-view-panel="jobs"].active {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.view[data-view-panel="jobs"] .module-header { flex: 0 0 auto; }

.view[data-view-panel="jobs"] .jobs-layout {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.jobs-layout > .table-section {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.jobs-layout > .table-section > .job-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.jobs-layout > .queue-depth {
  height: 100%;
  min-height: 0;
  align-self: stretch;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.path-picker-leading-icon {
  grid-row: 1;
  grid-column: 1;
}

.studio-path-picker input:not([type="radio"]):not([type="checkbox"]),
.studio-path-picker textarea {
  z-index: 1;
  grid-row: 1;
  grid-column: 2;
}

.path-picker-browse {
  grid-row: 1;
  grid-column: 3;
  min-height: 46px;
  align-self: stretch;
}

.path-picker-placeholder {
  z-index: 2;
  display: none;
  min-width: 0;
  padding-right: 10px;
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  overflow-wrap: anywhere;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
  pointer-events: none;
}

.studio-path-picker.is-empty .path-picker-placeholder { display: block; }
.studio-path-picker.is-empty textarea { padding-top: 13px; padding-bottom: 13px; }
.studio-path-picker.is-empty textarea::placeholder {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 980px) {
  body[data-current-view="jobs"] .viewport { overflow-y: auto; }
  .view[data-view-panel="jobs"].active { height: auto; min-height: 100%; overflow: visible; }
  .view[data-view-panel="jobs"] .jobs-layout { overflow: visible; }
  .jobs-layout > .table-section,
  .jobs-layout > .queue-depth { height: min(560px, 62dvh); }
}

@media (max-width: 620px) {
  .settings-history {
    min-height: 0;
    padding: 20px 18px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}


/* Studio experience: Calm Editorial Workstation shared presentation system. */
body.studio-ux {
  --studio-font-ui: Inter, "Segoe UI", "Noto Sans", Arial, sans-serif;
  --studio-font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --studio-title: 28px;
  --studio-section: 18px;
  --studio-body: 14px;
  --studio-label: 12px;
  --studio-space-1: 4px;
  --studio-space-2: 8px;
  --studio-space-3: 12px;
  --studio-space-4: 16px;
  --studio-space-6: 24px;
  --studio-space-8: 32px;
  --studio-inspector: 320px;
  --ux-radius: 10px;
  --ux-focus: var(--lilac);
  --ux-control-height: 40px;
  --ux-ease: cubic-bezier(.2,.7,.2,1);
}
/* App shell: the cover retains its own visual scale. */
.studio-ux .topbar { gap: 16px; padding-inline: 24px; }
.studio-ux .product-lockup strong { font-size: 14px; }
.studio-ux .product-lockup span { font-size: 12px; color: var(--muted); }
.studio-ux .runtime-strip :is(span, strong) { font-size: 12px; color: var(--muted); }
.studio-ux .runtime-strip strong { color: var(--text); font-variant-numeric: tabular-nums; }
.studio-ux .runtime-strip > div:first-child { width: max-content; min-width: 0; max-width: 360px; flex: 0 1 auto; }
.studio-ux #runtimeGpu { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.studio-ux .view:not(.overview-view) { padding: 24px 32px 32px; }
.studio-ux .module-header {
  min-height: 64px; margin: 0 0 24px; padding: 0 0 16px;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.studio-ux .module-header h1 { margin: 0; padding-bottom: .14em; font-size: var(--studio-title); line-height: 1.2; font-weight: 600; }
.studio-ux .module-header .eyebrow { margin: 0 0 4px; font-size: 12px; line-height: 1.5; color: var(--muted); letter-spacing: 0; }
.studio-ux .module-header :is(p:not(.eyebrow), .view-status) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .section-heading { gap: 12px; margin-bottom: 12px; padding-top: 0; align-items: center; flex-wrap: wrap; }
.studio-ux .section-heading h2 { margin: 4px 0 0; font-size: var(--studio-section); line-height: 1.4; font-weight: 550; }
.studio-ux .section-heading :is(span, small) { font-size: 12px; line-height: 1.5; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.studio-ux .workspace-section { min-width: 0; margin-top: 24px; scroll-margin-top: 16px; }
.studio-ux .domain-workspace > .workspace-section { margin-top: 0; }
.studio-ux :is(.domain-workspace, .jobs-layout) { grid-template-columns: minmax(0,1fr) var(--studio-inspector); gap: 24px; align-items: start; }
.studio-ux :is(.domain-main, .evaluation-evidence-section) > .section-heading { padding-top: 16px; }
/* Common controls, not blanket opacity on unavailable workspaces. */
.studio-ux :is(button, input, select, textarea, summary, a):focus-visible { outline: 2px solid var(--ux-focus); outline-offset: 3px; }
.studio-ux :is(button, summary) { -webkit-tap-highlight-color: transparent; }
.studio-ux :is(.primary-button, .secondary-button, .text-button, .row-action, .row-select) {
  font-family: var(--studio-font-ui); font-size: 13px; line-height: 1.4;
  border-radius: 8px; white-space: normal; transition: background 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.studio-ux :is(.primary-button, .secondary-button, .text-button) { min-height: 40px; }
.studio-ux .primary-button { min-height: 44px; }
.studio-ux :is(.row-action, .row-select) { min-height: 36px; }
.studio-ux .icon-button { width: 36px; height: 36px; flex-basis: 36px; border-radius: 8px; }
.studio-ux button:disabled { opacity: 1; color: var(--muted); cursor: not-allowed; box-shadow: none; }
.studio-ux .primary-button:disabled { background: var(--tool); border-color: var(--line); }
.studio-ux label { min-width: 0; font-family: var(--studio-font-ui); font-size: 13px; line-height: 1.5; color: var(--muted); }
.studio-ux :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
  min-width: 0; max-width: 100%; border-radius: 8px; font-family: var(--studio-font-ui);
  font-size: 14px; line-height: 1.5; color: var(--text);
}
.studio-ux :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select) { min-height: 40px; }
.studio-ux textarea { padding: 12px; }
.studio-ux :is(.styled-select-trigger, .styled-select-option) { min-height: 40px; font-size: 14px; line-height: 1.5; }
.studio-ux .studio-path-picker :is(input, textarea) { background: transparent; box-shadow: none; font-family: var(--studio-font-mono); font-size: 13px; }
.studio-ux :is(.workstation-hint, .run-stage, .form-error, .field-validation-message) { font-size: 13px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.studio-ux :is(.form-error, .field-validation-message) { color: var(--red); }
.studio-ux .form-error:empty { display: none; }
.studio-ux .form-error:not(:empty) { padding: 12px; border-left: 2px solid var(--red); }
/* Inspector and monitor are distinct semantic roles with a shared work surface. */
.studio-ux :is(.inspector, .queue-depth, .tse-job-inspector) {
  min-width: 0; width: auto; padding: 20px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--base); box-shadow: none; backdrop-filter: none;
}
.studio-ux :is(.inspector, .queue-depth, .tse-job-inspector) h2 { margin: 4px 0 16px; font-size: 18px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.studio-ux :is(.inspector, .queue-depth, .tse-job-inspector) :is(.eyebrow, small, p) { font-size: 12px; line-height: 1.55; color: var(--muted); }
.studio-ux :is(.inspector, .run-metrics, .job-inspector-meta, .expression-analysis-metrics) dt { color: var(--muted); font-size: 12px; font-weight: 400; }
.studio-ux :is(.inspector, .run-metrics, .job-inspector-meta, .expression-analysis-metrics) dd { color: var(--text); font: 14px/1.55 var(--studio-font-ui); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.studio-ux .inspector dl > div { padding-block: 10px; }
.studio-ux :is(.training-action-stack, .evaluation-run-controls) > button { width: 100%; }
.studio-ux :is(.training-run-monitor, .evaluation-run-monitor) { margin-top: 24px; padding-top: 20px; }
.studio-ux .run-metrics { margin: 16px 0; }
.studio-ux .run-metrics > div { padding: 12px 16px; min-height: 72px; }
.studio-ux :is(.training-project-inspector, .evaluation-run-controls) { align-self: start; }
.studio-ux .active-pipeline { border-radius: 10px; overflow: hidden; }
/* Collection rows: allocate width by role and preserve complete names. */
.studio-ux .table-wrap { min-width: 0; max-width: 100%; overflow: auto; scrollbar-width: thin; }
.studio-ux .table-section table { width: 100%; table-layout: fixed; }
.studio-ux .table-section :is(th, td) { padding: 8px 12px; line-height: 1.5; font-family: var(--studio-font-ui); }
.studio-ux .table-section th { color: var(--muted); font-size: 12px; font-weight: 550; text-transform: none; letter-spacing: 0; }
.studio-ux .table-section td { color: var(--text); font-size: 14px; font-weight: 400; }
.studio-ux .table-section :is(th, td):first-child { padding-inline-start: 18px; }
.studio-ux .table-section td:first-child { font-size: 14px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.studio-ux .table-section td:first-child :is(.row-select, .dataset-item-name) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font-size: 14px; }
.studio-ux .table-section :is(time, .numeric) { font-variant-numeric: tabular-nums; }
.studio-ux tbody tr { transition: background-color 120ms ease; }
.studio-ux tbody tr:hover { background-color: var(--tool); }
.studio-ux tbody tr.selected { background: rgba(143,49,87,.12); box-shadow: inset 3px 0 var(--rose); }
.studio-ux :is(.artifact-path, .artifact-id, .job-id, code, pre) { font-family: var(--studio-font-mono); font-size: 12px; line-height: 1.55; color: var(--muted); }
.studio-ux .artifact-path { white-space: normal; overflow-wrap: anywhere; }
.studio-ux .status-label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 8px;
  border-radius: 6px; font: 12px/1.5 var(--studio-font-ui); text-transform: none; white-space: normal;
}
.studio-ux .status-label::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; background: currentColor; border-radius: 50%; }
.studio-ux .status-label:is(.draft, .pending, .waiting, .unknown) { color: var(--muted); }
.studio-ux .empty-cell { min-height: 100px; height: 112px; font-size: 14px; line-height: 1.55; color: var(--muted) !important; }
.studio-ux .table-wrap.ux-table-scroll { flex: 0 1 auto; min-height: 0; max-height: min(56dvh,36rem); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-padding-block: 44px 12px; }
.studio-ux .ux-table-scroll:focus-visible { outline: 2px solid var(--ux-focus); outline-offset: 2px; }
.studio-ux .ux-table-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--tool); }
.studio-ux .section-heading .ux-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; min-width: 0; padding-right: 16px; }
.studio-ux .section-heading .ux-section-count { margin: 0; padding: 0; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; white-space: nowrap; text-transform: none; }
/* Settings and information groups, not display cards. */
.studio-ux .settings-grid { gap: 24px; }
.studio-ux .settings-section { padding: 20px 24px; }
.studio-ux .settings-section h2 { font-size: 18px; line-height: 1.4; margin-block: 4px 16px; }
.studio-ux .settings-section :is(p, small, .settings-kicker) { font-size: 12px; line-height: 1.55; color: var(--muted); }
.studio-ux .settings-field-grid { gap: 16px; }
.studio-ux .component-row { padding: 16px; opacity: 1; }
.studio-ux .component-row header strong { font-size: 14px; line-height: 1.5; color: var(--text); }
.studio-ux .component-row :is(small, p, header span) { font-size: 12px; line-height: 1.55; color: var(--muted); }
.studio-ux .component-bundle-actions { width: 100%; max-width: 960px; grid-template-columns: minmax(280px,1fr) max-content max-content; gap: 12px; }
.studio-ux .engine-grid { gap: 0; }
.studio-ux .engine-grid :is(strong, h2) { font-size: 15px; color: var(--text); }
.studio-ux .engine-grid :is(span, small, p) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux :is(.dataset-lifecycle, .training-lifecycle) { margin-block: 0 24px; }
.studio-ux .dataset-lifecycle li { padding: 12px; min-height: 76px; transition: background-color 140ms ease, border-color 140ms ease; }
.studio-ux .dataset-lifecycle li :is(span, small) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .dataset-lifecycle li strong { font-size: 13px; color: var(--text); }
.studio-ux .dataset-lifecycle:focus-visible { outline: 2px solid var(--ux-focus); outline-offset: 3px; }
.studio-ux :is(.dataset-summary, .dataset-acquisition-counts) :is(strong, dd) { font-size: 15px; font-variant-numeric: tabular-nums; }
.studio-ux :is(.dataset-summary, .dataset-acquisition-counts) :is(span, dt, small) { font-size: 12px; line-height: 1.5; color: var(--muted); }
/* Progressive disclosure and bounded technical detail. */
.studio-ux .ux-disclosure { grid-column: 1/-1; min-width: 0; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: transparent; }
.studio-ux .ux-disclosure > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 44px; padding: 12px 16px; color: var(--text); font: 13px/1.5 var(--studio-font-ui); cursor: pointer; list-style: none; }
.studio-ux .ux-disclosure > summary::-webkit-details-marker { display: none; }
.studio-ux .ux-disclosure > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 160ms var(--ux-ease); }
.studio-ux .ux-disclosure[open] > summary::before { transform: rotate(45deg); }
.studio-ux .ux-disclosure > summary:hover { background: var(--tool); }
.studio-ux .ux-settings-preview { flex-basis: 100%; padding-left: 18px; color: var(--muted); font: 12px/1.5 var(--studio-font-ui); overflow-wrap: anywhere; }
.studio-ux .ux-disclosure[open] .ux-settings-preview { display: none; }
.studio-ux .ux-disclosure-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 4px 16px 16px; }
.studio-ux .ux-disclosure-content > :is(fieldset,.expression-field-wide) { grid-column: 1/-1; }
.studio-ux .ux-disclosure-content label { display: grid; gap: 8px; align-content: start; }
.studio-ux .ux-disclosure-content :is(input, select, textarea) { width: 100%; }
.studio-ux .ux-records > summary > h3 { margin: 0; font: inherit; }
.studio-ux .ux-record-count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.studio-ux .ux-records > .ux-disclosure-content { display: block; padding: 0 16px 16px; }
.studio-ux .ux-record-body { max-height: min(52dvh,32rem); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; overflow-wrap: anywhere; }
.studio-ux .ux-record-body:focus-visible { outline: 2px solid var(--ux-focus); outline-offset: 2px; }
.studio-ux .ux-records :is(.run-event-list, .run-artifact-list, .tse-job-events, .job-log-list, .artifact-lineage) { max-height: none; overflow: visible; }
.studio-ux :is(.run-event, .job-log-row, .tse-event, .run-artifact) { font-size: 13px; line-height: 1.55; }
.studio-ux :is(.run-event, .job-log-row, .tse-event, .run-artifact) :is(time, span, p, strong, a) { font-size: 12px; line-height: 1.55; }
.studio-ux .run-artifact strong { color: var(--text); font-weight: 400; overflow-wrap: anywhere; }
.studio-ux .run-monitor-columns { align-items: start; gap: 24px; }
.studio-ux .ux-project-jump { display: none; }
/* Feedback and ephemeral surfaces. */
.studio-ux .toast { top: auto; bottom: 24px; height: auto; display: flex; align-items: flex-start; gap: 12px; max-width: min(560px,calc(100vw - 32px)); padding: 12px 12px 12px 16px; border-radius: 12px; }
.studio-ux .toast.show { pointer-events: auto; }
.studio-ux #toastMessage { align-self: center; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 35dvh; overflow-y: auto; }
.studio-ux #toastDismiss { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.studio-ux #toastDismiss:hover { background: var(--tool); color: var(--text); }
.studio-ux .toast-error { border-color: var(--red); }
.studio-ux dialog { max-height: calc(100dvh - 32px); border-radius: 14px; }
.studio-ux dialog h2 { font-size: 22px; line-height: 1.35; }
.studio-ux dialog :is(label, legend, small, p) { font-size: 13px; line-height: 1.5; }
.studio-ux :is(.styled-select-menu, .studio-locale-menu) { animation: none; transform-origin: top center; transition: opacity 160ms ease, transform 180ms var(--ux-ease), display 180ms allow-discrete; }
.studio-ux :is(.styled-select-menu, .studio-locale-menu)[hidden] { opacity: 0; transform: translateY(-4px); pointer-events: none; }
@starting-style { .studio-ux :is(.styled-select-menu, .studio-locale-menu):not([hidden]) { opacity: 0; transform: translateY(-4px); } }
.studio-ux details { interpolate-size: allow-keywords; }
.studio-ux details::details-content { block-size: 0; opacity: 0; overflow: hidden; transition: block-size 180ms var(--ux-ease), opacity 140ms ease, content-visibility 180ms allow-discrete; }
.studio-ux details[open]::details-content { block-size: auto; opacity: 1; }
.studio-ux .view.active { animation: none; }
.studio-ux .module-header :is(h1, .eyebrow) { animation: none; }
.studio-ux .surface-enter { animation: ux-feedback-enter 180ms var(--ux-ease); }
@keyframes ux-feedback-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.studio-ux progress.is-unavailable { visibility: hidden; }
@media (min-width: 861px) {
  .studio-ux { --dock: 72px; }
  .studio-ux .rail { width: 72px; z-index: 40; overflow: hidden; align-items: flex-start; transition: width 200ms cubic-bezier(.22,.61,.36,1), box-shadow 200ms ease; }
  .studio-ux .rail :is(.module-nav,.nav-group) { align-items: flex-start; }
  .studio-ux .rail .nav-item { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 48px; height: 40px; flex-basis: 40px; margin-inline: 12px; padding: 0 15px; overflow: hidden; transition: width 200ms cubic-bezier(.22,.61,.36,1), color 120ms ease, background 120ms ease; }
  .studio-ux .rail .nav-item:hover { transform: none; }
  .studio-ux .rail .nav-item svg { flex: 0 0 18px; }
  .studio-ux .rail .dock-home { height: 48px; flex: 0 0 48px; margin-top: 8px; }
  .studio-ux .rail .nav-group-label { width: 72px; height: 24px; padding: 3px 0; line-height: 18px; font-size: 12px; color: var(--muted); letter-spacing: 0; text-align: center; }
  .studio-ux .rail .nav-label { position: static; min-width: 0; flex-shrink: 0; padding: 0; border: 0; background: transparent; box-shadow: none; opacity: 0; transform: translateX(-4px); font-size: 13px; line-height: 1.4; pointer-events: none; white-space: nowrap; transition: opacity 120ms ease, transform 200ms cubic-bezier(.22,.61,.36,1); }
  .studio-ux .rail:is(:hover,:has(.nav-item:focus-visible)) { width: 172px; box-shadow: 12px 0 24px rgba(0,0,0,.24); }
  .studio-ux .rail:is(:hover,:has(.nav-item:focus-visible)) .nav-item { width: 148px; }
  .studio-ux .rail:is(:hover,:has(.nav-item:focus-visible)) .nav-label { opacity: 1; transform: translateX(0); }
  .studio-ux .rail .nav-item.active { font-weight: 650; }
  .studio-ux .rail .nav-item.active::after { right: 0; }
  .studio-ux .rail .nav-cursor { left: 12px; width: 48px; height: 40px; transition: width 200ms cubic-bezier(.22,.61,.36,1), transform 200ms cubic-bezier(.22,.61,.36,1), opacity 120ms ease; }
  .studio-ux .rail:is(:hover,:has(.nav-item:focus-visible)) .nav-cursor { width: 148px; }
}
@media (max-width: 1439px) {
  .studio-ux .jobs-layout { display: grid; grid-template-columns: minmax(0,1fr); height: auto; overflow: visible; }
  .studio-ux .jobs-layout > .table-section { height: auto; }
  .studio-ux .jobs-layout > .queue-depth { height: auto; max-height: none; }
  .studio-ux .job-table-wrap { max-height: min(58dvh,36rem); flex: 0 1 auto; }
}
@media (max-width: 1180px) {
  .studio-ux .view:not(.overview-view) { padding-inline: 24px; }
  .studio-ux .domain-workspace { grid-template-columns: minmax(0,1fr); height: auto; }
  .studio-ux .registry-layout > :is(.table-section,.artifact-inspector) { height: auto; max-height: none; }
  .studio-ux .registry-layout > .table-section > .table-wrap { max-height: min(56dvh,36rem); flex: 0 1 auto; }
  .studio-ux .tse-workspace { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 980px) {
  .studio-ux .component-bundle-actions { max-width: 680px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-ux .component-bundle-actions > label { grid-column: 1/-1; }
  .studio-ux .component-bundle-actions > button { margin-top: 0; width: 100%; align-self: stretch; }
}
@media (max-width: 860px) {
  .studio-ux .topbar { padding-inline: 16px; gap: 8px; }
  .studio-ux .view:not(.overview-view) { padding: 16px 20px 32px; }
  .studio-ux .module-header { min-height: 64px; margin-bottom: 16px; padding-bottom: 12px; }
  .studio-ux .module-header h1 { font-size: 26px; }
  .studio-ux .module-header > * { max-width: 100%; }
  .studio-ux .viewport { padding-bottom: calc(96px + env(safe-area-inset-bottom)); scroll-padding-bottom: 96px; }
  .studio-ux .rail { padding-bottom: env(safe-area-inset-bottom); }
  .studio-ux :is(.nav-item, .mobile-more-button) { min-height: 48px; }
  .studio-ux :is(.primary-button,.secondary-button,.text-button,.row-action,.row-select,.icon-button,.styled-select-trigger,.styled-select-option) { min-height: 44px; }
  .studio-ux .icon-button { min-width: 44px; flex-basis: 44px; }
  .studio-ux :is(input,select,textarea) { font-size: 16px; }
  .studio-ux .studio-path-picker :is(input, textarea) { font-size: 16px; }
  .studio-ux .settings-section { padding: 16px; }
  .studio-ux :is(.inspector,.queue-depth,.tse-job-inspector) { width: 100%; padding: 16px; }
  .studio-ux .ux-project-jump { display: inline-flex; align-items: center; padding-inline: 0; color: var(--lilac); }
  .studio-ux .dataset-lifecycle { display: flex; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 8px; }
  .studio-ux .dataset-lifecycle > li { flex: 0 0 120px; min-width: 120px; min-height: 80px; }
  .studio-ux .table-wrap.ux-table-scroll { max-height: min(56dvh,28rem); }
  .studio-ux .section-heading .ux-title-line { gap: 4px 12px; padding-right: 12px; }
  .studio-ux .toast { right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); }
  .studio-ux #toastDismiss { min-width: 44px; height: 44px; flex-basis: 44px; }
  .studio-ux dialog { max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
@media (max-width: 620px) {
  .studio-ux .table-section table { min-width: 0; }
  .studio-ux .table-section colgroup { display: none; }
  .studio-ux .table-section td { padding: 8px 12px 8px 18px; font-size: 14px; overflow-wrap: anywhere; }
  .studio-ux .table-section td::before { color: var(--muted); font-size: 12px; line-height: 1.5; }
  .studio-ux .ux-disclosure-content { grid-template-columns: minmax(0,1fr); }
  .studio-ux .module-header :is(.actions,.header-actions,.module-actions) { flex-wrap: wrap; width: 100%; }
  .studio-ux :is(.expression-editor-actions,.dataset-review-actions,.job-actions) { flex-wrap: wrap; gap: 8px; }
  .studio-ux .component-bundle-actions > button { white-space: normal; min-width: 0; }
  .studio-ux .run-monitor-columns { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .studio-ux *, .studio-ux *::before, .studio-ux *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .studio-ux details::details-content { transition: none; }
}

.studio-ux table[data-column-layout] { min-width: 720px; }
.studio-ux :is(#trainingMonitorState, #evaluationRunState, #tseJobState) { font-size: 12px; line-height: 1.5; text-transform: none; }
@media (max-width: 620px) { .studio-ux table[data-column-layout] { min-width: 0; } }

/* Shared secondary-copy roles: explicit selectors retain the cover's headline scale. */
.studio-ux .metric-baseline :is(span, small) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .view:not(.overview-view) label > span { font-size: 12px; line-height: 1.5; font-weight: 400; color: var(--muted); }
.studio-ux .studio-path-picker button > span { font-size: 13px; }
.studio-ux .path-picker-hint { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .run-progress :is(span, strong) { font-size: 13px; line-height: 1.55; color: var(--text); }
.studio-ux :is(.evaluation-decks small, .lineage-spine span, .job-lineage, .job-type, .job-priority, .job-dependency-none) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .settings-section dt { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .settings-section dd { font-size: 14px; line-height: 1.55; color: var(--text); }
.studio-ux :is(.run-artifact-list, .run-event-list, .job-log-list, .artifact-lineage) > p { font-size: 13px; line-height: 1.55; color: var(--muted); }
.studio-ux #datasetPipeline :is(strong, span) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .ux-data-error { margin: 0 0 12px; padding: 12px; font-size: 13px; line-height: 1.55; color: var(--text); border-left: 3px solid var(--red); }

/* Align collection content with its inspector; raw paths are an accessible detail layer. */
.studio-ux .domain-workspace { padding-block: 0; }
.studio-ux .domain-workspace > .table-section { padding: 0; }
.studio-ux .domain-workspace > .table-section > .section-heading { padding-block: 16px 8px; }
.studio-ux .domain-main .table-wrap { padding-right: 0; }
.studio-ux .ux-technical-value { min-width: 0; max-width: 100%; }
.studio-ux .ux-technical-value > summary { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 12px/1.55 var(--studio-font-mono); color: var(--muted); }
.studio-ux .ux-technical-value > summary::before { content: "› "; color: var(--lilac); }
.studio-ux .ux-technical-value[open] > summary::before { content: "⌄ "; }
.studio-ux .ux-technical-value > code { display: block; margin-top: 8px; max-height: 160px; overflow: auto; white-space: normal; overflow-wrap: anywhere; font: 12px/1.55 var(--studio-font-mono); }
.studio-ux .ux-technical-value::details-content { overflow: visible; }

.studio-ux .synthesis-frame-shell { margin: 0; width: 100%; }
.studio-ux :is(.project-dialog, .settings-section, .inspector, .tse-control) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 14px; }
@media (max-width: 860px) { .studio-ux :is(.project-dialog, .settings-section, .inspector, .tse-control) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; } }

.studio-ux .dataset-stage.unavailable { opacity: 1; }
.studio-ux :is(.dataset-items-table,.evaluation-language-table,.tse-segment-wrap table) th { font: 12px/1.5 var(--studio-font-ui); color: var(--muted); }
.studio-ux :is(.dataset-items-table,.evaluation-language-table,.tse-segment-wrap table) td { font: 14px/1.5 var(--studio-font-ui); color: var(--text); }
.studio-ux :is(.tse-settings legend,.tse-advanced > summary,#tseJobProgressLabel,.queue-summary > span,.job-inspector > span,#settingsHistoryState,#datasetStatus) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.studio-ux .evaluation-result-grid h3 { font-size: 16px; line-height: 1.5; color: var(--text); }
.studio-ux :is(.data-row,.activity-row) :is(span,time) { font-size: 12px; line-height: 1.5; }

/* Qualification evidence remains readable in unavailable states. */
.studio-ux .qualification-list li strong { font-size: 14px; }
.studio-ux .qualification-list li span { font-size: 12px; color: var(--muted); }
.studio-ux .qualification-list li { font-size: 12px; }

/* Settings headings use content height rather than legacy display spacing. */
.studio-ux .settings-section > .section-heading { min-height: 0; margin-bottom: 16px; padding-bottom: 0; align-items: flex-start; }
.studio-ux .settings-section > .section-heading h2 { margin-bottom: 0; }
.studio-ux .settings-contract { min-height: 0; gap: 16px; }

/* Keep table accessibility labels inside their own scroll coordinate space. */
.studio-ux .job-table-wrap { position: relative; }

/* Essential field boundaries use the existing readable neutral token. */
.studio-ux :is(.view,dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),textarea,select,.styled-select-trigger):not(:disabled) { border-color: var(--dim); }
.studio-ux .path-picker-control { border-color: var(--dim); }
.studio-ux .studio-path-picker :is(input,textarea) { border: 0; }
.studio-ux :is(.view,dialog) [aria-invalid=true] { border-color: var(--red); }

.studio-ux .ux-lazy-sentinel > td { padding: 8px 12px; text-align: center; }
.studio-ux .ux-lazy-sentinel > td::before { display: none; }
.studio-ux .ux-lazy-sentinel button { min-height: 44px; }

/* Preserve a usable shell when a mobile keyboard resizes only the visual viewport. */
.studio-ux .studio-shell { height: var(--studio-usable-height, 100dvh); }
@media (max-width: 860px) {
  .studio-ux .rail { bottom: var(--studio-keyboard-inset, 0px); }
  .studio-keyboard-open dialog { top: 8px; bottom: auto; margin-block: 0; max-height: calc(var(--studio-usable-height) - 16px); }
}

/* Labels in expanded forms use the same readable scale as the main workspace. */
.studio-ux :is(.project-dialog,#jobDialog) label > span { font-size: 12px; line-height: 1.5; }
.studio-ux .dependency-option :is(strong,small) { font-size: 12px; line-height: 1.5; }
.studio-ux :is(.qualification-output,.expression-vad legend,.expression-qualification-panel > span,.expression-reference-analysis header > div > span) { font-size: 12px; line-height: 1.5; }

/* Separate the evidence rule from the rounded inspector instead of stacking borders. */
.studio-ux .evaluation-evidence-workspace { padding-top: 16px; }
.studio-ux .evaluation-evidence-workspace > .evaluation-evidence-section > .section-heading { padding-top: 0; }

/* Keep explanations readable even when the associated action is unavailable. */
.studio-ux .dependency-option.disabled { opacity: 1; }
.studio-ux .dependency-option small,
.studio-ux .dataset-mode-card small { color: var(--muted); }

/* Keep record actions clear of both classic and overlay scrollbars. */
.studio-ux .ux-record-body { padding-inline-end: 16px; }
.studio-ux .ux-record-body > * { min-width: 0; max-width: 100%; }
/* Primary preparation and refresh share one row in both acquisition modes. */
.studio-ux .dataset-inspector-actions { grid-template-columns: minmax(0,1fr) 44px; align-items: stretch; }
.studio-ux .dataset-inspector-actions :is(#datasetProcessButton,#datasetPrepareTargetButton) { grid-column: 1; grid-row: 1; }
.studio-ux .dataset-inspector-actions #datasetRefreshButton { grid-column: 2; grid-row: 1; width: 44px; height: auto; min-height: 44px; }
.studio-ux .dataset-inspector-actions :is(#datasetIngestButton,#datasetImportListButton,#datasetImportAcquisitionButton) { grid-column: 1/-1; grid-row: auto; }

.studio-ux .run-artifact strong { white-space: normal; text-overflow: clip; }
.studio-ux .run-artifact a { min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .studio-ux .run-artifact a { min-height: 44px; } }

/* One page-heading separator on Models and Settings. */
.studio-ux [data-view-panel="models"] > .lineage-ruler,
.studio-ux [data-view-panel="settings"] > .settings-layout { border-top: 0; }

.studio-ux .synthesis-frame-shell,
.studio-ux .synthesis-view .synthesis-frame-shell iframe { background: transparent; }
