/* Blank template (text pages such as Privacy Policy). Navbar, footer, tokens and fonts come from home.css. */

.legal {
  /* At least a full screen, so a short text never shows the black page background below the footer. */
  min-height: 100vh;
  min-height: 100svh;
  /* Clear of the fixed navbar and the Home logo that hangs below it. */
  padding: clamp(8rem, 12vw, 13rem) 1rem clamp(4rem, 6vw, 7.5rem);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
}

.legal__inner {
  max-width: 48rem;
  margin-inline: auto;
}

.legal__header {
  margin-bottom: clamp(2rem, 3vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 2vw, 2.5rem);
  border-bottom: 1px solid var(--color-border-primary);
}

.legal__header h1 {
  margin: 0;
  font-size: var(--font-size-heading-h2);
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal__updated {
  margin: 0.75rem 0 0;
  color: var(--color-text-tertiary);
  font-size: var(--font-size-paragraph-sm);
}

/* Text from the editor. Long legal headings stay readable in the body font, not the uppercase display font. */
.legal__content {
  font-size: var(--font-size-paragraph-md);
  line-height: 1.75;
  overflow-wrap: break-word;
}

.legal__content > :first-child { margin-top: 0; }
.legal__content > :last-child { margin-bottom: 0; }

.legal__content :is(h2, h3, h4, h5, h6) {
  margin: 2.5em 0 0.75em;
  font-family: var(--font-family-sans);
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
}

.legal__content h2 { font-size: 1.5em; }
.legal__content h3 { font-size: 1.25em; }
.legal__content :is(h4, h5, h6) { font-size: 1.0625em; }

.legal__content :is(p, ul, ol, table, blockquote) { margin: 0 0 1.25em; }
.legal__content :is(ul, ol) { padding-left: 1.5em; }
.legal__content li + li { margin-top: 0.375em; }
.legal__content strong { font-weight: 500; }

.legal__content a {
  color: var(--color-brand-ocean-blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal__content a:hover { color: var(--color-brand-hover); }

.legal__content a:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.legal__content blockquote {
  padding-left: 1em;
  border-left: 3px solid var(--color-brand-material-sand);
  color: var(--color-text-secondary);
}

.legal__content hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--color-border-primary);
}

/* Wide tables (e.g. the Complianz cookie list) scroll sideways instead of overflowing the page. */
.legal__content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--font-size-paragraph-sm);
}

.legal__content :is(th, td) {
  padding: 0.625em 0.75em;
  border: 1px solid var(--color-border-primary);
  text-align: left;
  vertical-align: top;
}

.legal__content th {
  background: var(--color-background-tertiary);
  font-weight: 500;
}

.legal__content img {
  max-width: 100%;
  height: auto;
}

/* Classic editor alignment classes. */
.legal__content .aligncenter { display: block; margin-inline: auto; }
.legal__content .alignleft { float: left; margin: 0 1.5em 1em 0; }
.legal__content .alignright { float: right; margin: 0 0 1em 1.5em; }

@media (max-width: 767px) {
  .legal__content .alignleft,
  .legal__content .alignright { float: none; margin: 0 0 1em; }
}
