/* Alarm-Seite: Tokens wie Pierres Design „Betriebskonsole“ (docs/design/betriebskonsole, Apple-HIG, Systemschrift). */
:root {
  color-scheme: light dark;
  --canvas: #f2f2f7;
  --surface: #ffffff;
  --label: #000000;
  --label-2: #5c5c63; /* opak statt #3c3c4399: 4,5:1 auch auf --canvas (WCAG AA) */
  --sep: #3c3c434a;
  --fill: #78788029;
  --accent: #1e6ef4;
  --link: #1e6ef4;
  /* Akzent als Schriftfarbe (dunkler als die Knopffläche, sonst unter 4,5:1 auf --canvas) */
  --accent-t: #1659d6;
  --ok-bg: #34c7591f;
  --ok-t: #007a2d;
  --warn-bg: #ffcc002e;
  --warn-t: #865400;
  --crit-bg: #ff383c1a;
  --crit-t: #c8102a;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --surface: #1c1c1e;
    --label: #ffffff;
    --label-2: #ebebf599;
    --sep: #54545899;
    --fill: #78788052;
    --link: #5cb8ff;
    --accent-t: #5cb8ff;
    --ok-bg: #30d15829;
    --ok-t: #4ad968;
    --warn-bg: #ffd60026;
    --warn-t: #fedf43;
    --crit-bg: #ff424526;
    --crit-t: #ff6165;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--label);
  font-size: 17px;
  line-height: 1.4;
}

.seite {
  max-width: 560px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.kopf {
  padding: 8px 4px 20px;
}

.ueberzeile {
  margin: 0;
  color: var(--accent-t);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 8px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.unterzeile,
.leise {
  margin: 0 0 12px;
  color: var(--label-2);
  font-size: 15px;
}

.karte {
  margin: 0 0 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
}

.hinweis h2 {
  color: var(--accent-t);
}

.hinweis p {
  margin: 0 0 8px;
  font-size: 15px;
}

.schritte {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
}

.schritte li + li {
  margin-top: 4px;
}

.verborgen {
  display: none;
}

.feld {
  display: block;
  margin: 0 0 12px;
}

.feld-name {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--label-2);
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--sep);
  border-radius: 10px;
  background: var(--fill);
  color: var(--label);
  font: inherit;
}

/* Browser-Standard für Platzhalter liegt bei ca. 1,7:1; hier wie Sekundärtext (≥ 4,5:1) */
input::placeholder {
  color: var(--label-2);
  opacity: 1;
}

#code::placeholder {
  text-transform: none;
  letter-spacing: normal;
}

#code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input:focus-visible,
.knopf:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.knopf {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 8px 0 0;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.knopf:disabled {
  opacity: 0.45;
  cursor: default;
}

.status {
  margin: 12px 0 0;
  font-size: 15px;
}

.status:empty {
  display: none;
}

.status.ok,
.status.warnung,
.status.fehler {
  padding: 10px 12px;
  border-radius: 10px;
}

.status.ok {
  background: var(--ok-bg);
  color: var(--ok-t);
}

.status.warnung {
  background: var(--warn-bg);
  color: var(--warn-t);
}

.status.fehler {
  background: var(--crit-bg);
  color: var(--crit-t);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--fill);
}

.fuss {
  padding: 0 4px;
  color: var(--label-2);
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
