/* ============================================================
   Gradian — legal document pages (Terms of Use, Privacy Notice)
   Standalone stylesheet: these pages are plain HTML, not part of
   the React app, so the design tokens they need are declared here.
   Token values mirror the ones inlined in index.html.
   ============================================================ */

/* ---- Fonts (same hashed files the homepage uses) ---------- */
/* DM Sans — body */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ebfbca19.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: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/b6ea7310.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;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ebfbca19.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: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ebfbca19.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;
}
/* Styrene A — display */
@font-face {
  font-family: 'Styrene A';
  src: url("../fonts/63c115d6.otf") format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---------------------------------------------- */
:root {
  --navy:      #121232;
  --maroon:    #921245;
  --lime:      #ebf992;
  --grey-100:  #f2f1f3;
  --grey-200:  #e0e0e1;
  --grey-400:  #b8b7bf;
  --grey-600:  #7d7c8c;
  --grey-800:  #33354f;
  --white:     #ffffff;
  --teal-700:  #2b4053;

  --font-display: 'Styrene A', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --legal-link: var(--maroon);
}

/* ---- Page shell ------------------------------------------ */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.legal-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

.legal-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 12px 18px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}
.legal-skip:focus { left: 0; }

/* ---- Top bar --------------------------------------------- */
.legal-topbar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.legal-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.legal-topbar a {
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
  text-decoration: none;
  transition: color .15s ease;
}
.legal-topbar a:hover { color: var(--white); }
.legal-topbar__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.legal-topbar__nav a[aria-current="page"] { color: var(--lime); }
.legal-logo { display: block; line-height: 0; }
.legal-logo svg { display: block; }

/* ---- Document -------------------------------------------- */
.legal {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}
.legal__header { margin-bottom: 2.5rem; }
.legal h1 {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.legal__updated {
  margin: 0;
  color: var(--grey-600);
  font-size: 15px;
}
.legal h2 {
  margin: 2.75rem 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.legal h3 {
  margin: 2rem 0 .75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
}
.legal p { margin: 0 0 1rem; }
.legal ul, .legal ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.legal ul ul { margin-top: .5rem; margin-bottom: .25rem; }
.legal li { margin-bottom: .55rem; }
.legal a {
  color: var(--legal-link);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .15em;
  overflow-wrap: anywhere;
}
.legal a:hover { text-decoration-thickness: .14em; }
.legal a:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* ---- On-this-page index ---------------------------------- */
.legal__toc {
  margin: 0 0 3rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--grey-200);
  border-radius: .5rem;
  background: var(--grey-100);
}
.legal__toc h2 {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.legal__toc ol {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.25rem;
}
.legal__toc li { break-inside: avoid; margin-bottom: .35rem; }

/* anchored headings clear nothing sticky, but keep a little air */
.legal h2[id] { scroll-margin-top: 24px; }

/* ---- Footer ---------------------------------------------- */
.legal-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .38);
}
.legal-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 13.5px;
}
.legal-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.legal-footer a {
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
  text-decoration: none;
  transition: color .15s ease;
}
.legal-footer a:hover { color: var(--white); }

@media (max-width: 700px) {
  .legal-wrap { padding-left: 22px; padding-right: 22px; }
  .legal__toc ol { columns: 1; }
  .legal-topbar__nav { gap: 20px; }
  .legal-topbar a, .legal-footer a { font-size: 14px; }
}

@media print {
  .legal-topbar, .legal-footer, .legal__toc, .legal-skip { display: none; }
  body { color: #000; }
  .legal a { color: #000; }
}
