:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #5f6f7f;
  --line: #d8e0e8;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --good: #067647;
  --warn: #b7791f;
  --bad: #b42318;
  --shadow: 0 16px 38px rgba(23, 32, 42, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.demo-top {
  padding: 28px 32px;
  background: #111827;
  color: #f8fafc;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  font-size: 36px;
  line-height: 1.1;
}

.subtitle {
  margin-top: 10px;
  color: #cbd5e1;
  max-width: 880px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  text-decoration: none;
  font-size: 14px;
}

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

main {
  padding: 24px 32px 40px;
}

.kpi-row,
.persona-grid,
.tool-grid,
.prompt-grid,
.file-grid,
.next-grid {
  display: grid;
  gap: 14px;
}

.kpi-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

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

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

.prompt-grid,
.file-grid,
.seed-grid,
.next-grid,
.evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.card,
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.panel-head p,
.muted {
  color: var(--muted);
  margin-top: 4px;
}

.card,
.kpi {
  padding: 14px;
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.flow-step {
  min-height: 220px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
}

.flow-step h3,
.card h3 {
  font-size: 17px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.timeline-item > span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  color: #155eef;
}

.timeline-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.pill-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.pill.good {
  background: #dcfae6;
  color: var(--good);
}

.pill.warn {
  background: #fef0c7;
  color: var(--warn);
}

.pill.bad {
  background: #fee4e2;
  color: var(--bad);
}

.chain {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chain span {
  padding: 9px 11px;
  border-radius: 6px;
  background: #eef2f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.split-section h3 {
  margin: 0 0 10px;
}

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

.boundary-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

@media (max-width: 980px) {
  .demo-top,
  .kpi-row,
  .persona-grid,
  .tool-grid,
  .prompt-grid,
  .file-grid,
  .seed-grid,
  .next-grid,
  .evidence-grid,
  .boundary-list {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }
}
