:root {
  color-scheme: dark;
  --ink: #0a0f17;
  --ink-2: #111a26;
  --panel: rgba(17, 28, 42, 0.78);
  --paper: #f5f8fc;
  --muted: #a3b1c2;
  --line: rgba(190, 210, 235, 0.16);
  --accent: #5ad1c8;
  --accent-2: #f5b14b;
  --blue: #3b82f6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --content-max: 1180px;
  --page-gutter: clamp(28px, 4vw, 52px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 30;
  transform: translateY(-140%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(10, 15, 23, 0.92), rgba(10, 15, 23, 0));
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(10, 15, 23, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(90, 209, 200, 0.4);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(90, 209, 200, 0.22), rgba(245, 177, 75, 0.18));
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 26px);
  color: rgba(245, 248, 252, 0.76);
  font-size: 0.93rem;
}

.nav-links a {
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #ffffff;
}

/* hero */

.hero {
  position: relative;
  display: grid;
  min-height: 88vh;
  overflow: hidden;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 15, 23, 0.95) 0%, rgba(10, 15, 23, 0.84) 42%, rgba(10, 15, 23, 0.28) 74%),
    linear-gradient(180deg, rgba(10, 15, 23, 0.7), rgba(10, 15, 23, 0.15) 45%, var(--ink) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  align-self: end;
  width: min(1260px, 100%);
  padding: 150px clamp(18px, 5vw, 72px) 84px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1040px;
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 6.4vw, 6rem);
  line-height: 0.92;
  text-transform: uppercase;
}

h1 span {
  display: block;
  max-width: 860px;
  margin-top: 18px;
  color: rgba(245, 248, 252, 0.86);
  font-size: clamp(1.2rem, 2.6vw, 2.3rem);
  line-height: 1.1;
  text-transform: none;
}

.hero-copy {
  max-width: 860px;
  color: rgba(245, 248, 252, 0.84);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 900px;
  margin: 26px 0 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 248, 252, 0.18);
  border-radius: 999px;
  background: rgba(10, 15, 23, 0.55);
  padding: 9px 14px;
  color: rgba(245, 248, 252, 0.88);
  font-size: 0.95rem;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(245, 248, 252, 0.22);
  border-radius: 8px;
  padding: 12px 18px;
  background: rgba(245, 248, 252, 0.08);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.button.primary {
  border-color: rgba(90, 209, 200, 0.55);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #04121a;
}

.button.muted-action {
  cursor: not-allowed;
  opacity: 0.68;
}

.button.muted-action small {
  font-weight: 500;
  opacity: 0.85;
}

/* stats band */

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(var(--content-max), calc(100% - var(--page-gutter)));
  margin: 30px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.stat {
  min-height: 150px;
  padding: clamp(22px, 3vw, 32px);
  background: rgba(14, 23, 36, 0.94);
}

.stat strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
}

.stat span {
  color: var(--muted);
  line-height: 1.55;
}

/* sections */

.section {
  width: min(var(--content-max), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 116px) 0 0;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 28px;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(30px, 7vw, 96px);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 3.8vw, 3.8rem);
  line-height: 1.04;
}

h3 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 1.08rem;
}

.text-block p,
.lede,
.card-grid p,
.table-copy p,
.notes p,
figcaption,
.table-note {
  color: var(--muted);
  line-height: 1.72;
}

.lede {
  max-width: 900px;
  font-size: 1.05rem;
}

.text-block p:last-child {
  margin-bottom: 0;
}

/* figure */

.full-figure {
  width: min(var(--content-max), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 116px) 0 0;
}

.full-figure .figure-copy {
  max-width: 900px;
  margin: 0 0 26px;
}

.figure-frame {
  margin: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(90, 209, 200, 0.08)),
    rgba(14, 23, 36, 0.7);
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.28);
}

.figure-frame img {
  width: 100%;
  height: auto;
  background: #ffffff;
}

.example-stack {
  display: grid;
  gap: 28px;
}

.bench-frame {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f17;
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.28);
}

.bench-frame iframe {
  display: block;
  width: 100%;
  height: 1880px;
  border: 0;
  background: #0a0f17;
}

@media (max-width: 560px) {
  .bench-frame iframe {
    height: 2580px;
  }
}

figcaption {
  border-top: 1px solid rgba(245, 248, 252, 0.12);
  padding: 14px 16px 16px;
  background: rgba(10, 15, 23, 0.72);
  font-size: 0.92rem;
}

/* cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid article,
.code-panel,
.notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.card-grid article {
  padding: 24px;
}

.card-grid p:last-child {
  margin-bottom: 0;
}

.step {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.headline {
  display: block;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
}

.headline small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.55em;
  font-weight: 600;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.chip-row li {
  border: 1px solid rgba(90, 209, 200, 0.45);
  border-radius: 999px;
  background: rgba(90, 209, 200, 0.1);
  padding: 7px 12px;
  color: rgba(245, 248, 252, 0.92);
  font-size: 0.9rem;
}

.severity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.severity li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 23, 36, 0.7);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.severity strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 1.3rem;
}

.subsection {
  margin-top: 36px;
}

.notes {
  margin-top: 22px;
  padding: 22px 24px;
}

.notes h3 {
  margin-bottom: 8px;
}

.notes p:last-child {
  margin-bottom: 0;
}

/* tables */

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.table-copy {
  padding: 22px 22px 6px;
}

.table-copy p {
  margin-bottom: 14px;
}

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

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  color: rgba(245, 248, 252, 0.84);
  font-size: 0.88rem;
}

th,
td {
  border-top: 1px solid rgba(245, 248, 252, 0.1);
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  vertical-align: baseline;
}

thead th {
  color: #ffffff;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

thead th.span {
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(90, 209, 200, 0.35);
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody th {
  color: rgba(245, 248, 252, 0.88);
  font-weight: 700;
}

tbody .group-row th {
  padding-top: 16px;
  color: var(--muted);
  font-style: italic;
  font-weight: 600;
}

.ours-row {
  background: linear-gradient(90deg, rgba(90, 209, 200, 0.14), rgba(59, 130, 246, 0.06));
}

.ours-row th,
.ours-row td {
  color: #ffffff;
}

.ci {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.8em;
}

.table-note {
  margin: 0;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(245, 248, 252, 0.1);
  font-size: 0.88rem;
}

/* citation */

.citation {
  padding-bottom: clamp(70px, 9vw, 116px);
}

.code-panel {
  position: relative;
  overflow: hidden;
}

.copy-button {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 1px solid rgba(245, 248, 252, 0.18);
  border-radius: 7px;
  background: rgba(245, 248, 252, 0.08);
  color: #ffffff;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 26px;
  color: #dbeeff;
  font-size: 0.94rem;
  line-height: 1.6;
}

/* footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(18px, 4vw, 54px);
  color: rgba(245, 248, 252, 0.62);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

/* responsive */

@media (max-width: 1080px) {
  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .stats-band,
  .split,
  .card-grid,
  .card-grid.four {
    grid-template-columns: 1fr;
  }

  .severity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 72vh;
  }
}

@media (max-width: 700px) {
  table {
    min-width: 760px;
    font-size: 0.78rem;
  }

  th,
  td {
    padding: 8px 8px;
  }
}

@media (max-width: 560px) {
  .hero-inner {
    padding: 112px 18px 64px;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(10, 15, 23, 0.86), rgba(10, 15, 23, 0.5) 36%, var(--ink) 100%),
      linear-gradient(90deg, rgba(10, 15, 23, 0.92), rgba(10, 15, 23, 0.42));
  }

  .pill,
  .button {
    width: 100%;
  }

  .stats-band {
    width: min(100% - 28px, var(--content-max));
    margin-top: 18px;
  }

  .stat {
    min-height: auto;
  }

  .severity {
    grid-template-columns: 1fr;
  }

  pre {
    padding: 66px 18px 22px;
    font-size: 0.82rem;
  }
}

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