.article-shell {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 40px 0 112px;
}

.article {
  width: min(800px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.blog-index {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0 112px;
}

.back-link {
  display: block;
  width: min(800px, 100%);
  margin: 0 auto 28px;
  color: #17657f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover {
  color: #0f4f66;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(35, 34, 31, 0.14);
}

.article-header h1 {
  margin: 0;
  color: #151512;
  font-family: 'Cormorant Garamond', 'Newsreader', Georgia, serif;
  font-size: clamp(52px, 6vw, 72px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
  text-wrap: balance;
}

.blog-index h1 {
  margin: 0;
  color: #151512;
  font-size: clamp(38px, 4.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.article-deck {
  max-width: 48ch;
  margin: 24px 0 0;
  color: rgba(35, 34, 31, 0.74);
  font-size: 21px;
  font-style: italic;
  line-height: 1.45;
}

/* Compact scroll context: appears only after the reader enters a section. */
.section-marker {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 50%;
  display: flex;
  max-width: min(620px, calc(100% - 136px));
  height: 28px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(35, 34, 31, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 3px 14px rgba(35, 34, 31, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -7px);
  transition: opacity 140ms ease, transform 140ms ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.section-marker.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.section-marker__level {
  flex: 0 0 auto;
  color: #17657f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.section-marker__link {
  overflow: hidden;
  color: rgba(35, 34, 31, 0.72);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.025em;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-marker__link:hover {
  color: #075e2f;
}

.article::after {
  display: block;
  clear: both;
  content: '';
}

.markdown-body {
  counter-reset: h3-heading;
  color: #23221f;
  font-size: 20px;
  line-height: 1.68;
}

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

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

.markdown-body p {
  margin: 0 0 25px;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: #151512;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.markdown-body h2 {
  counter-reset: h3-heading;
  margin: 64px 0 20px;
  font-size: 34px;
  letter-spacing: -0.018em;
}

.markdown-body h2::before {
  margin-right: 0.22em;
  color: #17657f;
  content: '\00a7';
  font-weight: 500;
}

.markdown-body h3 {
  counter-increment: h3-heading;
  margin: 48px 0 16px;
  font-size: 27px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.1;
}

.markdown-body h3::before {
  margin-right: 0.75em;
  color: #17657f;
  content: counter(h3-heading);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 0.36em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  vertical-align: 0.35em;
}

.markdown-body h4 {
  margin: 42px 0 15px;
  font-size: 23px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.15;
}

.markdown-body h4::before {
  margin-right: 0.55em;
  color: #17657f;
  content: '\2014';
  font-style: normal;
  font-weight: 500;
}

.markdown-body h5 {
  margin: 32px 0 12px;
  color: rgba(35, 34, 31, 0.62);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.markdown-body h6 {
  margin: 32px 0 12px;
  color: rgba(35, 34, 31, 0.58);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.markdown-body a {
  color: #075e2f;
  border-bottom: 1px solid rgba(15, 63, 36, 0.5);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease,
    background-color 0.15s ease;
}

.markdown-body a:hover {
  color: #082f19;
  border-bottom-color: #082f19;
  background: rgba(15, 63, 36, 0.06);
}

.markdown-body strong {
  color: #151512;
  font-weight: 600;
}

.markdown-body em {
  font-style: italic;
}

.markdown-body del {
  color: rgba(35, 34, 31, 0.54);
  text-decoration-thickness: 1px;
}

.markdown-body :not(pre) > code {
  padding: 0.08em 0.3em;
  border: 1px solid rgba(35, 34, 31, 0.12);
  border-radius: 3px;
  background: rgba(35, 34, 31, 0.045);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 0.73em;
}

.markdown-body blockquote {
  margin: 36px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid #17657f;
  color: rgba(35, 34, 31, 0.72);
  font-size: 23px;
  font-style: italic;
  line-height: 1.5;
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.definition-block {
  position: relative;
  margin: 38px 0;
  padding: 21px 24px 19px;
  border: 1px solid rgba(23, 101, 127, 0.2);
  border-left: 3px solid #17657f;
  border-radius: 0 4px 4px 0;
  background: rgba(23, 101, 127, 0.045);
}

.definition-block__heading {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin-bottom: 12px;
}

.definition-block__label {
  flex: 0 0 auto;
  color: #17657f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.definition-block__term {
  color: #151512;
  font-size: 21px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
}

.definition-block__content > :last-child {
  margin-bottom: 0;
}

.remark-block {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid rgba(35, 34, 31, 0.18);
  border-bottom: 1px solid rgba(35, 34, 31, 0.18);
  background: transparent;
}

.remark-block__summary {
  display: grid;
  min-height: 54px;
  box-sizing: border-box;
  grid-template-columns: minmax(60px, auto) minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
  cursor: pointer;
  list-style: none;
  transition: background-color 120ms ease;
}

.remark-block__summary::-webkit-details-marker {
  display: none;
}

.remark-block__summary:hover {
  background: rgba(7, 94, 47, 0.035);
}

.remark-block__summary:focus-visible {
  outline: 2px solid #17657f;
  outline-offset: 3px;
}

.remark-block__label {
  color: #075e2f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.remark-block__title {
  overflow: hidden;
  color: #151512;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remark-block__toggle {
  position: relative;
  grid-column: 3;
  width: 18px;
  height: 18px;
}

.remark-block__toggle::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #075e2f;
  border-bottom: 1.5px solid #075e2f;
  content: '';
  transform: translate(-65%, -50%) rotate(-45deg);
  transition: transform 120ms ease;
}

.remark-block[open] .remark-block__toggle::before {
  transform: translate(-50%, -65%) rotate(45deg);
}

.remark-block__content {
  padding: 1px 36px 19px 72px;
  color: rgba(35, 34, 31, 0.78);
  font-size: 0.9em;
  line-height: 1.6;
}

.remark-block__content > :last-child {
  margin-bottom: 0;
}

.margin-note {
  display: block;
  clear: right;
  float: right;
  width: 260px;
  margin: 5px -310px 26px 34px;
  padding: 13px 0 0;
  border-top: 2px solid #17657f;
  color: rgba(35, 34, 31, 0.72);
  font-size: 14.5px;
  line-height: 1.45;
}

.margin-note--inline {
  margin-top: 0;
  padding-top: 10px;
}

.margin-note-label {
  display: block;
  margin-bottom: 8px;
  color: #17657f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.margin-note--definition {
  border-top-color: #075e2f;
}

.margin-note--definition .margin-note-label {
  margin-bottom: 5px;
  color: #075e2f;
}

.margin-note p {
  margin: 0;
}

.margin-note__content {
  display: block;
}

.margin-note__entry {
  display: block;
}

.margin-note__entry + .margin-note__entry,
.margin-note p + p {
  margin-top: 9px;
}

.margin-note a {
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 0.72em;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 28px;
  padding-left: 1.4em;
}

.markdown-body li {
  margin: 7px 0;
  padding-left: 0.18em;
}

.markdown-body li::marker {
  color: #17657f;
}

.markdown-body .task-item {
  list-style: none;
}

.markdown-body .task-item input {
  width: 13px;
  height: 13px;
  margin: 0 10px 0 -24px;
  accent-color: #075e2f;
}

.code-block {
  position: relative;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid #343434;
  border-radius: 5px;
  background: #1e1e1e;
  box-shadow: 0 5px 16px rgba(35, 34, 31, 0.1);
}

.code-block figcaption {
  display: flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid #2b2b2b;
  background: #181818;
  color: #a8a8a8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: lowercase;
}

.code-block pre {
  margin: 0;
  padding: 10px 0 12px;
  overflow-x: auto;
  color: #d4d4d4;
  tab-size: 4;
}

.code-block code {
  display: block;
  min-width: max-content;
  counter-reset: code-line;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
}

.code-block .code-line {
  display: block;
  min-height: 1.45em;
  padding: 0 14px 0 0;
  counter-increment: code-line;
  white-space: pre;
}

.code-block .code-line::before {
  display: inline-block;
  width: 2.6em;
  margin-right: 11px;
  color: #858585;
  content: counter(code-line);
  font-variant-numeric: tabular-nums;
  text-align: right;
  user-select: none;
}

.code-block .code-line:hover {
  background: rgba(255, 255, 255, 0.035);
}

.code-block .token.comment {
  color: #6a9955;
  font-style: italic;
}

.code-block .token.keyword {
  color: #c586c0;
  font-weight: 400;
}

.code-block .token.builtin {
  color: #dcdcaa;
}

.code-block .token.constant,
.code-block .token.number {
  color: #b5cea8;
}

.code-block .token.string {
  color: #ce9178;
}

.code-block .token.operator {
  color: #d4d4d4;
}

.markdown-body .token-strip {
  display: block;
  margin: -3px 0 27px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #23221f;
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.8;
  text-align: center;
  white-space: pre-wrap;
}

.token-strip__token {
  padding: 0.08em 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.token-strip__token:nth-child(5n + 1) { background: #b4a7c2; }
.token-strip__token:nth-child(5n + 2) { background: #98b49f; }
.token-strip__token:nth-child(5n + 3) { background: #c6aa72; }
.token-strip__token:nth-child(5n + 4) { background: #bf918e; }
.token-strip__token:nth-child(5n) { background: #88aeb7; }

.math-inline {
  white-space: nowrap;
}

.math-inline .katex {
  font-size: 1.02em;
}

.math-display {
  margin: 14px 0;
  padding: 1px 0;
  overflow-x: auto;
  overflow-y: hidden;
  color: #151512;
  text-align: center;
}

.math-display .katex-display {
  margin: 0;
}

.math-display .katex {
  font-size: 1.12em;
}

.katex .enclosing.mathbbm {
  letter-spacing: 0.05em;
}

.katex .enclosing.mathbbm .mathrm {
  font-style: normal;
  text-shadow: 0.045em 0 0 currentColor;
}

.table-wrap {
  margin: 38px 0;
  overflow-x: auto;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  line-height: 1.4;
}

.markdown-body th,
.markdown-body td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(35, 34, 31, 0.13);
  text-align: left;
}

.markdown-body th {
  color: rgba(35, 34, 31, 0.58);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.markdown-body hr {
  width: 56px;
  margin: 54px auto;
  border: 0;
  border-top: 1px solid rgba(35, 34, 31, 0.3);
}

.markdown-body img,
.md-image-placeholder {
  display: block;
  width: 100%;
  margin: 38px 0;
  border: 1px solid rgba(35, 34, 31, 0.14);
  border-radius: 4px;
}

.md-image-placeholder {
  display: grid;
  min-height: 280px;
  place-content: center;
  background:
    linear-gradient(135deg, transparent 49.8%, rgba(35, 34, 31, 0.08) 50%, transparent 50.2%),
    linear-gradient(45deg, transparent 49.8%, rgba(35, 34, 31, 0.08) 50%, transparent 50.2%);
  color: rgba(35, 34, 31, 0.48);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.markdown-body .progress-mark {
  display: block;
  clear: right;
  float: right;
  width: 260px;
  margin: 4px -310px 18px 34px;
  color: rgba(35, 34, 31, 0.36);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
}

.markdown-body .progress-mark--inline {
  margin-top: 0;
}

.blog-index > header {
  margin-bottom: 30px;
}

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

.post-list li {
  padding: 22px 0;
  border-top: 1px solid rgba(35, 34, 31, 0.14);
}

.post-list a {
  display: block;
  color: #151512;
  font-size: 24px;
  text-decoration: none;
}

.post-list a:hover span {
  color: #075e2f;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.post-list p {
  max-width: 52ch;
  margin: 8px 0 0;
  color: rgba(35, 34, 31, 0.64);
  font-size: 17px;
  line-height: 1.45;
}

@media (max-width: 1400px) {
  .margin-note {
    float: none;
    width: auto;
    margin: 30px 0;
    padding: 13px 0 0 18px;
    border-top-width: 1px;
    border-left: 2px solid #17657f;
  }

  .margin-note--definition {
    border-left-color: #075e2f;
  }

  .margin-note--inline {
    margin: 18px 0;
  }

  .markdown-body .progress-mark {
    float: none;
    width: auto;
    margin: 26px 0 18px;
    text-align: right;
  }

  .markdown-body .progress-mark--inline {
    margin: 14px 0;
  }
}

@media (max-width: 900px) {
  .article-shell {
    width: min(800px, calc(100% - 48px));
    padding-top: 32px;
  }

  .blog-index {
    padding-top: 48px;
  }

}

@media (max-width: 640px) {
  .article-shell,
  .blog-index {
    width: min(100% - 40px, 800px);
    padding-bottom: 72px;
  }

  .back-link {
    margin-bottom: 36px;
  }

  .article-header {
    margin-bottom: 42px;
  }

  .article-header h1 {
    font-size: clamp(48px, 15vw, 62px);
  }

  .blog-index h1 {
    font-size: 40px;
  }

  .article-deck {
    font-size: 19px;
  }

  .markdown-body {
    font-size: 18.5px;
    line-height: 1.62;
  }

  .markdown-body h2 {
    margin-top: 52px;
    font-size: 30px;
  }

  .markdown-body h3 {
    font-size: 25px;
  }

  .section-marker {
    top: 8px;
    max-width: calc(100% - 24px);
  }

  .section-marker__level {
    display: none;
  }

  .markdown-body blockquote {
    padding-left: 18px;
    font-size: 21px;
  }

  .definition-block {
    margin: 32px 0;
    padding: 18px 18px 17px;
  }

  .definition-block__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .definition-block .math-display .katex {
    font-size: 0.82em;
  }

  .md-image-placeholder {
    min-height: 200px;
  }

  .markdown-body .token-strip {
    font-size: 16px;
  }

}

/* Reference-inspired reading layout experiment.
   Kept article-page-scoped so the writing index and home page retain their identity. */
.article-page {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
}

.article-page .article-shell {
  position: relative;
  width: min(760px, calc(100% - 64px));
  margin: 0 auto;
  padding: 58px 0 112px;
}

.article-page .article {
  width: 100%;
  margin: 0;
}

.article-page .back-link {
  display: inline-block;
  width: auto;
  margin: 0 0 27px;
  color: rgba(35, 34, 31, 0.7);
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.article-page .back-link:hover {
  color: #075e2f;
  text-decoration-color: rgba(7, 94, 47, 0.5);
  text-underline-offset: 3px;
}

.article-page .article-header {
  margin: 0 0 42px;
  padding: 0;
  border: 0;
}

.article-page .article-header h1 {
  margin: 0;
  color: #151512;
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 38px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.13;
  text-wrap: balance;
}

.article-date {
  display: block;
  margin-top: 11px;
  color: rgba(35, 34, 31, 0.58);
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.article-toc {
  position: fixed;
  z-index: 10;
  top: 94px;
  left: max(24px, calc(50vw - 616px));
  width: 184px;
  max-height: calc(100vh - 126px);
  overflow-y: auto;
  color: rgba(35, 34, 31, 0.68);
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  scrollbar-width: thin;
}

.article-toc__label {
  margin: 0 0 11px;
  color: #151512;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.article-toc > ol {
  margin: 0;
  padding: 0 0 0 13px;
  border-left: 1px solid rgba(35, 34, 31, 0.16);
  list-style: none;
}

.article-toc__subsections {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.article-toc__subsections[hidden] {
  display: none;
}

.article-toc__item {
  margin: 0;
  padding: 0;
}

.article-toc__item + .article-toc__item {
  margin-top: 5px;
}

.article-toc a {
  position: relative;
  display: block;
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
  transition: color 120ms ease;
}

.article-toc a::before {
  position: absolute;
  top: 0.15em;
  bottom: 0.15em;
  left: -14px;
  width: 2px;
  background: transparent;
  content: '';
}

.article-toc a:hover,
.article-toc a.is-active {
  color: #17657f;
}

.article-toc a.is-active {
  font-weight: 600;
}

.article-toc a.is-active::before {
  background: #17657f;
}

.article-toc__item--level-2 a {
  color: rgba(35, 34, 31, 0.88);
  font-weight: 600;
}

.article-toc__item--level-2:not(:first-child) {
  margin-top: 12px;
}

.article-toc__item--current > a {
  padding-right: 18px;
  color: #17657f;
  font-weight: 700;
}

.article-toc__item--current > a::before {
  background: #17657f;
}

.article-toc__item--current > a[aria-expanded]::after {
  position: absolute;
  top: -0.08em;
  right: 1px;
  color: rgba(23, 101, 127, 0.72);
  content: '+';
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
}

.article-toc__item--current > a[aria-expanded='true']::after {
  content: '\2212';
}

.article-toc__item--level-3 a {
  padding-left: 8px;
}

.article-toc__item--level-4 a {
  padding-left: 17px;
  color: rgba(35, 34, 31, 0.56);
  font-size: 12px;
}

.article-page .markdown-body {
  counter-reset: none;
  color: #23221f;
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17.5px;
  line-height: 1.72;
}

.article-page .markdown-body p {
  margin: 0 0 23px;
}

.article-page .markdown-body h2,
.article-page .markdown-body h3,
.article-page .markdown-body h4,
.article-page .markdown-body h5,
.article-page .markdown-body h6 {
  color: #151512;
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.018em;
  scroll-margin-top: 34px;
  text-wrap: balance;
}

.article-page .markdown-body h2 {
  margin: 54px 0 16px;
  font-size: 28px;
  line-height: 1.2;
}

.article-page .markdown-body h3 {
  margin: 46px 0 13px;
  font-size: 23px;
  line-height: 1.25;
}

.article-page .markdown-body h4 {
  margin: 38px 0 12px;
  color: #17657f;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}

.article-page .markdown-body h2::before,
.article-page .markdown-body h3::before,
.article-page .markdown-body h4::before {
  content: none;
}

.article-page .markdown-body h4::before {
  margin-right: 0.48em;
  color: rgba(23, 101, 127, 0.72);
  content: '\2014';
  font-weight: 500;
}

.article-page .markdown-body h5,
.article-page .markdown-body h6 {
  margin: 32px 0 10px;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.article-page .markdown-body strong {
  font-weight: 700;
}

.article-page .markdown-body blockquote {
  margin: 30px 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid #17657f;
  color: rgba(35, 34, 31, 0.78);
  font-size: 19px;
  font-style: italic;
  line-height: 1.58;
}

.article-page .definition-block {
  margin: 30px 0;
  padding: 18px 20px 17px;
}

.article-page .definition-block__term {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
}

.article-page .margin-note {
  float: none;
  width: auto;
  margin: 24px 0;
  padding: 12px 0 0 16px;
  border-top: 1px solid rgba(23, 101, 127, 0.32);
  border-left: 2px solid #17657f;
  font-size: 14.5px;
  line-height: 1.5;
}

.article-page .margin-note--inline {
  margin: 18px 0;
}

.article-page .markdown-body .progress-mark,
.article-page .markdown-body .progress-mark--inline {
  float: none;
  width: auto;
  margin: 22px 0 18px;
  color: rgba(35, 34, 31, 0.4);
  text-align: right;
}

.article-page .math-display {
  margin: 18px 0 22px;
}

.article-page .table-wrap {
  margin: 32px 0;
  padding-bottom: 7px;
  scrollbar-color: rgba(23, 101, 127, 0.45) transparent;
  scrollbar-width: thin;
}

.article-page .markdown-body table {
  font-size: 15.5px;
}

.series-pagination {
  display: grid;
  clear: both;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid rgba(35, 34, 31, 0.14);
}

.series-pagination__item {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  border: 1px solid rgba(35, 34, 31, 0.14);
  border-radius: 4px;
  color: #151512;
  text-decoration: none;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.series-pagination__item--next {
  align-items: flex-end;
  text-align: right;
}

.series-pagination__item:not(.is-disabled):hover {
  border-color: rgba(7, 94, 47, 0.42);
  background: rgba(7, 94, 47, 0.035);
  color: #075e2f;
}

.series-pagination__item.is-disabled {
  color: rgba(35, 34, 31, 0.38);
}

.series-pagination__label {
  margin-bottom: 6px;
  color: #17657f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.series-pagination__item.is-disabled .series-pagination__label {
  color: rgba(35, 34, 31, 0.38);
}

.series-pagination__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 1120px) {
  .article-toc {
    display: none;
  }
}

@media (min-width: 1280px) {
  .article-page .article-shell {
    margin-right: auto;
    margin-left: calc(50% - 404px);
  }

  .article-toc {
    left: max(12px, calc(50vw - 628px));
  }

  .article-page .margin-note {
    clear: right;
    float: right;
    width: 240px;
    margin: 4px -276px 24px 32px;
    padding: 12px 0 0;
    border-top: 2px solid #17657f;
    border-left: 0;
  }

  .article-page .margin-note--definition {
    border-top-color: #075e2f;
  }

  .article-page .margin-note--inline {
    margin-top: 0;
  }

  .article-page .markdown-body .progress-mark,
  .article-page .markdown-body .progress-mark--inline {
    clear: right;
    float: right;
    width: 240px;
    margin: 4px -276px 18px 32px;
  }

  .article-page .markdown-body .progress-mark--inline {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .article-page .article-shell {
    width: calc(100% - 64px);
    padding: 60px 0 80px;
  }

  .article-page .back-link {
    margin-bottom: 28px;
  }

  .article-page .article-header {
    margin-bottom: 42px;
  }

  .article-page .article-header h1 {
    font-size: 34px;
    line-height: 1.2;
  }

  .article-page .markdown-body {
    font-size: 17.5px;
    line-height: 1.7;
  }

  .article-page .markdown-body h2 {
    margin-top: 48px;
    font-size: 26px;
  }

  .article-page .markdown-body h3 {
    margin-top: 42px;
    font-size: 22px;
  }

  .article-page .markdown-body h4 {
    font-size: 17px;
  }

  .article-page .markdown-body blockquote {
    padding-left: 16px;
    font-size: 18px;
  }

  .remark-block__summary {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 4px 12px;
    padding: 13px 2px;
  }

  .remark-block__label {
    grid-column: 1;
  }

  .remark-block__title {
    grid-column: 1;
    white-space: normal;
  }

  .remark-block__toggle {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .remark-block__content {
    padding: 2px 30px 16px 0;
  }

  .series-pagination {
    gap: 10px;
    margin-top: 58px;
  }

  .series-pagination__item {
    min-height: 82px;
    padding: 14px;
  }

  .series-pagination__title {
    font-size: 14.5px;
  }
}

/* Cross-references: a pointer to a passage elsewhere in the series, previewed in place. */
.markdown-body a.xref {
  border-bottom: 1px dashed rgba(23, 101, 127, 0.55);
  color: #17657f;
  white-space: normal;
}

.markdown-body a.xref:hover,
.markdown-body a.xref.is-previewed {
  border-bottom-color: #17657f;
  border-bottom-style: solid;
  background: rgba(23, 101, 127, 0.07);
  color: #0f4f66;
}

.markdown-body a.xref:focus-visible {
  outline: 2px solid #17657f;
  outline-offset: 2px;
}

.xref__mark {
  margin-left: 0.2em;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 0.62em;
  opacity: 0.6;
  vertical-align: 0.35em;
}

.xref-anchor {
  display: inline;
  scroll-margin-top: 90px;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  scroll-margin-top: 60px;
}

.xref-previews[hidden] {
  display: none;
}

.xref-popover {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  overflow-y: auto;
  width: min(400px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 16px 20px 15px;
  border: 1px solid rgba(35, 34, 31, 0.16);
  border-radius: 5px;
  background: var(--color-background, #ffffff);
  box-shadow: 0 10px 34px rgba(35, 34, 31, 0.16), 0 2px 6px rgba(35, 34, 31, 0.07);
  color: #23221f;
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  opacity: 0;
  overscroll-behavior: contain;
  transform: translateY(-3px);
  transition: opacity 130ms ease, transform 130ms ease;
}

.xref-popover[data-placement='above'] {
  transform: translateY(3px);
}

.xref-popover.is-open {
  opacity: 1;
  transform: translateY(0);
}

.xref-popover[hidden] {
  display: none;
}

.xref-preview__source {
  margin: 0 0 5px;
  color: #17657f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.xref-preview__title {
  margin: 0 0 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(35, 34, 31, 0.12);
  color: #151512;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.xref-preview__body {
  color: rgba(35, 34, 31, 0.84);
  font-size: 15px;
  line-height: 1.55;
}

.xref-preview__body > :first-child {
  margin-top: 0;
}

.xref-preview__body > :last-child {
  margin-bottom: 0;
}

.xref-preview__body p {
  margin: 0 0 10px;
}

.xref-preview__body h3,
.xref-preview__body h4,
.xref-preview__body h5,
.xref-preview__body h6 {
  margin: 14px 0 7px;
  color: #151512;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.xref-preview__body ul,
.xref-preview__body ol {
  margin: 0 0 10px;
  padding-left: 1.3em;
}

.xref-preview__body li {
  margin: 4px 0;
}

.xref-preview__body li::marker {
  color: #17657f;
}

.xref-preview__body a {
  border-bottom: 1px solid rgba(15, 63, 36, 0.4);
  color: #075e2f;
  text-decoration: none;
}

/* Marginalia, floats, and wide blocks all have to behave inside a 400px panel. */
.xref-preview__body .margin-note,
.xref-preview__body .progress-mark,
.xref-preview__body .progress-mark--inline {
  display: block;
  float: none;
  width: auto;
  margin: 12px 0;
  padding: 8px 0 0 12px;
  border-top: 0;
  border-left: 2px solid rgba(23, 101, 127, 0.5);
  font-size: 13px;
}

.xref-preview__body .margin-note-label {
  margin-bottom: 4px;
}

.xref-preview__body .math-display {
  overflow-x: auto;
  margin: 12px 0;
  font-size: 0.86em;
}

.xref-preview__body .code-block {
  margin: 12px 0;
  font-size: 0.8em;
}

.xref-preview__body .table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
}

.xref-preview__body .definition-block,
.xref-preview__body .remark-block {
  margin: 12px 0;
  padding: 12px 14px;
  font-size: 14px;
}

.xref-preview__body img,
.xref-preview__body .md-image-placeholder {
  max-width: 100%;
}

.xref-preview__truncation {
  margin: 0;
  color: rgba(35, 34, 31, 0.45);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.xref-preview__link {
  display: inline-block;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(35, 34, 31, 0.12);
  color: #075e2f;
  font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  width: 100%;
  box-sizing: border-box;
}

.xref-preview__link::after {
  content: ' \2192';
}

.xref-preview__link:hover {
  color: #082f19;
}

/* Landing on a referenced passage, from this page or another one. */
.markdown-body :target,
.markdown-body :has(> .xref-anchor:target) {
  animation: xref-landing 1800ms ease-out;
}

@keyframes xref-landing {
  0%,
  55% {
    background-color: rgba(23, 101, 127, 0.12);
  }

  100% {
    background-color: transparent;
  }
}

@media (max-width: 640px) {
  .xref-popover {
    width: calc(100vw - 24px);
    padding: 15px 17px 14px;
  }

  .xref-preview__body {
    font-size: 14.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xref-popover {
    transform: none;
    transition: none;
  }

  .markdown-body :target,
    .markdown-body :has(> .xref-anchor:target) {
    animation: none;
  }
}
