:root {
  --bg: #f8f5ee;
  --surface: rgba(255, 250, 240, .88);
  --surface-solid: #fffaf0;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #d7c5a2;
  --accent: #0f766e;
  --accent-2: #b7791f;
  --accent-soft: #ccfbf1;
  --shadow: 0 18px 50px rgba(15, 23, 42, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.65), rgba(248,245,238,.1)),
    radial-gradient(circle at top left, rgba(15,118,110,.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(183,121,31,.18), transparent 30rem),
    repeating-linear-gradient(45deg, rgba(183,121,31,.035) 0 1px, transparent 1px 18px),
    var(--bg);
}

.hero {
  padding: 46px 22px 22px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -150px -270px auto;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(183,121,31,.14);
  border-radius: 50%;
  box-shadow: inset 0 0 0 26px rgba(255,250,240,.22), inset 0 0 0 52px rgba(15,118,110,.035);
  opacity: .75;
  pointer-events: none;
}

.hero__content, main, footer {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0;
  letter-spacing: -.03em;
  line-height: 1.12;
}

.subtitle {
  max-width: 740px;
  color: #475569;
  font-size: 18px;
  line-height: 1.58;
  margin-top: 12px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.stat-pill, .phase-btn {
  border: 1px solid rgba(15, 118, 110, .22);
  background: rgba(255,255,255,.78);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}
.stat-pill {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.1;
  color: #475569;
}
.stat-pill strong { color: var(--accent); }

main { padding: 0 22px; }

.phase-summary-card {
  margin-top: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(215,197,162,.62);
  border-left: 5px solid var(--phase-color, var(--accent));
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.phase-summary-heading {
  margin-bottom: 4px;
}
.phase-summary-headline {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
  color: var(--ink);
}
.phase-summary-copy {
  margin: 0;
  font-size: 14.5px;
}
.phase-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.phase-detail-toggle {
  border: 1px solid color-mix(in srgb, var(--phase-color, var(--accent)) 35%, white);
  background: color-mix(in srgb, var(--phase-color, var(--accent)) 10%, white);
  color: var(--phase-color, var(--accent));
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.phase-detail-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(100,116,139,.16);
}

.phase-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.phase-detail-section {
  margin-top: 16px;
}

.phase-detail-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-2);
}

.phase-detail-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.phase-detail-section li {
  margin-bottom: 6px;
}

.controls { 
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(215,197,162,.62);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  z-index: 3;
  backdrop-filter: blur(14px);
}

.controls-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 12px;
  align-items: start;
}

.controls-compact {
  display: none;
}

.controls-toggle,
.controls-collapse-btn {
  border: 1px solid rgba(15,118,110,.18);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,118,110,.18);
}

.controls-body-header {
  display: none;
}

.control-group label {
  display: block;
  font-weight: 800;
  margin: 0 0 9px;
  font-size: 13px;
  color: #334155;
}

.search-wrap { grid-column: 1 / -1; }
.phase-row-wrap { grid-column: 1; min-width: 0; }
.pointer-wrap { grid-column: 2; min-width: 340px; }

input[type="search"] {
  width: 100%;
  border: 1px solid rgba(100,116,139,.24);
  border-radius: 15px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
}
input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,118,110,.13); }

.phase-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  height: 42px;
  padding-bottom: 0;
}
.phase-btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: color-mix(in srgb, var(--phase-color) 35%, white);
  color: var(--phase-color);
  background: color-mix(in srgb, var(--phase-color) 9%, white);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.phase-btn:hover { transform: translateY(-1px); }
.phase-btn.active {
  background: var(--phase-color);
  border-color: var(--phase-color);
  color: white;
  box-shadow: 0 10px 22px rgba(15,118,110,.20);
}

.age-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 9px;
  min-height: 18px;
}
.age-label-row strong {
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.single-range {
  position: relative;
  height: 42px;
}
.single-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 42px;
  appearance: none;
  background: transparent;
  z-index: 2;
  cursor: pointer;
}
.single-range input[type="range"]::-webkit-slider-runnable-track {
  height: 42px;
  background: transparent;
}
.single-range input[type="range"]::-moz-range-track {
  height: 42px;
  background: transparent;
}
.single-range input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: 9px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15,118,110,.18), 0 9px 18px rgba(15,23,42,.22);
  cursor: grab;
}
.single-range input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15,118,110,.18), 0 9px 18px rgba(15,23,42,.22);
  cursor: grab;
}
.single-range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 17px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), #2563eb);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 8px 18px rgba(15,118,110,.16);
  overflow: hidden;
}
.single-range-track span { display: none; }
.pointer-info {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  margin-top: 1px;
  min-height: 16px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  margin-top: 16px;
}
.timeline-card, .detail-panel {
  background: var(--surface);
  border: 1px solid rgba(215,197,162,.64);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.timeline-card {
  padding: 18px;
  overflow: visible;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 8px;
}
.result-count { color: var(--muted); font-weight: 800; margin: 0; }

.timeline-shell {
  overflow-x: auto;
  overflow-y: visible;
  padding: 36px 6px 20px;
}
.timeline {
  --gap: 28px;
  display: flex;
  min-width: max-content;
  gap: var(--gap);
  position: relative;
  padding: 72px 10px 14px;
  overflow: visible;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), #2563eb);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15,118,110,.12);
  z-index: 0;
}

.event-card {
  width: 255px;
  min-height: 222px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(100,116,139,.16);
  border-radius: 20px;
  padding: 18px;
  cursor: pointer;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: visible;
  z-index: 1;
}
.event-card::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 5px;
  background: var(--event-color, var(--accent));
  opacity: .95;
  border-radius: 20px 20px 0 0;
}
.event-card:hover, .event-card.active {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(15,23,42,.16);
  border-color: rgba(15,118,110,.42);
}
.event-card.featured { background: linear-gradient(180deg, #ffffff, #ecfdf5); }
.event-number {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  color: rgba(15,23,42,.055);
  pointer-events: none;
}
.rich-detail-pill {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--event-color) 12%, white);
  color: var(--event-color, var(--accent));
  border: 1px solid color-mix(in srgb, var(--event-color) 24%, white);
  font-size: 10.5px;
  line-height: 1;
  font-weight: 900;
}
.timeline-marker {
  position: absolute;
  top: -69px;
  left: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
}
.timeline-dot {
  flex: 0 0 auto;
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 4px solid #fff;
  background: var(--event-color, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--event-color) 25%, transparent), 0 8px 18px rgba(15,23,42,.16);
  position: relative;
  z-index: 61;
}
.timeline-year {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  color: #334155;
  border: 1px solid rgba(100,116,139,.22);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15,23,42,.10);
}

.event-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}
.badge.phase {
  background: color-mix(in srgb, var(--badge-color) 13%, white);
  color: var(--badge-color);
}
.badge.detail-mode {
  border: 1px solid rgba(100,116,139,.16);
  background: rgba(255,255,255,.82);
}
.badge.detail-mode.rich {
  color: var(--accent);
  background: rgba(236,253,245,.92);
  border-color: rgba(15,118,110,.18);
}
.badge.detail-mode.compact {
  color: #7c2d12;
  background: rgba(255,247,237,.96);
  border-color: rgba(194,65,12,.14);
}
.event-title {
  font-size: 17px;
  line-height: 1.24;
  margin: 0 0 6px;
}
.event-summary { color: var(--muted); line-height: 1.52; margin: 0; font-size: 13.8px; }

.detail-panel {
  padding: 22px;
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
}
.detail-panel h2 { font-size: 28px; line-height: 1.15; margin-bottom: 12px; }
.muted { color: var(--muted); line-height: 1.65; }
.detail-copy { font-size: 15px; }
.first-section {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}
.detail-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(100,116,139,.18);
}
.detail-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-2);
}
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.lesson-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}
.lesson-list li { margin-bottom: 7px; }
.source-box, .review-box, .compact-note {
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(183,121,31,.18);
  border-radius: 16px;
  padding: 14px;
}
.source-copy {
  font-size: 13.5px;
  line-height: 1.7;
  font-style: italic;
}
.compact-note {
  border-color: rgba(100,116,139,.14);
  background: rgba(248,250,252,.8);
}
.review-box {
  border-color: rgba(183,121,31,.18);
}

footer {
  color: var(--muted);
  padding: 34px 22px 44px;
  text-align: center;
}
.empty { padding: 30px; background: white; border-radius: 18px; color: var(--muted); }

.mobile-modal {
  display: none;
}

@media (max-width: 1100px) {
  .controls-body { grid-template-columns: 1fr; }
  .search-wrap, .phase-row-wrap, .pointer-wrap { grid-column: auto; min-width: 0; }
  .layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; max-height: none; }
}

@media (max-width: 768px) {
  body.modal-open {
    overflow: hidden;
  }

  .mobile-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    align-items: end;
  }

  .mobile-modal[hidden] {
    display: none;
  }

  .mobile-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15,23,42,.46);
    cursor: pointer;
  }

  .mobile-modal__sheet {
    position: relative;
    width: 100%;
    max-height: min(86vh, 760px);
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: var(--surface-solid);
    box-shadow: 0 -20px 60px rgba(15,23,42,.28);
    padding: 10px 16px max(18px, env(safe-area-inset-bottom));
  }

  .mobile-modal__handle {
    width: 48px;
    height: 5px;
    margin: 2px auto 12px;
    border-radius: 999px;
    background: rgba(100,116,139,.35);
  }

  .mobile-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(100,116,139,.16);
  }

  .mobile-modal__header h2 {
    font-size: 23px;
    line-height: 1.18;
  }

  .mobile-modal__close {
    flex: 0 0 auto;
    min-height: 40px;
    border: 1px solid rgba(100,116,139,.18);
    border-radius: 999px;
    padding: 0 12px;
    background: white;
    color: var(--accent);
    font-weight: 900;
  }

  .mobile-modal__body {
    max-height: calc(min(86vh, 760px) - 92px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 2px 2px;
  }

  .mobile-modal__body .first-section {
    margin-top: 0;
  }

  .phase-detail-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .phase-detail-toggle {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero {
    padding: 34px 16px 22px;
  }

  main {
    padding: 0 16px;
  }

  .subtitle {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
  }

  .hero::after {
    display: none;
  }

  .controls {
    position: sticky;
    top: 8px;
    padding: 10px;
    z-index: 30;
    background: rgba(255,250,240,.94);
    box-shadow: 0 12px 34px rgba(15,23,42,.13);
    margin-top: 2px;
    transition: padding .22s ease, box-shadow .22s ease, border-radius .22s ease;
  }

  .controls-compact {
    display: none;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
  }

  .compact-search {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(100,116,139,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    padding: 0 12px;
    outline: none;
  }

  .compact-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(15,118,110,.12);
  }

  #compactAgeValue {
    color: var(--accent);
    font-size: 12px;
    white-space: nowrap;
  }

  .controls-body {
    display: grid;
    gap: 10px;
    overflow: hidden;
    max-height: 360px;
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: top center;
    transition: max-height .34s cubic-bezier(.22,1,.36,1), opacity .22s ease, transform .34s cubic-bezier(.22,1,.36,1), margin .28s ease;
  }

  .controls-body-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 2px;
  }

  .controls-body-header span {
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
  }

  .controls-collapse-btn {
    min-height: 32px;
    background: rgba(15,118,110,.10);
    color: var(--accent);
    box-shadow: none;
  }

  .controls.is-collapsed {
    padding: 7px 8px;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(15,23,42,.15);
  }

  .controls.is-collapsed .controls-compact {
    display: grid;
    min-height: 40px;
  }

  .controls.is-collapsed .controls-body {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scale(.985);
    pointer-events: none;
  }

  .control-group label {
    margin-bottom: 6px;
    font-size: 12px;
  }

  input[type="search"] {
    min-height: 42px;
    padding: 11px 12px;
    font-size: 14px;
  }

  .phase-buttons {
    gap: 8px;
    height: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .phase-buttons::-webkit-scrollbar {
    display: none;
  }

  .phase-btn {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
  }

  .age-label-row {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 4px;
  }

  .age-label-row label,
  .age-label-row strong {
    font-size: 12px;
  }

  .single-range,
  .single-range input[type="range"],
  .single-range input[type="range"]::-webkit-slider-runnable-track {
    height: 30px;
  }

  .single-range-track {
    top: 12px;
    height: 7px;
  }

  .single-range input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: 5px;
    border-width: 3px;
  }

  .single-range input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-width: 3px;
  }

  .pointer-info {
    margin-top: 0;
    min-height: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .timeline-card,
  .detail-panel,
  .controls,
  .phase-summary-card {
    border-radius: 18px;
  }

  .timeline-card {
    padding: 16px;
  }

  .timeline-shell {
    overflow: visible;
    padding: 10px 0 0;
  }

  .timeline {
    display: grid;
    min-width: 0;
    gap: 16px;
    padding: 0 0 0 28px;
  }

  .timeline::before {
    left: 10px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 4px;
    height: auto;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent), #2563eb);
    box-shadow: 0 4px 12px rgba(15,118,110,.10);
    z-index: 0;
  }

  .event-card {
    width: 100%;
    min-height: 0;
    padding: 16px;
    border-radius: 18px;
    overflow: visible;
  }

  .event-card:hover,
  .event-card.active {
    transform: translateY(-2px);
  }

  .timeline-marker {
    top: 18px;
    left: -27px;
    gap: 0;
    z-index: 60;
  }

  .timeline-dot {
    width: 18px;
    height: 18px;
    border-width: 3px;
    display: block;
  }

  .timeline-year {
    position: absolute;
    left: 25px;
    top: -4px;
    min-height: 23px;
    max-width: min(58vw, 210px);
    padding: 3px 7px;
    font-size: 9.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 999px;
  }

  .rich-detail-pill {
    margin-top: 24px;
  }

  .event-meta {
    margin-top: 10px;
    gap: 5px;
  }

  .badge {
    padding: 4px 7px;
    font-size: 10.5px;
  }

  .event-title {
    font-size: 17px;
  }

  .event-summary {
    font-size: 14px;
  }

  .event-number {
    font-size: 34px;
  }

  .detail-panel {
    padding: 18px;
  }

  .detail-panel h2 {
    font-size: 24px;
  }

  footer {
    padding: 28px 16px 38px;
  }
}

@media (max-width: 520px) {
  .phase-summary-card {
    padding: 16px;
  }

  .phase-summary-headline {
    font-size: 16px;
  }

  .phase-detail-section h3 {
    font-size: 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .stats {
    gap: 6px;
  }

  .stat-pill {
    padding: 5px 9px;
    font-size: 11px;
  }

  .result-count {
    font-size: 13px;
  }
}

/* Laptop horizontal pixel polish */
@media (min-width: 1101px) {
  .hero {
    padding-top: 48px;
    padding-bottom: 24px;
  }

  .subtitle {
    margin-top: 14px;
    margin-bottom: 0;
  }

  .stats {
    margin-top: 12px;
    gap: 7px;
  }

  .stat-pill {
    padding: 6px 10px;
    font-size: 12px;
  }

  .phase-summary-card {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 24px;
  }

  .phase-summary-headline {
    font-size: 17px;
    margin-bottom: 7px;
  }

  .phase-summary-copy {
    font-size: 14px;
    line-height: 1.65;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr) 390px;
    padding: 16px 18px 15px;
    border-radius: 24px;
  }

  .controls-body {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 16px 18px;
  }

  .search-wrap input {
    height: 46px;
  }

  .phase-row-wrap,
  .pointer-wrap {
    align-self: start;
  }

  .phase-buttons,
  .single-range {
    height: 40px;
  }

  .phase-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 12.5px;
    letter-spacing: .01em;
  }

  .age-label-row {
    margin-bottom: 8px;
  }

  .single-range input[type="range"],
  .single-range input[type="range"]::-webkit-slider-runnable-track {
    height: 40px;
  }

  .single-range-track {
    top: 16px;
    height: 9px;
  }

  .single-range input[type="range"]::-webkit-slider-thumb {
    width: 23px;
    height: 23px;
    margin-top: 8.5px;
  }

  .pointer-info {
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 374px;
    gap: 20px;
    margin-top: 18px;
    align-items: start;
  }

  .timeline-card {
    padding: 18px 18px 20px;
    border-radius: 24px;
  }

  .section-heading {
    margin-bottom: 6px;
    align-items: center;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .result-count {
    font-size: 13px;
  }

  .timeline-shell {
    padding: 32px 4px 18px;
  }

  .timeline {
    --gap: 24px;
    padding: 66px 10px 10px;
  }

  .timeline::before {
    top: 12px;
    left: 18px;
    right: 18px;
    height: 4px;
  }

  .timeline-marker {
    top: -64px;
    left: 8px;
    gap: 7px;
    z-index: 60;
  }

  .timeline-dot {
    width: 20px;
    height: 20px;
    border-width: 4px;
    display: block;
  }

  .timeline-year {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 10.5px;
  }

  .event-card {
    width: 250px;
    min-height: 214px;
    padding: 16px;
    border-radius: 20px;
  }

  .event-card::after {
    height: 4px;
    border-radius: 20px 20px 0 0;
  }

  .event-meta {
    gap: 5px;
    margin-bottom: 7px;
  }

  .badge {
    padding: 4px 7px;
    font-size: 10.5px;
  }

  .event-title {
    font-size: 17px;
    line-height: 1.22;
    margin-bottom: 7px;
  }

  .event-summary {
    font-size: 13.5px;
    line-height: 1.48;
  }

  .event-number {
    right: 13px;
    bottom: 9px;
    font-size: 38px;
  }

  .rich-detail-pill {
    margin-bottom: 7px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .detail-panel {
    top: 16px;
    padding: 20px;
    border-radius: 24px;
    max-height: calc(100vh - 32px);
  }

  .detail-panel h2 {
    font-size: 25px;
    line-height: 1.18;
  }

  .detail-copy {
    font-size: 14.5px;
    line-height: 1.7;
  }

  .detail-section {
    margin-top: 15px;
    padding-top: 14px;
  }

  .detail-section h3 {
    font-size: 12px;
    margin-bottom: 7px;
  }
}
