/* Chromepunk World - site styles (tokens from docs/BRAND.md). One file for every page. */
:root {
  --nw-bg: #07080d;
  --nw-bg2: #0b0d15;
  --nw-panel: rgba(10, 12, 20, .88);
  --nw-raised: #11141f;
  --nw-raised2: #161a28;
  --nw-line: #23283a;
  --nw-line2: #31384f;
  --nw-yellow: #fcee0a;
  --nw-yellow-ink: #141300;
  --nw-cyan: #00f0ff;
  --nw-red: #ff2a3d;
  --nw-pink: #ff2a6d;
  --nw-green: #05ffa1;
  --nw-purple: #b967ff;
  --nw-text: #e7e9f2;
  --nw-dim: #8a90a6;
  --nw-dim2: #5d6378;
  --font-display: "Rajdhani", "Oxanium", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
  --cut: 14px;
  --wrap: 1240px;
  --header-h: 68px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
body {
  margin: 0; background: var(--nw-bg); color: var(--nw-text); font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1; }
a { color: var(--nw-cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.05; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
::selection { background: var(--nw-yellow); color: var(--nw-yellow-ink); }
:focus-visible { outline: 2px solid var(--nw-yellow); outline-offset: 3px; }
.mono { font-family: var(--font-mono); }
.dim { color: var(--nw-dim); }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--nw-yellow); color: #000; padding: 8px 14px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- header */
.nw-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(7, 8, 13, .92); border-bottom: 1px solid var(--nw-line);
  backdrop-filter: blur(8px);
}
.nw-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--nw-yellow) 20%, var(--nw-cyan) 80%, transparent); opacity: .5; }
.nw-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--nw-text); text-decoration: none !important; }
.brand svg { width: 38px; height: 38px; }
.brand b { font: 700 1.55rem/1 var(--font-display); letter-spacing: .14em; background: linear-gradient(180deg, #ffffff 0%, #dfe5ef 42%, #7a8399 52%, #c9d1e0 64%, #f4f7fc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand small { display: block; font: 600 .62rem/1 var(--font-mono); letter-spacing: .32em; color: var(--nw-yellow); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--nw-dim); font: 600 .95rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .12em;
  padding: 10px 12px; text-decoration: none; position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--nw-text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--nw-yellow); }
.nav .btn { margin-left: 10px; }
.lang { display: flex; gap: 4px; margin-left: 8px; }
.lang button { background: none; border: 1px solid var(--nw-line); color: var(--nw-dim); font: 600 .72rem/1 var(--font-mono); padding: 7px 7px; cursor: pointer; display: flex; gap: 5px; align-items: center; }
.lang button[aria-pressed="true"] { border-color: var(--nw-yellow); color: var(--nw-text); }
.lang svg { width: 16px; height: 11px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--nw-line2); color: var(--nw-text); width: 44px; height: 40px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: auto; position: relative; content: ""; }
.menu-toggle span::before { position: absolute; top: -6px; } .menu-toggle span::after { position: absolute; top: 6px; }
@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--nw-bg); border-bottom: 1px solid var(--nw-line); padding: 12px 20px 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--nw-line); }
  .nav .btn { margin: 12px 0 0; justify-content: center; }
  .lang { margin: 12px 0 0; }
}

/* ---------------------------------------------------------------- buttons, chips */
.btn {
  --c: var(--nw-yellow); --ink: var(--nw-yellow-ink);
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: 0; text-decoration: none !important;
  font: 700 1rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .14em;
  padding: 14px 26px 14px 22px; background: var(--c); color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform .15s, filter .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--nw-text); box-shadow: inset 0 0 0 1px var(--nw-line2); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--nw-cyan); color: var(--nw-cyan); }
.btn.cyan { --c: var(--nw-cyan); --ink: #001417; }
.btn.red { --c: var(--nw-red); --ink: #fff; }
.btn.sm { padding: 9px 16px 9px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; padding: 6px 9px; border: 1px solid var(--nw-line2); color: var(--nw-dim); }
.chip.y { border-color: rgba(252, 238, 10, .5); color: var(--nw-yellow); }
.chip.c { border-color: rgba(0, 240, 255, .45); color: var(--nw-cyan); }
.chip.r { border-color: rgba(255, 42, 61, .5); color: var(--nw-red); }
.chip.g { border-color: rgba(5, 255, 161, .45); color: var(--nw-green); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nw-dim2); display: inline-block; flex: none; }
.dot.on { background: var(--nw-green); box-shadow: 0 0 10px var(--nw-green); animation: pulse 2s ease-in-out infinite; }
.dot.off { background: var(--nw-red); }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------------------------------------------------------------- panels and sections */
.panel {
  background: linear-gradient(180deg, var(--nw-raised), var(--nw-bg2)); border: 1px solid var(--nw-line); position: relative;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.panel.pad { padding: 24px; }
.panel::before { content: ""; position: absolute; top: 0; left: 0; width: 42px; height: 2px; background: var(--accent, var(--nw-yellow)); }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section.alt { background: var(--nw-bg2); border-block: 1px solid var(--nw-line); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .78rem/1 var(--font-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--nw-yellow); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.lead { font-size: 1.15rem; color: #c3c7d6; max-width: 62ch; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.page-head { padding: 64px 0 32px; border-bottom: 1px solid var(--nw-line); background: radial-gradient(900px 300px at 15% 0%, rgba(0, 240, 255, .08), transparent 70%), radial-gradient(700px 300px at 90% 10%, rgba(252, 238, 10, .06), transparent 70%); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font: 600 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--nw-dim); padding: 10px 12px; border-bottom: 1px solid var(--nw-line2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--nw-line); vertical-align: top; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.table .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font: 600 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .16em; color: var(--nw-dim); }
.input, select.input, textarea.input {
  width: 100%; background: #0a0c14; border: 1px solid var(--nw-line2); color: var(--nw-text); padding: 12px 14px; font: 400 1rem/1.3 var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { outline: none; border-color: var(--nw-yellow); box-shadow: 0 0 0 3px rgba(252, 238, 10, .12); }
.form-error { color: var(--nw-red); font-size: .92rem; min-height: 1.3em; margin: 0 0 10px; }
.form-ok { color: var(--nw-green); font-size: .92rem; }

/* ---------------------------------------------------------------- footer */
.nw-footer { border-top: 1px solid var(--nw-line); background: #05060a; padding: 48px 0 32px; color: var(--nw-dim); font-size: .9rem; margin-top: 0; }
.nw-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.nw-footer h4 { font-size: .95rem; color: var(--nw-text); letter-spacing: .18em; margin-bottom: 14px; }
.nw-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.nw-footer a { color: var(--nw-dim); }
.nw-footer a:hover { color: var(--nw-text); }
.disclaimer { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--nw-line); font-size: .78rem; color: var(--nw-dim2); }
@media (max-width: 760px) { .nw-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- glitch title */
.glitch { position: relative; display: inline-block; background: linear-gradient(180deg, #ffffff 0%, #dfe5ef 42%, #7a8399 52%, #c9d1e0 64%, #f4f7fc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.glitch::before, .glitch::after { -webkit-text-fill-color: currentColor; background: none; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.glitch::before { color: var(--nw-cyan); transform: translate(-2px, 0); clip-path: inset(0 0 60% 0); opacity: .8; animation: glitchA 6s steps(1) infinite; mix-blend-mode: screen; }
.glitch::after { color: var(--nw-pink); transform: translate(2px, 0); clip-path: inset(55% 0 0 0); opacity: .8; animation: glitchB 6s steps(1) infinite; mix-blend-mode: screen; }
@keyframes glitchA { 0%, 92%, 100% { transform: translate(0); clip-path: inset(0 0 100% 0); } 93% { transform: translate(-4px, -1px); clip-path: inset(10% 0 55% 0); } 95% { transform: translate(3px, 1px); clip-path: inset(40% 0 30% 0); } 97% { transform: translate(-2px, 0); clip-path: inset(70% 0 5% 0); } }
@keyframes glitchB { 0%, 92%, 100% { transform: translate(0); clip-path: inset(100% 0 0 0); } 93% { transform: translate(4px, 1px); clip-path: inset(60% 0 10% 0); } 95% { transform: translate(-3px, 0); clip-path: inset(20% 0 60% 0); } 98% { transform: translate(2px, -1px); clip-path: inset(80% 0 2% 0); } }

/* toast */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; background: var(--nw-raised); border: 1px solid var(--nw-line2); border-left: 3px solid var(--nw-cyan); padding: 12px 16px; max-width: 360px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); animation: tin .2s ease-out; }
.toast.err { border-left-color: var(--nw-red); }
.toast.ok { border-left-color: var(--nw-green); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.empty { padding: 28px; text-align: center; color: var(--nw-dim); border: 1px dashed var(--nw-line2); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: square; stroke-linejoin: miter; }
.foot-tag { margin-top: 14px; max-width: 34ch; }
.brand small { white-space: nowrap; }
kbd { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border: 1px solid var(--nw-line2); border-bottom-width: 3px; background: #0d0f18; font: 600 .8rem/1 var(--font-mono); color: var(--nw-text); }

/* sub-page headers over official Cyberpunk 2077 screenshots (img/art, CDPR fan content) */
body[data-page="leaderboards"] .page-head, body[data-page="wiki"] .page-head { position: relative; isolation: isolate; padding: 96px 0 40px; }
body[data-page="leaderboards"] .page-head::before, body[data-page="wiki"] .page-head::before { content: ""; position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 45%; }
body[data-page="leaderboards"] .page-head::after, body[data-page="wiki"] .page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 8, 13, .94) 0%, rgba(7, 8, 13, .7) 50%, rgba(7, 8, 13, .45) 100%), linear-gradient(0deg, var(--nw-bg) 0%, transparent 45%); }
body[data-page="leaderboards"] .page-head::before { background-image: url(../img/art/street-race.webp); }
body[data-page="wiki"] .page-head::before { background-image: url(../img/art/city-rider.webp); background-position: center 60%; }
@media (max-width: 760px) {
  body[data-page="leaderboards"] .page-head::before { background-image: url(../img/art/street-race-sm.webp); }
  body[data-page="wiki"] .page-head::before { background-image: url(../img/art/city-rider-sm.webp); }
}

.nav-discord { display: inline-flex; align-items: center; gap: 6px; color: #8c9eff !important; }
.nav-discord:hover { color: #b3c0ff !important; }
.nav-discord .icon { width: 20px; height: 20px; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord:hover { background: #4752c4; border-color: #4752c4; }

.discord-band { background: linear-gradient(120deg, rgba(88, 101, 242, .22), rgba(88, 101, 242, .05) 60%, transparent); border-top: 1px solid rgba(88, 101, 242, .35); border-bottom: 1px solid rgba(88, 101, 242, .35); }
.discord-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.discord-big { width: 96px; height: 96px; flex: none; fill: none; stroke: #8c9eff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px rgba(88, 101, 242, .6)); }
.discord-big circle { fill: #8c9eff; stroke: none; }
.discord-copy { flex: 1; min-width: 260px; } .discord-copy h2 { margin: 4px 0 8px; }
.btn.discord.big { padding: 0 26px; height: 52px; font-size: 1rem; }
.nav-discord { padding: 6px 12px; border: 1px solid rgba(88, 101, 242, .55); background: rgba(88, 101, 242, .14); }
@media (max-width: 640px) { .discord-inner { flex-direction: column; text-align: center; } .discord-big { width: 72px; height: 72px; } }
