/* ============================================================================
   ATLAS OF THE FOUR QUADRANTS — KDP MASTER STYLESHEET
   Print-first editorial CSS for HTML → PDF → KDP workflow
   Preserves the house system for:
   - front matter
   - table of contents
   - part pages
   - chapter openers
   - section hierarchy
   - figures, quotes, lists, tables

   v3.5.6a — header correction + final TOC cleanup
   Cleanup goals:
     1. Remove duplicated / contradictory overrides that had accumulated.
     2. Stabilize prose styling so section intros do not drift visually.
     3. Fold front-matter fallback behavior into the main system.
     4. Consolidate Chapter 20 reference-hierarchy rules.
     5. Preserve existing print-first layout and targeted chapter treatments.
     6. First-pass squeeze: tighter body leading, rhythm, tables, and opener spacing.
     7. Second-pass squeeze: further rhythm compression, TOC tightening, and modest print-space recovery.
     8. Restoration pass: reopen chapter, TOC, and front-matter breathing room while leaving body text untouched.
   ============================================================================
*/

/* ============================================================================
   1. DESIGN TOKENS — PRINT FIRST
   ============================================================================ */

:root {
  /* Color — grayscale safe for KDP */
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #3f3f3f;
  --muted: #5f5f5f;
  --faint: #7a7a7a;
  --rule: #bdb7ae;
  --rule-strong: #8a847c;
  --rule-light: #d8d2ca;
  --accent: #000000;

  /* Per-part colors */
  --part1-color: #8c6a2d;
  --part1-color-soft: #a18149;
  --part2-color: #2f4a7d;
  --part2-color-soft: #5d7098;
  --part3-color: #7d2f2f;
  --part3-color-soft: #986060;
  --part4-color: #2f6d6a;
  --part4-color-soft: #5e8f8d;
  --part5-color: #6a4a7d;
  --part5-color-soft: #87709b;
  --part-color: #111111;
  --part-color-soft: #4d4d4d;

  /* Context palettes */
  --frontmatter-color: #304767;
  --frontmatter-color-soft: #5f728f;
  --frontmatter-rule: #cfd7e3;
  --appendix-color: #5b4b3f;
  --appendix-color-soft: #7b6a5d;
  --appendix-rule: #d8cec4;

  /* Typography */
  --font-display: "Libre Baskerville", Baskerville, serif;
  --font-serif: "EB Garamond", Garamond, serif;
  --font-sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: Menlo, Consolas, monospace;

  /* Print-friendly sizing */
  --size-body: 11pt;
  --size-body-small: 10pt;
  --size-caption: 9.25pt;
  --size-lead: 12.5pt;
  --size-subsection: 10pt;
  --size-section: 14pt;
  --size-chapter-number: 9.5pt;
  --size-chapter: 22pt;
  --size-frontmatter-title: 19pt;
  --size-part: 26pt;
  --size-toc-title: 20pt;

  /* Rhythm */
  --line-body: 1.39;
  --line-lead: 1.5;
  --line-tight: 1.2;
  --line-caption: 1.3;

  /* Spacing */
  --space-xxs: 0.04in;
  --space-xs: 0.07in;
  --space-sm: 0.10in;
  --space-md: 0.16in;
  --space-lg: 0.28in;
  --space-xl: 0.46in;
  --space-xxl: 0.82in;
  --space-xxxl: 1.25in;

  /* Measure */
  --measure-narrow: 24em;
  --measure: 30em;
  --measure-wide: 34em;

  /* Radius / borders */
  --radius-sm: 3px;
  --radius-md: 6px;
  --border-light: 1px solid var(--rule-light);
  --border-medium: 1px solid var(--rule);

  /* Heading system */
  --heading-accent: var(--ink);
  --heading-accent-soft: var(--ink-soft);
  --heading-neutral: var(--ink-soft);
  --heading-rule-color: var(--rule-strong);
  --heading-rule-soft: var(--rule);
  --h1-rule-thickness: 1.35px;
  --h2-rule-thickness: 1px;
  --h3-rule-thickness: 0.8px;
  --h1-rule-gap: 0.08in;
  --h2-rule-gap: 0.055in;
  --h3-rule-gap: 0.045in;
  --h3-rule-length: 1.05in;
  --entry-rule-length: 0.82in;

  /* Table system */
  --table-rule-strong: var(--rule-strong);
  --table-rule-light: var(--rule-light);
  --table-header-color: var(--heading-accent-soft);
  --table-label-color: var(--heading-accent);
  --table-caption-color: var(--muted);
  --table-meta-color: var(--faint);
  --table-cell-padding-y: 0.055in;
  --table-cell-padding-x: 0.045in;

  /* Figure / caption system */
  --figure-rule-color: var(--heading-rule-soft);
  --figure-label-color: var(--heading-accent);
  --figure-caption-color: var(--ink-soft);
  --figure-meta-color: var(--faint);
  --figure-caption-width: var(--measure-wide);
  --figure-caption-narrow-width: var(--measure-narrow);
  --figure-caption-gap: 0.06in;
  --figure-meta-gap: 0.035in;
  --figure-frame-border: 1px solid var(--rule-light);

  /* Pull quote */
  --pull-quote-color: var(--heading-accent);
  --pull-quote-rule: var(--heading-rule-color);
  --pull-quote-width: 24em;

  /* Compatibility tokens */
  --text: var(--ink);
  --body-size: var(--size-body);
  --chapter-heading-color: var(--heading-accent-soft);
}

[data-part="01"] {
  --part-color: var(--part1-color);
  --part-color-soft: var(--part1-color-soft);
}
[data-part="02"] {
  --part-color: var(--part2-color);
  --part-color-soft: var(--part2-color-soft);
}
[data-part="03"] {
  --part-color: var(--part3-color);
  --part-color-soft: var(--part3-color-soft);
}
[data-part="04"] {
  --part-color: var(--part4-color);
  --part-color-soft: var(--part4-color-soft);
}
.chapter,
.chapter-header,
.chapter-body,
.chapter-section,
.chapter-subsection {
  --heading-accent: var(--part-color, var(--ink));
  --heading-accent-soft: var(--part-color-soft, var(--ink-soft));
  --heading-neutral: var(--ink-soft);
  --heading-rule-color: var(--part-color, var(--rule-strong));
  --heading-rule-soft: var(--rule-strong);
}

.frontmatter,
.frontmatter-essay {
  --heading-accent: var(--frontmatter-color);
  --heading-accent-soft: var(--frontmatter-color-soft);
  --heading-neutral: var(--ink-soft);
  --heading-rule-color: var(--frontmatter-color);
  --heading-rule-soft: var(--frontmatter-rule);
}

.appendix,
.appendix-matter {
  --heading-accent: var(--appendix-color);
  --heading-accent-soft: var(--appendix-color-soft);
  --heading-neutral: var(--ink-soft);
  --heading-rule-color: var(--appendix-color);
  --heading-rule-soft: var(--appendix-rule);
}

/* ============================================================================
   2. FOUNDATION
   ============================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: var(--body-size);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.book {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a,
a:visited,
a:hover,
a:active {
  color: inherit;
  text-decoration: none;
}

/* ============================================================================
   4. BODY RHYTHM + GENERAL READING SYSTEM
   ============================================================================ */

.book p {
  margin: 0 0 0.50em 0;
  text-align: justify;
  text-indent: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  widows: 2;
  orphans: 2;
}

.book p:last-child {
  margin-bottom: 0;
}

.chapter-body p,
.section-body p,
.subsection-body p,
.appendix p {
  font-family: var(--font-serif);
  font-size: var(--size-body);
  line-height: var(--line-body);
  color: var(--ink);
  margin-bottom: 0.50em;
}

.book p:first-of-type,
.chapter-section > p:first-of-type,
.frontmatter-essay > p:first-of-type,
.chapter-body > p:first-of-type,
.section-body > p:first-of-type,
.subsection-body > p:first-of-type,
.book h1 + p,
.book h2 + p,
.book h3 + p,
.book h4 + p,
.book blockquote + p,
.book figure + p,
.book ul + p,
.book ol + p,
.book hr + p,
.lead {
  text-indent: 0;
}

.chapter-body > p.lead,
.frontmatter-essay > p.lead,
.part-page-body > p.lead {
  font-size: var(--size-lead);
  line-height: var(--line-lead);
}

.section-body > p.lead,
.subsection-body > p.lead {
  font-size: inherit;
  line-height: inherit;
}

.book ul,
.book ol {
  margin: 0.12in 0 0.18in 1.2em;
  padding-left: 1.0em;
}

.book li {
  margin-bottom: 0.08in;
}

.book li:last-child {
  margin-bottom: 0;
}

.book figure {
  margin: 0.32in auto;
}

.book figcaption {
  text-align: center;
}

/* ============================================================================
   5. FRONT MATTER SYSTEM
   ============================================================================ */

.frontmatter {
  break-before: page;
  page-break-before: always;
  margin: 0;
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) {
  min-height: auto;
  display: block;
}

.frontmatter-essay {
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.frontmatter-essay > *:first-child {
  margin-top: 0;
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
}

.frontmatter-essay > h1 {
  font-family: var(--font-display);
  font-size: var(--size-frontmatter-title);
  font-weight: 500;
  line-height: var(--line-tight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-xl);
}

.frontmatter-essay > h2 {
  font-family: var(--font-display);
  font-size: var(--size-section);
  font-weight: 400;
  line-height: var(--line-tight);
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-lg);
}

.frontmatter-essay > h3 {
  font-family: var(--font-sans);
  font-size: var(--size-subsection);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-lg) 0 var(--space-sm);
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h1,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h2,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h3 {
  text-align: left;
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h1 {
  margin-bottom: var(--space-lg);
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay p,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay li {
  width: 100%;
  max-width: none;
  text-align: left;
  text-indent: 0 !important;
  hyphens: none;
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay ul,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay ol {
  width: 100%;
  max-width: none;
  margin: 0.12in 0 0.18in;
  padding-left: 1.15em;
  text-align: left;
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay ul li,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay ol li {
  margin-bottom: 0.08em;
}

.frontmatter--essay .frontmatter-essay {
  max-width: 38em;
  margin: 0 auto;
}

.frontmatter--essay .frontmatter-essay > h1,
.frontmatter--essay .frontmatter-essay > h2,
.frontmatter--essay .frontmatter-essay > h3,
.frontmatter--essay .frontmatter-essay p,
.frontmatter--essay .frontmatter-essay li {
  text-align: left;
  text-indent: 0;
}

.frontmatter--ceremonial {
  min-height: calc(100vh - 1.2in);
  display: flex;
  align-items: center;
  justify-content: center;
}

.frontmatter--ceremonial .frontmatter-essay {
  max-width: var(--measure-narrow);
  margin: 0 auto;
  text-align: center;
}

.frontmatter--ceremonial .frontmatter-essay p,
.frontmatter--ceremonial .frontmatter-essay li {
  text-align: center;
  text-indent: 0;
}

.frontmatter--reference .frontmatter-essay {
  max-width: 30em;
  margin: 0 auto;
}

.frontmatter--reference .frontmatter-essay > h1,
.frontmatter--reference .frontmatter-essay > h2,
.frontmatter--reference .frontmatter-essay > h3,
.frontmatter--reference .frontmatter-essay p,
.frontmatter--reference .frontmatter-essay li {
  text-align: left;
  text-indent: 0;
}

.frontmatter--reference .frontmatter-essay p,
.frontmatter--reference .frontmatter-essay li {
  font-size: var(--size-body-small);
  line-height: 1.35;
}

.frontmatter--reference .frontmatter-essay ul,
.frontmatter--reference .frontmatter-essay ol {
  margin-left: 1.0em;
  padding-left: 0.8em;
}

#edition-notes {
  min-height: auto;
  display: block;
}

#edition-notes .frontmatter-essay {
  max-width: 30em;
  margin: 0 auto;
  text-align: left;
}

#edition-notes .frontmatter-essay > h1,
#edition-notes .frontmatter-essay > h2,
#edition-notes .frontmatter-essay > h3 {
  text-align: left;
}

#edition-notes .frontmatter-essay > h1 {
  margin-bottom: var(--space-lg);
}

#edition-notes .frontmatter-essay p,
#edition-notes .frontmatter-essay li {
  font-size: var(--size-body-small);
  line-height: 1.35;
  text-align: left;
  text-indent: 0;
}

#edition-notes .frontmatter-essay ul,
#edition-notes .frontmatter-essay ol {
  margin-left: 1.0em;
  padding-left: 0.8em;
}

#title-page {
  min-height: calc(100vh - 1.85in);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0;
  break-after: page;
  page-break-after: always;
}

#title-page .frontmatter-essay.title-page {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  text-align: center;
  transform: translateY(-0.22in);
  display: block;
}

.title-page {
  text-align: center;
  margin: 0;
}

.title-page h1,
#title-page h1 {
  font-family: var(--font-display);
  font-size: var(--size-part);
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.title-page h2,
#title-page h2 {
  font-family: var(--font-display);
  font-size: 15pt;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-xl);
}

.title-page p,
#title-page p {
  text-align: center;
  text-indent: 0;
}

#epigraph,
#closing-epigraph,
#dedication {
  min-height: calc(100vh - 1.2in);
  display: flex;
  align-items: center;
  justify-content: center;
}

#epigraph,
#closing-epigraph {
  break-before: page;
  page-break-before: always;
}

#epigraph .frontmatter-essay,
#closing-epigraph .frontmatter-essay,
#dedication .frontmatter-essay {
  margin: 0 auto;
  text-align: center;
}

#epigraph .frontmatter-essay,
#closing-epigraph .frontmatter-essay {
  max-width: 4.6in;
}

#epigraph .frontmatter-essay > h1,
#closing-epigraph .frontmatter-essay > h1 {
  margin: 0 0 0.18in 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-size: 17.8pt;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}

#epigraph .frontmatter-essay > h1::after,
#closing-epigraph .frontmatter-essay > h1::after {
  content: none;
}

#epigraph .frontmatter-essay p,
#epigraph .frontmatter-essay li,
#closing-epigraph .frontmatter-essay p,
#closing-epigraph .frontmatter-essay li,
#dedication .frontmatter-essay p,
#dedication .frontmatter-essay li {
  text-align: center;
  text-indent: 0;
}

#epigraph .frontmatter-essay > p:first-of-type,
#closing-epigraph .frontmatter-essay > p:first-of-type {
  max-width: 4.2in;
  margin: 0 auto 0.20in;
  line-height: 1.42;
}

#epigraph .frontmatter-essay blockquote,
#closing-epigraph .frontmatter-essay blockquote {
  max-width: 3.55in;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

#epigraph .frontmatter-essay blockquote p,
#closing-epigraph .frontmatter-essay blockquote p {
  text-align: center;
}

#dedication {
  min-height: calc(100vh - 1.4in);
}

#dedication .frontmatter-essay {
  max-width: 4.9in;
}

#dedication .frontmatter-essay > h1 {
  display: block;
  margin: 0 0 0.30in 0;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: 9.4pt;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

#dedication .frontmatter-essay > h1::after {
  content: none;
}

#dedication .frontmatter-essay p,
#dedication .frontmatter-essay li {
  font-family: var(--font-serif);
  font-size: 10.25pt;
  line-height: 1.52;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  max-width: 4.7in;
  margin: 0 auto 0.16in;
  text-align: left;
}

#dedication .frontmatter-essay p:first-of-type {
  margin-bottom: 0.20in;
}

#dedication .frontmatter-essay ul,
#dedication .frontmatter-essay ol {
  list-style: none;
  margin: 0.22in 0 0;
  padding: 0;
}

#dedication .frontmatter-essay li,
#dedication .frontmatter-essay > p:last-of-type {
  margin-top: 0.22in;
  margin-bottom: 0;
  font-size: 10.1pt;
  line-height: 1.35;
  font-style: italic;
  text-align: center;
}

#dedication .frontmatter-essay li {
  list-style: none;
}

/* ============================================================================
   6. PART PAGE SYSTEM
   ============================================================================ */

.part-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: 100vh;
  min-height: 7.0in;
  margin: 0;
  padding: var(--space-xxxl) 0;
  break-before: page;
  page-break-before: always;
}

.part-page-hero {
  width: 100%;
  max-width: 96%;
  margin: 0 auto 0.18in;
  text-align: center;
}

.part-title {
  font-family: var(--font-display);
  font-size: 0;
  font-weight: 500;
  line-height: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  color: transparent;
  margin: 0 auto 0.34in;
  text-align: center;
}

.part-page .part-title::before,
.part-page .part-title::after {
  display: block;
  color: var(--part-color, var(--ink));
}

.part-page .part-title::before {
  font-family: var(--font-sans);
  font-size: 10.2pt;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.18em;
  margin-bottom: 0.10in;
}

.part-page .part-title::after {
  font-family: var(--font-display);
  font-size: 30pt;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.035em;
  white-space: pre-line;
}

.part-page[data-part="01"] .part-title::before {
  content: "PART I";
}

.part-page[data-part="01"] .part-title::after {
  content: "UNDERSTANDING\A THE GALAXY";
}

.part-page[data-part="02"] .part-title::before {
  content: "PART II";
}

.part-page[data-part="02"] .part-title::after {
  content: "THE LIVING\A GALAXY";
}

.part-page[data-part="03"] .part-title::before {
  content: "PART III";
}

.part-page[data-part="03"] .part-title::after {
  content: "THE GEOGRAPHY\A OF THE GALAXY";
}

.part-page[data-part="04"] .part-title::before {
  content: "PART IV";
}

.part-page[data-part="04"] .part-title::after {
  content: "THE LIVING\A FRANCHISE";
}

.part-page[data-part="05"] .part-title::before {
  content: "PART V";
}

.part-page[data-part="05"] .part-title::after {
  content: "MAKING\A THE ATLAS";
}

.part-deck {
  max-width: 28em;
  margin: 0 auto 0.24in;
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--size-subsection);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.part-bar {
  display: block;
  width: 2.9in;
  max-width: 62%;
  height: 1.5pt;
  margin: 0 auto 0.22in;
  border: 0;
  background: linear-gradient(to right, transparent 0%, var(--part-color) 50%, transparent 100%);
  position: relative;
  opacity: 1;
  overflow: visible;
}

.part-bar::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  background: var(--paper);
  padding: 0 0.17in;
  font-family: var(--font-sans);
  font-size: 9pt;
  line-height: 1;
  color: var(--part-color);
}

.part-page[data-part="01"] .part-bar::before { content: "✦"; }
.part-page[data-part="02"] .part-bar::before { content: "◆"; }
.part-page[data-part="03"] .part-bar::before { content: "♥"; }
.part-page[data-part="04"] .part-bar::before { content: "♣"; }
.part-page[data-part="05"] .part-bar::before { content: "✧"; }

@media print {
  .part-bar { height: 1.25pt; }
}

.part-page-body {
  width: 100%;
  max-width: none;
  align-self: stretch;
  margin: 0;
  text-align: left;
}

.part-page-body > *:first-child {
  margin-top: 0;
}

.part-page-body p {
  width: 100%;
  max-width: none;
  margin: 0 0 0.40em 0;
  text-align: justify;
  text-indent: 0 !important;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.part-page-body p:first-of-type,
.part-page-body .lead {
  text-indent: 0;
}

.part-page-body ul,
.part-page-body ol {
  width: 100%;
  max-width: none;
  margin: 0.12in 0 0.18in;
  padding-left: 1.15em;
  text-align: left;
}

.part-page-body li {
  margin-bottom: 0;
}

.part-page-body li + li {
  margin-top: 0;
}

/* ============================================================================
   7. GLOBAL HEADING SYSTEM + UTILITY LABELS
   House rule:
   - H1 and H2 use text-width rules.
   - H3 and entry heads use short rules.
   - H4 is typographic only.
   - Utility labels are non-structural editorial markers.
   ============================================================================ */

.part-title,
.part-deck,
.toc-title,
.chapter-number,
.chapter-title,
.chapter-title-divider,
.frontmatter-essay > h1,
.frontmatter-essay > h2,
.frontmatter-essay > h3,
.appendix > h1,
.appendix > h2,
.appendix > h3,
.section-title,
.subsection-title,
.chapter-body > h2,
.section-body > h2,
.subsection-body > h2,
.chapter-body > h3,
.section-body > h3,
.subsection-body > h3,
h4,
h5 {
  page-break-after: avoid;
  break-after: avoid;
}

.chapter-title,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h1 {

  display: table;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0.09in;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--heading-accent);
}

.chapter-title::after,
.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h1::after {

  content: "";
  display: block;
  width: 100%;
  margin-top: var(--h1-rule-gap);
  border-top: var(--h1-rule-thickness) solid var(--heading-rule-color);
}

.chapter-title {
  font-size: var(--size-chapter);
  letter-spacing: 0.018em;
  text-align: center;
  margin: 0 auto var(--space-lg);
}

.frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h1 {
  font-size: var(--size-frontmatter-title);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.46in;
}

.section-title,
.frontmatter-essay > h2 {

  display: table;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0.06in;
  font-family: var(--font-display);
  font-size: var(--size-section);
  font-weight: 600;
  line-height: 1.18;
  color: var(--heading-accent);
}

.section-title::after,
.frontmatter-essay > h2::after {

  content: "";
  display: block;
  width: 100%;
  margin-top: var(--h2-rule-gap);
  border-top: var(--h2-rule-thickness) solid var(--heading-rule-color);
}

.section-title {
  margin: 0.32in 0 0.10in;
  letter-spacing: 0.015em;
}

.frontmatter-essay > h2 {
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0.26in 0 0.18in;
}

.subsection-title,
.frontmatter-essay > h3 {

  display: table;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0.04in;
  font-family: var(--font-sans);
  font-size: 9.65pt;
  font-weight: 700;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: var(--heading-accent-soft);
}

.subsection-title::after,
.frontmatter-essay > h3::after {

  content: "";
  display: block;
  width: var(--h3-rule-length);
  max-width: 100%;
  margin-top: var(--h3-rule-gap);
  border-top: var(--h3-rule-thickness) solid var(--heading-rule-soft);
}

.subsection-title {
  margin: 0.22in 0 0.08in;
}

.frontmatter-essay > h3 {
  margin: 0.30in 0 0.12in;
}

.chapter-body > h2,
.section-body > h2,
.subsection-body > h2 {
  display: block;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0;
  font-family: var(--font-display);
  font-size: var(--size-section);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.015em;
  color: var(--heading-accent);
  margin: 0.36in 0 0.14in;
}

.chapter-body > h3,
.section-body > h3,
.subsection-body > h3 {
  display: block;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0;
  font-family: var(--font-sans);
  font-size: 9.65pt;
  font-weight: 700;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: var(--heading-accent-soft);
  margin: 0.24in 0 0.10in;
}

h4,
.chapter-body > h4,
.section-body > h4,
.subsection-body > h4,
.frontmatter-essay > h4,
.appendix > h4 {
  font-family: var(--font-sans);
  font-size: 9.1pt;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.03em;
  color: var(--heading-neutral);
  text-transform: none;
  margin: 0.18in 0 0.08in;
}

.chapter-header .chapter-title,
.chapter-header .chapter-number,
.chapter-header .chapter-title-divider {
  text-align: center;
}

.chapter-header .chapter-title,
.chapter-header .chapter-number {
  display: block;
  padding-bottom: 0;
}

.chapter-header .chapter-title::after,
.chapter-header .chapter-number::after {
  content: none !important;
  display: none !important;
}

.section-header,
.subsection-header {
  margin-bottom: 0;
}

.section-header > *:last-child,
.subsection-header > *:last-child {
  margin-bottom: 0;
}

.section-header + p,
.subsection-header + p,
.section-header + ul,
.subsection-header + ul,
.section-header + ol,
.subsection-header + ol {
  margin-top: 0;
}

.chapter--dense .chapter-subsection {
  margin-top: 0.16in;
}

.chapter--dense .subsection-title {
  font-size: 9.2pt;
  letter-spacing: 0.05em;
}

/* ============================================================================
   8. CHAPTER OPENER SYSTEM
   ============================================================================ */

.chapter {
  break-before: page;
  page-break-before: always;
}

.chapter-header {
  margin-bottom: 0.24in;
}

.chapter-number {
  font-family: var(--font-sans);
  font-size: var(--size-chapter-number);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--part-color);
  text-align: center;
  margin: 0 0 0.08in;
}

.chapter-title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18in;
  margin: 0 0 0.16in;
}

.chapter-title-divider::before,
.chapter-title-divider::after {
  content: "";
  flex: 1 1 auto;
  max-width: 1.2in;
  border-top: 1px solid var(--rule-strong);
}

.chapter-title-divider-symbol {
  font-family: var(--font-sans);
  font-size: 9pt;
  line-height: 1;
  color: var(--muted);
}

.chapter-body {
  margin: 0;
}

.chapter-section.introduction,
.first-section {
  margin-top: 0;
}

.chapter-body > .chapter-section:first-child .section-title,
.chapter-body > .first-section .section-title,
.chapter-body > .chapter-section.introduction .section-title {
  margin-top: 0;
}

.chapter-section + .chapter-section {
  margin-top: 0.30in;
}

.chapter-subsection + .chapter-subsection {
  margin-top: 0.18in;
}

/* ============================================================================
   9. TABLE OF CONTENTS — FULL REPLACEMENT
   Hero / Atlas navigation pass
   ============================================================================ */

.toc-matter {
  padding: 0.78in 0 0.88in;
  position: relative;
  break-before: page;
  page-break-before: always;
}

.toc.toc--hero {
  max-width: none;
  margin: 0;
  padding: 0.20in 0 0;
  position: relative;
  border: 0;
  background: transparent;
  overflow: visible;
}

.toc.toc--hero::before {
  content: none;
}

.toc-header {
  text-align: center;
  margin: 0 0 0.46in;
}

.toc-kicker {
  margin: 0 0 0.10in;
  font-family: var(--font-sans);
  font-size: 8.1pt;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.toc-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22pt;
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}

.toc-deck {
  max-width: 26em;
  margin: 0.15in auto 0;
  font-family: var(--font-sans);
  font-size: 8.8pt;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--faint);
}

.toc-header::after {
  content: "";
  display: block;
  width: 1.8in;
  max-width: 40%;
  margin: 0.16in auto 0;
  border-top: 1px solid var(--rule-strong);
}

.toc-body {
  position: relative;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list--parts > .toc-part {
  margin: 0.26in 0 0;
  padding: 0.18in 0 0;
  border-top: 1px solid var(--rule-light);
  page-break-inside: avoid;
  break-inside: avoid;
}

.toc-list--parts > .toc-part:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.toc-part-link,
.toc-link {
  text-decoration: none;
  color: inherit;
}

.toc.toc--hero .toc-part-link {
  display: block;
  padding: 0;
}

.toc.toc--hero .toc-part-link > span,
.toc.toc--hero .toc-part-title {
  display: block;
  width: 100%;
}

.toc-part-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14.5pt;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: normal;
}

.toc-list--chapters,
.toc-list--appendix {
  margin: 0.12in 0 0;
  padding: 0;
}

.toc-entry {
  display: grid;
  grid-template-columns: 0.70in 1fr;
  gap: 0.14in;
  align-items: start;
  padding: 0.05in 0 0.055in;
  border-bottom: 1px solid transparent;
  page-break-inside: avoid;
  break-inside: avoid;
}

.toc-entry:last-child {
  border-bottom: 0;
}

.toc-num {
  font-family: var(--font-sans);
  font-size: 9.1pt;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--part-color, var(--muted));
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.toc-title-text {
  display: block;
  font-family: var(--font-serif);
  font-size: 10.8pt;
  line-height: 1.34;
  font-weight: 400;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

.toc-entry--chapter .toc-title-text,
.toc-entry--appendix .toc-title-text {
  max-width: 30em;
}

.toc-part--appendix {
  margin-top: 0.38in;
  padding-top: 0.18in;
  border-top: 1px solid var(--rule);
}

.toc-part--appendix .toc-part-title {
  color: var(--ink);
}

.toc-entry--appendix .toc-num {
  color: var(--muted);
}

.toc-list--chapters .toc-entry + .toc-entry,
.toc-list--appendix .toc-entry + .toc-entry {
  margin-top: 0.01in;
}

.toc-entry:hover,
.toc-part-link:hover,
.toc-link:hover {
  background: transparent;
}

.toc-link:hover .toc-title-text,
.toc-part-link:hover .toc-part-title {
  color: inherit;
}

@media screen {
  .toc-matter {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .toc.toc--hero {
    max-width: 62rem;
    margin: 0 auto;
    padding: 2.6rem 2.5rem 3rem;
    border: 1px solid rgba(138, 132, 124, 0.22);
    background:
      radial-gradient(circle at top center, rgba(140, 106, 45, 0.05), transparent 42%),
      linear-gradient(180deg, rgba(252, 250, 245, 0.98), rgba(247, 243, 236, 0.98));
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.55) inset,
      0 16px 42px rgba(0,0,0,0.08);
  }

  .toc.toc--hero::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 1px solid rgba(189, 183, 174, 0.40);
    pointer-events: none;
  }

  .toc-kicker {
    color: #7a6d5e;
  }

  .toc-title {
    color: #191919;
  }

  .toc-deck {
    color: #6c645a;
  }

  .toc-header::after {
    border-top: 1px solid rgba(138, 132, 124, 0.70);
  }

  .toc-list--parts > .toc-part {
    border-top-color: rgba(189, 183, 174, 0.55);
  }

  .toc-part-title,
  .toc-title-text {
    color: #1c1c1c;
  }

  .toc-num {
    color: #7a5f2e;
  }

  .toc-part-link:hover .toc-part-title,
  .toc-link:hover .toc-title-text {
    color: #8c6a2d;
  }

  .toc-entry:hover {
    background: rgba(140, 106, 45, 0.05);
  }

  .toc-part--appendix .toc-part-title {
    color: #26212c;
  }

  .toc-entry--appendix .toc-num {
    color: #705d7f;
  }
}

@media print {
  .toc.toc--hero {
    background: transparent !important;
    border: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0.22in 0 0 !important;
  }

  .toc.toc--hero::before {
    content: none !important;
  }

  .toc-kicker,
  .toc-deck,
  .toc-num {
    color: var(--muted) !important;
  }

  .toc-title,
  .toc-part-title,
  .toc-title-text {
    color: var(--ink) !important;
  }
}

.toc-header .toc-kicker,
.toc-header .toc-title,
.toc-header .toc-deck {
  text-align: center !important;
  text-indent: 0 !important;
}

/* ============================================================================
   9A. TOC STACKING + FRONT-MATTER RHYTHM
   Strengthens TOC label/title stacking and improves heading spacing.
   ============================================================================ */

.toc,
.toc.toc--hero {
  font-kerning: normal;
}

.toc .toc-part-link {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0.03in !important;
  width: 100%;
}

.toc .toc-part-link > .toc-part-title,
.toc .toc-part-title {
  display: block !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

.toc .toc-part-title {
  margin: 0 !important;
}

.toc .toc-link {
  display: block;
  min-width: 0;
}

.toc .toc-entry {
  grid-template-columns: 0.78in minmax(0, 1fr);
}

.frontmatter-essay p,
.frontmatter-essay li,
.part-page-body p {
  margin-bottom: 0.54em;
}

.frontmatter-essay > h1 + p,
.frontmatter-essay > h2 + p,
.frontmatter-essay > h3 + p,
.part-page-body h1 + p,
.part-page-body h2 + p,
.part-page-body h3 + p,
.chapter-body h1 + p,
.chapter-body h2 + p,
.chapter-body h3 + p,
.section-body h1 + p,
.section-body h2 + p,
.section-body h3 + p,
.subsection-body h1 + p,
.subsection-body h2 + p,
.subsection-body h3 + p {
  margin-top: 0;
}

.frontmatter-essay p + h1,
.frontmatter-essay p + h2,
.frontmatter-essay p + h3,
.frontmatter-essay ul + h1,
.frontmatter-essay ul + h2,
.frontmatter-essay ul + h3,
.frontmatter-essay ol + h1,
.frontmatter-essay ol + h2,
.frontmatter-essay ol + h3,
.frontmatter-essay blockquote + h1,
.frontmatter-essay blockquote + h2,
.frontmatter-essay blockquote + h3 {
  margin-top: 0.36in;
}

.frontmatter-essay > h2 {
  margin: 0.18in 0 0.12in;
}

.frontmatter-essay > h2:first-child,
.frontmatter-essay > h1:first-child,
.frontmatter-essay > h3:first-child {
  margin-top: 0;
}

.frontmatter-essay > h3 {
  margin: 0.28in 0 0.10in;
}

/* ============================================================================
   10–12. LEAN FIGURE, QUOTE, AND TABLE SYSTEMS
   Retained only for live generic markup in the current book export.
   ============================================================================ */

figure {
  width: 100%;
  max-width: 100%;
  margin: 0.34in auto;
  text-align: center;
  page-break-inside: avoid;
  break-inside: avoid;
}

figure > img,
figure > svg,
figure > video {
  margin-left: auto;
  margin-right: auto;
}

figcaption {
  max-width: var(--figure-caption-width);
  margin: var(--figure-caption-gap) auto 0;
  text-align: left;
  font-family: var(--font-sans);
  font-size: var(--size-caption);
  line-height: var(--line-caption);
  color: var(--figure-caption-color);
}

figcaption > *:first-child {
  margin-top: 0;
}

figcaption > *:last-child {
  margin-bottom: 0;
}

figcaption p {
  margin: 0;
}

.chapter figure,
.appendix figure {
  margin-top: 0.36in;
  margin-bottom: 0.34in;
}

.frontmatter figure {
  margin-top: 0.28in;
  margin-bottom: 0.28in;
}

blockquote {
  max-width: var(--pull-quote-width);
  margin: 0.30in auto;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
}

blockquote p:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.25in 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

table > caption {
  caption-side: top;
  margin: 0 0 0.10in;
  text-align: left;
  font-family: var(--font-sans);
  font-size: var(--size-body-small);
  line-height: 1.35;
  color: var(--table-caption-color);
  break-after: avoid;
  page-break-after: avoid;
}

/* Long-table pagination hardening: allow heavy tables to flow across pages
   while preserving intact rows and repeated headers. */
.chapter .section-body > table,
.chapter .subsection-body > table,
.appendix table,
.frontmatter--reference table {
  break-inside: auto;
  page-break-inside: auto;
}

.chapter .section-body > table thead,
.chapter .subsection-body > table thead,
.appendix table thead,
.frontmatter--reference table thead {
  display: table-header-group;
}

.chapter .section-body > table tfoot,
.chapter .subsection-body > table tfoot,
.appendix table tfoot,
.frontmatter--reference table tfoot {
  display: table-footer-group;
}

.chapter .section-body > table tr,
.chapter .subsection-body > table tr,
.appendix table tr,
.frontmatter--reference table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.appendix > h1 + table,
.appendix > h2 + table,
.appendix > h3 + table,
.appendix p + table,
.chapter .section-body > p + table,
.chapter .subsection-body > p + table {
  break-before: avoid;
  page-break-before: avoid;
}

th {
  padding: 0.07in 0.06in 0.06in;
  font-family: var(--font-sans);
  font-size: 8.7pt;
  font-weight: 700;
  line-height: 1.22;
  text-align: left;
  vertical-align: bottom;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--table-header-color);
}

td {
  font-size: var(--size-body-small);
  line-height: 1.36;
}

.chapter .section-body > table,
.chapter .subsection-body > table:not(:first-child) {
  table-layout: auto;
  margin-top: 0.12in;
  margin-bottom: 0.26in;
}

.appendix table {
  table-layout: fixed;
  margin-top: 0.12in;
  margin-bottom: 0.26in;
}

.chapter .section-body > table thead th,
.chapter .subsection-body > table:not(:first-child) thead th,
.appendix table thead th {
  border-top: 1px solid var(--table-rule-strong);
  border-bottom: 1px solid var(--table-rule-strong);
  padding: 0.055in 0.06in;
  font-size: 8pt;
  letter-spacing: 0.06em;
  text-align: left;
  vertical-align: bottom;
  color: var(--table-header-color);
}

.chapter .section-body > table tbody td,
.chapter .subsection-body > table:not(:first-child) tbody td,
.appendix table tbody td {
  padding: 0.055in 0.07in;
  border-bottom: 1px solid var(--table-rule-light);
}

.chapter .section-body > table thead th:first-child:nth-last-child(2),
.chapter .subsection-body > table:not(:first-child) thead th:first-child:nth-last-child(2),
.chapter .section-body > table tbody td:first-child:nth-last-child(2),
.chapter .subsection-body > table:not(:first-child) tbody td:first-child:nth-last-child(2) {
  width: 32%;
  padding-right: 0.18in;
  font-weight: 600;
  color: var(--ink);
}

.chapter .section-body > table thead th:last-child:nth-child(2),
.chapter .subsection-body > table:not(:first-child) thead th:last-child:nth-child(2),
.chapter .section-body > table tbody td:last-child:nth-child(2),
.chapter .subsection-body > table:not(:first-child) tbody td:last-child:nth-child(2) {
  width: 68%;
  padding-left: 0.04in;
}

.chapter .section-body > table thead th:first-child:nth-last-child(3),
.chapter .subsection-body > table:not(:first-child) thead th:first-child:nth-last-child(3),
.chapter .section-body > table tbody td:first-child:nth-last-child(3),
.chapter .subsection-body > table:not(:first-child) tbody td:first-child:nth-last-child(3) {
  width: 22%;
  padding-right: 0.14in;
  font-weight: 600;
  color: var(--ink);
}

.chapter .section-body > table thead th:nth-child(2):nth-last-child(2),
.chapter .subsection-body > table:not(:first-child) thead th:nth-child(2):nth-last-child(2),
.chapter .section-body > table tbody td:nth-child(2):nth-last-child(2),
.chapter .subsection-body > table:not(:first-child) tbody td:nth-child(2):nth-last-child(2) {
  width: 34%;
  padding-left: 0.02in;
  padding-right: 0.10in;
}

.chapter .section-body > table thead th:last-child:nth-child(3),
.chapter .subsection-body > table:not(:first-child) thead th:last-child:nth-child(3),
.chapter .section-body > table tbody td:last-child:nth-child(3),
.chapter .subsection-body > table:not(:first-child) tbody td:last-child:nth-child(3) {
  width: 44%;
  padding-left: 0.04in;
}

.chapter .section-body > table thead th:first-child:nth-last-child(4),
.chapter .subsection-body > table:not(:first-child) thead th:first-child:nth-last-child(4),
.chapter .section-body > table tbody td:first-child:nth-last-child(4),
.chapter .subsection-body > table:not(:first-child) tbody td:first-child:nth-last-child(4) {
  width: 8%;
  padding-right: 0.12in;
}

.chapter .section-body > table thead th:nth-child(2):nth-last-child(3),
.chapter .subsection-body > table:not(:first-child) thead th:nth-child(2):nth-last-child(3),
.chapter .section-body > table tbody td:nth-child(2):nth-last-child(3),
.chapter .subsection-body > table:not(:first-child) tbody td:nth-child(2):nth-last-child(3) {
  width: 16%;
  padding-left: 0.03in;
  padding-right: 0.10in;
}

.chapter .section-body > table thead th:nth-child(3):nth-last-child(2),
.chapter .subsection-body > table:not(:first-child) thead th:nth-child(3):nth-last-child(2),
.chapter .section-body > table tbody td:nth-child(3):nth-last-child(2),
.chapter .subsection-body > table:not(:first-child) tbody td:nth-child(3):nth-last-child(2) {
  width: 22%;
  padding-left: 0.03in;
  padding-right: 0.10in;
}

.chapter .section-body > table thead th:last-child:nth-child(4),
.chapter .subsection-body > table:not(:first-child) thead th:last-child:nth-child(4),
.chapter .section-body > table tbody td:last-child:nth-child(4),
.chapter .subsection-body > table:not(:first-child) tbody td:last-child:nth-child(4) {
  width: 54%;
  padding-left: 0.05in;
}

.appendix table thead th:first-child:nth-last-child(2),
.appendix table tbody td:first-child:nth-last-child(2) {
  width: 35%;
  padding-right: 0.16in;
  font-weight: 600;
  color: var(--ink);
}

.appendix table thead th:last-child:nth-child(2),
.appendix table tbody td:last-child:nth-child(2) {
  width: 65%;
  padding-left: 0.04in;
}

.appendix table thead th:first-child:nth-last-child(3),
.appendix table tbody td:first-child:nth-last-child(3) {
  width: 22%;
  padding-right: 0.10in;
  font-weight: 600;
  color: var(--ink);
}

.appendix table thead th:nth-child(2):nth-last-child(2),
.appendix table tbody td:nth-child(2):nth-last-child(2) {
  width: 30%;
  padding-left: 0.02in;
  padding-right: 0.08in;
}

.appendix table thead th:last-child:nth-child(3),
.appendix table tbody td:last-child:nth-child(3) {
  width: 48%;
  padding-left: 0.04in;
}

.appendix table thead th:first-child:nth-last-child(4),
.appendix table tbody td:first-child:nth-last-child(4) {
  width: 18%;
  padding-right: 0.08in;
  font-weight: 600;
  color: var(--ink);
}

.appendix table thead th:nth-child(2):nth-last-child(3),
.appendix table tbody td:nth-child(2):nth-last-child(3) {
  width: 22%;
  padding-left: 0.02in;
  padding-right: 0.06in;
}

.appendix table thead th:nth-child(3):nth-last-child(2),
.appendix table tbody td:nth-child(3):nth-last-child(2) {
  width: 26%;
  padding-left: 0.02in;
  padding-right: 0.06in;
}

.appendix table thead th:last-child:nth-child(4),
.appendix table tbody td:last-child:nth-child(4) {
  width: 34%;
  padding-left: 0.04in;
}

.chapter .subsection-body > table:first-child {
  width: 100%;
  max-width: 26em;
  table-layout: fixed;
  margin-top: 0.12in;
  margin-bottom: 0.26in;
  border-top: 1px solid var(--table-rule-strong);
  border-bottom: 1px solid var(--table-rule-light);
}

.chapter .subsection-body > table:first-child thead th {
  border-top: 0;
  border-bottom: 1px solid var(--table-rule-strong);
  padding: 0.055in 0.085in;
  font-size: 8pt;
  letter-spacing: 0.06em;
  color: var(--table-header-color);
  background: none;
}

.chapter .subsection-body > table:first-child tbody td {
  padding: 0.075in 0.06in;
  border-bottom: 1px solid var(--table-rule-light);
}

.chapter .subsection-body > table:first-child tbody td:first-child {
  width: 32%;
  padding-right: 0.18in;
  font-family: var(--font-sans);
  font-size: var(--size-body-small);
  font-weight: 600;
  line-height: 1.36;
  color: var(--ink);
}

.chapter .subsection-body > table:first-child tbody td:last-child {
  width: 68%;
  padding-left: 0.04in;
}

.chapter .subsection-body > table:first-child + p {
  margin-top: 0;
}

/* ============================================================================
   13A. DENSE / REFERENCE CHAPTER POLISH
   Shared rhythm for markdown-driven dense and reference chapters.
   ============================================================================ */

.chapter--dense .chapter-header,
.chapter--reference .chapter-header {
  margin-bottom: 0.66in;
}

.chapter--dense .chapter-title,
.chapter--reference .chapter-title {
  max-width: 18em;
  margin-left: auto;
  margin-right: auto;
}

.chapter--dense .chapter-body,
.chapter--reference .chapter-body {
  max-width: none;
}

.chapter--dense .chapter-section,
.chapter--reference .chapter-section {
  page-break-inside: avoid;
  break-inside: avoid;
}

.chapter--reference .chapter-section + .chapter-section {
  margin-top: 0.42in;
}

.chapter--dense .section-header,
.chapter--reference .section-header {
  margin-bottom: 0.16in;
}

.chapter--dense .section-title,
.chapter--reference .section-title {
  font-size: 15pt;
  line-height: 1.16;
  letter-spacing: 0.02em;
  margin: 0.42in 0 0.16in;
}

.chapter--dense .chapter-section:first-child .section-title,
.chapter--reference .chapter-section:first-child .section-title {
  margin-top: 0;
}

.chapter--dense .subsection-title,
.chapter--reference .subsection-title {
  font-family: var(--font-sans);
  font-size: 9.25pt;
  line-height: 1.22;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin: 0.24in 0 0.10in;
}

.chapter--dense .section-body p,
.chapter--reference .section-body p,
.chapter--dense .subsection-body p,
.chapter--reference .subsection-body p {
  margin-bottom: 0.46em;
}

.chapter--dense .section-body > p:first-of-type,
.chapter--reference .section-body > p:first-of-type {
  margin-top: 0;
}

.chapter--dense .section-body p + .subsection-title,
.chapter--dense .section-body ul + .subsection-title,
.chapter--dense .section-body ol + .subsection-title,
.chapter--reference .section-body p + .subsection-title,
.chapter--reference .section-body ul + .subsection-title,
.chapter--reference .section-body ol + .subsection-title {
  margin-top: 0.26in;
}

.chapter--dense .chapter-section table,
.chapter--reference .chapter-section table,
.appendix table {
  margin: 0.18in 0 0.28in;
  border-top: 1.5px solid var(--rule-strong);
}

.chapter--dense thead,
.chapter--reference thead,
.appendix thead {
  border-bottom: 1px solid var(--rule-strong);
}

.chapter--dense tbody tr:not(:last-child),
.chapter--reference tbody tr:not(:last-child),
.appendix tbody tr:not(:last-child) {
  border-bottom: 1px solid var(--rule-light);
}

.chapter--dense th,
.chapter--reference th,
.appendix th {
  padding: 0.07in 0.06in 0.06in;
  font-size: 8.7pt;
  letter-spacing: 0.06em;
  text-align: left;
  vertical-align: bottom;
  color: var(--ink-soft);
}

.chapter--dense td,
.chapter--reference td,
.appendix td {
  padding: 0.075in 0.06in;
  font-size: 10.2pt;
  line-height: 1.34;
}

.chapter--dense td > *:first-child,
.chapter--reference td > *:first-child,
.appendix td > *:first-child {
  margin-top: 0;
}

.chapter--dense td > *:last-child,
.chapter--reference td > *:last-child,
.appendix td > *:last-child {
  margin-bottom: 0;
}

.chapter--reference .section-title {
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.chapter--reference .subsection-title {
  color: var(--chapter-heading-color);
}

.chapter--dense .section-body ul,
.chapter--dense .section-body ol,
.chapter--reference .section-body ul,
.chapter--reference .section-body ol {
  margin-top: 0.10in;
  margin-bottom: 0.18in;
}

.chapter--dense .section-body li + li,
.chapter--reference .section-body li + li {
  margin-top: 0.03in;
}

.chapter--dense .section-body blockquote,
.chapter--reference .section-body blockquote {
  margin-top: 0.22in;
  margin-bottom: 0.22in;
}

/* ============================================================================
   13B. TOC HEADER + FRONT-MATTER SPACING
   High-specificity overrides for local preview spacing.
   ============================================================================ */

.book .toc-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: center !important;
}

.book .toc-header p,
.book .toc-header .toc-kicker,
.book .toc-header .toc-deck,
.book .toc-header .toc-title {
  text-align: center !important;
  text-indent: 0 !important;
}

.book .toc-header .toc-kicker {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 0 0.11in !important;
}

.book .toc-header .toc-title {
  display: block;
  width: 100%;
  margin: 0 !important;
}

.book .toc-header .toc-deck {
  display: block;
  width: 100%;
  max-width: 24em !important;
  margin: 0.12in auto 0 !important;
  font-size: 8.6pt !important;
  line-height: 1.42 !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  font-variant: small-caps;
}

.book .toc-header::after {
  width: 1.9in;
  max-width: 42%;
  margin: 0.15in auto 0;
}

.book .frontmatter--essay .frontmatter-essay > h1,
.book .frontmatter:not(#title-page):not(#epigraph):not(#closing-epigraph):not(#dedication) .frontmatter-essay > h1 {
  margin-bottom: 0.42in !important;
}

.book .frontmatter + .frontmatter .frontmatter-essay > h1 {
  margin-top: 0.46in !important;
}

.book .frontmatter-essay > h2 {
  margin-top: 0.32in !important;
  margin-bottom: 0.12in !important;
}

.book .frontmatter-essay > h2:first-child {
  margin-top: 0 !important;
}

.book .frontmatter-essay > h3 {
  margin-top: 0.30in !important;
  margin-bottom: 0.12in !important;
}

.book .frontmatter-essay > h3:first-child {
  margin-top: 0 !important;
}

.book .frontmatter-essay > h1 + p,
.book .frontmatter-essay > h2 + p,
.book .frontmatter-essay > h3 + p {
  margin-top: 0 !important;
}

/* ============================================================================
   13C. PART PAGE / CHAPTER OPENER / APPENDIX POLISH
   High-value visual refinement after TOC and front-matter stabilization.
   ============================================================================ */

.book .part-page {
  padding-top: 1.45in;
  padding-bottom: 1.10in;
}

.book .part-page-hero {
  margin-bottom: 0.28in;
}

.book .part-title {
  max-width: none;
  margin: 0 auto 0.40in;
  line-height: 0;
}

.book .part-page .part-title::before {
  margin-bottom: 0.12in;
}

.book .part-deck {
  max-width: 30em;
  margin: 0 auto 0.28in;
  line-height: 1.32;
  letter-spacing: 0.10em;
}

.book .chapter-title {
  max-width: 17em;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.12;
}

.book .appendix-matter {
  padding-top: 0.20in;
}

.book .appendix {
  break-inside: avoid;
  page-break-inside: avoid;
}

.book .appendix + .appendix {
  margin-top: 0.72in;
}

.book .appendix-intro {
  margin-bottom: 0.66in;
}

.book .appendix > h1 {
  display: table;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0.09in;
  font-family: var(--font-display);
  font-size: 18pt;
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--heading-accent);
  margin: 0 0 0.26in;
}

.book .appendix > h1::after {
  content: "";
  display: block;
  width: 100%;
  margin-top: var(--h1-rule-gap);
  border-top: var(--h1-rule-thickness) solid var(--heading-rule-color);
}

.book .appendix > h2 {
  display: table;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0.06in;
  font-family: var(--font-display);
  font-size: 13.5pt;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.015em;
  color: var(--heading-accent);
  margin: 0.36in 0 0.14in;
}

.book .appendix > h2::after {
  content: "";
  display: block;
  width: 100%;
  margin-top: var(--h2-rule-gap);
  border-top: var(--h2-rule-thickness) solid var(--heading-rule-color);
}

.book .appendix > h3 {
  display: table;
  width: auto;
  max-width: 100%;
  position: relative;
  padding-bottom: 0.04in;
  font-family: var(--font-sans);
  font-size: 9.4pt;
  font-weight: 700;
  line-height: 1.20;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  margin: 0.24in 0 0.10in;
  color: var(--heading-accent-soft);
}

.book .appendix > h3::after {
  content: "";
  display: block;
  width: var(--h3-rule-length);
  max-width: 100%;
  margin-top: var(--h3-rule-gap);
  border-top: var(--h3-rule-thickness) solid var(--heading-rule-soft);
}

.book .appendix p,
.book .appendix li {
  font-size: var(--size-body-small);
  line-height: 1.42;
}

.book .appendix .lead {
  font-size: 11.4pt;
  line-height: 1.48;
}

.book .appendix ul,
.book .appendix ol {
  margin-top: 0.10in;
  margin-bottom: 0.18in;
}

.book .appendix-entry {
  padding-top: 0.08in;
  border-top: 1px solid var(--rule-light);
}

.book .appendix-entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}

/* ============================================================================
   14. SCREEN PREVIEW — MINIMAL AND PRINT-LIKE
   ============================================================================ */

@media screen {
  body {
    background: #ffffff;
  }

  .book {
    max-width: 9.25in;
    margin: 0.5in auto;
    padding: 0.35in 0.45in;
    border: 1px solid #e6e2db;
  }
}

/* ============================================================================
   14. CHAPTER PROSE + TABLE POLISH
   Final rhythm and compact-table refinements for live chapter markup.
   ============================================================================ */

/* Dividers: keep one rule, suppress accidental duplicate markdown rules */
.chapter .section-body > hr,
.chapter .subsection-body > hr {
  border: 0;
  border-top: 1px solid var(--rule-light);
  margin: 0.18in 0 0;
}

.chapter .section-body > hr + hr,
.chapter .subsection-body > hr + hr {
  display: none;
}

/* Included-civilizations lists */
.chapter .section-body ul {
  margin-top: 0.08in;
  margin-bottom: 0.18in;
}

.chapter .section-body li + li {
  margin-top: 0.03in;
}

/* Preserve line wrapping for long taxonomy or related-value cells */
.chapter .section-body > table td:first-child,
.chapter .subsection-body > table td:first-child,
.chapter .section-body > table th:first-child,
.chapter .subsection-body > table th:first-child,
.appendix table td:first-child,
.appendix table th:first-child {
  white-space: normal;
}

/* ============================================================================
   15. SCREEN REFINEMENTS
   ============================================================================ */

@media screen {
  .chapter .section-body > table,
  .chapter .subsection-body > table {
    font-kerning: normal;
  }
}

/* Table body normalization: only header cells should carry bold weight. */
.chapter .section-body > table tbody td:first-child,
.chapter .subsection-body > table tbody td:first-child,
.appendix table tbody td:first-child {
  font-weight: 400;
  color: var(--ink);
}

/* ============================================================================
   16. TOC + FINAL NORMALIZATION
   ============================================================================ */

.toc-part,
.toc-entry,
.toc-link {
  min-width: 0;
}

.toc-list--parts > .toc-part {
  position: relative;
}

.toc-title-text,
.toc-link > .toc-title-text {
}

.toc-entry .toc-link,
.toc-entry > a.toc-link,
.toc-entry > .toc-link {
  display: block;
  width: 100%;
}

@media screen {
  .toc-link,
  .toc-part-link {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
  }

  .toc-link:hover,
  .toc-link:focus-visible {
    background: rgba(140, 106, 45, 0.05);
  }

  .toc-link:hover .toc-num,
  .toc-link:focus-visible .toc-num {
    color: var(--heading-accent);
  }

  .toc-link:focus-visible,
  .toc-part-link:focus-visible {
    outline: 1px solid rgba(140, 106, 45, 0.45);
    outline-offset: 0.04in;
  }
}

/* ============================================================================
   17. FRONTISPIECE MAP PLATES
   Generated from templates/map.html and book/assets/map-*.png
   ============================================================================ */

.frontmatter--plate,
.map-page {
  break-before: page;
  page-break-before: always;
  min-height: calc(100vh - 1.2in);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  background: #fff;
}

.frontmatter--map {
  --heading-accent: var(--frontmatter-color);
  --heading-accent-soft: var(--frontmatter-color-soft);
}

.map-page .plate-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.map-page img {
  display: block;
  width: 7.6in;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.map-page--left .plate-frame {
  padding-right: 0.08in;
}

.map-page--right .plate-frame {
  padding-left: 0.08in;
}

@media screen {
  .map-page {
    min-height: 90vh;
    padding: 0.4in 0;
  }

  .map-page img {
    width: min(7.6in, 100%);
  }
}
/* ============================================================================
   16. KDP PREFLIGHT CONSOLIDATION + TITLE-PAGE REDESIGN
   Assumption: 8.5" × 11" non-bleed interior.
   Goals:
   - strengthen title-page hierarchy
   - tighten TOC page breaking and spacing
   - make reference tables sit inside a cleaner print measure
   - harden image/table widths against margin drift
   ============================================================================ */

#title-page {
  min-height: calc(100vh - 1.65in);
  padding: 0;
}

#title-page .frontmatter-essay.title-page {
  width: 100%;
  max-width: 5.95in;
  margin: 0 auto;
  text-align: center;
  transform: translateY(-0.42in);
}

#title-page .frontmatter-essay.title-page > * {
  text-indent: 0 !important;
  text-align: center;
}

.title-page h1,
#title-page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24.5pt;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #202734;
}

.title-page h2,
#title-page h2,
#title-page .frontmatter-essay.title-page > p:first-of-type {
  max-width: 4.95in;
  margin: 0.22in auto 0;
  font-family: var(--font-sans);
  font-size: 9.1pt;
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #617188;
}

#title-page hr {
  width: 3.85in;
  max-width: 82%;
  margin: 0.20in auto 0.18in;
  border: 0;
  border-top: 0.85px solid #95a4b8;
  height: 0;
}

#title-page .frontmatter-essay.title-page > p:last-of-type {
  display: inline-block;
  width: auto;
  margin: 0 auto;
  text-align: center;
  text-indent: 0 !important;
  font-family: var(--font-sans);
  font-size: 8.95pt;
  line-height: 1.2;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.16em;
  color: #2b3442;
}

/* TOC: keep the opener with content and reduce stranded whitespace */
.toc-matter {
  padding: 0.56in 0 0.64in;
}

.toc.toc--hero {
  padding: 0.08in 0 0;
}

.toc-header {
  margin: 0 0 0.28in;
}

.toc-deck {
  max-width: 24em;
  margin-top: 0.10in;
}

.toc-header::after {
  width: 1.55in;
  margin-top: 0.12in;
}

.toc-list--parts > .toc-part {
  margin: 0.18in 0 0;
  padding: 0.12in 0 0;
  page-break-inside: auto;
  break-inside: auto;
}

.toc-list--chapters,
.toc-list--appendix {
  margin-top: 0.08in;
}

.toc-entry {
  grid-template-columns: 0.58in 1fr;
  gap: 0.11in;
  padding: 0.038in 0 0.042in;
}

/* Reference/table pages: cleaner measure and safer page fit */
.frontmatter--reference table,
#edition-notes table,
.chapter table,
.appendix table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

#edition-notes .frontmatter-essay,
.frontmatter--reference .frontmatter-essay {
  max-width: 5.80in;
  margin-left: auto;
  margin-right: auto;
}

#edition-notes .frontmatter-essay > h2,
#edition-notes .frontmatter-essay > h3 {
  margin-top: 0.30in;
  margin-bottom: 0.10in;
}

#edition-notes table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0.08in 0 0.18in 0;
  table-layout: fixed;
}

#edition-notes th,
#edition-notes td {
  text-align: left;
  vertical-align: top;
  padding: 0.022in 0 0.03in 0;
}

#edition-notes th {
  font-family: var(--font-sans);
  font-size: 8.0pt;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--frontmatter-color-soft);
  border-bottom: 0.7px solid var(--frontmatter-rule);
  padding-bottom: 0.05in;
}

#edition-notes td {
  font-size: var(--size-body-small);
  line-height: 1.28;
  border-bottom: 0.35px solid rgba(48, 71, 103, 0.10);
}

#edition-notes table th:first-child,
#edition-notes table td:first-child {
  width: 0.44in;
  padding-right: 0.10in;
}

#edition-notes table th:last-child,
#edition-notes table td:last-child {
  width: auto;
}

#edition-notes table:last-of-type th:first-child,
#edition-notes table:last-of-type td:first-child {
  width: 2.05in;
  padding-right: 0.14in;
}

#edition-notes table:last-of-type th:last-child,
#edition-notes table:last-of-type td:last-child {
  width: auto;
}

#edition-notes p {
  max-width: 5.80in;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

/* Dedication reminder for next front-matter polish pass:
   keep the opening dedication thought in one paragraph with a forced Markdown line break. */

/* Margin-safety hardening for print-critical objects */
.chapter-body,
.section-body,
.subsection-body,
.frontmatter-essay,
.appendix,
.part-page-body {
  overflow-wrap: normal;
  word-break: normal;
}

img,
svg,
figure {
  max-width: 100%;
}

.map-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Keep opening heads with at least some following content */
.frontmatter-essay > h1,
.frontmatter-essay > h2,
.frontmatter-essay > h3,
.chapter-body > h2,
.chapter-body > h3,
.appendix > h1,
.appendix > h2,
.appendix > h3 {
  orphans: 3;
  widows: 3;
}

/* === FINAL LOCK PASS: MUST-CHANGE IMPLEMENTATION ================================= */
/* TOC lock: denser opener, cleaner grouping, no leader-dot styling */
.toc-matter {
  padding: 0.58in 0 0.66in !important;
  break-before: right;
  page-break-before: right;
}

.toc.toc--hero {
  padding-top: 0.10in !important;
}

.toc-header {
  margin-bottom: 0.28in !important;
  break-after: avoid;
  page-break-after: avoid;
}

.toc-header::after {
  width: 1.55in !important;
  margin-top: 0.14in !important;
}

.toc-body,
.toc-list,
.toc-part {
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.toc-list--parts > .toc-part {
  margin: 0.18in 0 0 !important;
  padding: 0.12in 0 0 !important;
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.toc-list--parts > .toc-part:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.toc-part-link,
.toc-part-title {
  break-after: avoid;
  page-break-after: avoid;
}

.toc-list--chapters,
.toc-list--appendix {
  margin-top: 0.08in !important;
}

.toc-entry {
  grid-template-columns: 0.56in minmax(0, 1fr) !important;
  gap: 0.09in !important;
  padding: 0.038in 0 0.042in !important;
}

.toc-entry--chapter .toc-title-text,
.toc-entry--appendix .toc-title-text {
  max-width: none !important;
}

.toc-part--appendix {
  margin-top: 0.24in !important;
  padding-top: 0.12in !important;
}

.toc-link::after,
.toc-part-link::after {
  content: none !important;
}

/* Widow/orphan and runt-line pressure reduction */
p,
li,
blockquote p {
  orphans: 4;
  widows: 4;
}

.chapter-header,
.section-title,
.subsection-title,
.frontmatter-essay > h1,
.frontmatter-essay > h2,
.frontmatter-essay > h3,
.toc-header,
.toc-part-title,
figure,
figcaption,
table,
blockquote {
  break-after: avoid;
  page-break-after: avoid;
}

.chapter-body,
.section-body,
.subsection-body,
.chapter-section,
.chapter-subsection,
.frontmatter-essay,
.appendix,
.part-page-body {
  break-inside: auto;
  page-break-inside: auto;
}

/* Front-matter family consistency */
#epigraph .frontmatter-essay,
#closing-epigraph .frontmatter-essay {
  max-width: 4.5in !important;
}

#dedication .frontmatter-essay {
  max-width: 4.8in !important;
}

#dedication .frontmatter-essay > h1,
#epigraph .frontmatter-essay > h1,
#closing-epigraph .frontmatter-essay > h1 {
  letter-spacing: 0.16em;
}

.chapter-body > p:first-of-type,
.section-body > p:first-of-type,
.subsection-body > p:first-of-type {
  text-indent: 0 !important;
}

/* Edition Notes table lock */
#edition-notes .frontmatter-essay {
  max-width: 5.65in !important;
}

#edition-notes table {
  margin: 0.07in 0 0.16in !important;
}

#edition-notes th {
  padding-bottom: 0.045in !important;
}

#edition-notes td {
  padding-top: 0.022in !important;
  padding-bottom: 0.03in !important;
}

#edition-notes table th:first-child,
#edition-notes table td:first-child {
  width: 0.42in !important;
}

#edition-notes table:last-of-type th:first-child,
#edition-notes table:last-of-type td:first-child {
  width: 2.10in !important;
}

/* Map / plate fit and special-page stability */
.map-page {
  break-before: page !important;
  page-break-before: always !important;
  break-after: page !important;
  page-break-after: always !important;
}

.map-page .plate-frame {
  width: 100%;
  max-width: 100% !important;
  margin: 0 auto !important;
}

.map-page img {
  max-width: 100% !important;
  height: auto !important;
}

.map-page--left .plate-frame {
  padding-right: 0.015in !important;
}

.map-page--right .plate-frame {
  padding-left: 0.015in !important;
}

/* === PRE-INDEX CLEANUP PASS ======================================================= */
/* Stronger anti-runt pressure without over-tightening the book */
p,
li,
blockquote p {
  orphans: 5;
  widows: 5;
}

.chapter-header,
.section-title,
.subsection-title,
.frontmatter-essay > h1,
.frontmatter-essay > h2,
.frontmatter-essay > h3,
.toc-header,
.toc-part-title,
blockquote,
figure,
figcaption,
table {
  break-after: avoid-page;
  page-break-after: avoid;
}

/* Blockquote polish: tighter rhythm and better page behavior */
blockquote {
  max-width: 4.45in;
  margin: 0.24in auto 0.26in;
  line-height: 1.46;
  break-inside: avoid;
  page-break-inside: avoid;
}

blockquote p {
  margin: 0 0 0.10em 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

p + blockquote,
ul + blockquote,
ol + blockquote {
  margin-top: 0.22in;
}

blockquote + p,
blockquote + ul,
blockquote + ol {
  margin-top: 0.20in;
}

/* Major section divider pages: selective recto policy only for major openers */
.toc-matter,
#dedication,
#epigraph,
#closing-epigraph,
#preface,
#introduction,
#opening-lens,
.part-page,
.appendix,
#bibliography,
#references,
#index {
  break-before: right !important;
  page-break-before: right !important;
}

/* Functional front matter should flow without forced blank versos */
#edition-notes,
#acknowledgements,
#how-to-read,
#scope-of-the-atlas,
#canon-and-interpretation,
#atlas-vocabulary,
#timeline-of-star-trek,
#author-bio {
  break-before: auto !important;
  page-break-before: auto !important;
}

/* TOC grouping fix: avoid orphaning a final single chapter entry before the next part */
.toc-list--chapters .toc-entry:nth-last-child(2),
.toc-list--appendix .toc-entry:nth-last-child(2) {
  break-after: avoid-page !important;
  page-break-after: avoid !important;
}

.toc-list--chapters .toc-entry:last-child,
.toc-list--appendix .toc-entry:last-child {
  break-before: avoid-page !important;
  page-break-before: avoid !important;
}

.toc-part + .toc-part {
  break-before: auto !important;
  page-break-before: auto !important;
}

/* Structural wrappers — keep block semantics explicit across compiler output */
.front-matter,
.main-matter,
.appendix-matter,
.back-matter,
.book-part,
.printer-guard {
  display: block;
  width: 100%;
}

/* === FINAL CHAPTER DIVIDER STABILITY FIX ========================================== */
.chapter-number {
  margin-bottom: 0.10in !important;
}

.chapter-title-divider {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.14in !important;
  width: 100% !important;
  min-height: 0.16in !important;
  margin: 0.02in 0 0.18in !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 1 !important;
  border: 0 !important;
  background: none !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.chapter-title-divider::before,
.chapter-title-divider::after {
  content: "" !important;
  display: block !important;
  flex: 1 1 0 !important;
  height: 0 !important;
  border-top: 1px solid var(--rule-strong) !important;
}

.chapter-title-divider-symbol {
  display: inline-block !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 1 !important;
  color: var(--muted) !important;
}

/* === FINAL TOC CLEANUP PASS ======================================================== */
.toc-matter {
  padding-top: 0.56in !important;
  padding-bottom: 0.62in !important;
  break-before: right !important;
  page-break-before: right !important;
}

.toc.toc--hero {
  padding-top: 0.08in !important;
}

.toc-header {
  margin-bottom: 0.24in !important;
  break-after: avoid !important;
  page-break-after: avoid !important;
}

.toc-header::after {
  width: 1.55in !important;
  margin-top: 0.13in !important;
}

.toc-body,
.toc-list,
.toc-part {
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.toc-list--parts > .toc-part {
  margin: 0.12in 0 0 !important;
  padding: 0.10in 0 0 !important;
  border-top: 1px solid var(--rule-light) !important;
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.toc-list--parts > .toc-part:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.toc-part-link,
.toc-part-title,
.toc-part > .toc-list--chapters,
.toc-part > .toc-list--appendix {
  break-after: avoid !important;
  page-break-after: avoid !important;
  break-before: avoid-page !important;
  page-break-before: avoid !important;
}

.toc-list--chapters,
.toc-list--appendix {
  margin-top: 0.07in !important;
}

.toc-entry {
  grid-template-columns: 0.56in minmax(0, 1fr) !important;
  gap: 0.09in !important;
  padding: 0.032in 0 0.038in !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.toc-list--chapters .toc-entry + .toc-entry,
.toc-list--appendix .toc-entry + .toc-entry {
  margin-top: 0 !important;
}

.toc-entry--chapter .toc-title-text,
.toc-entry--appendix .toc-title-text {
  max-width: none !important;
}

.toc-list--chapters .toc-entry:first-child,
.toc-list--appendix .toc-entry:first-child,
.toc-list--chapters .toc-entry:nth-last-child(2),
.toc-list--appendix .toc-entry:nth-last-child(2) {
  break-after: avoid-page !important;
  page-break-after: avoid !important;
}

.toc-list--chapters .toc-entry:last-child,
.toc-list--appendix .toc-entry:last-child {
  break-before: avoid-page !important;
  page-break-before: avoid !important;
}

.toc-part + .toc-part {
  break-before: auto !important;
  page-break-before: auto !important;
}

.toc-link::after,
.toc-part-link::after {
  content: none !important;
}


/* ==========================================================================
   INDEX / TOC SCREEN PATCH — FINAL WITH REAL SUBTITLE COPY
   ========================================================================== */

@media screen {
  .toc.toc--hero {
    background: #fff !important;
  }

  .toc.toc--hero::before {
    border-color: rgba(189, 183, 174, 0.35) !important;
  }

  .toc-part--index {
    margin-top: 0.18in !important;
    padding-top: 0.10in !important;
    border-top: 1px solid var(--rule-light) !important;
  }

  .toc-part--index .toc-part-link {
    display: block !important;
    padding-left: 0 !important;
    text-decoration: none !important;
    color: inherit !important;
  }

  .toc-part--index .toc-part-title {
    display: block !important;
    font-size: 0.98em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }

  .toc-part--index .toc-part-subtitle {
    display: block !important;
    margin-top: 0.045in !important;
    max-width: 5.3in;
    font-size: 0.66em !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    color: var(--muted) !important;
    line-height: 1.3 !important;
  }

  .index-deck {
    max-width: 5.2in;
    margin: 0 0 0.18in 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
  }
}

/* =========================================================
   FINAL TOC INDEX ALIGNMENT PATCH — screen preview
   ========================================================= */
@media screen {
  .toc-part--index {
    margin-top: 0.18in !important;
    padding-top: 0.10in !important;
    border-top: 1px solid var(--rule-light) !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .toc-part--index .toc-part-link {
    display: block !important;
    padding-left: 0 !important;
    text-decoration: none !important;
    color: inherit !important;
  }

  .toc-part--index .toc-part-title {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
  }

  .toc-part--index .toc-part-subtitle {
    display: block !important;
    margin-top: 0.055in !important;
    margin-left: 0.56in !important;
    max-width: 5.15in !important;
    font-size: 0.78em !important;
    font-weight: 500 !important;
    line-height: 1.28 !important;
    letter-spacing: 0.025em !important;
    text-transform: uppercase !important;
    color: var(--muted) !important;
  }

  .toc-part--index .toc-part-subtitle p,
  .toc-part--index .toc-part-subtitle span {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* =========================================================
   FINAL TOC INDEX TYPOGRAPHY + INDENT FIX — screen preview
   Why: match APPENDICES title size exactly and align subtitle
   with appendix title text block (num column + gap = 0.65in).
   ========================================================= */
@media screen {
  .toc-part--index .toc-part-title {
    font-family: var(--font-display) !important;
    font-size: 14.5pt !important;
    line-height: 1.12 !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: var(--ink) !important;
  }

  .toc-part--index .toc-part-subtitle {
    margin-left: 0.65in !important;
    max-width: 5.05in !important;
    font-size: 9.5pt !important;
    line-height: 1.22 !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    color: var(--muted) !important;
  }
}

/* =========================================================
   FINAL TOC INDEX SUBTITLE — one-line tag, same style family
   as TOC links; keep index deck as a separate paragraph.
   ========================================================= */
@media screen {
  .toc-part--index .toc-part-subtitle {
    display: block !important;
    margin-top: 0.055in !important;
    margin-left: 0.65in !important;
    max-width: none !important;
    white-space: nowrap !important;
    font-family: var(--font-serif) !important;
    font-size: 10.8pt !important;
    line-height: 1.34 !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--muted) !important;
  }

  .index-deck {
    display: block !important;
    white-space: normal !important;
  }
}

/* =========================================================
   FINAL TOC INDEX TAG — match appendix link styling exactly
   Same family/size/weight as A15; uppercase forced by CSS.
   ========================================================= */
@media screen {
  .toc-part--index .toc-part-subtitle {
    display: block !important;
    margin-top: 0.055in !important;
    margin-left: 0.65in !important;
    max-width: none !important;
    white-space: nowrap !important;
    font-family: var(--font-serif) !important;
    font-size: 10.8pt !important;
    line-height: 1.34 !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    color: var(--ink) !important;
  }
}

/* =========================================================
   INDEX INTRO FILE SUPPORT — screen preview
   Allows .index-deck to contain rendered markdown block(s)
   from Index/00_index_intro.txt instead of a single hardcoded <p>.
   ========================================================= */
.index-deck {
  display: block !important;
  white-space: normal !important;
}

.index-deck > :first-child {
  margin-top: 0 !important;
}

.index-deck > :last-child {
  margin-bottom: 0 !important;
}

.index-deck p {
  margin: 0 0 0.18in 0;
}

/* =========================================================
   INDEX INTRO — match normal chapter paragraph styling
   Remove narrow measure / muted styling so the intro reads
   like regular Atlas body copy.
   ========================================================= */
.index-deck {
  max-width: none !important;
  width: auto !important;
  margin: 0 0 0.22in 0 !important;
  font-family: var(--font-serif) !important;
  font-size: var(--size-body) !important;
  line-height: var(--line-body) !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
}

.index-deck p {
  margin: 0 0 0.50em 0 !important;
  font-family: var(--font-serif) !important;
  font-size: var(--size-body) !important;
  line-height: var(--line-body) !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
}

/* =========================================================
   TITLE PAGE — Volume marker
   Supports ### VOLUME I between subtitle and author.
   ========================================================= */
.title-page h3,
#title-page h3 {
  display: block;
  margin: 0.16in auto 0.20in;
  font-family: var(--font-sans);
  font-size: 9pt;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #617188;
}


/* =========================================================
   TITLE PAGE DIVIDER FIX
   - remove stray h3 rule under VOLUME I
   - explicitly center the subtitle divider
   ========================================================= */
#title-page h2::after,
#title-page .frontmatter-essay.title-page > p:first-of-type::after {
  width: 3.85in !important;
  max-width: 82% !important;
  margin: var(--h2-rule-gap) auto 0 !important;
}

#title-page h3,
.title-page h3 {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0.16in auto 0.20in !important;
  text-align: center !important;
}

#title-page h3::after,
.title-page h3::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  width: 0 !important;
  margin: 0 !important;
}


/* =========================================================
   INDEX — two-column editorial layout
   ========================================================= */
.index-body {
  column-count: 2;
  column-gap: 0.38in;
  column-fill: balance;
}

.index-group {
  break-inside: auto !important;
  page-break-inside: auto !important;
  margin: 0 0 0.10in 0;
}

.index-letter {
  break-after: avoid !important;
  page-break-after: avoid !important;
  margin: 0.06in 0 0.025in 0;
}

.index-entry {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}


/* =========================================================
   INDEX SCREEN PREVIEW REFINEMENT
   - keep 2-column preview readable in browser
   - hide Prince-only page locator punctuation in HTML preview
   - prevent letter groups from splitting awkwardly
   ========================================================= */
.index-body {
  columns: 2;
  column-count: 2;
  column-gap: 0.34in;
}

.index-group {
  break-inside: avoid-column !important;
  page-break-inside: avoid !important;
}

.index-letter {
  margin: 0.04in 0 0.02in 0 !important;
}

.index-entry {
  padding-left: 0.13in !important;
  text-indent: -0.13in !important;
  line-height: 1.24 !important;
}

.index-entry--see .index-term::after {
  content: '' !important;
}

.index-entry--see .index-see {
  display: block !important;
  margin-left: 0.13in !important;
}

/* HTML preview cannot render Prince target-counter page numbers.
   Hide the empty punctuation so browser preview stays clean. */
.index-pages,
.index-sep {
  display: none !important;
}


/* =========================================================
   INDEX SEE-REFERENCE + PAGE-LOCATOR FIX
   - keep see references inline: "Borg Collective. See Borg"
   - preserve punctuation before page locators in PDF-capable views
   ========================================================= */
.index-entry--see .index-term::after {
  content: '. ' !important;
}

.index-entry--see .index-see {
  display: inline !important;
  margin-left: 0 !important;
}

.index-see,
.index-see-target {
  font-style: normal !important;
}

/* FINAL TABLE BODY OVERRIDE — HTML preview and browser builds.
   Only header cells should be bold; first-column data cells stay regular. */
.chapter table tbody td:first-child {
  font-weight: 400 !important;
  color: var(--ink) !important;
}

/* PART-INTRO TABLE FIXES — screen/HTML preview
   Part intro tables live in .part-page-body, not chapter .section-body,
   so they need their own border model. */
.part-page-body > table {
  width: 100%;
  max-width: 26em;
  table-layout: fixed;
  margin-top: 0.12in;
  margin-bottom: 0.26in;
  border-top: 1px solid var(--table-rule-strong);
  border-bottom: 1px solid var(--table-rule-strong);
}

.part-page-body > table thead th {
  border-top: 0;
  border-bottom: 1px solid var(--table-rule-strong);
  padding: 0.055in 0.085in;
  font-size: 8pt;
  letter-spacing: 0.06em;
  color: var(--table-header-color);
  background: none;
}

.part-page-body > table tbody td {
  padding: 0.075in 0.06in;
  border-bottom: 1px solid var(--table-rule-light);
}

.part-page-body > table tbody tr:last-child td {
  border-bottom: 1px solid var(--table-rule-strong);
}

.part-page-body > table thead th:first-child:nth-last-child(2),
.part-page-body > table tbody td:first-child:nth-last-child(2) {
  width: 32%;
  padding-right: 0.18in;
}

.part-page-body > table thead th:last-child:nth-child(2),
.part-page-body > table tbody td:last-child:nth-child(2) {
  width: 68%;
}

/* GLOBAL ATLAS TABLE SYSTEM — authoritative cross-part override
   Goal: one visual table language across part intros, chapters, and appendices.
   Policy:
   - full text-column width by default
   - fixed column grid for consistent rhythm
   - unified vertical spacing and cell padding
   - strong top/header/bottom rules, light internal row rules
   - no special narrow first-table treatment in subsections or part intros
   - body cells remain regular weight unless explicitly styled elsewhere */

.chapter .section-body > table,
.chapter .subsection-body > table,
.appendix table,
.part-page-body > table,
.frontmatter--reference table {
  width: 100%;
  max-width: none;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  margin-top: 0.14in;
  margin-bottom: 0.28in;
  border-top: 1px solid var(--table-rule-strong);
  border-bottom: 1px solid var(--table-rule-strong);
}

.chapter .section-body > table thead th,
.chapter .subsection-body > table thead th,
.appendix table thead th,
.part-page-body > table thead th,
.frontmatter--reference table thead th {
  border-top: 0;
  border-bottom: 1px solid var(--table-rule-strong);
  padding: 0.058in 0.10in 0.060in;
  font-size: 8pt;
  letter-spacing: 0.06em;
  text-align: left;
  vertical-align: bottom;
  background: none;
}

.chapter .section-body > table tbody td,
.chapter .subsection-body > table tbody td,
.appendix table tbody td,
.part-page-body > table tbody td,
.frontmatter--reference table tbody td {
  padding: 0.072in 0.10in;
  border-bottom: 1px solid var(--table-rule-light);
  vertical-align: top;
  font-weight: 400;
  color: var(--ink);
}

.chapter .section-body > table tbody tr:last-child td,
.chapter .subsection-body > table tbody tr:last-child td,
.appendix table tbody tr:last-child td,
.part-page-body > table tbody tr:last-child td,
.frontmatter--reference table tbody tr:last-child td {
  border-bottom: 1px solid var(--table-rule-strong);
}

.chapter table tbody td:first-child,
.appendix table tbody td:first-child,
.part-page-body > table tbody td:first-child,
.frontmatter--reference table tbody td:first-child {
  font-weight: 400;
  color: var(--ink);
}

/* Two-column atlas tables */
.chapter .section-body > table thead th:first-child:nth-last-child(2),
.chapter .section-body > table tbody td:first-child:nth-last-child(2),
.chapter .subsection-body > table thead th:first-child:nth-last-child(2),
.chapter .subsection-body > table tbody td:first-child:nth-last-child(2),
.appendix table thead th:first-child:nth-last-child(2),
.appendix table tbody td:first-child:nth-last-child(2),
.part-page-body > table thead th:first-child:nth-last-child(2),
.part-page-body > table tbody td:first-child:nth-last-child(2),
.frontmatter--reference table thead th:first-child:nth-last-child(2),
.frontmatter--reference table tbody td:first-child:nth-last-child(2) {
  width: 32%;
  padding-right: 0.14in;
}

.chapter .section-body > table thead th:last-child:nth-child(2),
.chapter .section-body > table tbody td:last-child:nth-child(2),
.chapter .subsection-body > table thead th:last-child:nth-child(2),
.chapter .subsection-body > table tbody td:last-child:nth-child(2),
.appendix table thead th:last-child:nth-child(2),
.appendix table tbody td:last-child:nth-child(2),
.part-page-body > table thead th:last-child:nth-child(2),
.part-page-body > table tbody td:last-child:nth-child(2),
.frontmatter--reference table thead th:last-child:nth-child(2),
.frontmatter--reference table tbody td:last-child:nth-child(2) {
  width: 68%;
  padding-left: 0.05in;
}

/* Three-column atlas tables */
.chapter .section-body > table thead th:first-child:nth-last-child(3),
.chapter .section-body > table tbody td:first-child:nth-last-child(3),
.chapter .subsection-body > table thead th:first-child:nth-last-child(3),
.chapter .subsection-body > table tbody td:first-child:nth-last-child(3),
.appendix table thead th:first-child:nth-last-child(3),
.appendix table tbody td:first-child:nth-last-child(3),
.part-page-body > table thead th:first-child:nth-last-child(3),
.part-page-body > table tbody td:first-child:nth-last-child(3),
.frontmatter--reference table thead th:first-child:nth-last-child(3),
.frontmatter--reference table tbody td:first-child:nth-last-child(3) {
  width: 22%;
  padding-right: 0.12in;
}

.chapter .section-body > table thead th:nth-child(2):nth-last-child(2),
.chapter .section-body > table tbody td:nth-child(2):nth-last-child(2),
.chapter .subsection-body > table thead th:nth-child(2):nth-last-child(2),
.chapter .subsection-body > table tbody td:nth-child(2):nth-last-child(2),
.appendix table thead th:nth-child(2):nth-last-child(2),
.appendix table tbody td:nth-child(2):nth-last-child(2),
.part-page-body > table thead th:nth-child(2):nth-last-child(2),
.part-page-body > table tbody td:nth-child(2):nth-last-child(2),
.frontmatter--reference table thead th:nth-child(2):nth-last-child(2),
.frontmatter--reference table tbody td:nth-child(2):nth-last-child(2) {
  width: 30%;
  padding-left: 0.03in;
  padding-right: 0.10in;
}

.chapter .section-body > table thead th:last-child:nth-child(3),
.chapter .section-body > table tbody td:last-child:nth-child(3),
.chapter .subsection-body > table thead th:last-child:nth-child(3),
.chapter .subsection-body > table tbody td:last-child:nth-child(3),
.appendix table thead th:last-child:nth-child(3),
.appendix table tbody td:last-child:nth-child(3),
.part-page-body > table thead th:last-child:nth-child(3),
.part-page-body > table tbody td:last-child:nth-child(3),
.frontmatter--reference table thead th:last-child:nth-child(3),
.frontmatter--reference table tbody td:last-child:nth-child(3) {
  width: 48%;
  padding-left: 0.05in;
}

/* Four-column atlas tables */
.chapter .section-body > table thead th:first-child:nth-last-child(4),
.chapter .section-body > table tbody td:first-child:nth-last-child(4),
.chapter .subsection-body > table thead th:first-child:nth-last-child(4),
.chapter .subsection-body > table tbody td:first-child:nth-last-child(4),
.appendix table thead th:first-child:nth-last-child(4),
.appendix table tbody td:first-child:nth-last-child(4),
.part-page-body > table thead th:first-child:nth-last-child(4),
.part-page-body > table tbody td:first-child:nth-last-child(4),
.frontmatter--reference table thead th:first-child:nth-last-child(4),
.frontmatter--reference table tbody td:first-child:nth-last-child(4) {
  width: 12%;
  padding-right: 0.11in;
}

.chapter .section-body > table thead th:nth-child(2):nth-last-child(3),
.chapter .section-body > table tbody td:nth-child(2):nth-last-child(3),
.chapter .subsection-body > table thead th:nth-child(2):nth-last-child(3),
.chapter .subsection-body > table tbody td:nth-child(2):nth-last-child(3),
.appendix table thead th:nth-child(2):nth-last-child(3),
.appendix table tbody td:nth-child(2):nth-last-child(3),
.part-page-body > table thead th:nth-child(2):nth-last-child(3),
.part-page-body > table tbody td:nth-child(2):nth-last-child(3),
.frontmatter--reference table thead th:nth-child(2):nth-last-child(3),
.frontmatter--reference table tbody td:nth-child(2):nth-last-child(3) {
  width: 18%;
  padding-left: 0.03in;
  padding-right: 0.09in;
}

.chapter .section-body > table thead th:nth-child(3):nth-last-child(2),
.chapter .section-body > table tbody td:nth-child(3):nth-last-child(2),
.chapter .subsection-body > table thead th:nth-child(3):nth-last-child(2),
.chapter .subsection-body > table tbody td:nth-child(3):nth-last-child(2),
.appendix table thead th:nth-child(3):nth-last-child(2),
.appendix table tbody td:nth-child(3):nth-last-child(2),
.part-page-body > table thead th:nth-child(3):nth-last-child(2),
.part-page-body > table tbody td:nth-child(3):nth-last-child(2),
.frontmatter--reference table thead th:nth-child(3):nth-last-child(2),
.frontmatter--reference table tbody td:nth-child(3):nth-last-child(2) {
  width: 22%;
  padding-left: 0.03in;
  padding-right: 0.09in;
}

.chapter .section-body > table thead th:last-child:nth-child(4),
.chapter .section-body > table tbody td:last-child:nth-child(4),
.chapter .subsection-body > table thead th:last-child:nth-child(4),
.chapter .subsection-body > table tbody td:last-child:nth-child(4),
.appendix table thead th:last-child:nth-child(4),
.appendix table tbody td:last-child:nth-child(4),
.part-page-body > table thead th:last-child:nth-child(4),
.part-page-body > table tbody td:last-child:nth-child(4),
.frontmatter--reference table thead th:last-child:nth-child(4),
.frontmatter--reference table tbody td:last-child:nth-child(4) {
  width: 48%;
  padding-left: 0.05in;
}



/* FINAL TABLE BODY TYPOGRAPHY NORMALIZATION */
.chapter .section-body > table tbody th,
.chapter .subsection-body > table tbody th,
.appendix table tbody th,
.part-page-body > table tbody th,
.frontmatter--reference table tbody th,
.chapter .section-body > table tbody td,
.chapter .subsection-body > table tbody td,
.appendix table tbody td,
.part-page-body > table tbody td,
.frontmatter--reference table tbody td {
  font-weight: 400;
  font-style: normal;
}

.chapter .section-body > table tbody td strong,
.chapter .section-body > table tbody td b,
.chapter .section-body > table tbody th strong,
.chapter .section-body > table tbody th b,
.chapter .subsection-body > table tbody td strong,
.chapter .subsection-body > table tbody td b,
.chapter .subsection-body > table tbody th strong,
.chapter .subsection-body > table tbody th b,
.appendix table tbody td strong,
.appendix table tbody td b,
.appendix table tbody th strong,
.appendix table tbody th b,
.part-page-body > table tbody td strong,
.part-page-body > table tbody td b,
.part-page-body > table tbody th strong,
.part-page-body > table tbody th b,
.frontmatter--reference table tbody td strong,
.frontmatter--reference table tbody td b,
.frontmatter--reference table tbody th strong,
.frontmatter--reference table tbody th b {
  font-weight: inherit;
}

.chapter .section-body > table tbody td em,
.chapter .section-body > table tbody td i,
.chapter .section-body > table tbody td cite,
.chapter .section-body > table tbody th em,
.chapter .section-body > table tbody th i,
.chapter .section-body > table tbody th cite,
.chapter .subsection-body > table tbody td em,
.chapter .subsection-body > table tbody td i,
.chapter .subsection-body > table tbody td cite,
.chapter .subsection-body > table tbody th em,
.chapter .subsection-body > table tbody th i,
.chapter .subsection-body > table tbody th cite,
.appendix table tbody td em,
.appendix table tbody td i,
.appendix table tbody td cite,
.appendix table tbody th em,
.appendix table tbody th i,
.appendix table tbody th cite,
.part-page-body > table tbody td em,
.part-page-body > table tbody td i,
.part-page-body > table tbody td cite,
.part-page-body > table tbody th em,
.part-page-body > table tbody th i,
.part-page-body > table tbody th cite,
.frontmatter--reference table tbody td em,
.frontmatter--reference table tbody td i,
.frontmatter--reference table tbody td cite,
.frontmatter--reference table tbody th em,
.frontmatter--reference table tbody th i,
.frontmatter--reference table tbody th cite {
  font-style: inherit;
}

/* FINAL APPENDIX TABLE BODY FIRST-COLUMN RESET */
.appendix table tbody td,
.appendix table tbody th,
.appendix table tbody td:first-child,
.appendix table tbody td:nth-child(2),
.appendix table tbody td:nth-child(3),
.appendix table tbody td:nth-child(4) {
  font-weight: 400 !important;
  font-style: normal !important;
  color: var(--ink) !important;
}

.appendix table tbody td strong,
.appendix table tbody td b,
.appendix table tbody th strong,
.appendix table tbody th b {
  font-weight: 400 !important;
}

.appendix table tbody td em,
.appendix table tbody td i,
.appendix table tbody td cite,
.appendix table tbody th em,
.appendix table tbody th i,
.appendix table tbody th cite {
  font-style: italic !important;
  font-weight: 400 !important;
}


/* FINAL FRONT MATTER GLOBAL TABLE ADOPTION
   Fix: frontmatter--essay sections were not included in the atlas-wide table system,
   so their tables fell back to generic front-matter styling instead of the global atlas table language.
*/
.frontmatter table,
.frontmatter-essay table {
  width: 100% !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  margin: 0.14in 0 0.28in !important;
  border-top: 1px solid var(--table-rule-strong) !important;
  border-bottom: 1px solid var(--table-rule-strong) !important;
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.frontmatter table thead,
.frontmatter-essay table thead {
  display: table-header-group !important;
}

.frontmatter table tfoot,
.frontmatter-essay table tfoot {
  display: table-footer-group !important;
}

.frontmatter table tr,
.frontmatter-essay table tr {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.frontmatter table thead th,
.frontmatter-essay table thead th {
  border-bottom: 1px solid var(--table-rule-strong) !important;
  padding: 0.058in 0.10in 0.060in !important;
  font-family: var(--font-sans) !important;
  font-size: 8pt !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--table-header-color) !important;
  text-align: left !important;
  vertical-align: bottom !important;
}

.frontmatter table tbody td,
.frontmatter table tbody th,
.frontmatter-essay table tbody td,
.frontmatter-essay table tbody th {
  padding: 0.072in 0.10in !important;
  border-bottom: 1px solid var(--table-rule-light) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  color: var(--ink) !important;
  vertical-align: top !important;
}

.frontmatter table tbody tr:last-child td,
.frontmatter table tbody tr:last-child th,
.frontmatter-essay table tbody tr:last-child td,
.frontmatter-essay table tbody tr:last-child th {
  border-bottom: 1px solid var(--table-rule-strong) !important;
}

.frontmatter table tbody td strong,
.frontmatter table tbody td b,
.frontmatter table tbody th strong,
.frontmatter table tbody th b,
.frontmatter-essay table tbody td strong,
.frontmatter-essay table tbody td b,
.frontmatter-essay table tbody th strong,
.frontmatter-essay table tbody th b {
  font-weight: 400 !important;
}

.frontmatter table tbody td em,
.frontmatter table tbody td i,
.frontmatter table tbody td cite,
.frontmatter table tbody th em,
.frontmatter table tbody th i,
.frontmatter table tbody th cite,
.frontmatter-essay table tbody td em,
.frontmatter-essay table tbody td i,
.frontmatter-essay table tbody td cite,
.frontmatter-essay table tbody th em,
.frontmatter-essay table tbody th i,
.frontmatter-essay table tbody th cite {
  font-style: italic !important;
  font-weight: 400 !important;
}

/* Two-column front matter tables */
.frontmatter table thead th:first-child:nth-last-child(2),
.frontmatter table tbody td:first-child:nth-last-child(2),
.frontmatter-essay table thead th:first-child:nth-last-child(2),
.frontmatter-essay table tbody td:first-child:nth-last-child(2) {
  width: 32% !important;
  padding-right: 0.14in !important;
}

.frontmatter table thead th:last-child:nth-child(2),
.frontmatter table tbody td:last-child:nth-child(2),
.frontmatter-essay table thead th:last-child:nth-child(2),
.frontmatter-essay table tbody td:last-child:nth-child(2) {
  width: 68% !important;
  padding-left: 0.05in !important;
}

/* Three-column front matter tables */
.frontmatter table thead th:first-child:nth-last-child(3),
.frontmatter table tbody td:first-child:nth-last-child(3),
.frontmatter-essay table thead th:first-child:nth-last-child(3),
.frontmatter-essay table tbody td:first-child:nth-last-child(3) {
  width: 22% !important;
  padding-right: 0.12in !important;
}

.frontmatter table thead th:nth-child(2):nth-last-child(2),
.frontmatter table tbody td:nth-child(2):nth-last-child(2),
.frontmatter-essay table thead th:nth-child(2):nth-last-child(2),
.frontmatter-essay table tbody td:nth-child(2):nth-last-child(2) {
  width: 30% !important;
  padding-left: 0.03in !important;
  padding-right: 0.10in !important;
}

.frontmatter table thead th:last-child:nth-child(3),
.frontmatter table tbody td:last-child:nth-child(3),
.frontmatter-essay table thead th:last-child:nth-child(3),
.frontmatter-essay table tbody td:last-child:nth-child(3) {
  width: 48% !important;
  padding-left: 0.05in !important;
}

/* Four-column front matter tables */
.frontmatter table thead th:first-child:nth-last-child(4),
.frontmatter table tbody td:first-child:nth-last-child(4),
.frontmatter-essay table thead th:first-child:nth-last-child(4),
.frontmatter-essay table tbody td:first-child:nth-last-child(4) {
  width: 12% !important;
}

.frontmatter table thead th:nth-child(2):nth-last-child(3),
.frontmatter table tbody td:nth-child(2):nth-last-child(3),
.frontmatter-essay table thead th:nth-child(2):nth-last-child(3),
.frontmatter-essay table tbody td:nth-child(2):nth-last-child(3) {
  width: 18% !important;
}

.frontmatter table thead th:nth-child(3):nth-last-child(2),
.frontmatter table tbody td:nth-child(3):nth-last-child(2),
.frontmatter-essay table thead th:nth-child(3):nth-last-child(2),
.frontmatter-essay table tbody td:nth-child(3):nth-last-child(2) {
  width: 22% !important;
}

.frontmatter table thead th:last-child:nth-child(4),
.frontmatter table tbody td:last-child:nth-child(4),
.frontmatter-essay table thead th:last-child:nth-child(4),
.frontmatter-essay table tbody td:last-child:nth-child(4) {
  width: 48% !important;
  padding-left: 0.05in !important;
}

/* APPENDIX HYBRID COMPRESSION REBUILD
   Preserve the styled appendix look, but tighten repetitive reference material
   so the appendices read as a compact gallery rather than a sequence of full
   chapter-openers. */
.book .appendix + .appendix {
  margin-top: 0.34in;
  padding-top: 0.12in;
  border-top: 0.75px solid var(--appendix-rule);
}

.book .appendix-intro {
  margin-bottom: 0.42in;
}

.book .appendix > h1 {
  margin: 0 0 0.18in;
}

.book .appendix > h2 {
  margin: 0.24in 0 0.10in;
}

.book .appendix > h3 {
  margin: 0.16in 0 0.06in;
}

.appendix p,
.appendix li,
.book .appendix p,
.book .appendix li {
  line-height: 1.36;
  margin-bottom: 0.38em;
}

.appendix table {
  margin-top: 0.09in;
  margin-bottom: 0.18in;
}

.appendix table thead th {
  padding: 0.046in 0.085in 0.048in;
}

.appendix table tbody td,
.appendix table tbody th {
  padding: 0.056in 0.085in;
}

.appendix blockquote {
  margin: 0.18in auto;
}

/* RULES OF ACQUISITION quote emphasis */
#appendix-A01 blockquote {
  display: block;
  width: 100%;
  max-width: 4.9in;
  margin: 0.18in auto 0.20in;
  text-align: center !important;
  font-family: var(--font-display);
  color: var(--ink);
}

#appendix-A01 blockquote p {
  margin: 0 auto;
  text-align: center !important;
  text-indent: 0 !important;
  font-family: var(--font-display);
  font-size: 12.4pt;
  line-height: 1.30;
  font-style: italic;
  font-weight: 700;
  color: var(--ink);
}

#appendix-A01 blockquote strong,
#appendix-A01 blockquote b {
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
}
