/* Federation of Reformed Churches - site styles (plain CSS, no framework) */

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-wght.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-wght-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

:root {
  --navy: #1f2f4d;
  --navy-dark: #15213a;
  --burgundy: #7a1f2b;
  --burgundy-dark: #5e1620;
  --paper: #fbf8f2;
  --paper-2: #f3eee3;
  --ink: #23262b;
  --muted: #5a5f68;
  --rule: #ddd5c5;
  --white: #ffffff;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 76rem;
  --measure: 44rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.7;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; outline: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-underline-offset: 0.15em; }
a:hover { color: var(--burgundy-dark); }
:focus-visible { outline: 3px solid #c58b1c; outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); color: var(--navy); line-height: 1.25; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.3rem; margin: 1.8rem 0 0.6rem; }
h4 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: var(--measure); padding-top: 2.5rem; padding-bottom: 3rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--navy); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius); z-index: 100; font-family: var(--sans); }
.skip-link:focus { top: 1rem; color: #fff; }
.eyebrow { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--burgundy); font-weight: 600; margin: 0 0 0.5rem; }

/* Buttons */
.button {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.2;
  background: var(--navy); color: #fff; text-decoration: none; padding: 0.75rem 1.4rem;
  border-radius: var(--radius); border: 2px solid var(--navy); transition: background .15s, border-color .15s;
}
.button:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.button--ghost { background: transparent; color: var(--navy); }
.button--ghost:hover { background: var(--navy); color: #fff; }
.button--large { font-size: 1.1rem; padding: 0.95rem 1.7rem; }

/* Header + navigation */
.site-header { background: var(--white); border-top: 4px solid var(--burgundy); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 5.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.8rem; min-width: 0; text-decoration: none; color: var(--navy); margin-right: auto; padding: 0.6rem 0; }
.brand picture { flex: none; } /* keep the emblem from being squeezed (and distorted) by the flex layout */
.brand__mark { width: auto; height: 4rem; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--navy); }
.brand__tag { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.brand:hover .brand__name { color: var(--burgundy); }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.15rem; font-family: var(--sans); }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.6rem; border-radius: var(--radius);
  color: var(--navy); text-decoration: none; font: 600 0.93rem/1.2 var(--sans); background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .has-sub.open > .nav-link { background: var(--paper-2); color: var(--burgundy); }
.nav-link[aria-current="page"], .has-sub.is-current > .nav-link { color: var(--burgundy); box-shadow: inset 0 -2px 0 var(--burgundy); border-radius: 0; }
.caret { width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.has-sub { position: relative; }
.has-sub.open .caret { transform: rotate(-135deg) translate(-2px, -1px); }
.submenu {
  list-style: none; margin: 0; padding: 0.5rem; position: absolute; left: 0; top: calc(100% + 0.3rem); min-width: 21rem;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(21,33,58,.14);
  display: none;
}
.has-sub:nth-last-child(-n+4) .submenu { left: auto; right: 0; }
.submenu a { display: block; padding: 0.5rem 0.75rem; border-radius: 4px; color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.submenu a:hover { background: var(--paper-2); color: var(--burgundy); }
.submenu a[aria-current="page"] { color: var(--burgundy); font-weight: 600; }
.has-sub.open > .submenu { display: block; }
.no-js .has-sub:hover > .submenu, .no-js .has-sub:focus-within > .submenu { display: block; }
.nav-link--search svg { margin-right: 0.1rem; }

.menu-button {
  display: none; align-items: center; gap: 0.5rem; font: 600 0.95rem var(--sans); color: var(--navy);
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.55rem 0.8rem; cursor: pointer;
}
.menu-button__icon, .menu-button__icon::before, .menu-button__icon::after { display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.menu-button__icon::before, .menu-button__icon::after { content: ""; position: absolute; left: 0; }
.menu-button__icon::before { top: -6px; } .menu-button__icon::after { top: 6px; }
.menu-button[aria-expanded="true"] .menu-button__icon { background: transparent; }
.menu-button[aria-expanded="true"] .menu-button__icon::before { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-button__icon::after { transform: translateY(-6px) rotate(-45deg); }

/* Desktop: tighter link spacing so the eight menu items fit on one line next to the site name. */
@media (min-width: 1201px) {
  .nav-list { gap: 0.1rem; }
  .nav-link { padding: 0.55rem 0.45rem; font-size: 0.9rem; }
}
@media (max-width: 1200px) {
  .js .menu-button { display: inline-flex; }
  .brand__mark { height: 3.2rem; }
  .brand__name { font-size: 1.1rem; }
  .brand { flex: 1 1 0; }
  .site-nav { width: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 0.25rem 0 1rem; border-top: 1px solid var(--rule); }
  .nav-link { width: 100%; padding: 0.8rem 0.25rem; justify-content: space-between; border-radius: 0; border-bottom: 1px solid var(--paper-2); }
  .nav-link[aria-current="page"], .has-sub.is-current > .nav-link { box-shadow: none; }
  .submenu, .has-sub:nth-last-child(-n+4) .submenu { position: static; display: none; box-shadow: none; border: 0; min-width: 0; padding: 0.25rem 0 0.5rem 0.75rem; }
  .no-js .submenu, .has-sub.open > .submenu, .has-sub.open:nth-last-child(n) > .submenu { display: block; }
  .nav-link--search { justify-content: flex-start; }
}
@media (max-width: 420px) { .brand__tag { display: none; } }

/* Home */
.hero { background: linear-gradient(180deg, var(--white) 0%, var(--paper) 100%); border-bottom: 1px solid var(--rule); }
.hero__inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); margin-bottom: 0.6rem; }
.hero__tagline { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); color: var(--muted); font-style: italic; margin: 0; }
.hero__emblem { margin: 0; }
.hero__emblem img { width: 13rem; }
@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; padding-top: 2rem; padding-bottom: 2.25rem; }
  .hero__emblem { order: -1; }
  .hero__emblem img { width: 10rem; margin: 0 auto; }
}
.intro { padding-top: 3rem; padding-bottom: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.card { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 1.4rem 1.5rem 1rem; }
.card__title { margin: 0 0 0.5rem; font-size: 1.35rem; }
.card p { margin: 0 0 0.8rem; }
.card__link { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.section-title { margin-top: 0; }

/* Scripture references linked by Reftagger (pages with scriptureTooltips: true): keep "4:1-6" together */
a.rtBibleRef { white-space: nowrap; }
.rtTooltipBody .ch-ref { font-weight: 400; } /* Reftagger sets the verse text bold by default */

/* Confession/catechism previews (assets/js/confession-tooltips.js), styled to match the Reftagger tooltips */
.conf-tip {
  position: absolute; z-index: 1000; width: min(25rem, calc(100vw - 16px)); background: #fff; color: var(--ink);
  border: 1px solid #c9c1b1; border-radius: 6px; box-shadow: 0 6px 18px rgba(20, 28, 45, 0.22);
  font-family: "Source Serif 4", Georgia, serif; font-size: 16px; line-height: 1.55; text-align: left;
}
.conf-tip[hidden] { display: none; }
.conf-tip__head { background: var(--navy); color: #fff; font-weight: 700; padding: 0.45rem 0.85rem; border-radius: 5px 5px 0 0; }
.conf-tip__body { padding: 0.65rem 0.85rem 0.2rem; max-height: min(15rem, 45vh); overflow-y: auto; overscroll-behavior: contain; }
.conf-tip__body p { margin: 0 0 0.55rem; }
.conf-tip__sub { font-size: 0.85rem; color: var(--muted); font-variant: small-caps; letter-spacing: 0.02em; }
.conf-tip__q { font-style: italic; }
.conf-tip__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.35rem 0.85rem 0.55rem; border-top: 1px solid var(--rule); font-size: 0.85rem; }
.conf-tip__more { color: var(--burgundy); font-weight: 600; margin-left: auto; } /* right-hand side, as in the Reftagger tooltip */
.conf-tip__src { color: var(--muted); font-family: var(--sans); font-size: 0.75rem; }

/* Other Resources page */
.resource-list li { margin-bottom: 0.6rem; }

/* Upcoming events */
.home-events { padding-top: 2.5rem; }
.home-events .events { margin-top: 1rem; }
@media (min-width: 761px) { .home-events .events { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.events { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.event { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 1.2rem 1.6rem 1.2rem; }
.event p { margin: 0 0 0.8rem; }
.event > :last-child { margin-bottom: 0; }
.event__title { margin: 0 0 0.4rem; font-size: 1.45rem; }
.event__when { font-weight: 600; color: var(--burgundy); font-family: var(--sans); font-size: 1.05rem; }
.event__link { font-size: 0.95rem; overflow-wrap: anywhere; }
.events-past__heading { margin-top: 3rem; }
.events-past { padding-left: 1.2rem; color: var(--muted); }
[hidden] { display: none !important; }

/* Document pages */

/* Document pages: one centred reading column (~72 characters per line). */
.page { max-width: calc(72ch + 2.5rem); padding-top: 2.5rem; padding-bottom: 3rem; }
.prose { overflow-wrap: break-word; }
.prose > h1:first-of-type + h2, .prose h1 + h4, .prose h1 + h2 + h4 { margin-top: 0; }
.prose h4 { font-style: italic; font-weight: 500; color: var(--muted); }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.6rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li > p { margin-bottom: 0.6rem; }
.prose blockquote { border-left: 3px solid var(--burgundy); margin-left: 0; padding: 0.2rem 0 0.2rem 1.2rem; color: #3b3f46; font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1.2rem; font-size: 1rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 0.4rem 0.6rem; text-align: left; }
.lettered .prose ol ul, .lettered .prose ul ul { list-style: none; padding-left: 1rem; }
.prose sup { line-height: 0; }
.prose .footnote-ref a { text-decoration: none; font-family: var(--sans); font-size: 0.75em; font-weight: 600; padding: 0 0.1em; }
.prose .footnotes-sep { margin-top: 3rem; }
.prose .footnotes { font-size: 0.95rem; line-height: 1.6; color: #3b3f46; }
.prose .footnotes-list { padding-left: 1.6rem; }
.prose .footnote-backref { text-decoration: none; font-family: var(--sans); }
.doc-download { margin: 1.2rem 0 1.8rem; }

.callout { background: var(--white); border: 1px solid var(--rule); border-left: 5px solid var(--burgundy); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 1.5rem 0 2rem; }
.callout p { margin: 0 0 0.6rem; }
.callout__label { font: 700 0.78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--burgundy); }
.callout__title { font-size: 1.4rem; font-weight: 600; color: var(--navy); line-height: 1.3; }
.callout__meta { color: var(--muted); font-style: italic; }
.callout .button { margin-top: 0.6rem; }
.callout__note { font: 0.85rem var(--sans); color: var(--muted); }

.church-list { display: grid; gap: 1rem; margin-top: 1rem; }
.church { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.4rem; min-width: 0; overflow-wrap: anywhere; }
.church p { margin: 0 0 0.2rem; }
.church a[href^="tel:"] { white-space: nowrap; }
.church__name { margin: 0 0 0.15rem; font-size: 1.25rem; }
.church__place { color: var(--muted); }
.church__tag { font-weight: 600; color: var(--burgundy); }

.notfound ul { font-family: var(--sans); }
.search-box { --pagefind-ui-primary: #1f2f4d; --pagefind-ui-text: #23262b; --pagefind-ui-background: #ffffff; --pagefind-ui-border: #ddd5c5; --pagefind-ui-tag: #f3eee3; --pagefind-ui-font: var(--sans); margin-top: 1.5rem; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #d9deE8; margin-top: 3rem; font-family: var(--sans); font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #f1d9a8; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-top: 2.5rem; padding-bottom: 1.5rem; }
.site-footer p { margin: 0 0 0.6rem; }
.site-footer__name { font: 600 1.2rem var(--serif); color: #fff; }
.site-footer__heading { font: 700 0.8rem var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: #f1d9a8; margin: 0 0 0.7rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin-bottom: 0.4rem; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; padding-bottom: 1.5rem; font-size: 0.85rem; color: #b9c1d0; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; gap: 1.2rem; } }

@media print {
  .site-header, .site-footer, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .page { max-width: none; padding: 0; }
  a { color: inherit; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Small source note after a heading */
.heading-note { font-size: 0.55em; font-weight: 400; color: var(--muted); letter-spacing: normal; text-transform: none; white-space: nowrap; }

.page-note { font-style: italic; font-size: 0.92rem; color: var(--muted); margin: -0.4rem 0 1.5rem; }

.intro .cards { grid-template-columns: 1fr; }
@media (min-width: 600px) { .intro .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .intro .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover, .card__title a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; }

.hero__est { font-family: "EB Garamond", Georgia, serif; font-weight: 500; color: #4B1F6F; text-align: center; font-size: 0.82rem; letter-spacing: 0.14em; font-variant: small-caps; margin-top: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.hero__est::before, .hero__est::after { content: ""; height: 1px; width: 2.2rem; background: #4B1F6F; opacity: 0.55; }

.brand__est { display: none; }
@media (max-width: 760px) {
  .brand__est { font-family: "EB Garamond", Georgia, serif; font-weight: 500; color: #4B1F6F; font-size: 0.82rem; letter-spacing: 0.14em; font-variant: small-caps; line-height: 1.1; margin-top: 0.15rem; display: flex; align-items: center; gap: 0.5rem; }
  .brand__est::before, .brand__est::after { content: ""; height: 1px; width: 1.4rem; background: #4B1F6F; opacity: 0.55; }
}
.home-events .page-note { margin-bottom: 0; }

/* Our Character and Culture: numbered points with a purple numeral */
.character .prose .lede { font-size: 1.2rem; line-height: 1.65; color: #3b3f46; margin-bottom: 2rem; }
.character .prose .point { display: flex; align-items: baseline; gap: 0.85rem; margin: 2.6rem 0 0.9rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); font-size: 1.45rem; }
.character .prose .lede + .point { margin-top: 0; }
.point__num { flex: none; min-width: 1.1em; font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: 2.1em; line-height: 0.9; color: #4B1F6F; text-align: center; }
.point__title { min-width: 0; }
.character .prose .closing { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); font-style: italic; text-align: center; color: #3b3f46; }
@media (max-width: 600px) {
  .character .prose .lede { font-size: 1.1rem; }
  .character .prose .point { font-size: 1.25rem; gap: 0.65rem; margin-top: 2.2rem; padding-top: 1.3rem; }
}

/* Recommended Church Discipline Procedures: lettered sections (A–G) reuse the .character points; numbered clauses and nested lists below */
.discipline .prose h1 { margin-bottom: 0.5rem; }
.discipline .prose .doc-meta { margin: 0 0 2.2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.6; color: var(--muted); }
.discipline .prose .doc-meta p { margin: 0 0 0.5rem; }
.discipline .prose .doc-meta__pdf { margin: 0; font: 600 0.92rem/1.4 var(--sans); }
.discipline .prose .doc-meta__pdf a::before { content: "\2193\00a0"; }
.discipline .prose .doc-meta + .point { margin-top: 0; padding-top: 0; border-top: 0; }
.discipline .prose .section-intro { font-style: italic; color: #3b3f46; }
.discipline .prose .clause { display: flex; align-items: baseline; gap: 0.55rem; margin: 1.9rem 0 0.55rem; font-size: 1.2rem; }
.discipline .prose .point + .clause, .discipline .prose .section-intro + .clause { margin-top: 1.1rem; }
.clause__num { flex: none; min-width: 1.4em; font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: 1.2em; line-height: 1; color: #4B1F6F; }
.clause__title { min-width: 0; }
.discipline .prose .clause ~ p, .discipline .prose .clause ~ ol { margin-left: 2.55rem; }
.discipline .prose .clause ~ p:has(+ ol) { margin-bottom: 0.6rem; }
.discipline .prose .point + ol.numbered { margin-left: 0; }
.discipline .prose ol.alpha { list-style-type: lower-alpha; padding-left: 1.7rem; }
.discipline .prose ol.numbered { list-style-type: decimal; padding-left: 1.9rem; }
.discipline .prose ol.alpha > li::marker, .discipline .prose ol.numbered > li::marker { color: #4B1F6F; font-weight: 600; }
.discipline .prose ol.paren { list-style: none; counter-reset: paren; padding-left: 2.3rem; margin: 0.45rem 0 0.7rem; }
.discipline .prose ol.paren > li { counter-increment: paren; position: relative; margin-bottom: 0.3rem; }
.discipline .prose ol.paren > li::before { content: "(" counter(paren) ")"; position: absolute; left: -2.3rem; width: 1.9rem; text-align: right; color: #4B1F6F; font-variant-numeric: lining-nums; }
.discipline .prose ol.levels > li { margin-bottom: 1.1rem; }
.discipline .prose .item-title { color: var(--navy); }
.discipline .prose ol.levels > li > p { margin: 0.35rem 0 0; }
.discipline .prose li > p:last-of-type { margin-bottom: 0.4rem; }
@media (max-width: 600px) {
  .discipline .prose .clause { font-size: 1.12rem; gap: 0.45rem; }
  .discipline .prose .clause__num { min-width: 0; }
  .discipline .prose .clause ~ p, .discipline .prose .clause ~ ol { margin-left: 0; }
  .discipline .prose ol.alpha, .discipline .prose ol.numbered { padding-left: 1.5rem; }
  .discipline .prose ol.paren { padding-left: 2.1rem; }
  .discipline .prose ol.paren > li::before { left: -2.1rem; width: 1.8rem; }
}

/* Discipline procedures: outline */
.toc { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid #4B1F6F; border-radius: var(--radius); padding: 1.1rem 1.4rem 1rem; margin: 1.5rem 0 2rem; }
.prose .toc__heading, .toc__heading { font-family: "EB Garamond", Georgia, serif; font-variant: small-caps; letter-spacing: 0.1em; color: #4B1F6F; font-size: 1.1rem; font-weight: 600; margin: 0 0 0.6rem; padding: 0; border: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc__list > li { margin: 0.45rem 0; }
.toc__list > li > a { font-weight: 600; color: var(--navy); }
.toc__sub { padding-left: 1.6rem !important; margin: 0.2rem 0 0.4rem !important; }
.toc__sub li { margin: 0.15rem 0; font-size: 0.95rem; }
.toc a { text-decoration: none; color: var(--ink, #2b2f36); }
.toc a:hover { color: var(--burgundy); text-decoration: underline; }
.toc__num { color: #4B1F6F; font-weight: 600; display: inline-block; min-width: 1.6rem; }
.discipline h2[id], .discipline h3[id] { scroll-margin-top: 1.5rem; }
@media (min-width: 761px) { .toc__list { columns: 2; column-gap: 2.5rem; } .toc__list > li { break-inside: avoid; } }
.toc a { display: flex; align-items: baseline; } .toc__num { flex: none; }

.toc--single .toc__list { columns: 1 !important; }
.toc--single .toc__list > li { margin: 0.3rem 0; }
.toc--single .toc__list > li > a { font-weight: 500; }
.character h2[id] { scroll-margin-top: 1.5rem; }

/* Book of Order (/book-of-order/, bodyClass "character bco"): full text with a sticky table of contents.
   Wider container than the reading column so the contents column and the text fit side by side. */
@media (prefers-reduced-motion: no-preference) { html:has(body.bco) { scroll-behavior: smooth; } }
.bco .page { max-width: var(--wrap); }
.bco-layout { display: block; }
.bco-main { min-width: 0; max-width: calc(68ch + 2rem); margin: 0 auto; }
.bco .prose h1 { margin-bottom: 0.4rem; }
.bco-cover { font-family: "EB Garamond", Georgia, serif; font-size: 1.3rem; line-height: 1.35; color: #4B1F6F; margin: 0 0 1rem !important; }
.bco .prose .doc-meta { margin: 0 0 1.8rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.6; color: var(--muted); }
.bco .prose .doc-meta p { margin: 0 0 0.6rem; }
.bco-edition strong { color: var(--navy); font-weight: 600; }
.bco .prose .doc-meta__pdf { font: 600 0.92rem/1.4 var(--sans); }
.bco .prose .doc-meta__pdf a::before { content: "\2193\00a0"; }
.bco .prose .bco-cover-note { margin: 0; font-size: 0.9rem; }
.bco-text h2[id], .bco-text h3[id], .bco-text h4[id], .bco-text li[id], .bco-head { scroll-margin-top: 1.25rem; }
/* Articles (I, II …): the .character points with purple numerals */
.bco .prose .bco-text .point { margin-top: 3rem; }
.bco .prose .bco-text > .point:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.bco .point__num { min-width: 1.6em; font-size: 1.7em; }
.bco .point--plain .point__title { letter-spacing: 0.04em; }
/* Sections (A, B …) */
.bco .prose .clause { display: flex; align-items: baseline; gap: 0.55rem; margin: 2rem 0 0.7rem; font-size: 1.15rem; letter-spacing: 0.02em; }
.bco .prose .point + .clause { margin-top: 1rem; }
.bco .clause__num { flex: none; min-width: 1.3em; font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: 1.25em; line-height: 1; color: #4B1F6F; }
/* Titled numbered items (1. Preparation:) */
.bco .prose .bco-h4 { display: flex; align-items: baseline; gap: 0.5rem; margin: 1.5rem 0 0.5rem; font-size: 1.08rem; font-weight: 600; color: var(--navy); }
.bco .prose .bco-h4 em { font-style: italic; }
.bco .prose .bco-titled > :not(.bco-h4) { margin-left: 1.85rem; }
.bco-h4__title { min-width: 0; }
.bco-h4__num { flex: none; min-width: 1.3rem; font-family: "EB Garamond", Georgia, serif; font-size: 1.15em; color: #4B1F6F; }
/* Numbered and lettered items: the printed numbers are part of the text (so copied citations keep them) */
.bco .prose ol.bco-list { list-style: none; padding-left: 0; margin: 0 0 1rem; }
.bco .prose ol.bco-list ol.bco-list { margin: 0.5rem 0 0.6rem; }
.bco .prose .bco-list > li { display: flex; gap: 0.55rem; margin-bottom: 0.7rem; }
.bco-num { flex: none; min-width: 1.6rem; color: #4B1F6F; font-weight: 600; font-variant-numeric: lining-nums; }
.bco-list--paren > li > .bco-num { min-width: 2rem; }
.bco-item { min-width: 0; flex: 1; }
.bco .prose .bco-item > p { margin: 0 0 0.55rem; }
.bco .prose .bco-item > :last-child { margin-bottom: 0; }
.bco .prose li[id]:target > .bco-item, .bco .prose .bco-h4:target { background: #f4eef8; box-shadow: -0.4rem 0 0 #f4eef8, 0.4rem 0 0 #f4eef8; border-radius: 2px; }
.bco .prose .bco-refs { font-size: 0.95rem; color: #3b3f46; }
.bco-xref { text-decoration-style: dotted; }
/* Table of contents: a sticky column on desktop, a closed <details> box on smaller screens */
.bco-toc { display: none; }
.bco .prose .bco-toc-mobile { margin: 0 0 2rem; padding: 0.8rem 1.2rem; }
.bco-toc-mobile > summary { cursor: pointer; margin: 0 !important; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.bco-toc-mobile > summary::-webkit-details-marker { display: none; }
.bco-toc-mobile > summary::before { content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.bco-toc-mobile[open] > summary::before { transform: rotate(45deg); }
.bco-toc-mobile[open] > summary { margin-bottom: 0.6rem !important; }
.bco .toc__list { columns: 1; }
.bco .toc__list > li { margin: 0.4rem 0; line-height: 1.35; }
.bco .toc__sub li { line-height: 1.3; margin: 0.25rem 0; }
.bco .toc__num { min-width: 2.2rem; }
.bco .bco-toc-mobile .toc__list > li > a > .toc__num { min-width: 2.75rem; }
.bco .toc__sub .toc__num { min-width: 1.4rem; font-weight: 500; }
.bco .toc a.is-active { color: #4B1F6F; font-weight: 700; }
.bco .toc a.is-active-parent { color: #4B1F6F; }
@media (min-width: 1000px) {
  .bco-layout { display: grid; grid-template-columns: 17.5rem minmax(0, calc(68ch + 2rem)); gap: 3.25rem; justify-content: center; align-items: start; }
  .bco-main { margin: 0; }
  .bco .prose .bco-toc {
    display: block; position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 1rem 1rem 1rem 1.1rem; font-family: var(--sans); font-size: 0.86rem; line-height: 1.35; scrollbar-width: thin;
  }
  .bco .bco-toc .toc__heading { font-size: 1.15rem; }
  .bco .bco-toc .toc__list > li { margin: 0.55rem 0; }
  .bco .bco-toc .toc__list > li > a { font-weight: 600; }
  .bco .bco-toc .toc__sub { padding-left: 2.2rem !important; }
  .bco .bco-toc .toc__sub li { font-size: 0.82rem; margin: 0.2rem 0; }
  .bco .bco-toc a { padding: 0.1rem 0.3rem; margin-left: -0.3rem; border-radius: 3px; }
  .bco .bco-toc a.is-active { background: #f4eef8; }
  .bco .bco-toc-mobile { display: none; }
}
@media (max-width: 600px) {
  .bco .prose .bco-list > li { gap: 0.4rem; }
  .bco-num { min-width: 1.3rem; }
  .bco .prose ol.bco-list ol.bco-list { margin-left: -0.2rem; }
  .bco .prose .clause { font-size: 1.05rem; }
  .bco .prose .bco-titled > :not(.bco-h4) { margin-left: 0; }
}
/* Book of Order search (assets/js/bco-search.js): a box under "Contents"; while there is a query the results replace the list */
.bco-search { margin: 0 0 0.7rem; }
.bco .bco-toc .bco-search { position: sticky; top: -1rem; z-index: 1; margin: -0.2rem -0.3rem 0.6rem; padding: 0.2rem 0.3rem 0.4rem; background: var(--white); }
.bco-search__field { position: relative; }
.bco-search__input {
  width: 100%; box-sizing: border-box; font: 400 0.95rem/1.3 var(--sans); color: var(--ink, #2b2f36); background: var(--white);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.45rem 2rem 0.45rem 0.6rem; -webkit-appearance: none; appearance: none;
}
.bco-toc .bco-search__input { font-size: 0.86rem; }
.bco-search__input::placeholder { color: #6b6f76; }
.bco-search__input:focus { outline: 2px solid #4B1F6F; outline-offset: 0; border-color: #4B1F6F; }
.bco-search__input::-webkit-search-cancel-button, .bco-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.bco-search__clear {
  position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%); width: 1.7rem; height: 1.7rem; padding: 0; border: 0; border-radius: 50%;
  background: none; color: #4B1F6F; font: 400 1.3rem/1 var(--sans); cursor: pointer;
}
.bco-search__clear:hover, .bco-search__clear:focus-visible { background: #f4eef8; }
.bco-search__clear[hidden], .bco-search__results[hidden], .bco-toc__list[hidden], .bco-search__more[hidden] { display: none; }
.bco .prose .bco-search__status { margin: 0 0 0.4rem; font: 600 0.8rem/1.3 var(--sans); color: #4B1F6F; letter-spacing: 0.02em; }
.bco .prose .bco-search__list { list-style: none; margin: 0; padding: 0; columns: 1; font-family: var(--sans); }
.bco-search__list li { margin: 0; border-top: 1px solid var(--rule); }
.bco-search__list li:first-child { border-top: 0; }
.bco .toc .bco-search__list a { display: block; padding: 0.4rem 0.3rem; margin: 0 -0.3rem; border-radius: 3px; line-height: 1.35; font-size: 0.88rem; color: var(--ink, #2b2f36); }
.bco .bco-toc .bco-search__list a { font-size: 0.82rem; }
.bco .toc .bco-search__list a:hover, .bco .toc .bco-search__list a:focus-visible { background: #f4eef8; text-decoration: none; }
.bco-search__ref { display: block; font-weight: 700; color: #4B1F6F; font-variant-numeric: lining-nums; }
.bco-search__snip { color: #3b3f46; }
.bco-search__snip mark { background: #efe2a6; color: inherit; padding: 0 0.05em; border-radius: 2px; }
.bco .prose .bco-search__more { margin: 0.5rem 0 0; font: italic 0.8rem/1.35 var(--sans); color: var(--muted); }
.bco-text p[id], .bco-text li[id] { scroll-margin-top: 1.25rem; }
@keyframes bco-flash { 0%, 35% { background-color: #efe2a6; } 100% { background-color: transparent; } }
.bco .prose .bco-flash { animation: bco-flash 2.4s ease-out; border-radius: 2px; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .bco .prose .bco-flash { animation-duration: 3s; } }
/* Floating "Back to top" link (hidden until the reader has scrolled down a screen; always shown without JS) */
.back-to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 30; display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.85rem; border-radius: 999px; background: #4B1F6F; color: #fff; text-decoration: none;
  font: 600 0.85rem/1.2 var(--sans); box-shadow: 0 4px 14px rgba(21,33,58,.25); transition: opacity .2s, transform .2s, visibility .2s;
}
.back-to-top:hover, .back-to-top:focus-visible { background: #3a1757; color: #fff; }
.back-to-top.is-hidden { opacity: 0; visibility: hidden; transform: translateY(0.5rem); }
@media print { .bco-toc, .bco-toc-mobile, .back-to-top { display: none !important; } .bco-layout { display: block; } }

/* Keep the top menu bar visible while scrolling (all pages) */
.site-header { position: sticky; top: 0; z-index: 50; }
html { scroll-padding-top: 6.75rem; }
@media (max-width: 1200px) {
  .js .site-nav.open { max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
}
@media (min-width: 1000px) {
  .bco .prose .bco-toc { top: 7.25rem; max-height: calc(100vh - 8.5rem); }
}
/* Recommended Church Discipline Procedures: sticky left contents (desktop), reusing the Book of Order layout without its text styles */
.disc-side .page { max-width: var(--wrap); }
@media (min-width: 1000px) {
  .disc-side .prose .bco-toc {
    display: block; position: sticky; top: 7.25rem; max-height: calc(100vh - 8.5rem); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 1rem 1rem 1rem 1.1rem; font-family: var(--sans); font-size: 0.86rem; line-height: 1.35; scrollbar-width: thin;
  }
  .disc-side .bco-toc .toc__heading { font-size: 1.15rem; }
  .disc-side .bco-toc .toc__list { columns: 1 !important; }
  .disc-side .bco-toc .toc__list > li { margin: 0.55rem 0; line-height: 1.35; }
  .disc-side .bco-toc .toc__list > li > a { font-weight: 600; }
  .disc-side .bco-toc .toc__num { min-width: 1.6rem; }
  .disc-side .bco-toc .toc__sub { padding-left: 1.6rem !important; }
  .disc-side .bco-toc .toc__sub li { font-size: 0.82rem; margin: 0.2rem 0; line-height: 1.3; }
  .disc-side .bco-toc .toc__sub .toc__num { min-width: 1.4rem; font-weight: 500; }
  .disc-side .bco-toc a { padding: 0.1rem 0.3rem; margin-left: -0.3rem; border-radius: 3px; }
  .disc-side .bco-toc a.is-active { background: #f4eef8; color: #4B1F6F; font-weight: 700; }
  .disc-side .bco-toc a.is-active-parent { color: #4B1F6F; }
}
@media (prefers-reduced-motion: no-preference) { html:has(body.disc-side) { scroll-behavior: smooth; } }
.disc-side .prose .bco-toc-mobile { margin: 0 0 2rem; padding: 0.8rem 1.2rem; }
.disc-side .bco-toc-mobile .toc__list { columns: 1 !important; }
@media (min-width: 1000px) { .disc-side .bco-toc-mobile { display: none; } }
@media (min-width: 1000px) { .disc-side .prose .bco-text > h2.point:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; } }
.bco .toc__sub .toc__sub { padding-left: 1.4rem !important; margin: 0.15rem 0 0.25rem !important; }
@media (min-width: 1000px) { .bco .bco-toc .toc__sub .toc__sub { padding-left: 1.4rem !important; } }
/* Book of Order on phones/tablets: the Contents box stays pinned under the sticky site header */
@media (max-width: 999px) {
  html:has(.bco-toc-mobile--pinned) { scroll-padding-top: calc(var(--hdr, 5.8rem) + 4.75rem); }
  .bco .prose .bco-toc-mobile--pinned, .disc-side .prose .bco-toc-mobile--pinned {
    position: sticky; top: calc(var(--hdr, 5.8rem) + 0.5rem); z-index: 40;
    box-shadow: 0 -0.6rem 0 0 var(--paper), 0 4px 14px rgba(30, 30, 50, 0.12);
  }
  .bco .prose .bco-toc-mobile--pinned[open], .disc-side .prose .bco-toc-mobile--pinned[open] {
    max-height: calc(100vh - var(--hdr, 5.8rem) - 1.25rem); max-height: calc(100dvh - var(--hdr, 5.8rem) - 1.25rem);
    overflow-y: auto; overscroll-behavior: contain;
  }
}
