/* ═══════════════════════════════════════════════════════════════
   Overview Page — Supplementary Styles
   Extends dashboard_base.css; does not override base tokens.
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. PAGE LAYOUT & HEADER
   ═══════════════════════════════════════════════════════════════ */
.ov-content {
  max-width: none;
}

.ov-header {
  margin-bottom: 36px;
}

.ov-header__eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ov-header__eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.ov-header__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  color: var(--color-ink);
  font-weight: 400;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}


/* ═══════════════════════════════════════════════════════════════
   2. REGULATORY PULSE STRIP
   ═══════════════════════════════════════════════════════════════ */
.ov-pulse {
  background: var(--surface-muted);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 24px 0;
  /* Breakout: matches desktop .db-page padding (40px) */
  margin-left: -40px;
  margin-right: -40px;
  width: calc(100% + 80px);
  margin-bottom: 32px;
}

.ov-pulse__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px; /* Tightened from 36px */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch !important; /* CRITICAL FIX: Forces all items to the exact same height so borders connect perfectly */
  gap: 0;
}

.ov-pulse__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px; /* Tightened from 16px (Total 24px gap between columns instead of 32px) */
  border-right: 1px solid var(--color-border);
}

.ov-pulse__item:first-child { padding-left: 0; }
.ov-pulse__item:last-child  { border-right: none; padding-right: 0; }

.ov-pulse__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 2px;
}

.ov-pulse__stat {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.ov-pulse__value {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
  line-height: 1;
  flex-shrink: 0;
}

.ov-pulse__sparkline {
  height: 32px;
  width: 72px;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.ov-pulse__delta {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  margin: 0;
  align-self: flex-end;
  margin-bottom: 2px;
}

.ov-pulse__delta--up      { color: var(--swatch-green-accent); }
.ov-pulse__delta--down    { color: var(--swatch-red-text); }
.ov-pulse__delta--neutral { color: var(--color-muted); }



/* ═══════════════════════════════════════════════════════════════
   3. BENTO GRID LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.ov-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-bottom: 24px;
  align-items: stretch;
}

/* Span Helpers */
.ov-span-3  { grid-column: span 3; }
.ov-span-4  { grid-column: span 4; }
.ov-span-5  { grid-column: span 5; }
.ov-span-6  { grid-column: span 6; }
.ov-span-7  { grid-column: span 7; }
.ov-span-8  { grid-column: span 8; }
.ov-span-12 { grid-column: span 12; }


/* ═══════════════════════════════════════════════════════════════
   4. CARDS (KPI & CHART)
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   4. CARDS (KPI & CHART)
   ═══════════════════════════════════════════════════════════════ */

/* ── Base Card ── */
.ov-card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid transparent;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ov-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-strong);
}

/* ── Card Color Variants ── */
.ov-card--gold::before,
.ov-card--teal::before,
.ov-card--amber::before,
.ov-card--terracotta::before { display: none; }

/* Default: Left-side accent borders */
.ov-card--gold       { border-left-color: var(--swatch-gold-gradient); }
.ov-card--amber      { border-left-color: var(--swatch-amber-accent); }
.ov-card--terracotta { border-left-color: var(--swatch-terracotta); }

/* Default: Right-side accent borders */
.ov-card--teal       { border-left-color: transparent; border-right: 4px solid var(--swatch-green-accent); }

/* Contextual Fix: When a Gold card is the 4th item in the grid, 
   it means it's on the right side of the zig-zag. Move border to right. */
.ov-bento > :nth-child(4).ov-card--gold {
  border-left-color: transparent;
  border-right: 4px solid var(--swatch-gold-gradient);
}

/* ── Hover States ── */
.ov-card--gold:hover       { border-left-color: var(--swatch-gold-hover); }
.ov-card--amber:hover      { border-left-color: var(--swatch-amber-accent-hover); }
.ov-card--terracotta:hover { border-left-color: var(--swatch-terracotta-hover); }
.ov-card--teal:hover       { border-right-color: var(--swatch-green-accent-hover); border-left-color: transparent; }

.ov-bento > :nth-child(4).ov-card--gold:hover {
  border-right-color: var(--swatch-gold-hover);
  border-left-color: transparent;
}

/* ── Horizontal Card Variation ── */
.ov-card--horizontal {
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.ov-card--horizontal .ov-card__headline { margin-bottom: 8px; }

.ov-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  flex-shrink: 0;
}

.ov-icon-circle .material-symbols-outlined { font-size: 32px; }

/* ── Chart Card ── */
.ov-chart-card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.ov-chart-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.ov-chart-body > div { flex: 1; display: flex; flex-direction: column; }

.ov-chart-body > .skeleton {
  width: 100%;
  min-height: 260px;
  border-radius: var(--radius-sm);
}

.ov-chart-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-subtle);
  margin: 0 0 12px;
}


/* ═══════════════════════════════════════════════════════════════
   5. CARD INNER ELEMENTS (Typography, KPIs, Mini Charts)
   ═══════════════════════════════════════════════════════════════ */
.ov-card__eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 4px;
}

.ov-card__section-eyebrow {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  display: block;
  margin: 0 0 8px;
}

.ov-card__headline {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 24px;
  line-height: 1.2;
}

.ov-card__date-range {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-muted);
  margin: 0;
}

.ov-card__date-range--absolute {
  position: absolute;
  top: 24px;
  right: 24px;
}

.ov-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.ov-card__kpi-row {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
}

.ov-card__kpi-row .ov-card__kpi-block { flex: 1; }
.ov-card__kpi-block--right { margin-left: auto; text-align: right; }

.ov-card__kpi-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 6px;
}

.ov-card__kpi-value {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
  line-height: 1;
}

.ov-card__mini-chart {
  height: 180px;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.ov-card__mini-chart .apexcharts-legend { display: none; }
.ov-card__mini-chart .chart-panel { background: transparent; border: none; border-radius: 0; padding: 0; margin: 0; }
.ov-card__mini-chart .chart-panel__label { margin-bottom: 8px; font-size: 12px; }

.ov-card__empty {
  color: var(--color-muted);
  font-size: 14px;
  margin-top: 12px;
}

.ov-card__empty--spacious { margin-top: 24px; }

/* ── Settlement Ratio Pill ── */
.ov-ratio-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  line-height: 1.3;
}

.ov-ratio-pill--safe   { background: var(--swatch-green-bg); color: var(--swatch-green-strong-alt); }
.ov-ratio-pill--danger { background: var(--swatch-red-bg); color: var(--swatch-red-text); }


/* ═══════════════════════════════════════════════════════════════
   6. SHARED DATA ATOMS (Stats, Numbers, Growth)
   ═══════════════════════════════════════════════════════════════ */

/* ── KPI Number Atoms ── */
.ov-num {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.ov-num--gold       { color: var(--color-gold-text); }
.ov-num--teal       { color: var(--swatch-green-accent); }
.ov-num--terracotta { color: var(--swatch-terracotta); }
.ov-num--sm         { font-size: 22px; }
.ov-num--xl         { font-size: 44px; }
.ov-num--xxl        { font-size: 36px; }

/* ── Inline Stat Grid ── */
.ov-stat-grid { display: grid; gap: 12px; }
.ov-stat-grid--1 { grid-template-columns: 1fr; }
.ov-stat-grid--2 { grid-template-columns: 1fr 1fr; }
.ov-stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ov-stat-grid--mb-sm { margin-bottom: 10px; }
.ov-stat-grid--mb-md { margin-bottom: 14px; }

.ov-stat-cell {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.ov-stat-cell__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 5px;
}

/* ── Inline Stats (Network Card) ── */
.ov-stat-inline { display: flex; gap: 24px; margin-top: 8px; }

.ov-stat-inline__item span:first-child {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-ink);
  margin-right: 6px;
}

.ov-stat-inline__item span:first-child.ov-muted {
  font-size: 18px;
  color: var(--color-muted);
}

.ov-stat-inline__item span:last-child {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-muted);
}

/* ── Growth Row ── */
.ov-growth-row { display: flex; gap: 18px; padding: 0 2px; }

.ov-growth-item__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 2px;
}

.ov-growth-item__value {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--swatch-green-text);
  margin: 2px 0 0;
}

/* ── Solvency Chip ── */
.ov-solvency-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
}

.ov-solvency-chip--safe   { background: var(--swatch-green-bg); color: var(--swatch-green-text); }
.ov-solvency-chip--warn   { background: var(--swatch-amber-bg); color: var(--swatch-amber-text); }
.ov-solvency-chip--danger { background: var(--swatch-red-bg); color: var(--swatch-red-text); }

/* ── Grievance Donut Legend ── */
.ov-grv-wrap { display: flex; align-items: center; gap: 20px; margin-top: 12px; flex: 1; }
.ov-grv-legend { display: flex; flex-direction: column; gap: 7px; }

.ov-grv-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-subtle);
}

.ov-grv-legend__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ov-grv-legend__total { font-family: var(--font-sans); font-size: 11px; color: var(--color-muted); margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════
   7. FULL-WIDTH SECTIONS (Map & Heatmap)
   ═══════════════════════════════════════════════════════════════ */

/* ── Section Dividers ── */
.ov-section-label { display: flex; align-items: center; gap: 12px; margin: 32px 0 18px; }
.ov-section-label--mt { margin-top: 28px; }

.ov-section-label__text {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
  margin: 0;
}

.ov-section-label__line { flex: 1; height: 1px; background: var(--color-border); }

.ov-section-label__link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ov-section-label__link .material-symbols-outlined { font-size: 13px; }
.ov-section-label__link:hover { color: var(--color-subtle); }

/* ── Map Card ── */
.ov-map-card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ov-map-card--flush { margin-bottom: 0; }

.ov-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--color-border-faint);
}

.ov-map-header__eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 3px;
}

.ov-map-header__description {
  font-family: var(--font-serif-alt);
  font-size: 14px;
  color: var(--color-subtle);
  margin: 0;
}

.branch-map-card { height: 100%; }
#branch-map { height: 60vh; width: 100%; }

/* Leaflet Overrides */
.branch-name-tip {
  background: var(--color-ink) !important; color: var(--surface-alt) !important; border: none !important;
  font-family: var(--font-sans) !important; font-size: 12px !important; font-weight: 600 !important;
  border-radius: 4px !important; padding: 4px 8px !important; box-shadow: var(--shadow-dropdown) !important;
}

.branch-district-tip {
  background: rgba(26, 28, 26, 0.75) !important; color: var(--surface-alt) !important; border: none !important;
  font-family: var(--font-sans) !important; font-size: 11px !important;
  border-radius: 3px !important; padding: 3px 7px !important;
}

/* Skeletons for Map/Heatmap */
.skeleton--map { height: 420px; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.skeleton--heatmap { height: 280px; border-radius: var(--radius-md); }

/* ── Heatmap Panel ── */
.ov-heatmap-card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.ov-heatmap-card__header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }

.br-chart-section__title {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-muted); margin: 0 0 12px;
}

.ov-heatmap-legend { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 11px; color: var(--color-muted); flex-shrink: 0; }
.ov-heatmap-legend__bar { width: 80px; height: 10px; border-radius: 5px; background: linear-gradient(to right, var(--heatmap-gradient-start), var(--heatmap-gradient-end)); }

.ov-heatmap-years { display: flex; margin-bottom: 4px; padding-left: 0; }
.ov-heatmap-years__spacer { flex-shrink: 0; }
.ov-heatmap-years__labels { flex: 1; display: flex; }
.ov-heatmap-year-label { font-family: var(--font-sans); font-size: 10px; font-weight: 600; color: var(--color-muted); text-align: center; flex: 1; }

.ov-heatmap-body { display: flex; gap: 8px; }
.ov-heatmap-plans { flex-shrink: 0; display: flex; flex-direction: column; }

.ov-heatmap-plan-label {
  font-family: var(--font-sans); font-size: 10px; color: var(--color-muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 130px; display: flex; align-items: center;
}

.ov-heatmap-svg-wrap { flex: 1; min-width: 0; }


/* ═══════════════════════════════════════════════════════════════
   8. BOTTOM REFERENCE STRIP
   ═══════════════════════════════════════════════════════════════ */
.ov-ref-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
}

.ov-ref-strip__label {
  display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 13px;
  font-weight: 600; color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-right: 8px;
}

.ov-ref-strip__label .material-symbols-outlined { font-size: 18px; color: var(--color-ink); }

.ov-ref-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); text-decoration: none;
  color: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}

.ov-ref-link:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-card-hover); background: var(--surface); }

.ov-ref-link__icon { flex-shrink: 0; display: flex; align-items: center; color: var(--color-ink); }
.ov-ref-link__icon .material-symbols-outlined { font-size: 18px; }

.ov-ref-link__text { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--color-ink); white-space: nowrap; }

.ov-ref-link__arrow { color: var(--color-muted); font-size: 14px; opacity: 0; transition: opacity 0.15s ease; }
.ov-ref-link:hover .ov-ref-link__arrow { opacity: 1; }


/* ═══════════════════════════════════════════════════════════════
   9. RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet (641px – 900px) ── */
@media (max-width: 900px) and (min-width: 641px) {
  /* Pulse Strip: 3 columns, then wrap */
  .ov-pulse__inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .ov-pulse__item:nth-child(3) { border-right: none; }
  .ov-pulse__item:nth-child(n+4) {
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
    margin-top: 20px;
  }

  /* Bento: Stack zig-zag layouts, keep side-by-sides */
  .ov-span-3, .ov-span-4, .ov-span-5, .ov-span-7, .ov-span-8 { grid-column: span 12; }
  .ov-span-6 { grid-column: span 6; }
}

/* ── Mobile Base (< 768px) ── */
/* ── Mobile Base (< 768px) ── */
@media (max-width: 768px) {
  /* Pulse Strip: Safe edge-to-edge using .db-page padding (24px) */
  .ov-pulse {
    margin-left: -24px;
    margin-right: -24px;
    width: calc(100% + 48px);
  }
  
  /* CRITICAL FIX: Stack ALL bento grid items to 1 column */
  .ov-span-3, .ov-span-4, .ov-span-5, .ov-span-6, .ov-span-7, .ov-span-8 { grid-column: span 12; }
  
  /* Reduce internal card padding */
  .ov-card, .ov-chart-card, .ov-heatmap-card {
    padding: 18px;
  }
  /* 2nd Bento Grid (Policy): Swap 3rd item (Chart) and 4th item (KPI) */
  .ov-bento > :nth-child(3).ov-chart-card { order: 2; }
  .ov-bento > :nth-child(4).ov-card.ov-card--teal { order: 1; }

  /* 4th Bento Grid (Financial): Swap 7th item (Chart) and 8th item (KPI) */
  .ov-bento > :nth-child(7).ov-chart-card { order: 2; }
  .ov-bento > :nth-child(8).ov-card.ov-card--gold { order: 1; }
}

/* ── Small Mobile (< 640px) ── */
@media (max-width: 640px) {
  /* Pulse Strip: 2 columns (using flexbox for pixel-perfect 50/50 split) */
  .ov-pulse__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }
  .ov-pulse__inner .ov-pulse__item {
    flex: 0 0 50%;
    width: 50%;
    box-sizing: border-box;
    padding: 0 12px;
    border-right: 0 none !important;
    border-left: 0 none !important;
    min-width: 0;       
    overflow: hidden;   
  }

  /* Allow the sparkline to shrink if space is tight */
  .ov-pulse__sparkline {
    min-width: 50px;    
    width: auto;        
    flex: 1;            
  }
  
  /* Top dividers for wrapped pulse items */
  .ov-pulse__item:nth-child(n+3) {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    margin-top: 16px;
  }

  /* Horizontal Cards: Stack vertically */
  .ov-card--horizontal {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .ov-icon-circle { width: 48px; height: 48px; }
  .ov-icon-circle .material-symbols-outlined { font-size: 24px; }
  .ov-stat-inline { justify-content: center; }

  /* 
   * Mobile Card Symmetry Fix:
   * Move all accent borders to the TOP for a clean, stacked look.
   */
  .ov-card {
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-top: 4px solid transparent;
  }

  .ov-card--gold       { border-top-color: var(--swatch-gold-gradient); }
  .ov-card--teal       { border-top-color: var(--swatch-green-accent); }
  .ov-card--amber      { border-top-color: var(--swatch-amber-accent); }
  .ov-card--terracotta { border-top-color: var(--swatch-terracotta); }

  /* Undo the desktop :nth-child(4) right-border hack */
  .ov-bento > :nth-child(4).ov-card--gold {
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-top-color: var(--swatch-gold-gradient);
  }

  /* Update hover states to target the new top border */
  .ov-card--gold:hover       { border-top-color: var(--swatch-gold-hover); }
  .ov-card--teal:hover       { border-top-color: var(--swatch-green-accent-hover); }
  .ov-card--amber:hover      { border-top-color: var(--swatch-amber-accent-hover); }
  .ov-card--terracotta:hover { border-top-color: var(--swatch-terracotta-hover); }

  /* Stat Grids: Collapse 3-col to 2-col */
  .ov-stat-grid--3 { grid-template-columns: 1fr 1fr; }

  /* KPI Scaling */
  .ov-card__kpi-value { font-size: 28px; }
  .ov-num--xl { font-size: 32px; }
  .ov-num--sm { font-size: 18px; }

  /* Map Adjustments */
  #branch-map { height: 320px; }
  .skeleton--map { height: 320px; }
  .ov-map-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Reference Strip: Stack links */
  .ov-ref-strip { flex-direction: column; align-items: stretch; }
  .ov-ref-link { justify-content: center; }
  .ov-ref-strip__label { margin-right: 0; justify-content: center; }
}

/* ── Ultra Small Mobile (< 420px) ── */
@media (max-width: 420px) {
  /* Stat Grids: Collapse everything to 1 column */
  .ov-stat-grid--2, .ov-stat-grid--3 { grid-template-columns: 1fr; }
  
  /* KPI Row inside cards: Stack */
  .ov-card__kpi-row { flex-direction: column; gap: 16px; }
  .ov-card__kpi-block--right { margin-left: 0; text-align: left; }
}



