:root {
  color-scheme: light;
  --paper: #f2efe6;
  --paper-2: #e7e1d5;
  --paper-3: #ebe6dc;
  --ink: #171714;
  --muted: #5d584f;
  --soft: #70695f;
  --rule: #d3ccbf;
  --rule-strong: #bdb6a9;
  --signal: #b32b09;
  --signal-tint: #ead9d2;
  --link: #8d240b;
  --page-width: 88rem;
  --article-width: 78rem;
  --method-width: 82rem;
  --reading-width: 43rem;
  --rail-width: 13rem;
  --grid-gap: clamp(2rem, 4vw, 4.5rem);
  --gutter: clamp(1rem, 3.5vw, 3rem);
  --font-sans: Arial, "Helvetica Neue", Helvetica, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

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

h1,
h2,
h3,
p,
blockquote,
figure,
dl,
dd,
ol,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 {
  margin-bottom: 1.75rem;
  font-size: clamp(3.25rem, 7vw, 6.4rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.25rem;
  line-height: 1.18;
}

h1,
h2,
h3,
p,
li,
dd,
dt,
th,
td {
  overflow-wrap: break-word;
}

p {
  margin-bottom: 1.15rem;
}

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

strong {
  font-weight: 750;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--signal);
  text-decoration-thickness: 0.13em;
}

a:focus-visible {
  outline: 0.19rem solid var(--signal);
  outline-offset: 0.22rem;
}

main:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  width: auto;
  height: auto;
  padding: 0.7rem 0.9rem;
  overflow: visible;
  clip-path: none;
}

.header-inner,
.site-main,
.footer-inner {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.header-inner {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) auto minmax(15rem, 1fr);
  gap: 2rem;
  align-items: center;
  min-height: 4.5rem;
}

.wordmark {
  justify-self: start;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--signal);
}

.masthead-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: center;
}

.header-inner nav {
  justify-self: end;
}

.nav-list {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding-block: 1.45rem 1.3rem;
  border-bottom: 0.16rem solid transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  border-bottom-color: var(--signal);
  color: var(--ink);
}

.site-main {
  min-height: calc(100vh - 11rem);
}

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

.text-link span,
.hero-actions a span,
.article-list > li > a::after {
  color: var(--signal);
}

/* Home */

.hero {
  display: grid;
  grid-template-columns: minmax(8rem, 0.65fr) minmax(0, 46rem) minmax(13rem, 0.7fr);
  gap: 2.5rem var(--grid-gap);
  align-items: end;
  min-height: 41rem;
  padding-block: clamp(5rem, 9vw, 8rem);
  border-bottom: 1px solid var(--ink);
}

.page-folio {
  display: flex;
  grid-column: 1;
  grid-row: 1 / 3;
  flex-direction: column;
  align-self: stretch;
  margin: 0;
  padding-right: 2rem;
  border-right: 1px solid var(--rule-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.folio-number {
  display: block;
  margin-bottom: auto;
  color: var(--signal);
  font-family: var(--font-sans);
  font-size: clamp(4.5rem, 7vw, 6.5rem);
  font-weight: 750;
  letter-spacing: -0.07em;
  line-height: 0.82;
}

.hero h1 {
  grid-column: 2 / 4;
  align-self: end;
  max-width: 11ch;
  margin: 0;
  font-size: clamp(4rem, 8vw, 6.8rem);
  line-height: 0.88;
}

.hero-lede {
  grid-column: 2;
  max-width: 39rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  line-height: 1.58;
}

.hero-actions {
  grid-column: 3;
  align-self: end;
}

.hero-actions p {
  margin: 0;
  padding-block: 0.9rem;
  border-top: 1px solid var(--ink);
  font-size: 0.9rem;
}

.hero-actions p:last-child {
  border-bottom: 1px solid var(--ink);
}

.hero-actions a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.home-section {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 2rem var(--grid-gap);
  padding-block: clamp(5rem, 9vw, 7.5rem);
  border-bottom: 1px solid var(--ink);
}

.site-main > .home-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 0 var(--grid-gap);
}

.section-heading::before {
  content: "Contents";
  grid-column: 1;
  grid-row: 1 / 4;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-heading > * {
  grid-column: 2;
  max-width: var(--reading-width);
}

.section-heading h2 {
  max-width: 14ch;
}

.section-heading > p {
  color: var(--muted);
}

.home-route-list {
  grid-column: 2;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
  counter-reset: route;
  list-style: none;
}

.home-route {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(10rem, auto);
  gap: 0.4rem 1.5rem;
  padding-block: 1.8rem;
  border-bottom: 1px solid var(--rule);
  counter-increment: route;
}

.home-route::before {
  content: counter(route, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / 3;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.home-route h3,
.home-route > p {
  grid-column: 2;
}

.home-route h3 {
  margin: 0;
  font-size: 1.35rem;
}

.home-route > p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
}

.home-route > p:last-child {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
  color: var(--ink);
  font-size: 0.9rem;
}

.prose-section {
  background: var(--paper-2);
}

.prose-section::before {
  content: "Case note";
  grid-column: 1;
  grid-row: 1 / 5;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.prose-section > * {
  grid-column: 2;
  max-width: var(--reading-width);
}

.prose-section h2 {
  max-width: 16ch;
}

.prose-section > p:not(:last-child) {
  color: var(--muted);
}

/* Guide and topic pages */

.article-page {
  width: min(100%, var(--article-width));
  margin-inline: auto;
  padding-block: clamp(5rem, 9vw, 7.5rem);
}

.article-hero {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, var(--reading-width)) minmax(0, 1fr);
  gap: 0 var(--grid-gap);
  margin-bottom: clamp(4.5rem, 9vw, 7rem);
}

.article-hero > * {
  grid-column: 2 / 4;
}

.article-hero h1 {
  max-width: 13ch;
}

.article-eyebrow {
  grid-column: 1;
  grid-row: 1 / 5;
  align-self: stretch;
  margin: 0;
  padding-right: 2rem;
  border-right: 1px solid var(--rule-strong);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.article-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.article-lede {
  max-width: var(--reading-width);
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.article-principle,
.article-tldr,
.method-summary,
.method-principle {
  max-width: var(--reading-width);
  margin: 1.75rem 0 0;
  padding-block: 1.1rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
}

.article-tldr p {
  margin: 0;
}

.working-note {
  position: relative;
  max-width: var(--reading-width);
  padding: 1.4rem 1.5rem;
  border: 0;
  border-left: 0.22rem solid var(--signal);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
}

.working-note::before {
  content: "Working note";
  display: block;
  margin-bottom: 0.55rem;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

.article-jumps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: clamp(5rem, 9vw, 7rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.article-jumps a {
  padding: 1.1rem 1rem;
  border-right: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
}

.article-jumps a:last-child {
  border-right: 0;
}

.article-jumps a:hover {
  color: var(--signal);
}

.article-level {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 0 var(--grid-gap);
  padding-block: 2.5rem 4rem;
  border-top: 1px solid var(--rule-strong);
  scroll-margin-top: 2rem;
}

.article-level > h2,
.article-level > p {
  grid-column: 1;
}

.article-level > h2 {
  margin-bottom: 0.8rem;
  font-size: 1.45rem;
  line-height: 1.1;
}

.article-level > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-list {
  grid-column: 2;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

#level-1 .article-list {
  counter-reset: topic 0;
}

#level-2 .article-list {
  counter-reset: topic 2;
}

#level-3 .article-list {
  counter-reset: topic 5;
}

#level-4 .article-list {
  counter-reset: topic 7;
}

.article-list > li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.3rem 1rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--rule);
  counter-increment: topic;
}

.article-list > li::before {
  content: counter(topic, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / 3;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.article-list > li > a,
.article-list > li > p {
  grid-column: 2;
}

.article-list > li > a {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 750;
  text-decoration: none;
}

.article-list > li > a::after {
  content: "  →";
  white-space: pre;
}

.article-list > li > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.article-section {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, var(--reading-width)) minmax(0, 1fr);
  gap: 0 var(--grid-gap);
  margin-bottom: clamp(4rem, 8vw, 6rem);
  padding-top: 2.2rem;
  border-top: 1px solid var(--rule-strong);
  scroll-margin-top: 2rem;
}

.article-section > * {
  grid-column: 2;
}

.article-section > h2 {
  max-width: 18ch;
}

.article-section > p:not(.working-note) {
  color: var(--muted);
}

.article-section > ul,
.article-section > ol {
  padding-left: 1.35rem;
}

.article-section li + li {
  margin-top: 0.7rem;
}

.article-steps,
.article-review-list,
.article-reading-paths {
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.article-section > .article-review-list {
  padding-left: 1.35rem;
  list-style: decimal;
}

.article-section > .article-steps {
  padding-left: 0;
}

.article-steps {
  counter-reset: step;
}

.article-steps > li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
  counter-increment: step;
}

.article-steps > li + li {
  margin-top: 0;
}

.article-steps > li::before {
  content: counter(step, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / 8;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.article-steps > li > * {
  grid-column: 2;
}

.article-steps > li > ul,
.article-steps > li > ol {
  margin-top: 0.75rem;
  padding-left: 1.2rem;
}

.article-review-list > li,
.article-reading-paths > li {
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.article-review-list > li + li {
  margin-top: 0;
}

.article-review-list h3,
.article-reading-paths h3 {
  margin-bottom: 0.5rem;
}

.article-review-list p,
.article-reading-paths p {
  margin: 0;
  color: var(--muted);
}

.article-data {
  margin: 2rem 0;
  border-top: 1px solid var(--ink);
}

.article-data > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.article-data dt {
  color: var(--muted);
}

.article-data dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.article-pagination {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(5rem, 9vw, 7rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.article-pagination a {
  padding: 1.15rem 1rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.pagination-previous {
  grid-column: 1;
  text-align: left;
}

.pagination-all {
  grid-column: 2;
  border-right: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  text-align: center;
}

.pagination-next {
  grid-column: 3;
  text-align: right;
}

.article-pagination a:hover {
  color: var(--signal);
}

/* Method */

.method-article {
  width: min(100%, var(--method-width));
  margin-inline: auto;
  padding-block: clamp(5rem, 9vw, 7.5rem);
}

.method-hero {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, var(--reading-width)) minmax(0, 1fr);
  gap: 0 var(--grid-gap);
  margin-bottom: clamp(5rem, 10vw, 8rem);
}

.method-hero > * {
  grid-column: 2 / 4;
}

.method-hero .article-eyebrow {
  grid-column: 1;
}

.method-hero h1 {
  max-width: none;
}

.method-lede {
  max-width: var(--reading-width);
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.method-section {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 0 var(--grid-gap);
  margin-bottom: clamp(5rem, 10vw, 8rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule-strong);
  scroll-margin-top: 2rem;
}

.method-section > * {
  grid-column: 2;
}

.method-section > h2 {
  grid-column: 1;
  align-self: start;
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.08;
}

.method-section > p:not(.method-summary):not(.method-principle) {
  max-width: var(--reading-width);
  color: var(--muted);
}

.method-definitions {
  max-width: var(--reading-width);
  margin: 2rem 0;
  border-top: 1px solid var(--ink);
}

.method-definitions > div {
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--rule);
}

.method-definitions dt {
  font-size: 1.15rem;
  font-weight: 750;
}

.method-definitions dd {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.method-figure {
  width: min(100%, 60rem);
  margin: 2.75rem 0 2rem;
}

.method-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.method-figure .method-diagram__narrow {
  display: none;
}

.method-diagram svg text {
  font-family: var(--font-sans) !important;
}

.method-diagram svg text[font-family*="Courier"] {
  font-family: var(--font-mono) !important;
}

.method-diagram svg [fill="#5d584f"] {
  fill: var(--muted);
}

.method-diagram svg > rect {
  fill: var(--paper-2);
  stroke: var(--ink);
}

.method-diagram--targets svg > path {
  stroke: var(--muted);
  stroke-width: 1.2;
}

.method-diagram--targets svg > rect:first-of-type {
  fill: var(--signal-tint);
  stroke: var(--signal);
  stroke-width: 1.2;
}

.method-diagram--targets svg > text:nth-of-type(2) {
  fill: var(--signal);
}

.method-diagram--loop svg > path {
  stroke: var(--signal);
  stroke-width: 1.2;
}

.method-diagram--loop svg marker path {
  fill: var(--signal);
}

.method-diagram--loop svg > circle {
  fill: var(--signal-tint);
  stroke: var(--signal);
  stroke-width: 1.2;
}

.method-diagram--loop .method-diagram__wide > text[font-size="22"][text-anchor="middle"],
.method-diagram--loop .method-diagram__narrow > text[font-size="20"][text-anchor="middle"] {
  fill: var(--signal);
}

.method-diagram__narrow text[font-size="11"] {
  font-size: 12px;
}

.method-figure figcaption {
  max-width: var(--reading-width);
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-strong);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.method-related {
  max-width: var(--reading-width);
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2.5rem 0 2rem;
  padding: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  counter-reset: method-step;
  list-style: none;
}

.method-steps li {
  min-height: 13rem;
  padding: 1.25rem;
  border-right: 1px solid var(--rule);
  counter-increment: method-step;
}

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

.method-steps li::before {
  content: counter(method-step, decimal-leading-zero);
  display: block;
  margin-bottom: 2.5rem;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.method-steps h3 {
  margin-bottom: 0.6rem;
}

.method-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.method-routing table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.method-routing caption {
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 750;
  text-align: left;
}

.method-routing thead th {
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid var(--ink);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.method-routing th,
.method-routing td {
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.method-routing th:first-child,
.method-routing td:first-child {
  width: 60%;
  padding-left: 0;
}

.method-routing th:last-child,
.method-routing td:last-child {
  width: 40%;
  padding-right: 0;
}

.method-routing tbody th {
  font-weight: 500;
}

.method-routing tbody td {
  font-weight: 750;
}

.method-routing tbody tr:last-child th,
.method-routing tbody tr:last-child td {
  border-bottom-color: var(--ink);
}

.method-continuation {
  max-width: var(--reading-width);
  margin: 0 0 0 calc(var(--rail-width) + var(--grid-gap));
  padding-block: 1.15rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* Holding pages and footer */

.holding-page {
  display: flex;
  width: min(100%, 54rem);
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding-block: 4rem;
}

.holding-page h1 {
  max-width: 10ch;
}

.holding-page > p {
  max-width: 38rem;
  color: var(--muted);
}

.error-code {
  margin-bottom: 2rem;
  color: var(--signal) !important;
  font-family: var(--font-mono);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.site-footer {
  border-top: 1px solid var(--ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  min-height: 6.25rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.82rem;
}

.footer-inner a {
  color: var(--ink);
}

@media (max-width: 64rem) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .masthead-note {
    display: none;
  }

  .hero {
    grid-template-columns: 8rem minmax(0, 1fr);
  }

  .hero h1,
  .hero-lede,
  .hero-actions {
    grid-column: 2;
  }

  .article-hero,
  .method-hero,
  .article-section {
    grid-template-columns: 10rem minmax(0, 1fr);
  }

  .article-hero > *,
  .method-hero > *,
  .article-section > * {
    grid-column: 2;
  }

  .article-eyebrow,
  .method-hero .article-eyebrow {
    grid-column: 1;
  }

  .method-section,
  .article-level,
  .home-section,
  .section-heading {
    grid-template-columns: 10rem minmax(0, 1fr);
  }

  .method-continuation {
    margin-left: calc(10rem + var(--grid-gap));
  }
}

@media (max-width: 48rem) {
  :root {
    --gutter: clamp(0.9rem, 4vw, 1.4rem);
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  h2 {
    font-size: clamp(1.85rem, 9vw, 2.75rem);
  }

  .header-inner {
    min-height: 4rem;
    gap: 1rem;
  }

  .nav-list {
    gap: 1rem;
  }

  .nav-list a {
    padding-block: 1.2rem 1.05rem;
    font-size: 0.84rem;
  }

  .hero {
    display: block;
    min-height: 0;
    padding-block: 3.5rem 4.5rem;
  }

  .page-folio {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 3.5rem;
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule-strong);
  }

  .folio-number {
    margin: 0;
    font-size: 3.5rem;
  }

  .hero h1 {
    max-width: 10ch;
    margin-bottom: 2.25rem;
    font-size: clamp(3.5rem, 17vw, 5rem);
  }

  .hero-lede {
    margin-bottom: 2rem;
  }

  .home-section,
  .section-heading,
  .article-hero,
  .method-hero,
  .article-section,
  .article-level,
  .method-section {
    display: block;
  }

  .home-section {
    padding-block: 4.5rem;
  }

  .section-heading::before,
  .prose-section::before {
    display: block;
    margin-bottom: 1.5rem;
  }

  .home-route-list {
    margin-top: 2rem;
  }

  .home-route {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }

  .home-route > p:last-child {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin-top: 0.75rem;
  }

  .article-page,
  .method-article {
    padding-block: 4.25rem;
  }

  .article-hero,
  .method-hero {
    margin-bottom: 4.5rem;
  }

  .article-eyebrow {
    margin-bottom: 2.25rem;
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule-strong);
  }

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

  .article-jumps a:nth-child(2) {
    border-right: 0;
  }

  .article-jumps a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }

  .article-level {
    padding-top: 1.75rem;
  }

  .article-section,
  .method-section {
    margin-bottom: 4.5rem;
    padding-top: 1.75rem;
  }

  .article-level > p {
    margin-bottom: 1.75rem;
  }

  .article-list {
    margin-top: 2rem;
  }

  .working-note {
    padding: 1.2rem 1.1rem;
  }

  .article-pagination {
    display: block;
  }

  .article-pagination a {
    display: block;
    border: 0;
    border-bottom: 1px solid var(--rule);
    text-align: left;
  }

  .article-pagination a:last-child {
    border-bottom: 0;
  }

  .method-section > h2 {
    margin-bottom: 1.5rem;
  }

  .method-figure {
    width: 100%;
  }

  .method-figure .method-diagram__wide {
    display: none;
  }

  .method-figure .method-diagram__narrow {
    display: block;
    width: min(100%, 26rem);
    margin-inline: auto;
  }

  .method-steps {
    display: block;
  }

  .method-steps li {
    min-height: 0;
    padding: 1.35rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .method-steps li:last-child {
    border-bottom: 0;
  }

  .method-steps li::before {
    margin-bottom: 1.5rem;
  }

  .method-routing caption {
    display: block;
    width: 100%;
  }

  .method-routing thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .method-routing table,
  .method-routing tbody,
  .method-routing tr,
  .method-routing th,
  .method-routing td {
    display: block;
    width: 100%;
  }

  .method-routing tbody tr {
    padding-block: 1.15rem;
    border-bottom: 1px solid var(--rule);
  }

  .method-routing tbody tr:last-child {
    border-bottom-color: var(--ink);
  }

  .method-routing tbody th,
  .method-routing tbody td {
    padding: 0;
    border: 0;
  }

  .method-routing tbody td {
    margin-top: 0.25rem;
  }

  .method-continuation {
    margin-left: 0;
  }

  .footer-inner {
    display: block;
    padding-block: 2rem;
  }

  .footer-inner p + p {
    margin-top: 0.75rem;
  }
}

@media (max-width: 30rem) {
  .wordmark {
    font-size: 1.05rem;
  }

  .nav-list {
    gap: 0.72rem;
  }

  .nav-list a {
    font-size: 0.78rem;
  }

  .article-jumps {
    grid-template-columns: 1fr;
  }

  .article-jumps a,
  .article-jumps a:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .article-jumps a:last-child {
    border-bottom: 0;
  }

  .article-data > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .article-data dd {
    text-align: left;
  }
}

@media (max-width: 14rem) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding-block: 0.75rem;
  }

  .header-inner nav {
    width: 100%;
    justify-self: stretch;
  }

  .nav-list {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem;
  }

  .nav-list a {
    padding-block: 0.35rem;
  }
}

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

@media (forced-colors: active) {
  a:focus-visible {
    outline-color: Highlight;
  }

  .working-note,
  .prose-section {
    background: Canvas;
  }

  .page-folio,
  .site-header,
  .site-footer,
  .hero,
  .home-section,
  .article-jumps,
  .article-level,
  .article-section,
  .article-pagination,
  .method-section,
  .method-steps,
  .method-figure figcaption,
  .method-routing thead th,
  .method-routing tbody tr,
  .method-routing th,
  .method-routing td {
    border-color: CanvasText;
  }

  .method-diagram svg > rect,
  .method-diagram svg > circle {
    fill: Canvas;
    stroke: CanvasText;
  }

  .method-diagram svg > path,
  .method-diagram svg line {
    stroke: CanvasText;
  }

  .method-diagram svg marker path,
  .method-diagram svg text {
    fill: CanvasText;
  }
}
