/* Clausl — gemeinsame Basis aller Seiten.
   Weiß, Tinte, Orange als einzige Kontrastfarbe. Status-Farben (grün/rot/
   amber) nur dort, wo sie etwas bedeuten. Farben und Bausteine nur HIER
   ändern — die Seiten bauen darauf auf.

   Barrierefreiheit (WCAG 2.1 AA, Oktober 2026): Jede Schriftfarbe hält auf
   Weiß und den hellen Flächen mindestens 4,5:1. Deshalb:
   - --muted / --faint sind dunkler als früher (vorher 4,2:1 bzw. 2,5:1);
   - weiße Schrift steht nie auf --or (3,4:1), sondern auf --or-fill (5:1).
     --or bleibt für Streifen, Marken, Linien und Flächen ohne Text. */

/* Schriften selbst gehostet (Datenschutz: kein Abruf bei Google), Variable Fonts,
   Latin + Latin Extended — Lizenz: SIL OFL 1.1, siehe /fonts/LICENSE.txt */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #ffffff; --soft: #fafaf8; --soft-2: #f3f3f0; --line: #ececea; --line-2: #deded9;
  --ink: #111110; --ink-2: #3b3b37; --muted: #5f5f58; --faint: #6b6b64;
  --or: #eb5e28; --or-d: #d24c1a; --or-text: #b53f12; --or-soft: #fdf1ea; --or-line: #f6d2c0;
  --or-fill: #c4461a; --or-fill-d: #a93c15;   /* Flächen mit weißer Schrift */
  /* Verlauf Honig → Siegellack. Der Streifen ist der Prüfweg: g0 = Sachverhalt,
     g1–g4 = die vier Prüfschritte (dieselben Farben wie im Chat). Bewusst
     kein Gelb→Rot-Regenbogen und keine Pixel: Clausl endet im tiefen Rot
     eines Siegels, die Blöcke sind schräg geschnitten ("/" = vorwärts). */
  --g0: #f2b544; --g1: #f08f33; --g2: #eb5e28; --g3: #c9401f; --g4: #8f2a1f;
  --grad: linear-gradient(90deg, var(--g1), var(--g2) 35%, var(--g3) 70%, var(--g4));
  --stripe: linear-gradient(105deg, var(--g0) 0 20%, var(--g1) 20% 40%, var(--g2) 40% 60%, var(--g3) 60% 80%, var(--g4) 80%);
  --ok: #15773a; --ok-soft: #e8f5ec;   /* 5:1 auch auf --ok-soft */ --bad: #c42b1c; --bad-soft: #fdecea;
  --amb: #9a5800; --amb-soft: #fff4dc;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
::selection { background: #fbdccc; }
.mono { font-family: var(--mono); }

/* Sichtbarer Fokus für Tastatur-Nutzer — überall gleich. Eingabefelder haben
   ihren eigenen Rahmen (unten) und überschreiben das. */
:where(a, button, summary, select, [tabindex], [role="button"]):focus-visible {
  outline: 2px solid var(--or-text); outline-offset: 2px; border-radius: 4px; }
/* Nur für Screenreader */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* "Zum Inhalt springen" — erscheint beim ersten Tab */
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; transition: top .15s; }
.skip:focus { top: 12px; }

/* Kleine Überschrift in Mono-Versalien */
.kicker { font: 600 11px/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* Marke: Pixel-C + Wortmarke */
.mark { display: block; flex: 0 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.brand .tag { font: 600 10px/1 var(--mono); letter-spacing: .08em; color: var(--or-text);
  border: 1px solid var(--or-line); background: var(--or-soft); padding: 3px 5px; border-radius: 3px; }

/* Schaltflächen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--or-fill); border-color: var(--or-fill); color: #fff; }
.btn.primary:hover { background: var(--or-fill-d); border-color: var(--or-fill-d); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #2a2a27; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--soft-2); color: var(--ink); }
.btn.sm { padding: 6px 11px; font-size: 13px; }

/* Formularfelder */
.field { margin-bottom: 14px; }
.field label, label.lbl { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea, input.inp, select.inp {
  width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 9px 11px; font: 14px/1.4 var(--sans); transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, input.inp:focus, select.inp:focus {
  outline: none; border-color: var(--or); box-shadow: 0 0 0 3px var(--or-soft); }
::placeholder { color: var(--faint); }

/* Statusmarken */
.st { display: inline-block; font: 500 12px/1.4 var(--sans); padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.st.ok { background: var(--ok-soft); color: var(--ok); }
.st.warn { background: var(--amb-soft); color: var(--amb); }
.st.err { background: var(--bad-soft); color: var(--bad); }
.st.muted { background: var(--soft-2); color: var(--muted); }
.st.or { background: var(--or-soft); color: var(--or-text); }

/* Karte: Haarlinie, keine Schatten */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }

/* Ladeanzeige: drei Pixel im Verlauf */
.pixload { display: flex; gap: 3px; padding: 6px 0 2px 2px; }
.pixload i { width: 7px; height: 10px; border-radius: 1px; background: var(--g2); transform: skewX(-16deg); animation: clausl-blink 1.1s infinite; }
.pixload i:nth-child(2) { background: var(--g3); animation-delay: .15s; }
.pixload i:nth-child(3) { background: var(--g4); animation-delay: .3s; }
@keyframes clausl-blink { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* Leitmotiv: der Farbstreifen (fünf harte Blöcke) */
.stripe { height: 8px; background: var(--stripe); }

/* Verlaufsschrift; -anim lässt den Verlauf langsam wandern */
.grad { background-image: linear-gradient(100deg, var(--g2) 0%, var(--g3) 50%, var(--g4) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-anim { background-image: linear-gradient(100deg, var(--g1), var(--g2), var(--g3), var(--g4), var(--g3), var(--g2), var(--g1));
  background-size: 300% 100%; animation: clausl-grad 9s ease-in-out infinite alternate; }
@keyframes clausl-grad { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .grad-anim { animation: none; }
  /* Keine Bewegung, wenn das System sie abbestellt hat — Zustände bleiben sichtbar. */
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
