:root {
  --site-content-max: 1750px;
  --site-content-inset: max(0px, calc((100% - var(--site-content-max)) / 2));
  --site-content-gutter: var(--gut, clamp(16px, 4vw, 40px));
}

.legacy > section:not(.hero):not(:where(.blog-layout, .legal-layout, .marquee-section, .specialty-marquee)) {
  padding-inline: calc(var(--site-content-inset) + var(--site-content-gutter));
}

.legacy > section:is(.blog-layout, .legal-layout),
main.not-found-page > section.not-found-hero {
  width: 100%;
  max-width: var(--site-content-max);
  margin-inline: auto;
  padding-inline: var(--site-content-gutter);
}

.legacy .legal-document section.legal-block {
  padding: clamp(24px, 4vw, 36px);
}

/* Retain the original gutters on pages that still use the earlier design. */
@media (min-width: 1750px) {
  body > .site-header {
    padding-inline: calc(var(--site-content-inset) + 58px);
  }

  main:not(.legacy) > section:not(:where(.hero, .page-hero, .legal-hero, .not-found-hero, .specialty-marquee, .marquee-section)),
  body > .site-footer {
    padding-inline: calc(var(--site-content-inset) + 82px);
  }

  main:not(.legacy) > section:is(.page-hero, .legal-hero),
  main:not(.legacy) .slide {
    padding-inline: calc(var(--site-content-inset) + 96px);
  }

  main:not(.legacy) .slider-controls {
    left: calc(var(--site-content-inset) + 96px);
  }
}

/* The strips' backgrounds span the window. Their moving content is clipped to the container. */
main > section.marquee-section,
.legacy > section.marquee-section {
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}

main .marquee-row,
.site-width-marquee {
  width: 100%;
  max-width: var(--site-content-max);
  margin-inline: auto;
  overflow: hidden;
}

main .marquee-label {
  margin-inline-start: calc(var(--site-content-inset) + var(--site-content-gutter));
}

.specialty-marquee {
  --marquee-bg: var(--ink);
}

.legacy .specialty-marquee {
  --marquee-bg: var(--accent);
}

.site-width-marquee {
  position: relative;
}

main .specialty-marquee::before,
main .specialty-marquee::after,
.legacy .specialty-marquee::before,
.legacy .specialty-marquee::after {
  content: none;
}

.site-width-marquee::before,
.site-width-marquee::after {
  content: "";
  position: absolute;
  inset-block: 0;
  z-index: 2;
  width: clamp(70px, 10vw, 160px);
  pointer-events: none;
}

.site-width-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--marquee-bg), transparent);
}

.site-width-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--marquee-bg), transparent);
}
