/* Design-Tokens — Farben, Schriften, Abstände. Nur hier ändern; site.css verwendet ausschliesslich diese Variablen.
   Stil: Apple-inspiriert (helle Flächen, runde Karten, grosse Typografie). Dunkelmodus automatisch.
   Schrift: Auf Apple-Geräten wird SF Pro über -apple-system geladen, sonst fällt der Stack auf die
   Systemschrift zurück. Eigene Webfonts später per @font-face (selbst gehostet, /fonts/) vorne einsetzen. */
:root {
  color-scheme: light dark;

  /* Flächen */
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --fill: rgba(120, 120, 128, 0.12);
  --glass: rgba(251, 251, 253, 0.72);

  /* Text & Linien */
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: #d2d2d7;

  /* Akzent (Apple-Grün) */
  --accent: #248a3d;
  --accent-hover: #1c7231;
  --accent-soft: rgba(36, 138, 61, 0.18);
  --on-accent: #ffffff;
  --grad: linear-gradient(92deg, #2fb350 0%, #9dc62f 52%, #ffa51f 100%);
  --glow: rgba(48, 180, 85, 0.16);

  /* Status */
  --ok-bg: #e8f6ec;      --ok-text: #15692b;
  --warn-bg: #fff3d6;    --warn-text: #8a5a00;
  --bad-bg: #ffe6e6;     --bad-text: #a4121f;
  --info-bg: #f0f0f5;    --info-text: #3a3a3c;
  --tint: #fff6e3;

  /* Schatten */
  --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.07);
  --shadow-m: 0 12px 48px rgba(0, 0, 0, 0.14);

  /* Schrift */
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Masse */
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --r-pill: 980px;
  --gutter: 22px;
  --maxw: 1080px;
}

/* Dunkel: automatisch per Systemeinstellung (ausser Nutzer hat Hell erzwungen) oder per Umschalter (data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #111113;
    --card: #1c1c1e;
    --fill: rgba(120, 120, 128, 0.3);
    --glass: rgba(0, 0, 0, 0.7);

    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: #424245;

    --accent: #30d158;
    --accent-hover: #4be072;
    --accent-soft: rgba(48, 209, 88, 0.28);
    --on-accent: #04210d;
    --glow: rgba(48, 209, 88, 0.18);

    --ok-bg: #12301a;      --ok-text: #6ee38b;
    --warn-bg: #3a2b08;    --warn-text: #ffd26b;
    --bad-bg: #3d1517;     --bad-text: #ff8a8f;
    --info-bg: #26262a;    --info-text: #d1d1d6;
    --tint: #2a2112;

    --shadow-s: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-m: 0 12px 48px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #111113;
  --card: #1c1c1e;
  --fill: rgba(120, 120, 128, 0.3);
  --glass: rgba(0, 0, 0, 0.7);

  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: #424245;

  --accent: #30d158;
  --accent-hover: #4be072;
  --accent-soft: rgba(48, 209, 88, 0.28);
  --on-accent: #04210d;
  --glow: rgba(48, 209, 88, 0.18);

  --ok-bg: #12301a;      --ok-text: #6ee38b;
  --warn-bg: #3a2b08;    --warn-text: #ffd26b;
  --bad-bg: #3d1517;     --bad-text: #ff8a8f;
  --info-bg: #26262a;    --info-text: #d1d1d6;
  --tint: #2a2112;

  --shadow-s: 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-m: 0 12px 48px rgba(0, 0, 0, 0.6);
}

:root[data-theme="light"] { color-scheme: light; }
