/* =====================================================================
   PULSE + CHURN KIT EXTENSION 2 — styles for the shell-ext2.js primitives.
   Kit tokens only (kit.css, kit-ext.css load first). One accent (the action
   blue); structure 1 px at ≤ 25 % ink; 8 / 24 / 48 rhythm; nothing below 12 px;
   transitions 120 ms at most. Class contract for the render gate:
   .sx-facts · .sx-title · .sx-chart · .prob + .word · .money · .sx-count ·
   .sx-selected · .sx-scroll
   ===================================================================== */

.sx-more[hidden],.sx-filters-clear[hidden],.sx-fpop[hidden],.sx-bt-pick[hidden],.sx-bt-sum[hidden],.table tbody tr[hidden]{display:none!important}

/* ---------- small values ---------- */
.prob{display:inline-flex;align-items:baseline;gap:6px;white-space:nowrap;font-variant-numeric:tabular-nums}
.prob .word{font-size:var(--fs-small)}
.money{white-space:nowrap;font-variant-numeric:tabular-nums}
/* a count that opens See all: quiet dotted underline in the action colour, solid on hover */
.sx-count{appearance:none;-webkit-appearance:none;border:0;background:none;margin:0;padding:0;font:inherit;color:inherit;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;text-decoration:underline dotted;text-decoration-color:var(--color-action);text-decoration-thickness:1px;text-underline-offset:3px;border-radius:2px}
.sx-count:hover{text-decoration-style:solid;color:var(--color-action-strong)}

/* headed tables the primitives build themselves: phrase headers in sentence case, wrapping, never forced onto one line */
.sx-words thead th{text-transform:none;letter-spacing:0;white-space:normal;font-weight:600;font-size:var(--fs-micro);line-height:1.3;color:var(--color-text-muted);vertical-align:bottom}
.sx-words td{vertical-align:top}
.sx-words td.r,.sx-words th.r{text-align:right}
.sx-bleed{margin:0 calc(-1 * var(--space-5));padding:2px var(--space-5)}
@media (max-width:700px){.sx-bleed{margin:0 calc(-1 * var(--space-4));padding:2px var(--space-4)}}
.sx-evidence,.sx-ms,.sx-coef{container-type:inline-size;min-width:0}
.sx-evidence .sx-title,.sx-coef .sx-title{margin-bottom:var(--space-2)}

/* "show 20 more of 143" foot */
.sx-more{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--space-1) var(--space-3);padding-top:var(--space-3);font-size:var(--fs-small)}
.sx-more-note{font-size:var(--fs-micro);color:var(--color-text-muted);font-variant-numeric:tabular-nums}

/* ---------- facts: the essentials strip ---------- */
.sx-facts{display:grid;grid-template-columns:repeat(var(--cols,var(--n,4)),minmax(0,1fr));row-gap:var(--space-4);padding:var(--space-4) 0;border-top:1px solid var(--color-rule-soft);border-bottom:1px solid var(--color-rule-soft)}
.sx-fact{min-width:0;padding:0 var(--space-3);border-left:1px solid var(--color-rule-soft);display:flex;flex-direction:column;gap:4px}
.sx-fact:first-child,.sx-fact.rs{padding-left:0;border-left:0}
.sx-fact:last-child,.sx-fact.re{padding-right:0}
.sx-fact-l{margin:0;font-size:var(--fs-small);line-height:1.35;color:var(--color-text-secondary)}
.sx-fact-v{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;font-size:20px;font-weight:500;line-height:1.25;letter-spacing:-.2px;color:var(--color-text);font-variant-numeric:tabular-nums}
.sx-fact-v .u{font-size:var(--fs-small);font-weight:400;letter-spacing:0;color:var(--color-text-muted)}
.sx-fact-s{margin:0;font-size:var(--fs-micro);line-height:1.4;color:var(--color-text-muted)}
.sx-fact-btn{appearance:none;-webkit-appearance:none;border:0;background:none;margin:0;padding:0;font:inherit;letter-spacing:inherit;color:inherit;cursor:pointer;text-decoration:underline dotted;text-decoration-color:var(--color-action);text-decoration-thickness:1px;text-underline-offset:4px;border-radius:2px}
.sx-fact-btn:hover{text-decoration-style:solid;color:var(--color-action-strong)}
/* the strip measures itself (S.facts sets --cols and .rs / .re); without script it wraps to two columns at 900 px */
@media (max-width:900px){
  .sx-facts{--cols:2}
  .sx-fact:nth-child(odd){padding-left:0;border-left:0}
  .sx-fact:nth-child(even){padding-right:0}
}

/* ---------- evidence table ---------- */
.sx-evidence-table{table-layout:auto}
.sx-evidence-table th.sx-c-date,.sx-evidence-table td.sx-c-date{white-space:nowrap;color:var(--color-text-secondary);width:1%;min-width:88px}
.sx-evidence-table th.sx-c-date{white-space:normal}
.sx-evidence-table th.sx-c-amt{min-width:96px}
.sx-evidence-table td.sx-c-fact{min-width:0}
.sx-evidence-table td.sx-c-amt{white-space:nowrap;width:1%}
.sx-evidence-table td.sx-c-src{color:var(--color-text-muted);font-size:var(--fs-small)}
@container (max-width:479px){
  .sx-evidence-table thead,.sx-ms-table thead,.sx-coef-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .sx-evidence-table,.sx-evidence-table tbody{display:block}
  .sx-evidence-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px var(--space-3);padding:var(--space-2) 0;border-bottom:1px solid var(--color-rule-soft)}
  .sx-evidence-table tbody tr:last-child{border-bottom:0}
  .sx-evidence-table td{display:block;padding:0;border:0;width:auto}
  .sx-evidence-table td.sx-c-date{grid-column:1;grid-row:1;font-size:var(--fs-micro)}
  .sx-evidence-table td.sx-c-amt{grid-column:2;grid-row:1}
  .sx-evidence-table td.sx-c-fact{grid-column:1/-1;grid-row:2}
  .sx-evidence-table td.sx-c-src{grid-column:1/-1;grid-row:3;font-size:var(--fs-micro)}
  .sx-evidence-table td.sx-c-src:empty{display:none}
  .sx-evidence-table td.empty-cell{grid-column:1/-1}
}

/* ---------- matched sets ---------- */
.sx-ms{display:flex;flex-direction:column;gap:var(--space-3)}
.sx-ms>.sx-title{margin:0}
.sx-ms-table{table-layout:auto}
.sx-ms-table tbody tr{cursor:pointer}
.sx-ms-table tbody tr:focus-visible{outline:2px solid var(--color-focus);outline-offset:-2px}
.sx-ms-table td.sx-c-set{min-width:0}
.sx-ms-t{display:flex;flex-wrap:wrap;align-items:center;gap:4px var(--space-2);font-weight:600;line-height:1.35}
.sx-ms-sub{display:block;font-size:var(--fs-micro);line-height:1.4;color:var(--color-text-muted);margin-top:2px;font-weight:400}
.sx-ms-up{display:flex;flex-direction:column}
.sx-ms-up .num{white-space:normal}
.sx-ms-best{font-weight:600;color:var(--color-action-strong)}
.sx-ms-few{color:var(--color-text-muted)}
.sx-ms-note{margin:0}
.sx-ms .sx-basis-chips .sx-chip{min-height:30px}
@container (max-width:479px){
  .sx-ms-table,.sx-ms-table tbody{display:block}
  .sx-ms-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px var(--space-4);padding:var(--space-3);margin:0 calc(-1 * var(--space-3));border-bottom:1px solid var(--color-rule-soft)}
  .sx-ms-table tbody tr:last-child{border-bottom:0}
  .sx-ms-table td{display:block;padding:0;border:0;text-align:left;background:none!important}
  .sx-ms-table td.r{text-align:left}
  .sx-ms-table td.sx-c-up,.sx-ms-table td.sx-ms-few,.sx-ms-table td.empty-cell{grid-column:1/-1}
  .sx-ms-table td.sx-c-set{grid-column:1;grid-row:1}
  .sx-ms-table td.sx-c-q{grid-column:2;grid-row:1;text-align:right}
  .sx-ms-table td.sx-c-n{grid-column:1;grid-row:2}
  .sx-ms-table td.sx-c-ch{grid-column:2;grid-row:2}
  .sx-ms-table td.sx-c-up{grid-row:3}
  .sx-ms-table td.sx-ms-few{grid-row:1;grid-column:2;text-align:right}
  .sx-ms-table td[data-label]::before{content:attr(data-label);display:block;font-size:var(--fs-micro);line-height:1.3;color:var(--color-text-muted);font-weight:400}
  .sx-ms-table tbody tr[aria-selected=true]{background:var(--color-selected);box-shadow:inset 3px 0 0 var(--color-action)}
  .sx-ms-table tbody tr[aria-selected=true] td:first-child::before{display:none}
  .sx-ms-table tbody tr:hover{background:var(--color-surface-hover)}
  .sx-ms-table tbody tr[aria-selected=true]:hover{background:var(--color-selected)}
}

/* ---------- backtest ---------- */
.sx-bt{display:flex;flex-direction:column;gap:var(--space-3);min-width:0}
.sx-bt-ctl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-2) var(--space-4)}
.sx-bt-pick{display:inline-flex;align-items:center;gap:var(--space-2);font-size:var(--fs-small);color:var(--color-text-secondary);min-width:0}
.sx-bt-pick .select{min-height:var(--control-h-sm);min-width:0;max-width:100%;font-size:var(--fs-small);padding:3px 28px 3px 8px}
.sx-bt-body{min-width:0}
.sx-bt .sx-svg{overflow:hidden}
.sx-bt-svg:focus-visible{outline:2px solid var(--color-focus);outline-offset:4px;border-radius:2px}
.sx-bt-actual{fill:none;stroke:var(--color-text);stroke-width:1.75;stroke-linejoin:round;stroke-linecap:round}
.sx-bt-fc{fill:none;stroke:var(--color-action);stroke-width:2.25;stroke-linejoin:round;stroke-linecap:round}
.sx-bt-band{fill:var(--color-band);opacity:.75}
.sx-bt-err{fill:var(--color-text-muted);opacity:.2}
.sx-bt-cut{stroke:var(--color-rule-hover);stroke-width:1;shape-rendering:crispEdges}
.sx-svg text.sx-bt-cutword{fill:var(--color-text-secondary)}
.sx-svg .nm.fc{fill:var(--color-action-strong);font-weight:500}
.sx-bt .sx-cursor-rule{stroke:var(--color-rule-hover);stroke-width:1;shape-rendering:crispEdges}
.sx-bt-dot{fill:var(--color-text);stroke:var(--color-surface);stroke-width:1.5}
.sx-bt-dot.fc{fill:var(--color-action)}
.sx-bt-nums{margin:var(--space-2) 0 0;display:flex;flex-wrap:wrap;gap:2px 0;font-size:var(--fs-small);line-height:1.45;color:var(--color-text-secondary);font-variant-numeric:tabular-nums}
.sx-bt-nums .mi{display:inline;min-width:0}
.sx-bt-nums .mi+.mi::before{margin:0 var(--space-2)}
.sx-bt-sum,.sx-bt-enc{margin:0}
.sx-bt-all{display:flex;flex-direction:column;gap:var(--space-3)}
.sx-bt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--space-4)}
.sx-bt-mini{padding:var(--space-2) var(--space-3);border:1px solid transparent;border-radius:var(--radius-s);cursor:pointer;transition:background-color .12s,border-color .12s}
.sx-bt-mini:hover{border-color:var(--color-rule-hover)}
.sx-bt-mini:focus-visible{outline:2px solid var(--color-focus);outline-offset:1px}
.sx-bt-mini.sx-selected{background:var(--color-selected);border-color:var(--color-selected-rule)}
.sx-bt-mini .sx-title{margin:0 0 var(--space-1);font-weight:600;color:var(--color-text)}
.sx-bt-mini .sx-bt-nums{font-size:var(--fs-micro);margin-top:var(--space-1);display:block}
.sx-bt-mini .sx-bt-nums .mi{display:block}
.sx-bt-mini .sx-bt-nums .mi+.mi::before{content:none}

/* ---------- CONSORT flow ---------- */
.sx-consort{display:flex;flex-direction:column;min-width:0;container-type:inline-size}
.sx-consort>.sx-title{margin-bottom:var(--space-3)}
.sx-cs-box{border:1px solid var(--color-rule);border-radius:var(--radius-s);background:var(--color-surface);padding:var(--space-2) var(--space-3);min-width:0}
.sx-cs-l{margin:0;font-size:var(--fs-small);line-height:1.35;color:var(--color-text-secondary)}
.sx-cs-n{margin:2px 0 0;font-size:17px;font-weight:500;line-height:1.3;color:var(--color-text);font-variant-numeric:tabular-nums}
.sx-cs-n .u{font-size:var(--fs-small);font-weight:400;color:var(--color-text-muted)}
.sx-cs-sub{margin:2px 0 0;font-size:var(--fs-micro);line-height:1.4;color:var(--color-text-muted)}
.sx-cs-v{display:block;width:0;height:var(--space-4);margin:0 auto;border-left:1px solid var(--color-rule);flex:none}
.sx-cs-v.grow{flex:1;min-height:var(--space-4)}
.sx-cs-fork,.sx-cs-join{position:relative;height:var(--space-4);flex:none}
.sx-cs-fork::before,.sx-cs-join::before{content:"";position:absolute;left:25%;right:25%;border-top:1px solid var(--color-rule)}
.sx-cs-fork::before{top:var(--space-2)}
.sx-cs-join::before{bottom:var(--space-2)}
.sx-cs-fork::after,.sx-cs-join::after{content:"";position:absolute;left:50%;height:var(--space-2);border-left:1px solid var(--color-rule)}
.sx-cs-fork::after{top:0}
.sx-cs-join::after{bottom:0}
.sx-cs-fork i,.sx-cs-join i{position:absolute;height:var(--space-2);border-left:1px solid var(--color-rule)}
.sx-cs-fork i{top:var(--space-2)}
.sx-cs-join i{bottom:var(--space-2)}
.sx-cs-fork i:first-child,.sx-cs-join i:first-child{left:25%}
.sx-cs-fork i:last-child,.sx-cs-join i:last-child{left:75%}
.sx-cs-arms{display:grid;grid-template-columns:1fr 1fr}
.sx-cs-col{display:flex;flex-direction:column;padding:0 var(--space-1);min-width:0}
.sx-cs-hold{background:var(--color-surface-subtle)}
.sx-cs-ex{background:var(--color-surface-subtle)}
.sx-cs-why{list-style:none;margin:var(--space-1) 0 0;padding:var(--space-1) 0 0;border-top:1px solid var(--color-rule-soft);display:grid;gap:2px;font-size:var(--fs-micro);line-height:1.4;color:var(--color-text-secondary)}
.sx-cs-why li{display:flex;justify-content:space-between;gap:var(--space-2)}
.sx-cs-why li span:first-child{min-width:0}
.sx-cs-why .num{color:var(--color-text);font-weight:500}
.sx-cs-ans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2)}
.sx-cs-an{border:1px solid var(--color-rule);border-radius:var(--radius-s);padding:var(--space-2) var(--space-3);min-width:0}
.sx-cs-an .sx-cs-n{font-size:var(--fs-reading)}
.sx-cs-an .sx-cs-n .u{display:none}
.sx-cs-check{margin:var(--space-3) 0 0;font-size:var(--fs-micro);line-height:1.45;color:var(--color-text-muted)}
.sx-cs-check .word{font-size:var(--fs-micro)}
/* rail width: the treated arm gets 60 % (it carries the reasons), the held-out arm 40 %; analysed counts become a list */
@container (max-width:339px){
  .sx-cs-arms{grid-template-columns:3fr 2fr}
  .sx-cs-fork::before,.sx-cs-join::before{left:30%;right:20%}
  .sx-cs-fork i:first-child,.sx-cs-join i:first-child{left:30%}
  .sx-cs-fork i:last-child,.sx-cs-join i:last-child{left:80%}
  .sx-cs-box{padding:6px var(--space-2)}
  .sx-cs-col{padding:0 2px}
  .sx-cs-n{font-size:var(--fs-reading)}
  .sx-cs-ans{grid-template-columns:1fr}
  .sx-cs-an{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 var(--space-2);align-items:baseline;padding:6px var(--space-2)}
  .sx-cs-an .sx-cs-n .u{display:inline}
  .sx-cs-an .sx-cs-sub{grid-column:1/-1}
}

/* ---------- reliability diagram ---------- */
.sx-rel .sx-diag{stroke:var(--color-rule-hover);stroke-width:1}
.sx-rel .sx-rel-wh{stroke:var(--color-action);stroke-width:1.5;shape-rendering:crispEdges}
.sx-rel .sx-rel-dot{fill:var(--color-action);stroke:var(--color-surface);stroke-width:1.5;transition:fill .12s}
.sx-rel .thin .sx-rel-dot{fill:var(--color-surface);stroke:var(--color-action);stroke-width:1.75}
.sx-rel .thin .sx-rel-wh{stroke-dasharray:2 2}
.sx-rel .has-on .sx-rel-bin:not(:has(.on)){opacity:.4}
.sx-rel .sx-rel-dot.on{fill:var(--color-action-strong);stroke:var(--color-action-strong)}
.sx-rel .thin .sx-rel-dot.on{fill:var(--color-surface)}
.sx-rel .sx-hit{cursor:pointer}
.sx-svg .sx-rel-n{fill:var(--color-text-secondary);font-variant-numeric:tabular-nums}
.sx-svg .sx-rel-diag{fill:var(--color-text-muted);paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}

/* ---------- coefficient table ---------- */
.sx-rel-note{margin:var(--space-1) 0 0}
.sx-coef{display:flex;flex-direction:column}
.sx-coef .sx-mnote{margin-bottom:var(--space-2)}
.sx-coef td.sx-c-sig{min-width:0}
.sx-co-t{font-weight:600;line-height:1.35}
.sx-co-sub{font-size:var(--fs-micro);line-height:1.4;color:var(--color-text-muted);font-weight:400;margin-top:2px}
.sx-co-or{font-weight:500;line-height:1.35;white-space:nowrap}
.sx-co-dir{font-size:var(--fs-small);color:var(--color-text-secondary);white-space:nowrap}
.sx-sbar{display:inline-block;position:relative;width:88px;height:8px;border-radius:4px;background:var(--color-surface-sunken);vertical-align:middle;margin-right:var(--space-2);overflow:hidden}
.sx-sbar .z{position:absolute;left:50%;top:0;bottom:0;width:1px;margin-left:-.5px;background:var(--color-text-muted);z-index:1}
.sx-sbar .f{position:absolute;top:0;bottom:0;background:var(--color-action)}
.sx-sbar .f.neg{background:var(--color-action-soft)}
.sx-sbar.unclear .f{background:var(--color-track)}
@container (max-width:479px){
  .sx-coef-table,.sx-coef-table tbody{display:block}
  .sx-coef-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px var(--space-4);padding:var(--space-3) 0;border-bottom:1px solid var(--color-rule-soft)}
  .sx-coef-table tbody tr:last-child{border-bottom:0}
  .sx-coef-table td{display:block;padding:0;border:0}
  .sx-coef-table td.sx-c-sig,.sx-coef-table td.sx-c-dir{grid-column:1/-1}
  .sx-coef-table td[data-label]:not(.sx-c-sig):not(.sx-c-dir)::before{content:attr(data-label);display:block;font-size:var(--fs-micro);line-height:1.3;color:var(--color-text-muted);font-weight:400}
}

/* ---------- gate tile ---------- */
.sx-gates{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--space-4)}
.sx-gate{border:1px solid var(--color-rule);border-radius:var(--radius-m);background:var(--color-surface);padding:var(--space-3) var(--space-4);min-width:0}
.sx-gate.fail{border-color:var(--color-danger-rule);background:var(--color-danger-bg)}
.sx-gate>summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-1) var(--space-3);align-items:baseline;border-radius:var(--radius-s)}
.sx-gate>summary::-webkit-details-marker{display:none}
.sx-gate.flat>summary{cursor:default}
.sx-gate-l{font-size:var(--fs-body);font-weight:600;line-height:1.35;min-width:0}
.sx-gate .word{font-size:var(--fs-small)}
.sx-gate-vals{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:0 var(--space-3);font-size:var(--fs-small);color:var(--color-text-secondary);font-variant-numeric:tabular-nums}
.sx-gate-v .k{color:var(--color-text-muted)}
.sx-gate-g{grid-column:1/-1;font-size:var(--fs-micro);color:var(--color-text-muted)}
.sx-gate-detail{margin:var(--space-2) 0 0;padding-top:var(--space-2);border-top:1px solid var(--color-rule-soft);font-size:var(--fs-small);line-height:1.45;color:var(--color-text-secondary)}
.sx-gate.fail .sx-gate-detail{border-top-color:var(--color-danger-rule)}

/* ---------- filter row ---------- */
.sx-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--space-2) var(--space-4)}
.sx-filter{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0}
.sx-filter-l{font-size:var(--fs-micro);line-height:1.2;color:var(--color-text-muted)}
.sx-filter .select{min-height:var(--control-h-sm);min-width:112px;max-width:100%;font-size:var(--fs-small);padding:3px 28px 3px 8px;text-align:left}
.sx-filter .select.narrow{border-color:var(--color-action);box-shadow:inset 0 0 0 1px var(--color-action);font-weight:600}
.sx-fmulti{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.sx-fpop{position:absolute;z-index:40;top:calc(100% + 4px);left:0;width:min(280px,calc(100vw - 32px));box-shadow:var(--shadow-pop);padding:var(--space-3) var(--space-4)}
.sx-fpop-head{display:flex;align-items:center;gap:var(--space-3);font-size:var(--fs-micro);margin-bottom:var(--space-2)}
.sx-fpop-head .cap{color:var(--color-text-muted);margin-right:auto}
.sx-fpop-list{display:grid;gap:2px;max-height:280px;overflow:auto}
.sx-fpop-list .check{font-size:var(--fs-small);display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:var(--space-2)}
.sx-fpop-list .check .n{font-size:var(--fs-micro);color:var(--color-text-muted);font-variant-numeric:tabular-nums}
.sx-filters-clear{align-self:flex-end;min-height:var(--control-h-sm);display:inline-flex;align-items:center}
@media (max-width:700px){
  .sx-filter{flex:1 1 calc(50% - var(--space-4))}
  .sx-filter .select{width:100%}
}

/* =====================================================================
   The Sentinel set of composition D (shell-ext2.js section 12, 20 Oct 2026):
   S.field · S.fan · S.info · S.window · S.chips · S.weightTrail · S.acf ·
   S.measure(p, lo, hi, line). Ported from front/sketches/make_sketches.py
   (CSS .sk-svg, .sk-meas) and make_sketch_d.py (CSS2: .i, .pop, .chip, .dlg).
   One hue; red only on a stake day outside the 99 % range, named in words.
   ===================================================================== */
.sx-svg .sx-grid{stroke:var(--color-rule-soft);stroke-width:1;shape-rendering:crispEdges}
.sx-svg text.sx-halo{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}
.sx-method{color:var(--color-text-muted);font-size:var(--fs-micro);font-weight:400}
.sx-title .sx-i-link,.sx-title .i{margin-left:2px}
.sx-field-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px var(--space-3)}
.sx-field-title[hidden]{display:none}

/* ---------- the field ---------- */
.sx-field .sx-fd-base{stroke:var(--color-rule-hover);stroke-width:1;stroke-dasharray:2 3}
.sx-field .sx-fd-line{fill:none;stroke:var(--color-text);stroke-width:1.2;stroke-dasharray:4 3}
.sx-svg text.sx-zone{font-size:var(--fs-small);font-weight:600;fill:var(--color-text-secondary)}
.sx-svg text.sx-fd-lw{fill:var(--color-text-secondary)}
.sx-field .sx-fd-rug{stroke:var(--color-track);stroke-width:1;fill:none}
.sx-field .sx-fd-dot{fill:var(--color-action-soft);stroke:var(--color-surface);stroke-width:.75}
.sx-field .sx-fd-dot.strong{fill:var(--color-action)}
.sx-field .sx-fd-dot.sel{stroke:var(--color-text);stroke-width:2}
/* whiskers under the dots: thinner and lighter than any dot, so the dots read first (polish 20 Oct 2026) */
.sx-field .sx-fd-wh{stroke:var(--color-action);stroke-width:.8;opacity:.35}
.sx-field .sx-fd-cur{fill:none;stroke:var(--color-focus);stroke-width:2;pointer-events:none}
.sx-svg text.sx-fd-name{fill:var(--color-text);font-weight:600}
.sx-field-svg{cursor:pointer}

/* ---------- the stake fan ---------- */
.sx-fan-ctl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-2) var(--space-4);margin:0 0 var(--space-2)}
.sx-fan-cap{margin:0;font-size:var(--fs-small);line-height:1.45;color:var(--color-text-muted);min-width:0;flex:1 1 280px}
.sx-fan-cap .sx-sep{color:var(--color-text-muted)}
.sx-fan .seg button.sx-off{color:var(--color-text-muted);font-weight:400;cursor:not-allowed;background:var(--color-surface-subtle)}
.sx-fan .seg button.sx-off:hover{background:var(--color-surface-subtle);color:var(--color-text-muted)}
.sx-fan .sx-fan-cone{fill:var(--color-surface-sunken)}
.sx-fan .sx-fan-dyn{fill:none;stroke:var(--color-action-soft);stroke-width:1.2}
.sx-fan .sx-fan-mean{fill:none;stroke:var(--color-action);stroke-width:1.2}
.sx-fan .sx-fan-fc{fill:var(--color-band)}
.sx-fan .sx-fan-pt{fill:var(--color-action)}
.sx-fan .sx-fan-pt.out{fill:var(--color-danger)}
.sx-fan .sx-fan-brk{stroke:var(--color-text);stroke-width:1;stroke-dasharray:3 3}
.sx-fan .sx-fan-ring{fill:none;stroke:var(--color-focus);stroke-width:2}
.sx-fan .sx-cursor-rule,.sx-wt .sx-cursor-rule{stroke:var(--color-rule-hover);stroke-width:1;shape-rendering:crispEdges}

/* ---------- the info mark and its popover ---------- */
.i{appearance:none;-webkit-appearance:none;position:relative;display:inline-grid;place-items:center;width:16px;height:16px;padding:0;margin:0;border-radius:50%;border:1px solid var(--color-control-border);color:var(--color-text-muted);background:var(--color-surface);cursor:pointer;flex:none;vertical-align:-3px;font:inherit;line-height:1}
.i::after{content:"";position:absolute;inset:-5px;border-radius:50%}
.i svg{width:10px;height:10px;fill:currentColor;display:block}
.i:hover{color:var(--color-action);border-color:var(--color-action)}
.i[aria-expanded=true]{background:var(--color-action);border-color:var(--color-action);color:var(--color-text-inverse)}
/* inside a kit table head the sort-button rule (.table thead th button, with its arrow ::after) must not restyle the mark */
.table thead th button.i{display:inline-grid;width:16px;height:16px;min-height:0;padding:0;border:1px solid var(--color-control-border);border-radius:50%;background:var(--color-surface);color:var(--color-text-muted);text-transform:none;letter-spacing:0;vertical-align:-3px}
.table thead th button.i:hover{color:var(--color-action);border-color:var(--color-action)}
.table thead th button.i[aria-expanded=true]{background:var(--color-action);border-color:var(--color-action);color:var(--color-text-inverse)}
.table thead th button.i::after,.table thead th button.sx-i-link::after{content:"";position:absolute;inset:-5px;width:auto;height:auto;border:0;border-radius:50%;opacity:0;transform:none}
.table thead th button.sx-i-link{display:inline;min-height:0;color:var(--color-link);text-transform:none;letter-spacing:0;font-weight:400;font-size:var(--fs-small);text-decoration:underline dotted;text-underline-offset:3px;position:relative}
.sx-i-link{appearance:none;-webkit-appearance:none;border:0;background:none;margin:0;padding:0;font:inherit;font-size:var(--fs-small);color:var(--color-link);cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px;text-decoration-thickness:1px;border-radius:2px;white-space:nowrap}
.sx-i-link:hover,.sx-i-link[aria-expanded=true]{text-decoration-style:solid;color:var(--color-action-strong)}
@media (max-width:480px){.sx-i-link{white-space:normal}}   /* a long link label ("why fewer offers since the review") wraps at phone width instead of overflowing (render R2 on Today at 390 px, 21 Oct) */
.pop{position:absolute;z-index:40;width:max-content;max-width:330px;background:var(--color-surface);border:1px solid var(--color-rule);border-radius:var(--radius-m);box-shadow:var(--shadow-pop);padding:12px 14px;font-size:var(--fs-small);line-height:1.45;color:var(--color-text);text-align:left;font-weight:400;letter-spacing:0;text-transform:none;white-space:normal}
.pop[hidden]{display:none}
.pop:focus{outline:none}
.pop:focus-visible{outline:2px solid var(--color-focus);outline-offset:2px}
.pop h4{font-size:var(--fs-small);font-weight:700;margin:0 0 4px}
.pop p{margin:0}
.pop p+p{margin-top:6px}
.pop .k{color:var(--color-text-muted)}

/* ---------- the player window ---------- */
dialog.sx-win{border:0;padding:0;margin:36px auto auto;width:800px;max-width:calc(100vw - 32px);max-height:calc(100vh - 72px);background:var(--color-surface);border-radius:var(--radius-l);box-shadow:var(--shadow-dialog);color:var(--color-text);overflow:auto;overscroll-behavior:contain}
dialog.sx-win::backdrop{background:var(--scrim,#1c273344)}
dialog.sx-win:focus{outline:none}
.sx-win-panel{padding:20px 24px 22px}
.sx-win-top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4)}
.sx-win-id{min-width:0}
.sx-win-title{font-size:var(--fs-section);line-height:1.3;font-weight:700;margin:0}
.sx-win-sub{font-size:var(--fs-small);font-weight:400;color:var(--color-text-muted);margin-left:var(--space-2)}
.sx-win-head{margin-top:6px}
.sx-win-head[hidden]{display:none}
.sx-win-x{appearance:none;border:0;background:var(--color-surface-sunken);width:30px;height:30px;border-radius:50%;font-size:17px;line-height:1;cursor:pointer;flex:none;color:var(--color-text);display:grid;place-items:center}
.sx-win-x:hover{background:var(--color-selected)}
.sx-win-tabs{display:flex;gap:2px;margin:14px 0 12px;box-shadow:inset 0 -1px 0 var(--color-rule);overflow-x:auto;scrollbar-width:none}
.sx-win-tabs::-webkit-scrollbar{display:none}
.sx-win-tabs[hidden]{display:none}
.sx-win-tab{appearance:none;border:0;background:none;padding:6px 10px 8px;font:inherit;font-size:var(--fs-small);color:var(--color-text-secondary);cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent;flex:none}
.sx-win-tab:hover{color:var(--color-text)}
.sx-win-tab[aria-selected=true]{color:var(--color-text);font-weight:700;border-bottom-color:var(--color-action)}
.sx-win-tab:focus-visible{outline:2px solid var(--color-focus);outline-offset:-2px}
.sx-win-pane{min-width:0;display:flex;flex-direction:column;gap:var(--space-3)}
.sx-win-pane[hidden]{display:none}
.sx-win-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--space-2) var(--space-4);margin-top:14px;font-size:var(--fs-small);color:var(--color-text-muted)}
/* the big chance of a card or the window head, and the line beside it */
.sx-big{font-size:28px;font-weight:600;letter-spacing:-.4px;line-height:1.1;font-variant-numeric:tabular-nums;white-space:nowrap}
.sx-big small{font-size:var(--fs-small);font-weight:400;color:var(--color-text-muted);letter-spacing:0;margin-left:6px;white-space:normal}
.sx-row{display:flex;flex-wrap:wrap;gap:4px var(--space-3);align-items:baseline}
@media (max-width:600px){
  dialog.sx-win{margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
  .sx-win-panel{padding:16px 16px 20px}
  .sx-win-sub{display:block;margin-left:0}
  .sx-big{white-space:normal}
}

/* ---------- detector chips ---------- */
.sx-chips{container-type:inline-size;min-width:0}
.sx-chips-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
.sx-chips.c4 .sx-chips-g{grid-template-columns:repeat(4,minmax(0,1fr))}
@container (max-width:520px){.sx-chips.c4 .sx-chips-g{grid-template-columns:repeat(2,minmax(0,1fr))}}
.sx-dchip{border:1px solid var(--color-rule);border-radius:var(--radius-s);padding:6px 8px;font-size:var(--fs-small);line-height:1.35;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;align-items:center;align-content:start;background:var(--color-surface)}
.sx-dchip .n{color:var(--color-text-secondary);min-width:0}
.sx-dchip .v{font-weight:600;font-variant-numeric:tabular-nums;text-align:right;color:var(--color-text)}
.sx-dchip .bar{grid-column:1/-1;position:relative;height:4px;border-radius:2px;background:var(--color-surface-sunken);margin-top:1px}
.sx-dchip .bar i{position:absolute;top:0;bottom:0;border-radius:2px;background:var(--color-action)}
.sx-dchip .bar i.neg{background:var(--color-action-soft)}
.sx-dchip .bar b{position:absolute;top:-2px;bottom:-2px;left:50%;width:1px;background:var(--color-rule-hover)}
.sx-dchip .m{grid-column:1/-1;font-size:var(--fs-micro);line-height:1.4;color:var(--color-text-muted)}
.sx-dchip.off{border-style:dashed;background:none}
.sx-dchip.off .n,.sx-dchip.off .v{color:var(--color-text-muted);font-weight:400}

/* ---------- the weight walk ---------- */
.sx-wt .sx-wt-ln{fill:none;stroke:var(--color-action);stroke-linejoin:round;stroke-linecap:round}
.sx-wt .sx-wt-eq{stroke:var(--color-rule-hover);stroke-width:1;stroke-dasharray:2 3}
.sx-wt .sx-wt-tk{fill:none;stroke-width:1;shape-rendering:crispEdges}
.sx-wt .sx-wt-tk.confirmed{stroke:var(--color-action)}
.sx-wt .sx-wt-tk.cleared{stroke:var(--color-track)}
.sx-wt .sx-wt-tk.refit,.sx-wt .sx-wt-tk.other{stroke:var(--color-text)}
.sx-wt .sx-wt-dot{fill:var(--color-action);stroke:var(--color-surface);stroke-width:1.5}
.sx-svg text.sx-wt-end{fill:var(--color-text-secondary)}
.sx-svg text.sx-wt-end.heavy{fill:var(--color-text);font-weight:600}
.sx-svg text.sx-wt-end .fig{fill:var(--color-text);font-weight:600}

/* ---------- the residual drawer ---------- */
.sx-acf{display:flex;flex-direction:column;gap:var(--space-4);min-width:0}
.sx-acf-lb,.sx-acf-gh{margin:0;font-size:var(--fs-body);line-height:1.45}
.sx-acf-v{font-weight:600}
.sx-acf .sx-acf-bar{fill:var(--color-action-soft);transition:opacity .12s}
.sx-acf .sx-acf-bar.out{fill:var(--color-action)}
.sx-acf .has-on .sx-acf-bar:not(.on){opacity:.45}
.sx-acf .sx-acf-band{stroke:var(--color-text-muted);stroke-width:1;stroke-dasharray:3 3}
.sx-acf-cands .sx-title{margin-bottom:var(--space-1)}
.sx-acf-table td{font-size:var(--fs-small)}
.sx-acf-table tr.sx-selected td{background:var(--color-selected)}
.sx-acf-sub{display:block;color:var(--color-text-muted);font-size:var(--fs-micro);line-height:1.4}
.sx-acf-chosen{margin-left:var(--space-2);font-weight:600;color:var(--color-action-strong)}
.sx-acf-ck{list-style:none;margin:var(--space-2) 0 0;padding:0;display:flex;flex-wrap:wrap;gap:4px var(--space-4);font-size:var(--fs-small)}
.sx-acf-ck li{display:inline-flex;align-items:baseline;gap:6px;color:var(--color-text-secondary)}
.sx-acf-ck .mk{font-weight:700;width:1ch;text-align:center}
.sx-acf-ck li.ok .mk{color:var(--color-action)}
.sx-acf-ck li.no{color:var(--color-text-muted)}
.sx-acf-gate{margin:var(--space-2) 0 0;font-size:var(--fs-small);color:var(--color-text-secondary)}

/* ---------- the bounded chance measure (S.measure with a number first) ---------- */
.sx-cm{display:grid;grid-template-columns:minmax(0,1fr) var(--sx-cm-v,54px);gap:6px;align-items:center;min-width:120px}
.sx-cm.none{display:inline;min-width:0;color:var(--color-text-muted)}
.sx-cm .trk{position:relative;height:8px;border-radius:4px;background:var(--color-surface-sunken)}
.sx-cm .trk i{position:absolute;display:block}
.sx-cm .b{top:0;bottom:0;background:var(--color-band);border-radius:4px}
.sx-cm .ln{top:-3px;width:1px;height:14px;margin-left:-.5px;background:var(--color-text)}
.sx-cm .p{top:-2px;width:3px;height:12px;margin-left:-1.5px;background:var(--color-action);border-radius:1px}
.sx-cm .v{font-variant-numeric:tabular-nums;font-weight:600;text-align:right;font-size:var(--fs-body);white-space:nowrap}
