/* ---- OpenForests brand tokens (from Design_AI/tokens.css + design system) ---- */
:root {
  color-scheme: light; /* deliberately light-only */

  /* Core brand */
  --midnight: #010E16;
  --navy: #012231;
  --deep-forest: #1A3D35;
  --teal: #4A7A5E;
  --sage: #6B9E7A;
  --canopy: #CAD668;
  --teal-grey: #7A8E88;
  --light-grey: #F5F5F5;
  --border-grey: #D0D0D0;
  --forest-red: #8B3A3A;

  --font-head: 'Poppins', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --card: #FFFFFF;
  --line: rgba(1, 34, 49, 0.10);
  --shadow: 0 1px 3px rgba(1, 34, 49, 0.07), 0 1px 2px rgba(1, 34, 49, 0.04);
  --shadow-lift: 0 12px 30px rgba(1, 34, 49, 0.10);

  /* Role tokens used by app.js charts */
  --surface-1: #FFFFFF;
  --page: var(--light-grey);
  --text-primary: var(--navy);
  --text-secondary: #3a525c;
  --text-muted: var(--teal-grey);
  --grid: rgba(1, 34, 49, 0.07);
  --axis: var(--border-grey);
  --border: var(--line);
  --accent: var(--teal);
  --warm: var(--forest-red);
  --chip-bg: #FFFFFF;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* the hidden attribute always wins over display classes */

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

a { color: var(--teal); text-decoration: none; border-bottom: 1.5px solid transparent; font-weight: 600; }
a:hover { border-bottom-color: var(--teal); }

h1, h2, h3 { font-family: var(--font-head); color: var(--navy); }

/* ---- header: brand gradient (navy -> deep forest), slow drift ---- */
.site-header {
  padding: 54px 0 44px;
  background: linear-gradient(150deg, var(--navy), var(--deep-forest), var(--navy));
  background-size: 220% 220%;
  animation: hero-drift 24s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}
.eyebrow {
  font-family: var(--font-head); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--teal-grey); margin: 0 0 10px;
}
.site-header .eyebrow { color: var(--canopy); }
.site-header h1 { margin: 0 0 8px; font-weight: 700; font-size: 44px; letter-spacing: -0.03em; line-height: 1.05; color: #fff; }
.tagline { margin: 0 0 26px; color: rgba(255, 255, 255, 0.82); font-size: 17px; max-width: 620px; }
/* compact hero for everything that isn't the landing page */
.site-header--compact { padding: 26px 0 24px; }
.site-header--compact .eyebrow { display: none; }
.site-header--compact h1 { font-size: 27px; margin-bottom: 4px; }
.site-header--compact .tagline { font-size: 14px; margin-bottom: 14px; }
.site-header--compact .search-row { margin-bottom: 4px; }

.search-box { position: relative; max-width: 480px; }
.search-box > input {
  width: 100%; padding: 13px 16px; font-size: 16px; font-family: var(--font-body);
  border: 1px solid var(--border-grey); border-radius: var(--r-md);
  background: #fff; color: var(--navy); outline: none; box-shadow: var(--shadow);
}
.search-box > input:focus { border-color: var(--teal); }
.search-results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--border-grey);
  border-radius: var(--r-md); box-shadow: var(--shadow-lift);
  max-height: 280px; overflow-y: auto;
}
.search-results li { padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; }
.search-results li:hover, .search-results li.active { background: var(--light-grey); }
.search-results .res-meta { color: var(--teal-grey); font-size: 13px; }

.presets { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.presets-label { color: var(--teal-grey); font-size: 14px; }
.chip {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  padding: 8px 16px; cursor: pointer;
  border: 1px solid var(--border-grey); border-radius: var(--r-pill);
  background: #fff; color: var(--navy);
  transition: border-color 0.15s, transform 0.15s;
}
.chip:hover { border-color: var(--navy); transform: translateY(-2px); }

/* ---- status / intro ---- */
.status { margin: 28px 0; color: var(--text-secondary); }
.status.error { color: var(--forest-red); }
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid var(--border-grey); border-top-color: var(--teal);
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.intro { margin: 48px auto; max-width: 640px; color: var(--text-secondary); font-size: 17px; }

/* ---- dashboard ---- */
.location-head { margin: 34px 0 4px; }
.location-head h1, .location-head h2 { margin: 0; font-weight: 700; font-size: 30px; letter-spacing: -0.015em; }
.loc-meta { margin: 4px 0 0; color: var(--teal-grey); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.04em; }

.story { font-size: 17px; color: var(--text-secondary); margin: 12px 0 24px; max-width: 660px; }
.story strong { color: var(--navy); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.tile {
  background: var(--card); border-radius: var(--r-lg); padding: 18px 20px;
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
/* labels top, big numbers on one shared line per row: the label flexes to
   absorb height differences, the delta reserves two lines */
.tile { display: flex; flex-direction: column; }
.tile .t-label { font-size: 13px; color: var(--text-secondary); flex: 1 0 auto; }
.tile .t-value { font-family: var(--font-head); font-weight: 700; font-size: 27px; margin: 3px 0 2px; color: var(--navy); letter-spacing: -0.01em; }
.tile .t-delta { font-size: 12px; color: var(--teal-grey); min-height: 33px; }

/* cards */
.card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 24px 24px 28px; margin: 0 0 20px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 3px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.card-sub { margin: 0 0 16px; font-size: 13px; color: var(--text-secondary); }
.chart-box { position: relative; height: 300px; }
.chart-box-sm { height: 220px; margin-top: 16px; }
.year-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 16px; font-size: 13px; color: var(--text-secondary); }
.year-facts strong { color: var(--navy); }
.year-sub {
  font-family: var(--font-head); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-grey); margin: 20px 0 8px;
}

/* warming stripes */
.stripes { display: flex; height: 130px; border-radius: var(--r-md); overflow: hidden; }
.stripes .stripe { flex: 1 1 0; min-width: 0; }
.stripes .stripe:hover { outline: 2px solid var(--navy); outline-offset: -2px; position: relative; z-index: 2; }
.stripes-drought { height: 70px; margin-top: 2px; }
#dstripes-axis { margin-bottom: 14px; }
.stripes-axis {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 11px; color: var(--teal-grey); font-family: var(--font-mono); letter-spacing: 0.04em;
}

/* table */
.table-card summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--navy); }
.table-scroll { overflow-x: auto; margin-top: 14px; }
#data-table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
#data-table th, #data-table td { text-align: right; padding: 6px 12px; border-bottom: 1px solid var(--line); }
#data-table th:first-child, #data-table td:first-child { text-align: left; }
#data-table th {
  color: #fff; background: var(--navy); font-weight: 600;
  font-family: var(--font-head); font-size: 12px; position: sticky; top: 0;
}
#data-table tbody tr:nth-child(even) { background: var(--light-grey); }

/* OpenForests promo banner (in the footer, on every page) */
.of-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--r-lg);
  padding: 20px 24px; margin-bottom: 26px;
}
.of-banner-logo { width: 110px; height: auto; flex-shrink: 0; }
.of-banner-eyebrow {
  font-family: var(--font-head); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--canopy); margin: 0 0 6px;
}
.of-banner-text { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.85); max-width: 560px; }
.of-banner .btn { flex-shrink: 0; }
@media (max-width: 700px) {
  .of-banner { flex-direction: column; align-items: flex-start; }
}

/* footer — navy dark panel */
.site-footer { background: linear-gradient(150deg, var(--deep-forest), var(--midnight)); color: rgba(255, 255, 255, 0.85); margin-top: 56px; padding: 34px 0 40px; }
.site-footer p { font-size: 13px; max-width: 720px; }
.site-footer a { color: var(--canopy); }
.site-footer a:hover { border-bottom-color: var(--canopy); }

/* admin bar: bright banner above the nav, moderators only */
.admin-bar { background: var(--canopy); color: var(--navy); }
.admin-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 13px; padding-bottom: 13px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
}
/* underline the label text only — the count pills (inline-block) stay clear of the line */
.admin-bar a {
  color: var(--navy); border-bottom: none;
  text-decoration: underline; text-decoration-color: rgba(1, 34, 49, 0.4);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.admin-bar a:hover { text-decoration-color: var(--navy); }
.admin-bar a.active { text-decoration-color: var(--navy); text-decoration-thickness: 2.5px; font-weight: 700; }
.admin-bar .badge { font-size: 11px; padding: 1px 8px; vertical-align: 1px; margin-left: 2px; }
.admin-bar-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-bar-links button {
  font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--navy);
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(1, 34, 49, 0.35);
  border-radius: var(--r-pill); padding: 6px 16px; cursor: pointer;
}
.admin-bar-links button:hover { background: #fff; }

/* ---- top navigation (navy, like the footer — the logo is white-on-dark) ---- */
.topnav { background: var(--navy); }
/* full-width bar: brand + links anchored left, search + CTA + logo anchored right */
.topnav-inner { display: flex; align-items: center; gap: 26px; max-width: none; padding: 11px 26px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; color: #fff; border-bottom: none; font-size: 16px; white-space: nowrap; }
.wordmark::before {
  content: ""; width: 17px; height: 17px; border-radius: 5px; flex-shrink: 0;
  background: linear-gradient(90deg, #2171b5 0 20%, #9ecae1 20% 40%, #fcbba1 40% 60%, #ef3b2c 60% 80%, #99000d 80% 100%);
}
.topnav-links { margin-right: auto; }
.nav-cta { white-space: nowrap; }
/* hamburger — mobile only (see the media query below) */
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 38px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: none; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--r-sm); cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.topnav-inner.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topnav-inner.open .nav-toggle span:nth-child(2) { opacity: 0; }
.topnav-inner.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.madeby { display: flex; flex-direction: column; align-items: center; gap: 0; border-bottom: none; }
.madeby span { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: #fff; }
.madeby img { height: 36px; width: auto; display: block; }
.madeby:hover { border-bottom: none; }
.madeby:hover span { color: var(--canopy); }
.wordmark:hover { border-bottom: none; color: var(--canopy); }
.topnav-links { display: flex; align-items: center; gap: 20px; }
.topnav-links a { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, 0.85); border-bottom: none; }
.topnav-links a:hover { color: #fff; }
.topnav-links a.current { color: var(--canopy); }

/* ---- buttons (design system) ---- */
.btn {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: var(--r-md); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 9px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--teal); color: #fff !important; }
.btn-primary:hover { background: var(--sage); border-bottom-color: transparent; }
.btn-secondary { background: #fff; color: var(--navy) !important; border-color: var(--border-grey); }
.btn-secondary:hover { border-color: var(--navy); border-bottom-color: var(--navy); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.note { color: var(--teal-grey); font-size: 13px; }

/* ---- homepage hero & how-it-works ---- */
.hero-ctas { margin-top: 16px; }
.howto { margin: 44px 0 10px; }
.howto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.howto-card { padding: 22px; }
.howto-num {
  width: 34px; height: 34px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  background: var(--teal); color: #fff; border-radius: var(--r-pill); margin-bottom: 12px;
}
/* editorial homepage: open steps with big numbers, hairline section starts */
.layout-open .howto-grid { gap: 40px; }
.layout-open .howto-card { background: transparent; box-shadow: none; padding: 0; }
.layout-open .howto-num {
  width: auto; height: auto; display: block; place-items: unset;
  background: none; color: var(--teal); font-size: 30px; font-weight: 500; margin-bottom: 6px;
}
.layout-open .list-head { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 48px; }
.layout-open .howto { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 48px; }
.howto-card h3 { margin: 0 0 6px; font-size: 17px; }
.howto-card p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.howto-cta { text-align: center; margin-top: 24px; }
.howto-cta .note { margin-top: 10px; }
@media (max-width: 700px) {
  .howto-grid { grid-template-columns: 1fr; }
}

/* ---- homepage: map + story list ---- */
.map-section { margin: 28px 0; }
.stories-map { height: 400px; border-radius: var(--r-lg); box-shadow: var(--shadow); z-index: 1; background: #0b2130; }
/* homepage map: sized by aspect ratio so it uses the width without letterboxing */
.stories-map--small { height: auto; aspect-ratio: 15 / 8; min-height: 380px; max-height: 640px; }
.stories-map--full { height: 74vh; min-height: 460px; }
.stories-map--bleed { border-radius: 0; box-shadow: none; width: 100%; }
/* map page: the map IS the page — nav above, everything else is map */
body.map-page { display: flex; flex-direction: column; height: 100vh; }
body.map-page .map-page-main { flex: 1; min-height: 0; position: relative; }
.stories-map--viewport { position: absolute; inset: 0; height: 100%; border-radius: 0; box-shadow: none; }
.map-legend-overlay {
  position: absolute; z-index: 500; bottom: 20px; left: 16px;
  display: flex; flex-direction: column; gap: 5px;
  background: rgba(255, 255, 255, 0.94); border-radius: var(--r-md); box-shadow: var(--shadow-lift);
  padding: 10px 14px; font-size: 12.5px; color: var(--text-secondary); max-width: 260px;
}
.map-legend-overlay .note { font-size: 11px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0 30px; font-size: 13px; color: var(--text-secondary); }
.legend-dot { display: inline-block; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend-story { width: 14px; height: 14px; background: #B35A2A; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.legend-place { width: 9px; height: 9px; background: var(--teal); border: 1px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.leaflet-popup-content { font-family: var(--font-body); }
.popup-title { font-family: var(--font-head); color: var(--navy); }
.popup-meta { color: var(--teal-grey); font-size: 12px; }
.map-hovercard { border: none !important; border-radius: var(--r-md) !important; box-shadow: var(--shadow-lift) !important; padding: 0 !important; overflow: hidden; }
.map-hovercard::before { display: none; }
/* hover card: photo as a full-width banner on top, text below */
.hovercard { display: flex; flex-direction: column; gap: 0; padding: 0 0 10px; width: 240px; font-family: var(--font-body); }
.hovercard-text { min-width: 0; padding: 9px 12px 0; }
.hovercard img { width: 100%; height: 115px; object-fit: cover; display: block; background: #fff; }
/* round markers deserve a round focus indicator, not the browser's square frame */
.leaflet-container path.leaflet-interactive:focus { outline: none; }
.leaflet-container path.leaflet-interactive:focus-visible { filter: drop-shadow(0 0 5px rgba(74, 122, 94, 0.95)); }
.hovercard-text { display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.hovercard-text strong { font-family: var(--font-head); font-size: 13px; color: var(--navy); line-height: 1.3; }
.hovercard-text span { font-size: 11px; color: var(--teal-grey); font-family: var(--font-mono); }

.list-head { display: flex; align-items: baseline; gap: 16px; margin: 34px 0 16px; }
.list-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.015em; }

.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 30px; }
.story-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; border-bottom: none; font-weight: 400; }
.story-card:hover { border-bottom: none; transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.story-card-img { width: 100%; height: 150px; object-fit: cover; display: block; }
/* chart thumbnails must never crop — every year bar stays visible */
.story-card-img--chart { object-fit: contain; background: #fff; }
.story-card-img-empty { background: linear-gradient(120deg, var(--deep-forest), var(--teal) 60%, var(--sage)); }
.story-card-body { padding: 16px 18px 18px; }
.story-card-body h3 { margin: 0 0 4px; font-size: 17px; }
.story-card-meta { margin: 0 0 8px; font-size: 12px; color: var(--teal-grey); font-family: var(--font-mono); letter-spacing: 0.02em; }
.story-card-excerpt { margin: 0; font-size: 14px; color: var(--text-secondary); }

/* ---- story page ---- */
.story-article { max-width: 720px; margin: 40px auto 10px; }
.story-article h1 { font-size: 38px; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 10px; }
.story-meta { color: var(--teal-grey); font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.03em; margin: 0 0 20px; }
.story-image { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow); margin: 0 0 20px; display: block; }
/* uploaded photos: cap the header height (portrait phone shots!), crop on the focal point */
.story-image--photo { max-height: 480px; object-fit: cover; }
/* compact data band in the story header */
.st-databand { margin: 2px 0 20px; }
.st-databand-stripes { height: 26px; border-radius: var(--r-sm); }
.st-databand-drought { height: 13px; margin-top: 3px; border-radius: 4px; }
.st-databand-caption { margin: 7px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; color: var(--teal-grey); }
.st-databand .climate-badges { margin: 12px 0 0; }
.story-body { font-size: 17px; color: var(--text-secondary); }
.story-body p { margin: 0 0 14px; }

.share-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding: 16px 20px; }
.share-label { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--navy); margin-right: 4px; }

/* the story→evidence boundary: a rule and a label, aligned with the text rail */
.dash-head { max-width: none; margin: 60px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.dash-eyebrow { margin: 0; color: var(--teal); }
.dash-head + #dashboard .location-head, .dash-head + #dashboard .place-hero { margin-top: 8px; }
.more-cta { margin: 6px 0 20px; }

/* ---- submit form ---- */
.story-form { max-width: 640px; margin: 36px auto; display: flex; flex-direction: column; }
.story-form label { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--navy); margin: 18px 0 6px; }
.story-form label:first-child { margin-top: 0; }
.req { color: var(--terracotta, #B35A2A); }
.story-form input[type="text"], .story-form textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--navy);
  padding: 11px 14px; border: 1px solid var(--border-grey); border-radius: var(--r-md);
  background: #fff; outline: none; width: 100%;
}
.story-form input[type="text"]:focus, .story-form textarea:focus { border-color: var(--teal); }
.story-form textarea { resize: vertical; }
.field-note { font-size: 12px; color: var(--teal-grey); margin: 6px 0 0; }
#f-location-picked { color: var(--teal); font-weight: 600; font-size: 13px; margin: 6px 0 0; }
.photo-preview { max-width: 280px; border-radius: var(--r-md); box-shadow: var(--shadow); display: block; }
.photo-focus-wrap { position: relative; display: inline-block; margin-top: 10px; cursor: crosshair; }
.photo-focus-wrap[hidden] { display: none; }
.focus-dot {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  border: 3px solid #fff; border-radius: 50%; background: rgba(74, 122, 94, 0.85);
  transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); pointer-events: none;
}
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.turnstile-box { margin-top: 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 13px; color: var(--text-secondary); font-family: var(--font-body); font-weight: 400; }
.consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal); flex-shrink: 0; }
.legal-links { margin-top: 10px; }
.story-form .btn { margin-top: 22px; align-self: flex-start; }

/* ---- place cards (climate explorer) ---- */
.places-section { margin: 26px 0 10px; }
.places-h {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-grey); margin: 18px 0 10px;
}
.places-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.place-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  min-width: 130px; padding: 12px 16px; cursor: pointer; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  font-family: var(--font-body);
}
.place-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.place-card:focus { outline: none; } /* no ring on mouse click… */
.place-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; } /* …but keyboard users keep one */
.place-card-name { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--navy); }
.place-card-country { font-size: 12px; color: var(--teal-grey); }
.place-card-stat { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 7px; font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.place-stat-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.place-card-loading { color: var(--teal-grey); font-style: italic; }
.place-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.place-stripes { display: flex; width: 100%; height: 8px; border-radius: 3px; overflow: hidden; margin-top: 9px; }
.place-stripes i { flex: 1 1 0; min-width: 0; }
.place-stripes-drought { height: 5px; margin-top: 2px; border-radius: 2px; }
.place-tag {
  align-self: flex-start;
  margin-top: 8px; font-family: var(--font-head); font-weight: 600; font-size: 11px;
  color: #8c510a; background: #f6ede1; border-radius: var(--r-pill); padding: 2px 9px;
}
.place-tag-heat { color: #99000d; background: #fbeaea; }
@media (max-width: 700px) {
  .places-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- analysis badges ---- */
.climate-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 22px; }
.climate-badge {
  font-family: var(--font-head); font-weight: 600; font-size: 12px;
  padding: 4px 13px; border-radius: var(--r-pill);
}
.b-warm { background: #fdecea; color: #a02422; }
.b-warm-strong { background: #a02422; color: #fff; }
.b-dry { background: #f6ede1; color: #8c510a; }
.b-wet { background: #e7f1fb; color: #1c5cab; }
.b-night { background: #efeaf6; color: #5A4A7A; }



/* global styled tooltips (replaces native title tooltips) */
.lc-tooltip {
  position: fixed; z-index: 10000; pointer-events: none;
  max-width: 280px; padding: 8px 12px;
  background: var(--navy); color: #fff;
  font-family: var(--font-body); font-size: 12.5px; line-height: 1.45;
  border-radius: var(--r-sm); box-shadow: var(--shadow-lift);
}

/* ribbon blocks: number left, micro-label right, full-width stripe below */
.stripe-block { display: block; width: 100%; margin-top: 9px; }
.stripe-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stripe-value {
  display: inline-flex; align-items: center; gap: 5px; min-height: 14px;
  font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.stripe-label {
  font-family: var(--font-head); font-weight: 600; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-grey);
}
.stripe-label-band { font-size: 11px; }
.stripe-block .place-stripes, .stripe-block .stripes { margin-top: 3px; }

/* the big picture (global.html) */
main > .card:first-child { margin-top: 30px; } /* breathing room below the hero */
.g-tiles { margin: 16px 0 2px; }
.table-scroll { overflow-x: auto; margin: 10px 0 14px; }
.compare-table { border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.compare-table th, .compare-table td { padding: 7px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table tr:first-child th { font-family: var(--font-head); color: var(--navy); font-size: 13px; }
.compare-table tr + tr th { font-family: var(--font-head); font-weight: 600; color: var(--teal-grey); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.compare-table td { color: var(--text-secondary); }

/* link to the methodology page (replaces the old on-page accordion) */
.method-link { margin: 0 0 18px; font-size: 14px; }
.method-link a { font-family: var(--font-head); font-weight: 600; }

/* KPI nav: the key numbers as jump links, replacing the old tile wall */
html { scroll-behavior: smooth; }
[id^="sec-"] { scroll-margin-top: 18px; }
.kpi-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 26px; }
.kpi-chip {
  display: inline-flex; align-items: baseline; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 8px 15px; border-bottom: 1px solid var(--line);
}
.kpi-chip:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.kpi-chip b { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--navy); }
.kpi-chip span { font-family: var(--font-head); font-weight: 600; font-size: 12px; color: var(--text-secondary); }
/* KPI tiles inside their section cards: quieter than the cards themselves */
.sec-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 240px)); gap: 10px; margin: 2px 0 16px; }
.sec-kpis:empty { display: none; }
.sec-kpis .tile { background: #f5f8f6; box-shadow: none; border: 1px solid var(--line); padding: 10px 14px; }
.sec-kpis .tile .t-value { font-size: 21px; }
.sec-kpis .tile .t-delta { min-height: 0; }

/* cards legend (one line above the place-card grids) */
.cards-legend { font-size: 12.5px; color: var(--teal-grey); margin: 0 0 16px; }
.legend-chip { display: inline-block; width: 28px; height: 9px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.legend-chip-heat { background: linear-gradient(90deg, #2171b5, #deebf7 45%, #fee0d2 55%, #cb181d); }
.legend-chip-water { background: linear-gradient(90deg, #8c510a, #f6e8c3 45%, #c7eae5 55%, #01665e); }

/* ---- plain-language explainers ---- */
.explain { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13.5px; color: var(--text-secondary); }
.explain summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--teal); }
.explain summary:hover { color: var(--sage); }
.explain p { margin: 10px 0 0; max-width: 660px; line-height: 1.6; }
.explain-top { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin: 0 0 22px; background: #fff; }

/* ---- admin panel ---- */
.admin-title { font-size: 26px; margin: 0 0 4px; }
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 13px;
  padding: 2px 10px; border-radius: var(--r-pill); background: var(--terracotta, #B35A2A);
  color: #fff; vertical-align: 3px;
}
.badge-ok { background: var(--teal); }
.admin-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 34px; }
.admin-story { display: flex; gap: 18px; padding: 16px 18px; }
.admin-thumb { width: 180px; height: 120px; object-fit: cover; border-radius: var(--r-md); flex-shrink: 0; background: #fff; }
.admin-story-body { min-width: 0; }
.admin-story-body h3 { margin: 0 0 4px; font-size: 17px; }
.admin-story-text { font-size: 14px; color: var(--text-secondary); margin: 8px 0; white-space: pre-line; }
.admin-actions { margin-top: 10px; }
.admin-tabs { display: flex; gap: 10px; margin: 26px 0 6px; }
.admin-tab {
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  padding: 9px 20px; cursor: pointer; border: 1px solid var(--border-grey);
  border-radius: var(--r-pill); background: #fff; color: var(--navy);
  transition: border-color 0.15s, background 0.15s;
}
.admin-tab:hover { border-color: var(--navy); }
.admin-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0 34px; }
.admin-chart-title { margin: 0 0 12px; font-size: 15px; }
.chart-box-xs { height: 160px; }
.admin-stats-card h3 { margin: 0 0 10px; font-size: 15px; }
.admin-stat-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--text-secondary); }
.admin-stat-list li { padding: 3px 0; }
.admin-stat-list .note { float: right; font-family: var(--font-mono); }
.btn-danger { color: var(--forest-red) !important; border-color: var(--forest-red); }
.btn-danger:hover { border-color: var(--forest-red); background: #fbf1f1; }

.admin-h1 { font-size: 30px; letter-spacing: -0.015em; margin: 32px 0 4px; }
.admin-h1-note { margin: 0 0 16px; }

/* places moderation: toolbar + compact rows */
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.admin-toolbar input, .admin-toolbar select {
  font-family: var(--font-body); font-size: 14px; color: var(--navy);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
.admin-toolbar input { flex: 1 1 220px; min-width: 180px; }
.admin-place-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-sm); margin-bottom: 6px;
}
.apr-name { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--navy); flex: 1 1 200px; }
.apr-name i { font-style: normal; font-weight: 400; color: var(--teal-grey); }
.apr-name .badge { margin-left: 6px; }
.apr-meta { font-family: var(--font-mono); font-size: 12px; color: var(--teal-grey); white-space: nowrap; }
.apr-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.apr-actions .btn-sm { padding: 4px 10px; font-size: 12.5px; min-height: 0; }
@media (max-width: 700px) {
  .admin-story { flex-direction: column; }
  .admin-thumb { width: 100%; height: 140px; }
}

/* ---- legal pages ---- */
.legal-page { max-width: 720px; margin: 40px auto 60px; }
.legal-page h1 { font-size: 32px; letter-spacing: -0.02em; margin: 0 0 8px; }
.legal-page h2 { font-size: 20px; margin: 28px 0 8px; }
.legal-page h3 { font-size: 16px; margin: 18px 0 6px; }
.legal-page p { color: var(--text-secondary); font-size: 15px; margin: 0 0 12px; }

/* ---- mobile ---- */
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  /* one compact row: brand + hamburger; everything else lives in the panel */
  .topnav-inner { flex-wrap: wrap; align-items: center; gap: 0; padding: 9px 16px; }
  .wordmark { font-size: 15px; }
  .nav-toggle { display: flex; }
  .topnav-links, .search-box--nav, .nav-cta, .madeby { display: none; }
  .topnav-inner.open .topnav-links {
    display: flex; flex-direction: column; align-items: stretch; order: 3;
    width: 100%; gap: 0; margin: 8px 0 0;
  }
  .topnav-inner.open .topnav-links a {
    font-size: 15px; padding: 11px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }
  .topnav-inner.open .search-box--nav { display: block; order: 4; width: 100%; flex: 1 1 100%; margin-top: 12px; }
  .topnav-inner.open .search-box--nav > input { padding: 10px 16px; font-size: 15px; }
  .topnav-inner.open .nav-cta { display: inline-flex; order: 5; width: 100%; justify-content: center; margin-top: 10px; }
  .topnav-inner.open .madeby { display: flex; order: 6; flex-direction: row; gap: 8px; margin: 16px auto 4px; }
  .topnav-inner.open .madeby img { height: 24px; }
  .topnav-inner.open .madeby span { font-size: 11px; }
  .site-header { padding: 30px 0 26px; }
  .site-header h1 { font-size: 30px; }
  .tagline { font-size: 15px; }
  .row .btn { flex: 1 1 auto; justify-content: center; }
  .chart-box { height: 230px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .t-value { font-size: 22px; }
  .stories-map { height: 280px; }
  .stories-map--small { aspect-ratio: auto; height: 320px; }
  .stories-map--viewport { height: 100%; } /* the map page stays full-height on phones */
  .story-grid { grid-template-columns: 1fr; }
  .story-article { margin-top: 24px; }
  .story-article h1 { font-size: 27px; }
  .stripes { height: 90px; }
  .share-row { padding: 12px 14px; }
  .share-row .btn { flex: 1 1 40%; justify-content: center; }
  .card { padding: 16px 14px 20px; }
  .presets { row-gap: 10px; }
  /* comfortable touch targets */
  .chip, .btn-sm { min-height: 40px; }
  .search-results li { padding: 12px 12px; }
}
/* ==== micro-animations: meaning-carrying, transform/opacity only, fire once ==== */
@view-transition { navigation: auto; } /* soft cross-fade between pages (progressive) */

/* stripes arrive in chronological order — one left-to-right wipe per ribbon */
.stripes, .place-stripes, .hero-stripes, .st-databand-stripes, .st-databand-drought {
  animation: wipe-in 0.9s ease-out both;
}
@keyframes wipe-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* sections rise gently as they enter the viewport */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal.in-view { opacity: 1; transform: none; }

/* interaction states */
.btn:active, .chip:active, .kpi-chip:active { transform: scale(0.975); }
.search-box--nav > input { transition: flex-basis 0.25s ease, background 0.2s, color 0.2s; }
.search-box--nav:focus-within { flex-basis: 320px; }
.story-card img { transition: transform 0.35s ease; }
.story-card:hover img { transform: scale(1.04); }
.share-modal-box { animation: modal-in 0.2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(6px); } }
.place-card-loading { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* chip severity: the chips carry the "notable signal" role the badge row had */
.kpi-chip.kc-warm { background: #fdecec; border-color: #f2cccc; }
.kpi-chip.kc-strong { background: #99000d; border-color: #99000d; }
.kpi-chip.kc-strong b, .kpi-chip.kc-strong span { color: #fff; }
.kpi-chip.kc-dry { background: #f6ede1; border-color: #e8d5bb; }
.kpi-chip.kc-wet { background: #e8f1fa; border-color: #cfe0f0; }

/* ==== open editorial layout (place dashboards) ====
   Containers signal interactivity; reading flow sits on the page surface.
   Scoped to body.layout-open. */
.layout-open main.wrap { max-width: 860px; }
/* open layout reads best on warm near-white paper; cards elsewhere keep their contrast */
body.layout-open { background: #FCFCFA; overflow-x: clip; /* full-bleed banner vs. scrollbar width */ }
.layout-open .place-card, .layout-open .story-card { border: 1px solid var(--line); }
.layout-open #dashboard .card {
  background: transparent; border-radius: 0; box-shadow: none;
  padding: 0; margin: 0 0 72px;
}
.layout-open #dashboard figure.card { border-top: 1px solid var(--line); padding-top: 26px; position: relative; }
.layout-open #dashboard h3 { font-size: 24px; letter-spacing: -0.015em; margin-bottom: 8px; max-width: 590px; }
.layout-open #dashboard figcaption .card-sub { max-width: 570px; } /* clear gutter to the stat column */
.layout-open #dashboard .card-sub { max-width: 640px; }
/* KPIs as a right-aligned stat column beside the section intro (no boxes) */
.layout-open .sec-kpis { position: absolute; top: 30px; right: 0; display: flex; flex-direction: column; gap: 14px; margin: 0; text-align: right; max-width: 200px; }
.layout-open .sec-kpis:empty { display: none; }
.layout-open .sec-kpis .tile { background: none; border: none; box-shadow: none; padding: 0; display: block; }
.layout-open .sec-kpis .tile:hover { transform: none; box-shadow: none; }
.layout-open .sec-kpis .t-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-head); font-weight: 600; color: var(--teal-grey); }
.layout-open .sec-kpis .t-value { font-size: 27px; margin: 2px 0 1px; }
.layout-open .sec-kpis .t-delta { min-height: 0; }
/* sections with a side stat reserve enough header height that charts never slide under it */
.layout-open #dashboard figure.card:has(> .sec-kpis:not(:empty)):not(:has(> #kpis-temp)) figcaption { min-height: 118px; }

/* hero with the global warming stripes glowing through (data as decoration) */
.site-header--stripes { position: relative; overflow: hidden; }
.site-header--stripes .wrap { position: relative; z-index: 2; }
.hero-stripes { position: absolute; inset: 0; display: flex; }
.hero-stripes i { flex: 1 1 0; min-width: 0; }
.hero-stripes::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(1, 24, 34, 0.97) 0%, rgba(1, 24, 34, 0.88) 45%, rgba(1, 24, 34, 0.45) 100%);
}

/* compact search living in the nav bar */
.search-box--nav { flex: 0 1 230px; min-width: 150px; }
.search-box--nav > input {
  width: 100%; padding: 7px 14px; font-size: 13.5px; font-family: var(--font-body);
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12); color: #fff; outline: none; box-shadow: none;
}
.search-box--nav > input::placeholder { color: rgba(255, 255, 255, 0.55); }
.search-box--nav > input:focus { background: #fff; color: var(--navy); border-color: var(--teal); }

/* place hero: decorative satellite banner, full viewport width (one static image) */
.place-hero {
  position: relative; overflow: hidden; min-height: 170px;
  margin: 0 calc(50% - 50vw) 26px; border-radius: 0;
  background: linear-gradient(150deg, var(--navy), var(--deep-forest)); /* fallback when no image */
}
#place-hero-img { display: block; width: 100%; height: 300px; object-fit: cover; }
.place-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1, 14, 22, 0.05) 35%, rgba(1, 14, 22, 0.72) 100%);
}
.place-hero-head {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px;
  margin: 0 auto; max-width: 860px; padding: 0 24px; box-sizing: border-box;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
/* h1 since the SEO pass — keep h2 too so the story page's banner still matches */
.place-hero-head h1, .place-hero-head h2 {
  margin: 0; font-weight: 700; font-size: 30px; letter-spacing: -0.015em; color: #fff;
  text-shadow: 0 1px 12px rgba(1, 14, 22, 0.5); /* legible over any satellite scene */
}
.place-hero-head .loc-meta { color: rgba(255, 255, 255, 0.75); }
.place-hero-attr { position: absolute; z-index: 2; right: 8px; top: 6px; font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.place-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* sticky place bar: slides in once the satellite banner scrolls away */
.place-sticky {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 9px 26px; background: rgba(1, 27, 40, 0.96); backdrop-filter: blur(6px);
  transform: translateY(-100%); transition: transform 0.25s ease;
}
.place-sticky.show { transform: none; }
.place-sticky-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: #fff; }
.place-sticky-stat { font-family: var(--font-mono); font-size: 12.5px; color: var(--canopy); }
.place-sticky-actions { margin-left: auto; display: flex; gap: 8px; }
.place-sticky-actions .btn-sm { padding: 5px 13px; font-size: 13px; }
/* the chip row moves in here once it scrolls out of the page */
.place-sticky-nav { display: none; gap: 4px 18px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.place-sticky-nav::-webkit-scrollbar { display: none; }
.place-sticky.with-nav .place-sticky-nav { display: flex; }
.place-sticky.with-nav .place-sticky-stat { display: none; } /* the first chip already says it */
.place-sticky .kpi-chip {
  background: transparent; border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 0; padding: 2px 1px 5px; white-space: nowrap;
}
.place-sticky .kpi-chip b { color: #fff; font-size: 13.5px; }
.place-sticky .kpi-chip span { color: rgba(255, 255, 255, 0.72); font-size: 11.5px; }
.place-sticky .kpi-chip:hover { border-bottom-color: var(--canopy); box-shadow: none; }
.place-sticky .kpi-chip.kc-warm { border-bottom-color: #ef3b2c; }
.place-sticky .kpi-chip.kc-strong { border-bottom-color: #ff5a4d; border-bottom-width: 3px; }
.place-sticky .kpi-chip.kc-strong b { color: #ff8a7d; }
.place-sticky .kpi-chip.kc-dry { border-bottom-color: #d9a441; }
.place-sticky .kpi-chip.kc-wet { border-bottom-color: #6baed6; }
[id^="sec-"] { scroll-margin-top: 84px; } /* clear the sticky bar when jumping */
@media (max-width: 700px) {
  .place-sticky { padding: 8px 14px; gap: 8px; }
  .place-sticky-stat { display: none; }
  .place-sticky.with-nav .place-sticky-actions { display: none; } /* chips get the room */
  .place-sticky.with-nav .place-sticky-name { font-size: 14px; }
}

/* server-rendered summary on /place/ pages — visible until the live dashboard
   replaces it (and the only content a crawler without JS ever sees) */
.static-summary { margin: 34px 0 10px; max-width: 700px; }
.static-summary h1 { font-size: 30px; letter-spacing: -0.015em; margin: 0 0 10px; }
.static-summary p { color: var(--text-secondary); font-size: 16px; margin: 0 0 8px; }

/* world-map header (global page): one static image, dark-to-light overlay */
.site-header--map { padding: 42px 0 40px; }
.site-header--map .hero-map { position: absolute; inset: 0; }
.site-header--map .hero-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-header--map .hero-map::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(1, 24, 34, 0.95) 0%, rgba(1, 24, 34, 0.8) 50%, rgba(1, 24, 34, 0.45) 100%);
}
/* quiet stat tiles inside the open layout's global cards */
.layout-open #dashboard .g-tiles .tile { background: #f5f8f6; box-shadow: none; border: 1px solid var(--line); padding: 12px 16px; }
.layout-open #dashboard .g-tiles { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.layout-open #dashboard .g-tiles .tile .t-value { font-size: 24px; }

/* share button beside the place title; overlay previews the share-card image */
.location-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.share-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.share-modal-backdrop { position: absolute; inset: 0; background: rgba(1, 14, 22, 0.62); }
.share-modal-box {
  position: relative; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
  padding: 22px 24px 20px; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto;
}
.share-modal-box h3 { margin: 0 0 12px; font-size: 19px; }
.share-modal-close {
  position: absolute; top: 10px; right: 14px; border: none; background: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--teal-grey);
}
.share-modal-close:hover { color: var(--navy); }
#share-modal-img { width: 100%; border-radius: var(--r-md); display: block; box-shadow: var(--shadow); }
.share-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.share-modal-note { margin: 10px 0 0; font-size: 12px; }

/* action rows stay boxed even in the open layout — containers signal interactivity */
.layout-open #dashboard .share-row {
  background: var(--card); box-shadow: var(--shadow); border-radius: var(--r-lg);
  padding: 18px 20px; margin: 0 0 48px;
}

/* story pages share the dashboard's 860px rail; paragraphs keep a reading measure */
.layout-open .story-article { max-width: 860px; }
.layout-open .story-body p { max-width: 700px; }

/* the temperature section has three stats — they flow as a row above the chart;
   labels may wrap to two lines, the numbers align on one shared line */
.layout-open #dashboard #kpis-temp {
  position: static; flex-direction: row; flex-wrap: wrap; align-items: stretch;
  gap: 12px 44px; text-align: left; margin: 18px 0 8px; max-width: none;
}
.layout-open #dashboard #kpis-temp .tile { display: flex; flex-direction: column; max-width: 210px; }
.layout-open #dashboard #kpis-temp .t-label { flex: 1 0 auto; }
@media (max-width: 700px) {
  .layout-open #dashboard h3 { max-width: none; }
  .layout-open .sec-kpis { position: static; flex-direction: row; flex-wrap: wrap; gap: 10px 32px; text-align: left; margin: 14px 0; max-width: none; }
}
/* stripes: first section, no number, generous height, aligned with the charts */
.layout-open #dashboard #sec-stripes { border-top: none; padding-top: 10px; }
.layout-open #dashboard #sec-stripes .stripes { height: 140px; border-radius: var(--r-md); }
.layout-open #dashboard #sec-stripes::before { display: none; }
/* explainers as quiet footnotes under each section */
.layout-open #dashboard .explain { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 10px; }
/* KPI-nav chips: lighter, underline style; severity colors the underline */
.layout-open .kpi-chip { background: transparent; border: none; border-bottom: 2px solid var(--line); border-radius: 0; padding: 4px 2px 7px; }
.layout-open .kpi-chip:hover { box-shadow: none; border-bottom-color: var(--teal); }
.layout-open .kpi-chip.kc-warm { background: transparent; border-bottom-color: #ef3b2c; }
.layout-open .kpi-chip.kc-strong { background: transparent; border-bottom-color: #99000d; border-bottom-width: 3px; }
.layout-open .kpi-chip.kc-strong b { color: #99000d; }
.layout-open .kpi-chip.kc-strong span { color: var(--text-secondary); }
.layout-open .kpi-chip.kc-dry { background: transparent; border-bottom-color: #bf812d; }
.layout-open .kpi-chip.kc-wet { background: transparent; border-bottom-color: #4292c6; }
