:root {
  --papier: #f3efe5; --tinte: #1d1b16; --mittel: #5f584c; --blass: #c9c0ac; --rost: #b23a22;
  --serif: "Instrument Serif", Georgia, serif;
  --text: "Spectral", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--tinte); font: 400 1.0625rem/1.65 var(--text); }
a { color: inherit; text-decoration-color: var(--rost); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--rost); outline-offset: 3px; }
main { max-width: 64rem; margin: 0 auto; padding: 0 16px 5rem; }
.spalte { max-width: 38rem; }

header { padding: clamp(2.5rem, 8vh, 5rem) 0 1.5rem; }
.dach { font: 500 .8125rem/1.4 var(--mono); letter-spacing: .04em; color: var(--mittel); margin: 0 0 1rem; }
h1 { font: 400 clamp(3.2rem, 11vw, 7rem)/.9 var(--serif); letter-spacing: -.02em; margin: 0 0 1.25rem; }
h1 em { color: var(--rost); }
.lead { font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.5; margin: 0; max-width: 34rem; }

.instrument { margin: 1.5rem 0 3rem; }
.buehne { position: relative; border-top: 1px solid var(--tinte); border-bottom: 1px solid var(--tinte); }
#feld { display: none; width: 100%; height: clamp(300px, 52vh, 460px); touch-action: none; cursor: ew-resize; }
.js #feld { display: block; }
#start { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: .9rem; padding: 16px; background: rgba(243, 239, 229, .86); text-align: center; }
#start p { margin: 0; max-width: 30rem; font: 400 .9375rem/1.5 var(--sans); color: var(--mittel); }
.knoepfe { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
button, select { font: 500 .9375rem/1 var(--sans); color: var(--tinte); background: transparent;
  border: 1px solid var(--tinte); border-radius: 2px; padding: .7rem 1rem; min-height: 44px; cursor: pointer; }
button.voll { background: var(--tinte); color: var(--papier); }
button:hover { border-color: var(--rost); }
.nojs { padding: 1.25rem 0; font: 400 .9375rem/1.55 var(--sans); color: var(--mittel); }
.js .nojs { display: none; }
[hidden] { display: none !important; }

#bedienung { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem 1rem;
  align-items: end; padding: 1rem 0 .25rem; font: 400 .875rem/1.4 var(--sans); }
#bedienung label { display: flex; flex-direction: column; gap: .35rem; color: var(--mittel); }
input[type=range] { width: 100%; accent-color: var(--rost); min-height: 44px; }
#zeit { font: 500 .875rem var(--mono); align-self: center; }

.ablesung { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; padding-top: 1rem; }
@media (max-width: 40rem) { .ablesung { grid-template-columns: 1fr; } }
.ablesung h3 { font: 500 .75rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mittel); margin: 0 0 .5rem; }
#stimmen { list-style: none; margin: 0; padding: 0; font: 400 .875rem/1.9 var(--mono); }
#stimmen li { display: grid; grid-template-columns: 7.5em 7.5em 1fr; border-bottom: 1px solid rgba(29, 27, 22, .12); }
#stimmen .br { color: var(--rost); }
#verlauf { width: 100%; height: 64px; display: block; }
.rau { font: 400 .875rem var(--mono); margin: .4rem 0 0; color: var(--mittel); }
.legende { font: 400 .875rem/1.55 var(--sans); color: var(--mittel); margin: 1rem 0 0; max-width: 46rem; }
.legende b { color: var(--tinte); font-weight: 600; }
.legende .r { color: var(--rost); }

section { margin: 3.5rem 0 0; }
h2 { font: 400 clamp(1.9rem, 4.5vw, 2.6rem)/1.05 var(--serif); margin: 0 0 1rem; }
h2 .nr { font: 500 .8125rem var(--mono); color: var(--rost); display: block; margin-bottom: .5rem; letter-spacing: .04em; }
p { margin: 0 0 1rem; }
.formel { font: 400 .9375rem/1.8 var(--mono); background: rgba(29, 27, 22, .05); border-left: 2px solid var(--rost);
  padding: .9rem 1rem; margin: 1.25rem 0; overflow-x: auto; white-space: nowrap; }
code { font: 400 .875em var(--mono); }
figure { margin: 1.5rem 0; }
.kurve { width: 100%; height: auto; display: block; }
.k-axis { stroke: var(--tinte); stroke-width: 1; }
.k-curve { fill: none; stroke: var(--rost); stroke-width: 2; stroke-linejoin: round; }
.k-tick { stroke: var(--tinte); stroke-width: 1; stroke-dasharray: 2 3; }
.k-lab { font: 500 13px var(--mono); fill: var(--tinte); text-anchor: middle; }
.k-cap { font: 400 12px var(--sans); fill: var(--mittel); }
figcaption { font: 400 .8125rem/1.5 var(--sans); color: var(--mittel); margin-top: .5rem; }
dl.klaenge { margin: 1rem 0; }
dl.klaenge dt { font: 600 .9375rem var(--sans); margin-top: .9rem; }
dl.klaenge dd { margin: .2rem 0 0; }
ol.quellen { font: 400 .875rem/1.55 var(--sans); padding-left: 1.2rem; color: var(--mittel); }
ol.quellen li { margin-bottom: .5rem; }
footer { margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--blass); font: 400 .8125rem var(--sans); color: var(--mittel); }
html:not(.js) #start, html:not(.js) #bedienung, html:not(.js) .ablesung, html:not(.js) .legende, html:not(.js) .buehne { display: none; }
