:root {
  color-scheme: light;
  --legal-ink: #27213d;
  --legal-muted: #68627b;
  --legal-line: #e8e4f1;
  --legal-accent: #6d6296;
  --legal-surface: #ffffff;
  --legal-footer: #30274b;
}

* {
  box-sizing: border-box;
}

html {
  background: #f8f7fb;
}

body.legal-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--legal-ink);
  background: #f8f7fb;
  font-family: "Poppins", Arial, sans-serif;
}

a {
  color: inherit;
}

.legal-shell {
  width: min(100% - 40px, 900px);
  margin: 0 auto;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(96, 82, 140, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.legal-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
}

.legal-brand img {
  display: block;
  width: 124px;
  height: auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #514a68;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.legal-back:hover,
.legal-back:focus-visible,
.legal-content a:hover,
.legal-content a:focus-visible,
.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: var(--legal-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-main {
  padding: 72px 0 84px;
}

.legal-hero {
  max-width: 680px;
}

.legal-eyebrow {
  margin: 0 0 9px;
  color: var(--legal-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: clamp(2.15rem, 6vw, 3.35rem);
  letter-spacing: 0;
  line-height: 1.04;
}

.legal-hero > p:not(.legal-eyebrow):not(.legal-updated) {
  margin: 16px 0 0;
  color: var(--legal-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-updated {
  margin: 18px 0 0;
  color: #817a92;
  font-size: 0.78rem;
  font-weight: 600;
}

.legal-summary {
  margin: 42px 0 46px;
  padding: 19px 21px;
  border: 1px solid #dfd9ee;
  border-left: 4px solid var(--legal-accent);
  background: #f4f1fa;
}

.legal-summary strong {
  display: block;
  font-size: 0.85rem;
}

.legal-summary p {
  margin: 6px 0 0;
  color: #595167;
  font-size: 0.89rem;
  line-height: 1.65;
}

.legal-content {
  padding: 38px clamp(20px, 5vw, 56px);
  border: 1px solid var(--legal-line);
  border-radius: 8px;
  background: var(--legal-surface);
  box-shadow: 0 14px 42px rgba(48, 39, 75, 0.055);
}

.legal-content section + section {
  margin-top: 38px;
}

.legal-content h2 {
  margin: 0 0 10px;
  color: #30274b;
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.legal-content p {
  margin: 0;
  color: #5c566b;
  font-size: 0.9rem;
  line-height: 1.78;
}

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

.legal-content a {
  color: #594f83;
  font-weight: 600;
}

.legal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--legal-footer);
  color: #d6d0e8;
}

.legal-footer .legal-shell {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.8rem;
}

.legal-footer nav {
  display: flex;
  gap: 16px;
}

.legal-footer a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 640px) {
  .legal-shell {
    width: min(100% - 30px, 900px);
  }

  .legal-header__inner {
    min-height: 66px;
  }

  .legal-brand img {
    width: 108px;
  }

  .legal-back {
    font-size: 0.76rem;
  }

  .legal-main {
    padding: 46px 0 58px;
  }

  .legal-summary {
    margin: 32px 0;
  }

  .legal-content {
    padding: 28px 20px;
  }

  .legal-content section + section {
    margin-top: 31px;
  }

  .legal-footer .legal-shell {
    min-height: 92px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}
