/* ══ RESET ══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #EEF2F6;
  color: #1E293B;
  font-size: 13px;
  min-width: 1100px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-body { flex: 1; }

/* ══ HEADER ══ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-logo {
  height: auto;
  width: auto;
  display: block;
}

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

.brand-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1E293B;
}

.header-sep {
  width: 1px;
  height: 22px;
  background: #CBD5E1;
}

.compass {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.compass:hover { background: #F8FAFC; }
.compass-lbl { font-size: 13px; color: #475569; font-weight: 500; }

/* ══ MAIN NAV ══ */
.main-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  justify-content: flex-end;
}

.nav-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
  border: none;
  background: transparent;
  display: inline-block;
}
.nav-pill:hover { background: #F1F5F9; color: #1E293B; }
.nav-pill.active { background: #002E5D; color: #fff; font-weight: 600; }

/* ══ SUB-TABS ══ */
.subtabs-bar {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  height: 40px;
  gap: 0;
}

.subtab {
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  padding: 0 2px 9px;
  margin-right: 28px;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.subtab:hover { color: #1E293B; }
.subtab.active { color: #1E293B; font-weight: 700; border-bottom-color: #1E293B; }

/* ══ FILTER BAR ══ */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filters-left { display: flex; gap: 8px; align-items: center; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid #CBD5E1;
  border-radius: 7px;
  background: #fff;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: #94A3B8; }
.filter-lbl { color: #64748B; }
.filter-val { font-weight: 600; color: #1E293B; }

/* ══ FILTER DROPDOWNS ══ */
.filter-wrap {
  position: relative;
}

.filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  min-width: 170px;
  z-index: 200;
  overflow: hidden;
  animation: dropIn .15s ease;
}
.filter-dropdown.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: background .1s;
  gap: 10px;
}
.filter-option:hover { background: #F1F5F9; }
.filter-option.selected {
  color: #002E5D;
  font-weight: 700;
  background: #EEF4FB;
}
.filter-option.selected::after {
  content: '✓';
  font-size: 11px;
  color: #002E5D;
  flex-shrink: 0;
}
.filter-opt-sub {
  font-size: 10.5px;
  font-weight: 400;
  color: #94A3B8;
}

.filter-caret {
  transition: transform .2s ease;
  flex-shrink: 0;
}
.filter-btn.open .filter-caret { transform: rotate(180deg); }

.ask-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #002E5D;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.ask-ai-btn:hover { background: #0F3D7A; }

/* ══ PAGE BODY ══ */
.page-body {
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  min-height: calc(100vh - 56px);
}

#tb-view.page-body {
  padding: 12px 20px 12px;
  box-sizing: border-box;
}

.overview-top-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 16px;
}

.overview-left-card,
.overview-right-card,
.overview-scope-card {
  padding: 24px;
}

.overview-left-card {
  display: grid;
  gap: 18px;
}

.overview-card-header,
.overview-right-header,
.overview-scope-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.overview-card-header .eyebrow,
.overview-right-header .eyebrow,
.overview-scope-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 6px;
}

.overview-card-header h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
  color: #0F172A;
  max-width: 560px;
}

.overview-badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 700;
}

.overview-preview {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.preview-main {
  min-height: 300px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.preview-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(14,165,233,0.14), transparent 35%), radial-gradient(circle at bottom right, rgba(59,130,246,0.08), transparent 30%);
  pointer-events: none;
}

.preview-main .preview-stage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.preview-panel {
  border-radius: 20px;
  background: #fff;
  border: 1px solid #E2E8F0;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.preview-panel-big {
  min-height: 220px;
}

.preview-panel-small {
  min-height: 220px;
}

.preview-panel-line {
  height: 10px;
  border-radius: 999px;
  background: #eef3fb;
}

.preview-panel-line.short { width: 36%; }
.preview-panel-line.medium { width: 58%; }
.preview-panel-line.long { width: 86%; }

.preview-map {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
}

.preview-map-line {
  height: 10px;
  border-radius: 999px;
  background: #eef3fb;
  margin-bottom: 10px;
}

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

.preview-widget {
  padding: 18px 16px;
  display: grid;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid #E2E8F0;
  background: #fff;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.widget-title {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
}

.widget-meta {
  font-size: 11px;
  color: #64748B;
}

.widget-value {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
}

.overview-right-card .overview-right-header {
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
}

.overview-right-subtitle {
  margin: 0;
  color: #475569;
  font-size: 12.75px;
  line-height: 1.6;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.module-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  min-height: 172px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
}

.module-thumb {
  width: 100%;
  min-height: 94px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
  border: 1px solid #E2E8F0;
  overflow: hidden;
}
.module-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.module-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
}

.module-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: #475569;
  min-height: 52px;
}

.module-btn {
  justify-self: flex-end;
  margin-top: auto;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: #002e5d;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.overview-scope-card {
  padding: 24px;
}

.overview-scope-head {
  margin-bottom: 18px;
}

.scope-heading {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
}

.scope-subtitle {
  margin: 0;
  color: #64748B;
  font-size: 12.5px;
  line-height: 1.7;
}

.scope-body {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}

.scope-graphic {
  min-height: 240px;
  border-radius: 24px;
  background: linear-gradient(180deg, #eef4fb 0%, #fff 100%);
  border: 1px solid #E2E8F0;
}

.scope-copy {
  display: grid;
  gap: 14px;
}

.scope-copy p {
  margin: 0;
  color: #475569;
  line-height: 1.75;
  font-size: 13px;
}

.scope-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 10px;
}

.scope-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #E2E8F0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.overview-footer-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748B;
  font-size: 11.5px;
  padding: 0 4px 6px;
}

/* ══ KPI ROW ══ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi-card {
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px 16px;
  cursor: pointer;
  transition: border-color .15s;
  position: relative;
}
.kpi-card:hover { border-color: #94A3B8; }
.kpi-card.active { border-color: #002E5D; border-width: 2px; }

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-radio-row { display: flex; align-items: center; gap: 8px; }

.kpi-radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  background: #fff;
  flex-shrink: 0;
  position: relative;
  transition: all .15s;
}
.kpi-radio.filled { border-color: #002E5D; border-width: 2px; }
.kpi-radio.filled::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #002E5D;
}

.kpi-name { font-size: 12.5px; font-weight: 500; color: #334155; }

.kpi-info {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-style: italic; font-weight: 700;
  color: #94A3B8; cursor: help;
}

.kpi-card-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.kpi-big {
  font-size: 30px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -1px;
  line-height: 1;
}

.kpi-comps { display: flex; gap: 10px; align-items: flex-end; }
.kpi-comp { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.comp-lbl { font-size: 10px; color: #94A3B8; font-weight: 500; }
.comp-val { font-size: 12px; font-weight: 700; }
.comp-val.pos { color: #16A34A; }
.comp-val.neg { color: #DC2626; }

/* ══ SECONDARY STRIP ══ */
.sec-strip {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.sec-tile {
  flex: 1;
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sec-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.sec-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #EEF4FB;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sec-val {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.5px;
}

.sec-lbl {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.45;
}

.sec-comps { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.sc { font-size: 11px; font-weight: 600; }
.sc.pos { color: #16A34A; }
.sc.neg { color: #DC2626; }

.sec-divider { width: 1px; background: #E2E8F0; margin: 16px 0; }

/* ══ SECTION HEADING ══ */
.section-heading {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: -4px;
}

/* ══ BREAKDOWN GRID ══ */
.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

/* ══ GENERIC CARD ══ */
.card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
}

.card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  padding: 13px 14px 10px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 10px;
}
.card-header-row .card-title { padding: 0; }

/* ══ DATA TABLE ══ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead tr { background: #002E5D; }
.data-table thead th {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  white-space: nowrap;
}
.data-table thead th:first-child { width: 40%; }

.data-table tbody tr {
  border-bottom: 1px solid #F1F5F9;
  transition: background .12s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #F8FAFC; }

.data-table tbody td {
  padding: 8px 12px 6px;
  vertical-align: top;
  font-size: 12.5px;
}

/* name + bar cell */
.row-name { font-size: 12px; font-weight: 500; color: #334155; margin-bottom: 4px; }
.row-bar { height: 4px; background: #E2E8F0; border-radius: 3px; overflow: hidden; }
.row-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #002E5D, #4889CB);
  border-radius: 3px;
  width: 0;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

.row-val { font-weight: 700; color: #0F172A; white-space: nowrap; }
.row-chg { font-weight: 600; white-space: nowrap; }
.row-chg.pos { color: #16A34A; }
.row-chg.neg { color: #DC2626; }

/* ══ MAP ══ */
.map-card { position: relative; display: flex; flex-direction: column; }
.map-wrap {
  padding: 8px 10px 0;
  flex: 1;
  background: linear-gradient(160deg, #c6ddf0 0%, #aec8e2 100%);
  margin: 0 12px 0;
  border-radius: 10px;
  overflow: hidden;
}
#us-map { width: 100%; height: auto; display: block; }

.st path { transition: opacity .15s, transform .15s; }
.st:hover path { opacity: 0.88; transform: scale(1.01); transform-origin: center; }

/* map footer: controls left, legend right */
.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-ctrl-btn {
  width: 28px; height: 28px;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.map-ctrl-btn:hover { border-color: #94A3B8; background: #F8FAFC; }

.map-legend {
  display: flex;
  gap: 16px;
  align-items: center;
}
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #64748B; font-weight: 500; }
.legend-grad { width: 52px; height: 9px; border-radius: 4px; }
.green-grad { background: linear-gradient(to right, #86efac, #15803d); }
.red-grad   { background: linear-gradient(to right, #fca5a5, #b91c1c); }

/* ══ MAP MODAL ══ */
.map-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.map-modal.open { display: flex; }

.map-modal-inner {
  background: #fff;
  border-radius: 14px;
  width: 90vw;
  max-width: 1100px;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #E2E8F0;
}

.map-modal-body { padding: 10px 16px 0; }
#us-map-modal { width: 100%; height: auto; display: block; }

.map-modal-close {
  width: 30px; height: 30px;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #64748B;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.map-modal-close:hover { background: #F1F5F9; border-color: #94A3B8; }

.toggle-group {
  display: flex;
  border: 1.5px solid #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.tog {
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  background: #fff;
  color: #64748B;
  border: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.tog.active { background: #002E5D; color: #fff; }

/* ══ MAP TOOLTIP ══ */
.map-tt {
  position: fixed;
  background: #0F172A;
  color: #fff;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 400;
  white-space: nowrap;
}

/* ══ PERFORMANCE DRIVERS ══ */
.drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 12px;
  align-items: start;
}

.drivers-col { display: flex; flex-direction: column; gap: 0; }

.drivers-col-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 10px;
}

/* ══ ACTIVATION / PROMO STACKED BARS ══ */
.activation-card { overflow: visible; }

.activation-header {
  padding: 13px 16px 12px;
  border-bottom: 1px solid #F1F5F9;
}

.promo-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pl-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #64748B; }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.promo-rows { padding: 6px 0 6px; }

.promo-row {
  padding: 12px 16px 10px;
  border-bottom: 1px solid #F8FAFC;
}
.promo-row:last-child { border-bottom: none; }

.promo-row-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.promo-bar-track {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 34px;
  width: 100%;
}

.promo-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  transition: width .9s cubic-bezier(.4,0,.2,1);
  min-width: 0;
}
.promo-seg.dark { background: #002E5D; }
.promo-seg.mid  { background: #2F6EB4; }
.promo-seg.lite { background: #4EACE9; }
.promo-seg.xlit { background: #5BC9FA; color: #0F172A; }

/* ══ BU SNAPSHOT ══ */
.bu-main-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
  align-items: stretch;
}

/* Chart card */
.bu-chart-card { padding-bottom: 0; overflow: hidden; display: flex; flex-direction: column; }

.bu-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px 6px;
  flex-wrap: wrap;
  gap: 8px;
}
.bu-chart-title-row { display: flex; align-items: baseline; gap: 4px; font-size: 13px; }
.bu-ct-kpi  { font-weight: 800; color: #002E5D; font-size: 13.5px; }
.bu-ct-mid  { color: #64748B; font-weight: 400; }
.bu-ct-sub  { color: #64748B; font-weight: 600; }

.bu-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11.5px;
  color: #64748B;
}
.bu-leg-item { display: flex; align-items: center; gap: 6px; }
.bu-leg-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #002E5D;
  flex-shrink: 0;
}
.bu-leg-line-swatch {
  width: 22px; height: 3px;
  background: #94A3B8;
  border-radius: 2px;
  flex-shrink: 0;
  position: relative;
}
.bu-leg-line-swatch::after {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #64748B;
}

.bu-axis-labels {
  display: flex;
  gap: 20px;
  padding: 0 18px 4px;
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
}

.bu-chart-wrap { padding: 0 8px; flex: 1; min-height: 0; }
.bu-chart-wrap svg { width: 100%; height: 100%; display: block; min-height: 220px; }

.bu-pct-row {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #F1F5F9;
  font-size: 11.5px;
}
.bu-pct-lbl {
  min-width: 62px;
  padding: 8px 10px;
  font-size: 10.5px;
  color: #64748B;
  font-weight: 600;
  line-height: 1.3;
  border-right: 1px solid #F1F5F9;
  flex-shrink: 0;
}
.bu-pct-val {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-weight: 700;
  font-size: 11.5px;
  border-right: 1px solid #F1F5F9;
}
.bu-pct-val:last-child { border-right: none; }

/* Brand panel */
.bu-brand-panel { overflow: hidden; display: flex; flex-direction: column; }

.bu-brand-title {
  padding: 13px 14px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
}
.bu-bt-kpi { font-weight: 800; color: #002E5D; }

.bu-share-outer { padding: 0 14px 12px; flex-shrink: 0; }

/* Make brand table fill remaining panel height with equal row distribution */
.bu-brand-panel .data-table { height: 100%; }
.bu-brand-panel .data-table tbody { display: table-row-group; height: 100%; }
.bu-brand-panel .data-table tbody tr { height: 1%; }

.bu-share-pcts {
  display: flex;
  margin-bottom: 4px;
}
.bu-share-pct-item {
  font-size: 11px;
  font-weight: 700;
  color: #002E5D;
  text-align: center;
}

.bu-share-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  gap: 1px;
}
.bu-share-seg { height: 100%; }

.bu-brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Drivers table */
.bu-drivers-card { overflow: hidden; }

.bu-drivers-header {
  padding: 13px 18px 11px;
  border-bottom: 1px solid #F1F5F9;
}
.bu-dh-main { font-size: 13.5px; font-weight: 800; color: #0F172A; }
.bu-dh-sep  { color: #CBD5E1; }
.bu-dh-sub  { font-size: 13px; font-weight: 600; color: #64748B; }

.bu-drivers-scroll { overflow-x: auto; }

.bu-drivers-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.bu-drivers-table thead tr { background: #002E5D; }
.bu-drivers-table thead th {
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-align: left;
}
.bu-drivers-table thead th.col-sep {
  border-left: 2px solid rgba(255,255,255,0.2);
}
.bu-drivers-table tbody tr {
  border-bottom: 1px solid #F1F5F9;
  transition: background .12s;
}
.bu-drivers-table tbody tr:last-child { border-bottom: none; }
.bu-drivers-table tbody tr:hover { background: #F8FAFC; }
.bu-drivers-table tbody td {
  padding: 11px 14px;
  font-size: 12.5px;
  color: #0F172A;
}
.bu-drivers-table tbody td.col-sep {
  border-left: 1px solid #E2E8F0;
}
.bu-drivers-table .chg-pos { color: #16A34A; font-weight: 600; }
.bu-drivers-table .chg-neg { color: #DC2626; font-weight: 600; }
.bu-brand-name-cell { font-weight: 600; color: #334155; }

/* ══ BRAND HEALTH SNAPSHOT ══ */

.bh-top-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 12px;
  align-items: start;
}
.bh-bot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  align-items: start;
}

.bh-card { padding: 16px 18px 14px; }
.bh-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 14px;
}
.bh-card-meta {
  font-size: 11px;
  font-weight: 500;
  color: #94A3B8;
  float: right;
  margin-left: 8px;
}
.bh-card-title-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0;
}

/* BH filter radio buttons */
.bh-toggle-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 8px;
}
.bh-radio-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.bh-radio-opt input[type=radio] {
  accent-color: #002E5D;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── Purchase Funnel ── */
.bh-funnel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bh-funnel-label {
  font-size: 11.5px;
  color: #334155;
  font-weight: 500;
  width: 108px;
  flex-shrink: 0;
}
.bh-funnel-track {
  flex: 1;
  height: 28px;
  background: #E8EDF4;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.bh-funnel-fill {
  height: 100%;
  background: linear-gradient(90deg, #002E5D, #1a5fa8);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: width .8s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.bh-funnel-chg {
  font-size: 12px;
  font-weight: 700;
  width: 56px;
  text-align: right;
  flex-shrink: 0;
}
.bh-funnel-chg.pos { color: #16A34A; }
.bh-funnel-chg.neg { color: #DC2626; }

/* ── Brand Advocacy ── */
.bh-advocacy-wrap { display: flex; flex-direction: column; gap: 14px; }
.bh-nps-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border-radius: 8px;
  padding: 10px 14px;
}
.bh-nps-icon { flex-shrink: 0; }
.bh-nps-label { font-size: 12px; font-weight: 600; color: #334155; white-space: nowrap; flex-shrink: 0; }
.bh-nps-track {
  flex: 1;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
}
.bh-nps-bar {
  height: 100%;
  background: linear-gradient(90deg, #002E5D, #4889CB);
  border-radius: 3px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.bh-nps-val { font-size: 20px; font-weight: 800; color: #002E5D; flex-shrink: 0; }

.bh-donut-row { display: flex; align-items: center; gap: 14px; }
.bh-donut-legend { flex: 1; }
.bh-dleg-header {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}
.bh-dleg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #F1F5F9;
  gap: 8px;
}
.bh-dleg-item:last-child { border-bottom: none; }
.bh-dleg-name { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: #334155; }
.bh-dleg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.bh-dleg-val { font-size: 12px; font-weight: 700; color: #0F172A; }
.bh-dleg-chg { font-size: 11.5px; font-weight: 700; width: 52px; text-align: right; }
.bh-dleg-chg.pos { color: #16A34A; }
.bh-dleg-chg.neg { color: #DC2626; }

/* ── Brand Perception ── */
.bh-perception-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 10px;
}
.bh-perc-divider { background: #E2E8F0; width: 1px; }
.bh-perc-col-head {
  font-size: 11.5px;
  font-weight: 800;
  color: #002E5D;
  margin-bottom: 8px;
}
.bh-perc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #F1F5F9;
  gap: 6px;
}
.bh-perc-row:last-child { border-bottom: none; }
.bh-perc-label { font-size: 12px; font-weight: 500; color: #334155; flex: 1; }
.bh-perc-label.net { font-weight: 800; color: #002E5D; }
.bh-perc-val { font-size: 12.5px; font-weight: 700; color: #0F172A; white-space: nowrap; }
.bh-perc-chg { font-size: 11.5px; font-weight: 700; width: 52px; text-align: right; white-space: nowrap; }
.bh-perc-chg.pos { color: #16A34A; }
.bh-perc-chg.neg { color: #DC2626; }

/* ── Appeal Drivers ── */
.bh-appeal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.bh-appeal-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #E2E8F0;
}
.bh-appeal-sub-lbl { font-size: 11.5px; font-weight: 700; color: #002E5D; }
.bh-appeal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #F8FAFC;
}
.bh-appeal-row:last-child { border-bottom: none; }
.bh-appeal-name { font-size: 12px; font-weight: 500; color: #334155; width: 150px; flex-shrink: 0; }
.bh-appeal-track {
  flex: 1;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}
.bh-appeal-fill {
  height: 100%;
  background: linear-gradient(90deg, #002E5D, #4EACE9);
  border-radius: 4px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.bh-appeal-val { font-size: 12px; font-weight: 700; color: #0F172A; width: 36px; text-align: right; flex-shrink: 0; }
.bh-appeal-chg { font-size: 11.5px; font-weight: 700; width: 52px; text-align: right; flex-shrink: 0; }
.bh-appeal-chg.pos { color: #16A34A; }
.bh-appeal-chg.neg { color: #DC2626; }

/* ── Pillars of Superiority ── */
.bh-pillar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}
.bh-pillar-row:last-child { border-bottom: none; }
.bh-pillar-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #EEF4FB;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bh-pillar-name { flex: 1; font-size: 12.5px; font-weight: 500; color: #334155; }
.bh-pillar-val { font-size: 13px; font-weight: 700; color: #0F172A; width: 42px; text-align: right; flex-shrink: 0; }
.bh-pillar-chg { font-size: 12px; font-weight: 700; width: 58px; text-align: right; flex-shrink: 0; }
.bh-pillar-chg.pos { color: #16A34A; }
.bh-pillar-chg.neg { color: #DC2626; }

/* BH footer note */
.bh-footer-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748B;
  padding: 2px 0 4px;
  flex-wrap: wrap;
}
.bh-footer-sig {
  margin-left: auto;
  font-size: 11px;
  color: #64748B;
}

/* ══ TRENDS & BENCHMARKS ══ */

.tb-compare-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 6px;
  padding-right: 12px;
  border-right: 1px solid #E2E8F0;
}
.tb-compare-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

/* TB main card */
.tb-perf-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.tb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid #F1F5F9;
  flex-wrap: wrap;
  gap: 10px;
}

.tb-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
}

.tb-card-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tb-period-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tb-radio-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.tb-radio-toggle input[type=radio] {
  accent-color: #002E5D;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.tb-sep-vert {
  width: 1px;
  height: 22px;
  background: #E2E8F0;
}

.tb-card-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Left sidebar metric pills */
.tb-metric-sidebar {
  width: 158px;
  flex-shrink: 0;
  border-right: 1px solid #F1F5F9;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.tb-metric-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 0;
  transition: background .12s;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  min-height: 42px;
}
.tb-metric-pill:hover { background: #F8FAFC; }
.tb-metric-pill.active {
  background: #002E5D;
  color: #fff;
  font-weight: 700;
}
.tb-metric-pill.active .kpi-radio {
  border-color: rgba(255,255,255,0.6);
}
.tb-metric-pill.active .kpi-radio.filled {
  border-color: #fff;
}
.tb-metric-pill.active .kpi-radio.filled::after {
  background: #fff;
}

/* Chart area */
.tb-chart-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 12px;
  min-width: 0;
}

.tb-chart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.tb-axis-labels {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
  flex-shrink: 0;
}

.tb-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tb-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #334155;
  font-weight: 500;
  white-space: nowrap;
}

.tb-leg-line {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.tb-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tb-chart-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}
.tb-chart-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* TB footer */
.tb-footer-note {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #64748B;
  padding: 2px 0 4px;
  flex-wrap: wrap;
}
.tb-footer-sep { color: #CBD5E1; }

/* ══ SHOPPER RESEARCH CROSS-TAB WIZARD ══ */
.src-ct-card { padding: 0; overflow: hidden; }

.src-step-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 14px;
  min-height: 52px;
}
.src-acc-hdr { cursor: pointer; }
.src-acc-hdr:hover { background: #FAFBFC; }

.src-step-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 170px;
  flex-shrink: 0;
}
.src-step-num {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1.5px solid #CBD5E1;
  color: #64748B;
  white-space: nowrap;
}
.src-num-on {
  background: #002E5D;
  border-color: #002E5D;
  color: #fff;
}
.src-step-ttl {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
}

.src-step-inline {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}
.src-rlbl {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}
.src-rlbl input[type=radio] { display: none; }
.src-rdot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #94A3B8;
  flex-shrink: 0;
  position: relative;
  transition: border-color .12s;
}
.src-rdot.filled { border-color: #002E5D; }
.src-rdot.filled::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #002E5D;
}

.src-chips {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.src-chip {
  font-size: 11.5px;
  color: #334155;
  background: #F1F5F9;
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}
.src-chip b { color: #002E5D; font-weight: 600; }
.src-chip-sm { font-size: 11px; padding: 2px 7px; }

.src-tog {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #64748B;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background .1s;
}
.src-tog:hover { background: #F1F5F9; }

.src-sep {
  height: 1px;
  background: #F1F5F9;
  margin: 0;
}

.src-acc-body { padding: 0 20px 16px; }

/* Step 2: Filter grid */
.src-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid #F1F5F9;
  border-radius: 8px;
  overflow: hidden;
}
.src-fcol {
  padding: 14px 16px;
  border-right: 1px solid #F1F5F9;
}
.src-fcol:last-child { border-right: none; }
.src-fcol-hd {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.src-clear-all {
  background: none;
  border: none;
  font-size: 11px;
  color: #EF4444;
  cursor: pointer;
  font-weight: 500;
  padding: 0;
}
.src-clear-all:hover { text-decoration: underline; }
.src-fopt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  padding: 5px 0;
}
.src-fopt input { display: none; }
.src-cbx {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid #94A3B8;
  flex-shrink: 0;
  position: relative;
  transition: background .1s, border-color .1s;
}
.src-cbx.filled {
  background: #002E5D;
  border-color: #002E5D;
}
.src-cbx.filled::after {
  content: '';
  position: absolute;
  left: 3px; top: 1px;
  width: 5px; height: 8px;
  border: 2px solid #fff;
  border-left: none;
  border-top: none;
  transform: rotate(45deg);
}

/* Steps 3 & 4 column list */
.src-col3-hd {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 8px;
}
.src-col3-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #F8FAFC;
}
.src-expand-icon {
  font-size: 10px;
  color: #94A3B8;
  cursor: pointer;
}

/* Submit */
.src-submit-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
}
.src-submit-btn {
  background: #002E5D;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s;
}
.src-submit-btn:hover { background: #1a4a8a; }

/* Results card */
.src-results-card { padding: 20px 24px; }
.src-res-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.src-go-back {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #002E5D;
  cursor: pointer;
  padding: 0;
}
.src-go-back:hover { text-decoration: underline; }

.src-res-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F1F5F9;
}
.src-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.src-meta-icon { color: #94A3B8; font-size: 13px; }
.src-meta-key { font-size: 12px; font-weight: 700; color: #334155; white-space: nowrap; }
.src-meta-val { font-size: 12px; color: #475569; }
.src-metric-pill {
  background: #EFF6FF;
  color: #002E5D;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 10px;
  border: 1px solid #BFDBFE;
}

/* Results table */
.src-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.src-thead-row th {
  background: #002E5D;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 10px 14px;
  text-align: center;
  white-space: nowrap;
}
.src-th-kpi { text-align: left !important; min-width: 160px; }
.src-group-row td {
  background: #F8FAFC;
  font-weight: 700;
  font-size: 12px;
  color: #1E293B;
  padding: 8px 14px;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}
.src-data-row td {
  padding: 9px 14px;
  border-bottom: 1px solid #F1F5F9;
  text-align: center;
  color: #334155;
}
.src-td-kpi { text-align: left !important; color: #1E293B; font-weight: 500; }
.src-data-row:hover td { background: #FAFBFC; }
.src-pos { color: #16A34A !important; font-weight: 600; }
.src-neg { color: #DC2626 !important; font-weight: 600; }

.src-footer-note {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #64748B;
  padding: 2px 0 4px;
  flex-wrap: wrap;
}

/* ══ SHOPPER RESEARCH CROSS-TAB ══ */
.src-card {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.src-card-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid #F1F5F9;
}
.src-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
}
.src-card-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Left panel */
.src-left-panel {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid #F1F5F9;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.src-panel-heading {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.src-radio-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 100px;
  border: 1.5px solid #E2E8F0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  transition: background .12s, border-color .12s;
  user-select: none;
}
.src-radio-pill:hover { background: #F8FAFC; }
.src-radio-pill.active {
  background: #002E5D;
  border-color: #002E5D;
  color: #fff;
  font-weight: 700;
}
.src-radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  flex-shrink: 0;
  position: relative;
  transition: border-color .12s;
}
.src-radio-pill.active .src-radio-circle {
  border-color: rgba(255,255,255,0.7);
}
.src-radio-circle.filled::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #002E5D;
}
.src-radio-pill.active .src-radio-circle.filled::after {
  background: #fff;
}

/* Columns area */
.src-columns-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 16px 20px 16px;
  overflow-x: auto;
  position: relative;
  min-height: 0;
}

/* Each column */
.src-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.src-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 10px 8px 14px;
  margin-bottom: 12px;
  height: 38px;
  box-sizing: border-box;
}
.src-col-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: #1E293B;
}
.src-col-x {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #94A3B8;
  padding: 0 2px;
  line-height: 1;
  transition: color .12s;
}
.src-col-x:hover { color: #475569; }

/* Item card */
.src-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid #E8EFF5;
  border-radius: 8px;
  padding: 10px 12px 8px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.src-item-bar {
  height: 7px;
  background: #EEF2F6;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}
.src-item-bar-fill {
  height: 100%;
  background: #002E5D;
  border-radius: 4px;
  transition: width .3s;
}
.src-item-bar-fill.neg {
  background: #94A3B8;
}
.src-item-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.src-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.src-item-name {
  font-size: 12px;
  font-weight: 700;
  color: #002E5D;
}
.src-item-sub {
  font-size: 11px;
  color: #64748B;
}
.src-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.src-item-pct-lbl {
  font-size: 10px;
  color: #94A3B8;
  white-space: nowrap;
}
.src-item-pct {
  font-size: 12px;
  font-weight: 700;
}

/* Add column button */
.src-col-add {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  position: relative;
}
.src-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px dashed #CBD5E1;
  background: #F8FAFC;
  color: #64748B;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .12s, color .12s;
}
.src-add-btn:hover { border-color: #002E5D; color: #002E5D; }
.src-add-menu {
  position: absolute;
  top: 42px;
  left: 0;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 160px;
  z-index: 50;
  overflow: hidden;
}
.src-add-opt {
  padding: 9px 14px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: background .1s;
}
.src-add-opt:hover { background: #F1F5F9; }

/* Empty state */
.src-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 40px;
  text-align: center;
}
.src-empty-icon { opacity: 0.5; }
.src-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}
.src-empty-sub {
  font-size: 12px;
  color: #94A3B8;
  max-width: 280px;
  line-height: 1.5;
}

/* Sankey SVG overlay */
.src-flow-svg { position: absolute; top: 0; left: 0; pointer-events: none; }

/* SRC footer */
.src-footer-note,
.bh-footer-note,
.tb-footer-note,
.gd-footer-note {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #64748B;
  padding: 2px 0 4px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ══ BRAND HEALTH DEMOGRAPHICS ══ */
.bh-demo-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 14px;
  flex-wrap: wrap;
}
.bh-sig-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
  margin-left: auto;
}
.bh-sig-check input { accent-color: #002E5D; width:14px; height:14px; cursor:pointer; }

.bh-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  grid-template-areas:
    "brands age gender race"
    "income shop  shop  habits";
}
#bh-demo-brands  { grid-area: brands; }
#bh-demo-age     { grid-area: age; }
#bh-demo-gender  { grid-area: gender; }
#bh-demo-race    { grid-area: race; }
#bh-demo-income  { grid-area: income; display: flex; flex-direction: column; }
#bh-demo-shop    { grid-area: shop; }
#bh-demo-habits  { grid-area: habits; }

.bh-demo-card {
  padding: 16px 18px;
  box-sizing: border-box;
}
.bh-demo-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 12px;
}
.bh-demo-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 12px 0 8px;
}

/* Brand bar list */
.bh-demo-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bh-demo-brand-name {
  width: 56px;
  flex-shrink: 0;
  font-size: 12px;
  color: #334155;
  font-weight: 500;
}
.bh-demo-bar-wrap {
  flex: 1;
  height: 14px;
  background: #EEF2F6;
  border-radius: 6px;
  overflow: hidden;
}
.bh-demo-bar {
  height: 100%;
  background: #002E5D;
  border-radius: 6px;
  transition: width .4s ease;
}
.bh-demo-bar.bh-sig-hi { background: #16A34A; }
.bh-demo-bar.bh-sig-lo { background: #DC2626; }
.bh-demo-brand-val {
  width: 32px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
}

/* Horizontal bar rows (Age, Race) */
.bh-demo-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bh-demo-bar-lbl {
  width: 52px;
  flex-shrink: 0;
  font-size: 12px;
  color: #475569;
}
.bh-demo-bar-val {
  width: 32px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
}

/* Income donut */
.bh-income-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.bh-income-svg-wrap {
  position: relative;
  width: 180px;
  height: 180px;
}
.bh-income-center-lbl {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.bh-income-center-lbl span {
  display: block;
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  line-height: 1.3;
}
.bh-income-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0 4px;
}
.bh-income-leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}
.bh-income-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.bh-income-lbl { color: #475569; flex: 1; font-size: 11.5px; }
.bh-income-val { font-weight: 700; color: #1E293B; font-size: 14px; }

/* Gender */
.bh-gender-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 6px 0;
}
.bh-gender-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 8px;
}
.bh-gender-divider { width: 1px; height: 70px; background: #F1F5F9; }
.bh-gender-pct { font-size: 26px; font-weight: 800; color: #0F172A; }
.bh-gender-lbl { font-size: 12px; color: #64748B; font-weight: 500; }

/* Household */
.bh-hh-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0;
}
.bh-hh-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bh-hh-pct { font-size: 22px; font-weight: 800; color: #0F172A; }
.bh-hh-lbl { font-size: 11px; color: #64748B; font-weight: 500; text-align: center; }

/* Where To Shop (vertical bars — 2-col wide) */
.bh-shop-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  padding-top: 8px;
}
.bh-shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.bh-shop-bar-wrap {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: flex-end;
}
.bh-shop-bar {
  width: 100%;
  border-radius: 5px 5px 0 0;
  min-height: 6px;
  transition: height .4s ease;
}
.bh-shop-val { font-size: 12px; font-weight: 700; color: #1E293B; }
.bh-shop-lbl { font-size: 10.5px; color: #64748B; font-weight: 600; white-space: nowrap; }
.bh-shop-divider {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94A3B8;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #F1F5F9;
}

/* Shopping Habits */
.bh-habit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #F8FAFC;
  font-size: 12px;
}
.bh-habit-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #002E5D;
  flex-shrink: 0;
}
.bh-habit-lbl { flex: 1; color: #475569; }
.bh-habit-val { font-weight: 700; color: #1E293B; flex-shrink: 0; width: 34px; text-align: right; }
.bh-habit-trend { font-size: 11px; font-weight: 600; width: 46px; text-align: right; flex-shrink: 0; }

/* ══ AI CHAT PANEL ══ */
.ai-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  z-index: 900;
  backdrop-filter: blur(1px);
}
.ai-overlay.open { display: block; }

.ai-panel {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 32px rgba(0,0,0,0.13);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transition: right .28s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid #E2E8F0;
}
.ai-panel.open { right: 0; }

/* Header */
.ai-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
  background: #002E5D;
}
.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.ai-panel-star { color: #38BDF8; font-size: 16px; }
.ai-panel-hdr-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-panel-badge {
  font-size: 10.5px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.ai-panel-close {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s;
}
.ai-panel-close:hover { background: rgba(255,255,255,0.22); }

/* Messages area */
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

/* Welcome state */
.ai-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 32px 12px 12px;
}
.ai-welcome-icon {
  font-size: 28px;
  color: #002E5D;
  margin-bottom: 4px;
}
.ai-welcome-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
}
.ai-welcome-sub {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.55;
  max-width: 300px;
}
.ai-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}
.ai-suggestion {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  transition: background .1s, border-color .1s;
  line-height: 1.4;
}
.ai-suggestion:hover { background: #EFF6FF; border-color: #BFDBFE; color: #002E5D; }

/* Message bubbles */
.ai-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.ai-msg-user {
  align-items: flex-end;
}
.ai-msg-ai {
  align-items: flex-start;
}
.ai-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 88%;
  word-break: break-word;
}
.ai-bubble-user {
  background: #002E5D;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-bubble-ai {
  background: #F1F5F9;
  color: #1E293B;
  border-bottom-left-radius: 4px;
}
.ai-bubble-ai b { color: #002E5D; }
.ai-msg-time {
  font-size: 10px;
  color: #94A3B8;
  padding: 0 4px;
}

/* Typing indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: #F1F5F9;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.ai-typing span {
  width: 7px; height: 7px;
  background: #94A3B8;
  border-radius: 50%;
  animation: aiDot 1.2s ease-in-out infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiDot {
  0%,80%,100% { transform: scale(.8); opacity:.5; }
  40%         { transform: scale(1.1); opacity:1; }
}

/* Input area */
.ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #F1F5F9;
  background: #fff;
  flex-shrink: 0;
}
.ai-input {
  flex: 1;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
  line-height: 1.45;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color .15s;
  color: #1E293B;
}
.ai-input:focus { border-color: #002E5D; }
.ai-input::placeholder { color: #94A3B8; }
.ai-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #002E5D;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, transform .1s;
}
.ai-send-btn:hover { background: #1a4a8a; }
.ai-send-btn:active { transform: scale(.93); }

/* ══ FOOTER ══ */
.footer {
  background: #fff;
  border-top: 1px solid #E2E8F0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-left { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #64748B; }
.footer-src { font-weight: 700; color: #334155; }
.footer-links { color: #4889CB; }
.footer-right { display: flex; align-items: center; gap: 18px; font-size: 11.5px; color: #64748B; }
.footer-brand { display: flex; align-items: center; font-weight: 600; color: #334155; }
