/* =============================================================================
   ROME 50 BC: THE EDGE OF THE REPUBLIC: Era Book web theme
   Served at rome.exodusnds.com. Load AFTER assets/exodus/era-book.css.

   The printed book's look (shared/css/rome.css in the book repository, locked by
   Paul 2026-10-31): Fresco and Inscription. Travertine paper, Egyptian blue
   structure, cinnabar as the one hot colour, ochre trim, carved capitals
   (Cinzel), a Greek-key band. Flat colours only. Fonts: Cinzel and EB Garamond,
   from Google Fonts via site.yml.
   ============================================================================= */

/* ── Part 1: tokens ───────────────────────────────────────────────────────── */
:root {
  --rm-travertine:     #F0E8D6;
  --rm-plaster:       #E1D3B3;
  --rm-marble:      #FAF6EC;
  --rm-ink:        #231F1C;
  --rm-bronze:        #5B4632;
  --rm-blue:      #2D5F8B;
  --rm-bluelt:        #5C86A8;
  --rm-cinnabar:  #A3322A;
  --rm-cinnabar-deep:    #6E1F1D;
  --rm-ochre:      #C9962F;
  --rm-laurel:        #4A6B3E;
  --rm-water:      #DCE6EC;

  --eb-paper:        var(--rm-travertine);
  --eb-paper-2:      var(--rm-plaster);
  --eb-ink:          var(--rm-ink);
  --eb-muted:        #5A4632;
  --eb-primary:      var(--rm-blue);
  --eb-on-primary:   var(--rm-marble);
  --eb-accent:       var(--rm-cinnabar);
  --eb-on-accent:    var(--rm-marble);
  --eb-accent-2:     var(--rm-bronze);
  --eb-highlight:    var(--rm-ochre);
  --eb-border:       var(--rm-ink);
  --eb-rule:         var(--rm-blue);
  --eb-font-display: 'Cinzel', Georgia, serif;
  --eb-font-heading: 'Cinzel', Georgia, serif;
  --eb-font-body:    'EB Garamond', Georgia, serif;

  /* The Exodus snippet palette, remapped as the printed book does it. */
  --ends-green:   var(--rm-laurel);
  --ends-red:     var(--rm-cinnabar);
  --ends-amber:   var(--rm-ochre);
  --ends-desc-header: var(--rm-ochre);
  --ends-note-border: var(--rm-blue);
  --ends-quote-border: var(--rm-bluelt);
}

/* ── Part 2: the structure, in the book's hand ────────────────────────────── */
/* Header: carved capitals on an Egyptian-blue ground, an ochre rule beneath. */
.eb-header { border-bottom: 3px solid var(--rm-ink); box-shadow: inset 0 -6px 0 var(--rm-travertine), inset 0 -7px 0 var(--rm-ochre); }
.eb-header-inner { padding-bottom: 1.3rem; }
.eb-brand-title { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.2rem 1.6rem; }
.eb-nav-link { font-weight: 700; }

.eb-title { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.eb-kicker { font-weight: 700; }
.eb-section-title { text-transform: uppercase; letter-spacing: 0.08em; }

.eb-hero { background-color: var(--rm-blue); }
.eb-hero::before { background: rgba(31, 66, 98, 0.82); }
.eb-hero-subtitle { color: var(--rm-plaster); }
.eb-hero-cover { border-color: var(--rm-marble); outline-color: var(--rm-ochre); }

.eb-part { background: var(--rm-plaster); border: 3px double var(--rm-blue); }
.eb-part-list li + li { border-top-color: rgba(35, 31, 28, 0.18); }
.eb-part-link-summary { color: var(--eb-muted); }

.eb-cast { background: var(--rm-travertine); border-top: 1px solid var(--rm-blue); border-bottom: 1px solid var(--rm-blue); }
.eb-cast-image { border-color: var(--rm-ink); outline-color: var(--rm-blue); }
.eb-cast-name { color: var(--rm-blue); }

.eb-license-note { background: var(--rm-plaster); }

details.eb-fold { background: var(--rm-plaster); border: 3px double var(--rm-blue); }
.eb-toc-link.is-active { background: var(--rm-blue); color: var(--rm-marble); }
.eb-chapter-title { color: var(--rm-blue); }
.eb-pager-link { background: var(--rm-travertine); }
.eb-pager-link:hover,
.eb-pager-link:focus-visible { background: var(--rm-plaster); }
.eb-footer { background: var(--rm-blue); color: var(--rm-marble); border-top-color: var(--rm-ink); }

/* ── Part 3: the chapters ─────────────────────────────────────────────────── */
.eb-prose.rulebook-content { font-family: 'EB Garamond', Georgia, serif; color: var(--rm-ink); }

.eb-prose.rulebook-content h2,
.eb-prose.rulebook-content h3,
.eb-prose.rulebook-content h4,
.eb-prose.rulebook-content h5,
.eb-prose.rulebook-content h6 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  color: var(--rm-blue);
  text-transform: none;
  letter-spacing: 0.04em;
}
.eb-prose.rulebook-content h2 {
  margin: 2.2rem 0 0.9rem;
  padding-bottom: 0.3rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  border-bottom: 2px solid var(--rm-blue);
}
.eb-prose.rulebook-content h3 { margin: 1.8rem 0 0.6rem; font-size: 1.35rem; border: none; }
.eb-prose.rulebook-content h4 { margin: 1.4rem 0 0.4rem; font-size: 1.15rem; color: var(--rm-bronze); }
.eb-prose.rulebook-content h5,
.eb-prose.rulebook-content h6 { margin: 1.2rem 0 0.35rem; font-size: 1rem; color: var(--rm-bronze); }
.eb-prose.rulebook-content h2 + h3,
.eb-prose.rulebook-content h3 + h4 { margin-top: 0.6rem; }

.eb-prose a { color: var(--rm-blue); text-decoration-color: var(--rm-bluelt); }
.eb-prose a:hover,
.eb-prose a:focus-visible { color: var(--rm-cinnabar); }
.eb-prose strong { color: var(--rm-ink); }
.eb-prose em, .eb-prose i { font-family: 'EB Garamond', Georgia, serif; }

/* Divider: a dotted track line. */
.eb-prose hr {
  border: none;
  height: 6px;
  margin: 1.5rem 0;
  background: repeating-linear-gradient(90deg, var(--rm-cinnabar) 0 8px, transparent 8px 14px) center / 100% 2px no-repeat;
}

/* Tables: ultramarine head, sand banding, tar rules. */
.eb-prose.rulebook-content table { background: var(--rm-marble); color: var(--rm-ink); font-size: 0.95rem; }
.eb-prose.rulebook-content th {
  background: var(--rm-blue);
  color: var(--rm-marble);
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}
.eb-prose.rulebook-content td { border-bottom: 1px solid var(--rm-bronze); }
.eb-prose.rulebook-content tbody tr:nth-child(even) { background: rgba(216, 199, 146, 0.6); }
.eb-prose.rulebook-content tbody tr:nth-child(odd) { background: var(--rm-marble); }

/* Ledger tables (money): red column rules, right-aligned figures, double rule at the head. */
.eb-prose .ledger table { border: 1px solid var(--rm-ink); }
.eb-prose .ledger table th { background: var(--rm-plaster); color: var(--rm-ink); border-bottom: 3px double var(--rm-ink); }
.eb-prose .ledger table th,
.eb-prose .ledger table td { border-left: 1px solid var(--rm-cinnabar-deep); text-align: right; }
.eb-prose .ledger table th:first-child,
.eb-prose .ledger table td:first-child { border-left: 0; text-align: left; }
.eb-prose .ledger table tbody tr:nth-child(even),
.eb-prose .ledger table tbody tr:nth-child(odd) { background: transparent; }

/* Articles: numbered clauses for canonical rules and worked examples. */
.eb-prose .articles {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  background: rgba(247, 242, 228, 0.85);
  border: 3px double var(--rm-blue);
  display: flow-root;
}
.eb-prose .articles > :first-child { margin-top: 0; }
.eb-prose .articles > :last-child { margin-bottom: 0; }
.eb-prose .articles p { display: flow-root; }
.eb-prose .articles h5,
.eb-prose .articles h4 {
  margin: 0 0 0.6rem;
  color: var(--rm-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.98rem;
}
.eb-prose .articles .no {
  float: left;
  min-width: 1.75em;
  margin: 0 0.2em 0 0;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  font-size: 2.3em;
  line-height: 0.9;
  color: var(--rm-cinnabar-deep);
}

/* Legend: what the tale says, who tells it, why it may not be so. */
.eb-prose .legend {
  position: relative;
  margin: 1.4rem 0;
  padding: 0.7rem 1rem 0.7rem 3.4rem;
  background: rgba(247, 242, 228, 0.85);
  border-left: 5px solid var(--rm-cinnabar);
}
.eb-prose .legend::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 2px solid var(--rm-cinnabar);
  border-radius: 50%;
  background: radial-gradient(circle, var(--rm-cinnabar) 0 14%, transparent 15%);
}
.eb-prose .legend > :first-child { margin-top: 0; }
.eb-prose .legend > :last-child { margin-bottom: 0; }
.eb-prose .legend h5,
.eb-prose .legend h4 {
  margin: 0 0 0.4rem;
  font-family: 'Cinzel', Georgia, serif;
  color: var(--rm-cinnabar);
  letter-spacing: 0.1em;
}
.eb-prose .legend p,
.eb-prose .legend em { font-style: italic; }

/* Cartouche: adversaries, hooks and cast entries. Rope-bordered panel with a ribbon head. */
.eb-prose .cartouche {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem 1rem;
  background: rgba(247, 242, 228, 0.9);
  border: 3px double var(--rm-bluelt);
  outline: 2px dashed var(--rm-ochre);
  outline-offset: -8px;
}
.eb-prose .cartouche > :last-child { margin-bottom: 0; }
.eb-prose .cartouche h5,
.eb-prose .cartouche h4 {
  margin: -0.75rem -1rem 0.8rem;
  padding: 0.35rem 1rem;
  background: var(--rm-blue);
  color: var(--rm-marble);
  text-align: center;
  letter-spacing: 0.1em;
  font-size: 1.02rem;
}
.eb-prose .cartouche p,
.eb-prose .cartouche ul,
.eb-prose .cartouche ol { max-width: none; }
.eb-prose .cartouche table { table-layout: fixed; width: 100%; }
.eb-prose .cartouche table th { font-size: 0.7rem; letter-spacing: 0; text-align: center; padding: 2px 1px; }
.eb-prose .cartouche table td { text-align: center; padding: 2px 1px; }

/* Glass: a translucent panel over art in print; a quiet sand panel on the web. */
.eb-prose .glass {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--rm-plaster);
  border: 1px solid var(--rm-blue);
}
.eb-prose .glass > :first-child { margin-top: 0; }
.eb-prose .glass > :last-child { margin-bottom: 0; }

/* Sidebar note: short practical notes. Sand ground, brass left rule. */
.eb-prose .sidebarNote {
  margin: 1.4rem 0;
  padding: 0.75rem 1rem;
  background: rgba(216, 199, 146, 0.7);
  border-left: 6px solid var(--rm-ochre);
  font-size: 0.98rem;
}
.eb-prose .sidebarNote > :first-child { margin-top: 0; }
.eb-prose .sidebarNote > :last-child { margin-bottom: 0; }
.eb-prose .sidebarNote h5,
.eb-prose .sidebarNote h4 { margin: 0 0 0.4rem; color: var(--rm-bronze); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.95rem; }

/* Descriptive band: tar ground, brass heading, vermilion left rule. */
.eb-prose.rulebook-content .descriptive {
  margin: 1.6rem 0 0.8rem;
  padding: 0.8rem 1.1rem;
  background: var(--rm-bronze);
  color: var(--rm-marble);
  border-left: 5px solid var(--rm-cinnabar);
  border-radius: 0;
}
.eb-prose.rulebook-content .descriptive h2,
.eb-prose.rulebook-content .descriptive h3,
.eb-prose.rulebook-content .descriptive h4 { margin: 0; color: var(--rm-plaster); border: none; }
.eb-prose.rulebook-content .descriptive > :last-child { margin-bottom: 0; }

/* The credits and licensing pages. */
.eb-prose .legalPage,
.eb-prose .legalLinks { max-width: var(--eb-prose-width); }
.eb-prose .legalLinks { margin: 1.2rem 0; padding: 0.8rem 1rem; text-align: center; border: 3px double var(--rm-blue); background: var(--rm-plaster); }
.eb-prose .legalLinks h3 { margin: 0.2rem 0; font-size: 1.1rem; }

/* Stat blocks: ultramarine tiles with white figures; adversaries in tar. */
.eb-prose .archetype,
.eb-prose .adversary,
.eb-prose .minion { font-family: 'Cinzel', Georgia, serif; margin: 0.4rem 0 0.8rem; }
.eb-prose .archetype .stat,
.eb-prose .adversary .stat,
.eb-prose .minion .stat { background: var(--rm-blue); color: var(--rm-marble); border-radius: 0; min-width: 44px; }
.eb-prose .adversary .stat,
.eb-prose .minion .stat { background: var(--rm-bronze); }
.eb-prose .archetype .stat::before,
.eb-prose .adversary .stat::before,
.eb-prose .minion .stat::before { opacity: 0.85; letter-spacing: 0.08em; }

/* Maps: framed, with the "large map" link as a brass badge. */
.eb-prose .mapview { margin: 1.2rem auto; }
.eb-prose .mapview img { display: block; width: 100%; height: auto; }
.eb-prose .mapview.half { display: inline-block; width: 48%; vertical-align: top; }
.eb-prose .mapview p { margin: 0; }
@media (max-width: 640px) { .eb-prose .mapview.half { display: block; width: 100%; } }
.eb-prose .mapseal { display: block; width: max-content; margin: 5px 0 2px auto; padding: 2px 10px; background: var(--rm-marble); border: 2px solid var(--rm-ochre); border-radius: 12px; color: var(--rm-bronze); font-family: 'Cinzel', Georgia, serif; font-size: 0.75rem; letter-spacing: 0.1em; text-decoration: none; }
.eb-prose .mapseal::after { content: "LARGE MAP"; }
.eb-prose .mapKey { border: 3px double var(--rm-blue); background: var(--rm-marble); padding: 0.4rem 0.8rem; font-family: 'EB Garamond', Georgia, serif; }

/* Framed pictures: ink frame, thin ultramarine outline. */
.eb-prose img.framed { border: 3px solid var(--rm-ink); outline: 1px solid var(--rm-blue); outline-offset: 3px; }
.eb-prose figcaption { font-family: 'EB Garamond', Georgia, serif; color: var(--eb-muted); }
.eb-prose .eb-fig figcaption { font-family: 'Cinzel', Georgia, serif; color: var(--rm-blue); }

/* Blockquotes: sea-blue rule. */
.eb-prose.rulebook-content blockquote { border-left: 4px solid var(--rm-bluelt); color: var(--eb-muted); }
