/* ==========================================================================
   /stats and /stats/archive — Terminal Light (design_handoff_terminal_light
   "4. Stats", prototype "Stats Terminal Light.dc.html"). Needs tl/tokens.css
   and tl/components.css. Every colour is a token; alphas the token set does
   not name are written as rgba(var(--tl-ink-rgb), a) so dark mode follows.
   ========================================================================== */

.shx { --shx-face: var(--tl-fill-07); }
.shx .shx-spacer { flex: 1; }
.shx button { font-family: var(--tl-font); }
.shx img { background: transparent; }

/* ---------- Toolbar: scope | categories | Advanced SOON | coverage ---------- */
.shx-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
.shx-vrule { width: 1px; height: 20px; flex: none; background: var(--tl-line-10); }
.shx-cats { display: flex; gap: 6px; min-width: 0; }
.shx-cats[hidden] { display: none; }
.shx-cats .tl-chip { margin: 0; }
.shx-adv.tl-chip { gap: 6px; padding: 0 11px; margin: 0; background: transparent; color: var(--tl-ink-50); }
.shx-adv.tl-chip:hover { color: var(--tl-ink-70); }
.shx-cov { font-size: 12.5px; color: var(--tl-ink-50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shx .tl-seg > button { margin: 0; }

/* ---------- Leader (5) + Chase (7) ---------- */
.shx-lead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; margin-bottom: 14px; }
.shx-leader, .shx-chase-card { display: flex; flex-direction: column; }
.shx-leader .tl-card-sub { white-space: normal; }
.shx-back {
  height: auto; padding: 0; border: 0; background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--tl-ink-60); white-space: nowrap;
}
.shx-back:hover { color: var(--tl-ink); }
.shx-feature {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding: 22px 22px 20px; transition: opacity 0.25s;
}
.shx-feature.is-fading { opacity: 0.2; }
.shx-feat-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.shx-feat-id { min-width: 0; }
.shx-feat-kicker {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
  font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.5px; color: var(--tl-ink-55);
  text-transform: uppercase;
}
.shx-feat-kicker > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shx-feat-name { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.15; color: var(--tl-ink); }
.shx-feat-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.shx-feat-pos { margin-top: 3px; font-family: var(--tl-mono); font-size: 11px; color: var(--tl-ink-50); text-transform: uppercase; }
.shx-feat-valrow { display: flex; align-items: baseline; gap: 8px; }
.shx-feat-val { font-size: 56px; font-weight: 300; letter-spacing: -2.2px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--tl-ink); }
.shx-feat-unit { font-size: 14px; color: var(--tl-ink-50); }
.shx-feat-mini { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 14px; border-top: 1px solid var(--tl-line-06); }
.shx-feat-mini .k { margin-bottom: 3px; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px; color: var(--tl-ink-50); }
.shx-feat-mini .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tl-ink); }
.shx-feat-foot { display: flex; align-items: center; gap: 10px; margin-top: -4px; font-size: 12px; color: var(--tl-ink-50); min-width: 0; }
.shx-feat-pctl { font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px; color: var(--tl-ink-50); text-transform: uppercase; white-space: nowrap; }
.shx-spark { display: inline-flex; align-items: center; gap: 6px; }
.shx-spark[hidden] { display: none; }
.shx-spark svg { width: 56px; height: 16px; overflow: visible; }
.shx-spark polyline { fill: none; stroke: var(--tl-ink-60); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.shx-spark-cap { font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-45); }
.shx-link { font-size: 12.5px; color: var(--tl-ink-60); white-space: nowrap; }
.shx-link:hover { color: var(--tl-ink); }

/* Round faces: portrait, logo (teams) or mono initials */
.shx-face {
  flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 50%; background: var(--shx-face); box-shadow: 0 0 0 1px var(--tl-line-08);
  font-family: var(--tl-mono); color: var(--tl-ink-55); line-height: 1;
}
.shx-face > img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.shx-face.is-logo { background: var(--tl-control); }
.shx-face.is-logo > img { width: 64%; height: 64%; object-fit: contain; }
.shx-face.is-76 { width: 76px; height: 76px; font-size: 21px; }
.shx-face.is-40 { width: 40px; height: 40px; font-size: 11px; }
.shx-face.is-26 { width: 26px; height: 26px; font-size: 7px; }
img.shx-crest, span.shx-crest { flex: none; display: inline-block; object-fit: contain; background: transparent; }
span.shx-crest { width: 14px; height: 14px; }
.shx-skel-face { width: 76px; height: 76px; border-radius: 50%; flex: none; }
.shx-skel-chase { width: 40px; height: 40px; border-radius: 50%; }

/* Chase rows */
.shx-chase { flex: 1; display: flex; flex-direction: column; }
.shx-chase-row {
  flex: 1; display: grid; grid-template-columns: 26px 40px minmax(0, 1fr) 1.2fr 64px; align-items: center; gap: 14px;
  width: 100%; margin: 0; padding: 10px 18px; border: 0; border-top: 1px solid var(--tl-line-06); border-radius: 0;
  background: transparent; color: var(--tl-ink); text-align: left; cursor: pointer;
  transition: background 0.2s var(--tl-ease);
}
button.shx-chase-row:hover { background: var(--tl-fill-03); }
.shx-chase-row.is-skel { cursor: default; }
.shx-chase-rk { font-family: var(--tl-mono); font-size: 12.5px; color: var(--tl-ink-40); }
.shx-chase-main { min-width: 0; }
.shx-chase-name { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shx-chase-sub, .shx-wname-sub {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-50); text-transform: uppercase;
}
.shx-chase-sub > span:last-child, .shx-wname-sub > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shx-gapbar { display: block; height: 5px; border-radius: 4px; background: var(--tl-line-07); overflow: hidden; }
.shx-gapbar > i { display: block; height: 100%; border-radius: 4px; background: var(--tl-ink); transition: width 0.6s var(--tl-ease); }
.shx-chase-right { text-align: right; }
.shx-chase-val { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.shx-chase-gap { font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-down); }

/* ---------- Workbench: rail (240) + leaderboard ---------- */
.shx-wb { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; scroll-margin-top: calc(var(--tl-topbar-h) + 12px); }
.shx-rail { padding: 6px 0 12px; }
.shx-rail-title { padding: 12px 16px 10px; border-bottom: 1px solid var(--tl-line-06); background: var(--tl-card-head); font-size: 15px; font-weight: 650; letter-spacing: -0.2px; }
.shx-rail-sub { padding: 0 16px 10px; font-size: 12px; color: var(--tl-ink-50); }
.shx-group { padding: 12px 16px; border-top: 1px solid var(--tl-line-06); }
.shx-glabel { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.5px; color: var(--tl-ink-50); }
.shx-opts { display: flex; flex-wrap: wrap; gap: 5px; }
.shx-opt {
  height: 26px; margin: 0; padding: 0 9px; display: inline-flex; align-items: center;
  border-radius: var(--tl-r-pill); border: 1px solid var(--tl-line-10);
  background: var(--tl-control); color: var(--tl-ink-70);
  font-size: 12px; font-weight: 400; line-height: 1; white-space: nowrap; cursor: pointer;
}
.shx-opt:hover { color: var(--tl-ink); border-color: var(--tl-line-18); }
.shx-opt[aria-pressed="true"] { border-color: var(--tl-ink); background: var(--tl-ink); color: var(--tl-on-ink); }
.shx-opt[aria-disabled="true"] { background: transparent; color: var(--tl-ink-35); border-style: dashed; cursor: not-allowed; }
.shx-opts.is-grid3 > .shx-opt { flex: 0 0 calc((100% - 10px) / 3); justify-content: center; }
/* "All seasons (back to 2004)": a centred text button under the season grid */
.shx-more {
  display: flex; justify-content: center; width: 100%; height: auto; margin: 9px 0 0; padding: 0; border: 0; background: transparent;
  font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--tl-ink-60); cursor: pointer;
}
.shx-more:hover { color: var(--tl-ink); }
.shx-more[hidden] { display: none; }
/* "More splits" PRO chip */
.shx-moresplits-wrap { margin-top: 5px; }
.shx-moresplits {
  height: 26px; margin: 0; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--tl-r-pill); border: 1px dashed var(--tl-line-20); background: transparent;
  font-size: 12px; color: var(--tl-ink-60); white-space: nowrap; cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
.shx-moresplits:hover { border-color: rgba(var(--tl-ink-rgb), 0.4); color: var(--tl-ink); }
.shx-moresplits .si-tag-pro { font-size: 8.5px; padding: 1px 4px; border-radius: 3px; background: transparent; }
/* MIN. ATTEMPTS stepper: [−][input][+] */
.shx-group[hidden] { display: none; }
label.shx-glabel { cursor: default; }
.shx-step {
  display: flex; align-items: center; height: 30px; overflow: hidden;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-10); background: var(--tl-control);
}
.shx-step-btn {
  width: 32px; height: 100%; margin: 0; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 0; background: transparent; color: var(--tl-ink-60); font-size: 15px; line-height: 1; cursor: pointer;
}
.shx-step-btn:first-child { border-right: 1px solid var(--tl-line-07); }
.shx-step-btn:last-child { border-left: 1px solid var(--tl-line-07); }
.shx-step-btn:hover { background: var(--tl-fill-04); color: var(--tl-ink); }
.shx-step input {
  flex: 1; min-width: 0; height: 100% !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; outline: none !important; box-shadow: none !important; background: transparent !important;
  text-align: center; font: 600 12px var(--tl-mono) !important; color: var(--tl-ink) !important;
  -moz-appearance: textfield; appearance: textfield;
}
.shx-step input::-webkit-outer-spin-button, .shx-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shx-step input::placeholder { color: var(--tl-ink-55); font-weight: 500; }
.shx-step:focus-within { border-color: rgba(var(--tl-ink-rgb), 0.32); box-shadow: 0 0 0 3px var(--tl-fill-07); }
/* Screener entry card at the bottom of the rail */
.shx-scrcard { margin: 4px 12px 6px; }
.shx-cap { margin-top: 7px; font-size: 11.5px; line-height: 1.45; color: var(--tl-ink-50); }
.shx-cap:empty { display: none; }
.shx-saved-list .shx-cap { margin-top: 0; }
.shx-saved-item { display: inline-flex; align-items: center; }
.shx-saved-item .shx-opt { border-top-right-radius: 0; border-bottom-right-radius: 0; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.shx-saved-x {
  height: 26px; margin: 0; padding: 0 7px; border: 1px solid var(--tl-line-10); border-left: 0; border-radius: 0 var(--tl-r-pill) var(--tl-r-pill) 0;
  background: var(--tl-control); color: var(--tl-ink-45); font-size: 13px; line-height: 1; cursor: pointer;
}
.shx-saved-x:hover { color: var(--tl-down); }
.shx-savewrap { padding: 4px 16px 0; }
.shx-savebtn {
  width: 100%; height: 30px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tl-r-chip); border: 1px dashed var(--tl-line-18); background: transparent;
  font-size: 12.5px; color: var(--tl-ink-55); cursor: pointer;
}
.shx-savebtn:hover { color: var(--tl-ink); border-color: var(--tl-ink-35); }

/* Leaderboard card. overflow: clip (not hidden) so the compare bar can stick to the viewport. */
.shx-board.tl-card { overflow: clip; }
.shx-board-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--tl-line-06); background: var(--tl-card-head); min-width: 0; }
.shx-board-head .tl-card-sub { min-width: 0; }
.shx-search {
  width: 210px; height: 30px; margin: 0; padding: 0 8px 0 10px; display: inline-flex; align-items: center; gap: 8px; flex: none;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-10); background: var(--tl-control); color: var(--tl-ink-45);
  cursor: text; transition: border-color 150ms, box-shadow 150ms;
}
/* Focus shows on the wrapper only: never a black outline on the input. */
.shx-search:focus-within { border-color: rgba(var(--tl-ink-rgb), 0.32); box-shadow: 0 0 0 3px var(--tl-fill-07); }
.shx-search svg { flex: none; }
.shx-search input {
  flex: 1; min-width: 0; width: 100%; height: 100% !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important;
  -webkit-appearance: none; appearance: none; font: 400 12.5px var(--tl-font) !important; color: var(--tl-ink) !important;
}
.shx-search input::placeholder { color: var(--tl-ink-45); }
.shx-qx {
  width: 18px; height: 18px; margin: 0; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 4px; background: transparent; color: var(--tl-ink-50); font-size: 13px; line-height: 1; cursor: pointer;
}
.shx-qx:hover { background: var(--tl-fill-06); color: var(--tl-ink); }
.shx-qx[hidden] { display: none; }
.shx-addwrap { position: relative; flex: none; }
.shx-add {
  height: 30px; margin: 0; padding: 0 11px; display: inline-flex; align-items: center;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-12); background: var(--tl-control); color: var(--tl-ink);
  font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.shx-add:hover, .shx-add[aria-expanded="true"] { border-color: var(--tl-ink-35); }
.shx-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; padding: 6px;
  border-radius: var(--tl-r-card); background: var(--tl-card); box-shadow: var(--tl-float-shadow);
}
.shx-pop[hidden] { display: none; }
.shx-pop-item {
  width: 100%; margin: 0; padding: 8px 10px; display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: var(--tl-r-pill); background: transparent; color: var(--tl-ink);
  font-size: 12.5px; text-align: left; cursor: pointer;
}
button.shx-pop-item:hover, button.shx-pop-item:focus-visible { background: var(--tl-fill-05); }
.shx-pop-item.is-soon { color: var(--tl-ink-50); }
span.shx-pop-item { cursor: default; font-size: 12px; }
.shx-pop-check { width: 14px; flex: none; font-size: 11px; color: var(--tl-ink); }
.shx-pop-short { margin-left: auto; font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-45); }
.shx-pop-item .tl-soon { margin-left: auto; }

/* Notice + filter chips rows */
.shx-notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--tl-line-06); background: var(--tl-fill-03); font-size: 12.5px; color: var(--tl-ink-70); }
.shx-notice[hidden] { display: none; }
.shx-notice-tag { flex: none; font-family: var(--tl-mono); font-size: 9px; padding: 1px 4px; border-radius: var(--tl-r-tag); border: 1px solid var(--tl-line-20); color: var(--tl-ink-45); }
.shx-notice-tag.is-pro { border-color: var(--tl-pro-line); color: var(--tl-pro); }
.shx-notice-text { flex: 1; min-width: 0; }
.shx-x {
  width: 24px; height: 24px; margin: 0; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--tl-r-pill); background: transparent; color: var(--tl-ink-50); font-size: 16px; line-height: 1; cursor: pointer;
}
.shx-x:hover { background: var(--tl-fill-05); color: var(--tl-ink); }
.shx-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--tl-line-06); }
.shx-chips[hidden] { display: none; }
.shx-chips-label { margin-right: 4px; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.5px; color: var(--tl-ink-50); }
.shx-chip-x {
  height: 24px; margin: 0; padding: 0 6px 0 9px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--tl-r-pill); border: 1px solid var(--tl-line-10); background: var(--tl-control); color: var(--tl-ink);
  font-size: 12px; cursor: pointer;
}
.shx-chip-x i { font-style: normal; color: var(--tl-ink-45); }
.shx-chip-x:hover i { color: var(--tl-ink); }
.shx-reset { height: 24px; margin: 0 0 0 4px; padding: 0; border: 0; background: transparent; font-size: 12px; color: var(--tl-ink-55); cursor: pointer; }
.shx-reset:hover { color: var(--tl-ink); }

/* Table (div grid, role=table) */
.shx-table-wrap { overflow-x: auto; }
.shx-thead {
  display: grid; gap: 10px; align-items: center; padding: 9px 18px;
  background: var(--tl-fill-025); border-bottom: 1px solid var(--tl-line-06);
  font-size: 11.5px; font-weight: 500; color: var(--tl-ink-50);
}
.shx-th {
  height: auto; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  font-size: 11.5px; font-weight: 500; color: var(--tl-ink-50); text-align: right; white-space: nowrap;
}
.shx-th:hover { color: var(--tl-ink-75); }
.shx-th.is-on { color: var(--tl-ink); }
.shx-wrow {
  display: grid; gap: 10px; align-items: center; padding: 9px 18px;
  font-size: 13.5px; color: var(--tl-ink); cursor: pointer;
}
.shx-wrow + .shx-wrow { border-top: 1px solid var(--tl-line-05); }
.shx-wrow:hover { background: var(--tl-fill-03); }
.shx-wrow.is-sel { background: var(--tl-fill-045); }
.shx-wrow:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tl-ink) !important; }
.shx-cmp {
  width: 15px; height: 15px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tl-r-tag); border: 1.5px solid rgba(var(--tl-ink-rgb), 0.25); background: var(--tl-control);
  color: var(--tl-on-ink); font-size: 10px; line-height: 1; cursor: pointer;
}
.shx-cmp:hover { border-color: var(--tl-ink-60); }
.shx-cmp[aria-checked="true"] { border-color: var(--tl-ink); background: var(--tl-ink); }
.shx-wrk { font-family: var(--tl-mono); font-size: 12px; color: var(--tl-ink-40); }
.shx-wname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shx-wname-text { min-width: 0; }
.shx-wname-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-weight: 600; line-height: 1.25; text-wrap: pretty;
}
.shx-wname-sub { margin-top: 2px; font-size: 10px; white-space: nowrap; overflow: hidden; }
.shx-wname-sub .shx-crest { flex: none; }
.shx-wname-sub > .shx-wname-team { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shx-wname-sub > .shx-wname-pos { flex: none; color: var(--tl-ink-35); }
.shx-wname-sub > .shx-tag { flex: none; }
.shx-tag { flex: none; font-family: var(--tl-mono); font-size: 8.5px; font-weight: 400; padding: 1px 3px; border-radius: 3px; border: 1px solid var(--tl-line-20); color: var(--tl-ink-45); }
.shx-cell { text-align: right; font-family: var(--tl-mono); font-size: 12.5px; font-weight: 400; color: var(--tl-ink-65); white-space: nowrap; }
.shx-cell.is-sort { font-weight: 600; color: var(--tl-ink); }
.shx-cell.is-null { color: var(--tl-ink-35); }
.shx-cell.is-partial { text-decoration: underline dotted var(--tl-ink-35); text-underline-offset: 3px; }
.shx-skel-row { padding: 9px 18px; border-top: 1px solid var(--tl-line-05); }
.shx-skel-row .tl-skel { margin: 7px 0; }
.shx-foot { margin: 0; padding: 11px 18px; border-top: 1px solid var(--tl-line-05); font-size: 11.5px; line-height: 1.5; color: var(--tl-ink-50); }
.shx-foot[hidden] { display: none; }

/* Scatter */
.shx-plot { position: relative; height: 380px; margin: 34px 24px 52px 56px; }
.shx-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--tl-line-07); }
.shx-ytick { position: absolute; right: calc(100% + 10px); transform: translateY(-50%); font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-45); white-space: nowrap; }
.shx-ylabel { position: absolute; left: -44px; top: -26px; font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-50); white-space: nowrap; }
.shx-xaxis { position: absolute; left: 0; right: 0; bottom: -22px; height: 14px; border-top: 0; }
.shx-xtick { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-50); white-space: nowrap; }
.shx-xlabel { position: absolute; right: 0; bottom: -40px; font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-50); white-space: nowrap; }
.shx-guide { position: absolute; pointer-events: none; }
.shx-guide.is-h { left: 0; right: 0; height: 0; border-top: 1px dashed var(--tl-line-18); }
.shx-guide.is-v { top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--tl-line-18); }
.shx-guide-label { position: absolute; pointer-events: none; font-family: var(--tl-mono); font-size: 9.5px; letter-spacing: 0.3px; color: var(--tl-ink-40); white-space: nowrap; }
.shx-guide-label.is-h { right: 0; transform: translateY(-120%); }
.shx-guide-label.is-v { top: 0; transform: translateX(4px); }
.shx-bgdot { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(var(--tl-ink-rgb), 0.12); pointer-events: none; }
.shx-dot {
  position: absolute; width: 7px; height: 7px; margin: 0; padding: 0; transform: translate(-50%, -50%);
  border: 0; border-radius: 50%; background: rgba(var(--tl-ink-rgb), 0.3); cursor: pointer;
}
.shx-dot:hover { background: var(--tl-ink); }
.shx-dot:focus-visible { box-shadow: var(--tl-focus-ring) !important; outline: none; }
.shx-dot.is-logo {
  width: 30px; height: 30px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-line-12), 0 2px 6px -2px rgba(var(--tl-ink-rgb), 0.2);
  transition: box-shadow 0.2s var(--tl-ease);
}
html:not(.si-light) .shx-dot.is-logo { background: var(--tl-card); }
.shx-dot.is-logo > img { width: 18px; height: 18px; object-fit: contain; pointer-events: none; }
.shx-dot.is-logo:hover { background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-ink-60), 0 4px 10px -4px rgba(var(--tl-ink-rgb), 0.3); }
.shx-dot.is-cmp { box-shadow: 0 0 0 1.5px var(--tl-ink), 0 2px 6px -2px rgba(var(--tl-ink-rgb), 0.2); }
.shx-dot.is-sel { z-index: 3; box-shadow: 0 0 0 2px var(--tl-ink), 0 2px 6px -2px rgba(var(--tl-ink-rgb), 0.2); }
.shx-dot-init { font-family: var(--tl-mono); font-size: 8px; color: var(--tl-ink-55); }
.shx-dot-label { position: absolute; font-size: 10.5px; font-weight: 500; line-height: 14px; color: var(--tl-ink-70); white-space: nowrap; pointer-events: none; }
.shx-dot.is-sel .shx-dot-label, .shx-dot.is-cmp .shx-dot-label { color: var(--tl-ink); font-weight: 650; }
.shx-dot-label.is-b { top: calc(100% + 3px); left: 50%; transform: translateX(-50%); }
.shx-dot-label.is-t { bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); }
.shx-dot-label.is-r { left: calc(100% + 5px); top: 50%; transform: translateY(-50%); }
.shx-dot-label.is-l { right: calc(100% + 5px); top: 50%; transform: translateY(-50%); }
.shx-tip { transform: translate(-50%, calc(-100% - 10px)); z-index: 30; }
.shx-tip.is-big { transform: translate(-50%, calc(-100% - 22px)); }
.shx-tip b { font-weight: 600; }

/* Field: horizontal bars */
.shx-field { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px 12px; }
.shx-frow {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 64px; gap: 12px; align-items: center;
  width: 100%; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--tl-ink);
  text-align: left; cursor: pointer;
}
.shx-frow:hover .shx-fname { color: var(--tl-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.shx-fname { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.shx-fname > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.shx-frow.is-sel .shx-fname { font-weight: 650; }
.shx-fbar { height: 18px; border-radius: 4px; background: var(--tl-fill-05); overflow: hidden; }
.shx-fbar > i { display: block; height: 100%; border-radius: 4px; background: var(--tl-ink-35); transition: width 0.6s var(--tl-ease); }
.shx-frow.is-on .shx-fbar > i { background: var(--tl-ink); }
.shx-fval { text-align: right; font-family: var(--tl-mono); font-size: 12.5px; font-weight: 600; }
.shx-field-more { padding: 0 18px 12px; }
.shx-field-more .tl-btn-ghost { height: 28px; font-size: 12px; margin: 0; }
.shx-field-note { margin: 0; padding: 11px 18px; border-top: 1px solid var(--tl-line-05); font-size: 12px; color: var(--tl-ink-60); }

/* Compare bar: sticks to the viewport bottom while the board is on screen */
.shx-tray {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-top: 1px solid var(--tl-line-06);
  background: linear-gradient(var(--tl-fill-03), var(--tl-fill-03)), var(--tl-card);
}
.shx-tray[hidden] { display: none; }
.shx-tray-label { font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.5px; color: var(--tl-ink-50); }
.shx-tray-text { font-size: 13px; white-space: pre; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shx-tray-clear { height: auto; margin: 0; padding: 0; border: 0; background: transparent; font-size: 12.5px; color: var(--tl-ink-55); cursor: pointer; }
.shx-tray-clear:hover { color: var(--tl-ink); }
.shx-tray-cta {
  height: 30px; margin: 0; padding: 0 12px; display: inline-flex; align-items: center; flex: none;
  border: 0; border-radius: var(--tl-r-chip); background: rgba(var(--tl-ink-rgb), 0.08); color: var(--tl-ink-55);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: not-allowed;
}
.shx-tray-cta.is-ready { background: var(--tl-ink); color: var(--tl-on-ink); cursor: pointer; }
.shx-tray-cta.is-ready:hover { background: var(--tl-ink-hover); }

/* Loading (re-fetch): dim what will change */
#shxHub .shx-lead, #shxHub .shx-board { transition: opacity 0.18s var(--tl-ease); }
#shxHub.is-loading .shx-lead, #shxHub.is-loading .shx-board { opacity: 0.5; pointer-events: none; }
.shx-error { margin-top: 14px; }
.shx-error[hidden] { display: none; }

/* ---------- Compare tab + dialog ---------- */
.shx-cmp-panel.is-empty { padding: 48px; text-align: center; }
.shx-cmp-empty-title { margin-bottom: 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.3px; }
.shx-cmp-empty p { max-width: 460px; margin: 0 auto 16px; font-size: 13.5px; line-height: 1.55; color: var(--tl-ink-60); }
.shx-cmp-empty .tl-btn-ink { margin: 0; }
.shx-cmp-intro { padding: 12px 18px 0; }
.shx-cmp-table { margin-top: 12px !important; }
.shx-cmp-table thead th { vertical-align: bottom; }
.shx-cmp-table .shx-cmp-th { color: var(--tl-ink); font-size: 13px; }
.shx-cmp-who { display: flex; align-items: center; gap: 10px; }
.shx-cmp-who b { display: block; font-weight: 600; }
.shx-cmp-stat { font-family: var(--tl-mono); font-size: 12px; }
.shx-cmp-long { font-size: 12px; color: var(--tl-ink-50); font-weight: 400; }
.shx-cmp-table tbody th { font-weight: 500; }
.shx-cmp-table td { min-width: 150px; }
.shx-cmp-val { display: block; font-family: var(--tl-mono); font-size: 12.5px; color: var(--tl-ink-65); }
.shx-cmp-table td.is-best .shx-cmp-val { color: var(--tl-ink); font-weight: 600; }
.shx-cmp-table td.is-null .shx-cmp-val { color: var(--tl-ink-35); }
.shx-cmp-bar { display: block; margin-top: 6px; max-width: 140px; }

dialog#shxDialog.shx-dialog {
  position: fixed; inset: 0; margin: auto; min-width: 0; min-height: 0;
  width: min(760px, calc(100vw - 28px)); max-width: calc(100vw - 28px); height: fit-content; max-height: 85dvh;
  overflow: auto; display: none; padding: 18px 0 8px;
  border: 1px solid var(--tl-line-07); border-radius: var(--tl-r-card);
  background: var(--tl-card); color: var(--tl-ink); box-shadow: var(--tl-float-shadow);
}
dialog#shxDialog.shx-dialog[open] { display: block; }
.shx-dialog::backdrop { background: rgba(0, 0, 0, 0.32); }
.shx-dialog-top { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 0 18px; }
.shx-dialog-title { margin: 6px 0 4px; padding: 0 18px; font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--tl-ink); }
.shx-dialog-note { margin: 0; padding: 0 18px; font-size: 12px; line-height: 1.5; color: var(--tl-ink-50); }
.shx-dialog-links { margin: 0; padding: 12px 18px 8px; font-size: 12.5px; color: var(--tl-ink-45); }

/* ---------- Disabled SOON tabs (prototype: ink .35, no pointer) ---------- */
.shx .tl-tab:disabled { color: rgba(var(--tl-ink-rgb), 0.35); cursor: default; opacity: 1; }
.shx .tl-tab:disabled::after { transform: scaleX(0); }

/* ---------- /stats/archive/{entity} ---------- */
.shx-arc-head { display: flex; align-items: center; gap: 16px; }
.shx-arc-head .tl-dek { max-width: 720px; }
.shx-arc-body { display: flex; flex-direction: column; gap: 14px; }
.shx-arc-table td, .shx-arc-table th { font-variant-numeric: tabular-nums; }
.shx-arc-table thead th:not(:first-child):not(.is-left) { text-align: right; }
.shx-arc-table tbody th { font-family: var(--tl-mono); font-size: 12.5px; font-weight: 600; }
.shx-arc-table td.shx-num { text-align: right; font-family: var(--tl-mono); font-size: 12.5px; color: var(--tl-ink-65); }
.shx-arc-table td.shx-num.is-null { color: var(--tl-ink-35); }
.shx-arc-table td.shx-num.is-partial { text-decoration: underline dotted var(--tl-ink-35); text-underline-offset: 3px; }
.shx-arc-team { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.shx-arc-table .shx-link { font-size: 12px; }
.shx-arc-table .tl-soon { margin-left: 6px; vertical-align: 1px; }
.shx-arc-note { margin: 0; padding: 0 2px; font-size: 11.5px; line-height: 1.5; color: var(--tl-ink-50); }
.shx-archive .shx-arc-head .tl-kicker { margin-bottom: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .shx-toolbar { flex-wrap: wrap; row-gap: 10px; }
  .shx-toolbar .shx-spacer { display: none; }
  .shx-cov { flex-basis: 100%; }
}
@media (max-width: 1100px) {
  .shx-lead { grid-template-columns: minmax(0, 1fr); }
  .shx-wb { grid-template-columns: minmax(0, 1fr); }
  .shx-board-head { flex-wrap: wrap; row-gap: 10px; }
}
@media (max-width: 900px) {
  .shx-toolbar { flex-wrap: wrap; }
  .shx-vrule { display: none; }
  .shx-cats { order: 5; flex-basis: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .shx-cats::-webkit-scrollbar { display: none; }
  .shx-adv { order: 2; }
  .shx-cov { order: 6; }
}
@media (max-width: 720px) {
  .shx-feature { padding: 18px 16px 16px; gap: 14px; }
  .shx-face.is-76 { width: 56px; height: 56px; font-size: 16px; }
  .shx-feat-name { font-size: 20px; }
  .shx-feat-val { font-size: 44px; letter-spacing: -1.6px; }
  .shx-feat-foot { flex-wrap: wrap; }
  .shx-chase-row { grid-template-columns: 22px 40px minmax(0, 1fr) 64px; gap: 10px; padding: 10px 14px; }
  .shx-chase-row .shx-gapbar { display: none; }
  .shx-board-head { padding: 12px 14px; }
  .shx-board-head .tl-seg { order: 3; }
  .shx-search { order: 4; flex: 1 1 100%; width: auto; }
  .shx-addwrap { order: 3; margin-left: auto; }
  .shx-thead, .shx-wrow { padding-left: 14px; padding-right: 14px; }
  .shx-plot { height: 300px; margin: 34px 14px 52px 36px; }
  .shx-ylabel { left: -30px; }
  .shx-guide-label { display: none; }
  .shx-field { padding: 12px 14px; }
  .shx-frow { grid-template-columns: 110px minmax(0, 1fr) 56px; gap: 8px; }
  .shx-tray { padding: 10px 14px; gap: 8px; }
  .shx-tray-label { display: none; }
  .shx-cmp-panel.is-empty { padding: 32px 18px; }
  .shx-arc-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .shx-feature, .shx-gapbar > i, .shx-fbar > i, .shx-chase-row, #shxHub .shx-lead, #shxHub .shx-board { transition: none !important; }
}

/* =====================================================================
   Screener (design_handoff_stats_screener C): full-screen Pro overlay.
   Values follow the prototype; ink alphas go through --tl-ink-rgb so the
   overlay flips with the theme. stats-screener.js renders it.
   ===================================================================== */
html.scr-open, html.scr-open body { overflow: hidden; }
.scr {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--tl-page); color: var(--tl-ink); font-family: var(--tl-font); outline: none;
}
.scr[hidden] { display: none; }
.scr button { width: auto; margin: 0; font-family: inherit; line-height: normal; }
.scr select, .scr input { margin: 0 !important; box-shadow: none !important; }
.scr-flex { flex: 1; }
.scr [hidden] { display: none !important; }

/* C1 top bar */
.scr-top { flex: none; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 24px; border-bottom: 1px solid var(--tl-line-07); }
.scr-title { font-size: 16px; font-weight: 750; letter-spacing: -0.3px; }
.scr-crumb { font-family: var(--tl-mono); font-size: 10px; letter-spacing: 1px; color: var(--tl-ink-45); }
.scr-tbtn {
  height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: var(--tl-r-chip); background: transparent; color: var(--tl-ink-70);
  font-size: 12.5px; white-space: nowrap; cursor: pointer;
}
.scr-tbtn.is-quiet { color: var(--tl-ink-55); }
.scr-tbtn:hover { background: var(--tl-fill-05); color: var(--tl-ink); }
.scr-save {
  height: 30px; padding: 0 12px; display: inline-flex; align-items: center; white-space: nowrap;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-12); background: transparent; color: var(--tl-ink);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background 150ms, border-color 150ms;
}
.scr-save:hover { background: var(--tl-fill-04); border-color: rgba(var(--tl-ink-rgb), 0.24); }
.scr-close {
  width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--tl-r-chip); background: transparent; color: var(--tl-ink-55); font-size: 18px; cursor: pointer;
}
.scr-close:hover { background: var(--tl-fill-06); color: var(--tl-ink); }
.scr-toast {
  position: absolute; left: 50%; bottom: 24px; z-index: 5; transform: translateX(-50%);
  height: 36px; padding: 0 14px; display: flex; align-items: center;
  border-radius: 9px; background: var(--tl-ink); color: var(--tl-on-ink); font-size: 13px; white-space: nowrap;
  box-shadow: 0 12px 28px -12px rgba(16, 20, 24, 0.5);
}

/* C2 controls bar */
.scr-controls { flex: none; display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 24px; border-bottom: 1px solid var(--tl-line-07); overflow-x: auto; scrollbar-width: none; }
.scr-controls::-webkit-scrollbar { display: none; }
.scr-seg { flex: none; display: inline-flex; padding: 3px; border-radius: var(--tl-r-btn); background: var(--tl-fill-05); }
.scr-seg button {
  height: 28px; padding: 0 13px; display: inline-flex; align-items: center;
  border: 0; border-radius: var(--tl-r-pill); background: transparent; color: var(--tl-ink-55);
  font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.scr-seg button[aria-pressed="true"] { background: var(--tl-control); color: var(--tl-ink); box-shadow: var(--tl-seg-on-shadow); }
.scr-rtool .scr-seg { padding: 2px; border-radius: var(--tl-r-chip); }
.scr-rtool .scr-seg button { height: 26px; padding: 0 11px; border-radius: 5px; font-size: 12.5px; }
.scr-vrule { flex: none; width: 1px; height: 24px; margin: 0 6px; background: var(--tl-line-10); }
.scr-vrule.is-short { height: 22px; }
.scr-cats { display: flex; align-items: center; gap: 8px; }
.scr-cat {
  flex: none; height: 32px; padding: 0 13px; display: inline-flex; align-items: center;
  border-radius: var(--tl-r-btn); border: 1px solid var(--tl-line-10); background: transparent; color: var(--tl-ink-70);
  font-size: 13.5px; font-weight: 400; white-space: nowrap; cursor: pointer; transition: border-color 150ms;
}
.scr-cat:hover { border-color: rgba(var(--tl-ink-rgb), 0.3); }
.scr-cat[aria-pressed="true"] { border-color: var(--tl-ink); background: var(--tl-ink); color: var(--tl-on-ink); font-weight: 600; }
.scr-cat.is-soon { gap: 7px; padding: 0 12px; border-style: dashed; border-color: var(--tl-line-18); color: var(--tl-ink-40); cursor: default; }
.scr-cat.is-soon:hover { border-color: var(--tl-line-18); }
.scr-soon { font-family: var(--tl-mono); font-size: 8.5px; letter-spacing: 0.4px; padding: 1px 4px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--tl-line-18); }
.scr-meta { flex: none; padding-left: 12px; font-size: 12.5px; color: var(--tl-ink-50); white-space: nowrap; }

/* Body: 288px rail + results */
.scr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 288px minmax(0, 1fr); }

/* C3 left rail */
.scr-rail { overflow-y: auto; display: flex; flex-direction: column; padding-bottom: 24px; }
.scr-sec { padding-bottom: 14px; }
.scr-sec + .scr-sec { border-top: 1px solid var(--tl-line-07); }
.scr-sec:first-child { padding-bottom: 12px; }
.scr-sec-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px; }
.scr-sec-title { font-size: 12.5px; font-weight: 650; letter-spacing: -0.1px; }
.scr-sec-count { font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-40); }
.scr-sec-act { padding: 0; border: 0; background: transparent; font-size: 12px; color: var(--tl-ink-50); white-space: nowrap; cursor: pointer; }
.scr-sec-act:hover { color: var(--tl-ink); }
.scr-list { display: flex; flex-direction: column; padding: 0 8px; }
.scr-empty-box { margin: 0 16px; padding: 10px 12px; border-radius: var(--tl-r-btn); border: 1px dashed rgba(var(--tl-ink-rgb), 0.14); font-size: 12px; line-height: 1.45; color: var(--tl-ink-50); }
.scr-ib {
  width: 22px; height: 22px; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 5px; background: transparent; color: var(--tl-ink-35); font-size: 12px; cursor: pointer;
}
.scr-ib:hover { background: var(--tl-fill-06); color: var(--tl-ink); }
/* My screens rows */
.scr-mine { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 10px; border-radius: var(--tl-r-chip); cursor: pointer; transition: background 150ms; }
.scr-mine:hover { background: color-mix(in srgb, var(--tl-control) 80%, transparent); }
.scr-mine.is-on { background: var(--tl-control); box-shadow: 0 0 0 1px rgba(var(--tl-ink-rgb), 0.09), 0 1px 2px rgba(var(--tl-ink-rgb), 0.05); }
.scr-mine > svg { flex: none; color: var(--tl-ink-45); }
.scr-mine-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-mine.is-on .scr-mine-name { font-weight: 650; }
.scr-mine-cat { font-family: var(--tl-mono); font-size: 9.5px; letter-spacing: 0.5px; color: rgba(var(--tl-ink-rgb), 0.38); }
.scr-rename {
  flex: 1; min-width: 0; height: 24px !important; padding: 0 6px !important;
  border-radius: 5px !important; border: 1px solid rgba(var(--tl-ink-rgb), 0.25) !important; background: var(--tl-control) !important;
  outline: none; font: 400 13px var(--tl-font) !important; color: var(--tl-ink) !important;
}
.scr-mine:focus-visible, .scr-quick:focus-visible { outline: none; box-shadow: var(--tl-focus-ring) !important; }
/* Scope: joined white controls with a mono label inside */
.scr-scope { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 0 16px; }
.scr-field {
  display: flex; align-items: center; height: 30px; min-width: 0; overflow: hidden; margin: 0;
  border-radius: var(--tl-r-chip); background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-line-10);
}
.scr-field.is-full { grid-column: 1 / -1; }
.scr-field.is-off { opacity: 0.6; }
.scr-flabel { flex: none; padding-left: 9px; font-family: var(--tl-mono); font-size: 9.5px; letter-spacing: 0.6px; color: rgba(var(--tl-ink-rgb), 0.42); }
.scr-field select, .scr-joined select, .scr-axis {
  flex: 1; min-width: 0; width: auto; height: 100% !important; padding: 0 22px 0 6px !important;
  border: 0 !important; border-radius: 0 !important; background-color: transparent !important; outline: none;
  font: 600 12px var(--tl-font) !important; color: var(--tl-ink) !important; cursor: pointer;
  background-position: right 6px center !important; background-size: 12px auto !important;
}
.scr-field select.is-mono, .scr-joined select.is-mono { font-family: var(--tl-mono) !important; padding-left: 8px !important; }
.scr-field select:disabled { cursor: not-allowed; }
.scr-dash { flex: none; color: var(--tl-ink-35); }
/* Quick screens */
.scr-quick {
  position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px;
  border: 0; border-radius: var(--tl-r-chip); background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background 150ms;
}
.scr-quick:hover { background: color-mix(in srgb, var(--tl-control) 80%, transparent); }
.scr-quick.is-on { background: var(--tl-control); box-shadow: 0 0 0 1px rgba(var(--tl-ink-rgb), 0.09), 0 1px 2px rgba(var(--tl-ink-rgb), 0.05); }
.scr-qdot { width: 6px; height: 6px; flex: none; border-radius: 2px; background: rgba(var(--tl-ink-rgb), 0.18); }
.scr-quick.is-on .scr-qdot { background: var(--tl-ink); }
.scr-qname { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--tl-ink-75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-quick.is-on .scr-qname { font-weight: 650; color: var(--tl-ink); }
.scr-qn { font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-40); }
.scr-qdesc { margin: 6px 18px 0; font-family: var(--tl-mono); font-size: 10.5px; line-height: 1.5; color: var(--tl-ink-50); }
/* Filters */
.scr-filters, .scr-forms { display: flex; flex-direction: column; gap: 6px; padding: 0 16px; }
.scr-filter { display: flex; align-items: center; gap: 4px; }
.scr-joined {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 62px 58px; height: 30px; overflow: hidden;
  border-radius: var(--tl-r-chip); background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-line-10);
}
.scr-joined select.is-mono { font-size: 11.5px !important; }
.scr-joined select:nth-child(2) {
  padding: 0 4px !important; border-left: 1px solid var(--tl-line-08) !important; text-align: center;
  font: 400 13px var(--tl-font) !important; color: var(--tl-ink-70) !important; background-image: none !important;
}
.scr-joined input {
  min-width: 0; height: 100% !important; padding: 0 9px !important; border: 0 !important; border-left: 1px solid var(--tl-line-08) !important; border-radius: 0 !important;
  background: transparent !important; outline: none; text-align: right; font: 400 11.5px var(--tl-mono) !important; color: var(--tl-ink) !important;
  -moz-appearance: textfield; appearance: textfield;
}
.scr-joined input::-webkit-outer-spin-button, .scr-joined input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.scr-joined:focus-within, .scr-field:focus-within { box-shadow: 0 0 0 1px rgba(var(--tl-ink-rgb), 0.32), 0 0 0 4px var(--tl-fill-06); }
.scr-fdel {
  width: 24px; height: 24px; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--tl-r-pill); background: transparent; color: var(--tl-ink-40); cursor: pointer;
}
.scr-fdel:hover { background: var(--tl-fill-06); color: var(--tl-ink); }
.scr-addf {
  height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--tl-r-chip); border: 1px dashed rgba(var(--tl-ink-rgb), 0.16); background: transparent;
  font-size: 12.5px; color: var(--tl-ink-55); cursor: pointer; transition: border-color 150ms, color 150ms;
}
.scr-addf:hover { border-color: rgba(var(--tl-ink-rgb), 0.35); color: var(--tl-ink); }
/* Computed columns */
.scr-form { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 4px 0 10px; border-radius: var(--tl-r-chip); background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-line-08); }
.scr-form-name { font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.scr-form-expr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-45); }
.scr-fx { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--tl-r-btn); background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-line-10); }
.scr-fx.is-valid { box-shadow: 0 0 0 1px rgba(var(--tl-ink-rgb), 0.28); }
.scr-fx.is-invalid { box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.45); }
.scr-fx-top { display: flex; align-items: center; height: 34px; padding: 0 4px 0 10px; gap: 8px; }
.scr-fx-f { font-family: var(--tl-mono); font-size: 12px; font-style: italic; color: var(--tl-ink-40); }
.scr-fx-input {
  flex: 1; min-width: 0; height: 100% !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; outline: none; font: 400 12px var(--tl-mono) !important; color: var(--tl-ink) !important;
}
.scr-fx-input::placeholder { color: var(--tl-ink-40); }
.scr-fx-add {
  height: 26px; padding: 0 10px; display: inline-flex; align-items: center; border: 0; border-radius: var(--tl-r-pill);
  background: var(--tl-line-08); color: var(--tl-ink-45); font-size: 12px; font-weight: 650; cursor: pointer;
}
.scr-fx-add:disabled { cursor: default; }
.scr-fx-add.is-ready { background: var(--tl-ink); color: var(--tl-on-ink); }
.scr-fx-tray { display: flex; flex-wrap: wrap; gap: 3px; padding: 7px 8px 8px; border-top: 1px solid var(--tl-line-06); background: var(--tl-card); }
.scr-tok {
  height: 20px; padding: 0 6px; display: inline-flex; align-items: center; border: 0; border-radius: var(--tl-r-tag);
  background: var(--tl-fill-05); font-family: var(--tl-mono) !important; font-size: 10.5px; color: var(--tl-ink-65); cursor: pointer;
}
.scr-tok:hover { background: rgba(var(--tl-ink-rgb), 0.1); color: var(--tl-ink); }
.scr-fx-hint { padding: 0 2px; font-family: var(--tl-mono); font-size: 10.5px; line-height: 1.5; color: var(--tl-ink-45); }
.scr-fx-hint.is-err { color: #b91c1c; }
html:not(.si-light) .scr-fx-hint.is-err { color: var(--tl-down); }
.scr-sub { padding: 12px 16px 4px; font-family: var(--tl-mono); font-size: 10px; letter-spacing: 1px; color: var(--tl-ink-40); }
.scr-sugg {
  display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px 0 10px;
  border: 0; border-radius: var(--tl-r-chip); background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background 150ms;
}
.scr-sugg:hover { background: color-mix(in srgb, var(--tl-control) 80%, transparent); }
.scr-sugg-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.scr-sugg-expr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--tl-mono); font-size: 10.5px; color: rgba(var(--tl-ink-rgb), 0.42); }
.scr-sugg-plus { font-size: 14px; color: var(--tl-ink-40); }
/* Shown columns */
.scr-col { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: var(--tl-r-pill); }
.scr-col:hover { background: color-mix(in srgb, var(--tl-control) 80%, transparent); }
.scr-col-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; height: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.scr-cb {
  width: 14px; height: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tl-r-tag); border: 1.5px solid rgba(var(--tl-ink-rgb), 0.25); background: var(--tl-control); color: var(--tl-on-ink); font-size: 9px;
}
.is-on > .scr-cb, .scr-col.is-on .scr-cb, .scr-lbl-row.is-on .scr-cb { border-color: var(--tl-ink); background: var(--tl-ink); }
.scr-col-name { font-family: var(--tl-mono); font-size: 11.5px; color: var(--tl-ink-45); }
.scr-col.is-on .scr-col-name { color: var(--tl-ink); }
.scr-col-name i, .scr-th i { font-style: italic; color: var(--tl-ink-35); }

/* C4 results panel */
.scr-results { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--tl-card); border-left: 1px solid var(--tl-line-07); }
.scr-rtool { flex: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 24px; border-bottom: 1px solid var(--tl-line-07); }
.scr-count { font-size: 14px; font-weight: 700; white-space: nowrap; }
.scr-csub { font-size: 12px; color: var(--tl-ink-50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.scr-pg {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px;
  border: 0; border-radius: var(--tl-r-chip); background: transparent; color: var(--tl-ink-70); font-size: 12.5px; white-space: nowrap; cursor: pointer;
}
.scr-pg:hover { background: var(--tl-fill-05); }
.scr-switch { position: relative; width: 26px; height: 16px; flex: none; border-radius: 8px; background: rgba(var(--tl-ink-rgb), 0.16); transition: background 150ms; }
.scr-switch > i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 20, 24, 0.3); transition: left 150ms; }
.scr-pg[aria-checked="true"] .scr-switch { background: var(--tl-ink); }
.scr-pg[aria-checked="true"] .scr-switch > i { left: 12px; background: var(--tl-on-ink); }
.scr-rbody { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
/* Table */
.scr-table { min-width: 100%; }
.scr-thead {
  position: sticky; top: 0; z-index: 1; display: grid; gap: 10px; align-items: center; padding: 9px 24px;
  background: color-mix(in srgb, var(--tl-card), var(--tl-ink) 1.6%); border-bottom: 1px solid var(--tl-line-07);
  font-size: 11.5px; font-weight: 500; color: var(--tl-ink-50);
}
.scr-th { padding: 0; border: 0; background: transparent; text-align: right; white-space: nowrap; font-size: 11.5px; font-weight: 500; color: var(--tl-ink-50); cursor: pointer; }
.scr-th:hover { color: var(--tl-ink-75); }
.scr-th.is-on { color: var(--tl-ink); font-weight: 650; }
.scr-row { display: grid; gap: 10px; align-items: center; min-height: 50px; padding: 7px 24px; border-bottom: 1px solid var(--tl-line-05); font-size: 13.5px; }
.scr-row:hover { background: var(--tl-control); }
.scr-rk { font-family: var(--tl-mono); font-size: 12px; color: var(--tl-ink-40); }
.scr-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.scr-av {
  width: 28px; height: 28px; flex: none; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--tl-logo-chip, #e6e8eb); box-shadow: 0 0 0 1px var(--tl-line-08);
  font-family: var(--tl-mono); font-size: 8px; color: var(--tl-ink-55);
}
.scr-av.is-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.scr-av.is-logo { background: var(--tl-control); }
.scr-av.is-logo img { width: 20px; height: 20px; object-fit: contain; }
.scr-who-text { min-width: 0; }
.scr-who-name { display: block; font-weight: 600; line-height: 1.25; color: var(--tl-ink); text-decoration: none; }
.scr-who-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.scr-who-sub { display: flex; align-items: center; gap: 5px; font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-50); white-space: nowrap; overflow: hidden; text-transform: uppercase; }
.scr-who-sub img { flex: none; object-fit: contain; }
.scr-who-sub span { overflow: hidden; text-overflow: ellipsis; }
.scr-cell { text-align: right; font-family: var(--tl-mono); font-size: 12.5px; font-weight: 400; color: var(--tl-ink-62); white-space: nowrap; }
.scr-cell.is-fx { color: rgba(var(--tl-ink-rgb), 0.8); }
.scr-cell.is-sort { color: var(--tl-ink); font-weight: 650; }
.scr-cell.is-null { color: var(--tl-ink-35); }
.scr-more { display: flex; justify-content: center; padding: 16px 24px 24px; }
.scr-more .si-outline-card__btn { width: auto; padding: 0 16px; }
.scr-none { padding: 56px 24px; text-align: center; font-size: 13.5px; color: var(--tl-ink-55); }
.scr-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 24px; text-align: center; font-size: 13.5px; color: var(--tl-ink-60); }
.scr-state p { margin: 0; }
.scr-state-btn { width: auto; padding: 0 16px; }
.scr-skel { padding: 8px 0; }
.scr-skel-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 7px 24px; border-bottom: 1px solid var(--tl-line-05); }
.scr-skel-row .tl-skel { display: block; height: 12px; }
.scr-skel-row .scr-skel-face { width: 28px; height: 28px; border-radius: 50%; }

/* C5 scatter */
.scr-sc { flex: 1; min-height: 0; display: flex; }
.scr-sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.scr-plot-wrap { flex: 1; min-height: 260px; position: relative; }
.scr-plot { position: absolute; inset: 30px 44px 46px 76px; }
.scr-plot-bg, .scr-pts { position: absolute; inset: 0; }
.scr-plot-bg { pointer-events: none; }
.scr-gy { position: absolute; left: 0; right: 0; height: 1px; background: var(--tl-line-07); }
.scr-gx { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(var(--tl-ink-rgb), 0.045); }
.scr-ty { position: absolute; left: -50px; width: 40px; text-align: right; transform: translateY(-50%); font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-45); }
.scr-tx { position: absolute; bottom: -22px; transform: translateX(-50%); font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-45); white-space: nowrap; }
.scr-xlab { position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%); font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.8px; font-weight: 600; white-space: nowrap; }
.scr-ylab { position: absolute; left: -66px; top: -24px; font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.8px; font-weight: 600; white-space: nowrap; }
.scr-med.is-v { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--tl-ink-40); }
.scr-med.is-h { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--tl-ink-40); }
.scr-avg.is-v { position: absolute; top: 0; bottom: 0; border-left: 1.5px dotted var(--tl-ink-50); }
.scr-avg.is-h { position: absolute; left: 0; right: 0; border-top: 1.5px dotted var(--tl-ink-50); }
.scr-gl { position: absolute; font-family: var(--tl-mono); font-size: 9.5px; color: var(--tl-ink-55); white-space: nowrap; }
.scr-gl.is-top { top: -18px; transform: translateX(-50%); }
.scr-gl.is-right { right: -40px; transform: translateY(-50%); }
.scr-trend { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.scr-trend line { stroke: var(--tl-ink); stroke-width: 1.5; stroke-opacity: 0.55; }
.scr-trend-cap { position: absolute; right: 6px; bottom: 6px; font-family: var(--tl-mono); font-size: 9.5px; letter-spacing: 0.4px; color: var(--tl-ink-55); }
.scr-quad { position: absolute; right: 0; top: 0; background: rgba(34, 197, 94, 0.06); }
.scr-qcap { position: absolute; font-family: var(--tl-mono); font-size: 9.5px; letter-spacing: 0.6px; }
.scr-qcap.is-tr { right: 6px; top: 6px; color: var(--tl-up); }
.scr-qcap.is-bl { left: 6px; bottom: 6px; color: var(--tl-ink-40); }
.scr-pt {
  position: absolute; z-index: 2; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  transform: translate(-50%, -50%); border: 0; background: transparent; color: var(--tl-ink); cursor: pointer;
  transition: left 500ms cubic-bezier(.2, .7, .2, 1), top 500ms cubic-bezier(.2, .7, .2, 1);
}
.scr-pt.is-on { transform: translate(-50%, -13px); }
.scr-pt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tl-ink-40); box-shadow: 0 0 0 2px var(--tl-card); transition: transform 150ms, background 150ms; }
.scr-pt:hover .scr-pt-dot, .scr-pt:focus-visible .scr-pt-dot { transform: scale(1.5); background: var(--tl-ink); }
.scr-pt-logo {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--tl-control); box-shadow: 0 0 0 1px var(--tl-line-10), 0 2px 6px -2px rgba(var(--tl-ink-rgb), 0.25);
}
html:not(.si-light) .scr-pt-logo { background: #fff; }
.scr-pt-logo img { width: 18px; height: 18px; object-fit: contain; }
.scr-pt-init { font-family: var(--tl-mono); font-size: 8px; color: rgba(16, 20, 24, 0.55); }
.scr-pt-name { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--tl-card) 85%, transparent); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.scr-pt:focus-visible { outline: none; }
.scr-pt:focus-visible .scr-pt-logo { box-shadow: var(--tl-focus-ring); }
/* Bottom control bar */
.scr-scbar {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 52px; padding: 12px 16px 12px 24px;
  border-top: 1px solid var(--tl-line-07); background: color-mix(in srgb, var(--tl-control) 50%, transparent);
}
.scr-mlabel { font-family: var(--tl-mono); font-size: 10px; letter-spacing: 1px; color: var(--tl-ink-45); }
.scr-axis {
  flex: none; height: 28px !important; padding: 0 22px 0 6px !important; border-radius: var(--tl-r-pill) !important;
  border: 1px solid var(--tl-line-10) !important; background-color: var(--tl-control) !important; font: 600 11.5px var(--tl-mono) !important;
}
.scr-swap { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--tl-r-pill); background: transparent; font-size: 13px; color: var(--tl-ink-50); cursor: pointer; }
.scr-swap:hover { background: var(--tl-fill-06); color: var(--tl-ink); }
.scr-guide {
  height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-10); background: transparent; color: var(--tl-ink-70);
  font-size: 12.5px; white-space: nowrap; cursor: pointer; transition: all 150ms;
}
.scr-guide.is-on { border-color: var(--tl-ink); background: var(--tl-ink); color: var(--tl-on-ink); }
.scr-glyph { width: 14px; height: 0; border-top: 1.5px solid currentColor; }
.scr-glyph.is-dashed { border-top-style: dashed; }
.scr-glyph.is-dotted { border-top-style: dotted; }
.scr-glyph.is-quad { width: 10px; height: 10px; border: 0; border-radius: 2px; background: rgba(34, 197, 94, 0.35); }
.scr-lblbtn {
  height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-12); background: transparent; color: var(--tl-ink);
  font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.scr-lblbtn.is-on { background: var(--tl-control); }
.scr-lblbtn span { font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-50); }
.scr-plotnote { flex-basis: 100%; font-family: var(--tl-mono); font-size: 10px; color: var(--tl-ink-45); }
/* Labels panel */
.scr-lbl { flex: none; width: 244px; display: flex; flex-direction: column; border-left: 1px solid var(--tl-line-07); }
.scr-lbl-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px 16px; }
.scr-lbl-quick { flex: none; display: flex; gap: 4px; padding: 0 16px 10px; border-bottom: 1px solid var(--tl-line-06); }
.scr-lbl-quick button {
  height: 24px; padding: 0 8px; display: inline-flex; align-items: center; white-space: nowrap;
  border-radius: var(--tl-r-pill); border: 1px solid var(--tl-line-10); background: transparent; font-size: 11.5px; color: var(--tl-ink-70); cursor: pointer;
}
.scr-lbl-quick button:hover { border-color: rgba(var(--tl-ink-rgb), 0.3); color: var(--tl-ink); background: var(--tl-control); }
.scr-lbl-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 12px; }
.scr-lbl-row {
  width: 100%; display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px;
  border: 0; border-radius: var(--tl-r-pill); background: transparent; color: inherit; text-align: left; cursor: pointer;
}
.scr-lbl-row:hover { background: color-mix(in srgb, var(--tl-control) 85%, transparent); }
.scr-lbl-row img, .scr-lbl-nologo { width: 16px; height: 16px; flex: none; object-fit: contain; }
.scr-lbl-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 500; color: var(--tl-ink-55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-lbl-row.is-on .scr-lbl-name { color: var(--tl-ink); }
.scr-lbl-val { font-family: var(--tl-mono); font-size: 10.5px; color: var(--tl-ink-45); }

.scr button:focus-visible, .scr select:focus-visible, .scr a:focus-visible { outline: none; box-shadow: var(--tl-focus-ring) !important; }

/* Narrow screens: the rail stacks above the results and the whole overlay scrolls. */
@media (max-width: 900px) {
  .scr-body { display: block; overflow-y: auto; }
  .scr-rail { overflow: visible; border-bottom: 1px solid var(--tl-line-07); }
  .scr-results { min-height: 80vh; border-left: 0; }
  .scr-top { padding: 0 8px 0 16px; gap: 4px; }
  .scr-crumb, .scr-tbtn.is-quiet { display: none; }
  .scr-controls { padding: 0 16px; }
  .scr-meta { display: none; }
  .scr-lbl { display: none; }
  .scr-plot-wrap { min-height: 340px; }
}
@media (max-width: 560px) {
  .scr-tbtn { padding: 0 6px; font-size: 0; gap: 0; }
  .scr-tbtn svg { width: 14px; height: 14px; }
  .scr-rtool { padding: 0 12px; gap: 6px; }
  .scr-csub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scr-pt, .scr-switch, .scr-switch > i, .scr-pt-dot, .scr-guide { transition: none !important; }
}
