/* Legal document typography — /privacy-policy, /terms, /refund-policy.

   V109. These three pages used to render inside a deliberately minimal
   `legal-header` of their own. They render inside layout/header.php +
   layout/footer.php now, like every other page, so the rules that used to be safe
   here are not any more. What changed, and why:

   TRIMMED — the minimal header and a footer that was never rendered:
     .legal-header / .legal-nav / .legal-brand / .legal-navlinks (+ their
     max-width:780px rule) and .legal-footer / .legal-footer-row /
     .legal-footer-links. The five-link legal strip is replaced by the site's real
     nav (with the TOURNAMENT / STORE / RIFT LAB / BLOG dropdowns, the account
     button, the cart badge and the language toggle), and the .legal-footer rules
     never had matching markup — these pages have always used the shared footer.

   SCOPED — everything that used to be a bare selector is now confined to the
   page's own `.nx-legal` wrapper:
     :root  -> .nx-legal   The palette redefined --bg, --line, --muted, --text,
                           --green and --gold at the document root. Those names are
                           the site's own; at :root they leaked into the real header
                           and footer. On the wrapper they reach the document body
                           copy and nothing else.
     body   -> .nx-legal   Inter at line-height 1.72 over its own gradient — applied
                           site-wide it re-typeset the header and footer too.
     a      -> .nx-legal a Green underlined-on-hover links, which is a document
                           convention, not the chrome's.
     *      -> .nx-legal *

   The .legal-* document rules below are untouched: those class names are unique to
   this file and cannot reach the chrome. */

.nx-legal {
  --bg: #070b12;
  --panel: #0d1420;
  --panel2: #111b2a;
  --text: #f6f8fb;
  --muted: #9aa7b8;
  --line: rgba(255, 255, 255, .1);
  --green: #45f882;
  --gold: #f3c969;
  --danger: #ff7788;
  background: radial-gradient(circle at 20% 0, rgba(69, 248, 130, .08), transparent 30%), var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.72;
}
.nx-legal * { box-sizing: border-box; }
.nx-legal a { color: var(--green); text-decoration: none; }
.nx-legal a:hover { text-decoration: underline; }
html { scroll-behavior: smooth; }

.legal-wrap{width:min(1040px,calc(100% - 32px));margin:auto}
.legal-hero{padding:72px 0 34px}
.legal-kicker{color:var(--green);font-weight:800;letter-spacing:.14em;text-transform:uppercase;font-size:12px}
.legal-hero h1{font:700 clamp(38px,7vw,68px)/1 Rajdhani,Inter,sans-serif;margin:12px 0 18px}
.legal-hero p{max-width:760px;color:var(--muted);font-size:16px}
.legal-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.legal-chip{padding:7px 11px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:12px}
.legal-grid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:28px;padding-bottom:80px}
/* top: clears the site header, which is sticky on this page now. */
.legal-toc{position:sticky;top:96px;align-self:start;border:1px solid var(--line);background:rgba(13,20,32,.78);border-radius:16px;padding:18px}
.legal-toc strong{display:block;margin-bottom:10px}
.legal-toc a{display:block;color:var(--muted);padding:7px 0;font-size:13px}
.legal-doc{min-width:0}
.legal-section{scroll-margin-top:100px;background:linear-gradient(145deg,rgba(17,27,42,.9),rgba(10,16,25,.9));border:1px solid var(--line);border-radius:18px;padding:28px;margin-bottom:18px}
.legal-section h2{font:700 28px Rajdhani,Inter,sans-serif;margin:0 0 12px}
.legal-section h3{font-size:17px;margin:22px 0 8px}
.legal-section p,.legal-section li{color:#c7d0dc}
.legal-section ul{padding-left:22px}
.legal-note{border-left:3px solid var(--green);background:rgba(69,248,130,.06);padding:13px 15px;border-radius:8px;color:#dfffea}
.legal-warning{border-left-color:var(--gold);background:rgba(243,201,105,.07);color:#fff3cc}
@media(max-width:780px){.legal-grid{grid-template-columns:1fr}.legal-toc{position:static}.legal-hero{padding-top:48px}.legal-section{padding:20px}}

/* Phase 7 accessibility / motion preferences. Scoped for the same reason as the
   rest: nexus-motion.css owns the site-wide reduced-motion contract. */
.nx-legal :where(a,button,input,select,textarea):focus-visible{outline:3px solid #45F882;outline-offset:3px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.nx-legal :where(*),.nx-legal :where(*)::before,.nx-legal :where(*)::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
