/* ── BALLIN TYCOON · legal + support stylesheet ────────────────────────────
   Retheme 2026-08-21 to match the rebuilt landing and hiscores pages: same
   tokens, same dusk backdrop (the game's World-1 carnival art), same glass
   surfaces, same pill nav. Every class name is unchanged, so all eleven
   /legal pages and /support pick this up without touching their markup.

   The old palette was a flat charcoal page with an orange accent — it read
   like a different product from the rest of the site. */

:root {
  --ink:       #eef3ff;
  --ink-dim:   #a9b4d0;
  --ink-faint: #6f7b99;
  --pink:      #ff3aa8;
  --cyan:      #36e0ff;
  --gold:      #ffc93c;
  --violet:    #a855f7;
  --glass:     rgba(16, 14, 32, 0.62);
  --hairline:  rgba(255, 255, 255, 0.12);

  /* Legacy names the page markup still uses, remapped onto the new system. */
  --bg:          #0a0714;
  --card:        rgba(16, 14, 32, 0.62);
  --muted:       #a9b4d0;
  --accent:      #ffc93c;
  --accent-soft: #ffe9a8;
  --rule:        rgba(255, 255, 255, 0.12);
  --warn-bg:     rgba(255, 201, 60, 0.10);
  --warn-fg:     #ffdf9a;
  --link:        #7fdcff;
}

* { box-sizing: border-box; }

html { background: #0a0714; }

html, body {
  margin: 0; padding: 0;
  /* Only the ROOT gets the base colour. `body` is a centred 780px column, so
     painting it opaque stamps a flat dark band over the fixed backdrop. */
  background: transparent;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6; font-size: 16px;
}

/* ── BACKDROP ──────────────────────────────────────────────────────────
   Two fixed layers behind the text: the dusk sky + carnival skyline, then
   a scrim. The art is PORTRAIT pixel art, so it is sized to HEIGHT and
   repeated on x — never `cover`, which blurs and crops it on desktop. */
html::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background:
    url('/assets/backdrops/backdrop_world1.png') repeat-x left bottom,
    linear-gradient(180deg, #1a0b2e 0%, #2a0f3d 22%, #3d1147 40%, #14091f 78%, #0a0714 100%);
  background-size: auto min(48vh, 520px), auto;
  image-rendering: pixelated;
}
html::after {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(110% 40% at 50% 6%, rgba(168, 85, 247, 0.26), transparent 62%),
    /* Heavier than the landing page's scrim: this is a page of body copy,
       and long paragraphs need a calm surface, not a busy one. */
    linear-gradient(180deg, rgba(10, 7, 20, 0.80) 0%, rgba(10, 7, 20, 0.88) 30%,
                             rgba(10, 7, 20, 0.94) 70%, #0a0714 100%);
}

body { padding: 30px 20px 80px; max-width: 780px; margin: 0 auto; }

/* ── HEADER ───────────────────────────────────────────────────────────── */
header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 4px; padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
header .brand {
  font-size: 19px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #ffe9a8 45%, var(--gold) 80%, #d98b1f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.5));
}
header a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
  color: var(--ink-dim); text-decoration: none;
  background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: color .16s, border-color .16s, transform .16s;
}
header a:hover { color: var(--ink); border-color: rgba(255,255,255,.3); transform: translateY(-1px); }

/* ── TYPE ─────────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(28px, 6vw, 40px); margin: 28px 0 6px;
  font-weight: 900; letter-spacing: .01em; line-height: 1.08;
  background: linear-gradient(180deg, #fff 0%, #ffe9a8 50%, var(--gold) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.45));
}
/* `.sub` carries a full sentence on several pages (support's is two lines
   long), so it stays sentence case — uppercasing it read as shouting. */
.sub {
  color: var(--ink-dim); font-size: 14.5px; font-weight: 600;
  line-height: 1.55; margin-bottom: 22px; max-width: 62ch;
}
h2 {
  font-size: 20px; margin: 34px 0 8px; color: #fff; font-weight: 900;
  letter-spacing: .01em;
}
h3 {
  font-size: 13px; margin: 24px 0 4px; color: var(--cyan);
  text-transform: uppercase; letter-spacing: .16em; font-weight: 900;
}
p { margin: 10px 0; color: #dfe6f5; }
ul { padding-left: 22px; margin: 8px 0; }
li { margin: 5px 0; color: #dfe6f5; }
a { color: var(--link); }
a:hover { color: #b9ecff; }
strong { color: #fff; }

/* ── SURFACES ─────────────────────────────────────────────────────────── */
.notice {
  background: var(--warn-bg); border: 1px solid rgba(255, 201, 60, 0.34);
  border-left: 4px solid var(--gold); color: var(--warn-fg);
  padding: 14px 18px; border-radius: 12px; font-size: 14.5px; margin: 20px 0;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.notice a { color: #ffe9a8; }
.toc {
  background: var(--glass); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 18px 24px; margin: 14px 0 30px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}
.toc ul { columns: 2; column-gap: 32px; }
.toc a { color: var(--ink-dim); text-decoration: none; font-weight: 700; }
.toc a:hover { color: var(--gold); }

footer {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--ink-faint); font-size: 12.5px;
}
footer a { color: var(--ink-dim); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ── LEGAL SUB-NAV ────────────────────────────────────────────────────── */
nav.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
nav.legal-nav a {
  background: var(--glass); color: var(--ink-dim);
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em;
  border: 1px solid var(--hairline);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: color .16s, border-color .16s, transform .16s;
}
nav.legal-nav a:hover {
  color: var(--ink); border-color: rgba(255, 201, 60, .5); transform: translateY(-1px);
}

/* Shared focus ring + instant taps, matching landing.html and the hiscores. */
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 540px) {
  .toc ul { columns: 1; }
  body { padding: 22px 16px 60px; }
  header { gap: 10px; }
}
