/* ===========================================================================
   leverage-explorer.css -- chapter 15's eight points with one more point
   that can be dragged (assets/js/leverage-explorer.js).

   The container carries `dx cx lvx`: the preset buttons come from the .dx
   rules in dist-explorer.css, the text from the .cx rules in
   calc-explorer.css. Defined here: the line of values (numbers in UW
   purple), the light grid, the dashed line of the eight points, the line of
   all nine, the points, and the ninth point with its larger touch target and
   focus ring. The colours of the ninth point and of the line come from R
   (LVDATA.colors) as css variables on the svg; the static PDF figure uses the
   same ones (chunk regression-leverage-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 its size. */
.cx.lvx { max-width: none; }

.lvx .lvx-tabs { justify-content: center; margin-bottom: 0; }

/* the values, between the buttons and the plot */
.lvx .lvx-read { margin: 0.5rem 0 0.2rem; text-align: center; }
.lvx .lvx-read b { color: #32006e; font-weight: 600; font-variant-numeric: tabular-nums; }

/* text a size up from the .cx defaults, as in chapter 14's panel; no halo on
   the axis letters */
.lvx svg .cx-tk { font-size: 13px; }
.lvx svg .cx-lb { font-size: 15px; stroke: none; }

.lvx svg .lvx-grid { stroke: #ebebeb; stroke-width: 1; }
.lvx svg .lvx-base { stroke: #8c8c8c; stroke-width: 1.2; stroke-dasharray: 5 4; }
.lvx svg .lvx-line { stroke: var(--lvx-line); stroke-width: 2; }
.lvx svg .lvx-dot  { fill: #000; stroke: #fff; stroke-width: 1; }

/* the ninth point: the dot, and a larger invisible circle that takes the
   pointer */
.lvx svg .lvx-pt { cursor: grab; touch-action: none; outline: none; }
.lvx svg .lvx-pt.lvx-on { cursor: grabbing; }
.lvx svg .lvx-hit { fill: #fff; fill-opacity: 0; }
.lvx svg .lvx-add { fill: var(--lvx-pt); stroke: #fff; stroke-width: 1.5; }
.lvx svg .lvx-pt.lvx-on .lvx-add,
.lvx svg .lvx-pt:focus-visible .lvx-add { stroke: #c9b6e6; stroke-width: 3; }

@media print { .lvx { display: none; } }
