@font-face { font-family: Exposure; src: url('/fonts/exposure.woff2') format('woff2'); font-display: block; font-weight: 400; }
@font-face { font-family: Geist; src: url('/fonts/geist-sans.woff2') format('woff2'); font-display: block; font-weight: 100 900; }
@font-face { font-family: Geist Mono; src: url('/fonts/geist-mono.woff2') format('woff2'); font-display: block; font-weight: 400; }

/* CodeWall tokens (codewall.ai): black ground, #f0f0f0 light, Exposure display, Geist sans/mono. */
:root {
  color-scheme: dark;
  --fit-scale: 1;
  --bg: #000;
  --accent: #f0f0f0;
  --accent-dim: #d8d8d8;
  --text: #ffffffeb;
  --muted: #ffffffa6;
  --dim: #ffffff6b;
  --faint: #ffffff2e;
  --border: #ffffff14;
  --border-strong: #ffffff29;
  --orange: #f99c00;
  --red: #fb2c36;
  --green: #00bb7f;
  --sans: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "Roboto Mono", monospace;
  --display: Exposure, Georgia, serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; }
p, h1, h2, dl, dd, ol { margin: 0; padding: 0; }

.stage {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 1280px;
  height: 720px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--fit-scale));
  background: radial-gradient(ellipse 70% 60% at 40% 50%, #f99c0009, transparent 70%), var(--bg);
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#ffffff10 1px, transparent 1.2px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 85%);
}
.stage > * { position: relative; z-index: 1; }

/* ---------- Masthead ---------- */
.masthead { flex: 0 0 56px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; color: #111; background: var(--accent); border-radius: 10px; }
.lockup { display: flex; align-items: center; gap: 16px; }
.lockup img { display: block; width: 112px; height: auto; filter: invert(1); }
.rule { width: 1px; height: 24px; background: #0002; }
.lockup h1 { font: 400 28px/1 var(--display); letter-spacing: -.03em; }
.masthead-status { display: flex; align-items: center; gap: 20px; font: 400 13px/1 var(--mono); }
.live-mark { display: flex; align-items: center; gap: 8px; }
.live-mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: live-ping 1.6s ease-out infinite; }
#utc-clock { font-variant-numeric: tabular-nums; }
.demo-badge { padding: 6px 8px; color: #fff; background: var(--red); border-radius: 3px; }
.demo-badge[hidden] { display: none; }

/* ---------- Grid ---------- */
.grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr 300px; gap: 8px; }
.target, .card { position: relative; min-width: 0; overflow: hidden; background: linear-gradient(180deg, #141414f2, #0b0b0bf2); border: 1px solid var(--border); border-radius: 10px; }
.target { display: flex; flex-direction: column; }

.target-head { flex: 0 0 auto; padding: 16px 18px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.target h2, .card h2 { color: var(--accent); font: 400 32px/1 var(--display); letter-spacing: -.035em; }
.target-head > div { min-width: 0; }
.target-head p { margin-top: 8px; overflow: hidden; color: var(--accent); font: 400 13px/1 var(--mono); white-space: nowrap; text-overflow: ellipsis; }
.target-head p em { color: var(--orange); font-style: normal; }
.target-head p span { margin-left: 10px; color: var(--dim); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; color: var(--green); border: 1px solid currentColor; border-radius: 3px; font: 400 12px/1 var(--mono); white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
.status-pill.down { color: var(--red); }
.status-pill.staged { color: var(--muted); }
.status-pill.staged::before { animation: none; }

.radar-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
.radar-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.core-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 34px); padding: 4px 8px; font: 500 12px/1 var(--sans); white-space: nowrap; background: #000c; border-radius: 3px; }
.radar-banner { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 7px 12px; color: #111; background: var(--orange); border-radius: 3px; font: 400 12px/1 var(--mono); white-space: nowrap; animation: banner-in .6s var(--ease-out); }
.radar-banner[hidden] { display: none; }
.radar-banner.danger { color: #fff; background: var(--red); animation: banner-in .6s var(--ease-out), blink 1s steps(2) infinite .6s; }

.standing { flex: 0 0 66px; margin: 0 10px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: #111; background: var(--accent); border-radius: 6px; }
.clock { display: flex; align-items: baseline; gap: 1px; }
.clock strong { font: 400 40px/1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.clock small { margin-right: 9px; color: #0008; font: 400 16px/1 var(--display); }
.clock small:last-child { margin-right: 0; }
.clock .sec { color: #0008; }
.clock strong.tick { animation: tick .5s var(--ease-out); }
.clock.staged strong, .clock.staged small { color: #0005; }
.bounty { display: grid; justify-items: end; gap: 5px; }
.bounty span { color: #0009; font: 400 12px/1 var(--mono); }
.bounty b { font: 400 22px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }

.figures { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 18px; padding-top: 16px; }
.figures p { min-width: 0; display: grid; gap: 6px; }
.figures b { font: 400 36px/.9 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures span { overflow: hidden; color: var(--muted); font: 400 13px/1.2 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.figures .hot b { color: var(--orange); }
.figures span.fresh { color: var(--orange); }
.figures b.bump { animation: bump .9s var(--ease-out); }

/* Attack mix: share of attempts by class, as a bar and one sentence. */
.mix { flex: 0 0 auto; margin: 14px 18px 16px; display: grid; gap: 9px; }
.mix-bar { height: 4px; display: flex; gap: 2px; overflow: hidden; border-radius: 2px; background: var(--border); }
.mix-bar i { display: block; transition: flex-grow .8s var(--ease-out); }
.mix p { overflow: hidden; color: var(--muted); font: 400 13px/1.2 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.mix-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mix-meta span { flex: 0 0 auto; color: var(--dim); font: 400 12px/1.2 var(--mono); }
.mix p strong { color: var(--accent); font-weight: 400; }
.mix .tone-plain { background: #ffffff1f; }
.mix .tone-probe { background: #f99c00a6; }
.mix .tone-attack { background: var(--orange); }
.mix .tone-error { background: var(--red); }

/* ---------- Side ---------- */
.side { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.card { padding: 16px 18px; }
.feed-card { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; }
.feed-card h2 { font-size: 26px; }
.feed { flex: 1; list-style: none; display: flex; flex-direction: column; overflow: hidden; mask-image: linear-gradient(#000 80%, transparent); }
.feed li { position: relative; flex: 0 0 38px; display: grid; grid-template-columns: 30px 1fr auto auto; column-gap: 8px; align-items: center; border-top: 1px solid var(--border); }
.feed .tag { justify-self: start; padding: 3px 0; color: var(--dim); font: 400 11px/1 var(--mono); }
.feed strong { overflow: hidden; font: 450 13px/1.1 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.feed time { color: var(--dim); font: 400 11px/1 var(--mono); white-space: nowrap; }
.feed .count { padding: 2px 5px; color: #111; background: var(--accent-dim); border-radius: 2px; font: 400 11px/1.2 var(--mono); }
.feed .warn .tag, .feed .warn strong { color: var(--accent); }
.feed .warn .tag { color: var(--orange); }
.feed .warn .count { background: var(--orange); }
.feed .danger .tag, .feed .danger strong { color: var(--red); }
.feed .danger .count { color: #fff; background: var(--red); }
.feed .good .tag { color: var(--green); }
.feed .quiet strong { color: var(--muted); }
.feed li.fresh { animation: event-arrive .9s var(--ease-out); }
.feed li.fresh::after { content: ""; position: absolute; inset: 0 -18px; background: linear-gradient(90deg, #f99c0026, transparent 70%); animation: fade-out 2.4s ease-out forwards; pointer-events: none; }
.feed .empty strong { color: var(--dim); }

.total-card { flex: 0 0 116px; display: flex; flex-direction: column; justify-content: space-between; color: #111; background: var(--accent); border-color: var(--accent); }
.total-card span { color: #0009; font: 400 12px/1 var(--mono); }
.total-card strong { font: 400 58px/.8 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.total-card strong.bump { animation: bump-dark .9s var(--ease-out); }

/* ---------- Ticker ---------- */
.ticker { flex: 0 0 34px; }
.ticker-window { position: relative; height: 34px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; align-items: center; white-space: nowrap; animation: ticker var(--ticker-duration, 60s) linear infinite; will-change: transform; }
.ticker-track span { padding: 0 18px; color: var(--muted); font: 400 13px/1 var(--mono); }
.ticker-track span b { color: var(--accent); font-weight: 400; }
.ticker-track span::after { content: "◆"; margin-left: 36px; color: var(--orange); font-size: 8px; vertical-align: 2px; }

/* ---------- Impact ---------- */
.impact-layer { position: absolute; z-index: 6; inset: 0; overflow: hidden; pointer-events: none; }
.impact-callout { position: absolute; top: 46%; color: var(--accent); font: 400 72px/.8 var(--display); letter-spacing: -.06em; white-space: nowrap; text-shadow: 0 0 30px #000, 0 0 70px #f99c0060; animation: impact-callout 1.6s var(--ease-out) forwards; }
.target.impact { animation: card-impact .8s var(--ease-out); }
.target.is-down { border-color: #fb2c3688; box-shadow: inset 0 0 60px #fb2c3622; }

/* ---------- PWNED ---------- */
.pwned { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px; overflow: hidden; background: radial-gradient(circle at 50% 50%, #2a0306, #000 65%); text-align: center; animation: pwned-in 1.2s var(--ease-out); }
.pwned[hidden] { display: none; }
.pwned > * { position: relative; z-index: 1; }
.pwned span { color: var(--accent); font: 400 44px/1 var(--display); letter-spacing: -.03em; }
.pwned strong { color: var(--accent); font: 400 clamp(120px, 24vw, 330px)/.78 var(--display); letter-spacing: -.07em; text-shadow: 0 0 80px #fb2c3680; animation: glitch 2.8s steps(1) infinite; }
.pwned small { color: var(--muted); font: 400 16px/1 var(--mono); }
.pwned-rings { position: absolute !important; inset: 0; z-index: 0 !important; }
.pwned-rings i { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px; border: 2px dotted var(--red); border-radius: 50%; opacity: 0; animation: ring-out 3.6s ease-out infinite; }
.pwned-rings i:nth-child(2) { animation-delay: 1.2s; }
.pwned-rings i:nth-child(3) { animation-delay: 2.4s; }

@keyframes pulse { 50% { opacity: .4; } }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 #fb2c3699; } 100% { box-shadow: 0 0 0 9px #fb2c3600; } }
@keyframes tick { from { transform: translateY(-5px); opacity: .35; } }
@keyframes banner-in { from { transform: translate(-50%, -10px); opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes event-arrive { from { transform: translateX(24px); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes bump { 0% { transform: scale(1); } 25% { transform: scale(1.14); color: var(--accent); text-shadow: 0 0 18px #f99c00; } 100% { transform: scale(1); } }
@keyframes bump-dark { 0% { transform: scale(1); } 25% { transform: scale(1.06); color: var(--orange); } 100% { transform: scale(1); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes card-impact { 0%, 100% { border-color: var(--border); } 20% { border-color: #f99c00cc; box-shadow: 0 0 0 1px #f99c0066, 0 0 50px #f99c0030; } }
@keyframes impact-callout { 0% { transform: translate(-50%, -30%) scale(.4); opacity: 0; filter: blur(12px); } 22% { opacity: 1; filter: blur(0); } 65% { transform: translate(-50%, -50%) scale(1); opacity: .95; } 100% { transform: translate(-50%, -66%) scale(1.25); opacity: 0; filter: blur(8px); } }
@keyframes pwned-in { from { opacity: 0; transform: scale(1.08); } }
@keyframes ring-out { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(5); opacity: 0; } }
@keyframes glitch { 0%, 88%, 100% { transform: none; text-shadow: 0 0 80px #fb2c3680; } 90% { transform: translate(-6px, 2px) skewX(-6deg); text-shadow: 6px 0 var(--red), -6px 0 #00e5ff; } 93% { transform: translate(5px, -2px); text-shadow: -5px 0 var(--red), 5px 0 #00e5ff; } 96% { transform: translate(-2px, 0); } }
