/* ==========================================================================
   EXPLAIN THIS (Peter, 3 Nov 2026; gated ?try=explain-this, js/explain-this.js)
   Press a number, or say "explain this" and circle one, and Bullet shows where it comes from.
   - .exfig: a number that can be pressed. It looks like the figure it is (Home's pressable sentence, Peter 29 Jul):
     no underline, ever; the pointer cursor and the shared "Explain this" tip are the whole affordance.
   - html.is-explaining: the circle mode. The cursor over the return becomes Bullet's pointer (the guide's triangle,
     its accent colour), and dragging draws instead of selecting text.
   - .exdraw: the stroke you draw. It flashes and fades (rings flash, never stay).
   The figure being explained takes the app's highlighter (guide.js, .guide-exring: 1px yellow, it fades).
   ========================================================================== */
.exfig { cursor: pointer; border-radius: var(--radius-sm); }
.exfig:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
/* while Bullet explains, the tip steps aside: the pointer and the yellow ring are on the figures */
html.guide-explaining .exfig[data-tip]::after,
html.is-explaining .exfig[data-tip]::after { opacity: 0; }
html.guide-explaining #ui-tip,
html.is-explaining #ui-tip { visibility: hidden; }   /* ui.js draws the live tip as one #ui-tip on body */

/* the guide's triangle as the cursor, tip down at what it points at (hotspot on the tip) */
html.is-explaining .pt-stage,
html.is-explaining .pt-stage * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 40 40'%3E%3Cpath d='M20 36 L4 8 L36 8 Z' fill='%23FFA51F' stroke='%23FFFFFF' stroke-width='5' stroke-linejoin='round' paint-order='stroke'/%3E%3C/svg%3E") 12 22, crosshair !important;
}
html.is-explaining .pt-stage { -webkit-user-select: none; user-select: none; touch-action: none; }

.exdraw { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 99996; pointer-events: none; }
.exdraw path {
  fill: none;
  stroke: var(--guide-acc);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.6s cubic-bezier(0.32, 0, 0.1, 1);
}
.exdraw--out path { opacity: 0; }
.exdraw.exdraw--in { position: absolute; inset: auto; left: 0; top: 0; z-index: 5; }   /* drawn inside the scrolling column, so it moves with the numbers */

@media (prefers-reduced-motion: reduce) {
  .exdraw path { transition: none; }
}
