/* 44CHKN Business OS — Komponenten: KPI-Kacheln, Zustands-Badges, Tabellen,
   Buttons, Formulare, Drawer/Dialog/Sheet, Charts, Login-Karte, Fortschritt. */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: var(--s2) var(--s4);
  border-radius: 8px; border: 1px solid transparent;
  font-size: var(--fs-2); font-family: var(--font); cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--warn); border-color: var(--line); }
.btn-danger:hover { background: var(--warn-bg); }
.btn-small { min-height: 36px; padding: var(--s1) var(--s3); font-size: var(--fs-1); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; }

/* Touch-Breiten: jede Bedienfläche (Button, Link, Chip, Zusammenfassung)
   mindestens 44 px hoch — auch die kompakten Varianten. */
@media (max-width: 767px) {
  .btn-small { min-height: 44px; }
  .chip, .facet-btn { min-height: 44px; }
  .link-btn { display: inline-flex; align-items: center; min-height: 44px; }
  .kpi-details summary { min-height: 44px; }
  details.nachweis summary { min-height: 44px; }
}

/* ---------- Badges / Zustände ---------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--s1);
  padding: 2px var(--s2); border-radius: 999px;
  font-size: var(--fs-0); font-weight: 600; line-height: 1.6;
  white-space: nowrap;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-part { background: var(--part-bg); color: var(--part); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-miss { background: var(--miss-bg); color: var(--miss); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--muted); }
.badge-neutral::before { display: none; }

.severity-HOCH { background: var(--warn-bg); color: var(--warn); }
.severity-MITTEL { background: var(--part-bg); color: var(--part); }
.severity-INFO { background: var(--info-bg); color: var(--info); }

/* ---------- KPI-Kachel ---------- */
.kpi-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s4); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: var(--s2); min-width: 0;
}
.kpi-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.kpi-label { font-size: var(--fs-1); color: var(--muted); margin: 0; min-width: 0; overflow-wrap: break-word; }
.kpi-value { font-size: var(--fs-5); font-weight: 700; letter-spacing: -.01em; margin: 0; }
.kpi-value .unit { font-size: var(--fs-2); font-weight: 500; color: var(--muted); margin-left: var(--s1); }
.kpi-period { font-size: var(--fs-0); color: var(--muted); margin: 0; }
.kpi-why { font-size: var(--fs-1); color: var(--muted); margin: 0; }
.kpi-coverage { font-size: var(--fs-0); color: var(--part); margin: 0; }
.kpi-compare { font-size: var(--fs-1); margin: var(--s1) 0 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: baseline; }
.kpi-compare .dir { font-weight: 600; }
.kpi-compare.dir-up { color: var(--ok); }
.kpi-compare.dir-down { color: var(--warn); }
.kpi-compare.dir-neutral { color: var(--muted); }
.kpi-parts { margin: var(--s1) 0 0; padding: 0; list-style: none; font-size: var(--fs-1); }
.kpi-parts li { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s1) 0; border-top: 1px dashed var(--line); }
.kpi-parts li span:first-child { color: var(--muted); }
.kpi-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.kpi-details { font-size: var(--fs-0); }
.kpi-details summary { cursor: pointer; color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
.kpi-details summary:hover { color: var(--ink); }
.kpi-details[open] { width: 100%; }
.kpi-details[open] summary { color: var(--ink); }

/* ---------- Tabellen ---------- */
.table-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.table-scroll:focus-visible { box-shadow: var(--focus); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
/* Mindestbreite nur innerhalb der eigenen Scroll-Region — Tabellen ohne
   Scroll-Rahmen (Drawer, Dialog) schrumpfen mit und lange Texte brechen um. */
.table-scroll table.data { min-width: 480px; }
table.data th, table.data td {
  text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line);
  vertical-align: top; overflow-wrap: break-word;
}
table.data th { color: var(--muted); font-weight: 600; font-size: var(--fs-0); background: var(--surface); }
table.data thead th { white-space: nowrap; }
/* Zeilen-Kopfzellen dürfen umbrechen — sonst schieben lange Positionen die
   Betrag-/Status-Spalte aus dem sichtbaren Bereich (Ergebnisrechnung). */
table.data tbody th { white-space: normal; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr.is-clickable { cursor: pointer; }
table.data tr.is-clickable:hover td { background: var(--surface-2); }

.scroll-hint {
  font-size: var(--fs-0); color: var(--muted); padding: var(--s1) var(--s2);
  display: none;
}
@media (max-width: 639px) { .scroll-hint { display: block; } }

/* Gestapelte Zeilen auf sehr kleinen Screens für ausgewählte Tabellen */
@media (max-width: 519px) {
  table.data.stack-md { min-width: 0; }
  table.data.stack-md thead { display: none; }
  table.data.stack-md tr { display: block; border-bottom: 1px solid var(--line); padding: var(--s2) 0; }
  table.data.stack-md td { display: flex; justify-content: space-between; gap: var(--s3); border: 0; padding: var(--s1) var(--s3); }
  table.data.stack-md td::before {
    content: attr(data-col); color: var(--muted); font-size: var(--fs-0);
  }
}

/* ---------- Charts ---------- */
.chart-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow); }
.chart-block h3 { margin: 0 0 var(--s3); font-size: var(--fs-2); }
.chart-controls { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: end; margin-bottom: var(--s3); }
.chart-controls .filter-field { gap: 2px; }
.chart-svg-wrap { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 30;
  background: var(--dark); color: #fff; padding: var(--s1) var(--s2); border-radius: 6px;
  font-size: var(--fs-0); white-space: nowrap; box-shadow: var(--shadow);
  display: none;
}
.chart-tip.is-visible { display: block; }
.chart-pt { cursor: pointer; }
.chart-pt:focus circle, .chart-pt:focus rect { stroke: var(--brand); stroke-width: 3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s2) 0 0; font-size: var(--fs-0); color: var(--muted); }
.chart-legend .key { display: inline-flex; align-items: center; gap: var(--s1); }
.chart-legend .key::before { content: ""; width: 12px; height: 3px; background: currentColor; border-radius: 2px; }
.chart-alt-toggle { margin-top: var(--s3); }
.gap-note { font-size: var(--fs-0); color: var(--part); margin: var(--s2) 0 0; }

/* ---------- Listen ---------- */
.list-plain { list-style: none; margin: 0; padding: 0; }
.item-row {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line);
  background: var(--surface); align-items: baseline;
}
.item-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.item-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.item-row:first-child:last-child { border-radius: var(--radius); }
.item-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.item-main { flex: 1 1 240px; min-width: 0; }
.item-title { margin: 0; font-size: var(--fs-2); font-weight: 600; overflow-wrap: break-word; }
.item-sub { margin: 0; color: var(--muted); font-size: var(--fs-1); }
.item-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline; font-size: var(--fs-1); color: var(--muted); }

.anomaly-link {
  display: block; background: none; border: 0; padding: 0; margin: 0;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  text-decoration: none; width: 100%;
}
.anomaly-link:hover .item-title, .anomaly-link:focus-visible .item-title { color: var(--brand); text-decoration: underline; }
.anomaly-link .item-sub { pointer-events: none; }
.anomaly-link::after { content: "Warum? →"; font-size: var(--fs-0); color: var(--muted); display: inline-block; margin-top: var(--s1); }
.anomaly-link:hover::after, .anomaly-link:focus-visible::after { color: var(--brand); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: var(--s4); max-width: 480px; }
.field { display: flex; flex-direction: column; gap: var(--s1); }
.field label { font-size: var(--fs-1); font-weight: 600; }
.field .hint { font-size: var(--fs-0); color: var(--muted); }
.field input, .field select, .field textarea {
  min-height: 44px; padding: var(--s2) var(--s3);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font-size: var(--fs-2); font-family: var(--font); width: 100%;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { box-shadow: var(--focus); }
.field input[aria-invalid="true"] { border-color: var(--warn); }
.code-otp { font-family: var(--mono); letter-spacing: .35em; font-size: var(--fs-3); text-align: center; }
.code-totp { font-family: var(--mono); font-size: var(--fs-2); word-break: break-all; background: var(--surface-2); padding: var(--s2) var(--s3); border-radius: 8px; display: inline-block; }

.form-error {
  background: var(--warn-bg); color: var(--warn);
  border-radius: 8px; padding: var(--s2) var(--s3); font-size: var(--fs-1);
}
.form-ok { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: var(--s2) var(--s3); font-size: var(--fs-1); }
.fieldset-steps { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s4); }

/* Login/Einladung: ruhige zentrierte Karte */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s4); background: var(--bg); }
.auth-card {
  width: min(440px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s8) var(--s6); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: var(--s4);
}
.auth-brand { display: flex; flex-direction: column; gap: var(--s1); align-items: flex-start; }
.auth-brand .brand-name { color: var(--ink); font-size: var(--fs-3); }
.auth-card h1 { font-size: var(--fs-3); margin: 0; }
.auth-card p { color: var(--muted); font-size: var(--fs-1); margin: 0; }
.auth-step { font-size: var(--fs-0); color: var(--muted); }

/* Passwort-Stärke-Hinweise */
.pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-0); color: var(--muted); }
.pw-rules li::before { content: "— "; color: var(--muted); }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; color: var(--ok); }

/* QR */
.qr-box { background: #fff; border-radius: 8px; padding: var(--s3); width: fit-content; border: 1px solid var(--line); }
.qr-box svg { display: block; }
[data-theme="dark"] .qr-box, :root:not([data-theme="light"]) .qr-box { /* QR bleibt hell für Scanbarkeit */ }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s6); overflow-x: auto; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: var(--s2) var(--s3) var(--s3); min-height: 44px;
  font-size: var(--fs-2); color: var(--muted);
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------- Drawer / Dialog / Sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 23, 31, .45); z-index: 90; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(560px, 100vw); background: var(--surface);
  box-shadow: -4px 0 24px rgba(20, 23, 31, .18);
  display: flex; flex-direction: column;
  overflow-y: auto; padding: var(--s6);
}
.drawer h2 { margin: 0 0 var(--s2); font-size: var(--fs-3); }
.drawer-head { display: flex; justify-content: space-between; align-items: start; gap: var(--s4); margin-bottom: var(--s4); }

.dialog {
  position: fixed; z-index: 100; left: 50%; top: 12vh; transform: translateX(-50%);
  width: min(520px, calc(100vw - var(--s8)));
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4);
  max-height: 76vh; overflow-y: auto;
}
.dialog h2 { margin: 0; font-size: var(--fs-3); }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: var(--surface); border-radius: var(--radius) var(--radius) 0 0;
  padding: var(--s4) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom, 0px));
  max-height: 80vh; overflow-y: auto; box-shadow: 0 -4px 24px rgba(20, 23, 31, .18);
}
.sheet h2 { font-size: var(--fs-3); margin: 0 0 var(--s4); }
.sheet-actions { display: flex; flex-direction: column; gap: var(--s2); }
.sheet-actions .nav-item {
  display: flex; align-items: center; min-height: 48px; padding: var(--s2) var(--s3);
  border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0;
  font-size: var(--fs-2); text-align: left; cursor: pointer;
}
.sheet-actions .nav-item:hover { background: var(--surface-2); }
.sheet-actions .nav-item[aria-current="page"] { background: var(--info-bg); color: var(--info); font-weight: 600; }

/* ---------- Skeleton / Fehler / Leer ---------- */
.skeleton { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.sk-line { height: 14px; border-radius: 6px; background: linear-gradient(100deg, var(--surface-2) 40%, var(--line) 50%, var(--surface-2) 60%); background-size: 200% 100%; animation: sk 1.2s ease infinite; }
.sk-line.w-60 { width: 60%; } .sk-line.w-40 { width: 40%; } .sk-line.w-80 { width: 80%; }
.sk-line.h-big { height: 30px; }
@keyframes sk { from { background-position: 120% 0; } to { background-position: -80% 0; } }

.notice { border-radius: var(--radius); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; }
.notice-error { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.notice-error .notice-title { color: var(--warn); }
.notice h3 { margin: 0; font-size: var(--fs-2); }
.notice p { margin: 0; font-size: var(--fs-1); }

.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--s8) var(--s4); text-align: center; color: var(--muted); background: var(--surface); }
.empty p { margin: 0; }

/* ---------- Fortschritt ---------- */
.progress { background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; min-width: 120px; flex: 1 1 120px; }
.progress-bar { background: var(--brand); height: 100%; border-radius: 999px; }
.progress-row { display: flex; align-items: center; gap: var(--s3); }

/* ---------- Aufgaben ---------- */
.task-prio-HOCH { color: var(--warn); font-weight: 600; }
.task-prio-MITTEL { color: var(--part); font-weight: 600; }
.task-prio-NIEDRIG { color: var(--muted); font-weight: 600; }
.task-status-OFFEN { background: var(--info-bg); color: var(--info); }
.task-status-IN_ARBEIT { background: var(--part-bg); color: var(--part); }
.task-status-BLOCKIERT { background: var(--warn-bg); color: var(--warn); }
.task-status-ERLEDIGT { background: var(--ok-bg); color: var(--ok); }
.overdue-flag { color: var(--warn); font-weight: 600; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.steps-list li { display: flex; gap: var(--s2); align-items: start; }
.steps-list input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.steps-list li.done span { color: var(--muted); text-decoration: line-through; }
.history-list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-1); color: var(--muted); display: flex; flex-direction: column; gap: var(--s1); }
.history-list li { border-left: 2px solid var(--line); padding-left: var(--s2); }

/* ---------- Import ---------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: var(--s8) var(--s4); text-align: center; color: var(--muted);
  background: var(--surface); display: flex; flex-direction: column; gap: var(--s3); align-items: center;
}
.dropzone.is-drag { border-color: var(--brand); color: var(--warn); background: var(--warn-bg); }
.steps-nav { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0 0 var(--s6); padding: 0; font-size: var(--fs-0); }
.steps-nav li { display: flex; align-items: center; gap: var(--s1); padding: var(--s1) var(--s3); border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.steps-nav li.current { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.steps-nav li.done { background: var(--ok-bg); color: var(--ok); }
.signal-list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-1); color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.signal-list li::before { content: "· "; color: var(--muted); }

/* ---------- Nachweis (Details) ---------- */
details.nachweis { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: var(--s2) var(--s3); font-size: var(--fs-0); color: var(--muted); }
details.nachweis summary { cursor: pointer; color: var(--muted); }
details.nachweis table { min-width: 0; }

/* ---------- Sonstiges ---------- */
.muted { color: var(--muted); }
.small { font-size: var(--fs-1); }
.mono { font-family: var(--mono); }
.spacer { flex: 1 1 auto; }
.row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.stack { display: flex; flex-direction: column; gap: var(--s2); }
.footnote { font-size: var(--fs-0); color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }

.facet-group { display: flex; flex-direction: column; gap: var(--s1); }
.facet-group h3 { font-size: var(--fs-0); color: var(--muted); margin: var(--s2) 0 0; text-transform: uppercase; letter-spacing: .05em; }
.facet-btn {
  display: flex; justify-content: space-between; gap: var(--s2); align-items: baseline;
  background: none; border: 0; border-radius: 6px; padding: var(--s1) var(--s2);
  font: inherit; font-size: var(--fs-1); color: var(--ink); cursor: pointer; text-align: left; min-height: 36px;
}
.facet-btn:hover { background: var(--surface-2); }
.facet-btn[aria-pressed="true"] { background: var(--info-bg); color: var(--info); font-weight: 600; }
.facet-btn .n { color: var(--muted); font-size: var(--fs-0); }

/* Facetten als Chips über den Ergebnissen (Belege) */
.facet-chips { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: 0 0 var(--s4); }
.chip {
  display: inline-flex; align-items: baseline; gap: var(--s1);
  min-height: 36px; padding: var(--s1) var(--s3);
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-1); cursor: pointer;
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--info-bg); border-color: var(--info); color: var(--info); font-weight: 600; }
.chip .n { color: var(--muted); font-size: var(--fs-0); }

/* Belegliste: Titel + Art in einer Zelle, Suche schmal */
.doc-search input[type="search"] { width: 100%; }
.doc-table th[scope="row"] { min-width: 220px; }
.doc-title { display: block; font-weight: 600; overflow-wrap: break-word; }
.doc-type { display: block; }

/* Ergebnisrechnung: Ebenen-Kopfzeilen, eingerückte Posten, Hilfezeile */
.pnl-table th[scope="colgroup"] { background: var(--surface-2); padding-top: var(--s2); padding-bottom: var(--s2); }
/* Betrag und Status bleiben in einer Zeile und damit sichtbar; nur die
   Positionsspalte bricht lange Hilfe-Texte um. */
.pnl-table td.num, .pnl-table td .badge { white-space: nowrap; }
.pnl-layer-name { font-weight: 600; margin-right: var(--s2); }
.pnl-missing { display: block; margin-top: 2px; }
.pnl-indent span:first-child { display: block; }
.pnl-help { display: block; color: var(--muted); font-size: var(--fs-0); font-weight: 400; }
.pnl-sum th { border-top: 2px solid var(--line); font-weight: 700; }
.pnl-sum td { border-top: 2px solid var(--line); font-weight: 700; }
.pnl-verdict h3 { color: var(--ink); }

/* Urlaubskalender (Personal): feste Spalten, Namen brechen in der Zelle um */
.cal-table { table-layout: fixed; }
.cal-table td { padding: var(--s1) var(--s2); }
.cal-day { font-weight: 600; color: var(--muted); }
.cal-out .cal-day, .cal-out .cal-entry { opacity: .45; }
.cal-entry { display: block; font-size: var(--fs-0); color: var(--info); overflow-wrap: break-word; }
.cal-entry.is-open { font-style: italic; color: var(--part); }

/* Zeiten (Personal): Hinweiszeile unter einem Dienst */
.signal-row td { padding-top: 0; }

.pagination { display: flex; gap: var(--s2); align-items: center; justify-content: center; margin-top: var(--s4); }
.pageinfo { font-size: var(--fs-1); color: var(--muted); }

.kbd-hint { font-size: var(--fs-0); color: var(--muted); }

/* ---------- Chart-Interna (SVG, in echten Pixeln gezeichnet) ---------- */
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis-text { fill: var(--muted); font-size: 12.5px; }
.chart-empty-text { fill: var(--muted); font-size: 14px; }
.chart-line { fill: none; stroke-width: 2.5; }
.chart-line.series-0 { stroke: var(--brand); }
.chart-line.series-1 { stroke: var(--info); }
.chart-line.series-2 { stroke: var(--part); }
.chart-line.series-3 { stroke: var(--muted); }
.chart-dot { stroke: var(--surface); stroke-width: 1.5; }
.chart-dot.series-0 { fill: var(--brand); }
.chart-dot.series-1 { fill: var(--info); }
.chart-dot.series-2 { fill: var(--part); }
.chart-dot.series-3 { fill: var(--muted); }
.chart-gapdot { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 2 2; }
.chart-hit { fill: transparent; stroke: none; }
.chart-track { fill: var(--surface-2); }
.chart-bar { fill: var(--brand); }
.chart-bar-label { fill: var(--ink); font-size: 12.5px; }
.chart-bar-value { fill: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-bar-miss { fill: var(--muted); }
.chart-legend .key:nth-child(1) { color: var(--brand); }
.chart-legend .key:nth-child(2) { color: var(--info); }
.chart-legend .key:nth-child(3) { color: var(--part); }
.chart-legend .key:nth-child(4) { color: var(--muted); }


/* Mehrzeilige Felder sehen überall gleich aus, auch außerhalb von .field. */
textarea {
  min-height: 88px; padding: var(--s2) var(--s3); width: 100%; resize: vertical;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font-size: var(--fs-2); font-family: var(--font);
}
textarea:focus-visible { box-shadow: var(--focus); }
