:root {
  color-scheme: dark;
  --night: #030b1c;
  --ink: #f3f7ff;
  --soft: #c4d2e8;
  --muted: #a1b5cf;
  --rule: #26364c;
  font: 100%/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--night);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  /* Clip the expanding wave to the page without adding scrollable space. */
  contain: paint;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 79% 43%, #0b1e39, transparent 56%);
}
.frame { width: min(76rem, 88%); margin-inline: auto; }
header, footer, nav { display: flex; align-items: center; }
header, footer { justify-content: space-between; gap: 1rem; }
header { padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.legacy-logo { width: 7.5rem; height: auto; }
nav { border: 1px solid var(--rule); border-radius: 2rem; padding: 3px; }
nav a {
  min-width: 2.8rem;
  padding: .45rem .65rem;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font: 600 .875rem/1.35 ui-monospace, monospace;
  border-radius: 2rem;
}
nav [aria-current] { color: var(--ink); background: #20324b; }
a { color: inherit; text-underline-offset: .25em; }
a:hover, button:hover { color: #8fd8ff; }
:focus-visible { outline: 3px solid #8fd8ff; outline-offset: 4px; }
main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3rem, 9vh, 8rem);
}
h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 2.3rem);
  font-weight: 450;
  letter-spacing: -.035em;
  line-height: 1.25;
}
.wordmark { display: block; margin-top: .55em; width: min(100%, 32rem); height: auto; }
.intro { max-width: 47ch; margin: 1.7rem 0 2rem; color: var(--soft); font-size: clamp(1rem, .9rem + .45vw, 1.25rem); }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: .85rem 1.25rem;
  border-radius: .55rem;
  background: #2563eb;
  color: white;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}
.primary:hover { background: #5b8cff; color: var(--night); }
.primary span { font-size: 1.4em; line-height: 1; }
.handoff { min-height: 2.75rem; margin-top: .85rem; color: var(--muted); font-size: .875rem; }
#countdown { display: flex; gap: 0 1rem; align-items: center; flex-wrap: wrap; }
#seconds { font-variant-numeric: tabular-nums; }
button {
  min-height: 2.75rem;
  padding: .25rem 0;
  background: none;
  border: 0;
  font: inherit;
  color: var(--soft);
  text-decoration: underline;
  text-underline-offset: .22em;
  cursor: pointer;
}
#paused { margin: 0; padding-block: .65rem; }
.figure {
  --lock-time: 5.4s;
  --flash-travel: .76s;
  --echo-start: calc(var(--lock-time) + .18s);
  --idle-start: calc(var(--echo-start) + var(--flash-travel));
  position: relative;
  aspect-ratio: 1;
}
.board, .puzzle, .lock-wave, .ripples { position: absolute; inset: 0; width: 100%; height: 100%; }
.board {
  background-image: radial-gradient(#385778 1px, transparent 1px);
  background-size: 1.15rem 1.15rem;
  mask-image: radial-gradient(circle, black 55%, transparent 74%);
}
.orbit, .orbit::before, .orbit::after { position: absolute; border: 1px solid #304966; border-radius: 50%; }
.orbit { inset: 12%; }
.orbit::before { content: ""; inset: -13%; border-color: #243a54; }
.orbit::after { content: ""; inset: 11%; border-style: dashed; border-color: #273f5b; }
.ripples circle {
  fill: none;
  stroke: #8fd8ff;
  stroke-width: 1.35px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}
.piece { transform-box: fill-box; transform-origin: center; }
.upper {
  --drift-time: 6.4s;
  --drift-out: translate(-.225px, -.475px) rotate(-1.2deg);
  --drift-back: translate(.25px, -.1px) rotate(.5deg);
  --apart: translate(-13px, -12px) rotate(-112deg);
  --misfit: translate(-4px, -3px) rotate(-82deg);
  --retry: translate(11px, -11px) rotate(143deg);
  --near: translate(3px, -4px) rotate(51deg);
  --lined-up: translate(2px, -4px) rotate(0deg);
}
.amber {
  --drift-time: 7.6s;
  --drift-out: translate(-.575px, .225px) rotate(1.5deg);
  --drift-back: translate(-.15px, -.225px) rotate(-.8deg);
  --apart: translate(-15px, 8px) rotate(165deg);
  --misfit: translate(-5px, 2px) rotate(107deg);
  --retry: translate(18px, 3px) rotate(-121deg);
  --near: translate(3px, 1px) rotate(-68deg);
  --lined-up: translate(-4px, 1px) rotate(0deg);
}
.lower {
  --drift-time: 8.4s;
  --drift-out: translate(.35px, .475px) rotate(.9deg);
  --drift-back: translate(-.075px, .175px) rotate(-.6deg);
  --apart: translate(16px, -2px) rotate(-140deg);
  --misfit: translate(5px, 3px) rotate(-105deg);
  --retry: translate(-13px, 13px) rotate(116deg);
  --near: translate(-3px, 4px) rotate(44deg);
  --lined-up: translate(3px, 4px) rotate(0deg);
}
.route { opacity: 0; fill: none; stroke: #8fd8ff; stroke-width: .55; stroke-linecap: round; stroke-dasharray: 1 1; }
.solution { stroke: #ffb84d; stroke-width: .75; }
.lock-wave { overflow: visible; pointer-events: none; z-index: 1; }
.lock-wave circle { opacity: 0; fill: none; stroke: #fff1cb; stroke-width: clamp(4.5px, .45vw, 7px); }
.lock-wave .echo { stroke: #ffbc55; stroke-width: clamp(3.5px, .35vw, 5.5px); }

@media (prefers-reduced-motion: no-preference) {
  .piece {
    animation: fit-pieces var(--lock-time) cubic-bezier(.42, 0, .2, 1) both,
               facet-drift var(--drift-time) ease-in-out var(--idle-start) infinite;
  }
  .trial { animation: trace-route 1.1s .7s ease-out both; }
  .alternative { animation: trace-route 1.2s 2.2s ease-out both; }
  .solution { animation: trace-route 1.35s 3.95s ease-out both; }
  .puzzle { animation: mark-sway 20s ease-in-out var(--lock-time) infinite; }
  .orbit {
    animation: ring-pulse 16s ease-in-out, fade-guides .7s ease-out var(--idle-start) forwards;
  }
  .lock-wave circle { animation: flash-ring var(--flash-travel) linear var(--lock-time) both; }
  .lock-wave .echo { animation-delay: var(--echo-start); }
  .ripples circle { animation: radiate 9.6s linear var(--idle-start) infinite; }
  .ripples circle:nth-child(2) { animation-delay: calc(var(--idle-start) + 3.2s); }
  .ripples circle:nth-child(3) { animation-delay: calc(var(--idle-start) + 6.4s); }
}
@keyframes fit-pieces {
  0%, 4%, 100% { transform: translate(0, 0) rotate(0deg); }
  19%, 23% { transform: var(--apart); }
  32%, 37% { transform: var(--misfit); }
  51%, 55% { transform: var(--retry); }
  65%, 70% { transform: var(--near); }
  86%, 91% { transform: var(--lined-up); }
}
@keyframes facet-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  32% { transform: var(--drift-out); }
  75% { transform: var(--drift-back); }
}
@keyframes fade-guides { to { opacity: 0; } }
@keyframes radiate {
  from { r: 7px; opacity: 0; }
  24% { opacity: .62; }
  58% { opacity: .4; }
  to { r: 51px; opacity: 0; }
}
@keyframes trace-route {
  0% { stroke-dashoffset: 1; opacity: 0; }
  15% { opacity: .85; }
  65%, 80% { stroke-dashoffset: 0; opacity: .85; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
/* This SVG has no viewBox: its origin follows the logo and its radius uses viewport units. */
@keyframes flash-ring {
  from { r: 0; opacity: .95; }
  80% { opacity: .75; }
  to { r: 150vmax; opacity: 0; }
}
@keyframes mark-sway {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(2.5deg); }
  75% { transform: rotate(-2.5deg); }
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(.99); opacity: .76; }
  50% { transform: scale(1.015); opacity: 1; }
}
footer { padding-block: 1.35rem; border-top: 1px solid var(--rule); color: var(--muted); }
footer small { font-size: .8125rem; }
footer small span { white-space: nowrap; }
footer a { font-size: .9375rem; color: var(--soft); }
@media (max-width: 45rem) {
  header { padding-block: 1rem; }
  .legacy-logo { width: 6rem; }
  main { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 1.5rem; padding-block: 2rem; }
  .message { max-width: 32rem; }
  .figure { grid-row: 1; width: clamp(8rem, 36vw, 11rem); margin-left: -.6rem; }
  .orbit { inset: 6%; }
  .intro { margin-block: 1.35rem 1.55rem; }
  footer { flex-wrap: wrap; gap: .35rem 1.25rem; }
}
@media (max-width: 45rem) and (max-height: 43rem) {
  main { gap: .65rem; padding-block: 1rem; }
  .figure { width: 6rem; }
  .intro { margin-block: .85rem 1rem; }
  .handoff { margin-top: .5rem; }
}
@media (forced-colors: active) {
  .primary, nav [aria-current] { border: 1px solid ButtonText; }
  .figure { display: none; }
  .wordmark, .legacy-logo { background: #030b1c; forced-color-adjust: none; }
}
