:root {
  --ink: #303031;
  --paper: #fbfdfa;
  --dark: #202121;
  --muted: #777878;
  --green: #239653;
  --rule: #d9ddd8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  /* Match the main page: stop at the footer without elastic overscroll. */
  overscroll-behavior-y: none;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
}

/* Keep the backdrop viewport-sized during mobile scrolling. The footer stays
   in the document flow after the article, above this background layer. */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper) url("/resources/backgrounds/web-bg-light.webp") center / cover no-repeat;
  pointer-events: none;
  content: "";
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-shell {
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
  padding: 64px 0 96px;
}

.legal-article {
  padding: clamp(24px, 5vw, 64px);
  border: 1px solid rgb(48 48 49 / 10%);
  border-radius: 16px;
  background: rgb(251 253 250 / 94%);
  box-shadow: 0 16px 48px rgb(0 0 0 / 8%);
}

.legal-article h1 {
  margin: 0 0 16px;
  color: var(--dark);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.legal-article h1::after {
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 24px;
  background: var(--green);
  content: "";
}

.legal-article h2 {
  margin: 48px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  color: var(--dark);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.legal-article h3 {
  margin: 32px 0 12px;
  color: var(--dark);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.legal-article p,
.legal-article li {
  font-size: 1rem;
  line-height: 1.65;
}

.legal-article > p,
.legal-article > ul,
.legal-article > h2,
.legal-article > h3 {
  max-width: 840px;
}

.legal-article p {
  margin: 0 0 20px;
}

.legal-article h1 + p,
.legal-article h1 + p + p {
  color: var(--muted);
}

.legal-article ul {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding-left: 24px;
}

.legal-article li::marker {
  color: var(--green);
}

.legal-article strong {
  font-weight: 700;
}

.legal-article a {
  color: #17723d;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.load-error {
  padding: 24px;
  border-left: 4px solid var(--green);
  background: white;
}

@media (max-width: 640px) {
  .legal-shell {
    width: min(calc(100% - 24px), 920px);
    padding: 24px 0 48px;
  }

  .legal-article {
    border-radius: 12px;
    padding: 24px 20px 40px;
  }

  .legal-article h1 {
    font-size: clamp(1.35rem, 6.5vw, 1.75rem);
  }

  .legal-article h2 {
    margin-top: 40px;
    padding-top: 24px;
    font-size: 1.3rem;
  }

}

@media print {
  body {
    background: white;
  }

  body::before {
    display: none;
  }

  .legal-shell {
    width: 100%;
    padding: 24px 0;
  }

  .legal-article {
    border: 0;
    box-shadow: none;
  }
}
