.legal-page {
  background: #f5f5f0;
}

.legal-page a:focus-visible,
.legal-page button:focus-visible,
.cookie-consent a:focus-visible,
.cookie-consent button:focus-visible,
.cookie-consent input:focus-visible {
  outline: 3px solid #b78352;
  outline-offset: 3px;
}

.legal-hero {
  padding-bottom: 52px;
  border-bottom: 1px solid #deded8;
}

.legal-hero .legal-updated {
  margin-top: 20px;
  font-size: 14px;
  color: #666660;
}

.legal-section {
  padding: 56px 0 96px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 760px);
  justify-content: space-between;
  gap: 64px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 9px;
  padding: 22px;
  border: 1px solid #e0e0dc;
  border-radius: 22px;
  background: #ffffff;
}

.legal-sidebar strong {
  margin-bottom: 5px;
  font-size: 13px;
  text-transform: uppercase;
  color: #777770;
}

.legal-sidebar a {
  color: #444440;
  font-size: 14px;
  line-height: 1.35;
}

.legal-sidebar a:hover {
  color: #111111;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.legal-document section {
  padding: 36px 0;
  border-bottom: 1px solid #deded8;
  scroll-margin-top: 110px;
}

.legal-document section:first-of-type {
  padding-top: 0;
}

.legal-document h2 {
  margin-bottom: 16px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.12;
}

.legal-document p,
.legal-document li {
  color: #3f3f3b;
  font-size: 17px;
  line-height: 1.75;
}

.legal-document p + p,
.legal-document p + ul,
.legal-document p + ol,
.legal-document ul + p,
.legal-document ol + p,
.legal-document .legal-table-wrap + p {
  margin-top: 16px;
}

.legal-document ul,
.legal-document ol {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}

.legal-document a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-notice {
  margin-bottom: 40px;
  padding: 24px;
  border: 1px solid #caa982;
  border-radius: 22px;
  background: #efe0cd;
  scroll-margin-top: 110px;
}

.legal-notice strong {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}

.legal-notice p {
  color: #493d31;
}

.legal-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid #deded8;
  border-radius: 18px;
  background: #ffffff;
}

.legal-document table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
}

.legal-document th,
.legal-document td {
  padding: 16px;
  border-bottom: 1px solid #e6e6e0;
  text-align: left;
  vertical-align: top;
  color: #3f3f3b;
  line-height: 1.55;
}

.legal-document th {
  background: #f0f0ea;
  color: #111111;
  font-size: 14px;
}

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

.legal-inline-button,
.legal-footer-links button,
.footer__links button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.legal-inline-button {
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
}

.legal-footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legal-footer-links button,
.footer__links button {
  padding: 0;
  background: transparent;
  color: inherit;
}

.legal-footer-links a:hover,
.legal-footer-links button:hover,
.footer__links button:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #d7d7d0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.18);
}

.cookie-consent__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.cookie-consent h2,
.cookie-modal h2 {
  margin-bottom: 6px;
  color: #111111;
  font-size: 21px;
  line-height: 1.2;
}

.cookie-consent p,
.cookie-modal p {
  color: #555550;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent p a,
.cookie-modal p a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__actions,
.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-button {
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid #d8d8d2;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cookie-button:hover {
  border-color: #111111;
}

.cookie-button--primary {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.cookie-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.58);
}

.cookie-modal__dialog {
  width: min(100%, 610px);
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 28px;
  border-radius: 26px;
  background: #f5f5f0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.cookie-modal__header {
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.cookie-modal__close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #d8d8d2;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid #dfdfd8;
  border-radius: 18px;
  background: #ffffff;
}

.cookie-category h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

.cookie-category__status {
  color: #666660;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-switch span {
  width: 100%;
  border-radius: 999px;
  background: #c8c8c1;
  transition: 0.2s ease;
}

.cookie-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.2s ease;
}

.cookie-switch input:checked + span {
  background: #111111;
}

.cookie-switch input:checked + span::after {
  transform: translateX(20px);
}

.cookie-modal__actions {
  justify-content: flex-end;
  margin-top: 22px;
}

body.cookie-modal-open {
  overflow: hidden;
}

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

  .legal-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-sidebar strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .legal-page .header__inner {
    display: flex;
  }

  .legal-page .nav {
    display: none;
  }

  .legal-hero {
    padding: 42px 0 34px;
  }

  .legal-section {
    padding: 30px 0 70px;
  }

  .legal-sidebar {
    display: none;
  }

  .legal-document section {
    padding: 28px 0;
    scroll-margin-top: 82px;
  }

  .legal-document p,
  .legal-document li {
    font-size: 16px;
    line-height: 1.65;
  }

  .legal-notice {
    margin-bottom: 22px;
    padding: 20px;
    border-radius: 18px;
  }

  .cookie-consent {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 18px;
    border-radius: 20px;
  }

  .cookie-consent__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cookie-consent__actions,
  .cookie-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-button {
    width: 100%;
  }

  .cookie-modal {
    padding: 10px;
  }

  .cookie-modal__dialog {
    max-height: calc(100vh - 20px);
    padding: 20px;
    border-radius: 20px;
  }

  .cookie-category {
    gap: 12px;
    padding: 15px;
  }
}
