.legal-page {
  --legal-bg: #09090d;
  --legal-surface: rgba(18, 18, 24, .78);
  --legal-border: rgba(255, 255, 255, .12);
  --legal-text: #f8f7f8;
  --legal-muted: rgba(236, 233, 236, .72);
  --legal-soft: rgba(236, 233, 236, .54);
  --legal-primary: #9d1d3d;
  --legal-primary-soft: rgba(157, 29, 61, .16);
  --primary: #861a33;
  --primary-700: #651225;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --ring: rgba(134, 26, 51, .45);
  --ring2: rgba(134, 26, 51, .2);
  --header-height: 78px;
  margin: 0;
  min-height: 100vh;
  color: var(--legal-text);
  background:
    radial-gradient(75% 70% at 50% -10%, rgba(157, 29, 61, .24), transparent 55%),
    linear-gradient(180deg, rgba(8, 8, 12, .94), rgba(8, 8, 12, .99)),
    var(--legal-bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

.legal-page * { box-sizing: border-box; }
.legal-page a { color: inherit; }

.legal-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.legal-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(112%) contrast(108%) brightness(58%);
  pointer-events: none;
  background: var(--legal-bg);
}

.legal-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(58% 52% at 72% 18%, rgba(134, 26, 51, .18) 0%, rgba(134, 26, 51, .06) 38%, transparent 68%),
    radial-gradient(120% 85% at 50% 12%, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .68) 58%, rgba(0, 0, 0, .82) 100%),
    linear-gradient(90deg, rgba(4, 7, 17, .88), rgba(4, 7, 17, .44) 42%, rgba(77, 22, 35, .34));
}

.legal-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .76));
}

.legal-nav,
.legal-main,
.legal-footer {
  position: relative;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .legal-bg-video { display: none; }
}

.legal-back-top {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(16, 16, 22, .78);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.96);
  transition: opacity .2s var(--ease), visibility .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.legal-back-top::before {
  content: "";
  width: 11px;
  height: 11px;
  border-left: 2.5px solid currentColor;
  border-top: 2.5px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}

.legal-backtop-visible .legal-back-top {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.legal-back-top:hover {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
}

.legal-back-top:active { transform: scale(.96); }

.legal-back-top:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 8px var(--ring2), 0 14px 34px rgba(0, 0, 0, .38);
}

body.mobile-menu-open .legal-back-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.legal-container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 30px);
}

.container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: clamp(24px, 5vw, 28px);
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  background: linear-gradient(180deg, rgba(15, 16, 19, .88), rgba(15, 16, 19, .45), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
}

.brand__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: radial-gradient(120% 120% at 0% 0%, var(--primary), #ff7a8a);
  box-shadow: 0 6px 24px rgba(229, 75, 95, .45);
}

.nav__menu {
  display: none;
  flex: 1;
  justify-content: center;
}

@media (min-width: 768px) {
  .nav__menu { display: flex; }
}

.nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list li + li {
  position: relative;
  margin-left: clamp(24px, 2.6vw, 32px);
  padding-left: clamp(24px, 2.6vw, 32px);
}

.nav__list li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 18px;
  border-radius: 999px;
  opacity: .34;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .3) 20%, rgba(255, 255, 255, .3) 80%, transparent 100%);
}

.nav__list a {
  color: rgba(224, 224, 232, .84);
  padding: 10px 0;
  opacity: .94;
  font-weight: 560;
  text-decoration: none;
  transition: color .22s var(--ease), opacity .22s var(--ease), text-shadow .22s var(--ease);
}

.nav__list a:hover,
.nav__list a:focus {
  opacity: 1;
  color: rgba(244, 244, 248, .95);
}

.nav__list a[aria-current="page"] {
  position: relative;
  opacity: 1;
  color: rgba(252, 252, 255, .98);
  font-weight: 620;
  text-shadow: 0 0 10px rgba(255, 255, 255, .14);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__actions .btn { margin-left: 8px; }

.btn {
  --btn-bg: rgba(255, 255, 255, .06);
  --btn-bd: rgba(255, 255, 255, .12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.05rem;
  font-size: 1rem;
  height: auto;
  line-height: 1.2;
  border: 1px solid var(--btn-bd);
  border-radius: 12px;
  background: var(--btn-bg);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  transition: background .26s var(--ease), border-color .26s var(--ease), transform .16s var(--ease), box-shadow .26s var(--ease);
  will-change: transform;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .1);
}

.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ring), 0 0 0 8px var(--ring2); }
.btn--primary { --btn-bg: var(--primary); --btn-bd: transparent; box-shadow: 0 10px 24px rgba(134, 26, 51, .34); }
.btn--primary:hover { background: var(--primary-700); }
.btn--ghost { background: transparent; }

.nav__burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  padding: 0;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.nav__burger:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); }
.nav__burger:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ring), 0 0 0 8px var(--ring2); }

.nav__burger-line {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.nav__burger[aria-expanded="true"] .nav__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] .nav__burger-line:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] .nav__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu-overlay,
.mobile-drawer { display: none; }

.legal-nav {
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(11, 11, 15, .9), rgba(11, 11, 15, .66));
  backdrop-filter: blur(14px) saturate(120%);
}

.legal-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}

.legal-brand__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: radial-gradient(120% 120% at 0% 0%, #9d1d3d, #ff7a8a);
  box-shadow: 0 8px 24px rgba(229, 75, 95, .42);
}

.legal-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .72rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  text-decoration: none;
  font-weight: 780;
  background: rgba(255, 255, 255, .04);
}

.legal-button--primary {
  border-color: transparent;
  background: var(--legal-primary);
}

.legal-main { padding: calc(var(--header-height) + clamp(12px, 2.6vw, 24px)) 0 42px; }

.legal-hero {
  display: grid;
  gap: 18px;
  max-width: 880px;
  margin-bottom: 24px;
}

.legal-kicker {
  margin: 0;
  color: #ffb6c4;
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-title {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  line-height: 1.03;
  font-weight: 920;
  letter-spacing: 0;
}

.legal-lead {
  margin: 0;
  max-width: 760px;
  color: var(--legal-muted);
  font-size: clamp(1rem, .92rem + .35vw, 1.12rem);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--legal-soft);
  font-size: .92rem;
}

.legal-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: .28rem .7rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
}

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

.legal-layout--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 960px;
  margin-inline: auto;
}

.legal-document {
  display: grid;
  gap: 16px;
}

.legal-card {
  padding: clamp(20px, 3.4vw, 30px);
  border: 1px solid var(--legal-border);
  border-radius: 20px;
  background: var(--legal-surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

.legal-card h2,
.legal-card h3 {
  margin: 0 0 12px;
  color: #fff;
  line-height: 1.18;
  letter-spacing: 0;
}

.legal-card h2 { font-size: clamp(1.35rem, 1.12rem + .8vw, 1.85rem); }
.legal-card h3 { margin-top: 20px; font-size: 1.05rem; }
.legal-card p,
.legal-card li { color: var(--legal-muted); }
.legal-card p { margin: 0 0 12px; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul,
.legal-card ol { margin: 0; padding-left: 1.1rem; }
.legal-card li + li { margin-top: 8px; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  color: var(--legal-muted);
  font-size: .94rem;
}

.legal-table th,
.legal-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  vertical-align: top;
  text-align: left;
}

.legal-table th {
  color: #fff;
  background: rgba(255, 255, 255, .06);
  font-weight: 820;
}

.legal-table tr:last-child td { border-bottom: 0; }

.legal-anchor { scroll-margin-top: 96px; }

.legal-footer {
  padding: 28px 0 38px;
  color: var(--legal-soft);
  text-align: center;
  font-size: .9rem;
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 10px;
}

.legal-footer__links a { color: var(--legal-muted); }

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

@media (max-width: 767.98px) {
  .legal-page { --header-height: 68px; }
  .legal-page,
  .legal-page body { overflow-x: hidden; }

  body.mobile-menu-open { overflow: hidden; }

  .container { padding-inline: 16px; }
  .nav {
    padding-top: env(safe-area-inset-top);
    backdrop-filter: saturate(105%) blur(4px);
    -webkit-backdrop-filter: saturate(105%) blur(4px);
  }

  .nav__row { padding: 10px 0; gap: 10px; }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 9px;
    font-size: 1rem;
    white-space: nowrap;
  }
  .brand span:last-child {
    display: block;
    min-width: 0;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand__logo { flex: 0 0 auto; }
  .nav__menu { display: none; }
  .nav__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .nav__actions .btn {
    min-height: 44px;
    margin-left: 0;
  }
  .nav__actions .btn--ghost { display: none; }
  .nav__actions .btn--primary {
    padding: .68rem .92rem;
    font-size: .94rem;
    white-space: nowrap;
  }
  .nav__burger {
    display: inline-flex;
    flex-shrink: 0;
  }

  .mobile-menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(5, 6, 10, .62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s var(--ease);
  }

  .mobile-drawer {
    display: block;
    position: fixed;
    inset: calc(var(--header-height) + env(safe-area-inset-top)) 0 auto 0;
    z-index: 26;
    max-height: calc(100svh - var(--header-height) - env(safe-area-inset-top));
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
    overflow: auto;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: rgba(10, 11, 16, .98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
  }

  .mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }

  .mobile-drawer__title {
    color: rgba(224, 224, 234, .75);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .mobile-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-drawer__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0 12px;
  }

  .mobile-drawer__actions .btn {
    width: 100%;
    min-height: 46px;
    margin: 0;
  }

  .mobile-drawer .nav__list {
    flex-direction: column;
    gap: 6px;
  }

  .mobile-drawer .nav__list li + li {
    margin-left: 0;
    padding-left: 0;
  }

  .mobile-drawer .nav__list li + li::before { display: none; }

  .mobile-drawer .nav__list a {
    display: block;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    font-weight: 700;
  }

  .mobile-drawer .nav__list a[aria-current="page"] {
    border-color: rgba(229, 75, 95, .42);
    background: rgba(229, 75, 95, .12);
  }

  body.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-menu-open .mobile-drawer {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .legal-main {
    padding-top: calc(var(--header-height) + 14px);
  }
}

@media (max-width: 560px) {
  .legal-title { max-width: none; font-size: 2.15rem; }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td { display: block; }

  .legal-table thead { display: none; }

  .legal-table tr {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
  }

  .legal-table tr:last-child { border-bottom: 0; }
  .legal-table td { border-bottom: 0; padding: 7px 0; }

  .legal-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: #fff;
    font-weight: 820;
  }
}

@media (max-width: 430px) {
  .container { padding-inline: 14px; }
  .nav__row { gap: 8px; }
  .brand { gap: 8px; font-size: .96rem; letter-spacing: .12px; }
  .brand span:last-child { max-width: 40vw; }
  .brand__logo { width: 24px; height: 24px; border-radius: 7px; }
  .nav__actions { gap: 6px; }
  .nav__actions .btn--primary { padding: .64rem .82rem; font-size: .89rem; }
  .nav__burger { width: 42px; height: 42px; }
}

@media (max-width: 390px) {
  .container { padding-inline: 12px; }
  .brand { gap: 7px; font-size: .91rem; }
  .brand span:last-child { max-width: 38vw; }
  .nav__actions .btn--primary { padding: .62rem .74rem; font-size: .84rem; }
  .nav__burger { width: 40px; height: 40px; }
}
