/* Konsole – Gestaltung angelehnt an daslauschendeherz.de (Farben, Schrift Spectral). */

@font-face { font-family: "Spectral"; font-style: normal; font-weight: 300; font-display: swap; src: url(schrift/spectral-300.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap; src: url(schrift/spectral-400.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 500; font-display: swap; src: url(schrift/spectral-500.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap; src: url(schrift/spectral-400-kursiv.woff2) format("woff2"); }

:root {
  --papier: #F1EADD;
  --flaeche: #E8DFCE;
  --karte: #F7F2E8;
  --linie: #D6CAB6;
  --strich: #B5A993;
  --akzent: #AE5B38;
  --akzent-text: #9C4F30;
  --auf-akzent: #FCF7EE;
  --tinte: #4A4541;
  --titel-ton: #6E4A39;
  --grau: #68625C;
  --knopf: #5E4436;
  --ok: #5B7550;
  --warnung: #A8742A;
  --fehler: #A23B2A;
  --schrift: "Spectral", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "DejaVu Sans Mono", monospace;
  --rund: 3px;
  --breit: 76rem;
  --rand: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--papier); color: var(--tinte); font-family: var(--schrift); font-size: 17px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-block: 2rem 3rem; }
.innen { width: 100%; max-width: var(--breit); margin-inline: auto; padding-inline: var(--rand); }

h1, h2, h3 { color: var(--titel-ton); font-weight: 300; letter-spacing: -0.012em; line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: 1.35rem; font-weight: 400; }
h3 { font-size: 1.05rem; font-weight: 500; margin-top: 1.4em; }
p { margin: 0 0 0.8em; }
a { color: var(--akzent-text); text-underline-offset: 0.18em; }
a:hover { color: var(--akzent); }
strong { font-weight: 500; }
.leise { color: var(--grau); }
.klein { font-size: 0.86rem; }
.gross { font-size: 1.25rem; color: var(--titel-ton); margin: 0.4em 0 0.2em; }
.mono { font-family: var(--mono); font-size: 0.85em; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Kopf */
.kopf { border-bottom: 1px solid var(--linie); background: var(--papier); position: sticky; top: 0; z-index: 10; }
.kopf .innen { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; flex-wrap: wrap; }
.marke { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--titel-ton); text-decoration: none; font-size: 1.2rem; font-weight: 300; }
.marke svg { width: 2rem; height: 2rem; }
.marke .punkt { fill: var(--akzent); }
.kopf nav { display: flex; gap: 0.3rem; flex-wrap: wrap; flex: 1; }
.kopf nav a { color: var(--tinte); text-decoration: none; padding: 0.35rem 0.75rem; border-radius: var(--rund); }
.kopf nav a:hover { background: var(--flaeche); }
.kopf nav a[aria-current="page"] { background: var(--flaeche); color: var(--titel-ton); box-shadow: inset 0 -2px 0 var(--akzent); }
.abmelden { margin: 0; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; font: inherit; font-size: 1rem; cursor: pointer;
  background: var(--knopf); color: var(--auf-akzent); border: 1px solid var(--knopf); border-radius: var(--rund); padding: 0.55rem 1.15rem; text-decoration: none; }
.knopf:hover { background: var(--akzent-text); border-color: var(--akzent-text); }
.knopf.still { background: transparent; color: var(--knopf); border-color: var(--strich); }
.knopf.still:hover { background: var(--flaeche); }
.knopf.klein { padding: 0.3rem 0.8rem; font-size: 0.9rem; }
.knopf:disabled, .knopf[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.schritte { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0.6rem 0; }

/* Kacheln und Raster */
.raster { display: grid; gap: 1.2rem; margin-block: 1.5rem; }
.raster.vier { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.raster.zwei { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); align-items: start; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1.25rem 1.4rem; margin-bottom: 1.2rem; overflow-x: auto; }
.raster .kachel { margin-bottom: 0; }
.kachel.wert h2 { font-size: 0.95rem; font-weight: 500; color: var(--grau); text-transform: uppercase; letter-spacing: 0.06em; }
.zahl { font-size: 2.2rem; font-weight: 300; color: var(--titel-ton); margin: 0 0 0.3rem; font-variant-numeric: tabular-nums; }
.kachel.leer { text-align: center; padding: 2.5rem 1.5rem; }

/* Balken (meter/progress) */
.balken { display: block; width: 100%; height: 0.5rem; border: 0; border-radius: 99px; background: var(--flaeche); margin: 0.2rem 0 0.6rem; -webkit-appearance: none; appearance: none; overflow: hidden; }
.balken::-webkit-meter-bar { background: var(--flaeche); border: 0; border-radius: 99px; height: 0.5rem; }
.balken::-webkit-meter-optimum-value { background: var(--ok); border-radius: 99px; }
.balken::-webkit-meter-suboptimum-value { background: var(--warnung); border-radius: 99px; }
.balken::-webkit-meter-even-less-good-value { background: var(--fehler); border-radius: 99px; }
.balken:-moz-meter-optimum::-moz-meter-bar { background: var(--ok); }
.balken:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warnung); }
.balken:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--fehler); }
progress.balken::-webkit-progress-bar { background: var(--flaeche); }
progress.balken::-webkit-progress-value { background: var(--akzent); border-radius: 99px; }
progress.balken::-moz-progress-bar { background: var(--akzent); border-radius: 99px; }
.gross-balken { height: 0.8rem; margin-top: 1rem; }

/* Zustände */
.marke-zustand { display: inline-block; font-size: 0.8rem; font-weight: 500; padding: 0.05rem 0.55rem; border-radius: 99px; border: 1px solid currentColor; }
.marke-zustand.ok { color: var(--ok); }
.marke-zustand.warnung { color: var(--warnung); }
.marke-zustand.fehler { color: var(--fehler); }
.punkt-zustand { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; flex: none; }
.punkt-zustand.ok { background: var(--ok); }
.punkt-zustand.fehler { background: var(--fehler); }
.dienste { list-style: none; margin: 0; padding: 0; }
.dienste li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--linie); }
.dienste li:last-child { border-bottom: 0; }

/* Listen und Tabellen */
.liste { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.2rem; margin: 0 0 0.5rem; }
.liste dt { color: var(--grau); }
.liste dd { margin: 0; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tabelle th { text-align: left; font-weight: 500; color: var(--grau); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--strich); padding: 0.4rem 0.6rem 0.4rem 0; }
.tabelle td { border-bottom: 1px solid var(--linie); padding: 0.55rem 0.6rem 0.55rem 0; vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }

/* Schalter */
.schalter { position: relative; display: inline-block; width: 2.6rem; height: 1.45rem; }
.schalter input { opacity: 0; width: 0; height: 0; }
.schalter span { position: absolute; inset: 0; background: var(--linie); border-radius: 99px; transition: background 0.2s; }
.schalter span::before { content: ""; position: absolute; width: 1.05rem; height: 1.05rem; left: 0.2rem; top: 0.2rem; background: var(--karte); border-radius: 50%; transition: transform 0.2s; }
.schalter input:checked + span { background: var(--ok); }
.schalter input:checked + span::before { transform: translateX(1.15rem); }
.schalter input:disabled + span { opacity: 0.6; cursor: not-allowed; }
.schalter input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Formulare */
.feld { display: block; margin: 0 0 1rem; }
.feld span { display: block; font-size: 0.9rem; color: var(--grau); margin-bottom: 0.25rem; }
.feld input { width: 100%; font: inherit; color: var(--tinte); background: #FFFDF8; border: 1px solid var(--strich); border-radius: var(--rund); padding: 0.55rem 0.7rem; }
.feld input:focus { border-color: var(--akzent); outline: none; box-shadow: 0 0 0 3px rgba(174, 91, 56, 0.18); }
.anmeldung { max-width: 24rem; margin: 3rem auto; }
.anmeldung form { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1.5rem; margin-top: 1.5rem; }
.anmeldung .knopf { width: 100%; }

/* Meldungen */
.meldung { padding: 0.7rem 1rem; border-radius: var(--rund); border: 1px solid var(--linie); background: var(--karte); }
.meldung.fehler { border-color: var(--fehler); color: var(--fehler); }
.meldung.hinweis { border-color: var(--ok); color: var(--ok); }
.hinweis { color: var(--grau); border-left: 2px solid var(--strich); padding-left: 0.8rem; }

/* Upload-Ablage */
.ablage { text-align: center; padding: 2.5rem 1.5rem; border: 2px dashed var(--strich); background: var(--karte); transition: background 0.15s, border-color 0.15s; }
.ablage svg { width: 3rem; height: 3rem; color: var(--akzent); }
.ablage .schritte { justify-content: center; }
.ablage.ueber { background: var(--flaeche); border-color: var(--akzent); }

/* Fuß */
.fuss { display: flex; gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; padding-block: 1.2rem; border-top: 1px solid var(--linie); color: var(--grau); font-size: 0.85rem; }

@media (max-width: 40rem) {
  html { font-size: 16px; }
  .kopf .innen { gap: 0.6rem; padding-block: 0.5rem; }
  .kopf nav { order: 3; flex-basis: 100%; }
  .liste { grid-template-columns: 1fr; }
  .liste dt { margin-top: 0.4rem; }
}

/* Aufgaben */
.zaehler { display: inline-block; min-width: 1.3rem; padding: 0 0.35rem; border-radius: 99px; background: var(--akzent); color: var(--auf-akzent); font-size: 0.78rem; text-align: center; line-height: 1.3rem; }
.aufgaben-hinweis { border-color: var(--akzent); }
.aufgaben-hinweis a { color: var(--akzent-text); font-weight: 500; }
.aufgabe { scroll-margin-top: 5rem; }
.aufgabe.wichtig { border-left: 3px solid var(--akzent); }
.aufgabe-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.warum { color: var(--grau); font-style: italic; }
.schrittliste { padding-left: 1.4rem; margin: 1rem 0; }
.schrittliste li { margin-bottom: 1rem; padding-left: 0.3rem; }
.schrittliste li::marker { color: var(--akzent); font-weight: 500; }
.schrittliste p { margin-bottom: 0.4rem; }
.befehl { display: flex; gap: 0.5rem; align-items: stretch; flex-wrap: wrap; }
.befehl pre { flex: 1 1 20rem; margin: 0; background: #2F2B28; color: #F1EADD; border-radius: var(--rund); padding: 0.6rem 0.8rem; overflow-x: auto; }
.befehl code, code { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--flaeche); padding: 0.05rem 0.3rem; border-radius: 2px; }
.abschluss { border-top: 1px solid var(--linie); padding-top: 1rem; margin-top: 0.5rem; }
.feld textarea { width: 100%; font: inherit; font-family: var(--mono); font-size: 0.85rem; color: var(--tinte); background: #FFFDF8; border: 1px solid var(--strich); border-radius: var(--rund); padding: 0.55rem 0.7rem; }

/* Root-Freigabe in der Kopfleiste */
.root-aktiv { font-size: 0.85rem; color: var(--auf-akzent); background: var(--warnung); padding: 0.2rem 0.7rem; border-radius: 99px; text-decoration: none; white-space: nowrap; }
.root-aktiv:hover { color: var(--auf-akzent); background: var(--akzent-text); }
