/* =========================================================
   Legal pages
   ========================================================= */

.legal-page {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 80px;
  background: #fff;
}

.legal-shell {
  width: 100%;
  max-width: calc(var(--content-max) + (var(--edge-pad) * 2));
  margin: 0 auto;
  padding-inline: var(--edge-pad);
}

.legal-card {
  background: #fff;
  padding: 0;
  font-family: inherit;
}

.legal-card a {
  color: var(--ink);
}

.legal-card a:hover,
.legal-card a:focus-visible {
  color: #000;
}

.legal-card h1 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.legal-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

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

.legal-section h2 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 500;
}

.legal-section p,
.legal-section li {
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.68;
}

.legal-section ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  list-style: disc;
}

.legal-section a {
  color: var(--ink);
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 32px;
  color: var(--faint);
  font-size: 0.82rem;
}

.legal-page--imprint .legal-card > h1 + .legal-section {
  margin-top: 28px;
}

/* =========================================================
   Legal document hub
   ========================================================= */

.legal-page--hub {
  padding-top: calc(var(--header-h) + 48px);
  background: #fff;
}

.legal-shell--wide {
  max-width: calc(var(--content-max) + (var(--edge-pad) * 2));
}

.legal-card--hub {
  padding: 0;
}

.legal-hero {
  padding-bottom: 10px;
}

.legal-hero h1 {
  margin-bottom: 0;
}

.legal-switcher {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.legal-switcher-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
}

.legal-toc {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 26px;
}

.legal-toc button {
  min-height: auto;
  padding: 3px 0 4px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.legal-toc button:hover {
  color: var(--ink);
  background: transparent;
}

.legal-toc button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.legal-toc button.is-active,
.legal-toc button[aria-selected="true"] {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 -1px 0 #8b8fa3;
  font-weight: 500;
}

.legal-panels {
  margin-top: 0;
  overflow-anchor: none;
}

.legal-doc {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.legal-doc[hidden] {
  display: none !important;
}

.legal-document-head {
  margin-bottom: 26px;
  padding-top: 30px;
}

.legal-document-head h2 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.legal-document-head > p:last-child {
  max-width: 900px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.legal-doc .legal-section {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.legal-doc .legal-section:first-of-type {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 22px;
}

.legal-section h3 {
  margin-bottom: 11px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.legal-section h4 {
  margin-top: 19px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

.legal-section h4:first-child {
  margin-top: 0;
}

.legal-section p + p {
  margin-top: 11px;
}

.legal-section ul + p,
.legal-section p + ul {
  margin-top: 12px;
}

.legal-section strong {
  color: #292d42;
  font-weight: 600;
}

.legal-section a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-section a:hover {
  color: #000;
}

.legal-emphasis {
  padding-left: 0;
}

.legal-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-top: 16px;
}

.legal-definition-grid > div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.legal-definition-grid h4 {
  margin: 0 0 8px;
}

.legal-definition-grid p {
  font-size: 0.84rem;
  line-height: 1.62;
}

.legal-table-wrap {
  width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  border-top: 1px solid var(--line-strong);
  font-size: 0.78rem;
  line-height: 1.55;
}

.legal-table th,
.legal-table td {
  padding: 14px 16px 14px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.legal-table td {
  color: var(--body);
}

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

.legal-table--processors td:first-child {
  min-width: 230px;
}

.legal-annex {
  margin-top: 42px;
  padding-top: 30px;
  border-top: 1px solid var(--line-strong);
}

.legal-doc .legal-annex + .legal-annex {
  margin-top: 24px;
}

.legal-annex h3 {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 1.08rem;
}

.legal-acceptance {
  margin-top: 22px;
  padding-left: 0;
}

.legal-acceptance h3 {
  margin-top: 0;
}

@media (max-width: 850px) {
  .legal-page--hub {
    padding-top: calc(var(--header-h) + 30px);
  }

  .legal-switcher {
    gap: 20px;
  }

  .legal-toc {
    gap: 20px;
  }
}

@media (max-width: 620px) {
  .legal-page {
    padding-bottom: 58px;
  }

  .legal-shell {
    padding-inline: var(--edge-pad);
  }

  .legal-hero {
    padding-bottom: 8px;
  }

  .legal-hero h1 {
    font-size: 1.55rem;
  }

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

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

@media print {
  .site-header {
    display: none !important;
  }

  .legal-page,
  .legal-page--hub {
    padding: 0;
    background: #fff;
  }

  .legal-shell,
  .legal-shell--wide {
    max-width: none;
    padding: 0;
  }

  .legal-table-wrap {
    overflow: visible;
  }

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