:root {
  --ink: #162133;
  --ink-soft: #25364d;
  --paper: #f7f2e8;
  --paper-strong: #fffaf0;
  --rule: #d9cfbd;
  --gold: #b38931;
  --gold-soft: #efe3bd;
  --sage: #617765;
  --wine: #73374a;
  --blue: #2c5c73;
  --muted: #675f54;
  --shadow: 0 24px 70px rgba(22, 33, 51, 0.18);
  --radius: 8px;
  color-scheme: light;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

body::before {
  background:
    linear-gradient(90deg, rgba(22, 33, 51, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(179, 137, 49, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0;
}

.skip-link {
  background: var(--ink);
  color: white;
  left: 1rem;
  padding: 0.65rem 0.85rem;
  position: absolute;
  top: 0.75rem;
  transform: translateY(-180%);
  z-index: 50;
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  background: rgba(22, 33, 51, 0.09);
  height: 4px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 40;
}

.reading-progress span {
  background: var(--gold);
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  width: 100%;
}

.site-header {
  align-items: center;
  background: rgba(247, 242, 232, 0.94);
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 72px;
  padding: 0.75rem clamp(1rem, 4vw, 2rem);
  position: sticky;
  top: 4px;
  z-index: 30;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--paper);
  display: inline-flex;
  font-size: 1rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.site-nav a {
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--gold-soft);
  outline: none;
}

.site-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: none;
  height: 42px;
  justify-content: center;
  position: relative;
  width: 42px;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  background: currentColor;
  content: "";
  display: block;
  height: 2px;
  position: absolute;
  width: 18px;
}

.nav-toggle::before {
  transform: translateY(-6px);
}

.nav-toggle::after {
  transform: translateY(6px);
}

.hero {
  background: var(--ink);
  color: var(--paper);
  display: grid;
  min-height: calc(100vh - 76px);
  overflow: hidden;
  place-items: center;
  position: relative;
}

.hero-media {
  background-image:
    linear-gradient(rgba(22, 33, 51, 0.72), rgba(22, 33, 51, 0.64)),
    url("../assets/nomomartyrial-hero.png");
  background-position: center;
  background-size: cover;
  inset: 0;
  position: absolute;
}

.hero-content {
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(4rem, 10vw, 8rem) 1.25rem;
  position: relative;
  text-align: center;
  width: min(100%, 980px);
}

.eyebrow,
.section-label,
.summary-kicker,
.toc-title {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--paper);
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  margin: 0.7rem auto 0;
  max-width: 11ch;
}

.hero-subtitle {
  color: #ede5d6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  margin: 1.1rem auto 0;
  max-width: 780px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.7rem;
}

.button {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  min-height: 46px;
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.button-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.button-secondary {
  color: var(--paper);
}

.button-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button:hover,
.button:focus-visible {
  filter: brightness(1.05);
  outline: 2px solid rgba(255, 250, 240, 0.5);
  outline-offset: 3px;
}

.intro-band {
  background: var(--paper-strong);
  border-bottom: 1px solid var(--rule);
}

.summary-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.summary-grid article {
  background: var(--paper-strong);
  min-height: 220px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.summary-grid h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: 0.45rem 0 0.7rem;
}

.summary-grid p {
  color: var(--muted);
}

.textbook-entry-band {
  background: var(--gold-soft);
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}

.textbook-entry-inner {
  align-items: center;
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(1.4rem, 4vw, 2.2rem) 1.25rem;
}

.textbook-entry-inner h2 {
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-top: 0.35rem;
}

.textbook-entry-inner p:not(.section-label) {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  margin-top: 0.65rem;
  max-width: 62ch;
}

.textbook-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.page-shell {
  align-items: start;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(190px, 250px) minmax(0, 820px);
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(3rem, 7vw, 5.5rem) 1.25rem;
}

.page-shell > *,
.manuscript,
.repository-article,
.curriculum-section {
  min-width: 0;
}

.toc {
  border-left: 3px solid var(--gold);
  display: grid;
  gap: 0.35rem;
  padding-left: 1rem;
  position: sticky;
  top: 110px;
}

.toc a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--wine);
}

.toc-title {
  margin-bottom: 0.35rem;
}

.manuscript {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
}

.content-section {
  scroll-margin-top: 110px;
}

.content-section + .content-section {
  border-top: 1px solid var(--rule);
  padding-top: clamp(3rem, 6vw, 5rem);
}

.content-section h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-top: 0.35rem;
  max-width: 13ch;
}

.content-section h3 {
  color: var(--ink-soft);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  margin-top: 1.8rem;
}

.content-section p,
.content-section li {
  color: #2e342f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
}

.content-section > p,
.content-section > .scripture-card,
.content-section > .quote-grid,
.content-section > .pillar-panel,
.content-section > .compact-scriptures,
.content-section > .method-list,
.content-section > .boundary-list,
.content-section > .pull-quote {
  margin-top: 1.2rem;
}

.pull-quote {
  background: var(--ink);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--paper);
  padding: clamp(1.2rem, 3vw, 1.8rem);
}

.pull-quote p {
  color: var(--paper);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.35;
}

.scripture-card {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(22, 33, 51, 0.08);
  margin: 0;
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.scripture-card blockquote {
  margin: 0;
}

.scripture-card p {
  color: #2c241b;
  font-size: clamp(1.18rem, 2.4vw, 1.45rem);
  font-style: italic;
  line-height: 1.45;
}

.scripture-card figcaption,
.compact-scriptures figcaption {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 0.75rem;
  text-transform: uppercase;
}

.quote-grid,
.compact-scriptures,
.pillar-panel,
.boundary-list {
  display: grid;
  gap: 1rem;
}

.quote-grid {
  grid-template-columns: 1fr;
}

.pillar-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pillar-panel article,
.boundary-list article,
.compact-scriptures figure {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin: 0;
  padding: 1.2rem;
}

.pillar-panel span {
  color: var(--wine);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pillar-panel h3,
.boundary-list h3 {
  color: var(--ink);
  margin-top: 0.4rem;
}

.compact-scriptures {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-scriptures blockquote {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  margin: 0;
}

.method-list {
  counter-reset: method;
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.method-list li {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  grid-template-columns: 3rem 1fr;
  padding: 1.1rem;
}

.method-list li::before {
  color: var(--gold);
  content: counter(method, decimal-leading-zero);
  counter-increment: method;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.method-list h3 {
  margin: 0;
}

.method-list p {
  grid-column: 2;
}

.invitation-section {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.footer-scripture {
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 1rem;
  padding-top: clamp(3rem, 6vw, 5rem);
}

.article-hero {
  background:
    linear-gradient(rgba(22, 33, 51, 0.88), rgba(22, 33, 51, 0.8)),
    url("../assets/nomomartyrial-hero.png");
  background-position: center;
  background-size: cover;
  color: var(--paper);
  display: grid;
  min-height: 520px;
  overflow: hidden;
  place-items: center;
  position: relative;
  text-align: center;
}

.article-hero-inner {
  margin: 0 auto;
  max-width: 980px;
  padding: 5.5rem 1.25rem 5rem;
}

.article-hero h1 {
  color: var(--paper);
  font-size: 4.7rem;
  margin: 0.7rem auto 0;
  max-width: 13ch;
}

.repository-shell {
  grid-template-columns: minmax(200px, 280px) minmax(0, 900px);
}

.repository-toc {
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding-bottom: 0.5rem;
}

.repository-toc a {
  line-height: 1.35;
}

.repository-article {
  gap: 3.8rem;
}

.repository-section {
  overflow-wrap: anywhere;
}

.repository-section h2 {
  max-width: 20ch;
}

.repository-section h3 {
  border-left: 4px solid var(--gold);
  padding-left: 0.75rem;
}

.repository-section h4 {
  color: var(--ink-soft);
  font-size: 1.25rem;
  margin-top: 1.45rem;
  max-width: 36ch;
}

.repository-section p {
  max-width: 78ch;
}

.section-lede {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.repository-meta {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0 0;
}

.repository-meta div {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: grid;
  gap: 0.15rem;
  padding: 0.95rem 1rem;
}

.repository-meta dt {
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.repository-meta dd {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  margin: 0;
}

.repository-note,
.motto-card,
.canon-article,
.verdict-card {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.repository-note {
  border-left: 4px solid var(--sage);
  padding: 1rem 1.1rem;
}

.motto-card {
  border-left: 4px solid var(--gold);
  display: grid;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.2rem;
}

.motto-card p:first-child {
  color: var(--wine);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.canon-section {
  gap: 1.45rem;
}

.canon-article {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1rem, 3vw, 1.45rem);
}

.canon-article h3 {
  align-items: baseline;
  border-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  padding-left: 0;
}

.canon-article h3 span {
  color: var(--wine);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.canon-article h4 {
  color: var(--wine);
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.step-subtitle {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  margin-top: -0.25rem;
}

.verdict-card {
  border-left: 4px solid var(--wine);
  display: grid;
  gap: 0.4rem;
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
}

.verdict-card p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.verdict-card span {
  color: var(--muted);
}

.repository-list {
  color: #2e342f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
  margin: 1.1rem 0 0;
  padding-left: 1.3rem;
}

.repository-numbered {
  display: grid;
  gap: 0.65rem;
}

.compact-list {
  margin-top: 0.25rem;
}

.two-column-list {
  columns: 2 15rem;
  column-gap: 2rem;
}

.pillar-list li,
.protocol-list li,
.purpose-list li {
  background: rgba(255, 250, 240, 0.72);
  border-left: 3px solid var(--gold);
  padding: 0.55rem 0.7rem;
}

.repository-list li + li {
  margin-top: 0.55rem;
}

.repository-numbered li + li,
.two-column-list li + li {
  margin-top: 0;
}

.table-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-top: 1.25rem;
  overflow-x: auto;
}

.table-wrap table {
  background: var(--paper-strong);
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  color: #2e342f;
  font-size: 0.95rem;
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  border-right: 0;
}

.repository-tree {
  background: #fbf5e8;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 1.25rem 0 0;
  overflow-x: auto;
  padding: 1rem;
  white-space: pre;
}

.curriculum-hero h1 {
  max-width: 15ch;
}

.curriculum-article {
  gap: clamp(3.5rem, 6vw, 5rem);
}

.curriculum-section h2 {
  max-width: 15ch;
}

.curriculum-grid,
.chapter-format,
.lab-grid,
.resource-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.curriculum-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter-format,
.lab-grid,
.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.curriculum-card,
.chapter-format article,
.lab-grid article,
.resource-grid article,
.capstone-panel {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.curriculum-card {
  display: grid;
  gap: 0.65rem;
}

.curriculum-card span,
.chapter-format span {
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curriculum-card h3,
.chapter-format h3,
.lab-grid h3,
.resource-grid h3,
.capstone-panel h3 {
  color: var(--ink);
  margin-top: 0;
}

.curriculum-card ul {
  color: #2e342f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  margin: 0;
  padding-left: 1.1rem;
}

.curriculum-card li + li {
  margin-top: 0.3rem;
}

.chapter-format article {
  display: grid;
  gap: 0.4rem;
}

.lab-grid article,
.resource-grid article {
  display: grid;
  gap: 0.5rem;
}

.capstone-panel {
  border-left: 4px solid var(--gold);
  margin-top: 1.2rem;
}

.button-inline {
  margin-top: 0.75rem;
}

.site-footer {
  background: var(--ink);
  color: #d9cfbd;
  display: grid;
  gap: 0.25rem;
  padding: 2rem 1rem;
  text-align: center;
}

.site-footer p:first-child {
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.site-footer p:last-child {
  color: #b9b0a1;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 920px) {
  .site-header {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    justify-content: flex-start;
    padding-bottom: 0.65rem;
  }

  .site-header[data-open="true"] .site-nav {
    display: flex;
  }

  .summary-grid,
  .page-shell,
  .textbook-entry-inner,
  .pillar-panel,
  .compact-scriptures,
  .curriculum-grid,
  .chapter-format,
  .lab-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    background: var(--paper-strong);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem;
    position: static;
  }

  .repository-toc {
    max-height: none;
  }

  .textbook-entry-actions {
    justify-content: flex-start;
  }

  .article-hero h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 560px) {
  .brand span:last-child {
    max-width: 14ch;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .article-hero h1 {
    font-size: 2.7rem;
  }

  .hero-content,
  .page-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .method-list li {
    grid-template-columns: 1fr;
  }

  .method-list p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Textbook page */
.textbook-hero h1 {
  max-width: 13ch;
}

.textbook-shell {
  grid-template-columns: minmax(200px, 270px) minmax(0, 920px);
}

.textbook-article {
  gap: clamp(3.2rem, 5vw, 4.7rem);
}

.textbook-section {
  min-width: 0;
  overflow-wrap: anywhere;
}

.textbook-section h2 {
  max-width: 17ch;
}

.textbook-section h3 {
  border-left: 4px solid var(--gold);
  color: var(--ink-soft);
  margin-top: 1.4rem;
  padding-left: 0.75rem;
}

.textbook-section h4 {
  color: var(--wine);
  font-size: 1.05rem;
  margin-top: 1rem;
}

.textbook-section p,
.textbook-section li {
  max-width: 78ch;
}

.textbook-list {
  max-width: 78ch;
}

.textbook-section .table-wrap {
  margin-top: 1rem;
}

.textbook-path-panel {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius);
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
}

.textbook-path-panel h3 {
  border: 0;
  color: var(--ink);
  font-size: 1.25rem;
  padding: 0;
}

.textbook-section code {
  background: rgba(22, 33, 51, 0.08);
  border-radius: 4px;
  font-size: 0.94em;
  padding: 0.08rem 0.28rem;
}

@media (max-width: 920px) {
  .textbook-shell {
    grid-template-columns: 1fr;
  }

  .textbook-article > *,
  .textbook-section {
    min-width: 0;
    width: 100%;
  }

  .textbook-section p,
  .textbook-section li,
  .textbook-list,
  .textbook-path-panel,
  .textbook-section .scripture-card,
  .textbook-section .table-wrap {
    max-width: 100%;
  }
}

/* Course continuation */
.course-continuation {
  background: rgba(255, 250, 240, 0.68);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--wine);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2rem);
}

.course-next-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.course-next-grid article {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
}

.course-next-grid h3 {
  border: 0;
  color: var(--ink);
  margin-top: 0.4rem;
  padding: 0;
}

.course-actions {
  justify-content: flex-start;
  margin-top: 1.2rem;
}

@media (max-width: 700px) {
  .course-next-grid {
    grid-template-columns: 1fr;
  }
}

/* Textbook curriculum structure */
.textbook-hub-grid,
.definition-grid,
.assignment-grid,
.rubric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.edition-card,
.definition-grid article,
.assignment-grid article,
.rubric-grid article,
.learning-outcomes,
.stop-think,
.case-study-box,
.council-model,
.template-list,
.progress-list div {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.edition-card {
  color: var(--ink);
  display: grid;
  gap: 0.45rem;
  text-decoration: none;
}

.edition-card:hover,
.edition-card:focus-visible {
  border-color: var(--gold);
  outline: 2px solid rgba(179, 137, 49, 0.25);
  outline-offset: 2px;
}

.edition-card span,
.level-pill {
  color: var(--wine);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edition-card h3,
.definition-grid h3,
.assignment-grid h3,
.rubric-grid h3,
.learning-outcomes h3,
.stop-think h3,
.case-study-box h3,
.council-model h3 {
  border: 0;
  color: var(--ink);
  margin-top: 0;
  padding-left: 0;
}

.learning-outcomes {
  border-left: 4px solid var(--sage);
  margin-top: 1.25rem;
}

.stop-think {
  border-left: 4px solid var(--gold);
  margin-top: 1.25rem;
}

.case-study-box {
  border-left: 4px solid var(--wine);
  margin-top: 1.25rem;
}

.level-pill {
  background: rgba(179, 137, 49, 0.12);
  border: 1px solid rgba(179, 137, 49, 0.35);
  border-radius: 999px;
  display: inline-flex;
  margin-left: 0.35rem;
  padding: 0.18rem 0.45rem;
  vertical-align: middle;
}

.process-flow {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
  max-width: 42rem;
}

.process-flow span {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  padding: 0.75rem 1rem;
  position: relative;
}

.process-flow span + span::before {
  background: var(--gold);
  content: "";
  display: block;
  height: 0.55rem;
  margin-bottom: 0.35rem;
  width: 2px;
}

.progress-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.progress-list div {
  align-items: center;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 3rem minmax(0, 1fr);
}

.progress-list span {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.template-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.template-list p {
  border-bottom: 1px solid rgba(217, 207, 189, 0.85);
  min-height: 2.4rem;
  padding-bottom: 0.45rem;
}

@media (max-width: 920px) {
  .textbook-hub-grid,
  .definition-grid,
  .assignment-grid,
  .rubric-grid {
    grid-template-columns: 1fr;
  }
}

/* Handbook reading edition */
.handbook-hero h1 {
  max-width: 12ch;
}

.handbook-cover-band {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(246, 237, 220, 0.96));
}

.handbook-cover-layout {
  align-items: center;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 2rem);
}

.handbook-cover-figure {
  margin: 0;
}

.handbook-cover-figure img,
.handbook-figure img {
  border: 1px solid rgba(217, 207, 189, 0.9);
  box-shadow: 0 22px 55px rgba(22, 33, 51, 0.16);
  display: block;
  height: auto;
  max-width: 100%;
}

.handbook-cover-copy h2 {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-top: 0.45rem;
}

.handbook-cover-copy p:not(.section-label) {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.75;
  margin-top: 1rem;
}

.handbook-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.handbook-stats span {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  padding: 0.48rem 0.72rem;
}

.handbook-stats strong {
  color: var(--wine);
}

.handbook-shell {
  grid-template-columns: minmax(220px, 300px) minmax(0, 920px);
}

.handbook-toc {
  font-size: 0.9rem;
}

.handbook-toc a {
  border-bottom: 1px solid rgba(217, 207, 189, 0.72);
  padding-bottom: 0.4rem;
}

.handbook-section h2 {
  max-width: 26ch;
}

.handbook-section h3 {
  margin-top: 2rem;
  max-width: 34ch;
}

.handbook-section h4 {
  color: var(--wine);
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

.handbook-section p {
  line-height: 1.85;
}

.handbook-figure {
  margin: clamp(1.4rem, 4vw, 2.5rem) 0;
}

.handbook-figure img {
  background: var(--paper-strong);
  width: min(100%, 860px);
}

.handbook-center {
  color: var(--ink-soft);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  text-align: center;
}

.handbook-center-strong {
  color: var(--wine);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
}

.handbook-rule {
  background: var(--rule);
  border: 0;
  height: 1px;
  margin: 1.6rem 0;
  max-width: 36rem;
}

.handbook-list {
  margin-top: 1rem;
}

@media (max-width: 920px) {
  .handbook-cover-layout,
  .handbook-shell {
    grid-template-columns: 1fr;
  }

  .handbook-toc {
    max-height: 18rem;
  }
}

/* Council of Scripture Bible platform */
.sr-only {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.bible-page.theme-dark {
  --ink: #f7f2e8;
  --ink-soft: #e9dfce;
  --paper: #121a26;
  --paper-strong: #1b2736;
  --rule: #334356;
  --gold-soft: rgba(179, 137, 49, 0.22);
  --muted: #c8bcaa;
  color-scheme: dark;
}

.bible-page.theme-dark::before {
  background:
    linear-gradient(90deg, rgba(247, 242, 232, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(179, 137, 49, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bible-page.theme-dark .site-header,
.bible-page.theme-dark .bible-panel,
.bible-page.theme-dark .bible-dashboard-card,
.bible-page.theme-dark .bible-reader-area,
.bible-page.theme-dark .search-result,
.bible-page.theme-dark .notes-panel-inner,
.bible-page.theme-dark .scripture-side-panel,
.bible-page.theme-dark .scripture-popover {
  background: var(--paper-strong);
}

.bible-hero {
  background:
    linear-gradient(120deg, rgba(22, 33, 51, 0.95), rgba(44, 92, 115, 0.82)),
    url("../share-banner.jpg");
  background-position: center;
  background-size: cover;
}

.bible-hero h1 {
  max-width: 12ch;
}

.bible-search-form {
  background: rgba(255, 250, 240, 0.96);
  border: 1px solid rgba(217, 207, 189, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.24fr) auto auto;
  margin-top: 1.6rem;
  padding: 0.75rem;
}

.bible-search-form input,
.bible-search-form select,
.selector-grid select,
.notes-panel textarea {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.bible-search-form .button {
  min-height: 2.8rem;
  white-space: nowrap;
}

.bible-search-form .button-secondary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.bible-search-form .button-secondary:hover,
.bible-search-form .button-secondary:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.bible-search-help {
  color: rgba(255, 250, 240, 0.82);
  font-size: 0.95rem;
  margin-top: 0.85rem;
  max-width: 62rem;
}

.bible-dashboard {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1240px;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.bible-dashboard-card,
.bible-panel,
.bible-reader-area,
.search-result {
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.bible-dashboard-card {
  min-height: 15rem;
  padding: 1.1rem;
}

.bible-dashboard-card h2,
.bible-panel h2 {
  font-size: 1.35rem;
  margin-top: 0.25rem;
}

.bible-verse-card {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.bible-verse-card p {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

.bible-verse-card a {
  color: var(--wine);
  font-weight: 800;
  text-decoration: none;
}

.saved-work-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.saved-work-grid h3 {
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.bible-layout {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1240px;
  padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(2rem, 5vw, 4rem);
}

.bible-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 92px;
}

.bible-panel {
  padding: 1rem;
}

.selector-grid {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.selector-grid label span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.chapter-navigation,
.bible-actions,
.book-list,
.bible-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chapter-navigation {
  margin-top: 0.8rem;
}

.chapter-navigation button,
.book-list button,
.bible-chip-list button,
.bible-actions button,
.panel-close,
.search-result button {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  min-height: 2.2rem;
  padding: 0.45rem 0.68rem;
}

.chapter-navigation button:hover,
.book-list button:hover,
.bible-chip-list button:hover,
.bible-actions button:hover,
.search-result button:hover,
.panel-close:hover,
.chapter-navigation button:focus-visible,
.book-list button:focus-visible,
.bible-chip-list button:focus-visible,
.bible-actions button:focus-visible,
.search-result button:focus-visible,
.panel-close:focus-visible {
  background: var(--gold-soft);
  outline: 2px solid transparent;
}

.bible-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.book-list {
  margin-top: 0.85rem;
}

.book-list button {
  border-radius: var(--radius);
  flex: 1 1 6.5rem;
  text-align: left;
}

.bible-chip-list {
  margin-top: 0.5rem;
}

.bible-reader-area {
  overflow: hidden;
}

.bible-reader-toolbar {
  align-items: start;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  padding: clamp(1rem, 3vw, 1.4rem);
}

.bible-reader-toolbar h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.chapter-reference,
.bible-status,
.muted-note,
.notes-warning {
  color: var(--muted);
  font-size: 0.94rem;
}

.bible-actions {
  justify-content: flex-end;
}

.bible-status {
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem clamp(1rem, 3vw, 1.4rem);
}

.chapter-reader {
  display: grid;
  gap: 0.35rem;
  padding: clamp(1rem, 3vw, 1.8rem);
}

.bible-verse {
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  padding: 0.55rem 0.7rem;
}

.bible-verse sup {
  color: var(--gold);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.7;
  text-align: right;
}

.bible-verse span {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  line-height: 1.82;
}

.bible-verse:hover,
.bible-verse:focus-visible,
.bible-verse.is-selected {
  background: rgba(179, 137, 49, 0.11);
  border-left-color: var(--gold);
  outline: none;
}

.bible-verse.is-highlighted {
  background: rgba(179, 137, 49, 0.18);
}

.bible-verse.is-favorite sup::after {
  color: var(--wine);
  content: " saved";
  font-size: 0.62rem;
  text-transform: uppercase;
}

.search-results-panel {
  border-top: 1px solid var(--rule);
  padding: clamp(1rem, 3vw, 1.4rem);
}

.search-results-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.search-results-heading h2 {
  font-size: 1.7rem;
}

.search-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.search-result {
  padding: 0.9rem;
}

.search-result button {
  color: var(--wine);
  margin-bottom: 0.45rem;
}

.search-result p {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  line-height: 1.7;
}

.search-result mark {
  background: rgba(179, 137, 49, 0.28);
  border-radius: 0.2rem;
  color: inherit;
  padding: 0 0.12rem;
}

.notes-panel,
.scripture-side-panel {
  background: rgba(22, 33, 51, 0.22);
  inset: 0;
  position: fixed;
  z-index: 60;
}

.notes-panel-inner,
.scripture-side-panel {
  background: var(--paper-strong);
  border-left: 1px solid var(--rule);
  box-shadow: -24px 0 60px rgba(22, 33, 51, 0.18);
  margin-left: auto;
  max-width: min(92vw, 460px);
  min-height: 100%;
  overflow: auto;
  padding: clamp(1rem, 4vw, 1.6rem);
}

.notes-panel textarea {
  margin: 1rem 0;
  resize: vertical;
}

.scripture-ref {
  background: rgba(179, 137, 49, 0.12);
  border: 0;
  border-bottom: 1px solid rgba(179, 137, 49, 0.65);
  color: var(--wine);
  cursor: pointer;
  display: inline;
  font: inherit;
  padding: 0 0.08rem;
}

.scripture-ref:hover,
.scripture-ref:focus-visible {
  background: rgba(179, 137, 49, 0.2);
  outline: 2px solid transparent;
}

.scripture-popover {
  background: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  max-height: min(68vh, 420px);
  max-width: min(360px, calc(100vw - 24px));
  overflow: auto;
  padding: 0.9rem;
  position: fixed;
  z-index: 70;
}

.scripture-side-panel-content {
  display: grid;
  gap: 0.8rem;
  padding-top: 0.75rem;
}

.scripture-popup-title {
  color: var(--wine);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scripture-popup-verses {
  display: grid;
  gap: 0.55rem;
}

.scripture-popup-verses p {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

.scripture-popup-verses sup {
  color: var(--gold);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  margin-right: 0.28rem;
}

.scripture-open-link {
  color: var(--wine);
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 980px) {
  .bible-dashboard,
  .bible-layout,
  .bible-reader-toolbar {
    grid-template-columns: 1fr;
  }

  .bible-sidebar {
    position: static;
  }

  .bible-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .bible-search-form {
    grid-template-columns: 1fr;
  }

  .bible-dashboard {
    grid-template-columns: 1fr;
  }

  .search-results-heading {
    align-items: start;
    flex-direction: column;
  }

  .bible-verse {
    grid-template-columns: 1.8rem minmax(0, 1fr);
    padding-left: 0.35rem;
  }
}

@media print {
  .site-header,
  .reading-progress,
  .bible-hero,
  .bible-dashboard,
  .bible-sidebar,
  .bible-actions,
  .search-results-panel,
  .site-footer {
    display: none !important;
  }

  .bible-layout,
  .bible-reader-toolbar {
    display: block;
    padding: 0;
  }

  .bible-reader-area {
    border: 0;
  }
}
