:root {
  color-scheme: dark;
  --bg: #212121;
  --panel: #2f2f2f;
  --panel-soft: #242424;
  --text: #ececec;
  --muted: #b4b4b4;
  --muted-strong: #d7d7d7;
  --line: #3d3d3d;
  --line-strong: #565656;
  --accent: #19c37d;
  --accent-soft: rgba(25, 195, 125, 0.18);
  --building: #f59e0b;
  --building-soft: rgba(245, 158, 11, 0.16);
  --danger: #ffb4a8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  font-size: 90%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.roadmap-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.roadmap-hero {
  display: grid;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.roadmap-hero nav {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 24px;
}

.hero-row h1,
.hero-row p {
  margin: 0;
}

.hero-row h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-row p {
  max-width: 560px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.version-card {
  width: min(100%, 220px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  text-align: left;
}

.version-card span,
.version-card small {
  display: block;
}

.version-card span {
  font-size: 1.45rem;
  font-weight: 800;
}

.version-card small {
  margin-top: 2px;
  color: var(--muted);
}

.roadmap-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 0;
}

.roadmap-totals div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.roadmap-totals dt,
.roadmap-totals dd {
  margin: 0;
}

.roadmap-totals dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.roadmap-totals dd {
  margin-top: 3px;
  font-size: 1.12rem;
  font-weight: 800;
}

.commit-graph {
  position: relative;
  margin-top: 28px;
}

.product-roadmap {
  position: relative;
  margin-top: 46px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.section-heading {
  max-width: 580px;
  margin-bottom: 22px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  margin-top: 6px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0;
}

.section-heading > p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.graph-list {
  display: grid;
}

.commit-node {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 14px;
}

.commit-node::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  width: 2px;
  background: var(--line);
}

.commit-node.is-available::before {
  background: var(--accent);
}

.commit-node:last-child {
  padding-bottom: 0;
}

.commit-node:last-child::before {
  bottom: calc(100% - 27px);
}

.commit-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: 18px auto 0;
  border: 3px solid var(--bg);
  border-radius: 999px;
  background: var(--line-strong);
  box-shadow: 0 0 0 2px var(--line);
}

.commit-node.is-available .commit-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(25, 195, 125, 0.7);
}

.commit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.commit-node.is-available .commit-card {
  border-color: rgba(25, 195, 125, 0.45);
}

.commit-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px;
}

.commit-version {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 750;
}

.commit-card h2 {
  margin: 3px 0 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.commit-status {
  justify-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.is-available .commit-status {
  border-color: rgba(25, 195, 125, 0.6);
  color: var(--muted-strong);
  background: var(--accent-soft);
}

.is-building .commit-status {
  border-color: rgba(245, 158, 11, 0.7);
  color: #ffd89a;
  background: var(--building-soft);
  animation: building-pulse 2.8s ease-in-out infinite;
}

@keyframes building-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
}

.commit-description {
  margin: 0;
}

.commit-description {
  margin-top: 10px;
  color: var(--text);
  line-height: 1.5;
}

.commit-hours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  gap: 8px;
  margin: 12px 0 0;
}

.commit-hours div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--panel-soft);
}

.commit-hours dt,
.commit-hours dd {
  margin: 0;
}

.commit-hours dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.commit-hours dd {
  margin-top: 2px;
  font-weight: 800;
}

.load-state {
  margin: 0 0 0 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: var(--panel);
}

.load-state.error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .roadmap-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 18px;
  }

  .hero-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .version-card {
    width: 100%;
  }

  .roadmap-totals,
  .commit-hours {
    grid-template-columns: 1fr;
  }
}
