@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* Base styles */
body {
  margin: 0;
  padding: 2rem;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #ffffff;
  color: #111827;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
}

body.dark-mode {
  background: #2C2C2C;
  color: #ffffff;
}

/* Headlines: tighter tracking site-wide */
h1, h2, h3,
.country-map-preview-title,
.genocide-title,
.gc-intro-title {
  letter-spacing: -0.02em;
}

body.dark-mode .content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  height: 100vh;
  box-sizing: border-box;
  pointer-events: none;
}
body.dark-mode .content h1,
body.dark-mode .content nav,
body.dark-mode .content a,
body.dark-mode .content .etsy-link {
  pointer-events: auto;
}

.home-darfur-link {
  margin-top: auto;
  padding-bottom: 2rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.home-darfur-link:hover {
  color: #fff;
}

/* Site title link: monochromatic, no underline (header h1 on index .content or .country-page-content on country pages) */
.content h1 a,
.country-page-content h1 a {
  color: inherit;
  text-decoration: none;
}
.content h1 a:hover,
.content h1 a:focus,
.country-page-content h1 a:hover,
.country-page-content h1 a:focus {
  color: inherit;
  text-decoration: none;
}

/* Homepage: no scroll — map is fixed, content fits in viewport */
body.dark-mode.home-page {
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
}
body.dark-mode.home-page .content {
  height: 100%;
  min-height: 0;
}

body.dark-mode .map-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* Homepage: fade in map when loaded to avoid white flash */
body.home-page .map-container {
  opacity: 0;
  transition: opacity 0.5s ease;
}
body.home-page .map-container.map-container--loaded {
  opacity: 1;
}

body.dark-mode #world-map {
  width: 100%;
  height: 100%;
}

.country-page-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  --country-page-max-width: 1200px;
}

/* Country pages: full-page background map – fade in when loaded to avoid white flash */
.country-page-bg-map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.country-page-bg-map.country-page-bg-map--loaded {
  opacity: 1;
}

.country-section-divider {
  width: 100%;
  max-width: var(--country-page-max-width, 1200px);
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem 0 1.5rem;
}

body.dark-mode .country-section-divider {
  border-top-color: #444;
}


.country-silhouette {
  width: 140px;
  height: auto;
  margin: 1.5rem 0 0.75rem;
  animation: silhouette-spectrum 44.8s linear infinite;
}

.country-silhouette--darfur {
  margin-left: 2rem;
}

@keyframes silhouette-spectrum {
  0%, 100%  { color: #FF3D3D; }
  6.25%     { color: #FF6B3D; }
  12.5%     { color: #FF8C3D; }
  18.75%    { color: #FFB03D; }
  25%       { color: #FFD03D; }
  31.25%    { color: #00D98A; }
  37.5%     { color: #00C5A9; }
  43.75%    { color: #00C5D9; }
  50%       { color: #008FD9; }
  56.25%    { color: #006FD9; }
  62.5%     { color: #5A5FD9; }
  68.75%    { color: #6A5FD9; }
  75%       { color: #8A5FD9; }
  81.25%    { color: #A55FD9; }
  87.5%     { color: #C85FD9; }
  93.75%    { color: #FF5FD9; }
}

@keyframes banner-spectrum {
  0%, 100%  { background-color: #FF3D3D; }
  6.25%     { background-color: #FF6B3D; }
  12.5%     { background-color: #FF8C3D; }
  18.75%    { background-color: #FFB03D; }
  25%       { background-color: #FFD03D; }
  31.25%    { background-color: #00D98A; }
  37.5%     { background-color: #00C5A9; }
  43.75%    { background-color: #00C5D9; }
  50%       { background-color: #008FD9; }
  56.25%    { background-color: #006FD9; }
  62.5%     { background-color: #5A5FD9; }
  68.75%    { background-color: #6A5FD9; }
  75%       { background-color: #8A5FD9; }
  81.25%    { background-color: #A55FD9; }
  87.5%     { background-color: #C85FD9; }
  93.75%    { background-color: #FF5FD9; }
}

.country-map-preview-title {
  font-size: 2.75rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
  text-shadow: none;
}

body.dark-mode .country-map-preview-title {
  color: #ffffff;
}

/* Country pages: simple banner button that launches full-screen map */
.country-map-banner {
  margin: 1.25rem 0 0 0;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: #FF3D3D;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  animation: banner-spectrum 44.8s linear infinite;
  transition: none;
}

.country-map-banner:hover {
  box-shadow: none;
}

.country-map-banners {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1.25rem;
}
.country-map-banners .country-map-banner {
  margin-top: 0;
}

.country-map-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.country-map-banner-text-main {
  display: block;
}

.country-map-banner-text-sub {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
}

body.dark-mode .country-map-banner {
  border: none;
  color: #ffffff;
}

body.dark-mode .country-map-banner:hover {
  box-shadow: none;
}

.country-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000000;
  display: none;
}

.country-map-overlay-open {
  display: block;
}

.country-map-overlay-inner {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.country-map-overlay-header {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #ffffff;
  pointer-events: none;
}

.country-map-overlay-controls {
  display: flex;
  gap: 0.4rem;
}

.country-map-overlay-button {
  pointer-events: auto;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.country-map-overlay-button:hover {
  background: rgba(0, 0, 0, 0.85);
}

.country-map-overlay-map {
  position: absolute;
  inset: 0;
}

.crisis-map-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
  max-width: 260px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.78);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
}

.crisis-popup {
  max-width: 260px;
}

.crisis-popup-title {
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.crisis-popup-subtitle {
  font-size: 0.8rem;
  color: #4b5563;
  margin-bottom: 0.35rem;
}

.crisis-popup-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #111827;
}

body.dark-mode .crisis-popup-title {
  color: #f3f4f6;
}

body.dark-mode .crisis-popup-subtitle {
  color: #9ca3af;
}

body.dark-mode .crisis-popup-body {
  color: #e5e7eb;
}

/* Crisis map: left-side info panel (Google Maps style) */
.crisis-info-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 400px;
  max-width: 85vw;
  z-index: 1;
  background: #ffffff;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  pointer-events: none;
}

.crisis-info-panel.crisis-info-panel-open {
  transform: translateX(0);
  pointer-events: auto;
}

.crisis-info-panel-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crisis-info-panel-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.crisis-info-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  padding-top: 3rem;
}

.crisis-info-panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #111827;
}

.crisis-info-panel-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.75rem;
}

.crisis-info-panel-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #374151;
}

/* Portrait people card in crisis panel – same look as region page (.people-card) */
.crisis-panel-people-card {
  display: block;
  margin-top: 1rem;
}

.crisis-panel-people-card.people-card {
  width: 220px;
  height: 340px;
  flex-shrink: 0;
}

.crisis-panel-article {
  padding: 0;
}

.crisis-panel-article-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #111827;
}

.crisis-panel-article-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #374151;
}

/* Consistent vertical space between all blocks (works with any HTML structure / nesting) */
.crisis-panel-article-body p,
.crisis-panel-article-body figure,
.crisis-panel-article-body h1,
.crisis-panel-article-body h2,
.crisis-panel-article-body h3,
.crisis-panel-article-body div {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.crisis-panel-article-body > *:first-child {
  margin-top: 0;
}

.crisis-panel-article-body > *:last-child {
  margin-bottom: 0;
}

/* Images inside paragraphs (e.g. CMS output) get their own space */
.crisis-panel-article-body p img {
  display: block;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.crisis-panel-article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 0;
  border-radius: 6px;
  background: transparent;
}

.crisis-panel-article-body figure {
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  background: transparent;
}

/* Neutralize responsive aspect-ratio wrappers (padding-bottom % hack) from CMS/embeds */
.crisis-panel-article-body div:has(> img:only-child) {
  padding: 0 !important;
  height: auto !important;
  position: static !important;
}
.crisis-panel-article-body div:has(> img:only-child) img {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  top: auto !important;
  left: auto !important;
}

/* Getty embeds in panel: hide caption line, fix aspect-ratio box, no white background */
.crisis-panel-article-body .article-embed.getty-embed,
.crisis-panel-article-body .getty-embed .getty.embed.image {
  background: transparent !important;
  display: block !important;
  margin-bottom: 0 !important;
  line-height: 0 !important;
  vertical-align: top !important;
}
.crisis-panel-article-body .getty-embed .getty.embed.image * {
  line-height: 0 !important;
}
/* Hide "Embed from Getty Images" caption (first div inside Getty block) */
.crisis-panel-article-body .getty-embed .getty.embed.image > div:first-child {
  display: none !important;
}
/* Replace padding-bottom % hack with aspect-ratio so no weird gap */
.crisis-panel-article-body .getty-embed div:has(> iframe) {
  padding: 0 !important;
  height: auto !important;
  aspect-ratio: 594 / 396 !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  line-height: 0 !important;
}
.crisis-panel-article-body .getty-embed div:has(> iframe) iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
/* Margin on Getty block – extra bottom to match space below paragraphs */
.crisis-panel-article-body .article-embed.getty-embed {
  margin-top: 1rem !important;
  margin-bottom: 1.5rem !important;
}

/* Same Getty cleanup in article modal (people articles) */
.article-modal-body .article-embed.getty-embed,
.article-modal-body .getty-embed .getty.embed.image {
  background: transparent !important;
  display: block !important;
  margin-bottom: 0 !important;
  line-height: 0 !important;
  vertical-align: top !important;
}
.article-modal-body .getty-embed .getty.embed.image * {
  line-height: 0 !important;
}
.article-modal-body .getty-embed .getty.embed.image > div:first-child {
  display: none !important;
}
.article-modal-body .getty-embed div:has(> iframe) {
  padding: 0 !important;
  height: auto !important;
  aspect-ratio: 594 / 396 !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  line-height: 0 !important;
}
.article-modal-body .getty-embed div:has(> iframe) iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.crisis-panel-article-body h1,
.crisis-panel-article-body h2,
.crisis-panel-article-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.crisis-panel-article-body h1:first-child,
.crisis-panel-article-body h2:first-child,
.crisis-panel-article-body h3:first-child {
  margin-top: 0;
}

body.dark-mode .crisis-panel-article-title {
  color: #f3f4f6;
}

body.dark-mode .crisis-panel-article-body {
  color: #d1d5db;
}

body.dark-mode .crisis-info-panel {
  background: #252525;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .crisis-info-panel-close {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

body.dark-mode .crisis-info-panel-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

body.dark-mode .crisis-info-panel-title {
  color: #f3f4f6;
}

body.dark-mode .crisis-info-panel-subtitle {
  color: #9ca3af;
}

body.dark-mode .crisis-info-panel-body {
  color: #d1d5db;
}

/* Crisis map popup (MapLibre) in dark mode: dark panel and tip */
body.dark-mode .country-map-overlay .maplibregl-popup-content {
  background: #222222;
  color: #e5e7eb;
}

body.dark-mode .country-map-overlay .maplibregl-popup-tip {
  border-top-color: #222222;
  border-bottom-color: #222222;
}

body.dark-mode .country-map-overlay .maplibregl-popup-close-button {
  color: #e5e7eb;
  font-size: 1.25rem;
}

body.dark-mode .country-map-overlay .maplibregl-popup-close-button:hover {
  color: #fff;
}

/* Crisis map: loading indicator (spinning map-pin with warm color bounce) */
.crisis-map-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.crisis-map-loader svg {
  width: 32px;
  height: 32px;
  animation:
    crisis-loader-spin 2.4s linear infinite,
    crisis-loader-warmth 3s ease-in-out infinite;
}

.crisis-map-loader-done {
  opacity: 0;
  pointer-events: none;
}

@keyframes crisis-loader-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes crisis-loader-warmth {
  0%, 100% { color: #FF3D3D; }
  25%      { color: #FF6B3D; }
  50%      { color: #FF8C3D; }
  75%      { color: #FFD03D; }
}

/* Crisis map: group legend (filter control) */
.crisis-legend {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  pointer-events: auto;
}

.crisis-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  transition: opacity 0.2s;
  user-select: none;
}

.crisis-legend-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.crisis-legend-has-selection .crisis-legend-item {
  opacity: 0.4;
}

.crisis-legend-has-selection .crisis-legend-item-selected {
  opacity: 1;
}

.crisis-legend-item-selected .crisis-legend-label {
  font-weight: 600;
}

.crisis-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crisis-legend-label {
  font-size: 0.75rem;
  color: #e5e7eb;
  line-height: 1;
}

/* Homepage: country name on hover over Congo/Sudan */
.map-container {
  position: relative;
}
.map-country-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  white-space: normal;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.22s ease-in-out;
  z-index: 5;
}
.map-country-label.map-country-label-visible {
  opacity: 1;
}

body.dark-mode .etsy-link {
  margin-top: auto;
  margin-bottom: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
  max-width: 800px;
}

body.dark-mode .thumbnail-maps {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

body.dark-mode .thumbnail-maps a {
  text-decoration: none;
  display: block;
}

body.dark-mode .thumbnail-map {
  width: 120px;
  height: 185px; /* 11x17 ratio */
  border: 1px solid #444444;
  position: relative;
  cursor: pointer;
}

body.dark-mode .etsy-text {
  flex: 1;
}

body.dark-mode .etsy-text h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

body.dark-mode .etsy-text h2 a {
  color: #ffffff;
  text-decoration: none;
}

body.dark-mode .etsy-text p {
  margin: 0;
  color: #d1d5db;
  font-size: 0.9rem;
}

/* Navigation */
nav {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}


nav a {
  color: #111827;
  text-decoration: none;
  margin: 0 1rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

body.dark-mode nav a {
  color: #ffffff;
}

nav a:hover {
  border-bottom-color: #111827;
}

body.dark-mode nav a:hover {
  border-bottom-color: #ffffff;
}

nav a.active {
  border-bottom-color: #111827;
  font-weight: 500;
}

body.dark-mode nav a.active {
  border-bottom-color: #ffffff;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  body.dark-mode .content {
    padding: 0;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  nav {
    margin-bottom: 1rem;
  }

  nav a {
    margin: 0 0.5rem;
    font-size: 0.9rem;
    padding: 0.25rem 0;
  }

  body.dark-mode .etsy-link {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  body.dark-mode .thumbnail-maps {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.75rem;
  }

  body.dark-mode .content {
    padding: 0;
  }

  h1 {
    font-size: 1.25rem;
  }

  nav a {
    margin: 0 0.25rem;
    font-size: 0.8rem;
  }
}

/* Posters container */
.posters-container {
  display: grid;
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  padding: 0 1rem;
  /* 1 column by default */
  grid-template-columns: 1fr;
  max-width: 350px;
  margin: 0 auto;
}

/* 2 columns on medium screens */
@media (min-width: 800px) {
  .posters-container {
    grid-template-columns: repeat(2, 300px);
    max-width: 700px;
  }
}

/* 4 columns on large screens */
@media (min-width: 1400px) {
  .posters-container {
    grid-template-columns: repeat(4, 300px);
    max-width: 1400px;
  }
}

.poster-wrapper {
  position: relative;
  display: inline-block;
}

.poster-wrapper:hover .download-btn {
  opacity: 1;
}

.poster {
  width: 300px;
  height: 464px; /* 11x17 ratio: 300 * (17/11) = 464px */
  border: 1px solid #e5e7eb;
  position: relative;
}

.crossfade-wrapper {
  position: relative;
  width: 300px;
  height: 464px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.crossfade-map-layer {
  position: absolute;
  inset: 0;
  transition: opacity 2.8s ease;
}

.crossfade-map-div {
  width: 100%;
  height: 100%;
}

.download-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #111827;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-btn:hover {
  background: #1f2937;
}

.download-btn:active {
  background: #374151;
}

.download-btn svg {
  width: 20px;
  height: 20px;
}

/* Article section */
.article-section {
  max-width: 600px;
  margin: 4rem auto;
  padding: 0 2rem;
}

/* When section contains people cards, allow full width for grid and center it */
.article-section:has(.people-cards-container) {
  max-width: none;
  padding: 0 1rem;
  margin: 1rem auto;
}

.article-section h1,
.article-section h2,
.article-section h3 {
  margin: 2.5rem 0 1.5rem 0;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}

body.dark-mode .article-section h1,
body.dark-mode .article-section h2,
body.dark-mode .article-section h3 {
  color: #ffffff;
}

.article-section h1 {
  font-size: 2.5rem;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  margin: 2.5rem 0 1.5rem 0;
  display: inline-block;
}

body.dark-mode .article-section h1 {
  border-color: #444;
  background: #2d2d2d;
}

.article-section h2 {
  font-size: 2rem;
}

.article-section h3 {
  font-size: 1.5rem;
}

.article-section p,
.article-section p[style] {
  margin: 2rem 0 !important;
  line-height: 2.0 !important;
  color: #374151 !important;
  font-size: 1.125rem !important;
}

body.dark-mode .article-section p,
body.dark-mode .article-section p[style] {
  color: #d1d5db !important;
}

.article-section img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  display: block;
}

/* Embeds (Getty, iframes) */
.article-section .article-embed {
  margin: 2rem 0;
}

.article-section .article-embed iframe,
.article-section iframe {
  max-width: 100%;
  display: block;
}

.article-section .gie-single {
  max-width: 100%;
}

.article-section:empty {
  display: none;
}

/* Video section (country pages – one embed, prev/next with history) */
.video-section {
  max-width: 700px; /* at least as wide as two card columns (300px * 2 + gap) */
  margin: 4rem auto;
  padding: 0 2rem;
}

@media (min-width: 700px) {
  .video-section {
    min-width: 624px;
  }
}

.video-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  color: #111827;
  text-align: center;
}

body.dark-mode .video-section h2 {
  color: #ffffff;
}

.video-section-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #000;
  border-radius: 0.5rem;
  overflow: hidden;
  outline: none;
}

.video-section-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  display: block;
}

.video-section-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.video-section-thumbs-wrap {
  overflow: hidden;
  width: 100%;
  max-width: 724px; /* 6 * 114px + 5 * 8px gap */
  border-radius: 0.375rem;
}

.video-section-thumbs {
  display: flex;
  gap: 0.5rem;
  transition: transform 0.25s ease;
  will-change: transform;
}

.video-thumb {
  flex-shrink: 0;
  width: 114px;
  height: 64px;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  overflow: hidden;
  background: #111;
  display: block;
  position: relative;
}

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

.video-thumb.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #DC2626;
  border-radius: 0 0 0.375rem 0.375rem;
}

body.dark-mode .video-thumb.is-active::after {
  background: #F87171;
}

/* Sleek icon-only buttons, same style as modal close */
.video-section-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.15s, color 0.15s;
}

.video-section-btn:hover:not(:disabled) {
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
}

.video-section-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-section-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

body.dark-mode .video-section-btn {
  background: rgba(45, 45, 45, 0.5);
  color: #d1d5db;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.dark-mode .video-section-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(60, 60, 60, 0.7);
}

.video-section-page-btn {
  flex-shrink: 0;
}

/* Gallery section (Supabase Storage – e.g. Darfur on Sudan page) */
.gallery-section {
  width: 100%;
  max-width: var(--country-page-max-width, 1200px);
  margin: 4rem auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 220px));
  gap: 0.75rem;
  justify-content: center;
}

/* Small mobile: 2 columns (never single column); responds down to narrow screens */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0;
  padding: 1rem;
}

body.dark-mode .gallery-empty {
  color: #9ca3af;
}

.gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #111;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.gallery-item:hover img {
  opacity: 0.9;
}

/* Wrapper so we can mask the bottom of the grid (partial next row fades out) */
.gallery-grid-wrap {
  position: relative;
}

.gallery-section:has(.gallery-more) .gallery-grid-wrap {
  mask-image: linear-gradient(to bottom, black 0, black calc(100% - 140px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0, black calc(100% - 140px), transparent 100%);
}

.gallery-more {
  margin-top: -80px; /* overlap the faded area so button sits in the fade zone */
  padding: 4rem 0 1.5rem;
  background: var(--gallery-fade-bg, #fff);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

body.dark-mode .gallery-more {
  --gallery-fade-bg: #2C2C2C;
}

.gallery-view-all-btn {
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: #FF3D3D;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.15s;
}

.gallery-view-all-btn:hover {
  opacity: 0.9;
}

body.dark-mode .gallery-view-all-btn {
  background: #FF3D3D;
  color: #ffffff;
}

.gallery-sentinel {
  height: 1px;
  visibility: hidden;
  pointer-events: none;
}

/* Gallery full-size modal (left/right arrows, close) */
.gallery-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
  outline: none;
}

.gallery-modal-overlay.gallery-modal-open {
  visibility: visible;
  opacity: 1;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  cursor: pointer;
}

.gallery-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1;
  gap: 0;
}
@media (min-width: 640px) {
  .gallery-modal-box {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }
}

.gallery-modal-image-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 95vh;
}
@media (min-width: 640px) {
  .gallery-modal-image-nav {
    max-width: min(75vw, 900px);
  }
}

/* Swiss / MoMA-style caption: minimal, quiet, generous space */
.gallery-modal-caption {
  flex-shrink: 0;
  max-width: 22rem;
  padding: 1.25rem 0 0;
  text-align: left;
}
@media (min-width: 640px) {
  .gallery-modal-caption {
    padding: 0 0 0 0.5rem;
    max-width: 20rem;
  }
}
.gallery-modal-caption-text,
.gallery-modal-caption-location,
.gallery-modal-caption-credit {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  font-weight: 400;
  color: #6b7280;
  letter-spacing: 0.01em;
}
.gallery-modal-caption-text {
  margin-bottom: 0.5rem;
  color: #374151;
  white-space: pre-line;
}
.gallery-modal-caption-location {
  margin-bottom: 0.25rem;
}
.gallery-modal-caption-credit {
  font-size: 0.75rem;
  color: #9ca3af;
}
body.dark-mode .gallery-modal-caption-text {
  color: #e5e7eb;
}
body.dark-mode .gallery-modal-caption-location,
body.dark-mode .gallery-modal-caption-credit {
  color: #9ca3af;
}
body.dark-mode .gallery-modal-caption-credit {
  color: #6b7280;
}

.gallery-modal-image-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.gallery-modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #374151;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.gallery-modal-close:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #111827;
}

body.dark-mode .gallery-modal-close {
  background: rgba(45, 45, 45, 0.5);
  color: #d1d5db;
}

body.dark-mode .gallery-modal-close:hover {
  color: #fff;
  background: rgba(60, 60, 60, 0.7);
}

.gallery-modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #374151;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.15s, color 0.15s, opacity 0.2s;
  opacity: 0;
}

.gallery-modal-image-nav:hover .gallery-modal-arrow {
  opacity: 1;
}

.gallery-modal-arrow:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #111827;
}

body.dark-mode .gallery-modal-arrow {
  background: rgba(45, 45, 45, 0.5);
  color: #d1d5db;
}

body.dark-mode .gallery-modal-arrow:hover {
  color: #fff;
  background: rgba(60, 60, 60, 0.7);
}

.gallery-modal-prev {
  left: 1rem;
}

.gallery-modal-next {
  right: 1rem;
}

.gallery-modal-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Touch devices: hide arrows, user swipes instead */
@media (hover: none) {
  .gallery-modal-open .gallery-modal-arrow {
    display: none;
  }
}

.gallery-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Donate section (country pages – under the cards) */
.donate-section {
  max-width: 600px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.donate-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  color: #111827;
  text-align: center;
}

body.dark-mode .donate-section h2 {
  color: #ffffff;
}

.donate-section .donate-intro {
  color: #6b7280;
  font-size: 1rem;
  margin: 0 0 1.25rem 0;
  line-height: 1.5;
}

body.dark-mode .donate-section .donate-intro {
  color: #9ca3af;
}

.donate-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.donate-list li {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}

.donate-list a {
  display: inline-block;
  color: #DC2626;
  text-decoration: none;
  font-size: 1.0625rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.donate-list a:hover {
  border-bottom-color: #DC2626;
  color: #B91C1C;
}

body.dark-mode .donate-list a {
  color: #F87171;
}

body.dark-mode .donate-list a:hover {
  color: #FCA5A5;
  border-bottom-color: #F87171;
}

.donate-list .donate-featured {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

body.dark-mode .donate-list .donate-featured {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.donate-list .donate-featured a {
  font-weight: 600;
  font-size: 1.125rem;
}

/* Intro line above people cards (Congo / Sudan) – cycles through spectrum, starts orange */
@keyframes people-intro-spectrum {
  0%, 100% {
    color: #c2410c;
    background: #fff7ed;
    border-color: #fdba74;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.15);
  }
  16.67% {
    color: #a16207;
    background: #fefce8;
    border-color: #fde047;
    box-shadow: 0 1px 3px rgba(202, 138, 4, 0.15);
  }
  33.33% {
    color: #047857;
    background: #d1fae5;
    border-color: #6ee7b7;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.15);
  }
  50% {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #5eead4;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.15);
  }
  66.67% {
    color: #0e7490;
    background: #cffafe;
    border-color: #67e8f9;
    box-shadow: 0 1px 3px rgba(14, 116, 144, 0.15);
  }
  83.33% {
    color: #0369a1;
    background: #e0f2fe;
    border-color: #7dd3fc;
    box-shadow: 0 1px 3px rgba(3, 105, 161, 0.15);
  }
}
@keyframes people-intro-spectrum-dark {
  0%, 100% {
    color: #fdba74;
    background: rgba(234, 88, 12, 0.2);
    border-color: #ea580c;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
  16.67% {
    color: #fde047;
    background: rgba(202, 138, 4, 0.2);
    border-color: #ca8a04;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
  33.33% {
    color: #6ee7b7;
    background: rgba(5, 150, 105, 0.2);
    border-color: #059669;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
  50% {
    color: #5eead4;
    background: rgba(15, 118, 110, 0.2);
    border-color: #0f766e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
  66.67% {
    color: #67e8f9;
    background: rgba(14, 116, 144, 0.2);
    border-color: #0e7490;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
  83.33% {
    color: #7dd3fc;
    background: rgba(3, 105, 161, 0.2);
    border-color: #0369a1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
}
.people-cards-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem auto 1.5rem;
  padding: 0.6rem 1rem;
  max-width: 420px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid;
  border-radius: 10px;
  animation: people-intro-spectrum 28s ease-in-out infinite;
}
.people-cards-intro-icon,
.people-cards-intro svg {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  color: inherit;
  stroke: currentColor;
}
body.dark-mode .people-cards-intro {
  animation: people-intro-spectrum-dark 28s ease-in-out infinite;
}
body.dark-mode .people-cards-intro-icon,
body.dark-mode .people-cards-intro svg {
  color: inherit;
  stroke: currentColor;
}

/* Skeleton loading (shimmer) */
@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.people-card-skeleton {
  width: 220px;
  height: 340px;
  border-radius: 12px;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.people-card-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

body.dark-mode .people-card-skeleton {
  background: #404040;
}

body.dark-mode .people-card-skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.gallery-item-skeleton {
  aspect-ratio: 4 / 3;
  border-radius: 0.5rem;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
}

.gallery-item-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

body.dark-mode .gallery-item-skeleton {
  background: #404040;
}

body.dark-mode .gallery-item-skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.video-section-player-skeleton {
  display: block;
  position: absolute;
  inset: 0;
  background: #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.video-section-player-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.video-section-player:not(.video-section-player--loaded) .video-section-player-skeleton {
  display: block;
}

.video-section-player.video-section-player--loaded .video-section-player-skeleton {
  display: none;
}

body.dark-mode .video-section-player-skeleton {
  background: #404040;
}

body.dark-mode .video-section-player-skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

/* People cards: flexbox so the group is always centered; fixed card size + gap for 1–5 columns */
.people-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: var(--country-page-max-width, 1200px);
  margin: 1rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.people-card {
  position: relative;
  width: 220px;
  height: 340px; /* 11x17 ratio: 220 * (17/11) */
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.05);
}

/* Hide until map/SVG is attached to avoid red flash; fade in when ready */
.people-cards-container .people-card:not(.people-card-has-map) {
  opacity: 0;
  pointer-events: none;
}
body.dark-mode .people-cards-container .people-card:not(.people-card-has-map) {
  background: #383838;
  border-color: #4a4a4a;
  color: #fff;
}
.people-cards-container .people-card.people-card-has-map {
  opacity: 1;
}

.people-card-map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
}

.people-card-svg-bg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.people-card-territory-svg {
  width: 70%;
  height: 70%;
  opacity: 0.18;
  animation: card-territory-spectrum 44.8s linear infinite;
}

body.dark-mode .people-card-territory-svg {
  opacity: 0.25;
}

@keyframes card-territory-spectrum {
  0%, 100%  { color: #FF3D3D; }
  6.25%     { color: #FF6B3D; }
  12.5%     { color: #FF8C3D; }
  18.75%    { color: #FFB03D; }
  25%       { color: #FFD03D; }
  31.25%    { color: #00D98A; }
  37.5%     { color: #00C5A9; }
  43.75%    { color: #00C5D9; }
  50%       { color: #008FD9; }
  56.25%    { color: #006FD9; }
  62.5%     { color: #5A5FD9; }
  68.75%    { color: #6A5FD9; }
  75%       { color: #8A5FD9; }
  81.25%    { color: #A55FD9; }
  87.5%     { color: #C85FD9; }
  93.75%    { color: #FF5FD9; }
}

.people-card-label {
  position: relative;
  z-index: 1;
}

.people-card:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.1);
}


body.dark-mode .people-card {
  background: #383838;
  border-color: #4a4a4a;
  color: #fff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

body.dark-mode .people-card:hover {
  background: #424242;
  border-color: #5a5a5a;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.2);
}


/* Article modal */
.article-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
}

.article-modal-overlay.article-modal-open {
  visibility: visible;
  opacity: 1;
}

.article-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.article-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.article-modal-header {
  flex-shrink: 0;
  position: relative;
  height: 0;
  min-height: 0;
  background: transparent;
}

.article-modal-box .article-modal-body {
  flex: 1;
  overflow: auto;
  padding: 3rem 2.75rem 2rem 2rem;
}

body.dark-mode .article-modal-box {
  background: #1a1a1a;
  color: #fff;
}

.article-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.article-modal-close:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
}

body.dark-mode .article-modal-close {
  background: rgba(45, 45, 45, 0.5);
  color: #d1d5db;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.dark-mode .article-modal-close:hover {
  color: #fff;
  background: rgba(60, 60, 60, 0.7);
}

.article-modal-body {
  margin: 0;
  padding: 0;
  max-width: none;
}

/* One consistent gap only between direct children (no nested div margin) */
.article-modal-body > * {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.article-modal-body > *:first-child {
  margin-top: 0;
}

.article-modal-body > *:last-child {
  margin-bottom: 0;
}

.article-modal-body p img {
  display: block;
  margin-top: 1rem;
  margin-bottom: 2rem !important;
}

.article-modal-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
  margin-bottom: 2rem !important;
  padding: 0;
  border-radius: 6px;
  background: transparent;
}

.article-modal-body figure {
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  background: transparent;
}

/* Zero internal spacing inside Getty so only the block gets one gap from > * */
.article-modal-body .getty-embed * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* Extra bottom margin after images/embeds so space below matches paragraph spacing */
.article-modal-body .article-embed.getty-embed {
  margin-bottom: 2rem !important;
}

/* Neutralize aspect-ratio padding hack on image wrappers in modal */
.article-modal-body div:has(> img:only-child) {
  padding: 0 !important;
  height: auto !important;
  position: static !important;
}
.article-modal-body div:has(> img:only-child) img {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  top: auto !important;
  left: auto !important;
}

/* Section title in modal: no card frame (the modal is the card) */
.article-modal-body h1 {
  border-radius: 0;
  padding: 0;
  border: none;
  background: transparent;
  display: block;
}

body.dark-mode .article-modal-body h1 {
  border: none;
  background: transparent;
}

@media (max-width: 600px) {
  .article-modal-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .article-modal-box {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) calc(1rem + env(safe-area-inset-left, 0px));
  }

}

@media (max-width: 768px) {
  .article-section {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .article-section h1 {
    font-size: 2rem;
  }

  .article-section h2 {
    font-size: 1.75rem;
  }

  .article-section h3 {
    font-size: 1.25rem;
  }
}

/* ——— Darfur genocide page ——— */
.country-map-banner--genocide {
  margin: 0;
  background: #FF4B1D !important;
  animation: none;
  text-decoration: none;
}
.country-map-banner--genocide:hover {
  background: #ff5c2e !important;
}
body.dark-mode .country-map-banner--genocide {
  background: #FF4B1D !important;
  color: #ffffff;
}
body.dark-mode .country-map-banner--genocide:hover {
  background: #ff5c2e !important;
}

/* Genocide page: full-viewport split layout — override base body flex/padding */
body.genocide-body {
  padding: 0;
  display: block;
  align-items: stretch;
  overflow: hidden;
  height: 100vh;
}

.genocide-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 1.5rem;
  pointer-events: none;
}
.genocide-topbar a {
  pointer-events: auto;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.genocide-topbar a:hover { color: #fff; }
.genocide-topbar a.genocide-title {
  color: #fff;
  font-weight: 700;
}
.genocide-topbar a.genocide-title:hover {
  color: #fff;
}
.genocide-topbar-home {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  justify-self: start;
  align-self: start;
  margin-top: 0.25rem;
}
.genocide-topbar-about {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  justify-self: end;
  grid-column: 3;
  align-self: start;
  margin-top: 0.25rem;
}
/* Title: same size/look/position as Maps for Humanity logo on other pages */
.genocide-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  justify-self: center;
  pointer-events: auto;
  text-decoration: none;
  transition: opacity 0.15s;
}
.genocide-title:hover {
  opacity: 1;
}

.genocide-topbar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
  pointer-events: auto;
  margin-top: 0.35rem;
}
.genocide-view-toggle {
  display: flex;
  gap: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.genocide-view-toggle[aria-hidden="true"] {
  display: none;
}
.gc-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.gc-view-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}
.gc-view-btn:hover {
  color: rgba(255, 255, 255, 0.95);
}
.gc-view-btn.gc-view-active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Cards grid view */
.genocide-content.gc-view-cards .genocide-carousel {
  display: none;
}
.genocide-cards-grid {
  display: none;
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}
body.gc-cards-view .genocide-map {
  visibility: hidden;
}
body.gc-cards-view {
  overflow: auto;
  height: auto;
  min-height: 100vh;
}
body.gc-cards-view .genocide-content {
  position: relative;
  inset: auto;
  min-height: 100vh;
  background: #0d0d0d;
  align-items: stretch;
  padding: calc(7rem + 1.5rem) 4rem 4rem 4rem;
  overflow: visible;
}
body.gc-cards-view .genocide-content::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 7rem;
  background: linear-gradient(to bottom, #0d0d0d 0%, rgba(13, 13, 13, 0.85) 50%, transparent 100%);
  pointer-events: none;
  z-index: 15;
}
.genocide-content.gc-view-cards .genocide-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 320px);
  grid-auto-rows: 280px;
  gap: 1.5rem;
  align-content: start;
  justify-content: center;
  grid-auto-flow: row;
  align-self: stretch;
  max-width: 100%;
}
.genocide-cards-grid .gc-grid-card-wrap {
  width: 320px;
  height: 280px;
  overflow: hidden;
}
.genocide-cards-grid .gc-grid-card {
  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  height: 280px !important;
  min-height: 280px !important;
  cursor: pointer;
  box-sizing: border-box;
  padding: 1.5rem 1.25rem;
}
.genocide-cards-grid .gc-grid-card .gc-expand {
  margin-top: auto;
}
.genocide-cards-grid .gc-grid-card .gc-title {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
}
.genocide-cards-grid .gc-grid-card .gc-impact {
  font-size: 1.75rem;
}
.genocide-cards-grid .gc-grid-card .gc-impact-desc {
  font-size: 0.9rem;
  min-height: 2.75rem;
}
.genocide-cards-grid .gc-grid-card .gc-entity {
  font-size: 0.7rem;
}
.genocide-cards-grid .gc-grid-card .gc-flag {
  font-size: 1.4rem;
}
@media (min-width: 900px) {
  .genocide-content.gc-view-cards .genocide-cards-grid {
    grid-template-columns: repeat(auto-fill, 440px);
    grid-auto-rows: 280px;
  }
  .genocide-cards-grid .gc-grid-card-wrap {
    width: 440px;
  }
  .genocide-cards-grid .gc-grid-card {
    width: 440px !important;
    min-width: 440px !important;
    max-width: 440px !important;
    padding: 2.5rem 2rem;
  }
  .genocide-cards-grid .gc-grid-card .gc-title {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }
  .genocide-cards-grid .gc-grid-card .gc-impact {
    font-size: 2.5rem;
  }
  .genocide-cards-grid .gc-grid-card .gc-impact-desc {
    font-size: 1.15rem;
    min-height: 3.5rem;
  }
  .genocide-cards-grid .gc-grid-card .gc-entity {
    font-size: 0.8rem;
  }
  .genocide-cards-grid .gc-grid-card .gc-flag {
    font-size: 1.75rem;
  }
}

/* Card modal */
.genocide-card-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.genocide-card-modal[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}
.genocide-card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}
.genocide-card-modal-header {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}
.genocide-card-modal-header .country-map-overlay-button {
  pointer-events: auto;
}
.genocide-card-modal-content {
  position: relative;
  z-index: 1;
  width: 440px;
  max-width: calc(100vw - 4rem);
  flex-shrink: 0;
  padding: 0;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Full-screen map behind everything */
.genocide-map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.genocide-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: opacity 0.9s ease-out;
}
.genocide-map-overlay.gc-overlay-fade-out {
  opacity: 0;
}

.genocide-intro {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 4rem 8rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.8s ease-out;
}
.genocide-intro.gc-intro-fade-out {
  opacity: 0;
  pointer-events: none;
}
.genocide-intro .gc-intro {
  pointer-events: auto;
  max-width: 540px;
  flex-shrink: 0;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}
#genocide-map-label {
  position: fixed;
  z-index: 10;
}

/* Content overlay — left side */
.genocide-content {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 3.5rem 0 2rem 4rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.8s ease-out 0.3s;
}
.genocide-content.gc-content-fade-in {
  opacity: 0;
}
.genocide-content.gc-content-visible {
  opacity: 1;
}
.genocide-content .genocide-carousel,
.genocide-content a,
.genocide-content button {
  pointer-events: auto;
}
.genocide-content .genocide-carousel {
  flex-shrink: 0;
  margin-top: auto;
}

/* Carousel: card on top, nav below — fixed width so nav stays centered */
.genocide-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 440px;
  max-width: 100%;
}

.genocide-carousel-nav {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

/* Genocide card — same premium look as people cards */
.genocide-card {
  position: relative;
  width: 440px;
  min-height: 0;
  background: #2d2d2d;
  border: 1px solid #3d2520;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.15);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.25s ease;
}

.genocide-card:hover {
  background: #2a2a2a;
  border-color: #4a3028;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

.genocide-card.gc-card-expanded {
  min-height: 600px;
}

.genocide-card.gc-card-has-bg {
  background-color: #2d2d2d;
}
.genocide-card.gc-card-bg-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  background: linear-gradient(90deg, #2a2a2a 0%, #333 25%, #363636 50%, #333 75%, #2a2a2a 100%);
  background-size: 200% 100%;
  animation: gc-card-bg-skeleton 1.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gc-card-bg-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.genocide-card.gc-card-bg-loaded::before {
  content: "";
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  background-image: var(--gc-card-bg-image);
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
  filter: grayscale(100%);
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.genocide-card.gc-card-bg-loaded.gc-card-collapsed::before {
  -webkit-mask-image: none;
  mask-image: none;
  background-size: cover;
  background-position: center;
}
.genocide-card.gc-card-bg-loaded.gc-card-expanded::before {
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  background-size: 100% auto;
  background-position: top center;
}
.genocide-card.gc-card-has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0.5;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 25%), rgba(220, 45, 45, 0.95);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.genocide-card.gc-card-has-bg.gc-card-expanded::after {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 25%), linear-gradient(to bottom, transparent 0%, #2d2d2d 60%, #2d2d2d 100%), rgba(220, 45, 45, 0.95);
}
.genocide-card.gc-card-has-bg .gc-share,
.genocide-card.gc-card-has-bg .gc-minimize {
  z-index: 2;
}
.genocide-card.gc-card-has-bg > *:not(.gc-share):not(.gc-minimize):not(.gc-card-red-tint) {
  position: relative;
  z-index: 1;
}
.genocide-card.gc-card-has-bg:hover {
  background-color: #353535;
  border-color: #4a3028;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.2);
}
/* Eyebrow and down arrow: opaque when card has bg so they don't get lost on image */
.genocide-card.gc-card-has-bg.gc-card-collapsed .gc-title {
  color: rgba(255, 255, 255, 0.95);
}
.genocide-card.gc-card-has-bg.gc-card-collapsed .gc-expand {
  color: rgba(255, 255, 255, 0.9);
}

/* Intro overlay — MoMA-inspired, premium typography */
.gc-intro {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gc-intro-title {
  margin: 0 0 2.5rem 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}
.gc-intro p {
  margin: 0 0 1.5rem 0;
  font-size: clamp(0.85rem, 2.2vw, 0.9rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}
.gc-intro p.gc-intro-lead {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: #fff;
}
.gc-intro p:last-of-type {
  margin-bottom: 2.5rem;
}
.gc-intro p strong {
  color: #fff;
  font-weight: 700;
}
.gc-intro-begin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  align-self: center;
}
.gc-intro-begin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.25rem, 3vw, 1.75rem);
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  font-weight: 500;
  color: #fff;
  background: #FF4B1D;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}
.gc-intro-begin svg {
  width: 1.15rem;
  height: 1.15rem;
}
.gc-intro-begin:hover {
  background: #ff5c2e;
  color: #fff;
}
.gc-intro-begin-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}
@media (pointer: coarse), (hover: none) {
  .gc-intro-begin-hint {
    display: none;
  }
}

.genocide-card.gc-card-collapsed {
  cursor: pointer;
  min-height: 280px;
}
.genocide-card.gc-card-collapsed .gc-impact-desc {
  min-height: 4.1rem;
}

.gc-expand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.25rem auto 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s;
}
.genocide-card.gc-card-collapsed:hover .gc-expand {
  color: rgba(255, 255, 255, 0.6);
}
.gc-expand .gc-expand-text {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.genocide-card.gc-card-collapsed:hover .gc-expand .gc-expand-text {
  opacity: 1;
  transition: opacity 0.6s ease 0.6s;
}
.gc-expand svg {
  width: 1.25rem;
  height: 1.25rem;
}

.gc-flag-entity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.gc-flag {
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.25em;
  opacity: 0.9;
}

.gc-title {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.4rem;
}

.gc-entity {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

.gc-impact {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.gc-card-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.gc-impact-desc {
  font-size: 1.35rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.gc-card-expanded .gc-expandable {
  display: flex;
  flex-direction: column;
}

.gc-point {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.65rem;
}

.gc-point-label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.gc-source {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.06em;
}

.gc-share {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease, color 0.4s ease;
}
.gc-share:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.gc-share svg {
  width: 1rem;
  height: 1rem;
}
.gc-share.gc-share-copied {
  background: rgba(239, 68, 68, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fca5a5;
}
.gc-share .gc-share-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0.25rem);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.gc-share.gc-share-copied .gc-share-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0.5rem);
}

/* Map view carousel: copy then minimize in sequence (left to right) */
#genocide-card.gc-card-expanded .gc-share {
  right: 3.5rem;
}
#genocide-card.gc-card-expanded .gc-minimize {
  right: 1rem;
}

.gc-minimize {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease, color 0.4s ease;
}
.gc-minimize:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.gc-minimize svg {
  width: 1rem;
  height: 1rem;
}

/* Nav arrows — frosted glass, prominent */
.genocide-nav {
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.genocide-nav svg {
  width: 1.5rem;
  height: 1.5rem;
}
.genocide-nav:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
}
.genocide-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.genocide-carousel-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 6em;
  padding-top: 0.9rem;
}

.genocide-carousel-counter {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.genocide-carousel-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (pointer: coarse), (hover: none) {
  .genocide-carousel-hint {
    display: none;
  }
  .genocide-carousel-nav {
    align-items: center;
  }
  .genocide-carousel-center {
    padding-top: 0;
  }
}

/* Desktop: nav buttons faded until hover over nav area */
@media (pointer: fine) and (hover: hover) {
  .genocide-nav {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-color: transparent;
    color: rgba(255, 255, 255, 0.35);
  }
  .genocide-carousel-nav:hover .genocide-nav {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
  .genocide-carousel-nav:hover .genocide-nav:disabled {
    color: rgba(255, 255, 255, 0.35);
  }
}

/* Mobile and small screens: apply grid-style card sizing to map view carousel, modal, and intro */
@media (max-width: 900px) {
  .genocide-topbar {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 0;
  }
  .genocide-topbar-home {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
    margin-top: 0;
  }
  .genocide-topbar-about {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    margin-top: 0;
  }
  .genocide-topbar-center {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .genocide-content {
    padding: 3rem 1.5rem 2rem;
    align-items: center;
  }
  .genocide-intro {
    padding: 5rem 1.75rem 4rem;
  }
  .genocide-intro .gc-intro {
    max-width: 540px;
  }
  .genocide-carousel {
    width: 100%;
    max-width: 320px;
  }
  .genocide-content .genocide-carousel .genocide-card {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    padding: 1.75rem 1.5rem;
  }
  .genocide-content .genocide-carousel .genocide-card .gc-title {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
  }
  .genocide-content .genocide-carousel .genocide-card .gc-impact {
    font-size: 1.75rem;
  }
  .genocide-content .genocide-carousel .genocide-card .gc-impact-desc {
    font-size: 0.9rem;
    min-height: 2.75rem;
  }
  .genocide-content .genocide-carousel .genocide-card .gc-entity {
    font-size: 0.7rem;
  }
  .genocide-content .genocide-carousel .genocide-card .gc-flag {
    font-size: 1.4rem;
  }
  .genocide-card-modal-content {
    width: 100%;
    max-width: 320px;
  }
  .genocide-card-modal-content .genocide-card {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    padding: 1.75rem 1.5rem;
  }
  .genocide-card-modal-content .genocide-card .gc-title {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
  }
  .genocide-card-modal-content .genocide-card .gc-impact {
    font-size: 1.75rem;
  }
  .genocide-card-modal-content .genocide-card .gc-impact-desc {
    font-size: 0.9rem;
    min-height: 2.75rem;
  }
  .genocide-card-modal-content .genocide-card .gc-entity {
    font-size: 0.7rem;
  }
  .genocide-card-modal-content .genocide-card .gc-flag {
    font-size: 1.4rem;
  }
  .genocide-card-modal-content .genocide-card .gc-point {
    font-size: 0.8rem;
  }
  .genocide-card.gc-card-expanded {
    min-height: 480px;
  }
}

/* Mobile: narrower layout, touch-friendly */
@media (max-width: 768px) {
  .genocide-intro {
    padding: calc(5rem + 1rem) 1.25rem 3rem;
  }
  .gc-intro-title {
    margin-bottom: 1.5rem;
  }
  .gc-intro p {
    margin-bottom: 1rem;
  }
  .gc-intro p:last-of-type {
    margin-bottom: 1.5rem;
  }
  .genocide-content {
    padding: 2rem 1rem 1.5rem;
    align-items: center;
  }
  .genocide-carousel {
    max-width: 100%;
  }
  .genocide-content .genocide-carousel .genocide-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 320px !important;
  }
  .genocide-card-modal-content {
    max-width: calc(100vw - 2rem);
  }
  .genocide-card-modal-content .genocide-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 320px !important;
  }
  body.gc-cards-view .genocide-content {
    padding: calc(7rem + 1.5rem) 1rem 4rem 1rem;
  }
  .genocide-content.gc-view-cards .genocide-cards-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    padding: 0;
  }
  .genocide-cards-grid .gc-grid-card-wrap {
    width: 100%;
    max-width: 320px;
    justify-self: center;
  }
  .genocide-cards-grid .gc-grid-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .genocide-card.gc-card-expanded {
    min-height: 420px;
  }
  .genocide-nav {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .genocide-topbar {
    padding: 0.75rem 1rem;
  }
  .genocide-title {
    font-size: 1.5rem;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .genocide-intro {
    padding: calc(4.5rem + 0.5rem) 1rem 2.5rem;
  }
  .gc-intro-title {
    margin-bottom: 1.25rem;
  }
  .genocide-cards-grid .gc-grid-card-wrap,
  .genocide-content .genocide-carousel .genocide-card,
  .genocide-card-modal-content .genocide-card {
    max-width: 100%;
  }
}
