:root {
  color-scheme: light dark;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-muted: #f0f4f2;
  --line: #d9e1dd;
  --line-strong: #bac7c1;
  --text: #132019;
  --muted: #617068;
  --accent: #08734a;
  --accent-soft: #e1f3e9;
  --accent-text: #ffffff;
  --warm: #8a5a00;
  --code-bg: #17211c;
  --code-line: #34433b;
  --code-text: #edf5f0;
  --code-muted: #92a29a;
  --radius: 12px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1110;
    --surface: #141a17;
    --surface-muted: #19211d;
    --line: #2b3530;
    --line-strong: #46534d;
    --text: #edf3ef;
    --muted: #9aa8a1;
    --accent: #83e9b6;
    --accent-soft: #1c392b;
    --accent-text: #09140e;
    --warm: #f1c26d;
    --code-bg: #101512;
    --code-line: #2c3932;
    --code-text: #edf5f0;
    --code-muted: #8d9b94;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  transform: translateY(-150%);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header,
.hero,
.metrics,
.section,
.cta-section,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  padding: 22px 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.brand-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 26px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

nav a:hover,
footer a:hover {
  color: var(--accent);
}

.nav-cta {
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
}

.hero {
  position: relative;
  display: grid;
  min-height: 610px;
  padding: 94px 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 64px;
  align-items: center;
}

.hero-glow {
  display: none;
}

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(3.2rem, 6.7vw, 6rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.hero-lede {
  max-width: 610px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
}

.hero-actions {
  display: flex;
  margin-top: 32px;
  gap: 11px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button-primary:hover {
  opacity: 0.88;
}

.button-ghost {
  border: 1px solid var(--line-strong);
}

.button-ghost:hover {
  border-color: var(--accent);
}

.terminal-card {
  overflow: hidden;
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--mono);
}

.terminal-bar {
  display: flex;
  height: 43px;
  padding: 0 15px;
  align-items: center;
  border-bottom: 1px solid var(--code-line);
  gap: 6px;
}

.terminal-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--code-line);
}

.terminal-bar span:first-child {
  background: #c66f69;
}

.terminal-bar span:nth-child(2) {
  background: #c49b58;
}

.terminal-bar span:nth-child(3) {
  background: #70a97f;
}

.terminal-bar p {
  margin: 0 auto 0 9px;
  color: var(--code-muted);
  font-size: 0.68rem;
}

.terminal-body {
  padding: 24px;
  font-size: 0.76rem;
  line-height: 1.8;
}

.terminal-body p,
.terminal-body dl,
.terminal-body dt,
.terminal-body dd {
  margin: 0;
}

.prompt,
.success,
.file {
  color: #83e9b6;
}

.muted,
.terminal-body dt,
.dim {
  color: var(--code-muted);
}

.dim {
  margin-left: 9px;
}

.terminal-rule {
  height: 1px;
  margin: 16px 0 12px;
  background: var(--code-line);
}

.terminal-body dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.metrics {
  display: grid;
  border-block: 1px solid var(--line);
  grid-template-columns: repeat(4, 1fr);
}

.metric {
  padding: 27px 24px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.4rem;
}

.metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.79rem;
}

.section {
  padding: 108px 0;
}

.section-heading {
  max-width: 660px;
  margin-bottom: 48px;
}

.section-heading h2,
.artifact-copy h2,
.cta-section h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.2vw, 3.7rem);
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.section-heading > p:last-child,
.artifact-copy > p,
.cta-section > p:not(.eyebrow) {
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.pipeline-section {
  padding-block: 82px;
}

.pipeline-section .section-heading {
  margin-bottom: 32px;
}

.pipeline {
  display: grid;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  grid-template-columns: repeat(5, 1fr);
}

.pipeline li {
  display: grid;
  min-height: 128px;
  padding: 18px 16px;
  align-content: start;
  border-right: 1px solid var(--line);
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
}

.pipeline li:last-child {
  border-right: 0;
}

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.pipeline h3,
.card-heading h3,
.table-toolbar h3,
.result-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
}

.pipeline p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.benchmark-section {
  width: 100%;
  padding-inline: max(20px, calc((100% - 1120px) / 2));
  background: var(--surface-muted);
  border-block: 1px solid var(--line);
}

.benchmark-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 0.72fr);
  gap: 16px;
}

.chart-card,
.result-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.chart-card,
.result-card,
.table-card {
  padding: 26px;
}

.chart-card {
  min-height: 390px;
}

.card-heading,
.table-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.card-heading .card-kicker,
.table-toolbar .card-kicker {
  margin-bottom: 4px;
}

.scale-note {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
}

.space-chart {
  display: flex;
  height: 275px;
  margin-top: 31px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 6px;
  border-bottom: 1px solid var(--line-strong);
}

.bar-item {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 20px;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
}

.bar {
  width: min(29px, 72%);
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
  opacity: 0.74;
}

.bar-item:hover .bar,
.bar-item:focus-within .bar {
  opacity: 1;
}

.bar-button {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: help;
}

.bar-label {
  position: absolute;
  right: 50%;
  bottom: -25px;
  overflow: hidden;
  width: 52px;
  transform: translateX(50%);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  bottom: calc(var(--bar-height) + 8px);
  left: 50%;
  display: none;
  width: max-content;
  max-width: 170px;
  padding: 6px 8px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.67rem;
  text-align: center;
}

.bar-item:hover .chart-tooltip,
.bar-item:focus-within .chart-tooltip {
  display: block;
}

.result-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.result-card .card-kicker {
  align-self: flex-start;
}

.result-ring {
  display: grid;
  width: 140px;
  height: 140px;
  margin: 18px 0 20px;
  place-items: center;
  border: 12px solid var(--accent-soft);
  border-radius: 50%;
}

.result-ring strong {
  font-family: var(--mono);
  font-size: 2.25rem;
}

.result-ring small {
  color: var(--muted);
  font-family: var(--mono);
}

.result-card > p:not(.card-kicker) {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.precision-row {
  display: flex;
  width: 100%;
  margin-top: auto;
  padding-top: 15px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.precision-row strong {
  color: var(--accent);
  font-family: var(--mono);
}

.table-card {
  margin-top: 16px;
}

.filters {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.filter {
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
}

.filter.active {
  background: var(--surface);
  color: var(--accent);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 25px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

th,
td {
  padding: 13px 11px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-family: var(--mono);
}

td:first-child {
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.class-pill,
.result-pill,
.tag {
  display: inline-flex;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.class-pill {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  text-transform: capitalize;
}

.class-pill.nonlinear {
  color: var(--warm);
}

.result-pill {
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}

.example-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.example-group-header {
  display: flex;
  padding: 17px 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.example-index {
  padding-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.example-group-header h3,
.example-row h4 {
  margin: 0;
  color: var(--text);
}

.example-group-header h3 {
  font-size: 0.94rem;
}

.example-group-header p,
.example-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.example-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.example-row {
  display: grid;
  min-height: 76px;
  padding: 13px 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.example-row:last-child {
  border-bottom: 0;
}

.example-row h4 {
  font-size: 0.82rem;
  font-weight: 650;
}

.tags {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.artifacts-section {
  display: grid;
  align-items: center;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 80px;
  border-top: 1px solid var(--line);
}

.artifact-copy h2 {
  max-width: 620px;
}

.command-box {
  display: flex;
  max-width: 500px;
  margin-top: 28px;
  padding: 6px 6px 6px 15px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  gap: 10px;
}

.command-box code {
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-box button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
}

.artifact-tree {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.artifact-tree p {
  margin: 0;
  padding: 6px 0;
}

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

.branch {
  color: var(--muted);
}

.cta-section {
  margin-bottom: 70px;
  padding: 76px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.cta-section > p:not(.eyebrow) {
  margin-inline: auto;
}

.cta-section .button {
  margin-top: 25px;
}

footer {
  display: flex;
  padding: 29px 0 38px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.73rem;
}

footer p {
  margin: 0;
}

footer > div {
  display: flex;
  gap: 20px;
}

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

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

@media (max-width: 900px) {
  nav a:not(.nav-cta) {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 75px 0 82px;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .terminal-card {
    width: min(600px, 100%);
  }

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

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .pipeline li {
    min-height: 104px;
    border-bottom: 1px solid var(--line);
  }

  .pipeline li:nth-child(2n) {
    border-right: 0;
  }

  .pipeline li:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .benchmark-layout,
  .artifacts-section {
    grid-template-columns: 1fr;
  }

  .artifacts-section {
    gap: 42px;
  }

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

  .example-group:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero,
  .metrics,
  .section,
  .cta-section,
  footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    padding-top: 16px;
  }

  .nav-cta {
    padding: 7px 9px;
    font-size: 0.75rem;
  }

  .hero {
    padding: 58px 0 72px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .terminal-body {
    padding: 19px 16px 21px;
    font-size: 0.65rem;
  }

  .metric {
    padding: 21px 15px;
  }

  .metric strong {
    font-size: 1.15rem;
  }

  .section {
    padding: 82px 0;
  }

  .pipeline-section {
    padding-block: 68px;
  }

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

  .pipeline li,
  .pipeline li:nth-child(2n) {
    min-height: auto;
    border-right: 0;
  }

  .pipeline li:last-child {
    grid-column: auto;
  }

  .benchmark-section {
    width: 100%;
    padding-inline: 14px;
  }

  .chart-card,
  .result-card,
  .table-card {
    padding: 20px;
  }

  .space-chart {
    gap: 2px;
  }

  .bar-label {
    display: none;
  }

  .table-toolbar {
    flex-direction: column;
  }

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

  .example-group:last-child {
    grid-column: auto;
  }

  .command-box {
    align-items: stretch;
    flex-direction: column;
  }

  .command-box button {
    width: 100%;
  }

  .cta-section {
    padding: 60px 20px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

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