/* hwpanel tokens + chart + status styles - linked by the panel, inlined into every saved report */
:root {
  color-scheme: light;
  --page: #f6f6f3; --surface: #fcfcfb; --surface-2: #f0efec; --ink: #0b0b0b; --ink-2: #52514e; --muted: #7a7873;
  --grid: #e1e0d9; --base: #c3c2b7; --border: rgba(11,11,11,0.12); --accent: #1c5cab; --accent-ink: #ffffff;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-ink: #006300; --warning-ink: #7a5200; --critical-ink: #a32020;
  --good-wash: rgba(12,163,12,0.10); --warning-wash: rgba(250,178,25,0.16); --critical-wash: rgba(208,59,59,0.10);
  --term-bg: #121212; --term-fg: #d8d8d0;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #8f8d86;
    --grid: #2c2c2a; --base: #383835; --border: rgba(255,255,255,0.12); --accent: #5598e7; --accent-ink: #0b0b0b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --good-ink: #0ca30c; --warning-ink: #fab219; --critical-ink: #ff7a7a;
    --good-wash: rgba(12,163,12,0.16); --warning-wash: rgba(250,178,25,0.14); --critical-wash: rgba(208,59,59,0.18);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #8f8d86;
  --grid: #2c2c2a; --base: #383835; --border: rgba(255,255,255,0.12); --accent: #5598e7; --accent-ink: #0b0b0b;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --good-ink: #0ca30c; --warning-ink: #fab219; --critical-ink: #ff7a7a;
  --good-wash: rgba(12,163,12,0.16); --warning-wash: rgba(250,178,25,0.14); --critical-wash: rgba(208,59,59,0.18);
}

/* ---- status: colour + icon + word, never colour alone ---- */
.st { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; font-size: .82rem; line-height: 1;
      padding: .28em .5em; border-radius: 4px; white-space: nowrap; border: 1px solid transparent; }
.st::before { font-weight: 700; }
.st-PASS { color: var(--good-ink); background: var(--good-wash); } .st-PASS::before { content: "\2713"; }
.st-WARN { color: var(--warning-ink); background: var(--warning-wash); } .st-WARN::before { content: "!"; }
.st-FAIL { color: var(--critical-ink); background: var(--critical-wash); } .st-FAIL::before { content: "\2715"; }
.st-SKIP, .st-INCOMPLETE, .st-STOPPED, .st-INTERRUPTED, .st-none { color: var(--ink-2); background: var(--surface-2); }
.st-SKIP::before { content: "\2013"; } .st-STOPPED::before { content: "\25A0"; } .st-INCOMPLETE::before, .st-INTERRUPTED::before { content: "?"; }
.st-RUNNING { color: var(--accent); background: transparent; border-color: var(--accent); } .st-RUNNING::before { content: "\25B6"; }

/* ---- charts ---- */
.hpc { position: relative; }
.hpc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .2rem; }
.hpc-title { font-size: .86rem; font-weight: 600; color: var(--ink); }
.hpc-plot { position: relative; }
.hpc-plot svg { display: block; overflow: visible; }
.hpc-plot svg:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.hpc-grid { stroke: var(--grid); stroke-width: 1; }
.hpc-base { stroke: var(--base); stroke-width: 1; }
.hpc-tick { fill: var(--muted); font: 11px var(--sans); font-variant-numeric: tabular-nums; }
.hpc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hpc-dot, .hpc-hdot { stroke: var(--surface); stroke-width: 2; }
.hpc-cross { stroke: var(--ink-2); stroke-width: 1; }
.hpc-ref { stroke: var(--serious); stroke-width: 1; opacity: .7; }
.hpc-legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: .25rem; font-size: .78rem; color: var(--ink-2); }
.hpc-key { display: inline-flex; align-items: center; gap: .35rem; }
.hpc-key i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; }
.hpc-more { color: var(--muted); }
.hpc-empty { color: var(--muted); font-size: .85rem; padding: 1.2rem 0; }
.hpc-tip { position: absolute; top: 4px; min-width: 150px; max-width: 280px; padding: .45rem .55rem; background: var(--surface);
           border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.14); font-size: .78rem;
           pointer-events: none; z-index: 5; }
.hpc-tip-t { color: var(--muted); margin-bottom: .25rem; }
.hpc-tip-r { display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.hpc-tip-r i { width: 12px; height: 2px; flex: none; }
.hpc-tip-r b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hpc-tip-r span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }

/* ---- tables ---- */
table.t { border-collapse: collapse; width: 100%; font-size: .84rem; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--base); padding: .35rem .5rem; }
table.t td { border-bottom: 1px solid var(--grid); padding: .32rem .5rem; vertical-align: top; }
table.t td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
pre.txt { font: 12px/1.35 var(--mono); white-space: pre-wrap; word-break: break-word; background: var(--surface-2);
          border-radius: 6px; padding: .7rem .8rem; margin: .4rem 0 1rem; color: var(--ink); max-width: 100%; overflow-x: auto; }
