:root {
  color-scheme: dark;
  --bg: #04070f;
  --card: #0c1424;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #6df0ff;
  --accent-2: #ffe27a;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.6);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #11233d, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font-body);
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
}

.lead {
  margin-top: 0.75rem;
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.metric {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(109, 240, 255, 0.16), rgba(255, 255, 255, 0.05));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.metric strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.4rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: normal;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.card {
  background: rgba(12, 20, 36, 0.85);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.card h2 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
}

.definition-grid dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.definition-grid dd {
  margin: 0.2rem 0 0;
  font-size: 1rem;
}

.hint {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  display: inline-block;
}

.phase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.phase-table th,
.phase-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.phase-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.phase-table td.state-completed {
  color: #7ef59a;
}

.phase-table td.state-running {
  color: #ffe27a;
}

.phase-table td.state-failed {
  color: #ff8b8b;
}

.phase-table td.state-pending {
  color: rgba(255, 255, 255, 0.5);
}

.artefacts ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.artefacts a {
  color: var(--accent);
  font-weight: 600;
}

.logs pre {
  max-height: 320px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0.75rem;
  padding: 1rem;
  font-family: "JetBrains Mono", "SFMono-Regular", monospace;
  font-size: 0.85rem;
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  body {
    padding: 1.5rem 1rem 3rem;
  }
  .hero {
    align-items: flex-start;
  }
}
