/* ============================================================
   The Righteous Mind — a comic field guide · house style
   Cream paper, Mad-magazine palette, hand-lettered display.
   ============================================================ */

:root {
  --paper: #FBF5E4;
  --paper-deep: #F1E8C9;
  --ink: #1A1A1A;
  --ink-soft: #3D352A;
  --muted: #6C6033;
  --red: #C04D3A;
  --yellow: #F5C84B;
  --blue: #2A78C2;
  --green: #2D7A45;
  --purple: #7448B5;
  --rule: #C0B27A;
  --radius: 10px;
  --shadow: 4px 4px 0 rgba(26, 26, 26, 0.18);
  --font-display: 'Marker Felt', 'Comic Sans MS', 'Chalkboard SE', cursive;
  --font-body: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(#C0B27A59 0.35px, transparent 0.4px),
    radial-gradient(#A894564D 0.25px, transparent 0.3px);
  background-size: 6px 6px, 9px 9px;
  background-position: 0 0, 3px 4px;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.62;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ---- hero ---- */
.hero { margin-bottom: 10px; }
.hero img { display: block; width: 100%; height: auto; }

.lede {
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  background: #fffdf6;
  box-shadow: var(--shadow);
  padding: 18px 24px;
  margin: 18px 0 30px;
}
.lede p { margin: 0.5em 0; }
.lede .kicker {
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* ---- section headers ---- */
.part {
  margin: 46px 0 10px;
}
.part h2 {
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.75rem;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
  line-height: 1.2;
}
.part .part-no {
  display: inline-block;
  font-family: var(--font-display);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.85rem;
  padding: 1px 10px;
  margin-bottom: 6px;
  transform: rotate(-1.5deg);
  box-shadow: 2px 2px 0 rgba(26,26,26,0.25);
}
.part .intro {
  max-width: 62rem;
  margin: 8px 0 4px;
}
.part hr {
  border: none;
  border-bottom: 2.5px dashed var(--rule);
  margin: 10px 0 4px;
}

/* ---- comic panel grid ---- */
.phase__strip {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: 16px 0 22px;
}
.phase__strip figure {
  margin: 0;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phase__strip img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1.5px dashed var(--rule);
}
.phase__strip figcaption {
  padding: 9px 13px 12px;
  font-size: 0.87rem;
  color: var(--ink-soft);
  font-style: italic;
  flex: 1;
  line-height: 1.5;
}
.phase__strip figcaption strong {
  font-family: var(--font-display);
  color: var(--red);
  font-style: normal;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

/* cover panel spans wide */
.cover-strip { grid-template-columns: 1fr; max-width: 780px; margin-left: auto; margin-right: auto; }

/* ---- interlude divider between book and essay ---- */
.interlude {
  margin: 54px auto 40px;
  max-width: 720px;
  text-align: center;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--paper-deep);
  padding: 16px 26px;
  transform: rotate(-0.6deg);
  box-shadow: var(--shadow);
}
.interlude .stamp {
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.5rem;
  letter-spacing: 2px;
  margin: 0 0 4px;
}
.interlude p { margin: 4px 0; font-size: 0.95rem; }

/* ---- footer ---- */
footer {
  margin-top: 60px;
  border-top: 2.5px dashed var(--rule);
  padding-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: var(--blue); }
a { color: var(--blue); }

/* ---- print ---- */
@media print {
  body { background: #fff; }
  .phase__strip figure { box-shadow: none; break-inside: avoid; }
  .lede, .interlude { box-shadow: none; }
}

/* ---- the map + framework (Duck comic additions) ---- */
.map { margin: 26px 0 10px; }
.map img { display: block; width: 100%; height: auto; border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--paper); }
.map .map-note { font-size: 0.85rem; color: var(--muted); font-style: italic; margin: 8px 0 0; }

.framework { margin: 26px 0; }
.framework h3 {
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.25rem;
  letter-spacing: 0.4px;
  margin: 26px 0 6px;
}
.framework .thesis {
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  background: #fffdf6;
  box-shadow: var(--shadow);
  padding: 14px 20px;
  font-size: 1.08rem;
  margin: 10px 0 18px;
}
.framework ol, .framework ul { padding-left: 1.3em; }
.framework li { margin: 0.35em 0; }
.framework li strong { font-family: var(--font-display); color: var(--red); font-weight: 600; letter-spacing: 0.2px; }

.eras {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 12px 0 6px;
}
.eras .era {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(26,26,26,0.16);
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.eras .era .era-no {
  display: inline-block;
  font-family: var(--font-display);
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  padding: 0 7px;
  font-size: 0.78rem;
  transform: rotate(-1.5deg);
  margin-bottom: 4px;
}
.eras .era h4 { font-family: var(--font-display); color: var(--red); margin: 2px 0 4px; font-size: 1rem; font-weight: 600; }
.eras .era.here { background: var(--paper-deep); border-width: 2.5px; }
.eras .era .books { color: var(--muted); font-style: italic; }

table.themes {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 10px 0 18px;
  background: #fff;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow);
}
table.themes th, table.themes td { text-align: left; vertical-align: top; padding: 7px 9px; border-bottom: 1.5px dashed var(--rule); }
table.themes th { font-family: var(--font-display); color: var(--red); font-weight: 600; letter-spacing: 0.3px; background: var(--paper-deep); border-bottom: 2px solid var(--ink); }
table.themes td:first-child { font-family: var(--font-display); color: var(--ink); font-weight: 600; white-space: nowrap; }
table.themes tr:last-child td { border-bottom: none; }
table.themes em { color: var(--muted); }
@media (max-width: 640px) {
  table.themes { font-size: 0.78rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.themes td:first-child { white-space: normal; }
}

.tensions { 
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 10px 0 18px;
}
.tensions .t {
  border: 2px dashed var(--rule); border-radius: 8px; padding: 9px 12px; font-size: 0.88rem; background: #fffdf6;
}
.tensions .t strong { font-family: var(--font-display); color: var(--red); font-weight: 600; }
