/* myPuls · Kern — Oberfläche
 *
 * Zurückhaltend gehalten. Die Seite soll einen Betriebszustand zeigen, nicht
 * beeindrucken. Keine externen Schriften und keine Fremdressourcen: Die
 * Content-Security-Policy des Kerns lässt nur die eigene Herkunft zu.
 */

:root {
  --grund: #fbfbfa;
  --flaeche: #ffffff;
  --rand: #e3e2df;
  --text: #1f1e1c;
  --text-leise: #6b6862;
  --akzent: #1f5f4b;
  --akzent-leise: #e8f1ed;
  --warn: #8a5a00;
  --warn-leise: #fdf3e2;
  --aus: #9a9691;
  --knopf-text: #ffffff;
  --radius: 10px;
  --schrift:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dunkle Variante. Die Werte stehen in eigenen Blöcken statt in einer Invertierung:
 * Der Akzent muss auf beiden Gründen lesbar bleiben, und ein umgedrehtes Grün ist das
 * nicht. */
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #17181a;
    --flaeche: #1e2023;
    --rand: #32353a;
    --text: #e9e8e5;
    --text-leise: #a2a09b;
    --akzent: #6cc3a1;
    --akzent-leise: #1c2f2a;
    --warn: #e0aa5a;
    --warn-leise: #2e2618;
    --aus: #6a6d73;
    --knopf-text: #10201b;
  }
}

/* Ausdrückliche Wahl schlägt die Systemeinstellung — in beide Richtungen. */
:root[data-theme="dark"] {
  --grund: #17181a;
  --flaeche: #1e2023;
  --rand: #32353a;
  --text: #e9e8e5;
  --text-leise: #a2a09b;
  --akzent: #6cc3a1;
  --akzent-leise: #1c2f2a;
  --warn: #e0aa5a;
  --warn-leise: #2e2618;
  --aus: #6a6d73;
  --knopf-text: #10201b;
}

:root[data-theme="light"] {
  --grund: #fbfbfa;
  --flaeche: #ffffff;
  --rand: #e3e2df;
  --text: #1f1e1c;
  --text-leise: #6b6862;
  --akzent: #1f5f4b;
  --akzent-leise: #e8f1ed;
  --warn: #8a5a00;
  --warn-leise: #fdf3e2;
  --aus: #9a9691;
  --knopf-text: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- Kopf & Fuss */

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--rand);
  background: var(--flaeche);
}

.kopf-titel {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.marke {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.kopf-untertitel,
.stand {
  color: var(--text-leise);
  font-size: 13px;
}

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

main {
  max-width: 940px;
  margin: 0 auto;
  padding: 32px 28px 56px;
}

.fuss {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 28px 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-leise);
  font-size: 12.5px;
}

h1 {
  font-size: 20px;
  font-weight: 620;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-leise);
  margin: 40px 0 6px;
}

.abschnitt-hinweis,
.stufe-beschreibung {
  color: var(--text-leise);
  margin: 0 0 18px;
  max-width: 66ch;
  font-size: 13.5px;
}

/* -------------------------------------------------------------------- Anmeldung */

.anmeldung {
  max-width: 460px;
  margin: 48px auto;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 28px;
}

.anmeldung .hinweis {
  color: var(--text-leise);
  font-size: 13.5px;
  margin: 6px 0 20px;
}

.feld-hinweis {
  color: var(--text-leise);
  font-size: 12.5px;
  margin: 6px 0 0;
}

#code-feld {
  margin-top: 16px;
}

#code {
  font-size: 18px;
  letter-spacing: 0.35em;
  text-align: center;
}

.anmeldung label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 6px;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--rand);
  border-radius: 7px;
  background: var(--grund);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

input[type="password"]:focus-visible,
input[type="text"]:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
}

.knopf {
  margin-top: 14px;
  width: 100%;
  padding: 9px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--akzent);
  color: var(--knopf-text);
  font: inherit;
  font-weight: 560;
  cursor: pointer;
}

.knopf-flach {
  border: 1px solid var(--rand);
  background: transparent;
  color: var(--text-leise);
  border-radius: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.knopf:hover,
.knopf-flach:hover {
  filter: brightness(0.96);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--akzent-leise);
  padding: 1px 5px;
  border-radius: 4px;
}

.fehler {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--warn-leise);
  color: var(--warn);
  font-size: 13.5px;
}

/* ------------------------------------------------------------------------ Stufe */

.stufe-block {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.stufen-leiste {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  flex-wrap: wrap;
}

.stufen-leiste li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 160px;
  padding: 9px 12px;
  border: 1px solid var(--rand);
  border-radius: 7px;
  color: var(--text-leise);
  font-size: 13px;
}

.stufen-leiste li span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--rand);
  font-size: 11.5px;
  font-weight: 600;
  flex: none;
}

.stufen-leiste li.aktiv {
  border-color: var(--akzent);
  background: var(--akzent-leise);
  color: var(--text);
  font-weight: 560;
}

.stufen-leiste li.aktiv span {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--flaeche);
}

/* ------------------------------------------------------------------ Kennzahlen */

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.kennzahl {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kennzahl-wert {
  font-size: 26px;
  font-weight: 640;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kennzahl-name {
  font-size: 13px;
}

.kennzahl-zusatz {
  color: var(--text-leise);
  font-size: 12.5px;
}

/* --------------------------------------------------------------------- Bedarfe */

.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.karte-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.karte-titel {
  font-weight: 600;
  font-size: 15px;
}

.karte-text {
  color: var(--text-leise);
  font-size: 13.5px;
  margin: 0 0 10px;
}

.karte-fuss {
  font-size: 13px;
  border-top: 1px solid var(--rand);
  padding-top: 10px;
  margin-top: 12px;
}

.karte-fuss.wartet {
  color: var(--text-leise);
}

/* --------------------------------------------------------------------- Quellen */

.quellen {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--flaeche);
}

.quelle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rand);
}

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

.quelle-haupt {
  flex: 1;
  min-width: 0;
}

.quelle-name {
  font-weight: 560;
}

.quelle-inhalt,
.quelle-hinweis {
  color: var(--text-leise);
  font-size: 13px;
}

.quelle-hinweis {
  color: var(--warn);
}

.quelle-kennzahl {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------- Marken */

.abzeichen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  border: 1px solid var(--rand);
  color: var(--text-leise);
}

.abzeichen::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aus);
  flex: none;
}

.abzeichen.gut {
  color: var(--akzent);
  border-color: color-mix(in srgb, var(--akzent) 35%, transparent);
  background: var(--akzent-leise);
}

.abzeichen.gut::before {
  background: var(--akzent);
}

.abzeichen.warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
  background: var(--warn-leise);
}

.abzeichen.warn::before {
  background: var(--warn);
}

.punkt {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--aus);
  margin-top: 7px;
  flex: none;
}

.punkt.gut {
  background: var(--akzent);
}

.punkt.warn {
  background: var(--warn);
}

@media (max-width: 620px) {
  main,
  .fuss {
    padding-left: 18px;
    padding-right: 18px;
  }

  .kopf {
    padding: 12px 18px;
  }
}

/* --------------------------------------------------------------------- Zugänge */

.zugang form {
  margin-top: 14px;
}

.zugang-aktuell {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  margin-top: 12px;
  border: 1px solid var(--rand);
  border-radius: 7px;
  background: var(--grund);
}

.feld-name {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-leise);
}

.maske {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  background: transparent;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.knopfreihe {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.knopfreihe .knopf {
  margin-top: 0;
  width: auto;
  flex: 1 1 160px;
}

.knopfreihe .knopf-flach {
  padding: 9px 14px;
}

.meldung {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  background: var(--akzent-leise);
  color: var(--akzent);
}

.meldung.schlecht {
  background: var(--warn-leise);
  color: var(--warn);
}

/* ------------------------------------------------------------------- Tabelle */

.untertitel {
  font-size: 14px;
  font-weight: 600;
  margin: 26px 0 10px;
}

.tabellenrahmen {
  overflow-x: auto;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
}

.tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tabelle th,
.tabelle td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rand);
  white-space: nowrap;
}

.tabelle th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-leise);
  font-weight: 600;
}

.tabelle tbody tr:last-child td {
  border-bottom: 0;
}

.tabelle .zahl {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tabelle tbody tr:first-child td:first-child {
  font-weight: 600;
}

.hotel-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
