/* ============================================
   Reader layout for long-form articles
   Extends style.css (imported first)
   ============================================ */

body {
  background: #fafafa;
}

main.reader {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 1.75rem 6rem;
}

/* ---------- Back nav ---------- */

.reader-back {
  margin-bottom: 3rem;
  font-size: 0.75rem;
  color: #737373;
  letter-spacing: 0.005em;
}

.reader-back a {
  color: #737373;
  border-bottom: 1px solid transparent;
}

.reader-back a:hover {
  color: #171717;
  border-bottom-color: #171717;
}

/* ---------- Article typography ---------- */

.reader article {
  color: #262626;
}

.reader article h1 {
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0 0 3rem;
  color: #171717;
}

.reader-meta {
  font-size: 0.75rem;
  color: #737373;
  margin: 0 0 3rem;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

.reader-meta a {
  color: #737373;
  border-bottom: 1px solid #d4d4d4;
}

.reader-meta a:hover {
  color: #171717;
  border-bottom-color: #171717;
}

.reader article h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 2.75rem 0 1rem;
  color: #171717;
}

.reader article h2:first-of-type {
  margin-top: 0;
}

.reader article p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 0 0 1rem;
  color: #2a2a2a;
  word-break: normal;
}

.reader article a {
  color: #171717;
  border-bottom: 1px solid #c9c9c9;
}

.reader article a:hover {
  border-bottom-color: #171717;
}

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

.reader article strong {
  font-weight: 500;
  color: #171717;
}

/* ---------- Footnote reference (in-text superscript) ---------- */

.reader article .footnote-ref {
  font-size: 0.65rem;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.15rem;
  border-bottom: none;
  color: #737373;
}

.reader article .footnote-ref:hover {
  color: #171717;
}

/* ---------- Disclaimer footer ---------- */

.reader-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.reader-footer p {
  font-size: 0.75rem;
  line-height: 1.65;
  color: #737373;
  font-style: italic;
  margin: 0 0 0.35rem;
}

/* ---------- Footnotes section ---------- */

.reader-footnotes {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.reader-footnotes-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #737373;
  margin: 0 0 1rem;
}

.reader-footnotes ol {
  padding-left: 1.25rem;
  margin: 0;
  color: #525252;
}

.reader-footnotes li {
  font-size: 0.8125rem;
  line-height: 1.7;
  margin: 0 0 0.875rem;
}

.reader-footnotes li p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.reader-footnotes .footnote-backref {
  margin-left: 0.4rem;
  color: #8a8a8a;
  border-bottom: none;
  text-decoration: none;
}

.reader-footnotes .footnote-backref:hover {
  color: #171717;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  main.reader {
    padding: 2rem 1.25rem 4rem;
  }

  .reader-back {
    margin-bottom: 2rem;
  }

  .reader article h1 {
    font-size: 1.375rem;
  }

  .reader-meta {
    margin-bottom: 2rem;
  }

  .reader article h2 {
    font-size: 1rem;
    margin: 2.25rem 0 0.875rem;
  }

  .reader article p {
    font-size: 0.875rem;
    line-height: 1.7;
  }

  .reader-footnotes li {
    font-size: 0.8125rem;
  }
}
