/* Origin portal: an atlas-like entrance, not a replacement for the map. */
.origin-hero {
  --origin-ink: #163c3e;
  --origin-muted: #526968;
  --origin-paper: #eee9dd;
  --origin-line: #c6d0c6;
  font-family: "DM Sans", system-ui, sans-serif;
}
header.hero.origin-hero {
  min-height: 0;
  padding: 56px 40px 36px;
  text-align: left;
  background: var(--origin-paper);
  color: var(--origin-ink);
  border-bottom: 1px solid #bfcac0;
}
.origin-hero .hero-inner {
  width: 100%;
  max-width: 1160px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0 68px;
}
.origin-hero .hero-eyebrow {
  color: #526968;
  font-size: 11px;
  letter-spacing: 2px;
  margin: 0 0 20px;
}
.origin-hero .hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(44px, 5.2vw, 70px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -2.5px;
  color: var(--origin-ink);
  max-width: 560px;
}
.origin-hero .hero-tagline {
  margin: 21px 0 0;
  color: var(--origin-ink);
  font: 500 21px/1.4 "DM Sans", system-ui, sans-serif;
  max-width: 420px;
}
.origin-hero .hero-sub {
  margin: 12px 0 0;
  max-width: 440px;
  color: var(--origin-muted);
  font-size: 15px;
  line-height: 1.55;
}
.origin-hero .hero-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}
.origin-choice {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 110px;
  padding: 20px;
  border: 1px solid var(--origin-line);
  border-radius: 13px;
  background: #e0e8df;
  color: var(--origin-ink);
  text-align: left;
  font-family: "DM Sans", system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform .18s ease;
}
.origin-choice:first-child { background: #163c3e; color: #f1eddf; border-color: #163c3e; }
.origin-choice:last-child { background: #e9d8b4; border-color: #d6c7a5; }
.origin-choice:hover { transform: translateX(4px); }
.origin-choice:active { transform: scale(.985); }
.origin-choice:focus-visible, .origin-secondary button:focus-visible, .origin-secondary a:focus-visible {
  outline: 3px solid #b57727;
  outline-offset: 4px;
}
.origin-choice-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  font-size: 30px;
}
.origin-choice strong { display: block; font-size: 15px; letter-spacing: .6px; line-height: 1.3; }
.origin-choice small { display: block; font-size: 14px; line-height: 1.4; margin-top: 5px; font-weight: 400; }
.origin-choice-arrow { font-size: 22px; }
.origin-secondary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  align-items: center;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #ccd1c5;
  color: var(--origin-muted);
  font-size: 12px;
}
.origin-secondary button, .origin-secondary a {
  padding: 10px 0;
  min-height: 44px;
  box-sizing: border-box;
  font: 500 12px "DM Sans", system-ui, sans-serif;
  color: var(--origin-ink);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.origin-secondary .origin-free { margin-right: auto; }
.origin-hero .preview-note {
  grid-column: 1 / -1;
  max-width: none;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--origin-muted);
}
.origin-reward[hidden] { display: none !important; }
.origin-reward {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1250;
  box-sizing: border-box;
  width: min(410px, calc(100% - 24px));
  border: 1px solid #b7c6b9;
  border-radius: 14px;
  padding: 20px;
  background: #eee9dd;
  color: #163c3e;
  box-shadow: 0 10px 32px #102d3026;
  font-family: "DM Sans", system-ui, sans-serif;
}
.origin-reward h2 { font: 700 17px/1.3 "DM Sans", system-ui, sans-serif; margin: 0 24px 7px 0; }
.origin-reward p { font-size: 14px; line-height: 1.4; margin: 0 0 12px; }
.origin-reward .origin-reward-detail { font-size: 11px; color: #526968; margin-top: 9px; margin-bottom: 0; }
.origin-reward-unlock {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: #163c3e;
  color: #f1eddf;
  border: none;
  border-radius: 8px;
  font: 700 12px "DM Sans", system-ui, sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
}
.origin-reward-close {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: #163c3e;
  font-size: 24px;
  cursor: pointer;
}
.origin-reward button:focus-visible { outline: 3px solid #b57727; outline-offset: 2px; }
#ancestry-entry, .anc-chooser, .slider-container { scroll-margin-top: 80px; }
.origin-timeline-active .slider-container { outline: 2px solid #e6b566; outline-offset: -2px; }
@media (max-width: 767px) {
  header.hero.origin-hero { padding: 26px 18px 16px; }
  .origin-hero .hero-inner { display: block; }
  .origin-hero .hero-eyebrow { margin-bottom: 12px; font-size: 10px; letter-spacing: 1.7px; }
  .origin-hero .hero-title { font-size: clamp(36px, 10.3vw, 54px); letter-spacing: -1.5px; max-width: 550px; }
  .origin-hero .hero-tagline { font-size: 17px; line-height: 1.35; margin-top: 13px; max-width: 340px; }
  .origin-hero .hero-sub { font-size: 13px; line-height: 1.45; margin-top: 8px; }
  .origin-hero .hero-choices { gap: 9px; padding-top: 0; margin-top: 19px; }
  .origin-choice { min-height: 87px; padding: 14px 12px; gap: 10px; grid-template-columns: 36px minmax(0, 1fr) 14px; border-radius: 10px; }
  .origin-choice-icon { width: 36px; font-size: 26px; }
  .origin-choice strong { font-size: 13px; letter-spacing: .4px; }
  .origin-choice small { font-size: 12px; line-height: 1.4; margin-top: 4px; }
  .origin-secondary { margin-top: 15px; padding-top: 6px; gap: 0 15px; }
  .origin-secondary .origin-free { width: 100%; margin: 0; font-size: 11px; line-height: 1.4; padding: 6px 0 0; }
  .origin-hero .preview-note { margin-top: 3px; font-size: 10px; }
  .origin-reward { bottom: 10px; right: 12px; padding: 16px; }
  /* Timeline mode puts the real controls before the live map, so both are
     visible on a phone. All culture/search/toggle controls remain below it. */
  .origin-timeline-active .side-panel { display: contents; }
  .origin-timeline-active .slider-container { order: -3; background: #0f172a; }
  .origin-timeline-active .playback-controls { order: -2; background: #0f172a; }
  .origin-timeline-active #map { height: 48dvh; min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .origin-choice { transition: none; }
}