/* Health Quarterly — light blog, 2-col body.
   Type: Source Serif 4 (one webfont, multiple weights/optical sizes)
   Palette: white canvas, near-ink, single deep-forest-green accent
   Anti-tells applied.
*/

:root {
  --canvas: #ffffff;
  --ink: #1a1d1f;
  --ink-soft: #4a5057;
  --accent: #1f4d3d;
  --accent-deep: #143229;
  --measure: 64rem;
  --col-gap: 2.5rem;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  padding: 4rem 1.5rem 1.5rem;
  text-align: center;
  max-width: var(--measure);
  margin: 0 auto;
}

.wordmark {
  font-family: "Source Serif 4", serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-variation-settings: "opsz" 60;
  letter-spacing: -0.012em;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}

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

/* ============================================================
   POST
   ============================================================ */
.post {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  position: relative;
}

.post + .post {
  border-top: none;
  padding-top: 4.5rem;
}

.post-head {
  max-width: 44rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.post-eyebrow {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  margin: 0 0 1rem;
}

.post-title {
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--accent-deep); }

.post-meta {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ------- 2-col body ------- */
.post-body {
  column-count: 2;
  column-gap: var(--col-gap);
  column-fill: balance;
}

.post-body p {
  margin: 0 0 1em;
  break-inside: avoid-column;
  orphans: 3;
  widows: 3;
}

.post-body h2 {
  column-span: all;
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-body h3 {
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 1.6rem 0 0.5rem;
  color: var(--ink);
}

.post-body ul,
.post-body ol {
  margin: 0 0 1em;
  padding-left: 1.25rem;
  break-inside: avoid-column;
}

.post-body li {
  margin: 0 0 0.5em;
}

/* dropcap on the lead paragraph */
.post-body > p:first-of-type::first-letter {
  font-family: "Source Serif 4", serif;
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 0.85;
  float: left;
  padding: 0.4rem 0.5rem 0 0;
  color: var(--accent-deep);
}

/* disclaimer breaks out of columns */
.disclaimer {
  column-span: all;
  max-width: 44rem;
  margin: 3rem auto 0;
  padding: 1.5rem 0 0;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}

/* ============================================================
   POST DIVIDER (between inlined posts on home)
   ============================================================ */
.post-divider {
  display: block;
  width: 4rem;
  height: 0.5rem;
  margin: 2rem auto 0;
  text-align: center;
  font-family: "Source Serif 4", serif;
  font-style: italic;
  color: var(--accent-deep);
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  line-height: 0.5;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-page .post {
  padding-top: 1rem;
}

/* ============================================================
   COLOPHON
   ============================================================ */
.colophon {
  margin: 4rem auto 0;
  padding: 3rem 1.5rem 4rem;
  max-width: var(--measure);
  text-align: center;
  color: var(--ink-soft);
}

.colophon-mark {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.colophon p {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-size: 1rem;
  margin: 0;
}

/* ============================================================
   404
   ============================================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

.error-page h1 {
  font-family: "Source Serif 4", serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3rem, 8vw, 5rem);
  margin: 0 0 1rem;
  color: var(--ink);
}

.error-page p {
  font-family: "Source Serif 4", serif;
  font-style: italic;
  font-size: 1.15rem;
  max-width: 30rem;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
}

/* ============================================================
   RESPONSIVE — collapse to single column on small screens
   ============================================================ */
@media (max-width: 720px) {
  .masthead { padding: 2.5rem 1.25rem 1rem; }
  .post { padding: 2rem 1.25rem 3rem; }
  .post + .post { padding-top: 3rem; }
  .post-body { column-count: 1; }
  .post-body h2 {
    column-span: none;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
  .disclaimer { text-align: left; }
  .colophon { padding: 2rem 1.25rem 3rem; }
}
