/* ekte web UI v2 — the performance panel (/perf.js) on the v2 tokens.
 *
 * perf.js injects its layout with every colour as a --zp-* property whose
 * built-in default has zero specificity (:where), so these mappings win. The
 * tooltip is appended to <body>, hence .zp-tip here too. Both themes come
 * from tokens.css; nothing here is set per theme.
 */
:root .zp-section,
:root .zp-live,
:root .zp-tip {
  --zp-surface: var(--surface);
  --zp-panel: var(--surface);
  --zp-ink: var(--ink);
  --zp-ink2: var(--ink-muted);
  --zp-faint: var(--ink-muted);
  --zp-grid: var(--line);
  --zp-track: var(--sunken);
  --zp-tab: var(--surface);
  --zp-tab-on: var(--primary);
  --zp-tab-on-ink: var(--on-primary);
  --zp-cached: var(--ink-muted);
  --zp-better: var(--success);
  --zp-worse: var(--danger);
  --zp-x: var(--danger);
  --zp-focus: var(--primary);
  --zp-tip-bg: var(--ink);
  --zp-tip-ink: var(--on-primary);
  --zp-tip-shadow: var(--shadow);
  /* series: target = chart slot 0 (the brand), so the live probe bar and
     target points match the audit progress bar; baseline = chart slot 2 */
  --zp-t: var(--chart-0);
  --zp-b: var(--chart-2);
}

/* layout touches on the v2 language */
:root .zp-live {
  max-width: none;
  border-color: var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
}
:root .zp-tabs button { font-family: var(--sans); transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
/* the y-range switch (Full range / Probe focus) in the same type */
:root .zp-seg button, :root .zp-auto { font-family: var(--sans); }
:root .zp-seg button { transition: background var(--dur-fast), color var(--dur-fast); }
:root .zp-seg button:not([aria-pressed="true"]):not(:disabled):hover { color: var(--ink); }
:root .zp-tabs button:not(.on):hover { color: var(--ink); border-color: var(--line); }
/* the live probe bar has the audit progress bar's (.pbar) shape and motion */
:root .zp-bar { height: 6px; }
:root .zp-bar i { transition: width var(--dur-slow) var(--ease-out); }
/* the ten-column stat table fits the 760px card without scrolling */
:root .zp-h { font-family: var(--disp); font-weight: 600; }
:root .zp-tip { font-family: var(--mono); box-shadow: var(--shadow-pop); }

/* wide tables scroll inside the card on narrow screens (the built-in styles
   let them overflow) */
:root .zp-wide { overflow-x: auto; }
:root .zp-wide > .zp-table { margin-top: 0; }

/* the data table toggle is visible in v2 (keyboard + touch reach the
   tooltip contents here) */
:root .zp-data {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  margin: 2px 0 4px;
}
:root .zp-data > .disclosure { font-weight: 600; color: var(--ink-muted); }
:root .zp-data > .disclosure:hover { color: var(--ink); }
:root .zp-data-scroll {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-top: 4px;
  background: var(--surface);
}
:root .zp-data-scroll .zp-table { margin: 0; width: 100%; }
:root .zp-data-scroll thead th { position: sticky; top: 0; background: var(--surface); }
