:root {
  /* Color Variables */
  --color-infrastructure: #4F8EDB;
  --color-legislation: #FFA726;
  --color-sustainability: #AB47BC;
  --color-economy: #EF5350;
  --color-research: #4CAF50;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-blue-50: #eff6ff;
  --color-blue-600: rgb(90, 174, 227);
  --color-green-100: #dcfce7;
  --color-green-600: #16a34a;
  --color-green-700: #15803d;
  --container-base-height: 58px; /* Base height for all three containers */
  --container-padding: 10px 14px 10px 14px; /* Consistent padding */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-gray-50);
  padding: 0;
  min-height: 100vh;
  line-height: 1.5;
}

/* Navigation Bar */
.top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-bottom: none;
  z-index: 1000;
  backdrop-filter: none;
}

.top-nav::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 1001;
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem 1rem 2rem;
  height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.g20-logo-img {
  height: 75px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.dropdown-arrow {
  font-size: 0.7rem;
  opacity: 0.8;
  color: white;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 2rem;
}

.language-select {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: white;
  cursor: pointer;
}

.language-select option {
  background: #374151;
  color: white;
}

.search-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 0.4rem;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Header Banner */
.header-banner {
  width: 100vw;
  height: min(90px, 35vw);
  min-height: 30px;
  background-image: url('../assets/icons/only-cover.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  margin-left: calc(-50vw + 50%);
  margin-bottom: 2rem;
  overflow: hidden;
}

.header-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
}

.banner-content {
  position: relative;
  height: 50%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 2rem;
  z-index: 2;
}

.banner-title {
  position: relative;
  text-align: left;
  max-width: 700px;
}

.banner-title h1 {
  color: white;
  font-size: clamp(1.5rem, 3vw, 4rem);
  font-weight: 600;
  line-height: 1;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* Main Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 80vh auto; /* Change from '1fr auto' to fixed height */
  gap: 0.5rem;
  padding: 0 0.5rem;
}


.left-panel-container {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  
}

.left-panel {
  display: flex;
  flex-direction: row;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%; /* Add this */
}

/* Sidebar */
.sidebar {
  width: 170px;
  background: var(--color-gray-50);
  color: var(--color-gray-800);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--color-gray-200);
  height: 100%;
}

.sidebar-how-to-use {
  padding: var(--container-padding);
  border-bottom: 1px solid var(--color-gray-200);
  background: rgb(255, 255, 255);
  min-height: var(--container-base-height);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
}

.sidebar-header {
  padding: var(--container-padding);
  /* border-bottom: 1px solid var(--color-gray-200); */
  background: rgb(236, 231, 231);
  min-height: var(--container-base-height);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-gray-800);
}

.sidebar-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-gray-800);
}

.sidebar-menu {
  flex: 1;
  padding: 0;
  background: rgb(236, 231, 231);
}

.sidebar-item {
  padding: 4px 8px;
  margin: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--color-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.sidebar-item:hover {
  border-color: var(--color-gray-300);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sidebar-item-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--color-gray-800);
}

.sidebar-item-desc {
  font-size: 12px;
  color: var(--color-gray-600);
  line-height: 1.4;
}

/* Dimension-specific border and active states */
.sidebar-item[data-dimension="Enabling Infrastructure"] {
  border-left: 2px solid var(--color-infrastructure);
}
.sidebar-item[data-dimension="Legislation & Policy"] {
  border-left: 2px solid var(--color-legislation);
}
.sidebar-item[data-dimension="Sustainability & Society"] {
  border-left: 2px solid var(--color-sustainability);
}
.sidebar-item[data-dimension="Economy & Innovation"] {
  border-left: 2px solid var(--color-economy);
}
.sidebar-item[data-dimension="Research & Education"] {
  border-left: 2px solid var(--color-research);
}

.sidebar-item.active[data-dimension="Enabling Infrastructure"] {
  background: linear-gradient(135deg, #e8f3f4, #f0f9fa);
  border-left: 4px solid var(--color-infrastructure);
  border-color: var(--color-infrastructure);
  box-shadow: 0 4px 16px rgba(79, 142, 219, 0.2);
}

.sidebar-item.active[data-dimension="Legislation & Policy"] {
  background: linear-gradient(135deg, #fef6e8, #fff8ed);
  border-left: 4px solid var(--color-legislation);
  border-color: var(--color-legislation);
  box-shadow: 0 4px 16px rgba(255, 167, 38, 0.2);
}

.sidebar-item.active[data-dimension="Sustainability & Society"] {
  background: linear-gradient(135deg, #f5f0ff, #faf5ff);
  border-left: 4px solid var(--color-sustainability);
  border-color: var(--color-sustainability);
  box-shadow: 0 4px 16px rgba(171, 71, 188, 0.2);
}

.sidebar-item.active[data-dimension="Economy & Innovation"] {
  background: linear-gradient(135deg, #fef0f0, #fef5f5);
  border-left: 4px solid var(--color-economy);
  border-color: var(--color-economy);
  box-shadow: 0 4px 16px rgba(239, 83, 80, 0.2);
}

.sidebar-item.active[data-dimension="Research & Education"] {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border-left: 4px solid var(--color-research);
  border-color: var(--color-research);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

.sidebar-item.active .sidebar-icon {
  color: white;
}

.sidebar-item.active[data-dimension="Enabling Infrastructure"] .sidebar-icon {
  background: var(--color-infrastructure);
}
.sidebar-item.active[data-dimension="Legislation & Policy"] .sidebar-icon {
  background: var(--color-legislation);
}
.sidebar-item.active[data-dimension="Sustainability & Society"] .sidebar-icon {
  background: var(--color-sustainability);
}
.sidebar-item.active[data-dimension="Economy & Innovation"] .sidebar-icon {
  background: var(--color-economy);
}
.sidebar-item.active[data-dimension="Research & Education"] .sidebar-icon {
  background: var(--color-research);
}

.sidebar-item.active .sidebar-item-title {
  color: var(--color-gray-900);
  font-weight: 700;
}

.sidebar-item.active .sidebar-item-desc {
  color: var(--color-gray-700);
  font-weight: 500;
}


/* How-to-Use Guide Styles - Add to your design.css */

/* Guide Trigger Button in Sidebar */
.how-to-use-trigger {
  width: 100%;
  background: linear-gradient(135deg, var(--color-blue-600), #3b82f6);
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.how-to-use-trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.how-to-use-trigger:hover {
  background: linear-gradient(135deg, #25eb5a, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 246, 234, 0.4);
}

.how-to-use-trigger:hover::before {
  left: 100%;
}

.how-to-use-trigger:active {
  transform: translateY(0);
}

/* Demo Mode Body Styling */
.guide-demo-mode {
  overflow: hidden;
}

/* Guide Overlay */
.guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent; /* Light white background instead of dark */
  z-index: 9999;
  opacity: 1;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Remove backdrop-filter for no blur */
}

.guide-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Demo Mode Overlay */
.guide-demo-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10003;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.guide-demo-overlay.active {
  opacity: 1;
  visibility: visible;
}

.demo-message {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: demo-pulse 2s infinite;
}

@keyframes demo-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}
/* Enhanced Guide Tooltip - Responsive Sizing */
.guide-tooltip {
  position: absolute;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15), /* Lighter shadow */
    0 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e5e7eb; /* Visible border for definition */
  /* Responsive sizing */
  width: auto;
  max-width: min(400px, calc(100vw - 40px));
  min-width: 280px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}


.guide-tooltip.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.guide-tooltip h3 {
  margin: 0 0 12px 0;
  color: var(--color-gray-800);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  flex: 1;
  word-wrap: break-word;
}


.guide-demo-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 12px;
  flex-shrink: 0;
  animation: badge-glow 3s infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6); }
}

.guide-tooltip p {
  margin: 0 0 20px 0;
  color: var(--color-gray-600);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.guide-tooltip-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.guide-step-counter {
  font-size: 13px;
  color: var(--color-gray-500);
  font-weight: 600;
  background: var(--color-gray-100);
  padding: 4px 8px;
  border-radius: 8px;
}

.guide-buttons {
  display: flex;
  gap: 8px;
}

.guide-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.guide-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.4s;
}

.guide-btn:hover::before {
  left: 100%;
}

.guide-btn-skip {
  background: transparent;
  color: var(--color-gray-600);
  border: 2px solid var(--color-gray-300);
}

.guide-btn-skip:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-400);
  transform: translateY(-1px);
}

.guide-btn-prev {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border: 2px solid var(--color-gray-200);
}

.guide-btn-prev:hover {
  background: var(--color-gray-200);
  border-color: var(--color-gray-300);
  transform: translateY(-1px);
}

.guide-btn-next {
  background: linear-gradient(135deg, var(--color-blue-600), #3b82f6);
  color: white;
  border: 2px solid var(--color-blue-600);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.guide-btn-next:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.guide-btn-next:active {
  transform: translateY(0);
}

/* Enhanced Guide Arrow */
.guide-arrow {
  position: absolute;
  z-index: 10001;
  filter: drop-shadow(0 4px 8px transparent);
  /* animation: arrow-pulse 2s infinite; */
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.guide-arrow.right {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid white;
}

.guide-arrow.left {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 18px solid white;
}

.guide-arrow.bottom {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid white;
}

.guide-arrow.top {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 18px solid white;
}

/* Enhanced Element Highlight - Lighter Effect */
.element-highlight {
  position: absolute;
  border: 3px solid #da1240; /* Solid blue border */
  border-radius: 12px;
  background: transparent; /* Very light blue background */
  pointer-events: none;
  z-index: 9998;
  transition: all 0.4s ease;
  box-shadow: 
    0 0 0 9999px rgba(255, 255, 255, 0.8), /* Light white overlay instead of dark */
    0 0 20px rgba(59, 130, 246, 0.3); /* Subtle blue glow */
  display: none;
  /* animation: highlight-pulse-light 3s infinite; */
}

@keyframes highlight-pulse-light {
  0%, 100% {
    border-color: #09bc3c;

  }
  50% {
    border-color: #fa60c7;
  }
}

@keyframes highlight-pulse {
  0%, 100% {
    border-color: var(--color-blue-600);
    box-shadow: 
      0 0 0 9999px rgba(0, 0, 0, 0.5),
      0 0 40px rgba(59, 130, 246, 0.6),
      inset 0 0 40px rgba(59, 130, 246, 0.1);
  }
  50% {
    border-color: #60a5fa;
    box-shadow: 
      0 0 0 9999px rgba(0, 0, 0, 0.5),
      0 0 60px rgba(96, 165, 250, 0.8),
      inset 0 0 60px rgba(96, 165, 250, 0.15);
  }
}

/* Enhanced Guide Pulse Animation */
.guide-pulse {
  position: absolute;
  font-size: 28px;
  z-index: 10002;
  pointer-events: none;
  animation: guide-pulse-bounce 2s infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes guide-pulse-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
  40% {
    transform: translateY(-12px) scale(1.2) rotate(-10deg);
    opacity: 0.8;
  }
  60% {
    transform: translateY(-6px) scale(1.1) rotate(5deg);
    opacity: 0.9;
  }
}

/* Export Button Special Highlight */
.guide-highlight-export {
  position: relative;
  overflow: hidden;
  animation: export-special-glow 3s infinite;
}

.guide-highlight-export::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: export-shine 2s infinite;
}

@keyframes export-special-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(135, 7, 221, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 40px rgba(182, 10, 10, 0.8);
    transform: scale(1.05);
  }
}

@keyframes export-shine {
  0% { transform: rotate(45deg) translate(-100%, -100%); }
  100% { transform: rotate(45deg) translate(100%, 100%); }
}

/* Demo Mode Adjustments for UI Elements */
.guide-demo-mode .policy-item,
.guide-demo-mode .selected-policy-item,
.guide-demo-mode .sidebar-item {
  transition: all 0.3s ease;
}

.guide-demo-mode .policy-item:hover,
.guide-demo-mode .selected-policy-item:hover {
  transform: translateY(-2px);
}



/* Phase Dropdown */
.phase-dropdown {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 1px 1px 1px;
  background: white;
  border: none;
  box-shadow: none;
}

.phase-dropdown::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 16px solid var(--color-gray-200);
  z-index: 2;
}

.phase-dropdown.visible {
  max-height: 270px;
}

.phase-dropdown-content {
  background: transparent;
  padding: 8px 12px;
}

.phase-dropdown-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 12px;
  text-align: center;
}

.phase-buttons-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 17px;
  max-width: 180px;
  margin-left: -1px;
}

.phase-btn {
  display: flex;
  margin-left: 0px;
  align-items: center;
  gap: 4px;
  position: relative;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.phase-btn:hover .phase-circle {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.phase-btn:hover .phase-label {
  transform: scale(1.05);
}

.phase-circle {
  width: 27px;
  height: 27px;
  margin-left: 4px;
  border-radius: 50%;
  border: 2px solid var(--color-gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.phase-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-600);
  transition: color 0.3s ease;
}

.phase-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-600);
  flex: 1;
  text-align: left;
  transition: all 0.3s ease;
}

.arrow-connector {
  position: absolute;
  left: -20%;
  top: -3px;
  width: 40px;
  height: 40px;
  z-index: 1;
}

.phase-dropdown-content .arrow-connector {
  position: absolute;
  left: -3%;
  top: -1px;
  width: 40px;
  height: 70px;
  z-index: 1;
}

.arrow-svg {
  width: 100%;
  height: 100%;
}

.arrow-line {
  stroke: var(--color-gray-300);
  stroke-width: 4;
  fill: none;
}

.arrow-head {
  fill: var(--color-gray-300);
}

.phase-btn:last-child .arrow-connector {
  display: none;
}

/* Dimension-specific phase colors */
.phase-dropdown[data-dimension="Enabling Infrastructure"] .phase-circle {
  border-color: var(--color-infrastructure);
}
.phase-dropdown[data-dimension="Enabling Infrastructure"] .phase-number,
.phase-dropdown[data-dimension="Enabling Infrastructure"] .phase-label {
  color: var(--color-infrastructure);
}
.phase-dropdown[data-dimension="Enabling Infrastructure"] .arrow-line,
.phase-dropdown[data-dimension="Enabling Infrastructure"] .arrow-head {
  stroke: var(--color-infrastructure);
  fill: var(--color-infrastructure);
}
.phase-dropdown[data-dimension="Enabling Infrastructure"] .phase-btn.active .phase-circle {
  background: var(--color-infrastructure);
}
.phase-dropdown[data-dimension="Enabling Infrastructure"] .phase-btn.active .phase-number {
  color: white;
}

.phase-dropdown[data-dimension="Legislation & Policy"] .phase-circle {
  border-color: var(--color-legislation);
}
.phase-dropdown[data-dimension="Legislation & Policy"] .phase-number,
.phase-dropdown[data-dimension="Legislation & Policy"] .phase-label {
  color: var(--color-legislation);
}
.phase-dropdown[data-dimension="Legislation & Policy"] .arrow-line,
.phase-dropdown[data-dimension="Legislation & Policy"] .arrow-head {
  stroke: var(--color-legislation);
  fill: var(--color-legislation);
}
.phase-dropdown[data-dimension="Legislation & Policy"] .phase-btn.active .phase-circle {
  background: var(--color-legislation);
}
.phase-dropdown[data-dimension="Legislation & Policy"] .phase-btn.active .phase-number {
  color: white;
}

.phase-dropdown[data-dimension="Sustainability & Society"] .phase-circle {
  border-color: var(--color-sustainability);
}
.phase-dropdown[data-dimension="Sustainability & Society"] .phase-number,
.phase-dropdown[data-dimension="Sustainability & Society"] .phase-label {
  color: var(--color-sustainability);
}
.phase-dropdown[data-dimension="Sustainability & Society"] .arrow-line,
.phase-dropdown[data-dimension="Sustainability & Society"] .arrow-head {
  stroke: var(--color-sustainability);
  fill: var(--color-sustainability);
}
.phase-dropdown[data-dimension="Sustainability & Society"] .phase-btn.active .phase-circle {
  background: var(--color-sustainability);
}
.phase-dropdown[data-dimension="Sustainability & Society"] .phase-btn.active .phase-number {
  color: white;
}

.phase-dropdown[data-dimension="Economy & Innovation"] .phase-circle {
  border-color: var(--color-economy);
}
.phase-dropdown[data-dimension="Economy & Innovation"] .phase-number,
.phase-dropdown[data-dimension="Economy & Innovation"] .phase-label {
  color: var(--color-economy);
}
.phase-dropdown[data-dimension="Economy & Innovation"] .arrow-line,
.phase-dropdown[data-dimension="Economy & Innovation"] .arrow-head {
  stroke: var(--color-economy);
  fill: var(--color-economy);
}
.phase-dropdown[data-dimension="Economy & Innovation"] .phase-btn.active .phase-circle {
  background: var(--color-economy);
}
.phase-dropdown[data-dimension="Economy & Innovation"] .phase-btn.active .phase-number {
  color: white;
}

.phase-dropdown[data-dimension="Research & Education"] .phase-circle {
  border-color: var(--color-research);
}
.phase-dropdown[data-dimension="Research & Education"] .phase-number,
.phase-dropdown[data-dimension="Research & Education"] .phase-label {
  color: var(--color-research);
}
.phase-dropdown[data-dimension="Research & Education"] .arrow-line,
.phase-dropdown[data-dimension="Research & Education"] .arrow-head {
  stroke: var(--color-research);
  fill: var(--color-research);
}
.phase-dropdown[data-dimension="Research & Education"] .phase-btn.active .phase-circle {
  background: var(--color-research);
}
.phase-dropdown[data-dimension="Research & Education"] .phase-btn.active .phase-number {
  color: white;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  height: 100%;
  overflow: hidden;
  min-height: 0;
  max-height: 100%; /* Add this */
}

/* Search Filter Section - Match sidebar header */
.search-filter-section {
  padding: var(--container-padding);
  border-bottom: 1px solid var(--color-gray-200);
  background: white;
  flex-shrink: 0;
  min-height: var(--container-base-height);
  box-sizing: border-box;
  display: flex;
  align-items: center; /* Center the search row vertically */
}

.search-filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  margin: 0; /* Remove any margin that might affect centering */
}


.search-container {
  flex: 0 0 250px;
  position: relative;
}

/* Search input and dropdown height consistency */
.search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  font-size: 0.75rem;
  background: white;
  transition: all 0.2s ease;
  outline: none;
  height: 36px; /* Fixed height */
  box-sizing: border-box;
}

.search-input:focus {
  border-color: var(--color-blue-600);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--color-gray-400);
  pointer-events: none;
}

.keyword-filters-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.keyword-dropdown {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  font-size: 0.75rem;
  background: white;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  min-width: 150px;
  height: 36px; /* Match search input height */
  box-sizing: border-box;
}



.keyword-dropdown:focus {
  border-color: var(--color-blue-600);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.keyword-dropdown:hover {
  border-color: var(--color-gray-300);
}

.clear-filters-btn {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 6px;
  background: white;
  color: var(--color-gray-600);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
  height: 36px; /* Match other input heights */
  box-sizing: border-box;
}

.clear-filters-btn:hover {
  background: var(--color-gray-50);
  color: var(--color-gray-700);
  border-color: var(--color-gray-300);
}

/* Active Keywords */
.active-keywords-inline {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.visible-keywords {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow: hidden;
  flex-shrink: 1;
  min-width: 0;
}

.keyword-chip {
  padding: 0.25rem 0.5rem;
  background: var(--color-blue-100);
  color: var(--color-blue-700);
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--color-blue-300);
}

.keyword-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-chip-remove {
  background: none;
  border: none;
  color: var(--color-blue-600);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.keyword-chip-remove:hover {
  background: var(--color-blue-200);
  color: var(--color-blue-800);
}

.keywords-overflow {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--color-gray-300);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.keywords-overflow:hover {
  background: var(--color-gray-200);
  border-color: var(--color-gray-400);
}

.keywords-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 6px;
  padding: 0.5rem;
  margin-top: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.keywords-tooltip.visible {
  display: block;
}

.tooltip-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Section Styling */
.section {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: none;
  border-bottom: 1px solid var(--color-gray-200);
}

.section:last-child {
  border-bottom: none;
}

.section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.1rem;
  letter-spacing: -0.025em;
}

/* Phases Section - Match sidebar header */
.phases-section {
  padding: var(--container-padding);
  border-bottom: 1px solid var(--color-gray-200);
  background: white;
  flex-shrink: 0;
  transition: all 0.3s ease;
  min-height: var(--container-base-height);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
}


/* Dimension-specific background colors for phases section */
.phases-section[data-dimension="Enabling Infrastructure"] {
  background: linear-gradient(135deg, #e8f3f4, #f0f9fa);
  border-bottom-color: var(--color-infrastructure);
}

.phases-section[data-dimension="Legislation & Policy"] {
  background: linear-gradient(135deg, #fef6e8, #fff8ed);
  border-bottom-color: var(--color-legislation);
}

.phases-section[data-dimension="Sustainability & Society"] {
  background: linear-gradient(135deg, #f5f0ff, #faf5ff);
  border-bottom-color: var(--color-sustainability);
}

.phases-section[data-dimension="Economy & Innovation"] {
  background: linear-gradient(135deg, #fef0f0, #fef5f5);
  border-bottom-color: var(--color-economy);
}

.phases-section[data-dimension="Research & Education"] {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border-bottom-color: var(--color-research);
}

.phases-section.hidden {
    display: none;
}

.phases-section.visible {
  display: flex; /* Change from block to flex when visible */
}

.phases-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
  white-space: nowrap;
  margin: 0; /* Ensure no margin */
}

.phases-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0; /* Remove bottom margin */
  flex-shrink: 0; /* Prevent shrinking */
}

.phases-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0; /* Remove bottom margin since everything is on one line */
}

.phases-container {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-start;
  align-items: center;
  flex: 1;
  margin: 0; /* Remove any margin */
}

/* Ensure phase buttons don't grow too large */
.phases-container .phase-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.6rem; /* Slightly smaller padding for better fit */
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  background: white;
  color: var(--color-gray-700);
  font-size: 0.75rem; /* Consistent font size */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: auto;
  white-space: nowrap;
  height: 32px; /* Fixed height for consistency */
  box-sizing: border-box;
}



.phases-container .phase-btn:hover {
    border-color: var(--color-gray-400);
    background: var(--color-gray-50);
    transform: translateY(-1px);
}

.phases-container .phase-btn.active {
    border-color: var(--color-blue-600);
    background: var(--color-blue-50);
    color: var(--color-blue-700);
    font-weight: 600;
}

.phases-container .phase-btn .phase-icon {
    font-size: 1rem;
}

.phase-icon {
  font-size: 14px;
}


/* Dimension-specific phase button colors */
.phases-container[data-dimension="Enabling Infrastructure"] .phase-btn.active {
    border-color: var(--color-infrastructure);
    background: #e8f3f4;
    color: var(--color-infrastructure);
}

.phases-container[data-dimension="Legislation & Policy"] .phase-btn.active {
    border-color: var(--color-legislation);
    background: #fef6e8;
    color: var(--color-legislation);
}

.phases-container[data-dimension="Sustainability & Society"] .phase-btn.active {
    border-color: var(--color-sustainability);
    background: #f5f0ff;
    color: var(--color-sustainability);
}

.phases-container[data-dimension="Economy & Innovation"] .phase-btn.active {
    border-color: var(--color-economy);
    background: #fef0f0;
    color: var(--color-economy);
}

.phases-container[data-dimension="Research & Education"] .phase-btn.active {
    border-color: var(--color-research);
    background: #ecfdf5;
    color: var(--color-research);
}
/* Policy Section */
.section#policySection {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: none;
  min-height: 0;
  max-height: 100%;
  height: 100%; /* Add this to force it to fill available space */
}

.policy-container {
  display: grid;
  grid-template-columns: 1fr 0fr;
  gap: 0.5rem;
  height: 100%;
  flex: 1;
  transition: grid-template-columns 0.3s ease;
}

.policy-container.details-focused {
  grid-template-columns: 0fr 1fr;
}

.policy-list-column {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  min-width: 0;
  height: 100%;
}

.policy-container.details-focused .policy-list-column {
  opacity: 0;
  pointer-events: none;
}

.policy-list-column-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.policy-list-header {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  text-align: center;
  flex-shrink: 0;
}

.policy-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  flex: 1;
  padding-left: 0.55rem;
  padding-right: 0.35rem;
  min-height: 0;
  /* max-height: 400px; */
}

.policy-list-toggle {
  background: transparent;
  border: 1px solid var(--color-gray-300);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
  padding: 0.5rem 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.policy-list-toggle:hover {
  background: var(--color-gray-100);
  border-color: var(--color-gray-400);
}

.policy-list-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  color: currentColor;
}

.policy-container.details-focused .policy-list-toggle-icon {
  transform: rotate(0deg);
}

.policy-details-column:not(.has-policy) .policy-list-toggle {
  display: none;
}

/* Policy Items */
.policy-item {
  width: 100%;
  text-align: left;
  padding-top: 0rem;
  padding-left: 0.5rem;
  padding-bottom: 0.2rem;
  padding-right: 7rem;
  border: 1px solid var(--color-gray-100);
  border-radius: 6px;
  background: rgba(240, 240, 240, 0.366);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.policy-item:hover {
  border-color: var(--color-gray-300);
  transform: translateY(-1px);
}

.policy-item:focus {
  outline: 2px solid var(--color-blue-600);
  outline-offset: 2px;
}

.policy-item.active {
  border-color: var(--color-blue-600);
  background: var(--color-blue-50);
}

.policy-item.selected {
  border-color: #0f7884;
  background: #cbe5ec;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.policy-item.selected .policy-info {
  padding-left: 1.5rem;
}

/* Dimension-specific policy item styles */
.policy-item.cross-dimensional[data-dimension="Enabling Infrastructure"] {
  border-left: 1px solid var(--color-infrastructure);
}
.policy-item.cross-dimensional[data-dimension="Legislation & Policy"] {
  border-left: 1px solid var(--color-legislation);
}
.policy-item.cross-dimensional[data-dimension="Sustainability & Society"] {
  border-left: 1px solid var(--color-sustainability);
}
.policy-item.cross-dimensional[data-dimension="Economy & Innovation"] {
  border-left: 1px solid var(--color-economy);
}
.policy-item.cross-dimensional[data-dimension="Research & Education"] {
  border-left: 1px solid var(--color-research);
}

.policy-item.cross-dimensional:hover {
  border-left-color: var(--color-blue-700);
  background: var(--color-blue-50);
}

/* Read More Button */
.policy-read-more {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.7rem;
  color: #2c5f6f;
  font-weight: 500;
  opacity: 0.7;
  transition: all 0.2s ease;
  /* background: white; */
  padding: 0;
  border-radius: 8px;
  /* border: 1px solid #2c5f6f; */
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  min-height: 26px;
}

/* .policy-read-more::before {
  content: 'Read More';
  padding: 0.3rem 0.6rem;
  background: white;
  color: #2c5f6f;
  font-weight: 500;
  font-size: 0.7rem;
} */

.policy-read-more::after {
  content: '▼';
  width: 22px;
  height: 22px;
  background: #2c5f6f;
  color: white;
  border-radius:8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  margin: 2px;
}

.policy-read-more:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.02);
}

/* Dimension-specific read more button colors */
.policy-item[data-dimension="Enabling Infrastructure"] .policy-read-more {
  border-color: var(--color-infrastructure);
}
.policy-item[data-dimension="Enabling Infrastructure"] .policy-read-more::before {
  color: var(--color-infrastructure);
}
.policy-item[data-dimension="Enabling Infrastructure"] .policy-read-more::after {
  background: var(--color-infrastructure);
}
.policy-item[data-dimension="Enabling Infrastructure"] .policy-read-more:hover {
  border-color: #3a6cb3;
}
.policy-item[data-dimension="Enabling Infrastructure"] .policy-read-more:hover::before {
  color: #3a6cb3;
}
.policy-item[data-dimension="Enabling Infrastructure"] .policy-read-more:hover::after {
  background: #3a6cb3;
}

.policy-item[data-dimension="Legislation & Policy"] .policy-read-more {
  border-color: var(--color-legislation);
}
.policy-item[data-dimension="Legislation & Policy"] .policy-read-more::before {
  color: var(--color-legislation);
}
.policy-item[data-dimension="Legislation & Policy"] .policy-read-more::after {
  background: var(--color-legislation);
}
.policy-item[data-dimension="Legislation & Policy"] .policy-read-more:hover {
  border-color: #e08c1a;
}
.policy-item[data-dimension="Legislation & Policy"] .policy-read-more:hover::before {
  color: #e08c1a;
}
.policy-item[data-dimension="Legislation & Policy"] .policy-read-more:hover::after {
  background: #e08c1a;
}

.policy-item[data-dimension="Sustainability & Society"] .policy-read-more {
  border-color: var(--color-sustainability);
}
.policy-item[data-dimension="Sustainability & Society"] .policy-read-more::before {
  color: var(--color-sustainability);
}
.policy-item[data-dimension="Sustainability & Society"] .policy-read-more::after {
  background: var(--color-sustainability);
}
.policy-item[data-dimension="Sustainability & Society"] .policy-read-more:hover {
  border-color: #8e2bb8;
}
.policy-item[data-dimension="Sustainability & Society"] .policy-read-more:hover::before {
  color: #8e2bb8;
}
.policy-item[data-dimension="Sustainability & Society"] .policy-read-more:hover::after {
  background: #8e2bb8;
}

.policy-item[data-dimension="Economy & Innovation"] .policy-read-more {
  border-color: var(--color-economy);
}
.policy-item[data-dimension="Economy & Innovation"] .policy-read-more::before {
  color: var(--color-economy);
}
.policy-item[data-dimension="Economy & Innovation"] .policy-read-more::after {
  background: var(--color-economy);
}
.policy-item[data-dimension="Economy & Innovation"] .policy-read-more:hover {
  border-color: #c62828;
}
.policy-item[data-dimension="Economy & Innovation"] .policy-read-more:hover::before {
  color: #c62828;
}
.policy-item[data-dimension="Economy & Innovation"] .policy-read-more:hover::after {
  background: #c62828;
}

.policy-item[data-dimension="Research & Education"] .policy-read-more {
  border-color: var(--color-research);
}
.policy-item[data-dimension="Research & Education"] .policy-read-more::before {
  color: var(--color-research);
}
.policy-item[data-dimension="Research & Education"] .policy-read-more::after {
  background: var(--color-research);
}
.policy-item[data-dimension="Research & Education"] .policy-read-more:hover {
  border-color: #388e3c;
}
.policy-item[data-dimension="Research & Education"] .policy-read-more:hover::before {
  color: #388e3c;
}
.policy-item[data-dimension="Research & Education"] .policy-read-more:hover::after {
  background: #388e3c;
}

/* Policy list column dimension-specific colors */
.policy-list-column[data-dimension="Enabling Infrastructure"] .policy-item:hover {
  border-color: var(--color-infrastructure);
  background: rgba(255, 255, 255, 0.05);
}
.policy-list-column[data-dimension="Enabling Infrastructure"] .policy-item.active {
  border-color: var(--color-infrastructure);
  background: #e8f3f4;
}
.policy-list-column[data-dimension="Enabling Infrastructure"] .policy-item.selected {
  border-color: var(--color-infrastructure);
  background: #d0ebee;
  box-shadow: 0 1px 4px rgba(22, 102, 106, 0.2);
}

.policy-list-column[data-dimension="Legislation & Policy"] .policy-item:hover {
  border-color: #cb9b3d;
  background: rgba(203, 155, 61, 0.05);
}
.policy-list-column[data-dimension="Legislation & Policy"] .policy-item.active {
  border-color: #cb9b3d;
  background: #fef6e8;
  color: #b8872f;
}
.policy-list-column[data-dimension="Legislation & Policy"] .policy-item.selected {
  border-color: #b8872f;
  background: #fcedb2;
  box-shadow: 0 1px 4px rgba(203, 155, 61, 0.2);
}

.policy-list-column[data-dimension="Sustainability & Society"] .policy-item:hover {
  border-color: #5f0085;
  background: rgba(95, 0, 133, 0.05);
}
.policy-list-column[data-dimension="Sustainability & Society"] .policy-item.active {
  border-color: #5f0085;
  background: #f5f0ff;
  color: #4a0066;
}
.policy-list-column[data-dimension="Sustainability & Society"] .policy-item.selected {
  border-color: #4a0066;
  background: #e8d5f2;
  box-shadow: 0 1px 4px rgba(95, 0, 133, 0.2);
}

.policy-list-column[data-dimension="Economy & Innovation"] .policy-item:hover {
  border-color: #8b2f30;
  background: rgba(139, 47, 48, 0.05);
}
.policy-list-column[data-dimension="Economy & Innovation"] .policy-item.active {
  border-color: #8b2f30;
  background: #fef0f0;
  color: #7a2829;
}
.policy-list-column[data-dimension="Economy & Innovation"] .policy-item.selected {
  border-color: #7a2829;
  background: #f5d5d5;
  box-shadow: 0 1px 4px rgba(139, 47, 48, 0.2);
}

.policy-list-column[data-dimension="Research & Education"] .policy-item:hover {
  border-color: #005b3a;
  background: rgba(0, 91, 58, 0.05);
}
.policy-list-column[data-dimension="Research & Education"] .policy-item.active {
  border-color: #005b3a;
  background: #ecfdf5;
  color: #004d32;
}
.policy-list-column[data-dimension="Research & Education"] .policy-item.selected {
  border-color: #004d32;
  background: #d1f7e5;
  box-shadow: 0 1px 4px rgba(0, 91, 58, 0.2);
}

.policy-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
}

.policy-info {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  padding-right: 4rem;
  flex-direction: column;
  flex: 1;
}

.policy-id {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.7rem; 
  font-weight: 500;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  flex-shrink: 0;
}

.policy-id.selected {
  background: var(--color-green-100);
  color: var(--color-green-700);
}

.policy-title {
  font-weight: 500;
  top: 0.6rem;
  line-height: 1.7;
  font-size: 0.875rem;
  color: var(--color-gray-800);
  word-wrap: break-word;
  white-space: normal;
}

.selected-icon {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  flex-shrink: 0;
  position: absolute;
  left: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.policy-item[data-dimension="Enabling Infrastructure"] .selected-icon {
  background: var(--color-infrastructure);
}
.policy-item[data-dimension="Legislation & Policy"] .selected-icon {
  background: var(--color-legislation);
}
.policy-item[data-dimension="Sustainability & Society"] .selected-icon {
  background: var(--color-sustainability);
}
.policy-item[data-dimension="Economy & Innovation"] .selected-icon {
  background: var(--color-economy);
}
.policy-item[data-dimension="Research & Education"] .selected-icon {
  background: var(--color-research);
}

/* Policy Details Column */
.policy-details-column {
  display: flex;
  flex-direction: column;
  background: white;
  font-size: 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.policy-container.details-focused .policy-details-column {
  opacity: 1;
  pointer-events: auto;
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 60px;
}

.details-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-800);
  text-align: center;
  flex: 1;
  margin: 0 1rem;
}

.details-header-buttons {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  display: flex;
  justify-content: flex-end;
}

.details-header-buttons .btn-select {
  margin: 0;
}

.details-header-buttons .btn-select.disabled {
  background: var(--color-blue-100);
  color: var(--color-blue-700);
  cursor: not-allowed;
}

.btn-select {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--color-blue-600);
  border: 1px solid var(--color-blue-600);
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-select:hover:not(:disabled) {
  background: var(--color-blue-700);
  border-color: var(--color-blue-700);
  transform: translateY(-1px);
}

.btn-select:focus {
  outline: 2px solid var(--color-blue-600);
  outline-offset: 2px;
}

.btn-select:disabled {
  background: var(--color-gray-300);
  border-color: var(--color-gray-300);
  color: var(--color-gray-500);
  cursor: not-allowed;
  transform: none;
}

.add-icon {
  width: 16px;
  height: 16px;
  color: white;
}

/* Dimension-specific button colors */
.policy-details-column[data-dimension="Enabling Infrastructure"] .btn-select:not(:disabled) {
  background: var(--color-infrastructure);
  border-color: var(--color-infrastructure);
}
.policy-details-column[data-dimension="Legislation & Policy"] .btn-select:not(:disabled) {
  background: var(--color-legislation);
  border-color: var(--color-legislation);
}
.policy-details-column[data-dimension="Sustainability & Society"] .btn-select:not(:disabled) {
  background: var(--color-sustainability);
  border-color: var(--color-sustainability);
}
.policy-details-column[data-dimension="Economy & Innovation"] .btn-select:not(:disabled) {
  background: var(--color-economy);
  border-color: var(--color-economy);
}
.policy-details-column[data-dimension="Research & Education"] .btn-select:not(:disabled) {
  background: var(--color-research);
  border-color: var(--color-research);
}

/* Dimension-specific toggle colors */
.policy-details-column[data-dimension="Enabling Infrastructure"] .policy-list-toggle {
  background: var(--color-infrastructure);
  color: white;
}
.policy-details-column[data-dimension="Legislation & Policy"] .policy-list-toggle {
  background: var(--color-legislation);
  color: white;
}
.policy-details-column[data-dimension="Sustainability & Society"] .policy-list-toggle {
  background: var(--color-sustainability);
  color: white;
}
.policy-details-column[data-dimension="Economy & Innovation"] .policy-list-toggle {
  background: var(--color-economy);
  color: white;
}
.policy-details-column[data-dimension="Research & Education"] .policy-list-toggle {
  background: var(--color-research);
  color: white;
}

.details-content {
  padding: 1.75rem;
  line-height: 1.6;
  color: var(--color-gray-600);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.detail-section {
  margin-bottom: 2rem;
}

.detail-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.5rem;
}

.examples-box {
  background: white;
  padding: 0rem;
  border-radius: 6px;
  line-height: 1.5;
  font-size: 0.75rem;
}

/* Special Considerations */
.considerations-sections {
  margin-top: 0.75rem;
}

.consideration-section {
  margin-bottom: 0.5rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 6px;
  overflow: hidden;
}

.consideration-toggle {
  width: 100%;
  background: white;
  border: none;
  padding: 0.5rem 0.75rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gray-700);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease;
}

.consideration-toggle:hover {
  background: var(--color-gray-100);
}

.toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.consideration-section.expanded .toggle-icon {
  transform: rotate(90deg);
}

.consideration-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 0.75rem;
  background: white;
}

.consideration-section.expanded .consideration-content {
  max-height: 500px;
  padding: 0.75rem;
}

.consideration-content p {
  margin: 0.5rem 0;
  font-weight: 600;
  color: var(--color-gray-700);
}

.consideration-content em {
  font-weight: 500;
  color: var(--color-gray-600);
}

.consideration-content ul {
  margin: 0.25rem 0 0.75rem 1rem;
  padding: 0;
}

.consideration-content li {
  margin-bottom: 0.5rem;
  color: var(--color-gray-600);
  line-height: 1.4;
}

.consideration-content li strong {
  color: var(--color-gray-700);
}

.considerations-summary {
  background: white;
  padding: 0rem;
  border-radius: 6px;
  line-height: 1.5;
  font-size: 0.75rem;
}

.considerations-summary p {
  margin: 0 0 0.5rem 0;
  color: var(--color-gray-600);
}

.considerations-toggle {
  background: none;
  border: none;
  color: var(--color-blue-600);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  font-family: inherit;
  transition: color 0.2s ease;
}

.considerations-toggle:hover {
  color: var(--color-blue-800);
}

.considerations-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0;
}

.considerations-summary.expanded .considerations-details {
  max-height: 500px;
  margin-top: 0.75rem;
}

.considerations-details p {
  margin: 0.5rem 0;
  font-weight: 600;
  color: var(--color-gray-700);
}

.considerations-details em {
  font-weight: 500;
  color: var(--color-gray-600);
}

.considerations-details ul {
  margin: 0.25rem 0 0.75rem 1rem;
  padding: 0;
}

.considerations-details li {
  margin-bottom: 0.5rem;
  color: var(--color-gray-600);
  line-height: 1.4;
}

.considerations-details li strong {
  color: var(--color-gray-700);
}

/* Related Policies */
.related-policies-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-gray-700);
}

.related-policies-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-policies-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.related-policies-list::-webkit-scrollbar {
  width: 4px;
}

.related-policies-list::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 2px;
}

.related-policies-list::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 2px;
}

.related-policies-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

.related-policy-item {
  padding: 0.5rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 6px;
  background: var(--color-gray-50);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.related-policy-item:hover {
  border-color: var(--color-blue-300);
  background: var(--color-blue-50);
  transform: translateY(-1px);
}

.related-policy-dimension {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.related-policy-content {
  flex: 1;
  min-width: 0;
}

.related-policy-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.related-policy-id {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-gray-200);
  color: var(--color-gray-700);
}

.related-policy-phase {
  font-size: 0.7rem;
  color: var(--color-gray-500);
  font-weight: 500;
}

.related-policy-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-gray-800);
  line-height: 1.3;
}

.related-policy-match {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  font-style: italic;
  margin-top: 0.25rem;
}

.keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.keyword {
  padding: 0.2rem 0.5rem;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Selected Policies Section */
.selected-policies-container-wrapper {
  grid-column: 1 / 3; /* Span both columns */
  grid-row: 2 / 3;
}

.section#selectedPoliciesSection {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  padding: 1rem;
}

.selected-policies-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.selected-policies-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--color-gray-50);
  border-radius: 6px;
}

.selected-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
}

.clear-all-btn {
  padding: 0.25rem 0.5rem;
  border: 1px solid #dc2626;
  border-radius: 4px;
  background: white;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-all-btn:hover {
  background: #dc2626;
  color: white;
}

.clear-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: white;
  color: #dc2626;
}

.selected-policies-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  background: white;
}

.selected-policy-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-gray-100);
  transition: all 0.2s ease;
  cursor: pointer;
}

.selected-policy-item:last-child {
  border-bottom: none;
}

.selected-policy-item:hover {
  background: var(--color-gray-50);
}

.selected-policy-item.highlighted {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.selected-policy-dimension {
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.selected-policy-content {
  flex: 1;
  min-width: 0;
}

.selected-policy-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.selected-policy-id {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}

.selected-policy-phase {
  font-size: 0.7rem;
  color: var(--color-gray-500);
  font-weight: 500;
}

.selected-policy-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-gray-800);
  line-height: 1.3;
}

.selected-policy-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.remove-policy-btn {
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: #dc2626;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.remove-policy-btn:hover {
  background: #fee2e2;
}

/* Right Panel */
.right-panel {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%; /* Add this */
  overflow: hidden; /* Uncomment this */
}

.right-panel .section:first-child {
  flex-shrink: 0;
}

/* Export Buttons */
.export-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border: 0.4px solid var(--color-gray-300);
  border-radius: 8px;
  background: white;
  color: var(--color-gray-700);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.export-btn.export-pdf {
  flex-shrink: 0; /* Don't let the button shrink */
  align-self: stretch; /* Make button take full width */
}

.export-btn:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-400);
  transform: translateY(-1px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.export-btn:active {
  transform: translateY(0);
}

.export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.export-pdf {
  border-color: #302a2a;
  color: #322626;
}

.export-pdf:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #312424;
}

.export-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.selection-matrix-container {
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e5e7eb;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.matrix-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 0.5rem;
}

.matrix-subtitle {
  font-size: 0.75rem;
  color: var(--color-gray-600);
  margin-bottom: 0.1rem;
}

.matrix-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.1rem;
  margin-bottom:0.5rem;
  font-size: 0.65rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-bar {
  width: 12px;
  height: 4px;
  border-radius: 1px;
}

.legend-bar.selected {
  background: var(--color-blue-600);
}

.legend-bar.related {
  background: var(--color-blue-600);
  opacity: 0.6;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.legend-bar.viewing {
  background: var(--color-blue-600);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

/* Make coordinate system responsive */
.selection-coordinate-system {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Export button stays fixed size */
.selection-matrix-container .export-btn {
  margin-top: 0.5rem;
  width: 100%;
  justify-content: center;
  flex-shrink: 0;
  flex-grow: 0;
}

/* Remove br spacing */
.selection-matrix-container br {
  display: none;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 1fr 25px;
  gap: 8px;
  width: 100%;
  flex: 1;
  /* Remove or reduce min-height */
  min-height: 150px; /* Much smaller minimum */
  max-height: 100%;
  overflow: hidden;
}

.y-axis-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-right: 0px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.y-axis-label {
  color: var(--color-gray-600);
  font-weight: 600;
  writing-mode: horizontal-tb;
  text-align: right;
  height: fit-content;
  cursor: help;
  position: relative;
  writing-mode:vertical-rl;
}

.y-axis-label, .x-axis-label {
  font-size: clamp(0.59rem, 1.125rem, 0.5rem); /* Responsive font size */
  
}

.y-axis-label[data-full-text]:hover::after {
  content: attr(data-full-text);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-gray-800);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  margin-right: 8px;
}

/* Make main grid responsive */
.main-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: min(3px, 0.5vw);
  border: 1px solid var(--color-gray-300);
  border-radius: 6px;
  padding: min(8px, 1vw);
  background: white;
  width: 100%;
  height: 100%; /* This should fill the available space */
  /* Remove min-height if it's preventing scaling */
}

.grid-cell {
  border: 1px solid var(--color-gray-200);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: min(4px, 0.5vw);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  /* Remove these fixed height properties: */
  /* min-height: 30px; */
  /* height: 60px; */
  background: #fafafa;
  overflow: hidden;
  /* Let the grid determine the cell size instead */
}


.grid-cell:hover {
  border-color: var(--color-gray-400);
  transform: scale(1.02);
}

.grid-cell.selected {
  border-width: 2px;
  border-color: #000;
  transform: scale(1.05);
}

.policy-bars {
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-400) transparent;
}

.policy-bars::-webkit-scrollbar {
  width: 3px;
}

.policy-bars::-webkit-scrollbar-track {
  background: transparent;
}

.policy-bars::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 2px;
}

.policy-bars::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

.policy-bar {
  border-radius: 2px;
  transition: all 0.2s ease;
  height: 6px;
  width: 100%;
  flex-shrink: 0;
  font-size: 0.6rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  opacity: 0.9;
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
}

.policy-bar:hover {
  opacity: 1;
  transform: scaleY(1.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.policy-bar.related {
  opacity: 0.3;
  border: 1px solid rgba(255, 255, 255, 0.9);
  position: relative;
}

.policy-bar.related::after {
  content: 'Related';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  color: var(--color-gray-600);
  background: white;
  padding: 1px 3px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
}

.policy-bar.related:hover::after {
  opacity: 1;
}

.policy-bar.current-viewing {
  border: 2px solid rgba(255, 255, 255, 0.9);
  opacity: 1;
  position: relative;
}

.policy-bar.current-viewing::after {
  content: 'Viewing';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  color: var(--color-blue-600);
  background: white;
  padding: 1px 3px;
  border-radius: 2px;
  white-space: nowrap;
  pointer-events: none;
}

.x-axis-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 4px;
  padding-right: 4px;
}

.x-axis-label {
  font-size: clamp(0.59rem, 1.125rem, 0.5rem); /* Responsive font size */
  color: var(--color-gray-600);
  font-weight: 600;
  text-align: center;
  flex: 1;
  cursor: help;
  position: relative;
}


.x-axis-label[data-full-text]:hover::after {
  content: attr(data-full-text);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gray-800);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 8px;
}

.current-selection {
  background: linear-gradient(135deg, var(--color-blue-50), #e0e7ff);
  padding: 0.5rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.selection-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.selection-info {
  font-size: 0.75rem;
  color: #1e40af;
  line-height: 1.4;
  min-height: 80px;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Expert Profiles */
.experts-section {
  background: white;
  padding: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  width: 460px;
  flex: 1;
  min-height: 200px;
  max-height: 300px;
  overflow: hidden;
}

.experts-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.experts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding-right: 0.25rem;
}

.experts-grid::-webkit-scrollbar {
  width: 4px;
}

.experts-grid::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 2px;
}

.experts-grid::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 2px;
}

.experts-grid::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

.expert-card {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  padding: 0.375rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.expert-card:hover {
  border-color: var(--color-blue-300);
  background: var(--color-blue-50);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.expert-avatar,
.expert-avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
}

.expert-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.expert-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.expert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  gap: 0.5rem;
}

.expert-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.1rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expert-title {
  font-size: 0.6rem;
  color: var(--color-gray-600);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expert-linkedin {
  color: var(--color-blue-600);
  text-decoration: none;
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.expert-linkedin:hover {
  color: var(--color-blue-800);
}

.expert-details {
  margin-bottom: 0.25rem;
}

.expert-detail-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.1rem;
  font-size: 0.55rem;
  color: var(--color-gray-600);
  line-height: 1.2;
}

.expert-detail-row:last-child {
  margin-bottom: 0;
}

.expert-detail-icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.expert-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  margin-top: 0.25rem;
}

.expert-expertise-tag {
  background: var(--color-blue-50);
  color: var(--color-blue-800);
  padding: 0.05rem 0.2rem;
  border-radius: 6px;
  font-size: 0.55rem;
  font-weight: 500;
  line-height: 1.2;
}

.experts-grid .loading-message,
.experts-grid .error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-gray-500);
  font-size: 0.75rem;
  text-align: center;
}

.error-message {
  text-align: center;
  color: #dc2626;
  padding: 1rem;
  background: #fee2e2;
  border-radius: 6px;
  font-size: 0.875rem;
}

/* Utility Classes */
.hidden {
  display: none;
}

.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;
}

.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Animations */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse {
  animation: pulse 0.5s ease-in-out;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--color-gray-500);
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  :root {
    --container-base-height: 80px; /* Slightly taller on mobile for wrapped content */
  }


  .nav-content {
    padding: 1.25rem 1rem 0.75rem 1rem;
    height: 70px;
  }

  .g20-logo-img {
    height: 55px;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
  }

  .nav-tools {
    margin-left: 1rem;
    gap: 0.5rem;
  }

  .language-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .search-btn {
    padding: 0.275rem;
  }

  .nav-links .nav-item:nth-child(n+3) {
    display: none;
  }

  .header-banner {
    height: 300px;
    min-height: 250px;
  }

  .banner-content {
    padding: 0 1rem;
  }

  .banner-title {
    margin-top: 70px;
  }

  .banner-title h1 {
    font-size: 1.5rem;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .left-panel {
    flex-direction: column;
    min-height: 85vh;
  }

  .sidebar {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-200);
  }

  .sidebar-item {
    margin: 6px 12px;
    padding: 12px 16px;
    flex-direction: row;
    text-align: left;
  }

  .sidebar-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .phase-dropdown {
    margin: 0 12px 6px 12px;
  }

  .phase-buttons-grid {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .phase-btn {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 2px solid var(--color-gray-200);
    min-width: auto;
    background: white;
  }

  .search-filter-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-container {
    flex: none;
    width: 100%;
  }

  .keyword-dropdown {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
    width: 100%;
  }

  .keyword-chip {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  .search-filter-section {
    align-items: flex-start; /* Allow for wrapping on mobile */
    padding-top: 16px;
    padding-bottom: 16px;
  }
  
  .search-filter-row {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .search-container {
    width: 100%;
  }
  
  .phases-container {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .phases-container .phase-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    height: 30px;
  }

  .guide-tooltip {
    max-width: calc(100vw - 32px);
    min-width: calc(100vw - 32px);
    padding: 20px;
    border-radius: 12px;
  }
  
  .guide-tooltip h3 {
    font-size: 16px;
  }
  
  .guide-tooltip p {
    font-size: 14px;
  }
  
  .guide-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .element-highlight {
    border-width: 3px;
  }
  
  .guide-pulse {
    font-size: 24px;
  }
  
  .guide-demo-badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  
  .demo-message {
    font-size: 11px;
    padding: 6px 12px;
  }

  .right-panel {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    height: auto;
    max-height: none;
  }

  .experts-section {
    width: 100%;
    max-height: 400px;
  }

  .selection-matrix-container {
    overflow-x: auto;
  }

  .coordinate-grid {
    min-width: 400px;
  }

@media (max-width: 480px) {
  :root {
    --container-base-height: 90px; /* Even taller on very small screens */
  }
  
  .phases-container .phase-btn {
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
    height: 28px;
  }

  .nav-content {
    padding: 0.5rem 0.75rem;
  }

  .nav-tools {
    margin-left: 0.5rem;
  }

  .nav-links .nav-item:nth-child(n+2) {
    display: none;
  }

  .banner-title h1 {
    font-size: 1.2rem;
  }

  .sidebar-item {
    padding: 8px 12px;
  }

  .sidebar-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .phase-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
  }

  .policy-item {
    padding-right: 5rem;
  }

  .policy-read-more {
    right: 0.2rem;
    min-height: 24px;
  }

  .policy-read-more::before {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }

  .policy-read-more::after {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }

  .guide-tooltip {
    padding: 16px;
  }
  
  .guide-tooltip h3 {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .guide-tooltip p {
    font-size: 13px;
    margin-bottom: 16px;
  }
  
  .guide-buttons {
    gap: 6px;
  }
  
  .guide-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .how-to-use-trigger {
    font-size: 10px;
    padding: 8px 10px;
  }
  
  .guide-demo-badge {
    display: none; /* Hide on very small screens */
  }
}
/* High contrast mode support */
@media (prefers-contrast: high) {
  .guide-tooltip {
    border: 2px solid var(--color-gray-800);
    background: white;
  }
  
  .element-highlight {
    border-color: #000;
    border-width: 3px;
  }
  
  .guide-demo-badge {
    background: #000;
    color: white;
  }
}

/* Focus states for accessibility */
.guide-btn:focus {
  outline: 3px solid var(--color-blue-600);
  outline-offset: 2px;
}

.how-to-use-trigger:focus {
  outline: 3px solid white;
  outline-offset: 2px;
}

/* Loading states for demo transitions */
.guide-demo-loading {
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Enhanced demo mode indicators */
.guide-demo-mode .sidebar,
.guide-demo-mode .main-content,
.guide-demo-mode .right-panel {
  position: relative;
}

.guide-demo-mode .sidebar::before,
.guide-demo-mode .main-content::before,
.guide-demo-mode .right-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
  animation: demo-border-pulse 4s infinite;
}

@keyframes demo-border-pulse {
  0%, 100% { border-color: rgba(59, 130, 246, 0.3); }
  50% { border-color: rgba(59, 130, 246, 0.6); }
}

}