/*
 * legal.css — the shared stylesheet for /privacy-policy, /terms-of-service
 * and /attribution.
 *
 * Replaces six per-page stylesheets (privacy_policy.css, policy_responsive.css,
 * privacy_policy_footer_responsive.css, terms_of_service.css,
 * terms_of_service_responsive.css, attribution.css, attribution_responsive.css
 * — about 60KB) with one file of roughly 300 lines. Those pages carried a
 * Bootstrap grid, display faces and a scroll-spy to lay out what is, in every
 * case, a single column of numbered prose.
 *
 * WHY THESE PAGES ARE LIGHT
 *
 * The rest of the site is dark because it wraps game art. These three carry no
 * art and they are the pages that ask someone to read at length — the same
 * argument that made /careers light on 2026-08-28. A privacy policy is also
 * read under duress: a player hunting the deletion clause, a store reviewer
 * checking a URL, a lawyer in diligence. Findability beats atmosphere, and
 * legal text set on a branded dark ground reads as marketing rather than as a
 * document of record.
 *
 * Palette and faces are careers.css's, deliberately, so the light pages read
 * as one system. As there: #30ff5d is built to glow on black and fails
 * contrast on white, so text greens are darkened and #4abf2c survives as a
 * border only.
 *
 * The nav and footer stay dark and bracket the page. There is one logo asset,
 * white on transparent, so a light header would need artwork that does not
 * exist. This is also why the page keeps the site chrome at all rather than
 * standing alone: Google's OAuth branding review checks that the privacy URL
 * belongs to the same entity as the app, and a chrome-less legal page reads as
 * third-party.
 */

:root {
  --l-bg: #ffffff;
  --l-panel: #f4f5f2;          /* contents block, table headers */
  --l-text: #11150f;
  --l-muted: #3c423a;          /* body copy, not a light grey */
  --l-dim: #636a5f;
  --l-rule: rgba(17, 21, 15, .12);
  --l-rule-soft: rgba(17, 21, 15, .07);
  --l-green: #4abf2c;          /* borders and accents only */
  --l-green-text: #1d6b0c;     /* anything that is TEXT */
  --l-green-deep: #14500a;     /* link hover, emphasis */
}

/* The nav is white-on-transparent and turns solid black on scroll. On a light
   page it would be white text on white until the user scrolls, so pin it solid
   in both states. Beats .navbar-transparent's own !important on specificity.
   Same rule as careers.css — change both together. */
body.legal-page .navbar.navbar-transparent,
body.legal-page .navbar.navbar-scrolled,
body.legal-page .navbar {
  background-color: #0d100c !important;
}

.legal-page {
  background: var(--l-bg);
  color: var(--l-text);
  font-family: 'Open Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

/* ---------- the document column ----------
   One column, no grid. 68ch keeps running text near the 65-character measure
   that long-form reading wants; the page padding clears the fixed nav. */

.legal-doc {
  max-width: 68ch;
  margin: 0 auto;
  padding: 170px 24px 96px;
}

@media (max-width: 767px) {
  .legal-doc { padding: 120px 20px 64px; }
  .legal-page { font-size: 16px; }
}

/* ---------- masthead ---------- */

.legal-eyebrow {
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--l-green-text);
  margin: 0 0 6px;
}

.legal-h1 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 0 0 14px;
  text-wrap: balance;
}

/* Dates carry real weight on a legal page — a reader checks them to see
   whether the document is current — so they sit in the masthead rather than
   in small print at the foot. */
.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0 0 30px;
  padding-bottom: 26px;
  border-bottom: 2px solid var(--l-text);
  font-size: .88rem;
  color: var(--l-dim);
}
.legal-dates span { white-space: nowrap; }
.legal-dates b { color: var(--l-muted); font-weight: 600; }

.legal-intro {
  font-size: 1.08rem;
  line-height: 1.72;
  color: var(--l-muted);
  margin: 0 0 14px;
}
.legal-intro:last-of-type { margin-bottom: 0; }

/* ---------- contents ----------
   A jump list, because nobody reads one of these top to bottom. */

.legal-contents {
  background: var(--l-panel);
  border: 1px solid var(--l-rule-soft);
  border-left: 3px solid var(--l-green);
  padding: 22px 26px;
  margin: 38px 0 46px;
}

/* Scoped under .legal-doc so it outranks the clause-heading rule below, which
   is defined later at the same specificity and would otherwise stamp a top
   rule and 52px of margin onto the contents heading. */
.legal-doc .legal-contents h2 {
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--l-dim);
  margin: 0 0 12px;
  padding: 0;
  border: none;
}

.legal-contents ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2;
  column-gap: 34px;
  font-size: .93rem;
}
.legal-contents li { margin-bottom: 5px; break-inside: avoid; }

@media (max-width: 600px) {
  .legal-contents ol { columns: 1; }
}

/* ---------- clauses ----------
   scroll-margin-top keeps an anchored heading clear of the fixed nav; without
   it every jump from the contents list lands with the heading underneath the
   navbar. */

.legal-doc h2 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.62rem;
  line-height: 1.2;
  letter-spacing: -.005em;
  margin: 52px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--l-rule);
  scroll-margin-top: 110px;
  text-wrap: balance;
}

.legal-doc h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.16rem;
  line-height: 1.3;
  margin: 30px 0 8px;
  scroll-margin-top: 110px;
}

.legal-doc p { margin: 0 0 15px; color: var(--l-muted); }
.legal-doc p:last-child { margin-bottom: 0; }

.legal-doc ul,
.legal-doc ol.legal-list {
  margin: 0 0 16px;
  padding-left: 1.35em;
  color: var(--l-muted);
}
.legal-doc li { margin-bottom: 7px; }
.legal-doc li:last-child { margin-bottom: 0; }

.legal-doc strong { color: var(--l-text); font-weight: 600; }

.legal-doc a {
  color: var(--l-green-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-doc a:hover,
.legal-doc a:focus { color: var(--l-green-deep); }

.legal-doc a:focus-visible,
.legal-contents a:focus-visible {
  outline: 2px solid var(--l-green-text);
  outline-offset: 2px;
}

/* A definition-style block for the contact details, so an address is not a
   paragraph of commas. */
.legal-address {
  margin: 0 0 16px;
  padding: 18px 22px;
  background: var(--l-panel);
  border: 1px solid var(--l-rule-soft);
  font-size: .95rem;
  line-height: 1.65;
  color: var(--l-muted);
}
.legal-address b { display: block; color: var(--l-text); }

/* ---------- tables ----------
   Used for the purpose/legal-basis grid on the privacy page and for the music
   and sound credits on /attribution. Both are wide, so each scrolls in its own
   container and the page body never moves sideways. */

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--l-rule);
}

.legal-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: .9rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--l-rule-soft);
}

.legal-table th {
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--l-dim);
  background: var(--l-panel);
  border-bottom: 1px solid var(--l-rule);
  white-space: nowrap;
}

.legal-table td { color: var(--l-muted); }
.legal-table tbody tr:last-child td { border-bottom: none; }

/* ---------- print ----------
   Legal pages get printed and filed. Drop the chrome, put the URL of every
   link inline so a paper copy is still checkable, and let it flow. */

@media print {
  .navbar,
  .footer-section,
  .fullscreen-menu,
  .legal-contents { display: none !important; }

  .legal-page { font-size: 11pt; background: #fff; color: #000; }
  .legal-doc { max-width: none; padding: 0; }
  .legal-doc h2 { page-break-after: avoid; }
  .legal-doc a { color: #000; text-decoration: underline; }
  .legal-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .legal-table-wrap { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-page * { animation: none !important; transition: none !important; }
}
