/* Design pass, loaded after each page's inline styles.
   One family (Geist) with strong weight contrast: big bold headlines,
   light supporting text, smaller and quieter metadata, wider gaps between sections. */

/* Post pages used .article-container without a definition, so content touched the viewport edge. */
.article-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Journal home + category heroes ---------- */
.hero-headline {
  font-size: clamp(44px, 7.6vw, 108px);
  font-weight: 700;
  line-height: .94;
  letter-spacing: -.058em;
  max-width: 13ch;
  margin-bottom: 36px;
  text-wrap: balance;
}
/* Home hero: bold statement + light supporting line */
.hero-headline .hh-main { display: block; }
.hero-headline .hh-sub {
  display: block;
  max-width: 34ch;
  margin-top: .55em;
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-headline:has(.hh-sub) { max-width: 16ch; }

/* ---------- Article header ---------- */
.article-header { padding: clamp(64px, 9vw, 120px) 0 48px; }
.article-breadcrumb { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 28px; }
.article-title {
  font-size: clamp(38px, 5.6vw, 76px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.052em;
  max-width: 18ch;
  margin-bottom: 24px;
  text-wrap: balance;
}
.article-subtitle {
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: -.005em;
  max-width: 58ch;
  margin-bottom: 40px;
}
.article-meta-row { font-size: 11px; gap: 28px; letter-spacing: .02em; }

/* ---------- Article body rhythm ---------- */
.article-layout { gap: clamp(40px, 5vw, 80px); padding: clamp(56px, 7vw, 96px) 0; }
.article-body h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.08;
  margin: 72px 0 22px;
  padding-bottom: 14px;
}
.article-body h3 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; margin: 40px 0 14px; }
.article-body p { font-size: 17px; line-height: 1.72; }
.toc-title { font-size: 10px; letter-spacing: .14em; }
.toc-link { font-size: 11.5px; }

@media (max-width: 760px) {
  .hero-headline { font-size: clamp(40px, 12vw, 64px); max-width: none; }
  .hero-headline .hh-sub { font-size: 17px; }
  .article-title { font-size: clamp(32px, 9vw, 48px); max-width: none; }
  .article-header { padding: 48px 0 32px; }
}

/* ---------- Overflow + small-screen details ---------- */
/* Grid children default to min-width:auto, so wide code blocks pushed the column past the viewport. */
.article-layout > *, .article-body { min-width: 0; }
.article-body pre { max-width: 100%; overflow-x: auto; }
.article-body p, .article-body li { overflow-wrap: anywhere; }
.toc-sidebar { overflow-x: hidden; scrollbar-width: thin; }
html, body { overflow-x: clip; }

@media (max-width: 768px) {
  .search-trigger span:not(.kbd-shortcut) { display: none; }
  .search-trigger { padding-inline: 10px; }
  .header-actions { gap: 6px; }
  .header-actions a[href$=".xml"], .header-actions a[title="RSS Feed"] { display: none; }
}
@media (max-width: 768px) { .article-meta-row { gap: 8px 20px; } }
