.subpage-frame {
  background: #fff;
}

body.legal-page .page-frame {
  overflow: visible;
}

/* The off-canvas menu and marquee extend beyond the viewport by design. They
   must not create a page-wide horizontal scrollbar on legal pages. */
body.legal-page {
  overflow-x: hidden;
}

.site-header--subpage {
  color: var(--green);
}

.site-header--subpage .desktop-nav .contact {
  color: #fff;
}

.site-header--subpage .menu-toggle {
  border-color: var(--green);
}

.site-header--subpage .menu-toggle img {
  filter: brightness(0) saturate(100%) invert(22%) sepia(24%) saturate(1324%) hue-rotate(118deg) brightness(88%) contrast(99%);
}

.legal-main,
.error-main {
  position: relative;
  z-index: 1;
  background: #fff;
}

.legal-main::before,
.error-main::before {
  display: none;
}

.legal-main {
  height: auto;
  min-height: 1316px;
  padding: 256px 0 120px;
  overflow: visible;
}

/* Legal pages need the full content grid so multi-column privacy tables can
   keep their labels readable instead of forcing every word onto a new line. */
.legal-main > .content-width {
  max-width: none;
}

.legal-main h1 {
  font-size: clamp(64px, 5.96vw, 103px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.legal-copy {
  width: 100%;
  max-width: none;
  margin-top: 82px;
  font-size: 20px;
  line-height: 1.02;
  overflow: visible;
  overflow-wrap: anywhere;
}

.legal-copy > * {
  max-width: 100%;
  overflow: visible;
}

.legal-copy h2,
.legal-copy h3 { overflow-wrap: break-word; }

/* Stored editor tables may include a desktop width attribute. Let their
   cells wrap within the reading column without changing saved content. */
.legal-copy table {
  width: 100%;
  max-width: 100%;
  height: auto !important;
  margin: 42px 0 52px;
  border: 1px solid rgba(3, 70, 56, .24);
  border-collapse: collapse;
  table-layout: fixed;
  font-size: clamp(15px, 1.04vw, 20px);
  line-height: 1.25;
}

.legal-copy caption {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 1.1em;
  font-weight: 700;
  text-align: left;
}

.legal-copy th,
.legal-copy td {
  padding: 16px 18px;
  border: 1px solid rgba(3, 70, 56, .2);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.legal-copy thead th,
.legal-copy thead td,
.legal-copy th {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
}

.legal-copy tbody tr:nth-child(even) {
  background: rgba(163, 178, 164, .14);
}

.legal-copy tbody tr:hover {
  background: rgba(164, 214, 94, .16);
}

/* Cookie tables use five columns: name, provider, purpose, retention and
   type. The explicit proportions prevent short fields from collapsing. */
.legal-copy th:nth-child(1),
.legal-copy td:nth-child(1) { width: 12%; }

.legal-copy th:nth-child(2),
.legal-copy td:nth-child(2) { width: 12%; }

.legal-copy th:nth-child(3),
.legal-copy td:nth-child(3) { width: 46%; }

.legal-copy th:nth-child(4),
.legal-copy td:nth-child(4) { width: 15%; }

.legal-copy th:nth-child(5),
.legal-copy td:nth-child(5) { width: 15%; }

.legal-copy td a,
.legal-copy th a {
  overflow-wrap: anywhere;
}

.legal-copy address {
  margin: 0 0 5px;
  font: inherit;
}

.legal-copy p {
  margin: 0 0 20px;
  line-height: inherit;
}

.legal-copy a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-copy--empty {
  min-height: 520px;
}

.error-main {
  min-height: 1092px;
  padding: 403px var(--side) 120px;
  text-align: center;
}

.error-content {
  width: min(833px, 100%);
  margin-inline: auto;
}

.error-content h1 {
  font-size: clamp(64px, 5.96vw, 103px);
  line-height: 1.2;
  font-weight: 700;
}

.error-content h2 {
  margin-top: 23px;
  font-size: clamp(42px, 3.53vw, 61px);
  line-height: 1.2;
}

.error-content p {
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.25;
}

.error-content .pill-button {
  width: 302px;
  justify-content: center;
  margin-top: 85px;
  padding-inline: 18px;
}

@media (max-width: 980px) {
  .site-header--subpage .menu-toggle {
    display: grid;
  }
}

@media (max-width: 720px) {
  .legal-main {
    height: auto;
    min-height: 720px;
    padding: 188px 0 90px;
  }

  .legal-main h1 {
    font-size: clamp(40px, 12vw, 54px);
    overflow-wrap: break-word;
  }

  .legal-copy {
    margin-top: 58px;
    font-size: 17px;
    line-height: 1.22;
  }

  .legal-copy table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 32px 0 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
  }

  .legal-copy table thead,
  .legal-copy table tbody {
    display: table;
    width: 100%;
    min-width: 720px;
    table-layout: fixed;
  }

  .legal-copy th,
  .legal-copy td {
    padding: 12px 11px;
    font-size: 15px;
  }

  /* Cookiebot outputs fixed-width five-column tables. On a phone, convert
     each cookie row into a labelled card so no information depends on a
     horizontal scroll position. */
  .legal-copy table.CookieDeclarationTable {
    display: block;
    width: 100% !important;
    height: auto !important;
    min-width: 0;
    margin: 28px 0 40px;
    border: 0;
    overflow: visible;
    table-layout: auto;
  }

  .legal-copy table.CookieDeclarationTable colgroup {
    display: none;
  }

  .legal-copy table.CookieDeclarationTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .legal-copy table.CookieDeclarationTable tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .legal-copy table.CookieDeclarationTable tr {
    display: block;
    margin: 0 0 14px;
    border: 1px solid rgba(3, 70, 56, .2);
    border-radius: 10px;
    overflow: hidden;
  }

  .legal-copy table.CookieDeclarationTable td {
    display: grid;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    gap: 12px;
    width: auto !important;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid rgba(3, 70, 56, .14);
    overflow-wrap: anywhere;
  }

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

  .legal-copy table.CookieDeclarationTable td::before {
    color: var(--green);
    font-weight: 700;
  }

  .legal-copy table.CookieDeclarationTable td:nth-child(1)::before { content: "Name"; }
  .legal-copy table.CookieDeclarationTable td:nth-child(2)::before { content: "Anbieter"; }
  .legal-copy table.CookieDeclarationTable td:nth-child(3)::before { content: "Zweck"; }
  .legal-copy table.CookieDeclarationTable td:nth-child(4)::before { content: "Maximale Speicherdauer"; }
  .legal-copy table.CookieDeclarationTable td:nth-child(5)::before { content: "Typ"; }

  .legal-copy p {
    margin-bottom: 22px;
  }

  .legal-copy--empty {
    min-height: 350px;
  }

  .error-main {
    min-height: 760px;
    padding: 245px 20px 110px;
  }

  .error-content h1 {
    font-size: 72px;
  }

  .error-content h2 {
    margin-top: 20px;
    font-size: 36px;
  }

  .error-content p {
    margin-top: 24px;
    font-size: 17px;
  }

  .error-content .pill-button {
    margin-top: 58px;
  }
}
