
body {
  font-family: 'Source Sans Pro', sans-serif; /* Ensure Tailwind's font-sans is applied */
  scrollbar-width: thin;
  scrollbar-color: #a3a3a3 #e5e5e5; /* neutral-400 neutral-200 */
}
body::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track {
  background: #e5e5e5; /* neutral-200 */
  border-radius: 10px;
}
body::-webkit-scrollbar-thumb {
  background-color: #a3a3a3; /* neutral-400 */
  border-radius: 10px;
  border: 2px solid #e5e5e5; /* neutral-200 */
}

/* Class to hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

#timeline-nav-scroll-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  padding-top: 0; /* py-0 */
  padding-bottom: 0; /* py-0 */
  background-color: #F5F5F4; /* bg-stone-100 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 60px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 60px), transparent 100%);
}

#timeline-nav-scroll-container.group:hover .timeline-main-bar {
    background-color: #737373; /* neutral-500 */
}


#timeline-nav-inner-container {
  position: relative;
  display: inline-block; /* Allows content to exceed masked container width */
  white-space: nowrap;
}

#timeline-items-flex-container {
  display: flex;
  align-items: center;
  padding-left: 2rem; /* px-8 */
  padding-right: 2rem; /* px-8 */
  height: 80px;
  position: relative; /* For z-indexing timeline items above the bar */
  z-index: 10; 
}

.timeline-main-bar {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: #a3a3a3; /* neutral-400 */
  transform: translateY(-50%);
  z-index: 0;
  transition: background-color 0.3s ease-in-out;
}

.timeline-item {
  position: relative;
  /* itemWidth and itemMargin applied by JS or Tailwind */
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  cursor: pointer;
  outline: none;
  height: 100%; /* Fill the 80px height of flex container */
  display: flex; /* To help center content if needed, though most is absolute */
  align-items: center; /* Aligns the year and tick container vertically */
  justify-content: center; /* Centers the marker horizontally */
}

/* Scaling effects (applied by JS) */
.timeline-item.scale-110 { transform: scale(1.1); }
.timeline-item.scale-105 { transform: scale(1.05); }
.timeline-item:hover.scale-125-hover { transform: scale(1.25); } /* Specific class for hover to avoid conflict */
.timeline-item:focus-visible.scale-125-hover { transform: scale(1.25); }


.timeline-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 0.75rem; /* w-3 */
  height: 0.75rem; /* h-3 */
  border-radius: 9999px; /* rounded-full */
  border-width: 2px;
  transition: all 0.3s ease-in-out;
  z-index: 20; /* Above main bar */
  background-color: #ffffff; /* Default bg-white */
  border-color: #737373; /* Default border-neutral-500 */
}
@media (min-width: 640px) { /* sm: */
  .timeline-marker {
    width: 0.875rem; /* w-3.5 */
    height: 0.875rem; /* h-3.5 */
  }
}

/* Marker States (applied by JS) */
.timeline-marker.chosen {
  background-color: #FACC15; /* bg-yellow-400 */
  border-color: #EAB308; /* border-yellow-500 */
  transform: translateX(-50%) translateY(-50%) scale(1.1); /* Combined with base transform, sm:scale-110 effectively */
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); /* shadow-md */
}
@media (min-width: 640px) { /* sm: */
    .timeline-marker.chosen {
         transform: translateX(-50%) translateY(-50%) scale(1.1);
    }
}

.timeline-marker.nearest {
  background-color: #D4D4D4; /* bg-neutral-300 */
  border-color: #A3A3A3; /* border-neutral-400 */
}

.timeline-item:focus-visible .timeline-marker {
  outline: 2px solid #0EA5E9; /* ring-sky-500 */
  outline-offset: 1px; /* ring-offset-1 */
}


.year-tick-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  /* top positioning done by JS to be dynamic with markerRadiusRem */
}

.tick-line {
  width: 1px; /* w-px */
  height: 0.375rem; /* h-1.5 */
  transition: background-color 0.3s ease-in-out;
  background-color: #A3A3A3; /* default: neutral-400 */
}
@media (min-width: 640px) { /* sm: */
  .tick-line {
    height: 0.5rem; /* h-2 */
  }
}
.tick-line.chosen, .timeline-item:hover .tick-line.hover-black, .timeline-item.nearest .tick-line.nearest-darker {
  background-color: #000000; /* black */
}
.tick-line.nearest-darker { background-color: #737373; } /* neutral-500 for nearest not chosen */


.year-text {
  font-size: 0.75rem; /* text-xs */
  letter-spacing: 0.025em; /* tracking-wide */
  transition: color 0.3s ease-in-out, font-weight 0.3s ease-in-out;
  margin-top: 0.25rem; /* mt-1 */
  color: #525252; /* default: text-neutral-600 */
}
@media (min-width: 640px) { /* sm: */
  .year-text {
    font-size: 0.875rem; /* text-sm */
  }
}
.year-text.chosen, .timeline-item:hover .year-text.hover-black, .timeline-item.nearest .year-text.nearest-darker {
  color: #000000; /* black */
  font-weight: 600; /* font-semibold */
}
.year-text.nearest-darker { color: #404040; } /* text-neutral-700 for nearest not chosen */


.inter-year-dot {
  position: absolute;
  top: 50%;
  left: 100%; /* Positioned at the end of the item's width */
  transform: translateX(-50%) translateY(-50%);
  width: 3px;
  height: 3px;
  background-color: #737373; /* bg-neutral-500 */
  border-radius: 9999px; /* rounded-full */
  z-index: 5; /* Below marker but above bar if overlapping on edge cases */
  pointer-events: none;
}

/* Jump Navigation Buttons */
#jump-navigation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem; /* space-x-1 */
  margin-top: 1rem; /* mt-4 */
}
@media (min-width: 640px) { /* sm: */
  #jump-navigation-container {
    gap: 0.5rem; /* sm:space-x-2 */
    margin-top: 1.5rem; /* sm:mt-6 */
  }
}

.jump-button {
  padding: 0.5rem 0.75rem; /* py-2 px-3 */
  font-size: 0.75rem; /* text-xs */
  font-weight: 600; /* font-semibold */
  background-color: white;
  color: #404040; /* text-neutral-700 */
  border: 1px solid #D4D4D4; /* border-neutral-300 */
  border-radius: 0.375rem; /* rounded-md */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
  transition: all 0.2s ease-out;
}
@media (min-width: 640px) { /* sm: */
  .jump-button {
    padding: 0.5rem 0.875rem; /* sm:px-3.5 */
    font-size: 0.875rem; /* sm:text-sm */
  }
}

.jump-button:hover:not(:disabled) {
  transform: scale(1.5);
  border-color: #737373; /* border-neutral-500 */
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); /* shadow-md */
  z-index: 10;
}
.jump-button:focus:not(:disabled) {
  outline: none;
  box-shadow: 0 0 0 2px white, 0 0 0 4px #A3A3A3; /* ring-2 ring-neutral-400 ring-offset-1 (offset is white) */
  z-index: 10;
}
.jump-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: scale(1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Event Details */
#event-details-container .event-article {
    background-color: white;
    padding: 1.5rem; /* p-6 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); /* shadow-lg */
    max-width: 48rem; /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;
    /* ring-1 ring-neutral-200/50 - harder to replicate exactly without :before/:after or specific border*/
    border: 1px solid #E5E5E5; /* approx. ring-neutral-200 */

}
@media (min-width: 640px) { /* sm: */
    #event-details-container .event-article {
        padding: 2.5rem; /* sm:p-10 */
    }
}

#event-details-container .event-title {
    font-size: 1.5rem; /* text-2xl */
    line-height: 2rem;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #262626; /* text-neutral-800 */
    margin-bottom: 0.75rem; /* mb-3 */
    opacity: 0.75; /* Faded title */
}
@media (min-width: 640px) { /* sm: */
    #event-details-container .event-title {
        font-size: 1.875rem; /* text-3xl */
        line-height: 2.25rem;
    }
}

#event-details-container .event-era {
    font-size: 0.875rem; /* text-md */
    line-height: 1.25rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    color: #737373; /* text-neutral-500 */
    margin-bottom: 0.25rem; /* mb-1 */
}
#event-details-container .event-era .era-label {
    color: #404040; /* text-neutral-700 */
}
#event-details-container .event-hr {
    margin-top: 1rem; /* my-4 */
    margin-bottom: 1rem;
    border-color: #E5E5E5; /* border-neutral-200 */
}
@media (min-width: 640px) { /* sm: */
    #event-details-container .event-hr {
        margin-top: 1.5rem; /* sm:my-6 */
        margin-bottom: 1.5rem;
    }
}
#event-details-container .event-description {
    color: #404040; /* text-neutral-700 */
    line-height: 1.625; /* leading-relaxed */
    font-size: 1rem; /* text-base */
}
@media (min-width: 640px) { /* sm: */
    #event-details-container .event-description {
        font-size: 1.125rem; /* text-lg */
    }
}
