:root {
  --zim-green: #009739;
  --zim-yellow: #fce500;
  --zim-red: #ef3038;
  --zim-black: #000000;
  --zim-white: #ffffff;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f6f8f7;
  color: #1f1f1f;
  line-height: 1.5;
}

.content-container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Header ─────────────────────────────────────── */

.site-header {
  background: var(--zim-white);
  border-bottom: 1px solid #e5e5e5;
}

.header-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.header-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1f1f1f;
  margin-bottom: 0;
}

.header-subtitle {
  font-size: 0.9rem;
  color: #555;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ── Disclaimer ──────────────────────────────────── */

.disclaimer {
  border: 1px solid #f0d88b;
  border-left: 4px solid var(--zim-red);
  background: #fff8d2;
}

.preamble-card {
  border: 1px solid #d6eadf;
  border-left: 4px solid var(--zim-green);
  border-radius: 0.65rem;
  background: #f5fbf7;
  padding: 1rem 1.1rem;
}

.preamble-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1b3d2c;
}

.preamble-toggle {
  border: 1.5px solid var(--zim-green);
  color: var(--zim-green);
  background: var(--zim-white);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.85rem;
}

.preamble-toggle:hover,
.preamble-toggle:focus {
  border-color: #0a6c34;
  color: #0a6c34;
  background: #edf8f0;
}

.preamble-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #2c2c2c;
  white-space: pre-wrap;
  text-align: center;
}

/* ── Search ──────────────────────────────────────── */

.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  z-index: 4;
}

.search-input {
  padding-left: 2.75rem;
  border-radius: 0.65rem;
  border: 1.5px solid #d0d0d0;
  background: var(--zim-white);
  min-height: 52px;
}

.search-input:focus {
  border-color: var(--zim-green);
  box-shadow: 0 0 0 0.2rem rgba(0, 151, 57, 0.15);
}

/* ── Suggested query chips ───────────────────────── */

.suggested-query {
  background: #edf8f0;
  color: #1a6637;
  border: 1px solid #c3e8d0;
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 0.3rem 0.85rem;
  transition: background 0.15s, border-color 0.15s;
}

.suggested-query:hover,
.suggested-query:focus {
  background: #d4f0df;
  border-color: var(--zim-green);
  color: #145428;
}

/* ── Chapter accordion ───────────────────────────── */

.chapter-item {
  border: 1px solid #e2e2e2;
  border-radius: 0.65rem !important;
  overflow: hidden;
  background: var(--zim-white);
}

.chapter-btn {
  background: var(--zim-white);
  min-height: 56px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: none !important;
  color: #1f1f1f;
}

.chapter-btn:not(.collapsed) {
  background: #f6faf7;
  color: var(--zim-green);
}

.chapter-btn::after {
  flex-shrink: 0;
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-radius: 50%;
  background: var(--zim-green);
  color: var(--zim-white);
  font-size: 0.8rem;
  font-weight: 700;
}

.chapter-title {
  flex: 1;
}

.chapter-summary {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
}

.chapter-full-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zim-green);
  text-decoration: none;
  border: 1.5px solid var(--zim-green);
  border-radius: 0.45rem;
  padding: 0.35rem 0.85rem;
  transition: background 0.15s;
}

.chapter-full-link:hover,
.chapter-full-link:focus {
  background: #edf8f0;
  color: #0a6c34;
  border-color: #0a6c34;
}

/* ── Search results section ──────────────────────── */

.section-tag {
  background: var(--zim-yellow);
  color: var(--zim-black);
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

/* ── Share row ───────────────────────────────────── */

.share-row a {
  text-decoration: none;
  margin-right: 0.75rem;
  color: #444;
}

.share-row a:hover,
.share-row a:focus {
  color: var(--zim-green);
}

/* ── Footer ──────────────────────────────────────── */

.site-footer {
  background: var(--zim-white);
  border-top: 1px solid #e5e5e5;
}

.footer-stripe {
  height: 5px;
  background: linear-gradient(
    to right,
    var(--zim-green) 25%,
    var(--zim-yellow) 25% 50%,
    var(--zim-red) 50% 75%,
    var(--zim-black) 75%
  );
}

.footer-tagline {
  font-size: 0.9rem;
  color: #444;
}

.footer-heart {
  font-style: normal;
}

.footer-support-btn {
  background: var(--zim-yellow);
  color: var(--zim-black);
  font-weight: 600;
  font-size: 0.72rem;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1.12rem;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  transition: background 0.15s, transform 0.1s;
}

.footer-support-btn:hover,
.footer-support-btn:focus {
  background: #e6cf00;
  color: var(--zim-black);
  transform: translateY(-1px);
}

.footer-legal {
  font-size: 0.8rem;
  color: #888;
}

/* ── Chapter page ────────────────────────────────── */

.chapter-page-header {
  border-left: 4px solid var(--zim-green);
  padding-left: 1rem;
}

.chapter-page-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--zim-green);
}

.chapter-page-title {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1.25;
}

.chapter-badge-lg {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  font-size: 1rem;
}

.section-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #444;
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.summary-card {
  background: #edf8f0;
  border: 1px solid #c3e8d0;
  border-left: 4px solid var(--zim-green);
  border-radius: 0.65rem;
  padding: 1.1rem 1.25rem;
  font-size: 0.975rem;
  line-height: 1.7;
  color: #1a3a28;
}

.section-text {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #333;
}

.section-text p {
  margin: 0 0 0.35rem 0;
}

.section-text p:last-child {
  margin-bottom: 0;
}

.section-indent-0 {
  padding-left: 0;
}

.section-indent-1 {
  padding-left: 1.6rem;
}

.section-indent-2 {
  padding-left: 3.2rem;
}

.section-annotation {
  padding-left: 1.6rem;
  font-size: 0.82rem;
  font-style: italic;
  color: #777;
}

.keywords-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.keyword-item {
  background: var(--zim-white);
  border: 1px solid #e2e2e2;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
}

.keyword-item dt {
  font-weight: 700;
  font-size: 0.925rem;
  color: #1f1f1f;
  margin-bottom: 0.2rem;
}

.keyword-item dd {
  font-size: 0.875rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

.back-arrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--zim-green);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.15s;
}

.back-arrow:hover,
.back-arrow:focus {
  color: #0a6c34;
}

.back-arrow i {
  margin-right: 0.25rem;
}

.chapter-back-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zim-green);
  border: 1.5px solid var(--zim-green);
  border-radius: 0.45rem;
  padding: 0.45rem 1rem;
  text-decoration: none;
  transition: background 0.15s;
}

.chapter-back-btn:hover,
.chapter-back-btn:focus {
  background: #edf8f0;
  color: #0a6c34;
  border-color: #0a6c34;
}

/* ── Mobile ──────────────────────────────────────── */

@media (max-width: 767.98px) {
  .btn,
  .form-control {
    min-height: 44px;
  }

  .chapter-btn {
    min-height: 52px;
  }

  .preamble-card {
    padding: 0.85rem 0.9rem;
  }

  .preamble-toggle {
    width: 100%;
  }
}
