/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Type */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Radii */
  --radius-sm: 0.375rem; --radius-md: 0.5rem;
  --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px;

  /* Transitions */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-default: 1160px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Light mode */
  --color-bg: #f7f6f2;
  --color-surface: #ffffff;
  --color-surface-2: #f4f3ef;
  --color-border: #e0ddd8;
  --color-divider: #ebe9e4;
  --color-text: #1a1916;
  --color-text-muted: #6b6a66;
  --color-text-faint: #b5b4b0;
  --color-primary: #01696f;
  --color-primary-hover: #0c4e54;
  --color-primary-highlight: #d4e7e6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

[data-theme='dark'] {
  --color-bg: #141312;
  --color-surface: #1c1b19;
  --color-surface-2: #211f1d;
  --color-border: #2e2c2a;
  --color-divider: #252321;
  --color-text: #d4d3d0;
  --color-text-muted: #7a7976;
  --color-text-faint: #4e4d4b;
  --color-primary: #4f98a3;
  --color-primary-hover: #3b808b;
  --color-primary-highlight: #1e3134;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141312; --color-surface: #1c1b19; --color-surface-2: #211f1d;
    --color-border: #2e2c2a; --color-divider: #252321; --color-text: #d4d3d0;
    --color-text-muted: #7a7976; --color-text-faint: #4e4d4b;
    --color-primary: #4f98a3; --color-primary-hover: #3b808b;
    --color-primary-highlight: #1e3134;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
  }
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); }
p, li { text-wrap: pretty; max-width: 72ch; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.8; }
.logo-text { color: var(--color-text); }
.nav-links {
  display: flex;
  gap: 0.85rem;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--color-primary); }
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--color-surface-2); color: var(--color-text); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0 clamp(var(--space-12), 6vw, var(--space-20));
  background: linear-gradient(165deg, var(--color-surface) 0%, var(--color-bg) 60%);
  border-bottom: 1px solid var(--color-border);
}
.hero-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.08;
  margin-bottom: var(--space-5);
  max-width: 18ch;
}
.hero h1 .accent { color: var(--color-primary); }
.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 54ch;
  margin-bottom: var(--space-10);
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: var(--space-10);
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: var(--space-1); }
.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}
.filter-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.filter-pills { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pill {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.pill:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-highlight); }
.pill.active { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-highlight); }

/* ── Programs Section ──────────────────────────────────────── */
.programs-section {
  padding: clamp(var(--space-12), 5vw, var(--space-20)) 0;
}
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
}

/* ── Program Card ──────────────────────────────────────────── */
.program-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.program-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.card-logo {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-initials {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.card-meta { display: flex; flex-direction: column; gap: var(--space-1); }
.cat-tag {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.card-company { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 500; }
.card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 750;
  color: var(--color-text);
  line-height: 1.2;
}
.card-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
}
.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.chip-members { color: var(--color-text); border-color: var(--color-border); }
.chip-fee { }
.badge-paid { background: #e8f4e8; color: #2d7a2d; border-color: #b8dcb8; }
[data-theme='dark'] .badge-paid { background: #1a3a1a; color: #5db85d; border-color: #2e4a2e; }
.badge-points { background: #e8f0fb; color: #1a5bb8; border-color: #b4cdee; }
[data-theme='dark'] .badge-points { background: #1a2540; color: #6a9fd8; border-color: #2a3d62; }
.badge-travel { background: #f4eefb; color: #7a39bb; border-color: #c8aae8; }
[data-theme='dark'] .badge-travel { background: #251a38; color: #a870de; border-color: #3a2858; }
.badge-freemium { background: #fef4e6; color: #b06a00; border-color: #e8c87a; }
[data-theme='dark'] .badge-freemium { background: #2a1f08; color: #e8a840; border-color: #4a3410; }
.badge-fuel { background: #fde8e8; color: #b01a1a; border-color: #e8b4b4; }
[data-theme='dark'] .badge-fuel { background: #2a1414; color: #e06060; border-color: #4a2020; }
.card-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}
.pillar-tag {
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-divider);
}
.pillar-large {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-color: transparent;
  font-weight: 600;
}

/* ── Section Header ────────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-10);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

/* ── Compare Section ───────────────────────────────────────── */
.compare-section {
  padding: clamp(var(--space-12), 5vw, var(--space-20)) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 780px;
}
.compare-table th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border-bottom: 1.5px solid var(--color-border);
  white-space: nowrap;
}
.compare-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
  vertical-align: top;
  line-height: 1.5;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: var(--color-surface-2); }
.td-name { font-weight: 700; white-space: nowrap; color: var(--color-text); }
.td-model { font-size: var(--text-xs); color: var(--color-text-muted); }
.td-num { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.td-hook { font-weight: 600; color: var(--color-primary); }

/* ── Trends Section ────────────────────────────────────────── */
.trends-section {
  padding: clamp(var(--space-12), 5vw, var(--space-20)) 0;
}
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}
.trend-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.trend-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.trend-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.trend-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}
.trend-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-10) 0;
  background: var(--color-surface);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.footer-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
  max-width: 52ch;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform 0.22s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute; top: var(--space-5); right: var(--space-5);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--color-surface-2); color: var(--color-text); }
.modal-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
  padding-right: var(--space-10);
}
.modal-logo {
  width: 64px; height: 64px;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-logo .logo-initials { font-size: var(--text-base); font-weight: 800; }
.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}
.modal-company {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.modal-tagline {
  font-size: var(--text-base);
  color: var(--color-primary);
  font-style: italic;
  font-weight: 500;
  padding: var(--space-4) var(--space-5);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-primary);
  margin-bottom: var(--space-6);
}
.modal-sections { display: flex; flex-direction: column; gap: var(--space-6); }
.modal-section {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.modal-section:last-child { border-bottom: none; padding-bottom: 0; }
.modal-sec-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}
.modal-section p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }
.modal-list { display: flex; flex-direction: column; gap: var(--space-3); padding-left: var(--space-2); }
.modal-list li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-4);
  position: relative;
  line-height: 1.6;
}
.modal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}
.modal-metrics { }
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.metric-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
}
.modal-pillar-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ── Behavioral Science Modal ───────────────────────────────── */
.modal-bs {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  margin-top: var(--space-2);
}
.bs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.bs-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border-left: 3px solid var(--color-primary);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bs-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}
.bs-tactic {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bs-explanation,
.bs-practice {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: none;
}
.bs-explanation strong,
.bs-practice strong {
  color: var(--color-text);
  font-weight: 700;
}

/* ── Card Actions (Deep Dive + Compare) ────────────────────── */
.card-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
  transition: background var(--transition), box-shadow var(--transition);
  flex: 1;
}
.card-cta:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-sm); }
.card-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.card-compare-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.card-compare-btn.active {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Search ─────────────────────────────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  margin-left: auto;
  color: var(--color-text-muted);
  transition: border-color var(--transition);
}
.search-wrap:focus-within {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.search-input {
  border: none;
  background: none;
  font: inherit;
  font-size: var(--text-xs);
  color: var(--color-text);
  width: 180px;
  outline: none;
}
.search-input::placeholder { color: var(--color-text-muted); }

/* ── Compare Tray (sticky bottom dock) ──────────────────────── */
.compare-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-surface);
  border-top: 1.5px solid var(--color-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
  padding: var(--space-3) 0;
}
.compare-tray.visible { transform: translateY(0); }
.tray-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.tray-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.tray-slots {
  display: flex;
  gap: var(--space-3);
  flex: 1;
  flex-wrap: wrap;
}
.tray-slot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  min-width: 140px;
}
.tray-slot-empty {
  border-style: dashed;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  justify-content: center;
}
.tray-logo {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  flex-shrink: 0;
}
.tray-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.tray-remove {
  color: var(--color-text-faint);
  transition: color var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.tray-remove:hover { color: var(--color-text); }
.tray-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.tray-btn-compare {
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: background var(--transition);
  white-space: nowrap;
}
.tray-btn-compare:hover { background: var(--color-primary-hover); }
.tray-btn-reset {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.tray-btn-reset:hover { border-color: var(--color-text-muted); color: var(--color-text); }

/* ── Compare Modal ───────────────────────────────────────────── */
.modal-box-wide {
  max-width: 900px;
}
.cmp-header {
  margin-bottom: var(--space-6);
}
.cmp-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.cmp-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.cmp-prog-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}
.cmp-prog-logo {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
}
.cmp-prog-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.cmp-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  margin-bottom: var(--space-8);
}
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-label {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-divider);
  white-space: nowrap;
  width: 120px;
}
.cmp-cell {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  border-left: 1px solid var(--color-divider);
  color: var(--color-text);
  vertical-align: middle;
  font-size: var(--text-sm);
}
.cmp-bar-cell { vertical-align: middle; }
.cmp-bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-1) 0;
}
.cmp-bar {
  height: 8px;
  border-radius: var(--radius-full);
  min-width: 4px;
  transition: width 0.4s ease;
}
.cmp-bar-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.cmp-fee {
  display: inline-block;
  padding: 2px var(--space-2);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
}
.cmp-model {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.cmp-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: var(--space-6) 0 var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.cmp-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}
.cmp-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.cmp-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}
.cmp-legend-dot.shared {
  background: #f59e0b;
}
.cmp-grid-cols {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}
.cmp-text-col {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.cmp-col-head {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
}
.cmp-text-col p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: none;
}
.cmp-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.cmp-tactic, .cmp-pillar {
  display: inline-block;
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.cmp-tactic-shared, .cmp-pillar-shared {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
[data-theme='dark'] .cmp-tactic-shared,
[data-theme='dark'] .cmp-pillar-shared {
  background: #2d1f00;
  border-color: #b45309;
  color: #fbbf24;
}
.cmp-metric {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.5;
}

/* ── Toast notification ──────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Mobile ────────────────────────────────────────────────── */
/* ── BS Multiselect Dropdown ──────────────────────────── */
.bs-filter-wrap {
  position: relative;
  flex-shrink: 0;
}
.bs-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  max-width: 240px;
}
.bs-dropdown-toggle:hover {
  background: var(--color-primary);
  color: #fff;
}
.bs-dropdown-toggle[aria-expanded="true"] {
  background: var(--color-primary);
  color: #fff;
}
.bs-dropdown-toggle[aria-expanded="true"] .bs-chevron {
  transform: rotate(180deg);
}
.bs-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
#bsDropdownLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.bs-active-badge {
  display: none;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  flex-shrink: 0;
}
.bs-dropdown-toggle[aria-expanded="true"] .bs-active-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.bs-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.bs-dropdown-panel.open {
  display: block;
  animation: bsFadeDown 0.15s ease;
}
@keyframes bsFadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bs-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.bs-panel-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bs-clear-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bs-clear-btn:hover { opacity: 0.75; }
.bs-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: background 0.12s;
}
.bs-option:hover { background: var(--color-surface-2); }
.bs-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.bs-option-name {
  flex: 1;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
}
.bs-option-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 1px 6px;
  flex-shrink: 0;
}

/* Empty grid state */
.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.link-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.link-btn:hover { opacity: 0.75; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero-stats { gap: var(--space-6); }
  .programs-grid { grid-template-columns: 1fr; }
  .trends-grid { grid-template-columns: 1fr; }
  .modal-box { padding: var(--space-6); }
  .metrics-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .filter-bar { padding: var(--space-3) 0; }
  .filter-inner { gap: var(--space-2); }
  .filter-pills { gap: var(--space-1); }
  .pill { padding: var(--space-1) var(--space-3); font-size: 0.7rem; }
  .filter-label { display: none; }
  .search-wrap { flex: 1; min-width: 0; }
  .search-input { font-size: 0.75rem; }
}

/* ── Insights Section ────────────────────────────────────────── */
.insights-section {
  padding: var(--space-20) 0;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
}

.insights-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.insights-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.insights-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.insights-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* KPI Cards */
.insights-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.kpi-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: var(--transition);
}

.kpi-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.kpi-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.kpi-note {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Chart Grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.chart-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.chart-card--wide {
  grid-column: 1 / -1;
}

.chart-card-header {
  flex-shrink: 0;
}

.chart-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  font-family: var(--font-display);
}

.chart-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.chart-wrap {
  flex: 1;
  min-height: 260px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.chart-card--tall .chart-wrap {
  min-height: 380px;
}

.chart-wrap--donut {
  min-height: 240px;
}

.chart-wrap--radar {
  min-height: 280px;
}

/* Callout Cards */
.insight-callouts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.callout-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border-left-width: 4px;
  transition: var(--transition);
}

.callout-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.callout-card--green  { border-left-color: #10b981; }
.callout-card--amber  { border-left-color: #f59e0b; }
.callout-card--teal   { border-left-color: #01696F; }
.callout-card--purple { border-left-color: #8b5cf6; }

.callout-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.callout-card--green  .callout-icon { background: rgba(16,185,129,0.1);  color: #10b981; border-color: rgba(16,185,129,0.2);  }
.callout-card--amber  .callout-icon { background: rgba(245,158,11,0.1);  color: #f59e0b; border-color: rgba(245,158,11,0.2);  }
.callout-card--teal   .callout-icon { background: rgba(1,105,111,0.1);   color: #01696F; border-color: rgba(1,105,111,0.2);   }
.callout-card--purple .callout-icon { background: rgba(139,92,246,0.1);  color: #8b5cf6; border-color: rgba(139,92,246,0.2);  }

.callout-card h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
}

.callout-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .insights-kpis { grid-template-columns: repeat(2, 1fr); }
  .insight-callouts { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .chart-card--wide { grid-column: 1; }
}

@media (max-width: 640px) {
  .insights-kpis { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .kpi-card { padding: var(--space-4); }
  .insights-section { padding: var(--space-12) 0; }
}

/* ── Chart Drilldown Modal ────────────────────────────────────── */
.modal-box-md {
  max-width: 540px;
  width: 94vw;
  max-height: 80vh;
  overflow-y: auto;
}

.drilldown-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  padding-right: var(--space-10);
}

.drilldown-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.5;
}

.drilldown-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.drilldown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: var(--transition);
}

.drilldown-item:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.drilldown-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.drilldown-item-body { flex: 1; min-width: 0; }

.drilldown-item-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drilldown-item-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.drilldown-item-btn {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.drilldown-item:hover .drilldown-item-btn { opacity: 1; }

.drilldown-empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-8);
}

/* Make charts show pointer cursor */
canvas { cursor: pointer; max-width: 100%; }

/* ── Deep Dive Cards & Badges ───────────────────────────────── */
.dive-card {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(1,105,111,0.13);
  border-color: var(--color-primary);
}
.dive-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.chart-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.chart-card-header-row .chart-title { margin-bottom: 0; }
.dive-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.dive-card:hover .dive-badge {
  background: var(--color-primary);
  color: #fff;
}
.dive-badge--sm {
  margin-top: var(--space-2);
  font-size: 0.65rem;
}
.dive-badge--callout {
  align-self: flex-start;
  margin-top: var(--space-2);
}
/* KPI card deep dive badge positioning */
.kpi-card { position: relative; }
/* Callout card with badge: add flex wrapping */
.callout-card.dive-card {
  flex-wrap: wrap;
  align-items: flex-start;
}

/* ── Deep Dive Modal ─────────────────────────────────────────── */
.modal-box-dive {
  max-width: 860px;
  width: 100%;
  transition: max-width 0.25s ease;
}
/* Wider when compare mode is active to fit 3 columns */
.modal-box-dive.compare-wide {
  max-width: 1100px;
}

/* ── Deep Dive Content Layout ───────────────────────────────── */
.dd-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1.5px solid var(--color-border);
  padding-right: var(--space-10);
}
.dd-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.dd-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}
.dd-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Two-column body: chart left, commentary right */
.dd-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.dd-body--single {
  grid-template-columns: 1fr;
}
.dd-chart-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.dd-sub-chart {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.dd-sub-chart-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}
.dd-sub-chart-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Commentary column */
.dd-commentary-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.dd-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.dd-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.dd-section-text {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.7;
}
.dd-section-text p { margin-bottom: var(--space-3); }
.dd-section-text p:last-child { margin-bottom: 0; }

/* Best Practices list */
.dd-practices {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}
.dd-practices-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.dd-practice-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text);
}
.dd-practice-item:last-child { border-bottom: none; }
.dd-practice-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  margin-top: 1px;
}

/* Stat highlights row */
.dd-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.dd-stat {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}
.dd-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.dd-stat-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Program tag pills inside deep dive */
.dd-program-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}
.dd-prog-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
}

/* Mobile deep dive */
@media (max-width: 700px) {
  .dd-body {
    grid-template-columns: 1fr;
  }
  .dd-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dd-title { font-size: var(--text-lg); }
  .modal-box-dive { max-height: 92vh; }
}

/* ── Compare Mode ───────────────────────────────────────────── */

/* Toggle bar shown at top of deep dive modal */
.dd-compare-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.dd-compare-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.dd-compare-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.dd-compare-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.dd-compare-toggle.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.dd-compare-toggle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Program picker (appears when compare mode is active) */
.dd-compare-picker {
  display: none;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.dd-compare-picker.visible {
  display: flex;
}
.dd-compare-slots {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.dd-compare-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px dashed var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.dd-compare-slot:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.dd-compare-slot.filled {
  border-style: solid;
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  cursor: default;
}
.dd-compare-slot.filled .slot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dd-compare-slot .slot-remove {
  display: none;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--color-text-muted);
  margin-left: 2px;
  padding: 0 2px;
}
.dd-compare-slot.filled .slot-remove {
  display: inline;
}
.dd-compare-slot .slot-remove:hover {
  color: #ef4444;
}
.dd-compare-hint {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-style: italic;
  white-space: nowrap;
}

/* Program search dropdown */
.dd-compare-search-wrap {
  position: relative;
  display: none;
  width: 100%;
  margin-top: var(--space-2);
}
.dd-compare-search-wrap.visible {
  display: block;
}
.dd-compare-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.82rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}
.dd-compare-search:focus {
  border-color: var(--color-primary);
}
.dd-compare-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 600;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.dd-compare-results.visible {
  display: block;
}
.dd-compare-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--color-border);
}
.dd-compare-result-item:last-child { border-bottom: none; }
.dd-compare-result-item:hover,
.dd-compare-result-item.highlighted {
  background: var(--color-surface-2);
}
.dd-compare-result-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dd-compare-result-name {
  font-weight: 600;
  color: var(--color-text);
}
.dd-compare-result-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* Compare view layout: side-by-side program columns */
.dd-compare-view {
  display: none;
  flex-direction: column;
  gap: var(--space-5);
}
.dd-compare-view.visible {
  display: flex;
}
.dd-compare-programs-header {
  display: grid;
  gap: var(--space-4);
}
.dd-compare-prog-header {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dd-compare-prog-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dd-compare-prog-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.dd-compare-prog-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}
.dd-compare-prog-remove {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: none;
  transition: all 0.12s;
}
.dd-compare-prog-remove:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #ef4444;
}

/* The actual side-by-side chart grid */
.dd-compare-chart-section {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.dd-compare-chart-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.dd-compare-cols {
  display: grid;
  gap: var(--space-3);
}
.dd-compare-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.dd-compare-col-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dd-compare-col-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dd-compare-col-chart-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Stat comparison table */
.dd-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.dd-compare-table thead th {
  padding: 8px 10px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-border);
}
.dd-compare-table tbody tr {
  border-bottom: 1px solid var(--color-border);
}
.dd-compare-table tbody tr:last-child {
  border-bottom: none;
}
.dd-compare-table tbody td {
  padding: 9px 10px;
  color: var(--color-text);
  vertical-align: middle;
}
.dd-compare-table tbody td:first-child {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dd-compare-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.dd-compare-best {
  background: rgba(34,197,94,0.12);
  color: #15803d;
}
.dd-compare-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dd-compare-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* No programs selected state */
.dd-compare-empty {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.dd-compare-empty-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
  opacity: 0.4;
}

/* Mobile */
@media (max-width: 700px) {
  .dd-compare-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .dd-compare-table thead th:not(:first-child):not(:nth-child(2)) {
    display: none;
  }
  .dd-compare-table tbody td:not(:first-child):not(:nth-child(2)) {
    display: none;
  }
}

/* ── Chatbot ──────────────────────────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(1,105,111,0.45);
  z-index: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(1,105,111,0.55);
}

/* push up if compare tray is visible */
.compare-tray.visible ~ .chat-fab,
body:has(.compare-tray.visible) .chat-fab {
  bottom: 110px;
}

.chat-panel {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 360px;
  max-height: 520px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 499;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.chat-panel-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
}

.chat-panel-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-display);
}

.chat-panel-sub {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 2px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
  max-width: 88%;
}

.chat-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg--bot {
  align-self: flex-start;
}

.chat-bubble {
  padding: var(--space-3) var(--space-4);
  border-radius: 16px;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg--user .chat-bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--bot .chat-bubble {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-msg--typing .chat-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Suggestion chips */
.chat-suggestions {
  padding: 0 var(--space-4) var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex-shrink: 0;
}

.chat-suggestion {
  font-size: 0.7rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chat-suggestion:hover {
  background: var(--color-primary);
  color: #fff;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8rem;
  background: var(--color-surface-2);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
}

.chat-input:focus {
  border-color: var(--color-primary);
}

.chat-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-send:hover:not(:disabled) {
  background: var(--color-primary-dark, #015257);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .chat-panel {
    right: 12px;
    bottom: 80px;
    width: calc(100vw - 24px);
    max-height: 60vh;
  }
  .chat-fab {
    right: 16px;
    bottom: 20px;
  }
}

/* ── Mobile Nav Drawer ────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s;
}
.mobile-nav-overlay.open { opacity: 1; }

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--color-surface);
  border-left: 1.5px solid var(--color-border);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
}

.mobile-nav-drawer.open { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition);
}

.mobile-nav-link {
  display: block;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

@media (max-width: 960px) {
  .hamburger { display: flex; }
  .nav-links  { display: none !important; }
  .mobile-nav-overlay { display: block; pointer-events: none; }
  .mobile-nav-overlay.open { pointer-events: all; }
}

/* ── Mobile Layout Fixes ──────────────────────────────────────── */
@media (max-width: 768px) {

  /* Filter bar — horizontal scroll instead of wrapping */
  .filter-bar { padding: var(--space-3) 0; }
  .filter-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: var(--space-2);
    padding-bottom: var(--space-1);
  }
  .filter-inner::-webkit-scrollbar { display: none; }
  .filter-pills {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .pill { flex-shrink: 0; }
  .bs-filter-wrap { flex-shrink: 0; }
  .search-wrap {
    flex-shrink: 0;
    min-width: 140px;
  }
  .filter-label { display: none; }

  /* Insights KPI cards — 2 col */
  .insights-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
  .kpi-card { padding: var(--space-4); }
  .kpi-value { font-size: 1.5rem; }

  /* Charts — single column, explicit heights */
  .insights-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .chart-card--wide { grid-column: 1; }
  .chart-card--tall .chart-wrap { min-height: 460px; }
  .chart-wrap { min-height: 280px; }
  .chart-wrap--donut { min-height: 260px; }
  .chart-wrap--radar { min-height: 260px; }

  /* Callout cards — single column */
  .insight-callouts { grid-template-columns: 1fr; }
  .insights-section { padding: var(--space-10) 0; }

  /* Program cards */
  .programs-grid { grid-template-columns: 1fr; }

  /* Compare modal */
  .modal-box-wide { padding: var(--space-4); }

  /* Chat panel */
  .chat-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  .chat-fab {
    right: 16px;
    bottom: 20px;
  }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--space-4); }

  /* BS dropdown panel — left-align on mobile may go off screen */
  .bs-dropdown-panel {
    right: 0;
    left: auto;
    width: 85vw;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .insights-kpis { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .kpi-card { padding: var(--space-3); }
  .kpi-value { font-size: 1.3rem; }
  .chart-card { padding: var(--space-4); }
}

/* ── Most Similar Programs ─────────────────────────────────────── */
.sim-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1.5px solid var(--color-border);
}

.sim-section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.sim-section-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--color-primary-highlight);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-top: 2px;
}

.sim-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.01em;
}

.sim-section-sub {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Card grid */
.sim-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

/* Individual card */
.sim-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color .15s, box-shadow .15s;
}

.sim-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 20px rgba(1,105,111,.10);
}

/* Top row: ring + info */
.sim-card-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

/* Score ring */
.sim-score-ring {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.sim-ring-svg {
  width: 100%;
  height: 100%;
}

/* sim-track is defined in :root below */

.sim-ring-pct {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
}

.sim-card-info {
  flex: 1;
  min-width: 0;
}

.sim-card-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.sim-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.sim-card-meta {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sim-card-similar-to {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-top: 5px;
}

.sim-card-similar-to strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Shared tactics */
.sim-shared-tactics {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sim-shared-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.sim-tactic-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sim-tactic {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  white-space: nowrap;
}

.sim-tactic-more {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

/* Action buttons */
.sim-card-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
}

.sim-btn-open,
.sim-btn-compare {
  flex: 1;
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  text-align: center;
}

.sim-btn-open:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-muted);
}

.sim-btn-compare {
  background: var(--color-primary-highlight);
  border-color: transparent;
  color: var(--color-primary);
}

.sim-btn-compare:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Highlight pulse on program card when navigated to */
@keyframes simHighlight {
  0%   { box-shadow: 0 0 0 0 rgba(1,105,111,.5); outline: 2px solid #01696F; }
  70%  { box-shadow: 0 0 0 12px rgba(1,105,111,0); outline: 2px solid #01696F; }
  100% { box-shadow: 0 0 0 0 rgba(1,105,111,0);   outline: 2px solid transparent; }
}

.sim-highlight-pulse {
  animation: simHighlight 1.8s ease-out forwards;
  border-radius: 16px;
}

/* Bar full pulse when all 3 slots taken */
@keyframes simBarPulse {
  0%, 100% { background: var(--color-surface); }
  50%       { background: rgba(245,158,11,.15); }
}

.sim-bar-pulse {
  animation: simBarPulse .6s ease-in-out 2;
}

/* CSS variable for ring track (fallback for browsers that don't support OOTB) */
:root { --sim-track: rgba(0,0,0,.08); }
[data-theme="dark"] { --sim-track: rgba(255,255,255,.12); }

/* Mobile */
@media (max-width: 600px) {
  .sim-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .sim-card { padding: var(--space-3); }
  .sim-score-ring { width: 46px; height: 46px; }
  .sim-ring-pct { font-size: 18px; }
  .sim-card-name { font-size: .82rem; }
}

@media (max-width: 400px) {
  .sim-cards-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   SIMILARITY CLUSTER MAP
   ═══════════════════════════════════════════════════════════════════ */

/* Section wrapper */
.cluster-section {
  padding: var(--space-10) var(--space-6);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

/* Header */
.cluster-header {
  max-width: 720px;
  margin: 0 auto var(--space-7) auto;
  text-align: center;
}

.cluster-eyebrow {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.cluster-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--color-text, #1a1a18);
  margin: 0 0 var(--space-3) 0;
  line-height: 1.2;
}

[data-theme="dark"] .cluster-title {
  color: #f0ede6;
}

.cluster-subtitle {
  font-family: var(--font-body);
  font-size: .93rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Toolbar ─────────────────────────────────────────────────────── */
.cluster-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  justify-content: space-between;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.cluster-controls-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.cluster-controls-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cluster-view-group {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.cluster-control-label {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: var(--space-1);
  white-space: nowrap;
}

/* Color/Group toggle buttons */
.cluster-view-btn,
.cluster-group-btn {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
  line-height: 1.6;
}

.cluster-view-btn:hover,
.cluster-group-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.cluster-view-btn.active,
.cluster-group-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(1,105,111,.25);
}

/* Icon buttons (zoom / reset) */
.cluster-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-size: .9rem;
  flex-shrink: 0;
}

.cluster-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cluster-icon-btn:hover {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Search */
.cluster-search-input {
  font-family: var(--font-body);
  font-size: .82rem;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: inherit;
  outline: none;
  width: 180px;
  transition: border-color .15s, box-shadow .15s;
  height: 34px;
}

.cluster-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}

.cluster-search-input::placeholder {
  color: var(--color-text-muted);
  opacity: .7;
}

/* ── Legend ──────────────────────────────────────────────────────── */
.cluster-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  min-height: 40px;
}

.cluster-legend:empty {
  display: none;
}

.cluster-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  cursor: default;
}

.cluster-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cluster-legend-label {
  line-height: 1;
}

/* ── Canvas wrapper ──────────────────────────────────────────────── */
.cluster-canvas-wrap {
  position: relative;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  touch-action: none; /* allow our own pan/pinch handling */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.cluster-canvas-wrap:active {
  cursor: grabbing;
}

.cluster-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto; /* height set by JS based on viewport */
  min-height: 260px;
}

/* ── Loading overlay ─────────────────────────────────────────────── */
.cluster-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--color-surface-2);
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--color-text-muted);
  z-index: 10;
  border-radius: 14px;
  transition: opacity .3s;
}

.cluster-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.cluster-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: clusterSpin .7s linear infinite;
}

@keyframes clusterSpin {
  to { transform: rotate(360deg); }
}

/* ── Tooltip ─────────────────────────────────────────────────────── */
.cluster-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  padding: 10px 13px 11px;
  pointer-events: none;
  z-index: 30;
  min-width: 180px;
  max-width: 240px;
  font-family: var(--font-body);
  transition: opacity .1s;
}

[data-theme="dark"] .cluster-tooltip {
  background: #1f1e1a;
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}

.cluster-tooltip[hidden] {
  display: none;
}

.ctip-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: .85rem;
  color: var(--color-text, #1a1a18);
  line-height: 1.25;
}

[data-theme="dark"] .ctip-name {
  color: #f0ede6;
}

.ctip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ctip-meta {
  font-size: .74rem;
  color: var(--color-text-muted);
  margin-bottom: 5px;
  line-height: 1.45;
}

.ctip-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: .74rem;
  margin-bottom: 2px;
}

.ctip-lbl {
  color: var(--color-text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.ctip-val {
  color: var(--color-text, #1a1a18);
  font-weight: 600;
}

[data-theme="dark"] .ctip-val {
  color: #f0ede6;
}

.ctip-tactics {
  margin-top: 6px;
  font-size: .72rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  border-top: 1px solid var(--color-border);
  padding-top: 5px;
}

.ctip-hint {
  margin-top: 5px;
  font-size: .69rem;
  color: var(--color-primary);
  font-style: italic;
}

/* ── Detail panel ────────────────────────────────────────────────── */
.cluster-detail {
  margin-top: var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
}

.cluster-detail[hidden] {
  display: none;
}

.cluster-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* Color bar top */
.cdet-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.cdet-color-bar {
  width: 5px;
  height: 48px;
  border-radius: 4px;
  flex-shrink: 0;
}

.cdet-main {
  flex: 1;
  min-width: 0;
}

.cdet-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text, #1a1a18);
  margin: 0 0 2px 0;
  line-height: 1.2;
}

[data-theme="dark"] .cdet-name {
  color: #f0ede6;
}

.cdet-company {
  font-size: .8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.cdet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.cdet-close:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Body columns */
.cdet-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cdet-col {
  padding: var(--space-4) var(--space-5);
  border-right: 1px solid var(--color-border);
}

.cdet-col:last-child {
  border-right: none;
}

.cdet-col--neighbors {
  grid-column: 1 / -1;
  border-top: 1px solid var(--color-border);
  border-right: none;
}

.cdet-section-label {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2) 0;
}

/* Archetype info */
.cdet-archetype {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-2);
}

.cdet-arch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cdet-arch-name {
  font-weight: 700;
  font-size: .88rem;
  color: var(--color-text, #1a1a18);
}

[data-theme="dark"] .cdet-arch-name {
  color: #f0ede6;
}

.cdet-arch-desc {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-top: 2px;
}

/* Fee badge */
.cdet-fee {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* Members count */
.cdet-members {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 2px;
}

.cdet-members-label {
  font-size: .76rem;
  color: var(--color-text-muted);
}

/* Tactic tags */
.cdet-tactic-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: var(--space-2);
}

.cdet-tactic {
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border: 1px solid rgba(1,105,111,.2);
}

.cdet-tactic--none {
  font-size: .76rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Pillar tags */
.cdet-pillar-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: var(--space-2);
}

.cdet-pillar {
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.cdet-pillar--none {
  font-size: .76rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Neighbors */
.cdet-neighbors-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.cdet-neighbor {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: .78rem;
  font-weight: 500;
  color: var(--color-text, #1a1a18);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

[data-theme="dark"] .cdet-neighbor {
  color: #f0ede6;
}

.cdet-neighbor:hover {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cluster-section {
    padding: var(--space-8) var(--space-4);
  }

  .cluster-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .cluster-controls-left {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .cluster-controls-right {
    justify-content: flex-end;
  }

  .cluster-view-group {
    gap: 4px;
  }

  .cluster-search-input {
    width: 100%;
  }

  /* canvas height is set responsively by cluster-map.js */

  .cdet-body {
    grid-template-columns: 1fr;
  }

  .cdet-col {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .cdet-col:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .cluster-view-btn,
  .cluster-group-btn {
    font-size: .7rem;
    padding: 4px 8px;
  }

  /* canvas height responsive via JS */

  .cdet-top {
    padding: var(--space-3) var(--space-4);
  }

  .cdet-col {
    padding: var(--space-3) var(--space-4);
  }

  .cluster-detail-inner {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   WHITE SPACE ANALYSIS PANEL
   ═══════════════════════════════════════════════════════════════════ */

/* ── Toolbar button ──────────────────────────────────────────────── */
.cluster-ws-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  height: 34px;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.cluster-ws-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.cluster-ws-btn:hover {
  background: rgba(239,68,68,.08);
  border-color: #ef4444;
  color: #ef4444;
}

.cluster-ws-btn.active {
  background: rgba(239,68,68,.12);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 2px 8px rgba(239,68,68,.2);
}

/* ── Panel wrapper ───────────────────────────────────────────────── */
.cluster-ws-panel {
  margin-top: var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
}

.cluster-ws-panel[hidden] {
  display: none;
}

.ws-panel-inner {
  padding: var(--space-6) var(--space-6) var(--space-7);
}

/* ── Panel header ────────────────────────────────────────────────── */
.ws-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.ws-header-left { flex: 1; min-width: 0; }

.ws-eyebrow {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ef4444;
  margin-bottom: var(--space-2);
}

.ws-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--color-text, #1a1a18);
  margin: 0 0 var(--space-2) 0;
  line-height: 1.2;
}

[data-theme="dark"] .ws-title { color: #f0ede6; }

.ws-subtitle {
  font-family: var(--font-body);
  font-size: .86rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.ws-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.ws-close:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* ── Stats bar ───────────────────────────────────────────────────── */
.ws-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.ws-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: var(--space-3) var(--space-4);
  text-align: center;
}

.ws-stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 3px;
}

.ws-stat-lbl {
  font-family: var(--font-body);
  font-size: .72rem;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.3;
}

/* ── Matrix info note ────────────────────────────────────────────── */
.ws-matrix-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-highlight);
  border: 1px solid rgba(1,105,111,.15);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: .8rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-5);
}

.ws-matrix-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  stroke: var(--color-primary);
}

/* ── Section labels ──────────────────────────────────────────────── */
.ws-section-label {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: var(--space-4);
  margin-top: var(--space-2);
}

.ws-section-label--high {
  background: rgba(239,68,68,.1);
  color: #ef4444;
}

.ws-section-label--medium {
  background: rgba(245,158,11,.1);
  color: #d97706;
}

/* ── Cards grid ──────────────────────────────────────────────────── */
.ws-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

/* ── Individual gap card ─────────────────────────────────────────── */
.ws-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow .2s, border-color .2s;
  position: relative;
}

.ws-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.ws-card--high {
  border-left: 3px solid #ef4444;
}

.ws-card--medium {
  border-left: 3px solid #f59e0b;
}

/* Card head — dot + headline + priority badge */
.ws-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ws-arch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ws-headline {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: .02em;
  flex: 1;
  min-width: 0;
}

.ws-priority {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ws-priority--high {
  background: rgba(239,68,68,.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.25);
}

.ws-priority--medium {
  background: rgba(245,158,11,.1);
  color: #d97706;
  border: 1px solid rgba(245,158,11,.25);
}

/* Card title */
.ws-card-title {
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 700;
  color: var(--color-text, #1a1a18);
  line-height: 1.3;
}

[data-theme="dark"] .ws-card-title { color: #f0ede6; }

/* Gap text */
.ws-gap-text {
  font-family: var(--font-body);
  font-size: .82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Opportunity block */
.ws-opportunity {
  background: rgba(1,105,111,.05);
  border: 1px solid rgba(1,105,111,.12);
  border-radius: 8px;
  padding: var(--space-3) var(--space-4);
}

[data-theme="dark"] .ws-opportunity {
  background: rgba(79,152,163,.08);
  border-color: rgba(79,152,163,.2);
}

.ws-opp-label {
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.ws-opp-text {
  font-family: var(--font-body);
  font-size: .81rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

/* Meta row — signal + badges */
.ws-meta-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ws-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-meta-lbl {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.ws-meta-val {
  font-family: var(--font-body);
  font-size: .78rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.45;
}

.ws-meta-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Effort + Potential badges */
.ws-badge {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.ws-badge--potential {
  background: rgba(1,105,111,.08);
  color: var(--color-primary);
  border-color: rgba(1,105,111,.2);
}

/* Examples row */
.ws-examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ws-examples-lbl {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ws-example-tag {
  font-size: .71rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* Highlight / Show on map button */
.ws-highlight-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border: 1px solid rgba(1,105,111,.2);
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  align-self: flex-start;
  margin-top: auto;
}

.ws-highlight-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.ws-highlight-btn svg {
  flex-shrink: 0;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ws-panel-inner {
    padding: var(--space-4) var(--space-4) var(--space-5);
  }

  .ws-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .ws-cards-grid {
    grid-template-columns: 1fr;
  }

  .cluster-ws-btn {
    font-size: .72rem;
    padding: 4px 10px;
  }
}

@media (max-width: 480px) {
  .ws-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .ws-stat-num { font-size: 1.5rem; }

  .ws-header { flex-direction: column; }
  .ws-close { align-self: flex-end; }
}

/* ═══════════════════════════════════════════════════════════════
   INTERNATIONAL BENCHMARKS SECTION
   ═══════════════════════════════════════════════════════════════ */

.intl-section {
  padding: 5rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.intl-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.intl-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0D7D59;
  margin-bottom: 0.75rem;
}

.intl-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.intl-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Benchmark Cards Grid ─────────────────────────────────────── */
.intl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.intl-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow .2s, transform .2s;
}

.intl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}

.intl-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.intl-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.intl-logo--lg {
  width: 56px;
  height: 56px;
  font-size: 0.85rem;
  border-radius: 14px;
}

.intl-card-meta { flex: 1; min-width: 0; }

.intl-flag-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.intl-country { font-weight: 600; }

.intl-badge {
  display: inline-block;
  padding: 1px 7px;
  background: #0D7D5920;
  color: #0D7D59;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .03em;
  border: 1px solid #0D7D5940;
}

/* US Leader badge variant */
.intl-badge--us {
  background: #1E5E8B18;
  color: #1E5E8B;
  border-color: #1E5E8B40;
}
[data-theme="dark"] .intl-badge--us {
  background: #4F98A330;
  color: #7ec8d8;
  border-color: #4F98A360;
}

/* Benchmark reason chip */
.bmk-reason-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid;
  margin: 0.6rem 0 0.75rem;
  font-size: 0.78rem;
}
.bmk-reason-chip--dive {
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
}
.bmk-reason-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.bmk-reason-title {
  font-weight: 700;
  color: var(--color-text);
}

/* US vs intl card accent */
.intl-card--us {
  border-top: 3px solid #1E5E8B;
}
[data-theme="dark"] .intl-card--us {
  border-top-color: #4F98A3;
}
.intl-card--intl {
  border-top: 3px solid #0D7D59;
}

/* Industry tag */
.intl-card-industry-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-surface-2, #e8e6e0);
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* Why It Wins banner */
.bmk-why-wins {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #01696f0d;
  border: 1px solid #01696f28;
  margin: 0.6rem 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
}
[data-theme="dark"] .bmk-why-wins {
  background: #4F98A315;
  border-color: #4F98A340;
}
.bmk-why-wins--dive {
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
}
.bmk-why-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.bmk-why-metric {
  font-weight: 700;
  color: var(--color-text);
}
.bmk-why-vs {
  color: var(--color-text-muted);
  font-size: 0.74rem;
}
.bmk-why-wins--dive .bmk-why-vs {
  font-size: 0.8rem;
}

/* Benchmark filter tabs */
.bmk-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}
.bmk-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--color-border, #ddd);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  font-family: inherit;
}
.bmk-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-alpha, #01696f12);
}
.bmk-tab--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.bmk-tab--active:hover {
  opacity: 0.92;
  color: #fff;
}
.bmk-tab-count {
  background: rgba(255,255,255,0.25);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 0.1rem;
}
.bmk-tab:not(.bmk-tab--active) .bmk-tab-count {
  background: var(--color-surface-2, #e8e6e0);
  color: var(--color-text-muted);
}
@media (max-width: 640px) {
  .bmk-filter-tabs { gap: 0.4rem; }
  .bmk-tab { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
}

.intl-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.1rem;
  line-height: 1.25;
}

.intl-card-company {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.intl-card-tagline {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--color-border);
  line-height: 1.4;
}

.intl-stats-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.intl-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  gap: 0.15rem;
  border-right: 1px solid var(--color-border);
}
.intl-stat:last-child { border-right: none; }

.intl-stat-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text);
  text-align: center;
  line-height: 1.2;
}

.intl-stat-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.intl-card-vp {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.intl-influence-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #01696F12;
  border-radius: 8px;
  border: 1px solid #01696F25;
}

.intl-chip-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.intl-chip-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #01696F;
}

.intl-card-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  align-self: flex-start;
  letter-spacing: .01em;
}
.intl-card-btn:hover { opacity: .85; }

/* ── Filter pill for international ───────────────────────────── */
.pill--international {
  background: #0D7D5918 !important;
  border-color: #0D7D5940 !important;
  color: #0D7D59 !important;
}
.pill--international.active,
.pill--international:hover {
  background: #0D7D59 !important;
  color: #fff !important;
  border-color: #0D7D59 !important;
}

/* ── Influence Panel ──────────────────────────────────────────── */
.intl-influence-panel {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.intl-panel-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.intl-panel-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.6rem;
}

.intl-panel-sub {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

.intl-influence-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.inf-row {
  display: grid;
  grid-template-columns: 200px 120px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border);
}

.inf-col { display: flex; flex-direction: column; gap: 0.6rem; }

.inf-prog-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border: 1px solid;
  border-radius: 10px;
}

.inf-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.inf-prog-name { font-size: 0.85rem; font-weight: 700; color: var(--color-text); }
.inf-prog-origin { font-size: 0.72rem; color: var(--color-text-muted); }
.inf-prog-founded { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 600; }
.inf-prog-members { font-size: 0.72rem; color: var(--color-text-muted); line-height: 1.4; }

.inf-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.5rem;
  gap: 0.5rem;
}

.inf-arrow-icon { font-size: 1.5rem; }

.inf-arrow-line {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
}

.inf-arrow-line-bar {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--color-border) 0%, #01696F 100%);
}

.inf-arrow-head {
  color: #01696F;
  font-size: 0.8rem;
}

.inf-type-label {
  font-size: 0.65rem;
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.4;
}

.inf-us-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #3b82f630;
  border-radius: 10px;
  background: #3b82f610;
}

.inf-us-flag { font-size: 1.25rem; }

.inf-story {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.inf-shared { display: flex; flex-direction: column; gap: 0.4rem; }

.inf-shared-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
}

.inf-shared-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.inf-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #01696F15;
  border: 1px solid #01696F30;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #01696F;
}

.inf-diverge {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-2);
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}

.inf-diverge-label {
  font-weight: 700;
  color: #b45309;
}

/* ── Takeaways ────────────────────────────────────────────────── */
.intl-takeaways { margin-top: 1rem; }

.intl-takeaways-inner {
  background: linear-gradient(135deg, #01696F08 0%, #0D7D5908 100%);
  border: 1px solid #01696F20;
  border-radius: 20px;
  padding: 2.5rem;
}

.intl-takeaways-header { text-align: center; margin-bottom: 2rem; }

.intl-takeaways-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0D7D59;
  margin-bottom: 0.5rem;
}

.intl-takeaways-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
}

.intl-takeaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.intl-takeaway-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.intl-takeaway-icon { font-size: 1.5rem; }

.intl-takeaway-headline {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
}

.intl-takeaway-body {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Deep dive extras ─────────────────────────────────────────── */
.intl-dive-hero {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  background: var(--color-surface-2);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.intl-dive-toprow {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.intl-dive-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0.3rem 0 0.2rem;
  line-height: 1.2;
}

.intl-dive-company {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.intl-dive-vp {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

.intl-dive-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.intl-dive-metrics {
  margin: 0;
  padding: 0 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.intl-dive-metrics li {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.intl-dive-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intl-dive-pillar {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.intl-dive-pillar-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.intl-lineage-section { margin-top: 0.5rem; }

.bs-card--dive {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.bs-card-tactic {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.bs-card-explanation {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.bs-card-practice {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ── Mobile responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .intl-cards {
    grid-template-columns: 1fr;
  }

  .inf-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .inf-center {
    flex-direction: row;
    padding-top: 0;
    gap: 0.75rem;
  }

  .inf-arrow-line { flex: 1; }

  .inf-type-label {
    writing-mode: horizontal-tb;
    min-width: 80px;
    text-align: left;
  }

  .intl-influence-panel { padding: 1.25rem; }
  .intl-takeaways-inner { padding: 1.25rem; }
  .intl-takeaways-grid { grid-template-columns: 1fr; }

  .intl-dive-toprow { flex-direction: row; }
  .intl-dive-stats { gap: 0.5rem; }
}

/* =====================================================
   NEWS FEED SECTION
   ===================================================== */

.news-feed-section {
  padding: 4rem 0 5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.news-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.news-feed-title-block .section-title { margin-bottom: 0.25rem; }
.news-feed-title-block .section-subtitle { margin-bottom: 0; }

.news-feed-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.news-feed-updated {
  font-family: var(--font-body), sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-family: var(--font-body), sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.news-refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg);
}
.news-refresh-btn.spinning svg {
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Source filter pills */
.news-source-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.news-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 0.78rem;
  font-family: var(--font-body), sans-serif;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.news-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.news-pill--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Article grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Article card */
.news-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}
.news-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 18px rgba(1,105,111,0.08);
}

.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.news-source-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-body), sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}

/* Source badge colors */
.news-source-badge[data-source="Retail Dive"]        { background: #1a6bb5; }
.news-source-badge[data-source="Grocery Dive"]       { background: #2e7d32; }
.news-source-badge[data-source="Restaurant Dive"]    { background: #c0392b; }
.news-source-badge[data-source="Loyalty360"]         { background: #01696f; }
.news-source-badge[data-source="Adweek"]             { background: #e67e22; }
.news-source-badge[data-source="Total Retail"]       { background: #5c3d8f; }
.news-source-badge[data-source="Total Retail Omni"]  { background: #5c3d8f; }
.news-source-badge[data-source="Total Retail Mktg"]  { background: #5c3d8f; }
.news-source-badge[data-source="Forbes Retail"]      { background: #0a2342; }
.news-source-badge[data-source="Forbes Innovation"]  { background: #0a2342; }
.news-source-badge[data-source="Payments Journal"]   { background: #005b8e; }
.news-source-badge[data-source="PYMNTS"]             { background: #1c7a6e; }
/* Legacy sources kept for backward compat */
.news-source-badge[data-source="Marketing Week"]     { background: #c0392b; }
.news-source-badge[data-source="Chain Store Age"]    { background: #6d3daa; }
.news-source-badge[data-source="Progressive Grocer"] { background: #2e7d32; }
.news-source-badge[data-source="Harvard Business Review"] { background: #9b0000; }
.news-source-badge[data-source="Unknown"]            { background: #888; }

.news-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-body), sans-serif;
  flex-shrink: 0;
}

.news-card-title {
  font-family: var(--font-display), sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.news-card-summary {
  font-family: var(--font-body), sans-serif;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
  margin: 0;
}

.news-ai-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-family: var(--font-body), sans-serif;
  color: var(--primary);
  opacity: 0.75;
  font-weight: 500;
}

.news-card-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-read-link {
  font-size: 0.8rem;
  font-family: var(--font-body), sans-serif;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.18s;
}
.news-read-link:hover { gap: 0.55rem; }

/* Skeleton loader cards */
.news-card--skeleton {
  pointer-events: none;
}
.news-skel {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-alt) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
.news-skel--badge { height: 18px; width: 90px; border-radius: 100px; }
.news-skel--date  { height: 14px; width: 60px; }
.news-skel--title-1 { height: 14px; width: 100%; margin-bottom: 4px; }
.news-skel--title-2 { height: 14px; width: 70%; }
.news-skel--body-1 { height: 12px; width: 100%; margin-bottom: 4px; }
.news-skel--body-2 { height: 12px; width: 100%; margin-bottom: 4px; }
.news-skel--body-3 { height: 12px; width: 80%; }
.news-skel--link  { height: 14px; width: 100px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty / error state */
.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-body), sans-serif;
  font-size: 0.9rem;
}
.news-empty svg { display: block; margin: 0 auto 0.75rem; opacity: 0.35; }

/* AI attribution note */
.news-ai-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-body), sans-serif;
  color: var(--text-muted);
  opacity: 0.65;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-feed-header { flex-direction: column; gap: 0.75rem; }
  .news-feed-meta { flex-direction: row; }
  .news-source-filters {
    gap: 0.375rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .news-source-filters::-webkit-scrollbar { display: none; }
  .news-pill { font-size: 0.72rem; padding: 0.28rem 0.7rem; }
}

/* =====================================================
   MULTI-PAGE — Page Hero, Active Nav, Footer Nav
   ===================================================== */

/* Active nav link highlight */
.nav-links a.nav-active {
  color: var(--primary);
  font-weight: 700;
  position: relative;
}
.nav-links a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Page hero — compact header for inner pages */
.page-hero {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.page-hero-eyebrow {
  font-family: var(--font-body), sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
  opacity: 0.85;
}
.page-hero-title {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}
.page-hero-sub {
  font-family: var(--font-body), sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
}

/* Subtle page-specific tints */
.page-hero--insights   { background: linear-gradient(135deg, var(--bg) 70%, rgba(1,105,111,0.04)); }
.page-hero--cluster    { background: linear-gradient(135deg, var(--bg) 70%, rgba(79,152,163,0.05)); }
.page-hero--benchmarks { background: linear-gradient(135deg, var(--bg) 70%, rgba(13,125,89,0.04)); }
.page-hero--news       { background: linear-gradient(135deg, var(--bg) 70%, rgba(230,126,34,0.04)); }
.page-hero--compare    { background: linear-gradient(135deg, var(--bg) 70%, rgba(30,94,139,0.04)); }

/* Hero quick-nav buttons (index.html only) */
.hero-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.hero-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body), sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.15s;
}
.hero-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Footer nav */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}
.footer-nav a {
  font-family: var(--font-body), sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}
.footer-nav a:hover { color: var(--primary); }

@media (max-width: 640px) {
  .page-hero { padding: 2.5rem 0 2rem; }
  .hero-page-nav { gap: 0.375rem; }
  .hero-nav-btn { font-size: 0.75rem; padding: 0.4rem 0.75rem; }
  .footer-nav { gap: 0.375rem 1rem; }
}

/* ── In the News badge on program cards ─────────────────────────────── */
.card-updated--news {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.card-news-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: #01696F;
  border-radius: 100px;
  padding: 0.18rem 0.55rem;
  line-height: 1.4;
}
.card-news-badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7fffd4;
  animation: pulse-news 1.8s infinite;
}
@keyframes pulse-news {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.card-updated-date {
  font-size: 0.68rem;
  color: #aaa;
}

/* ── Live News Callouts ──────────────────────────────────────────────────── */
.live-callout {
  border: 1.5px solid color-mix(in srgb, var(--callout-color) 30%, var(--color-border));
  background: color-mix(in srgb, var(--callout-bg) 5%, var(--color-surface));
  border-left: 4px solid var(--callout-color);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.live-callout + .live-callout { margin-top: -0.25rem; }

.live-callout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.live-callout-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--callout-color);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.live-callout-date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.live-callout-headline {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 0.55rem;
}
.live-callout-headline:hover { color: var(--callout-color); }
.live-callout-impact {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
}
.live-callout-source {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--callout-color);
  opacity: 0.8;
}

/* ── Live callout chip on program card ─────────────────────────────────── */
.card-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--callout-color);
  background: color-mix(in srgb, var(--callout-color) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--callout-color) 25%, transparent);
  border-radius: 100px;
  padding: 0.22rem 0.6rem;
  margin-bottom: 0.55rem;
  line-height: 1.3;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--callout-color);
  flex-shrink: 0;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

[data-theme="dark"] .live-callout {
  background: color-mix(in srgb, var(--callout-bg) 8%, var(--color-surface));
}
