@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

:root{
  /* ===== Colors ===== */
  --paper: rgba(255, 248, 230, 0.88);
  --paper-strong: rgba(245, 230, 211, 0.92);
  --white-ink: #fff8e6;

  --ink: #2f241b;
  --ink-soft: #5a4a3a;

  --title-ink: #3f2a22;       /* was hardcoded in header h1 */
  --heading-ink: #3a2b22;     /* was hardcoded in panel/strip headings */
  --input-ink: #3d2817;       /* was hardcoded in inputs */

  --classy-blue-ink: #6a2f52;
  --correct-color: rgba(47,79,79,0.92); 
  --incorrect-color: rgba(140,40,40,0.92); 

  --rule: rgba(110, 85, 55, 0.26);
  --rule-strong: rgba(110, 85, 55, 0.42);
  --rule-faint: rgba(110, 85, 55, 0.18); /* used for subtle borders */
  --rule-header: rgba(70,50,30,0.15);

  --accent: #2f4f4f;
  --accent-wash: rgba(47, 79, 79, 0.12);

  --shadow-soft: 0 6px 16px rgba(0,0,0,0.12);
  --shadow-tight: 0 3px 10px rgba(0,0,0,0.12);

  /* ===== Radii ===== */
  --radius: 12px;
  --radius-sm: 10px;

  /* ===== Layout ===== */
  --header-height: 14vh;
  --header-margin: 0.25vh;

  /* ===== Textures ===== */
  --page-texture: url("https://zxddjxwfcypqoriatwvt.supabase.co/storage/v1/object/public/public_images/backgrounds/parchment_2.webp");
                       
  /* --panel-texture: url("Pictures/parchment_long_2.jpg"); */
    --page-fallback:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.55), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(139,115,85,0.18), transparent 60%),
    linear-gradient(135deg, rgba(255,248,230,0.98), rgba(245,230,211,0.94));

  /* ===== Fonts ===== */
  --font-body: 'Crimson Text', 'Georgia', serif;
  --font-display: 'IM Fell English', serif;
  --font-ui: 'Cinzel', serif;

  /* ===== Type scale (kept close to your original sizes) ===== */
  --fs-sitename:11vmin;
  --fs-subtitle-homepage: 4vmin;
  --fs-h1: 8vmin;
  --fs-subtitle: 3.5vmin;
  --fs-emoji: 6.5vmin;
  --fs-sage-list: clamp(12px, 2vmin, 18px);

  --fs-panel-heading: 2.54vmin;
  --fs-input: 2.3vmin;

  --fs-modern-btn: 3.9vmin;

  --fs-cta: 2.7vmin;
  --fs-cta-icon: 3.2vmin;

  --fs-strip-title: 3.2vmin;
  --fs-strip-icon: clamp(40px, 10vmin, 72px);
  --fs-strip-label: clamp(13px, 3vmin, 19px);

  --fs-searchable-filter: clamp(14px, 2.5vmin, 20px);
  --fs-nonsearchable-filter: clamp(12px, 2.2vmin, 18px);

  /* ===== Explore buttons ===== */
  --explore-btn-size: clamp(86px, 15vmin, 140px);
  --explore-divider-w: 2px;
  --explore-divider-h: 10vmin;
  --explore-divider-color: rgba(110,85,55,0.22);

  --panel-page-side-margin: 0.5vmin;
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body{
  background-image: var(--page-texture), var(--page-fallback);
  background-size: cover;
  background-position: center 0px;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: var(--ink);
  min-height: 100vh;
  overflow: hidden;
}

.container-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 6fr) minmax(0, 1fr);
  margin: 0 auto;
  height: 100vh;
}

.left-container, .right-container{
  margin-left: var(--panel-page-side-margin);
  margin-right: var(--panel-page-side-margin);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* ================================
   HEADER
   ================================ */
.header-section{
  position: relative;
  margin: var(--header-margin);
  height: auto;
  min-height: var(--header-height);
}

.header{
  text-align: center;
  margin-bottom: 0;
  
  font-family: var(--font-display);
}

.header h1{
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--title-ink);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.14);
  font-family: var(--font-display);
}

.header h1 *{
  font-family: var(--font-display);
}

.subtitle{
  font-size: var(--fs-subtitle);
  font-weight: 500;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--ink-soft);
  opacity: 0.75;
  letter-spacing: 0.5px;
}

.emoji{
  font-size: var(--fs-emoji);
  filter: sepia(0.3);
  opacity: 0.92;
}

.gradient-text{
  color: #4a3228; /* kept as-is; optional to tokenise */
  font-size: var(--fs-h1);
  font-weight: 700;
}

/* ================================
   MAP
   ================================ */
#map{
  position: relative;
  justify-self: center;
  width: 100%;
  height: 80%;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}

#play-button::before {
    content: '▶';
}

#play-button {
            width: 8vmin;
            height: 8vmin;
            border-radius: 50%;
            border: none;
            background: var(--classy-blue-ink);
            color: var(--paper);
            font-size: 4vmin;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #play-button:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
        }
/* ================================
   POPUP
   ================================ */
.popup{
  position: absolute;
  background: linear-gradient(135deg, rgba(245, 230, 211, 0.95), rgba(212, 196, 168, 0.9));
  padding: 1vmin 1.5vmin;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(61, 40, 23, 0.4);
  z-index: 10000050;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(1vmin) scale(0.95);
  border: 2px solid #8b7355;
  backdrop-filter: blur(3px);
}

.popup.visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  box-shadow: 0 10px 25px rgba(61, 40, 23, 0.5);
}

.popup-message{
  font-size: 2.4vmin;
  color: #4a3228;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  font-family: 'Crimson Text', serif;
}



/* ================================
   SLIDER
   ================================ */
#year-slider{
  position: absolute;
  z-index: 10000;
  filter: drop-shadow(0 5px 15px rgba(61, 40, 23, 0.4));
  bottom: 8vh;
  left: 35%;
  width: 30%;
}



.noUi-pips-horizontal{
  bottom: 1vh;
  padding-top: 1vmin;
}

.noUi-value{
  font-size: 2.2vmin;
  color: rgba(61, 40, 23, 0.9);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  font-weight: 600;
  opacity: 1;
  visibility: visible;
  display: block;
  font-family: 'Cinzel', serif;
}

.noUi-target{
  background: rgba(255,248,230,0.55);
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(61, 40, 23, 0.3);
  border: 1px solid var(--rule-strong);
  height: 14px;
  backdrop-filter: blur(3px);
}

.noUi-connect{
  background: linear-gradient(90deg, rgba(47,79,79,0.88), rgba(47,79,79,0.55));
  box-shadow: 0 0 10px rgba(47,79,79,0.18);
  border-radius: 12px;
  transition: background 0.4s ease;
}

.noUi-handle{
  background: linear-gradient(135deg, #f5e6d3, #d4c4a8) !important;
  border: 4px solid #8b7355;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  right: -14px;
  top: -7px;
  box-shadow: 0 4px 12px rgba(61, 40, 23, 0.5), 0 0 0 3px rgba(139, 115, 85, 0.2);
  cursor: grab;
  transition: all 0.25s ease-out;
  opacity: 1;
  visibility: visible;
  outline: none;
}

.noUi-handle:before,
.noUi-handle:after{
  display: none;
  content: none;
}

.noUi-handle:hover{
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(61, 40, 23, 0.6), 0 0 0 4px rgba(139, 115, 85, 0.3);
  background: linear-gradient(135deg, #fff8e7, #e5d5b7);
}

.noUi-handle:active{
  cursor: grabbing;
  transform: scale(1.05);
  background: linear-gradient(135deg, #ede0c7, #c4b498);
}

.noUi-marker-horizontal.noUi-marker{
  height: 8px;
  width: 2px;
  background: rgba(139, 115, 85, 0.6);
  margin-top: -1px;
  opacity: 1;
  visibility: visible;
  display: block;
}

.noUi-marker-horizontal.noUi-marker-large{
  height: 12px;
  width: 3px;
  background: rgba(139, 115, 85, 0.8);
  opacity: 1;
  visibility: visible;
  display: block;
}

.noUi-value-horizontal{
  transform: translate(-50%, 50%);
}

.noUi-value:hover{
  font-weight: bold;
  color: #4a3228;
  font-size: 2.6vmin;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
}

.noUi-tooltip{
  background: rgba(61, 40, 23, 0.95);
  border: 2px solid rgba(139, 115, 85, 0.8);
  color: var(--paper);
  font-size: 2vmin;
  padding: 1vmin 1.5vmin;
  border-radius: 1vmin;
  box-shadow: 0 1vmin 3vmin rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  font-weight: 600;
  letter-spacing: 0.5vmin;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  display: block;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s;
  font-family: 'Cinzel', serif;
}

.noUi-tooltip:after{
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 12px;
  background: rgba(61, 40, 23, 0.95);
  border-right: 2px solid rgba(139, 115, 85, 0.8);
  border-bottom: 2px solid rgba(139, 115, 85, 0.8);
  transform: rotate(45deg);
}

/* single definition (merged) */
.noUi-active .noUi-tooltip{
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  background: rgba(61, 40, 23, 1);
}

.noUi-pips{
  opacity: 1;
  visibility: visible;
  display: block;
}

@keyframes track-glow{
  0% { box-shadow: 0 0 3px rgba(139, 115, 85, 0.3); }
  50%{ box-shadow: 0 0 8px rgba(139, 115, 85, 0.5); }
  100%{ box-shadow: 0 0 3px rgba(139, 115, 85, 0.3); }
}

.noUi-target:hover .noUi-connect{
  animation: track-glow 3s infinite ease-in-out;
}

/* ================================
   MARKERS
   ================================ */


.mapboxgl-marker{
  width: 2.4vmin;
  height: 2.4vmin;
  border-radius: 50%;

  border: 1px solid rgba(0,0,0,0.24);
  box-shadow:
    inset 0 0.25vmin 0.55vmin rgba(255,255,255,0.16),
    0 0.35vmin 1vmin rgba(0,0,0,0.26);
    

  display: flex;
  align-items: center;
  justify-content: center;
}

.mapboxgl-marker:hover{
    cursor: pointer;
  transform: scale(1.18);
  box-shadow:
    inset 0 0.28vmin 0.6vmin rgba(255,255,255,0.20),
    0 0.55vmin 1.35vmin rgba(0,0,0,0.34);
}

.annotation {
  position: absolute;
  top: 80%;          /* places it below the marker */
  left: 50%;
  transform: translateX(-50%);  /* centers it horizontally */
  width: 120px;       /* make wider as needed */
  text-align: center;
  pointer-events: none;
}

.annotation h2 {
  font-size: 2vmin;
  white-space: normal;  /* allows wrapping with the wider width */
}

/* ================================
   PANEL
   ================================ */
.panel{
  position: relative;
  width: 100%;
  overflow: hidden;

  background-color: var(--paper-strong);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);

  background-image: var(--panel-texture);
  background-size: cover;
  background-position: center;

  transition: all 0.3s ease;

}

.panel::after{
  content:"";
  position:absolute;
  inset: 0;
  background-image: var(--panel-texture);
  background-size: cover;
  background-position: center;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

.panel-heading{
  font-size: var(--fs-panel-heading);
  font-weight: 700;
  color: var(--heading-ink);
  letter-spacing: 0.8px;

  font-family: var(--font-ui);
  text-align: center;

  border-bottom: 1px solid var(--rule-faint);
  padding-bottom: 0.6vmin;

  word-wrap: break-word;
  overflow-wrap: break-word;
}

.search-input{
  width: calc(100% - 1vmin);
  padding: 0.75vmin 1vmin;
  margin: 0.5vmin;
  justify-self: center;


  border: 1px solid rgba(139,115,85,0.35); /* kept as-is; optional token */
  border-radius: var(--radius-sm);
  outline: none;

  font-size: var(--fs-input);
  font-weight: 500;
  background: rgba(255,255,255,0.7);
  color: var(--input-ink);

  box-shadow: inset 0 1px 6px rgba(0,0,0,0.08);
}

.search-input::placeholder{
  color: #7a6a5a; /* kept as-is; optional token */
  font-weight: 400;
  font-style: italic;
}



.filter-item:hover{
  background: rgba(255,255,255,0.30);
  border-color: rgba(47,79,79,0.28);
  transform: translateY(-1px);
  box-shadow: var(--shadow-tight);
}

/* Selected (final effective behavior) */
.filter-clicked{
  border: 3px solid #76411c !important;
  color: #76411c;
  position: relative;
  font-weight: 700;
    background: linear-gradient(#d8c1a2, #c8a884);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
  transform: translateY(1px);
}



/* ================================
   TOP CORNER BUTTONS
   ================================ */
.modern-button{
  background: rgba(255,248,230,0.86);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-tight);

  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-family: var(--font-ui);

  display: flex;
  align-items: center;
  justify-content: center;

  position: absolute;
  z-index: 1001;
  width: 8vmin;
  height: 8vmin;
  font-size: var(--fs-modern-btn);
  top: 1vmin;
}

.modern-button:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  background: rgba(255,255,255,0.90);
}

#home-button{ left: 1vmin; }
#info-button{ right: 1vmin; }
.second-left-button{ left: 10vmin; }
.third-left-button{ left: 19vmin; }
.second-right-button{ right: 10vmin; }


*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--shadow-soft);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--classy-blue-ink)
}



.cta2 {
  width: 8vmin;
  height: 8vmin;
  border-radius: 50%;
  border: none;
  background: var(--classy-blue-ink);
  color: var(--paper);
  font-size: 4vmin;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta2:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

/* ================================
   CTA BUTTON
   ================================ */
.cta-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8vmin;
  overflow: hidden;

  padding: 1.6vmin 3.2vmin;
  min-height: 7.2vmin;
  min-width: 28vmin;

  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-cta);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  text-decoration: none;

  color: var(--classy-blue-ink);
  background: linear-gradient(
    to bottom,
    rgba(255, 252, 244, 0.96),
    rgba(245, 230, 211, 0.92)
  );

  border: 1px solid var(--rule-strong);
  border-radius: calc(var(--radius) + 4px);

  box-shadow:
    0 10px 22px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.55);

  position: relative;
  cursor: pointer;
  user-select: none;

  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cta-button::before{
  content:"";
  position:absolute;
  inset: 0.65vmin;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(110,85,55,0.22);
  background: rgba(47,79,79,0.06);
  pointer-events: none;
  opacity: 0.65;
}

.cta-button::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: calc(var(--radius) + 4px);
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.45), transparent 55%);
  pointer-events: none;
  opacity: 0.6;
}

.cta-button:hover{
  transform: translateY(-2px);
  box-shadow:
    0 14px 30px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.65);
  filter: saturate(1.03);
}

.cta-button:active{
  transform: translateY(0px);
  box-shadow:
    0 8px 16px rgba(0,0,0,0.16),
    inset 0 2px 10px rgba(0,0,0,0.10);
}

.cta-button:focus-visible{
  outline: none;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.20),
    0 0 0 3px rgba(3,43,125,0.25);
}




/* Apply to ANY element you want animated */
.sweep{
  position: relative;
  overflow: hidden;
}

/* the moving inner highlight */
.sweep::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;

  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255,255,255,0.85) 50%,
    transparent 70%
  );

  transform: translateX(-120%);
  animation: sweep 2.2s linear infinite;
  pointer-events: none;
}

@keyframes sweep{
  to{ transform: translateX(120%); }
}





/* Use on your round button */
.round-sweep{
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}

/* same idea as your rectangle: moving diagonal band */
.round-sweep::after{
  content: "";
  position: absolute;
  inset: -35%;              /* key: make the band bigger than the circle */
  border-radius: 50%;

  /* diagonal band (same as your rectangle, just softer/wider) */
  background: linear-gradient(
    120deg,
    transparent 38%,
    rgba(255,255,255,0.55) 50%,
    transparent 62%
  );

  /* soften so it doesn’t look “clipped” */
  filter: blur(6px);

  /* fade out near the edge of the circle */
  -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 78%);
  mask-image: radial-gradient(circle, #000 58%, transparent 78%);

  transform: translateX(-140%);
  animation: roundSweep 2.2s linear infinite;

  pointer-events: none;
}

@keyframes roundSweep{
  to { transform: translateX(140%); }
}



/* ================================
   EXPLORE STRIPS
   ================================ */
.mega-strips{
  margin: 6vh auto 0;
  align-items: center;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 0vmin;

  align-items: start;
}

.explore-strip{
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;

  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  justify-content: center;
}

.explore-strip::after{
  content:"";
  position:absolute;
  opacity: 0.10;
  pointer-events:none;
}

.strip-title{
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 2vmin;

  margin-bottom: 0.5vmin;
}

.strip-title h2{
  font-family: var(--font-ui);
  font-size: var(--fs-strip-title);
  letter-spacing: 0.6px;
  color: var(--heading-ink);
  font-weight: 700;
}

.strip-title .rule{
  height: 1px;
  background: rgba(110,85,55,0.30);
}

.explore-grid{
  position: relative;
  z-index: 1;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;

  padding: 1.2vmin 0.8vmin;
}

.explore-item{
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;

  display: grid;
  justify-items: center;
  align-content: center;

  width: var(--explore-btn-size);
  height: auto;                 /* instead of fixed square height */
  min-height: var(--explore-btn-size);
  border-radius: var(--radius-sm);

  transition: transform 0.12s ease, filter 0.18s ease, background 0.18s ease;
}

.explore-item + .explore-item{
  position: relative;
}

.explore-item + .explore-item::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--explore-divider-w);
  height: var(--explore-divider-h);
  background: var(--explore-divider-color);
}

.icon{
  font-size: var(--fs-strip-icon);
  filter: sepia(0.5) contrast(1.05) brightness(0.95);
  text-shadow: 0 4px 6px rgba(0,0,0,0.25);
  line-height: 1;
}

.explore-item .label{
  font-family: var(--font-ui);
  font-size: var(--fs-strip-label);
  letter-spacing: 0.4px;
  color: var(--ink);
  font-weight: 600;
}

.explore-item:hover{
  background: rgba(255,255,255,0.35);
  transform: translateY(-1px);
}

.explore-item:active{
  transform: translateY(0px);
}

.explore-item:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(3,43,125,0.22);
}

.explore-item .desc{
  font-family: var(--font-body);
  font-size: clamp(12px, 2vmin, 15px);
  line-height: 1.25;
  color: var(--heading-ink);
  text-align: center;

  max-width: 18ch;              /* keeps it “caption-like” */
  margin-top: 0.2vmin;
  font-style: italic;
  opacity: 0.95;
}


/* === Timeline chart theme (parchment) === */

/* Give the whole SVG the "panel" feel */
#timeline-container{
  background-color: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 20px;
  position: relative;
}

/* SVG typography */
.timeline-svg text{
  font-family: var(--font-body);
  fill: var(--ink);
}

/* Axis lines + ticks like parchment rules */
.timeline-svg .domain{
  stroke: var(--rule-strong);
  stroke-width: 1;
}
.timeline-svg .tick line{
  stroke: var(--rule-faint);
  stroke-width: 1;
}

/* Grid lines softer */
.timeline-svg .grid .tick line{
  stroke: var(--rule-faint);
  opacity: 0.9;
}

/* Y labels: look clickable but not "web blue" */
.timeline-svg .y-label{
  cursor: pointer;
  font-family: var(--font-display);
  fill: var(--ink);
  opacity: 0.92;
}

/* Animated underline that matches your palette */
.timeline-svg .y-underline{
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.55;
}

/* Bars: muted, parchment-friendly */
.timeline-svg .bar{
  opacity: 0.65;                   /* mutes your getColor() palette */
  stroke: rgba(47, 36, 27, 0.25);  /* ink-ish outline */
  stroke-width: 1;
  rx: 8;
  ry: 8;
}

/* Hover: slightly stronger + more "accent" */
.timeline-svg .bar:hover{
  opacity: 0.85;
  stroke: rgba(47, 79, 79, 0.45);  /* accent */
  stroke-width: 1.2;
}

.timeline-svg .y-label{ font-size: 2.2vmin; }
#x-axis-svg text{ font-size: 2vmin; font-family: var(--font-body); fill: var(--ink); }


/* =========================================
   INTRO.JS — PARCHMENT THEME (TOKEN-BASED)
   Drop-in: uses existing :root variables
   ========================================= */

/* Warm parchment overlay */
.introjs-overlay{
  background: var(--paper) !important; /* ink w/ alpha (no token for alpha) */
}

/* Spotlight ring */
.introjs-helperLayer{
  background: transparent !important;
  border-radius: var(--radius) !important;

  box-shadow:
    0 0 0 9999px rgba(47, 36, 27, 0.55),
    0 0 0 2px var(--rule-strong),
    0 18px 40px rgba(0,0,0,0.35) !important;
}

/* Tooltip card (panel style) */
.introjs-tooltip{
  padding: 0 !important;
  border-radius: var(--radius) !important;

  background: var(--paper-strong) !important;
  border: 1px solid var(--rule) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,0.25) !important;

  color: var(--ink) !important;
  font-family: var(--font-body) !important;

  overflow: hidden !important;
  max-width: 360px !important;
}

/* Title bar */
.introjs-tooltip h3{
  margin: 0 !important;
  padding: 12px 16px !important;

  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-size: 16px !important;

  background: var(--paper) !important;
  border-bottom: 1px solid var(--rule-faint) !important;

  color: var(--heading-ink) !important;
  text-align: center !important;
}

/* Body text */
.introjs-tooltiptext{
  padding: 12px 16px 6px 16px !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--ink) !important;
}

/* Progress bar */
.introjs-progress{
  margin: 8px 16px 0 16px !important;
  height: 6px !important;

  background: var(--rule-faint) !important;
  border-radius: 99px !important;
}

.introjs-progressbar{
  height: 100% !important;
  background: rgba(3, 43, 125, 0.55) !important; /* classy-blue-ink w/ alpha */
  border-radius: 99px !important;
}

/* Button container */
.introjs-tooltipbuttons{
  padding: 10px 16px 14px 16px !important;
  border-top: 1px solid var(--rule-faint) !important;
}

/* Buttons */
.introjs-button{
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--rule) !important;

  background: var(--paper) !important;
  color: var(--ink) !important;

  padding: 8px 14px !important;

  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;

  box-shadow: var(--shadow-tight) !important;
}

/* Primary / Next */
.introjs-nextbutton{
  background: var(--paper-strong) !important;
  border-color: rgba(3, 43, 125, 0.25) !important;
}

/* Hover */
.introjs-button:hover{
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-soft) !important;
}

/* Arrow colors */
.introjs-arrow.top{ border-bottom-color: var(--paper-strong) !important; }
.introjs-arrow.bottom{ border-top-color: var(--paper-strong) !important; }
.introjs-arrow.left{ border-right-color: var(--paper-strong) !important; }
.introjs-arrow.right{ border-left-color: var(--paper-strong) !important; }

/* =========================================
   CLICK SHIELD
   ========================================= */

/* Transparent blocker */
#tour-click-shield{
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 9999980;
  pointer-events: auto;
}

/* Highlighted element above shield */
.introjs-showElement{
  z-index: 9999999 !important;
}

/* Tooltip always clickable */
.introjs-tooltip,
.introjs-tooltip *{
  pointer-events: auto !important;
}



@media (max-width: 700px){

  :root{
    --fs-sitename: 10vmin;
    --header-height: 8vh;
  }

  .mega-strips{
    margin: 1vh auto 0;
    align-items: center;

    display: grid;
    grid-template-columns: 92vw;
    justify-content: center;
    gap: 0vmin;

    align-items: start;
  }

  .annotation h2 {
    font-size: 3vmin;
  }


  .explore-strip{
    width: 92vw;
  }

  .explore-grid{
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.2vmin;
    justify-items: center;
    padding: 0.9vmin 0.8vmin
  }

  .explore-item + .explore-item{
    margin-left: 0;
    padding-left: 0;
  }

  .explore-item + .explore-item::before{
    display: none;
  }
  
  .explore-item .desc{
    max-width: none;
    padding: 0 1vmin;
  }

  

  #year-slider {
    width: calc(100% - 20vmin);
    left: 10vmin;
    bottom: 20vmin;
    transform: none;
    z-index: 1500;
  }
}
