/* ---------- Screen reader / accessibility utilities ---------- */

/* Visually hidden but accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip navigation link — visible only when focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #2d3b1f;
  color: #eef3e2;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background-color: #eef3e2;
  color: #2d3b1f;
  font-family: Georgia, 'Times New Roman', serif;
  /* Fluid font: 1rem at 320px → 1.15rem at 768px+ */
  font-size: clamp(1rem, 0.93rem + 0.36vw, 1.15rem);
  line-height: 1.75;
  overflow-x: hidden;
}

main {
  max-width: 680px;
  margin: 0 auto;
  /* Fluid horizontal padding: tighter on small screens, roomier on larger */
  padding: 0 clamp(0.75rem, 3vw, 1.5rem) 4rem;
}

/* ---------- Image cards ---------- */
.card {
  margin: 2rem 0;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* ---------- Text sections ---------- */
.text-section {
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(0.75rem, 3vw, 1.5rem);
}

.text-section p {
  margin-bottom: 1.25rem;
  /* Keep lines readable — no wider than ~65 characters */
  max-width: 60ch;
}

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

/* Bold text inside paragraphs gets the crimson accent */
.text-section strong {
  color: #a31545;
}

/* ---------- Section divider (mimics color bar at bottom of cards) ---------- */
.divider {
  display: flex;
  gap: clamp(3px, 1vw, 6px);
  padding: 0 clamp(0.75rem, 3vw, 1.5rem);
  margin: 0.5rem 0 2rem;
}

.divider span {
  height: clamp(6px, 1.5vw, 10px);
  border-radius: 3px;
  flex: 1;
}

.divider span:nth-child(1) { background: #6a8a3a; }
.divider span:nth-child(2) { background: #6a8a3a; }
.divider span:nth-child(3) { background: #6a8a3a; }
.divider span:nth-child(4) { background: #4a5c28; }
.divider span:nth-child(5) { background: #4a5c28; }
.divider span:nth-child(6) { background: #3a4a1e; }
.divider span:nth-child(7) { background: #2d3b1f; }

/* ---------- TK placeholder ---------- */
.tk {
  background: #ffeeba;
  color: #856404;
  padding: 0 4px;
  border-radius: 3px;
  font-style: italic;
  font-size: 0.9em;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  font-size: 0.85rem;
  color: #4a5c28;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

/* ---------- Data sources footnote ---------- */
.sources {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #4a5c28;
  display: inline-block;
}

.sources-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4a5c28;
  margin-bottom: 0.4rem;
}

.sources ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sources a {
  color: #4a5c28;
  text-decoration: none;
  border-bottom: 1px solid #4a5c2855;
  transition: border-color 0.2s;
}

.sources a:hover {
  border-bottom-color: #a31545;
  color: #a31545;
}

/* ---------- Responsive ---------- */

/* Large screens — add breathing room */
@media (min-width: 1200px) {
  main {
    max-width: 720px;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .card {
    margin: 1.5rem 0;
  }
}

/* Small phones */
@media (max-width: 400px) {
  body {
    line-height: 1.65;
  }

  .card {
    margin: 1rem 0;
  }

  .card img {
    border-radius: 2px;
  }

  footer {
    padding: 2rem 0.75rem 1.5rem;
  }
}
