/*
 * The visual explainers and the watch-along lists (src/visuals.ts,
 * public/static/visuals.js). Every color is a site token, so each visual
 * wears the light and dark themes and every Appearance palette. Calm on
 * purpose: one accent (--primary) for "now", --ok-fg for "done", soft fills,
 * short glides between steps, nothing that moves on its own until Play.
 * With less motion asked for, nothing glides and there is no Play.
 */
.vz {
  --vz-hot: var(--primary);
  --vz-soft: color-mix(in srgb, var(--primary) 12%, var(--bg));
  --vz-done: var(--ok-fg);
  --vz-done-soft: color-mix(in srgb, var(--ok-fg) 14%, var(--bg));
  --vz-warn: var(--warn-fg);
  --vz-ink: var(--text);
  --vz-dim: var(--text-dim);
  position: relative; margin: 0; padding: 18px 20px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  min-width: 0; overflow: hidden;
}
.vz + .vz { margin-top: 16px; }
.vz-head { display: grid; gap: 2px; margin-bottom: 12px; }
.vz-kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--link); }
.vz-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--text); }
.vz-blurb { font-size: 14px; line-height: 1.5; color: var(--text-body); }

.vz-stage { position: relative; min-width: 0; font-size: 14px; color: var(--text-body); }
.vz-label { margin: 10px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.vz-label:first-child { margin-top: 0; }
.vz-svg { display: block; width: 100%; height: auto; max-height: 300px; overflow: visible; font-family: var(--font); font-size: 13px; }
.vz-svg text { fill: var(--vz-ink); font-weight: 600; }
.vz-svg .vz-tiny { font-size: 10.5px; font-weight: 500; fill: var(--vz-dim); letter-spacing: 0.02em; }

/* Layouts: a drawing with a side column; stacked on narrow screens. */
.vz-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px 24px; align-items: start; }
.vz-split > .vz-svg { order: 2; }
.vz-split.vz-split-code { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); }
.vz-side { min-width: 0; }
.vz-row { display: flex; flex-wrap: wrap; gap: 8px 32px; }
@media (max-width: 719px) {
  .vz-split, .vz-split.vz-split-code { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .vz-split > .vz-svg { order: 0; max-height: 300px; }
}

/* Shared marks */
.vz-arrow path { fill: none; stroke: var(--text-dim); stroke-width: 1.6; stroke-linecap: round; }
.vz-arrow polygon { fill: var(--text-dim); }
.vz-arrow.is-enc path { stroke: var(--text-body); }
.vz-arrow.is-enc polygon { fill: var(--text-body); }
.vz-arrow.is-closure path { stroke: var(--vz-hot); stroke-dasharray: 4 3; }
.vz-arrow.is-closure polygon { fill: var(--vz-hot); }
.vz-arrow.is-hot path { stroke: var(--vz-hot); stroke-width: 2.4; }
.vz-arrow.is-hot polygon { fill: var(--vz-hot); }
.vz-arrow.is-root path { stroke: var(--text-body); }
.vz-arrow.is-gone { opacity: 0.25; }
.vz-arrow.is-ptr path { stroke: var(--text-body); stroke-width: 1.3; }
.vz-arrow.is-new path { stroke: var(--vz-hot); }
.vz-arrow.is-new polygon { fill: var(--vz-hot); }
.vz-key { stroke-width: 1.8; }
.vz-key.is-closure { stroke: var(--vz-hot); stroke-dasharray: 4 3; }
.vz-key.is-enc { stroke: var(--text-body); }
.vz-edge { stroke: var(--line-strong); stroke-width: 1.6; }
.vz-edge.is-path { stroke: var(--vz-hot); stroke-width: 2.2; }
.vz-node { fill: var(--bg); stroke: var(--text-body); stroke-width: 1.6; transition: fill 0.2s, stroke 0.2s; }
.vz-node.is-op { fill: var(--bg-soft); }
.vz-node.is-done { fill: var(--vz-done-soft); stroke: var(--vz-done); }
.vz-node.is-hot { fill: var(--vz-hot); stroke: var(--vz-hot); }
.vz-node.is-hot + text { fill: var(--primary-ink); }
.vz-ord { font-size: 10.5px; fill: var(--vz-done) !important; }

.vz-code { list-style: none; margin: 0; padding: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); font: 13px/1.55 var(--mono); counter-reset: ln; overflow: hidden; }
.vz-code li { counter-increment: ln; display: flex; gap: 10px; padding: 0 12px 0 0; white-space: pre; color: var(--text-body); transition: background-color 0.2s; }
.vz-code li::before { content: counter(ln); flex: 0 0 2.2em; text-align: right; color: var(--text-dim); opacity: 0.7; }
.vz-code li span { overflow: hidden; text-overflow: ellipsis; }
.vz-code li.is-at { background: var(--vz-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--vz-hot); }
.vz-code.is-knuth li::before { content: ''; flex-basis: 6px; }
.vz-out { margin-top: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vz-out .vz-label { margin: 0; }
.vz-out b { font: 600 15px var(--mono); color: var(--text); }
.vz-seq { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; min-height: 30px; align-items: center; }
.vz-seq b { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--vz-done-soft); color: var(--text); font: 600 14px var(--mono); }
.vz-seq.is-stack b { background: var(--bg-muted); }
.vz-seq.is-nums b { background: var(--bg-muted); font-size: 13px; }
.vz-seq.is-nums b.is-now { background: var(--vz-hot); color: var(--primary-ink); }

/* The narration, the progress line and the controls. */
.vz-track { height: 3px; margin: 14px 0 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.vz-fill { display: block; height: 100%; width: 0; background: var(--vz-hot); border-radius: 3px; transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.vz-say { min-height: 3em; margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.vz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.vz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 6px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--text-body);
  font: 600 14px/1 var(--font); cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.vz-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vz-btn .vz-i-play { fill: currentColor; stroke-width: 1.4; }
.vz-btn .vz-i-pause, .vz.is-playing .vz-btn .vz-i-play { display: none; }
.vz.is-playing .vz-btn .vz-i-pause { display: block; stroke-width: 2.6; }
.vz-btn:hover { border-color: var(--vz-hot); color: var(--vz-hot); }
.vz-btn:disabled { opacity: 0.4; cursor: default; border-color: var(--line-strong); color: var(--text-body); }
.vz-btn[data-act='back'] { padding: 6px; }
.vz-btn.is-main { background: var(--vz-hot); border-color: var(--vz-hot); color: var(--primary-ink); padding-inline: 16px 12px; }
.vz-btn.is-main:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.vz-btn[aria-pressed='true'] { background: var(--vz-soft); border-color: var(--vz-hot); color: var(--vz-hot); }
.vz-speed select { width: 5.6em; min-height: 36px; padding: 4px 24px 4px 12px; border-radius: 999px; font-size: 14px; }
.vz-count { margin-left: auto; font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .vz-btn, .vz-speed select { min-height: 44px; min-width: 44px; } }
/* Phones: Play and Reset keep their icons and drop their words, so the controls stay on one row. */
@media (max-width: 479px) {
  .vz { padding: 16px 16px 12px; }
  .vz-bar { gap: 6px; }
  .vz-btn[data-act='play'], .vz-btn[data-act='reset'] { padding: 6px; }
  .vz-btn[data-act='play'] .vz-play-t, .vz-btn[data-act='reset'] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .vz-speed select { width: 5em; padding-inline: 10px 20px; }
  /* The progress line above already says how far along it is. */
  .vz-count { display: none; }
  .vz-code { font-size: 12px; line-height: 1.45; }
}

/* Inputs some visuals add above the stage. */
.vz-extras { margin: -2px 0 14px; }
.vz-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vz-form input { flex: 1 1 12rem; width: auto; min-height: 36px; padding: 6px 12px; font-size: 15px; }
.vz-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-muted); gap: 2px; flex-wrap: wrap; }
.vz-seg-b { min-height: 32px; padding: 4px 14px; border: 0; border-radius: 999px; background: none; color: var(--text-body); font: 600 13px var(--font); cursor: pointer; transition: background-color 0.15s, color 0.15s, box-shadow 0.15s; }
.vz-seg-b[aria-pressed='true'] { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(3, 7, 18, 0.12); }
@media (pointer: coarse) { .vz-seg-b { min-height: 40px; } }

/* 1. Scanner */
.vz-src { display: flex; flex-wrap: wrap; gap: 3px; font: 600 17px var(--mono); }
.vz-ch { position: relative; display: inline-grid; place-items: center; width: 24px; height: 34px; border-radius: 6px; background: var(--bg-soft); color: var(--text); transition: background-color 0.2s, color 0.2s; }
.vz-ch.is-sp { color: var(--text-dim); }
.vz-ch.is-past { color: var(--text-dim); background: none; }
.vz-ch.is-lex { background: var(--vz-soft); color: var(--vz-hot); }
.vz-ch.is-cur::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-bottom-color: var(--vz-hot); }
.vz-ch.is-end { background: none; width: 10px; }
.vz-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 16px 0 0; font-size: 13px; color: var(--text-dim); }
.vz-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.vz-lexeme { padding: 1px 6px; border-radius: 5px; background: var(--vz-soft); color: var(--vz-hot); font-weight: 600; }
.vz-toks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-height: 56px; align-content: flex-start; }
.vz-tok { display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); line-height: 1.2; }
.vz-tok b { font-size: 10.5px; letter-spacing: 0.04em; color: var(--text-dim); }
.vz-tok code { font-size: 14px; color: var(--text); }
.vz-tok.is-new { border-color: var(--vz-hot); box-shadow: 0 0 0 3px var(--vz-soft); }
.vz-tok.is-new b { color: var(--vz-hot); }
.vz-tok.is-empty { border-style: dashed; color: var(--text-dim); font-size: 13px; justify-content: center; }

/* 2. Parser */
.vz-rules, .vz-calls { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.vz-rules li { padding: 3px 8px; border-radius: 6px; font-size: 12.5px; color: var(--text-dim); transition: background-color 0.2s, color 0.2s; }
.vz-rules li code { font-size: inherit; }
.vz-rules li.is-open { color: var(--text-body); }
.vz-rules li.is-at { background: var(--vz-soft); color: var(--vz-hot); }
.vz-calls { display: flex; flex-wrap: wrap; gap: 4px; }
.vz-calls li { padding: 2px 8px; border-radius: 6px; background: var(--bg-muted); font: 600 12.5px var(--mono); color: var(--text-body); }
.vz-calls li:last-child { background: var(--vz-hot); color: var(--primary-ink); }
.vz-sexp { margin: 0; font-size: 13.5px; color: var(--text); }
.vz-ptok rect { fill: var(--bg-soft); stroke: var(--line); }
.vz-ptok.is-used rect { fill: var(--bg); stroke: var(--line); }
.vz-ptok.is-used text { fill: var(--text-dim); }
.vz-ptok.is-next rect { stroke: var(--vz-hot); stroke-width: 1.6; }
.vz-caret { fill: none; stroke: var(--vz-hot); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 3. Environments */
.vz-env { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.4; transition: fill 0.2s, stroke 0.2s; }
.vz-env.is-active { fill: var(--vz-soft); stroke: var(--vz-hot); }
.vz-env.is-kept { fill: var(--bg-soft); stroke: var(--text-dim); stroke-dasharray: 5 3; }
.vz-svg .vz-et { font-size: 11px; font-weight: 600; fill: var(--text-dim); letter-spacing: 0.03em; }
.vz-svg .vz-vn { font-family: var(--mono); font-weight: 600; }
.vz-svg .vz-vn.is-dim { fill: var(--text-dim); font-family: var(--font); font-weight: 500; }
.vz-svg .vz-vv { font-family: var(--mono); font-size: 12px; font-weight: 500; fill: var(--text-body); }
.vz-var.is-found text, .vz-var.is-hot text { fill: var(--vz-hot); }
.vz-fn { fill: var(--bg); stroke: var(--vz-hot); stroke-width: 1.4; }
.vz-svg .is-closure-t { fill: var(--vz-hot); }

/* 4. VM */
.vz-vm { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 28px; }
.vz-vm-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px 16px; align-content: start; }
.vz-bytes { display: flex; flex-wrap: wrap; gap: 3px; font: 13px var(--mono); }
.vz-byte { padding: 3px 5px; border-radius: 5px; background: var(--bg-soft); color: var(--text-body); transition: background-color 0.2s, color 0.2s; }
.vz-byte.is-ip { background: var(--vz-hot); color: var(--primary-ink); }
.vz-dis { width: 100%; border-collapse: collapse; font: 13px/1.4 var(--mono); }
.vz-dis td { padding: 4px 6px; border-top: 1px solid var(--line); color: var(--text-body); white-space: nowrap; }
.vz-dis tr:first-child td { border-top: 0; }
.vz-dis tr.is-did td { background: var(--vz-soft); color: var(--text); }
.vz-ipcol { width: 30px; }
.vz-ip { display: inline-block; padding: 1px 6px; border-radius: 999px; background: var(--vz-hot); color: var(--primary-ink); font: 600 11px var(--font); }
.vz-off { color: var(--text-dim) !important; }
.vz-consts { margin: 0; padding: 0; list-style: none; counter-reset: k -1; display: grid; gap: 3px; }
.vz-consts li { counter-increment: k; display: flex; gap: 8px; font: 13px var(--mono); color: var(--text); }
.vz-consts li::before { content: '[' counter(k) ']'; color: var(--text-dim); }
.vz-stack { list-style: none; margin: 0; padding: 4px; min-height: 120px; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 4px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: var(--bg-soft); }
.vz-stack li { padding: 6px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-strong); font: 600 14px var(--mono); color: var(--text); text-align: center; }
.vz-stack li:last-child { border-color: var(--vz-hot); }
.vz-stack-top { margin-top: 4px; font-size: 11px; color: var(--text-dim); }
.vz-printed { margin: 0; font: 600 18px var(--mono); color: var(--vz-done); }
.vz-none { font: 500 13px var(--font); color: var(--text-dim); }
@media (max-width: 719px) { .vz-vm { grid-template-columns: minmax(0, 1fr); } .vz-stack { min-height: 0; } }

/* 5. Hash table */
.vz-hash .vz-meta { margin: 0 0 12px; }
.vz-op { color: var(--text); font-weight: 600; }
.vz-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.vz-slots.is-16 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.vz-slot { position: relative; display: grid; align-content: start; gap: 2px; min-height: 64px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); transition: background-color 0.2s, border-color 0.2s; }
.vz-slot-i { font-size: 11px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.vz-slot-k { overflow: hidden; text-overflow: ellipsis; font: 600 13px var(--mono); color: var(--text); white-space: nowrap; }
.vz-slot-h { font-size: 10.5px; color: var(--text-dim); }
.vz-slot.is-empty { background: var(--bg-soft); border-style: dashed; }
.vz-slot.is-empty .vz-slot-k { font: 500 11px var(--font); }
.vz-slot.is-tomb { background: repeating-linear-gradient(-45deg, var(--bg-soft) 0 6px, var(--bg-muted) 6px 12px); }
.vz-slot.is-tomb .vz-slot-k { font: 500 11px var(--font); color: var(--text-dim); }
.vz-slot.is-probe { border-color: var(--vz-hot); box-shadow: 0 0 0 3px var(--vz-soft); }
.vz-slot.is-clash { border-color: var(--vz-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vz-warn) 18%, transparent); }
.vz-slot.is-hit { background: var(--vz-done-soft); border-color: var(--vz-done); box-shadow: none; }
.vz-slot.is-miss { border-color: var(--text-dim); }
@media (max-width: 599px) { .vz-slots, .vz-slots.is-16 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .vz-slot { min-height: 54px; } }

/* 6. Mark and sweep */
.vz-root { fill: var(--bg-muted); stroke: var(--line-strong); }
.vz-obj { stroke-width: 1.8; transition: fill 0.25s, stroke 0.25s, opacity 0.25s; }
.vz-obj.is-white { fill: var(--bg); stroke: var(--text-body); }
.vz-obj.is-gray { fill: color-mix(in srgb, var(--text-dim) 35%, var(--bg)); stroke: var(--text-body); }
.vz-obj.is-black { fill: var(--text); stroke: var(--text); }
.vz-obj.is-cur { stroke: var(--vz-hot); stroke-width: 3; }
.vz-obj.is-freed { fill: none; stroke: var(--text-dim); stroke-dasharray: 3 3; opacity: 0.5; }
.vz-svg .vz-obj-t.is-black { fill: var(--bg); }
.vz-svg .vz-obj-t.is-freed { fill: var(--text-dim); opacity: 0.6; }
.vz-hl rect { fill: var(--bg-soft); stroke: var(--line); }
.vz-hl.is-swept rect { fill: var(--vz-done-soft); stroke: var(--vz-done); }
.vz-hl.is-freed rect { fill: none; stroke: var(--text-dim); stroke-dasharray: 3 2; }
.vz-hl.is-freed text { fill: var(--text-dim); text-decoration: line-through; }
.vz-hl.is-cur rect { stroke: var(--vz-hot); stroke-width: 2; }
.vz-split:has(.vz-gc-side) { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr); }
.vz-graystack { list-style: none; margin: 0; padding: 4px; min-height: 40px; display: flex; flex-direction: column-reverse; gap: 4px; max-width: 120px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: var(--bg-soft); }
.vz-graystack li { padding: 4px 10px; border-radius: 6px; background: color-mix(in srgb, var(--text-dim) 35%, var(--bg)); font: 600 13px var(--mono); color: var(--text); text-align: center; }
.vz-graystack li.is-empty { background: none; color: var(--text-dim); font: 500 12px var(--font); }
.vz-legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-body); }
.vz-legend li { display: flex; align-items: center; gap: 8px; }
.vz-legend i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--text-body); flex: none; }
.vz-legend i.is-gray { background: color-mix(in srgb, var(--text-dim) 35%, var(--bg)); }
.vz-legend i.is-black { background: var(--text); border-color: var(--text); }
@media (max-width: 719px) { .vz-gc-side { display: flex; flex-wrap: wrap; gap: 4px 24px; } .vz-gc-side .vz-label { flex-basis: 100%; } .vz-legend { margin: 0; } }

/* 7. Linked lists */
.vz-cell { fill: var(--bg); stroke: var(--text-body); stroke-width: 1.4; }
.vz-cell.is-link { fill: var(--bg-soft); }
.vz-dot { fill: var(--text-body); }
.vz-svg .vz-nil { font-size: 15px; font-weight: 500; fill: var(--text-dim); }
.vz-ptr { fill: var(--bg-muted); stroke: var(--line-strong); }
.vz-ptr.is-p { fill: var(--vz-soft); stroke: var(--vz-hot); }
.vz-ptr + text { font-size: 12px; }

/* 8. Trees */
.vz-split.vz-trees { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr); }
.vz-trees .vz-side { display: grid; gap: 4px 24px; align-content: start; }
.vz-trees .vz-svg { max-height: 260px; }
.vz-walker { fill: var(--bg); stroke: var(--vz-hot); stroke-width: 2.4; }
.vz-walker.is-visit { fill: var(--vz-hot); }

/* 9. Sorting */
.vz-sorts { display: grid; gap: 8px; }
.vz-lane-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 4px; font-size: 13px; color: var(--text); }
.vz-lane-c { margin-left: auto; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.vz-bars { list-style: none; margin: 0; padding: 0; height: 58px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; }
.vz-bars li { position: relative; height: var(--h); min-height: 14px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--text-dim) 30%, var(--bg)); transition: background-color 0.2s; }
.vz-bars li span { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font: 600 10.5px var(--mono); color: var(--text); }
.vz-bars li.is-hi { background: var(--vz-hot); }
.vz-bars li.is-hi span { color: var(--primary-ink); }
.vz-bars li.is-done { background: var(--vz-done-soft); box-shadow: inset 0 0 0 1px var(--vz-done); }

/* 10. LCG */
.vz-lcg { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.vz-plotbox { justify-self: center; width: 100%; max-width: 236px; }
.vz-axis { margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--text-dim); }
.vz-plot { fill: var(--bg-soft); stroke: var(--line); }
.vz-pt { fill: var(--vz-hot); opacity: 0.75; }
.vz-pt.is-new { opacity: 1; fill: var(--vz-warn); }
.vz-formula { margin: 0 0 4px; font-size: 13.5px; color: var(--text-body); }
.vz-formula.is-now { color: var(--text); }
.vz-formula b { color: var(--vz-hot); }
.vz-period { margin: 10px 0 0; font-size: 14px; color: var(--text-body); }
.vz-period b { color: var(--text); font-size: 16px; }
.vz-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--text-body); }
.vz-checks li { display: flex; gap: 6px; }
.vz-checks li > span:first-child { flex: none; width: 1.1em; font-weight: 700; }
.vz-checks .is-ok > span:first-child { color: var(--vz-done); }
.vz-checks .is-no > span:first-child { color: var(--danger); }
.vz-sliders { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; }
.vz-sliders label { display: grid; gap: 2px; flex: 1 1 140px; font-size: 13px; color: var(--text-body); }
.vz-sliders label.vz-m { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.vz-sliders output { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.vz-sliders input[type='range'] { width: 100%; accent-color: var(--primary); }
.vz-sliders select { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: 14px; }
.vz-presets { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 719px) { .vz-lcg { grid-template-columns: minmax(0, 1fr); } .vz-plotbox { max-width: 210px; } }
@media (max-width: 479px) {
  .vz-sliders { gap: 8px 14px; }
  .vz-sliders select { width: 4.6em; }
  .vz-presets .btn { padding-inline: 8px; }
}

/* 11. Exact cover */
.vz-dlx { grid-template-columns: auto minmax(0, 1fr); }
.vz-matrix { border-collapse: separate; border-spacing: 3px; font: 13px var(--mono); }
.vz-matrix th { padding: 2px 6px; font-weight: 600; color: var(--text); text-align: center; transition: opacity 0.2s; }
.vz-matrix tbody th { text-align: left; color: var(--text-body); white-space: nowrap; }
.vz-matrix thead th.is-covered { opacity: 0.35; text-decoration: line-through; }
.vz-matrix thead th.is-item { color: var(--vz-hot); box-shadow: inset 0 -2px 0 var(--vz-hot); }
.vz-matrix td { width: 26px; height: 24px; border-radius: 5px; background: var(--bg-soft); text-align: center; transition: background-color 0.2s, opacity 0.2s; }
.vz-matrix td i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-body); }
.vz-matrix tr.is-out { opacity: 0.28; }
.vz-matrix tr.is-trying td, .vz-matrix tr.is-trying th { background: var(--vz-soft); }
.vz-matrix tr.is-chosen td i { background: var(--vz-done); }
.vz-matrix tr.is-chosen th { color: var(--vz-done); }
.vz-matrix tr.is-trying td i { background: var(--vz-hot); }
.vz-matrix tr.is-undone th { text-decoration: line-through; color: var(--text-dim); }
.vz-chosen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.vz-chosen li { padding: 3px 8px; border-radius: 6px; background: var(--vz-done-soft); font: 600 13px var(--mono); color: var(--text); }
.vz-chosen li.is-empty { background: none; padding: 3px 0; color: var(--text-dim); font: 500 13px var(--font); }
.vz-win { color: var(--vz-done); font-weight: 600; }
@media (max-width: 719px) { .vz-dlx { grid-template-columns: minmax(0, 1fr); } }

/* Without script, the first frame is the picture; while playing, the glides do the talking. */
@media (prefers-reduced-motion: reduce) {
  .vz *, .vz *::before, .vz *::after { transition: none !important; animation: none !important; }
}

/* ---- the "See it" card on a guide ---- */
.vz-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.vz-all { font-size: 14px; font-weight: 500; }
.vz-hint { margin: 0 0 12px; }

/* ---- watch along ---- */
.vz-watch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.vz-watch-a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; margin: 0 -12px; border-radius: 10px; color: inherit; text-decoration: none; transition: background-color 0.15s; }
.vz-watch-a:hover { background: var(--bg-soft); }
.vz-play { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 1px; border-radius: 50%; background: var(--primary-soft); color: var(--link); transition: background-color 0.15s, color 0.15s; }
.vz-play svg { fill: currentColor; margin-left: 2px; }
.vz-watch-a:hover .vz-play { background: var(--primary); color: var(--primary-ink); }
.vz-watch-txt { display: grid; gap: 1px; min-width: 0; }
.vz-watch-t { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); }
.vz-watch-a:hover .vz-watch-t { color: var(--link); }
.vz-watch-m { font-size: 13px; color: var(--text-dim); }
.vz-watch-why { margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--text-body); }

/* ---- /visuals ---- */
.vz-page-head { margin-bottom: 28px; }
.vz-lede { max-width: var(--measure); margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-body); }
.vz-nav { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vz-nav a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); font-size: 13.5px; font-weight: 500; color: var(--text-body); text-decoration: none; }
.vz-nav a:hover { border-color: var(--primary); color: var(--primary); }
@media (pointer: coarse) { .vz-nav a { min-height: 40px; } }
.vz-list { display: grid; gap: 28px; }
.vz-guides { margin: 10px 2px 0; font-size: 14px; line-height: 1.7; }
.vz-watch-all { margin-top: var(--section); }
.vz-watch-all .vz-lede { margin-bottom: 8px; }
.vz-watch-phase { margin-top: 24px; }
.vz-watch-ph { margin: 0 0 6px; font-size: var(--h3); font-weight: 600; color: var(--text); }
.vz-watch-ph .dim { font-size: 14px; font-weight: 500; }
