* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 0;
  min-height: 100%;
  background: var(--studio-color-canvas);
  color: var(--studio-color-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--studio-color-canvas);
  font-size: 15.5px;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  font-family: var(--font-sans, var(--font-body));
}

input:not([type='checkbox']):not([type='radio']):not([type='file']),
select {
  height: var(--size-control);
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:active,
.primary-nav a:active {
  transform: scale(0.97);
}

:focus-visible {
  outline: 2px solid var(--studio-color-focus);
  outline-offset: 3px;
}

::selection {
  background: var(--studio-color-accent-hover);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--studio-color-ink);
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border: 2px solid var(--studio-color-focus);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-floating);
  font-weight: 650;
  transform: translateY(-160%);
  transition: transform 120ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

html[data-brand='pending'] .app-shell[data-boot-state='loading'] .sidebar,
html[data-brand='pending'] .app-shell[data-boot-state='loading'] .topbar {
  visibility: hidden;
}

html[data-brand='pending'] .app-shell[data-boot-state='loading'] .app-body {
  margin-left: 0;
}

html[data-brand='pending'] .app-shell[data-boot-state='loading'] main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

html[data-brand='pending'] .app-shell[data-boot-state='loading'] .boot-panel,
html[data-brand='pending'] .app-shell[data-boot-state='loading'] .boot-error {
  margin: 0;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 268px;
  flex-direction: column;
  padding: 28px 20px 20px;
  border-right: 1px solid var(--studio-color-line);
  background: var(--studio-color-surface);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-lockup small {
  margin-top: 3px;
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.workspace-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 28px 0 22px;
  padding: 10px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-canvas);
}

.workspace-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.workspace-copy {
  min-width: 0;
}

.workspace-copy small,
.workspace-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-copy small {
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.workspace-copy strong {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.workspace-state {
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--studio-color-accent);
  color: transparent;
}

.primary-nav {
  display: grid;
  gap: 4px;
}

.primary-nav a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 13px;
  border-radius: var(--studio-radius-control);
  color: var(--studio-color-muted);
  font-size: 14px;
  font-weight: 580;
  text-decoration: none;
  transition:
    background-color 140ms ease-out,
    color 140ms ease-out,
    transform 80ms ease-out;
}

.primary-nav a[aria-current="page"] {
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
  font-weight: 680;
}

.primary-nav svg,
.icon-button svg {
  width: 21px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.nav-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: var(--studio-radius-chip);
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: center;
}

.primary-nav a[aria-current="page"] .nav-count {
  background: var(--studio-color-accent-hover);
  color: var(--studio-color-accent-strong);
}

/* Pending tag proposals are an actionable to-do, not an error: a solid accent
   pill that stands out from the muted neutral count without a false red alarm. */
.nav-review-badge {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: var(--studio-radius-chip);
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: center;
}

.primary-nav a[aria-current="page"] .nav-review-badge {
  background: var(--studio-color-on-accent);
  color: var(--studio-color-accent);
}

.app-body {
  min-height: 100vh;
  margin-left: 268px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 98px;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--studio-color-line);
  background: color-mix(in srgb, var(--studio-color-canvas) 94%, transparent);
  backdrop-filter: blur(14px);
}

.title-lockup {
  min-width: 0;
}

.title-lockup p {
  margin-bottom: 4px;
  color: var(--studio-color-accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.title-lockup h1 {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.1vw, 29px);
  font-weight: 570;
  letter-spacing: -0.025em;
  line-height: 1.14;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.fixture-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--studio-color-faint);
  font-size: 11px;
  font-weight: 650;
}

.fixture-control select {
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  color: var(--studio-color-ink);
  font-size: 12px;
  font-weight: 650;
}

.environment-badge,
.policy-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--studio-color-line);
  border-radius: 999px;
  background: var(--studio-color-surface);
  color: var(--studio-color-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.environment-badge.preview,
.policy-chip {
  border-color: var(--studio-color-accent-hover);
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  cursor: pointer;
}

.mobile-nav-toggle {
  display: none;
}

main {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 38px clamp(24px, 4vw, 56px) 96px;
}

.boot-panel,
.boot-error {
  display: flex;
  width: min(620px, 100%);
  min-height: 190px;
  align-items: center;
  gap: 18px;
  margin: 70px auto;
  padding: 32px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-card);
}

.boot-panel p,
.boot-error p {
  margin: 4px 0 0;
  color: var(--studio-color-muted);
}

.loader {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 3px solid var(--studio-color-accent-hover);
  border-top-color: var(--studio-color-accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.boot-error {
  align-items: flex-start;
  border-color: color-mix(in srgb, var(--studio-color-error) 30%, var(--studio-color-line));
}

.boot-error h2 {
  margin: 2px 0 8px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 580;
}

.boot-error-copy {
  min-width: 0;
}

.boot-error-safety {
  color: var(--studio-color-ink);
}

.boot-error-reference {
  font-size: 12px;
}

.boot-error-reference code {
  overflow-wrap: anywhere;
  color: var(--studio-color-ink);
  font-family: var(--font-mono);
}

.boot-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.error-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-color-error-subtle);
  color: var(--studio-color-error);
  font-weight: 800;
}

.preview-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  padding: 10px 14px;
  border: 1px solid var(--studio-color-accent-hover);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
}

.preview-banner p {
  margin: 0;
  font-size: 12px;
}

.preview-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
  font-size: 10px;
  font-weight: 800;
}

.view {
  animation: view-enter 180ms ease-out both;
}

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

.eyebrow {
  margin-bottom: 8px;
  color: var(--studio-color-accent);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(300px, 0.85fr);
  grid-template-rows: minmax(300px, max-content);
  gap: 20px;
}

.hero-card,
.next-action-card,
.panel,
.metric-card,
.pillar-card,
.evidence-row,
.creation-gate,
.idea-workbench,
.queue-row,
.empty-state {
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-card);
}

.hero-card {
  min-height: 300px;
  padding: clamp(28px, 4vw, 52px);
  background:
    linear-gradient(var(--studio-color-surface), var(--studio-color-surface)) padding-box,
    var(--studio-color-surface);
}

.hero-card h2 {
  max-width: 780px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 1.01;
}

.hero-card > p:not(.eyebrow) {
  max-width: 64ch;
  color: var(--studio-color-muted);
  font-size: 16px;
}

.loop-map {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 36px;
  overflow-x: auto;
  color: var(--studio-color-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  scrollbar-width: thin;
  text-transform: uppercase;
}

.loop-step {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.loop-step b {
  font-family: var(--font-mono);
  font-size: 9px;
}

.loop-step.current {
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
}

.next-action-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  border-color: var(--studio-color-accent-hover);
  background: var(--studio-color-accent-subtle);
}

.action-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 12px 0 22px;
  border-radius: 50%;
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.next-action-card h2 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.08;
}

.next-action-card > p:not(.eyebrow) {
  color: var(--studio-color-muted);
  font-size: 14px;
}

.next-action-card .button {
  margin-top: auto;
}

.button,
.text-button {
  min-height: var(--size-control);
  border-radius: var(--studio-radius-control);
  font-weight: 680;
  cursor: pointer;
  transition:
    background-color 140ms ease-out,
    border-color 140ms ease-out,
    color 140ms ease-out,
    transform 80ms ease-out;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  font-size: 13px;
}

.button.primary {
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
}

.button.secondary {
  border-color: var(--studio-color-line);
  background: var(--studio-color-surface);
  color: var(--studio-color-ink);
}

.button.destructive {
  border-color: var(--studio-color-error);
  background: var(--studio-color-error);
  color: var(--studio-color-on-accent);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.text-button {
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--studio-color-accent);
  font-size: 12px;
}

.text-button.destructive-action {
  color: var(--studio-color-error);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric-card {
  min-height: 150px;
  padding: 20px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--studio-color-faint);
  font-size: 11px;
  font-weight: 650;
}

.metric-card span {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: 37px;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  line-height: 1;
}

.metric-card small {
  font-weight: 500;
  line-height: 1.35;
}

.accent-metric {
  border-color: var(--studio-color-accent-hover);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.panel {
  padding: 26px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.settings-grid h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 590;
  line-height: 1.13;
}

.progress-copy {
  flex: 0 0 auto;
  color: var(--studio-color-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.progress-track {
  display: block;
  width: 100%;
  height: 5px;
  margin: 22px 0 10px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: var(--studio-color-surface-subtle);
}

.progress-track::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--studio-color-surface-subtle);
}

.progress-track::-webkit-progress-value {
  border-radius: inherit;
  background: var(--studio-color-accent);
  transition: inline-size 260ms ease-out;
}

.progress-track::-moz-progress-bar {
  border-radius: inherit;
  background: var(--studio-color-accent);
}

.setup-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-item {
  border-bottom: 1px solid var(--studio-color-line);
}

.setup-item:last-child {
  border-bottom: 0;
}

.setup-link {
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 120ms ease-out,
    transform 80ms ease-out;
}

.setup-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--studio-color-line);
  border-radius: 50%;
  color: var(--studio-color-faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.setup-item.complete .setup-check {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
}

.setup-copy strong,
.setup-copy small {
  display: block;
}

.setup-copy strong {
  font-size: 13px;
}

.setup-copy small {
  margin-top: 2px;
  color: var(--studio-color-faint);
  font-size: 11.5px;
  line-height: 1.35;
}

.setup-state {
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.setup-item.complete .setup-state {
  color: var(--studio-color-accent);
}

.empty-brief {
  padding: 28px 0 6px;
}

.empty-brief strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 580;
}

.empty-brief p {
  margin: 0;
  color: var(--studio-color-muted);
  font-size: 13px;
}

.brief-list {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.brief-note {
  padding: 13px 0;
  border-bottom: 1px solid var(--studio-color-line);
}

.brief-note:last-child {
  border-bottom: 0;
}

.brief-note strong,
.brief-note span {
  display: block;
}

.brief-note strong {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.3;
}

.brief-note span {
  margin-top: 4px;
  color: var(--studio-color-faint);
  font-size: 10.5px;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--studio-color-line);
}

.page-intro h2 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 49px);
  font-weight: 530;
  letter-spacing: -0.035em;
  line-height: 1;
}

.page-intro p:not(.eyebrow) {
  max-width: 68ch;
  margin: 0;
  color: var(--studio-color-muted);
}

.intro-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.filter-row label {
  display: grid;
  gap: 5px;
  min-width: 210px;
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-row select {
  height: var(--size-control);
  padding: 0 36px 0 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  font-size: 13px;
}

.filter-row p {
  margin: 0;
  color: var(--studio-color-faint);
  font-size: 12px;
}

.evidence-list,
.queue-list {
  display: grid;
  gap: 12px;
}

.evidence-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.65fr);
  overflow: hidden;
}

.evidence-row h3 {
  max-width: 32ch;
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
}

.evidence-row p {
  margin: 0;
  color: var(--studio-color-muted);
  font-size: 13px;
}

.tag-list,
.citation-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.evidence-card-body {
  min-width: 0;
  padding: 24px;
}

.evidence-source-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--studio-color-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.evidence-source-summary {
  max-width: 72ch;
  line-height: 1.55;
}

.evidence-tag-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.evidence-tag-row .tag-list {
  min-width: 0;
}

.evidence-edit-tags {
  flex: 0 0 auto;
  padding-inline: 8px;
}

.evidence-card-actions,
.evidence-tag-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.evidence-delete-action {
  color: var(--studio-color-error);
}

.evidence-read,
.evidence-tag-actions .evidence-edit-tags {
  min-height: var(--size-control);
}

.evidence-reader-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-floating);
  color: var(--studio-color-ink);
}

.evidence-reader-dialog::backdrop {
  background: var(--studio-color-overlay);
  backdrop-filter: blur(3px);
}

.evidence-reader {
  max-height: inherit;
  padding: clamp(24px, 5vw, 52px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.evidence-reader-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--studio-color-line);
}

.evidence-reader-header h2 {
  max-width: 24ch;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 570;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.evidence-reader-header p:last-child {
  max-width: 68ch;
  margin: 0;
  color: var(--studio-color-muted);
}

.evidence-reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--studio-color-faint);
  font-size: 12px;
}

.evidence-reader-tags {
  margin-top: 16px;
}

.evidence-reader-provenance {
  max-width: 68ch;
  margin: 28px auto 0;
  padding: 20px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-surface-subtle);
}

.evidence-reader-provenance .eyebrow,
.evidence-reader-provenance h3,
.evidence-reader-provenance p,
.evidence-reader-source-list {
  margin: 0;
}

.evidence-reader-provenance h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 570;
  line-height: 1.2;
}

.evidence-reader-provenance .evidence-reader-provenance-status {
  margin-top: 14px;
  color: var(--studio-color-accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evidence-reader-provenance .evidence-reader-provenance-copy {
  margin-top: 10px;
  color: var(--studio-color-muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.evidence-reader-source-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-left: 20px;
}

.evidence-reader-source-list li {
  padding-left: 4px;
}

.evidence-reader-source-link,
.evidence-reader-source-list span,
.evidence-reader-source-list a {
  display: block;
}

.evidence-reader-source-link {
  min-height: var(--size-control);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--studio-color-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 120ms ease-out, text-decoration-color 120ms ease-out;
}

.evidence-reader-source-link:focus-visible {
  outline: 2px solid var(--studio-color-focus);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .evidence-reader-source-link:hover {
    color: var(--studio-color-accent-strong);
    text-decoration-color: currentcolor;
  }
}

.evidence-reader-source-list span,
.evidence-reader-source-list a {
  margin-top: 2px;
  color: var(--studio-color-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.evidence-reader-text {
  max-width: 68ch;
  margin: 36px auto 0;
  font-size: 17px;
  line-height: 1.78;
}

.evidence-reader-text h2,
.evidence-reader-text h3,
.evidence-reader-text h4 {
  margin: 36px 0 10px;
  font-family: var(--font-display);
  line-height: 1.2;
}

.evidence-reader-text p,
.evidence-reader-text ul {
  margin: 0 0 18px;
}

.evidence-reader-reaction {
  display: grid;
  max-width: 68ch;
  gap: 10px;
  margin: 36px auto 0;
  padding: 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-panel);
  background: var(--color-surface-subtle);
}

.evidence-reader-reaction.has-reaction {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-subtle);
}

.evidence-reader-reaction .eyebrow,
.evidence-reader-reaction h3,
.evidence-reader-reaction-body {
  margin: 0;
}

.evidence-reader-reaction h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 570;
}

.evidence-reader-reaction-body {
  line-height: 1.65;
  white-space: pre-wrap;
}

.evidence-reader-reaction .button {
  min-height: var(--size-control);
  justify-self: start;
}

.evidence-reaction {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 16px;
  padding: 24px;
  border-left: 1px solid var(--studio-color-line);
  background: var(--studio-color-surface-subtle);
}

.evidence-reaction.has-reaction {
  background: var(--studio-color-accent-subtle);
}

.evidence-reaction-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.evidence-reaction-heading strong {
  color: var(--studio-color-ink);
  font-size: 12px;
}

.evidence-reaction-heading span {
  color: var(--studio-color-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.evidence-reaction .evidence-reaction-body {
  color: var(--studio-color-ink);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.evidence-reaction.needs-reaction .evidence-reaction-body {
  color: var(--studio-color-muted);
}

.evidence-reaction-action {
  justify-self: start;
}

.tag,
.source-role,
.status-chip,
.citation-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-chip);
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-muted);
  font-size: 10px;
  font-weight: 650;
}

.citation-chip-action {
  min-height: var(--size-control);
  justify-content: flex-start;
  padding: 8px 12px;
  color: var(--studio-color-ink);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.35;
  text-align: left;
  transition:
    background-color 120ms ease-out,
    border-color 120ms ease-out,
    color 120ms ease-out;
}

.tag-action {
  max-width: 100%;
  min-height: var(--size-control);
  min-width: 0;
  justify-content: center;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
  transition:
    background-color 120ms ease-out,
    border-color 120ms ease-out,
    color 120ms ease-out,
    box-shadow 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .citation-chip-action:hover {
    border-color: var(--studio-color-accent-hover);
    background: var(--studio-color-accent-subtle);
    color: var(--studio-color-accent-strong);
  }

  .tag-action:hover {
    border-color: var(--studio-color-accent-hover);
    background: var(--studio-color-accent-subtle);
    box-shadow: var(--shadow-card-hover);
    color: var(--studio-color-accent-strong);
  }
}

.source-role,
.status-chip {
  border-color: var(--studio-color-accent-hover);
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
  text-transform: capitalize;
}

.empty-state {
  min-height: 270px;
  padding: 42px;
  border-style: dashed;
  box-shadow: none;
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent);
  font-family: var(--font-display);
  font-size: 24px;
}

.empty-state h3 {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 580;
}

.empty-state p {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--studio-color-muted);
}

.empty-state .button {
  margin-top: 20px;
}

.strategy-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 20px;
  color: var(--studio-color-muted);
  font-size: 12px;
}

.strategy-summary strong {
  color: var(--studio-color-ink);
  font-variant-numeric: tabular-nums;
}

.strategy-review-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-surface-subtle);
}

.strategy-review-note p {
  margin: 0;
  color: var(--studio-color-muted);
  font-size: 12px;
}

.strategy-review-note strong {
  color: var(--studio-color-ink);
}

.strategy-review-note > div {
  min-width: 0;
}

.strategy-save-state {
  margin-top: 5px !important;
  color: var(--studio-color-accent-strong) !important;
  font-weight: 650;
}

.strategy-review-note .text-button {
  min-height: 36px;
  margin-top: 5px;
  padding-inline: 0;
}

.selection-panel {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-card);
  transition:
    border-color 160ms ease-out,
    box-shadow 160ms ease-out,
    transform 160ms ease-out;
}

.selection-panel.ready {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent-subtle);
  box-shadow: var(--shadow-card);
}

.selection-panel.just-ready {
  animation: selection-ready 360ms ease-out;
}

.selection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.selection-heading h2 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 590;
  line-height: 1.13;
}

.selection-heading p:last-child {
  margin: 0;
  color: var(--studio-color-muted);
  font-size: 12px;
}

.selection-count {
  display: flex;
  min-width: 66px;
  height: 52px;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: center;
  padding: 10px;
  border-radius: 999px;
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.selection-count strong {
  margin-right: 3px;
  color: var(--studio-color-ink);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
}

.selection-panel.ready .selection-count {
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
}

.selection-panel.ready .selection-count strong {
  color: var(--studio-color-on-accent);
}

.selected-items {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.empty-selection {
  color: var(--studio-color-faint);
  font-size: 12px;
}

.selection-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: 999px;
  background: var(--studio-color-surface);
  color: var(--studio-color-accent-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.selection-chip[disabled] {
  color: var(--studio-color-muted);
  cursor: default;
}

.selection-chip span {
  color: var(--studio-color-faint);
  font-size: 16px;
}

.selection-footer {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.selection-footer progress {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: var(--studio-color-surface-subtle);
}

.selection-footer progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--studio-color-surface-subtle);
}

.selection-footer progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--studio-color-accent);
  transition: inline-size 220ms ease-out;
}

.selection-footer progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--studio-color-accent);
}

.strategy-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.35fr);
  gap: 12px;
  margin-bottom: 14px;
}

.strategy-filter-row label {
  display: grid;
  gap: 7px;
  color: var(--studio-color-muted);
  font-size: 11px;
  font-weight: 650;
}

.strategy-filter-row input,
.strategy-filter-row select {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
}

.strategy-tag-browser {
  display: grid;
  max-height: 430px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 10px;
  margin-bottom: 44px;
  padding: 2px 7px 7px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.strategy-tag-card {
  display: grid;
  min-height: 144px;
  align-content: space-between;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-surface);
}

.strategy-tag-card.selected {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent-subtle);
}

.tag-review-panel {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--studio-color-accent-hover);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-accent-subtle);
}

.tag-review-panel .section-heading {
  margin-bottom: 8px;
}

.tag-review-copy {
  max-width: 68ch;
  margin-bottom: 16px;
  color: var(--studio-color-muted);
}

.tag-candidate-list,
.tag-concept-list {
  display: grid;
  gap: 12px;
}

.tag-candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-radius: calc(var(--studio-radius-card) - 4px);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-card);
}

.tag-candidate-row h3,
.tag-candidate-row p,
.tag-candidate-row small {
  margin: 0;
}

.tag-candidate-row p,
.tag-candidate-row small {
  color: var(--studio-color-muted);
}

.tag-candidate-row p {
  margin-top: 3px;
}

.tag-candidate-row small {
  display: block;
  margin-top: 6px;
}

.tag-manager-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 0.35fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.tag-manager-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--studio-color-muted);
  font-size: 11px;
  font-weight: 650;
}

.tag-manager-toolbar input,
.tag-manager-toolbar select {
  width: 100%;
  height: var(--size-control);
  padding: 9px 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
}

.tag-manager-toolbar p {
  min-height: var(--size-control);
  margin: 0;
  padding: 11px 0;
  color: var(--studio-color-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag-concept-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.tag-concept-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-card);
}

.tag-concept-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tag-concept-heading > div {
  min-width: 0;
}

.tag-concept-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 610;
  line-height: 1.2;
}

.tag-concept-heading code {
  display: block;
  margin-top: 4px;
  color: var(--studio-color-faint);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.tag-aliases {
  display: flex;
  min-height: 28px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag-alias {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tag-alias-label {
  margin-right: 2px;
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-alias-empty {
  color: var(--studio-color-faint);
  font-size: 12px;
}

.tag-usage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.tag-usage div {
  padding: 0 10px;
  border-left: 1px solid var(--studio-color-line);
}

.tag-usage div:first-child {
  padding-left: 0;
  border-left: 0;
}

.tag-usage dt {
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 650;
}

.tag-usage dd {
  margin: 1px 0 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tag-concept-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag-concept-actions .button {
  min-height: var(--size-control);
}

.tag-concept-card.selected {
  border-color: var(--studio-color-accent);
  box-shadow:
    0 0 0 3px var(--studio-color-accent-subtle),
    var(--shadow-card);
}

.tag-concept-open {
  min-height: var(--size-control);
  margin: -9px -10px -7px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-color-ink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  overflow-wrap: anywhere;
  text-align: left;
  transition: color 120ms ease-out, background-color 120ms ease-out;
}

.tag-detail-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-floating);
  color: var(--studio-color-ink);
}

.tag-detail-dialog::backdrop {
  background: var(--studio-color-overlay);
  backdrop-filter: blur(4px);
}

.tag-detail-dialog[open] {
  animation: editor-enter 220ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

.tag-detail {
  max-height: inherit;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tag-detail-hero {
  position: relative;
  display: flex;
  min-height: 244px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px 64px;
  overflow: hidden;
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
}

.tag-detail-hero::after {
  position: absolute;
  right: -76px;
  bottom: -146px;
  width: 360px;
  height: 360px;
  border: 1px solid color-mix(in srgb, var(--studio-color-on-accent) 20%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px color-mix(in srgb, var(--studio-color-on-accent) 5%, transparent),
    0 0 0 92px color-mix(in srgb, var(--studio-color-on-accent) 3%, transparent);
  content: '';
  pointer-events: none;
}

.tag-detail-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tag-detail-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tag-detail-kicker .eyebrow,
.tag-detail-hero h2,
.tag-detail-hero p {
  color: var(--studio-color-on-accent);
}

.tag-detail-kicker .eyebrow {
  margin: 0;
  opacity: 0.78;
}

.tag-detail-state {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--studio-color-on-accent) 28%, transparent);
  border-radius: var(--studio-radius-chip);
  background: color-mix(in srgb, var(--studio-color-on-accent) 10%, transparent);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.tag-detail-hero h2 {
  max-width: 18ch;
  margin: 22px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 570;
  letter-spacing: -0.04em;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.tag-detail-hero p:last-child {
  max-width: 66ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.86;
}

.tag-detail-close {
  position: relative;
  z-index: 2;
  flex: 0 0 var(--size-control);
  border-color: color-mix(in srgb, var(--studio-color-on-accent) 24%, transparent);
  background: color-mix(in srgb, var(--studio-color-on-accent) 10%, transparent);
  color: var(--studio-color-on-accent);
}

.tag-detail-metrics {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -34px 32px 0;
  padding: 20px 8px;
  border: 1px solid var(--studio-color-line);
  border-radius: 18px;
  background: var(--studio-color-surface);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--studio-color-ink) 5%, transparent),
    0 10px 32px color-mix(in srgb, var(--studio-color-ink) 9%, transparent);
}

.tag-detail-metrics div {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 0 22px;
  border-left: 1px solid var(--studio-color-line);
}

.tag-detail-metrics div:first-child {
  border-left: 0;
}

.tag-detail-metrics dt {
  order: 2;
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-detail-metrics dd {
  order: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 29px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.05;
}

.tag-detail-body {
  padding: 32px;
}

.tag-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.75fr);
  align-items: start;
  gap: 24px;
}

.tag-detail-rail {
  display: grid;
  gap: 16px;
}

.tag-detail-section {
  min-width: 0;
}

.tag-detail-rail .tag-detail-section {
  padding: 20px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-surface-subtle);
}

.tag-detail-section .eyebrow,
.tag-detail-section h3 {
  margin: 0;
}

.tag-detail-section h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 590;
  line-height: 1.15;
}

.tag-detail-evidence-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.tag-detail-evidence-item {
  display: grid;
  width: 100%;
  min-height: var(--size-control);
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 120ms ease-out,
    box-shadow 120ms ease-out,
    transform 120ms ease-out;
}

.tag-detail-evidence-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  color: var(--studio-color-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-detail-evidence-item > strong {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 610;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tag-detail-evidence-summary {
  color: var(--studio-color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tag-detail-evidence-open {
  margin-top: 3px;
  color: var(--studio-color-accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.tag-detail-more,
.tag-detail-empty {
  margin: 12px 0 0;
  color: var(--studio-color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tag-detail-focus {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: calc(var(--studio-radius-card) - 4px);
  background: var(--studio-color-surface);
}

.tag-detail-focus.selected {
  background: var(--studio-color-accent-subtle);
}

.tag-detail-focus-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--studio-color-line);
  border-radius: 50%;
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-faint);
  font-size: 12px;
  font-weight: 800;
}

.tag-detail-focus-mark::after {
  content: '–';
}

.tag-detail-focus.selected .tag-detail-focus-mark {
  border-color: var(--studio-color-accent-hover);
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
}

.tag-detail-focus.selected .tag-detail-focus-mark::after {
  content: '✓';
}

.tag-detail-focus strong,
.tag-detail-focus p {
  margin: 0;
}

.tag-detail-focus strong {
  display: block;
  font-size: 12px;
}

.tag-detail-focus p {
  margin-top: 2px;
  color: var(--studio-color-muted);
  font-size: 11px;
  line-height: 1.45;
}

.tag-detail-pillar-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.tag-detail-pillar {
  padding-top: 12px;
  border-top: 1px solid var(--studio-color-line);
}

.tag-detail-pillar > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag-detail-pillar .status-chip {
  flex: 0 0 auto;
  min-height: 24px;
}

.tag-detail-pillar p {
  margin: 5px 0 0;
  color: var(--studio-color-muted);
  font-size: 11px;
  line-height: 1.45;
}

.tag-detail-language-list {
  margin: 16px 0 0;
}

.tag-detail-language-list div {
  display: grid;
  gap: 3px;
}

.tag-detail-language-list dt,
.tag-detail-language-group > strong {
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-detail-language-list dd {
  min-width: 0;
  margin: 0;
}

.tag-detail-language-list code,
.tag-detail-redirect {
  color: var(--studio-color-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.tag-detail-language-group {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin-top: 16px;
}

.tag-detail-language-group .tag-list,
.tag-detail-language-group .tag {
  min-width: 0;
  max-width: 100%;
}

.tag-detail-language-group .tag {
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.tag-detail-language-empty {
  color: var(--studio-color-muted);
  font-size: 12px;
}

.tag-detail-redirect {
  padding: 5px 7px;
  border-radius: var(--studio-radius-small);
  background: var(--studio-color-surface);
}

.tag-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--studio-color-line);
}

.tag-detail-actions .button {
  min-height: var(--size-control);
}

@media (hover: hover) and (pointer: fine) {
  .tag-concept-open:hover {
    background: var(--studio-color-accent-subtle);
    color: var(--studio-color-accent-strong);
  }

  .tag-detail-evidence-item:hover {
    border-color: var(--studio-color-accent-hover);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
  }

  .tag-detail-close:hover {
    background: color-mix(in srgb, var(--studio-color-on-accent) 18%, transparent);
  }
}

.strategy-tag-card h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
}

.strategy-tag-card p {
  margin: 4px 0 0;
  color: var(--studio-color-faint);
  font-size: 11px;
}

.strategy-tag-card .button {
  width: 100%;
}

.pillar-library-heading {
  margin: 44px 0 18px;
}

.pillar-card.selected {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent-subtle);
}

.pillar-card.paused {
  box-shadow: none;
}

.pillar-card .pillar-action {
  width: 100%;
  margin-top: 16px;
}

@keyframes selection-ready {
  0% {
    transform: scale(0.985);
  }

  60% {
    transform: scale(1.006);
  }

  100% {
    transform: scale(1);
  }
}

.launch-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--studio-color-canvas);
}

.launch-card {
  width: min(100%, 540px);
  padding: 48px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-floating);
}

.launch-card h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 590;
  line-height: 1;
}

.launch-card > p:not(.eyebrow) {
  max-width: 48ch;
  color: var(--studio-color-muted);
}

.launch-card .button {
  margin-top: 14px;
  text-decoration: none;
}

.launch-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
  font-family: var(--font-display);
  font-weight: 700;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.pillar-card {
  position: relative;
  padding: 25px;
  transition:
    box-shadow 160ms ease-out,
    transform 160ms ease-out;
}

.pillar-index {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--studio-color-line);
  font-family: var(--font-display);
  font-size: 34px;
  font-style: italic;
  line-height: 1;
}

.pillar-card h3 {
  max-width: 85%;
  margin: 8px 0 11px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 610;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.pillar-pov {
  min-height: 74px;
  margin-bottom: 18px;
  color: var(--studio-color-ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  line-height: 1.4;
}

.pillar-audience {
  color: var(--studio-color-faint);
  font-size: 11px;
}

.coverage-block {
  margin: 20px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--studio-color-line);
}

.coverage-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-color-faint);
  font-size: 10.5px;
}

.coverage-line strong {
  color: var(--studio-color-ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 570;
}

.coverage-meter {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: var(--studio-color-surface-subtle);
}

.coverage-meter::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--studio-color-surface-subtle);
}

.coverage-meter::-webkit-progress-value {
  border-radius: inherit;
  background: var(--studio-color-accent);
}

.coverage-meter::-moz-progress-bar {
  border-radius: inherit;
  background: var(--studio-color-accent);
}

.question-block {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-accent-subtle);
}

.question-block small,
.question-block strong {
  display: block;
}

.question-block small {
  color: var(--studio-color-accent-strong);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.question-block strong {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.35;
}

.readiness-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--studio-color-muted);
  font-size: 10.5px;
}

.readiness-score {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-transform: capitalize;
}

.creation-gate,
.idea-workbench {
  padding: clamp(24px, 4vw, 42px);
}

.creation-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.creation-gate h2,
.idea-workbench h2 {
  margin: 4px 0 9px;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 570;
  line-height: 1.1;
}

.creation-gate p {
  max-width: 68ch;
  margin: 0;
  color: var(--studio-color-muted);
}

.gate-requirements {
  display: grid;
  min-width: 235px;
  gap: 8px;
}

.gate-requirement {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-muted);
  font-size: 11px;
}

.gate-requirement::before {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--studio-color-line);
  border-radius: 50%;
  content: "·";
}

.gate-requirement.complete {
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
}

.gate-requirement.complete::before {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent);
  color: var(--studio-color-on-accent);
  content: "✓";
}

.idea-workbench {
  margin-top: 18px;
}

.generation-intro {
  max-width: 68ch;
  margin: 0;
  color: var(--studio-color-muted);
}

.generation-form {
  margin-top: 24px;
}

.generation-form[aria-busy="true"] {
  cursor: progress;
}

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

.generation-fields .editor-field:nth-child(4) {
  grid-column: 1 / -1;
}

.generation-fields .editor-field input,
.generation-fields .editor-field select,
.generation-fields .editor-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
}

.generation-fields .editor-field textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.55;
}

.generation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.generation-actions .button,
.generation-status-actions .button {
  height: var(--size-control);
}

.generation-limits {
  margin: 0;
  color: var(--studio-color-faint);
  font-size: 11px;
}

.generation-status {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
  font-size: 14px;
}

.generation-status[role="alert"] {
  background: var(--studio-color-error-subtle);
  color: var(--studio-color-error);
}

.generation-status p {
  max-width: 68ch;
  margin: 0;
}

.generation-progress-shell {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 12px;
  padding: 4px 2px;
}

.generation-progress-indicator {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid var(--studio-color-accent-hover);
  border-top-color: var(--studio-color-accent);
  border-radius: 50%;
  animation: generation-progress-spin 900ms linear infinite;
}

.generation-progress-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.generation-progress-title {
  margin: 0;
  color: var(--studio-color-ink);
  font-family: var(--font-sans, var(--font-body));
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.generation-progress-copy {
  color: var(--studio-color-muted);
  line-height: 1.5;
}

.generation-progress-elapsed {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--studio-color-surface);
  color: var(--studio-color-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}

.generation-progress-limit,
.generation-run-cost {
  color: var(--studio-color-faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.generation-progress-body .generation-progress-limit {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.5;
}

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

.generation-status[role="alert"] .generation-run-cost {
  padding-top: 8px;
  border-top: 1px solid currentColor;
  color: inherit;
}

.generation-status-title {
  margin: 0;
  color: var(--studio-color-ink);
  font-size: 15px;
}

.generation-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.idea-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  gap: 28px;
  margin-top: 24px;
}

.idea-card {
  padding: 22px;
  border-left: 3px solid var(--studio-color-accent);
  border-radius: 0 var(--studio-radius-card) var(--studio-radius-card) 0;
  background: var(--studio-color-accent-subtle);
}

.idea-card h3 {
  margin: 5px 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.idea-card p {
  color: var(--studio-color-muted);
}

.idea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.provenance-box {
  padding: 20px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-card);
}

.provenance-box h3 {
  margin-bottom: 13px;
  font-family: var(--font-display);
  font-size: 18px;
}

.provenance-box p {
  margin: 12px 0 0;
  color: var(--studio-color-faint);
  font-size: 11px;
}

.queue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.queue-summary-card {
  display: inline-flex;
  min-width: 120px;
  min-height: var(--size-control);
  align-items: center;
  padding: 10px 13px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  color: var(--studio-color-faint);
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
}

.queue-summary-action {
  cursor: pointer;
  font-family: inherit;
  transition:
    background-color 120ms ease-out,
    border-color 120ms ease-out,
    color 120ms ease-out;
}

.queue-summary-action::after {
  content: '→';
  margin-left: auto;
  padding-left: 10px;
  color: var(--studio-color-accent-strong);
  font-size: 14px;
}

.queue-summary-action.active {
  border-color: var(--studio-color-accent-hover);
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
}

.queue-summary-action.active::after {
  content: '×';
}

@media (hover: hover) and (pointer: fine) {
  .queue-summary-action:not(.active):hover {
    border-color: var(--studio-color-accent-hover);
    background: var(--studio-color-surface-subtle);
  }
}

.queue-summary strong {
  margin-right: 6px;
  color: var(--studio-color-ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.queue-generation-receipt {
  margin: -8px 0 16px;
  color: var(--studio-color-faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 22px 24px;
}

.queue-row[aria-busy='true'] {
  border-color: var(--studio-color-accent);
}

.queue-actions .button.is-pending {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-accent);
  opacity: 1;
}

.queue-row h3 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.queue-draft-body {
  max-width: 72ch;
  margin-bottom: 14px;
  color: var(--studio-color-muted);
}

.queue-stale-warning {
  max-width: 72ch;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--studio-color-error) 28%, var(--studio-color-line));
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-error-subtle);
  color: var(--studio-color-error);
  font-size: 12px;
  font-weight: 600;
}

.queue-row .queue-evidence-label {
  margin: 18px 0 8px;
  color: var(--studio-color-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.queue-draft-body p {
  margin: 0;
  text-wrap: pretty;
}

.queue-draft-body p + p {
  margin-top: 0.9em;
}

.queue-meta {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 7px;
  color: var(--studio-color-faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

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

.settings-grid .panel {
  min-height: 340px;
}

.settings-grid .panel > p:not(.eyebrow) {
  color: var(--studio-color-muted);
}

.settings-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.definition-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
}

.definition-list div {
  display: grid;
  grid-template-columns: minmax(100px, 0.5fr) minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--studio-color-line);
}

.definition-list dt {
  color: var(--studio-color-faint);
  font-size: 11px;
}

.definition-list dd {
  margin: 0;
  font-size: 12px;
  font-weight: 620;
  overflow-wrap: anywhere;
}

.destination-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--studio-color-line);
}

.destination-item:last-child {
  border-bottom: 0;
}

.destination-item strong,
.destination-item small {
  display: block;
}

.destination-item small {
  margin-top: 3px;
  color: var(--studio-color-faint);
}

.destination-starter-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.destination-starter-picker legend {
  font-size: 14px;
  font-weight: 700;
}

.destination-starter-picker > p {
  margin: 6px 0 14px;
  color: var(--studio-color-muted);
  font-size: 12px;
}

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

.destination-starter {
  min-height: calc(var(--size-control) * 2);
  padding: 14px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  color: var(--studio-color-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out, transform 120ms ease-out;
}

.destination-starter strong,
.destination-starter small {
  display: block;
}

.destination-starter small {
  margin-top: 5px;
  color: var(--studio-color-muted);
  line-height: 1.45;
}

.destination-starter[aria-pressed='true'] {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent-subtle);
}

.destination-starter:active {
  transform: scale(0.98);
}

.destination-starter-status:empty {
  display: none;
}

.editor-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-floating);
  color: var(--studio-color-ink);
}

.editor-dialog::backdrop {
  background: var(--studio-color-overlay);
  backdrop-filter: blur(3px);
}

.editor-dialog[open] {
  animation: editor-enter 220ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes editor-enter {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
}

.editor-form {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--studio-color-line);
}

.editor-header h2 {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 620;
}

.editor-header p:last-child {
  max-width: 58ch;
  margin: 0;
  color: var(--studio-color-muted);
}

.editor-close {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
}

.editor-fields {
  display: grid;
  gap: 16px;
  padding: 24px 28px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.editor-field {
  display: grid;
  gap: 7px;
}

.editor-field > span:first-child,
.editor-field-label {
  font-size: 12px;
  font-weight: 680;
}

.editor-field input,
.editor-field select,
.editor-field textarea {
  width: 100%;
  min-height: var(--size-control);
  padding: 10px 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
}

.editor-field input:not([type='checkbox']):not([type='file']),
.editor-field select {
  height: var(--size-control);
}

.editor-field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.editor-field input:read-only {
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-muted);
}

.editor-help {
  color: var(--studio-color-faint);
  font-size: 11px;
  line-height: 1.5;
}

.editor-field-status {
  color: var(--studio-color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.editor-field-status.is-error {
  color: var(--studio-color-error);
  font-weight: 680;
}

.voice-generate {
  display: grid;
  gap: 7px;
}

.voice-generate-button {
  min-height: 44px;
  justify-self: start;
}

.voice-generate-status {
  color: var(--studio-color-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.editor-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.editor-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.editor-section > legend {
  margin-bottom: 3px;
  padding: 0;
  color: var(--studio-color-ink);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-section-copy {
  margin: 0 0 12px;
  color: var(--studio-color-muted);
  font-size: 11px;
  line-height: 1.45;
}

.editor-section-fields {
  display: grid;
  gap: 16px;
}

.editor-section--optional {
  padding-top: 16px;
  border-top: 1px solid var(--studio-color-line);
}

.editor-section--optional > legend {
  color: var(--studio-color-muted);
}

.editor-section--disclosure {
  padding-top: 12px;
}

.editor-section-summary {
  display: grid;
  min-height: var(--size-control);
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-ink);
  cursor: pointer;
  list-style-position: inside;
}

.editor-section-summary strong {
  font-size: 12px;
}

.editor-section-summary span {
  color: var(--studio-color-muted);
  font-size: 11px;
  line-height: 1.4;
}

.editor-section--disclosure[open] .editor-section-summary {
  margin-bottom: 14px;
}

.evidence-tag-editor {
  display: grid;
  gap: 12px;
}

.evidence-tag-editor .editor-section-copy {
  margin-bottom: 0;
}

.evidence-tag-editor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-tag-editor-chip {
  display: inline-flex;
  min-height: var(--size-control);
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--studio-color-accent-hover);
  border-radius: var(--studio-radius-chip);
  background: var(--studio-color-accent-subtle);
  color: var(--studio-color-accent-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
}

.evidence-tag-editor-chip--proposal {
  border-style: dashed;
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-ink);
}

.evidence-tag-editor-pending {
  color: var(--studio-color-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evidence-tag-editor-remove {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-color-surface);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.evidence-tag-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.evidence-tag-add-row input,
.evidence-tag-add-row .button {
  height: var(--size-control);
}

.tag-combobox {
  position: relative;
  min-width: 0;
}

.tag-combobox-list {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 260px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  box-shadow: var(--shadow-floating);
  list-style: none;
}

.tag-combobox-option {
  display: grid;
  min-height: var(--size-control);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: calc(var(--studio-radius-control) - 3px);
  cursor: pointer;
}

.tag-combobox-option[aria-selected='true'] {
  background: var(--studio-color-accent-subtle);
}

.tag-combobox-option strong,
.tag-combobox-option small {
  display: block;
}

.tag-combobox-option small {
  color: var(--studio-color-faint);
  font-size: 11px;
}

.tag-combobox-usage {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag-merge-impact {
  padding: 16px;
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface-subtle);
}

.tag-merge-impact p {
  margin: 6px 0 0;
  color: var(--studio-color-muted);
}

.editor-dialog[data-editor-kind$='evidence'] {
  width: min(780px, calc(100vw - 32px));
}

.editor-dialog[data-editor-kind$='evidence'] .editor-header {
  padding-bottom: 16px;
}

.editor-dialog[data-editor-kind$='evidence'] .editor-fields {
  padding-top: 14px;
  padding-bottom: 16px;
}

.editor-dialog[data-editor-kind$='evidence'] .editor-section-fields {
  gap: 12px;
}

.editor-dialog[data-editor-kind$='evidence'] textarea {
  min-height: 72px;
}

.editor-dialog[data-editor-kind='evidence-delete'] {
  width: min(620px, calc(100vw - 32px));
}

.evidence-delete-confirmation {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--studio-color-error) 28%, var(--studio-color-line));
  border-radius: var(--studio-radius-panel);
  background: var(--studio-color-error-subtle);
  box-shadow: var(--shadow-card);
}

.evidence-delete-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-color-surface);
  color: var(--studio-color-error);
  font-family: var(--font-mono);
  font-size: 24px;
  line-height: 1;
}

.evidence-delete-copy strong {
  display: block;
  color: var(--studio-color-ink);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
}

.evidence-delete-copy p {
  max-width: 54ch;
  margin: 8px 0 0;
  color: var(--studio-color-muted);
  font-size: 13px;
  line-height: 1.6;
}

.file-evidence-review {
  gap: 12px;
}

.editor-checkbox {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface-subtle);
}

.editor-checkbox input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--studio-color-accent);
}

.editor-checkbox span {
  display: grid;
  gap: 4px;
}

.editor-checkbox strong {
  font-size: 12px;
  line-height: 1.45;
}

.editor-checkbox small {
  color: var(--studio-color-muted);
  font-size: 11px;
  line-height: 1.5;
}

.editor-error {
  margin: 0 28px;
  padding: 11px 13px;
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-error-subtle);
  color: var(--studio-color-error);
  font-size: 12px;
}

.editor-status {
  margin: 0 28px;
  padding: 11px 13px;
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface-subtle);
  color: var(--studio-color-muted);
  font-size: 12px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--studio-color-line);
  background: var(--studio-color-surface-subtle);
}

.editor-actions .button {
  height: var(--size-control);
}

@media (max-width: 560px) {
  .destination-starter-grid {
    grid-template-columns: 1fr;
  }
}

.destination-item,
.queue-actions,
.pillar-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.destination-item {
  justify-content: space-between;
}

.destination-item > div {
  min-width: 0;
}

.destination-item .text-button,
.pillar-card-actions .text-button {
  flex: 0 0 auto;
}

.pillar-card-actions {
  flex-wrap: wrap;
  margin-top: 4px;
}

.queue-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid var(--studio-color-accent-hover);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-ink);
  box-shadow: var(--shadow-floating);
  color: var(--studio-color-surface);
  font-size: 12px;
  animation: toast-enter 160ms ease-out both;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.nav-scrim {
  position: fixed;
  z-index: 25;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--studio-color-overlay);
}

.aeo-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.aeo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 18px;
}

.aeo-guidance {
  max-width: 65ch;
  margin: 12px 0 20px;
  color: var(--studio-color-muted);
  font-size: 13px;
}

.aeo-intro-action {
  display: grid;
  max-width: 290px;
  flex: 0 0 auto;
  gap: 8px;
  justify-items: end;
}

.aeo-access-message {
  margin: 0;
  color: var(--studio-color-faint);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.aeo-empty-access {
  margin-top: 12px !important;
  font-size: 12px;
}

.aeo-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.aeo-filter-row label {
  display: grid;
  gap: 7px;
  color: var(--studio-color-muted);
  font-size: 11px;
  font-weight: 650;
}

.aeo-filter-row select {
  min-height: 44px;
  padding: 9px 36px 9px 11px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
}

.aeo-match-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--studio-color-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.aeo-prompt-list,
.aeo-recent-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.aeo-prompt-button {
  display: grid;
  width: 100%;
  min-height: 84px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--studio-color-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  color: var(--studio-color-ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 120ms ease-out,
    background-color 120ms ease-out,
    transform 80ms ease-out;
}

.aeo-prompt-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.aeo-prompt-pillar {
  grid-column: 1;
  color: var(--studio-color-faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.aeo-prompt-button strong {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.3;
}

.aeo-prompt-action {
  grid-area: 1 / 2 / 3;
  color: var(--studio-color-accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.aeo-result-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--studio-color-line);
}

.aeo-result-row:last-child {
  border-bottom: 0;
}

.aeo-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aeo-result-heading time,
.aeo-result-meta {
  color: var(--studio-color-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.aeo-result-row h3 {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.aeo-result-meta,
.aeo-result-note {
  margin: 0;
}

.aeo-result-note {
  margin-top: 8px;
  color: var(--studio-color-muted);
  font-size: 13px;
}

.aeo-show-more,
.aeo-clear-filters {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
}

.aeo-result-missed {
  border-color: color-mix(in srgb, var(--studio-color-error) 30%, var(--studio-color-line));
  background: var(--studio-color-error-subtle);
  color: var(--studio-color-error);
}

.aeo-result-partial {
  color: var(--studio-color-ink);
}

@media (hover: hover) and (pointer: fine) {
  .primary-nav a:hover {
    background: var(--studio-color-surface-subtle);
    color: var(--studio-color-ink);
  }

  .button.primary:hover {
    background: var(--studio-color-accent-strong);
  }

  .button.secondary:hover,
  .fixture-control select:hover {
    border-color: var(--studio-color-accent-hover);
    background: var(--studio-color-accent-subtle);
  }

  .text-button:hover {
    background: var(--studio-color-accent-subtle);
  }

  .button.destructive:hover {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--studio-color-error) 22%, transparent);
    transform: translateY(-1px);
  }

  .evidence-delete-action:hover {
    background: var(--studio-color-error-subtle);
    color: var(--studio-color-error);
  }

  .evidence-tag-editor-chip:hover {
    border-color: var(--studio-color-accent);
    background: var(--studio-color-accent-hover);
  }

  .setup-link:hover {
    background: var(--studio-color-surface-subtle);
  }

  .pillar-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
  }

  .aeo-prompt-button:hover {
    border-color: var(--studio-color-accent-hover);
    background: var(--studio-color-accent-subtle);
  }
}

@media (max-width: 1120px) {
  .overview-grid,
  .content-grid,
  .aeo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .next-action-card {
    min-height: 250px;
  }

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

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

  .settings-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 820px) {
  .sidebar {
    width: min(320px, calc(100vw - 44px));
    box-shadow: var(--shadow-floating);
    transform: translateX(-105%);
    visibility: hidden;
    transition:
      transform 180ms ease-out,
      visibility 0s linear 180ms;
  }

  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .app-body {
    margin-left: 0;
  }

  .mobile-nav-toggle {
    display: inline-grid;
  }

  .topbar {
    min-height: 82px;
    padding: 14px 20px;
  }

  .fixture-control > span {
    display: none;
  }

  main {
    padding: 26px 20px 72px;
  }

  .tag-detail-grid {
    grid-template-columns: 1fr;
  }

  .tag-detail-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 620px) {
  .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
  }

  .title-lockup {
    min-width: 0;
    padding-top: 3px;
  }

  .title-lockup h1 {
    max-width: 45vw;
    font-size: 19px;
  }

  .environment-badge {
    display: none;
  }

  .topbar-actions {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-left: 0;
  }

  .fixture-control {
    min-width: 0;
  }

  .fixture-control select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .portal-return {
    grid-column: 1 / -1;
  }

  .hero-card,
  .next-action-card,
  .panel,
  .creation-gate,
  .idea-workbench {
    padding: 24px;
  }

  .hero-card h2 {
    font-size: 38px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .metric-card {
    min-height: 125px;
  }

  .page-intro,
  .filter-row,
  .strategy-filter-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-manager-toolbar {
    grid-template-columns: 1fr;
  }

  .tag-manager-toolbar p {
    min-height: 0;
    padding: 0;
  }

  .tag-candidate-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .tag-candidate-row .button,
  .tag-concept-actions .button {
    width: 100%;
  }

  .tag-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .tag-detail-hero {
    min-height: 226px;
    gap: 16px;
    padding: 26px 20px 58px;
  }

  .tag-detail-kicker {
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-detail-hero h2 {
    max-width: 13ch;
    margin-top: 16px;
    font-size: clamp(36px, 13vw, 48px);
  }

  .tag-detail-hero p:last-child {
    font-size: 13px;
  }

  .tag-detail-metrics {
    margin: -32px 12px 0;
    padding: 16px 4px;
    border-radius: 14px;
  }

  .tag-detail-metrics div {
    padding: 0 9px;
  }

  .tag-detail-metrics dd {
    font-size: 23px;
  }

  .tag-detail-metrics dt {
    font-size: 10px;
    letter-spacing: 0.03em;
    line-height: 1.25;
  }

  .tag-detail-body {
    padding: 26px 16px 20px;
  }

  .tag-detail-rail {
    grid-template-columns: 1fr;
  }

  .tag-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tag-detail-actions .button {
    width: 100%;
  }

  .strategy-filter-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .aeo-intro-action {
    width: 100%;
    max-width: none;
    justify-items: stretch;
  }

  .aeo-access-message {
    text-align: left;
  }

  .aeo-filter-row {
    grid-template-columns: 1fr;
  }

  .aeo-filter-row label,
  .aeo-match-count {
    grid-column: 1;
  }

  .strategy-tag-browser {
    grid-template-columns: 1fr;
  }

  .selection-panel {
    padding: 18px;
  }

  .selection-heading {
    gap: 12px;
  }

  .selected-items {
    flex-wrap: nowrap;
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .selection-chip {
    flex: 0 0 auto;
  }

  .selection-footer {
    grid-template-columns: 1fr;
  }

  .selection-footer .button {
    width: 100%;
  }

  .intro-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .boot-error {
    align-items: flex-start;
    padding: 24px;
  }

  .boot-error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .boot-error-actions .button {
    width: 100%;
  }

  .filter-row label {
    width: 100%;
  }

  .evidence-row,
  .queue-row {
    grid-template-columns: 1fr;
  }

  .queue-meta {
    justify-content: flex-start;
    justify-items: start;
  }

  .evidence-card-body,
  .evidence-reaction {
    padding: 20px;
  }

  .evidence-reaction {
    border-top: 1px solid var(--studio-color-line);
    border-left: 0;
  }

  .evidence-tag-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .evidence-card-actions,
  .evidence-tag-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .evidence-delete-confirmation {
    grid-template-columns: 1fr;
  }

  .evidence-tag-actions .button {
    flex: 1 1 auto;
  }

  .evidence-reader-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .evidence-reader {
    padding: 24px 20px;
  }

  .evidence-reader-text {
    font-size: 16px;
  }

  .creation-gate,
  .idea-layout {
    grid-template-columns: 1fr;
  }

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

  .generation-fields .editor-field:nth-child(4) {
    grid-column: auto;
  }

  .generation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gate-requirements {
    min-width: 0;
  }

  .setup-item {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 10px 0;
  }

  .setup-state {
    grid-column: 2;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .editor-header,
  .editor-fields,
  .editor-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .editor-field-grid {
    grid-template-columns: 1fr;
  }

  .evidence-tag-add-row {
    grid-template-columns: 1fr;
  }

  .evidence-tag-add-row .button {
    width: 100%;
  }

  .tag-combobox-list {
    position: static;
    margin-top: 6px;
  }

  .evidence-tag-editor-chip {
    width: 100%;
    justify-content: space-between;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-header {
    gap: 12px;
    padding-top: 18px;
    padding-bottom: 12px;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-header h2 {
    font-size: 23px;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-header p:last-child {
    font-size: 12px;
  }

  .editor-dialog:is(
    [data-editor-kind='evidence'],
    [data-editor-kind='url-evidence']
  ) .editor-field-grid,
  .editor-dialog[data-editor-kind='file-evidence'] .file-evidence-review .editor-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-dialog[data-editor-kind='evidence'] .manual-evidence-source-grid {
    grid-template-columns: 1fr;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-section-summary {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-actions {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-actions .secondary {
    flex: 0 0 auto;
  }

  .editor-dialog[data-editor-kind$='evidence'] .editor-actions .primary {
    min-width: 0;
    font-size: 12px;
    white-space: nowrap;
  }

  .editor-actions .button {
    flex: 1;
  }

  .aeo-prompt-button {
    grid-template-columns: 1fr;
  }

  .aeo-prompt-action {
    grid-area: auto;
  }
}

@media (max-width: 620px) {
  .generation-progress-shell {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .generation-progress-elapsed {
    grid-column: 2;
    justify-self: start;
    margin-top: 5px;
  }
}

/* Catalyst & Core composition ---------------------------------------------
 *
 * The palette, type families, radii, and semantic states above come from the
 * synced Sara Design System sheet. These rules apply the main site's editorial
 * voice to the Studio without changing its product-specific dashboard layout.
 */
html[data-brand='catalyst'] body {
  color: var(--color-secondary-foreground);
  font-size: 17px;
  line-height: 1.7;
}

html[data-brand='catalyst'] body::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  content: '';
  mix-blend-mode: multiply;
  opacity: 0.028;
  pointer-events: none;
}

html[data-brand='catalyst'] .app-shell {
  position: relative;
  z-index: 1;
}

html[data-brand='catalyst'] :is(h1, h2, h3) {
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

html[data-brand='catalyst'] :is(
  .primary-nav,
  .workspace-copy,
  .fixture-control,
  .environment-badge,
  .policy-chip,
  .eyebrow,
  .title-lockup p,
  .loop-map,
  .metric-card span,
  .metric-card small,
  .filter-row label,
  .setup-state,
  .queue-summary,
  .editor-section > legend,
  .aeo-prompt-pillar
) {
  font-family: var(--font-sans);
}

html[data-brand='catalyst'] :is(.eyebrow, .title-lockup p, .brand-lockup small) {
  color: var(--color-gold-ink);
  letter-spacing: 0.22em;
}

html[data-brand='catalyst'] .brand-lockup strong {
  font-weight: 400;
}

html[data-brand='catalyst'] .brand-mark {
  border: 1px solid var(--color-highlight);
  background: var(--studio-color-surface);
  box-shadow: inset 0 0 0 3px var(--studio-color-canvas);
  color: var(--studio-color-accent-strong);
}

html[data-brand='catalyst'] .workspace-avatar,
html[data-brand='catalyst'] .button.primary {
  background-color: var(--studio-color-accent);
  background-image: var(--gradient-brand);
}

html[data-brand='catalyst'] .button {
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 600;
}

html[data-brand='catalyst'] .primary-nav a[aria-current='page'] {
  box-shadow: inset 2px 0 var(--color-highlight);
}

html[data-brand='catalyst'] :is(.topbar, .sidebar) {
  border-color: color-mix(in srgb, var(--color-highlight) 34%, var(--studio-color-line));
}

html[data-brand='catalyst'] .hero-card {
  border-color: color-mix(in srgb, var(--color-highlight) 38%, var(--studio-color-line));
  background: var(--gradient-brand-glow), var(--studio-color-surface);
}

html[data-brand='catalyst'] :is(.next-action-card, .accent-metric, .selection-panel.ready) {
  border-color: color-mix(in srgb, var(--color-highlight) 62%, var(--studio-color-line));
}

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

@media (forced-colors: active) {
  .workspace-state,
  .preview-icon,
  .setup-item.complete .setup-check {
    forced-color-adjust: none;
  }
}

/* Source upload — drag-and-drop over a real file input.
   Every value comes from the shared token sheet; nothing here is a local
   palette. The input stays visible and keyboard reachable: the drop target is
   an enhancement layered on top of it, never a replacement for it. */
.dropzone {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 2px dashed var(--color-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-color-surface);
}

.dropzone--dragging {
  border-color: var(--studio-color-accent);
  background: var(--studio-color-accent-subtle);
}

.dropzone[aria-busy='true'] {
  /* Communicated to assistive tech via aria-busy, and visually via opacity. */
  opacity: 0.72;
}

.dropzone__label {
  font-weight: 600;
  color: var(--studio-color-ink);
}

.dropzone__help,
.dropzone__status {
  margin: 0;
  color: var(--studio-color-muted);
  font-size: 0.9rem;
}

.dropzone__error {
  margin: 0;
  color: var(--studio-color-error);
  font-size: 0.9rem;
}

.dropzone__input {
  height: var(--size-control);
  min-height: var(--size-control);
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-canvas);
  color: var(--studio-color-ink);
  width: 100%;
}

.dropzone__input::file-selector-button {
  min-height: 36px;
  margin-right: 12px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  color: var(--studio-color-ink);
  cursor: pointer;
}

.editor-disclosure {
  min-height: var(--size-control);
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-color-surface);
  color: var(--studio-color-ink);
  cursor: pointer;
  text-align: left;
}

@media (max-width: 620px) {
  .dropzone {
    padding: 12px;
  }

  .dropzone__input::file-selector-button {
    margin-right: 8px;
    padding: 0 10px;
  }
}
