:root {
  color-scheme: dark;
  --ink: #f8fbff;
  --muted: #b9c7db;
  --deep: #070718;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.18);
  --cyan: #18d8ff;
  --blue: #185cff;
  --violet: #7135ff;
  --magenta: #c000ff;
  --pink: #ff4ad8;
  --mint: #6df5c3;
  --gold: #ffd166;
  --coral: #ff6b6b;
  --paper: #fbfdff;
  --paper-ink: #102027;
  --paper-muted: #51616c;
  --paper-line: #dce6ee;
  --shadow: 0 24px 70px rgba(2, 8, 32, 0.28);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(24, 216, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 84% 8%, rgba(255, 74, 216, 0.16), transparent 32rem),
    linear-gradient(145deg, #050517 0%, #090a25 45%, #111327 100%);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
  line-height: 1.5;
  min-width: 320px;
  overflow-x: hidden;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(115deg, rgba(13, 228, 241, 0.08), rgba(91, 72, 255, 0.12), rgba(255, 52, 205, 0.07));
  background-size: 180% 180%;
}

body:after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 62%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
summary {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  left: 16px;
  top: 16px;
  z-index: 100;
  border-radius: var(--radius);
  background: #ffffff;
  color: #08091d;
  padding: 10px 14px;
  font-weight: 900;
}

.legal-site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 5, 18, 0.84);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.legal-nav {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1240px;
  min-height: 76px;
  padding: 12px 28px;
}

.brand-link {
  align-items: center;
  display: flex;
  justify-content: center;
  min-width: 104px;
}

.brand-mark {
  height: auto;
  width: 104px;
}

.legal-menu {
  min-width: 0;
}

.legal-menu summary {
  display: none;
}

.legal-nav-panel {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.legal-nav-panel a,
.legal-pill {
  align-items: center;
  border-radius: var(--radius);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 900;
  min-height: 40px;
  padding: 0 12px;
}

.legal-nav-panel a {
  color: rgba(248, 251, 255, 0.82);
}

.legal-nav-panel a:hover,
.legal-nav-panel a:focus-visible {
  color: #ffffff;
}

.legal-pill {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
}

.legal-pill-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue) 45%, var(--magenta));
  border: 0;
  box-shadow: 0 12px 30px rgba(70, 95, 255, 0.28);
  color: #ffffff;
}

.legal-main {
  padding-top: 76px;
}

.legal-hero {
  background:
    linear-gradient(135deg, rgba(24, 216, 255, 0.13), rgba(113, 53, 255, 0.12) 48%, rgba(192, 0, 255, 0.09)),
    rgba(5, 5, 18, 0.22);
  padding: clamp(48px, 8vw, 88px) 22px clamp(34px, 6vw, 62px);
}

.legal-hero-inner,
.legal-content-shell,
.legal-footer-inner {
  margin: 0 auto;
  max-width: 1220px;
  width: 100%;
}

.legal-hero-inner {
  display: grid;
  gap: 28px;
}

.eyebrow {
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.legal-hero h1 {
  font-size: clamp(2.15rem, 6.8vw, 5.5rem);
  line-height: 0.98;
  margin: 0;
  max-width: 900px;
  text-wrap: balance;
}

.legal-hero-copy {
  color: rgba(248, 251, 255, 0.82);
  font-size: clamp(1.03rem, 1.8vw, 1.26rem);
  margin: 16px 0 0;
  max-width: 760px;
}

.legal-meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.legal-meta-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  padding: 14px;
}

.legal-meta-card span {
  color: rgba(248, 251, 255, 0.62);
  display: block;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.legal-meta-card strong {
  color: #ffffff;
  display: block;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.legal-content {
  padding: 0 22px clamp(72px, 8vw, 110px);
}

.legal-content-shell {
  display: grid;
  gap: 20px;
}

.legal-document {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 253, 255, 0.98)),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--paper-ink);
  overflow: hidden;
  padding: clamp(24px, 5vw, 58px);
}

.legal-document h1,
.legal-document h2,
.legal-document h3,
.legal-document p,
.legal-document ul,
.legal-document ol,
.legal-document .legal-toc {
  max-width: 78ch;
}

.legal-document > h1:first-child {
  color: #07101f;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  margin: 0 0 10px;
}

.document-subtitle {
  color: var(--paper-muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 900;
  margin: 0 0 20px;
}

.legal-document h2 {
  color: #07101f;
  font-size: clamp(1.32rem, 3vw, 2.1rem);
  line-height: 1.18;
  margin: 34px 0 12px;
  scroll-margin-top: 104px;
  text-wrap: balance;
}

.legal-document h3 {
  color: #152a37;
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 24px 0 8px;
}

.legal-document p,
.legal-document li {
  color: #22333f;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.legal-document p {
  margin: 0 0 13px;
}

.legal-document ul,
.legal-document ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.legal-document a {
  color: #006a80;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.legal-toc {
  background:
    linear-gradient(135deg, rgba(24, 216, 255, 0.12), rgba(113, 53, 255, 0.10)),
    #f3f8fb;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  margin: 30px 0 34px;
  padding: clamp(18px, 3vw, 26px);
}

.legal-toc h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin: 0 0 14px;
}

.legal-toc ol {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-toc li {
  margin: 0;
}

.legal-toc a {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 114, 137, 0.14);
  border-radius: var(--radius);
  color: #12303d;
  display: flex;
  padding: 10px 12px;
  text-decoration: none;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  background: #ffffff;
  border-color: rgba(0, 114, 137, 0.34);
}

.legal-account-link {
  white-space: nowrap;
}

.legal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 42px 22px 36px;
}

.legal-footer-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 0.7fr));
}

.legal-footer h2,
.legal-footer h3,
.legal-footer p {
  margin: 0;
}

.legal-footer h2 {
  font-size: 2rem;
  line-height: 1;
}

.legal-footer h3 {
  color: #ffffff;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.legal-footer p,
.legal-footer a {
  color: rgba(248, 251, 255, 0.76);
}

.legal-footer nav {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.legal-footer a {
  font-weight: 850;
  overflow-wrap: anywhere;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: #ffffff;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(248, 251, 255, 0.62);
  margin-top: 28px;
  padding-top: 20px;
}

@media (min-width: 1120px) {
  .legal-document {
    margin: 0 auto;
    max-width: 980px;
  }

  .legal-toc {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 980px) {
  .legal-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legal-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .legal-nav {
    gap: 12px;
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 12px 18px;
  }

  .legal-menu {
    justify-self: end;
    position: relative;
  }

  .legal-menu summary {
    align-items: center;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    min-height: 44px;
    padding: 0 14px;
  }

  .legal-menu[open] summary {
    background: rgba(255, 255, 255, 0.16);
  }

  .legal-nav-panel {
    background: rgba(5, 5, 18, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
    min-width: min(82vw, 320px);
    padding: 12px;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
  }

  .legal-menu:not([open]) .legal-nav-panel {
    display: none;
  }

  .legal-nav-panel a,
  .legal-pill {
    justify-content: flex-start;
    min-height: 42px;
    width: 100%;
  }

  .legal-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .legal-hero,
  .legal-content,
  .legal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .legal-meta-grid,
  .legal-footer-grid {
    grid-template-columns: 1fr;
  }

  .legal-document {
    padding: 22px 16px;
  }

  .legal-document h2 {
    font-size: 1.26rem;
  }
}
