@font-face {
  font-family: Barlow;
  src: url('/assets/fonts/barlow-condensed.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: Space;
  src: url('/assets/fonts/space-grotesk.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url('/assets/fonts/ibm-plex-mono.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #0b0810;
  --panel: #1a1023;
  --white: #fbefef;
  --muted: #c0acc4;
  --pink: #ff85b4;
  --acid: #e1fb79;
  --line: #624361;
  --mono: Plex, monospace;
  --display: Barlow, Impact, 'Arial Narrow', sans-serif;
  font-family: Space, system-ui, sans-serif;
  background: var(--ink);
  color: var(--white);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow: clip; overscroll-behavior: none; }
body {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:
    radial-gradient(ellipse at 67% 32%, #54254065, transparent 64%),
    radial-gradient(#f9a0e431 .65px, transparent .85px) 0 0 / 8px 8px;
}
h1, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.wrap { width: min(calc(100% - clamp(24px, 7vw, 116px)), 1440px); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 4; padding: .5rem; color: var(--ink); background: var(--acid); transform: translateY(-150%); }
.skip:focus { transform: none; }

.mast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: clamp(7px, 1.5dvh, 16px);
  gap: .8rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; justify-self: start; font-weight: 700; font-size: clamp(.95rem, 2vw, 1.35rem); text-decoration: none; }
.brand-accent { color: var(--pink); }
.sigil {
  display: inline-block;
  flex: none;
  width: 1.4em;
  height: 1.4em;
  vertical-align: middle;
  background: currentColor;
  clip-path: polygon(50% 0%, 58% 35%, 86% 14%, 68% 42%, 100% 50%, 68% 58%, 86% 86%, 58% 65%, 50% 100%, 42% 65%, 14% 86%, 32% 58%, 0 50%, 32% 42%, 14% 14%, 42% 35%);
}
.brand .sigil { color: var(--acid); }
.source-link, .mast-dm {
  white-space: nowrap;
  font: 500 clamp(.65rem, 1.5vw, .78rem)/1 var(--mono);
  text-decoration: none;
  text-transform: uppercase;
}
.source-link { color: var(--muted); }
.source-link:hover { color: var(--acid); text-decoration: underline; text-underline-offset: .25em; }
.mast-dm { justify-self: end; padding: .67rem .85rem; color: var(--ink); background: var(--pink); box-shadow: 2px 2px #9a4271; }
.mast-dm:hover { background: #ffc0d6; }

.cabinet {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(260px, .82fr);
  grid-template-areas: 'screen console';
  gap: clamp(18px, 4vw, 74px);
  padding-block: clamp(7px, 2dvh, 24px);
  min-height: 0;
}
.scanner {
  grid-area: screen;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  background: #160e20;
  box-shadow: inset 0 0 0 3px #38203b, 6px 6px #301725;
  outline-offset: 3px;
}
.scanner-top {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: clamp(.36rem, 1.2dvh, .75rem) .75rem;
  font: 500 clamp(.61rem, 1.5vw, .8rem)/1 var(--mono);
  letter-spacing: .1em;
  color: var(--pink);
}
.scanner-top > span:first-child { display: inline-flex; gap: .6em; align-items: center; }
.scanner-top > span:last-child { color: var(--acid); white-space: nowrap; }
.live-dot { display: inline-block; flex: none; width: .58em; height: .58em; vertical-align: .1em; background: currentColor; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.scanner-well {
  display: grid;
  place-items: center;
  container-type: size;
  min-height: 0;
  background: repeating-linear-gradient(0deg, #08050c 0 3px, #120a19 4px 5px);
  border: 1px solid #44304b;
}
.scanner-screen {
  width: 100cqw;
  height: 100cqh;
  container-type: size;
  position: relative;
  background: radial-gradient(ellipse at 50% 54%, #48223f, #1b0d29 70%, #110917 100%);
}
.scanner-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid #8a4f7955;
  box-shadow: inset 0 0 30px #12091599;
}
.rings, canvas, .blips { position: absolute; inset: 0; width: 100%; height: 100%; }
.rings {
  background: repeating-radial-gradient(circle at center, transparent 0 12%, #e082bd34 12.2% 12.5%, transparent 12.8% 16%);
}
.rings.is-painted { opacity: .3; }
canvas { pointer-events: none; }
.blip {
  --cell: calc(100cqmin / var(--grid-size));
  --blip-color: var(--pink);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--cell) * .84);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.blip--original, .blip--host { --blip-color: var(--acid); }
.blip--original { width: calc(var(--cell) * .91); }
.blip:focus-within, .blip:hover { z-index: 2; }
.blip-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--blip-color);
  border-radius: 7%;
  background: var(--ink);
  box-shadow: 0 0 13px color-mix(in srgb, var(--blip-color), transparent 79%);
  overflow: hidden;
  text-decoration: none;
}
.blip-link img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blip--original .blip-link {
  border: 2px solid var(--acid);
  outline: 1px solid #e1fb7960;
  outline-offset: 3px;
  border-radius: 50%;
}
.blip-link[aria-current="true"], .blip-link:hover, .blip-link:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.blip-link[aria-current="true"]::after {
  content: '';
  position: absolute;
  right: 6%;
  top: 7%;
  width: clamp(5px, 1.6cqmin, 11px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid);
}
.blip--original .blip-link::after { right: 18%; top: 14%; }
.blip--new .blip-link {
  border-color: var(--acid);
  box-shadow: -2px 0 var(--pink), 2px 0 var(--acid), 0 0 18px #fd72bf6b;
}
.tile-handle, .blip-label {
  position: absolute;
  left: 0;
  right: 0;
  padding: .32em .12em;
  text-align: center;
  color: var(--white);
  background: #100b18f0;
  font: 500 clamp(.48rem, 2.55cqmin, .8rem)/1.1 var(--mono);
  overflow-wrap: anywhere;
}
.tile-handle { bottom: 0; }
.blip--original .tile-handle { bottom: 7%; }
.blip-label {
  top: 0;
  right: auto;
  color: var(--ink);
  background: var(--acid);
  padding: .32em .42em;
  font-size: clamp(.4rem, 1.9cqmin, .69rem);
}
.blip--original .blip-label { left: 20%; right: 20%; top: 10%; }
.blip--new .blip-label { background: var(--pink); }

.console {
  grid-area: console;
  align-self: center;
  display: grid;
  gap: clamp(.5rem, 4dvh, 3rem);
  min-width: 0;
}
h1 {
  font: 900 clamp(3.25rem, min(9.8vw, 16dvh), 10.5rem)/.81 var(--display);
  letter-spacing: -.044em;
  color: var(--acid);
}
h1 span { display: block; }
h1 span:last-child { color: var(--pink); text-shadow: .035em .035em #682a53; }
.hero-description { margin-top: clamp(.35rem, 2.1dvh, 1.35rem); font-size: clamp(.9rem, 1.8vw, 1.42rem); font-weight: 700; }
.console-controls { width: min(100%, 430px); }
.arrival:not([hidden]) { display: flex; }
.arrival {
  gap: .6em;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: .45em .68em;
  color: var(--pink);
  border: 1px solid #9a597f;
  border-bottom: 0;
  background: #321829;
  font: 500 clamp(.62rem, 1.45vw, .78rem)/1.15 var(--mono);
  text-decoration: none;
  cursor: pointer;
}
.arrival:hover, .arrival:focus-visible { background: #58264a; }
.arrival b { color: var(--white); font-weight: 500; }
.scanner-readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .37rem;
  padding-left: .65rem;
  background: #1b1027;
  border: 1px solid var(--line);
  box-shadow: inset 0 -2px #2c1530;
}
.readout-person { display: flex; align-items: baseline; flex-wrap: wrap; gap: .16rem .6rem; min-width: 0; font: 500 clamp(.68rem, 1.45vw, .9rem)/1.12 var(--mono); }
#readout-role { color: var(--acid); text-transform: uppercase; font-size: .86em; letter-spacing: .06em; }
#readout-handle { overflow-wrap: anywhere; text-underline-offset: .2em; text-decoration-color: #ce8fb4; }
#readout-handle:hover { color: var(--pink); }
.seek-button:not([hidden]) { display: inline-flex; }
.seek-button {
  align-items: center;
  gap: .45rem;
  flex: none;
  min-height: 40px;
  padding: .38rem .73rem;
  border: 1px solid var(--acid);
  border-radius: 999px;
  color: var(--acid);
  background: #2b3023;
  box-shadow: 0 2px 0 var(--acid);
  font: 500 .71rem/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
}
.seek-button::before { content: ''; width: .45rem; aspect-ratio: 1; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.seek-button:hover { border-color: var(--pink); box-shadow: 0 2px 0 var(--pink); }
.closing {
  display: grid;
  place-items: center;
  padding-block: clamp(.34rem, 1.5dvh, .9rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 clamp(.66rem, 1.5vw, .8rem)/1.2 var(--mono);
  text-align: center;
}
.closing a { color: var(--white); text-underline-offset: .2em; }
.closing a:hover { color: var(--pink); }

@media (prefers-reduced-motion: no-preference) {
  .scanner-screen.is-seeking .blip-link[aria-current="true"] img { animation: lock-on 160ms steps(2, end); }
  @keyframes lock-on {
    25% { transform: translateX(3px); }
    55% { transform: translateX(-3px); }
    84% { transform: translateX(1px); }
  }
}
@media (max-width: 767px) and (orientation: portrait) {
  .cabinet {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: 'heading' 'screen' 'controls';
    gap: clamp(.35rem, 1.5dvh, 1rem);
  }
  .console { display: contents; }
  .console-heading { grid-area: heading; }
  .console-controls { grid-area: controls; width: 100%; }
  h1 { font-size: clamp(2.25rem, 12vw, 5.5rem); }
  h1 span { display: inline-block; }
  .hero-description { margin-top: .3rem; }
}
@media (max-width: 480px) {
  .mast { gap: .45rem; }
  .mast-dm { padding-inline: .52rem; }
  .brand { gap: .33rem; }
  .scanner { box-shadow: inset 0 0 0 3px #38203b, 3px 3px #301725; }
  .source-link { font-size: .61rem; }
}
@media (max-height: 440px) and (orientation: landscape) {
  .cabinet { grid-template-columns: minmax(0, 1fr) minmax(145px, .78fr); gap: clamp(.5rem, 3vw, 1.5rem); }
  .console { gap: .5rem; }
  h1 { font-size: clamp(1.9rem, min(10vw, 17dvh), 4rem); }
  .hero-description { font-size: .78rem; margin-top: .3rem; }
  .seek-button { min-height: 34px; }
}
