/* Nidromo: "Samstagskurve", Hallenboden system.
   Tokens are documented in _build/README.md. No gradients, no shadows, no cards.
   Radius has a meaning: circle = match/state, 4px = controls, 6px = code panels, 0 = table cells. */

/* ---------------------------------------------------------------- fonts */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
}
/* metric-adjusted fallbacks: keep line breaks close while Archivo loads */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 98.2%;
  ascent-override: 89.4%;
  descent-override: 21.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo Wide Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 126.3%;
  ascent-override: 69.5%;
  descent-override: 16.6%;
  line-gap-override: 0%;
}

/* ---------------------------------------------------------------- tokens */
:root {
  --boden: #1F5E50;      /* Hallenboden: floor bands, text on light */
  --licht: #EEF2EE;      /* Hallenlicht: reading areas */
  --weiss: #FFFFFF;      /* Linienweiß: text and lines on floor */
  --gelb: #F4C534;       /* Spielgelb: now/live only */
  --kreide: #C7DDD5;     /* Kreide: secondary text on floor */
  --tief: #123B33;       /* Tiefgrün: code panels */
  --abrieb: #3E675C;     /* Abrieb: secondary text on light */
  --rule: #B9CCC4;       /* Linie auf Licht: 1px separators in the use-case list */
  --heat-1: #8AB2A4;     /* 10-99 */
  --heat-2: #3E7A69;     /* 100-999 */
  --heat-3: #1F5E50;     /* 1000+ */

  --sans: "Archivo", "Archivo Fallback", system-ui, sans-serif;
  --wide: "Archivo", "Archivo Wide Fallback", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 80rem;
  --section: clamp(4rem, 10vw, 9rem);
  --line: 4px;           /* Spielfeldlinie */

  --fs-14: 0.875rem;
  --fs-17: 1.0625rem;
  --fs-22: 1.375rem;
  --fs-30: 1.875rem;
  --fs-h2: clamp(2rem, 1.15rem + 2.9vw, 3.5rem);
  --fs-h1: clamp(2.6rem, 1rem + 5.6vw, 5.75rem);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--boden);
  scroll-padding-top: 1.5rem;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-17);
  line-height: 1.55;
  font-weight: 400;
  font-stretch: 100%;
  font-synthesis: none;
  font-kerning: normal;
  color: var(--tief);
  background: var(--licht);
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:lang(de) { hyphenate-limit-chars: 10 4 4; }
code, pre, kbd { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.8125rem; }
pre code { font-size: inherit; font-stretch: inherit; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--boden); outline-offset: 3px; }
.floor :focus-visible, .panel :focus-visible { outline-color: var(--gelb); }

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -6rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--weiss);
  color: var(--boden);
  border-radius: 4px;
  font-weight: 620;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 1.5rem);
}

.floor { background: var(--boden); color: var(--weiss); }
.light { background: var(--licht); color: var(--tief); }
.light h1, .light h2, .light h3 { color: var(--boden); }

.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- type */
h1 {
  font-family: var(--wide);
  font-stretch: 125%;
  font-weight: 760;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h2, .h2 {
  font-family: var(--wide);
  font-stretch: 122%;
  font-weight: 740;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h3 { font-size: var(--fs-22); line-height: 1.2; font-weight: 700; font-stretch: 115%; }
.lead { font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem); line-height: 1.5; max-width: 36rem; }
.prose { max-width: 36rem; }
.prose p + p { margin-top: 1em; }
.note { font-size: var(--fs-14); line-height: 1.5; color: var(--abrieb); max-width: 40rem; }
.floor .note { color: var(--kreide); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 640;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.floor .btn-primary { background: var(--weiss); color: var(--boden); }
.floor .btn-primary:hover { background: var(--kreide); }
.light .btn-primary { background: var(--boden); color: var(--weiss); }
.light .btn-primary:hover { background: var(--tief); }
.btn-ghost {
  min-height: 2.75rem;
  padding: 0.375rem 1rem;
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 2px currentColor;
  font-size: var(--fs-14);
  font-weight: 600;
}
.btn-ghost:hover { background: var(--tief); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.textlink { font-weight: 600; }

/* ---------------------------------------------------------------- header */
.site-head { padding-block: 1.5rem; }
@media (min-width: 64rem) {
  /* short laptop screens: every pixel above the chart counts */
  .site-head { padding-block: clamp(0.875rem, 2.5svh, 1.5rem); }
}
.site-head .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav langs";
  align-items: center;
  gap: 0.5rem 2.5rem;
}
.site-head .brand { grid-area: brand; }
.site-head .nav { grid-area: nav; justify-self: end; }
.site-head .langs { grid-area: langs; }
.brand { display: inline-flex; color: inherit; padding-block: 0.5rem; }
.brand .wm { height: 1.625rem; width: auto; }
.nav ul { display: flex; gap: 0.25rem 1.75rem; flex-wrap: wrap; }
.nav a { display: inline-block; padding-block: 0.625rem; text-decoration: none; font-weight: 560; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.langs ul { display: flex; gap: 0.875rem; }
.langs a {
  display: inline-block;
  padding-block: 0.625rem 0.375rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--kreide);
  border-bottom: 2px solid transparent;
}
.langs a[aria-current] { color: var(--weiss); border-bottom-color: var(--weiss); }

/* ---------------------------------------------------------------- hero */
.hero { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.hero h1 {
  grid-column: 1 / -1;
  margin-top: clamp(1.25rem, 3vw, 2.5rem);
  /* on short screens the H1 gives way so the chart's baseline stays in the first view */
  font-size: clamp(2.6rem, min(1rem + 5.6vw, 11svh), 5.75rem);
}
.hero .lead { grid-column: 1 / span 8; max-width: 40rem; margin-top: clamp(1.25rem, 2vw, 1.75rem); }
.hero .actions { grid-column: 1 / -1; margin-top: 1.75rem; }
@media (min-width: 64rem) {
  .hero h1 { margin-top: clamp(1.25rem, 4svh, 2.5rem); }
  .hero .lead { font-size: 1.25rem; max-width: 44rem; margin-top: clamp(1.25rem, 2svh + 0.5rem, 1.75rem); }
  .hero .actions {
    grid-column: 9 / -1;
    align-self: start;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    margin-top: clamp(1.25rem, 2svh + 0.5rem, 1.75rem);
    padding-top: 0.25rem;
  }
}

/* ---------------------------------------------------------------- Samstagskurve */
/*bake:anno*/.md{--ax:38.4615%}/*/bake:anno*/
.md {
  grid-column: 1 / -1;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  --band: 4.5rem;
  --h: 15rem;
  --drop: 0px;
}
@media (min-width: 64rem) {
  /* What sits above the chart scales with the viewport height (header, H1 at 11svh, spacing):
     about 24.5rem + 22svh including the axis. The rest goes to the chart, so baseline and
     axis are in the first view from about 720px height (1366x768, 1280x800, 1440x900). */
  .md { margin-top: clamp(1.25rem, 3.5svh, 2.5rem); --h: clamp(12rem, 78svh - 24.5rem, 15rem); }
}
.md-plot { position: relative; padding-top: var(--band); }
.md-draw {
  position: relative;
  height: var(--h);
  border-bottom: var(--line) solid var(--weiss);
}
.md-draw img, .md-draw picture, .md-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.md-anno {
  position: absolute;
  top: 0;
  left: var(--ax);
  height: calc(var(--band) + var(--drop));
  max-width: min(26rem, calc(100% - var(--ax)));
  padding-left: 0.75rem;
  border-left: 2px solid var(--gelb);
  transition: opacity 250ms ease-out;
}
.md-anno.flip {
  left: auto;
  right: calc(100% - var(--ax));
  max-width: min(26rem, var(--ax));
  padding: 0 0.75rem 0 0;
  border-left: 0;
  border-right: 2px solid var(--gelb);
  text-align: right;
}
.md-anno-t {
  display: block;
  font-family: var(--wide);
  font-stretch: 125%;
  font-weight: 760;
  font-size: 2.125rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: -0.12em;
}
.md-anno-s { display: block; margin-top: 0.375rem; font-size: 1rem; line-height: 1.35; text-wrap: balance; }
.md.is-live:not(.is-done) .md-anno { opacity: 0; }

.md-head {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease-out;
}
.md-head::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--gelb);
}
.md-head-label { position: absolute; top: 0; left: 0.75rem; white-space: nowrap; }
.md-head.flip .md-head-label { left: auto; right: 0.75rem; text-align: right; }
.md-clock {
  display: block;
  font-family: var(--wide);
  font-stretch: 125%;
  font-weight: 760;
  font-size: 2.125rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: -0.12em;
}
.md-count { display: block; margin-top: 0.375rem; font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--kreide); }
.md.is-playing .md-head { opacity: 1; }

.md-axis {
  position: relative;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  color: var(--kreide);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.md-axis li { position: relative; padding-top: 0.875rem; }
.md-axis li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 8px;
  background: var(--weiss);
}
.md-axis li:last-child { position: absolute; right: 0; top: 0; }
.md-axis li:last-child::before { left: auto; right: 0; }
.md-axis span { display: inline-block; transform: translateX(-0.2em); }
.md-axis li:first-child span { transform: none; }
.md-axis li:last-child span { transform: translateX(0.1em); }

.md-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 1.5rem;
}
.md-filter { border: 0; margin: 0; padding: 0; min-width: 0; }
.md-filter .opts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.md-filter input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.md-filter label {
  display: inline-flex;
  gap: 0.4em;
  align-items: baseline;
  padding: 0.5rem 0 0.375rem;
  border-bottom: var(--line) solid transparent;
  font-weight: 600;
  cursor: pointer;
}
.md-filter label .n { color: var(--kreide); font-weight: 450; font-variant-numeric: tabular-nums; }
.md-filter input:checked + label { border-bottom-color: var(--weiss); }
.md-filter label:hover { border-bottom-color: var(--kreide); }
.md-filter input:checked + label:hover { border-bottom-color: var(--weiss); }
.md-filter input:focus-visible + label { outline: 3px solid var(--gelb); outline-offset: 2px; }
.md-status { margin-top: 1rem; min-height: 1.55em; font-weight: 560; }
/* stays in the accessibility tree while empty, so the first announcement is not lost */
.md-status:empty { margin-top: 0; min-height: 0; }

.md-cap { margin-top: 1.5rem; max-width: 50rem; color: var(--kreide); font-size: 1rem; line-height: 1.5; }
.md-cap strong { color: var(--weiss); font-weight: 600; }
.md-foot { margin-top: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.125rem; font-size: var(--fs-14); color: var(--kreide); }
.legend .n { font-variant-numeric: tabular-nums; }
.legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.pict {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex: none;
}
.pict.done { background: var(--weiss); }
.pict.open { background: var(--heat-1); }
.pict.off { box-shadow: inset 0 0 0 2px var(--kreide); }

.md-table summary {
  cursor: pointer;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--weiss);
  padding-block: 0.5rem;
}
.md-table summary::marker { color: var(--kreide); }
.md-table[open] summary { margin-bottom: 0.75rem; }
.scroll { overflow-x: auto; }
.hourly {
  border-collapse: collapse;
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 100%;
}
.hourly th, .hourly td { padding: 0.4rem 0.9rem 0.4rem 0; text-align: right; }
.hourly th:first-child { text-align: left; }
.hourly thead th { color: var(--kreide); font-weight: 560; }
.hourly tbody th { font-weight: 560; }
.hourly tfoot > tr > * { border-top: 2px solid var(--weiss); font-weight: 650; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: var(--section); }
.section-head { grid-column: 1 / span 8; }
.section-head p { margin-top: 1.5rem; max-width: 36rem; }
.section + .section.light { padding-top: 0; }

/* ---------------------------------------------------------------- coverage */
.cov-intro { grid-column: 1 / span 7; }
.cov-intro .h2 + p { margin-top: 1.5rem; }
.cov-figures { margin-top: 1rem; }
.cov-slot { grid-column: 1 / -1; margin-top: clamp(2.5rem, 5vw, 4rem); overflow-x: auto; }

.cov { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.cov-wide { table-layout: fixed; }
.cov-wide .c-sport { width: 10rem; }
.cov-wide .c-none { width: 6.5rem; }
.cov-wide .c-tot { width: 7.25rem; }
.cov th, .cov td { padding: 0 0.75rem; height: 2.75rem; text-align: right; vertical-align: middle; }
.cov .l { text-align: left; padding-left: 0; font-weight: 620; }
.cov thead th { font-size: var(--fs-14); font-weight: 560; color: var(--abrieb); height: auto; padding-bottom: 0.625rem; vertical-align: bottom; line-height: 1.2; }
.cov thead .grp th { padding-bottom: 0.25rem; text-align: left; color: var(--boden); font-weight: 650; }
.cov thead .grp td { height: auto; }
.cov td.lv { position: relative; }
.cov td.lv > span { position: relative; }
.cov td.lv::before { content: ""; position: absolute; inset: 1px; }
.cov td.q1::before { background: var(--heat-1); }
.cov td.q1 { color: var(--tief); }
.cov td.q2::before { background: var(--heat-2); }
.cov td.q2 { color: var(--weiss); }
.cov td.q3::before { background: var(--heat-3); }
.cov td.q3 { color: var(--weiss); font-weight: 600; }
.cov td.nil { color: var(--abrieb); }
.cov td.none { color: var(--abrieb); }
.cov .toponly { text-align: left; color: var(--abrieb); }
.cov tbody.top > tr:first-child > * { padding-top: 1.25rem; height: 4rem; }
.cov tfoot > tr > * { border-top: var(--line) solid var(--boden); font-weight: 650; height: 3.5rem; vertical-align: top; padding-top: 0.625rem; }

.cov-narrow { display: none; }
.cov-narrow .l .nm { display: block; }
.cov-narrow .l .sub { display: block; font-size: 0.8125rem; font-weight: 450; line-height: 1.35; color: var(--abrieb); }
.cov-narrow { font-size: 0.875rem; }
.cov-narrow th, .cov-narrow td { padding: 0 0.3125rem; height: 3.25rem; }
.cov-narrow .l { padding-left: 0; padding-right: 0.5rem; font-size: 0.9375rem; }
/* all heads of the narrow table share one condensed width, so five level names fit at 360px */
.cov-narrow thead th { font-size: 0.8125rem; font-stretch: 82%; }
.cov-narrow .toponly { font-size: 0.8125rem; }
.cov-narrow tfoot > tr > * { height: 3.75rem; }
@media (max-width: 24rem) {
  .cov-narrow th, .cov-narrow td { padding: 0 0.2rem; }
  .cov-narrow .l { padding-right: 0.25rem; }
}

@media (min-width: 48rem) {
  .ph { display: inline-block; }
  .cov-narrow { table-layout: fixed; font-size: 1rem; }
  .cov-narrow thead .l { width: 13rem; }
  .cov-narrow th, .cov-narrow td { padding: 0 0.75rem; }
  .cov-narrow .l { padding-left: 0; font-size: 1rem; }
  .cov-narrow thead th { font-size: var(--fs-14); font-stretch: 100%; }
  .cov-narrow .toponly { font-size: 0.9375rem; }
}
.cov-notes { grid-column: 1 / span 8; margin-top: 1.75rem; display: grid; gap: 0.75rem; }

@media (max-width: 71.99rem) {
  .cov-wide { display: none; }
  .cov-narrow { display: table; }
}

/* ---------------------------------------------------------------- API */
.api-cols { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.api-cols > .code-col { grid-column: 1 / span 8; min-width: 0; }
.api-cols > .side { grid-column: 9 / span 4; min-width: 0; }
.api-cols + .api-cols { margin-top: clamp(3rem, 6vw, 5rem); }

.panel {
  background: var(--tief);
  color: var(--weiss);
  border-radius: 6px;
  min-width: 0;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.875rem 1.25rem 0;
}
.panel-head code { color: var(--weiss); overflow-wrap: anywhere; }
.panel-head .req { display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; }
.panel-head .code200 { color: var(--kreide); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.panel-head .btn-ghost { min-height: 2.5rem; color: var(--weiss); }
.panel pre {
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  overflow: auto;
  line-height: 1.7;
  tab-size: 2;
}
.panel pre:focus-visible { outline: 3px solid var(--gelb); outline-offset: -3px; border-radius: 6px; }
.panel .ln { display: block; white-space: pre; padding-left: 0.75rem; margin-left: -0.75rem; }
.panel .k, .panel .p { color: var(--kreide); }
.panel .s, .panel .n { color: var(--weiss); }
.resp pre { max-height: 31rem; }

.cmp-panel { padding: 1.25rem 1.25rem 1.375rem; }
.cmp-scroll { overflow-x: auto; }
.cmp-pick { display: none; position: relative; border: 0; margin: 0; padding: 0; min-width: 0; }
.cmp {
  border-collapse: collapse;
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-size: 0.8125rem;
  line-height: 1.5;
  width: 100%;
}
.cmp th, .cmp td { padding: 0.25rem 0; vertical-align: top; text-align: left; font-weight: 400; }
.cmp thead th {
  font-family: var(--sans);
  font-stretch: 100%;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--weiss);
  padding-bottom: 0.625rem;
}
.cmp .ck { text-align: right; padding-right: 0.75rem; white-space: nowrap; width: 1%; }
.cmp .cv { padding-right: 1.25rem; white-space: nowrap; }
.cmp .k, .cmp .p { color: var(--kreide); }
.cmp .s, .cmp .n { color: var(--weiss); }

.side .note { margin-top: 0; }
.fields { display: grid; gap: 1.125rem; font-size: 0.9375rem; line-height: 1.5; }
.fields dt code { font-size: 0.8125rem; font-weight: 500; }
.fields dd { margin-top: 0.25rem; }
.fields dd code { font-size: 0.75rem; }

.endpoints-wrap { grid-column: 1 / -1; margin-top: clamp(3.5rem, 7vw, 6rem); }
.endpoints {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 1.5rem);
  row-gap: 1.5rem;
  margin-top: 1.5rem;
}
.endpoints div { grid-column: span 6; min-width: 0; }
.endpoints dt code { font-size: 0.8125rem; font-weight: 520; overflow-wrap: anywhere; }
.endpoints dd { margin-top: 0.25rem; font-size: 0.9375rem; line-height: 1.5; max-width: 32rem; }
.endpoints-more { margin-top: 2rem; }

/* ---------------------------------------------------------------- use cases */
.uses { grid-column: 1 / -1; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.uses li {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 1.5rem);
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.uses li:last-child { border-bottom: 1px solid var(--rule); }
.uses h3 { grid-column: 1 / span 3; }
.uses p { grid-column: 4 / span 5; max-width: 34rem; }
.uses .eps { grid-column: 9 / span 4; display: grid; gap: 0.25rem; justify-items: start; }
.uses .eps code { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- principles */
.principles { border-top: var(--line) solid var(--boden); padding-top: clamp(2.5rem, 5vw, 4rem); }
.principles .h2 { grid-column: 1 / -1; }
.pr { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin-top: clamp(3rem, 5vw, 4rem); row-gap: 1rem; }
.pr h3 { grid-column: 1 / span 5; align-self: start; position: sticky; top: 1.5rem; font-size: var(--fs-30); line-height: 1.1; font-stretch: 115%; font-weight: 700; text-wrap: balance; }
.pr .body { grid-column: 7 / span 6; max-width: 36rem; }
.pr .body p + p, .pr .body p + .panel, .pr .body .panel + p { margin-top: 1rem; }
.pr .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.prov pre { padding: 1rem 1.25rem; }

/* ---------------------------------------------------------------- access + footer */
.access { padding-top: var(--section); padding-bottom: clamp(4rem, 8vw, 6rem); }
.access .h2 { grid-column: 1 / span 9; }
.access .prose { grid-column: 1 / span 6; margin-top: 1.5rem; }
.access .actions { grid-column: 1 / -1; margin-top: 2rem; }
.access .curl { grid-column: 1 / span 9; margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 1rem; }
.access .curl .btn-ghost { margin: 1rem 1.25rem 0 0; color: var(--weiss); }
.access .more { grid-column: 1 / -1; margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.access .prose code { font-size: 0.875em; }
.mail { font-weight: 600; }

.site-foot { padding-bottom: 3rem; }
.site-foot .wrap { border-top: var(--line) solid var(--weiss); padding-top: 2.25rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; }
.foot-brand .wm { height: 1.5rem; width: auto; }
.foot-brand .brandline { display: inline-block; margin-top: 0.75rem; font-weight: 560; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; align-items: flex-start; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; font-weight: 560; }
.foot-links a:hover, .foot-links a[aria-current] { text-decoration: underline; }
.copy { margin-top: 1.5rem; color: var(--kreide); font-size: var(--fs-14); }

/* ---------------------------------------------------------------- legal pages */
.legal-main { padding-block: clamp(3rem, 7vw, 6rem) var(--section); }
.legal-main h1 { font-size: clamp(2.5rem, 1.5rem + 3.5vw, 4rem); }
.legal-text { max-width: 38rem; margin-top: 2.5rem; }
.legal-text h2 { font-family: var(--sans); font-stretch: 112%; font-size: var(--fs-22); font-weight: 700; line-height: 1.25; margin-top: 2.5rem; letter-spacing: 0; }
.legal-text p, .legal-text ul, .legal-text address { margin-top: 0.75rem; }
.legal-text address { font-style: normal; }
.legal-text ul { list-style: disc; padding-left: 1.25rem; }
.legal-text li + li { margin-top: 0.25rem; }
.legal-text .stand { color: var(--abrieb); margin-top: 1rem; }

/* ---------------------------------------------------------------- API reference (docs/) */
/* generated by _build/docs.mjs: hero on the floor, then contents beside the text (columns 1-3 | 4-12) */
.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 48rem) {
  /* a header without language switch: the nav reaches the right edge */
  .site-head .nav:last-child { grid-column: 2 / -1; }
}
.docs-hero { padding-block: clamp(2.25rem, 5vw, 4rem) clamp(3rem, 6vw, 4.5rem); }
.docs-hero h1 { grid-column: 1 / -1; font-size: clamp(2.5rem, 1.5rem + 3.5vw, 4rem); }
.docs-hero .lead { grid-column: 1 / span 8; margin-top: 1.25rem; }
.docs-hero .actions { grid-column: 1 / -1; margin-top: 1.75rem; }
.docs-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin-top: clamp(2rem, 4vw, 3rem); }
.docs-facts dt { font-size: var(--fs-14); color: var(--kreide); }
.docs-facts dd { margin-top: 0.25rem; font-weight: 560; }
.docs-facts code { font-size: 0.875rem; }
@media (min-width: 64rem) {
  .docs-hero .actions { grid-column: 9 / -1; align-self: start; margin-top: 1.25rem; padding-top: 0.25rem; }
}

.docs { padding-block: clamp(3rem, 6vw, 5rem) var(--section); }
.docs-grid { align-items: start; }
.docs-body { grid-column: 4 / -1; min-width: 0; }

/* contents: sticky beside the text, scrolls on its own when taller than the screen;
   the padding keeps focus outlines inside the scroll box */
.toc {
  grid-column: 1 / span 3;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-left: -0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  font-size: var(--fs-14);
  line-height: 1.4;
}
.toc summary { width: fit-content; padding-block: 0.25rem; font-weight: 650; color: var(--boden); cursor: pointer; }
.toc summary::marker { color: var(--abrieb); }
.toc-list { margin-top: 0.75rem; }
.toc-list > li + li { margin-top: 0.875rem; }
.toc-list a { display: block; padding-block: 0.1875rem; text-decoration: none; overflow-wrap: anywhere; }
.toc-list a:hover { text-decoration: underline; }
.toc-list > li > a { font-weight: 640; color: var(--boden); }
.toc-list ol { margin-top: 0.125rem; }
.toc-list ol a { color: var(--tief); }
.toc-list code { font-size: 0.75rem; }

.docs-sec + .docs-sec { margin-top: clamp(4.5rem, 9vw, 7rem); }
.docs-sec > .h2 { font-size: clamp(1.875rem, 1.25rem + 1.8vw, 2.75rem); }
.sec-intro { margin-top: 1rem; max-width: 40rem; }
.topic { margin-top: clamp(2.25rem, 4vw, 3rem); }
.topic p, .topic ul, .topic .ex, .topic .codes { margin-top: 0.875rem; }
.topic > p, .topic > ul, .topic > .codes { max-width: 42rem; }
.topic .ex { max-width: 52rem; }
.topic ul { list-style: disc; padding-left: 1.25rem; }
.topic li + li { margin-top: 0.375rem; }

.ep { margin-top: clamp(2.5rem, 4vw, 3rem); padding-top: clamp(2rem, 3.5vw, 2.5rem); border-top: 1px solid var(--rule); }
.ep-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; font-size: 1.125rem; line-height: 1.35; }
.ep-h code { font-size: 1.0625rem; font-weight: 600; color: var(--boden); overflow-wrap: anywhere; }
.verb { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.04em; color: var(--abrieb); }
.ep-sum { max-width: 40rem; margin-top: 0.5rem; font-size: 1.125rem; font-weight: 560; line-height: 1.4; }
.ep-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-top: 0.5rem; font-size: var(--fs-14); color: var(--abrieb); }
.ep-meta span + span::before { content: "·" / ""; margin-right: 0.5rem; }
.ep-desc { max-width: 40rem; margin-top: 1rem; }
.ep h4 { margin: 1.75rem 0 0; font-size: var(--fs-14); font-weight: 650; color: var(--boden); }
.ep-note { max-width: 40rem; margin-top: 0.5rem; font-size: 0.9375rem; color: var(--abrieb); }

.params { margin-top: 0.625rem; }
.param {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  grid-template-areas: "name desc" "meta desc";
  grid-template-rows: auto 1fr;
  column-gap: 1.5rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.param:last-child { border-bottom: 1px solid var(--rule); }
.param dt { grid-area: name; overflow-wrap: anywhere; }
.param dt code { font-weight: 600; color: var(--boden); }
.param .req { margin-left: 0.375rem; font-size: 0.8125rem; font-weight: 650; color: var(--boden); }
.param .pmeta { grid-area: meta; margin-top: 0.125rem; font-size: 0.8125rem; color: var(--abrieb); }
.param .pdesc { grid-area: desc; min-width: 0; max-width: 40rem; }
.pline { display: block; }
.pline + .pline { margin-top: 0.25rem; }
/* short code in running text stays on one line (no break after the hyphen of Retry-After);
   long tokens (class cw: patterns, JSON, coordinates) may wrap anywhere */
.docs-body :is(p, li, dd) code { white-space: nowrap; }
.docs-body code.cw { white-space: normal; overflow-wrap: anywhere; }

.codes { display: grid; gap: 0.375rem; margin-top: 0.625rem; font-size: 0.9375rem; line-height: 1.5; }
.codes > div { display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1rem; align-items: baseline; }
.codes dt code { font-weight: 600; font-variant-numeric: tabular-nums; }
.codes dd { max-width: 40rem; }

/* example requests: one curl line, wrapped at / ? & rather than scrolled */
.ex-t { margin-top: 0.75rem; font-size: 0.9375rem; font-weight: 560; }
.ex { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 0.5rem; margin-top: 0.625rem; }
.ex-t + .ex { margin-top: 0.5rem; }
.ex + .ex-t { margin-top: 1.25rem; }
.ex.ex-plain { grid-template-columns: minmax(0, 1fr); }
.ex pre { padding: 0.875rem 1.25rem; }
.ex .ln { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: calc(0.75rem + 4ch); text-indent: -4ch; }
.ex .btn-ghost { min-height: 2.5rem; margin: 0.5rem 0.5rem 0.5rem 0; color: var(--weiss); }

/* below 1024px the contents become a bar that stays on top and opens as a list over the text */
@media (max-width: 63.99rem) {
  .docs-page { scroll-padding-top: 4.5rem; }
  .docs { padding-top: 0; }
  .toc {
    grid-column: 1 / -1;
    top: 0;
    z-index: 5;
    max-height: none;
    overflow: visible;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    background: var(--licht);
    border-bottom: 1px solid var(--rule);
  }
  .toc summary { width: auto; padding-block: 0.8125rem; }
  .toc-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 5rem);
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: var(--licht);
    border-bottom: 2px solid var(--boden);
  }
  .toc-list a { padding-block: 0.3125rem; }
  .docs-body { grid-column: 1 / -1; margin-top: clamp(2.5rem, 6vw, 3.5rem); }
  .docs-hero .lead { grid-column: 1 / span 10; }
}
@media (max-width: 47.99rem) {
  .docs-hero .lead { grid-column: 1 / -1; }
  .param { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "meta" "desc"; grid-template-rows: auto; }
  .param .pdesc { margin-top: 0.375rem; }
}
@media (max-width: 39.99rem) {
  .docs-hero .actions .btn { width: 100%; }
}
@media print {
  .toc { display: none !important; }
  .docs-body { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- 404 */
.page-404 { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.lost { display: grid; place-items: center; text-align: center; padding-block: 3rem 5rem; }
@media (max-width: 39.99rem) {
  .lost { padding-block: 2rem 3rem; }
  .lost .ring { margin-bottom: 2rem; }
  .lost .en { margin-top: 2rem; }
  .page-404 .site-foot { padding-bottom: 2rem; }
}
.lost .ring {
  width: clamp(7rem, 18vw, 11rem);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 clamp(6px, 1.2vw, 10px) var(--kreide);
  margin: 0 auto 2.5rem;
}
.lost h1 { font-size: clamp(2.4rem, 1rem + 5vw, 4.75rem); }
.lost p { margin: 1.25rem auto 0; max-width: 30rem; }
.lost .actions { justify-content: center; margin-top: 2rem; }
.lost .en { color: var(--kreide); margin-top: 2.5rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 71.99rem) {
  .api-cols > .code-col, .api-cols > .side { grid-column: 1 / -1; }
  .api-cols > .side { max-width: 40rem; }
}

@media (max-width: 63.99rem) {
  .hero h1 { grid-column: 1 / -1; }
  .hero .lead { grid-column: 1 / span 10; }
  .uses h3 { grid-column: 1 / span 4; }
  .uses p { grid-column: 5 / span 8; }
  .uses .eps { grid-column: 5 / span 8; margin-top: 0.5rem; }
  .pr .body { grid-column: 6 / span 7; }
  .cov-intro, .section-head { grid-column: 1 / span 10; }
}

@media (max-width: 47.99rem) {
  .grid { column-gap: 0; }
  .hero h1, .hero .lead, .cov-intro, .section-head, .cov-notes,
  .access .h2, .access .prose, .access .curl { grid-column: 1 / -1; }
  .site-head .wrap { grid-template-columns: 1fr auto; grid-template-areas: "brand langs" "nav nav"; row-gap: 0.25rem; }
  .site-head .nav { justify-self: start; }
  .nav ul { gap: 0 1.25rem; }
  .uses li { display: block; padding: 1.25rem 0; }
  .uses p { margin-top: 0.5rem; }
  .uses .eps { margin-top: 0.75rem; }
  .pr { display: block; }
  .pr h3 { position: static; }
  .pr .body { margin-top: 1rem; }
  .endpoints div { grid-column: 1 / -1; }
}

@media (max-width: 39.99rem) {
  .md { --band: 7.5rem; --h: 17rem; }
  .md-anno-t, .md-clock { font-size: 1.625rem; }
  .md-anno-s, .md-count { font-size: 0.9375rem; }
  .md-axis li:nth-child(even) span { visibility: hidden; }
  .md-axis li:last-child span { visibility: hidden; }
  .md-controls { margin-top: 1.75rem; }
  .md-filter .opts { gap: 0.125rem 1.25rem; }
  .hero .actions .btn { width: 100%; }
  .access .actions .btn { width: 100%; }
  .panel { margin-inline: calc(-1 * var(--gutter) + 0.5rem); }
  .panel pre { font-size: 0.75rem; padding-inline: 0.875rem; }
  .panel-head { padding-inline: 0.875rem; }
  code, pre, .cmp { font-stretch: 75%; }
  .cmp { font-size: 0.75rem; }
  .cmp-panel { padding: 1rem 0.875rem; }
  .access .curl { grid-template-columns: minmax(0, 1fr); }
  .access .curl .btn-ghost { justify-self: start; margin: 0 1rem 1rem; }
  .foot-links { flex-direction: column; gap: 0; }
}

/* comparison: one column at a time below 720px (phones, also in landscape) */
@media (max-width: 44.99rem) {
  .cmp .cv { white-space: nowrap; overflow-wrap: normal; padding-right: 0; }
  .cmp .ck { padding-right: 0.5rem; }
  .cmp-pick { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-bottom: 0.875rem; }
  .cmp-r { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
  .cmp-l {
    display: inline-block;
    padding: 0.5rem 0 0.375rem;
    border-bottom: var(--line) solid transparent;
    font-weight: 600;
    font-size: var(--fs-14);
    cursor: pointer;
  }
  .cmp-l:hover { border-bottom-color: var(--kreide); }
  .cmp-r:checked + .cmp-l { border-bottom-color: var(--weiss); }
  .cmp-r:focus-visible + .cmp-l { outline: 3px solid var(--gelb); outline-offset: 2px; }
  /* column heads stay in the table for screen readers, only visually hidden */
  .cmp thead th { height: 1px; padding: 0; line-height: 1px; white-space: nowrap; overflow: hidden; clip-path: inset(50%); }
  .cmp-panel:has(#cmp-kl:checked) .cv.a,
  .cmp-panel:has(#cmp-bl:checked) .cv.b { display: none; }
}

@media (max-width: 26.24rem) {
  .nav ul { gap: 0 1rem; }
  h1 { font-stretch: 118%; }
  :lang(de) h1 { hyphens: auto; -webkit-hyphens: auto; }
  .h2, h2 { font-stretch: 112%; }
  .site-head .brand .wm { height: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .md-head { display: none; }
}

@media (forced-colors: active) {
  /* the chart keeps its own colours: white dots on the floor green, whatever the theme */
  .md-plot, .md-axis, .legend { forced-color-adjust: none; background: var(--boden); color: var(--weiss); box-shadow: 0 0 0 0.75rem var(--boden); }
  .md-head::before { forced-color-adjust: none; }
  .cov td.lv::before { border: 1px solid CanvasText; }
}

@media print {
  .floor, .panel { background: #fff !important; color: #000 !important; }
  .floor *, .panel *, .light * { color: #000 !important; }
  a { color: #000 !important; }
  /* heat fills are background graphics, which browsers drop on paper: numbers in black, no fill */
  .cov td.lv::before { display: none; }
  /* the hour table carries the chart's information on paper (site.js opens <details> before printing) */
  .md-plot, .md-axis, .md-controls, .md-head, .skip, .btn, .site-head .nav, .md-table summary { display: none !important; }
  .resp pre { max-height: none; overflow: visible; }
  .panel .ln { white-space: pre-wrap; }
  .pr h3 { position: static; }
}

.legal-text .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
