/* ==========================================================================
   Zap City RP
   One stylesheet, no framework, no build step. Roughly in this order:
   tokens, reset, layout, header, components, page sections, admin, responsive.

   Design brief it is built to: deep navy base, electric purple accent, Sora for
   headings, Inter for body copy, JetBrains Mono for anything numeric. Layout
   reacts as you scroll rather than sitting still.
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* Navy, darkest to lightest */
  --navy-950: #05080f;
  --navy-900: #070b18;
  --navy-850: #0a0f20;
  --navy-800: #0e1428;
  --navy-750: #111a33;
  --navy-700: #16203d;
  --navy-600: #1d2950;
  --navy-500: #26346a;

  /* Purple accent */
  --purple-600: #6845f0;
  --purple-500: #7c5cff;
  --purple-400: #9b84ff;
  --purple-300: #bcaaff;
  --purple-glow: rgba(124, 92, 255, .32);
  --purple-faint: rgba(124, 92, 255, .10);

  /* Support colours */
  --cyan: #4fb3d9;
  --green: #3ddc97;
  --amber: #e8b23a;
  --red: #f0507a;
  --bronze: #c98a4b;
  --silver: #9fb4d8;
  --gold: #e8b23a;

  /* Ink */
  --text: #e9edf8;
  --text-soft: #c3cbe0;
  --muted: #94a0bd;
  --dim: #6c7893;

  /* Lines and surfaces */
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .14);
  --surface: rgba(255, 255, 255, .028);
  --surface-2: rgba(255, 255, 255, .05);

  /* Type */
  --font-head: 'Sora', 'Segoe UI Semibold', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, ui-monospace, monospace;

  /* Fluid type scale — no media queries needed for headings */
  --step--1: clamp(.79rem, .77rem + .1vw, .84rem);
  --step-0: clamp(.94rem, .91rem + .15vw, 1rem);
  --step-1: clamp(1.1rem, 1.04rem + .3vw, 1.25rem);
  --step-2: clamp(1.32rem, 1.2rem + .6vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.36rem + 1.1vw, 2.15rem);
  --step-4: clamp(1.95rem, 1.5rem + 2vw, 3rem);
  --step-5: clamp(2.35rem, 1.6rem + 3.4vw, 4.1rem);

  /* Spacing and shape */
  --wrap: 1200px;
  --wrap-narrow: 860px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 28px 60px -20px rgba(0, 0, 0, .75);
  --header-h: 68px;
  --header-h-small: 54px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  min-height: 100vh;
  background: var(--navy-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fixed atmospheric wash. Cheap: one element, no repaint on scroll. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 92, 255, .17), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(79, 179, 217, .11), transparent 60%),
    radial-gradient(1100px 700px at 50% 108%, rgba(104, 69, 240, .12), transparent 66%),
    var(--navy-900);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--purple-300); text-decoration: none; }
a:hover { color: var(--purple-400); }
:focus-visible {
  outline: 2px solid var(--purple-400);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { text-wrap: pretty; }

/* Numbers get the mono face wherever they carry meaning. */
.num, .money, td.num, th.num, .stat-value, .price, code, kbd, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.01em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; top: -60px; left: 12px; z-index: 200;
  background: var(--purple-500); color: #fff; padding: .6rem 1rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 600;
  transition: top .18s var(--ease);
}
.skip:focus { top: 0; color: #fff; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(3rem, 7vw, 6rem); position: relative; }
.section-tight { padding-block: clamp(2rem, 4vw, 3.25rem); }
.section + .section { padding-top: 0; }

.section-head { max-width: 62ch; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section-head .eyebrow { margin-bottom: .6rem; }
.section-head p { color: var(--text-soft); font-size: var(--step-1); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--purple-300);
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--purple-500), transparent);
}

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.row-between { justify-content: space-between; }
.row-end { justify-content: flex-end; }
.spacer { flex: 1 1 auto; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed; inset: 0 0 auto; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--purple-500), var(--purple-300), var(--cyan));
  box-shadow: 0 0 12px var(--purple-glow);
  transform-origin: 0 50%;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(7, 11, 24, .55);
  border-bottom: 1px solid transparent;
  transition: height .28s var(--ease), background .28s var(--ease),
              border-color .28s var(--ease), backdrop-filter .28s var(--ease);
}
/* The condensing header — the class is added by app.js past 40px. */
.site-header.is-scrolled {
  height: var(--header-h-small);
  background: rgba(7, 11, 24, .88);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9);
}
.header-inner { display: flex; align-items: center; gap: 1rem; width: 100%; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); flex: 0 0 auto; }
.brand-mark { width: 26px; height: 26px; filter: drop-shadow(0 0 10px var(--purple-glow)); transition: transform .3s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-text { font-family: var(--font-head); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-size: 1.06rem; }
.brand-text strong { font-weight: 800; }
.brand-text em {
  font-style: normal; font-weight: 800; margin-left: .3rem;
  background: linear-gradient(120deg, var(--purple-300), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.site-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.site-nav > a {
  padding: .45rem .7rem; border-radius: var(--r-sm);
  color: var(--text-soft); font-weight: 500; font-size: .93rem;
  position: relative; transition: color .18s, background .18s;
}
.site-nav > a:hover { color: var(--text); background: var(--surface-2); }
.site-nav > a.is-current { color: #fff; }
.site-nav > a.is-current::after {
  content: ''; position: absolute; left: .7rem; right: .7rem; bottom: .16rem;
  height: 2px; border-radius: 2px; background: var(--purple-400);
}

.nav-end { display: flex; align-items: center; gap: .6rem; margin-left: .6rem; padding-left: .75rem; border-left: 1px solid var(--line); }

.live-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  padding: .3rem .6rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft);
}
.live-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--dim);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, .6);
}
.live-pill.is-online .dot { background: var(--green); animation: pulse 2.4s ease-out infinite; }
.live-pill.is-offline .dot { background: var(--red); }
.live-max { color: var(--dim); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .55); }
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.nav-account { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); }
.nav-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.coin-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .26rem .55rem; border-radius: 999px;
  background: linear-gradient(135deg, rgba(232, 178, 58, .18), rgba(124, 92, 255, .16));
  border: 1px solid rgba(232, 178, 58, .35); color: var(--gold);
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
}
.coin-chip svg { width: 13px; height: 13px; }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 4px; place-items: center; }
.nav-toggle-bars i { display: block; width: 17px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .22s var(--ease), opacity .22s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Announcement + flashes ─────────────────────────────────────────────── */
.announcement { padding: .6rem 0; font-size: .9rem; font-weight: 500; text-align: center; border-bottom: 1px solid var(--line); }
.announcement-info { background: rgba(79, 179, 217, .12); color: #b6e2f2; }
.announcement-warning { background: rgba(232, 178, 58, .13); color: #f6dd9d; }
.announcement-success { background: rgba(61, 220, 151, .12); color: #a9f0cd; }

.flash-stack { display: grid; gap: .6rem; padding-top: 1.25rem; }
.flash {
  padding: .8rem 1rem; border-radius: var(--r); font-size: .94rem; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  border-left-width: 3px;
}
.flash-success { border-left-color: var(--green); background: rgba(61, 220, 151, .1); color: #b7f2d5; }
.flash-error { border-left-color: var(--red); background: rgba(240, 80, 122, .1); color: #ffc4d4; }
.flash-warning { border-left-color: var(--amber); background: rgba(232, 178, 58, .1); color: #f8e3ae; }
.flash-info { border-left-color: var(--cyan); background: rgba(79, 179, 217, .1); color: #c2e6f4; }
/* Signed-out store prompt: note text, then the Discord button on its own line. */
.flash.discord-note { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.flash.discord-note .btn { margin-left: auto; }
.pack-discount { margin: -.5rem 0 .8rem; color: var(--green); font-family: var(--font-mono); font-size: .78rem; font-weight: 700; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .68rem 1.15rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--line-strong); cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; letter-spacing: -.01em;
  text-align: center; white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); color: var(--btn-fg); border-color: var(--purple-400); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

.btn-primary {
  --btn-bg: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  --btn-fg: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px -10px var(--purple-glow), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px var(--purple-glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { --btn-bg: transparent; }
.btn-danger { --btn-bg: rgba(240, 80, 122, .16); --btn-fg: #ffc4d4; border-color: rgba(240, 80, 122, .4); }
.btn-danger:hover { border-color: var(--red); }
.btn-success { --btn-bg: rgba(61, 220, 151, .15); --btn-fg: #b7f2d5; border-color: rgba(61, 220, 151, .38); }
.btn-sm { padding: .42rem .8rem; font-size: .84rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; border-radius: 50%; }

/* ── Cards and surfaces ─────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card-hover { transition: transform .24s var(--ease), border-color .24s, box-shadow .24s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: .4rem; }
.card-lede { color: var(--text-soft); font-size: .95rem; }

.panel {
  background: rgba(10, 15, 32, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 2vw, 1.5rem);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-size: var(--step-1); }
.panel-head .hint { color: var(--muted); font-size: .84rem; }

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .55rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-soft);
}
.badge-purple { background: var(--purple-faint); border-color: rgba(124, 92, 255, .4); color: var(--purple-300); }
.badge-green { background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .38); color: #9cebc6; }
.badge-amber { background: rgba(232, 178, 58, .12); border-color: rgba(232, 178, 58, .38); color: #f2d492; }
.badge-red { background: rgba(240, 80, 122, .12); border-color: rgba(240, 80, 122, .38); color: #ffb6c9; }
.badge-cyan { background: rgba(79, 179, 217, .12); border-color: rgba(79, 179, 217, .38); color: #a8dcef; }
.badge-muted { color: var(--dim); }

.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
.hero-title { font-size: var(--step-5); font-weight: 800; letter-spacing: -.035em; margin-bottom: 1rem; }
.hero-title .grad {
  background: linear-gradient(115deg, #fff 8%, var(--purple-300) 45%, var(--cyan) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: var(--step-1); color: var(--text-soft); max-width: 54ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.25rem; color: var(--muted); font-size: .84rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust svg { width: 15px; height: 15px; color: var(--green); flex: 0 0 auto; }

/* Live server card in the hero */
.server-card { position: relative; }
.server-card .gauge { display: grid; gap: .5rem; margin: 1rem 0 1.25rem; }
.gauge-track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.gauge-fill {
  height: 100%; width: var(--pct, 0%); border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-500), var(--cyan));
  box-shadow: 0 0 14px var(--purple-glow);
  transition: width .8s var(--ease);
}
.gauge-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .75rem; }
.stat {
  padding: .8rem; border-radius: var(--r); text-align: center;
  background: var(--surface); border: 1px solid var(--line);
}
.stat-value { display: block; font-size: var(--step-2); font-weight: 700; color: #fff; line-height: 1.1; }
.server-state.is-online { color: var(--green); }
.server-state.is-offline { color: var(--red); }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }

/* ── Feature blocks ─────────────────────────────────────────────────────── */
.feature { display: grid; gap: .6rem; }
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--purple-faint); border: 1px solid rgba(124, 92, 255, .3); color: var(--purple-300);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: var(--step-1); }
.feature p { color: var(--text-soft); font-size: .93rem; }

/* ── Store ──────────────────────────────────────────────────────────────── */
/* FIVE across on a desktop wrap, not four-plus-an-orphan. 250px could not fit five in
   1200px; 195px can, and the cards were never using the extra width for anything. */
.tier-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); align-items: stretch; }

.tier {
  --tier: var(--purple-500);
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  padding: 1.35rem 1.25rem 1.25rem;
  position: relative; overflow: hidden;
  transition: transform .26s var(--ease), border-color .26s, box-shadow .26s;
}
.tier::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, transparent, var(--tier), transparent);
  opacity: .85;
}
.tier::after {
  content: ''; position: absolute; inset: -40% -30% auto auto; width: 220px; height: 220px;
  background: radial-gradient(circle, var(--tier), transparent 68%);
  opacity: .12; pointer-events: none;
}
.tier:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tier) 45%, transparent); box-shadow: var(--shadow); }
.tier.is-featured { border-color: color-mix(in srgb, var(--tier) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier) 30%, transparent), var(--shadow); }
.tier.is-current { border-color: rgba(61, 220, 151, .5); }

.tier-flag {
  position: absolute; top: .9rem; right: .9rem;
  font-family: var(--font-head); font-size: .66rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .22rem .5rem; border-radius: 999px;
  background: var(--tier); color: #0b0f1c;
}
.tier-name { font-size: var(--step-2); margin-bottom: .1rem; color: #fff; }
.tier-name .rank-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tier); margin-right: .45rem; vertical-align: middle; box-shadow: 0 0 10px var(--tier); }
.tier-blurb { color: var(--text-soft); font-size: .9rem; min-height: 2.8em; }

.price-line { display: flex; align-items: baseline; gap: .35rem; margin: .9rem 0 .3rem; }
.price { font-family: var(--font-mono); font-size: var(--step-3); font-weight: 700; color: #fff; letter-spacing: -.03em; }
.price-per { color: var(--muted); font-size: .85rem; }
.price-was { color: var(--dim); font-size: .85rem; text-decoration: line-through; font-family: var(--font-mono); }

.tier-priority {
  display: flex; align-items: center; gap: .5rem; margin: .35rem 0 .9rem;
  font-family: var(--font-mono); font-size: .8rem; color: var(--muted);
}
.tier-priority b { color: var(--purple-300); }

.perks { list-style: none; padding: 0; display: grid; gap: .38rem; margin-block: .35rem .7rem; flex: 1 1 auto; }
.perks li { display: grid; grid-template-columns: 16px 1fr; gap: .55rem; font-size: .88rem; color: var(--text-soft); line-height: 1.45; }
.perks li::before {
  content: ''; width: 16px; height: 16px; margin-top: .18rem; border-radius: 50%;
  background: var(--purple-faint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l2.8 2.8 6-6.6' fill='none' stroke='%239b84ff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

.pack-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); }
.pack { text-align: center; position: relative; overflow: hidden; }
.pack-coins { display: flex; align-items: baseline; justify-content: center; gap: .3rem; margin: .55rem 0 .1rem; }
.pack-coins b { font-family: var(--font-mono); font-size: var(--step-3); font-weight: 700; color: var(--gold); letter-spacing: -.03em; }
.pack-coins span { color: var(--muted); font-size: .82rem; }
.pack-bonus { color: var(--green); font-family: var(--font-mono); font-size: .82rem; font-weight: 700; }
.pack-price { font-family: var(--font-mono); font-size: var(--step-1); font-weight: 700; color: #fff; margin: .6rem 0 .8rem; }
.pack-tagline { color: var(--muted); font-size: .84rem; min-height: 2.6em; }

.buy-form { display: grid; gap: .6rem; }
.buy-toggle {
  display: flex; align-items: flex-start; gap: .55rem; padding: .6rem .7rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: .82rem; color: var(--text-soft); cursor: pointer; text-align: left;
}
.buy-toggle input { margin-top: .2rem; }
.buy-toggle b { color: var(--text); }
.buy-terms { font-size: .76rem; color: var(--dim); display: flex; gap: .45rem; align-items: flex-start; }
.buy-terms input { margin-top: .22rem; }

.sandbox-banner {
  border: 1px dashed rgba(232, 178, 58, .5); background: rgba(232, 178, 58, .08);
  color: #f4dda2; padding: .85rem 1rem; border-radius: var(--r); font-size: .88rem;
}

/* ── Rules / content pages ──────────────────────────────────────────────── */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-hero h1 { margin-bottom: .6rem; }
.page-hero p { color: var(--text-soft); font-size: var(--step-1); max-width: 62ch; }

.content-layout { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 230px minmax(0, 1fr); align-items: start; }

.section-nav { position: sticky; top: calc(var(--header-h) + 1.25rem); display: grid; gap: .15rem; }
.section-nav h2 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: .5rem; }
.section-nav a {
  display: block; padding: .42rem .7rem; border-radius: var(--r-sm);
  color: var(--muted); font-size: .87rem; font-weight: 500;
  border-left: 2px solid transparent; transition: color .18s, background .18s, border-color .18s;
}
.section-nav a:hover { color: var(--text); background: var(--surface); }
.section-nav a.is-active { color: #fff; background: var(--purple-faint); border-left-color: var(--purple-400); }

.rule-block { scroll-margin-top: calc(var(--header-h) + 24px); }
.rule-block + .rule-block { margin-top: 1.1rem; }
.rule-block h2 { font-size: var(--step-2); display: flex; align-items: center; gap: .7rem; }
.rule-index {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--purple-faint); border: 1px solid rgba(124, 92, 255, .3); color: var(--purple-300);
}
.rule-summary { color: var(--muted); font-size: .93rem; margin: .5rem 0 .9rem; }
.rule-list { list-style: none; padding: 0; display: grid; gap: .55rem; }
.rule-list li {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem;
  padding: .6rem .8rem; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .92rem; color: var(--text-soft); line-height: 1.5;
}
.rule-list li b, .rule-list li strong { color: var(--text); }
.rule-list li .bullet-num {
  font-family: var(--font-mono); font-size: .74rem; color: var(--purple-400); font-weight: 700;
  padding-top: .12rem;
}

/* Keybind rows on the controls page get the mono treatment */
kbd {
  display: inline-block; padding: .12rem .45rem; border-radius: 6px;
  background: var(--navy-700); border: 1px solid var(--line-strong);
  border-bottom-width: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, .5);
  font-size: .82rem; font-weight: 700; color: #fff; white-space: nowrap;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(10, 15, 32, .5); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--navy-800); color: var(--text-soft);
  font-family: var(--font-head); font-size: .74rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  text-align: left; padding: .7rem .8rem; white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
tbody td { padding: .65rem .8rem; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: rgba(124, 92, 255, .05); }
td.num, th.num { text-align: right; }
td.tight, th.tight { white-space: nowrap; }
tfoot td { padding: .7rem .8rem; border-top: 2px solid var(--line-strong); font-weight: 700; background: rgba(124, 92, 255, .06); }
.table-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* On narrow screens data tables become stacked cards via data-label attributes */
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards tbody tr { display: grid; gap: .3rem; padding: .8rem; border-top: 1px solid var(--line); }
  .table-cards tbody td { display: grid; grid-template-columns: 40% 1fr; gap: .6rem; padding: .18rem 0; border: 0; }
  .table-cards tbody td::before {
    content: attr(data-label); color: var(--dim); font-size: .75rem;
    text-transform: uppercase; letter-spacing: .06em;
  }
  .table-cards td.num { text-align: left; }
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field > label, .label { font-size: .85rem; font-weight: 600; color: var(--text-soft); }
.field .help { font-size: .8rem; color: var(--dim); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: .62rem .75rem;
  background: rgba(5, 8, 15, .6); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
  background: rgba(5, 8, 15, .8);
}
input[type="number"], input[type="date"], .money-input { font-family: var(--font-mono); }
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%2394a0bd' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 12px;
  padding-right: 2rem;
}
.field-row { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.checkline { display: flex; align-items: flex-start; gap: .55rem; font-size: .88rem; color: var(--text-soft); }
.checkline input { margin-top: .25rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin-bottom: 1rem; }
legend { padding-inline: .5rem; font-family: var(--font-head); font-size: .85rem; font-weight: 700; color: var(--purple-300); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #ffb6c9; font-size: .85rem; }

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-shell { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; padding-block: clamp(2rem, 6vw, 5rem); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: var(--step-3); margin-bottom: .5rem; }
.auth-card .lede { color: var(--text-soft); margin-bottom: 1.5rem; font-size: .95rem; }
.btn-discord {
  --btn-bg: #5865f2; --btn-fg: #fff; border-color: transparent;
  box-shadow: 0 10px 26px -12px rgba(88, 101, 242, .8);
}
.btn-discord svg { width: 19px; height: 19px; }
.auth-aside { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }

.code-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
.code-grid code {
  display: block; padding: .55rem .7rem; text-align: center;
  background: var(--navy-800); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: .95rem; letter-spacing: .08em; color: #fff;
}
.qr-box { background: #fff; padding: .8rem; border-radius: var(--r); width: max-content; margin-inline: auto; }
.qr-box svg { width: 200px; height: 200px; }
.secret-box {
  font-family: var(--font-mono); font-size: .95rem; letter-spacing: .1em; word-break: break-all;
  background: var(--navy-800); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: .7rem .8rem; color: var(--purple-300);
}
.otp-input { font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: .5em; text-align: center; }

/* ── Account ────────────────────────────────────────────────────────────── */
.account-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--purple-400); box-shadow: 0 0 18px var(--purple-glow); }
.account-header h1 { font-size: var(--step-3); }
.account-header .sub { color: var(--muted); font-size: .88rem; }

.subnav { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav a {
  padding: .45rem .8rem; border-radius: 999px; white-space: nowrap;
  color: var(--muted); font-size: .88rem; font-weight: 600;
}
.subnav a:hover { color: var(--text); background: var(--surface); }
.subnav a.is-current { background: var(--purple-faint); color: var(--purple-300); }

.wallet-card { display: grid; gap: .5rem; }
.wallet-value { font-family: var(--font-mono); font-size: var(--step-4); font-weight: 700; color: var(--gold); line-height: 1; letter-spacing: -.04em; }
.wallet-sub { color: var(--muted); font-size: .85rem; }

.kv { display: grid; gap: .45rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; font-size: .89rem; padding-bottom: .45rem; border-bottom: 1px dashed var(--line); }
.kv dt, .kv .k { color: var(--muted); }
.kv dd, .kv .v { color: var(--text); font-weight: 500; text-align: right; margin: 0; }

.timeline { display: grid; gap: .75rem; }
.timeline-item { display: grid; grid-template-columns: auto 1fr; gap: .8rem; font-size: .88rem; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--purple-400); margin-top: .5rem; box-shadow: 0 0 0 3px var(--purple-faint); }
.timeline-when { color: var(--dim); font-size: .78rem; }

/* ── Support ────────────────────────────────────────────────────────────── */
.ticket-list { display: grid; gap: .6rem; }
.ticket-row {
  display: grid; gap: .5rem; grid-template-columns: 1fr auto; align-items: center;
  padding: .9rem 1rem; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease);
}
.ticket-row:hover { border-color: var(--line-strong); transform: translateX(2px); }
.ticket-ref { font-family: var(--font-mono); font-size: .78rem; color: var(--purple-300); }
.ticket-subject { font-weight: 600; color: var(--text); }
.ticket-meta { color: var(--dim); font-size: .8rem; }

.thread { display: grid; gap: .9rem; }
.msg { display: grid; grid-template-columns: 38px 1fr; gap: .8rem; }
.msg-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--purple-300);
}
.msg-body {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: .85rem 1rem;
}
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin-bottom: .4rem; }
.msg-author { font-weight: 700; font-size: .9rem; }
.msg-when { color: var(--dim); font-size: .78rem; }
.msg-text { white-space: pre-wrap; font-size: .93rem; color: var(--text-soft); line-height: 1.6; }
.msg.is-staff .msg-body { background: rgba(124, 92, 255, .08); border-color: rgba(124, 92, 255, .28); }
.msg.is-staff .msg-avatar { background: var(--purple-faint); border-color: rgba(124, 92, 255, .4); }
.msg.is-internal .msg-body { background: rgba(232, 178, 58, .08); border-color: rgba(232, 178, 58, .32); border-style: dashed; }
.msg.is-system .msg-body { background: transparent; border-style: dashed; }
.msg.is-system .msg-text { color: var(--muted); font-style: italic; font-size: .87rem; }

/* ── Admin ──────────────────────────────────────────────────────────────── */
.page-admin { --wrap: 1440px; }
.admin-bar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(7, 11, 24, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: top .28s var(--ease);
}
.site-header.is-scrolled ~ main .admin-bar { top: var(--header-h-small); }
.admin-nav { display: flex; gap: .2rem; overflow-x: auto; padding: .5rem 0; scrollbar-width: thin; }
.admin-nav a {
  padding: .4rem .75rem; border-radius: var(--r-sm); white-space: nowrap;
  color: var(--muted); font-size: .85rem; font-weight: 600;
}
.admin-nav a:hover { color: var(--text); background: var(--surface); }
.admin-nav a.is-current { background: var(--purple-faint); color: var(--purple-300); }
.admin-nav .nav-count {
  display: inline-block; margin-left: .35rem; padding: 0 .35rem; border-radius: 999px;
  background: var(--red); color: #fff; font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
}

.metric-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.metric { padding: 1rem 1.1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.metric-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.metric-value { font-family: var(--font-mono); font-size: var(--step-3); font-weight: 700; color: #fff; line-height: 1.15; letter-spacing: -.03em; }
.metric-foot { font-size: .8rem; color: var(--muted); }
.metric.is-good { border-color: rgba(61, 220, 151, .3); }
.metric.is-warn { border-color: rgba(232, 178, 58, .35); }
.metric.is-bad { border-color: rgba(240, 80, 122, .4); }

/* A tiny CSS bar chart. No charting library, no JS. */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: .75rem; }
.bars .bar { flex: 1 1 0; min-width: 4px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--purple-400), var(--purple-600));
  height: var(--h, 2%); position: relative; transition: filter .15s; }
.bars .bar:hover { filter: brightness(1.35); }
.bars .bar::after {
  content: attr(data-tip); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--navy-700); border: 1px solid var(--line-strong); border-radius: 6px;
  padding: .2rem .45rem; font-family: var(--font-mono); font-size: .7rem; color: #fff;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.bars .bar:hover::after { opacity: 1; }

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1.25rem; }
.filter-bar .field { margin: 0; min-width: 140px; }

.pager { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pager a, .pager span {
  padding: .4rem .7rem; border-radius: var(--r-sm); font-family: var(--font-mono); font-size: .84rem;
  border: 1px solid var(--line); color: var(--muted);
}
.pager a:hover { border-color: var(--purple-400); color: var(--text); }
.pager .is-current { background: var(--purple-faint); border-color: rgba(124, 92, 255, .4); color: var(--purple-300); }

.split { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.split-even { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.ledger-lines { font-family: var(--font-mono); font-size: .84rem; }
.ledger-lines .indent { padding-left: 1.75rem; }

.perm-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.perm-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--purple-300); margin-bottom: .5rem; }
.perm-group label { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: var(--text-soft); padding: .18rem 0; }

.level-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .16rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
  border: 1px solid currentColor; background: rgba(255, 255, 255, .04);
}

.copy-box { display: flex; gap: .5rem; align-items: center; }
.copy-box code {
  flex: 1 1 auto; padding: .55rem .7rem; border-radius: var(--r-sm);
  background: var(--navy-800); border: 1px solid var(--line-strong);
  font-size: .9rem; color: var(--green); overflow-x: auto; white-space: nowrap;
}

details.disclose { border: 1px solid var(--line); border-radius: var(--r); padding: .75rem 1rem; background: var(--surface); }
details.disclose + details.disclose { margin-top: .6rem; }
details.disclose summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
details.disclose[open] summary { margin-bottom: .8rem; color: var(--purple-300); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { margin-top: clamp(3rem, 8vw, 6rem); border-top: 1px solid var(--line); background: rgba(5, 8, 15, .55); padding-top: clamp(2rem, 4vw, 3rem); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr)); }
.footer-brand .brand-mark { width: 24px; height: 24px; margin-bottom: .75rem; }
.footer-tag { font-size: .92rem; color: var(--text-soft); margin-bottom: .6rem; }
.footer-tag strong { font-family: var(--font-head); color: #fff; }
.footer-note { font-size: .8rem; color: var(--dim); max-width: 40ch; }
.footer-col { display: grid; gap: .4rem; align-content: start; }
.footer-col h2 { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); margin-bottom: .3rem; }
.footer-col a { color: var(--text-soft); font-size: .88rem; }
.footer-col a:hover { color: var(--purple-300); }
.footer-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  margin-top: 2rem; padding-block: 1.1rem; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--dim);
}

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
/* Elements start slightly offset and settle as they enter the viewport.
   Only applied when JS has marked the document, so a no-JS visitor sees
   everything immediately rather than a blank page. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .content-layout { grid-template-columns: 1fr; }
  .section-nav {
    position: static; display: flex; gap: .35rem; overflow-x: auto;
    padding-bottom: .5rem; border-bottom: 1px solid var(--line);
  }
  .section-nav h2 { display: none; }
  .section-nav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .section-nav a.is-active { border-left-color: transparent; border-bottom-color: var(--purple-400); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .server-card { order: -1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto;
    display: grid; gap: .2rem; margin: 0;
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
    background: rgba(7, 11, 24, .98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-14px);
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: transform .24s var(--ease), opacity .24s, visibility .24s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .site-nav > a { padding: .7rem .8rem; font-size: 1rem; }
  .site-nav > a.is-current::after { left: .8rem; right: auto; width: 18px; bottom: .5rem; }
  .nav-end { margin: .75rem 0 0; padding: .75rem 0 0; border-left: 0; border-top: 1px solid var(--line); justify-content: space-between; width: 100%; }
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 560px) {
  .hero-actions .btn { width: 100%; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .field { width: 100%; }
  .panel-head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .footer-bar { flex-direction: column; }
  .code-grid { grid-template-columns: 1fr 1fr; }
}

/* Print: a receipt or a rule sheet should print cleanly. */
@media print {
  body { background: #fff; color: #000; }
  body::before, .site-header, .site-footer, .scroll-progress, .subnav, .admin-bar, .btn { display: none !important; }
  .card, .panel { border: 1px solid #ccc; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}


/* ── Store: compact ranks, and the Discord button ────────────────────────── */

/* Rank comparison on the store: ranks across, key perks down, a buy button under each.
   Scrolls sideways inside .table-wrap on a phone, with the perk column pinned on the left. */
.rank-compare table { min-width: 760px; table-layout: fixed; }
.rank-compare thead th, .rank-compare tbody td, .rank-compare tbody th, .rank-compare tfoot td, .rank-compare tfoot th {
  text-align: center; vertical-align: middle; white-space: normal;
}
.rank-compare .cmp-label {
  width: 190px; text-align: left; position: sticky; left: 0; z-index: 2;
  background: var(--navy-800); color: var(--text); font-family: var(--font-body);
  font-size: .86rem; font-weight: 600; letter-spacing: 0; text-transform: none;
}
.rank-compare tbody th.cmp-label { border-top: 1px solid var(--line); padding: .65rem .8rem; }
.rank-compare thead th.cmp-label { color: var(--dim); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.rank-compare .cmp-sub { display: block; font-size: .74rem; font-weight: 400; color: var(--dim); margin-top: .1rem; }
.rank-compare .cmp-rank { --tier: var(--purple-500); box-shadow: inset 0 3px 0 var(--tier); padding-block: .9rem .75rem; }
.rank-compare .cmp-rank.is-current { background: rgba(61, 220, 151, .08); }
.rank-compare .cmp-name { display: block; font-size: .95rem; color: #fff; letter-spacing: 0; text-transform: none; }
.rank-compare .cmp-name .rank-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tier); margin-right: .4rem; vertical-align: middle; }
.rank-compare .cmp-price { display: block; margin-top: .3rem; font-size: 1.05rem; color: #fff; letter-spacing: -.02em; text-transform: none; }
.rank-compare .cmp-price small { font-family: var(--font-body); font-size: .72rem; color: var(--muted); letter-spacing: 0; }
.rank-compare .cmp-flag {
  display: inline-block; margin-top: .4rem; padding: .16rem .5rem; border-radius: 999px;
  font-size: .62rem; font-weight: 800; background: var(--tier); color: #0b0f1c;
}
.rank-compare .cmp-flag.is-current { background: var(--green); }
.rank-compare .cmp-cell b { color: var(--text); }
.rank-compare .cmp-yes, .rank-compare .cmp-no {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 700;
}
.rank-compare .cmp-yes { background: rgba(61, 220, 151, .14); color: var(--green); }
.rank-compare .cmp-no { background: var(--surface-2); color: var(--dim); font-size: .8rem; }
.rank-compare tfoot td { background: transparent; font-weight: 400; vertical-align: top; }
.rank-compare tfoot th.cmp-label { border-top: 2px solid var(--line-strong); }
.rank-compare .buy-form { gap: .45rem; }
@media (max-width: 560px) { .rank-compare table { min-width: 640px; } .rank-compare .cmp-label { width: 128px; } }
.cmp-renew { display: flex; gap: .35rem; align-items: center; justify-content: center; font-size: .74rem; color: var(--muted); cursor: pointer; }
.final-sale { margin-top: .6rem; font-size: .78rem; color: var(--muted); }
.pack .final-sale { margin: 0; font-size: .72rem; }
.test-note, .page-hero .test-note { font-size: .8rem; color: var(--muted); }

/* Tighter type inside a 195px card, so five across does not force a wrap mid-word. */
.tier-grid .tier-name { font-size: 1rem; }
.tier-grid .perks li { font-size: .82rem; line-height: 1.4; }

.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.btn-icon { width: 1em; height: 1em; margin-right: .4em; vertical-align: -.12em; }
.nav-discord { margin-inline-start: .35rem; }

/* The sign-in / join pair. Blurple is the primary action (it is the only way in);
   the outline variant is the secondary "come and say hello" one, so the two never
   compete for the same click. */
.btn-discord-outline {
  --btn-bg: transparent; --btn-fg: #c6ccff;
  border-color: rgba(88, 101, 242, .55);
}
.btn-discord-outline:hover {
  --btn-bg: rgba(88, 101, 242, .14); --btn-fg: #fff;
  border-color: #5865f2;
}
/* The global focus ring is purple-400, which all but vanishes on blurple. */
.btn-discord:focus-visible, .btn-discord-outline:focus-visible {
  outline-color: #cfd4ff; outline-offset: 3px;
}
.btn .discord-mark { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

/* Stacked, full-width, and allowed to wrap: on a 320px screen "Sign in with Discord"
   is wider than the button, and .btn is nowrap by default - which would overflow. */
.auth-actions { display: grid; gap: .7rem; }
.auth-actions .btn { white-space: normal; }
.auth-actions .flash { margin: 0; }
.auth-actions-note { margin: .1rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }


/* ── Brand artwork ───────────────────────────────────────────────────────── */

/* The mark is a raster now, not an inline SVG, so it needs an explicit box or it will render at
   its natural 256px for one frame and shove the whole header sideways. */
img.brand-mark { width: 32px; height: 32px; object-fit: contain; display: block; }

/* The logo behind the top of the page. VERY faint and pinned to the top-right: it is texture, not
   decoration, and anything more legible than this fights the headline for attention.
   pointer-events:none so it can never eat a click, and it is hidden from assistive tech. */
.page-hero, .home-hero { position: relative; isolation: isolate; }
.page-hero::after, .home-hero::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -12%; right: -6%; width: min(46vw, 520px); aspect-ratio: 1;
  background: url('/assets/img/logo-512.png') center / contain no-repeat;
  opacity: .07; filter: saturate(1.2);
}
@media (max-width: 720px) {
  .page-hero::after, .home-hero::after { width: 70vw; right: -18%; opacity: .05; }
}
@media (prefers-reduced-motion: no-preference) {
  .page-hero::after, .home-hero::after { transition: opacity .4s ease; }
}


/* ── Store: the switcher ─────────────────────────────────────────────────── */

.store-switch {
  display: grid; gap: .7rem; margin-top: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* Buttony, with real depth. A flat bar was tried here before and read as decoration rather than
   as something to press -- the fill, the hairline and the lift on hover are what say "button". */
.store-switch-btn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .85rem;
  padding: .95rem 1.1rem; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.02)),
    var(--panel, rgba(255,255,255,.02));
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.store-switch-btn:hover,
.store-switch-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--purple-500);
  background:
    linear-gradient(180deg, rgba(155,132,255,.16), rgba(155,132,255,.04)),
    var(--panel, rgba(255,255,255,.02));
}
.store-switch-btn:active { transform: translateY(0); }

.store-switch-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; color: var(--purple-300, #bcaaff);
  background: var(--purple-faint, rgba(155,132,255,.14));
  border: 1px solid rgba(155,132,255,.28);
}
.store-switch-icon svg { width: 22px; height: 22px; }
.store-switch-btn.is-coins .store-switch-icon {
  color: var(--gold, #e8b23a);
  background: rgba(232,178,58,.12);
  border-color: rgba(232,178,58,.3);
}

.store-switch-text { display: grid; gap: .1rem; min-width: 0; }
.store-switch-text strong { font-family: var(--font-head, inherit); font-size: 1.02rem; letter-spacing: -.01em; }
.store-switch-text em { font-style: normal; font-size: .8rem; color: var(--muted); line-height: 1.35; }

.store-switch-go {
  font-size: 1.1rem; color: var(--muted); transition: transform .16s ease, color .16s ease;
}
.store-switch-btn:hover .store-switch-go { transform: translateY(3px); color: var(--text); }

/* ── Store: coin pack artwork ────────────────────────────────────────────── */

/* Square, cropped, and bleeding to the card's edges under the badge. The source art is dark with
   a purple glow, so it sits on the card ground without needing a frame drawn around it. */
.pack-art {
  margin: -1px -1px .55rem; border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden; position: relative; aspect-ratio: 1; background: rgba(0,0,0,.35);
}
.pack-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Fades the bottom of the art into the card so the coins do not stop on a hard line above the
   text. A gradient, not a border: a rule there would cut the pile in half. */
.pack-art::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 42%;
  /* Fades to the PAGE ground (#070b18), not to a card colour -- .card has no solid background of
     its own, it is a translucent white gradient over the body. An earlier version faded to a
     guessed #12131c and left a faint band across every card where the two greys disagreed. */
  background: linear-gradient(to bottom, rgba(7, 11, 24, 0), rgba(7, 11, 24, .96));
  pointer-events: none;
}

.pack.has-art { padding-top: 0; overflow: hidden; }
.pack.has-art > .badge { position: absolute; top: .6rem; right: .6rem; z-index: 2; }
.pack.has-art .pack-name { margin-top: 0; }
.pack-name { font-size: var(--step-1); margin: .5rem 0 0; }

/* The art lifts a touch with the card, which makes the whole thing feel like one object. */
.pack.has-art .pack-art img { transition: transform .3s ease; }
.pack.card-hover:hover .pack-art img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .pack.has-art .pack-art img,
  .store-switch-btn,
  .store-switch-go { transition: none; }
  .pack.card-hover:hover .pack-art img { transform: none; }
}

/* Bonus coins are the reason to buy a bigger pack, so they get to look like a prize. */
.pack-bonus {
  display: inline-block; margin: .15rem auto .1rem; padding: .16rem .5rem;
  border-radius: 999px; font-size: .78rem;
  color: var(--green, #5fd3a6); background: rgba(95,211,166,.12);
  border: 1px solid rgba(95,211,166,.28);
}

/* ── Rule cards ─────────────────────────────────────────────────────────────
   The rules page renders objects copied straight out of the game's own rules
   file, so a rule keeps its tag pill, its title and its explanation. The
   `is-allowed` variant is the game's green treatment for things players ARE
   permitted to do — losing that distinction would turn a permission into what
   reads like another ban. */
.rule-item { align-items: start; }
.rule-item > span:last-child { display: grid; gap: .3rem; }

.rule-tag {
  display: inline-block; align-self: start;
  padding: .12rem .5rem; border-radius: 999px;
  background: var(--purple-faint); border: 1px solid rgba(124, 92, 255, .35);
  color: var(--purple-300);
  font-family: var(--font-head); font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.rule-tag.is-allowed {
  background: rgba(61, 220, 151, .12);
  border-color: rgba(61, 220, 151, .4);
  color: #9cebc6;
}

.rule-title { color: var(--text); font-weight: 600; line-height: 1.4; }
.rule-body { color: var(--muted); font-size: .88rem; line-height: 1.55; }

/* Green left edge, matching the in-game card. */
.rule-list li.rule-item.is-allowed {
  border-color: rgba(61, 220, 151, .32);
  border-left: 3px solid var(--green);
  background: rgba(61, 220, 151, .05);
}
.rule-list li.rule-item.is-allowed .rule-title { color: #cdf5e3; }
.rule-item.is-allowed .bullet-num { color: var(--green); }

/* ── Priority support badge ─────────────────────────────────────────────────
   Shown wherever a ticket from a paying member appears, so "priority support"
   is a visible thing staff act on rather than a line on a sales page. */
.badge-priority {
  background: linear-gradient(135deg, rgba(232, 178, 58, .2), rgba(124, 92, 255, .2));
  border-color: rgba(232, 178, 58, .45);
  color: #f4d68f;
}
.ticket-row.is-priority { border-left: 3px solid var(--gold); }
tr.is-priority td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* ── Cookie notice ──────────────────────────────────────────────────────────
   Deliberately a NOTICE, not a consent gate with buttons that do nothing. The
   site sets no cookie at all until you sign in, so there is nothing to refuse;
   pretending otherwise with a fake "reject" would be worse than saying so. */
.cookie-notice {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%) translateY(140%);
  z-index: 80; width: min(680px, calc(100vw - 2rem));
  display: grid; gap: .75rem;
  padding: 1rem 1.15rem; border-radius: var(--r-lg);
  background: rgba(10, 15, 32, .97);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  opacity: 0;
}
.cookie-notice.is-shown { transform: translateX(-50%) translateY(0); opacity: 1; }
.cookie-notice p { font-size: .87rem; color: var(--text-soft); margin: 0; }
.cookie-notice strong { color: var(--text); }
.cookie-notice .cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 560px) {
  .cookie-notice { bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100vw; }
}
