:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5e6675;
  --paper: #f4f1e9;
  --panel: #fbfaf6;
  --line: #cbc5b7;
  --blue: #205e72;
  --coral: #c65d3b;
  --code: #e8e3d8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.9%, rgb(23 32 51 / 5%) 50%, transparent 50.1%),
    var(--paper);
}

a {
  color: inherit;
}

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.wordmark span {
  margin-right: 0.55rem;
  color: var(--coral);
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--coral);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 650px;
  padding: 6rem 0;
}

.eyebrow,
.section-number,
.diagram-label {
  margin: 0 0 1.4rem;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 1.7rem;
  font-size: clamp(3.8rem, 9vw, 7.7rem);
  line-height: 0.87;
  letter-spacing: -0.07em;
}

h1 em {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

code {
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  background: var(--code);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 760;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  border-color: var(--coral);
  background: var(--coral);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.read-path {
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 18px 18px 0 rgb(32 94 114 / 12%);
}

.read-path ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.read-path li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 0.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.read-path li:last-child {
  padding-bottom: 0.35rem;
}

.read-path span {
  grid-row: 1 / 3;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.read-path strong {
  letter-spacing: -0.015em;
}

.read-path small {
  margin-top: 0.2rem;
  color: var(--muted);
}

.premise,
.notice,
.section-head {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 2rem;
}

.premise,
.notice {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

h2 {
  max-width: 760px;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.premise div > p,
.notice div > p,
.section-head div > p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.versions {
  padding: 5rem 0 6rem;
  border-top: 1px solid var(--line);
}

.release-list {
  margin-top: 3rem;
  border-top: 2px solid var(--ink);
}

.release-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.25fr) minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.release-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 750;
}

.release-copy h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.release-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.release-state,
.release-link {
  display: inline-flex;
  min-width: 6.5rem;
  justify-content: center;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.release-link {
  border-color: var(--blue);
  color: var(--blue);
}

.release-link:hover,
.release-link:focus-visible {
  border-color: var(--coral);
  color: var(--coral);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
}

@media (max-width: 800px) {
  body {
    background: var(--paper);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 4.5rem 0;
  }

  .premise,
  .notice,
  .section-head {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .release-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .release-state,
  .release-link {
    width: fit-content;
  }
}

@media (max-width: 520px) {
  .topbar,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .topbar nav {
    gap: 0.8rem;
  }

  .topbar nav a:first-child {
    display: none;
  }

  h1 {
    font-size: clamp(3.3rem, 18vw, 5rem);
  }

  footer {
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #ece7dc;
    --muted: #b5afa5;
    --paper: #101720;
    --panel: #18222d;
    --line: #39434d;
    --blue: #6bb5c6;
    --coral: #ef8967;
    --code: #26313c;
  }

  body {
    background:
      linear-gradient(90deg, transparent 49.9%, rgb(236 231 220 / 6%) 50%, transparent 50.1%),
      var(--paper);
  }
}

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