:root {
  --bg: #fff;
  --ink: #242424;
  --muted: #6b6b6b;
  --faint: #8a8a8a;
  --line: #f2f2f2;
  --line-strong: #e6e6e6;
  --accent: #1a8917;
  --exercise: #f7f4ee;
  --exercise-edge: #1a1a1a;
  --measure: 680px;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.grid-band {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

a {
  color: inherit;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--ink);
  z-index: 20;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(calc(var(--measure) + 72px), calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 36px 48px;
  background: #fff;
}

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

.wordmark {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark span {
  font-weight: 500;
  color: var(--muted);
}

.header-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

main {
  padding: 56px 0 96px;
}

.page-kicker {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.page-title {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0 0 12px;
}

.page-dek {
  font-size: 22px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 40px;
}

.index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.index-item {
  border-bottom: 1px solid var(--line);
}

.index-item a {
  display: block;
  padding: 32px 0;
  text-decoration: none;
}

.index-item a:hover .index-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.index-part {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}

.index-title {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.022em;
  margin: 0 0 10px;
}

.index-dek {
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 14px;
}

.index-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
}

.article-kicker {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.article-title {
  font-size: clamp(34px, 5.4vw, 42px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.article-dek {
  font-size: 22px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 20px;
}

.article-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.article-body {
  font-size: 21px;
  line-height: 1.58;
  letter-spacing: -0.003em;
}

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

.article-body p {
  margin: 0 0 1.5em;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.016em;
  margin: 2.4em 0 0.55em;
}

.article-body h2 strong,
.article-body h3 strong,
.article-title strong {
  font-weight: inherit;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  margin: 2em 0 0.5em;
}

.article-body h2 + p {
  margin-top: 0.15em;
}

.article-body .section-dek {
  margin: 0 0 1.15em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

.article-body h2 + .section-dek + p {
  margin-top: 0;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.article-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

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

.article-body strong {
  font-weight: 650;
}

.article-body ul,
.article-body ol {
  padding-left: 1.2em;
  margin: 0 0 1.5em;
}

.article-body li {
  margin: 0.35em 0;
}

.article-body blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.1em;
  border-left: 3px solid var(--ink);
  color: var(--muted);
  font-style: italic;
}

.article-body img {
  display: block;
  max-width: calc(100% + 40px);
  margin: 2em -20px;
  height: auto;
}

.montage-figure {
  margin: 2.4em 0 2.6em;
}

.montage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: #111;
}

.montage img {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.montage-figure figcaption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .montage {
    grid-template-columns: repeat(2, 1fr);
  }
}

.exercise {
  background: var(--exercise);
  border-left: 3px solid var(--exercise-edge);
  padding: 1.05em 1.2em 1.05em 1.15em;
  margin: 2em 0;
}

.exercise strong:first-child {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.45em;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.article-nav a {
  font-family: var(--sans);
  text-decoration: none;
}

.article-nav .label {
  display: block;
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 6px;
}

.article-nav .title {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.article-nav a:hover .title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-nav .next {
  text-align: right;
  grid-column: 2;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
}

.status {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
}

.error {
  color: #b42318;
}

@media (max-width: 640px) {
  main {
    padding: 36px 0 72px;
  }

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

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

  .article-nav .next {
    text-align: left;
    grid-column: 1;
  }
}

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

  .progress {
    display: none;
  }
}

@media print {
  .site-header,
  .article-nav,
  .site-footer,
  .progress,
  .grid-band {
    display: none;
  }

  body {
    background: #fff;
    color: #111;
  }
}
