/* Components — consumes tokens.css. Small on purpose (ADR 0001). */
.kpi { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s1); }
.kpi[data-state="crit"] { border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.kpi[data-state="warn"] { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.kpi-label { font-size: var(--fs-sm); color: var(--fg-dim); display: flex; gap: var(--s2); align-items: center; }
.kpi-hint { width: 16px; height: 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 10px; display: inline-grid; place-items: center; cursor: help; }
.kpi-value { font-size: var(--fs-2xl); line-height: 1.05; }
.kpi-unit { font-size: var(--fs-sm); color: var(--fg-dim); margin-left: 2px; }

.chips { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s1); scrollbar-width: none; }
.chip { background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px; font-size: var(--fs-sm); min-height: 36px; cursor: pointer; white-space: nowrap; }
.chip.is-active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--bg-2)); }

.dt { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dt th { text-align: left; color: var(--fg-dim); font-weight: 500; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg-0); }
.dt td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.dt tr[data-state="crit"] { background: color-mix(in srgb, var(--crit) 10%, transparent); }
.dt tr[data-state="warn"] { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.dt td.empty { text-align: center; color: var(--fg-dim); padding: var(--s6); }

.sheet { position: fixed; inset: auto 0 0 0; background: var(--bg-1); border-top-left-radius: var(--r-xl); border-top-right-radius: var(--r-xl); border: 1px solid var(--line); z-index: var(--z-sheet); max-height: 80vh; overflow: auto; }
.sheet[hidden] { display: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.sheet-body { padding: var(--s4); }
.sheet-close { background: none; border: 0; color: var(--fg-dim); font-size: 24px; min-width: 44px; min-height: 44px; }

.toast { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: var(--s2) var(--s4); z-index: var(--z-toast); }
.toast[data-kind="ok"] { border-color: var(--ok); }
.toast[data-kind="crit"] { border-color: var(--crit); }
.spark { color: var(--info); display: block; }
