/* India H2 Workforce Atlas - HyGOAT Brand Design */
/* Brand tokens from HyGOAT Design System (design-system.md) */

@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-hy: #00994c;
  --color-hy-dark: #007a3d;
  --color-emerald: #50c878;
  --color-goat: #ff8a00;
  --color-goat-dark: #e67300;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --bg: var(--gray-50);
  --surface: #ffffff;
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);
  --accent: var(--color-hy);
  --accent-hover: var(--color-hy-dark);
  --nav-bg: #0a1320;
  --nav-text: #f8fafc;

  --score-9: #00994c;
  --score-7: #50c878;
  --score-5: #86efac;
  --score-3: #ff8a00;
  --score-1: #dc2626;
  --score-null: #374151;

  --phase-construction: #3b82f6;
  --phase-commissioning: #8b5cf6;
  --phase-operations: #0d9488;
  --phase-mixed: #6b7280;

  --overlap-high: #0d9488;
  --overlap-medium: #f59e0b;
  --overlap-low: #ef4444;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-full: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms; --duration-normal: 250ms;
  --sidebar-width: 360px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Mukta', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.atlas-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--nav-bg);
  color: var(--nav-text);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 10;
}

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

.nav-logo-img {
  height: 24px;
  width: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--color-hy) 0%, var(--color-goat) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo svg {
  flex-shrink: 0;
  stroke: var(--color-hy);
  -webkit-text-fill-color: initial;
}

.nav-sep {
  opacity: 0.4;
}

.nav-title {
  font-size: 0.95rem;
  opacity: 0.9;
  font-weight: 500;
}

.nav-right {
  position: relative;
}

.btn-download {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--nav-text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-download:hover {
  border-color: var(--color-hy);
  background: rgba(0, 153, 76, 0.1);
}

.download-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 100;
  min-width: 220px;
  overflow: hidden;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.dropdown-menu a:hover {
  background: var(--gray-100);
}

.dropdown-menu a.busy {
  opacity: 0.6;
  pointer-events: none;
}

.dropdown-menu a.menu-item-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.summary-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 20px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.metric {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.metric-value-muted {
  color: var(--gray-500);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.tooltip-trigger {
  cursor: help;
  color: var(--color-goat);
  font-weight: 700;
}

.tooltip-trigger:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  max-width: 300px;
  z-index: 200;
  margin-top: 8px;
  line-height: 1.4;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  justify-content: space-between;
}

.controls-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.filter-indicator {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.data-status {
  padding: 10px 24px;
  background: #fff7ed;
  border-bottom: 1px solid var(--border);
  color: #9a3412;
  font-size: 0.85rem;
  font-weight: 500;
}

.data-status:empty {
  display: none;
}

.data-status[data-state="ok"] {
  background: #ecfdf5;
  color: var(--color-hy-dark);
}

.btn-toggle {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-toggle.active {
  background: var(--color-goat);
  color: white;
  border-color: var(--color-goat);
}

.btn-toggle:disabled {
  opacity: 0.7;
  cursor: wait;
}

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

.pill {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.atlas-main {
  display: flex;
  min-height: 500px;
  max-height: 70vh;
  position: relative;
}

.treemap-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#treemap {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

#treemap rect {
  stroke: var(--surface);
  stroke-width: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}

#treemap rect:hover {
  opacity: 0.85;
}

#treemap svg:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

#treemap svg:focus:not(:focus-visible) {
  outline: none;
}

#treemap .cell-label {
  pointer-events: none;
  fill: white;
  font-size: 10px;
  font-family: 'Mukta', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tooltip {
  display: none;
  position: absolute;
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 50;
  max-width: 250px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.treemap-empty {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.treemap-empty h3 {
  font-size: 1.1rem;
  color: var(--text);
}

.treemap-empty p {
  max-width: 520px;
  font-size: 0.9rem;
}

.treemap-empty-action {
  border: none;
  background: transparent;
  color: var(--color-goat);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
}

.treemap-empty-action:hover {
  color: var(--color-goat-dark);
}

.sidebar {
  width: var(--sidebar-width);
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  padding: var(--space-5);
  flex-shrink: 0;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.atlas-main::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 40px;
  background: linear-gradient(to top, var(--surface), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal);
  z-index: 1;
}

.atlas-main:has(.sidebar[data-scrollable="true"])::after {
  opacity: 1;
}

.sidebar-header {
  border-left: 3px solid var(--gray-300);
  background: var(--gray-50);
  padding: var(--space-3) var(--space-4);
  margin: calc(-1 * var(--space-5));
  margin-bottom: var(--space-4);
  border-radius: 0;
}

.sidebar-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 48px 16px;
  font-size: 0.9rem;
}

.sidebar h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.sidebar h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.sb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.sb-meta span {
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sb-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.sb-stat {
  flex: 1;
}

.sb-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.sb-stat span:last-child {
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 16px;
}

.sidebar-tabs .pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-panel + .sidebar-panel {
  margin-top: 16px;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--gray-300);
  color: var(--gray-700);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.tab-badge[data-state="active"] {
  background: var(--color-goat);
  color: white;
}

.score-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

.score-bar-label {
  width: 110px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 500;
}

.score-bar-track {
  flex: 1;
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.score-bar-value {
  width: 32px;
  text-align: right;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 6px;
}

.score-rationale {
  margin: -2px 0 10px 110px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.upskill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.upskill-item:hover {
  color: var(--accent);
}

.upskill-score {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.8rem;
}

.empty-inline {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 0;
}

.pathways-summary {
  margin-bottom: 12px;
}

.pathway-cta {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  background: var(--color-goat);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background var(--duration-fast);
}

.pathway-cta:hover {
  background: var(--color-goat-dark);
}

.pathways-summary-line {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.pathway-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.pathway-overlap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pathway-overlap-label {
  min-width: 92px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}

.pathway-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pathway-from {
  color: var(--text-muted);
  font-weight: 500;
}

.pathway-arrow {
  color: var(--color-goat);
  font-weight: 700;
}

.pathway-to {
  color: var(--text);
  font-weight: 700;
}

.pathway-meta {
  margin-bottom: 8px;
}

.pathway-source {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pathway-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  padding: 10px 12px;
}

.pathway-toggle:hover {
  border-color: var(--color-goat);
}

.pathway-skills {
  margin: 10px 0 0 18px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.skill-pill {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}

.overlap-track {
  flex: 1;
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}

.overlap-fill {
  height: 100%;
  border-radius: 999px;
}

.overlap-fill[data-band="high"] {
  background: var(--overlap-high);
}

.overlap-fill[data-band="medium"] {
  background: var(--overlap-medium);
}

.overlap-fill[data-band="low"] {
  background: var(--overlap-low);
}

.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.atlas-footer {
  text-align: center;
  padding: var(--space-5) var(--space-6);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  background: var(--nav-bg);
  line-height: 1.6;
}

.atlas-footer a {
  color: var(--color-hy);
  text-decoration: none;
  font-weight: 500;
}

.atlas-footer a:hover {
  text-decoration: underline;
}

.footer-row {
  margin-bottom: var(--space-1);
}

.footer-row-secondary {
  opacity: 0.6;
  margin-bottom: 0;
}

@keyframes pulse-outline {
  0%,
  100% {
    stroke: white;
    stroke-width: 2;
  }

  50% {
    stroke: white;
    stroke-width: 4;
  }
}

.highlight-cell {
  animation: pulse-outline 0.8s ease-in-out 3;
}

.mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 2px;
  margin-left: 16px;
}

.mode-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: var(--color-goat);
  color: white;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.mode-btn[data-mode="atlas"].active {
  background: var(--color-hy);
}

.scenario-bar {
  background: #fff7ed;
  border-bottom: 1px solid var(--border);
}

.scenario-banner {
  padding: 8px 24px;
  font-size: 0.8rem;
  color: #9a3412;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.scenario-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  flex-wrap: wrap;
}

.scenario-controls-secondary {
  padding-top: 0;
}

.scenario-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.mt-slider {
  flex: 1;
  max-width: 300px;
  accent-color: var(--color-goat);
  height: 6px;
}

.mt-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-goat);
  min-width: 60px;
}

.mt-demand {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cluster-select {
  min-width: 220px;
}

.year-slider {
  max-width: 240px;
}

.year-value {
  min-width: 52px;
}

.timeline-range,
.timeline-note {
  font-size: 0.8rem;
}

.timeline-note {
  color: #9a3412;
}

.scenario-context-bar {
  padding: 0 24px 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.phase-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 24px 10px;
}

.phase-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.scenario-ghost-toggle {
  padding: 0 24px 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.scenario-ghost-toggle label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.csv-progress {
  padding: 0 24px 12px;
}

.csv-progress-label {
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.csv-progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--gray-100);
  overflow: hidden;
}

.csv-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-hy) 0%, var(--color-goat) 100%);
  transition: width 0.15s ease;
}

.coeff-source {
  margin-top: 8px;
}

.coeff-item {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 2px 0;
}

.scenario-legend {
  display: none;
}

.gap-legend {
  display: none;
}

.scenario-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  max-width: 250px;
}

.gap-status-row {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 0;
}

.gap-surplus {
  color: var(--color-hy);
  font-weight: 700;
}

.gap-shortage {
  color: #dc2626;
  font-weight: 700;
}

.mode-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mode-btn-gated {
  opacity: 0.35;
  cursor: not-allowed;
  position: relative;
}

.mode-btn-gated::after {
  content: "data pending";
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.mode-btn[data-mode="gap"].active {
  background: #dc2626;
}

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

@media (max-width: 768px) {
  .atlas-main {
    flex-direction: column;
    max-height: none;
  }

  .sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 50vh;
    order: 2;
  }

  .atlas-main::after {
    width: 100%;
  }

  .treemap-container {
    min-height: 350px;
    max-height: 50vh;
  }

  .summary-bar {
    gap: 16px;
    padding: 16px;
  }

  .metric-value {
    font-size: 1.5rem;
  }

  .pills {
    gap: 4px;
  }

  .pill {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .atlas-nav {
    padding: 12px 16px;
  }

  .controls {
    padding: 12px 16px;
  }

  .data-status {
    padding: 10px 16px;
  }

  .score-rationale {
    margin-left: 0;
  }

  .mode-toggle {
    margin-left: 8px;
  }

  .mode-btn {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .scenario-controls {
    padding: 12px 16px;
  }

  .scenario-controls-secondary {
    padding-top: 0;
  }

  .scenario-banner {
    padding: 8px 16px;
  }

  .scenario-ghost-toggle {
    padding: 0 16px 8px;
  }

  .scenario-context-bar,
  .phase-legend,
  .csv-progress {
    padding-left: 16px;
    padding-right: 16px;
  }

  .scenario-select,
  .cluster-select {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .mt-slider,
  .year-slider {
    max-width: none;
    width: 100%;
  }

  .timeline-range,
  .timeline-note {
    width: 100%;
  }

  .sidebar-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--surface);
    padding-bottom: 8px;
  }

  .tab-badge {
    min-width: 12px;
    height: 12px;
    font-size: 0.62rem;
  }

  .pathway-overlap-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pathway-overlap-label {
    min-width: 0;
  }

  .treemap-empty {
    min-height: 260px;
    padding: 24px;
  }
}
