/* =====================================================================
   NEM PEPPER ANALYTICAL INDEX — SHARED STYLESHEET
   New Every Morning Anglican Fellowship · 1928commonprayer.org
   Design system: Cinzel (display), EB Garamond (body),
   cream/gold/rubric palette with day-night theming.
   ===================================================================== */

/* ---------- Theme tokens ---------- */

:root,
:root[data-theme="day"] {
  --bg:            #f7f2e8;
  --surface:       #fdfaf2;
  --surface-2:      #f1ead8;
  --ink:           #2a2118;
  --ink-2:      #4a3f33;
  --ink-3:      #75695a;
  --heading:       #3D2A0E;
  --accent:          #7A5C12;
  --accent-2:     #b89643;
  --rubric:        #7a2020;
  --rule:          #c9b88a;
  --rule-faint:     #e1d4ad;
  --link:          #6b4d10;
  --link-hover:    #3D2A0E;
  --shadow:        0 1px 3px rgba(61, 42, 14, 0.08),
                   0 4px 12px rgba(61, 42, 14, 0.05);
  --focus-ring:    0 0 0 3px #b89243, 0 0 0 5px #f7f2e8;
}

:root[data-theme="night"] {
  --bg:            #1a1612;
  --surface:       #221c16;
  --surface-2:      #2a221a;
  --ink:           #e8ddc6;
  --ink-2:      #c4b89c;
  --ink-3:      #978b78;
  --heading:       #e6c97a;
  --accent:          #c9a14a;
  --accent-2:     #b89343;
  --rubric:        #e8736e;
  --rule:          #5c4a28;
  --rule-faint:     #3a2f1c;
  --link:          #d4a838;
  --link-hover:    #f0d878;
  --shadow:        0 1px 3px rgba(0, 0, 0, 0.4),
                   0 4px 12px rgba(0, 0, 0, 0.25);
  --focus-ring:    0 0 0 3px #d4a838, 0 0 0 5px #1a1612;
}

/* Honour OS preference on first load (overridden by stored choice via JS) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:            #1a1612;
    --surface:       #221c16;
    --surface-2:      #2a221a;
    --ink:           #e8ddc6;
    --ink-2:      #c4b89c;
    --ink-3:      #978b78;
    --heading:       #e6c97a;
    --accent:          #c9a14a;
    --accent-2:     #b89343;
    --rubric:        #e8736e;
    --rule:          #5c4a28;
    --rule-faint:     #3a2f1c;
    --link:          #d4a838;
    --link-hover:    #f0d878;
  }
}

/* ---------- Reset / base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: 'EB Garamond', 'Garamond', Georgia, 'Times New Roman', serif;
  font-size: 1.1875rem;   /* 19px — shared with the other three volumes */
  line-height: 1.70;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtle paper-grain in day mode for depth without distraction */
:root[data-theme="day"] body,
:root:not([data-theme]) body {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139, 105, 20, 0.025) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 105, 20, 0.02) 0%, transparent 50%);
}

/* ---------- Skip-link ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--heading);
  color: var(--bg);
  padding: 0.6rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---------- Layout ---------- */

.container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.container-wide {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

@media (min-width: 768px) {
  .container, .container-wide { padding: 2.5rem 2rem 5rem; }
}

/* ---------- Site header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule-faint);
  background: var(--surface);
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(150%);
}

.site-header-inner {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--heading);
  text-transform: uppercase;
  margin: 0;
  font-weight: 500;
}

.site-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.site-title a:hover { border-bottom-color: var(--accent); }
.site-title a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ---------- Day/night toggle ---------- */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  text-transform: uppercase;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--heading);
  background: var(--surface-2);
}
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.theme-toggle .icon {
  width: 14px;
  height: 14px;
  display: inline-block;
}
.theme-toggle .label-day { display: none; }
.theme-toggle .label-night { display: inline; }
:root[data-theme="night"] .theme-toggle .label-day { display: inline; }
:root[data-theme="night"] .theme-toggle .label-night { display: none; }

/* ---------- Headings ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
  color: var(--heading);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

h1.title-display {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: 0.05em;
  text-align: center;
  margin: 2.5rem 0 0.5rem;
  text-transform: uppercase;
  font-weight: 500;
}

.byline .small {
  text-transform: lowercase;
  font-style: italic;
  font-family: 'EB Garamond', serif;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--ink-3);
}

h1.title-display .ampersand,
h1.title-display .small {
  text-transform: none;
  font-style: italic;
  font-family: 'EB Garamond', serif;
  letter-spacing: normal;
  font-weight: 400;
}

h2.section-heading {
  font-size: 1.4rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 3rem 0 1rem;
  font-weight: 500;
}

h2.section-numeral {
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 3.5rem 0 0.25rem;
  font-weight: 500;
}

h3 {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2rem 0 0.75rem;
}

h4 {
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.5rem;
}

/* ---------- Gold rule dividers ---------- */

hr.rule-gold {
  border: none;
  height: 1px;
  background: var(--accent);
  width: 60%;
  max-width: 240px;
  margin: 1.5rem auto;
  opacity: 0.7;
}

hr.rule-thin {
  border: none;
  height: 1px;
  background: var(--rule-faint);
  margin: 2rem 0;
}

.fleuron {
  text-align: center;
  color: var(--accent);
  font-size: 1.2rem;
  margin: 2rem 0;
  letter-spacing: 0.5em;
  user-select: none;
}
.fleuron::before { content: "\2766\00a0\00a0\2766\00a0\00a0\2766"; }

/* ---------- Body prose ---------- */

/* Justified from 20 Aug 2026. This was the one volume of the four set
   ragged right, and alignment is the loudest of the differences between
   them — louder than paper or size. Hyphenation is enabled with it, since
   justifying without it opens rivers at this measure. */
p { margin: 0 0 1em; text-align: justify; hyphens: auto; }

.lead {
  font-size: 1.15rem;
  line-height: 1.6;
  text-align: center;
  font-style: italic;
  color: var(--ink-2);
  margin: 0.5rem auto 2rem;
  max-width: 36rem;
}

.subtitle {
  font-family: 'EB Garamond', serif;
  font-size: 1.1rem;
  text-align: center;
  font-style: italic;
  color: var(--ink-2);
  margin: 0.5rem 0 1.5rem;
}

.byline {
  font-family: 'Cinzel', serif;
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--heading);
  margin: 2rem 0 0.5rem;
  text-transform: uppercase;
}

/* Drop cap for opening paragraphs of essay sections */
p.opening::first-letter {
  font-family: 'Cinzel', serif;
  font-size: 3.2em;
  float: left;
  line-height: 0.9;
  margin: 0.05em 0.08em 0 0;
  color: var(--heading);
  font-weight: 500;
}

/* Footnotes */
.footnote {
  font-size: 0.88rem;
  color: var(--ink-3);
  border-top: 1px solid var(--rule-faint);
  margin-top: 2rem;
  padding-top: 1rem;
  line-height: 1.55;
}
.footnote p { margin: 0 0 0.5em; }
.footnote-ref {
  font-size: 0.7em;
  vertical-align: super;
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.1em;
}
.footnote-ref:hover, .footnote-ref:focus-visible { color: var(--rubric); }

/* Citations / italics */
em.work-title { font-style: italic; }

/* ---------- Asides / pastoral notes ---------- */

aside.note,
aside.provenance {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.96rem;
  line-height: 1.6;
}

aside.note .label,
aside.provenance .label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

aside.provenance {
  border-left-color: var(--rubric);
  border-left-width: 2px;
  background: var(--surface);
  border: 1px solid var(--rule-faint);
  border-left: 2px solid var(--rubric);
}
aside.provenance .label { color: var(--rubric); }

/* ---------- Links ---------- */

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--accent);
}
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}

/* ---------- Table of contents ---------- */

.toc {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  counter-reset: toc-item;
}

.toc li {
  margin: 0;
  padding: 0;
  border-bottom: 1px dotted var(--rule);
}
.toc li:last-child { border-bottom: none; }

.toc a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.05rem;
}
.toc a:hover {
  color: var(--heading);
  background: var(--surface-2);
}
.toc a::before {
  counter-increment: toc-item;
  content: counter(toc-item, upper-roman) ".";
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  width: 3rem;
}
.toc .toc-title {
  flex: 1;
  font-style: italic;
}
.toc .toc-folio {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  flex-shrink: 0;
  font-style: normal;
}

/* ---------- The Index pages ---------- */

.index-letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--rule-faint);
}
.index-letter-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--heading);
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  letter-spacing: 0;
  transition: all 0.15s ease;
}
.index-letter-nav a:hover,
.index-letter-nav a:focus-visible {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  outline: none;
}
.index-letter-nav a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.index-section {
  margin: 2.5rem 0;
}

.index-letter {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  text-align: center;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin: 1.5rem 0 1rem;
  font-weight: 500;
  scroll-margin-top: 5rem;
}

.index-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.index-list > li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--rule-faint);
  line-height: 1.4;
}
.index-list > li:last-child { border-bottom: none; }
.index-list .term {
  flex: 1;
}
.index-list .term .lead-word {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: var(--heading);
  font-weight: 500;
}
.index-list .pages {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  font-feature-settings: "lnum";
}
.index-list .pages.continued {
  font-style: italic;
  font-family: 'EB Garamond', serif;
  letter-spacing: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.index-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--ink-2);
  margin-right: 0.4rem;
}

/* Search input */
.search-bar {
  position: relative;
  margin: 1.5rem 0;
}
.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.18);
}
.search-bar input::placeholder { color: var(--ink-3); font-style: italic; }
.search-bar .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-3);
  pointer-events: none;
}
.search-result-count {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-3);
  font-style: italic;
}
mark {
  background: rgba(184, 146, 67, 0.35);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* ---------- Tables (Psalter changes) ---------- */

.psalter-changes {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.98rem;
  background: var(--surface);
  border: 1px solid var(--rule-faint);
  border-radius: 4px;
  overflow: hidden;
}

.psalter-changes caption {
  caption-side: top;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading);
  text-align: center;
  padding: 0.75rem 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}

.psalter-changes th {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.65rem 1rem;
  background: var(--surface-2);
  color: var(--heading);
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
  width: 50%;
}

.psalter-changes td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-faint);
  line-height: 1.55;
}
.psalter-changes tr:last-child td { border-bottom: none; }

.psalter-changes .ref-row td {
  background: var(--surface-2);
  padding: 0.5rem 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}

.proper-name-substitutions {
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  margin: 1.5rem 0;
  font-size: 0.96rem;
}
.proper-name-substitutions strong { color: var(--heading); }

@media (max-width: 540px) {
  .psalter-changes,
  .psalter-changes tbody,
  .psalter-changes tr,
  .psalter-changes td,
  .psalter-changes th { display: block; width: 100%; }
  .psalter-changes thead { display: none; }
  .psalter-changes td {
    padding: 0.65rem 1rem;
    border-bottom: none;
  }
  .psalter-changes td:first-of-type {
    padding-top: 1rem;
    font-style: italic;
  }
  .psalter-changes td:first-of-type::before {
    content: "Earlier Version";
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.25rem;
    font-style: normal;
  }
  .psalter-changes td:nth-of-type(2)::before {
    content: "Revised Version";
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.25rem;
  }
  .psalter-changes td:nth-of-type(2) {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule-faint);
  }
}

/* ---------- Section navigation ---------- */

.section-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 4rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-faint);
  flex-wrap: wrap;
}
.section-nav a {
  flex: 1 1 45%;
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule-faint);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.section-nav a:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}
.section-nav a.next { text-align: right; }
.section-nav .nav-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.section-nav .nav-title {
  font-style: italic;
  color: var(--heading);
  font-size: 1.05rem;
}

/* ---------- Folio markers (BCP page references) ---------- */

.folio {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-feature-settings: "lnum";
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule-faint);
  background: var(--surface);
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-3);
  margin-top: 4rem;
}
.site-footer p { margin: 0.4em 0; }
.site-footer .colophon {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.5em;
}
.site-footer a { color: var(--ink-2); }

/* ---------- Cross / liturgical glyphs ---------- */

.cross {
  font-family: 'EB Garamond', serif;
  color: var(--accent);
  font-style: normal;
}
.cross[aria-hidden="true"] + .sr-only { display: none; }

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

/* ---------- Index sub-section headings (e.g. ALMIGHTY*, COLLECTS, EPISTLES, GOSPELS) ---------- */

.index-sub-heading {
  font-family: 'Cinzel', serif;
  font-variant: small-caps;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--heading);
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--accent);
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.index-sub-heading .footnote-mark {
  font-size: 0.75em;
  color: var(--rubric);
  vertical-align: super;
  margin-left: 0.15em;
}

.index-sub-section {
  margin: 0 0 1.25rem;
}

/* "Continued" runner used at top of new pages in the source — used here for clarity */
.index-continued-marker {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--ink-3);
  font-size: 0.9rem;
  margin: 0.75rem 0 0.5rem;
}

/* Indent for entries within a Prayer-by-occasion sub-group (e.g. "First Sunday after Trinity:") */
.index-list.indented > li {
  padding-left: 1.25rem;
  border-left: 1px dotted var(--rule-faint);
}

/* Italic occasion-cue at the start of an entry (e.g. "First Sunday after Trinity:") */
.index-list .occasion {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--ink-2);
  margin-right: 0.3em;
}

/* Subgroup label mid-stream (e.g. "Holy Days." / "For Occasional Use." / "Eastertide.") */
.index-subgroup-label {
  font-family: 'Cinzel', serif;
  font-variant: small-caps;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--rubric);
  margin: 1.25rem 0 0.5rem;
  font-weight: 500;
}

/* Footnote within an index section (asterisk explanatory note) */
.index-section-footnote {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-2);
  margin: 1rem 0 1.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--rule-faint);
}
.index-section-footnote .mark { font-style: normal; color: var(--rubric); margin-right: 0.3em; }

/* Gap card to flag a missing range of pages */
.gap-card {
  background: var(--surface-2);
  border: 1px dashed var(--rubric);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-family: 'EB Garamond', serif;
}
.gap-card .label {
  display: block;
  font-family: 'Cinzel', serif;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--rubric);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.gap-card p { margin: 0 0 0.5em; font-style: italic; color: var(--ink-2); }
.gap-card p:last-child { margin-bottom: 0; }

/* Status banner */
.status-banner {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.status-banner strong {
  color: var(--heading);
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

/* ---------- Print stylesheet ---------- */

@media print {
  :root, :root[data-theme="day"], :root[data-theme="night"] {
    --bg: white;
    --surface: white;
    --surface-2: #f5f0e0;
    --ink: black;
    --ink-2: #333;
    --heading: black;
    --accent: #6b520f;
    --rubric: #5a1818;
    --rule: #999;
    --rule-faint: #ddd;
  }
  body {
    font-size: 11pt;
    line-height: 1.45;
    background: white;
    color: black;
  }
  .site-header,
  .theme-toggle,
  .skip-link,
  .search-bar,
  .index-letter-nav,
  .section-nav,
  .site-footer { display: none !important; }
  .container, .container-wide {
    max-width: 100%;
    padding: 0;
  }
  h1, h2, h3, h4 { page-break-after: avoid; }
  p, li, .index-list > li { page-break-inside: avoid; }
  a { color: black; text-decoration: none; }
  aside.provenance, aside.note { border-left-width: 2px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
