/* The shared frame for the drawn figures (public/js/viz.js), 2026-11-22. */
.viz { position: relative; width: 100%; margin: 0; }
.viz canvas { display: block; width: 100%; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.viz canvas:focus { outline: none; }
.viz canvas:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.viz-replaced { display: none !important; }
.viz-pipeline ~ .pipe-list { display: none !important; }
.viz-inkbar { max-width: 680px; }
/* the detail card: beside the mark on a wide figure, under the figure on a narrow one */
.viz-card { --card-accent: var(--cyan); position: absolute; z-index: 4; max-width: 310px; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: rgba(19, 18, 17, .96); border: 1px solid var(--line); border-top: 2px solid var(--card-accent); padding: 10px 14px 12px; font-size: 14px; line-height: 1.5; color: var(--text);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .72); overflow-wrap: anywhere; }
.viz-card.on { opacity: 1; pointer-events: auto; }
.viz-card b { display: block; font-family: var(--mono); font-weight: 400; color: var(--card-accent); font-size: 13px; letter-spacing: .05em; margin-bottom: 4px; }
.viz-card span { display: block; color: var(--muted); }
.viz-card a { display: inline-block; margin-top: 8px; color: var(--text); border-bottom: 1px solid var(--edge, #77736a); text-decoration: none; min-height: 24px; }
.viz-card a:hover { border-bottom-width: 2px; }
.viz-card.dock { position: static; max-width: none; margin-top: 10px; display: none; }
.viz-card.dock.on { display: block; }
.viz-hint { margin: 10px 0 0; color: var(--dim); font-size: 11px; line-height: 1.5; }
@media (hover: hover) { .viz-hint .tap { display: none; } }
@media (hover: none) { .viz-hint .hov { display: none; } }
@media (prefers-reduced-motion: reduce) { .viz-card { transition: none; } }
/* captions and labels never run past the screen edge on a phone */
figcaption, .head-fig figcaption, .fig-cap { overflow-wrap: anywhere; }
@media (forced-colors: active) { .viz-card { border-color: CanvasText; } }
