/* Chi-square lab (statistics/assets/tools/chi-square-lab.js). OWNED BY THIS TOOL ONLY.
   Cells above their expected count are --stat-s2 (orange), below it
   --stat-s1 (blue), the colour's strength is the cell's component; the
   chi-square distribution is --stat-s5 with its p-value shaded in the course
   accent. */
.cs-ex{margin:0;}
.cs-stage{display:flex;flex-direction:column;min-height:0;height:100%;}
.cs-fig,.cs-qfig{position:relative;flex:1 1 auto;min-height:260px;}
.cs-svg{position:absolute;inset:0;display:block;width:100%;height:100%;user-select:none;-webkit-user-select:none;font-family:var(--font-ui);}
.cs-box{fill:var(--surface2, #f3f4f4);stroke:var(--line);stroke-width:1;}
.cs-heat.is-up{fill:var(--stat-s2);}
.cs-heat.is-down{fill:var(--stat-s1);}
.cs-cell{cursor:pointer;outline:none;}
.cs-qfig .cs-cell{cursor:default;}
.cs-cell:hover .cs-box{stroke:var(--cink);}
.cs-cell:focus-visible .cs-box{stroke:var(--cink);stroke-width:3;}
.cs-selr{fill:none;stroke:var(--ink);stroke-width:2.6;}
.cs-o{fill:var(--ink);font-size:17px;font-weight:900;font-variant-numeric:tabular-nums;}
.cs-e{fill:var(--muted);font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums;}
.cs-cmp{fill:var(--ink);font-size:11px;font-weight:800;font-variant-numeric:tabular-nums;}
.cs-ch{fill:var(--muted);font-size:12px;font-weight:800;}
.cs-rh{fill:var(--ink);font-size:12.5px;font-weight:800;}
.cs-tot{fill:var(--muted);}
.cs-t{fill:var(--muted);font-size:13px;font-weight:800;font-variant-numeric:tabular-nums;}
.cs-gt{fill:var(--ink);}
.cs-rule{stroke:var(--line);stroke-width:1.2;}
.cs-curve{fill:none;stroke:var(--stat-s5);stroke-width:2.4;}
.cs-pshade{fill:var(--cink);fill-opacity:.4;}
.cs-crit{stroke:var(--muted);stroke-width:1.5;stroke-dasharray:5 4;}
.cs-critl,.cs-dfl{fill:var(--muted);font-size:11.5px;font-weight:700;}
.cs-axis{stroke:var(--ink);stroke-width:1.4;}
.cs-tick{stroke:var(--muted);stroke-width:1.2;}
.cs-tl{fill:var(--ink);font-size:12px;font-weight:600;}
.cs-seg{stroke:var(--white);stroke-width:1;}
.cs-seg.is-up{fill:var(--stat-s2);} .cs-seg.is-down{fill:var(--stat-s1);}
.cs-seg.is-sel{stroke:var(--ink);stroke-width:2;}
.cs-obs{stroke:var(--ink);stroke-width:2;}
.cs-tag rect{fill:var(--ink);}
.cs-tag text{fill:var(--white);font-size:12.5px;font-weight:800;}
.cs-wait{fill:var(--muted);font-size:13px;font-weight:700;}
:root[data-theme="dark"] .cs-box{fill:rgba(255,255,255,.04);}
:root[data-theme="dark"] .cs-pshade{fill-opacity:.5;}

.cs-dock{display:flex;flex-direction:column;gap:10px;}
.cs-btns{display:flex;flex-wrap:wrap;gap:8px;}
.cs-segw{display:flex;flex-direction:column;gap:4px;}
.cs-seglab{font:800 var(--ls-s, 13px) var(--font-ui);color:var(--muted);}
.cs-seg > button{font-weight:800;white-space:nowrap;}
.cs-warn{padding:8px 12px;border-radius:10px;background:color-mix(in srgb, var(--stat-s2) 14%, transparent);}
.cs-tbl{margin-bottom:10px;}
.cs-tbl caption{text-align:left;font-weight:800;padding-bottom:4px;}

.ls-root .cs-ls-stage{flex:1;min-height:0;display:flex;flex-direction:column;}
.ls-root .cs-ls-stage > .cs-stage{flex:1;}
.ls-root .cs-ls-dock .bt-cue{display:none;}
.ls-root .cs-ls-why .bt-cue{display:block;font:600 var(--ls-s)/1.45 var(--font-ui);color:var(--muted);}
.ls-root .cs-ls-why .bt-cue-k{display:none;}
.ls-root .cs-ls-why .tx-where,.ls-root .cs-ls-why .bt-say{margin:0;padding:0;background:none;border:0;box-shadow:none;font-size:var(--ls-m);}
.ls-root .cs-ls-why details.bt-why > summary{display:none;}
.ls-root .ls-drill-stage .cs-qfig{flex:1;}
