:root {
  --bg: #f7f3eb;
  --panel: #fffdf8;
  --ink: #1f2428;
  --muted: #667085;
  --line: #ded7ca;
  --accent: #8a5a24;
  --accent-dark: #5d3a16;
  --nav: #172033;
  --soft: #ece4d6;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  background: var(--nav);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}

.header-inner,
.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  min-width: 0;
}

.brand strong {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.brand span {
  color: #d8dfec;
  font-size: 0.88rem;
}

.ministry-link {
  color: #d8dfec;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ministry-link:hover {
  color: #fff;
  text-decoration: underline;
}

.top-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 650;
}

.top-nav a:hover,
.top-nav a.active {
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  padding: 42px 0 28px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255,253,248,0.94), rgba(255,253,248,0.78)),
    var(--soft);
}

.hero.compact {
  padding: 30px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  max-width: 780px;
  margin: 14px 0 0;
  color: #4b5563;
  font-size: 1.08rem;
}

.main {
  padding: 28px 0 52px;
}

.search-area {
  margin: 0 0 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(31, 36, 40, 0.04);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.search-results {
  margin-top: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(31, 36, 40, 0.08);
}

.search-results-title,
.search-empty {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  margin: 0;
}

.search-result {
  display: block;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.search-result:hover {
  background: #fbf5ea;
}

.search-result-title {
  display: block;
  font-weight: 850;
}

.search-result-meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.story-callout {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  padding: 14px 16px;
  background: #172033;
  color: #fff;
  border: 1px solid #2e3b55;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.14);
}

.story-callout:hover {
  background: #202c43;
}

.story-callout img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
}

.story-callout span {
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.25;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 36, 40, 0.04);
}

.card {
  display: block;
  padding: 18px;
  text-decoration: none;
}

.card:hover {
  border-color: #b8905a;
  box-shadow: 0 8px 24px rgba(31, 36, 40, 0.08);
}

.card h2,
.card h3,
.panel h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.card p,
.meta,
.empty {
  color: var(--muted);
  margin: 0;
}

.section-title {
  margin: 30px 0 12px;
  font-size: 1.2rem;
}

.resource-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.resource-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.resource-row:last-child {
  border-bottom: 0;
}

.resource-row:hover {
  background: #fbf5ea;
}

.file-icon {
  width: 28px;
  height: 28px;
  border: 2px solid #8f8b84;
  border-radius: 5px;
  position: relative;
}

.file-icon::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 10px;
  height: 10px;
  background: var(--panel);
  border-left: 2px solid #8f8b84;
  border-bottom: 2px solid #8f8b84;
}

.file-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 7px;
  height: 2px;
  background: #8f8b84;
  box-shadow: 0 -6px 0 #8f8b84;
}

.resource-title {
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.25;
}

.resource-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f0e4;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--accent-dark);
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 7px;
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.button.secondary {
  background: transparent;
  color: var(--accent-dark);
}

.outline {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: min(5vw, 34px);
  max-width: 900px;
}

.outline h1,
.outline h2,
.outline h3 {
  letter-spacing: 0;
}

.outline h1 {
  font-size: 2rem;
  margin: 0 0 20px;
}

.outline h2 {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.outline blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: #fbf5ea;
}

.outline ul {
  padding-left: 1.35rem;
}

.outline li {
  margin: 0.28rem 0;
}

.outline li > ul {
  margin-top: 0.3rem;
}

.outline code {
  background: #f1eadf;
  padding: 0.1em 0.3em;
  border-radius: 4px;
}

.story-page {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 980px;
}

.story-logo {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(31, 36, 40, 0.14);
}

.story-copy {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: min(5vw, 34px);
}

.story-copy h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.story-copy p {
  margin: 0 0 16px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--accent-dark);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .ministry-link {
    white-space: normal;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .story-callout {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .story-callout img {
    width: 58px;
    height: 58px;
  }

  .story-page {
    grid-template-columns: 1fr;
  }

  .resource-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .resource-row .pill {
    grid-column: 2;
    justify-self: start;
  }
}
