:root {
  --paper: #fffdf8;
  --paper-deep: #f2eadb;
  --ink: #29251f;
  --muted: #746859;
  --accent: #765034;
  --accent-dark: #40291d;
  --gold: #b18b51;
  --line: #d9cbb6;
  --notes: #f7f1e7;
  --shadow: 0 18px 48px rgba(63, 42, 27, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(177,139,81,.13), transparent 32rem),
    linear-gradient(180deg, #eee4d2 0, #f8f3e9 28rem, #eee6d8 100%);
  font: 18px/1.72 Georgia, "Times New Roman", serif;
}
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }

.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 100;
  padding: .7rem 1rem; background: white; color: var(--accent-dark); border-radius: .4rem;
}
.skip-link:focus { top: 1rem; }

.site-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem max(1rem, calc((100vw - 1180px) / 2));
  color: #fff8eb; background: rgba(64,41,29,.96);
  border-bottom: 1px solid rgba(255,255,255,.18); box-shadow: 0 6px 22px rgba(37,24,16,.18);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.site-bar a { color: inherit; text-decoration: none; }
.site-bar .brand { font-family: Georgia, serif; font-weight: 700; letter-spacing: .02em; }
.site-bar nav { display: flex; gap: 1rem; font-size: .86rem; }
.site-bar nav a:hover { color: #ead1a4; }

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 3rem; padding: clamp(1rem, 3.2vw, 3rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}

/* Original masthead */
.page-shell > table:first-of-type { width: 100% !important; border-collapse: separate; border-spacing: 0; }
.page-shell > table:first-of-type td { padding: clamp(.5rem, 2vw, 1.4rem); vertical-align: middle !important; }
.page-shell > table:first-of-type .promo-cell { width: min(360px, 34%) !important; text-align: left; }
.title-cell h1 {
  margin: 0 0 .8rem; color: var(--accent-dark);
  font-size: clamp(2rem, 4vw, 3.45rem); font-weight: 500; line-height: 1.05;
}
.title-cell h1 span {
  display: block; margin-top: .55rem; color: var(--muted);
  font-size: clamp(.9rem, 1.45vw, 1.08rem); font-style: italic; font-weight: 400; line-height: 1.45;
}
.download-link { margin: .7rem 0 .35rem; font: 600 .9rem/1.4 ui-sans-serif, system-ui, sans-serif; }
.translation-credit { margin: 0; color: var(--muted); font-size: .98rem; font-weight: 600; }
h3, h4, h5 { color: var(--muted); }
h3 { margin: .5rem 0; font: 600 1rem/1.4 ui-sans-serif, system-ui, sans-serif; }
h4 { margin: 0; line-height: 1.45; }
h5 {
  margin: 1.2rem auto 1.8rem; max-width: 850px; padding: 1rem 1.2rem;
  background: var(--notes); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0;
  font-size: 1rem; font-weight: 400;
}
.book-promo {
  display: block; padding: 1.15rem 1.25rem 1.1rem; color: var(--ink);
  background: linear-gradient(135deg, rgba(109,62,37,.07), rgba(176,134,77,.04));
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: .2rem;
  box-shadow: 0 8px 24px rgba(70,38,23,.07); line-height: 1.3; text-align: left;
  text-decoration: none; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.book-promo:hover {
  color: var(--ink); border-color: rgba(109,62,37,.55);
  box-shadow: 0 11px 28px rgba(70,38,23,.12); transform: translateY(-2px);
}
.book-promo span, .book-promo strong, .book-promo small { display: block; }
.promo-kicker {
  margin-bottom: .55rem; color: var(--accent);
  font: 700 .68rem/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
.book-promo strong { color: var(--accent-dark); font-size: clamp(1.2rem, 2.1vw, 1.55rem); font-weight: 600; }
.promo-edition { margin-top: .12rem; color: var(--muted); font-size: .86rem; }
.book-promo small { margin-top: .55rem; color: var(--muted); font-size: .72rem; font-style: italic; }
.promo-action {
  margin-top: .85rem; color: var(--accent);
  font: 700 .76rem/1.2 ui-sans-serif, system-ui, sans-serif;
}
.page-shell > p[style*="center"] { margin: 1.5rem 0; overflow: hidden; border-radius: 10px; }

/* Chapter directory */
table.dc {
  width: 100% !important; margin: 1.6rem 0; border: 0; border-collapse: separate; border-spacing: 4px;
  font: 600 .82rem/1.1 ui-sans-serif, system-ui, sans-serif;
}
table.dc th { padding: 0; border: 0; background: transparent; }
table.dc th[colspan] { min-width: 210px; padding: .75rem; color: #fff8ec; background: var(--accent-dark); border-radius: 7px; text-align: left; }
table.dc th:not([colspan]) a {
  display: block; min-width: 2rem; padding: .6rem .25rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper-deep); color: var(--accent-dark); text-decoration: none;
}
table.dc th:not([colspan]) a:hover { background: #e6d5b8; border-color: var(--gold); }

/* Scripture and reference notes */
.page-shell > table:last-of-type,
.page-shell > table:last-of-type tbody { display: block; width: 100% !important; border: 0; }
.page-shell > table:last-of-type tr {
  display: block; margin: 0 0 1rem; padding: clamp(1rem, 2.3vw, 1.8rem);
  scroll-margin-top: 5rem; border: 1px solid var(--line); border-radius: 10px; background: #fffefa;
}
.page-shell > table:last-of-type td {
  display: inline; width: auto !important; min-width: 0; padding: 0; vertical-align: baseline;
  border: 0; background: transparent;
}
.page-shell > table:last-of-type td + td {
  display: block; margin-top: .8rem; padding: .55rem .75rem; border: 0; border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0; background: var(--notes); color: var(--muted);
  font: .78rem/1.5 ui-sans-serif, system-ui, sans-serif;
}
.page-shell > table:last-of-type td + td::before {
  content: "Cross-references: "; color: var(--accent-dark); font-weight: 700;
}
.page-shell > table:last-of-type td.empty-reference { display: none; }
.page-shell > table:last-of-type p { margin: .65rem 0; text-align: left !important; }
.capitulo { color: var(--accent-dark); font-size: 1.22em; font-weight: 700; }
.super { position: relative; top: -.28em; margin: 0 .12em; color: var(--accent); font-size: .72em; font-weight: 700; }
font[size="1"] { font-size: inherit; }
a[name] { scroll-margin-top: 5rem; }
a[href="#top"] { white-space: nowrap; font: 700 .75rem/1 ui-sans-serif, system-ui, sans-serif; }

.site-footer {
  padding: 2rem 1rem 3rem; color: #e8dac8; background: var(--accent-dark); text-align: center;
  font: .86rem/1.5 ui-sans-serif, system-ui, sans-serif;
}
.site-footer p { margin: .35rem; }
.site-footer a { color: #fff8eb; }

@media (max-width: 820px) {
  body { font-size: 16.5px; }
  .site-bar { position: static; }
  .site-bar nav { display: none; }
  .page-shell { width: min(100% - 1rem, 1180px); margin: .5rem auto 1rem; border-radius: 12px; }
  .page-shell > table:first-of-type, .page-shell > table:first-of-type tbody,
  .page-shell > table:first-of-type tr, .page-shell > table:first-of-type td { display: block; width: 100% !important; text-align: center; }
  .page-shell > table:first-of-type .promo-cell { width: 100% !important; margin-top: 1rem; }
  table.dc { display: block; overflow-x: auto; padding-bottom: .5rem; }
  .page-shell > table:last-of-type tr { padding: 1rem; }
}

@media print {
  .site-bar, .skip-link, .site-footer, table.dc, a[href="#top"] { display: none !important; }
  body { background: white; font-size: 11pt; }
  .page-shell { width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .page-shell > table:last-of-type { border-spacing: 0; }
  .page-shell > table:last-of-type tr { break-inside: avoid; }
}


/* ============================================================
   Continuous annotated reading edition — September 2026
   Wisdom-inspired navigation and inline annotations
   ============================================================ */

.chapter-dashboard {
  position: relative;
  margin: 2rem auto 2.75rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: rgba(255,253,247,.94);
  border: 1px solid var(--line, #d8ccb8);
  box-shadow: 0 12px 34px rgba(70,38,23,.08);
}
.dashboard-heading { text-align:center; margin: .15rem auto 1.25rem; max-width: 42rem; }
.dashboard-kicker, .annotation-label, .note-label {
  display:block; color:var(--accent,#6d3e25); font:700 .68rem/1.2 system-ui,sans-serif;
  letter-spacing:.13em; text-transform:uppercase;
}
.dashboard-heading h2, .reader-intro h2 { margin:.35rem 0 .3rem; color:var(--accent-dark,#462617); font-weight:500; }
.dashboard-heading p, .reader-intro p { margin:.2rem 0 0; color:var(--muted,#6b6253); }
.book-nav-group {
  display:grid; grid-template-columns:minmax(180px, .9fr) minmax(0, 2.1fr); gap:1rem 1.25rem;
  align-items:center; padding:1rem 0; border-top:1px solid var(--line,#d8ccb8);
}
.book-nav-meta { display:flex; gap:.75rem; align-items:center; }
.book-nav-number {
  display:grid; place-items:center; flex:0 0 2.35rem; width:2.35rem; height:2.35rem;
  border:1px solid var(--line,#d8ccb8); border-radius:50%; color:var(--accent,#6d3e25);
  font:700 .72rem/1 system-ui,sans-serif; background:#fff;
}
.book-nav-meta h3 { margin:0; color:var(--accent-dark,#462617); font-size:1.02rem; line-height:1.2; }
.book-nav-meta p { margin:.18rem 0 0; color:var(--muted,#6b6253); font-size:.78rem; line-height:1.25; }
.chapter-links { display:flex; flex-wrap:wrap; gap:.32rem; }
.chapter-links a {
  display:grid; place-items:center; min-width:2.15rem; min-height:2.15rem; padding:.18rem .38rem;
  border:1px solid var(--line,#d8ccb8); border-radius:999px; background:#fff;
  color:var(--accent,#6d3e25); font:700 .78rem/1 system-ui,sans-serif; text-decoration:none;
  transition:transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.chapter-links a:hover, .chapter-links a:focus-visible {
  color:#fff; background:var(--accent,#6d3e25); border-color:var(--accent,#6d3e25); transform:translateY(-1px);
}
.calendar-title-note { grid-column:2; margin-top:-.25rem; }
.inline-editorial-note {
  padding:.65rem .8rem; border-left:3px solid var(--line,#d8ccb8); color:var(--muted,#6b6253);
  background:rgba(245,240,227,.52); font-size:.82rem; line-height:1.45;
}
.inline-editorial-note .note-label { display:inline; margin-right:.35rem; font-size:.58rem; }
.reader-intro {
  max-width:46rem; margin:0 auto 1.75rem; padding:1.2rem 1.35rem;
  border-top:1px solid var(--line,#d8ccb8); border-bottom:1px solid var(--line,#d8ccb8);
  text-align:center;
}
.reader-intro h2 { font-size:clamp(1.45rem,3vw,2rem); }
.reader-intro p { font-size:.94rem; line-height:1.55; }
.reader-epigraph { max-width:46rem; margin:0 auto 1.75rem; text-align:center; font-weight:400; }
.continuous-reader { max-width:46rem; margin:0 auto; }
.reading-row { margin:0 0 1.15rem; padding:0 0 .25rem; }
.enoch-text { min-width:0; }
.enoch-text p { margin:0 0 1.1rem; }
.inline-annotation {
  display:inline; margin:0 0 0 .35em; padding:0; border:0; background:transparent;
  color:var(--muted,#6b6253); font-size:.82em; line-height:inherit;
}
.inline-annotation::before { content:"["; color:var(--gold,#b0864d); }
.inline-annotation::after { content:"]"; color:var(--gold,#b0864d); }
.annotation-label { display:none; }
.annotation-content, .annotation-content b, .annotation-content font { font:inherit; color:inherit; }
.annotation-content .super { color:var(--accent,#6d3e25); font-size:.72em; font-weight:700; }
.empty-reference { display:none !important; }
.continuous-reader table { border:0; }
.continuous-reader [name] { scroll-margin-top:1rem; }

@media (max-width:720px) {
  .book-nav-group { grid-template-columns:1fr; gap:.65rem; }
  .calendar-title-note { grid-column:1; }
  .chapter-links { padding-left:3.1rem; }
  .inline-annotation { margin-left:.25em; }
}
@media (max-width:480px) {
  .chapter-dashboard { margin-inline:0; padding:.85rem; }
  .chapter-links { padding-left:0; }
  .chapter-links a { min-width:2rem; min-height:2rem; font-size:.74rem; }
}
@media print {
  .chapter-dashboard { position:static; box-shadow:none; }
  .inline-annotation { break-inside:avoid; }
}

/* Wisdom-style inline Scripture annotations */
.wisdom-xref {
  display:inline;
  margin-left:.22em;
  white-space:normal;
  font-size:.72em;
  font-weight:700;
  color:var(--accent,#6d3e25);
}
.wisdom-xref a {
  color:var(--accent,#6d3e25);
  text-decoration:underline;
  text-decoration-thickness:.06em;
  text-underline-offset:.12em;
}
.wisdom-xref a:hover,
.wisdom-xref a:focus-visible { color:var(--accent-dark,#462617); }

/* Wisdom-style editorial masthead */
.reader-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
  align-items: end;
  gap: clamp(1rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}
.reader-title h1 {
  margin: 0 0 .35rem;
  color: var(--accent-dark);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.05;
}
.reader-subtitle {
  margin: 0 0 .65rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-style: italic;
  line-height: 1.25;
}
.reader-masthead .translation-credit { margin: 0; }
.reader-masthead .download-link { margin: .5rem 0 0; }
.hero-image { margin: 1.5rem 0 2rem; }
.hero-image a { display: block; }
.hero-image img {
  display: block;
  width: 100%;
  height: clamp(300px, 48vw, 540px);
  object-fit: cover;
  object-position: center 34%;
  border: 1px solid var(--line);
}
.hero-image figcaption {
  margin-top: .45rem;
  color: var(--muted);
  font: .72rem/1.45 ui-sans-serif, system-ui, sans-serif;
  text-align: right;
}
/* The old table-note rule was catching the former masthead. */
.reader-masthead + .hero-image + .chapter-dashboard { margin-top: 0; }
@media (max-width: 760px) {
  .reader-masthead { grid-template-columns: 1fr; align-items: start; }
  .reader-masthead .book-promo { margin-top: .5rem; }
  .hero-image img { height: min(115vw, 520px); object-position: center top; }
}
/* Legacy table annotation selectors are intentionally neutralized after the continuous-reader conversion. */
.continuous-annotated-edition .page-shell > table:last-of-type td + td::before { content: none; }
