/* f2b-stats 1.8 (2026-10-24, Claude): drei Kacheln, Titel ohne Versalien, Hinweis mit geradem Strich
 * f2b-stats 1.7 (2026-10-24, Claude)
 * Dunkel = VisionThinks-Stil (Karte wie Technik-Seiten, Radien aus
 * vt-radius.css mit Ausweichwerten, VT-Blau). Standard: farbschema="dunkel".
 * Reihenfolge der Farbwerte: hell (Grundwert) → auto dunkel → erzwungen.
 * --f2b-series-* und --f2b-surface müssen Hex-Werte bleiben (JS rechnet damit). */

.f2b-root {
  color-scheme: light;
  --f2b-surface: #fcfcfb;
  --f2b-bg: var(--f2b-surface);
  --f2b-text: #0b0b0b;
  --f2b-text-2: #52514e;
  --f2b-grid: #e6e5e0;
  --f2b-border: #dcdbd5;
  --f2b-tile-border: var(--f2b-border);
  --f2b-hinweis-bg: var(--f2b-grid);
  --f2b-hinweis-line: var(--f2b-series-1);
  --f2b-shadow: none;
  --f2b-series-1: #2a78d6;   /* alle Sperren */
  --f2b-series-2: #eb6834;   /* PHP-Angriffe */
  background: var(--f2b-bg);
  color: var(--f2b-text);
  border: 1px solid var(--f2b-border);
  border-radius: var(--vt-radius-block, 22px);
  box-shadow: var(--f2b-shadow);
  padding: 24px;
  font-size: 15px;
  line-height: 1.4;
}

/* VisionThinks dunkel: für auto (System dunkel), data-theme="dark" und farbschema="dunkel" */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .f2b-root {
    color-scheme: dark;
    --f2b-surface: #0a1c37;
    --f2b-bg: linear-gradient(145deg, rgba(10,28,55,.97) 0%, rgba(9,25,49,.96) 55%, rgba(7,21,43,.97) 100%);
    --f2b-text: #ffffff;
    --f2b-text-2: rgba(255,255,255,.72);
    --f2b-grid: rgba(94,169,255,.14);
    --f2b-border: rgba(94,169,255,.38);
    --f2b-tile-border: rgba(94,169,255,.25);
    --f2b-hinweis-bg: rgba(94,169,255,.16);
    --f2b-hinweis-line: #5ea9ff;
    --f2b-shadow: 0 12px 30px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.075);
    --f2b-series-1: #1d8ff0;
    --f2b-series-2: #f0883e;
  }
}
:root[data-theme="dark"] .f2b-root,
:root .f2b-root.f2b-dunkel {
  color-scheme: dark;
  --f2b-surface: #0a1c37;
  --f2b-bg: linear-gradient(145deg, rgba(10,28,55,.97) 0%, rgba(9,25,49,.96) 55%, rgba(7,21,43,.97) 100%);
  --f2b-text: #ffffff;
  --f2b-text-2: rgba(255,255,255,.72);
  --f2b-grid: rgba(94,169,255,.14);
  --f2b-border: rgba(94,169,255,.38);
  --f2b-tile-border: rgba(94,169,255,.25);
  --f2b-hinweis-bg: rgba(94,169,255,.16);
  --f2b-hinweis-line: #5ea9ff;
  --f2b-shadow: 0 12px 30px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.075);
  --f2b-series-1: #1d8ff0;
  --f2b-series-2: #f0883e;
}

/* farbschema="hell" erzwingen (schlägt auch data-theme="dark") */
:root .f2b-root.f2b-hell {
  color-scheme: light;
  --f2b-surface: #fcfcfb; --f2b-bg: #fcfcfb; --f2b-text: #0b0b0b; --f2b-text-2: #52514e;
  --f2b-grid: #e6e5e0; --f2b-border: #dcdbd5; --f2b-tile-border: #dcdbd5;
  --f2b-hinweis-bg: #e6e5e0; --f2b-hinweis-line: #2a78d6; --f2b-shadow: none;
  --f2b-series-1: #2a78d6; --f2b-series-2: #eb6834;
}

/* Theme-Regeln für h3/figure überstimmen (Versalien, Größe, Abstände) */
.f2b-root .f2b-title { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0 0 16px;
  color: var(--f2b-text); text-transform: none; letter-spacing: normal; }

.f2b-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 8px;
}
.f2b-root .f2b-tiles-note { margin: 0 0 28px; }
.f2b-tile { display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--f2b-tile-border); border-radius: var(--vt-radius-small, 10px); padding: 12px 14px; }
.f2b-label { color: var(--f2b-text-2); font-size: 13px; }
.f2b-sub { color: var(--f2b-text-2); font-size: 13px; }
.f2b-sub span { color: var(--f2b-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.f2b-sub .f2b-php-since { color: var(--f2b-text-2); font-weight: 400; }
.f2b-num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--f2b-text); }

.f2b-root .f2b-chart { margin: 0 0 32px; }
.f2b-chart figcaption { font-weight: 600; margin-bottom: 8px; color: var(--f2b-text); }
.f2b-canvas { position: relative; height: 260px; }

.f2b-table summary { cursor: pointer; color: var(--f2b-text-2); }
.f2b-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; color: var(--f2b-text); }
.f2b-table th, .f2b-table td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--f2b-grid); }
.f2b-table th:first-child, .f2b-table td:first-child { text-align: left; }
.f2b-note { color: var(--f2b-text-2); font-size: 13px; margin: 8px 0 0; }
.f2b-root .f2b-hinweis { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--f2b-hinweis-line);
  border-radius: 0; background: var(--f2b-hinweis-bg); color: var(--f2b-text); }

@media (max-width: 760px) { .f2b-tiles { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .f2b-root { padding: 16px; } }
@media (max-width: 480px) { .f2b-canvas { height: 220px; } .f2b-num { font-size: 22px; } }

/* 1.9 (2026-11-11, Claude): kompakte Vorschau [f2b_stats diagramm="48h" kompakt="ja"] */
.f2b-root.f2b-kompakt .f2b-chart { margin: 0; }
.f2b-root.f2b-kompakt .f2b-canvas { height: 200px; }
.f2b-root.f2b-kompakt figcaption { font-size: 14px; margin-bottom: 6px; }
