:root {
  color-scheme: dark;
  --ground: #020b0d;
  --panel: #061719;
  --panel-2: #092124;
  --ink: #f2faf7;
  --muted: #a9c7c1;
  --faint: #71958f;
  --line: #2a6863;
  --cyan: #58ead8;
  --yellow: #ffd45b;
  --error: #ff8e7d;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 20rem; background: var(--ground); }
body { min-height: 100svh; margin: 0; color: var(--muted); font-family: var(--sans); }
body::before {
  position: fixed; inset: 0; pointer-events: none; content: "";
  background:
    linear-gradient(rgb(88 234 216 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(88 234 216 / 0.045) 1px, transparent 1px),
    radial-gradient(circle at 8% 18%, rgb(88 234 216 / 0.12), transparent 35rem),
    radial-gradient(circle at 92% 70%, rgb(255 212 91 / 0.07), transparent 28rem);
  background-size: 4rem 4rem, 4rem 4rem, auto, auto;
}

a { color: inherit; }
button, input, summary { min-height: 3rem; font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--yellow); outline-offset: 3px;
}
.eyebrow { color: var(--cyan); font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.16em; }
.status { min-height: 1.5rem; color: var(--faint); font: 0.8rem/1.5 var(--mono); }

.arrival { display: grid; place-items: center; padding: 1rem; }
.arrival-grid { position: relative; width: min(72rem, 100%); display: grid; gap: 1rem; }
.copy, .artifact, .contract-grid article, .live-field {
  border: 1px solid var(--line); background: rgb(6 23 25 / 0.92);
}
.copy { padding: clamp(2rem, 8vw, 6rem) clamp(1rem, 7vw, 5rem); }
.copy h1, .hero h1 { max-width: 10ch; margin: 1rem 0; color: var(--ink); font-size: clamp(3rem, 12vw, 8rem); line-height: 0.86; letter-spacing: -0.075em; }
.lead { max-width: 36rem; font-size: clamp(1rem, 3vw, 1.35rem); line-height: 1.55; }
form { max-width: 32rem; margin-top: 3rem; }
label { display: block; margin-bottom: 0.5rem; color: var(--ink); font: 700 0.8rem/1.4 var(--mono); }
.field { display: grid; gap: 0.5rem; }
input { width: 100%; border: 1px solid var(--line); border-radius: 0.25rem; background: var(--ground); color: var(--ink); padding: 0.75rem; }
button { border: 1px solid var(--yellow); border-radius: 0.25rem; background: var(--yellow); color: #071112; padding: 0.75rem 1rem; font-weight: 800; }
.artifact { min-height: 28rem; padding: 1rem; display: grid; align-content: space-between; overflow: hidden; }
.artifact-top, .artifact-bottom { display: flex; justify-content: space-between; color: var(--faint); font: 0.7rem var(--mono); letter-spacing: 0.12em; }
.field-lines { display: grid; gap: 1rem; transform: rotate(-8deg) scale(1.1); }
.field-lines i { display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), var(--yellow), transparent); }
.absence { text-align: center; color: var(--ink); }
.absence span { display: block; color: var(--yellow); font-size: 8rem; line-height: 0.8; }
.absence small { font: 0.75rem var(--mono); letter-spacing: 0.1em; }

.masthead { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); background: rgb(2 11 13 / 0.94); backdrop-filter: blur(1rem); }
.masthead > a { color: var(--ink); font: 800 0.9rem var(--mono); letter-spacing: 0.08em; text-decoration: none; }
.masthead > a span { color: var(--faint); }
.masthead nav { display: flex; align-items: center; gap: 0.5rem; }
.masthead button { background: transparent; color: var(--muted); border-color: var(--line); }
.dashboard-shell { position: relative; width: min(80rem, 100%); margin: 0 auto; padding: clamp(3rem, 8vw, 7rem) 1rem; }
.hero { max-width: 58rem; }
.hero p:not(.eyebrow) { max-width: 44rem; font-size: clamp(1rem, 2.4vw, 1.4rem); line-height: 1.55; }
.contract-grid { display: grid; gap: 0.5rem; margin-block: 4rem; }
.contract-grid article { min-height: 11rem; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; }
.contract-grid span { color: var(--faint); font: 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.contract-grid strong { color: var(--cyan); font-size: clamp(2rem, 8vw, 4.5rem); line-height: 0.9; }
.contract-grid .zero strong { color: var(--yellow); }
.live-field { position: relative; min-height: 20rem; padding: clamp(1rem, 5vw, 3rem); display: grid; align-content: space-between; overflow: hidden; }
.live-field h2 { color: var(--ink); font-size: clamp(2rem, 7vw, 5rem); letter-spacing: -0.05em; }
.live-field time { color: var(--faint); font: 0.75rem var(--mono); }
.scan { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 45%, rgb(88 234 216 / 0.12), transparent 55%); animation: scan 7s ease-in-out infinite; }

.switcher { position: relative; }
.switcher summary { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: 0.25rem; padding: 0.75rem; color: var(--muted); list-style: none; font: 0.75rem var(--mono); }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary::after { content: "⌄"; color: var(--cyan); }
.switcher ul { position: absolute; top: calc(100% + 0.5rem); right: 0; width: min(18rem, calc(100vw - 2rem)); margin: 0; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.25rem; background: var(--panel); list-style: none; }
.switcher a { min-height: 3rem; display: flex; align-items: center; padding: 0.5rem; border-radius: 0.25rem; text-decoration: none; }
.switcher a:hover, .switcher a[aria-current="page"] { background: var(--panel-2); color: var(--ink); }
.switcher .group { padding: 0.5rem; color: var(--faint); font: 0.65rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }

@keyframes scan { 0%, 15% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

@media (min-width: 48rem) {
  .arrival-grid { grid-template-columns: 1.2fr 0.8fr; }
  .contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field { grid-template-columns: 1fr auto; }
}

@media (min-width: 72rem) { .contract-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (max-width: 36rem) {
  .masthead { align-items: stretch; flex-direction: column; }
  .masthead nav { display: grid; grid-template-columns: 1fr auto; }
  .switcher, .switcher summary { width: 100%; }
  .switcher ul { left: 0; right: auto; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
