:root {
  color-scheme: dark;
  --legal-aside-top: #e3e7eb;
  --legal-aside-bottom: #d6dbe1;
  --legal-aside-text: #0f172a;
  --legal-aside-text-secondary: rgba(15, 23, 42, 0.66);
  --legal-aside-text-muted: rgba(15, 23, 42, 0.44);
  --legal-main-bg: #000000;
  --legal-main-surface: rgba(255, 255, 255, 0.035);
  --legal-main-surface-strong: rgba(255, 255, 255, 0.05);
  --legal-main-border: rgba(255, 255, 255, 0.08);
  --legal-main-border-soft: rgba(255, 255, 255, 0.05);
  --legal-main-text: #f5f7fb;
  --legal-main-text-secondary: rgba(226, 232, 240, 0.72);
  --legal-main-text-muted: rgba(226, 232, 240, 0.46);
  --legal-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
}

body {
  min-height: 100vh;
  color: var(--legal-main-text);
}

.legal-shell {
  min-height: 100vh;
}

.legal-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 34vw) minmax(0, 1fr);
}

.legal-aside {
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: 100vh;
  padding: 40px 38px 34px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--legal-aside-top) 0%, var(--legal-aside-bottom) 100%);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
}

.legal-aside::-webkit-scrollbar {
  width: 8px;
}

.legal-aside::-webkit-scrollbar-track {
  background: transparent;
}

.legal-aside::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
}

.legal-aside::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.24);
}

.legal-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.68;
  pointer-events: none;
}

.legal-aside::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 58%);
  filter: blur(16px);
  pointer-events: none;
}

.legal-brand,
.legal-nav,
.legal-actions {
  position: relative;
  z-index: 1;
}

.legal-brand {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 10px;
  max-width: 300px;
}

.legal-brand__eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--legal-aside-text-muted);
}

.legal-brand__name {
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--legal-aside-text);
}

.legal-brand__summary {
  margin: 0;
  max-width: 292px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--legal-aside-text-secondary);
}

.legal-poster {
  position: relative;
  z-index: 1;
  height: 196px;
  min-height: 196px;
  flex: 0 0 196px;
  margin: 24px 0 24px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.14)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 24px 60px rgba(15, 23, 42, 0.12);
}

.legal-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 34%),
    linear-gradient(rgba(15, 23, 42, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.024) 1px, transparent 1px);
  background-size: auto, auto, 30px 30px, 30px 30px;
  pointer-events: none;
}

.legal-poster::after {
  content: "";
  position: absolute;
  inset: auto -56px -96px auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0));
  filter: blur(18px);
  opacity: 0.72;
  pointer-events: none;
}

.legal-poster__serial,
.legal-poster__word,
.legal-poster__headline,
.legal-poster__caption,
.legal-poster__measure,
.legal-poster__art,
.legal-poster__footer {
  position: relative;
  z-index: 1;
}

.legal-poster__serial {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-poster__serial-label {
  font-family: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.44);
  white-space: nowrap;
}

.legal-poster__serial-line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0));
}

.legal-poster__word {
  position: absolute;
  left: 14px;
  top: 30px;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(64px, 5vw, 88px);
  line-height: 0.82;
  letter-spacing: -0.08em;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.17);
}

.legal-poster__word--stacked {
  top: 32px;
  font-size: clamp(54px, 4.4vw, 74px);
  line-height: 0.8;
  gap: 0;
}

.legal-poster__headline {
  position: absolute;
  right: 18px;
  top: 42px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  font-family: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 700;
  text-align: right;
  color: rgba(15, 23, 42, 0.88);
}

.legal-poster__caption {
  position: absolute;
  left: 16px;
  top: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 66%;
}

.legal-poster__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.54);
  color: rgba(15, 23, 42, 0.74);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-poster__measure {
  position: absolute;
  top: 44px;
  right: 10px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.38);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.legal-poster__art {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 94px;
}

.legal-poster__footer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.42);
}

.legal-poster__shape {
  position: absolute;
  bottom: 0;
  transform-origin: bottom center;
  animation: legal-poster-rise 0.5s ease both;
}

.legal-poster__shape--purple {
  left: 48px;
  width: 70px;
  height: 92px;
  border-radius: 8px 8px 0 0;
  background: #6c3ff5;
  animation-delay: 0.02s;
}

.legal-poster__shape--black {
  left: 102px;
  width: 48px;
  height: 72px;
  border-radius: 7px 7px 0 0;
  background: #2d2d2d;
  animation-delay: 0.08s;
}

.legal-poster__shape--orange {
  left: 0;
  width: 116px;
  height: 56px;
  border-radius: 72px 72px 0 0;
  background: #ff9b6b;
  animation-delay: 0.14s;
}

.legal-poster__shape--yellow {
  left: 146px;
  width: 58px;
  height: 66px;
  border-radius: 36px 36px 0 0;
  background: #e8d754;
  animation-delay: 0.2s;
}

body.legal-page-theme--privacy .legal-poster__caption {
  top: 92px;
}

body.legal-page-theme--privacy .legal-poster__headline {
  top: 44px;
}

body.legal-page-theme--privacy .legal-poster__word--stacked {
  top: 30px;
  font-size: clamp(50px, 4vw, 66px);
  line-height: 0.82;
}

body.legal-page-theme--privacy .legal-poster__shape--purple {
  left: 58px;
  width: 62px;
  height: 88px;
}

body.legal-page-theme--privacy .legal-poster__shape--black {
  left: 108px;
  width: 42px;
  height: 68px;
}

body.legal-page-theme--privacy .legal-poster__shape--orange {
  left: 10px;
  width: 104px;
  height: 52px;
}

body.legal-page-theme--privacy .legal-poster__shape--yellow {
  left: 146px;
  width: 52px;
  height: 60px;
}

.legal-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 28px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  flex: 0 0 auto;
}

.legal-nav__title {
  margin-bottom: 2px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--legal-aside-text-muted);
}

.legal-nav a {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--legal-aside-text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.legal-nav a:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(15, 23, 42, 0.08);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: auto;
}

.legal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: var(--legal-aside-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.legal-action:hover {
  transform: translateY(-1px);
}

.legal-action--primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #f8fafc;
}

.legal-action--primary:hover {
  background: #111827;
  border-color: #111827;
}

.legal-action--secondary:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.14);
}

@keyframes legal-poster-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scaleY(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.legal-main {
  position: relative;
  min-height: 100vh;
  padding: 42px 48px 64px;
  background: var(--legal-main-bg);
  overflow: hidden;
}

.legal-main::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -180px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
}

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

.legal-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--legal-main-border);
}

.legal-header__eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--legal-main-text-muted);
}

.legal-header h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--legal-main-text);
}

.legal-header p {
  margin: 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--legal-main-text-secondary);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--legal-main-border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--legal-main-text-secondary);
  font-size: 12px;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 30px;
}

.legal-section {
  border: 1px solid var(--legal-main-border);
  border-radius: 28px;
  padding: 26px;
  background: var(--legal-main-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.legal-section h2 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--legal-main-text);
}

.legal-section h3 {
  margin: 18px 0 10px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--legal-main-text);
}

.legal-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--legal-main-text-secondary);
}

.legal-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--legal-main-text-secondary);
}

.legal-list li {
  margin: 0 0 10px;
  line-height: 1.85;
}

.legal-callout {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--legal-main-border-soft);
  background: var(--legal-main-surface-strong);
}

.legal-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--legal-main-text);
}

.legal-callout p {
  font-size: 13px;
}

.legal-kv {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 12px 18px;
  margin-top: 16px;
}

.legal-kv__key {
  font-size: 13px;
  font-weight: 700;
  color: var(--legal-main-text);
}

.legal-kv__value {
  font-size: 13px;
  line-height: 1.85;
  color: var(--legal-main-text-secondary);
}

@media (max-width: 1080px) {
  .legal-page {
    grid-template-columns: minmax(280px, 32vw) minmax(0, 1fr);
  }

  .legal-aside {
    padding: 36px 30px 30px;
  }

  .legal-poster {
    height: 188px;
    min-height: 188px;
    flex-basis: 188px;
  }

  .legal-main {
    padding: 34px 34px 52px;
  }
}

@media (max-width: 920px) {
  .legal-page {
    grid-template-columns: 1fr;
  }

  .legal-aside {
    position: relative;
    top: auto;
    height: auto;
    min-height: auto;
    padding: 32px 24px 26px;
    overflow: visible;
  }

  .legal-poster {
    height: 184px;
    min-height: 184px;
    flex-basis: 184px;
  }

  .legal-main {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .legal-main {
    padding: 26px 18px 34px;
  }

  .legal-header h1 {
    font-size: 34px;
  }

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

  .legal-poster {
    height: 170px;
    min-height: 170px;
    flex-basis: 170px;
    border-radius: 22px;
  }

  .legal-poster__serial {
    left: 14px;
    right: 14px;
    top: 12px;
    gap: 8px;
  }

  .legal-poster__word {
    left: 12px;
    top: 28px;
    font-size: 54px;
  }

  .legal-poster__word--stacked {
    top: 28px;
    font-size: 44px;
    line-height: 0.82;
  }

  .legal-poster__headline {
    right: 14px;
    top: 38px;
    font-size: 14px;
  }

  .legal-poster__caption {
    left: 14px;
    top: 74px;
    max-width: 70%;
  }

  .legal-poster__measure {
    display: none;
  }

  .legal-poster__art {
    left: 12px;
    right: 12px;
    bottom: 16px;
    height: 80px;
  }

  .legal-poster__footer {
    left: 14px;
    right: 14px;
    bottom: 8px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .legal-poster__shape--purple {
    left: 40px;
    width: 56px;
    height: 76px;
  }

  .legal-poster__shape--black {
    left: 82px;
    width: 38px;
    height: 60px;
  }

  .legal-poster__shape--orange {
    left: 0;
    width: 88px;
    height: 44px;
  }

  .legal-poster__shape--yellow {
    left: 116px;
    width: 46px;
    height: 54px;
  }

  body.legal-page-theme--privacy .legal-poster__caption {
    top: 78px;
  }

  body.legal-page-theme--privacy .legal-poster__headline {
    top: 38px;
  }

  body.legal-page-theme--privacy .legal-poster__word--stacked {
    top: 28px;
    font-size: 42px;
  }

  body.legal-page-theme--privacy .legal-poster__shape--purple {
    left: 44px;
    width: 52px;
    height: 72px;
  }

  body.legal-page-theme--privacy .legal-poster__shape--black {
    left: 84px;
    width: 34px;
    height: 56px;
  }

  body.legal-page-theme--privacy .legal-poster__shape--orange {
    left: 8px;
    width: 82px;
    height: 40px;
  }

  body.legal-page-theme--privacy .legal-poster__shape--yellow {
    left: 116px;
    width: 42px;
    height: 48px;
  }

  .legal-kv {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
