:root {
  --paper: #f2f1ec;
  --paper-deep: #e7e5dc;
  --ink: #242424;
  --muted: #62645f;
  --green: #2f684d;
  --green-dark: #194a34;
  --rule: #789181;
  --serif: Georgia, "Palatino Linotype", Palatino, "Book Antiqua", serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--green-dark);
  text-decoration-color: var(--rule);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green);
  text-decoration-color: currentColor;
}

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

code,
pre {
  font: inherit;
}

code {
  color: var(--green-dark);
}

.page-shell {
  width: min(70rem, calc(100% - 4rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--paper);
}

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

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 5.25rem;
  padding-block: 1.6rem 1rem;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.hero {
  padding-block: clamp(4.5rem, 10vw, 8rem) clamp(4rem, 8vw, 6.5rem);
}

.kicker,
.folio {
  margin: 0 0 1.25rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 61rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8.2vw, 6.25rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.lede {
  max-width: 48rem;
  margin: 2.5rem 0 0;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.lede strong {
  font-family: var(--serif);
  font-size: 1.15em;
}

.launch-line {
  width: fit-content;
  max-width: 100%;
  margin: 2.4rem 0 0;
  padding: 0.75rem 1.1rem;
  overflow-x: auto;
  border-block: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1.05rem;
  white-space: pre;
}

.prompt {
  color: var(--green);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 1.7rem 0 0;
  font-size: 0.92rem;
}

.text-link {
  font-weight: 700;
}

.hero-figure {
  margin-block: 0 6.5rem;
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  border: 1px solid var(--green-dark);
  background: #fff;
}

figcaption {
  max-width: 47rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.chapter {
  display: grid;
  grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  padding-block: clamp(4.25rem, 8vw, 7rem);
  border-top: 1px solid var(--ink);
}

.chapter-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.chapter-body {
  min-width: 0;
  max-width: 48rem;
}

.chapter-body > :first-child {
  margin-top: 0;
}

.chapter-body > :last-child {
  margin-bottom: 0;
}

.section-intro {
  margin-bottom: 3rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.5;
}

.reasons {
  margin: 0;
}

.reasons > div {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--rule);
}

.reasons > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.reasons dt {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

.reasons dd {
  margin: 0;
}

.figure-grid {
  display: grid;
  gap: 3.25rem;
}

.figure-grid figure,
.terminal-figure {
  max-width: 47rem;
}

.language-line {
  margin: 3rem 0;
  padding-block: 1.2rem;
  border-block: 1px solid var(--rule);
  color: var(--green-dark);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.8;
}

.terminal-figure {
  margin-top: 3.5rem;
}

.install {
  border-bottom: 1px solid var(--ink);
}

.install .chapter-body > p {
  max-width: 43rem;
}

.install-code {
  margin: 1.5rem 0 2rem;
  padding: 1.35rem 1.5rem;
  overflow-x: auto;
  border-left: 4px solid var(--green);
  background: var(--paper-deep);
  color: var(--ink);
  line-height: 1.75;
  white-space: pre;
}

.install-code code {
  color: inherit;
}

.install-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.8rem 1.5rem;
  margin-top: 2.5rem;
}

.source-link {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.5rem 4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 56rem) {
  .page-shell {
    width: min(100% - 2rem, 42rem);
  }

  .site-header {
    min-height: 4.5rem;
    padding-block: 1.25rem 0.9rem;
  }

  .site-header nav {
    gap: 1rem;
  }

  .hero {
    padding-block: 4.5rem 4rem;
  }

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

  .lede {
    margin-top: 2rem;
  }

  .hero-figure {
    margin-bottom: 4.5rem;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-block: 4.5rem;
  }

  .chapter-heading {
    max-width: 28rem;
  }

  .reasons > div {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .section-intro {
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
  }

  .figure-grid {
    gap: 2.5rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 2.5rem;
  }
}

@media (max-width: 25rem) {
  body {
    font-size: 0.95rem;
  }

  .site-header nav {
    font-size: 0.82rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .launch-line {
    font-size: 0.9rem;
  }

  .install-code {
    margin-inline: -1rem;
    padding-inline: 1rem;
  }
}

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