/* tighten dcc.Markdown spacing */
.inline-markdown p {
  margin: 0;
}

/* if you also want it to behave more inline */
.inline-markdown,
.inline-markdown > p {
  display: inline;
}

/* default: show light */
html[data-mantine-color-scheme="light"] .theme-img-light { display: block !important; }
html[data-mantine-color-scheme="light"] .theme-img-dark { display: none !important; }

/* when Mantine is in dark mode */
html[data-mantine-color-scheme="dark"] .theme-img-light { display: none !important; }
html[data-mantine-color-scheme="dark"] .theme-img-dark  { display: block !important; }

/* ---- home page ---- */
.mantine-AppShell-main:has(.mg-home) {
  container-type: inline-size;
}
.mg-home .mg-hero {
  padding: clamp(24px, 5vw, 64px);
  margin: 0;
}
.mg-home .mg-section {
  position: relative;
  isolation: isolate;
  padding: clamp(24px, 5vw, 64px);
}
.mg-home .mg-section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  /* Span the main area, including its gutters, without widening the content. */
  width: calc(100cqw + 2 * var(--app-shell-padding, 0px));
  border-top: 2px solid #000;
  background: var(--mg-section-background, none);
  z-index: -1;
  transform: translateX(-50%);
  pointer-events: none;
}
.mg-home .mg-section-stats {
  padding-block: 32px;
}
.mg-section-green {
  --mg-section-background: linear-gradient(120deg, light-dark(#d6f5df, #173a2e), light-dark(#f4fbe9, #202c24));
}
.mg-section-peach {
  --mg-section-background: linear-gradient(115deg, light-dark(#fff1ce, #3c3020), light-dark(#fce2db, #36242a));
}
.mg-section-lilac {
  --mg-section-background: linear-gradient(125deg, light-dark(#e9e3fa, #2c2540), light-dark(#e2f3f1, #183436));
}
.mg-funder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 24px;
  border: 2px solid #000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mg-funder-light {
  background: #fff;
}
.mg-funder-dark {
  background: #002e56;
}
.mg-funder img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: 110px;
  object-fit: contain;
}
.mg-funder:hover {
  transform: translateY(-4px);
  box-shadow: 4px 4px 0 #000;
}
.mg-funder:focus-visible {
  outline: 3px solid var(--mantine-color-text);
  outline-offset: 4px;
}
.mg-stat {
  border-left: 4px solid var(--mantine-primary-color-filled);
  padding-left: var(--mantine-spacing-md);
}
.mg-stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  color: var(--mantine-primary-color-filled);
}
.mg-card {
  box-shadow: 0 10px 30px rgba(0, 46, 86, 0.06);
}
.mg-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mg-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 46, 86, 0.16);
}
.mg-cta {
  background: linear-gradient(135deg, #002E56 0%, #00aa00 140%);
}

@media (prefers-reduced-motion: reduce) {
  .mg-funder,
  .mg-hover {
    transition: none;
  }
  .mg-funder:hover,
  .mg-hover:hover {
    transform: none;
  }
}
