:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --card-bg: #171a21;
  --border: #2a2e38;
  --text: #e6e8ec;
  --muted: #8a8f9a;
  --accent: #4f8cff;
  --pass: #3ecf8e;
  --fail: #ff5d5d;
  --flaky: #f5a623;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --card-bg: #ffffff;
    --border: #e0e2e7;
    --text: #1a1c20;
    --muted: #5c6270;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.loading,
.app-error {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

.status-header {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.status-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-header h1 {
  font-size: 1.25rem;
  margin: 0;
}

.phase-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.phase-badge--in_progress {
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
}

.phase-badge--completed {
  background: rgba(62, 207, 142, 0.15);
  color: var(--pass);
}

.phase-badge--blocked {
  background: rgba(255, 93, 93, 0.15);
  color: var(--fail);
}

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

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.progress-label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.current-task,
.last-update {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.card h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.card h3 {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.roadmap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.roadmap-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.roadmap-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}

.roadmap-item--completed .roadmap-dot {
  background: var(--pass);
}

.roadmap-item--current .roadmap-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

.roadmap-item--planned .roadmap-dot {
  background: var(--border);
}

.roadmap-phase {
  flex: 1;
}

.roadmap-status {
  font-size: 0.75rem;
  color: var(--muted);
}

.kv-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 0.75rem;
  margin: 0;
  font-size: 0.9rem;
}

.kv-list dt {
  color: var(--muted);
}

.kv-list dd {
  margin: 0;
}

.result-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
}

.result-badge--pass {
  background: rgba(62, 207, 142, 0.15);
  color: var(--pass);
}

.result-badge--fail {
  background: rgba(255, 93, 93, 0.15);
  color: var(--fail);
}

.result-badge--flaky {
  background: rgba(245, 166, 35, 0.15);
  color: var(--flaky);
}

.result-badge--neutral {
  background: var(--border);
  color: var(--text);
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.blocker-list,
.next-actions-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blocker-list li {
  color: var(--flaky);
}

.next-actions-list {
  margin-bottom: 0;
}
