.legal-page {
  position: relative;

  width: 100%;
  min-height: 100vh;

  overflow-x: clip;
  overflow-y: visible;

  background: var(--bg);
}


.legal-hero {
  position: relative;

  display: grid;
  place-items: center;

  min-height: clamp(430px, 58svh, 620px);

  padding:
    clamp(100px, 9vw, 140px)
    0
    clamp(65px, 7vw, 90px);

  overflow: hidden;

  isolation: isolate;

  background: #090909;
}

.legal-hero__background {
  position: absolute;
  z-index: -3;

  inset: -8% 0;

  width: 100%;
  height: 116%;

  overflow: hidden;

  will-change: transform;
}

.legal-hero__background img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transform: scale(1.035);

  will-change: transform;
}

.legal-hero__overlay {
  position: absolute;
  z-index: -2;

  inset: 0;

  background: rgba(5, 5, 5, 0.68);

  pointer-events: none;
}

.legal-hero__inner {
  position: relative;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;

  text-align: center;
}

.legal-hero__content {
  width: min(1060px, 100%);

  margin-inline: auto;
}

.legal-hero__title {
  max-width: 1000px;

  margin-inline: auto;

  color: #ffffff;

  font-size: clamp(3.2rem, 6.2vw, 6.2rem);
  font-weight: 650;

  line-height: 0.95;

  letter-spacing: -0.06em;

  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.legal-hero__typing {
  display: inline;
}

.legal-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  margin-top: 24px;

  color: rgba(255, 255, 255, 0.68);

  font-size: 12px;
  font-weight: 600;
}

.legal-hero__meta-dot {
  width: 4px;
  height: 4px;

  background: rgba(255, 255, 255, 0.48);

  border-radius: 50%;
}


.legal-content {
  position: relative;

  padding:
    clamp(64px, 7vw, 100px)
    0
    clamp(80px, 8vw, 120px);

  overflow: visible;

  background: #111111;
}

.legal-content__layout {
  display: grid;
  grid-template-columns:
    minmax(220px, 0.38fr)
    minmax(0, 1fr);

  gap: clamp(48px, 7vw, 110px);

  align-items: start;

  width: 100%;
}


.legal-sidebar {
  position: sticky;

  top: calc(var(--header-height) + 30px);

  min-width: 0;
}

.legal-sidebar__card {
  padding: 18px;

  background: #171717;

  border: 1px solid var(--border);
  border-radius: 18px;
}

.legal-sidebar__title {
  margin-bottom: 14px;

  color: #f2f2ef;

  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;

  letter-spacing: -0.015em;
}

.legal-sidebar__nav {
  display: grid;
  gap: 3px;
}

.legal-sidebar__link {
  position: relative;

  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 42px;

  padding: 9px 11px;

  color: #888884;
  background: transparent;

  border-radius: 9px;

  font-size: 12px;
  font-weight: 600;

  line-height: 1.35;

  transition:
    color var(--transition),
    background-color var(--transition),
    padding-left var(--transition);
}

.legal-sidebar__link::before {
  width: 5px;
  height: 5px;

  flex: 0 0 auto;

  content: "";

  background: #575754;

  border-radius: 50%;

  transition:
    background-color var(--transition),
    transform var(--transition);
}

.legal-sidebar__link.is-active {
  padding-left: 14px;

  color: #ffffff;
  background: #222222;
}

.legal-sidebar__link.is-active::before {
  background: var(--lime);

  transform: scale(1.15);
}

.legal-sidebar__footer {
  margin-top: 14px;
  padding-top: 14px;

  border-top: 1px solid var(--border);
}

.legal-sidebar__updated {
  color: #696965;

  font-size: 10px;
  line-height: 1.5;
}


.legal-toc-mobile {
  display: none;

  margin-bottom: 24px;
}

.legal-toc-mobile__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  width: 100%;
  min-height: 50px;

  padding: 12px 15px;

  color: #f0f0ed;
  background: #171717;

  border: 1px solid var(--border);
  border-radius: 12px;

  font-size: 13px;
  font-weight: 700;
}

.legal-toc-mobile__trigger svg {
  width: 18px;
  height: 18px;

  transition: transform var(--transition);
}

.legal-toc-mobile.is-open
.legal-toc-mobile__trigger svg {
  transform: rotate(180deg);
}

.legal-toc-mobile__panel {
  display: grid;
  grid-template-rows: 0fr;

  transition: grid-template-rows 450ms var(--ease-soft);
}

.legal-toc-mobile.is-open
.legal-toc-mobile__panel {
  grid-template-rows: 1fr;
}

.legal-toc-mobile__inner {
  min-height: 0;

  overflow: hidden;
}

.legal-toc-mobile__nav {
  display: grid;
  gap: 3px;

  margin-top: 8px;
  padding: 10px;

  background: #171717;

  border: 1px solid var(--border);
  border-radius: 12px;
}

.legal-toc-mobile__link {
  display: block;

  padding: 10px 11px;

  color: #9a9a96;

  border-radius: 8px;

  font-size: 12px;
  font-weight: 600;

  line-height: 1.4;

  transition:
    color var(--transition),
    background-color var(--transition);
}

.legal-toc-mobile__link.is-active {
  color: #ffffff;
  background: #222222;
}


.legal-article {
  min-width: 0;

  width: 100%;
  max-width: 980px;
}

.legal-article__intro {
  margin-bottom: 34px;
  padding: clamp(24px, 3vw, 36px);

  background: #171717;

  border: 1px solid var(--border);
  border-radius: 20px;
}

.legal-article__intro p {
  max-width: 850px;

  color: #b8b8b4;

  font-size: clamp(1rem, 1.22vw, 1.15rem);
  line-height: 1.72;
}


.legal-section {
  position: relative;

  padding:
    32px
    0
    38px;

  scroll-margin-top: calc(var(--header-height) + 30px);

  border-bottom: 1px solid var(--border);
}

.legal-section:first-of-type {
  padding-top: 8px;
}

.legal-section:last-child {
  padding-bottom: 0;

  border-bottom: 0;
}

.legal-section__title {
  max-width: 780px;

  margin-bottom: 20px;

  color: #f3f3f1;

  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.6vw, 2.75rem);
  font-weight: 650;

  letter-spacing: -0.045em;
  line-height: 1.06;
}

.legal-section__body {
  display: grid;
  gap: 15px;
}

.legal-section__body p {
  max-width: 900px;

  color: #aaa9a5;

  font-size: 15px;
  line-height: 1.75;
}

.legal-section__body strong {
  color: #eeeeeb;

  font-weight: 650;
}

.legal-section__body a {
  color: #e8e8e5;

  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 3px;

  transition:
    color var(--transition),
    text-decoration-color var(--transition);
}


.legal-subtitle {
  margin:
    16px
    0
    2px;

  color: #e5e5e2;

  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 650;

  letter-spacing: -0.03em;
  line-height: 1.2;
}


.legal-list {
  display: grid;
  gap: 10px;

  max-width: 900px;
}

.legal-list li {
  position: relative;

  padding-left: 21px;

  color: #aaa9a5;

  font-size: 15px;
  line-height: 1.7;
}

.legal-list li::before {
  position: absolute;

  top: 0.72em;
  left: 2px;

  width: 5px;
  height: 5px;

  content: "";

  background: #767672;

  border-radius: 50%;
}

.legal-list--ordered {
  counter-reset: legal-counter;
}

.legal-list--ordered li {
  padding-left: 34px;

  counter-increment: legal-counter;
}

.legal-list--ordered li::before {
  top: 0;
  left: 0;

  display: grid;
  place-items: center;

  width: 24px;
  height: 24px;

  content: counter(legal-counter);

  color: #bfbfbb;
  background: #1b1b1b;

  border: 1px solid var(--border);
  border-radius: 7px;

  font-size: 10px;
  font-weight: 700;
}


.legal-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;

  max-width: 900px;

  margin-block: 8px;

  padding: 18px;

  background: #181818;

  border: 1px solid var(--border);
  border-radius: 14px;
}

.legal-note__icon {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  color: #cacac7;
  background: #222222;

  border-radius: 10px;
}

.legal-note__icon svg {
  width: 19px;
  height: 19px;
}

.legal-note__content {
  min-width: 0;
}

.legal-note__title {
  margin-bottom: 4px;

  color: #ededeb;

  font-size: 13px;
  font-weight: 700;
}

.legal-note__text {
  color: #8b8b87;

  font-size: 12px;
  line-height: 1.55;
}


.legal-contact-card {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 30px;

  align-items: center;

  max-width: 900px;

  margin-top: 14px;
  padding: 24px;

  background: #181818;

  border: 1px solid var(--border);
  border-radius: 16px;
}

.legal-contact-card__title {
  margin-bottom: 6px;

  color: #ffffff;

  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;

  letter-spacing: -0.035em;
}

.legal-contact-card__text {
  max-width: 620px;

  color: #8e8e8a;

  font-size: 13px;
  line-height: 1.55;
}

.legal-contact-card__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 42px;

  padding: 9px 13px;

  color: #111111;
  background: #f1f1ef;

  border-radius: 10px;

  font-size: 12px;
  font-weight: 700;

  white-space: nowrap;

  transition:
    background-color var(--transition),
    transform var(--transition);
}

.legal-section__body .legal-contact-card__email {
  color: #111111;

  text-decoration: none;
}

.legal-contact-card__email svg {
  width: 16px;
  height: 16px;
}


.legal-table-wrap {
  width: 100%;

  margin-block: 8px;

  overflow-x: auto;
  overflow-y: hidden;

  border: 1px solid var(--border);
  border-radius: 14px;

  scrollbar-width: thin;
}

.legal-table {
  width: 100%;
  min-width: 700px;

  border-collapse: collapse;

  background: #151515;
}

.legal-table th,
.legal-table td {
  padding: 15px 16px;

  text-align: left;
  vertical-align: top;

  border-bottom: 1px solid var(--border);
}

.legal-table th {
  color: #e7e7e4;
  background: #1b1b1b;

  font-size: 11px;
  font-weight: 700;
}

.legal-table td {
  color: #949490;

  font-size: 12px;
  line-height: 1.55;
}

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

.legal-table td strong {
  color: #e3e3e0;

  font-weight: 650;
}


.legal-revision {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  margin-top: 46px;
  padding-top: 22px;

  border-top: 1px solid var(--border);
}

.legal-revision__text {
  color: #676763;

  font-size: 11px;
}

.legal-revision__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: #a9a9a5;

  font-size: 11px;
  font-weight: 600;

  transition:
    color var(--transition),
    transform var(--transition);
}

.legal-revision__back svg {
  width: 15px;
  height: 15px;
}


@media (hover: hover) and (pointer: fine) {
  .legal-sidebar__link:hover {
    padding-left: 14px;

    color: #ffffff;
    background: #202020;
  }

  .legal-sidebar__link:hover::before {
    background: var(--lime);
  }

  .legal-toc-mobile__link:hover {
    color: #ffffff;
    background: #202020;
  }

  .legal-section__body a:hover {
    color: #ffffff;

    text-decoration-color: #ffffff;
  }

  .legal-contact-card__email:hover {
    color: #111111;
    background: var(--lime);

    transform: translateY(-2px);
  }

  .legal-revision__back:hover {
    color: #ffffff;

    transform: translateX(-3px);
  }
}


@media (max-width: 1024px) {
  .legal-hero {
    min-height: clamp(400px, 52svh, 540px);
  }

  .legal-content__layout {
    grid-template-columns:
      minmax(190px, 0.34fr)
      minmax(0, 1fr);

    gap: 44px;
  }

  .legal-sidebar__card {
    padding: 14px;
  }

  .legal-sidebar__link {
    padding-inline: 9px;

    font-size: 11px;
  }

  .legal-article__intro {
    padding: 28px;
  }
}


@media (max-width: 820px) {
  .legal-content {
    padding-top: 54px;
  }

  .legal-content__layout {
    display: block;
  }

  .legal-sidebar {
    display: none;
  }

  .legal-toc-mobile {
    display: block;
  }

  .legal-article {
    max-width: 100%;
  }

  .legal-contact-card {
    grid-template-columns: 1fr;
  }

  .legal-contact-card__email {
    width: fit-content;
  }
}


@media (max-width: 767px) {
  .legal-page {
    min-height: 100%;

    overflow-y: visible;
  }

  .legal-hero {
    min-height: 390px;

    padding:
      94px
      0
      58px;
  }

  .legal-hero__title {
    font-size: clamp(2.6rem, 12.5vw, 4rem);

    line-height: 0.98;
  }

  .legal-hero__meta {
    flex-wrap: wrap;

    margin-top: 18px;

    font-size: 10px;
  }

  .legal-content {
    padding:
      42px
      0
      70px;

    overflow: visible;
  }

  .legal-content .container {
    overflow: visible;
  }

  .legal-toc-mobile {
    position: relative;

    margin-bottom: 20px;
  }

  .legal-toc-mobile__trigger {
    min-height: 48px;

    padding-inline: 13px;
  }

  .legal-article__intro {
    margin-bottom: 22px;
    padding: 20px;

    border-radius: 16px;
  }

  .legal-article__intro p {
    font-size: 14px;
    line-height: 1.68;

    text-align: left;
  }

  .legal-section {
    padding:
      27px
      0
      31px;

    scroll-margin-top: calc(var(--header-height) + 18px);
  }

  .legal-section:first-of-type {
    padding-top: 5px;
  }

  .legal-section__title {
    margin-bottom: 16px;

    font-size: clamp(1.55rem, 7vw, 2.1rem);

    text-align: left;
  }

  .legal-section__body {
    gap: 13px;
  }

  .legal-section__body p,
  .legal-list li {
    font-size: 14px;
    line-height: 1.68;
  }

  .legal-subtitle {
    font-size: 1.15rem;

    text-align: left;
  }

  .legal-note {
    padding: 15px;

    border-radius: 12px;
  }

  .legal-contact-card {
    gap: 18px;

    padding: 19px;

    border-radius: 14px;
  }

  .legal-contact-card__email {
    width: 100%;

    justify-content: center;
  }

  .legal-table-wrap {
    max-width: 100%;

    border-radius: 12px;
  }

  .legal-table {
    min-width: 620px;
  }

  .legal-table th,
  .legal-table td {
    padding: 12px;
  }

  .legal-revision {
    flex-direction: column;
    align-items: flex-start;

    gap: 14px;

    margin-top: 36px;
  }
}


@media (max-width: 430px) {
  .legal-hero {
    min-height: 360px;
  }

  .legal-hero__title {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .legal-note {
    grid-template-columns: 1fr;
  }

  .legal-note__icon {
    width: 34px;
    height: 34px;
  }

  .legal-list--ordered li {
    padding-left: 31px;
  }
}


.legal-hero__background,
.legal-hero__background img {
  backface-visibility: hidden;
}

.has-js .legal-section__title .split-line {
  overflow: hidden;
}


.legal-page,
.legal-content,
.legal-content__layout,
.legal-article,
.legal-section {
  height: auto;
  max-height: none;
}

.legal-content,
.legal-content__layout,
.legal-article {
  overflow-y: visible;
}

@media (max-width: 1024px) {
  body:has(.legal-page) {
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }
}


@media (prefers-reduced-motion: reduce) {
  .legal-hero__background,
  .legal-hero__background img {
    transform: none !important;
  }
}
