:root {
  --bg: #07111f;
  --bg-2: #020817;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(10, 17, 32, 0.96);
  --panel-soft: rgba(15, 23, 42, 0.6);
  --panel-border: rgba(148, 163, 184, 0.16);
  --panel-border-strong: rgba(96, 165, 250, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --primary-2: #22d3ee;
  --success: #34d399;
  --warning: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 32%),
    linear-gradient(180deg, #020817 0%, #07111f 100%);
}

a, button { color: inherit; }
a { text-decoration: none; }
button {
  font: inherit;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar,
.brand,
.topbar-actions,
.section-heading,
.hero,
.hero-metrics,
.window-chrome,
.workspace-grid,
.panel-header,
.editor-tabs,
.editor-actions,
.editor-meta,
.bottom-tabs,
.sidebar-toolbar,
.terminal-toolbar,
.preview-browser-bar,
.stat-list li {
  display: flex;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}

.eyebrow,
.section-tag,
.muted-label,
.small-status,
.status-pill,
.mini-badge {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.eyebrow,
.muted-label,
.small-status {
  color: var(--muted);
}

.brand h1,
.hero h2,
.feature-card h3,
.list-card h3,
.panel-header h3 {
  margin: 0;
}

.brand h1 { font-size: 24px; }

.topbar-actions {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.24);
}

.status-pill.warning {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
}

.status-pill.danger {
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.24);
}

.card,
.panel-section {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.workspace-page {
  display: grid;
  gap: 24px;
}

.hero {
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
}

.hero-compact {
  align-items: center;
}

.hero-copy { flex: 1.4; }
.hero-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.hero-metrics {
  flex: 1;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.section-tag { color: #7dd3fc; margin-bottom: 12px; }
.hero h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  margin-bottom: 16px;
}
.hero-text {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 16px;
}

.metric-card {
  min-width: 150px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.metric-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.metric-card strong {
  font-size: 18px;
  color: #f8fafc;
}

.btn {
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 600;
}
.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.03);
}
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.18);
}
.btn.compact {
  padding: 10px 14px;
}

.workspace-shell {
  padding: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.95));
  border-color: var(--panel-border-strong);
}

.window-chrome {
  gap: 8px;
  margin-bottom: 16px;
}
.window-chrome span,
.preview-browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 16px;
  min-height: 760px;
}

.panel-section {
  border-radius: 20px;
  padding: 16px;
  background: rgba(9, 15, 28, 0.82);
  box-shadow: none;
}

.panel-header {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header.tight {
  margin-bottom: 10px;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(9, 15, 28, 0.96), rgba(9, 15, 28, 0.8));
  padding-bottom: 12px;
}

.mini-badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.08);
}
.mini-badge.online {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(52, 211, 153, 0.08);
}
.mini-badge.pulse {
  animation: pulse 2.4s infinite;
}

.sidebar-toolbar,
.editor-tabs,
.bottom-tabs {
  gap: 8px;
  flex-wrap: wrap;
}

.mini-action,
.tab,
.bottom-tab,
.file-item,
.project-item {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.mini-action,
.bottom-tab,
.tab {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  font-size: 13px;
}

.mini-action.active,
.bottom-tab.active,
.tab.active {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.18);
}

.project-sidebar,
.run-sidebar {
  overflow: auto;
}

.project-list,
.file-tree,
.run-cards {
  display: grid;
  gap: 10px;
}

.project-group,
.file-group {
  display: grid;
  gap: 8px;
}

.project-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.project-item.active {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.18);
}
.project-item small,
.file-item small,
.run-card p,
.status-card span {
  color: var(--muted);
}
.project-item strong,
.file-item strong,
.status-card strong,
.run-card strong {
  display: block;
}

.file-group-title {
  padding: 10px 12px 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

.file-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.file-item:hover,
.project-item:hover,
.run-card:hover,
.tab:hover,
.bottom-tab:hover,
.mini-action:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.2);
}
.file-item.active {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.2);
}

.editor-workbench {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  gap: 14px;
  min-width: 0;
}

.editor-tabs {
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab {
  white-space: nowrap;
}

.editor-surface,
.bottom-panel,
.status-overview,
.run-card,
.preview-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.72);
}

.editor-surface {
  overflow: hidden;
}

.editor-meta {
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-view,
#terminal-output,
#logs-output {
  margin: 0;
  padding: 18px;
  color: #d7e3f4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 280px;
}

.bottom-panel {
  padding: 14px;
}

.bottom-content {
  margin-top: 12px;
}

.panel-view {
  display: none;
}
.panel-view.active {
  display: block;
}

.terminal-view,
.logs-view {
  overflow: hidden;
}

.terminal-toolbar {
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}
.terminal-path {
  margin-left: auto;
  color: var(--muted);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #475569;
}
.terminal-dot.success {
  background: var(--success);
}

.preview-card {
  overflow: hidden;
}
.preview-browser-bar {
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.preview-url {
  margin-left: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}
.preview-body {
  padding: 18px;
}
.preview-pane {
  min-height: 220px;
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.08), rgba(34, 211, 238, 0.04));
  border: 1px solid rgba(96, 165, 250, 0.14);
}
.preview-title {
  font-weight: 700;
  margin-bottom: 10px;
}
.preview-pane p,
.preview-pane li {
  color: #dbe7f5;
  line-height: 1.7;
}

.status-overview {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.model-panel,
.cpa-test-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(12px);
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.glass-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.glass-input:focus {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.glass-input option {
  background: #0f172a;
  color: var(--text);
}

.glass-textarea {
  resize: vertical;
  min-height: 110px;
  font: inherit;
  line-height: 1.6;
}

.inline-meta-row,
.panel-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.response-panel {
  min-height: 128px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.58);
  color: #dbe7f5;
  white-space: pre-wrap;
  line-height: 1.7;
}

.response-panel.is-error {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(127, 29, 29, 0.16);
}

.response-panel.is-loading {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.24);
}

.run-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.run-card.is-complete {
  border-color: rgba(52, 211, 153, 0.24);
}
.run-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.run-card p {
  margin: 0;
  line-height: 1.6;
}

.run-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.run-status.running {
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}
.run-status.ready {
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}
.run-status.queued {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.grid {
  display: grid;
  gap: 20px;
}
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card,
.list-card { padding: 24px; }
.feature-card p,
.list-card p {
  color: #cbd5e1;
  line-height: 1.7;
}
.feature-card h3,
.list-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
}
.supporting-grid {
  margin-bottom: 8px;
}

.route-card {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.route-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sandbox & Session sections */
.sandbox-section,
.session-section {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.sandbox-item,
.session-item {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.5;
}

.sandbox-item .sandbox-id,
.session-item .session-id {
  font-weight: 600;
  color: var(--primary, #60a5fa);
}

.sandbox-item .sandbox-status,
.session-item .session-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 6px;
}

.sandbox-status.ready,
.session-status.active { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.sandbox-status.running { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.sandbox-status.expired,
.sandbox-status.terminated { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }
.sandbox-status.failed,
.sandbox-status.error,
.sandbox-status.timed_out,
.sandbox-status.rejected { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.sandbox-status.patching { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.session-status.deleted { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }

.sandbox-meta,
.session-meta {
  color: var(--muted, #94a3b8);
  font-size: 11px;
  margin-top: 2px;
}

/* ── Agent Workflow ────────────────────────────────── */
.agent-workflow-section {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.workflow-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.workflow-prompt-input {
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
  font: inherit;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workflow-prompt-input:focus {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.workflow-prompt-input::placeholder {
  color: var(--muted);
}

.workflow-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.workflow-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.72);
  display: grid;
  gap: 8px;
}

.workflow-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workflow-card-header .wf-id {
  font-weight: 600;
  font-size: 12px;
  color: var(--primary);
}

.workflow-card-header .wf-prompt {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

/* Workflow status badges */
.workflow-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.workflow-status-draft {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.workflow-status-running {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  animation: wf-pulse-blue 2s infinite;
}

.workflow-status-paused {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.workflow-status-completed {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.workflow-status-failed {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

/* Workflow step rows */
.workflow-steps {
  display: grid;
  gap: 4px;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
}

.workflow-step .step-role {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-role-planner {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.step-role-implementer {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.step-role-reviewer {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.workflow-step .step-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.step-status-pending {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
}

.step-status-running {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  animation: wf-pulse-blue 1.8s infinite;
}

.step-status-completed {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.step-status-completed::before {
  content: '✓ ';
}

.step-status-failed {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.step-status-awaiting_approval {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.workflow-step .step-output {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.workflow-step-actions .btn-approve,
.workflow-step-actions .btn-reject {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.workflow-step-actions .btn-approve {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.workflow-step-actions .btn-approve:hover {
  background: rgba(52, 211, 153, 0.3);
}

.workflow-step-actions .btn-reject {
  background: transparent;
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}

.workflow-step-actions .btn-reject:hover {
  background: rgba(248, 113, 113, 0.12);
}

.workflow-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.workflow-card-actions .btn-start {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: none;
}

.workflow-card-actions .btn-start:hover {
  opacity: 0.9;
}

.workflow-card-actions .btn-cancel {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #f87171;
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.workflow-card-actions .btn-cancel:hover {
  background: rgba(248, 113, 113, 0.1);
}

@keyframes wf-pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(96, 165, 250, 0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.1); }
  50% { box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); }
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .run-sidebar {
    grid-column: 1 / -1;
  }

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

@media (max-width: 980px) {
  .topbar,
  .hero,
  .hero-metrics,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-grid,
  .three-up,
  .two-up,
  .run-cards {
    grid-template-columns: 1fr;
  }

  .project-sidebar,
  .run-sidebar,
  .editor-workbench {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 1440px); }
  .hero,
  .feature-card,
  .list-card,
  .workspace-shell,
  .panel-section {
    padding: 14px;
  }
  .hero h2 { font-size: 32px; }
  .status-card,
  .run-card-header {
    flex-direction: column;
    align-items: start;
  }
}
