


:root {

  --color-black: #000000;
  --color-dark: #222222;
  --color-gray-dark: #444444;
  --color-gray-medium: #777777;
  --color-gray-light: #dddddd;
  --color-offwhite: #f7f7f7;
  --color-white: #ffffff;


  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;


  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --sidebar-width: 320px;


  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 15px rgba(0,0,0,0.1);


  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;


  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}


html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  color: var(--color-dark);
  background-color: var(--color-offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}


#map {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 0;
  width: 100%;
  pointer-events: none;
  transition: left var(--transition-normal), width var(--transition-normal);
}

#map.interactive {
  pointer-events: auto;
  cursor: grab;
}

#map.interactive:active {
  cursor: grabbing;
}

body.sidebar-mode #map {
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
}

  #map-legend.legend-inside-sidebar {
  margin-top: auto;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-top: 1px solid #ddd;
  font-size: 14px

  flex-shrink: 0;
}

.legend-inside-sidebar .legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.legend-inside-sidebar .legend-color {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 4px;
  flex-shrink: 0;
}




#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
  z-index: 10;
  border-right: 1px solid var(--color-gray-light);
}


#sidebar-header {
  padding: var(--spacing-lg);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-light);
}

#sidebar-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-black);
  letter-spacing: -0.02em;
}


#story {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-dark);


  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-medium) transparent;


  display: flex;
  flex-direction: column;
}

#story::-webkit-scrollbar {
  width: 4px;
}

#story::-webkit-scrollbar-track {
  background: transparent;
}

#story::-webkit-scrollbar-thumb {
  background-color: var(--color-gray-medium);
  border-radius: var(--radius-full);
}


.textbox {
  display: none;
  white-space: normal;
  word-wrap: break-word;
  padding: var(--spacing-lg);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: none;
  margin-bottom: var(--spacing-lg);

  transition: opacity var(--transition-normal), transform var(--transition-normal);
    flex-shrink: 0;
}

.textbox.active {
  display: block;
  animation: fadeSlideIn 0.3s ease-out forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.textbox * {
  white-space: normal;
}

.textbox h2 {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.01em;
}

.textbox p {
  margin-bottom: var(--spacing-md);
}


#nav-controls {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-gray-light);
  background: var(--color-white);
}

#nav-controls button {
  flex: 1;
  margin: 0 var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-md);
  background: #628bcc;
  box-shadow: 0 0 10px rgba(98, 139, 204, 0.5);

  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

#nav-controls button:first-child {
  margin-left: 0;
}

#nav-controls button:last-child {
  margin-right: 0;
}

#nav-controls button:hover {
  background: var(--color-dark);
  transform: translateY(-1px);
}

#nav-controls button:active {
  transform: translateY(0);
}

#nav-controls button:disabled {
  background: var(--color-gray-medium);
  cursor: not-allowed;
  transform: none;
  opacity: 0.7;
}


.inline-filter {
  margin-top: var(--spacing-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.filter-btn {
  background-color: var(--color-black);
  color: var(--color-white);
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-full);
  margin: 4px 6px 4px 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background-color: var(--color-dark);
  transform: translateY(-1px);
}

.filter-btn.active {
  background-color: var(--color-white);
  color: var(--color-black);
  border: 2px solid var(--color-black);
}


.rotation-controls {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  pointer-events: auto;
}

.rotation-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  box-shadow: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--color-black);
}

.rotation-controls button:hover {
  background: var(--color-black);
  color: white;
  transform: translateY(-2px);
}

.rotation-controls button:active {
  transform: translateY(0);
}


.circle-image-marker {
  transition: transform var(--transition-normal);
}

.circle-image-marker:hover {
  transform: scale(1.05);
  z-index: 2;
}

.circle-image-marker img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-white);
  border: 2px solid var(--color-white);
}


#map-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 500;
  box-shadow: none;
  z-index: 20;
  pointer-events: none;
  transition: all 0.5s ease;
  max-width: 80%;
  text-align: center;
}

#map-banner.fade-out {
  opacity: 0;
  transform: translate(-50%, -60%);
  visibility: hidden;
}


.popup-pointer {
  position: absolute;
  width: 2px;
  background-color: var(--color-black);
  transform-origin: top;
  z-index: -1;
  pointer-events: none;
}

.popup-pointer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--color-black);
  border-radius: 50%;
}


@media screen and (max-width: 768px) {
  :root {
    --sidebar-width: 100%;
    --mobile-sidebar-height: 45vh;
  }


  #map {
    width: 100%;
    height: 100%;
    left: 0;
  }

  body.sidebar-mode #map {
    left: 0;
    width: 100%;
  }


  #sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-sidebar-height);
    border-right: none;
    border-top: 1px solid var(--color-gray-light);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
  }


  #story {
    padding: var(--spacing-md);
    overflow-y: auto;
    flex: 1;
  }


  #nav-controls {
    padding: var(--spacing-sm) var(--spacing-md);
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto;
  }

/* Fix for mobile filter container positioning */


/* Replace the existing mobile filter CSS with this cleaned up version */

/* Replace the existing mobile filter CSS with this cleaned up version */
/* Replace the existing mobile filter CSS with this cleaned up version */

/* Replace the existing mobile filter CSS with this cleaned up version */

/* Replace the existing mobile filter CSS with this cleaned up version */

/* Replace the existing mobile filter CSS with this cleaned up version */

@media screen and (max-width: 768px) {
  .filter-container {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100%;
    z-index: 20;
    background: white;
    border-bottom: 1px solid var(--color-gray-light);
    transform: translateY(-200%);  /* Move further up to completely hide */
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding-bottom: 10px;
    overflow: hidden;
  }

  .filter-container.expanded {
    transform: translateY(0);  /* Show when expanded */
  }

  .filter-toggle {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 24px;
    background: white;
    border: 1px solid var(--color-gray-light);
    border-top: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    z-index: 21;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .filter-toggle.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .toggle-arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
  }

  .filter-toggle.active .toggle-arrow {
    transform: rotate(180deg);
  }

  /* Container for filter buttons - vertical layout only */
  #dynamic-filter-buttons {
    padding: 20px 16px 8px 16px;
    display: flex;
    flex-direction: column;  /* Force vertical stacking */
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;  /* Prevent horizontal scroll */
  }

  /* Filter buttons - full width, smaller size */
  .filter-container .filter-btn,
  #dynamic-filter-buttons .filter-btn {
    width: 100%;
    padding: 6px 16px;  /* Reduced from 10px 16px */
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    margin: 0;
    background-color: var(--color-black);
    color: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .filter-container .filter-btn.active,
  #dynamic-filter-buttons .filter-btn.active {
    background-color: var(--color-white);
    color: var(--color-black);
    border: 2px solid var(--color-black);
  }

  .filter-container .filter-btn:hover,
  #dynamic-filter-buttons .filter-btn:hover {
    background-color: var(--color-dark);
    transform: translateY(-1px);
  }
}



  .rotation-controls {
    bottom: calc(var(--mobile-sidebar-height) + var(--spacing-md));
    right: var(--spacing-md);
  }

  .rotation-controls button {
    width: 36px;
    height: 36px;
  }


  #map-banner {
    top: 40%;
    max-width: 90%;
  }


@media (max-width: 768px) {
  .mapboxgl-popup {
    max-width: 160px !important;
  }

  .mapboxgl-popup-content {
    padding: 8px !important;
    font-size: 12px !important;
  }

  .mapboxgl-popup strong {
    font-size: 13px !important;
  }
}


  .mapboxgl-popup-content {
    padding: var(--spacing-sm);
    font-size: 14px;
  }


  .textbox img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .mapboxgl-popup-close-button {
    font-size: 24px !important;
    top: 4px !important;
    right: 4px !important;
    padding: 4px 8px !important;
    line-height: 1 !important;
  }


  .mapboxgl-popup-close-button::before {
    display: none !important;
  }


  .mapboxgl-popup-content {
    padding-right: 32px !important;
  }
}








.cta-benefits {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.benefit-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  font-size: 24px;
  margin-right: 10px;
  color: #0077cc;
}

.benefit-text {
  font-size: 14px;
  font-weight: 500;
}

.cta-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.cta-button {
  display: block;
  padding: 14px 20px;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
}

.primary-cta {
  background-color: #0077cc;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3);
}

.primary-cta:hover {
  background-color: #005fa3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 119, 204, 0.4);
}

.secondary-cta {
  background-color: white;
  color: #0077cc;
  border: 2px solid #0077cc;
}

.secondary-cta:hover {
  background-color: #f0f8ff;
  transform: translateY(-2px);
}


@media (max-width: 768px) {
  .cta-benefits {
    grid-template-columns: 1fr;
  }

  .cta-button {
    padding: 16px 20px;
    font-size: 18px;
  }


  .textbox {
     max-height: none;
    overflow: visible;
  }
}


@keyframes subtle-glow {
  0% { box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3); }
  50% { box-shadow: 0 8px 24px rgba(0, 119, 204, 0.5); }
  100% { box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3); }
}

.primary-cta {
  animation: subtle-glow 3s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulsing-dot {
  animation: pulse 1.5s infinite ease-in-out;
}



.powered-by-banner {
  position: fixed;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  border: 1px solid var(--color-gray-light);
  transition: all var(--transition-fast);
}

.powered-by-banner:hover {
  background-color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.powered-by-banner img {
  height: 16px;
  width: auto;
}


@media screen and (min-width: 769px) {
  .powered-by-banner {
    bottom: var(--spacing-md);
    left: calc(var(--sidebar-width) + var(--spacing-md));
  }

  body.sidebar-mode .powered-by-banner {
    left: calc(var(--sidebar-width) + var(--spacing-md));
  }
}


@media screen and (max-width: 768px) {
  .powered-by-banner {
    bottom: calc(var(--mobile-sidebar-height) + var(--spacing-sm));
    left: var(--spacing-md);
    font-size: 11px;
    padding: 4px 10px;
  }

  .powered-by-banner img {
    height: 14px;
  }
}

.nav-overlay {
  position: fixed;
  top: 20px;
  left: calc(50% + 160px);
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.nav-guidance-banner {
  background: linear-gradient(135deg, rgba(98, 139, 204, 0.1), rgba(98, 139, 204, 0.05));
  backdrop-filter: blur(10px);
  color: var(--color-dark);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  border: 2px solid rgba(98, 139, 204, 0.3);
  box-shadow: 0 4px 20px rgba(98, 139, 204, 0.15);
  white-space: nowrap;
  pointer-events: auto;
  animation: attentionPulse 3s infinite;
  position: relative;
}

.nav-guidance-banner::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #628bcc, transparent, #628bcc);
  border-radius: var(--radius-full);
  z-index: -1;
  animation: borderGlow 2s infinite;
}

.nav-buttons-overlay {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.nav-btn-overlay {
  padding: 20px 32px;
  background: var(--color-white);
  color: var(--color-dark);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 100px;
  position: relative;
  overflow: hidden;
}

.nav-btn-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.nav-btn-overlay:hover::before {
  left: 100%;
}

.nav-btn-overlay:hover {
  background: var(--color-dark);
  color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-btn-overlay.next-btn {
  background: #628bcc;
  color: white;
  border-color: #628bcc;
  box-shadow: 0 4px 15px rgba(98, 139, 204, 0.3);
  animation: nextButtonAttention 4s infinite;
}

.nav-btn-overlay.next-btn:hover {
  background: #4a7bb8;
  border-color: #4a7bb8;
  box-shadow: 0 8px 30px rgba(98, 139, 204, 0.4);
}

.nav-btn-overlay.final-btn {
  background: #628bcc;
  color: white;
  border-color: #628bcc;
  font-weight: 700;
  padding: 22px 36px;
  font-size: 18px;
  box-shadow: 0 6px 20px rgba(98, 139, 204, 0.4);
  animation: finalButtonAttention 3s infinite;
}

@keyframes attentionPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(98, 139, 204, 0.15);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(98, 139, 204, 0.25);
  }
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes nextButtonAttention {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(98, 139, 204, 0.3);
  }
  25% {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(98, 139, 204, 0.4);
  }
  75% {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(98, 139, 204, 0.4);
  }
}

@keyframes finalButtonAttention {
  0%, 100% {
    transform: scale(1);
  }
  33% {
    transform: scale(1.04);
  }
  66% {
    transform: scale(1.04);
  }
}

@media (max-width: 768px) {
  .nav-overlay {
    top: 10px;
    left: 50%;
  }
  .nav-guidance-banner {
    font-size: 14px;
    padding: 10px 20px;
  }
  .nav-btn-overlay {
    padding: 16px 24px;
    font-size: 15px;
    min-width: 90px;
  }
}
}


body { padding-top: 64px; }

/* ─────────────────────────────────────────────
   Tech-slick Stepbar: glass, gradient, micro-interactions
   ───────────────────────────────────────────── */
.top-stepbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  z-index: 2001;

  /* Glass + subtle gradient */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.70));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Progress line at the very bottom of the bar */
.stepbar-progress {
  position: absolute;
  left: 0; bottom: 0; height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #628bcc, #8fb3ff);
  box-shadow: 0 0 18px rgba(98,139,204,0.55);
  transition: width 300ms ease;
}

/* Toggle (mobile) gets a chip vibe */
.stepbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease;
}
.stepbar-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

/* Horizontal scroller with edge-fade hint */
.stepbar-list {
  position: relative;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px;
  scrollbar-width: thin;
  mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
}
.stepbar-list::-webkit-scrollbar { height: 6px; }
.stepbar-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15); border-radius: 999px;
}

/* Step chips */
.step-item {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.06);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 0 0 3px transparent inset;
  font-size: 13px; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease, border-color 200ms ease, background 250ms ease;
}
.step-item .step-index {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  color: #1b2a41;
  background: #eaf0ff;
  border: 1px solid #d9e7ff;
}
.step-item .step-label {
  font-weight: 700;
  letter-spacing: 0.015em;
  color: #1a1a1a;
}
.step-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.10);
}

/* Active chip gets gradient + glow ring */
.step-item.active {
  background: linear-gradient(180deg, #628bcc, #4a7bb8);
  border-color: rgba(98,139,204,0.95);
  color: #fff;
  box-shadow:
    0 0 0 3px rgba(98,139,204,0.22) inset,
    0 10px 24px rgba(98,139,204,0.42);
}
.step-item.active .step-index {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}
.step-item.active .step-label { color: #fff; }

/* Right controls: bigger targets */
.stepbar-controls .stepbar-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(98,139,204,0.35);
}
.stepbar-btn:hover { transform: translateY(-1px) scale(1.02); }

/* Drawer polish (mobile) */
.stepbar-drawer {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92));
  backdrop-filter: blur(8px);
}
.stepbar-drawer-list .step-item {
  border-radius: 16px;
  padding: 12px 16px;
}

/* Keep body offset equal to bar height */
body { padding-top: 64px; }


/* Hide drawer toggle on larger screens */
#stepbar-toggle {
  display: none;
}

/* Show drawer toggle only on mobile */
@media (max-width: 768px) {
  #stepbar-toggle {
    display: inline-flex;
  }
}
/* Keep the top bar in one row and allow the middle column to shrink */
.top-stepbar {
  display: grid;
  grid-template-columns: auto 1fr auto; /* toggle | list | controls */
  align-items: center;
  column-gap: 12px;
}

/* Let the scrollable list shrink instead of pushing controls down */
.stepbar-list {
  min-width: 0;              /* critical for CSS Grid overflow */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Keep the right-side buttons on one line */
.stepbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;         /* don't wrap to a second line */
  white-space: nowrap;
}
.stepbar-controls .stepbar-btn {
  flex: 0 0 auto;            /* don't grow/wrap */
}

/* Toggle visibility logic (desktop vs mobile) */
#stepbar-toggle { display: none; }
@media (max-width: 768px) {
  #stepbar-toggle { display: inline-flex; }

  /* Hide the inline list on mobile to free space for buttons */
  .stepbar-list { display: none; }

  /* Slightly tighter buttons on mobile */
  .stepbar-controls .stepbar-btn {
    padding: 8px 12px;
  }
}


/* Offset the sidebar content so it clears the top stepbar */
#sidebar {
  padding-top: 16px; /* adjust as needed, 16–20px feels balanced */
}

/* On mobile, the sidebar docks at the bottom, so no extra top offset */
@media (max-width: 768px) {
  #sidebar {
    padding-top: 0;
  }
}
/* Drawer visibility control */
#stepbar-drawer {
  display: none; /* hidden by default */
}

#stepbar-drawer.open {
  display: block; /* shown when JS adds .open */
}
/* Drawer visibility control */
#stepbar-drawer { display: none; }        /* hidden by default */
#stepbar-drawer.open { display: block; }  /* shown when JS adds .open */

/* Drawer positioning (sits under the fixed top bar) */
.stepbar-drawer {
  position: fixed;
  top: 64px;        /* match your top bar height */
  left: 0;
  width: 100%;
  z-index: 2000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Show the toggle only on mobile; hide inline list/controls there */
#stepbar-toggle { display: none; }
@media (max-width: 768px) {
  #stepbar-toggle { display: inline-flex; }
  #stepbar-list   { display: none; }

  /* Keep the controls but make them mobile-friendly */
  .stepbar-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
 
    border-top: 1px solid rgba(0,0,0,0.06);
  }

  .stepbar-controls .stepbar-btn {
    flex: 1;
    margin: 0 4px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    background: #628bcc;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(98,139,204,0.3);
  }

  .stepbar-controls .stepbar-btn:disabled {
    background: #ccc;
    box-shadow: none;
  }
}


/* Mobile: make the drawer vertical and full-width */
@media (max-width: 768px) {
  /* The drawer list stacks items vertically */
  .stepbar-drawer-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    max-height: 45vh;          /* prevent it from covering everything */
    overflow-y: auto;
  }

  /* Each step chip becomes a full-width row */
  .stepbar-drawer-list .step-item {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;       /* override the nowrap from desktop chips */
  }

  .stepbar-drawer-list .step-index {
    margin-right: 10px;
  }

  /* Drawer bottom controls stay visible and side-by-side */
  .stepbar-drawer-controls {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    bottom: 0;
  }
}

@media (max-width: 768px) {
  /* Hide duplicate Back/Next inside the drawer */
  .stepbar-drawer-controls {
    display: none !important;
  }
}


/* Steps toggle button — balanced prominence */
#stepbar-toggle {
  font-size: 15px;
  font-weight: 750;           /* between 700 and 800 */
  letter-spacing: 0.02em;
  padding: 11px 16px;         /* a bit larger than before */
  border-radius: 12px;
  border: 1.5px solid #628bcc;
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
  color: #1a1a1a;
  box-shadow: 0 3px 10px rgba(98, 139, 204, 0.22);
  transition: all 0.2s ease;
}

/* Hover and active states */
#stepbar-toggle:hover {
  background: linear-gradient(180deg, #eaf0ff, #628bcc);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(98, 139, 204, 0.28);
}

#stepbar-toggle:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(98, 139, 204, 0.2);
}

/* Base size (desktop + tablet) */
.featured-highlight-popup {
  max-width: 260px;
}

/* Slightly wider on smaller screens */
@media (max-width: 600px) {
  .featured-highlight-popup {
    max-width: 1000px;   /* bump a bit wider */
  }
}


.featured-highlight-popup .fav-badge {
  display: inline-block; background: #111; color: #fff; font-weight: 600;
  font-size: 12px; padding: 4px 8px; border-radius: 999px; margin-bottom: 6px;
}
.featured-highlight-popup .fav-title { font-weight: 700; margin: 6px 0 8px; }
.featured-highlight-popup .fav-img {
  width: 100%; height: auto; border-radius: 8px; display: block;
  margin: 6px 0 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.featured-highlight-popup .fav-desc { margin: 0; font-size: 13px; line-height: 1.45; }


.featured-highlight-popup .fav-badge {
  display: inline-block;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  white-space: nowrap;   /* NEW: keep on one line */
}


