:root {
  --paper: #f7f3ea;
  --paper-deep: #efe8d8;
  --ink: #20251f;
  --ink-soft: #5a6052;
  --green: #1d4d3b;
  --green-bright: #2e7d5b;
  --amber: #e8a013;
  --amber-deep: #b87400;
  --teal: #16808c;
  --rule: #d8cfba;
  --card: #fffdf8;
  --shadow: 0 2px 14px rgba(32, 37, 31, .14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.45;
}

#app { display: flex; height: 100vh; height: 100dvh; }

/* ---------- panel ---------- */
#panel {
  width: 348px;
  min-width: 348px;
  overflow-y: auto;
  background:
    linear-gradient(160deg, rgba(232,160,19,.05), transparent 30%),
    var(--paper);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.panel-head {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--rule);
  background:
    repeating-linear-gradient(-45deg, transparent 0 7px, rgba(29,77,59,.035) 7px 8px);
}
.kicker {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber-deep);
  font-weight: 700;
  margin-bottom: 6px;
}
.panel-head h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 27px;
  line-height: 1.08;
  margin: 0 0 8px;
  color: var(--green);
}
.panel-head h1 em {
  font-style: italic;
  color: var(--amber-deep);
}
.standfirst {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.control-block {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
}
.control-block h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  margin: 0 0 10px;
  color: var(--green);
}

/* metric tabs */
.metric-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.metric-tab {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.metric-tab:hover { border-color: var(--green-bright); color: var(--green); }
.metric-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #f7f3ea;
}
.metric-note {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

/* legend */
#legend { margin-top: 12px; }
.legend-ramp { display: flex; gap: 2px; }
.legend-ramp .cell { flex: 1; height: 13px; border-radius: 2px; }
.legend-labels {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--ink-soft); margin-top: 3px;
}
.legend-bivar { display: flex; align-items: flex-end; gap: 10px; }
.bivar-grid {
  display: grid;
  grid-template-columns: repeat(3, 26px);
  grid-template-rows: repeat(3, 26px);
  gap: 2px;
  transform: rotate(-45deg) translateY(6px);
  margin: 18px 12px 22px;
}
.bivar-grid .cell { border-radius: 2px; }
.bivar-axis { font-size: 10.5px; color: var(--ink-soft); line-height: 1.5; }

/* layer toggles */
.layer-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.layer-toggle input { accent-color: var(--green-bright); width: 15px; height: 15px; }
.swatch {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid rgba(32,37,31,.4);
  flex-shrink: 0;
}
.sw-org   { background: var(--amber); }
.sw-proj  { background: var(--green-bright); }
.sw-redress { background: #7d4fb3; }
.sw-knowledge { background: #2d5fa6; }
.sw-infra { background: var(--teal); border-radius: 3px; }
.sw-grid  { background: linear-gradient(90deg,#2e9e5b 33%,#e8a013 33% 66%,#cb4b3a 66%); }
.sw-dno   { background: transparent; border: 2px dashed var(--ink-soft); border-radius: 2px; }
.count { margin-left: auto; font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* detail card */
#detail { font-size: 12.5px; }
.detail-empty { color: var(--ink-soft); font-style: italic; }
.detail-card h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 650;
  margin: 0 0 2px; color: var(--green);
}
.detail-card .sub { color: var(--ink-soft); font-size: 11.5px; margin-bottom: 10px; }
.stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; border-top: 1px dotted var(--rule);
}
.stat-row .k { color: var(--ink-soft); }
.stat-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.decile-pips { display: flex; gap: 2px; margin-top: 2px; }
.decile-pips span {
  width: 14px; height: 7px; border-radius: 1.5px; background: var(--paper-deep);
}

/* footer */
.panel-foot {
  margin-top: auto;
  padding: 14px 22px 18px;
}
.link-btn {
  background: none; border: none; padding: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  color: var(--green-bright); text-decoration: underline; cursor: pointer;
}
.attribution { font-size: 10px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

/* ---------- map ---------- */
#map-wrap { flex: 1; position: relative; }
#map { position: absolute; inset: 0; background: #e7e2d4; }

#search-box {
  position: absolute; top: 14px; left: 14px; z-index: 4;
  width: 240px;
}
#search {
  width: 100%;
  font-family: var(--font-body); font-size: 13px;
  padding: 9px 12px;
  border: 1.5px solid var(--rule); border-radius: 8px;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow);
  outline: none;
}
#search:focus { border-color: var(--green-bright); }
#search-results {
  background: var(--card); border-radius: 8px; margin-top: 4px;
  box-shadow: var(--shadow); overflow: hidden;
}
#search-results div {
  padding: 8px 12px; font-size: 12.5px; cursor: pointer;
}
#search-results div:hover { background: var(--paper-deep); }

#zoom-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: rgba(32,37,31,.82); color: #f7f3ea;
  font-size: 12px; padding: 6px 14px; border-radius: 999px;
  pointer-events: none; opacity: 0; transition: opacity .4s;
  z-index: 4;
}
#zoom-hint.show { opacity: 1; }

/* popups */
.maplibregl-popup-content {
  font-family: var(--font-body);
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 12.5px;
  max-width: 260px;
}
.maplibregl-popup-content h4 {
  font-family: var(--font-display);
  margin: 0 0 4px; font-size: 14px; color: var(--green);
}
.maplibregl-popup-content .tag {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--paper-deep); color: var(--ink-soft);
  margin: 0 4px 6px 0;
}
.maplibregl-popup-content p { margin: 4px 0 0; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(32,37,31,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  position: relative;
  background: var(--paper);
  border-radius: 12px;
  max-width: 620px; max-height: 84vh; overflow-y: auto;
  padding: 28px 32px;
  box-shadow: 0 12px 50px rgba(0,0,0,.3);
}
.modal-card h2 {
  font-family: var(--font-display); font-weight: 900;
  color: var(--green); margin: 0 0 12px; font-size: 22px;
}
.modal-card ul { padding-left: 20px; }
.modal-card li { margin-bottom: 8px; }
.modal-card .small { font-size: 12px; color: var(--ink-soft); }
.modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 26px; color: var(--ink-soft);
  cursor: pointer; line-height: 1;
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  #app { flex-direction: column-reverse; }
  #panel {
    width: 100%; min-width: 0;
    max-height: 46vh;
    border-right: none; border-top: 1px solid var(--rule);
  }
  .panel-head h1 { font-size: 21px; }
  #search-box { width: calc(100% - 28px); }
}

/* ============================================================
   View navigation (shared map ↔ explorer)
   ============================================================ */
.view-nav { display: flex; gap: 6px; margin-top: 12px; }
.view-pill {
  font-size: 12px; font-weight: 600; text-decoration: none;
  padding: 5px 12px; border-radius: 999px;
  border: 1.5px solid var(--rule); background: var(--card); color: var(--ink-soft);
  transition: all .15s ease;
}
.view-pill:hover { border-color: var(--green-bright); color: var(--green); }
.view-pill.active { background: var(--green); border-color: var(--green); color: var(--paper); }

/* ============================================================
   Data explorer page
   ============================================================ */
.explore-body { background: var(--paper); overflow-y: auto; height: auto; min-height: 100%; }
.explore-top {
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(160deg, rgba(232,160,19,.06), transparent 40%),
    repeating-linear-gradient(-45deg, transparent 0 7px, rgba(29,77,59,.03) 7px 8px),
    var(--paper);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(2px);
}
.explore-top-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: 16px 28px;
}
.explore-top h1 {
  font-family: var(--font-display); font-weight: 900; font-size: 25px; line-height: 1.05;
  margin: 4px 0 0; color: var(--green);
}
.explore-top h1 em { font-style: italic; color: var(--amber-deep); }
.explore-top .view-nav { margin: 0; }

.explore-main { max-width: 1180px; margin: 0 auto; padding: 22px 28px 64px; }
.lead { font-size: 15px; max-width: 78ch; margin: 0 0 18px; color: var(--ink); }
.lead .link-btn { font-size: 13px; margin-left: 4px; }

/* stat strip */
.stat-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px;
}
.stat {
  flex: 1 1 150px; background: var(--card); border: 1px solid var(--rule);
  border-radius: 10px; padding: 12px 16px;
}
.stat-v {
  font-family: var(--font-display); font-weight: 900; font-size: 24px; color: var(--green);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stat-k { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; }

/* lens tabs */
.lens-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1.5px solid var(--rule); margin-bottom: 18px; }
.lens-tab {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border: none; background: none; color: var(--ink-soft);
  cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
}
.lens-tab:hover { color: var(--green); }
.lens-tab.active { color: var(--green); border-bottom-color: var(--amber); }

.lens-intro { font-size: 13.5px; color: var(--ink-soft); max-width: 84ch; margin: 0 0 16px; line-height: 1.55; }
.lens-intro strong { color: var(--ink); }
.rstat { display: inline-block; margin-top: 6px; color: var(--ink); }
.rstat strong { color: var(--amber-deep); }

/* badges */
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; color: #fff; white-space: nowrap;
}
.badge.thriving   { background: var(--green-bright); }
.badge.latent     { background: var(--amber-deep); }
.badge.pioneering { background: var(--teal); }
.badge.cold       { background: #8a8474; }

/* ---------- controls ---------- */
.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px;
}
.ctrl-input {
  font-family: var(--font-body); font-size: 13px;
  padding: 7px 11px; border: 1.5px solid var(--rule); border-radius: 8px;
  background: var(--card); color: var(--ink); outline: none;
}
.ctrl-input:focus { border-color: var(--green-bright); }
#t-search { min-width: 190px; }
.ctrl-slider {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft);
}
.ctrl-slider input[type=range] { accent-color: var(--green-bright); width: 130px; }
.ctrl-slider span { font-variant-numeric: tabular-nums; min-width: 46px; }
.ctrl-spacer { flex: 1; }
.ctrl-count { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- data table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  text-align: right; padding: 10px 12px; font-weight: 700; color: var(--ink-soft);
  white-space: nowrap; cursor: pointer; position: sticky; top: 0;
  background: var(--paper-deep); border-bottom: 1.5px solid var(--rule); user-select: none;
}
.data-table th.tl { text-align: left; }
.data-table th:hover { color: var(--green); }
.data-table th.sorted { color: var(--green); }
.data-table th.sorted.asc::after { content: " ▲"; font-size: 9px; }
.data-table th.sorted.desc::after { content: " ▼"; font-size: 9px; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.tl { text-align: left; font-weight: 600; color: var(--ink); }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--paper); }
.data-table tbody tr:last-child td { border-bottom: none; }

.minibar {
  display: inline-block; width: 38px; height: 6px; background: var(--paper-deep);
  border-radius: 3px; vertical-align: middle; margin-right: 7px; overflow: hidden;
}
.minibar i { display: block; height: 100%; background: var(--green-bright); }
.minibar.wide { width: 100%; height: 8px; }

/* ---------- typology / scatter ---------- */
.typo-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.scatter { flex: 1 1 460px; min-width: 320px; max-width: 780px; height: auto;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.scatter .q-thriving   { fill: rgba(46,125,91,.09); }
.scatter .q-latent     { fill: rgba(232,160,19,.13); }
.scatter .q-pioneering { fill: rgba(22,128,140,.07); }
.scatter .q-cold       { fill: rgba(138,132,116,.09); }
.scatter .med { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 4 4; opacity: .55; }
.scatter .axlab { font-family: var(--font-body); font-size: 12px; font-weight: 600; fill: var(--ink-soft); }
.scatter .axlab.small { font-size: 10.5px; font-weight: 600; }
.scatter .qlab { font-family: var(--font-body); font-size: 12px; font-weight: 800; letter-spacing: .08em; opacity: .8; }
.scatter .badge-thriving   { fill: var(--green-bright); }
.scatter .badge-latent     { fill: var(--amber-deep); }
.scatter .badge-pioneering { fill: var(--teal); }
.scatter .badge-cold       { fill: #8a8474; }
.scatter .dot { cursor: pointer; transition: stroke-width .1s; }
.scatter .dot:hover { stroke-width: 1.6; }

.typo-side { flex: 1 1 280px; min-width: 240px; display: flex; flex-direction: column; gap: 16px; }
.typo-list h3 {
  font-family: var(--font-display); font-size: 14px; font-weight: 650; color: var(--green);
  margin: 0 0 8px; display: flex; align-items: center; gap: 7px; line-height: 1.3;
}
.typo-list ol { list-style: none; margin: 0; padding: 0; }
.typo-list li, .mm-card li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 6px 0; border-top: 1px dotted var(--rule); font-size: 12.5px; cursor: pointer;
}
.typo-list li:hover, .mm-card li:hover { color: var(--green); }
.typo-list li span, .mm-card li span { font-weight: 600; }
.typo-list li em, .mm-card li em {
  font-style: normal; color: var(--ink-soft); font-size: 11.5px; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mm-empty { color: var(--ink-soft); font-style: italic; cursor: default; }

/* ---------- mismatch grid ---------- */
.mismatch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.mm-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; }
.mm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-head h3 { font-family: var(--font-display); font-size: 15px; font-weight: 650; color: var(--green); margin: 0; }
.mm-count {
  font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--amber-deep);
  font-variant-numeric: tabular-nums;
}
.mm-sub { font-size: 12px; color: var(--ink-soft); margin: 4px 0 8px; line-height: 1.5; }
.mm-card ol { list-style: none; margin: 0; padding: 0; }
.mm-more { font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- detail drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 384px; max-width: 92vw;
  background: var(--card); box-shadow: -8px 0 36px rgba(32,37,31,.22); z-index: 60;
  overflow-y: auto; padding: 24px 26px 48px;
}
.drawer.hidden { display: none; }
.drawer-scrim { position: fixed; inset: 0; background: rgba(32,37,31,.32); z-index: 55; }
.drawer-scrim.hidden { display: none; }
.drawer-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 26px; color: var(--ink-soft); cursor: pointer; line-height: 1;
}
.d-kicker { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.drawer h2 { font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--green); margin: 0 0 4px; }
.d-typblurb { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 16px; font-style: italic; }
.d-axes { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.d-axis { display: grid; grid-template-columns: 130px 1fr 32px; align-items: center; gap: 8px; font-size: 12px; }
.d-axis > span { color: var(--ink-soft); }
.d-axis b { text-align: right; font-variant-numeric: tabular-nums; }
.d-scores { display: flex; gap: 10px; margin-bottom: 16px; }
.d-score { flex: 1; background: var(--paper); border: 1px solid var(--rule); border-radius: 9px; padding: 9px 12px; }
.d-score span { display: block; font-size: 11px; color: var(--ink-soft); }
.d-score b { font-family: var(--font-display); font-size: 19px; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-grid { display: flex; flex-direction: column; }
.d-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px dotted var(--rule); font-size: 12.5px; }
.d-row span { color: var(--ink-soft); }
.d-row strong { font-variant-numeric: tabular-nums; text-align: right; }
.d-maplink {
  display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 700;
  color: var(--green-bright); text-decoration: none; padding: 9px 16px;
  border: 1.5px solid var(--green-bright); border-radius: 8px;
}
.d-maplink:hover { background: var(--green); border-color: var(--green); color: var(--paper); }

.modal-scroll { max-height: 64vh; overflow-y: auto; }

/* ---------- explorer mobile ---------- */
@media (max-width: 760px) {
  .explore-top-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px; }
  .explore-main { padding: 18px 18px 56px; }
  .lead { font-size: 14px; }
  .typo-wrap { flex-direction: column; }
  .scatter { width: 100%; }
}

/* ---------- headline findings (explorer) ---------- */
.findings { margin: 6px 0 22px; }
.findings-h {
  font-family: var(--font-display); font-size: 15px; font-weight: 650;
  color: var(--green); margin: 0 0 8px;
}
.findings-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px;
}
.findings-list li {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 11px 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft);
}
.findings-list li strong { color: var(--ink); }
.findings-list li a { color: var(--green-bright); font-weight: 700; text-decoration: none; }
.findings-list li a:hover { text-decoration: underline; }

/* ---------- capacity filter chips (explorer table) ---------- */
.ctrl-chips { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.chips-label { font-size: 12px; color: var(--ink-soft); margin-right: 2px; }
.chip {
  font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--rule); border-radius: 999px;
  padding: 3px 10px; cursor: pointer;
}
.chip:hover { border-color: var(--green-bright); color: var(--green); }
.chip.on { background: var(--green); border-color: var(--green); color: var(--paper); }

/* diverging opportunity column */
.data-table td.pos { color: var(--green-bright); font-weight: 700; }
.data-table td.neg { color: var(--ink-soft); }

/* scatter ticks */
.scatter .tick { font-size: 9.5px; fill: var(--ink-soft); opacity: 0.8; }

/* drawer score subtext */
.d-score i { display: block; font-style: normal; font-size: 10px; color: var(--ink-soft); margin-top: 2px; }

/* ============================================================
   Insights report page
   ============================================================ */
.report { max-width: 860px; }
.report-date { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-soft); }

.report-toc {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  padding: 12px 0; margin: 4px 0 10px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.report-toc a {
  font-size: 12px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
}
.report-toc a:hover { color: var(--green); }

.report-s { margin: 34px 0 0; }
.report-s h2 {
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  color: var(--green); line-height: 1.15; margin: 0 0 14px;
  display: flex; align-items: baseline; gap: 12px;
}
.s-num {
  font-size: 15px; font-weight: 650; color: var(--amber-deep);
  border: 1.5px solid var(--amber-deep); border-radius: 999px;
  width: 26px; height: 26px; min-width: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  transform: translateY(-2px);
}
.report-s p { font-size: 14.5px; line-height: 1.62; max-width: 72ch; margin: 0 0 14px; }
.report-s p .n, .report-s p strong.n { font-variant-numeric: tabular-nums; }
.report-s strong { color: var(--ink); }
.report-s .badge { vertical-align: 1px; }

.pull {
  font-family: var(--font-display); font-size: 19px; font-weight: 650; font-style: italic;
  color: var(--green); border-left: 3px solid var(--amber); padding: 2px 0 2px 16px;
  margin: 20px 0 20px !important; max-width: 56ch !important;
}

.fig { margin: 20px 0 22px; }
.fig > div { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px; }
.fig figcaption { font-size: 11.5px; color: var(--ink-soft); margin-top: 7px; line-height: 1.5; max-width: 78ch; }
.fig-pair { display: flex; flex-wrap: wrap; gap: 10px; }
.fig-pair .fig-cell { flex: 1 1 300px; }
.fig-cell h4 {
  font-family: var(--font-display); font-size: 13px; font-weight: 650;
  color: var(--green); margin: 2px 0 6px 4px;
}
#fig-redress svg { max-width: 420px; }

.chart { width: 100%; height: auto; display: block; }
.chart .tick { font-family: var(--font-body); font-size: 10.5px; fill: var(--ink-soft); }
.chart .val { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; fill: var(--ink); }
.chart .leg { font-family: var(--font-body); font-size: 11.5px; font-weight: 600; fill: var(--ink-soft); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .parity { stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 5 4; }
.chart .parity-lab { font-family: var(--font-body); font-size: 10px; font-weight: 600; fill: var(--ink-soft); }
.chart .axlab { font-family: var(--font-body); font-size: 11px; font-weight: 600; fill: var(--ink-soft); }
.chart .axlab.small { font-size: 10px; }
.chart .stack-lab { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; fill: #fff; }
.chart .rowlink { cursor: pointer; }
.chart .rowlink:hover { stroke-width: 1.4; }

.report-lists {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin: 18px 0;
}
.report-lists.one { grid-template-columns: minmax(260px, 560px); }
.report-lists li a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%; color: inherit; text-decoration: none;
}
.report-lists li a:hover span { color: var(--green); }

.caveats {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 18px 22px; margin-top: 40px;
}
.caveat-h {
  font-family: var(--font-display); font-size: 16px !important; font-weight: 650;
  margin-bottom: 8px !important;
}
.caveats ul { margin: 0; padding-left: 18px; }
.caveats li { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 7px; }
.caveats a { color: var(--green-bright); }

@media (max-width: 760px) {
  .report-s h2 { font-size: 19px; }
  .pull { font-size: 17px; }
}

/* ---------- explorer scores in the map's detail panel ---------- */
.detail-card .badge { vertical-align: 1px; }
.typ-blurb { font-size: 11.5px; color: var(--ink-soft); margin: 6px 0 10px; line-height: 1.45; }
.detail-card .d-axes { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.detail-card .d-axis { grid-template-columns: 104px 1fr 34px; font-size: 11.5px; }
.explore-link {
  display: inline-block; margin: 12px 0 4px; font-size: 12.5px; font-weight: 700;
  color: var(--green-bright); text-decoration: none;
}
.explore-link:hover { text-decoration: underline; }
