.legal-page {
  color: var(--deep-green, #36403d);
  background: #faf9f5;
}

.legal-header,
.legal-footer {
  color: #fff;
  background: var(--deep-green, #36403d);
}

.legal-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 36px;
  min-height: 112px;
  padding-block: 24px;
}

.legal-header__nav,
.legal-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.legal-header__nav a,
.legal-footer a,
.legal-footer button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 14px;
  line-height: 1.55;
}

.legal-header__nav a:hover,
.legal-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-content {
  width: min(100%, 880px);
  margin-inline: auto;
  padding: 64px 28px 88px;
  overflow-wrap: anywhere;
}

.legal-eyebrow {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.legal-content h1 {
  margin-bottom: 20px;
  color: inherit;
  font-size: clamp(32px, 4.7vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.13;
}

.legal-lead {
  max-width: 740px;
  font-size: 18px;
  line-height: 1.75;
}

.legal-version {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
}

.legal-toc {
  margin-top: 32px;
  padding-block: 24px;
  border-block: 1px solid #d2ba98;
}

.legal-toc__title {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 650;
}

.legal-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.7;
}

.legal-section {
  margin-top: 36px;
  scroll-margin-top: 24px;
}

.legal-section + .legal-section {
  padding-top: 30px;
  border-top: 1px solid #d2ba98;
}

.legal-section h2 {
  margin-bottom: 14px;
  color: inherit;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.legal-section p,
.legal-section li,
.legal-section dd {
  font-size: 16px;
  line-height: 1.8;
}

.legal-section p + p,
.legal-section ul + p,
.legal-section table + p,
.legal-section dl + p {
  margin-top: 14px;
}

.legal-section ul {
  margin: 14px 0;
  padding-left: 23px;
}

.legal-section li + li {
  margin-top: 8px;
}

.legal-content a,
.legal-footer__nav a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.legal-page a:focus-visible,
.legal-page button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.legal-table {
  width: 100%;
  margin-block: 20px;
  border-collapse: collapse;
  text-align: left;
}

.legal-table caption {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
  text-align: left;
}

.legal-table th,
.legal-table td {
  padding: 14px;
  border: 1px solid #d1d3cd;
  font-size: 14px;
  line-height: 1.75;
  vertical-align: top;
}

.legal-table thead {
  background: #eaece6;
}

.legal-table th:first-child {
  width: 35%;
}

.legal-details {
  margin: 20px 0 0;
}

.legal-details__row {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px 28px;
  padding-block: 16px;
  border-bottom: 1px solid #d1d3cd;
}

.legal-details dt {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.8;
}

.legal-details dd {
  min-width: 0;
  margin: 0;
}

.legal-footer__inner {
  padding-block: 32px;
}

.legal-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: 20px;
}

.legal-footer__nav {
  align-items: flex-start;
  gap: 8px 24px;
}

.legal-footer .cookie-preferences {
  margin-top: 20px;
}

@media (max-width: 600px) {
  .legal-header__inner {
    gap: 16px;
  }

  .legal-header__nav {
    width: 100%;
    gap: 8px 24px;
  }

  .legal-content {
    padding: 42px 20px 56px;
  }

  .legal-lead {
    font-size: 17px;
  }

  .legal-toc ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-section h2 {
    font-size: 21px;
  }

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

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

  .legal-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .legal-table tbody tr {
    padding-block: 16px;
    border-bottom: 1px solid #d1d3cd;
  }

  .legal-table tbody th,
  .legal-table tbody td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  .legal-table tbody th {
    margin-bottom: 6px;
  }

  .legal-table tbody th:first-child {
    width: auto;
  }

  .legal-details__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media print {
  .legal-page {
    color: #000;
    background: #fff;
  }

  .legal-header,
  .legal-footer,
  .legal-toc,
  .cookie-banner,
  .skip-link {
    display: none !important;
  }

  .legal-content {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .legal-content h1 {
    font-size: 24pt;
  }

  .legal-section h2 {
    break-after: avoid;
    font-size: 14pt;
  }

  .legal-section p,
  .legal-section li,
  .legal-section dd {
    font-size: 11pt;
    orphans: 3;
    widows: 3;
  }

  .legal-table tr,
  .legal-details__row {
    break-inside: avoid;
  }

  .legal-table {
    display: table;
  }

  .legal-table caption {
    display: table-caption;
  }

  .legal-table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    clip-path: none;
    white-space: normal;
  }

  .legal-table tbody {
    display: table-row-group;
  }

  .legal-table tbody tr {
    display: table-row;
  }

  .legal-table tbody th,
  .legal-table tbody td {
    display: table-cell;
    padding: 10px;
    border: 1px solid #d1d3cd;
  }

  .legal-table tbody th:first-child {
    width: 35%;
  }
}
