/* ==========================================================================
   RALLY — shared design tokens + document shell
   Used by the legal and support pages (/privacy, /terms, /legal, /support
   and their /en counterparts).

   The homepage keeps its own inline styles. This file deliberately does not
   try to replace them — that is a separate job with a separate risk profile.

   Brand system is locked:
     one background, one accent, one typeface.
     Montserrat only. No second face. No Anton.
     No outer glow on letterforms, no floating cards, no glow blobs,
     no light-leaks, no centred symmetric hero.
   ========================================================================== */

/* --- Montserrat, self-hosted. No CDN, no connection to Google. ------------
   Variable files, weight axis 300-900, subset per unicode-range so a
   Spanish or English reader only ever downloads the latin subset.        */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin-ext-variable.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --- brand ------------------------------------------------------------ */
  --field: #0D0D0D;   /* the only background colour                         */
  --acid:  #CCFF00;   /* RALLY Acid. Single accent, one semantic role/view. */
  --white: #F2F2F0;   /* UI white, body text                                */
  --red:   #FF3B30;   /* losses and negatives only. Unused on these pages.  */

  /* --- derived surfaces, all mixed off the four above ------------------- */
  --dim:   #A8A8A4;   /* secondary text: dates, footer, table of contents   */
  --rule:  #262626;   /* hairlines between sections                         */

  /* --- type ------------------------------------------------------------- */
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          Helvetica, Arial, sans-serif;

  /* --- measure ----------------------------------------------------------
     These pages are read, not admired. Target is 65-75 characters per
     line. Note that 1ch is the width of "0", which in Montserrat is wider
     than the average lowercase letter, so a 70ch column actually renders
     ~81 characters. Measured on the rendered page: 64ch gives ~70.      */
  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--field);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;                /* never below 16px */
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- page shell ---------------------------------------------------------- */

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px var(--gutter) 96px;
}

/* Language switcher sits above the content, top right of the shell.
   Plain anchor. No JS, no dropdown, no flags, no locale sniffing. */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.wordmark {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.wordmark span { color: var(--acid); }

.lang {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--acid);
  text-decoration: none;
  white-space: nowrap;
}
.lang:hover { text-decoration: underline; }

/* --- document ------------------------------------------------------------ */

h1 {
  font-weight: 900;
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.updated {
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

h2 {
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 52px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);   /* acid is reserved for links */
  scroll-margin-top: 24px;
}
h2 .num { color: var(--acid); margin-right: 10px; }

h3 {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  margin: 32px 0 12px;
  scroll-margin-top: 24px;
}
h3 .num { color: var(--acid); margin-right: 8px; }

p { margin-bottom: 18px; }

ul { margin: 0 0 18px 0; padding-left: 24px; }
li { margin-bottom: 9px; }

strong { font-weight: 700; color: var(--white); }

a { color: var(--acid); text-decoration: none; }
a:hover { text-decoration: underline; }

.lead { margin-bottom: 22px; }

/* Identification blocks (registered address, tax ID, registry entries):
   tight leading, one fact per line. */
.id-block { margin-bottom: 18px; }
.id-block p { margin-bottom: 4px; }

/* --- table of contents (terms page) --------------------------------------
   Navigation, not content. Adds no words to the document. */
.toc {
  margin: 0 0 48px;
  padding: 22px 24px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.toc h2 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 16px; }

/* --- support page -------------------------------------------------------- */
.support-lead { font-size: 19px; max-width: 46ch; }

/* --- footer --------------------------------------------------------------
   Real anchors, written literally into every page. Never injected by JS. */
footer.site {
  margin-top: 72px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  color: var(--dim);
  font-size: 14px;
  line-height: 1.7;
}
footer.site .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 14px;
}
footer.site .links a { color: var(--white); }
footer.site .links a:hover { color: var(--acid); text-decoration: underline; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .shell { padding-top: 22px; }
}
