/* =========================
   CI / Basis-Theme
   ========================= */

:root {
  color-scheme: light dark;
  --bg: #f9fafb;
  --fg: #111827;
  --muted: #4b5563;
  --accent: #111827;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --accent: #f97316;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.25rem;
}

h2 {
  margin-top: 2rem;
  font-size: 1.3rem;
}

h3 {
  margin-top: 1.2rem;
  font-size: 1.05rem;
}

p {
  margin: 0.5rem 0 0.6rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  padding: 0.1rem 0.25rem;
  border-radius: 0.25rem;
  background: rgba(148,163,184,0.2);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* =========================
   Typo & Utility
   ========================= */

.tagline {
  color: var(--muted);
  margin-bottom: 1.8rem;
}

.small {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2rem;
}

.muted {
  color: #555;
  margin: 6px 0 12px;
}

.list {
  padding-left: 1.1rem;
  margin: 0.4rem 0 0.2rem;
}

/* =========================
   Boxen / Karten
   ========================= */

.box {
  border-radius: 0.75rem;
  border: 1px solid rgba(148,163,184,0.6);
  padding: 1rem 1.1rem 1.1rem;
  margin: 1rem 0 0.5rem;
  background: #fff;
}

.box-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* =========================
   E-Mail UI
   ========================= */

.email-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.email-link {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #111;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #f7f7f7;
}

.email-link:focus,
.btn:focus {
  outline: 3px solid rgba(184,115,51,.35);
  outline-offset: 2px;
}

.btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bbb;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.hint {
  color: #666;
  font-size: 0.95rem;
  margin: 10px 0 0;
}

/* =========================
   Aktenvermerk / Fehlleitung / DIN-Stempel
   ========================= */

.aktenvermerk {
  position: fixed;
  left: 1rem;
  top: 1rem;
  max-width: 260px;
  padding: 0.7rem 0.9rem;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #7a1f1f;
  background: rgba(255, 248, 248, 0.95);
  border: 2px solid #7a1f1f;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
  transform: rotate(2deg);
  text-transform: uppercase;
  z-index: 9999;
  display: none;
}

.show-aktenvermerk .aktenvermerk { display: block; }

.fehlleitung {
  position: fixed;
  right: 1rem;
  top: 30%;
  max-width: 260px;
  padding: 0.6rem 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #333;
  background: rgba(250, 250, 246, 0.95);
  border: 1px solid #aaa;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  transform: rotate(-2deg);
  opacity: 0.85;
  z-index: 9998;
  display: none;
}

.din-stempel {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) rotate(-3deg);
  padding: 0.7rem 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #6b6b6b;
  border: 2px dashed #6b6b6b;
  background: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  z-index: 9997;
  opacity: 0.8;
  display: none;
}

.show-fehlleitung .fehlleitung,
.show-fehlleitung .din-stempel {
  display: block;
}