/* Line ladder charts (spread / total) and their toggle */
/* a line ladder's chart (ladderChart): the DFS ladder's frame, a stacked bar per line in the two teams' colours */
.fam-chart {
  padding: var(--s2) var(--s4) var(--s4);
  border-top: 1px solid var(--line);
}
/* the row above, zoomed out: each team's chip (the moneyline bar's) at its end of the bars, the row's window shaded,
   its selected line marked; the axis in the row's line-label type */
.spc .dx-fig {
  grid-template-rows: 14px 180px 26px;
}
.spc .ch {
  position: absolute;
  right: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--tc);
}
.spc .ch img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.spc .ch b {
  font: 700 var(--t-md)/1 var(--display);
  color: #14181b;
}
.spc .dx-yax .ch.top {
  top: 0;
  bottom: auto;
  translate: none;
}
.spc .dx-yax .ch.foot {
  bottom: 0;
  top: auto;
  translate: none;
}
/* flush with the bars' top and foot (not the y labels' centring shift: .dx-yax span) */
.spc .win {
  position: absolute;
  top: -8px;
  bottom: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--ink) 30%, transparent);
  pointer-events: none;
}
/* Fair / Best price: the page's period switch (.gper .seg), small, at the chart's top right */
.spc {
  position: relative;
}
.spc-mode {
  position: absolute;
  top: -2px;
  right: 0;
  z-index: 1;
  display: inline-flex;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}
.spc-mode button {
  border: 0;
  background: var(--surface);
  padding: 4px 9px;
  font: 600 var(--t-xs)/1 var(--body);
  color: var(--muted);
  cursor: pointer;
}
.spc-mode button:hover {
  color: var(--ink);
}
.spc-mode button.on {
  background: var(--sunk);
  color: var(--ink);
}
.spc {
  --ovr: color-mix(in srgb, var(--ink) 58%, var(--surface));
  --und: color-mix(in srgb, var(--ink) 26%, var(--surface));
} /* a total's two greys, from the theme */
.spc .dx-fig {
  margin-top: 24px;
}
/* Best price: the two sides' best prices as lines (the bars kept as invisible targets: a bar still picks its line) */
.spc-cols.hit .sc i {
  visibility: hidden;
}
.spc-note {
  margin: var(--s2) 0 0 40px;
  font: 400 var(--t-xs)/1.4 var(--body);
  color: var(--muted);
}
.spc-best {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.spc-best path {
  fill: none;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.spc-best .la {
  stroke: var(--fa);
}
.spc-best .lb {
  stroke: var(--fb);
}
.spc-best .gap {
  fill: var(--pos);
}
.spc .dx-plot {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.fam-chart.scrub .dx-plot,
.fam-chart.scrub .spc-cols .sc {
  cursor: grabbing;
}
.fam-chart.scrub .win {
  background: color-mix(in srgb, var(--ink) 11%, transparent);
  box-shadow: inset 0 2px 0 var(--ink);
}
.spc-cols .sc.sel i {
  box-shadow: 0 0 0 1.5px var(--ink);
}
.spc .dx-ax span {
  font: 600 var(--t-sm)/1 var(--body);
  color: color-mix(in srgb, var(--ink) 62%, var(--surface));
}
.spc .dx-ax span.s {
  color: var(--ink);
}
.spc .pkl {
  position: absolute;
  top: -10px;
  bottom: 0;
  border-left: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  pointer-events: none;
}
.spc .dx-in {
  width: min(100%, var(--n) * 46px);
} /* a slot every half point: up to 46px one, narrower when there are many */
.spc-cols .sc.none {
  cursor: default;
}
.spc-cols {
  position: absolute;
  inset: 0;
  display: flex;
}
.spc-cols .sc {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
/* each team's part one solid colour, its own (the moneyline bar's pair: teamColors); a 1px gap between the two */
.spc-cols .sc i {
  width: 74%;
  max-width: 30px;
  min-width: 2px;
  flex: none;
}
.spc-cols .sc i.b {
  background: var(--fb);
  border-radius: 2px 2px 0 0;
}
.spc-cols .sc i.a {
  background: var(--fa);
  margin-top: 1px;
}
.spc-cols .sc:hover i {
  filter: brightness(1.15);
}
.spc-cols .sc.arb {
  box-shadow: inset 0 -2px 0 var(--pos);
}
.spc-cols .sc.arb::after {
  content: '';
  position: absolute;
  top: 0;
  right: 13%;
  width: 8px;
  height: 8px;
  background: var(--pos);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.spc .h50 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50%;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 55%, transparent);
  pointer-events: none;
}
.spc .dx-ax span.m {
  color: var(--ink);
  font-weight: 700;
}
.spc .dx-ax span.m::before {
  content: '▲';
  position: absolute;
  top: -9px;
  left: 50%;
  translate: -50% 0;
  font-size: 7px;
}
/* a spread's chart toggle: the page's chevron (the line arrows' and the side list's), down to open, up when open */
.fam-h .fx {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: var(--s1);
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  align-self: center;
}
.fam-h .fx::before {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  rotate: 45deg;
  translate: 0 -2px;
  transition:
    rotate 0.15s,
    translate 0.15s;
}
.fam-h .fx[aria-expanded='true']::before {
  rotate: -135deg;
  translate: 0 2px;
  border-color: var(--ink);
}
.fam-h .fx:hover {
  background: var(--raised);
}
.fam-h .fx:hover::before {
  border-color: var(--ink);
}
.fam-h .fx:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .fam-h .fx::before {
    transition: none;
  }
}
