[hidden] {
  display: none !important;
}

.hero-link,
.teaser-nav a {
  color: var(--text);
  text-decoration: none;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-block-size: 2.75rem;
  margin-block-start: 1.4rem;
  border-block-end: 1px solid var(--rule);
  font-size: .9rem;
  font-weight: 620;
}

.hero-link span {
  color: var(--blue);
  font-size: 1.12em;
}

.teaser-nav a:hover,
.hero-link:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.teasers a:focus-visible,
.teasers button:focus-visible,
.hero-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}

.teasers {
  margin-block-end: clamp(3.5rem, 8vw, 8rem);
}

.teaser-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem clamp(1.15rem, 4vw, 3.5rem);
  border-block: 1px solid var(--rule);
}

.teaser-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 3.5rem;
  padding-inline: .14rem;
  font-size: .78rem;
  font-weight: 670;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.teaser {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(1.65rem, 5vw, 6.5rem);
  padding-block: clamp(2.8rem, 7vw, 7.25rem);
  border-block-end: 1px solid var(--rule);
  scroll-margin-block-start: .75rem;
}

.teaser-copy h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 6.6vw, 6.15rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.03em;
}

.teaser-copy p,
.choose-brief,
.static-result {
  max-inline-size: 42ch;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.62;
}

.teaser-copy .teaser-lead {
  margin-block-end: .55rem;
  color: var(--text);
  font-size: clamp(1.07rem, 1.8vw, 1.35rem);
  font-weight: 570;
  line-height: 1.28;
  text-wrap: balance;
}

.instrument {
  min-inline-size: 0;
  border: 1px solid #34445f;
  background: #0c121d;
}

.instrument-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1rem;
  padding: .85rem clamp(.8rem, 2.5vw, 1.5rem);
  border-block-end: 1px solid var(--rule);
  color: var(--blue);
  font: 600 .66rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.instrument-header span:last-child,
.scan-feedback {
  color: var(--muted);
}

.scan-status {
  display: grid;
}

.scan-status::after {
  content: attr(data-discovery);
  visibility: hidden;
}

.scan-status::after,
.scan-feedback {
  grid-area: 1 / 1;
}

.star-chart {
  overflow: hidden;
  aspect-ratio: 640 / 500;
  background: radial-gradient(ellipse at 55% 40%, #142134, #090f1b 76%);
}

.star-chart svg {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.scan-reticle {
  stroke: #465970;
  opacity: .64;
}

.scan-field {
  fill: #a7b4c8;
  opacity: .56;
}

.scan-original,
.scan-discovery {
  color: var(--text);
  fill: currentColor;
}

.scan-original path,
.scan-discovery path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.scan-original {
  opacity: .48;
}

.scan-instrument[data-state="ready"] .scan-original {
  opacity: .76;
}

.scan-instrument[data-state="scanning"] .scan-original {
  opacity: 1;
}

.scan-signal {
  stroke: var(--blue);
}

.scan-instrument:is([data-state="discovered"], [data-state="revealed"]) .scan-signal {
  opacity: .55;
}

.scan-instrument[data-state="ready"] .scan-discovery,
.scan-instrument[data-state="scanning"] .scan-discovery :is(path, circle) {
  opacity: 0;
}

.scan-sweep {
  opacity: 0;
}

.scan-sweep path {
  stroke: var(--blue);
  stroke-opacity: .65;
}

@media (prefers-reduced-motion: no-preference) {
  .scan-instrument[data-state="scanning"] .scan-sweep {
    animation: chart-sweep 700ms ease-in-out both;
  }

  .scan-instrument[data-state="scanning"] .scan-original {
    animation: chart-focus 370ms ease-out both;
  }

  .scan-instrument[data-state="scanning"] .scan-discovery circle {
    animation: chart-light-point 55ms ease-out var(--point-delay) both;
  }

  .scan-discovery circle:nth-of-type(1) { --point-delay: 370ms; }
  .scan-discovery circle:nth-of-type(2) { --point-delay: 430ms; }
  .scan-discovery circle:nth-of-type(3) { --point-delay: 490ms; }
  .scan-discovery circle:nth-of-type(4) { --point-delay: 550ms; }
  .scan-discovery circle:nth-of-type(5) { --point-delay: 610ms; }

  .scan-instrument[data-state="discovered"] .scan-discovery path {
    animation: chart-draw 210ms ease-out both;
  }

  @keyframes chart-sweep {
    0% { opacity: 0; transform: translateX(0); }
    12%, 82% { opacity: 1; }
    100% { opacity: 0; transform: translateX(730px); }
  }

  @keyframes chart-focus {
    from { opacity: .76; }
    to { opacity: 1; }
  }

  @keyframes chart-light-point {
    to { opacity: 1; }
  }

  @keyframes chart-draw {
    from { stroke-dasharray: 1; stroke-dashoffset: 1; }
    to { stroke-dasharray: 1; stroke-dashoffset: 0; }
  }
}

.instrument-with-replay {
  position: relative;
}

.instrument-with-replay > .instrument-header {
  min-block-size: 3.5rem;
  padding-block: .4rem;
  padding-inline-end: 3.6rem;
}

.replay-icon {
  position: absolute;
  inset-block-start: .35rem;
  inset-inline-end: .4rem;
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: .25rem;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.replay-icon:hover,
.replay-icon:focus-visible {
  border-color: #667c9c;
  background: #172337;
}

.replay-icon svg {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}

.scan-stage,
.choice-readout {
  display: grid;
}

.scan-stage > *,
.choice-readout > * {
  grid-area: 1 / 1;
}

.scan-instrument[data-state="revealed"] .scan-controls,
.scan-instrument:not([data-state="revealed"]) .scan-result,
.choose-instrument[data-choice] .choose-brief,
.choose-instrument:not([data-choice="cutter"]) [data-outcome="cutter"],
.choose-instrument:not([data-choice="custodian"]) [data-outcome="custodian"] {
  visibility: hidden;
}

.scan-result {
  display: grid;
  align-content: center;
  padding: .9rem clamp(.8rem, 2.5vw, 1.5rem);
  border-block-start: 1px solid var(--rule);
}

.scan-result-title {
  margin: 0 0 .3rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
}

.scan-result-title:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.scan-result-copy p {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.55;
}

.instrument-action,
.choice-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .9rem clamp(.8rem, 2.5vw, 1.5rem);
  border-block-start: 1px solid var(--rule);
}

.instrument-feedback,
.survey-instructions {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.55;
}

.instrument-feedback {
  flex: 1 1 14rem;
}

.teaser-button {
  min-block-size: 2.75rem;
  padding: .54rem .85rem;
  border: 1px solid #8aade3;
  border-radius: .18rem;
  background: #253b59;
  color: #eef5ff;
  font: 600 .81rem/1.35 var(--font-text);
  text-align: start;
  cursor: pointer;
}

.teaser-button:hover:not([aria-disabled="true"]) {
  background: #364f72;
  border-color: #bad6ff;
}

.teaser-button[aria-pressed="true"] {
  background: #324f74;
}

.teaser-button[aria-disabled="true"] {
  opacity: .74;
  cursor: default;
}

.secondary-button {
  border-color: #667c9c;
  background: transparent;
}

.choose-brief {
  max-inline-size: none;
  padding: clamp(1rem, 3vw, 1.85rem) clamp(.8rem, 2.5vw, 1.5rem);
  background: linear-gradient(120deg, #142135, #0c121d);
}

.choice-actions {
  align-items: stretch;
}

.choice-actions button {
  flex: 1 1 9.5rem;
}

.choose-receipt {
  align-content: center;
  padding: clamp(1rem, 3vw, 1.85rem) clamp(.8rem, 2.5vw, 1.5rem);
  color: var(--text);
  background: #172337;
  font-size: .95rem;
  line-height: 1.62;
}

.choose-feedback {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.survey-instructions,
.static-result {
  padding: .85rem clamp(.8rem, 2.5vw, 1.5rem);
}

.survey-scene {
  --light-x: 54%;
  --light-y: 49%;
  position: relative;
  isolation: isolate;
  min-block-size: clamp(12.5rem, 27vw, 19rem);
  overflow: hidden;
  background: #10192b;
  touch-action: pan-y;
}

.survey-art,
.survey-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.survey-art {
  overflow: hidden;
  background: radial-gradient(ellipse at 46% 42%, #527091, #19293f 67%, #0b111a);
}

.survey-art img {
  position: absolute;
  inset: -77% auto auto 5%;
  inline-size: 85%;
  block-size: auto;
  opacity: .46;
  transform: rotate(-11deg);
}

.survey-ridge {
  position: absolute;
  inset: 36% -4% -15%;
  background:
    repeating-linear-gradient(164deg, #b4c5da23 0 1px, transparent 1px 12px),
    linear-gradient(165deg, #788fa9, #324a65 54%, #15283c 76%, #0e1c2b);
  clip-path: polygon(0 66%, 11% 60%, 21% 42%, 35% 42%, 42% 23%, 49% 29%, 59% 52%, 71% 50%, 84% 69%, 94% 64%, 100% 73%, 100% 100%, 0 100%);
}

.survey-structure,
.survey-marker {
  position: absolute;
}

.survey-structure.ribs {
  inset: 28% auto auto 23%;
  inline-size: 16%;
  block-size: 33%;
  transform: skewX(-13deg);
  border: 2px solid #b2c9e3;
  border-block-end-width: 4px;
  background:
    repeating-linear-gradient(90deg, #ebf4fd66 0 2px, #28446244 2px 17%),
    linear-gradient(165deg, transparent 45%, #b3cae3 47% 51%, transparent 53%);
  clip-path: polygon(15% 13%, 100% 0, 78% 100%, 0 100%);
}

.survey-structure.beacon {
  inset: 35% auto auto 57%;
  block-size: 25%;
  inline-size: 3px;
  background: #a6bedb;
}

.survey-structure.beacon::before,
.survey-structure.beacon::after {
  position: absolute;
  content: "";
  inset: -.25rem auto auto -.2rem;
  inline-size: .6rem;
  block-size: .6rem;
  border-radius: 50%;
  background: #eaf7ff;
  box-shadow: 0 0 1.4rem .45rem #b9e5ff70;
}

.survey-structure.beacon::after {
  inset: 86% auto auto -1.1rem;
  inline-size: 2.35rem;
  block-size: .2rem;
  background: #c0d1e6;
  box-shadow: none;
}

.survey-structure.trail {
  inset: 63% auto auto 60%;
  inline-size: 33%;
  block-size: 26%;
  transform: rotate(18deg);
  background: repeating-linear-gradient(90deg, #b5cae98a 0 6%, transparent 6% 17%);
  clip-path: polygon(0 30%, 100% 65%, 100% 86%, 0 51%);
}

.explore-instrument[data-enhanced] .survey-shade {
  background: radial-gradient(circle clamp(3.2rem, 9vw, 7rem) at var(--light-x) var(--light-y),
    transparent 23%, #07090f82 68%, #07090fef 100%);
}

.explore-instrument[data-revealed="true"] .survey-shade {
  display: none;
}

.survey-marker {
  display: grid;
  place-content: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 1px solid #92b5e5;
  border-radius: 50%;
  background: #0c1526;
  color: #e4f2fe;
  font: 650 .82rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  cursor: pointer;
}

.survey-marker:hover,
.survey-marker[aria-pressed="true"] {
  background: #304b71;
}

.survey-marker[data-feature="ribs"] {
  inset: 43% auto auto 25%;
}

.survey-marker[data-feature="beacon"] {
  inset: 25% auto auto 54%;
}

.survey-marker[data-feature="trail"] {
  inset: 67% auto auto 74%;
}

.survey-feedback:empty {
  flex-basis: 0;
}

.survey-reveal[aria-pressed="true"] {
  background: #142236;
}

@media (max-width: 47rem) {
  .teaser {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-link {
    margin-block-start: .9rem;
  }
}

@media (forced-colors: active) {
  .survey-shade {
    display: none;
  }
}
