:root {
  --paper: #f7f5ee;
  --surface: #ffffff;
  --ink: #1d2422;
  --muted: #5d6965;
  --line: #dde3df;
  --primary: #2f6255;
  --primary-dark: #173f36;
  --accent: #d79a55;
  --accent-dark: #7c4e23;
  --blue: #335d78;
  --clay: #b9694e;
  --danger: #a23b3b;
  --shadow: 0 12px 28px rgba(24, 34, 31, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--primary-dark); }
img, video, iframe { max-width: 100%; }
iframe { border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: .75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.site-banner {
  background: var(--primary);
  color: #fff;
  padding: .55rem 1rem;
  text-align: center;
  font-weight: 700;
}
.site-banner.urgent { background: var(--danger); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: .85rem 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
}
.brand-logo {
  display: block;
  width: 106px;
  max-height: 44px;
  object-fit: contain;
}
.brand small { display: block; color: var(--muted); line-height: 1.2; }
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: .65rem .9rem;
  font-weight: 800;
}
.site-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: .8rem 1rem 1rem;
  box-shadow: var(--shadow);
}
.site-menu.open { display: grid; gap: .35rem; }
.site-menu a {
  padding: .7rem .4rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.site-menu .nav-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: #16120d;
  border-radius: 8px;
  padding: .75rem 1rem;
}

.messages { max-width: 1180px; margin: 1rem auto 0; padding: 0 1rem; }
.message { border-radius: 8px; padding: .85rem 1rem; background: #edf4f1; border: 1px solid #c9ddd5; }
.message.error { background: #fff0f0; border-color: #e6c0c0; }

.page-hero, .dashboard-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1rem 2rem;
}

.home-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(760px, calc(100vh - 70px));
  padding: 7rem 1rem 2rem;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(11, 28, 24, .92), rgba(20, 44, 38, .70) 48%, rgba(20, 44, 38, .18)),
    var(--hero-image, linear-gradient(135deg, #173f36, #335d78));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(247, 245, 238, .95));
  pointer-events: none;
}
.home-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding-bottom: 1.5rem;
}
.home-hero h1 {
  max-width: 760px;
  margin: .3rem 0 .35rem;
  font-size: clamp(2.55rem, 10.5vw, 6.7rem);
  line-height: .98;
  overflow-wrap: break-word;
}
.home-hero .eyebrow {
  color: #ffd9a8;
}
.hero-tagline {
  margin: 0 0 .75rem;
  color: #ffe6c5;
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  font-weight: 850;
}
.hero-summary {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.02rem, 2vw, 1.25rem);
}
.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1.25rem 0 0;
}
.hero-details span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  padding: .45rem .75rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  font-weight: 800;
}
.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .9rem;
  margin-top: .9rem;
}
.hero-quick-links a {
  color: #fff;
  font-weight: 850;
  text-decoration-color: rgba(255,255,255,.55);
  text-underline-offset: .25em;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-pause {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
  background: rgba(0,0,0,.45);
  color: #fff;
  padding: .6rem .8rem;
}
.page-hero h1, .dashboard-header h1 {
  font-size: clamp(2.15rem, 6vw, 4.5rem);
  line-height: 1.03;
  margin: .25rem 0 .75rem;
}
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--accent-dark);
  font-weight: 850;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: 0;
}

.section { padding: 3.25rem 1rem; }
.section.muted { background: #eef3f0; }
.section.scripture { background: #1f342f; color: #fff; }
.section.custom-bg { background: var(--section-bg); }
.section-inner, .section-heading {
  max-width: 1180px;
  margin: 0 auto;
}
.section-inner.split {
  display: grid;
  gap: 1.5rem;
}
.section-copy { max-width: 720px; }
.section h2, .section-heading h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 .8rem;
}
.rich-text p { margin-top: 0; }
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.15rem;
}
.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: .78rem 1rem;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--primary-dark); color: #fff; }
.button.light {
  background: #fff;
  color: var(--primary-dark);
}
.button.light:hover {
  background: #ffe9c9;
  color: var(--primary-dark);
}
.button.glass {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.62);
  backdrop-filter: blur(8px);
}
.button.glass:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.button.ghost, button.button.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.button.ghost:hover { background: #eaf2ef; color: var(--primary-dark); }

.media-frame {
  overflow: hidden;
  border-radius: 8px;
  background: #dce4e0;
  min-height: 220px;
}
.media-frame iframe, .media-frame video, .media-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.video-link {
  min-height: 220px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}

.card-grid {
  max-width: 1180px;
  margin: 1.5rem auto 0;
  display: grid;
  gap: 1rem;
}
.expectation-band {
  background: #21362f;
  color: #fff;
}
.expectation-band .eyebrow { color: #ffd9a8; }
.expectation-grid {
  width: min(100%, 1180px);
  margin: 1.5rem auto 0;
  display: grid;
  gap: .8rem;
}
.expectation-grid article {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255,255,255,.08);
}
.expectation-grid span {
  display: inline-block;
  margin-bottom: .8rem;
  color: #ffd9a8;
  font-weight: 900;
}
.expectation-grid h3 { margin: 0 0 .35rem; }
.expectation-grid p { margin: 0; color: #e8efec; }
.giving-home {
  background: #f1ece2;
}
.cta-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: .65rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--blue));
  color: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.cta-card p, .cta-card h3 { margin: 0; }
.cta-card h3 { font-size: 2rem; line-height: 1.05; }
.card, .panel, .form-card, .auth-card, .featured-post, .message-card, .builder-item, .stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; line-height: 1.2; }
.card.pinned { border-color: var(--accent); }
.scroll-row {
  max-width: 1180px;
  margin: 1.5rem auto 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 82vw);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .5rem;
}
.scroll-row > * { scroll-snap-align: start; }
.carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .5rem;
}
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.carousel-slide { margin: 0; scroll-snap-align: start; }
.carousel-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 1.5rem;
  cursor: pointer;
}
.meta-list { display: grid; gap: .45rem; margin: 1rem 0; }
.meta-list div { display: grid; gap: .1rem; }
.meta-list dt { font-weight: 850; }
.meta-list dd { margin: 0; color: var(--muted); }
.faq-list { max-width: 860px; margin: 1.5rem auto 0; display: grid; gap: .65rem; }
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem 1rem;
}
.faq-list summary { cursor: pointer; font-weight: 850; min-height: 44px; }
.cta-band { background: var(--primary); color: #fff; }
.cta-band .button.ghost { color: #fff; border-color: #fff; }

.form-card {
  display: grid;
  gap: .9rem;
  width: 100%;
}
.form-field { display: grid; gap: .25rem; }
.form-field.hidden { display: none; }
label { font-weight: 800; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9d3ce;
  border-radius: 8px;
  padding: .72rem .8rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.field-error { color: var(--danger); margin: .1rem 0 0; }
.notice {
  border-left: 4px solid var(--accent);
  padding: .75rem 1rem;
  background: #fff7ee;
}
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form input { min-width: 0; }
.search-form {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  display: grid;
  gap: .65rem;
}

.auth-shell {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card { width: min(100%, 520px); }
.secret-code {
  display: block;
  overflow-wrap: anywhere;
  background: #edf4f1;
  padding: .8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.dashboard-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
}
.dashboard-shell.narrow, .staff-main.narrow { max-width: 760px; }
.dashboard-grid, .stat-grid {
  display: grid;
  gap: 1rem;
}
.mini-item {
  border-top: 1px solid var(--line);
  padding-top: .8rem;
  margin-top: .8rem;
}
.thread { display: grid; gap: .8rem; margin: 1rem 0; }
.message-card.mine { border-color: var(--primary); }

.staff-layout {
  display: grid;
  max-width: 1480px;
  margin: 0 auto;
}
.staff-nav {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding: .75rem 1rem;
  background: #22312d;
  color: #fff;
}
.staff-nav a {
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
  padding: .55rem .75rem;
  border-radius: 8px;
  min-height: 44px;
}
.staff-nav a:hover { background: rgba(255,255,255,.12); }
.staff-nav-home { font-weight: 900; }
.staff-main { padding: 1rem; min-width: 0; }
.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card span { font-size: 2rem; font-weight: 900; color: var(--primary); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef3f0; }
.status-chip {
  display: inline-flex;
  border-radius: 999px;
  background: #edf4f1;
  color: var(--primary-dark);
  padding: .2rem .55rem;
  font-size: .85rem;
  font-weight: 800;
}
.inline-delete { display: inline; margin-left: .3rem; }
.inline-delete button {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  text-decoration: underline;
}
.builder-list { display: grid; gap: .8rem; }
.builder-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer {
  background: #1f2825;
  color: #f7faf8;
  padding: 2.5rem 1rem;
}
.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
.footer-links, .social-links { display: flex; flex-wrap: wrap; gap: .8rem; }
.site-footer a { color: #ffffff; }
.copyright { max-width: 1180px; margin: 2rem auto 0; color: #cfd8d3; }

@media (min-width: 760px) {
  .menu-toggle { display: none; }
  .site-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
  }
  .site-menu a { padding: .55rem .4rem; }
  .section-inner.split { grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); align-items: center; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .expectation-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scroll-row { grid-auto-columns: minmax(320px, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; }
  .search-form { grid-template-columns: 1fr auto; align-items: end; }
  .search-form label { grid-column: 1 / -1; }
}

@media (max-width: 759px) {
  .home-hero {
    align-items: start;
    min-height: auto;
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
  .home-hero h1 {
    max-width: 10ch;
    font-size: 2.45rem;
    white-space: normal;
  }
  .hero-tagline {
    font-size: 1.05rem;
  }
  .hero-summary {
    font-size: 1rem;
  }
  .hero-details span {
    width: 100%;
    min-height: 34px;
    border-radius: 8px;
    padding: .35rem .55rem;
  }
  .home-hero .button-row .button {
    flex: 1 1 100%;
  }
}

@media (min-width: 1020px) {
  .staff-layout { grid-template-columns: 260px 1fr; align-items: start; }
  .staff-nav {
    position: sticky;
    top: 4.6rem;
    min-height: calc(100vh - 4.6rem);
    display: grid;
    align-content: start;
    overflow: visible;
  }
  .staff-main { padding: 1.5rem 2rem; }
}
