/* ==========================================================================
   Emra Peptides — Monograph Design System
   Ground: Soft Lilac-Mist (#F3EFF7)
   Display: Bodoni Moda | Body: Lora | UI Accent: DM Sans
   Zero-JS, pure editorial hairlines, WCAG AA/AAA verified contrast.
   ========================================================================== */

:root {
  --bg: #F3EFF7;
  --surface: #FAF8FC;
  --recess: #E9E2F1;
  --rule: #D4C9DF;
  --rule-strong: #B8A7C9;
  --ink: #1D1726;
  --ink-2: #483E56;
  --caption: #594F66;
  --plum: #4D1D5E;
  --plum-deep: #371345;
  --rose: #822A50;

  /* Occasional lower-page contrast band only */
  --nocturne: #24162E;
  --nocturne-ink: #F3EFF7;
  --nocturne-muted: #DCD3E6;
  --nocturne-link: #F2C9DA;
  --nocturne-rule: rgba(212, 201, 223, 0.28);

  /* Typography */
  --font-display: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing rhythm */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 88px;

  /* Layout bounds */
  --shell-max: 1160px;
  --reading-max: 60ch;
  --plate-wide: 820px;
}

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

html {
  font-size: 16px;
  background-color: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.76;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Focus & Accessibility
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  z-index: 1000;
  background: var(--plum);
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 20px;
  overflow: visible;
  clip-path: none;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

.contrast-band a:focus-visible {
  outline-color: var(--nocturne-link);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Containers
   -------------------------------------------------------------------------- */

.page-wrap {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* Symmetric Flanked Masthead
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--bg);
}

.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.3vw, 2.125rem);
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: color 220ms ease;
}

.wordmark:hover {
  color: var(--plum);
}

.site-nav {
  display: contents;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-ui);
}

.nav-list li {
  list-style: none;
}

.nav-left {
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-start;
}

.nav-right {
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-end;
}

.nav-list a {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0 3px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 220ms ease, border-color 220ms ease;
}

.nav-list a:hover,
.nav-list a[aria-current="page"],
.nav-list a.is-section-active {
  color: var(--plum);
  border-bottom-color: var(--plum);
}

/* Inline Links & Buttons
   -------------------------------------------------------------------------- */

.link-cite,
.essay-body a,
.dossier-summary a,
.essay-index-desc a,
.caveat-plate a,
.ledger-table a,
.plate-caption a,
.frontispiece-figures a,
.frontispiece-scale-plate a,
.ref-list a {
  color: var(--rose);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color 220ms ease;
}

.link-cite:hover,
.essay-body a:hover,
.dossier-summary a:hover,
.essay-index-desc a:hover,
.caveat-plate a:hover,
.ledger-table a:hover,
.plate-caption a:hover,
.frontispiece-figures a:hover,
.frontispiece-scale-plate a:hover,
.ref-list a:hover {
  color: var(--plum);
}

.link-rose {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--rose);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color 220ms ease;
}

.link-rose:hover {
  color: var(--plum);
}

.btn-aubergine,
.btn-aubergine-solid {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 11px 24px;
  border: 1px solid var(--plum);
  border-radius: 0;
  text-decoration: none;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

.btn-aubergine {
  background: var(--surface);
  color: var(--plum);
}

.btn-aubergine:hover {
  background: var(--plum);
  color: #FFFFFF;
}

.btn-aubergine-solid {
  background: var(--plum);
  color: #FFFFFF;
}

.btn-aubergine-solid:hover {
  background: var(--plum-deep);
  border-color: var(--plum-deep);
}

/* Signature Element: The Skeptic's Gap Scale
   -------------------------------------------------------------------------- */

.gap-scale {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto 22px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--plum);
}

.gap-scale.in-essay {
  max-width: 100%;
  margin: 28px 0 32px;
  padding: 15px 22px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.gap-scale.in-card {
  max-width: 100%;
  margin: 6px 0 0;
  padding: 12px 0 2px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  gap: 10px;
}

.gap-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gap-end-right {
  color: var(--rose);
}

.gap-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--plum);
  display: inline-block;
  flex-shrink: 0;
}

.gap-dot.hollow {
  background: transparent;
  border: 2px solid var(--rose);
}

.gap-bridge {
  flex: 1 1 auto;
  min-width: 24px;
  height: 0;
  border-top: 2px dotted var(--plum);
}

/* Double-Hairline Photographic Plates
   -------------------------------------------------------------------------- */

.plate-figure {
  margin: 0 auto;
}

.plate-mat {
  padding: 4px;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 0;
}

.plate-inner {
  border: 1px solid var(--rule);
  overflow: hidden;
  background: var(--recess);
}

.plate-inner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.plate-inner.ratio-3-2 img {
  aspect-ratio: 3 / 2;
}

.plate-caption {
  margin: 10px auto 0;
  max-width: 58ch;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.48;
  color: var(--caption);
  text-wrap: balance;
}

/* Home Hero: Centered Literary Frontispiece
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(20px, 2.8vw, 30px) 0 clamp(40px, 5vw, 58px);
  text-align: center;
}

.hero-title {
  margin: 0 auto 18px;
  max-width: 820px;
  font-weight: 500;
}

.hero-edition {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--caption);
  margin-bottom: 8px;
}

.hero-headline {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.4vw, 3.85rem);
  font-weight: 500;
  font-variation-settings: "opsz" 12;
  line-height: 1.07;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-headline em {
  font-style: italic;
  color: var(--plum);
}

.hero-plate {
  max-width: 488px;
  margin: 0 auto 18px;
}

.hero-plate .plate-caption {
  text-align: center;
}

.hero-thesis {
  max-width: 60ch;
  margin: 0 auto 20px;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: balance;
}

.hero-action {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 26px;
}

/* Section Headers & Ornamental Tick
   -------------------------------------------------------------------------- */

.section-band {
  padding: clamp(44px, 5.2vw, 68px) 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto clamp(32px, 4.5vw, 48px);
}

.section-tick {
  display: block;
  width: 1px;
  height: 24px;
  background: var(--plum);
  margin: 0 auto 14px;
}

.section-kicker {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--caption);
}

.section-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.16;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}

.section-deck {
  margin: 0 auto;
  max-width: 56ch;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* Home: Four Compound Dossiers (2x2 Monograph Ledger)
   -------------------------------------------------------------------------- */

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.dossier-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--plum);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.dossier-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dossier-folio {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--caption);
}

.dossier-num {
  font-weight: 600;
  color: var(--plum);
}

.dossier-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.65rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.2;
  color: var(--ink);
}

.dossier-title a {
  color: inherit;
  text-decoration: none;
  transition: color 220ms ease;
}

.dossier-title a:hover {
  color: var(--plum);
}

.dossier-summary {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--ink);
  max-width: 56ch;
}

.dossier-card-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dossier-cta {
  padding-top: 4px;
}

.dossiers-footer-note {
  margin: clamp(28px, 4vw, 40px) auto 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Home: Biology, Translation & Hype Gap Editorial Spread
   -------------------------------------------------------------------------- */

.inquiry-spread {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}

.inquiry-plate-col {
  min-width: 0;
}

.inquiry-plate-col .plate-caption {
  text-align: left;
  margin-inline: 0;
}

.inquiry-col-note {
  margin: 20px 0 0;
  padding: 18px 20px;
  background: var(--recess);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--plum);
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.62;
  color: var(--ink);
}

.inquiry-index-col {
  min-width: 0;
}

.inquiry-index-head {
  margin-bottom: 24px;
}

.inquiry-index-head .section-title {
  margin-bottom: 10px;
}

.essay-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.essay-index-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 20px;
  align-items: baseline;
}

.essay-index-num {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  color: var(--plum);
}

.essay-index-content {
  min-width: 0;
}

.essay-index-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.55rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.22;
  color: var(--ink);
}

.essay-index-title a {
  color: inherit;
  text-decoration: none;
  transition: color 220ms ease;
}

.essay-index-title a:hover {
  color: var(--plum);
}

.essay-index-desc {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.66;
  color: var(--ink-2);
  max-width: 56ch;
}

/* Lower-Page Dark Contrast Band (Deep Nocturne Plum #24162E)
   -------------------------------------------------------------------------- */

.contrast-band {
  background: var(--nocturne);
  color: var(--nocturne-ink);
  padding: clamp(52px, 6.5vw, 84px) 0;
}

.contrast-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(32px, 4.5vw, 48px);
}

/* Single delicate tracked uppercase label allowed per page */
.tracked-label {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--caption);
}

.contrast-band .tracked-label {
  color: var(--nocturne-muted);
}

.contrast-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.9vw, 2.35rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.18;
  color: var(--nocturne-ink);
  text-wrap: balance;
}

.contrast-title em {
  font-style: italic;
  color: var(--nocturne-link);
}

.claim-ledger {
  border-top: 1px solid var(--nocturne-rule);
}

.claim-row {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 16px 40px;
  padding: 26px 0;
  border-bottom: 1px solid var(--nocturne-rule);
  align-items: start;
}

.claim-col,
.record-col {
  min-width: 0;
}

.claim-tag,
.record-tag {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.claim-tag {
  color: var(--nocturne-link);
}

.record-tag {
  color: var(--nocturne-muted);
}

.claim-statement {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.58;
  color: var(--nocturne-ink);
  max-width: 42ch;
}

.record-statement {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--nocturne-ink);
  max-width: 58ch;
}

.contrast-band a {
  color: var(--nocturne-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color 220ms ease;
}

.contrast-band a:hover {
  color: #FFFFFF;
}

.contrast-foot {
  margin-top: clamp(28px, 4vw, 40px);
  text-align: center;
}

.contrast-foot p {
  margin: 0 auto 14px;
  max-width: 58ch;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--nocturne-muted);
}

.contrast-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ==========================================================================
   Content & Chapter Pages (Reusable System for Stages 3–5)
   ========================================================================== */

.chapter-frontispiece {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(20px, 2.8vw, 30px) 0 clamp(26px, 3.6vw, 40px);
  text-align: center;
}

.breadcrumbs {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--caption);
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--rule-strong);
}

.breadcrumbs a {
  color: var(--caption);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 220ms ease;
}

.breadcrumbs a:hover {
  color: var(--plum);
}

.chapter-title {
  margin: 0 auto 14px;
  max-width: 26ch;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 2.95rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.chapter-deck {
  margin: 0 auto 18px;
  max-width: 58ch;
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1.4vw, 1.1875rem);
  line-height: 1.58;
  color: var(--ink-2);
  text-wrap: balance;
}

.chapter-plate {
  max-width: 520px;
  margin: 20px auto 0;
}

.chapter-plate.lead-plate {
  max-width: 500px;
  margin: 16px auto 20px;
}

.chapter-plate .plate-caption {
  text-align: center;
}

/* Frontispiece Variation B: Pulled-Figure Monograph Ledger */
.frontispiece-figures {
  max-width: 720px;
  margin: 20px auto 22px;
  padding: 4px;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.frontispiece-figures-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  background: var(--surface);
}

.frontispiece-figures-inner.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.figure-cell {
  padding: 18px 16px;
  text-align: center;
  border-right: 1px solid var(--rule);
  min-width: 0;
}

.figure-cell:last-child {
  border-right: 0;
}

.figure-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.7vw, 2.2rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.12;
  color: var(--plum);
  margin-bottom: 6px;
}

.figure-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.44;
  color: var(--ink-2);
}

/* Frontispiece Variation C: Framed Skeptic's Gap Scale & Primary Contrast */
.frontispiece-scale-plate {
  max-width: 720px;
  margin: 20px auto 0;
  padding: 4px;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.frontispiece-scale-inner {
  border: 1px solid var(--rule);
  padding: clamp(18px, 2.8vw, 26px);
  background: var(--surface);
  text-align: left;
}

.frontispiece-scale-inner .gap-scale {
  max-width: 100%;
  margin: 0 auto 18px;
}

.scale-contrast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.scale-contrast-cell {
  min-width: 0;
}

.scale-contrast-kicker {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--plum);
}

.scale-contrast-kicker.boundary {
  color: var(--rose);
}

.scale-contrast-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.56;
  color: var(--ink);
}

/* In-Body Still-Life Photographic Plate */
.essay-plate {
  max-width: 600px;
  margin: 34px auto;
}

.essay-plate .plate-caption {
  text-align: center;
}

/* Single-Column 60ch Reading Lane */
.essay-section {
  padding: 8px 0 clamp(56px, 7vw, 88px);
}

.essay-body {
  max-width: var(--reading-max);
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.76;
  color: var(--ink);
}

.essay-body > p {
  margin: 0 0 1.35em;
}

.essay-body h2 {
  margin: 2.1em 0 0.7em;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.18;
  color: var(--ink);
}

.essay-body h2:first-child {
  margin-top: 0;
}

.essay-body h3 {
  margin: 1.7em 0 0.55em;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw, 1.45rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.25;
  color: var(--ink);
}

.essay-body ul,
.essay-body ol {
  margin: 0 0 1.45em;
  padding-left: 1.35em;
}

.essay-body li {
  margin-bottom: 0.55em;
}

/* Wide Editorial Plates inside Essay Pages */
.essay-wide {
  max-width: var(--plate-wide);
  margin: 36px auto;
}

/* Pull Quote with Double-Hairline Frame */
.pull-quote {
  margin: 36px 0;
  padding: 5px;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.pull-quote-inner {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--rule);
  text-align: center;
}

.pull-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-style: italic;
  font-variation-settings: "opsz" 10;
  line-height: 1.38;
  color: var(--plum);
}

/* Caveat Plates & Dated Regulatory Quotations */
.caveat-plate {
  margin: 36px 0;
  padding: clamp(22px, 3vw, 28px);
  background: var(--recess);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--plum);
}

.caveat-plate h2,
.caveat-plate h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.55rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  line-height: 1.22;
  color: var(--ink);
}

.caveat-plate p {
  margin: 0 0 14px;
  font-size: 1.0625rem;
  line-height: 1.68;
}

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

.reg-quote {
  margin: 14px 0;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--ink);
}

/* Hand-Written SVG Diagram Plates */
.diagram-figure {
  margin: 36px auto;
  max-width: var(--plate-wide);
}

.diagram-frame {
  padding: clamp(14px, 2.5vw, 26px);
  background: var(--surface);
  border: 1px solid var(--rule);
}

.diagram-frame img,
.diagram-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-figure .plate-caption {
  text-align: left;
  margin-inline: 0;
}

/* Editorial Tables & Responsive Stacked Ledgers */
.ledger-table-wrap {
  margin: 36px auto;
  max-width: var(--plate-wide);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}

.ledger-table caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 10px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--caption);
}

.ledger-table thead th {
  background: var(--recess);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule-strong);
  vertical-align: bottom;
}

.ledger-table tbody td,
.ledger-table tbody th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
}

.ledger-table tbody th {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  color: var(--ink);
}

.ledger-table tbody tr:last-child td,
.ledger-table tbody tr:last-child th {
  border-bottom: 0;
}

/* Chapter Footer Next-Read Links */
.chapter-continue {
  max-width: var(--reading-max);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 24px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

/* References Index */
.ref-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 0 auto 30px;
  padding: 14px 18px;
  max-width: var(--plate-wide);
  background: var(--surface);
  border: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ref-jump a {
  color: var(--rose);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color 220ms ease;
}

.ref-jump a:hover {
  color: var(--plum);
}

.ref-index-wrap {
  max-width: var(--plate-wide);
  margin: 0 auto;
}

.ref-group {
  margin: 0 0 44px;
}

.ref-group h2 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 500;
  font-variation-settings: "opsz" 10;
  color: var(--ink);
}

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

.ref-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ref-title {
  font-weight: 600;
  color: var(--ink);
}

.ref-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--caption);
}

.ref-url {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  letter-spacing: -0.015em;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.contact-plate {
  margin: 28px 0 32px;
  padding: clamp(22px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--plum);
}

.contact-plate p {
  margin: 0 0 12px;
}

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

.contact-address {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--plum);
  overflow-wrap: anywhere;
}

/* Shared Monograph Colophon Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: clamp(44px, 5.5vw, 64px) 0 clamp(40px, 5vw, 56px);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}

.footer-col h2 {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--plum);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 220ms ease;
}

.footer-col a:hover {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.footer-colophon {
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.footer-statement {
  margin: 0;
  max-width: 68ch;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--caption);
}

/* ==========================================================================
   Responsive Breakpoints (1440px -> 768px -> 390px)
   ========================================================================== */

@media (max-width: 920px) {
  .dossier-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .inquiry-spread {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .inquiry-plate-col {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .header-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--rule);
  }

  .wordmark {
    padding: 18px 0 13px;
  }

  .site-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 20px;
    padding: 10px 0 12px;
    border-top: 1px solid var(--rule);
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
  }
}

@media (max-width: 760px) {
  .claim-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 700px) {
  .ledger-table,
  .ledger-table caption,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td,
  .ledger-table th {
    display: block;
    width: 100%;
  }

  .ledger-table {
    background: transparent;
    border: 0;
  }

  .ledger-table caption {
    padding: 0 0 16px;
    line-height: 1.5;
  }

  .ledger-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ledger-table tbody tr {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--plum);
    padding: 16px;
    margin-bottom: 18px;
  }

  .ledger-table tbody th,
  .ledger-table tbody td {
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }

  .ledger-table tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .ledger-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--caption);
    margin-bottom: 3px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .page-wrap {
    padding-inline: 16px;
  }

  .wordmark {
    padding: 15px 0 11px;
  }

  .site-nav {
    gap: 6px 9px;
    padding: 9px 0 10px;
  }

  .nav-list {
    display: contents;
  }

  .hero {
    padding-top: 18px;
  }

  /* Vertical micro-diagram Gap Scale on narrow phones */
  .gap-scale {
    flex-direction: column;
    gap: 6px;
  }

  .gap-end {
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .gap-bridge {
    flex: 0 0 auto;
    width: 0;
    min-width: 0;
    height: 20px;
    border-top: 0;
    border-left: 2px dotted var(--plum);
  }

  .hero-action {
    flex-direction: column;
    gap: 14px;
  }

  .essay-index-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .chapter-frontispiece {
    padding: 16px 0 22px;
  }

  .breadcrumbs {
    margin-bottom: 8px;
  }

  .chapter-frontispiece .tracked-label {
    margin-bottom: 8px;
  }

  .chapter-title {
    font-size: 1.85rem;
    line-height: 1.12;
    margin-bottom: 10px;
  }

  .chapter-deck {
    font-size: 1.0625rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .chapter-plate.lead-plate {
    margin: 12px auto 16px;
  }

  .frontispiece-figures-inner,
  .frontispiece-figures-inner.cols-2,
  .scale-contrast-grid {
    grid-template-columns: 1fr;
  }

  .figure-cell {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 13px 16px;
  }

  .figure-cell:last-child {
    border-bottom: 0;
  }

  .scale-contrast-cell + .scale-contrast-cell {
    padding-top: 14px;
    border-top: 1px solid var(--rule);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
