:root {
  color-scheme: light dark;
  --night: #10071f;
  --orange: #ff941c;
  --pulse: #f50b7a;
  --violet: #6e2fd1;
  --blue: #0a8af5;
  --canvas: #f8f7fb;
  --surface: #ffffff;
  --text: #1a1025;
  --muted: #675d73;
  --line: rgba(26, 16, 37, .14);
  --nav-text: #f8f7fb;
  --nav-muted: #b7adc5;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; font-weight: 750; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid rgba(10, 138, 245, .58); outline-offset: 4px; border-radius: 4px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 13px; border-radius: 8px; background: #fff; color: var(--night); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.legal-nav {
  min-height: calc(78px + var(--safe-top));
  padding: var(--safe-top) max(22px, calc(22px + var(--safe-right))) 0 max(22px, calc(22px + var(--safe-left)));
  background: var(--night);
  color: var(--nav-text);
  border-bottom: 3px solid var(--pulse);
}
.legal-nav-inner { width: min(100%, 1180px); min-height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.legal-brand { min-width: 0; display: inline-flex; align-items: center; gap: 11px; color: var(--nav-text); text-decoration: none; }
.legal-brand img { width: 40px; height: 40px; display: block; border-radius: 11px; box-shadow: 0 7px 20px rgba(0, 0, 0, .34); }
.legal-wordmark { font-family: "Avenir Next", Avenir, "Century Gothic", sans-serif; font-size: 17px; font-weight: 800; letter-spacing: -.045em; white-space: nowrap; }
.legal-wordmark em { background: linear-gradient(90deg, var(--pulse), #9b4dda 58%, #47a4ff); background-clip: text; color: transparent; font-style: normal; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.legal-nav nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.legal-nav nav a { min-height: 38px; padding: 9px 12px; display: inline-flex; align-items: center; border-radius: 9px; color: var(--nav-muted); font-size: 13px; text-decoration: none; transition: color .15s ease, background-color .15s ease; }
.legal-nav nav a:hover { background: rgba(255, 255, 255, .08); color: var(--nav-text); }
.legal-nav nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: var(--nav-text); }

.legal-main { width: min(100% - 48px, 1120px); margin: 0 auto; padding: clamp(52px, 7vw, 94px) 0 80px; }
.legal-intro { padding-bottom: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: minmax(360px, .9fr) minmax(360px, 1fr); align-items: end; gap: clamp(32px, 7vw, 92px); }
.document-label { margin: 0 0 18px; color: var(--violet); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; overflow-wrap: anywhere; font-family: "Avenir Next", Avenir, "Century Gothic", sans-serif; font-size: clamp(45px, 6vw, 66px); font-weight: 800; line-height: .91; letter-spacing: -.06em; }
.legal-summary { padding-bottom: 4px; }
.legal-lead { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.52; }
.meta { margin: 18px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }

.legal-sections { border-top: 1px solid var(--line); }
.legal-sections section { padding: 25px 0 27px; display: grid; grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 86px); border-bottom: 1px solid var(--line); }
.legal-sections h2 { margin: 0; font-family: "Avenir Next", Avenir, sans-serif; font-size: 16px; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; }
.legal-copy { min-width: 0; }
.legal-copy p { max-width: 690px; margin: 0; }
.legal-copy p + p { margin-top: 10px; }
.legal-copy a { color: var(--violet); }
.legal-actions { padding-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.legal-primary, .legal-secondary { min-height: 46px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 11px; font-size: 13px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.legal-primary { border-color: var(--night); background: var(--night); color: #fff; box-shadow: 0 8px 20px rgba(16, 7, 31, .12); }
.legal-secondary { background: var(--surface); }
.legal-primary:hover, .legal-secondary:hover { transform: translateY(-1px); }
.legal-secondary:hover { border-color: rgba(110, 47, 209, .42); }

.legal-footer { padding: 27px max(22px, calc(22px + var(--safe-right))) calc(27px + var(--safe-bottom)) max(22px, calc(22px + var(--safe-left))); background: var(--night); color: var(--nav-muted); }
.legal-footer-inner { width: min(100%, 1180px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; }
.legal-footer strong { color: var(--nav-text); font-family: "Avenir Next", Avenir, sans-serif; }
.legal-footer a { color: var(--nav-text); }

@media (prefers-color-scheme: dark) {
  :root { --canvas: #10071f; --surface: #1a1025; --text: #f8f7fb; --muted: #b7adc5; --line: rgba(248, 247, 251, .16); }
  .legal-nav { background: #0b0415; }
  .legal-primary { border-color: var(--orange); background: var(--orange); color: var(--night); box-shadow: none; }
  .legal-copy a { color: #9d78ed; }
  .legal-footer { background: #0b0415; }
}

@media (max-width: 720px) {
  .legal-nav { padding-right: max(14px, calc(14px + var(--safe-right))); padding-left: max(14px, calc(14px + var(--safe-left))); }
  .legal-nav-inner { min-height: 70px; gap: 12px; }
  .legal-brand img { width: 36px; height: 36px; }
  .legal-wordmark { display: none; }
  .legal-nav nav { gap: 0; overflow-x: auto; }
  .legal-nav nav a { min-height: 42px; padding: 10px 9px; font-size: 12px; }
  .legal-main { width: min(100% - 32px, 1120px); padding: 48px 0 58px; }
  .legal-intro { padding-bottom: 38px; grid-template-columns: 1fr; align-items: start; gap: 22px; }
  h1 { font-size: clamp(42px, 13.2vw, 57px); }
  .legal-sections section { padding: 22px 0 24px; grid-template-columns: 1fr; gap: 9px; }
  .legal-sections h2 { font-size: 17px; }
  .legal-actions { display: grid; grid-template-columns: 1fr; }
  .legal-footer-inner { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
