/* ===================================================
   style.css — History of English Interactive Timeline
   Phase 3: Navy page bg, Lavender timeline box, Terracotta pins, Amber stars
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #1A2248;
  /* Deeper navy for more focus */
  --bg-dark: #121831;
  --surface: #F2EEFF;
  --accent: #C17767;
  --star-color: #DEB841;
  --star-dim: #b89836;
  /* Muted amber */
  --space: #FAFAFF;
  --text: #FAFAFF;
  --text-dim: rgba(250, 250, 255, 0.5);
  --text-light: rgba(250, 250, 255, 0.9);
  --text-on-sfc: #1a2248;
  --text-dim-sfc: rgba(39, 52, 105, 0.5);
  --border-dark: rgba(255, 255, 255, 0.1);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --container-width: 850px;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px 60px;
}

/* ── Header ── */
.site-header {
  padding: 32px 0 20px;
  border-bottom: 1px solid var(--border-dark);
}

.site-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--space);
}

.site-header .subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── Filter Instructions ── */
.filter-instructions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 12px;
  margin-left: 0;
  /* Align with "WORDS" label */
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: none;
  font-weight: 500;
  opacity: 0.8;
}

.help-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--text-dim);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Filter chips row ── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
  white-space: nowrap;
}

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

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: var(--text-on-sfc);
  border: 2px solid var(--surface);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    transform var(--transition), box-shadow var(--transition);
  user-select: none;
}

.filter-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-chip:hover {
  box-shadow: 0 2px 14px rgba(228, 217, 255, 0.25);
  transform: translateY(-1px);
}

.filter-chip.inactive {
  background: rgba(228, 217, 255, 0.1);
  color: var(--text-dim);
  border-color: rgba(228, 217, 255, 0.2);
  opacity: 0.6;
}

.filter-chip.inactive .chip-dot {
  opacity: 0.35;
}

/* ── Timeline container (light surface card) ── */
.timeline-container {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* ── Zoom controls ── */
.zoom-controls {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 50;
  display: flex;
  gap: 3px;
}

.zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1.5px solid rgba(26, 34, 72, 0.25);
  background: rgba(26, 34, 72, 0.22);
  color: #1a2248;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  user-select: none;
}

.zoom-btn:hover {
  background: rgba(26, 34, 72, 0.48);
  transform: scale(1.08);
}

/* ── Era track (Background sections) ── */
.era-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: flex;
}

.era-box {
  position: absolute;
  height: 100%;
  border-right: 1px dashed rgba(26, 34, 72, 0.08);
  transition: background var(--transition);
}

.era-box.era-middle {
  background: #F9F7FF;
  /* Very slight purple-rose tint */
}

/* Middle English */
.era-box.era-early {
  background: #F2EEFF;
  /* Original surface lavender */
}

/* Early Modern */
.era-box.era-modern {
  background: #EEF3FF;
  /* Very slight blue tint */
}

/* Modern */

.era-label {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0.55;
  /* Refined opacity as requested */
}

/* ── Bracket track (Top markers) ── */
.bracket-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 100;
  /* Above eras and axis */
}

.bracket-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bracket-label-group {
  margin-bottom: 2px;
}

.bracket-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.bracket-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-style: italic;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 1px;
}

.bracket-svg-container {
  width: 100%;
  height: 14px;
}

.timeline-viewport {
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  min-height: 220px;
}

.timeline-viewport:active {
  cursor: grabbing;
}

/* ── Canvas ── */
.timeline-canvas {
  position: relative;
  will-change: transform;
}

/* ── Pin track (attestation map pins — above axis) ── */
.pin-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* ── Axis ── */
.timeline-axis {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a2248;
}

/* ── Year labels ── */
.year-labels {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.year-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a2248;
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
}

.year-label.minor {
  font-size: 0.62rem;
  font-weight: 400;
  color: rgba(26, 34, 72, 0.5);
}

.year-label::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 1.5px;
  height: 7px;
  background: rgba(26, 34, 72, 0.45);
}

.year-label.minor::before {
  height: 4px;
  background: rgba(26, 34, 72, 0.25);
}

/* ── Star track (IR events) ── */
.star-track {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* ── Attestation map pin ── */
.att-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  pointer-events: all;
  z-index: 10;
  transition: filter var(--transition), transform var(--transition);
}

.att-pin svg {
  display: block;
  overflow: visible;
}

.att-pin:hover {
  filter: brightness(1.2);
  z-index: 20;
}

.att-pin.hidden-word {
  display: none;
}

/* ── IR event star ── */
.ir-star {
  position: absolute;
  cursor: pointer;
  pointer-events: all;
  z-index: 15;
  transition: filter var(--transition), transform var(--transition);
}

.ir-star svg {
  display: block;
  overflow: visible;
}

.ir-star:hover {
  filter: brightness(1.25);
  z-index: 25;
}

/* ── Popup ── */
.timeline-popup {
  position: fixed;
  z-index: 200;
  background: var(--space);
  color: var(--text-on-sfc);
  border: 2px solid var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 300px;
  min-width: 200px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  pointer-events: all;
}

.timeline-popup.hidden {
  display: none;
}

.popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-dim-sfc);
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}

.popup-close:hover {
  color: var(--accent);
  background: rgba(193, 119, 103, 0.1);
}

.popup-content {
  padding-right: 14px;
}

.popup-type-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.popup-type-badge.event {
  background: rgba(222, 184, 65, 0.2);
  color: #7a5a00;
}

.popup-type-badge.word {
  background: rgba(193, 119, 103, 0.15);
  color: #7a3d28;
}

.popup-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-sfc);
  line-height: 1.3;
  margin-bottom: 4px;
}

.popup-date {
  font-size: 0.72rem;
  color: var(--text-dim-sfc);
  margin-bottom: 8px;
}

.popup-body {
  font-size: 0.78rem;
  color: var(--text-on-sfc);
  line-height: 1.6;
  font-style: italic;
  margin: 8px 0;
}

.popup-source {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.68rem;
  color: var(--text-dim-sfc);
  font-style: normal;
  border-top: 1px solid var(--border-sfc);
  padding-top: 8px;
}

.popup-desc {
  font-size: 0.8rem;
  color: var(--text-on-sfc);
  line-height: 1.6;
}

/* Arrow pointing down */
.popup-arrow {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid var(--surface);
}

.popup-arrow::after {
  content: '';
  position: absolute;
  top: -11px;
  left: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--space);
}

/* ── Pan slider ── */
.slider-row {
  padding: 14px 0 0;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.window-range {
  font-size: 0.8rem;
  color: var(--surface);
  font-weight: 700;
  letter-spacing: 0.04em;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(90deg,
      var(--accent) var(--slider-pct, 0%),
      rgba(228, 217, 255, 0.2) var(--slider-pct, 0%));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 2px 10px rgba(193, 119, 103, 0.5);
  transition: box-shadow var(--transition), transform var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 18px rgba(193, 119, 103, 0.7);
  transform: scale(1.15);
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 768px) {

  /* Contain all children to viewport width */
  * {
    max-width: 100%;
  }

  /* Nav */
  .top-nav {
    padding: 0 20px;
    height: 60px;
  }

  .nav-header-logo {
    font-size: 1.2rem;
    white-space: nowrap;
  }

  .btn-nav {
    padding: 7px 14px;
    font-size: 0.85rem;
  }

  /* Home page */
  .home-container {
    padding: 100px 24px 80px;
    gap: 60px;
  }

  .hero-section h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .research-section {
    padding: 0;
    gap: 24px;
    margin-bottom: 60px;
  }

  .hypothesis-box {
    padding: 28px 24px;
  }

  .hypothesis-text {
    font-size: 1.15rem;
  }

  .item-title {
    font-size: 1.1rem;
  }

  .sub-bullets li {
    font-size: 0.9rem;
  }

  /* Timeline */
  .timeline-container {
    padding: 90px 16px 60px;
  }

  .panel-inner {
    flex-direction: column;
    gap: 16px;
  }

  /* Evolution */
  .evolution-container {
    padding: 100px 24px 80px;
  }

  .evo-word-title {
    font-size: 1.8rem;
  }

  .pill-group {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
  }

  .evolution-pill {
    padding: 7px 14px;
    font-size: 0.85rem;
  }

  /* Stack comparison cards vertically */
  .evolution-comparison {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .evo-card {
    max-width: 100%;
  }

  .evo-card-content {
    padding: 24px 20px;
  }

  .evo-arrow {
    transform: rotate(90deg);
    margin: 0 auto;
    padding: 0;
  }

  ::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .top-nav {
    padding: 0 16px;
    height: 56px;
  }

  .nav-header-logo {
    font-size: 1.05rem;
  }

  .btn-nav {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .home-container {
    padding: 85px 16px 60px;
    gap: 48px;
  }

  .hero-section h1 {
    font-size: 1.65rem;
  }

  .hypothesis-text {
    font-size: 1rem;
  }

  .item-title {
    font-size: 1rem;
  }

  .evo-word-title {
    font-size: 1.5rem;
  }

  .evo-card-content {
    padding: 20px 16px;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(228, 217, 255, 0.2);
  border-radius: 3px;
}

/* ── Footer / Methodology Note ── */
.footer-note {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 16px;
  max-width: 800px;
}

.asterisk {
  font-family: serif;
  font-size: 2.5rem;
  color: #DEB841;
  /* Golden asterisk */
  line-height: 1;
  margin-top: -4px;
}

.note-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  font-style: italic;
  opacity: 0.9;
}

.note-text em {
  font-weight: 600;
  color: #DEB841;
  font-style: normal;
}

/* ── Navigation Bar ── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(26, 34, 72, 0.85);
  /* Frosty Navy */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 60px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-header-logo {
  font-family: 'Lora', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-header-logo span {
  color: var(--star-color);
}

.nav-actions {
  display: flex;
  gap: 24px;
  align-items: center;
}

.btn-nav {
  display: inline-block;
  padding: 10px 24px;
  background: var(--star-color);
  color: #111;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-nav:hover {
  background: #f0cc66;
  transform: translateY(-1px);
}

.link-home {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.link-home:hover {
  color: #fff;
}

/* ── Landing Page Styles (Refined Flow) ── */
.home-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 140px 40px 100px;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.hero-section {
  text-align: center;
}

.hero-section h1 {
  font-family: 'Lora', serif;
  font-size: 3.5rem;
  margin-bottom: 0;
  color: #fff;
  line-height: 1.2;
}

.research-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  width: 100%;
  /* Force full width to prevent content-based centering shift */
  margin: 0 auto 80px;
  padding: 0 40px;
  box-sizing: border-box;
}

.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--star-color);
  font-weight: 700;
  display: block;
  margin-bottom: 24px;
  opacity: 0.8;
}

.hypothesis-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--star-color);
  padding: 40px;
  border-radius: 0 8px 8px 0;
}

/* ── Semantic Evolution Page ── */
.evolution-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 40px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.evolution-header {
  text-align: center;
  margin-bottom: 40px;
}

.evolution-header h1 {
  font-family: 'Lora', serif;
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 8px;
}

.selector-help {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
}

.pill-group {
  display: flex;
  gap: 12px;
  margin-bottom: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

.evolution-pill {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.evolution-pill.active {
  background: var(--star-color);
  border-color: var(--star-color);
  color: #111;
}

.evolution-dashboard {
  width: 100%;
  transition: opacity 0.3s ease;
}

.evolution-placeholder {
  text-align: center;
  padding: 100px 0;
  color: var(--text-dim);
  font-style: italic;
}

.word-header-meta {
  text-align: left;
  margin-bottom: 48px;
}

.evo-word-title {
  font-family: 'Lora', serif;
  font-size: 2.4rem;
  color: #fff;
  margin-bottom: 4px;
}

.evo-pos {
  font-size: 1.2rem;
  color: var(--star-color);
}

.evo-pronunciation {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.evo-origin,
.evo-shift-point {
  font-size: 1rem;
  color: var(--text-light);
  font-style: italic;
}

.evo-shift-point {
  color: var(--star-color);
  font-weight: 600;
  margin-top: 4px;
}

.evolution-comparison {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 64px;
  width: 100%;
  justify-content: center;
}

.evo-card {
  flex: 1;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evo-card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--star-color);
}

.evo-card-content {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;

  border-radius: 12px;
  padding: 32px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.evo-year {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1;
}

.evo-definition {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
  flex-grow: 1;
  font-style: italic;
}

.evo-source {
  display: block;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.evo-additional-info {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 12px;
  font-style: italic;
  opacity: 0.8;
}

/* Secondary text on Initial Definition card */
.evo-first-attestation {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: 14px;
  font-style: italic;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Indented note at bottom of Working Definition card */
.evo-attestation-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 12px 0;
  /* Hug top, space below */
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  font-style: italic;
  opacity: 0.75;
  text-align: left;
}

.evo-arrow {
  padding: 0 20px;
  color: var(--star-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}

.evolution-interpretive {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 40px;
}

.evolution-interpretive h3 {
  font-family: 'Lora', serif;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 24px;
}

.interpretive-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
  background: rgba(222, 184, 65, 0.05);
  padding: 24px;
  border-radius: 8px;
  font-style: italic;
}

.hypothesis-text {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  line-height: 1.6;
  color: #fff;
  font-style: italic;
}

.questions-grid {
  display: grid;
  gap: 32px;
}

.question-item {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--text-light);
  max-width: 90%;
}



/* ── Highlights ── */
.hl-accent {
  color: var(--star-color);
  font-weight: 700;
}

.hl-job {
  background-color: #8A56AC;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.hl-class {
  background-color: #6B8CC7;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.hl-boss {
  background-color: #7BA3A0;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.hl-work {
  background-color: #C4956A;
  color: #111;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Hierarchical Lists (Methodology & Questions) ── */
.hierarchical-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
  padding-left: 60px;
  /* Reduced to bring numbers closer to section label indentation */
}

.list-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item-header {
  display: flex;
  gap: 16px;
  align-items: baseline;
  line-height: 1.3;
}

.item-num {
  font-family: 'Lora', serif;
  color: var(--star-color);
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 36px;
}

.item-title {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.sub-bullets {
  list-style: none;
  padding-left: 52px;
  /* Standard indent relative to list title */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-bullets li {
  position: relative;
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Custom open-circle bullet */
.sub-bullets li::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 9px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--star-color);
  border-radius: 50%;
  opacity: 0.8;
}

/* Compact variant */
.hierarchical-list.compact {
  gap: 16px;
}

.hierarchical-list.compact .item-num {
  font-size: 1.15rem;
}

.hierarchical-list.compact .item-title {
  font-size: 1.25rem;
  color: var(--text-light);
  font-weight: 600;
}

/* ── Timeline Navigation Fixes ── */
.timeline-page-body {
  padding-top: 90px;
}

.evolution-page-body {
  padding-top: 90px;
}

.site-header {
  display: none;
  /* Replaced by navbar */
}

/* ── Embedded Timeline Section (Evolution page — above pills) ── */
.evo-timeline-section {
  width: 100%;
  margin: 32px 0 48px;
  /* below pills, above definition cards */
}

/* Widen the evolution container so the timeline has room */
.evolution-container {
  max-width: 1100px;
}

/* Cursor hint: pins are clickable to select words */
.evolution-page-body .att-pin {
  cursor: pointer;
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.2s ease;
}

.evolution-page-body .att-pin:hover {
  transform: translateX(-50%) scale(1.15);
}