:root {
  --primary: #5c3d1e;
  --primary-mid: #704213;
  --gold: #d38c00;
  --gold-soft: #efbf04;
  --bronze: #b58864;
  --bg: #fbf7ee;
  --bg-deep: #f3ead7;
  --card: #fffdf8;
  --card-soft: #fff8f2;
  --border: #d9cbb3;
  --text: #1e1b16;
  --muted: #5c5346;
  --shadow: 0 10px 30px rgba(92, 61, 30, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1100px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Heebo", system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(211, 140, 0, 0.12), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(112, 66, 19, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-mid); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; width: min(100% - 2rem, var(--max)); margin: 0 auto; padding: 1.5rem 0 3rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary-mid) 0%, #8b6914 55%, var(--gold) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
}
.site-header a { color: #fff; text-decoration: none; }
.header-inner {
  width: min(100% - 1.5rem, var(--max));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-desktop a,
.nav-cta {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s;
}
.nav-desktop a:hover { background: rgba(255,255,255,0.14); }
.nav-cta {
  background: #fff;
  color: var(--primary-mid) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-drawer {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
}
.nav-drawer.open { display: block; animation: fadeSlide 0.28s var(--ease); }
.nav-drawer-inner {
  width: min(100% - 1.5rem, var(--max));
  margin: 0 auto;
  padding: 0.85rem 0 1.1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
}
.nav-drawer a {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-drawer a:hover { background: rgba(255,255,255,0.16); }
.nav-drawer .nav-cta {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 0.25rem;
}

/* Hero / cards / typography */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background:
    linear-gradient(145deg, rgba(255,253,248,0.96), rgba(255,248,242,0.9)),
    var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.75rem;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211,140,0,0.18), transparent 70%);
  pointer-events: none;
}
.hero-kicker {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(211,140,0,0.12);
  color: var(--primary-mid);
  font-size: 0.85rem;
  font-weight: 700;
}
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 4.2vw, 2.35rem);
  line-height: 1.25;
  color: var(--primary);
}
.hero-lead {
  margin: 0 0 1.25rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-mid), var(--gold));
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(112,66,19,0.22);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff !important; }
.btn-secondary {
  background: #fff;
  color: var(--primary-mid) !important;
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--gold); }

.section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--primary);
}
.section-sub {
  margin: 0 0 1.15rem;
  color: var(--muted);
  max-width: 40rem;
}

.grid {
  display: grid;
  gap: 1rem;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 4px 16px rgba(92,61,30,0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(211,140,0,0.45);
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none !important;
  height: 100%;
}
.card h2, .card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  color: var(--primary);
}
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.card-meta {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem);
  box-shadow: 0 4px 16px rgba(92,61,30,0.04);
  margin-bottom: 1.25rem;
}
.panel h1 {
  margin: 0 0 0.75rem;
  color: var(--primary);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
}
.panel h2 {
  margin: 1.4rem 0 0.55rem;
  color: var(--primary-mid);
  font-size: 1.15rem;
}
.panel p { margin: 0 0 0.85rem; }
.lead {
  font-size: 1.05rem;
  color: var(--muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem !important;
}
.note {
  background: rgba(211,140,0,0.08);
  border: 1px solid rgba(211,140,0,0.22);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.psalm-text {
  font-size: 1.12rem;
  line-height: 2;
  white-space: pre-wrap;
  background: linear-gradient(180deg, #fffefb, #faf4e8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.15rem;
  margin: 1rem 0;
}
.theme-box, .exp-box {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin: 0.85rem 0;
}
.theme-box {
  background: linear-gradient(135deg, rgba(92,61,30,0.06), rgba(201,162,39,0.08));
  border: 1px solid var(--border);
}
.exp-box {
  background: #fff;
  border: 1px solid var(--border);
}
.theme-box h2, .exp-box h2 { margin-top: 0; }
.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  margin-top: 1.5rem;
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
}
.chapter-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none !important;
  font-weight: 700;
  color: var(--primary-mid);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.chapter-grid a:hover {
  background: rgba(211,140,0,0.12);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.site-footer {
  margin-top: auto;
  background: #2f2114;
  color: rgba(255,255,255,0.86);
  padding: 2rem 0 1.5rem;
}
.site-footer a { color: #ffe6b0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-inner {
  width: min(100% - 1.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}
.footer-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.footer-col h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: #fff;
}
.footer-col a {
  display: block;
  padding: 0.2rem 0;
  font-size: 0.92rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .nav-toggle { display: none; }
  .nav-desktop { display: flex; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .chapter-grid { grid-template-columns: repeat(10, 1fr); }
}
@media (min-width: 980px) {
  .nav-drawer { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .nav-desktop a { transition: none; }
}

/* Accessibility widget — shared across every page */
.acc-trigger {
  position: fixed;
  z-index: 10050;
  left: 16px;
  bottom: 16px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: #1a3e72;
  color: #fff;
  box-shadow: 0 8px 22px rgba(16, 42, 80, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.acc-trigger:hover { filter: brightness(1.08); }
.acc-trigger svg { width: 30px; height: 30px; }
.acc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10070;
  background: rgba(15, 23, 42, 0.48);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 12px 84px;
  overflow: auto;
}
.acc-overlay.is-open { display: flex; }
.acc-dialog {
  width: min(440px, 100%);
  max-height: calc(100dvh - 96px);
  margin-top: 8px;
  background: #f3f6fa;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: "Heebo", system-ui, sans-serif;
}
.acc-head {
  position: relative;
  background: #1a3e72;
  color: #fff;
  min-height: 54px;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  direction: ltr;
  padding: 0 8px;
  flex: 0 0 auto;
}
.acc-head h2 {
  margin: 0;
  text-align: center;
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}
.acc-x, .acc-head-ico {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  padding: 0;
}
.acc-head-ico { cursor: default; }
.acc-head-ico svg, .acc-x svg { width: 22px; height: 22px; }
.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  min-height: 0;
  direction: rtl;
}
.acc-card {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #e3ebf3;
  background: #fff;
  border-radius: 16px;
  min-height: 96px;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #1a4d78;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
}
.acc-card svg { width: 30px; height: 30px; flex: 0 0 auto; }
.acc-font-ico {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1a4d78;
}
.acc-card.is-on { background: #e6edf3; }
.acc-card:hover, .acc-card:focus-visible {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px #22c55e;
  outline: none;
}
.acc-tip {
  position: fixed;
  z-index: 10090;
  background: #2b3440;
  color: #fff;
  border: 2px solid #22c55e;
  border-radius: 8px;
  padding: 4px 8px;
  font: 600 0.78rem/1.3 "Heebo", sans-serif;
  pointer-events: none;
  display: none;
  white-space: nowrap;
}
.acc-ruler {
  position: fixed;
  left: 0;
  right: 0;
  height: 48px;
  margin-top: -24px;
  background: rgba(255, 214, 80, 0.32);
  border-top: 2px solid rgba(168, 112, 0, 0.75);
  border-bottom: 2px solid rgba(168, 112, 0, 0.75);
  pointer-events: none;
  z-index: 10040;
  display: none;
}
html.acc-ruler-on .acc-ruler { display: block; }
html.acc-links .site-shell a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  background: #fff3bf;
  outline: 2px solid #1a3e72;
  outline-offset: 2px;
}
html.acc-headings .site-shell h1,
html.acc-headings .site-shell h2,
html.acc-headings .site-shell h3,
html.acc-headings .site-shell h4 {
  background: #fff3bf !important;
  box-shadow: inset 0 0 0 2px #1a3e72;
  padding-inline: 0.2em;
}
html.acc-spacing .site-shell { letter-spacing: 0.06em; word-spacing: 0.14em; }
html.acc-line .site-shell { line-height: 2.05 !important; }
html.acc-align-right .site-shell { text-align: right !important; }
html.acc-align-center .site-shell { text-align: center !important; }
html.acc-align-justify .site-shell p,
html.acc-align-justify .site-shell li { text-align: justify !important; }
html.acc-dyslexia body { font-family: "Atkinson Hyperlegible", "Heebo", sans-serif !important; }
html.acc-hide-images .site-shell img,
html.acc-hide-images .site-shell picture,
html.acc-hide-images .site-shell video { visibility: hidden !important; }
html.acc-cursor, html.acc-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%231a3e72' stroke='%23fff' stroke-width='1.4' d='M6 3l18 13-8 1 5 9-3.2 1.6-5-9-6.8 5.4z'/%3E%3C/svg%3E") 4 2, auto !important;
}
html.acc-cursor input, html.acc-cursor textarea { cursor: text !important; }
html.acc-hover .site-shell a:hover,
html.acc-hover .site-shell button:hover,
html.acc-hover .site-shell .card:hover {
  outline: 3px solid #e0b000 !important;
  background-color: rgba(255, 236, 140, 0.55) !important;
}
html.acc-focus .site-shell :focus-visible {
  outline: 3px solid #0b63ce !important;
  outline-offset: 3px !important;
}
html.acc-speech .psalm-text { cursor: pointer; }
html.acc-speech .psalm-text:hover { outline: 2px solid rgba(26, 62, 114, 0.35); outline-offset: 4px; }
html.acc-no-motion .site-shell *,
html.acc-no-motion .site-shell *::before,
html.acc-no-motion .site-shell *::after {
  animation: none !important;
  transition: none !important;
}
