/* ==========================================================================
   KIAMIS — National Agricultural Intelligence Dashboard
   Public-facing design system. Concept build.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --green-950: #0f3339;
  --green-900: #184c5a;
  --green-800: #185060;
  --green-700: #236477;
  --green-600: #0e774b;
  --green-500: #12845a;
  --green-400: #22a06b;
  --green-100: #e4f3ec;
  --green-50: #f0f7f3;

  --gold: #c8a036;
  --gold-light: #e8d48a;

  --ink: #1a3338;
  --ink-2: #2f4f56;
  --muted: #5f7379;
  --muted-2: #8a9ea4;

  --line: #dde5e7;
  --line-2: #ecefe8;
  --bg: #f6f6f2;
  --card: #ffffff;

  --up: #15803d;
  --down: #dc2626;

  --tint-green-bg: #e7f7ec;   --tint-green-fg: #15803d;
  --tint-amber-bg: #fef4e2;   --tint-amber-fg: #b45309;
  --tint-violet-bg: #f1ebfe;  --tint-violet-fg: #6d28d9;
  --tint-blue-bg: #e7effd;    --tint-blue-fg: #1d4ed8;
  --tint-orange-bg: #feeee2;  --tint-orange-fg: #c2410c;
  --tint-teal-bg: #e2f6f4;    --tint-teal-fg: #0f766e;
  --tint-brown-bg: #f4ede2;   --tint-brown-fg: #8a5a2b;
  --tint-sky-bg: #e4f2fd;     --tint-sky-fg: #0369a1;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 12px;

  --shadow-xs: 0 1px 2px rgba(13, 27, 19, .05);
  --shadow-sm: 0 1px 3px rgba(13, 27, 19, .06);
  --shadow-md: 0 2px 6px rgba(13, 27, 19, .08);
  --shadow-lg: 0 4px 12px rgba(13, 27, 19, .10);

  --surface: #ffffff;

  --gutter: 22px;
  --maxw: 1340px;

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --num: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* --- Utility bar -------------------------------------------------------- */
.utilbar {
  background: var(--green-950);
  color: rgba(255, 255, 255, .88);
  font-size: 11.5px;
  letter-spacing: .01em;
}

.utilbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
}

.utilbar__group { display: flex; align-items: center; gap: 18px; }

.utilbar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease;
}

.utilbar a.utilbar__item:hover { color: #fff; }
.utilbar__item svg { width: 13px; height: 13px; opacity: .75; }
.utilbar__hint { opacity: .62; }
.utilbar__item--link { transition: color .15s ease; }
.utilbar__item--link:hover { color: #fff; }

.utilbar__group--right { margin-left: auto; }

.utilbar__sep { width: 1px; height: 13px; background: rgba(255, 255, 255, .2); flex: none; }

.utilbar .lang-toggle--util {
  font-size: 11.5px;
  font-weight: 650;
  gap: 1px;
}

.utilbar .lang-toggle__btn {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, .72);
  transition: color .15s ease, background .15s ease;
}

.utilbar .lang-toggle__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.utilbar .lang-toggle__btn.is-active {
  color: #fff;
  font-weight: 700;
}

.utilbar .lang-toggle__sep {
  opacity: .45;
  font-size: 10px;
}

.utilbar__flag {
  width: 17px; height: 12px; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28);
}

/* --- Unified top bar (logos + nav) -------------------------------------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 rgba(13, 27, 19, .02);
}

.topbar.is-stuck {
  box-shadow: none;
  border-bottom-color: #d5e0d9;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.topbar__logo img {
  display: block;
  height: 42px;
  width: auto;
}

.topbar__logo--kadic img { height: 36px; }

.topbar__sep {
  width: 3px;
  height: 34px;
  border-radius: 2px;
  flex: none;
  background: linear-gradient(
    180deg,
    #111111 0%,
    #111111 30%,
    #b7202e 30%,
    #b7202e 58%,
    #0f7a3d 58%,
    #0f7a3d 100%
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .4);
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}

.topbar__nav::-webkit-scrollbar { display: none; }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.lang-toggle__btn {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}

.lang-toggle__btn:hover {
  color: var(--green-700);
  background: var(--green-50);
}

.lang-toggle__btn.is-active {
  color: var(--green-800);
  font-weight: 700;
}

.lang-toggle__sep {
  opacity: .35;
  font-size: 11px;
  user-select: none;
}

.telemetry-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .25);
  animation: telemetry-pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  margin-right: 5px;
  vertical-align: middle;
}

@keyframes telemetry-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.2); }
}

.utilbar__item--telemetry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .02em;
}

.utilbar__item--telemetry strong {
  color: #fde047;
  font-weight: 750;
  letter-spacing: .06em;
}

.utilbar__feed-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .85);
  font-size: 10.5px;
}
.utilbar__feed-badge svg { width: 11px; height: 11px; color: #38bdf8; }

.topbar__war-room-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid #c9d8d3;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f3339, #184c5a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 51, 57, .12);
  transition: all .2s ease;
}

.topbar__war-room-toggle:hover {
  background: linear-gradient(135deg, #184c5a, #236478);
  border-color: #d4af37;
  box-shadow: 0 4px 12px rgba(15, 51, 57, .22);
  transform: translateY(-1px);
}

.topbar__war-room-toggle.is-active {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, .35);
}

.topbar__war-room-toggle svg {
  width: 14px;
  height: 14px;
  color: #38bdf8;
}

.topbar__war-room-toggle.is-active svg {
  color: #fff;
}

.topbar__login {
  padding: 8px 18px;
  border-radius: 8px;
  background: #184c5a;
  border: 1px solid #14404c;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(24, 76, 90, .2);
  transition: all .2s ease;
}

.topbar__login:hover {
  background: #0e774b;
  border-color: #0b633e;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 119, 75, .3);
  transform: translateY(-1px);
}

.topbar__login:active {
  transform: translateY(0);
}

.topbar__register-short { display: none; }

.nav__drop {
  position: relative;
  flex: none;
}

.nav__drop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav__icon {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: .68;
  color: var(--muted);
  transition: opacity .15s ease, color .15s ease;
}

.nav__link:hover .nav__icon,
.nav__link.is-active .nav__icon,
.nav__drop:hover > .nav__trigger .nav__icon {
  opacity: 1;
  color: var(--green-600);
}

.nav__chev {
  width: 11px;
  height: 11px;
  opacity: .55;
  transition: transform .18s ease;
}

.nav__drop.is-open .nav__chev,
.nav__drop:hover .nav__chev { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 196px;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
  z-index: 80;
}

.nav__drop.is-open .nav__menu,
.nav__drop:hover .nav__menu,
.nav__drop:focus-within .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.nav__menu a .nav__icon {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: .72;
  color: var(--muted);
  transition: opacity .15s ease, color .15s ease;
}

.nav__menu a:hover {
  background: var(--green-50);
  color: var(--green-700);
}

.nav__menu a:hover .nav__icon {
  opacity: 1;
  color: var(--green-600);
}

/* --- Nav links ---------------------------------------------------------- */
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 10px;
  font-size: 12.75px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color .15s ease, background .15s ease;
}

.nav__link:hover { color: var(--green-700); background: var(--green-50); }

.nav__link.is-active,
.nav__trigger.is-active {
  color: var(--green-800);
  font-weight: 700;
  background: transparent;
}

.nav__link.is-active::after,
.nav__trigger.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--green-600);
}

.nav__link.is-active:hover,
.nav__trigger.is-active:hover {
  background: transparent;
  color: var(--green-800);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}

.btn svg { width: 14px; height: 14px; }

.btn--primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: none;
}

.btn--primary:hover {
  background: var(--green-700);
  box-shadow: none;
}
.btn--primary:active { transform: none; }

.btn--ghost { border: 1px solid var(--line); color: var(--ink-2); background: var(--card); }
.btn--ghost:hover { border-color: var(--green-400); color: var(--green-700); background: var(--green-50); }

.btn--outline-light {
  border: 1.5px solid rgba(255, 255, 255, .72);
  color: #fff;
  background: transparent;
  border-radius: 999px;
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, .1);
  border-color: #fff;
}

.btn--gold {
  background: var(--gold);
  color: var(--green-950);
  border-radius: 999px;
  font-weight: 700;
}

.btn--gold:hover {
  background: var(--gold-light);
}

.nav-toggle { display: none; padding: 8px; border-radius: var(--r-sm); }
.nav-toggle svg { width: 20px; height: 20px; }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-pattern.svg");
  background-repeat: no-repeat;
  background-position: right -40px center;
  background-size: auto 160%;
  opacity: .18;
  pointer-events: none;
}

.hero .shell {
  position: relative;
  z-index: 1;
  padding-top: 10px;
  padding-bottom: 18px;
}

/* Compact hero: one line — title left, meta chips right */
.hero--compact .shell {
  padding-top: 6px;
  padding-bottom: 4px;
}

.hero--compact::after {
  opacity: .12;
  background-size: auto 140%;
}

.hero__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero__headline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: clamp(13px, 1.35vw, 16px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.018em;
  color: var(--green-800);
  white-space: nowrap;
}

.hero__brand {
  font-weight: 850;
  letter-spacing: .01em;
  color: var(--green-800);
}

.hero__sep {
  flex: none;
  width: 1.5px;
  height: .95em;
  border-radius: 1px;
  background: var(--line);
}

.hero__headline-text {
  font-weight: 800;
  color: var(--green-800);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.chip--live {
  padding: 3px 9px 3px 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-700);
  border-color: #cbe6d6;
  background: #fff;
}

.chip--live .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: none;
}

.chip--meta {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  gap: 4px;
}

.chip--meta svg { width: 11px; height: 11px; }

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  border: 1px solid #cbe6d6;
  color: var(--green-700);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
  box-shadow: none;
}

.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-500);
  box-shadow: none;
}

/* Title owns a full row so it can run edge to edge on one line. */
.hero__title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: clamp(19px, 2.55vw, 36px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -.024em;
  color: var(--green-800);
  white-space: nowrap;
}

.hero__brand {
  font-weight: 850;
  letter-spacing: .01em;
  color: var(--green-800);
}

.hero__rule {
  flex: none;
  width: 2px;
  height: 1.06em;
  border-radius: 1px;
  background: var(--line);
}

.hero__tagline {
  margin-top: 11px;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 112ch;
}

.hero__chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: none;
  backdrop-filter: none;
}

.chip svg { width: 13px; height: 13px; color: var(--green-600); }
.chip--stamp { color: var(--muted); font-weight: 500; }

/* --- Main --------------------------------------------------------------- */
.main { padding: 0 0 40px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Stats sit just below the hero title row with a small gap */
.kpi-band,
.highlights-band {
  position: relative;
  z-index: 4;
  margin-top: 6px;
}

/* --- Programme & Ecosystem Highlights (concept mini-cards) ------------ */
.panel--highlights {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: none;
  overflow: hidden;
}

.panel__label {
  margin: 0;
  padding: 7px 12px 0;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: -.01em;
  color: var(--ink);
}

.panel__label span {
  font-weight: 500;
  color: var(--muted-2);
}

.panel__head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line-2);
}

.panel__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.panel__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.panel__sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #e8ece9;
  border-top: 2px solid color-mix(in srgb, var(--tint-fg) 52%, #e4e9e6);
  border-radius: 9px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  box-shadow: none;
  transition: border-color .15s ease;
}

.mini-card:hover {
  border-color: #d8e0dc;
  border-top-color: color-mix(in srgb, var(--tint-fg) 58%, #e4e9e6);
  box-shadow: none;
}

.mini-card.is-flash {
  background: var(--green-50);
  border-color: #b8dcc6;
  border-top-color: color-mix(in srgb, var(--tint-fg) 58%, #b8dcc6);
  box-shadow: none;
}

.mini-card__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px 9px 7px;
  flex: 1;
}

.mini-card__label {
  display: block;
  font-size: 9.5px;
  font-weight: 750;
  color: var(--green-900);
  line-height: 1.2;
}

.mini-card__value {
  font-family: var(--num);
  font-size: clamp(17px, 1.28vw, 21px);
  font-weight: 820;
  letter-spacing: -.03em;
  color: var(--green-900);
  line-height: 1.05;
  white-space: nowrap;
}

.mini-card__detail {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card__foot {
  padding: 6px 9px 7px;
  border-top: 1px solid var(--line-2);
  margin-top: auto;
}

.mini-card__foot-text {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--tint-fg);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Sector insights carousel ----------------------------------------- */
.sector-carousel { position: relative; }

.sector-carousel .tile--pie .tile__head {
  padding: 7px 10px;
}

.sector-carousel .tile--pie .tile__head h4 {
  font-size: 11px;
}

.sector-carousel .tile--pie .tile__body {
  padding: 6px 8px 4px;
}

.sector-carousel .tile--pie .tile__body--bars {
  min-height: 240px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 10px;
}

.sector-carousel .tile__foot {
  padding: 5px 8px;
  font-size: 10px;
}

.sector-carousel .legend--below {
  margin-top: 6px;
  gap: 3px;
}

.sector-carousel .legend__label { font-size: 9.5px; }
.sector-carousel .legend__value { font-size: 9px; }
.sector-carousel .viz-note { font-size: 9px; margin-top: 2px; }

.viz-note--section {
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tile--profile-viz .tile__body--profile-viz {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  padding: 8px 10px 6px;
}

.tile--profile-viz--compact .tile__body--profile-viz {
  min-height: 200px;
  gap: 6px;
}

.gender-national { margin-bottom: 2px; }

.gender-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted-2);
}

.gender-key span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gender-key i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: none;
}

.stacked-hbars-host {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.split-bar__track {
  display: flex;
  width: 100%;
  height: 22px;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(15, 23, 42, .06);
  border: 1px solid rgba(15, 23, 42, .08);
}

.split-bar--sub .split-bar__track {
  height: 16px;
  border-radius: 5px;
}

.split-bar__seg {
  flex: none;
  width: 0;
  height: 100%;
  transition: width .55s cubic-bezier(.22, 1, .36, 1);
  min-width: 0;
}

.split-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
}

.split-bar--sub .split-bar__legend {
  margin-top: 4px;
  gap: 4px 8px;
}

.split-bar__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--muted-2);
}

.split-bar__legend em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

.split-bar__legend b {
  font-weight: 700;
  color: var(--ink);
}

.split-bar__swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: none;
}

.stacked-hbars {
  display: grid;
  gap: 5px;
  padding: 0;
}

.stacked-hbar {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.stacked-hbar__label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stacked-hbar__track {
  display: flex;
  align-items: stretch;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(15, 23, 42, .05);
}

.stacked-hbar__seg {
  flex: none;
  width: 0;
  height: 100%;
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
  min-width: 0;
}

.stacked-hbar__total {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted-2);
  white-space: nowrap;
}

.sector-carousel .donut--pie svg {
  max-width: 136px;
}

.sector-carousel__slide--profile {
  grid-template-columns: 1fr 1.1fr 1.9fr;
}

.sector-carousel .tile--wide {
  min-width: 0;
}

.section__head--carousel {
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 0;
  gap: 8px 12px;
  border-bottom: none;
}

.section__head--carousel::after {
  display: none;
}

.section__head--carousel .sector-head__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(15, 23, 42, .07);
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.section__head--carousel .sector-head__fill {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(22, 163, 74, .55);
}

.section__head--carousel.sector-head--animate .sector-head__fill {
  animation: sectorHeadProgress var(--sector-interval, 10000ms) linear forwards;
}

#sector.is-paused .section__head--carousel.sector-head--animate .sector-head__fill {
  animation-play-state: paused;
}

.section__head--carousel .section__actions.sector-carousel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
}

.sector-carousel__slide--extended .tile {
  min-width: 0;
}

.sector-carousel__slide--extended .donut--pie svg {
  max-width: 118px;
}

.sector-carousel__slide--extended .tile__head h4 {
  font-size: 11px;
}

.sector-carousel__slide--extended .legend__label { font-size: 8.75px; }
.sector-carousel__slide--extended .legend__value { font-size: 8.25px; }
.sector-carousel__slide--extended .tile--pie .tile__body--bars {
  min-height: 220px;
  max-height: 260px;
}

.sector-carousel__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.sector-carousel__slide.sector-carousel__slide--extended {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.sector-carousel__slide.sector-carousel__slide--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sector-carousel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.sector-carousel__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sector-carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: width .25s ease, background .2s ease;
}

.sector-carousel__dot.is-active {
  width: 22px;
  background: var(--green-600);
}

.sector-carousel__nav {
  display: flex;
  gap: 6px;
}

.sector-carousel__btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.sector-carousel__btn:hover {
  background: var(--green-50);
  border-color: #c8dfd0;
  color: var(--green-700);
}

.sector-carousel__btn svg { width: 14px; height: 14px; }

.sector-carousel__viewport {
  overflow: hidden;
  border-radius: var(--r);
}

.sector-carousel__track {
  display: flex;
  transition: transform .68s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

@keyframes sectorHeadProgress {
  from { width: 0; }
  to { width: 100%; }
}

.sector-carousel .scorelist {
  max-height: 220px;
  overflow: auto;
}

.sector-carousel .tile--wide .scorelist {
  max-height: 240px;
}

.reachgrid--compact .reachrow {
  padding: 8px 12px;
}

.reachgrid--compact .reachrow__label {
  font-size: 10.5px;
}

@media (max-width: 1024px) {
  .mini-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero__headline { white-space: normal; flex-wrap: wrap; }
  .hero__meta { justify-content: flex-start; margin-left: 0; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector-carousel__slide:not(.sector-carousel__slide--extended) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector-carousel__slide.sector-carousel__slide--extended { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sector-carousel__slide--profile { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .highlights-band { margin-top: 0; }
  .hero__bar { margin-bottom: 6px; }
  .mini-grid { grid-template-columns: 1fr; }
  .sector-carousel__slide:not(.sector-carousel__slide--extended) { grid-template-columns: 1fr; }
  .sector-carousel__slide.sector-carousel__slide--extended {
    grid-template-columns: repeat(5, minmax(148px, 1fr));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  .sector-carousel__bar { flex-wrap: wrap; }
}

/* --- KPI rail (legacy — kept for reference pages) --------------------- */
.kpi-rail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: none;
  overflow: hidden;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
}

.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 0;
  padding: 16px 14px 14px;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: background .18s ease;
}

.kpi::before,
.kpi::after { display: none; }

.kpi:hover {
  background: #f6fbf8;
  transform: none;
}

.kpi.is-flash {
  background: #f0fdf4;
  box-shadow: inset 0 0 0 999px rgba(34, 197, 94, .04);
}

.kpi__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.25;
}

.kpi__value {
  width: 100%;
  margin-top: 2px;
  font-family: var(--num);
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 800;
  letter-spacing: -.034em;
  color: var(--ink);
  line-height: 1.05;
  white-space: nowrap;
}

.kpi__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.kpi__icon {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--green-50);
  color: var(--green-700);
  box-shadow: none;
  transition: none;
}

.kpi:hover .kpi__icon { transform: none; }
.kpi__icon svg { width: 15px; height: 15px; }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 750;
  color: var(--up);
}

.delta svg { width: 11px; height: 11px; }
.delta--down { color: var(--down); }
.delta__note { font-size: 10px; color: var(--muted-2); font-weight: 500; }

.kpi .delta {
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10.5px;
}

/* Wide: 6 per row, bottom pair centred and wider */
@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpi { padding: 18px 12px 16px; }
  .kpi:nth-child(7) { grid-column: 2 / span 2; }
  .kpi:nth-child(8) { grid-column: 4 / span 2; }
}

/* Medium: 4 per row — two even rows */
@media (min-width: 640px) and (max-width: 1023px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi:nth-child(7),
  .kpi:nth-child(8) { grid-column: auto; }
  .kpi { padding: 16px 14px 14px; }
}

/* Narrow: 2 per row */
@media (max-width: 639px) {
  .kpi-rail { border-radius: 16px; }
  .kpi__value { font-size: 20px; white-space: normal; }
}

/* --- Section shell ------------------------------------------------------ */
.section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: none;
  overflow: hidden;
}

.section__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
  background: #fafcfb;
}

.section__head::after {
  content: none;
}

.section__title { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }

.section__title h3 {
  font-size: 13.75px;
  font-weight: 750;
  letter-spacing: -.008em;
  color: var(--ink);
}

.section__flow {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
  line-height: 1.35;
}

.section__title .tick {
  margin-top: 2px;
  width: 3px; height: 16px;
  border-radius: 2px;
  background: var(--green-600);
  box-shadow: none;
  flex: none;
}

.section__sub { font-size: 11.5px; color: var(--muted-2); font-weight: 500; }

.section__body { padding: 12px 14px 14px; }
.section__body--flush { padding: 0; }

.section__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--green-600);
  transition: gap .16s ease, color .16s ease;
}

.link-more svg { width: 12px; height: 12px; }
.link-more:hover { color: var(--green-700); gap: 8px; }

/* Tint variants (tiles, coverage, institutional cards) */
[data-tint="green"]  { --tint-bg: var(--tint-green-bg);  --tint-fg: var(--tint-green-fg); }
[data-tint="amber"]  { --tint-bg: var(--tint-amber-bg);  --tint-fg: var(--tint-amber-fg); }
[data-tint="violet"] { --tint-bg: var(--tint-violet-bg); --tint-fg: var(--tint-violet-fg); }
[data-tint="blue"]   { --tint-bg: var(--tint-blue-bg);   --tint-fg: var(--tint-blue-fg); }
[data-tint="orange"] { --tint-bg: var(--tint-orange-bg); --tint-fg: var(--tint-orange-fg); }
[data-tint="teal"]   { --tint-bg: var(--tint-teal-bg);   --tint-fg: var(--tint-teal-fg); }
[data-tint="brown"]  { --tint-bg: var(--tint-brown-bg);  --tint-fg: var(--tint-brown-fg); }
[data-tint="sky"]    { --tint-bg: var(--tint-sky-bg);    --tint-fg: var(--tint-sky-fg); }

/* --- Tiles (inner cards) ----------------------------------------------- */
.tile {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: none;
  overflow: hidden;
  min-width: 0;
  transition: border-color .15s ease;
}

.tile:hover { border-color: #d0ddd4; }

.tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  background: #fafcfb;
}

.tile__head h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.003em;
}

.tile__body { padding: 12px 13px; flex: 1 1 auto; min-width: 0; }
.tile__body--flush { padding: 0; }

.tile__foot {
  padding: 9px 13px;
  border-top: 1px solid var(--line-2);
  background: #fcfdfc;
  text-align: center;
}

/* --- Distribution row -------------------------------------------------- */
.dist {
  display: block;
}

.dist__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.dist > .section { display: flex; flex-direction: column; }
.dist > .section > .section__body { flex: 1 1 auto; }

/* Map */
.mapwrap {
  position: relative;
  border-radius: var(--r);
  background: #f7faf8;
  border: 1px solid var(--line-2);
  overflow: hidden;
  min-height: 402px;
}

/* Absolute so the panel height comes from the grid row, not the map's own
   aspect ratio: Kenya is portrait, so it letterboxes inside a wider box. */
.mapwrap > svg {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  display: block;
  touch-action: none;
  cursor: grab;
}
.mapwrap svg.is-panning { cursor: grabbing; }

.county {
  stroke: #ffffff;
  stroke-width: .9;
  vector-effect: non-scaling-stroke;
  transition: fill .14s ease;
  cursor: pointer;
}

.county:hover { stroke: var(--green-900); stroke-width: 1.6; }
.county.is-active { stroke: var(--green-900); stroke-width: 2; }

.map-ctl {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: none;
}

.map-ctl button {
  width: 27px; height: 27px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  transition: background .14s ease, color .14s ease;
}

.map-ctl button + button { border-top: 1px solid var(--line-2); }
.map-ctl button:hover { background: var(--green-50); color: var(--green-700); }

.map-reset {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  font-size: 10.75px;
  font-weight: 650;
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  transition: border-color .14s ease, color .14s ease;
}

.map-reset:hover { border-color: var(--green-400); color: var(--green-700); }

.map-legend {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 7px 9px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.map-legend__scale { display: flex; height: 8px; border-radius: 3px; overflow: hidden; width: 132px; }
.map-legend__scale i { flex: 1; }

.map-legend__labels {
  display: flex;
  justify-content: space-between;
  font-size: 9.25px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: .01em;
}

.map-tip {
  position: absolute;
  z-index: 5;
  min-width: 152px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(6, 42, 26, .95);
  color: #fff;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-9px);
  transition: opacity .12s ease;
}

.map-tip.is-on { opacity: 1; }

.map-tip::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -5px;
  width: 10px; height: 10px;
  margin-left: -5px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 1px;
}

.map-tip__name { font-size: 12px; font-weight: 750; letter-spacing: .005em; }
.map-tip__val { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin-top: 1px; }
.map-tip__sub { font-size: 10.25px; color: rgba(255, 255, 255, .68); font-weight: 500; }

.map-tip__rows { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .16); display: grid; gap: 2px; }
.map-tip__row { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; }
.map-tip__row span { color: rgba(255, 255, 255, .66); }
.map-tip__row b { font-weight: 650; }

/* League table */
.ltable { width: 100%; border-collapse: collapse; }

.ltable thead th {
  position: sticky;
  top: 0;
  background: #fafcfb;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 1;
}

.ltable thead th:first-child { text-align: center; width: 34px; }
.ltable thead th:nth-child(2) { text-align: left; }
.ltable thead th:last-child { width: 70px; }

.ltable tbody td {
  padding: 0 12px;
  height: 31px;
  font-size: 12px;
  text-align: right;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.ltable tbody tr:last-child td { border-bottom: 0; }
.ltable tbody tr { transition: background .13s ease; cursor: pointer; }
.ltable tbody tr:hover, .ltable tbody tr.is-active { background: var(--green-50); }

.ltable td.rank { text-align: center; color: var(--muted-2); font-weight: 650; font-size: 11px; }
.ltable td.name { text-align: left; font-weight: 650; color: var(--ink); }
.ltable td.num { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }
.ltable td.share { font-variant-numeric: tabular-nums; color: var(--muted); width: 66px; }

.ltable .bar {
  position: relative;
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--green-100);
  margin-top: 3px;
}

.ltable .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--green-500); }

.tablescroll { max-height: 372px; overflow-y: auto; }
.tablescroll::-webkit-scrollbar { width: 8px; }
.tablescroll::-webkit-scrollbar-thumb { background: #dbe4dd; border-radius: 4px; }
.tablescroll::-webkit-scrollbar-thumb:hover { background: #c6d3c9; }

/* Coverage panel */
.coverage { display: flex; flex-direction: column; gap: 10px; }

/* Small Kenya outline that sits in the panel header as a quiet visual anchor. */
.coverage__mark { display: block; line-height: 0; }
.coverage__mark svg { height: 26px; width: auto; }
.coverage__mark path { fill: #14532d; opacity: .28; }

.covrow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  transition: border-color .15s ease;
}

.covrow:hover {
  border-color: #d0ddd4;
}

.covrow__icon {
  width: 30px; height: 30px;
  flex: none;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--tint-bg);
  color: var(--tint-fg);
  box-shadow: none;
}

.covrow__icon svg { width: 16px; height: 16px; }
.covrow__body { min-width: 0; flex: 1 1 auto; }
.covrow__label { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }

.covrow__value {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.covrow__value small { font-size: 11px; font-weight: 600; color: var(--muted-2); }

.meter { height: 3px; border-radius: 2px; background: var(--line); margin-top: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 2px; background: var(--green-500); }

.stamp {
  font-size: 10.25px;
  color: var(--muted-2);
  padding-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stamp svg { width: 11px; height: 11px; }

/* --- Pie chart rows ---------------------------------------------------- */
.pie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.25fr;
  gap: 14px;
  align-items: stretch;
}

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

/* Reference-style pie tiles: chart centred, legend stacked below */
.tile--pie {
  min-height: 0;
}

.tile--pie .tile__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 13px 12px;
  flex: 1 1 auto;
}

.tile--pie .tile__body--bars {
  align-items: stretch;
  justify-content: center;
  min-height: 260px;
}

.tile--pie .tile__body--flush {
  padding: 0;
  align-items: stretch;
}

.donut--pie { width: 100%; padding: 6px 0 4px; }
.donut--pie svg { width: 100%; max-width: 168px; height: auto; }

.legend--below {
  width: 100%;
  margin-top: 10px;
  gap: 5px;
}

.legend--below .legend__row {
  grid-template-columns: 9px 1fr auto;
  font-size: 10.75px;
}

.splitstat--compact {
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  gap: 6px;
  border-top: 1px solid var(--line-2);
}

.splitstat--compact .splitstat__row { font-size: 10.5px; }

.lead-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  color: var(--green-700);
  background: var(--green-50);
  letter-spacing: .01em;
  white-space: nowrap;
}

.viz-note {
  margin: 2px 0 0;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  text-align: center;
}

.tile--play {
  transition: border-color .15s ease;
}
.tile--play:hover {
  border-color: #d0ddd4;
}

/* Legacy dense tiles (unused on landing, kept for topic pages) */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tile--dense .tile__head { padding: 8px 11px; }
.tile--dense .tile__head h4 { font-size: 12px; }
.tile--dense .tile__body { padding: 9px 11px 10px; }

.tile__body--split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.tile__note {
  margin-top: 7px;
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.35;
}

.quad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.donut--sm svg { max-width: 108px; }
.donut--sm .donut-hole-value { font-size: 15px; }
.donut--sm .donut-hole-label { font-size: 7px; }

.legend--cols { gap: 4px; margin-top: 0; }
.legend--cols .legend__row { font-size: 10px; gap: 5px; }
.legend--cols .legend__swatch { width: 7px; height: 7px; }

.hbars--dense { gap: 6px; padding: 0; }
.hbars--dense .hbar { grid-template-columns: 68px 1fr; gap: 7px; }
.hbars--dense .hbar__label { font-size: 10px; }
.hbars--dense .hbar__track { height: 17px; border-radius: 5px; }
.hbars--dense .hbar__val { font-size: 9.5px; right: 5px; }

.chartbox--sm svg { max-height: 128px; }
.chart-legend--inline { margin-bottom: 4px; }

.splitstat--inline { margin-top: 6px; padding-top: 6px; gap: 5px; }
.splitstat--inline .splitstat__row { font-size: 10px; }

/* County performance scorecard */
.scorelist { display: grid; gap: 0; }

.score {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line-2);
  opacity: 0;
  transform: translateX(-6px);
  transition: background .15s ease, opacity .4s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
}

.score:last-child { border-bottom: none; }
.score:hover { background: #fbfdfb; }
.score.is-in { opacity: 1; transform: none; }

.score__rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--green-700);
  background: var(--green-100);
}

.score:nth-child(1) .score__rank {
  background: #fef3c7;
  color: #92400e;
  box-shadow: none;
}

.score:nth-child(2) .score__rank { background: #f1f5f9; color: #475569; }
.score:nth-child(3) .score__rank { background: #ffedd5; color: #9a3412; }

.score__meter {
  height: 3px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--line-2);
  overflow: hidden;
}

.score__meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--green-600);
  transition: width .5s ease;
}

.score__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.score__top strong { font-size: 11.5px; font-weight: 750; }
.score__region { font-size: 9.5px; color: var(--muted-2); font-weight: 600; }

.score__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 3px;
  font-size: 9.75px;
  color: var(--ink-2);
}

.score__metrics em {
  font-style: normal;
  color: var(--muted-2);
  font-weight: 600;
  margin-right: 3px;
}

/* Advisory reach channels */
.reachgrid { display: grid; gap: 7px; }

.reachrow {
  display: grid;
  grid-template-columns: 8px 1fr minmax(52px, 72px) auto auto;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}

.reachrow__dot { width: 8px; height: 8px; border-radius: 3px; }
.reachrow__label { font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reachrow__track {
  height: 6px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}

.reachrow__track i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.reachrow__val { font-weight: 750; color: var(--ink); text-align: right; }
.reachrow__pct { color: var(--muted-2); font-weight: 600; width: 34px; text-align: right; }

/* Institutional ecosystem cards */
.inst-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.instcard {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: none;
  overflow: hidden;
}

.instcard__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-2);
  background: #fafcfb;
}

.instcard__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--tint-bg);
  color: var(--tint-fg);
}

.instcard__icon svg { width: 17px; height: 17px; }

.instcard__head h4 { font-size: 12px; font-weight: 750; }
.instcard__head p { font-size: 9.5px; color: var(--muted-2); margin-top: 2px; line-height: 1.3; }

.instcard__total {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1;
}

.instcard__counties { padding: 6px 0; }

.instrow {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 12px;
  font-size: 10.5px;
}

.instrow__rank {
  font-size: 10px;
  font-weight: 750;
  color: var(--muted-2);
  text-align: center;
}

.instrow__name { font-weight: 650; color: var(--ink-2); }
.instrow__val { font-weight: 750; color: var(--ink); }

.instcard__foot {
  padding: 7px 12px 9px;
  border-top: 1px solid var(--line-2);
}

.donut { display: grid; place-items: center; padding: 2px 0 6px; }
.donut svg { width: 100%; max-width: 152px; height: auto; }
.donut__center { text-align: center; }

.donut-hole-value {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
  fill: var(--ink);
}

.donut-hole-label { font-size: 8.25px; font-weight: 700; fill: var(--muted); letter-spacing: .04em; }

.donut-slice {
  cursor: pointer;
  outline: none;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition: opacity .2s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
}
svg.is-dim .donut-slice { opacity: .45; }
svg.is-dim .donut-slice.is-hot,
.donut-slice.is-hot {
  opacity: 1;
  transform: none;
}

.legend { display: grid; gap: 5px; margin-top: 8px; }

.legend__row {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 10.75px;
  padding: 3px 6px;
  margin: 0 -6px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease;
}

.legend__row:hover,
.legend__row.is-hot { background: #f3faf6; }

.legend__swatch { width: 9px; height: 9px; border-radius: 3px; }
.legend__label { color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend__value { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.legend__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  font-style: normal;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-100);
  vertical-align: 1px;
}

.hbars { display: grid; gap: 9px; padding: 4px 0; }
.hbar { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 9px; }
.hbar__label { font-size: 10.75px; font-weight: 600; color: var(--ink-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar__track {
  position: relative;
  height: 21px;
  background: #eef2ef;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: none;
}

.hbar.is-lead .hbar__label { color: var(--green-800); font-weight: 750; }

.hbar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--green-600);
  box-shadow: none;
  width: 0;
  transition: width .5s ease;
}

.hbar__val {
  position: absolute;
  right: 7px; top: 50%;
  transform: translateY(-50%);
  font-size: 10.25px;
  font-weight: 750;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

.chartbox { position: relative; }
.chartbox svg { width: 100%; height: auto; overflow: visible; }
.axis-line { stroke: var(--line); stroke-width: 1; }
.grid-line { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.axis-text { font-size: 8.5px; fill: var(--muted-2); font-weight: 600; }
.series-line { fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.series-dot { stroke: #fff; stroke-width: 1.4; }

.chart-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.chart-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 10.25px; font-weight: 600; color: var(--ink-2); }
.chart-legend i { width: 12px; height: 3px; border-radius: 2px; }

/* Sits below a legend, so it needs a rule to signal "totals, not segments". */
.splitstat {
  display: grid;
  gap: 7px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line-2);
}
.splitstat__row { display: flex; align-items: center; gap: 8px; font-size: 10.75px; }
.splitstat__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.splitstat__label { color: var(--ink-2); font-weight: 600; flex: 1 1 auto; }
.splitstat__val { font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- Highlight rail ---------------------------------------------------- */
.rail {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 11px;
}

.railcard {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 12px 9px;
  background: var(--card);
  box-shadow: none;
  transition: border-color .15s ease;
  min-width: 0;
}

.railcard:hover { border-color: #d0ddd4; }

.railcard__top { display: flex; align-items: center; gap: 6px; }

.railcard__icon {
  width: 22px; height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--tint-bg);
  color: var(--tint-fg);
  flex: none;
  box-shadow: none;
}

.railcard__icon svg { width: 12px; height: 12px; }
.railcard__label { font-size: 10.25px; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.railcard__value {
  margin-top: 6px;
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -.028em;
  color: var(--ink);
  line-height: 1.1;
}

.railcard .delta { margin-top: 2px; font-size: 10.25px; }
.railcard__spark { margin-top: 5px; height: 26px; }
.railcard__spark svg { width: 100%; height: 26px; overflow: visible; }

/* --- Insights + media -------------------------------------------------- */
.newsgrid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 18px; }
.newslist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; align-content: start; }

.newsitem {
  display: flex;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card);
  transition: border-color .15s ease;
}

.newsitem:hover {
  border-color: #d0ddd4;
}

.newsitem__icon {
  width: 29px; height: 29px;
  flex: none;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--tint-bg);
  color: var(--tint-fg);
  box-shadow: none;
}

.newsitem__icon svg { width: 14px; height: 14px; }
.newsitem__text { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.newsitem__text b { color: var(--ink); font-weight: 700; }

.media {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line-2);
  min-height: 216px;
  background: #eef8f2;
}

.media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.media__scrim {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px 14px 13px;
  background: linear-gradient(180deg, rgba(6, 42, 26, 0), rgba(6, 42, 26, .82));
  color: #fff;
}

.media__title { font-size: 12.5px; font-weight: 750; }
.media__sub { font-size: 10.5px; color: rgba(255, 255, 255, .76); margin-top: 1px; }

.media__dots { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 5px; }
.media__dots button { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: all .16s ease; }
.media__dots button.is-on { background: #fff; width: 16px; border-radius: 3px; }

/* --- Commodity prices -------------------------------------------------- */
.commodities-card {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card);
  padding: 16px 18px 18px;
}

.commodities-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
}

.commodities-card__title {
  margin: 0;
  font-size: 13.75px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--green-900);
}

.commodities-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.commodities-card__meta {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.commodities-card__history {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #b8dcc8;
  background: #eef8f2;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease;
}

.commodities-card__history:hover {
  border-color: var(--green-400);
  background: var(--green-50);
}

.commodities-card__history svg { width: 11px; height: 11px; }

.commodities-card__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.commodity {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid var(--line-2);
}

.commodity:first-child { padding-left: 0; }

.commodity:last-child {
  border-right: none;
  padding-right: 0;
}

.commodity__accent,
.commodity__bar {
  width: 4px;
  flex: none;
  border-radius: 2px;
  align-self: stretch;
  min-height: 74px;
}

.commodity__body { min-width: 0; flex: 1; }

.commodity__name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.commodity__unit {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.3;
}

.commodity__price {
  margin-top: 8px;
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--green-900);
  line-height: 1.1;
}

.commodity__delta {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
}

.commodity__delta.is-down { color: var(--green-600); font-weight: 600; }
.commodity__delta.is-up { color: var(--ink); font-weight: 600; }

/* --- Partners ---------------------------------------------------------- */
.partners { position: relative; display: flex; align-items: center; gap: 10px; }

.partners__rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex: 1 1 auto;
  padding: 2px;
}

.partners__rail::-webkit-scrollbar { display: none; }

.partner {
  flex: 1 0 158px;
  min-width: 158px;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: #fff;
  text-align: center;
  transition: border-color .15s ease;
}

.partner:hover {
  border-color: #c8d5cc;
  box-shadow: none;
  transform: none;
}

/* Logos arrive at wildly different aspect ratios (1:1 to 5:1), so both axes
   are capped and `contain` does the optical normalising. */
.partner__logo {
  height: 42px;
  display: grid;
  place-items: center;
  width: 100%;
}

.partner__logo img {
  max-height: 42px;
  max-width: 126px;
  width: auto;
  object-fit: contain;
  filter: none;
  transition: none;
}

.partner:hover .partner__logo img { filter: none; transform: none; }

.partner--logo-only {
  flex: 1 0 140px;
  min-width: 140px;
  height: 72px;
  gap: 0;
  padding: 12px 16px;
}

.partner--logo-only .partner__name,
.partner--logo-only .partner__tag {
  display: none;
}

.partner--logo-only .partner__logo {
  height: 100%;
}

.partner--logo-only .partner__logo img {
  max-height: 44px;
}

.partner--logo-only .partner__name {
  display: none;
}

.partner__name { font-size: 12.5px; font-weight: 750; color: var(--green-800); letter-spacing: -.005em; }
.partner__tag { font-size: 9px; color: var(--muted-2); font-weight: 550; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.partner--more {
  background: #fafcfb;
  border-style: dashed;
  border-color: #cfe4d6;
}

.partner__more-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-700);
}

.partner__more-icon svg { width: 15px; height: 15px; }

.rail-btn {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  box-shadow: none;
  transition: border-color .15s ease, color .15s ease;
}

.rail-btn:hover { border-color: var(--green-400); color: var(--green-700); }
.rail-btn svg { width: 13px; height: 13px; }

/* --- Site footer (design v2) ------------------------------------------- */
.site-footer {
  margin-top: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}

.site-footer--home {
  margin-top: 22px;
}

/* Partners band (home footer lead-in) */
.footer-partners {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.footer-partners__inner {
  padding: 28px 0 22px;
}

.footer-partners__top {
  position: relative;
  margin-bottom: 18px;
  padding-right: 72px;
}

.footer-partners__intro {
  text-align: center;
}

.footer-partners__title {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--green-900);
}

.footer-partners__sub {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.footer-partners__nav {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 8px;
}

.footer-partners__rail-wrap {
  margin-bottom: 14px;
}

.footer-partners .partner--logo-only {
  overflow: hidden;
}

.footer-partners .partner--logo-only .partner__name,
.footer-partners .partner--logo-only .partner__tag {
  display: none !important;
}

.footer-partners__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 8px;
}

.footer-partners__dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #c5cec8;
  transition: width .18s ease, background .18s ease;
}

.footer-partners__dots button.is-on {
  width: 22px;
  background: var(--green-600);
}

.footer-cta {
  background: var(--green-900);
  border-top: none;
}

.footer-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  padding: 28px 0;
}

.footer-cta__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 750;
  color: #fff;
  letter-spacing: -.02em;
}

.footer-cta__meta {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 12.5px;
}

.footer-cta__dot { opacity: .45; }

.footer-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: none;
}

.footer-main {
  position: relative;
  background: var(--green-950);
  border-top: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
}

.footer-main::before {
  content: "";
  position: absolute;
  inset: 0 0 0 42%;
  background: repeating-linear-gradient(
    -58deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, .028) 10px,
    rgba(255, 255, 255, .028) 11px
  );
  pointer-events: none;
}

.footer-main__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 0.9fr 0.75fr;
  gap: 28px 32px;
  padding: 34px 0 30px;
}

.footer-kiamis {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
}

.footer-kiamis__full {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  line-height: 1.45;
}

.footer-kiamis__desc {
  margin: 0 0 18px;
  max-width: 36ch;
  color: rgba(255, 255, 255, .62);
  line-height: 1.6;
  font-size: 12.5px;
}

.footer-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  max-width: 320px;
}

.footer-contact__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 3px;
}

.footer-contact a {
  color: #fff;
  font-weight: 600;
  transition: opacity .15s ease;
}

.footer-contact a:hover { opacity: .82; }

.footer-col__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
  color: #d4e157;
}

.footer-col__title::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 7px;
  background: var(--gold);
  border-radius: 1px;
}

.footer-col__title--muted {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}

.footer-col__title--muted::after {
  display: none;
}

.footer-col__title--spaced { margin-top: 22px; }

.footer-col__title--muted.footer-col__title--spaced {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.footer-links,
.footer-powered,
.footer-refresh {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, .86);
  transition: color .15s ease;
}

.footer-links a:hover { color: #fff; }

.footer-powered li,
.footer-refresh li {
  color: rgba(255, 255, 255, .72);
  line-height: 1.45;
  font-size: 12.5px;
}

.footer-kadic-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-kadic-card img {
  display: block;
  max-height: 52px;
  width: auto;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social__link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .82);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.footer-social__link svg { width: 15px; height: 15px; }

.footer-social__link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .06);
}

.footer-counties {
  background: var(--green-950);
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 22px 0 26px;
}

.footer-counties__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-counties__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.footer-counties__meta {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .5);
}

.footer-counties__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.county-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(0, 0, 0, .14);
  font-size: 11.5px;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
}

.footer-bottom {
  background: var(--green-950);
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 14px 0 18px;
}

.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 10px;
}

.footer-bottom__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-bottom__legal a {
  color: rgba(255, 255, 255, .62);
  font-size: 11.5px;
  transition: color .15s ease;
}

.footer-bottom__legal a:hover { color: #fff; }

.footer-bottom__compliance {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
}

.footer-bottom__copy {
  margin: 0;
  padding-top: 4px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
}

.footer-bottom__copy strong {
  color: var(--gold);
  font-weight: 700;
}

/* Legacy footer alias (restricted pages) */
.footer {
  position: relative;
  margin-top: 16px;
  background: var(--green-900);
  color: rgba(255, 255, 255, .62);
  font-size: 10.75px;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  opacity: .55;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 20px;
  min-height: 40px;
  padding: 10px 0 11px;
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: start;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  justify-self: center;
}

.footer__name {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  line-height: 1.2;
}

.footer__copy {
  color: rgba(255, 255, 255, .62);
  font-weight: 550;
  white-space: nowrap;
  line-height: 1.2;
}

.footer__legal a {
  transition: color .15s ease;
}

.footer__legal a:hover {
  color: #fff;
}

.footer__legal .sep {
  opacity: .35;
}

.footer__compliance {
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

/* --- Reveal animation -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(4px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .3s ease, transform .3s ease; }

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

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1280px) {
  .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .coverage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .coverage__silhouette { display: none; }
  .coverage .stamp { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .footer-main__inner { grid-template-columns: 1fr 1fr; }
  .pie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-grid { grid-template-columns: 1fr 1fr; }
  .pulse-grid,
  .sector-grid,
  .inst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .topbar__register { padding: 8px 11px; font-size: 11.5px; }
}

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .footer-partners__top { padding-right: 0; padding-bottom: 40px; }
  .footer-partners__nav { top: auto; bottom: 0; left: 50%; transform: translateX(-50%); }
  .footer-cta__inner { flex-direction: column; align-items: flex-start; }
  .footer-main__inner { grid-template-columns: 1fr; }
  .footer-bottom__inner { flex-direction: column; align-items: flex-start; }
  .topbar__logo img { height: 36px; }
  .topbar__logo--kadic img { height: 30px; }
  .topbar__sep { height: 28px; }
  .kpi-band { margin-top: -20px; }
  .dist__inner { grid-template-columns: 1fr; }
  .newsgrid { grid-template-columns: 1fr; }
  .newslist { grid-template-columns: 1fr; }
  .commodities-card__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 16px;
  }
  .commodity {
    border-right: none;
    padding: 0;
  }
  .commodities-card__head { flex-wrap: wrap; }
  .coverage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Below this width the title can no longer hold one line. */
  .hero__title { flex-wrap: wrap; white-space: normal; gap: 0 12px; }
  .hero__rule { display: none; }
  .hero__brand::after { content: ""; }
}

@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .topbar__inner { flex-wrap: wrap; position: relative; }
  .topbar__nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 6px;
    gap: 2px;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
  }
  .topbar { position: relative; }
  .topbar.is-open { position: sticky; }
  .topbar.is-open .topbar__nav { display: flex; }
  .topbar__actions { margin-left: auto; order: 2; gap: 6px; }
  .nav-toggle { order: 3; }
  .topbar__nav { order: 4; width: 100%; }
  .nav__link { border-radius: var(--r-sm); padding: 10px 12px; }
  .nav__link.is-active::after,
  .nav__trigger.is-active::after { left: 12px; right: auto; bottom: 6px; top: 6px; width: 2.5px; height: auto; border-radius: 2px; }
  .nav__drop { width: 100%; }
  .nav__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 4px 10px;
    display: none;
    min-width: 0;
  }
  .nav__drop.is-open .nav__menu { display: block; }
  .nav__drop:hover .nav__menu { display: none; }
  .nav__drop.is-open:hover .nav__menu { display: block; }
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pie-grid,
  .demo-grid,
  .pulse-grid,
  .sector-grid,
  .inst-grid,
  .quad { grid-template-columns: 1fr; }
  .footer__inner {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
  }

  .footer__brand {
    justify-self: center;
    width: 100%;
  }

  .footer__compliance {
    justify-self: start;
    text-align: left;
  }
  .utilbar__group--left .utilbar__item:nth-child(n+2) { display: none; }
  .topbar__register-full { display: none; }
  .topbar__register-short { display: inline; }
}

@media (max-width: 560px) {
  .kpi-band { margin-top: 0; }
  .hero .shell { padding-bottom: 24px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi:nth-child(7),
  .kpi:nth-child(8) { grid-column: auto; }
  .masthead__title h1 { font-size: 22px; }
  .coverage { grid-template-columns: 1fr; }
}

/* --- Print ------------------------------------------------------------- */
@media print {
  .navbar, .utilbar, .map-ctl, .map-reset, .rail-btn, .btn { display: none !important; }
  body { background: #fff; }
  .section { break-inside: avoid; box-shadow: none; }
}
