:root {
  --ink: #0c152c;
  --muted: #687083;
  --paper: #f4f5f7;
  --white: #fff;
  --accent: #e8223a;
  --line: #e3e6eb;
  --shadow: 0 20px 60px rgba(12, 21, 44, .08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.legal-header {
  min-height: 82px;
  padding: 16px max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.legal-brand {
  position: relative;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  color: #fff;
  text-decoration: none;
}

.legal-brand::before {
  content: "";
  position: absolute;
  inset: 1px auto 1px 0;
  width: 3px;
  background: var(--accent);
  border-radius: 999px;
}

.legal-brand span {
  color: rgba(255, 255, 255, .54);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 1.45px;
  text-transform: uppercase;
}

.legal-brand strong {
  font-size: 15px;
  letter-spacing: -.3px;
}

.legal-back {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}

.legal-back:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .4);
}

.legal-back:focus-visible,
.legal-nav a:focus-visible,
.legal-content a:focus-visible,
.legal-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.legal-back svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0 88px;
}

.legal-hero {
  position: relative;
  min-height: 290px;
  padding: clamp(30px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #0c152c 0%, #111a2f 72%, #171726 100%);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legal-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 15px;
  color: #ff6174;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.legal-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 780px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.03;
  letter-spacing: -2.4px;
}

.legal-lead {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  line-height: 1.7;
}

.legal-status {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legal-status span,
.legal-status strong {
  min-height: 29px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.legal-status span {
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .11);
}

.legal-status strong {
  color: #fff;
  background: var(--accent);
}

.legal-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.legal-nav {
  position: sticky;
  top: 24px;
  padding: 23px;
  display: grid;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(12, 21, 44, .045);
}

.legal-nav strong {
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.legal-nav a {
  margin: 0 -10px;
  padding: 9px 10px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.legal-nav a:hover {
  color: var(--ink);
  background: #f5f6f8;
}

.legal-content {
  padding: clamp(24px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.legal-section {
  padding: 34px 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.legal-section:first-child { padding-top: 0; }
.legal-section:last-child { padding-bottom: 0; border-bottom: 0; }

.legal-number {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ink);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
}

.legal-section h2 {
  margin: 3px 0 15px;
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1.2;
  letter-spacing: -.7px;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.78;
}

.legal-section p + p { margin-top: 12px; }

.legal-section p a {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.legal-footer {
  min-height: 92px;
  padding: 24px max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, .6);
  background: var(--ink);
  font-size: 10px;
}

.legal-footer p { margin: 0; }

.legal-footer > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.legal-footer a {
  color: #fff;
  font-weight: 700;
  text-underline-offset: 4px;
}

.legal-footer .analytics-settings-button {
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  font-weight: 650;
}

@media (max-width: 760px) {
  html { scroll-padding-top: 16px; }

  .legal-header {
    min-height: 68px;
    padding: 13px 16px;
  }

  .legal-brand { padding-left: 13px; }
  .legal-brand strong { max-width: 190px; font-size: 11px; line-height: 1.25; }
  .legal-brand span { font-size: 7px; }

  .legal-back {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
  }

  .legal-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

  .legal-main {
    width: min(calc(100% - 28px), 1240px);
    padding: 24px 0 48px;
  }

  .legal-hero {
    min-height: 250px;
    padding: 28px 22px;
    border-radius: 14px;
  }

  .legal-hero h1 { letter-spacing: -1.5px; }
  .legal-lead { margin-top: 15px; font-size: 12px; }
  .legal-status { margin-top: 24px; }

  .legal-layout {
    margin-top: 16px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .legal-nav { display: none; }

  .legal-content {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .legal-section {
    padding: 28px 0;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .legal-number {
    width: 34px;
    height: 30px;
    border-radius: 10px;
  }

  .legal-section h2 { margin: 0 0 12px; }
  .legal-section p { font-size: 12px; line-height: 1.72; }

  .legal-footer {
    padding: 25px 16px calc(25px + env(safe-area-inset-bottom));
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .legal-footer > div {
    width: 100%;
    justify-content: space-between;
    gap: 14px;
  }
}

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