:root {
  --bg: #f4efe8;
  --bg-alt: #ede6dd;
  --panel: rgba(255, 252, 247, 0.98);
  --panel-border: rgba(72, 53, 38, 0.08);
  --text: #1e1712;
  --muted: #6f6258;
  --accent: #9b5c2f;
  --accent-strong: #7f451d;
  --good: #158f69;
  --warn: #b7791f;
  --danger: #d14f45;
  --muted-chip: #8b97a8;
  --sans: "Manrope", sans-serif;
  --serif: "Cormorant Garamond", serif;
  --mono: "IBM Plex Mono", monospace;
  --shadow-lg: 0 10px 24px rgba(58, 41, 28, 0.05);
  --shadow-md: 0 4px 12px rgba(58, 41, 28, 0.035);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --sidebar-width: 288px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  color: var(--text);
  background: linear-gradient(180deg, #f7f3ed 0%, #f2ece4 100%);
}

body::before {
  display: none;
}

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

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  padding: 28px 22px 28px 22px;
  display: grid;
  align-content: start;
  gap: 16px;
  background: rgba(249, 245, 239, 0.94);
  border-right: 1px solid rgba(72, 53, 38, 0.08);
  overflow-y: auto;
}

.content {
  padding: 34px 40px 56px;
  display: grid;
  gap: 22px;
  min-width: 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  align-items: start;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(72, 53, 38, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 250, 0.96);
  box-shadow: var(--shadow-md);
}

.topbar-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.topbar-copy-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.topbar-copy strong {
  font-size: 1.18rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.topbar-inline-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.topbar-stat,
.context-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
  align-content: start;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.topbar-stat-compact {
  min-width: 110px;
}

.topbar-inline-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 11px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.9);
  min-width: 0;
}

.topbar-inline-stat small {
  color: var(--muted);
  font-size: 0.81rem;
  text-transform: none;
  letter-spacing: 0;
}

.topbar-inline-stat strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.topbar-inline-stat-danger {
  border-color: rgba(209, 79, 69, 0.18);
  background: rgba(254, 242, 242, 0.95);
}

.topbar-stat small,
.context-stat small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.topbar-stat strong,
.context-stat strong {
  font-size: 0.98rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.topbar-stat-danger,
.context-stat-danger {
  border-color: rgba(209, 79, 69, 0.18);
  background: rgba(254, 242, 242, 0.95);
}

.context-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

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

.topbar-controls {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.topbar-controls-organized {
  justify-content: stretch;
}

.research-pulse-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.research-pulse-card-good {
  border-color: rgba(21, 143, 105, 0.16);
  background: rgba(244, 251, 248, 0.96);
}

.research-pulse-card-warn {
  border-color: rgba(183, 121, 31, 0.18);
  background: rgba(255, 249, 239, 0.96);
}

.research-pulse-card-danger {
  border-color: rgba(209, 79, 69, 0.18);
  background: rgba(254, 244, 243, 0.98);
}

.research-pulse-card-muted {
  border-color: rgba(139, 151, 168, 0.14);
  background: rgba(250, 249, 247, 0.96);
}

.research-pulse-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.research-pulse-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.research-pulse-copy strong {
  font-size: 1rem;
  line-height: 1.15;
}

.research-pulse-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.research-pulse-actions .ghost-button {
  white-space: nowrap;
}

.research-pulse-list {
  display: grid;
  gap: 8px;
}

.research-pulse-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.research-pulse-item strong {
  font-size: 0.9rem;
}

.research-pulse-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.guided-steps-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.guided-step-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.guided-step-card strong {
  font-size: 0.92rem;
  line-height: 1.15;
}

.guided-step-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.locale-switch {
  display: grid;
  gap: 6px;
}

.sidebar-locale-switch {
  margin-top: 8px;
}

.locale-switch label {
  gap: 6px;
}

.locale-switch select {
  min-width: 120px;
}

.topbar-control-card {
  padding: 10px 12px;
  border: 1px solid rgba(72, 53, 38, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
}

.topbar-control-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.topbar-control-inline span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.ui-assistant-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.ui-assistant-panel {
  width: min(360px, calc(100vw - 24px));
  max-height: min(68vh, 720px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(220px, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.1);
  background: rgba(255, 253, 250, 0.98);
  box-shadow: var(--shadow-lg);
}

.ui-assistant-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.8rem;
}

.ui-assistant-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(72, 53, 38, 0.34);
}

.ui-assistant-status-idle .ui-assistant-status-dot {
  background: rgba(255, 99, 31, 0.84);
}

.ui-assistant-status-working .ui-assistant-status-dot {
  background: rgba(183, 121, 31, 0.92);
  animation: uiAssistantPulse 1s ease-in-out infinite;
}

.ui-assistant-status-ready .ui-assistant-status-dot {
  background: rgba(21, 143, 105, 0.9);
}

.ui-assistant-status-error .ui-assistant-status-dot {
  background: rgba(209, 79, 69, 0.92);
}

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

.ui-assistant-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.7rem;
}

.ui-assistant-thread {
  display: grid;
  gap: 10px;
  min-height: 220px;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
}

.ui-assistant-quick-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.ui-assistant-message {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.ui-assistant-message p {
  margin: 0;
  line-height: 1.5;
}

.ui-assistant-message-assistant {
  background: rgba(255, 249, 242, 0.98);
}

.ui-assistant-message-user {
  background: rgba(244, 247, 251, 0.98);
}

.ui-assistant-message-loading {
  opacity: 1;
  border-color: rgba(183, 121, 31, 0.16);
  background: rgba(255, 250, 241, 0.98);
}

.ui-assistant-thinking {
  display: grid;
  gap: 8px;
}

.ui-assistant-thinking strong {
  display: block;
}

.ui-assistant-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ui-assistant-thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(183, 121, 31, 0.92);
  animation: uiAssistantDot 1.1s ease-in-out infinite;
}

.ui-assistant-thinking-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.ui-assistant-thinking-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.ui-assistant-thinking-phase {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

@keyframes uiAssistantPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes uiAssistantDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.ui-assistant-form {
  display: grid;
  gap: 12px;
}

.ui-assistant-form textarea {
  min-height: 88px;
}

.ui-assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ui-assistant-quick-chip {
  padding: 6px 8px;
  min-height: 0;
  font-size: 0.76rem;
  line-height: 1.25;
  white-space: nowrap;
}

.identity-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.identity-role-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.82rem;
}

.mode-active {
  border-color: rgba(255, 99, 31, 0.22);
  background: rgba(255, 99, 31, 0.08);
}

.brand {
  display: grid;
  gap: 6px;
}

.brand strong {
  font-family: var(--serif);
  font-size: 2.15rem;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.brand > span:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.brand-kicker {
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.05em;
  font-size: 0.76rem;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-section-title {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

.nav-secondary a {
  background: rgba(255, 249, 241, 0.7);
}

.sidebar-tools {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.92);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.sidebar-tools summary {
  display: grid;
  gap: 4px;
  position: relative;
  min-height: 44px;
  padding-right: 82px;
  cursor: pointer;
  list-style: none;
}

.sidebar-tools summary::-webkit-details-marker {
  display: none;
}

.sidebar-tools summary strong {
  font-size: 0.95rem;
}

.sidebar-tools summary > strong,
.sidebar-tools summary > .muted {
  min-width: 0;
}

.sidebar-tools:hover {
  border-color: rgba(155, 92, 47, 0.14);
  background: rgba(255, 250, 244, 0.96);
  box-shadow: 0 10px 24px rgba(72, 53, 38, 0.05);
}

.sidebar-tools[open] {
  border-color: rgba(155, 92, 47, 0.16);
  background: rgba(255, 249, 242, 0.98);
}

.sidebar-tools summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  border: 1px solid rgba(72, 53, 38, 0.1);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(72, 53, 38, 0.05);
}

.sidebar-tools[open] summary::after {
  content: "-";
  border-color: rgba(155, 92, 47, 0.18);
  background: rgba(255, 244, 232, 0.98);
  color: var(--accent);
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.04);
  color: var(--muted);
  transition: 160ms ease;
  min-width: 0;
}

.nav a > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nav-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(139, 151, 168, 0.12);
  color: var(--muted);
}

.nav-link-badge-good {
  background: rgba(21, 143, 105, 0.12);
  color: var(--good);
}

.nav-link-badge-warn {
  background: rgba(183, 121, 31, 0.12);
  color: var(--warn);
}

.nav-link-badge-danger {
  background: rgba(209, 79, 69, 0.12);
  color: var(--danger);
}

.nav-link-badge-muted {
  background: rgba(139, 151, 168, 0.12);
  color: var(--muted);
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  border-color: rgba(155, 92, 47, 0.18);
  background: rgba(155, 92, 47, 0.08);
}

.sidebar-card,
.panel,
.metric-card,
.recommendation,
.login-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.sidebar-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.sidebar-profile-card {
  gap: 12px;
}

.sidebar-profile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.sidebar-profile-row strong {
  font-size: 1rem;
}

.sidebar-card strong {
  font-size: 1.1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.identity-name {
  min-width: 0;
}

.identity-handle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-card p,
.sidebar-card span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-card a {
  color: var(--accent-strong);
}

.hero,
.page-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.hero-copy,
.page-header > div:first-child {
  max-width: 780px;
  min-width: 0;
}

.hero h1,
.page-header h1 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 3.4vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

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

.cta-row,
.actions,
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.command-center-panel {
  padding-top: 18px;
  padding-bottom: 18px;
}

.command-center-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.command-center-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.command-center-form textarea {
  min-height: 92px;
}

.command-shortcut-hint {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.command-center-helper {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.command-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.command-chip {
  font-size: 0.82rem;
  padding: 9px 13px;
}

.command-suggestions {
  gap: 10px;
}

.command-suggestion {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.command-suggestion button {
  justify-self: start;
}

.command-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
  padding: 8vh 24px 24px;
}

.command-palette {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

body.palette-open {
  overflow: hidden;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recommendation {
  padding: 20px;
  min-width: 320px;
  max-width: 360px;
  background: rgba(255, 252, 247, 0.98);
}

.recommendation strong {
  display: block;
  margin: 10px 0;
  font-size: 1.1rem;
}

.recommendation-good {
  border-color: rgba(21, 143, 105, 0.18);
}

.recommendation-warn {
  border-color: rgba(183, 121, 31, 0.18);
}

.recommendation-danger {
  border-color: rgba(209, 79, 69, 0.18);
}

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

.metric-card {
  padding: 18px;
  display: grid;
  gap: 10px;
  min-height: 132px;
  align-content: start;
  background: rgba(255, 252, 247, 0.98);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-card strong {
  font-size: 1.78rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.metric-secondary {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel {
  padding: 24px;
  min-width: 0;
  background: rgba(255, 252, 247, 0.98);
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.34rem;
  font-weight: 600;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.dashboard-results-grid {
  align-items: stretch;
}

.dashboard-results-stack {
  gap: 16px;
}

.run-ribbon {
  padding-top: 16px;
  padding-bottom: 16px;
}

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

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

.report-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.is-home .content,
body.is-report .content {
  width: min(1180px, 100%);
  margin: 0 auto;
}

body.is-home .home-hero {
  padding-top: 30px;
  padding-bottom: 30px;
  gap: 24px;
}

body.is-home .home-preview {
  padding: 24px 26px;
}

body.is-report .report-shell {
  grid-template-columns: 1fr;
  max-width: 920px;
  margin: 0 auto;
}

body.is-report .report-sidebar {
  position: static;
}

body.is-report .deliverable-hero {
  grid-template-columns: 1fr;
  max-width: 920px;
  margin: 0 auto;
}

body.is-report .deliverable-spotlight {
  grid-template-columns: 1fr;
  max-width: 920px;
  margin: 0 auto;
}

body.is-report .report-header {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  justify-content: stretch;
}

.report-header {
  gap: 22px;
  align-items: flex-start;
}

.report-header .actions {
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: 100%;
}

.report-sidebar {
  position: sticky;
  top: 24px;
}

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

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

.deliverable-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.deliverable-hero-copy {
  display: grid;
  gap: 14px;
}

.report-summary-card {
  gap: 10px;
  padding: 20px 22px;
}

.report-summary-card strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 0.98;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.monitor-primary-grid .metric-card strong {
  overflow-wrap: anywhere;
}

.report-primary-actions-panel {
  max-width: 920px;
  margin: 0 auto;
}

.report-primary-actions {
  gap: 10px;
}

.citation-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.08);
}

.citation-card p,
.citation-card span {
  margin: 0;
}

.citation-card strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.run-row,
.artifact-row,
.rail-row,
.playbook-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.07);
  box-shadow: none;
}

.playbook-card {
  text-align: left;
  align-content: start;
  min-width: 0;
}

.preset-card,
.connector-card,
.bar-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.06);
  min-width: 0;
}

.connector-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.run-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.run-row p,
.artifact-row span,
.rail-row p,
.playbook-card p,
.preset-card p,
.connector-card p,
.bar-card p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.run-row-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.rail-good {
  border-color: rgba(21, 143, 105, 0.18);
  background: rgba(236, 252, 247, 0.88);
}

.rail-warn {
  border-color: rgba(183, 121, 31, 0.18);
  background: rgba(255, 251, 235, 0.92);
}

.rail-danger {
  border-color: rgba(209, 79, 69, 0.18);
  background: rgba(254, 242, 242, 0.92);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 7px 11px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(155, 92, 47, 0.1);
  color: var(--accent);
}

.pill-good {
  background: rgba(111, 214, 174, 0.16);
  color: var(--good);
}

.pill-warn {
  background: rgba(240, 203, 115, 0.16);
  color: var(--warn);
}

.pill-danger {
  background: rgba(239, 133, 119, 0.16);
  color: var(--danger);
}

.pill-muted {
  background: rgba(139, 151, 168, 0.12);
  color: var(--muted-chip);
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.97);
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.data-table a {
  color: var(--accent-strong);
}

.log-tail,
.code-block {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #f8f2ea;
  border: 1px solid rgba(72, 53, 38, 0.08);
  color: #4c3e33;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.6;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.report-section {
  display: grid;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.94);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.report-section summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  position: relative;
  min-height: 44px;
  padding-right: 108px;
  cursor: pointer;
  list-style: none;
}

.report-section summary::-webkit-details-marker {
  display: none;
}

.report-section:hover {
  border-color: rgba(155, 92, 47, 0.14);
  background: rgba(255, 249, 242, 0.98);
  box-shadow: 0 10px 24px rgba(72, 53, 38, 0.05);
}

.report-section[open] {
  border-color: rgba(155, 92, 47, 0.16);
  background: rgba(255, 249, 242, 0.99);
}

.report-section summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  border: 1px solid rgba(72, 53, 38, 0.1);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(72, 53, 38, 0.05);
}

.report-section[open] summary::after {
  content: "-";
  border-color: rgba(155, 92, 47, 0.18);
  background: rgba(255, 244, 232, 0.98);
  color: var(--accent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff631f 0%, #ff9d6d 100%);
  box-shadow: 0 0 0 6px rgba(255, 99, 31, 0.08);
}

.timeline-content {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
}

.timeline-content span,
.timeline-content p {
  margin: 0;
  color: var(--muted);
}

.metric-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  border-radius: 999px;
}

.metric-fill-good {
  background: linear-gradient(90deg, rgba(111, 214, 174, 0.9), rgba(111, 214, 174, 0.45));
}

.metric-fill-warn {
  background: linear-gradient(90deg, rgba(240, 203, 115, 0.9), rgba(240, 203, 115, 0.45));
}

.metric-fill-danger {
  background: linear-gradient(90deg, rgba(239, 133, 119, 0.9), rgba(239, 133, 119, 0.45));
}

.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.ghost-button,
.primary-button,
.full-width {
  font: inherit;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: none;
}

.primary-button {
  background: #9b5c2f;
  color: #fff;
  font-weight: 700;
  border-color: rgba(155, 92, 47, 0.16);
  box-shadow: none;
}

.ghost-button:hover,
.primary-button:hover,
.playbook-card:hover,
.run-row:hover,
.picker-card:hover {
  transform: none;
}

.full-width {
  width: 100%;
}

.empty-state {
  color: var(--muted);
}

.panel .empty-state,
.stack .empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(72, 53, 38, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.88);
  text-align: center;
}

.quickstart-form {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 280px auto;
  gap: 14px;
  align-items: end;
}

.launcher-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 420px);
  gap: 26px;
  align-items: start;
}

.home-hero {
  display: grid;
  gap: 20px;
}

.launcher-copy {
  display: grid;
  gap: 16px;
}

.launcher-intro,
.launcher-note {
  max-width: 64ch;
}

.launcher-form {
  display: grid;
  gap: 16px;
}

.launcher-required-note,
.launcher-shortcut {
  font-size: 0.86rem;
}

.launcher-question textarea {
  min-height: 168px;
  font-size: 1.02rem;
  line-height: 1.6;
}

.launcher-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.launcher-auto-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.launcher-auto-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.92);
  color: var(--muted);
  font-size: 0.84rem;
}

.prompt-chip {
  padding: 9px 14px;
  font-size: 0.84rem;
}

.launcher-refine {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 250, 244, 0.82);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.launcher-refine summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  position: relative;
  min-height: 44px;
  padding-right: 108px;
  cursor: pointer;
  list-style: none;
}

.launcher-refine summary::-webkit-details-marker {
  display: none;
}

.launcher-refine:hover {
  border-color: rgba(155, 92, 47, 0.14);
  background: rgba(255, 248, 239, 0.96);
  box-shadow: 0 10px 24px rgba(72, 53, 38, 0.05);
}

.launcher-refine[open] {
  border-color: rgba(155, 92, 47, 0.16);
  background: rgba(255, 247, 236, 0.98);
}

.launcher-refine summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  border: 1px solid rgba(72, 53, 38, 0.1);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(72, 53, 38, 0.05);
}

.launcher-refine[open] summary::after {
  content: "-";
  border-color: rgba(155, 92, 47, 0.18);
  background: rgba(255, 244, 232, 0.98);
  color: var(--accent);
}

.launcher-refine summary > .muted,
.report-section summary > .muted,
.sidebar-tools summary > .muted {
  padding-right: 10px;
  min-width: 0;
}

.launcher-refine summary:focus-visible,
.report-section summary:focus-visible,
.sidebar-tools summary:focus-visible {
  outline: none;
}

.details-enhanced summary::after {
  content: none !important;
}

.details-disclosure-badge {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-flex;
  align-items: center;
  min-width: 92px;
  justify-content: center;
  padding: 6px 10px;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid rgba(72, 53, 38, 0.1);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(72, 53, 38, 0.05);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.sidebar-tools .details-disclosure-badge {
  right: 2px;
  min-width: 68px;
  padding: 6px 8px;
}

.sidebar-tools .details-disclosure-label {
  font-size: 0.69rem;
}

.details-disclosure-label {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.details-disclosure-badge.is-open {
  border-color: rgba(155, 92, 47, 0.16);
  background: rgba(255, 244, 232, 0.98);
  color: var(--accent);
}

.details-enhanced summary:hover .details-disclosure-badge,
.details-enhanced summary:focus-visible .details-disclosure-badge {
  border-color: rgba(155, 92, 47, 0.16);
  box-shadow: 0 6px 18px rgba(72, 53, 38, 0.07);
}

.details-enhanced > *:not(summary) {
  animation: disclosureRevealIn 220ms ease;
}

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

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

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

.depth-bar-shell {
  display: grid;
  gap: 12px;
}

.depth-bar-copy {
  display: grid;
  gap: 4px;
}

.depth-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.depth-option {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.1);
  background: rgba(255, 255, 255, 0.98);
  text-align: left;
  cursor: pointer;
}

.depth-option strong {
  font-size: 1rem;
}

.depth-option small {
  color: var(--muted);
}

.depth-option.selected {
  border-color: rgba(255, 99, 31, 0.24);
  background: rgba(255, 99, 31, 0.08);
  box-shadow: none;
}

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

.launcher-autosave {
  margin: 0;
}

.file-dropzone {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(155, 92, 47, 0.28);
  background: rgba(255, 248, 239, 0.8);
}

.file-dropzone input {
  border-style: dashed;
  background: rgba(255, 252, 247, 0.92);
}

.preview-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(155, 92, 47, 0.14);
  background: rgba(255, 252, 247, 0.98);
}

.home-preview {
  display: grid;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 253, 250, 0.98);
}

.home-preview-head {
  display: grid;
  gap: 6px;
}

.home-preview-head > strong {
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 0.96;
}

.home-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-badge {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.88);
}

.home-badge strong {
  font-size: 0.94rem;
}

.home-badge small {
  color: var(--muted);
}

.frontier-chart {
  display: grid;
  gap: 10px;
}

.frontier-row {
  display: grid;
  gap: 8px;
}

.frontier-row-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.frontier-row-copy strong,
.frontier-row-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.frontier-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(72, 53, 38, 0.08);
  overflow: hidden;
}

.frontier-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 99, 31, 0.9), rgba(155, 92, 47, 0.82));
}

.home-trust-row {
  padding-top: 4px;
}

.home-latest-print {
  gap: 10px;
}

.home-stack-panel {
  padding-top: 18px;
  padding-bottom: 18px;
  height: 100%;
}

.home-stack-panel .stack {
  height: 100%;
  align-content: start;
}

.home-stack-panel .empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(72, 53, 38, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.88);
  text-align: center;
}

.home-result-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.home-result-row .actions {
  justify-content: flex-end;
}

.run-ready-actions {
  align-content: start;
  justify-content: flex-end;
}

.home-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.automation-panel {
  display: grid;
  gap: 16px;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.automation-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.08);
  box-shadow: var(--shadow-md);
  height: 100%;
}

.automation-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 238, 228, 0.86);
  backdrop-filter: blur(8px);
}

.launch-overlay[hidden] {
  display: none !important;
}

.launch-overlay-card {
  width: min(680px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: var(--shadow-lg);
}

.launch-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(72, 53, 38, 0.08);
  overflow: hidden;
}

.launch-progress-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 99, 31, 0.96), rgba(255, 144, 31, 0.82));
  transition: width 240ms ease;
}

.launch-phase-row {
  justify-content: space-between;
}

.launch-phase-list {
  display: grid;
  gap: 10px;
}

.launch-phase-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.06);
  color: var(--muted);
}

body.launching-research {
  overflow: hidden;
}

.monitor-progress-bar {
  width: 8%;
  transition: width 1s linear;
}

.research-stage-panel {
  display: grid;
  gap: 16px;
}

.research-stage-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.research-stage {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.98);
}

.research-stage-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(72, 53, 38, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
}

.research-stage strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.research-stage small {
  color: var(--muted);
}

.research-stage-good {
  border-color: rgba(38, 140, 96, 0.16);
  background: rgba(244, 252, 248, 0.96);
}

.research-stage-good .research-stage-index {
  background: rgba(38, 140, 96, 0.12);
  color: #1e7e57;
}

.research-stage-accent {
  border-color: rgba(255, 99, 31, 0.22);
  background: rgba(255, 248, 239, 0.96);
  box-shadow: none;
}

.research-stage-accent .research-stage-index {
  background: rgba(255, 99, 31, 0.12);
  color: var(--accent);
}

.guide-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.08);
  box-shadow: var(--shadow-md);
  height: 100%;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.wizard-grid.wizard-grid-simple {
  grid-template-columns: 1fr;
}

.wizard-main-panel {
  min-width: 0;
}

.wizard-simple-intro {
  padding: 18px 20px;
}

.wizard-section-label {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.wizard-workspace-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

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

.wizard-workspace-head > div {
  display: grid;
  gap: 4px;
}

.wizard-inline-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(21, 143, 105, 0.18);
  background: rgba(223, 247, 238, 0.98);
  color: var(--good);
  font-size: 0.76rem;
  font-weight: 700;
}

.wizard-live-guide {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 253, 250, 0.96);
}

.wizard-live-guide.is-ready {
  border-color: rgba(21, 143, 105, 0.18);
  background: rgba(244, 251, 248, 0.96);
}

.wizard-professor-summary {
  margin-top: 10px;
  border-color: rgba(155, 92, 47, 0.12);
  background: rgba(255, 250, 244, 0.96);
}

.wizard-live-guide-head {
  display: grid;
  gap: 4px;
}

.wizard-live-step-strip {
  display: grid;
  gap: 8px;
}

.wizard-live-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.86);
}

.wizard-live-step-number,
.wizard-step-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(72, 53, 38, 0.12);
  background: rgba(255, 252, 247, 0.98);
}

.wizard-live-step-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wizard-live-step-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.wizard-live-step-pill,
.wizard-step-panel-state {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(72, 53, 38, 0.12);
  background: rgba(255, 252, 247, 0.98);
}

.wizard-live-step-ready {
  border-color: rgba(21, 143, 105, 0.16);
  background: rgba(244, 251, 248, 0.96);
}

.wizard-live-step-ready .wizard-live-step-pill,
.wizard-step-panel.is-ready .wizard-step-panel-state {
  border-color: rgba(21, 143, 105, 0.18);
  background: rgba(223, 247, 238, 0.98);
  color: var(--good);
}

.wizard-live-step-missing {
  border-color: rgba(183, 121, 31, 0.16);
  background: rgba(255, 250, 241, 0.98);
}

.wizard-live-step-review {
  border-color: rgba(209, 79, 69, 0.16);
  background: rgba(255, 245, 244, 0.98);
}

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

.wizard-step-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.wizard-step-panel.is-active {
  border-color: rgba(155, 92, 47, 0.18);
  background: rgba(255, 249, 242, 0.98);
  box-shadow: 0 0 0 4px rgba(255, 99, 31, 0.08);
}

.wizard-step-panel.is-ready {
  border-color: rgba(21, 143, 105, 0.16);
  background: rgba(244, 251, 248, 0.96);
}

.wizard-step-panel.is-missing {
  border-color: rgba(183, 121, 31, 0.14);
  background: rgba(255, 250, 241, 0.98);
}

.wizard-step-panel.is-review {
  border-color: rgba(209, 79, 69, 0.16);
  background: rgba(255, 245, 244, 0.98);
}

.wizard-step-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wizard-step-panel-copy {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.wizard-step-panel-copy > div {
  display: grid;
  gap: 4px;
}

.wizard-step-panel.is-ready input,
.wizard-step-panel.is-ready select,
.wizard-step-panel.is-ready textarea {
  border-color: rgba(21, 143, 105, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.wizard-step-panel.is-missing input,
.wizard-step-panel.is-missing select,
.wizard-step-panel.is-missing textarea {
  border-color: rgba(183, 121, 31, 0.16);
}

.wizard-step-panel.is-review input,
.wizard-step-panel.is-review select,
.wizard-step-panel.is-review textarea {
  border-color: rgba(209, 79, 69, 0.18);
}

.wizard-question-review {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 53, 38, 0.08);
  background: rgba(255, 252, 247, 0.98);
}

.wizard-question-review-good {
  border-color: rgba(21, 143, 105, 0.18);
  background: rgba(244, 251, 248, 0.96);
}

.wizard-question-review-warn {
  border-color: rgba(183, 121, 31, 0.18);
  background: rgba(255, 249, 239, 0.96);
}

.wizard-question-review-danger {
  border-color: rgba(209, 79, 69, 0.18);
  background: rgba(254, 244, 243, 0.98);
}

.wizard-question-review-muted {
  border-color: rgba(139, 151, 168, 0.14);
  background: rgba(250, 249, 247, 0.96);
}

.wizard-question-review-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.wizard-summary {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.wizard-review-actions {
  margin-top: 2px;
}

.visually-hidden-form {
  display: none;
}

.wizard-inline-form {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.preview-card > strong {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 0.95;
}

.preview-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.preview-meta-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.06);
}

.preview-meta-row span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-document {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(72, 53, 38, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.preview-document-head {
  display: grid;
  gap: 8px;
}

.preview-document-head strong {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
}

.preview-section-list {
  display: grid;
  gap: 10px;
}

.preview-section-list span {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(243, 234, 224, 0.74);
  color: var(--text);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.trust-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(72, 53, 38, 0.08);
  box-shadow: var(--shadow-md);
  height: 100%;
}

.trust-card strong {
  font-size: 1.02rem;
}

.trust-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.quickstart-form > *,
.filter-form > *,
.form-grid > *,
.panel-grid > *,
.playbook-grid > *,
.metric-grid > *,
.chart-grid > * {
  min-width: 0;
}

.panel-grid > .panel,
.playbook-grid > .artifact-row,
.playbook-grid > .playbook-card,
.metric-grid > .metric-card,
.automation-grid > .automation-card,
.home-guide > .guide-card,
.trust-strip > .trust-card,
.report-kpi-grid > .metric-card {
  height: 100%;
}

.quickstart-form textarea {
  min-height: 112px;
}

.filter-form,
.wizard-form,
.login-form {
  display: grid;
  gap: 16px;
}

.filter-form {
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: end;
}

.grow {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label > span {
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(255, 99, 31, 0.35);
  box-shadow: 0 0 0 4px rgba(255, 99, 31, 0.1);
}

textarea {
  resize: vertical;
}

.field-error {
  color: #ffb2a7;
}

.wizard-shell {
  display: grid;
  gap: 16px;
  max-width: 1080px;
}

.wizard-grid {
  display: grid;
  gap: 16px;
}

.wizard-steps-panel {
  padding-top: 16px;
  padding-bottom: 16px;
}

.wizard-steps {
  display: grid;
  gap: 12px;
}

.wizard-steps-inline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wizard-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.94);
}

.wizard-step span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}

.wizard-step strong {
  display: block;
  margin-bottom: 4px;
}

.wizard-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.wizard-step.active,
.wizard-step.complete {
  border-color: rgba(255, 99, 31, 0.18);
}

.wizard-step.active span,
.wizard-step.complete span {
  background: rgba(255, 99, 31, 0.1);
  color: var(--accent);
}

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

.span-2 {
  grid-column: span 2;
}

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

.picker-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
}

.picker-card input {
  display: none;
}

.picker-card.selected {
  border-color: rgba(255, 99, 31, 0.22);
  background: rgba(255, 99, 31, 0.08);
  box-shadow: none;
}

.picker-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-panel {
  align-self: start;
}

.wizard-support-panel {
  max-width: 1080px;
}

.top-gap {
  margin-top: 20px;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-panel {
  width: min(460px, 100%);
  padding: 28px;
}

.login-panel h1 {
  margin: 8px 0 10px;
}

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.alert-danger {
  color: #ffd0c9;
  border: 1px solid rgba(239, 133, 119, 0.24);
  background: rgba(239, 133, 119, 0.14);
}

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

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-row input {
  margin-top: 4px;
}

.progress-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 99, 31, 0.92), rgba(255, 144, 31, 0.82));
}

.run-progress-card {
  gap: 12px;
}

.table-progress {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.table-progress strong {
  font-size: 0.95rem;
}

.runs-title-cell {
  display: grid;
  gap: 4px;
  min-width: 240px;
}

.runs-list {
  gap: 14px;
}

.runs-empty-shell {
  display: grid;
  gap: 18px;
}

.runs-empty-grid {
  margin-top: 2px;
}

.runs-empty-actions {
  padding-top: 2px;
}

.runs-list-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  align-items: start;
  gap: 16px;
}

.runs-list-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.runs-list-summary,
.runs-list-metrics,
.runs-list-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.runs-list-summary span,
.runs-list-metrics span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.runs-list-meta {
  justify-items: end;
  gap: 10px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions .ghost-button,
.table-actions .primary-button {
  padding: 8px 12px;
  font-size: 0.82rem;
}

@media (max-width: 1380px) {
  .launcher-shell {
    grid-template-columns: 1fr;
  }

  .wizard-grid.wizard-grid-simple {
    grid-template-columns: 1fr;
  }

  .guided-steps-strip {
    grid-template-columns: 1fr;
  }

  .deliverable-spotlight {
    grid-template-columns: 1fr;
  }

  .deliverable-hero {
    grid-template-columns: 1fr;
  }

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

  .report-shell {
    grid-template-columns: 1fr;
  }

  .report-sidebar {
    position: static;
  }
}

@media (max-width: 1280px) {
  .quickstart-form {
    grid-template-columns: 1fr;
  }

  .launcher-control-grid,
  .wizard-compact-grid,
  .wizard-steps-inline,
  .preview-meta,
  .home-guide,
  .trust-strip,
  .automation-grid,
  .research-stage-track,
  .depth-bar {
    grid-template-columns: 1fr;
  }

  .command-center-form {
    grid-template-columns: 1fr;
  }

  .home-result-row {
    grid-template-columns: 1fr;
  }

  .runs-list-row {
    grid-template-columns: 1fr;
  }

  .runs-list-meta {
    justify-items: start;
  }
}

@media (max-width: 1200px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-pulse-card {
    min-width: 100%;
  }

  .compact-playbook-grid,
  .playbook-grid,
  .dashboard-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

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

  .card-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .hero,
  .page-header {
    flex-direction: column;
  }

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

  .research-pulse-actions {
    align-items: flex-start;
  }

  .recommendation {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .filter-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 18px;
  }

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

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

  .panel,
  .metric-card,
  .recommendation,
  .login-panel {
    border-radius: var(--radius-lg);
  }

  .hero h1,
  .page-header h1 {
    font-size: 1.9rem;
  }
}
