:root {
  --bg: #080d16;
  --bg-raised: #0b1220;
  --panel: #0f1726;
  --panel-strong: #131d2d;
  --line: #263449;
  --line-soft: rgba(51, 65, 85, 0.58);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --muted-dim: #64748b;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 80% -10%, rgba(124, 58, 237, 0.12), transparent 30rem),
    radial-gradient(circle at -10% 40%, rgba(6, 182, 212, 0.06), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.85rem;
  transform: translateY(-160%);
  border: 1px solid var(--cyan);
  background: var(--panel-strong);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 4.4rem;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 13, 22, 0.88);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.65);
  border-radius: 0.55rem;
  color: #ddd6fe;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.38), rgba(6, 182, 212, 0.14));
}
.brand-section {
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-weight: 560;
}
.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.live-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0.24rem rgba(52, 211, 153, 0.11);
}

main, footer {
  width: min(92vw, 92rem);
  margin-inline: auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
  gap: 3rem;
  align-items: end;
  padding: 5.2rem 0 3rem;
}
.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -0.035em; }
h1 {
  max-width: 13ch;
  margin-bottom: 1.15rem;
  font-size: clamp(2.4rem, 5.8vw, 5.6rem);
  line-height: 0.98;
}
h2 { margin-bottom: 0; font-size: 1.35rem; }
h3 { margin-bottom: 0.4rem; font-size: 1.12rem; }
.hero-copy {
  max-width: 49rem;
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}
.hero-signal {
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  background: rgba(15, 23, 38, 0.78);
}
.hero-signal.needs-input { border-left-color: var(--amber); }
.signal-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero-signal strong { display: block; font-size: 1rem; }
.hero-signal p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.82rem; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-soft);
  background: rgba(11, 18, 32, 0.7);
}
.status-cell {
  min-width: 0;
  padding: 1rem 1.1rem;
}
.status-cell + .status-cell { border-left: 1px solid var(--line-soft); }
.status-cell span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--muted-dim);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-cell strong {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
  gap: 1.2rem;
  padding: 1.2rem 0 5rem;
}
.timeline-panel, .rail-panel {
  border: 1px solid var(--line-soft);
  background: rgba(11, 18, 32, 0.62);
}
.timeline-panel { padding: 1.3rem; }
.rail-panel {
  align-self: start;
  position: sticky;
  top: 5.6rem;
  padding: 1.2rem;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.section-heading.compact { padding-bottom: 0.9rem; }
.section-note { color: var(--muted-dim); font-size: 0.72rem; }
.timeline {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.loading-card, .error-state {
  padding: 2rem;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}
.checkpoint {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}
.checkpoint-head {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  padding: 1rem 1.05rem 0.95rem;
}
.checkpoint-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.status-badge, .commit-chip {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 0.25rem;
  color: var(--green);
  background: rgba(52, 211, 153, 0.07);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-badge.in-progress { border-color: rgba(34, 211, 238, 0.35); color: var(--cyan); background: rgba(34, 211, 238, 0.07); }
.status-badge.blocked { border-color: rgba(251, 191, 36, 0.4); color: var(--amber); background: rgba(251, 191, 36, 0.07); }
.commit-chip { border-color: var(--line); color: var(--muted); background: var(--bg-raised); text-transform: none; }
.checkpoint time { color: var(--muted-dim); font-size: 0.7rem; }
.checkpoint-summary {
  max-width: 60rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}
.input-flag {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--amber);
  background: rgba(251, 191, 36, 0.07);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}
.checkpoint-body {
  display: grid;
  grid-template-columns: minmax(14rem, 0.9fr) minmax(15rem, 1.1fr);
  border-top: 1px solid var(--line-soft);
}
.checkpoint-shot {
  display: block;
  min-height: 14rem;
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
  background: #060a11;
}
.checkpoint-shot img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
  object-position: top left;
  transition: transform 180ms ease;
}
.checkpoint-shot:hover img { transform: scale(1.015); }
.evidence {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.1rem;
}
.evidence strong {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.evidence ul { display: grid; gap: 0.45rem; margin: 0; padding-left: 1.1rem; color: var(--text-soft); font-size: 0.8rem; }
.evidence li::marker { color: var(--cyan); }

.rails { display: grid; gap: 0; margin: 1rem 0 0; padding: 0; list-style: none; }
.rail {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.rail span { color: var(--text-soft); font-size: 0.8rem; font-weight: 650; }
.rail-state { color: var(--muted); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.rail-state.complete { color: var(--green); }
.rail-state.in-progress { color: var(--cyan); }
.protocol-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  margin-top: 1.2rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}
.protocol-icon { color: var(--amber); }
.protocol-note strong { font-size: 0.78rem; }
.protocol-note p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.72rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0 2.4rem;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-dim);
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 3.6rem; }
  .workbench { grid-template-columns: 1fr; }
  .rail-panel { position: static; }
  .checkpoint-body { grid-template-columns: 1fr; }
  .checkpoint-shot { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 620px) {
  .site-header { padding-inline: 1rem; }
  .header-meta { font-size: 0; }
  main, footer { width: min(92vw, 44rem); }
  .hero { padding-top: 2.7rem; }
  h1 { font-size: clamp(2.35rem, 14vw, 3.9rem); }
  .status-grid { grid-template-columns: 1fr; }
  .status-cell + .status-cell { border-left: 0; border-top: 1px solid var(--line-soft); }
  .status-cell strong { white-space: normal; }
  .timeline-panel { padding: 0.8rem; }
  .checkpoint-head { flex-direction: column; }
  .checkpoint-shot, .checkpoint-shot img { min-height: 11rem; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
