/* ============================================================
   The American Yawp — consolidated stylesheet
   Covers the landing (TOC) page and every chapter page,
   both volumes.
   ============================================================ */

:root {
  --ink:        #1a1a1a;
  --muted:      #6b6b6b;
  --rule:       #e3e0d8;
  --link:       #7b1113;   /* deep crimson, echoes the book */
  --link-hover: #a5201f;
  --bg:         #ffffff;
  --paper:      #fbfaf7;
  --maxw:       42rem;
  --serif:      Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- site header on chapter pages ---------- */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.site-header .home {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-size: 1rem;
}
.site-header .vol-tag {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- chapter body ---------- */
.chapter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}
.eyebrow {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--link);
  margin: 0 0 0.4rem;
}
.chapter h1 {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1.12;
  margin: 0 0 1.6rem;
  letter-spacing: -0.01em;
}
.chapter h2 {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 2.4rem 0 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.chapter h3 {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 2rem 0 0.6rem;
}
.chapter p { margin: 0 0 1.15rem; }

.chapter blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 3px solid var(--rule);
  color: #333;
  font-size: 0.97em;
}
.chapter blockquote p { margin: 0 0 0.6rem; }

/* notes, recommended reading, primary-source lists: hanging indent */
p.note {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #333;
  margin: 0 0 0.55rem;
  padding-left: 1.6rem;
  text-indent: -1.6rem;
}
p.note a { overflow-wrap: anywhere; }

p.byline {
  text-align: right;
  font-style: italic;
  color: var(--muted);
  margin: 1.4rem 0;
}

/* footnote reference numbers */
sup { line-height: 0; font-size: 0.72em; }
sup a { text-decoration: none; }

/* ---------- figures ---------- */
figure {
  margin: 1.8rem 0;
  text-align: center;
}
figure img {
  border: 1px solid var(--rule);
  background: var(--paper);
}
figcaption, p.caption {
  font-family: var(--sans);
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.6rem;
  text-align: left;
}

/* image width helpers carried from the source */
.img50 { width: 50%; } .img55 { width: 55%; } .img60 { width: 60%; }
.img65 { width: 65%; } .img70 { width: 70%; } .img75 { width: 75%; }
.img80 { width: 80%; } .img90 { width: 90%; }

/* inline text decorations from the source */
.smallcaps { font-variant: small-caps; }
.underline { text-decoration: underline; }
.overline  { text-decoration: overline; }
.strike    { text-decoration: line-through; }

/* ---------- chapter prev/next nav ---------- */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 1rem auto 4rem;
  padding: 1.4rem 1.5rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.chapter-nav a { max-width: 45%; }
.chapter-nav a[href="index.html"] { color: var(--muted); }

/* ============================================================
   Landing page (two-column table of contents)
   ============================================================ */
.landing {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
.landing h1 {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0 0 0.4rem;
}
.subtitle {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 3rem;
}

/* two side-by-side columns (no table, so they stack in reading order) */
.toc {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.toc-col {
  flex: 1 1 0;
  min-width: 0;            /* let columns shrink instead of overflow */
}
.vol-head {
  font-family: 'Merriweather', 'EB Garamond', "Times New Roman", times, Georgia, serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--link);
  font-weight: 700;
  margin: 0 0 0.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-list li { margin: 0; }
.ch-list a {
  color: var(--ink);
  display: block;
  line-height: 1.4;
  padding: 0.5rem 0 0.5rem 1.6em;
  text-indent: -1.6em;      /* hanging indent: wrapped titles align, not under the number */
}
.ch-list a:hover { color: var(--link); }
.ch-no {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 0.15rem;
}

.landing-footer {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 1.06rem; }
  .chapter h1 { font-size: 1.9rem; }
  /* stack the columns: Volume 2 drops below Volume 1,
     so chapters read 1 → 28 in order */
  .toc { flex-direction: column; gap: 2.25rem; }
}
