html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --paper: #ffffff;
  --text: #1d1d1b;
  --muted: #66645e;
  --line: #ded8cc;
  --accent: #004f5f;
  --accent-soft: #e3f2f3;
  --max: 74ch;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.72;
}

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

.site-header,
.page,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  padding: 22px 0 16px;
}

.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
}

.page {
  padding: 16px 0 48px;
}

.hero {
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.post-card__kicker,
.meta,
.toc-title,
.article-source {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

h1,
h2,
h3 {
  line-height: 1.16;
  letter-spacing: 0;
}

h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 10vw, 58px);
}

h2 {
  margin: 48px 0 14px;
  font-size: clamp(26px, 7vw, 36px);
}

h3 {
  margin: 34px 0 10px;
  font-size: clamp(22px, 5.8vw, 28px);
}

p {
  margin: 0 0 1.15em;
}

.lead {
  color: #35332e;
  font-size: clamp(21px, 5.8vw, 26px);
  line-height: 1.55;
}

.post-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

.post-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
}

.post-card strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.post-card span:not(.post-card__kicker) {
  color: #3b3934;
  font-size: 16px;
  line-height: 1.5;
}

.post-card small {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.article-header {
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  max-width: 11em;
}

.article-body {
  padding-top: 24px;
}

.toc {
  margin: 24px 0 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.toc-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.toc a {
  display: inline-block;
  padding: 4px 0;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

.article-nav a {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-decoration: none;
}

.article-nav a:last-child {
  text-align: right;
}

.site-footer {
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
    line-height: 1.68;
  }

  .site-header,
  .page,
  .site-footer {
    width: min(100% - 24px, var(--max));
  }

  .hero {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-header {
    padding: 12px 0 8px;
  }

  h1 {
    margin: 8px 0 12px;
    font-size: 34px;
  }

  h2 {
    margin: 34px 0 12px;
    font-size: 25px;
  }

  h3 {
    margin: 28px 0 8px;
    font-size: 21px;
  }

  .lead {
    font-size: 19px;
    line-height: 1.5;
  }

  .post-card {
    gap: 6px;
    padding: 14px;
  }

  .post-card strong {
    font-size: 20px;
  }

  .post-card span:not(.post-card__kicker) {
    font-size: 15px;
  }

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

  .article-nav a:last-child {
    text-align: left;
  }
}
