/* Übernommen unverändert aus G:\KI	ools-portal, Commit 96abfeb, web/static/np-tokens.css.
   Nicht in diesem Repository ändern – Änderungen nur an der Quelle, dann neu übernehmen. */
/* NordPrax Tool Hub — Design-Tokens (Designsystem 1.0, Stand 29.07.2026)
   GEMEINSAME BASIS. Nicht pro Werkzeug kopieren, nicht überschreiben.
   Quelle: G:\KI\Übergabe\02_DESIGN_TOKENS_THEME_ANIMATION.md

   Regeln, die hier durchgesetzt werden:
   - Jede Farbe kommt aus einem semantischen Token. Direkte Farbwerte in
     werkzeugspezifischen Styles sind verboten.
   - Hell- und Dunkelmodus sind zwei vollständig ausgearbeitete Zustände.
   - Keine externe Schriftverbindung: Inter wird nur genutzt, wenn lokal
     vorhanden, sonst greift Segoe UI. Kein @import, kein CDN.
   - Keine Glows, kein Glassmorphism, keine dekorative KI-Ästhetik. */

:root {
  /* --- Schrift --- */
  --np-font: Inter, "Segoe UI", Arial, sans-serif;

  /* Typografie: Größe / Zeilenhöhe / Gewicht laut Spezifikation */
  --np-t-page:      750 27px/31px var(--np-font);
  --np-t-section:   700 18px/25px var(--np-font);
  --np-t-card:      700 15px/21px var(--np-font);
  --np-t-panel:     700 14px/20px var(--np-font);
  --np-t-body:      400 14px/20px var(--np-font);
  --np-t-secondary: 400 12px/17px var(--np-font);
  --np-t-meta:      400 11px/15px var(--np-font);
  --np-t-badge:     700 10px/14px var(--np-font);

  /* --- Basisfarben Hellmodus --- */
  --np-navy:        #102d3e;
  --np-navy-2:      #173f54;
  --np-teal:        #0a8d86;
  --np-mint:        #dff4ef;
  --np-blue:        #2374ab;
  --np-text:        #17252e;
  --np-text-muted:  #657681;
  --np-border:      #dce5e8;
  --np-page:        #f4f7f8;
  --np-surface:     #ffffff;
  --np-warning:     #d98216;
  --np-danger:      #c94a49;

  /* Abgeleitete Flächen (Hell) */
  --np-surface-raised: #ffffff;
  --np-surface-active: var(--np-mint);
  --np-input:          #ffffff;
  --np-border-strong:  #b9c9cf;

  /* Teal als Schrift auf hellen Flächen.
     ENTSCHEIDUNG DES BETREIBERS (06.08.2026): Es gelten die Farbwerte des
     Standards, deshalb steht hier derselbe Wert wie in --np-teal.
     BEKANNTE FOLGE, gemessen und in docs/ABNAHME-wissen.md als nicht erfüllter
     MUSS-Punkt geführt: #0a8d86 als Schrift auf Weiß erreicht 4,06:1, gefordert
     sind 4,5:1. Betroffen sind Verweise, aktive Navigation und Primärbuttons im
     HELLMODUS; der Dunkelmodus ist konform.
     Das Token bleibt als eigener Eintrag bestehen: eine Nachschärfung wäre
     damit eine einzige Zeile hier, ohne Eingriff in ein Werkzeug. */
  --np-teal-text: #0a8d86;

  /* Text auf farbiger Fläche — nie schwarz, immer explizit */
  --np-on-teal:  #ffffff;
  --np-on-navy:  #eef5f7;
  --np-on-navy-muted: #a9c1cd;

  /* --- Statusfarben Hellmodus --- */
  --np-st-neutral-bg:  #edf2f4;  --np-st-neutral-fg:  #52636c;
  --np-st-ok-bg:       #dff4e8;  --np-st-ok-fg:       #16704b;
  --np-st-warn-bg:     #fff0d9;  --np-st-warn-fg:     #9a5e0b;
  --np-st-alpha-bg:    #eee8fa;  --np-st-alpha-fg:    #6c4ca0;
  --np-st-info-bg:     #e3effb;  --np-st-info-fg:     #356b97;
  --np-st-error-bg:    #fbe7e6;  --np-st-error-fg:    #a63d3b;

  /* Markierung von Suchtreffern */
  --np-mark-bg: #fff0d9;
  --np-mark-fg: #6b4408;

  /* --- Schatten Hellmodus --- */
  --np-shadow-surface: 0 5px 16px rgba(18, 46, 58, 0.08);
  --np-shadow-strong:  0 10px 28px rgba(18, 46, 58, 0.14);
  --np-shadow-active:  0 4px 12px rgba(18, 46, 58, 0.13);

  /* --- Radien --- */
  --np-r-card:    16px;  /* große Dashboard- und Tool-Karten */
  --np-r-nested:  12px;  /* verschachtelte Karten, kompakte Module, Icons */
  --np-r-control:  9px;  /* Buttons, Eingaben, Segmentsteuerung */
  --np-r-kbd:      5px;  /* Tastaturkürzel */
  --np-r-pill:   999px;  /* nur Badges, Statuspunkte, Avatare */

  /* --- Animation --- */
  --np-ease: cubic-bezier(0.2, 0.72, 0.2, 1);
  --np-d-hover:     165ms;
  --np-d-navactive: 200ms;
  --np-d-panel:     220ms;
  --np-d-accordion: 235ms;
  --np-d-ada:       250ms;
  --np-d-drawer:    280ms;
  --np-d-toast:     210ms;

  /* --- Fokus --- */
  --np-focus: 3px solid rgba(10, 141, 134, 0.28);
  --np-focus-offset: 2px;
}

/* --- Dunkelmodus ---
   Gesteuert über genau einen Zustand am Root-Element: data-theme="dark".
   Systempräferenz ist der Erstwert (siehe @media unten), die gespeicherte
   Benutzereinstellung gewinnt. */
:root[data-theme="dark"] {
  --np-navy:        #09151c;
  --np-navy-2:      #102630;
  --np-teal:        #4fc0b6;
  --np-mint:        #193936;
  --np-blue:        #6fb0dd;
  --np-text:        #e5ecef;
  --np-text-muted:  #aab8be;
  --np-border:      #344852;
  --np-page:        #0d171d;
  --np-surface:     #142129;
  --np-warning:     #ffd792;
  --np-danger:      #ff9b98;

  --np-surface-raised: #17272e;
  --np-surface-active: #193936;
  --np-input:          #0f1b21;
  --np-border-strong:  #4b6069;

  /* Im Dunkelmodus ist die Basisfarbe als Text bereits konform:
     7,46:1 auf der Fläche, 8,25:1 auf der Seite, 5,68:1 auf der Aktivfläche. */
  --np-teal-text: #4fc0b6;

  /* Teal ist im Dunkelmodus heller — Text darauf MUSS dunkel sein,
     aber nie reines Schwarz auf Grün (ausdrücklich verboten). */
  --np-on-teal: #052220;
  --np-on-navy: #e5ecef;
  --np-on-navy-muted: #93aab6;

  --np-st-neutral-bg:  #293940;  --np-st-neutral-fg:  #d8e1e4;
  --np-st-ok-bg:       #173d2d;  --np-st-ok-fg:       #9ce0ba;
  --np-st-warn-bg:     #4a361c;  --np-st-warn-fg:     #ffd792;
  --np-st-alpha-bg:    #332a48;  --np-st-alpha-fg:    #d4c1f7;
  --np-st-info-bg:     #203747;  --np-st-info-fg:     #b8d8ee;
  --np-st-error-bg:    #4a2427;  --np-st-error-fg:    #ffb3b0;

  --np-mark-bg: #4a361c;
  --np-mark-fg: #ffd792;

  --np-shadow-surface: 0 7px 20px rgba(0, 0, 0, 0.32);
  --np-shadow-strong:  0 14px 36px rgba(0, 0, 0, 0.48);
  --np-shadow-active:  0 5px 16px rgba(0, 0, 0, 0.38);

  --np-focus: 3px solid rgba(79, 192, 182, 0.34);
}

/* Systempräferenz als Erstwert: greift nur, solange keine Benutzerwahl
   (data-theme) am Root steht. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --np-navy: #09151c;        --np-navy-2: #102630;
    --np-teal: #4fc0b6;        --np-teal-text: #4fc0b6;
    --np-mint: #193936;
    --np-blue: #6fb0dd;
    --np-text: #e5ecef;        --np-text-muted: #aab8be;
    --np-border: #344852;      --np-page: #0d171d;
    --np-surface: #142129;     --np-warning: #ffd792;
    --np-danger: #ff9b98;
    --np-surface-raised: #17272e; --np-surface-active: #193936;
    --np-input: #0f1b21;       --np-border-strong: #4b6069;
    --np-on-teal: #052220;     --np-on-navy: #e5ecef;
    --np-on-navy-muted: #93aab6;
    --np-st-neutral-bg: #293940; --np-st-neutral-fg: #d8e1e4;
    --np-st-ok-bg: #173d2d;    --np-st-ok-fg: #9ce0ba;
    --np-st-warn-bg: #4a361c;  --np-st-warn-fg: #ffd792;
    --np-st-alpha-bg: #332a48; --np-st-alpha-fg: #d4c1f7;
    --np-st-info-bg: #203747;  --np-st-info-fg: #b8d8ee;
    --np-st-error-bg: #4a2427; --np-st-error-fg: #ffb3b0;
    --np-mark-bg: #4a361c;     --np-mark-fg: #ffd792;
    --np-shadow-surface: 0 7px 20px rgba(0, 0, 0, 0.32);
    --np-shadow-strong:  0 14px 36px rgba(0, 0, 0, 0.48);
    --np-shadow-active:  0 5px 16px rgba(0, 0, 0, 0.38);
    --np-focus: 3px solid rgba(79, 192, 182, 0.34);
  }
}
