:root {
  color-scheme: light;
  --paper: #f8fafc;
  --ink: #020617;
  --muted: #475569;
  --rule: #cbd5e1;
  --ruby: #dc2626;
  --white: #ffffff;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --page: min(100% - 3rem, 74rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid var(--ruby);
  outline-offset: 4px;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.02;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-200%);
}

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

.site-header,
.site-footer,
.hero,
.pipeline,
.code-story,
.targets,
.install {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--ruby);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.site-nav,
.site-footer > div {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a,
.site-footer a {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover,
.text-link:hover {
  color: var(--ruby);
}

.nav-source {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--ink);
}

.hero {
  min-height: 43rem;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(27rem, 1.08fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  padding-block: 5rem 6rem;
}

.hero-route,
.section-index,
.step-number,
.workbench figcaption,
.render-label,
.source-tabs {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.hero-route {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.hero-route span,
.section-index,
.step-number {
  color: var(--ruby);
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.75rem, 8vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.065em;
}

.hero h1 span {
  white-space: nowrap;
}

.hero-lede {
  max-width: 35rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.125rem;
  border: 1px solid var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.button-primary {
  background: var(--ink);
  color: var(--white);
}

.button-primary:hover {
  background: var(--ruby);
  border-color: var(--ruby);
}

.button-secondary:hover {
  background: var(--white);
}

.hero-facts {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  padding-left: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column-reverse;
}

.hero-facts span {
  color: var(--muted);
  font-size: 0.75rem;
}

.hero-facts strong {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.workbench {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  box-shadow: 1rem 1rem 0 var(--rule);
}

.workbench::before {
  content: "";
  position: absolute;
  width: 4.5rem;
  height: 0.25rem;
  top: -1px;
  left: -1px;
  background: var(--ruby);
}

.workbench figcaption,
.render-label {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 1rem;
  border-bottom: 1px solid #334155;
  color: #94a3b8;
}

.workbench .code-block {
  min-height: 20rem;
  padding: 1.5rem;
}

.code-block {
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  tab-size: 2;
}

.code-keyword,
.code-symbol {
  color: #fca5a5;
}

.code-call {
  color: #e2e8f0;
}

.code-number {
  color: #fef08a;
}

.code-comment {
  color: #94a3b8;
}

.render-output {
  border-top: 1px solid #334155;
}

.render-output svg {
  width: 100%;
  height: auto;
  display: block;
  background: #0f172a;
}

.field-grid path,
.field-lines path,
.signal-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.field-grid path {
  stroke: #1e293b;
  stroke-width: 1;
}

.field-lines path {
  stroke: #64748b;
  stroke-width: 1;
}

.signal-line {
  stroke: var(--ruby);
  stroke-width: 4;
}

.signal-point {
  fill: var(--ruby);
  stroke: var(--white);
  stroke-width: 2;
}

.pipeline,
.targets {
  padding-block: 6rem;
  border-top: 1px solid var(--ink);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 0.55fr) minmax(18rem, 1fr) minmax(18rem, 0.8fr);
  gap: 2rem;
  align-items: start;
}

.section-heading h2,
.code-story h2,
.install h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.section-heading > p:last-child,
.code-story-copy > p,
.install > div:first-child > p:last-child {
  color: var(--muted);
  font-size: 1.0625rem;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.pipeline-steps li {
  min-height: 17rem;
  padding: 1.5rem;
  border-right: 1px solid var(--rule);
}

.pipeline-steps li:first-child {
  padding-left: 0;
}

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

.pipeline-steps h3 {
  margin-top: 4rem;
  font-size: 1.5rem;
}

.pipeline-steps p {
  margin-top: 1rem;
  color: var(--muted);
}

.code-story {
  display: grid;
  grid-template-columns: minmax(18rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding-block: 6rem;
  border-top: 1px solid var(--ink);
}

.code-story h2 {
  margin-top: 1.5rem;
}

.code-story-copy > p {
  margin-top: 1.5rem;
}

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
}

.source-sample {
  min-width: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.source-tabs {
  display: flex;
  gap: 1.5rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #334155;
  color: #64748b;
}

.active-tab {
  color: var(--white);
}

.source-sample .code-block {
  padding: 1.75rem;
}

.targets-heading {
  padding-bottom: 4rem;
}

.target-list {
  border-top: 1px solid var(--ink);
}

.target-list article {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 2rem;
  align-items: center;
  min-height: 7.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.target-list h3 {
  font-family: var(--mono);
  font-size: 1.5rem;
}

.target-list p {
  color: var(--muted);
}

.target-list div p {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.target-list code {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  background: var(--white);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.install {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-block: 6rem;
  border-top: 1px solid var(--ink);
}

.install h2 {
  margin-top: 1.5rem;
}

.install > div:first-child > p:last-child {
  margin-top: 1.5rem;
}

.install-command {
  display: flex;
  align-items: center;
  gap: 1rem;
  align-self: end;
  min-height: 5rem;
  padding: 1.25rem 1.5rem;
  border-left: 0.25rem solid var(--ruby);
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.install-command span {
  color: #94a3b8;
}

.install-links {
  grid-column: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.install-links .text-link {
  margin: 0;
}

.site-footer {
  min-height: 8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid var(--ink);
}

.site-footer p {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.site-footer > div {
  justify-self: end;
}

@media (max-width: 900px) {
  :root {
    --page: min(100% - 2rem, 46rem);
  }

  .site-nav a:not(.nav-source) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 4rem;
    padding-block: 4rem 5rem;
  }

  .hero-copy {
    max-width: 42rem;
  }

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

  .workbench {
    max-width: 42rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-heading > p:last-child {
    max-width: 36rem;
  }

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

  .pipeline-steps li,
  .pipeline-steps li:first-child,
  .pipeline-steps li:last-child {
    min-height: 0;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .pipeline-steps h3 {
    margin-top: 2rem;
  }

  .code-story,
  .install {
    grid-template-columns: 1fr;
  }

  .install-links {
    grid-column: 1;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer p {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-bottom: 1.5rem;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .hero h1 span {
    white-space: normal;
  }

  .hero-facts {
    gap: 1.5rem;
  }

  .workbench {
    box-shadow: 0.5rem 0.5rem 0 var(--rule);
  }

  .workbench .code-block {
    min-height: 0;
  }

  .pipeline,
  .targets,
  .code-story,
  .install {
    padding-block: 4.5rem;
  }

  .target-list article {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .target-list code {
    width: fit-content;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding-block: 2rem;
  }

  .site-footer > div {
    justify-self: start;
  }

  .site-footer p {
    grid-column: 1;
    grid-row: auto;
    padding: 0;
  }
}

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