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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  background: #f1e9d9;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-color: inherit;
}

.absolute { position: absolute; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.drop-cap {}
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.gap-10 { gap: 2.5rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-1\.5 { row-gap: 0.375rem; }
.gap-y-2 { row-gap: 0.5rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.italic { font-style: italic; }
.items-baseline { align-items: baseline; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }
.leading-snug { line-height: 1.375; }
.max-w-3xl { max-width: 48rem; }
.max-w-prose { max-width: 65ch; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.opacity-80 { opacity: 0.8; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.pl-0 { padding-left: 0; }
.pl-3 { padding-left: 0.75rem; }
.pt-10 { padding-top: 2.5rem; }
.pt-2 { padding-top: 0.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.relative { position: relative; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-nowrap { white-space: nowrap; }
.top-1\/2 { top: 50%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-14 { width: 3.5rem; }
.w-28 { width: 7rem; }
.w-full { width: 100%; }
.whitespace-pre {white-space: pre;}
.last\:mb-0:last-child { margin-bottom: 0; }

.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-7 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.75rem; }

@media (min-width: 768px) {
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:gap-10 { gap: 2.5rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:mb-10 { margin-bottom: 2.5rem; }
  .md\:mt-8 { margin-top: 2rem; }
  .md\:pb-12 { padding-bottom: 3rem; }
  .md\:pt-14 { padding-top: 3.5rem; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:w-32 { width: 8rem; }
}

@media screen and (max-width: 768px) {
  .max-md\:pl-0 {
    padding-left: 0;
  }
}

@media (min-width: 1024px) {
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:gap-12 { gap: 3rem; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.serif {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: -0.01em;
}
.serif-tight {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: -0.02em;
}
.mono {
  font-family: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.smallcap {
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 600;
}
.rule { height: 1px; background: #b8ab90; }
.rule-thin { height: 1px; background: #d3c6a8; }
.rule-thick { height: 2px; background: #1c1914; }
.drop-cap::first-letter {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  float: left;
  font-size: 4.2em;
  line-height: 0.85;
  padding-right: 10px;
  padding-top: 6px;
  font-weight: 500;
  color: #8a2c1c;
}
.hatch {
  background-image: repeating-linear-gradient(
    45deg, #2d3a24 0 4px, #4a5c3a 4px 8px
  );
}
.grid-bg {
  background-image:
    linear-gradient(#d3c6a8 1px, transparent 1px),
    linear-gradient(90deg, #d3c6a8 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page-shell { padding-inline: 0; }
.page-column {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f1e9d9 0%, #f8f2e2 100%);
  position: relative;
}
.page-column::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid #d3c6a8;
  pointer-events: none;
}
.page-section-pad {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .page-section-pad {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}
@media (min-width: 768px) {
  .sm-row {
    flex-direction: row !important;
  }
  .sm-row-between {
    align-items: baseline;
    justify-content: space-between;
  }
}
@media (min-width: 1280px) {
  .page-shell {
    padding-inline: clamp(8rem, 11vw, 14rem);
    padding-block: 2rem;
  }
  .page-column {
    border: 1px solid #b8ab90;
    box-shadow:
      0 0 0 1px rgba(241, 233, 217, 0.9) inset,
      0 30px 80px rgba(28, 25, 20, 0.12);
  }
  .page-section-pad {
    padding-left: clamp(3.5rem, 4vw, 5rem);
    padding-right: clamp(3.5rem, 4vw, 5rem);
  }
}

/* ─── Volume bookmark tabs ─── */
.vol-tabs {
  display: flex;
  gap: 6px;
  padding-left: 1.5rem;
  position: relative;
  z-index: 2;
}
.vol-tab {
  width: 88px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8ab90;
  border-top-width: 2px;
  border-radius: 5px 5px 0 0;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.vol-tab--active {
  background: #f1e9d9;
  border-bottom-color: #f1e9d9;
  border-top-color: #8a2c1c;
  color: #1c1914;
  cursor: default;
  z-index: 3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.vol-tab--active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 1px;
  background: #b8ab90;
  opacity: 0.5;
}
.vol-tab--inactive {
  background: #e6dcc6;
  border-top-color: #a89878;
  color: #3b3528;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(28, 25, 20, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.vol-tab--inactive:hover {
  background: #ebe3d1;
  color: #1c1914;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(28, 25, 20, 0.1);
}
.vol-tab--inactive:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(28, 25, 20, 0.06);
}
.vol-tab:focus-visible {
  outline: 2px solid #a87a2e;
  outline-offset: 2px;
}

/* Coming soon placeholder */
.vol-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  position: relative;
  text-align: center;
  padding: 2rem;
}

@media (min-width: 768px) {
  .vol-tabs { padding-left: 3rem; }
  .vol-tab { width: 100px; height: 32px; font-size: 11px; }
}
@media (min-width: 1280px) {
  .vol-tabs {
    padding-left: 56px;
    margin-bottom: -1px;
  }
  .vol-tab { width: 112px; height: 36px; }
}

/* ─── Save-as-PDF button (screen only) ─── */
.pdf-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f8f2e2;
  background: #8a2c1c;
  border: 1px solid #5c1e14;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(28, 25, 20, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.pdf-btn:hover {
  background: #9a3422;
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(28, 25, 20, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.pdf-btn:active { transform: translateY(0); }
.pdf-btn:focus-visible { outline: 2px solid #a87a2e; outline-offset: 3px; }
.pdf-btn span[aria-hidden="true"] { font-size: 15px; line-height: 1; }

/* ════════════════════════════════════════════════════════════════ */
/* PRINT / PDF EXPORT                                                 */
/*   Goal: a clean, readable letter-size document that keeps the warm */
/*   paper theme, drops the interactive chrome, and avoids ugly       */
/*   mid-element page breaks.                                         */
/* ════════════════════════════════════════════════════════════════ */
@media print {
  @page {
    size: Letter portrait;
    margin: 14mm 12mm;
  }

  /* Honour the paper-and-ink palette on paper too. */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #f8f2e2 !important;
  }

  /* Hide everything that's interactive-only or purely decorative. */
  .no-print,
  .pdf-btn,
  .vol-tabs,
  .noise {
    display: none !important;
  }

  /* Compress the generous on-screen vertical rhythm so pages fill well. */
  .page-section-pad.py-14,
  .md\:py-20,
  .py-14 {
    padding-top: 1.4rem !important;
    padding-bottom: 1.4rem !important;
  }
  header.page-section-pad {
    padding-top: 0.5rem !important;
  }
  .mt-14 { margin-top: 1.5rem !important; }
  .mt-10 { margin-top: 1.25rem !important; }
  .mb-10 { margin-bottom: 1.25rem !important; }

  /* Tame the masthead headline so it doesn't eat the first page. */
  header h1.serif-tight {
    font-size: 3.2rem !important;
  }

  /* Start each numbered section on a fresh page for a clean read,
     and keep the masthead with its lead. */
  section[class*="page-section-pad"] {
    break-inside: auto;
    page-break-inside: auto;
  }
  section.py-14,
  section.md\:py-20 {
    break-before: page;
    page-break-before: always;
  }
  header + section,
  section:first-of-type {
    break-before: auto;
    page-break-before: auto;
  }

  /* Don't strand a heading at the foot of a page. */
  h1, h2, h3 {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  /* Keep self-contained units (cards, charts, tables, rows) intact. */
  .pdf-card,
  table,
  tr,
  dl,
  figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Two-up grids read fine stacked, but restore real columns where the
     content is genuinely side-by-side and narrow enough to fit. */
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .md\:grid-cols-2,
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Links shouldn't look clickable on paper. */
  a { text-decoration: none !important; color: inherit !important; }

  footer { break-before: avoid; }
}
