:root {
  --purple: #39265c;
  --purple-soft: #efeaf6;
  --teal: #42b6a9;
  --teal-soft: #e5f5f2;
  --ink: #2d2926;
  --paper: #fbfaf7;
  --cloud: #f1f1f1;
  --white: #ffffff;
  --line: rgba(45, 41, 38, 0.14);
  --muted: rgba(45, 41, 38, 0.68);
  --green: #2f7d4b;
  --green-soft: #e6f3ec;
  --amber: #a86400;
  --amber-soft: #fff2d8;
  --red: #9f2d20;
  --red-soft: #fae7e4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cloud);
  font-family: Montserrat, "Avenir Next", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--purple);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 22px;
}

/* The search/table page benefits from the full window width. */
body.page-wide .page {
  max-width: none;
}

.shell {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(45, 41, 38, 0.09);
}

.topbar {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 28px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 78px;
  background: var(--white);
}

.brand-logo {
  display: block;
  width: 108px;
  height: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--purple);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--white);
  background: var(--purple);
  border-color: var(--purple);
}

.pill.approved {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(47, 125, 75, 0.22);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.02;
}

h2 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.08;
}

h3 {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
}

p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.48;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 30px;
  padding: 34px 28px;
  border-bottom: 1px solid var(--line);
}

.hero-copy p:not(.eyebrow) {
  max-width: 820px;
  margin-top: 16px;
  font-size: 18px;
}

.summary-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  align-self: start;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat {
  min-height: 116px;
  padding: 18px;
  background: var(--white);
}

.stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  color: var(--purple);
  font-size: 38px;
  font-weight: 800;
  line-height: 0.95;
}

.stat p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.econ-explainer {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--purple);
  cursor: help;
  outline: none;
}

.lead-metric .econ-explainer {
  color: var(--teal);
}

.econ-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--white);
  background: var(--purple);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.econ-tooltip {
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + 10px);
  display: none;
  width: min(320px, 78vw);
  padding: 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(45, 41, 38, 0.16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.econ-tooltip span {
  display: block;
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
}

.econ-tooltip span:last-child {
  margin-bottom: 0;
}

.econ-tooltip b {
  color: var(--purple);
  font-weight: 800;
}

.evidence-item .econ-explainer {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  width: 100%;
  margin: 0;
  color: var(--purple);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
}

.evidence-item .econ-info {
  display: inline-flex;
  margin: 0;
  color: var(--white);
  font-size: 11px;
  line-height: 1;
  text-transform: none;
}

.evidence-item .econ-tooltip {
  display: none;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
}

.evidence-item .econ-tooltip span {
  display: block;
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
}

.evidence-item .econ-tooltip span:last-child {
  margin-bottom: 0;
}

.econ-explainer:hover .econ-tooltip,
.econ-explainer:focus-within .econ-tooltip {
  display: block;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(9, minmax(104px, 1fr)) auto;
  gap: 10px;
  padding: 22px 28px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.toolbar.compact {
  grid-template-columns: minmax(240px, 1fr) repeat(5, minmax(118px, 0.5fr)) auto;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
button {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

button {
  cursor: pointer;
  color: var(--purple);
  background: var(--white);
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--teal);
  outline: 2px solid rgba(66, 182, 169, 0.18);
}

.result-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px 0;
}

.result-line p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  padding: 18px 28px 30px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1660px;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.38;
}

th {
  color: var(--purple);
  background: var(--paper);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

th.sort-active {
  background: var(--purple-soft);
}

.sort-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button::after {
  content: "sort";
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  opacity: 0.64;
}

th.sort-asc .sort-button::after {
  content: "asc";
  color: var(--teal);
  opacity: 1;
}

th.sort-desc .sort-button::after {
  content: "desc";
  color: var(--teal);
  opacity: 1;
}

.sort-button:hover,
.sort-button:focus-visible {
  color: var(--teal);
  outline: none;
}

.sort-button:focus-visible {
  box-shadow: 0 2px 0 var(--teal);
}

tr:last-child td {
  border-bottom: 0;
}

.ref {
  color: var(--purple);
  font-weight: 800;
  white-space: nowrap;
}

.case-title {
  display: inline-block;
  max-width: 350px;
  font-size: 15px;
  line-height: 1.24;
}

.case-note {
  max-width: 390px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.route-note {
  max-width: 260px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.42;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.cat-measured {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(47, 125, 75, 0.26);
}

.cat-confirmed {
  color: #157a70;
  background: var(--teal-soft);
  border-color: rgba(66, 182, 169, 0.36);
}

.cat-claimed {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(168, 100, 0, 0.3);
}

.value-badge {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  background: var(--purple);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  max-width: 170px;
  padding: 6px 9px;
  color: var(--purple);
  background: var(--purple-soft);
  border: 1px solid rgba(57, 38, 92, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.status-human-approved,
.review-approved {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(47, 125, 75, 0.26);
}

.status-human-review-required,
.review-pending-review {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(168, 100, 0, 0.3);
}

.open-link {
  display: inline-flex;
  justify-content: center;
  min-width: 72px;
  padding: 8px 10px;
  color: var(--white);
  background: var(--purple);
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none;
}

.grid-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.55fr);
  gap: 22px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.single-panel {
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.panel {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.panel-title-row .econ-explainer {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.econ-tooltip.align-right {
  right: 0;
  left: auto;
}

.action-panel {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}

.action-panel .open-link {
  flex: 0 0 auto;
}

.panel p + p {
  margin-top: 12px;
}

.bar-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  overflow: hidden;
  height: 12px;
  background: var(--cloud);
  border-radius: 999px;
}

.bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  border-radius: inherit;
}

.bar-row strong,
.bar-row span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.map-section {
  align-items: stretch;
}

.map-panel {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.map-canvas {
  position: relative;
  width: 100%;
  max-width: 100%;
  flex: 1;
  height: 600px;
  min-height: 600px;
  overflow: hidden;
  background: #eef0f2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Prevent the Leaflet content from forcing its grid/flex parents wider. */
.grid-section > .panel {
  min-width: 0;
}

.map-canvas .leaflet-container,
.leaflet-container {
  font-family: "Montserrat", Arial, sans-serif;
}

/* Evidence dots: soft depth + smooth hover growth. */
.map-canvas path.ec-dot {
  filter: drop-shadow(0 1px 2px rgba(45, 41, 38, 0.4));
  transition: r 0.12s ease;
  cursor: pointer;
}

/* ── Live detail panel ──────────────────────────────────────────────────── */
.map-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
  padding: 22px;
}

.md-prompt {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.md-regions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.md-regions span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.md-regions strong {
  color: var(--purple);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.md-key {
  display: grid;
  gap: 8px;
}

.md-key-title {
  margin: 0;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.md-legend,
.md-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

.md-legend span,
.md-sizes span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.md-legend i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--white), 0 1px 2px rgba(45, 41, 38, 0.3);
}

.md-sizes i {
  display: inline-block;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--white);
}

/* Selected-card state */
.map-detail-panel.has-card {
  gap: 12px;
}

.md-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.md-ref {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-top .value-badge {
  margin-left: auto;
}

.md-title {
  margin: 0;
  color: var(--purple);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.18;
}

.md-take {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.md-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 2px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.md-meta dt {
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.md-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.md-route {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.md-route strong {
  color: var(--purple);
}

.md-open {
  align-self: flex-start;
  margin-top: 4px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
}

/* Gated teaser note shown in place of the full analysis on the public site. */
.md-locked {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  background: var(--cloud);
  border-radius: 8px;
}

.md-locked::before {
  content: "🔒 ";
}

/* ── Website embed (map-embed.html) ─────────────────────────────────────── */
body.page-embed {
  background: var(--white);
}

.embed-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.embed-topbar .brand-logo {
  display: block;
  width: 118px;
  height: auto;
}

.embed-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2.4vw, 28px);
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.embed-topbar nav a {
  padding: 4px 0;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.embed-topbar nav a:hover,
.embed-topbar nav a[aria-current="page"] {
  color: var(--purple);
  border-bottom-color: var(--teal);
}

.embed-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 0 0;
}

/* ── Homepage teaser (map-embed.html inside an iframe on index.html) ────── */
body.page-embed-mini {
  overflow: hidden;
}

.page-embed-mini .grid-section {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 14px;
  height: 100vh;
  padding: 0;
  border-bottom: 0;
}

.page-embed-mini .map-panel {
  padding: 0;
}

.page-embed-mini .map-canvas {
  height: 100%;
  min-height: 0;
}

.page-embed-mini .map-detail-panel {
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
}

/* When the grid collapses to one column, the map is the whole teaser. */
@media (max-width: 1060px) {
  .page-embed-mini .grid-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-embed-mini .map-detail-panel {
    display: none;
  }

  .page-embed-mini .map-canvas {
    height: 100vh;
    min-height: 0;
  }
}

.embed-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 26px 28px 10px;
}

.embed-head-copy {
  min-width: 0;
}

.embed-head h1 {
  margin: 4px 0 0;
  max-width: 880px;
  color: var(--purple);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.08;
}

.embed-sub {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

/* Call-to-action button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 11px 20px;
  background: var(--purple);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid var(--purple);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cta-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.cta-btn-block {
  width: 100%;
}

/* "What's covered" — crawlable content + tempt */
.about-section {
  margin: 8px 28px 0;
  padding: 28px 30px;
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.about-copy h2 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  line-height: 1.15;
}

.about-copy p {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
}

.about-copy strong {
  color: var(--purple);
}

.about-list {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.about-list li {
  position: relative;
  padding: 12px 14px 12px 16px;
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
}

.about-list strong {
  color: var(--purple);
}

.about-faq {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.about-faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.about-faq summary {
  padding: 12px 16px;
  color: var(--purple);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.about-faq summary::-webkit-details-marker {
  display: none;
}

.about-faq summary::after {
  content: "+";
  float: right;
  color: var(--teal);
  font-weight: 800;
}

.about-faq details[open] summary::after {
  content: "\2212";
}

.about-faq details p {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .embed-topbar {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
  }

  .embed-topbar .brand-logo {
    width: 96px;
  }

  .embed-topbar nav {
    gap: 8px 14px;
    justify-content: flex-end;
    font-size: 13px;
    line-height: 1.2;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* CTA band */
.cta-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  margin: 8px 28px 0;
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cta-copy h2 {
  margin: 6px 0 0;
  color: var(--purple);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.15;
}

.cta-copy p {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
}

.cta-points {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.cta-points li {
  position: relative;
  padding-left: 20px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
}

.cta-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
}

.cta-points strong {
  color: var(--purple);
}

.cta-form {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cta-form > label {
  display: grid;
  gap: 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cta-form input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cta-form input[type="text"]:focus {
  outline: none;
  border-color: var(--teal);
}

.cta-intent {
  display: grid;
  gap: 7px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.cta-intent legend {
  padding: 0;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cta-radio {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.cta-radio input {
  width: auto;
  margin: 0;
}

.cta-fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.cta-sent {
  margin: 0;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
}

.embed-foot {
  padding: 20px 28px 30px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.embed-foot p {
  max-width: 880px;
  margin: 0 0 8px;
}

.embed-foot .legal-line {
  max-width: 960px;
  color: rgba(45, 41, 38, 0.56);
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .cta-band {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ── Map filter bar ─────────────────────────────────────────────────────── */
.filter-bar {
  padding: 18px 28px 4px;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 26px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: auto;
  padding: 5px 11px;
  background: var(--white);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.1;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.filter-chip span {
  padding: 1px 6px;
  background: var(--cloud);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  transition: background 0.12s ease, color 0.12s ease;
}

.filter-chip:hover {
  border-color: var(--teal);
}

.filter-chip.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

.filter-chip.active span {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  align-self: center;
  margin-left: auto;
}

.filter-count {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-count.is-filtered {
  color: var(--purple);
  font-weight: 800;
}

.filter-reset {
  width: auto;
  padding: 6px 14px;
  background: var(--white);
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.filter-reset:hover {
  border-color: var(--purple);
}

/* ── Mix row (geography / strength / sector) ────────────────────────────── */
.mix-section {
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.mix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.mix-note {
  margin: 6px 0 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

@media (max-width: 1060px) {
  .mix-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .map-canvas {
    height: 440px;
    min-height: 440px;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label count"
      "track track";
    gap: 7px 10px;
  }

  .bar-row strong {
    grid-area: label;
  }

  .bar-track {
    grid-area: track;
  }

  .bar-row span {
    grid-area: count;
    text-align: right;
  }
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.leaflet-popup-content {
  min-width: 220px;
  margin: 14px 16px;
  color: var(--ink);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.38;
}

.leaflet-popup-content strong,
.leaflet-popup-content span,
.leaflet-popup-content em,
.leaflet-popup-content small,
.leaflet-popup-content a {
  display: block;
}

.leaflet-popup-content strong {
  color: var(--purple);
  font-size: 13px;
  line-height: 1.25;
}

.leaflet-popup-content span {
  margin-top: 8px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
}

.leaflet-popup-content em {
  margin-top: 8px;
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

.leaflet-popup-content small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.leaflet-popup-content a {
  margin-top: 10px;
  color: var(--purple);
  font-weight: 800;
}

.leaflet-evidence-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(45, 41, 38, 0.08);
}

.leaflet-evidence-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.leaflet-evidence-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.leaflet-count-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(520px, calc(100vw - 120px));
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(45, 41, 38, 0.08);
}

.leaflet-count-strip span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.leaflet-count-strip strong {
  color: var(--purple);
}

.map-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-fallback {
  display: grid;
  min-height: inherit;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.value-card {
  min-height: auto;
  padding: 14px 16px;
  background: var(--white);
}

.value-card strong {
  display: block;
  color: var(--purple);
  font-size: 24px;
  line-height: 1;
}

.value-card span {
  display: block;
  margin: 7px 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.value-card p {
  max-width: 520px;
  font-size: 12px;
  line-height: 1.42;
}

.empty {
  display: none;
  padding: 24px 28px 34px;
  color: var(--muted);
  font-weight: 700;
}

footer {
  padding: 20px 28px 26px;
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
}

.horizon {
  height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--teal));
}

@media (max-width: 1060px) {
  .topbar,
  .hero,
  .grid-section,
  .toolbar,
  .toolbar.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav {
    justify-content: flex-start;
  }

  .action-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 10px;
  }

  .topbar,
  .hero,
  .toolbar,
  .result-line,
  .table-wrap,
  .grid-section,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .summary-panel {
    grid-template-columns: 1fr;
  }
}

/* ── View controls (table / grid / present) ────────────────────────────── */
.result-line {
  padding-bottom: 14px;
}

.view-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-height: 32px;
  padding: 5px 13px;
  color: var(--purple);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}

.view-btn:hover:not(.active) {
  background: var(--paper);
  border-color: var(--purple);
}

.view-btn.active {
  color: var(--white);
  background: var(--purple);
  border-color: var(--purple);
}

.view-btn.present-active {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

/* ── Grid view ──────────────────────────────────────────────────────────── */
.view-grid .table-wrap { display: none; }
.view-grid #emptyState { display: none !important; }
.view-grid .card-grid { display: grid; }

.card-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  padding: 4px 28px 30px;
}

.card-grid-empty {
  grid-column: 1 / -1;
  padding: 24px 0;
  color: var(--muted);
  font-weight: 700;
}

.card-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.14s, border-color 0.14s;
  outline: none;
}

.card-tile:hover,
.card-tile:focus-visible {
  box-shadow: 0 6px 24px rgba(57, 38, 92, 0.14);
  border-color: var(--teal);
}

.ct-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ct-ref {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ct-val {
  margin-left: auto;
}

.ct-title {
  margin: 0;
  color: var(--purple);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.26;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ct-take {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.46;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ct-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.ct-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.ct-open {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  color: var(--white);
  background: var(--purple);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-tile:hover .ct-open {
  background: var(--teal);
}

/* ── Present mode — hides detail columns ────────────────────────────────── */
.present-cols th:nth-child(10),
.present-cols td:nth-child(10),
.present-cols th:nth-child(11),
.present-cols td:nth-child(11),
.present-cols th:nth-child(12),
.present-cols td:nth-child(12) {
  display: none;
}

/* ── Keyboard hint ──────────────────────────────────────────────────────── */
.kbd-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    padding-left: 18px;
    padding-right: 18px;
  }
  .kbd-hint { display: none; }
}
