/* ---------- Primers & Catechisms: catechism pages ----------
   Title plate on the page hero, recitation tools, numbered accordions.
   Uses the tokens and .faq accordions in css/site.css; nothing new to the palette. */

/* Title plate: a pamphlet cover set in brass on navy */
.cat-cover { padding: 2rem 0 2.2rem; }
.cat-plate {
  position: relative;
  max-width: 34rem;
  margin-inline: auto;
  /* Bottom padding clears the bottom corners (2.6rem + 0.45rem inset) under the imprint lines. */
  padding: 2.4rem 1.25rem 3.4rem;
  text-align: center;
}
/* Gold corners: Zack-approved exception for the two catechism title plates only, Tyler and U.D.C. (2026-11-19). */
.cat-corner {
  position: absolute;
  width: 2.6rem;
  height: 2.6rem;
  pointer-events: none;
}
.cat-corner-tl { top: 0.45rem; left: 0.45rem; }
.cat-corner-tr { top: 0.45rem; right: 0.45rem; transform: scaleX(-1); }
.cat-corner-bl { bottom: 0.45rem; left: 0.45rem; transform: scaleY(-1); }
.cat-corner-br { bottom: 0.45rem; right: 0.45rem; transform: scale(-1, -1); }
.cat-kicker { display: inline-block; }
.cat-kicker::after { margin-inline: auto; }
.cat-kicker a { color: inherit; text-decoration: none; }
.cat-kicker a:hover,
.cat-kicker a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.cat-plate h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.5rem, 11vw, 4.2rem);
  line-height: 1;
}
.cat-plate h1 .cat-pre {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-fell);
  font-size: clamp(1.15rem, 4.4vw, 1.6rem);
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--cream);
  text-shadow: none;
}
.cat-war {
  margin-top: 0.85rem;
  font-family: var(--font-fell);
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  letter-spacing: 0.08em;
  color: var(--brass-pale);
}
.cat-strand{display:block;width:clamp(9.5rem,44%,12.5rem);height:auto;margin:1rem auto .75rem}
.cat-by {
  font-family: var(--font-fell);
  font-style: italic;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  letter-spacing: 0.04em;
  color: var(--cream);
}
.cat-edition {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--cream) 85%, transparent);
}
/* U.D.C. chapter line: break after the middot, never inside "United Daughters of the Confederacy".
   Each half is a unit; below 24rem a half may still wrap inside itself rather than overflow the plate. */
.cat-edition-split > span { display: inline-block; }
@media (min-width: 24rem) {
  .cat-edition-split > span { white-space: nowrap; }
}
.cat-plate .rule-taper { justify-content: center; padding: 0; margin-top: 1rem; color: var(--brass); }
.cat-imprint,
.cat-restored {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  text-wrap: balance;
  margin: 0.35rem 0 0;
}
.cat-imprint { color: var(--cream-2); }
.cat-restored { color: var(--brass-pale); }

/* Preface and recitation read at a comfortable measure */
.cat-prose,
.cat-recitation { max-width: 46rem; }

/* Section h2s carry the gap to what follows; the tools add none of their own. */
.cat-prose h2,
.cat-recitation h2 { margin-bottom: 0.9rem; }

/* Tools: status line, search, open/close all */
.cat-tools { margin-top: 0; }
.cat-status { font-size: 0.95rem; color: var(--muted-dark); }
.cat-controls { margin-top: 0.75rem; display: grid; gap: 0.6rem; }
.cat-controls[hidden] { display: none; }
.cat-search {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px color-mix(in srgb, var(--brass) 55%, var(--ink));
}
.cat-search:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 2px; }
.cat-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-buttons .btn { min-height: 44px; }

.cat-recitation .cat-tools + .faq-item { margin-top: 1.25rem; }
/* Number in its own column so long questions wrap under their text */
.cat-item .faq-q-text {
  display: grid;
  grid-template-columns: 1.9em 1fr;
  align-items: baseline;
}
.cat-num { color: var(--brass-text); }
.cat-item[hidden] { display: none; }
.cat-item .faq-a p { line-height: 1.65; }
/* Bracketed editor's note under an answer, set apart from the printed text. */
.cat-item .faq-a .cat-note { margin-top: 0.5rem; font-size: 0.92rem; font-style: italic; color: var(--muted-dark); }
.cat-none { margin-top: 1rem; font-style: italic; color: var(--muted-dark); }
.cat-dateline { margin-top: 1.25rem; text-align: center; font-family: var(--font-fell); font-style: italic; letter-spacing: 0.08em; color: var(--brass-dark); }

/* Finis and the back-cover imprint */
.cat-colophon {
  margin-top: 2rem;
  text-align: center;
}
.cat-colophon > p:nth-child(2) {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px color-mix(in srgb, var(--brass) 55%, var(--ink));
  font-size: 0.95rem;
  line-height: 1.55;
}
.cat-colophon .faq-source { font-size: 0.85rem; color: var(--muted); }
.cat-finis {
  font-family: var(--font-fell);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--brass-dark);
}

@media (min-width: 720px) {
  .cat-plate { padding: 3rem 2.5rem 3rem; }
  .cat-corner { width: 3.5rem; height: 3.5rem; }
  .cat-controls { grid-template-columns: 1fr auto; align-items: center; }
}

@media print {
  .cat-tools, .cat-jump, .cat-corner { display: none !important; }
  .cat-item[hidden], .faq-a[hidden] { display: block !important; }
}
