:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --ink: #17211a;
  --muted: #5e6b61;
  --line: #dce2d8;
  --accent: #2f7a4a;
  --accent-dark: #205a37;
  --gold: #b7832f;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 26px;
  font-size: 0.96rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  padding: 72px 0 42px;
  border-bottom: 1px solid var(--line);
}

.hero h1,
.content-page h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section,
.content-page {
  padding: 48px 0;
}

.section.compact {
  padding-top: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.topic-related-heading {
  margin-top: 34px;
}

.az-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 4px;
}

.az-bar a {
  display: grid;
  place-items: center;
  min-width: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.az-bar a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.az-letter {
  scroll-margin-top: 16px;
  margin: 30px 0 6px;
  font-size: 1.4rem;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-heading p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.card-media {
  display: block;
  margin: -22px -22px 16px;
  aspect-ratio: 16 / 9;
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero {
  max-width: 920px;
  margin: 24px 0 8px;
}

.page-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.source {
  font-size: 0.88rem;
}

.mini-facts {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}

.mini-facts div {
  display: grid;
  gap: 2px;
}

.mini-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-facts dd {
  margin: 0;
  font-size: 0.92rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.prose {
  max-width: 760px;
  margin-top: 30px;
  font-size: 1.05rem;
}

.prose h2 {
  margin-top: 34px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.faq {
  max-width: 760px;
  margin-top: 40px;
}

.faq h2 {
  font-size: 1.35rem;
}

.faq-list {
  margin: 18px 0 0;
}

.faq-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item dt {
  font-weight: 700;
}

.faq-item dd {
  margin: 8px 0 0;
  color: var(--muted);
}

.empty {
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 920px;
  margin: 32px 0 0;
}

.facts div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.facts dd {
  margin: 4px 0 0;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand-link {
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand-link strong {
  font-size: 1.05rem;
  color: var(--ink);
}

.footer-brand p {
  margin: 0;
  max-width: 34ch;
  font-size: 0.92rem;
  line-height: 1.5;
}

.footer-col h3 {
  margin: 4px 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.footer-bottom p {
  margin: 0;
}

.admin-page h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-toolbar span {
  color: var(--muted);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  background: #eef3eb;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td:nth-child(2) {
  max-width: 360px;
}

.admin-table small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-table p {
  margin: 6px 0 0;
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 4px 6px 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf6;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 750;
}

.status-pill.good {
  border-color: #b9d8c0;
  background: #edf8ef;
  color: #23633c;
}

.status-pill.warn {
  border-color: #e4c38b;
  background: #fff7e8;
  color: #80580e;
}

.status-pill.muted {
  color: var(--muted);
}

/* Tablet: ease 3-col grids down to 2 before they collapse to 1 on phones. */
@media (min-width: 761px) and (max-width: 1024px) {
  .grid.three {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .az-bar a {
    min-width: 40px;
    padding: 9px 10px;
  }

  .site-header {
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
    z-index: 40;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 11px 12px;
    border-radius: 8px;
  }

  .site-nav a:hover {
    background: var(--bg);
  }

  .grid.two,
  .grid.three,
  .facts {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
