:root {
  --ink: #061512;
  --ink-2: #0b211d;
  --land: #15352e;
  --line: rgba(181, 236, 220, .18);
  --paper: #f3f5ea;
  --muted: #9cb2aa;
  --acid: #d7edb5;
  --p: #dfff38;
  --s: #ad75ff;
  --safe-top: max(20px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "Arial Narrow", "Aptos Narrow", "Helvetica Neue", Arial, sans-serif;
}

button,
select,
input { font: inherit; }

button,
select { touch-action: manipulation; }

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

.app {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

#map {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  transition: filter .9s ease, opacity .9s ease;
}

.field-texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .09;
  background: center / cover no-repeat url("seismic-field.webp");
  mix-blend-mode: screen;
  filter: saturate(.65) contrast(1.25);
  transition: opacity .8s ease;
}

.scanline {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .23;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0, rgba(255,255,255,.014) 1px, transparent 1px, transparent 4px);
}

.mast {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--safe-top) + 50px);
  padding: var(--safe-top) 24px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  pointer-events: none;
}

.mast > * { pointer-events: auto; }

.back-link,
.plain-button,
.feed-status {
  margin: 0;
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  line-height: 1;
  text-transform: uppercase;
}

.back-link {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.feed-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 15px;
  color: var(--muted);
}

.feed-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--s);
  box-shadow: 0 0 12px var(--s);
}

.plain-button {
  justify-self: end;
  min-width: 64px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.intro {
  position: absolute;
  z-index: 10;
  left: clamp(24px, 6vw, 94px);
  top: 50%;
  width: min(800px, calc(100vw - 48px));
  transform: translateY(-48%);
  transition: opacity .55s ease, transform .65s cubic-bezier(.2,.75,.2,1), visibility .55s;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--acid);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(66px, 11.5vw, 174px);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .72;
  text-transform: uppercase;
  text-wrap: balance;
}

.intro h1 span { display: block; }

.intro h1 span:last-child {
  margin-left: clamp(0px, 7vw, 116px);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .62em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: 1;
  text-transform: none;
}

.dek {
  width: min(520px, 100%);
  margin: clamp(28px, 5vh, 60px) 0 26px;
  color: #dbe4de;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2.05vw, 29px);
  line-height: 1.25;
}

.enter-button {
  width: min(390px, 100%);
  min-height: 64px;
  padding: 0 20px 0 24px;
  border: 1px solid rgba(233,255,104,.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--acid);
  background: rgba(6,21,18,.5);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s;
}

.enter-button:hover { color: var(--ink); background: var(--acid); transform: translateY(-2px); }

.enter-button b {
  font-size: 23px;
  line-height: 1;
}

.source-line {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.instrument {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s .2s ease;
}

.instrument > * { pointer-events: auto; }

.app:not(.is-intro) .intro {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-45%) scale(.985);
  pointer-events: none;
}

.app:not(.is-intro) .field-texture { opacity: .035; }
.app:not(.is-intro) .instrument { opacity: 1; }

.panel {
  position: absolute;
  top: calc(var(--safe-top) + 68px);
  width: min(320px, calc(50vw - 42px));
  min-height: 124px;
  padding: 16px 18px;
  border: 1px solid rgba(181,236,220,.24);
  background: rgba(6,21,18,.82);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(15px);
}

.event-panel { left: 24px; }
.destination-panel { right: 24px; text-align: right; }

.panel label,
.panel-label {
  margin: 0;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .17em;
  line-height: 1.2;
  text-transform: uppercase;
}

.event-select-wrap {
  position: relative;
  margin: 5px -6px 7px;
}

.event-select-wrap select {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  padding: 4px 38px 4px 6px;
  border: 0;
  overflow: hidden;
  color: var(--paper);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
}

.event-select-wrap select option { color: #111; }

.event-select-wrap > span {
  position: absolute;
  z-index: 0;
  right: 10px;
  top: 14px;
  color: var(--acid);
}

.event-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: end;
}

.event-facts > strong {
  grid-row: 1 / 3;
  color: var(--acid);
  font-size: 30px;
  letter-spacing: -.05em;
  line-height: .95;
}

.event-facts p,
.event-facts small {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-facts p { font-size: 12px; font-weight: 800; }
.event-facts small { color: var(--muted); font-size: 10px; }

.destination-panel strong {
  margin: 13px 0 4px;
  display: block;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.destination-panel > p:not(.panel-label) {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.locate-button {
  min-height: 44px;
  margin: -2px -8px -8px 0;
  padding: 0 8px;
  border: 0;
  color: var(--acid);
  background: transparent;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.location-dot {
  width: 7px;
  height: 7px;
  margin-right: 5px;
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(233,255,104,.12);
}

.instruction {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(380px, calc(100vw - 48px));
  padding: 14px 18px;
  border: 1px solid rgba(233,255,104,.34);
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--ink);
  background: var(--acid);
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 60px rgba(0,0,0,.34);
  transition: opacity .3s, transform .3s, visibility .3s;
}

.instruction span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.instruction p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.25;
}

.instruction.is-gone {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -45%);
}

.readout {
  position: absolute;
  z-index: 9;
  left: 24px;
  right: 24px;
  bottom: calc(var(--safe-bottom) + 70px);
  display: grid;
  grid-template-columns: minmax(170px, 1.55fr) repeat(4, minmax(105px, 1fr));
  align-items: end;
  gap: 1px;
  pointer-events: none;
}

.time-now,
.arrival,
.distance,
.gap {
  min-height: 76px;
  padding: 12px 14px;
  border-top: 1px solid rgba(181,236,220,.25);
  background: linear-gradient(to top, rgba(6,21,18,.92), rgba(6,21,18,.5));
}

.time-now span,
.arrival span,
.distance span,
.gap span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.time-now strong {
  display: block;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: -.06em;
  line-height: .9;
}

.arrival { position: relative; }
.arrival i {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.arrival--p i { background: var(--p); box-shadow: 0 0 16px var(--p); }
.arrival--s i { background: var(--s); box-shadow: 0 0 16px var(--s); }

.arrival strong,
.distance strong,
.gap strong {
  display: block;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 19px;
}

.gap strong { color: var(--acid); }

.arrival em {
  position: absolute;
  right: 13px;
  bottom: 13px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.arrival.has-arrived em { color: var(--paper); }
.arrival.has-arrived { box-shadow: inset 0 -2px 0 var(--arrival-color); }
.arrival--p { --arrival-color: var(--p); }
.arrival--s { --arrival-color: var(--s); }

.model-summary {
  position: absolute;
  right: 0;
  bottom: 82px;
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.model-summary b { color: var(--paper); font-weight: 800; }
.model-summary em { color: var(--acid); font-style: normal; }

.timeline {
  position: absolute;
  z-index: 10;
  left: 24px;
  right: 24px;
  bottom: var(--safe-bottom);
  height: 58px;
  border-top: 1px solid rgba(181,236,220,.2);
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 15px;
  background: rgba(6,21,18,.82);
  backdrop-filter: blur(12px);
}

.play-button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(233,255,104,.5);
  border-radius: 50%;
  color: var(--acid);
  background: rgba(6,21,18,.72);
  cursor: pointer;
}

.play-button:disabled { opacity: .3; cursor: default; }
.play-button span { display: block; transform: translateX(1px); }

input[type="range"] {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--acid);
  cursor: ew-resize;
}

.timeline-scale { position: relative; }
.timeline-scale input { position: relative; z-index: 2; }

.timeline-stop {
  position: absolute;
  z-index: 1;
  top: 1px;
  left: var(--stop, 0%);
  min-width: 18px;
  padding-top: 1px;
  border-left: 1px solid currentColor;
  color: var(--paper);
  font-size: 8px;
  font-weight: 900;
  line-height: 12px;
  transform: translateX(-1px);
}

.timeline-stop--p { color: var(--p); }
.timeline-stop--s { color: var(--s); }

.timeline-key {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline-key span { white-space: nowrap; }
.arrival-flash {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: calc(var(--safe-top) + 86px);
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid currentColor;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--paper);
  background: rgba(6,21,18,.94);
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
}

.arrival-flash b {
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1;
}

.arrival-flash span {
  margin-top: 0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .25em;
}

.arrival-flash--p { color: var(--p); }
.arrival-flash--s { color: var(--s); }

.arrival-flash.is-striking { animation: strike .9s cubic-bezier(.2,.7,.2,1); }

@keyframes strike {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  18% { opacity: 1; transform: translate(-50%, 0); }
  76% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 6px); }
}

.about {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  padding: max(70px, calc(var(--safe-top) + 60px)) clamp(28px, 5vw, 70px) var(--safe-bottom);
  overflow-y: auto;
  color: var(--ink);
  background: var(--acid);
  box-shadow: -20px 0 90px rgba(0,0,0,.45);
}

.about .eyebrow { color: #425112; }

.about h2 {
  margin: 0 0 30px;
  font-size: clamp(42px, 6vw, 74px);
  letter-spacing: -.065em;
  line-height: .82;
  text-transform: uppercase;
}

.about > p:not(.eyebrow) {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.45;
}

.about dl {
  margin: 36px 0 0;
  border-top: 1px solid rgba(6,21,18,.35);
}

.about dl div {
  padding: 12px 0;
  border-bottom: 1px solid rgba(6,21,18,.25);
}

.about dt {
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.about dd { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 14px; }

.about-close {
  position: absolute;
  top: var(--safe-top);
  right: 18px;
  width: 48px;
  height: 48px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 34px;
  cursor: pointer;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

noscript {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--ink);
  background: var(--acid);
  font: 800 20px/1.3 Arial, sans-serif;
  text-align: center;
}

@media (max-width: 760px) {
  .app { min-height: 520px; }

  .mast {
    height: calc(var(--safe-top) + 46px);
    padding-inline: 16px;
    grid-template-columns: 1fr 1fr;
  }

  .feed-status { display: none; }

  .intro {
    left: 18px;
    top: 46%;
    width: calc(100vw - 36px);
  }

  .intro h1 {
    font-size: clamp(60px, 20.5vw, 106px);
    line-height: .75;
  }

  .intro h1 span:last-child { margin-left: 0; }

  .dek {
    width: 92%;
    margin-block: 27px 20px;
    font-size: 17px;
  }

  .enter-button { min-height: 58px; }

  .panel {
    top: calc(var(--safe-top) + 52px);
    min-height: 128px;
    width: calc(58% - 21px);
    padding: 12px;
  }

  .event-panel { left: 12px; }
  .destination-panel { right: 12px; width: calc(42% - 9px); }

  .event-facts > strong { font-size: 25px; }
  .event-facts p { max-width: 120px; white-space: normal; line-height: 1.05; }
  .destination-panel strong { margin-top: 10px; font-size: 13px; }
  .destination-panel > p:not(.panel-label) { display: block; font-size: 9px; line-height: 1.1; }
  .locate-button { font-size: 9px; }

  .instruction { top: 49%; }

  .readout {
    left: 12px;
    right: 12px;
    bottom: calc(var(--safe-bottom) + 64px);
    grid-template-columns: 1.25fr 1fr 1fr;
    row-gap: 1px;
  }

  .time-now,
  .arrival,
  .distance,
  .gap { min-height: 66px; padding: 9px; }

  .time-now { grid-row: 1; }
  .arrival--p { grid-row: 1; }
  .arrival--s { grid-row: 1; }
  .distance { grid-column: 1; grid-row: 2; min-height: 45px; }
  .gap { grid-column: 2; grid-row: 2; min-height: 45px; }
  .distance strong, .gap strong { margin-top: 5px; font-size: 14px; }
  .time-now strong { margin-top: 7px; font-size: 32px; }
  .arrival strong { margin-top: 10px; font-size: 15px; }
  .arrival i { top: 9px; right: 8px; }
  .arrival em { right: 8px; bottom: 8px; font-size: 7px; }

  .model-summary {
    position: static;
    grid-column: 3;
    grid-row: 2;
    min-height: 45px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    background: linear-gradient(to top, rgba(6,21,18,.92), rgba(6,21,18,.5));
    font-size: 6.5px;
    line-height: 1.15;
  }

  .timeline {
    left: 12px;
    right: 12px;
    height: 54px;
    grid-template-columns: 46px 1fr;
    gap: 8px;
  }

  .timeline-key { display: none; }

  .arrival-flash { top: calc(var(--safe-top) + 62px); }
}

@media (max-width: 420px) {
  .intro h1 { font-size: clamp(55px, 19.3vw, 82px); }
  .source-line { max-width: 90%; }
  .event-facts p { display: block; font-size: 8px; }
  .event-facts small { grid-column: 2; align-self: start; font-size: 7px; white-space: normal; }
  .panel { min-height: 128px; }
  .destination-panel strong { white-space: normal; line-height: 1.05; }
}

@media (max-height: 650px) and (min-width: 761px) {
  .intro { top: 49%; }
  .intro h1 { font-size: clamp(64px, 10.5vw, 118px); }
  .dek { margin-block: 22px 18px; font-size: 18px; }
  .panel { top: calc(var(--safe-top) + 45px); min-height: 104px; }
  .readout { bottom: calc(var(--safe-bottom) + 54px); }
  .time-now, .arrival, .gap { min-height: 62px; padding: 8px 12px; }
  .time-now strong { font-size: 34px; }
  .arrival strong, .gap strong { margin-top: 8px; }
  .timeline { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
