@font-face { font-family: "Archivo"; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url(/fonts/shoulders.woff2) format("woff2"); font-weight: 500 900; font-display: swap; }

:root {
  --kohle: #1e252e;      /* tiefste Schicht, geht nahtlos in die Seite ueber */
  --stollen: #161b22;
  --schiefer: #56687a;
  --linie: #3a4653;
  --kalk: #ece5d4;
  --kalk-matt: #aab2b4;
  --himmel: #9db4ba;
  --erz: #ff7a1a;
  --ocker: #e0ad4c;
  --rot: #ff9d8a;
  --anzeige: "Big Shoulders", "Arial Narrow", sans-serif;
  --text: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--kohle); color-scheme: dark; }
body { margin: 0; background: var(--kohle); color: var(--kalk); font: 400 16px/1.5 var(--text); }
[hidden] { display: none !important; }
a { color: var(--ocker); }
h1, h2 { font-family: var(--anzeige); font-weight: 800; line-height: 1.05; margin: 0; }
h2 { font-size: 34px; margin-bottom: 18px; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--ocker); outline-offset: 2px; }

.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.klein { font-size: 14px; color: var(--kalk-matt); max-width: 62ch; }
.fehler { color: var(--rot); font-size: 15px; min-height: 0; }
.fehler:empty { display: none; }

/* ---------- Schnitt ---------- */
.schnitt { position: relative; height: clamp(520px, 76vh, 820px); overflow: hidden; background: var(--kohle); }
.schnitt.voll { height: 100vh; height: 100dvh; }
#bild { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.tagesanzeige { position: absolute; top: clamp(10px, 2.5vh, 26px); right: clamp(16px, 4vw, 56px); text-align: right; color: var(--kohle); }
.tagesanzeige .wert { font: 900 clamp(52px, min(13vw, 14vh), 150px)/.92 var(--anzeige); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.tagesanzeige p:last-child { font-weight: 600; font-size: 16px; margin-top: 14px; }

.anmeldung { position: absolute; top: 5vh; right: clamp(16px, 8vw, 120px); width: min(400px, calc(100% - 32px)); }
.anmeldung h1 { color: var(--kohle); font-size: clamp(64px, 11vw, 92px); font-weight: 900; white-space: nowrap; margin-bottom: 26vh; }
.anmeldung form { background: var(--kohle); padding: 22px; display: grid; gap: 10px; }

/* ---------- Formularteile ---------- */
label { font-weight: 600; font-size: 15px; }
input:not([type]), input[type=password] {
  width: 100%; padding: 11px 12px; background: var(--stollen); color: var(--kalk);
  border: 1px solid var(--linie); border-radius: 2px; font: 400 16px var(--text);
}
button { font: 700 16px var(--text); cursor: pointer; border: 0; border-radius: 2px; padding: 12px 18px; background: var(--kalk); color: var(--kohle); }
button:hover:not(:disabled) { background: #fff; }
button:disabled { cursor: not-allowed; opacity: .5; }
button.leise { background: none; color: var(--kalk-matt); text-decoration: underline; padding: 6px 0; }
button.leise:hover { background: none; color: var(--kalk); }
.walletform { display: grid; gap: 10px; align-content: start; }
.walletform button { justify-self: start; }

/* ---------- Seite ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 64px; display: grid; gap: 64px; min-width: 0; }
.zweier { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 88px); min-width: 0; }
.zweier.eng { grid-template-columns: 1fr 1fr; gap: 40px; }
.zweier > * { min-width: 0; }

.einrichten { border-left: 6px solid var(--erz); padding-left: 22px; }
.einrichten ol { margin: 14px 0 20px; padding-left: 22px; max-width: 68ch; }
.einrichten li { margin-bottom: 8px; }
.einrichten > p { max-width: 68ch; }

.geraetename { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.geraetename span { color: var(--kalk-matt); font-weight: 400; }

.startknopf {
  display: block; width: 100%; padding: 22px; background: var(--erz); color: var(--stollen);
  font: 900 40px/1 var(--anzeige); letter-spacing: .01em;
}
.startknopf:hover:not(:disabled) { background: #ff9140; }
.startknopf.laeuft { background: var(--kalk); }
.startknopf.laeuft:hover:not(:disabled) { background: #fff; }
.status { margin-top: 10px; color: var(--kalk-matt); min-height: 24px; }

.messwerte { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 12px 20px; margin: 22px 0; }
dl, dd { margin: 0; }
.messwerte dt { font-size: 14px; color: var(--kalk-matt); }
.messwerte dd { font: 800 27px/1.1 var(--anzeige); font-variant-numeric: tabular-nums; }

.regler { border-top: 1px solid var(--linie); padding-top: 18px; display: grid; gap: 12px; }
.regler label[for=last] { display: flex; justify-content: space-between; }
.regler output { font-weight: 400; color: var(--kalk-matt); }
input[type=range] { width: 100%; accent-color: var(--erz); height: 28px; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 22px; align-items: center; }
legend { float: left; font-weight: 600; font-size: 15px; padding: 0; margin-right: 8px; }
fieldset label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
input[type=radio] { accent-color: var(--erz); width: 18px; height: 18px; margin: 0; }

.guthaben { font: 900 clamp(46px, 7vw, 84px)/1 var(--anzeige); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.eurozeile { font-size: 18px; margin: 6px 0 18px; }
.fortschritt { height: 12px; background: var(--stollen); border-bottom: 2px solid var(--erz); }
.fortschritt span { display: block; height: 100%; width: 0; background: var(--erz); transition: width .6s; }
#v-ziel { margin-top: 8px; }
.zeilen { margin: 20px 0 14px; }
.zeilen div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.zeilen dt { color: var(--kalk-matt); }
.zeilen dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

.kurve { position: relative; height: 240px; touch-action: pan-y; }
.kurve svg { display: block; width: 100%; height: 100%; }
.kurve .leer { display: grid; place-items: center; height: 100%; color: var(--kalk-matt); border: 1px dashed var(--linie); text-align: center; padding: 16px; }
.tipp { position: absolute; top: 0; pointer-events: none; background: var(--kalk); color: var(--kohle); padding: 5px 9px; font-size: 14px; font-weight: 600; white-space: nowrap; border-radius: 2px; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 14px; font-weight: 400; color: var(--kalk-matt); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--schiefer); }
td { padding: 11px 10px 11px 0; border-bottom: 1px solid var(--linie); }
.z { text-align: right; }
td:last-child, th:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
td b { font-weight: 600; }
.zustand::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; background: var(--schiefer); }
.zustand.an::before { background: var(--erz); }
.zustand.bereit::before { background: var(--ocker); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
td button { padding: 6px 10px; font-size: 14px; background: none; color: var(--kalk); border: 1px solid var(--schiefer); }
td button:hover:not(:disabled) { background: var(--stollen); }
.eigenes { color: var(--kalk-matt); font-size: 14px; }

.hinweis { color: var(--ocker); font-weight: 600; }
.wartung .leise { margin-top: 24px; }

@media (max-width: 900px) {
  .zweier, .zweier.eng { grid-template-columns: 1fr; }
  main { gap: 48px; }
  .startknopf { position: sticky; bottom: 10px; z-index: 2; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { border-bottom: 1px solid var(--schiefer); padding: 10px 0; }
  td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  td::before { content: attr(data-t); color: var(--kalk-matt); text-align: left; }
  td:first-child { font-size: 18px; }
  td:first-child::before { content: none; }
  td:last-child:empty { display: none; }
}
@media (max-width: 520px) {
  .messwerte { grid-template-columns: repeat(2, 1fr); }
  .tagesanzeige p:last-child { font-size: 14px; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .fortschritt span { transition: none; } }
