/* The analysis views (analysis.js): the correlation cube and the accuracy table, inside the
   workspace's cards. Colour comes from tokens only, so both themes paint it: a cube cell mixes
   --pos or --neg into the surface by its strength (--a, set from the stored r), the band bar
   fills to its coverage (--v) against a mark at the nominal 80%. */
.an-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 var(--inset) var(--space-3); }
.an-label { color: var(--muted); font-size: 12px; }
.an-scroll { overflow-x: auto; border-top: 1px solid var(--rule); }
.an-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.an-scroll > .catalog-status { margin: var(--space-3) var(--inset); }
.an-none { color: var(--muted); }

.an-cube { border-collapse: separate; border-spacing: 2px; margin: var(--space-2) 0; font: 500 11px/1 var(--mono); }
.an-cube thead td { padding: 0; }
.an-cube thead th { height: 96px; padding: 0 0 var(--space-1); vertical-align: bottom; }
.an-cube thead th span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--muted); font-weight: 500; white-space: nowrap; }
.an-cube tbody th { position: sticky; left: 0; z-index: 1; padding: 0 var(--space-3) 0 var(--inset); color: var(--code); background: var(--surface); font-weight: 600; text-align: left; white-space: nowrap; }
.an-cube td { min-width: 34px; height: 26px; padding: 0 2px; color: var(--ink); background: color-mix(in srgb, var(--an-tint, var(--surface)) calc(var(--a, 0) * 62%), var(--surface)); border-radius: 3px; text-align: center; font-variant-numeric: tabular-nums; }
.an-cube td.pos { --an-tint: var(--pos); }
.an-cube td.neg { --an-tint: var(--neg); }
.an-cube td.gap { color: var(--muted); background: var(--surface-2); }
.workbench .an-cube :is(th, td):last-child { padding-right: var(--inset); background-clip: content-box; }

.an-acc { width: 100%; }
.an-series a { color: var(--code); font: 600 12px var(--mono); text-decoration: none; }
.an-series a:hover { text-decoration: underline; }
.an-acc small { display: block; color: var(--muted); font: 11px/1.5 var(--sans); }
.an-acc .r { text-align: right; font-variant-numeric: tabular-nums; }
.an-cov { position: relative; display: inline-block; width: 72px; height: 6px; margin-right: var(--space-2); vertical-align: middle; background: var(--surface-2); border-radius: 3px; }
.an-cov i { position: absolute; inset: 0 auto 0 0; width: calc(var(--v, 0) * 1%); background: var(--chart-line); border-radius: 3px; }
.an-cov::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: 80%; width: 2px; background: var(--ink); }
.an-band { white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-spark { display: block; width: 96px; height: 22px; }
.an-spark-line { fill: none; stroke: var(--chart-line); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
