/* ============ Animated explainers ============ */
.viz {
  margin: 0; border-radius: 20px; background: #120f19; color: #f3eff9;
  border: 1px solid #2f2840; padding: 16px 18px 16px; overflow: hidden; position: relative;
}
.viz-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px;
  font: 700 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: #c6f03a;
}
.viz-replay {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #3a3347; background: #1d1827;
  color: #f3eff9; cursor: pointer; font-size: 1rem; transition: transform .3s, border-color .2s;
}
.viz-replay:hover { transform: rotate(-180deg); border-color: #c6f03a; }
.viz-stage svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz svg text { font-family: var(--font-body); fill: #f3eff9; }
.viz svg text.mut, .viz svg .mut { fill: #a8a1b6; }
.viz-cap { margin: 12px 0 0; font-size: .88rem; color: #b9b2c7; line-height: 1.5; }
.viz-slot { margin: 22px 0 6px; max-width: 68ch; }
.lesson .viz-slot { max-width: 100%; }

/* Animations only run once the figure is in view */
.viz:not(.play) *, .viz:not(.play) *::before, .viz:not(.play) *::after { animation-play-state: paused !important; }
.viz svg [class*="vz-"], .viz svg .nn-node, .viz svg .ag-st { transform-box: fill-box; transform-origin: center; }

@keyframes vz-pop { from { transform: scale(0); opacity: 0; } }
@keyframes vz-fade { from { opacity: 0; } }
@keyframes vz-up { from { transform: translateY(26px); opacity: 0; } }
@keyframes vz-left { from { transform: translateX(-22px); opacity: 0; } }
@keyframes vz-draw { from { stroke-dashoffset: 1; } }
@keyframes vz-flowing { to { stroke-dashoffset: -28; } }
@keyframes vz-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); filter: drop-shadow(0 0 12px #c6f03a); } }
@keyframes vz-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes vz-seg { from { background: #2a2337; box-shadow: none; } }
@keyframes vz-grow { from { width: 0; } }

.vz-pop { animation: vz-pop .6s cubic-bezier(.2, .9, .3, 1.35) both; animation-delay: var(--d, 0s); }
.vz-fade { animation: vz-fade .7s ease both; animation-delay: var(--d, 0s); }
.vz-up { animation: vz-up .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
.vz-left { animation: vz-left .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
.vz-draw { stroke-dasharray: 1; animation: vz-draw 1.3s ease-out both; animation-delay: var(--d, 0s); }
.vz-flow { stroke-dasharray: 4 10; animation: vz-flowing 1s linear infinite; animation-delay: var(--d, 0s); }
.vz-beat { animation: vz-beat 1.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.vz-bob { animation: vz-bob 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); }

/* Lane: dots travelling from left to right */
.lane {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  height: 52px; padding: 0 12px; border-radius: 14px; background: #1b1724; border: 1px solid #2f2840; font-size: 1.5rem;
}
.lane > span { position: relative; z-index: 1; }
.lane i {
  position: absolute; left: 16%; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: #c6f03a; box-shadow: 0 0 10px #c6f03a; opacity: 0;
  animation: vz-lane var(--t, 2s) linear infinite; animation-delay: calc(var(--t, 2s) * var(--k, 0) / 3);
}
@keyframes vz-lane { 0% { left: 16%; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { left: 72%; opacity: 0; } }

/* Next token */
.nt { display: grid; gap: 12px; justify-items: center; }
.nt-seq { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 40px; }
.nt-seq span {
  font: 600 1rem var(--font-mono); padding: 6px 10px; border-radius: 9px; background: #241e31; border: 1px solid #3a3347;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.nt-seq.feed span { transform: translateY(4px); border-color: #9f8aff; box-shadow: 0 6px 14px -6px #9f8aff; }
.nt-seq span.new { background: #c6f03a; color: #111; border-color: #c6f03a; animation: vz-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
.nt-arrow { font: .78rem var(--font-mono); color: #a8a1b6; }
.nt-model {
  display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-radius: 16px; min-width: 260px;
  background: linear-gradient(135deg, #3d2e68, #5b3cf5); border: 1px solid #7d63ff; transition: box-shadow .3s;
}
.nt-model.think { box-shadow: 0 0 0 4px rgba(198, 240, 58, .25), 0 0 40px -6px #c6f03a; }
.nt-model.think .nt-brain { animation: vz-beat .5s ease-in-out infinite; }
.nt-brain { font-size: 1.8rem; display: inline-block; }
.nt-model b { display: block; }
.nt-model small { font: .85rem var(--font-mono); color: #e4ddf3; }

/* Training vs inference */
.ti { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ti-col { background: #17131f; border: 1px solid #2f2840; border-radius: 16px; padding: 14px; }
.ti-col h5 { margin: 0 0 10px; font: 800 1.05rem var(--font-display); }
.ti-col ul { margin: 12px 0 0; padding: 0; list-style: none; font-size: .88rem; color: #cfc8dc; }
.ti-col li { padding: 3px 0; }
.ti-col li::before { content: "• "; color: #c6f03a; }
.ti-col.slow .lane i { background: #9f8aff; box-shadow: 0 0 10px #9f8aff; }
.ti-bar { height: 8px; border-radius: 99px; background: #2a2337; overflow: hidden; margin-top: 12px; }
.ti-bar b { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b3cf5, #c6f03a); animation: vz-grow 6s linear infinite; }
.ti-col.fast .ti-bar b { animation-duration: 1.1s; }

/* Prompt builder */
.pb { display: grid; grid-template-columns: 1fr 70px; gap: 16px; align-items: stretch; }
.pb-card { background: #f6f2ea; color: #16131d; border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; font-size: .92rem; }
.pb-line.base { font-weight: 700; }
.pb-line { line-height: 1.4; }
.pb-tag { display: inline-block; font: 700 .7rem var(--font-mono); text-transform: uppercase; color: #111; padding: 2px 8px; border-radius: 99px; margin-right: 8px; }
.pb-meter { display: flex; flex-direction: column; align-items: center; gap: 6px; font: .72rem var(--font-mono); color: #a8a1b6; }
.pb-segs { flex: 1; width: 28px; display: flex; flex-direction: column; gap: 4px; }
.pb-segs i { flex: 1; border-radius: 6px; background: #c6f03a; box-shadow: 0 0 10px -2px #c6f03a; }
.pb-segs i.vz-seg { animation: vz-seg .5s ease both; animation-delay: var(--d, 0s); }
.pb-segs i.on { background: #ff6a3d; box-shadow: none; }

/* Hallucination meter */
.hm { display: grid; gap: 12px; }
.hm-row { position: relative; background: #17131f; border: 1px solid #2f2840; border-radius: 14px; padding: 12px 14px; }
.hm-row p { margin: 0 0 8px; font-weight: 600; }
.hm-bar { display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center; font: .75rem var(--font-mono); color: #a8a1b6; margin-top: 4px; }
.hm-bar > div { height: 10px; border-radius: 99px; background: #2a2337; overflow: hidden; }
.hm-bar b { display: block; height: 100%; width: var(--w); border-radius: 99px; animation: vz-grow 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
.hm-bar b.conf { background: linear-gradient(90deg, #7d63ff, #b7a6ff); }
.hm-bar b.true { background: #c6f03a; }
.hm-bar b.false { background: #ff6a3d; }
.hm-stamp {
  position: absolute; right: 14px; top: 8px; font: 800 1rem var(--font-mono); font-style: normal; color: #ff6a3d;
  border: 3px solid #ff6a3d; border-radius: 8px; padding: 2px 8px; transform: rotate(-10deg);
  animation: vz-stamp .5s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: var(--d, 0s);
}
@keyframes vz-stamp { from { transform: scale(2.6) rotate(-10deg); opacity: 0; } }

/* Human in the loop */
.hl-track { position: relative; display: flex; justify-content: space-between; padding: 18px 4px 6px; }
.hl-track::before { content: ""; position: absolute; left: 12%; right: 12%; top: 46px; height: 3px; background: repeating-linear-gradient(90deg, #4a4160 0 8px, transparent 8px 14px); }
.hl-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 30%; }
.hl-node span { width: 60px; height: 60px; display: grid; place-items: center; font-size: 1.8rem; border-radius: 18px; background: #241e31; border: 2px solid #3a3347; }
.hl-node small { font-weight: 600; font-size: .85rem; text-align: center; }
.hl-node.human span { animation: vz-human 6s ease-in-out infinite; }
@keyframes vz-human { 0%, 28%, 66%, 100% { border-color: #3a3347; box-shadow: none; } 34%, 60% { border-color: #c6f03a; box-shadow: 0 0 24px -4px #c6f03a; } }
.hl-check { position: absolute; top: -10px; right: calc(50% - 40px); width: 26px; height: 26px; border-radius: 50%; background: #c6f03a; color: #111; display: grid; place-items: center; font-size: .9rem; animation: vz-check 6s ease infinite; }
@keyframes vz-check { 0%, 40% { transform: scale(0); } 46% { transform: scale(1.3); } 50%, 95% { transform: scale(1); } 100% { transform: scale(0); } }
.hl-doc { position: absolute; top: 4px; left: 46%; font-size: 1.4rem; font-style: normal; z-index: 2; animation: vz-doc 6s ease-in-out infinite; }
@keyframes vz-doc {
  0% { left: 10%; opacity: 0; } 6% { opacity: 1; } 30% { left: 46%; } 62% { left: 46%; }
  88% { left: 82%; opacity: 1; } 100% { left: 82%; opacity: 0; }
}

/* ML boundary */
.mlb-line { transform-box: view-box; transform-origin: 240px 135px; transform: rotate(-30deg); animation: vz-mlb 7s ease-in-out infinite; }
@keyframes vz-mlb { 0% { transform: rotate(35deg); } 25% { transform: rotate(-75deg); } 50% { transform: rotate(4deg); } 70%, 100% { transform: rotate(-30deg); } }
.mlb-e { opacity: 0; }
.mlb-e4 { opacity: 1; }
.mlb-e1 { animation: vz-e1 7s steps(1) infinite; }
.mlb-e2 { animation: vz-e2 7s steps(1) infinite; }
.mlb-e3 { animation: vz-e3 7s steps(1) infinite; }
.mlb-e4 { animation: vz-e4 7s steps(1) infinite; }
@keyframes vz-e1 { 0% { opacity: 1; } 22% { opacity: 0; } }
@keyframes vz-e2 { 0% { opacity: 0; } 22% { opacity: 1; } 47% { opacity: 0; } }
@keyframes vz-e3 { 0% { opacity: 0; } 47% { opacity: 1; } 68% { opacity: 0; } }
@keyframes vz-e4 { 0% { opacity: 0; } 68% { opacity: 1; } }

/* Neural net */
.nn-node { fill: #2a2337; animation: vz-node 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes vz-node { 0%, 40%, 100% { fill: #2a2337; } 12% { fill: #c6f03a; } }

/* Knobs */
.kn { display: grid; gap: 14px; }
.kn-desk { display: flex; justify-content: space-between; gap: 6px; padding: 14px; border-radius: 14px; background: #1b1724; border: 1px solid #2f2840; }
.kn-f { position: relative; width: 14px; height: 120px; }
.kn-f::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: #3a3347; }
.kn-f i { position: absolute; left: 0; top: var(--e); width: 14px; height: 18px; border-radius: 4px; background: #9f8aff; box-shadow: 0 0 8px -2px #9f8aff; animation: vz-knob 3.4s cubic-bezier(.4, 0, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes vz-knob { 0% { top: var(--s); } 45% { top: var(--m); } 100% { top: var(--e); background: #c6f03a; } }
.kn-f i { background: #c6f03a; }
.kn-out { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; font: .8rem var(--font-mono); color: #a8a1b6; }
.kn-bar { height: 12px; border-radius: 99px; background: #2a2337; overflow: hidden; }
.kn-bar b { display: block; height: 100%; width: 8%; border-radius: 99px; background: #ff6a3d; animation: vz-shrink 3.4s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes vz-shrink { from { width: 92%; } }

.loss-path { animation-duration: 3s; }

/* Denoise */
.dn { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: center; }
.dn-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; width: min(240px, 100%); aspect-ratio: 1; }
.dn-grid i { border-radius: 3px; background: rgba(198, 240, 58, .5); transition: background .14s linear; }
.dn-side { display: grid; gap: 10px; min-width: 160px; }
.dn-prompt { font: .85rem var(--font-mono); color: #a8a1b6; }
.dn-step { font: 800 1.3rem var(--font-display); }
.dn-bar { height: 8px; border-radius: 99px; background: #2a2337; overflow: hidden; }
.dn-bar b { display: block; height: 100%; width: 0; background: #c6f03a; transition: width .14s linear; }

/* Transformer */
.rnn-box { fill: #1b1724; stroke: #3a3347; animation: vz-rnn 3s linear infinite; animation-delay: var(--d, 0s); }
@keyframes vz-rnn { 0%, 18%, 100% { fill: #1b1724; } 2%, 15% { fill: #7d63ff; } }
.tf-box { fill: #2f3a14; stroke: #c6f03a; stroke-width: 1.5; }
.tf-arc { animation: vz-draw 1.3s ease-out both, vz-fadepulse 2.4s ease-in-out 1.6s infinite; animation-delay: var(--d, 0s), 1.6s; }
@keyframes vz-fadepulse { 50% { opacity: .35; } }

/* Agent */
.ag-orbit { transform-box: view-box; transform-origin: 170px 140px; animation: vz-spin 4s linear infinite; }
@keyframes vz-spin { to { transform: rotate(360deg); } }
.ag-st { fill: #1b1724; stroke: #3a3347; animation: vz-st 4s linear infinite; animation-delay: var(--d, 0s); }
@keyframes vz-st { 0%, 14% { fill: #2f3a14; stroke: #c6f03a; } 24%, 100% { fill: #1b1724; stroke: #3a3347; } }

/* Fine-tuning */
.ft { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center; }
.ft-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 16px; background: #1b1724; border: 1px solid #2f2840; text-align: center; }
.ft-card.special { border-color: #c6f03a; box-shadow: 0 0 30px -14px #c6f03a; }
.ft-emoji { font-size: 1.8rem; }
.ft-chip { font: 600 .75rem var(--font-mono); padding: 3px 9px; border-radius: 99px; background: #2a2337; }
.ft-card.special .ft-chip { background: #c6f03a; color: #111; }
.ft-mid { display: grid; gap: 6px; text-align: center; font-size: .8rem; color: #a8a1b6; }
.ft-mid .lane { font-size: 1.2rem; height: 44px; }

/* RLHF */
.rl { display: grid; gap: 12px; }
.rl-q { margin: 0; font-weight: 700; }
.rl-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rl-a { position: relative; display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: #1b1724; border: 2px solid #2f2840; font-size: .88rem; }
.rl-a b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #2a2337; font-size: .8rem; }
.rl-a.good { animation: vz-good 6s ease infinite; border-color: #c6f03a; }
.rl-a.bad { animation: vz-bad 6s ease infinite; opacity: .5; }
@keyframes vz-good { 0%, 30% { border-color: #2f2840; } 40%, 90% { border-color: #c6f03a; } 100% { border-color: #2f2840; } }
@keyframes vz-bad { 0%, 30% { opacity: 1; } 40%, 90% { opacity: .45; } 100% { opacity: 1; } }
.rl-thumb { position: absolute; right: -8px; top: -14px; font-size: 1.5rem; font-style: normal; animation: vz-thumb 6s ease infinite; }
@keyframes vz-thumb { 0%, 30% { transform: scale(0); } 38% { transform: scale(1.35); } 44%, 90% { transform: scale(1); } 100% { transform: scale(0); } }
.rl-gauge { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font: .78rem var(--font-mono); color: #a8a1b6; }
.rl-gauge div { height: 10px; border-radius: 99px; background: #2a2337; overflow: hidden; }
.rl-gauge b { display: block; height: 100%; width: 72%; border-radius: 99px; background: linear-gradient(90deg, #7d63ff, #c6f03a); animation: vz-gauge 6s ease infinite; }
@keyframes vz-gauge { 0%, 45% { width: 45%; } 75%, 95% { width: 72%; } 100% { width: 45%; } }

/* Reasoning */
.rs-q { margin: 0 0 12px; font-weight: 700; }
.rs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-col { background: #1b1724; border: 1px solid #2f2840; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rs-col h5 { margin: 0 0 4px; font: 800 1rem var(--font-display); }
.rs-col p { margin: 0; font: .9rem var(--font-mono); }
.rs-ans { font-weight: 700 !important; }
.rs-ans.bad { color: #ff6a3d; }
.rs-ans.good { color: #c6f03a; }
.rs-time { margin-top: auto; padding-top: 6px; font: .75rem var(--font-mono); color: #a8a1b6; }

/* Open vs closed */
.oc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oc-card { background: #17131f; border: 1px solid #2f2840; border-radius: 16px; padding: 14px; }
.oc-card h5 { margin: 0 0 10px; font: 800 1rem var(--font-display); }
.oc-card p { margin: 10px 0 0; font-size: .88rem; color: #cfc8dc; }
.oc-house { border: 2px dashed #c6f03a; border-radius: 14px; padding: 6px; }
.oc-house small { display: block; font: .7rem var(--font-mono); color: #c6f03a; margin: 0 0 4px 6px; }
.oc-house .lane i { animation-name: vz-lane-loop; }
@keyframes vz-lane-loop { 0% { left: 16%; opacity: 0; } 15% { opacity: 1; } 50% { left: 78%; } 85% { opacity: 1; } 100% { left: 16%; opacity: 0; } }

/* Prompt injection */
.inj { display: grid; gap: 10px; }
.inj-mail { position: relative; overflow: hidden; background: #f6f2ea; color: #16131d; border-radius: 14px; padding: 14px 16px; font-size: .9rem; }
.inj-head { font-size: .8rem; color: #625c6e; padding-bottom: 8px; border-bottom: 1px solid #e0d9cc; margin-bottom: 8px; }
.inj-mail p { margin: 6px 0 0; }
.inj-hidden { font: .8rem var(--font-mono); color: #d03b36; background: rgba(255, 106, 61, .12); border-radius: 6px; padding: 4px 6px; animation: vz-reveal 9s ease infinite; }
@keyframes vz-reveal { 0%, 18% { color: #f6f2ea; background: transparent; } 24%, 92% { color: #d03b36; background: rgba(255, 106, 61, .12); } 100% { color: #f6f2ea; background: transparent; } }
.inj-scan { position: absolute; left: 0; right: 0; top: 0; height: 40px; background: linear-gradient(transparent, rgba(198, 240, 58, .55), transparent); opacity: 0; animation: vz-scan 9s ease-in-out infinite; }
@keyframes vz-scan { 0% { top: -40px; opacity: 1; } 22% { top: 100%; opacity: 1; } 23%, 100% { opacity: 0; } }
.inj-agent, .inj-guard { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; font-size: .92rem; }
.inj-agent { background: #241e31; border: 1px solid #ff6a3d; animation: vz-step-a 9s ease infinite; }
.inj-guard { background: #2f3a14; border: 1px solid #c6f03a; font-weight: 600; animation: vz-step-b 9s ease infinite; }
@keyframes vz-step-a { 0%, 32% { opacity: 0; transform: translateY(10px); } 38%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes vz-step-b { 0%, 52% { opacity: 0; transform: scale(.9); } 58%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Data processing location (8s story: data flows to US/CN, contract appears, only EU remains) */
.dp-out { opacity: .25; animation: vz-dp-out 8s ease infinite; }
@keyframes vz-dp-out { 0%, 48% { opacity: 1; } 58%, 100% { opacity: .2; } }
.dp-in { opacity: 1; animation: vz-flowing 1s linear infinite, vz-dp-in 8s ease infinite; }
@keyframes vz-dp-in { 0%, 52% { opacity: 0; } 60%, 100% { opacity: 1; } }
.dp-us .dp-box, .dp-cn .dp-box { stroke: #4a4160; animation: vz-dp-warn 8s ease infinite; }
@keyframes vz-dp-warn { 0%, 6% { stroke: #3a3347; } 12%, 48% { stroke: #ff6a3d; } 58%, 100% { stroke: #4a4160; } }
.dp-us, .dp-cn { opacity: .45; animation: vz-dp-dim 8s ease infinite; }
@keyframes vz-dp-dim { 0%, 48% { opacity: 1; } 58%, 100% { opacity: .45; } }
.dp-eu .dp-box { stroke: #c6f03a; animation: vz-dp-eu 8s ease infinite; }
@keyframes vz-dp-eu { 0%, 52% { stroke: #3a3347; filter: none; } 60%, 100% { stroke: #c6f03a; filter: drop-shadow(0 0 8px rgba(198, 240, 58, .6)); } }
.dp-x { fill: #ff6a3d; animation: vz-dp-x 8s ease infinite; }
@keyframes vz-dp-x { 0%, 54% { opacity: 0; } 60%, 100% { opacity: 1; } }
.dp-ok { animation: vz-dp-x 8s ease infinite; }
.dp-deal { transform-box: fill-box; transform-origin: center; animation: vz-dp-deal 8s cubic-bezier(.2, .9, .3, 1.3) infinite; }
@keyframes vz-dp-deal { 0%, 44% { opacity: 0; transform: translateY(14px) scale(.9); } 52%, 100% { opacity: 1; transform: none; } }

/* Guardrails */
.gr-rail { fill: #6b6080; }
.gr-top { animation: vz-rail1 5s ease infinite; }
.gr-bot { animation: vz-rail2 5s ease infinite; }
@keyframes vz-rail1 { 0%, 16%, 30%, 100% { fill: #6b6080; } 20%, 26% { fill: #c6f03a; } }
@keyframes vz-rail2 { 0%, 61%, 75%, 100% { fill: #6b6080; } 65%, 71% { fill: #c6f03a; } }
.gr-road { animation: vz-road .9s linear infinite; }
@keyframes vz-road { to { stroke-dashoffset: -44; } }
.gr-car { animation: vz-car 5s ease-in-out infinite; }
@keyframes vz-car {
  0%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-42px) rotate(-8deg); } 28% { transform: translateY(-24px) rotate(4deg); }
  45% { transform: translateY(10px) rotate(0); } 65% { transform: translateY(46px) rotate(8deg); } 73% { transform: translateY(28px) rotate(-4deg); }
}
.gr-spark { opacity: 0; }
.gr-s1 { animation: vz-s1 5s ease infinite; }
.gr-s2 { animation: vz-s2 5s ease infinite; }
@keyframes vz-s1 { 0%, 17%, 30%, 100% { opacity: 0; transform: scale(.4); } 21% { opacity: 1; transform: scale(1.2); } }
@keyframes vz-s2 { 0%, 62%, 75%, 100% { opacity: 0; transform: scale(.4); } 66% { opacity: 1; transform: scale(1.2); } }

/* MCP widget: lively connectors */
.mcp-plug { animation: vz-beat 1.6s ease-in-out infinite; }
.mcp-tools .mcp-node { animation: vz-tool 4s ease infinite; animation-delay: calc(var(--k, 0) * 1s); }
@keyframes vz-tool { 0%, 22%, 100% { border-color: #2f2840; box-shadow: none; } 6%, 16% { border-color: #c6f03a; box-shadow: 0 0 18px -4px #c6f03a; } }

/* Home showcase + hero canvas */
.hero-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.viz-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.viz-showcase .viz-link { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; }
.tag.anim-tag { background: #120f19; color: #c6f03a; }

@media (max-width: 760px) {
  .viz { padding: 14px 12px; }
  .ti, .rl-answers, .rs-cols, .oc, .viz-showcase { grid-template-columns: 1fr; }
  .ft { grid-template-columns: 1fr; }
  .pb { grid-template-columns: 1fr 44px; }
  .hm-bar { grid-template-columns: 82px 1fr; }
  .nt-model { min-width: 0; width: 100%; }
}
