/* ── ORIGINAL PARCHMENT STYLES (verbatim from splits_reach_session_zero.html) ── */

:root {
  --ink: #1a1209;
  --parchment: #f5edd8;
  --parchment-dark: #e8dbbf;
  --parchment-deep: #d9c99a;
  --gold: #8b6914;
  --gold-light: #c9a227;
  --rust: #7a2e0e;
  --rust-light: #a84020;
  --teal: #1a4a4a;
  --teal-light: #2d6b6b;
  --border: #8b6914;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #2a1f0e;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
}

.page {
  max-width: 820px;
  margin: 2rem auto;
  background: var(--parchment);
  box-shadow: 0 8px 60px rgba(0,0,0,0.7), inset 0 0 80px rgba(139,105,20,0.08);
  position: relative;
}

.page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(139,105,20,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(122,46,14,0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* ── COVER ── */
.cover {
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.03) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.03) 40px),
    radial-gradient(ellipse at center top, rgba(201,162,39,0.15) 0%, transparent 70%),
    radial-gradient(ellipse at center bottom, rgba(139,105,20,0.12) 0%, transparent 70%);
  position: relative;
  overflow: hidden;
  page-break-after: always;
}

.cover::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(201,162,39,0.5);
  pointer-events: none;
}
.cover::after {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(201,162,39,0.25);
  pointer-events: none;
}

.cover-corner {
  position: absolute;
  width: 60px; height: 60px;
  border-color: var(--gold-light);
  border-style: solid;
  opacity: 0.6;
}
.cover-corner.tl { top: 30px; left: 30px; border-width: 2px 0 0 2px; }
.cover-corner.tr { top: 30px; right: 30px; border-width: 2px 2px 0 0; }
.cover-corner.bl { bottom: 30px; left: 30px; border-width: 0 0 2px 2px; }
.cover-corner.br { bottom: 30px; right: 30px; border-width: 0 2px 2px 0; }

.cover-inner {
  text-align: center;
  padding: 4rem 3rem;
  position: relative;
  z-index: 1;
}

.cover-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--gold-light);
  opacity: 0.85;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.cover-rule {
  width: 180px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light), transparent);
  margin: 1.2rem auto;
  opacity: 0.6;
}
.cover-rule.wide { width: 320px; }

.cover-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(52px, 9vw, 84px);
  font-weight: 700;
  color: #f0e4c0;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 0 40px rgba(201,162,39,0.15);
  margin-bottom: 0.15em;
}

.cover-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(13px, 2.2vw, 18px);
  color: var(--gold-light);
  letter-spacing: 0.2em;
  opacity: 0.9;
  margin-bottom: 3rem;
}

.cover-tagline {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: rgba(240,228,192,0.75);
  max-width: 460px;
  line-height: 1.6;
  margin-bottom: 3rem;
}

.cover-meta {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(201,162,39,0.6);
  text-transform: uppercase;
}

/* ── CONTENT PAGES ── */
.content {
  padding: 4rem 5rem;
}

@media (max-width: 640px) {
  .content { padding: 2.5rem 2rem; }
}

.section {
  margin-bottom: 3.5rem;
  position: relative;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  opacity: 0.5;
}

.section-divider-icon {
  color: var(--gold);
  font-size: 14px;
  opacity: 0.7;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 0.3em;
}

h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  color: var(--rust);
  letter-spacing: 0.04em;
  margin-bottom: 0.5em;
  position: relative;
  padding-bottom: 0.4em;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 3em;
  height: 2px;
  background: var(--rust);
  opacity: 0.4;
}

h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  color: var(--teal);
  margin-bottom: 0.4em;
  margin-top: 1.2em;
}

p {
  margin-bottom: 1em;
  font-size: 16px;
  color: #2a1f0e;
}

.lead {
  font-size: 18px;
  font-style: italic;
  color: var(--teal);
  border-left: 3px solid var(--gold);
  padding-left: 1.2em;
  margin-bottom: 1.5em;
  line-height: 1.65;
}

/* Page header stamp */
.page-header {
  background: var(--teal);
  padding: 1.4rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 640px) {
  .page-header { padding: 1.2rem 2rem; }
}

.page-header-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(240,228,192,0.9);
  text-transform: uppercase;
}

.page-header-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(201,162,39,0.7);
}

/* Callout box */
.callout {
  background: var(--parchment-dark);
  border: 1px solid var(--parchment-deep);
  border-left: 4px solid var(--gold);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
}

.callout-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5em;
  display: block;
}

.callout p { margin-bottom: 0.4em; font-size: 15px; }
.callout p:last-child { margin-bottom: 0; }

.callout.warning {
  border-left-color: var(--rust);
  background: rgba(122,46,14,0.04);
}
.callout.warning .callout-label { color: var(--rust); }

/* Vignette */
.vignette {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--parchment-deep);
  border-bottom: 1px solid var(--parchment-deep);
  background: rgba(212, 196, 168, 0.15);
  font-style: italic;
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.vignette-title {
  font-family: 'Cinzel', serif;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--rust);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.9rem;
  display: block;
}
.vignette p { margin-bottom: 0.7em; }
.vignette p:last-child { margin-bottom: 0; }
.vignette em { font-style: normal; font-weight: 600; }
.vignette .attribution {
  text-align: right;
  font-size: 14px;
  margin-top: 0.6em;
}

/* Race grid */
.race-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin: 1rem 0;
}

@media (max-width: 560px) {
  .race-grid { grid-template-columns: 1fr; }
}

.race-entry h3 { margin-top: 0; font-size: 17px; }
.race-entry p { font-size: 14.5px; margin-bottom: 0; }

.race-tag {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  background: var(--teal);
  color: rgba(240,228,192,0.9);
  padding: 1px 7px;
  margin-left: 0.5em;
  vertical-align: middle;
  text-transform: uppercase;
}

/* District list */
.district-list { list-style: none; }

.district-list li {
  padding: 0;
  border-bottom: 1px solid var(--parchment-deep);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 1rem;
  font-size: 15px;
  overflow: hidden;
}

.district-list li:last-child { border-bottom: none; }

.district-name {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--teal);
  text-transform: uppercase;
  align-self: start;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

/* Content warnings banner */
.content-warnings {
  background: var(--teal);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.content-warnings .cw-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 0.6em;
}

.cw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  list-style: none;
}

.cw-list li {
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  color: rgba(240,228,192,0.8);
}

.cw-list li::before {
  content: '◆ ';
  color: var(--gold-light);
  opacity: 0.5;
  font-size: 10px;
  vertical-align: middle;
}

/* Character cards */
.char-card {
  background: var(--parchment);
  border: 1px solid var(--parchment-deep);
  margin-bottom: 2.5rem;
  position: relative;
  page-break-inside: avoid;
}

.char-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(139,105,20,0.15);
  pointer-events: none;
}

.char-header {
  background: var(--teal);
  padding: 1.1rem 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.char-header.tier-low { background: var(--teal); }
.char-header.tier-mid { background: #4a3010; }
.char-header.tier-high { background: var(--rust); }

.char-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: #f0e4c0;
  letter-spacing: 0.05em;
}

.char-class {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(201,162,39,0.85);
  margin-top: 2px;
}

.char-tier {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(201,162,39,0.7);
  text-align: right;
  line-height: 1.8;
}

.char-tier strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(240,228,192,0.6);
}

.char-body {
  padding: 1.5rem 1.8rem;
}

.char-body p { font-size: 15px; margin-bottom: 0.75em; }
.char-body p:last-child { margin-bottom: 0; }

.char-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--parchment-dark);
  border: 1px solid var(--parchment-deep);
}

@media (max-width: 500px) {
  .char-stats { grid-template-columns: repeat(2, 1fr); }
}

.char-stat { text-align: center; }

.char-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 2px;
}

.char-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
}

.char-hook {
  border-top: 1px solid var(--parchment-deep);
  padding-top: 1rem;
  margin-top: 1rem;
}

.char-hook-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--rust);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5em;
}

.char-hook p { font-style: italic; font-size: 15px; color: var(--rust); }

/* Guidance list */
.guidance-list {
  list-style: none;
  counter-reset: guidance;
}

.guidance-list li {
  counter-increment: guidance;
  padding: 0.6rem 0 0.6rem 2.8rem;
  border-bottom: 1px dotted var(--parchment-deep);
  font-size: 15.5px;
  position: relative;
}

.guidance-list li:last-child { border-bottom: none; }

.guidance-list li::before {
  content: counter(guidance, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.55rem;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
}

/* Page break hints */
.new-page { page-break-before: always; }

/* Ornament */
.ornament {
  text-align: center;
  font-size: 24px;
  color: var(--gold);
  opacity: 0.4;
  margin: 2rem 0;
  letter-spacing: 0.5em;
}

/* Page footer */
.page-footer {
  background: var(--parchment-dark);
  border-top: 2px solid var(--parchment-deep);
  padding: 0.8rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-footer span {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
  opacity: 0.6;
  text-transform: uppercase;
}

strong { font-weight: 600; }
em { font-style: italic; }

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

li { margin-bottom: 0.3em; font-size: 15.5px; }

/* District images */
.district-img {
  grid-column: 1 / -1;
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: sepia(18%) brightness(0.82) contrast(1.05);
  border-bottom: 1px solid var(--parchment-deep);
}

.district-list li > span:last-child {
  padding: 0.7rem 0.4rem 0.7rem 0;
}

/* Cover background image */
.cover-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.18;
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 0;
}

.cover-inner { z-index: 1; }
.cover-corner { z-index: 2; }

/* City section hero image */
.section-hero-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-bottom: 1.5rem;
  filter: sepia(20%) brightness(0.8) contrast(1.08);
}

/* ── MULTI-COLUMN SECTIONS ── */
.section.cols-2 {
  column-count: 2;
  column-gap: 2.2rem;
  column-rule: 1px solid var(--parchment-deep);
}

.section.cols-3 {
  column-count: 3;
  column-gap: 1.8rem;
  column-rule: 1px solid var(--parchment-deep);
}

.section.cols-2 h1,
.section.cols-2 h2,
.section.cols-3 h1,
.section.cols-3 h2 {
  column-span: all;
}

/* Prevent component boxes from splitting across columns */
.callout,
.vignette,
.char-card,
.race-entry,
li {
  break-inside: avoid;
}

/* ── PAGE BREAK UTILITIES ── */
.break-before { break-before: page; }
.break-after  { break-after: page; }

/* Explicit PageBreak component — visible marker in screen modes */
.page-break {
  display: block;
  width: 100%;
  height: 0;
  border: none;
  border-top: 1px dashed rgba(139,105,20,0.3);
  margin: 2rem 0;
  position: relative;
}

.page-break::after {
  content: 'page break';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--parchment);
  padding: 0 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(139,105,20,0.4);
}

/* ── PRINT ── */
@page {
  size: A4;
  margin: 25mm 20mm 20mm 25mm;
}

@media print {
  body { background: white; }

  .page {
    margin: 0;
    box-shadow: none;
    max-width: none;
  }

  .page::before { display: none; }

  .sidebar,
  .sidebar-toggle,
  .book-controls { display: none !important; }

  .cover { min-height: 100vh; page-break-after: always; }

  .page-section { page-break-before: always; }
  .page-section:first-child { page-break-before: avoid; }

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

  .page-break {
    display: block;
    height: 0;
    border: none;
    page-break-after: always;
    margin: 0;
  }
  .page-break::after { display: none; }

  .callout,
  .vignette,
  .char-card { page-break-inside: avoid; }

  a[href]::after { content: none; }
}
