:root {
  color-scheme: dark;
  --ink: #f4f6ef;
  --muted: #a7afa5;
  --ground: #080b09;
  --panel: #0e1310;
  --line: #293129;
  --accent: #b9f447;
  --danger: #ff8a76;
  --warning: #f5c96a;
  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;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 8%, rgba(185, 244, 71, 0.09), transparent 24rem),
    var(--ground);
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

.masthead {
  min-height: 100svh;
  padding: clamp(1.5rem, 4vw, 4rem) clamp(1.5rem, 6vw, 6rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-bottom: 1px solid var(--line);
}

.topline,
.hero-meta,
.hero-actions,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.topline {
  font: 700 0.75rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topline a {
  text-decoration: none;
}

.topline > div {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  color: var(--muted);
}

.wordmark {
  color: var(--accent);
}

.hero-copy {
  align-self: center;
  max-width: 76rem;
  padding: 5rem 0;
}

.hero-copy h1 {
  max-width: 13ch;
  margin: 1.25rem 0 2rem;
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 760;
  letter-spacing: -0.075em;
  line-height: 0.83;
}

.hero-deck {
  max-width: 43rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.5;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 2.5rem;
}

.primary-action {
  display: inline-flex;
  padding: 0.9rem 1.15rem;
  color: #10150e;
  background: var(--accent);
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-action:hover {
  background: #d0ff70;
  transform: translateY(-2px);
}

.hero-meta {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 0.78rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.freshness {
  display: flex;
  gap: 1rem;
}

main,
footer {
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 6vw, 6rem);
}

section {
  margin-bottom: clamp(7rem, 14vw, 13rem);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) 3fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font: 700 0.72rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h2 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.8rem, 6.2vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.5rem);
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.review-order {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: review;
  border-top: 1px solid var(--line);
}

.review-order li {
  counter-increment: review;
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 160ms ease, color 160ms ease;
}

.review-order li:hover {
  padding-left: 0.7rem;
  color: var(--accent);
}

.review-order li::before {
  content: counter(review, decimal-leading-zero);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.review-order a {
  font-size: clamp(1.3rem, 2.5vw, 2.25rem);
  text-decoration: none;
}

.review-order span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 1.2rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: rgba(185, 244, 71, 0.035);
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
}

.status.success,
.evidence-links a {
  color: var(--accent);
}

.status.failure {
  color: var(--danger);
}

.status.warning,
.freshness .warning {
  color: var(--warning);
}

.status.work-in-progress,
.status.missing {
  color: var(--warning);
}

.evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.discipline-list {
  border-top: 1px solid var(--line);
}

.discipline-list article {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.discipline-list span {
  color: var(--accent);
  font: 0.75rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.discipline-list p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.case-study {
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.case-study-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 7vw, 8rem);
}

.case-study-grid > p,
.closing p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

dl {
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.closing {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
  padding-top: 4rem;
  border-top: 1px solid var(--line);
}

.closing > div {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 3rem;
  margin-top: 2rem;
}

.closing p {
  max-width: 40rem;
}

footer {
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 760px) {
  .masthead {
    min-height: 92svh;
  }

  .topline > div a:not(:last-child) {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(3.5rem, 18vw, 6rem);
  }

  .hero-actions,
  .hero-meta,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading,
  .case-study-grid,
  .closing,
  .discipline-list article {
    grid-template-columns: 1fr;
  }

  .closing > div {
    grid-column: 1;
    align-items: flex-start;
    flex-direction: column;
  }

  .review-order li {
    grid-template-columns: 3rem 1fr;
  }

  .review-order span {
    grid-column: 2;
  }

  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1.5rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    display: grid;
    gap: 0.3rem;
    padding: 0;
    border: 0;
  }

  td::before {
    color: var(--muted);
    font: 0.62rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  td:nth-child(1),
  td:nth-child(7) {
    grid-column: 1 / -1;
  }

  td:nth-child(1) {
    font-size: 1.25rem;
    font-weight: 700;
  }

  td:nth-child(2)::before {
    content: "Status";
  }

  td:nth-child(3)::before {
    content: "Latest CI";
  }

  td:nth-child(4)::before {
    content: "Median runtime";
  }

  td:nth-child(5)::before {
    content: "Release";
  }

  td:nth-child(6)::before {
    content: "Activity";
  }

  td:nth-child(7)::before {
    content: "Evidence";
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
