:root {
  --bg: #060708;
  --bg-deep: #0a0b0c;
  --panel: rgba(10, 12, 15, 0.56);
  --panel-strong: rgba(14, 16, 19, 0.72);
  --surface: rgba(255, 255, 255, 0.028);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f3f6;
  --muted: #99a3ac;
  --red: rgba(255, 91, 91, 0.82);
  --red-soft: rgba(255, 91, 91, 0.12);
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.62;
  background: var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 7.25rem 7.25rem;
  opacity: 0.16;
}

body::after {
  background: rgba(255, 255, 255, 0.012);
  opacity: 0.14;
}

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

.legal-page {
  padding: 0.9rem;
}

.legal-shell {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(1.01);
  -webkit-backdrop-filter: blur(24px) saturate(1.01);
  overflow: hidden;
}

.legal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.legal-hero,
.legal-content {
  position: relative;
  z-index: 1;
}

.legal-hero {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 15, 0.34);
}

.legal-back,
.legal-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.62rem 0.92rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(240, 243, 246, 0.84);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.legal-back {
  justify-self: start;
}

.legal-back:hover,
.legal-back:focus-visible,
.legal-nav__link:hover,
.legal-nav__link:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.legal-eyebrow {
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.legal-meta {
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-lede {
  margin: 0;
  max-width: 60ch;
  color: rgba(240, 243, 246, 0.82);
  font-size: 1rem;
  line-height: 1.74;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.legal-nav__link--active {
  border-color: rgba(255, 91, 91, 0.18);
  background: rgba(255, 91, 91, 0.08);
  color: var(--text);
}

.legal-content {
  padding: 0;
}

.legal-raw {
  display: none;
}

.legal-article {
  display: grid;
}

.legal-section {
  position: relative;
  padding: 1.2rem 1.35rem 1.3rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

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

.legal-section::before {
  content: "";
  position: absolute;
  top: 1.22rem;
  left: 1.35rem;
  width: 0.16rem;
  height: 1.2rem;
  border-radius: 999px;
  background: rgba(255, 91, 91, 0.76);
  opacity: 0.9;
}

.legal-section > :first-child {
  margin-top: 0;
}

.legal-section h2 {
  margin: 0 0 0.8rem;
  padding-left: 0.88rem;
  color: rgba(245, 248, 251, 0.95);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.legal-section p,
.legal-section li {
  color: rgba(236, 241, 245, 0.84);
  font-size: 0.96rem;
}

.legal-section p {
  margin: 0.72rem 0 0;
  max-width: 78ch;
}

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: 0.58rem;
  margin: 0.86rem 0 0;
  padding-left: 1.28rem;
}

.legal-section ul ul,
.legal-section ol ul,
.legal-section ul ol,
.legal-section ol ol {
  margin-top: 0.48rem;
}

.legal-section li {
  padding-left: 0.14rem;
}

.legal-section a {
  color: rgba(255, 228, 228, 0.94);
  text-decoration: underline;
  text-decoration-color: rgba(255, 91, 91, 0.28);
  text-underline-offset: 0.18em;
}

.legal-section a:hover,
.legal-section a:focus-visible {
  text-decoration-color: rgba(255, 91, 91, 0.5);
}

.legal-section strong {
  color: var(--text);
}

.legal-empty {
  margin: 0;
  padding: 1.3rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .legal-shell {
    border-radius: 1.32rem;
  }

  .legal-hero {
    padding: 1rem;
  }

  .legal-section {
    padding: 1rem 1rem 1.08rem;
  }

  .legal-section::before {
    left: 1rem;
    top: 1.03rem;
  }
}

@media (max-width: 640px) {
  .legal-page {
    padding: 0.65rem;
  }

  .legal-shell {
    border-radius: 1.1rem;
  }

  .legal-back,
  .legal-nav__link {
    width: 100%;
  }

  .legal-lede {
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .legal-section {
    padding: 0.92rem 0.9rem 0.98rem;
  }

  .legal-section::before {
    left: 0.9rem;
    top: 0.96rem;
    height: 1.02rem;
  }

  .legal-section h2 {
    padding-left: 0.78rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.93rem;
  }
}
