/* style: nc3. The Blackwall board, Night City: red, teal and yellow on black, like the hub's
   own panel. It opens and it is there: the page fits the screen and never scrolls. In front,
   five status panels, each with the Wall panel's segmented loading bar; behind, three columns
   of what the board's agents gathered (left up, middle down at the same pace, right up a
   little faster). Every motion stops under prefers-reduced-motion, and nothing is fetched
   from anywhere but this site. */

@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/rajdhani-500.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/rajdhani-600.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/rajdhani-700.woff2") format("woff2"); }

:root {
  --bg: #050507; --bg-2: #0d0d12; --bg-3: #15151d;
  --line: #2b2b38; --line-2: #3d3d4f;
  --text: #ecebe4; --muted: #a0a3b1; --off: #6f7386;
  --yellow: #fcee0a; --yellow-dim: rgba(252, 238, 10, .14);
  --teal: #37ebf3; --teal-dim: rgba(55, 235, 243, .14);
  --red: #ff003c; --red-dim: rgba(255, 0, 60, .16);
  --c: 14px;
  --font: "Rajdhani", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 500 1.05rem/1.45 var(--font); color: var(--text);
  background:
    radial-gradient(900px 380px at 50% 0, rgba(252, 238, 10, .07), transparent 70%) no-repeat,
    url("/traces.svg") 0 0 / 360px 360px repeat,
    var(--bg);
  padding: 0 16px;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 10;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}
a { color: var(--teal); }
a:hover, a:focus-visible { color: var(--yellow); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

main, .mast, .foot { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; }

/* The masthead: the wordmark, and the Wall's badge. */
.mast { padding: 16px 0 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wordmark {
  position: relative; display: inline-block;
  font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 700; letter-spacing: .18em; line-height: 1;
  color: var(--yellow); text-decoration: none; text-shadow: 0 0 18px var(--yellow-dim);
}
.wordmark:hover, .wordmark:focus-visible { color: var(--yellow); }
.wordmark::before, .wordmark::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: .75; }
.wordmark::before { color: var(--teal); clip-path: inset(0 0 62% 0); animation: glitch-a 4.2s steps(1) infinite; }
.wordmark::after { color: var(--red); clip-path: inset(58% 0 0 0); animation: glitch-b 5.3s steps(1) infinite; }
@keyframes glitch-a { 0%, 88%, 100% { transform: none; opacity: 0; } 89% { transform: translate(-3px, -1px); opacity: .8; } 92% { transform: translate(2px, 0); opacity: .8; } 95% { transform: none; opacity: 0; } }
@keyframes glitch-b { 0%, 91%, 100% { transform: none; opacity: 0; } 92% { transform: translate(3px, 1px); opacity: .8; } 96% { transform: translate(-2px, 0); opacity: .8; } 98% { transform: none; opacity: 0; } }
.tag { margin: 0; color: var(--teal); font-weight: 700; letter-spacing: .2em; font-size: .85rem; }

.badge {
  margin: 0; padding: 5px 12px; font-weight: 700; letter-spacing: .18em; font-size: .8rem; line-height: 1.3;
  border: 1px solid var(--line-2); background: rgba(13, 13, 18, .85); color: var(--muted);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.badge .since { display: block; font: 500 .68rem var(--mono); letter-spacing: .02em; opacity: .85; }
.badge-down { color: var(--teal); border-color: rgba(55, 235, 243, .5); }
.badge-up { color: #fff; background: var(--red); border-color: var(--red); animation: crackle 2.4s steps(1) infinite; }
@keyframes crackle { 0%, 90%, 100% { opacity: 1; } 91% { opacity: .55; } 93% { opacity: 1; } 95% { opacity: .7; } }

/* The front page fills the screen exactly: it never scrolls. */
body.front { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.front main { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.panels { width: 100%; }
.panel-grid {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 32px);
}
.panel {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 16px 16px;
  background: rgba(13, 13, 18, .82); border: 1px solid var(--line); border-top: 2px solid var(--red);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.panel-down { border-top-color: var(--teal); }
.panel-k { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .88rem; line-height: 1.2; min-height: 2.4em; }
.panel-v {
  font-weight: 700; line-height: .95; font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  color: var(--yellow); text-shadow: 0 0 22px var(--yellow-dim); font-variant-numeric: tabular-nums;
}
.panel-v small { font-size: .45em; margin-left: 2px; color: var(--muted); text-shadow: none; }
.panel-down .panel-v { color: var(--teal); text-shadow: 0 0 22px var(--teal-dim); }
.panel-hint { color: var(--muted); font-size: .78rem; letter-spacing: .04em; }

/* The Wall panel's loading bar, as the hub draws it (.progress in the hub's app.css). */
.progress { height: 10px; background: var(--bg); overflow: hidden; border: 1px solid var(--line-2); }
.progress > span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--teal) 0 8px, transparent 8px 10px); }
.progress-up > span { background: repeating-linear-gradient(90deg, var(--red) 0 8px, transparent 8px 10px); }
.progress > .w0 { width: 0%; }
.progress > .w1 { width: 1%; }
.progress > .w2 { width: 2%; }
.progress > .w3 { width: 3%; }
.progress > .w4 { width: 4%; }
.progress > .w5 { width: 5%; }
.progress > .w6 { width: 6%; }
.progress > .w7 { width: 7%; }
.progress > .w8 { width: 8%; }
.progress > .w9 { width: 9%; }
.progress > .w10 { width: 10%; }
.progress > .w11 { width: 11%; }
.progress > .w12 { width: 12%; }
.progress > .w13 { width: 13%; }
.progress > .w14 { width: 14%; }
.progress > .w15 { width: 15%; }
.progress > .w16 { width: 16%; }
.progress > .w17 { width: 17%; }
.progress > .w18 { width: 18%; }
.progress > .w19 { width: 19%; }
.progress > .w20 { width: 20%; }
.progress > .w21 { width: 21%; }
.progress > .w22 { width: 22%; }
.progress > .w23 { width: 23%; }
.progress > .w24 { width: 24%; }
.progress > .w25 { width: 25%; }
.progress > .w26 { width: 26%; }
.progress > .w27 { width: 27%; }
.progress > .w28 { width: 28%; }
.progress > .w29 { width: 29%; }
.progress > .w30 { width: 30%; }
.progress > .w31 { width: 31%; }
.progress > .w32 { width: 32%; }
.progress > .w33 { width: 33%; }
.progress > .w34 { width: 34%; }
.progress > .w35 { width: 35%; }
.progress > .w36 { width: 36%; }
.progress > .w37 { width: 37%; }
.progress > .w38 { width: 38%; }
.progress > .w39 { width: 39%; }
.progress > .w40 { width: 40%; }
.progress > .w41 { width: 41%; }
.progress > .w42 { width: 42%; }
.progress > .w43 { width: 43%; }
.progress > .w44 { width: 44%; }
.progress > .w45 { width: 45%; }
.progress > .w46 { width: 46%; }
.progress > .w47 { width: 47%; }
.progress > .w48 { width: 48%; }
.progress > .w49 { width: 49%; }
.progress > .w50 { width: 50%; }
.progress > .w51 { width: 51%; }
.progress > .w52 { width: 52%; }
.progress > .w53 { width: 53%; }
.progress > .w54 { width: 54%; }
.progress > .w55 { width: 55%; }
.progress > .w56 { width: 56%; }
.progress > .w57 { width: 57%; }
.progress > .w58 { width: 58%; }
.progress > .w59 { width: 59%; }
.progress > .w60 { width: 60%; }
.progress > .w61 { width: 61%; }
.progress > .w62 { width: 62%; }
.progress > .w63 { width: 63%; }
.progress > .w64 { width: 64%; }
.progress > .w65 { width: 65%; }
.progress > .w66 { width: 66%; }
.progress > .w67 { width: 67%; }
.progress > .w68 { width: 68%; }
.progress > .w69 { width: 69%; }
.progress > .w70 { width: 70%; }
.progress > .w71 { width: 71%; }
.progress > .w72 { width: 72%; }
.progress > .w73 { width: 73%; }
.progress > .w74 { width: 74%; }
.progress > .w75 { width: 75%; }
.progress > .w76 { width: 76%; }
.progress > .w77 { width: 77%; }
.progress > .w78 { width: 78%; }
.progress > .w79 { width: 79%; }
.progress > .w80 { width: 80%; }
.progress > .w81 { width: 81%; }
.progress > .w82 { width: 82%; }
.progress > .w83 { width: 83%; }
.progress > .w84 { width: 84%; }
.progress > .w85 { width: 85%; }
.progress > .w86 { width: 86%; }
.progress > .w87 { width: 87%; }
.progress > .w88 { width: 88%; }
.progress > .w89 { width: 89%; }
.progress > .w90 { width: 90%; }
.progress > .w91 { width: 91%; }
.progress > .w92 { width: 92%; }
.progress > .w93 { width: 93%; }
.progress > .w94 { width: 94%; }
.progress > .w95 { width: 95%; }
.progress > .w96 { width: 96%; }
.progress > .w97 { width: 97%; }
.progress > .w98 { width: 98%; }
.progress > .w99 { width: 99%; }
.progress > .w100 { width: 100%; }

/* Behind everything: the agents' three columns. */
.rain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0 16px;
  font: 400 .72rem/1.9 var(--mono); color: var(--off); opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.col { overflow: hidden; }
.track { list-style: none; margin: 0; padding: 0; will-change: transform; }
.track li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track b { font-weight: 600; margin-right: 6px; }
.col-l b { color: rgba(255, 0, 60, .8); }
.col-m b { color: rgba(55, 235, 243, .75); }
.col-r b { color: rgba(252, 238, 10, .7); }
/* left up, middle down at the same pace, right up a little faster */
.col-l .track { animation: rise 160s linear infinite; }
.col-m .track { animation: fall 160s linear infinite; }
.col-r .track { animation: rise 120s linear infinite; }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes fall { from { transform: translateY(-50%); } to { transform: translateY(0); } }

/* The footer: one small line. */
.foot { padding: 6px 0 12px; color: var(--off); font-size: .76rem; text-align: center; letter-spacing: .04em; }
.foot p { margin: 0; }
.foot b { color: var(--muted); font-family: var(--mono); font-weight: 500; }

/* Panels for the other pages (the flags form, a lost route): these may scroll. */
.set, .lost {
  max-width: 640px; margin: 0 auto 14px; padding: 18px 20px;
  background: rgba(13, 13, 18, .92); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.scale { color: var(--muted); letter-spacing: .08em; font-weight: 600; margin-left: 6px; }
.lost h1 { margin: 0 0 8px; color: var(--red); letter-spacing: .14em; }
.lost p { margin: 0; }
.set h1 { margin: 0 0 4px; font-size: 1rem; letter-spacing: .24em; color: var(--yellow); }
.set .who { margin: 0 0 14px; color: var(--muted); font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) 7ch; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row label { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; }
.hint { display: block; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .8rem; }
.set-row input {
  width: 100%; padding: 8px 10px; font: 500 1.15rem var(--mono); color: var(--yellow); text-align: right;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 0;
}
.set-row input:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.set button {
  margin-top: 16px; padding: 12px 22px; font: 700 1rem var(--font); letter-spacing: .18em; text-transform: uppercase;
  color: var(--bg); background: var(--yellow); border: 0; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.set button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.note { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--teal); background: var(--teal-dim); }
.note-bad { border-left-color: var(--red); background: var(--red-dim); }

/* Narrower: still one screen, no scroll. Three and two, then two and three on a phone. */
@media (max-width: 960px) {
  .panel-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 720px; }
  .panel { grid-column: span 2; }
  .panel:nth-child(4) { grid-column: 2 / span 2; }
  .panel:nth-child(5) { grid-column: 4 / span 2; }
}
@media (max-width: 560px) {
  body { padding: 0 10px; }
  .mast { padding-top: 10px; }
  .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .panel, .panel:nth-child(4), .panel:nth-child(5) { grid-column: auto; }
  .panel:nth-child(5) { grid-column: 1 / -1; }
  .panel { padding: 12px 12px 10px; gap: 6px; }
  .panel-k { font-size: .74rem; min-height: 0; }
  .panel-v { font-size: clamp(2rem, 11vw, 2.8rem); }
  .panel-hint { font-size: .68rem; }
  .rain { gap: 10px; padding: 0 6px; font-size: .6rem; }
  .foot { font-size: .66rem; }
}
@media (max-height: 560px) and (min-width: 561px) {
  .panel { padding: 12px 12px 10px; gap: 6px; }
  .panel-v { font-size: clamp(2rem, 4.6vw, 3.2rem); }
  .panel-k { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark::before, .wordmark::after { animation: none; opacity: 0; }
  .badge-up { animation: none; }
  .track { animation: none !important; }
}
@media (prefers-contrast: more) {
  body::after { display: none; }
  .wordmark::before, .wordmark::after { display: none; }
  .rain { display: none; }
}
