/* Neon glitch theme, matched to the Null's Override Discord banner and emblem:
   near-black navy, violet to electric blue to cyan, thin glowing lines. */
:root {
  --bg: #04030c;
  --bg-2: #0a0819;
  --card: rgba(16, 13, 38, 0.86);
  --line: #2b2458;
  --text: #f0f0ff;
  --muted: #a9acd2;
  --accent: #5cd0ff;
  --accent-dim: #6a3df0;
  --violet: #b14dff;
  --blue: #2a6bff;
  --warn: #ffc15e;
  --bad: #ff6b8b;
  --neon: linear-gradient(90deg, #d35cff, #7a5cff 45%, #38b6ff);
  --radius: 8px;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --display: "Bahnschrift", "DIN Alternate", "Eurostile", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(92, 112, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 112, 255, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse 900px 700px at 100% 900px, rgba(64, 40, 200, 0.2), transparent),
    radial-gradient(ellipse 800px 700px at 0 1500px, rgba(150, 50, 230, 0.13), transparent);
  background-size: 56px 56px, 56px 56px, 100% 100%, 100% 100%;
  color: var(--text);
  font: 16px/1.6 var(--sans);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(4, 3, 12, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.brand::before { content: ""; flex: none; width: 42px; height: 42px; background: url("logo.webp?v=2") center / contain no-repeat; }
.brand .w { display: inline-flex; color: #c262ff; }
.brand .w i { font-style: normal; color: #8a7bff; }
.brand .w b { font-weight: inherit; color: #4aa8ff; }
.brand:hover { text-decoration: none; }
nav a { color: var(--muted); margin-left: 22px; font-size: 15px; }
nav a:hover, nav a.active { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 88px 0 56px; border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; text-shadow: 0 0 12px rgba(92, 208, 255, 0.5); }
h1 {
  font-family: var(--display); font-size: clamp(34px, 5vw, 56px); line-height: 1.08; margin: 12px 0 16px; letter-spacing: 0.02em; text-transform: uppercase;
  width: fit-content; max-width: 100%; color: #b9a2ff;
  background: linear-gradient(90deg, #e07cff, #9a7bff 45%, #4cc3ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lede { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0; }
.cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  border: 1px solid #4a3d96; background: rgba(20, 14, 52, 0.75); color: var(--text); font-weight: 600; font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 16px rgba(92, 208, 255, 0.3); }
.btn.primary { background: linear-gradient(90deg, #9a2cf0, #4a45f0 60%, #1668e8); color: #fff; border-color: #8f7bff; box-shadow: 0 0 18px rgba(122, 76, 255, 0.45); }
.btn.primary:hover { border-color: #c9d8ff; box-shadow: 0 0 26px rgba(92, 140, 255, 0.7); }
.btn.disabled { color: var(--muted); border-style: dashed; cursor: default; pointer-events: none; }

a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Sections */
section { padding: 64px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 { font-family: var(--display); font-size: 29px; line-height: 1.25; margin: 0 0 8px; letter-spacing: 0.01em; }
h3 { font-family: var(--display); font-size: 19px; line-height: 1.35; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 32px; max-width: 680px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.maps { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: 0 0 22px rgba(58, 40, 190, 0.16); transition: border-color 0.2s, box-shadow 0.2s;
}
.card::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, #d35cff, #5c6bff 40%, #5cd0ff 70%, transparent);
}
.card:hover { border-color: #5642b8; box-shadow: 0 0 30px rgba(90, 70, 255, 0.3); }
.card p { color: var(--muted); margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card .tag { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.card li { margin: 4px 0; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 40px; }
.stat { background: rgba(10, 8, 28, 0.82); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-family: var(--display); font-size: 27px; color: #cfe6ff; text-shadow: 0 0 16px rgba(92, 160, 255, 0.75); }
.stat span { color: var(--muted); font-size: 13px; }

/* Map cards */
.map { position: relative; }
.map h3 { margin-bottom: 4px; }
.map .session { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.map .restart { font-size: 13px; color: var(--muted); margin-top: 10px; }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--accent-dim); color: var(--accent); margin-bottom: 10px;
}
.badge.warn { border-color: #7a5520; color: var(--warn); }
.badge.off { border-color: #7a2848; color: var(--bad); }
.badge.muted { border-color: var(--line); color: var(--muted); }
.map .players { font-size: 13px; color: var(--text); margin-top: 8px; font-family: var(--mono); min-height: 0; }
.map .players:empty { display: none; }
.status-summary { display: flex; align-items: center; gap: 8px; color: var(--text) !important; font-family: var(--mono); font-size: 14px; margin-top: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); display: inline-block; }
.dot.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Settings tables */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
/* Fixed layout: both browsers honour the column widths and long values wrap inside the card */
.card table { table-layout: fixed; }
td.v { width: 40%; text-align: right; font-family: var(--mono); color: var(--text); padding-left: 12px; white-space: normal; overflow-wrap: break-word; }
tr:last-child th, tr:last-child td { border-bottom: 0; }

table.cmds th { width: 7.5em; }
table.cmds td.v { width: auto; text-align: left; font-family: var(--sans); color: var(--muted); padding-left: 8px; }

/* Mods */
.mod { display: flex; gap: 14px; align-items: flex-start; }
.mod img { width: 48px; height: 48px; border-radius: 8px; flex: none; background: var(--bg-2); }
.mod h3 { font-size: 16px; margin: 0 0 2px; }
.mod p { font-size: 14px; }

/* Steps */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 18px 44px; color: var(--muted); }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent-dim);
  color: var(--accent); font-family: var(--mono); font-size: 13px; display: grid; place-items: center;
}
ol.steps li strong { color: var(--text); }
code { font-family: var(--mono); font-size: 0.92em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--text); }

.releases { display: grid; gap: 14px; }
.release h3 { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.release .ver { font-family: var(--mono); color: var(--accent); }
.release .date { color: var(--muted); font-size: 14px; font-weight: 400; }
.release p { color: var(--text); }
.release li strong, .card p strong { color: var(--text); }
.hash { color: var(--muted); font-size: 13px; margin-top: 14px; word-break: break-all; }
.app-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Graphics */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom-color: transparent; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 62%, rgba(92, 208, 255, 0.35) 62% 74%, transparent 74%) 0 22% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 0 4%, rgba(177, 77, 255, 0.45) 4% 15%, transparent 15% 18%, rgba(177, 77, 255, 0.25) 18% 21%, transparent 21%) 0 6% / 100% 3px no-repeat,
    linear-gradient(90deg, transparent 0 80%, rgba(177, 77, 255, 0.4) 80% 92%, transparent 92%) 0 78% / 100% 3px no-repeat,
    linear-gradient(90deg, transparent 0 1%, rgba(42, 107, 255, 0.5) 1% 9%, transparent 9%) 0 88% / 100% 2px no-repeat,
    radial-gradient(ellipse 60% 90% at 82% 45%, rgba(74, 44, 220, 0.34), transparent 70%),
    radial-gradient(ellipse 45% 70% at 8% 100%, rgba(177, 77, 255, 0.18), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #b14dff 25%, #2a6bff 60%, #5cd0ff 80%, transparent);
  box-shadow: 0 0 18px rgba(90, 92, 255, 0.8);
}
.hero .wrap { position: relative; }
/* Home page: the banner, faded into the background */
.hero.home { min-height: 500px; display: flex; align-items: center; padding: 64px 0; }
.hero.home .wrap { width: 100%; }
.hero.home .lede { max-width: 470px; }
.hero.home .cta { max-width: 500px; }
.hero-banner {
  position: absolute; z-index: -1; right: -150px; top: 50%; transform: translateY(-50%);
  width: 820px; max-width: none; height: auto; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 52%, transparent 100%);
}
@media (max-width: 1080px) { .hero-banner { right: -290px; } }
@media (max-width: 900px) {
  .hero.home { display: block; min-height: 0; padding: 8px 0 44px; }
  .hero-banner { position: static; transform: none; display: block; width: 100%; max-width: 640px; margin: 0 auto 4px; }
  .hero.home .lede, .hero.home .cta { max-width: none; }
}
.hero:not(.home) h1 { max-width: 640px; }
@media (max-width: 900px) { .hero::before { background: radial-gradient(ellipse 90% 50% at 80% 20%, rgba(74, 44, 220, 0.3), transparent 70%), radial-gradient(ellipse 70% 50% at 0 100%, rgba(177, 77, 255, 0.16), transparent 70%); } }
/* Other heroes: the N emblem in the corner */
.hero:not(.home) .wrap::after {
  content: ""; position: absolute; z-index: -1; right: -40px; top: 50%; width: 420px; height: 420px; margin-top: -230px;
  background: url("art/emblem.webp") center / contain no-repeat; opacity: 0.6; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 71%);
  mask-image: radial-gradient(circle, #000 55%, transparent 71%);
}
@media (max-width: 960px) { .hero:not(.home) .wrap::after { width: 300px; height: 300px; right: -90px; top: 0; margin-top: -40px; opacity: 0.28; } }
/* App cards: equal heights, buttons pinned to the bottom */
.apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .apps-grid { grid-template-columns: 1fr; } }
.apps-grid > .card { display: flex; flex-direction: column; }
.apps-grid > .card > .cta { margin-top: auto; padding-top: 20px; }
.apps-grid .cta .btn { white-space: nowrap; }
.card.wide { grid-column: 1 / -1; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; align-items: start; }
.card.wide .wide-side .app-art { margin-top: 0; }
.card.wide .cta { margin-top: 0 !important; padding-top: 16px; }
@media (max-width: 760px) { .card.wide { grid-template-columns: 1fr; } }

section h2::before { content: "// "; color: var(--violet); font-family: var(--mono); font-weight: 400; }
.card h2::before { content: none; }

.app-art { background: #070515; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 14px 0 16px; }
.app-art svg, .app-art img { display: block; width: 100%; height: auto; }

/* Tabs (built by tabs.js) */
.tabbar {
  position: sticky; top: 60px; z-index: 9;
  background: rgba(4, 3, 12, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabbar .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabbar .wrap::-webkit-scrollbar { display: none; }
.tabbar a {
  flex: none; padding: 14px 14px 12px; color: var(--muted); font-size: 15px; font-weight: 500;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabbar a:first-child { margin-left: -14px; }
.tabbar a:hover { color: var(--text); text-decoration: none; }
.tabbar a.active { color: var(--text); border-bottom-color: var(--accent); text-shadow: 0 0 14px rgba(92, 208, 255, 0.7); }
.js-tabs main[data-tabs] > section { border-bottom: 0; min-height: 50vh; }
.js-tabs main[data-tabs] > section.tab-off {
  position: absolute !important; top: 0; left: -200vw; width: 100vw;
  visibility: hidden; pointer-events: none;
}
/* clip both ways: hidden panels are laid out off-screen and can be taller than the open one */
main[data-tabs] { position: relative; overflow: clip; }
section[data-tab] { scroll-margin-top: 110px; }
[data-tabs] .card[id] { scroll-margin-top: 130px; }

.shot { margin: 24px 0 0; }
.shot a { display: block; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.bot-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.bot-head img { flex: none; border-radius: 50%; box-shadow: 0 0 18px rgba(122, 92, 255, 0.5); }
.bot-head h3 { margin: 0; }
.bot-head .app-meta { margin-top: 2px; }
.apps-grid > .bot-wide { grid-column: 1 / -1; }
.apps-grid table.cmds { margin: 4px 0 14px; }
.apps-grid ul + table.cmds { margin-top: 14px; }
.bot-wide table.cmds th { width: 11.5em; }
@media (max-width: 640px) { .bot-wide table.cmds, .bot-wide table.cmds tbody, .bot-wide table.cmds tr, .bot-wide table.cmds th, .bot-wide table.cmds td.v { display: block; width: 100%; } .bot-wide table.cmds th { border-bottom: 0; padding-bottom: 0; } .bot-wide table.cmds td.v { padding: 2px 0 10px; } }
h3.group { margin: 36px 0 14px; }
.card.promise { background: linear-gradient(100deg, rgba(74, 24, 130, 0.5), rgba(16, 13, 38, 0.9) 55%, rgba(16, 52, 130, 0.45));
  margin-top: 24px; border-color: var(--accent-dim);
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
}
.card.promise > div:first-child { flex: 1 1 320px; max-width: 640px; }
.card.promise h3 { margin-top: 6px; }
.card.promise strong { color: var(--text); }
.card.promise .cta { margin-top: 0; }

.note { border-left: 3px solid var(--accent-dim); padding: 4px 0 4px 16px; color: var(--muted); margin: 24px 0 0; }

footer { background: rgba(4, 3, 12, 0.6); padding: 36px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  nav a { margin-left: 12px; font-size: 13.5px; white-space: nowrap; }
  .brand { font-size: 0; gap: 0; }
  .hero { padding: 56px 0 40px; }
  section { padding: 48px 0; }
}
