@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

body {
  font-family: 'Lato', sans-serif;
  font-size: 1.4rem;
  line-height: 1.6;
  width: 100%;
  text-align: left;
  overflow-x: hidden;
}

.img-fluid {
  border-radius: 24px;
}

/* cr blocks */
.cr-narrative,
.cr-narrative .progress-block {
  max-width: 1600px;
  font-size: 1.4rem;
  text-align: left;
}

/* closeread sidebar-left */
.cr-section.cr-column-screen.sidebar-left {
  grid-template-columns: 420px minmax(0, 1fr) !important;
}

.cr-section.cr-column-screen.sidebar-left > .narrative-col {
  width: 420px !important;
  min-width: 420px !important;
  max-width: 420px !important;
}

.cr-section.cr-column-screen.sidebar-left > .narrative-col .narrative,
.cr-section.cr-column-screen.sidebar-left > .narrative-col .progress-block {
  max-width: none !important;
}

.cr-section.cr-column-screen.sidebar-left > .sticky-col {
  min-width: 0 !important;
}

.cr-section .sticky-col img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

.cr-section.cr-column-screen.sidebar-left > .sticky-col .sticky {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-6vh);
}

.cr-section.cr-column-screen.sidebar-left > .sticky-col img {
  max-height: 68vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* overlay-center boxes */
.cr-section.cr-column-screen.overlay-center {
  background: #fff !important;
  color: #111 !important;
}

.cr-section.cr-column-screen.overlay-center .narrative-col {
  background: transparent !important;
}

.cr-section.cr-column-screen.overlay-center .progress-block,
.cr-section.cr-column-screen.overlay-center .narrative {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: #111 !important;
}

.cr-section.cr-column-screen.overlay-center .progress-block {
  max-width: 760px !important;
  margin: 0 auto !important;
}

.cr-section.cr-column-screen.overlay-center .narrative {
  font-size: 1.35rem;
  line-height: 1.7;
  text-align: center;
}

.map-section {
  position: relative;
  min-height: 650vh;
  background: transparent;
}

.map-sticky-wrap {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
}

.map-map-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  pointer-events: auto;
}

.map-map-wrap .leaflet,
.map-map-wrap .leaflet-container,
.map-map-wrap .html-widget,
.map-map-wrap div[id^="htmlwidget-"] {
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: auto;
}

.map-narrative {
  position: relative;
  z-index: 2;
  max-width: none;
  width: 100%;
  margin: -100vh 0 0 0;
  padding: 15vh 0 120vh 0;
  pointer-events: none;
}

.map-block {
  background: rgba(255,255,255,.92);
  color: #000;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 55vh auto;
  max-width: 620px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  pointer-events: auto;
  font-size: 1.2rem;
  line-height: 1.6;
}

#map-sentinel {
  height: 100vh;
  margin: 0;
  padding: 0;
  background: transparent;
}

.leaflet-control-container {
  pointer-events: auto;
  z-index: 9999;
}

/* hero landing */
.story-hero {
  position: relative;
  width: 100vw;
  height: 92vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: url("assets/soilbg.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: white;
}

.story-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 1;
}

.story-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  padding: 2rem;
  text-align: center;
}

.story-hero h1 {
  font-size: clamp(3rem, 6vw, 6.2rem);
  line-height: 1.05;
  font-weight: 400;
  margin: 2rem 0 1.2rem;
  color: white;
}

.story-hero-meta {
  font-size: 1.05rem;
  opacity: 0.92;
  line-height: 1.5;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

/* Pandoc may wrap inline content in a <p> inside Quarto div blocks */
.story-tags p {
  display: contents;
}

.story-tags span {
  padding: 0.35rem 1rem;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* non-cr sections */
.non-cr-block.dark-bg {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #002B36;
  color: #fff;
  box-sizing: border-box;
  padding-block: 5rem;
  padding-inline: clamp(2rem, 14vw, 12rem);
}

.non-cr-block.white-bg {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #fff;
  color: #111;
  box-sizing: border-box;
  padding-block: 5rem;
  padding-inline: clamp(2rem, 14vw, 12rem);
}

.non-cr-block h2 {
  text-align: center;
  max-width: 760px;
  margin: 7rem auto 3rem;
  line-height: 1.25;
  font-weight: 600;
  position: relative;
}

.non-cr-block h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: rgba(0,0,0,0.25);
  margin: 0 auto 1.2rem;
}

.figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.figure img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.figure-caption {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-top: 0.6rem;
  line-height: 1.3;
  text-align: center;
}

.figure--medium img {
  max-width: 760px;
}

.figure--wide {
  width: 100%;
}

.figure--wide img {
  max-width: 1100px;
}


.story-hero.non-cr-block,
.non-cr-block.story-hero {
  max-width: none !important;
  padding: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
.story-hero-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  margin: 0.75rem 0 0.5rem;
}

.story-hero-logos img {
  max-height: 34px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
}

