/* AI Challenge Builder — separate from manual builder */

.ai-builder-v2 {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
}

.ai-builder-v2 h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  margin: 0 0 1rem;
  color: var(--fg);
}

.ai-builder-v2 label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.75rem 0 0.35rem;
}

.ai-builder-v2 textarea,
.ai-builder-v2 input[type='number'] {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 0.65rem 0.75rem;
}

.complexity-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.35rem 0 0.75rem;
}

.complexity-options label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--fg);
  margin: 0;
}

.fuel-breakdown {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.78rem;
}

.fuel-breakdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}

.fuel-breakdown td {
  padding: 0.2rem 0;
  font-family: var(--font-mono);
}

.fuel-breakdown td:last-child {
  text-align: right;
  color: #fbbf24;
}

.ai-btn-primary {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  margin-top: 0.75rem;
}

.ai-btn-primary:hover {
  background: linear-gradient(135deg, #5b21b6, #8b5cf6);
}

.ai-btn-secondary {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

.build-steps {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 1rem 0;
}

.build-step {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.35rem 0;
}

.build-step.is-done {
  color: var(--accent);
}

.build-step.is-active {
  color: var(--cyan);
}

.build-step.is-skipped {
  color: var(--muted);
  opacity: 0.75;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, var(--cyan));
  transition: width 0.4s ease;
}

.review-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
  background: var(--bg-elevated);
}

.review-row.marked-for-regen {
  border-color: #7c3aed;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.35);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.review-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.review-actions button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 4px;
  cursor: pointer;
}

.review-content {
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-content pre {
  margin: 0;
  padding: 0.65rem;
  background: var(--bg);
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.68rem;
}

.feedback-input {
  width: 100%;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.45rem 0.55rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
}

.price-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
}

.price-section label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  color: var(--fg);
}

.price-note {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.ai-error-banner {
  border: 1px solid var(--attack);
  background: rgba(255, 60, 60, 0.1);
  color: #ffb4b4;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin: 0.75rem 0;
}

.ai-error-banner p {
  margin: 0;
}

.ai-error-banner .ai-error-title {
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.ai-error-banner .ai-error-meta {
  margin-top: 0.3rem;
  color: #ffcccc;
  font-size: 0.72rem;
}

.ai-error-banner .ai-error-detail {
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #ffd8d8;
  font-size: 0.7rem;
}

.ai-progress-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #c4b5fd;
  margin: 0 0 0.5rem;
}

.ai-progress-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.ai-review-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1rem;
  font-family: var(--font-mono);
}

.ai-fuel-note {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  font-family: var(--font-mono);
}

.ai-lab-image-status {
  font-size: 0.9rem;
  margin: 0.5rem 0 0.75rem;
}

.ai-lab-image-status .ai-lab-ok {
  color: #3dd68c;
}

.ai-lab-image-status .ai-lab-warn {
  color: #f0b429;
}

.ai-published-panel {
  text-align: center;
  padding: 2rem 1rem;
}

.ai-published-panel a {
  color: var(--cyan);
  font-family: var(--font-mono);
}

#manual-builder-panel.is-hidden-by-ai {
  display: none !important;
}

/* Episode AI flow uses step labs — hide hack-challenge review/submit */
body.is-flow-ai-episode #ai-review-panel,
body.is-flow-ai-episode #ai-published-panel {
  display: none !important;
}

.episode-step-lab-panel {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 8px;
  background: rgba(0, 245, 212, 0.06);
}

.episode-step-lab-panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.episode-step-lab-lede,
.episode-step-lab-image {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.ai-section-wip-lab {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(48, 54, 61, 0.85);
}

.ai-section-wip-lab.is-prominent {
  margin: 1.25rem 0;
  padding: 1.1rem 1.15rem;
  border: 2px solid rgba(88, 166, 255, 0.45);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.65);
}

.ai-section-fly-lab-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #58a6ff;
}

.ai-section-wip-lab .ai-section-wip-lede {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted, #8b949e);
  line-height: 1.45;
}

.ai-substep-workflow {
  border: 1px solid rgba(240, 180, 41, 0.4);
  background: rgba(240, 180, 41, 0.07);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.85rem;
}

.ai-substep-workflow-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0b429;
}

.ai-substep-workflow-body {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.ai-substep-workflow-lede {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
}

.ai-substep-workflow-checks {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted, #c9d1d9);
}

.ai-substep-workflow-checks code {
  font-size: 0.72rem;
}

.ai-creator-fly-test-banner {
  border: 1px solid rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  margin: 0 0 0.85rem;
}

.ai-creator-fly-test-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #58a6ff;
}

.ai-creator-fly-test-body {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted, #c9d1d9);
}

.ai-fly-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ai-fly-lab-actions .ai-btn-primary,
.ai-fly-lab-actions .ai-btn-danger {
  margin-top: 0;
}

.ai-btn-danger {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  border: 1px solid rgba(248, 81, 73, 0.65);
  background: rgba(248, 81, 73, 0.14);
  color: #ff7b72;
  cursor: pointer;
  margin-top: 0.5rem;
}

.ai-btn-danger:hover {
  background: rgba(248, 81, 73, 0.24);
  border-color: #f85149;
  color: #ffa198;
}

.ai-episode-lab-preview-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.ai-episode-lab-preview-lede {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.ai-episode-submit-hint {
  font-size: 0.78rem;
  color: var(--muted);
  border-left: 3px solid #f0b429;
  padding-left: 0.65rem;
  margin: 0.75rem 0;
}

.ai-lab-warn {
  color: #f0b429;
}

.lab-ai-ready-note {
  font-size: 0.82rem;
  color: #3dd68c;
  border: 1px solid rgba(61, 214, 140, 0.35);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 0.75rem;
  background: rgba(61, 214, 140, 0.08);
}

.lab-ai-partial-note {
  font-size: 0.82rem;
  color: #f0b429;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 0.75rem;
  background: rgba(245, 158, 11, 0.1);
}

.lab-config-panel.is-ai-lab-ready #lab-image-tag {
  color: #3dd68c;
}

.builder-top-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.ai-draft-badge:not(.hidden) {
  cursor: pointer;
}

.ai-draft-badge:not(.hidden):hover {
  filter: brightness(1.08);
}

.ai-draft-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f0b429;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

/* ── Builder workspace (persistent draft slot) ── */
.builder-workspace {
  border-bottom: 1px solid var(--border, #30363d);
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.98) 0%, rgba(8, 11, 15, 0.92) 100%);
}

.builder-workspace.hidden {
  display: none !important;
}

.builder-workspace-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem 1.25rem;
}

.builder-workspace-head {
  margin-bottom: 0.85rem;
}

.builder-workspace-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.builder-workspace-head-row .builder-workspace-title {
  margin: 0;
}

.builder-workspace-delete {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(248, 81, 73, 0.45);
  background: rgba(248, 81, 73, 0.08);
  color: #f85149;
  cursor: pointer;
}

.builder-workspace-delete:hover {
  background: rgba(248, 81, 73, 0.16);
  border-color: #f85149;
}

.builder-workspace-delete.hidden {
  display: none;
}

.builder-workspace-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan, #00f5d4);
}

.builder-workspace-lede {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted, #8b949e);
}

.builder-workspace-body {
  min-height: 2.5rem;
}

.builder-workspace-empty {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(139, 148, 158, 0.35);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-muted, #8b949e);
  background: rgba(13, 17, 23, 0.5);
}

.builder-workspace-empty.hidden {
  display: none;
}

.builder-workspace-restore {
  margin-top: 0.65rem;
}

.builder-workspace-restore.hidden {
  display: none;
}

.builder-workspace-draft:not(.hidden) {
  display: block;
}

.builder-workspace-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 2px solid rgba(245, 158, 11, 0.55);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(13, 17, 23, 0.65) 100%);
}

.builder-workspace-card-copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.builder-workspace-card-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0b429;
  font-family: var(--font-mono);
}

.builder-workspace-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text, #e6edf3);
}

.builder-workspace-card-meta {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: #f0b429;
  font-family: var(--font-mono);
}

.builder-workspace-card-hint {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted, #8b949e);
}

.builder-workspace-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.mode-chooser-draft-resume {
  margin: 0 0 1.15rem;
}

.mode-chooser-draft-resume.hidden {
  display: none;
}

.mode-chooser-draft-resume-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.08) 0%, rgba(13, 17, 23, 0.95) 100%);
}

.mode-chooser-draft-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #58a6ff;
}

.mode-chooser-draft-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text, #e6edf3);
}

.mode-chooser-draft-hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted, #8b949e);
}

.mode-chooser-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ai-draft-resume-banner {
  margin: 0.85rem auto 1.25rem;
  max-width: 1040px;
  padding: 0 1rem;
}

.mode-chooser > .ai-draft-resume-banner {
  margin: 0 0 1.25rem;
  max-width: none;
  padding: 0;
}

.ai-draft-resume-banner:not(.hidden) {
  display: block;
}

.ai-draft-resume-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  border-radius: 8px;
  font-size: 0.82rem;
}

.ai-draft-resume-inner--gate {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-width: 2px;
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(13, 17, 23, 0.5) 100%);
}

.ai-draft-resume-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0b429;
  font-family: var(--font-mono);
}

.ai-draft-resume-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text, #e6edf3);
}

.ai-draft-resume-meta {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #f0b429;
  font-family: var(--font-mono);
}

.ai-draft-resume-hint {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted, #8b949e);
}

.ai-draft-resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ai-draft-resume-inner strong {
  color: #f0b429;
  font-family: var(--font-mono);
}

.mode-chooser.is-wip-gated .mode-cards .mode-card:not(.mode-card--ai) {
  opacity: 0.42;
  pointer-events: none;
  filter: grayscale(0.35);
}

.mode-chooser.is-wip-gated .mode-card--ai {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.mode-chooser-wip-note {
  margin: -0.35rem 0 1rem;
  font-size: 0.95rem;
  color: #f0b429;
  line-height: 1.45;
}

.mode-chooser-heading.is-wip-muted,
#mode-chooser-heading.is-wip-muted {
  opacity: 0.65;
}

.ai-outline-planning-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.ai-outline-steps {
  margin-bottom: 1rem;
}

.ai-episode-outline-lede {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.ai-episode-outline-lede--compact {
  font-size: 0.8rem;
  margin-top: -0.25rem;
}

.ai-creator-guide {
  margin: 0 0 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(88, 166, 255, 0.28);
  border-left: 4px solid #58a6ff;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(13, 17, 23, 0.35) 100%);
}

.ai-creator-guide-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #58a6ff;
  font-family: var(--font-mono);
}

.ai-creator-guide-headline {
  margin: 0 0 0.55rem;
  font-size: 1.22rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text, #e6edf3);
}

.ai-creator-guide-detail {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted, #8b949e);
}

.ai-creator-guide--test_lab,
.ai-creator-guide--accept_rebuild {
  border-left-color: #3dd68c;
  border-color: rgba(61, 214, 140, 0.28);
  background: linear-gradient(135deg, rgba(61, 214, 140, 0.1) 0%, rgba(13, 17, 23, 0.35) 100%);
}

.ai-creator-guide--test_lab .ai-creator-guide-kicker,
.ai-creator-guide--accept_rebuild .ai-creator-guide-kicker {
  color: #3dd68c;
}

.ai-creator-guide--building {
  border-left-color: #f0b429;
  border-color: rgba(240, 180, 41, 0.28);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.1) 0%, rgba(13, 17, 23, 0.35) 100%);
}

.ai-creator-guide--building .ai-creator-guide-kicker {
  color: #f0b429;
}

.ai-section-e2e-steps--friendly {
  font-size: 0.95rem;
  line-height: 1.55;
}

.ai-section-e2e-steps--friendly .ai-section-e2e-check span {
  font-size: 0.95rem;
}

.ai-robo-parsed-steps {
  margin: 0 0 1rem;
}

.ai-robo-parsed-list {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ai-robo-step-num {
  font-family: var(--font-mono);
  color: #58a6ff;
  margin-right: 0.25rem;
}

.ai-robo-ipo-wrap {
  margin: 0 0 1rem;
}

.ai-robo-ipo-lede {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted, #8b949e);
  line-height: 1.45;
}

.ai-robo-ipo-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.ai-robo-ipo-head,
.ai-robo-ipo-row {
  display: grid;
  grid-template-columns: 2.5rem 5.5rem 1.1fr 1fr 1.1fr 1fr;
  gap: 0.5rem;
  align-items: start;
}

.ai-robo-ipo-head {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #8b949e);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.65);
}

.ai-robo-ipo-row {
  padding: 0.55rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(48, 54, 61, 0.55);
  background: rgba(13, 17, 23, 0.35);
}

.ai-robo-ipo-row.is-pass {
  border-color: rgba(61, 214, 140, 0.25);
}

.ai-robo-ipo-row.is-fail {
  border-color: rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.06);
}

.ai-robo-ipo-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

.ai-robo-ipo-row.is-pass .ai-robo-ipo-num {
  color: #3dd68c;
}

.ai-robo-ipo-row.is-fail .ai-robo-ipo-num {
  color: #f85149;
}

.ai-robo-ipo-cell strong {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #8b949e);
  margin-bottom: 0.2rem;
}

.ai-robo-learner-line {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted, #8b949e);
  font-style: italic;
}

.ai-robo-ipo-actual {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.ai-robo-ipo-tool {
  padding-top: 0.15rem;
}

.ai-sim-tool-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(48, 54, 61, 0.8);
  white-space: nowrap;
}

.ai-sim-tool-badge.is-linux {
  color: #79c0ff;
  border-color: rgba(121, 192, 255, 0.35);
  background: rgba(121, 192, 255, 0.08);
}

.ai-sim-tool-badge.is-playwright {
  color: #d2a8ff;
  border-color: rgba(210, 168, 255, 0.35);
  background: rgba(210, 168, 255, 0.08);
}

.ai-sim-tool-badge.is-fly {
  color: #ffa657;
  border-color: rgba(255, 166, 87, 0.35);
  background: rgba(255, 166, 87, 0.08);
}

.ai-sim-layers {
  margin: 0 0 1rem;
}

.ai-sim-layer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.ai-sim-layer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(48, 54, 61, 0.55);
  background: rgba(13, 17, 23, 0.35);
}

.ai-sim-layer--passed {
  border-color: rgba(61, 214, 140, 0.3);
}

.ai-sim-layer--failed {
  border-color: rgba(248, 81, 73, 0.35);
}

.ai-sim-layer-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #8b949e);
}

.ai-sim-layer-legend {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted, #8b949e);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .ai-robo-ipo-head {
    display: none;
  }
  .ai-robo-ipo-row {
    grid-template-columns: 2.5rem 1fr;
  }
  .ai-robo-ipo-tool {
    grid-column: 2;
  }
  .ai-robo-ipo-cell:nth-child(n + 4) {
    grid-column: 2;
  }
}

.ai-episode-proposal-callout {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
}

.ai-episode-proposal-cost {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 0.75rem;
}

.ai-episode-proposal-accepted {
  color: #3dd68c;
  font-size: 0.82rem;
  margin: 0 0 1rem;
}

.ai-episode-step-row.is-proposal-only {
  opacity: 0.92;
}

.ai-episode-step-locked {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.ai-episode-outline-meta h4 {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
}

.ai-episode-outline-diff {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.ai-episode-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.ai-episode-step-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.ai-episode-step-row.is-built {
  border-color: rgba(61, 214, 140, 0.35);
}

.ai-episode-step-row.is-in-progress {
  border-color: rgba(147, 112, 219, 0.45);
}

.ai-episode-step-status {
  font-size: 0.72rem;
  color: var(--purple, #b794f6);
  font-weight: 600;
}

.ai-fly-lab-callout .ai-fly-lab-id-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #9ca3af);
}

.ai-fly-lab-callout .ai-fly-lab-id-hint code {
  color: var(--cyan);
}

.ai-episode-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.ai-episode-step-num {
  color: var(--cyan);
  font-weight: 700;
}

.ai-episode-step-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.ai-episode-built-tag {
  color: #3dd68c;
  font-size: 0.72rem;
}

.ai-episode-step-objective {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.ai-episode-outline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ai-btn-sm {
  font-size: 0.72rem !important;
  padding: 0.45rem 0.75rem !important;
}

.ai-episode-step-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ai-episode-killchain {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.ai-progress-limits {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted, #8b949e);
  line-height: 1.45;
}

.ai-progress-slow-hint {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
}

.ai-progress-slow-hint.is-stuck {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.08);
}

.ai-lab-scope-note {
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted, #8b949e);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 8px;
}

.ai-proposal-review {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}

.ai-proposal-review-label {
  display: block;
  font-size: 0.72rem;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.ai-proposal-modifications {
  width: 100%;
  min-height: 4.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--fg);
  resize: vertical;
  margin-bottom: 0.55rem;
}

.ai-proposal-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ai-proposal-repropose {
  margin-top: 0.65rem;
}

.ai-proposal-review-hint {
  font-size: 0.65rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.ai-episode-fly-hint {
  font-size: 0.62rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.ai-fly-lab-callout {
  border: 1px solid rgba(0, 245, 212, 0.45);
  background: rgba(0, 245, 212, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ai-fly-lab-session {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.ai-section-rec-callout {
  border: 1px solid rgba(0, 245, 212, 0.35);
  background: rgba(0, 245, 212, 0.06);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ai-section-fuel-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.ai-section-head h4 {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--font-mono);
}

.ai-section-step-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  margin: 0;
}

.ai-section-objective {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.ai-section-beats-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-beat-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
}

.ai-beat-row.is-built {
  border-color: rgba(61, 214, 140, 0.35);
}

.ai-beat-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ai-beat-objective {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.ai-section-proposal-lede {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.ai-beat-row.has-proposal {
  padding-bottom: 0.85rem;
}

.ai-beat-proposal-detail {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ai-beat-proposal-block {
  font-size: 0.72rem;
  line-height: 1.45;
}

.ai-beat-proposal-block p {
  margin: 0.25rem 0 0;
  color: var(--fg);
}

.ai-beat-proposal-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cyan);
  margin-bottom: 0.2rem;
}

.ai-beat-proposal-docker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ai-beat-proposal-block ul,
.ai-beat-engage-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  color: var(--fg);
}

.ai-beat-proposal-block li,
.ai-beat-engage-list li {
  margin: 0.15rem 0;
}

.ai-beat-outcome p {
  color: var(--muted);
  font-style: italic;
}

.ai-beat-num {
  color: var(--cyan);
  font-family: var(--font-mono);
  margin-right: 0.35rem;
}

.ai-beat-mod {
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 0.35rem;
  color: var(--muted);
}

.ai-beat-built {
  color: #3dd68c;
  font-size: 0.68rem;
  margin-left: 0.35rem;
}

.ai-beat-failed {
  color: #f85149;
  font-size: 0.68rem;
  margin-left: 0.35rem;
  font-weight: 600;
}

.ai-section-build-failed-banner {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(248, 81, 73, 0.55);
  border-radius: 8px;
  background: rgba(248, 81, 73, 0.08);
}

.ai-section-build-failed-banner .ai-error-title {
  margin: 0 0 0.5rem;
  color: #f85149;
  font-weight: 700;
}

.ai-section-beat-saved-callout {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(61, 214, 140, 0.45);
  border-radius: 8px;
  background: rgba(61, 214, 140, 0.08);
}

.ai-section-beat-saved-callout .ai-beat-saved-title {
  margin: 0 0 0.35rem;
  color: #3dd68c;
}

.ai-section-beat-saved-callout .ai-beat-saved-lede {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
}

.ai-step-reports-wrap--failed {
  margin-top: 0.75rem;
  border-color: rgba(248, 81, 73, 0.35);
}

.ai-beat-pending {
  color: var(--muted);
  font-size: 0.68rem;
  margin-left: 0.35rem;
}

.ai-section-e2e-manual {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(48, 54, 61, 0.85);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.35);
}

.ai-section-e2e-lede {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted, #8b949e);
}

.ai-section-e2e-honest {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted, #8b949e);
}

.ai-section-e2e-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted, #8b949e);
}

.ai-section-e2e-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ai-section-lab-report-notice {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #f0b429;
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.25);
}

.ai-lab-fail-form {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(48, 54, 61, 0.65);
}

.ai-lab-fail-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted, #8b949e);
}

.ai-lab-fail-form textarea {
  width: 100%;
  margin-bottom: 0.65rem;
  font-size: 0.84rem;
}

.ai-lab-fail-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-btn-report-fail {
  border-color: rgba(240, 180, 41, 0.35);
}

.ai-progress-pipeline-lede {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted, #8b949e);
}

.ai-section-e2e-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.ai-section-e2e-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  cursor: pointer;
}

.ai-section-e2e-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.ai-section-e2e-ok {
  color: #3dd68c;
  font-size: 0.82rem;
  margin: 0.75rem 0;
}

.ai-section-step-complete {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(61, 214, 140, 0.35);
  border-radius: 8px;
  background: rgba(61, 214, 140, 0.06);
}

.ai-section-next-lede {
  font-size: 0.85rem;
  margin: 0.5rem 0 0.35rem;
}

.ai-section-next-steps {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.ai-section-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.ai-btn-next-kc {
  font-weight: 600;
}

.ai-beat-row.is-current {
  border-color: rgba(124, 156, 255, 0.55);
  background: rgba(124, 156, 255, 0.05);
}

.ai-beat-current {
  color: #7c9cff;
  font-size: 0.72rem;
  font-weight: 600;
}

.ai-beat-done-details {
  font-size: 0.82rem;
}

.ai-beat-done-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0;
}

.ai-beat-done-details summary::-webkit-details-marker {
  display: none;
}

.ai-beat-done-details[open] summary {
  margin-bottom: 0.5rem;
}

.ai-beat-row.is-collapsed .ai-beat-objective,
.ai-beat-row.is-collapsed .ai-beat-proposal-detail {
  opacity: 0.92;
}

.ai-section-build-next-callout {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(124, 156, 255, 0.35);
  border-radius: 8px;
  background: rgba(124, 156, 255, 0.06);
}

.ai-section-build-next-lede {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.ai-section-advanced-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.65rem 0 0;
}

.ai-btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent, #7c9cff);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.ai-section-actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.ai-section-add-beat {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0;
}

.ai-step-reports-wrap {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-step-reports-wrap--cm {
  padding: 0.75rem;
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.35);
}

.ai-step-reports-heading {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-build-diagnostics.is-pass summary,
.ai-student-test-report.is-pass summary {
  color: #3fb950;
}

.ai-student-test-report.is-fail summary {
  color: #f85149;
}

.ai-step-report {
  border: 1px solid rgba(48, 54, 61, 0.85);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.4);
  font-size: 0.82rem;
}

.ai-step-report summary {
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

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

.ai-step-report-tag {
  font-weight: 500;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.1rem 0.35rem;
  border: 1px solid rgba(139, 148, 158, 0.35);
  border-radius: 4px;
}

.ai-step-report-body {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid rgba(48, 54, 61, 0.5);
}

.ai-step-report-lede {
  margin: 0.65rem 0 0.5rem;
  color: var(--text-muted, #8b949e);
  font-size: 0.78rem;
  line-height: 1.45;
}

.ai-step-report-meta {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.ai-step-report-block {
  margin: 0.5rem 0;
}

.ai-step-report-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.ai-step-report-block ul {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.45;
}

.ai-step-report-inline {
  margin: 0;
  font-size: 0.78rem;
  word-break: break-word;
}

.ai-step-report-nested {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.ai-step-report-code {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  font-size: 0.7rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-step-verify-report.is-pass summary {
  color: #3dd68c;
}

.ai-step-verify-report.is-fail summary {
  color: #f85149;
}

.ai-verify-test-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-verify-test {
  margin: 0.5rem 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid transparent;
}

.ai-verify-test.is-pass {
  border-left-color: #3dd68c;
}

.ai-verify-test.is-fail {
  border-left-color: #f85149;
}

.ai-verify-test-head {
  font-size: 0.78rem;
  word-break: break-word;
}

.ai-verify-test-head code {
  font-size: 0.72rem;
}

.ai-verify-icon {
  font-weight: 700;
  margin-right: 0.25rem;
}

.ai-verify-exec {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.ai-verify-assert {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted, #8b949e);
  margin-top: 0.25rem;
}

.ai-verify-output {
  margin-top: 0.35rem;
  max-height: 8rem;
  overflow: auto;
}

.ai-robots-working-mount {
  margin: 0 0 1rem;
}

.ai-robots-working {
  border: 1px solid var(--border, #3d4450);
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.06);
  padding: 0.65rem 0.85rem;
}

.ai-robots-working > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text, #e8eaed);
}

.ai-robots-body {
  margin-top: 0.65rem;
  font-size: 0.92rem;
}

.ai-robots-lede {
  margin: 0 0 0.65rem;
  line-height: 1.45;
  color: var(--muted, #9aa0a6);
}

.ai-robots-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ai-robots-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.ai-robots-objective {
  margin: 0.35rem 0;
  color: var(--text, #e8eaed);
}

.ai-robots-gate {
  margin: 0.5rem 0 0.25rem;
}

.ai-robots-gate-label {
  color: var(--muted, #9aa0a6);
}

.ai-robots-hint {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--muted, #9aa0a6);
  font-style: italic;
}

.ai-robots-section {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border, #3d4450);
  padding-top: 0.45rem;
}

.ai-robots-section > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ai-robots-learner-list {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
  line-height: 1.45;
}

.ai-robots-components {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.45;
}

.ai-robots-muted {
  margin: 0.25rem 0 0;
  color: var(--muted, #9aa0a6);
  font-size: 0.85rem;
}

.ai-build-schematic-mount {
  margin: 0 0 1rem;
}

.ai-build-schematic {
  border: 1px solid var(--border, #3d4450);
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.05);
  padding: 0.65rem 0.85rem;
}

.ai-build-schematic > summary {
  cursor: pointer;
  font-weight: 600;
}

.ai-sch-body {
  margin-top: 0.65rem;
  font-size: 0.88rem;
}

.ai-sch-alert {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  line-height: 1.4;
}

.ai-sch-muted {
  color: var(--muted, #9aa0a6);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.ai-sch-svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0.5rem 0 0.75rem;
  display: block;
}

.ai-sch-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.ai-sch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.ai-sch-row-gates {
  justify-content: space-between;
}

.ai-sch-node {
  flex: 1 1 140px;
  max-width: 180px;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border, #3d4450);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.ai-sch-node-title {
  font-weight: 600;
  font-size: 0.82rem;
}

.ai-sch-node-sub {
  font-size: 0.72rem;
  color: var(--muted, #9aa0a6);
  line-height: 1.3;
  margin-top: 0.2rem;
}

.ai-sch-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
}

.ai-sch-ok {
  border-color: rgba(52, 211, 153, 0.45);
}
.ai-sch-active {
  border-color: rgba(96, 165, 250, 0.55);
  animation: ai-sch-pulse 1.6s ease-in-out infinite;
}
.ai-sch-fail,
.ai-sch-suspect {
  border-color: rgba(251, 191, 36, 0.55);
}
.ai-sch-node-suspect {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}

@keyframes ai-sch-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.2);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
  }
}

.ai-sch-section {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border, #3d4450);
  padding-top: 0.45rem;
}

.ai-sch-section > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ai-sch-uiux-lede {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted, #9aa0a6);
}

.ai-sch-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.ai-sch-route {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.12);
}

.ai-sch-ui-mock {
  border: 1px dashed var(--border, #3d4450);
  border-radius: 6px;
  padding: 0.5rem;
  max-width: 280px;
}

.ai-sch-mock-bar {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ai-sch-mock-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted, #9aa0a6);
}

.ai-sch-mock-btn {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.2);
  color: var(--text, #e8eaed);
}

.ai-sch-funnel {
  margin: 0.35rem 0 0 1rem;
  padding: 0;
  line-height: 1.45;
}

.ai-sch-funnel-num {
  display: inline-block;
  width: 1.1rem;
  font-weight: 700;
  color: var(--muted, #9aa0a6);
}

.ai-sch-learner-preview pre {
  font-size: 0.78rem;
  white-space: pre-wrap;
  margin: 0.35rem 0 0;
}

.ai-build-diagnostics-mount {
  margin-top: 1rem;
  max-height: min(420px, 55vh);
  overflow: auto;
}

.ai-build-diagnostics .ai-diag-body {
  max-height: none;
}

.ai-diag-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.ai-diag-entry {
  border-left: 3px solid var(--border, #3d4450);
  padding: 0.5rem 0 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0 6px 6px 0;
}

.ai-diag-entry.is-checker {
  border-left-color: #f87171;
}

.ai-diag-entry.is-maker {
  border-left-color: #60a5fa;
}

.ai-diag-entry.is-system {
  border-left-color: #34d399;
}

.ai-diag-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.ai-diag-role {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.ai-diag-ts {
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.65;
}

.ai-diag-summary {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-diag-files ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}

.ai-diag-test-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.78rem;
}

.ai-diag-test {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  align-items: baseline;
  padding: 0.15rem 0;
}

.ai-diag-test.is-pass .ai-diag-test-icon {
  color: #34d399;
}

.ai-diag-test.is-fail .ai-diag-test-icon {
  color: #f87171;
}

.ai-diag-test-detail {
  flex: 1 1 100%;
  opacity: 0.8;
  font-size: 0.75rem;
}

.ai-diag-feedback {
  margin-top: 0.4rem;
}

.ai-diag-feedback summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: #93c5fd;
}

.ai-diag-final-error p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  white-space: pre-wrap;
  color: #fca5a5;
}

.ai-diag-empty {
  font-size: 0.82rem;
  opacity: 0.75;
  margin: 0.5rem 0;
}

.ai-diag-qc {
  margin-top: 0.75rem;
}

.ai-diag-qc summary {
  cursor: pointer;
  font-size: 0.8rem;
}
