/* marchock site: single stylesheet, no external requests */

/* ==========================================================================
   1. Fonts — self-hosted, subset to latin, weights 400 and 700 only
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/PlusJakartaSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/PlusJakartaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. Tokens — colour, radius, shadow, spacing and motion
   Every colour exists in all three layers: base, system dark, explicit dark.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --brand: #3a3fa8;           /* 8.55 on white, 7.56 on --tint */
  --brand-strong: #2e3294;    /* hover; 10.50 with --on-brand */
  --brand-line: #c9cdf0;      /* decorative edge, 1.56 on white; the shadow separates */
  --brand-wash: rgba(58, 63, 168, 0.1);
  --on-brand: #ffffff;        /* 8.55 on --brand */

  --ink: #141826;             /* 17.67 on white, 15.63 on --tint */
  --body: #3b4256;            /* 10.00 on white, 8.85 on --tint */
  --muted: #5a6275;           /* 6.11 on white, 5.40 on --tint */

  --surface: #ffffff;
  --page: #f6f7f9;
  --tint: #eef1f8;
  --rule: #dfe2ea;            /* decorative, 1.30 on white; in light the shadow separates */

  --header-bg: rgba(255, 255, 255, 0.88);

  /* paper stays black on white whichever theme is on screen; 21.00 */
  --print-ink: #000000;
  --print-paper: #ffffff;

  --shadow-card: 0 1px 2px rgba(20, 24, 38, 0.04), 0 4px 12px rgba(20, 24, 38, 0.05);
  --shadow-lift: 0 2px 4px rgba(20, 24, 38, 0.04), 0 12px 28px rgba(20, 24, 38, 0.08);
  --shadow-header: 0 1px 0 var(--rule), 0 6px 20px rgba(20, 24, 38, 0.06);

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --radius-control: 8px;
  --radius-chip: 12px;
  --radius-card: 16px;

  --shell-max: 1180px;
  --shell-gutter: 20px;
  --section-gap: 60px;
  --header-height: 64px;
  --control-size: 44px;

  --dur-instant: 120ms;
  --dur-quick: 180ms;
  --dur-settle: 280ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --lift: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #9aa5f5;           /* 7.65 on --surface, 7.02 on --tint */
    --brand-strong: #bcc3fa;    /* hover; 11.31 with --on-brand */
    --brand-line: #666fbb;      /* 3.84 on --surface, 3.52 on --tint, so a hover edge stays above 3:1 */
    --brand-wash: rgba(154, 165, 245, 0.16);
    --on-brand: #0b0e17;        /* 8.33 on --brand */

    --ink: #eceff7;             /* 15.39 on --surface, 14.12 on --tint */
    --body: #c0c6d6;            /* 10.36 on --surface, 9.50 on --tint */
    --muted: #9aa2b6;           /* 6.93 on --surface, 6.35 on --tint */

    --surface: #141824;
    --page: #0e111a;
    --tint: #1a2030;
    --rule: #626b8c;            /* carries the card edge: 3.37 on --surface, 3.59 on --page, 3.09 on --tint */

    --header-bg: rgba(20, 24, 36, 0.88);

    /* paper stays black on white whichever theme is on screen; 21.00 */
    --print-ink: #000000;
    --print-paper: #ffffff;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.32), 0 4px 12px rgba(0, 0, 0, 0.28);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.34), 0 12px 28px rgba(0, 0, 0, 0.42);
    --shadow-header: 0 1px 0 var(--rule), 0 6px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --brand: #9aa5f5;           /* 7.65 on --surface, 7.02 on --tint */
  --brand-strong: #bcc3fa;    /* hover; 11.31 with --on-brand */
  --brand-line: #666fbb;      /* 3.84 on --surface, 3.52 on --tint, so a hover edge stays above 3:1 */
  --brand-wash: rgba(154, 165, 245, 0.16);
  --on-brand: #0b0e17;        /* 8.33 on --brand */

  --ink: #eceff7;             /* 15.39 on --surface, 14.12 on --tint */
  --body: #c0c6d6;            /* 10.36 on --surface, 9.50 on --tint */
  --muted: #9aa2b6;           /* 6.93 on --surface, 6.35 on --tint */

  --surface: #141824;
  --page: #0e111a;
  --tint: #1a2030;
  --rule: #626b8c;            /* carries the card edge: 3.37 on --surface, 3.59 on --page, 3.09 on --tint */

  --header-bg: rgba(20, 24, 36, 0.88);

  /* paper stays black on white whichever theme is on screen; 21.00 */
  --print-ink: #000000;
  --print-paper: #ffffff;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.32), 0 4px 12px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.34), 0 12px 28px rgba(0, 0, 0, 0.42);
  --shadow-header: 0 1px 0 var(--rule), 0 6px 24px rgba(0, 0, 0, 0.5);
}

@media (min-width: 900px) {
  :root {
    --shell-gutter: 40px;
    --section-gap: 84px;
  }
}

/* ==========================================================================
   3. Reset and base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* anchor targets must clear the sticky header */
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--body);
  background: var(--surface);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

p,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  /* bare addresses have no spaces to break at and would push a 320px page sideways */
  overflow-wrap: break-word;
}

a:hover {
  text-decoration: none;
}

/* 2px in --brand: at least 7.56 on light and 7.02 on dark surfaces */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* a brand ring would merge with the brand button; --ink holds 17.67 light and 15.39 dark */
.button--primary:focus-visible {
  outline-color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--surface);
  border-radius: 0 0 var(--radius-control) 0;
  color: var(--brand);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--shell-gutter);
}

.section {
  padding-block: var(--section-gap);
}

.section--page {
  background: var(--page);
}

.section__head {
  max-width: 62ch;
  margin-bottom: 32px;
}

.section__title {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
}

.section__intro {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ==========================================================================
   5. Building blocks — kicker, bar, chip, card, grid, hint, lists
   ========================================================================== */

.kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* exactly once per page, in the hero */
.bar {
  width: 96px;
  height: 4px;
  margin-bottom: 26px;
  background: var(--brand);
  border-radius: 999px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  background: var(--brand-wash);
  border-radius: var(--radius-chip);
  color: var(--brand);
}

.card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition:
    border-color var(--dur-settle) var(--ease-out),
    box-shadow var(--dur-settle) var(--ease-out),
    transform var(--dur-settle) var(--ease-out);
}

.card:hover {
  transform: translateY(calc(var(--lift) * -1));
  border-color: var(--brand-line);
  box-shadow: var(--shadow-lift);
}

.card__title {
  margin-top: 14px;
  font-size: 1.08rem;
  /* long german compounds must not force the grid column wider */
  overflow-wrap: break-word;
  hyphens: auto;
}

.card__text {
  margin-top: 8px;
  max-width: 46ch;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid {
    gap: 22px;
  }
}

.hint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--tint);
}

.hint__icon {
  display: flex;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--brand);
}

.hint__icon svg {
  width: 100%;
  height: 100%;
}

.hint__text {
  color: var(--body);
  font-size: 0.94rem;
}

@media (min-width: 640px) {
  .hint {
    padding: 18px 22px;
  }
}

.definitions {
  border-top: 1px solid var(--rule);
}

.definitions__row {
  display: grid;
  gap: 2px 24px;
  padding-block: 15px;
  border-bottom: 1px solid var(--rule);
}

.definitions__label {
  color: var(--ink);
  font-weight: 700;
}

.definitions__value {
  color: var(--muted);
}

@media (min-width: 640px) {
  .definitions__row {
    grid-template-columns: 190px 1fr;
  }
}

.dotted {
  display: grid;
  gap: 10px;
}

.dotted > li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.dotted > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-size);
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-quick) var(--ease-out),
    border-color var(--dur-quick) var(--ease-out),
    box-shadow var(--dur-quick) var(--ease-out),
    transform var(--dur-quick) var(--ease-out);
}

.button--primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--shadow-card);
}

.button--primary:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.button--primary:active {
  transform: translateY(0);
  transition-duration: var(--dur-instant);
}

.button--secondary {
  background: var(--surface);
  border-color: var(--rule);
  color: var(--ink);
}

.button--secondary:hover {
  background: var(--tint);
  border-color: var(--brand-line);
}

.button--lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 1.02rem;
}

/* ==========================================================================
   7. Header — wordmark, navigation, theme and language switch, drawer
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  /* falls back to the solid colour where backdrop-filter is unsupported */
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
  transition:
    box-shadow var(--dur-settle) var(--ease-out),
    border-color var(--dur-settle) var(--ease-out);
}

/* set by main.js once content scrolls underneath; without javascript the flat edge stays */
.header.is-stuck {
  border-bottom-color: transparent;
  box-shadow: var(--shadow-header);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control-size);
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
}

.wordmark__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__link {
  display: none;
  align-items: center;
  min-height: var(--control-size);
  padding-inline: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--dur-quick) var(--ease-out);
}

.header__link:hover {
  color: var(--ink);
}

.header__settings {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

/* theme switch: shows the target, the moon on light and the sun on dark */

.theme-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 44px hit area inside a 1px border, as tall as the language switch beside it */
  width: calc(var(--control-size) + 2px);
  height: calc(var(--control-size) + 2px);
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--brand);
  cursor: pointer;
  transition:
    background-color var(--dur-quick) var(--ease-out),
    border-color var(--dur-quick) var(--ease-out);
}

.theme-switch:hover {
  border-color: var(--brand);
  background: var(--tint);
}

.theme-switch svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.theme-switch[hidden] {
  display: none;
}

.theme-switch__sun {
  display: none;
}

.theme-switch__moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-switch__sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-switch__moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-switch__sun {
  display: block;
}

:root[data-theme="dark"] .theme-switch__moon {
  display: none;
}

/* language switch: two plain links, the current one is static text */

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.lang-switch__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--control-size);
  min-height: var(--control-size);
  padding: 0 8px;
  border-radius: calc(var(--radius-control) - 1px);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    color var(--dur-quick) var(--ease-out),
    background-color var(--dur-quick) var(--ease-out);
}

a.lang-switch__option:hover {
  color: var(--ink);
  background: var(--tint);
}

.lang-switch__option[aria-current="true"] {
  background: var(--brand-wash);
  color: var(--brand);
}

/* mobile drawer: <details>, so it opens without javascript */

.nav-toggle > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--control-size);
  height: var(--control-size);
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition:
    background-color var(--dur-quick) var(--ease-out),
    border-color var(--dur-quick) var(--ease-out);
}

.nav-toggle > summary::-webkit-details-marker {
  display: none;
}

.nav-toggle > summary:hover {
  background: var(--tint);
  border-color: var(--brand-line);
}

/* the burger turns into a cross when open, drawn in css */
.nav-toggle__icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--dur-settle) var(--ease-out);
}

.nav-toggle__icon::before {
  transform: translateY(-6px);
}

.nav-toggle__icon::after {
  transform: translateY(6px);
}

.nav-toggle[open] .nav-toggle__icon {
  background: transparent;
}

.nav-toggle[open] .nav-toggle__icon::before {
  transform: rotate(45deg);
}

.nav-toggle[open] .nav-toggle__icon::after {
  transform: rotate(-45deg);
}

/* anchored to the full-width sticky header, not to the narrow nav */
.nav-drawer {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-height);
  display: grid;
  gap: 4px;
  padding: 12px var(--shell-gutter) 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow-lift);
}

.nav-drawer a:not(.lang-switch__option) {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.nav-drawer a:not(.lang-switch__option):hover {
  background: var(--tint);
  color: var(--brand);
}

.nav-drawer__settings {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  justify-self: start;
}

@media (min-width: 768px) {
  .header__link {
    display: inline-flex;
  }

  .header__settings {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

/* ==========================================================================
   8. Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: 56px 64px;
  background:
    radial-gradient(110% 90% at 85% 0%, var(--brand-wash) 0%, transparent 60%),
    linear-gradient(180deg, var(--tint) 0%, var(--surface) 80%);
  overflow: hidden;
}

/* a faint 44px grid gives the gradient texture; it fades out before the section edge */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--brand);
  opacity: 0.04;
  mask-image: linear-gradient(180deg, black 0%, transparent 72%);
}

.hero__inner {
  position: relative;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero__lead {
  margin-top: 22px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero .actions {
  margin-top: 34px;
}

@media (min-width: 900px) {
  .hero {
    padding-block: 96px 112px;
  }
}

/* ==========================================================================
   9. Services
   ========================================================================== */

.services__icon {
  width: 22px;
  height: 22px;
}

/* a floor so one-line and three-line cards in the same row do not read as half-empty */
@media (min-width: 900px) {
  .services > .card {
    min-height: 200px;
  }
}

/* ==========================================================================
   10. Products
   ========================================================================== */

.products {
  display: grid;
  gap: 22px;
}

.product {
  display: grid;
  gap: 16px;
  justify-items: start;
  max-width: 760px;
  padding: 24px;
  background: var(--tint);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.product__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product__name {
  font-size: 1.35rem;
}

.product__tag {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.product__text {
  max-width: 60ch;
  color: var(--body);
}

@media (min-width: 640px) {
  .product {
    padding: 32px;
  }
}

/* ==========================================================================
   11. Contact
   ========================================================================== */

.contact {
  max-width: 62ch;
}

.contact__text {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact__link {
  margin-top: 28px;
  /* the address is one unbreakable word; let it wrap rather than overflow on 320px */
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.footer {
  padding-block: 48px 36px;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__grid {
  display: grid;
  gap: 24px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.footer__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.footer__list {
  display: grid;
  margin-top: 8px;
}

.footer__list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 4px;
}

.footer__list a,
.footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-size);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.footer__nav a {
  color: var(--ink);
  font-weight: 700;
}

.footer__baseline {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.83rem;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .footer__nav {
    justify-content: flex-end;
  }
}

/* ==========================================================================
   13. Legal pages — imprint and privacy policy
   ========================================================================== */

.legal {
  padding-block: 48px var(--section-gap);
}

.prose {
  max-width: 72ch;
}

.legal__title {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  /* "Datenschutzerklärung" exceeds a 320px viewport at a fixed size */
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal__lead {
  margin-top: 16px;
  color: var(--body);
  font-size: 1.08rem;
}

.legal .hint {
  margin-block: 32px;
}

/* a rule above every section heading; the toc label is a heading but not a section */
.legal h2:not(.legal-toc__label) {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  font-size: 1.35rem;
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.legal .legal-toc + h2:not(.legal-toc__label) {
  margin-top: 44px;
  padding-top: 0;
  border-top: 0;
}

.prose > p {
  margin-top: 14px;
  max-width: 68ch;
}

.legal .dotted,
.legal .definitions {
  margin-top: 18px;
  max-width: 68ch;
}

.provider {
  margin-top: 20px;
  max-width: 68ch;
  padding: 4px 16px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.provider__row {
  display: grid;
  gap: 2px 24px;
  padding-block: 15px;
  border-bottom: 1px solid var(--rule);
}

.provider__row:last-child {
  border-bottom: 0;
}

.provider__label {
  color: var(--ink);
  font-weight: 700;
}

.provider__value {
  color: var(--body);
}

/* <address> is italic by default; here it is an address, not emphasis */
.provider__address {
  font-style: normal;
}

.provider__value a {
  text-decoration-color: var(--brand-line);
  text-underline-offset: 3px;
}

.provider__value a:hover {
  text-decoration-color: currentColor;
}

@media (min-width: 640px) {
  .provider {
    padding-inline: 22px;
  }

  .provider__row {
    grid-template-columns: 190px 1fr;
  }
}

.legal-toc {
  margin-top: 34px;
  max-width: 68ch;
  padding: 22px 24px;
  background: var(--tint);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
}

.legal-toc__label {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.legal-toc__list {
  margin-top: 8px;
  counter-reset: toc;
}

.legal-toc__list > li {
  display: flex;
  align-items: center;
  counter-increment: toc;
}

.legal-toc__list > li::before {
  content: counter(toc) ".";
  flex: 0 0 1.6em;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.legal-toc__list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-size);
  color: var(--body);
  font-size: 0.93rem;
  text-decoration: none;
}

.legal-toc__list a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-size);
  margin-top: 48px;
  font-weight: 700;
  text-decoration: none;
}

.backlink:hover {
  text-decoration: underline;
}

/* ==========================================================================
   14. Motion — hover transitions only, all disabled for reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .button--primary:hover {
    transform: none;
  }
}

/* ==========================================================================
   15. Print — the legal pages get printed
   ========================================================================== */

@media print {
  /* every layer resolves to black on white; this list matches the specificity of the dark layers and comes later */
  :root,
  :root:not([data-theme="light"]),
  :root[data-theme="dark"] {
    --brand: var(--print-ink);
    --brand-strong: var(--print-ink);
    --brand-line: var(--print-ink);
    --brand-wash: var(--print-paper);
    --on-brand: var(--print-paper);
    --ink: var(--print-ink);
    --body: var(--print-ink);
    --muted: var(--print-ink);
    --rule: var(--print-ink);
    --surface: var(--print-paper);
    --page: var(--print-paper);
    --tint: var(--print-paper);
  }

  .header,
  .skip-link,
  .actions,
  .backlink {
    display: none;
  }

  /* browsers drop backgrounds when printing, which would leave --on-brand text on nothing */
  .button--primary {
    background: var(--surface);
    border-color: var(--rule);
    color: var(--ink);
  }

  .hero::before {
    display: none;
  }

  .card,
  .product,
  .provider {
    box-shadow: none;
  }
}
