/* ===========================================================================
   split-explorer.css -- chapter 12's total / between groups / within groups
   panel (assets/js/split-explorer.js).

   The container carries `dx cx ssx`: the buttons come from the .dx rules in
   dist-explorer.css, the frame and text from the .cx rules in
   calc-explorer.css. Defined here: the light rules of the y axis, the dots,
   the distances and their motion, the dashed overall mean, the group-mean
   bars, the fades, and the line of sums under the picture. The colours come
   from R (SSDATA.colors) as css variables on the svg; the static PDF figure
   uses the same ones (chunk testing-split-static).

   Nothing here is needed by the PDF build; the LaTeX format never loads css.
   =========================================================================== */

/* The panel spans the text column, edge to edge; the script widens the svg's
   x axis to match, so its text keeps the static figures' sizes. */
.cx.ssx { max-width: none; }

.ssx .ssx-tabs { margin-bottom: 0.55rem; }

/* text a size up from the .cx defaults (12.8 and 11 px), like the static
   figures of this section, which are drawn to fill the column */
.ssx svg .cx-lb { font-size: 15px; }
.ssx svg .cx-tk { font-size: 13px; }

.ssx svg .ssx-grid { stroke: #ebebeb; stroke-width: 1; }
/* a dot and its distance are moved (and the distance stretched) by css
   transforms in svg units, from the svg's origin */
.ssx svg .ssx-dot, .ssx svg .ssx-seg {
  transform-box: view-box;
  transform-origin: 0 0;
  transition: transform 0.6s ease;
}
.ssx svg .ssx-dot  { fill: var(--ssx-dot); stroke: #fff; stroke-width: 1; }
.ssx svg .ssx-seg  { fill: var(--ssx-seg); }
.ssx svg .ssx-ovl  { stroke: var(--ssx-ov); stroke-width: 1.2; stroke-dasharray: 5 4; }
.ssx svg .ssx-bar  { stroke: var(--ssx-mean); stroke-width: 2.6; }
.ssx svg .ssx-ov, .ssx svg .ssx-gm { transition: opacity 0.4s ease; }

/* the sums under the picture, the current one in purple */
.ssx .ssx-read { margin: 0.45rem 0 0; }
.ssx .ssx-term { transition: color 0.3s ease; }
.ssx .ssx-term.ssx-on { color: #32006e; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .ssx svg .ssx-dot, .ssx svg .ssx-seg, .ssx svg .ssx-ov, .ssx svg .ssx-gm,
  .ssx .ssx-term { transition: none; }
}
