/* WBS Viz: the shared look of every explanatory graphic on the page (Nathan, 2026-10-26: one style for all
   graphics so they improve together, branded like the page they sit on). A graphic is a dark panel with a
   header (Timegate light and a live readout), a canvas drawn by viz.js, and an optional pill switch below.
   The colors and type are the Silencer page's own: the "reimagined" blue-to-violet, Inter labels in the page's
   kicker style, Swiss 721 numbers. Colors carry meaning everywhere: white = dry signal, violet = reverb,
   blue = Timegate. */
.viz {
  --viz-bg: #08060f;
  --viz-line: rgba(255,255,255,.08);
  --viz-label: rgba(255,255,255,.5);
  --viz-on: #81daff;
  --viz-grad: linear-gradient(90deg, #81daff, #c38eff);
  --viz-head: 42px;
  position: relative; overflow: hidden; border-radius: 18px;
  background:
    radial-gradient(90% 80% at 15% 0%, rgba(98,19,255,.10), transparent 60%),
    radial-gradient(70% 70% at 100% 100%, rgba(209,21,111,.07), transparent 60%),
    var(--viz-bg);
  box-shadow: inset 0 0 0 1px var(--viz-line), inset 0 1px 0 rgba(255,255,255,.05), 0 30px 80px rgba(0,0,0,.35);
  -webkit-font-smoothing: antialiased;
}
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.viz[data-click] { cursor: pointer; }

.viz-head { position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: var(--viz-head); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.06); font: 600 11px/1 Inter, -apple-system, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--viz-label); white-space: nowrap; pointer-events: none; }
.viz-title { font-weight: 700; color: #fff; }
.viz-chip { display: inline-flex; align-items: center; gap: 9px; }
.viz-chip i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.28); transition: background-color 300ms, box-shadow 300ms; }
.viz-chip b { font-weight: 700; color: #fff; transition: color 300ms; }
.viz.on .viz-chip i { background: var(--viz-on); box-shadow: 0 0 10px var(--viz-on); }
.viz.on .viz-chip b, .viz.on .viz-read b { color: var(--viz-on); }
.viz-read { display: inline-flex; align-items: baseline; gap: 10px; }
.viz-read b { font: inherit; font-weight: 700; letter-spacing: .06em; text-transform: none; color: #fff; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; transition: color 300ms; }

/* Pill switch: a larger version of the feature-tabs pill. With Timegate on it takes the page's
   "reimagined" gradient. */
.viz-switch { --h: 54px; position: relative; display: inline-flex; max-width: 100%; height: var(--h); padding: 5px; border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(195,142,255,.28); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); -webkit-font-smoothing: antialiased; }
.viz-ind { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: rgba(255,255,255,.16); transition: transform 320ms ease-out, width 320ms ease-out; pointer-events: none; overflow: hidden; }
.viz-ind::after { content: ""; position: absolute; inset: 0; background: var(--viz-grad, linear-gradient(90deg, #81daff, #c38eff)); opacity: 0; transition: opacity 320ms ease-out; }
.viz-switch.on .viz-ind::after { opacity: 1; }
.viz-switch button { position: relative; z-index: 1; height: 100%; padding: 0 24px; border: 0; border-radius: 999px; background: none; color: #fff; opacity: .8; font: 500 17px/1 Inter, -apple-system, system-ui, sans-serif; letter-spacing: -.01em; white-space: nowrap; cursor: pointer; transition: opacity 100ms ease-in-out, color 160ms ease-in 160ms; }
.viz-switch button:hover, .viz-switch button[aria-pressed="true"] { opacity: 1; }
.viz-switch button[aria-pressed="true"] { cursor: auto; }
.viz-switch.on button[aria-pressed="true"] { color: #0b0718; }
.viz-switch button:focus { outline: none; }
.viz-switch.sm { --h: 46px; }
.viz-switch.sm button { padding: 0 18px; font-size: 15px; }

/* Play button: a round member of the pill switch family. Playing, it takes the same gradient. */
.viz-play { flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(195,142,255,.28); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; cursor: pointer; transition: background 320ms ease-out, color 160ms; }
.viz-play:hover { background: rgba(255,255,255,.14); }
.viz-play.on { background: var(--viz-grad, linear-gradient(90deg, #81daff, #c38eff)); color: #0b0718; }
.viz-play:focus { outline: none; }
.viz-play svg { width: 18px; height: 18px; }

/* Speaker: plays the recording a graphic shows, in the header's right corner. */
.viz-sound { pointer-events: auto; flex: none; width: 28px; height: 28px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(195,142,255,.28); color: #fff; cursor: pointer; transition: background 320ms ease-out, color 160ms; }
.viz-sound:hover { background: rgba(255,255,255,.14); }
.viz-sound.on { background: var(--viz-grad, linear-gradient(90deg, #81daff, #c38eff)); color: #0b0718; box-shadow: none; }
.viz-sound:focus { outline: none; }
.viz-sound:focus-visible { box-shadow: 0 0 0 2px #81daff; }
.viz-sound svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.viz-caption { display: grid; margin: 0; color: rgba(255,255,255,.72); font-size: 17px; }
/* Every caption shares one cell, so the box keeps the height of the longest one and nothing moves on switch. */
.viz-caption span { grid-area: 1 / 1; opacity: 0; transform: translateY(4px); transition: opacity 300ms, transform 300ms; }
.viz-caption span.show { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .viz { --viz-head: 38px; border-radius: 14px; }
  .viz-head { padding: 0 12px; font-size: 9.5px; letter-spacing: .12em; }
  .viz-switch { --h: 46px; }
  .viz-switch button { padding: 0 16px; font-size: 15px; }
}
