:root {
  color-scheme: light;
  --navy-950: #081c2f;
  --navy-900: #102f4f;
  --navy-800: #163f68;
  --navy-700: #1e5689;
  --gold-700: #80651f;
  --gold-600: #a9872e;
  --gold-500: #c1a34f;
  --gold-100: #f4ecd5;
  --green-700: #17684f;
  --green-100: #e7f5ef;
  --blue-100: #eaf2fd;
  --plum-700: #70436b;
  --plum-100: #f5edf4;
  --ink: #132638;
  --muted: #526575;
  --line: #d8e0e7;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
  --shadow: 0 18px 48px rgba(8, 28, 47, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(193, 163, 79, 0.16), transparent 28rem),
    linear-gradient(180deg, #eef3f7 0, #f8fafc 42rem, #ffffff 100%);
  line-height: 1.58;
}
button, input { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #fff;
  background: var(--navy-950);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  color: #fff;
  background: linear-gradient(115deg, var(--navy-950), var(--navy-800));
  border-bottom: 4px solid var(--gold-500);
}
.site-header__inner {
  width: min(100% - 2rem, 78rem);
  min-height: 6.5rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-panel {
  width: 5rem;
  height: 5rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 0.75rem;
}
.brand-panel img { width: 4.65rem; height: 4.65rem; object-fit: contain; }
.site-header p, .site-footer p { margin: 0; }
.site-header__church { color: var(--gold-100); font-size: 0.86rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.site-header__title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 3vw, 1.7rem); line-height: 1.25; }

.site-main {
  width: min(100% - 2rem, 78rem);
  min-height: calc(100vh - 13rem);
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 3.25rem) 0 4rem;
}
.eyebrow { margin: 0 0 0.35rem; color: var(--gold-700); font-size: 0.82rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
h1, h2, h3 { color: var(--navy-900); line-height: 1.18; }
h1 { max-width: 58rem; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 6vw, 4.6rem); letter-spacing: -0.04em; }
h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { margin: 0; font-size: 1.17rem; }
.intro { margin-bottom: 1.7rem; }
.intro__lead { max-width: 57rem; margin: 0.85rem 0 0; color: var(--muted); font-size: 1.08rem; }

.framework {
  margin-bottom: 2rem;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(16,47,79,.13);
  border-top: 0.36rem solid var(--gold-500);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
}
.framework__heading { padding: clamp(1.15rem, 3vw, 1.75rem); display: grid; grid-template-columns: minmax(15rem,.8fr) minmax(18rem,1.2fr); gap: 1.5rem; align-items: end; }
.framework__heading > p { margin: 0; color: var(--muted); }
.framework__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.framework-card { min-height: 8.7rem; padding: 1.1rem 1.25rem; display: flex; gap: 0.9rem; align-items: flex-start; border-right: 1px solid var(--line); }
.framework-card:last-child { border-right: 0; }
.framework-card strong { min-width: 2.2rem; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; line-height: 1; }
.framework-card p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.93rem; }
.framework-card--gift { background: var(--blue-100); }
.framework-card--gift strong { color: var(--navy-700); }
.framework-card--ministry { background: var(--green-100); }
.framework-card--ministry strong { color: var(--green-700); }
.framework-card--leadership { background: var(--plum-100); }
.framework-card--leadership strong { color: var(--plum-700); }
.passages summary { padding: 1rem 1.25rem; color: var(--navy-800); font-weight: 800; cursor: pointer; }
.passages summary:hover { background: var(--surface-soft); }
.passages__body { padding: 0 1.25rem 1.15rem; color: var(--muted); }
.passages__body p { margin: 0.65rem 0 0; }

.explorer__heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.result-count { margin: 0; color: var(--muted); font-weight: 750; }
.controls { margin-bottom: 0.85rem; padding: 1.15rem; background: var(--navy-900); border-radius: 0.85rem; box-shadow: var(--shadow); }
.search-field { display: block; color: #fff; font-weight: 750; }
.search-wrap { min-height: 3rem; margin-top: 0.35rem; padding: 0 0.85rem; display: flex; align-items: center; gap: 0.6rem; color: var(--navy-700); background: #fff; border: 2px solid transparent; border-radius: 0.5rem; }
.search-wrap:focus-within { border-color: var(--gold-500); outline: 2px solid #fff; outline-offset: 2px; }
.search-wrap input { width: 100%; min-width: 0; padding: 0.65rem 0; color: var(--ink); background: transparent; border: 0; outline: 0; }
.category-filter { margin: 1rem 0 0; padding: 0; border: 0; }
.category-filter legend { margin-bottom: 0.45rem; color: var(--gold-100); font-weight: 800; }
.category-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-buttons button { min-height: 2.55rem; padding: 0.5rem 0.85rem; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; font-weight: 750; }
.category-buttons button:hover { background: rgba(255,255,255,.1); }
.category-buttons button[aria-pressed="true"] { color: var(--navy-950); background: var(--gold-100); border-color: var(--gold-100); }
.scripture-help { margin: 0 0 1rem; color: var(--muted); font-size: 0.93rem; }

.gift-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.gift-card { position: relative; align-self: start; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 0.85rem; box-shadow: 0 8px 24px rgba(8,28,47,.07); }
.gift-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 0.32rem; background: var(--navy-700); }
.gift-card[data-category="ministry"]::before { background: var(--green-700); }
.gift-card[data-category="leadership"]::before { background: var(--plum-700); }
.gift-card__main { padding: 1.15rem 1.2rem 1rem 1.45rem; }
.gift-card__top { display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start; }
.category-badge { flex: 0 0 auto; padding: 0.25rem 0.55rem; color: var(--navy-700); background: var(--blue-100); border-radius: 999px; font-size: 0.75rem; font-weight: 800; }
[data-category="ministry"] .category-badge { color: var(--green-700); background: var(--green-100); }
[data-category="leadership"] .category-badge { color: var(--plum-700); background: var(--plum-100); }
.gift-card__brief { margin: 0.62rem 0 0.9rem; color: var(--muted); }
.scripture-label { margin: 0 0 0.28rem; color: var(--navy-900); font-size: 0.79rem; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; }
.scripture-list { margin: 0; color: var(--navy-700); font-size: 0.91rem; line-height: 1.75; }
.scripture-ref { white-space: nowrap; }
.scripture-ref:not(:last-child)::after { content: " · "; color: #9aa8b4; white-space: pre; }
.scripture-list a { color: var(--navy-700); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.gift-card details { border-top: 1px solid var(--line); }
.gift-card summary { padding: 0.82rem 1.2rem 0.82rem 1.45rem; color: var(--navy-800); font-weight: 800; cursor: pointer; }
.gift-card summary:hover { background: var(--surface-soft); }
.expanded-definition { padding: 0 1.2rem 1.1rem 1.45rem; color: var(--muted); }
.expanded-definition p { margin: 0.7rem 0 0; }
.empty-state, .message-panel { padding: 2rem; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 0.85rem; }
.empty-state button { min-height: 2.8rem; padding: 0.6rem 1rem; color: #fff; background: var(--navy-800); border: 0; border-radius: 0.45rem; font-weight: 800; }

.site-footer { padding: 1.4rem 1rem; text-align: center; color: #dce8f2; background: var(--navy-950); font-size: 0.88rem; }
.site-footer p + p { margin-top: 0.25rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; }

@media (max-width: 760px) {
  .framework__heading { grid-template-columns: 1fr; gap: 0.65rem; }
  .framework__grid, .gift-grid { grid-template-columns: 1fr; }
  .framework-card { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .framework-card:last-child { border-bottom: 0; }
  .explorer__heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .site-header__inner { min-height: 5.6rem; }
  .brand-panel { width: 4.3rem; height: 4.3rem; }
  .brand-panel img { width: 4rem; height: 4rem; }
  .site-main { width: min(100% - 1.25rem, 78rem); }
  .gift-card__top { flex-direction: column; }
  .category-buttons { display: grid; grid-template-columns: 1fr; }
  .category-buttons button { border-radius: 0.45rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: #fff; }
  .site-header { color: #000; background: #fff; border-bottom: 2px solid #000; }
  .site-header__church, .site-header__title { color: #000; }
  .controls, .scripture-help, .site-footer { display: none; }
  .site-main { width: 100%; padding: 1rem; }
  .framework, .gift-card { break-inside: avoid; box-shadow: none; }
  .gift-grid { grid-template-columns: 1fr 1fr; }
}
