/* RupeeCase Learn visual kit (vis.css, with vis.js). Docs: instiv2-tools/learn/VIS.md. Kit tokens (styles.css),
   light default, dark via html[data-theme="dark"]. Base rules are the static final state (no JS, reduced motion);
   .is-js adds the interactive layout and .is-pre the state before a reveal. Phone first, nothing under 12 px. */
.vis, figure.vis {
  --vc: var(--c, #2F6FE0); --vg: #0E8A5F; --vl: #C0352B; --va: #B45309; --vp: #6D3FC9; --vt: #0E7490; --vm: rgba(11,18,32,.38);
  --vcard: var(--page-2); --vline: var(--page-line); --vmono: "JetBrains Mono", "JBM Fallback", ui-monospace, monospace;
  --vsoft: rgba(11,18,32,.045); --ve: cubic-bezier(.2,.7,.1,1); --vi: cubic-bezier(.4,0,.2,1); --vgt: #087049; --vlt: #A92B22;
  margin: 1.8em 0; color: var(--page-text); font-size: 15px; line-height: 1.5;
}
html[data-theme="dark"] .vis { --vg: #4BD9A0; --vl: #FF8A8A; --va: #F2B35C; --vp: #B59CF6; --vt: #5FD0E6; --vm: rgba(226,233,246,.42); --vsoft: rgba(255,255,255,.045); --vgt: var(--vg); --vlt: var(--vl); }
.vis button, .vis input { font-family: inherit; }
.vis p, .vis ol, .vis ul, .vis figure, .vis h3, .vis h4 { margin: 0; }
.vis ol, .vis ul, ol.vis, ul.vis { padding: 0; list-style: none; }
.vis li { margin: 0; }
.vis-card, .vis-bars, .vis-line, .vis-compound, .vis-donut, .vis-heat, .vis-calc, .vis-scenario, .vis-count {
  background: var(--vcard); border: 1px solid var(--vline); border-radius: 18px; padding: 18px 16px;
}
.vis .vis-h { display: block; margin: 0 0 4px; font-size: 17px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; color: var(--page-text); }
.vis-sub.vis-sub { margin: 0 0 14px !important; font-size: 14px; color: var(--page-muted); }
.vis-src.vis-src { margin: 14px 0 0 !important; font-size: 12.5px; line-height: 1.45; color: var(--page-faint); }
.vis-k { font: 600 12px/1.2 var(--vmono); letter-spacing: .08em; text-transform: uppercase; color: var(--page-muted); }
.vis-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vis-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--vline); background: var(--page-2); color: var(--page-text); font-weight: 600; font-size: 14px; line-height: 1; cursor: pointer; transition: border-color .2s, transform .2s; }
.vis-btn:hover { border-color: var(--vc); }
.vis :focus-visible, .vis-btn:focus-visible { outline: 2px solid var(--vc); outline-offset: 3px; }
.vis-c1 { --sc: var(--vc); } .vis-c2 { --sc: var(--vm); } .vis-c3 { --sc: var(--vg); } .vis-c4 { --sc: var(--va); } .vis-c5 { --sc: var(--vp); } .vis-c6 { --sc: var(--vt); } .vis-cm { --sc: var(--vm); } .vis-cg { --sc: var(--vg); } .vis-cl { --sc: var(--vl); }
.vis-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--sc); flex: none; }
.vis [hidden], .vis[hidden] { display: none !important; }
.vis-fallback { font-size: 15px; color: var(--page-muted); }
.vis.is-err .vis-fallback { display: block !important; }

/* 1 count */
.vis-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vis-counts > .vis-count { margin: 0; }
.vis-counts.vis-card, .vis-counts.vis { background: none; border: 0; padding: 0; }
.vis-count { display: flex; flex-direction: column; gap: 6px; }
.vis-n.vis-n { display: block; font: 700 clamp(30px, 8vw, 44px)/1 Inter, "Inter Fallback", system-ui, sans-serif; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--page-text); overflow-wrap: normal; word-break: normal; }
.vis-count .vis-l { font-size: 14px; line-height: 1.4; color: var(--page-muted); }
.vis-count .vis-src { margin-top: auto !important; padding-top: 6px; }
.vis-count::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--vc); margin-bottom: 6px; transition: width .9s var(--ease, ease); }
.vis.is-pre .vis-count::before, .vis-count.is-pre::before { width: 0; }

/* 2 bars */
.vis-data > li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--vline); font-size: 14px; }
.vis-data > li:first-child { border-top: 0; }
.vis-data > li > b { font: 600 14px/1.3 var(--vmono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vis-bars.is-js .vis-data > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "t t"; gap: 8px 12px; border: 0; padding: 7px 0; }
.vis-bars.is-js .vis-data > li > span:first-child { grid-area: l; color: var(--page-muted); line-height: 1.35; }
.vis-bars.is-js .vis-data > li > b { grid-area: v; position: relative; z-index: 1; padding: 0 2px; border-radius: 4px; background: var(--vcard); color: var(--page-text); }
.vis-bt { grid-area: t; position: relative; display: block; height: 12px; border-radius: 6px; background: var(--vsoft); }
.vis-bt i { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 100%); width: max(3px, calc(var(--s) * 100%)); border-radius: 6px; background: var(--vc); transform-origin: left center; transition: transform 1s var(--ve) var(--d, 0ms); }
.vis-data > li.is-neg .vis-bt i { transform-origin: right center; }
.vis-bars.has-neg .vis-bt::after { content: ""; position: absolute; left: calc(var(--z) * 100%); top: -3px; bottom: -3px; width: 1px; background: var(--page-faint); }
.vis-data > li[data-tone="gain"] .vis-bt i { background: var(--vg); } .vis-data > li[data-tone="loss"] .vis-bt i, .vis-data > li.is-neg:not([data-tone]) .vis-bt i { background: var(--vl); }
.vis-data > li[data-tone="muted"] .vis-bt i { background: var(--vm); } .vis-data > li[data-tone="amber"] .vis-bt i { background: var(--va); }
.vis-data > li[data-hl] > span:first-child { color: var(--page-text) !important; font-weight: 650; }
.vis-bars.is-pre .vis-bt i { transform: scaleX(0); }

/* 3 line and the shared chart */
.vis-plot { position: relative; margin: 6px -4px 0; touch-action: pan-y; cursor: crosshair; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.vis-plot:focus-visible { outline-offset: 2px; }
.vis-svg { display: block; overflow: visible; }
.vis-gl { stroke: var(--vline); stroke-width: 1; } .vis-gl.is-0 { stroke: var(--page-faint); }
.vis-tx { fill: var(--page-faint); font: 500 12px var(--vmono); }
.vis-ln { fill: none; stroke: var(--sc); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--vi); }
.vis-ln.vis-c2, .vis-ln.vis-cm { stroke-width: 1.8; }
.vis-ar { fill: var(--vc); opacity: .08; transition: opacity 1s .8s; }
.vis-cur { stroke: var(--page-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.vis-dot { fill: var(--vcard); stroke: var(--sc); stroke-width: 2.4; }
.is-pre .vis-ln { stroke-dashoffset: 1; } .is-pre .vis-ar, .is-pre .vis-dot, .is-pre .vis-cur { opacity: 0; }
.vis-read { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; min-height: 44px; margin: 10px 0 0 !important; font-size: 13px; line-height: 1.4; color: var(--page-muted); }
.vis-rd { font: 600 12.5px var(--vmono); color: var(--page-text); flex-basis: 100%; }
.vis-rk { display: inline-flex; align-items: center; gap: 6px; }
.vis-rk b { font: 600 13px var(--vmono); color: var(--page-text); font-variant-numeric: tabular-nums; }

/* 4 compound */
.vis-cp-ui { display: grid; gap: 4px; margin-top: 10px; }
.vis-sl label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--page-muted); }
.vis-sl output { font: 600 14px var(--vmono); color: var(--page-text); }
.vis input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.vis input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--vsoft); box-shadow: inset 0 0 0 1px var(--vline); }
.vis input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--vsoft); }
.vis input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--vcard); border: 2px solid var(--vc); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.vis input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--vcard); border: 2px solid var(--vc); }
.vis-cp-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.vis-cp-st > div { padding: 10px 12px; border-radius: 12px; background: var(--vsoft); display: flex; flex-direction: column; gap: 2px; }
.vis-cp-st > div:last-child { grid-column: 1 / -1; }
.vis-cp-st span { font-size: 12.5px; color: var(--page-muted); }
.vis-cp-st b { font: 700 19px/1.2 var(--vmono); letter-spacing: -0.02em; }
.vis-cp-st em { font-style: normal; font-size: 12.5px; color: var(--page-muted); }
.vis-cp-st .is-c b { color: var(--page-text); }
.vis-cp-st .is-c { box-shadow: inset 3px 0 0 var(--vc); }

/* 5 split */
.vis-split { position: relative; }
.vis-split .vis-a, .vis-split .vis-b { border: 1px solid var(--vline); border-radius: 16px; overflow: hidden; background: var(--vcard); }
.vis-split:not(.is-js) { display: grid; gap: 10px; }
.vis-split img { display: block; width: 100%; height: auto; }
.vis-pane { padding: 18px 16px; }
.vis-pane h4 { font-size: 16px; font-weight: 650; margin: 0 0 8px; }
.vis-pane li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.45; margin-bottom: 6px; color: var(--page-muted); }
.vis-pane li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--sc, var(--vc)); }
.vis-tag.vis-tag { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.3 var(--vmono); letter-spacing: .04em; background: var(--vsoft); color: var(--page-text); }
.vis-st { --p: 50%; position: relative; display: grid; border-radius: 16px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.vis-st > .vis-a, .vis-st > .vis-b { grid-area: 1 / 1; border-radius: 16px; }
.vis-st > .vis-b { clip-path: inset(0 0 0 var(--p)); }
.vis-st > .vis-a { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.vis-st.is-nudge > .vis-a, .vis-st.is-nudge > .vis-b, .vis-st.is-nudge > .vis-grip { transition: clip-path .6s var(--vi), left .6s var(--vi); }
.vis-grip { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: var(--vc); pointer-events: none; }
.vis-grip span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--vcard); border: 2px solid var(--vc); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.vis-grip span::before, .vis-grip span::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; }
.vis-grip span::before { left: 8px; border-right-color: var(--vc); } .vis-grip span::after { right: 8px; border-left-color: var(--vc); }
.vis-split:focus-within .vis-grip span { outline: 2px solid var(--vc); outline-offset: 3px; }
.vis-sw2 { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; padding: 4px; border-radius: 999px; background: var(--vsoft); border: 1px solid var(--vline); }
.vis-sw2 button { position: relative; z-index: 1; min-height: 44px; border: 0; border-radius: 999px; background: none; color: var(--page-muted); font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; transition: color .3s; }
.vis-sw2 button[aria-pressed="true"] { color: var(--page-text); }
.vis-sw2 i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--vcard); border: 1px solid color-mix(in srgb, var(--vc) 55%, transparent); box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: transform .45s var(--vi); }
.vis-split.is-b .vis-sw2 i { transform: translateX(100%); }
.vis-split.is-sw .vis-st { cursor: default; }
.vis-split.is-sw .vis-st > .vis-a, .vis-split.is-sw .vis-st > .vis-b { transition: clip-path .6s var(--vi); }
.vis-lb { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(5,8,15,.66); color: #fff; font-weight: 600; font-size: 12px; line-height: 1.3; pointer-events: none; }
.vis-lb-a { left: 10px; } .vis-lb-b { right: 10px; }
.vis-split figcaption { margin-top: 10px; font-size: 13px; color: var(--page-faint); }

/* 6 flow */
.vis-flow { counter-reset: vf; position: relative; padding-left: 0; }
.vis-flow > li { counter-increment: vf; position: relative; padding: 0 0 18px 52px; min-height: 40px; transition: opacity .5s, transform .5s; }
.vis-flow > li::before { content: counter(vf); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--vmono); background: var(--vc); color: #fff; border: 2px solid var(--vc); transition: background .4s, color .4s; z-index: 1; }
.vis-flow > li::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--vc); }
.vis-flow > li:last-child::after { display: none; }
.vis-flow > li > b { display: block; font-size: 16px; font-weight: 650; line-height: 1.3; padding-top: 6px; }
.vis-flow > li > span, .vis-flow > li > p { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--page-muted); }
.vis-flow.is-js > li:not(.is-on) > b { color: var(--page-muted); } .vis-flow.is-js > li:not(.is-on) > span, .vis-flow.is-js > li:not(.is-on) > p { color: var(--page-faint); }
.vis-flow > li > b, .vis-flow > li > span, .vis-flow > li > p { transition: color .5s; }
.vis-flow.is-js > li:not(.is-on)::before { background: var(--vcard); color: var(--page-text); border-color: var(--vline); }
.vis-flow.is-js > li:not(.is-on)::after { background: var(--vline); }

/* 7 timeline */
ol.vis-timeline { position: relative; padding-left: 22px; }
.vis-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--vline); border-radius: 1px; }
.vis-timeline > li { position: relative; padding-bottom: 20px; transition: opacity .6s, transform .6s var(--ve); }
.vis-timeline > li::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--vcard); border: 2px solid var(--vc); }
.vis-timeline > li[data-tone="gain"]::before { border-color: var(--vg); background: var(--vg); } .vis-timeline > li[data-tone="loss"]::before { border-color: var(--vl); background: var(--vl); }
.vis-timeline > li[data-tone="key"]::before { background: var(--vc); }
.vis-timeline time { display: block; font: 600 12.5px/1.4 var(--vmono); letter-spacing: .03em; color: var(--page-muted); }
.vis-timeline b { display: block; font-size: 16px; font-weight: 650; line-height: 1.35; margin-top: 2px; }
.vis-timeline p { margin-top: 4px !important; font-size: 14.5px; line-height: 1.5; color: var(--page-muted); }
.vis-timeline > li.is-pre { opacity: 0; transform: translateY(14px); }

/* 8 donut */
.vis-dn { position: relative; width: 180px; height: 180px; margin: 6px auto 12px; }
.vis-dn-bg { fill: none; stroke: var(--vsoft); stroke-width: 22; }
.vis-arc { fill: none; stroke: var(--sc); stroke-width: 22; transition: stroke-dasharray 1s var(--vi) var(--d, 0ms), opacity .25s; }
.vis-arc.is-dim { opacity: .25; }
.vis-donut.is-pre .vis-arc { stroke-dasharray: 0 var(--C) !important; }
.vis-dn-c { position: absolute; inset: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.vis-dn-c b { font: 700 22px/1.1 var(--vmono); letter-spacing: -0.02em; }
.vis-dn-c span { font-size: 12px; line-height: 1.25; color: var(--page-muted); margin-top: 3px; max-width: 96px; }
.vis-donut.is-js .vis-data > li { align-items: center; justify-content: flex-start; cursor: default; border-radius: 8px; transition: background .2s; }
.vis-donut.is-js .vis-data > li > span { flex: 1; color: var(--page-muted); }
.vis-donut.is-js .vis-data > li.is-hl { background: var(--vsoft); }
.vis-donut.is-js .vis-data > li.is-hl > span { color: var(--page-text); }

/* 9 scenario */
.vis-scenario { border-left: 4px solid var(--vc); }
.vis-q.vis-q { margin: 6px 0 14px !important; font-size: 18px; font-weight: 650; line-height: 1.35; letter-spacing: -0.01em; }
.vis-choices { display: grid; gap: 10px; }
.vis-choices > li { border: 1px solid var(--vline); border-radius: 14px; padding: 12px 14px; }
.vis-choices > li > b { display: block; font-size: 15px; margin-bottom: 4px; }
.vis-choices > li > p { font-size: 14.5px; line-height: 1.5; color: var(--page-muted); }
.vis-scenario.is-js .vis-choices > li { padding: 0; overflow: hidden; }
.vis-ch { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 52px; padding: 10px 14px; border: 0; background: none; color: var(--page-text); font-weight: 600; font-size: 15px; line-height: 1.35; text-align: left; cursor: pointer; }
.vis-ch:hover { background: var(--vsoft); }
.vis-ch-k { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--vline); font: 700 13px var(--vmono); }
.vis-scenario.is-js .vis-choices > li > p { display: none; padding: 0 14px 14px 56px; }
.vis-scenario.is-done .vis-choices > li > p { display: block; animation: vis-in .45s var(--ve); }
.vis-scenario.is-done .vis-choices > li:not(.is-pick) { opacity: .72; }
.vis-scenario.is-done .vis-choices > li.is-pick { border-color: var(--vc); box-shadow: inset 0 0 0 1px var(--vc); }
.vis-scenario.is-done li[data-best] .vis-ch-k { background: var(--vg); border-color: var(--vg); color: #fff; }
html[data-theme="dark"] .vis-scenario.is-done li[data-best] .vis-ch-k { color: #05080F; }
.vis-scenario.is-done li.is-pick:not([data-best]) .vis-ch-k { background: var(--vl); border-color: var(--vl); color: #fff; }
html[data-theme="dark"] .vis-scenario.is-done li.is-pick:not([data-best]) .vis-ch-k { color: #05080F; }
.vis-sc-res:not(:empty) { margin: 14px 0 0 !important; font-weight: 600; font-size: 15px; }
.vis-sc-again { margin-top: 12px; }
@keyframes vis-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 10 myth */
.vis-myths { display: grid; gap: 12px; }
.vis-myths > .vis-myth { margin: 0; }
.vis-myth { perspective: 1200px; display: flex; flex-direction: column; }
.vis-myth > .vis-mc { flex: 1; }
.vis-myth-m, .vis-myth-f { padding: 18px 16px; border-radius: 16px; border: 1px solid var(--vline); background: var(--vcard); font-size: 15.5px; line-height: 1.5; }
.vis-myth:not(.is-js) .vis-myth-f { margin-top: 8px !important; }
.vis-myth-m > b, .vis-myth-f > b { display: block; margin-bottom: 6px; font: 700 12px/1.2 var(--vmono); letter-spacing: .1em; text-transform: uppercase; }
.vis-myth-m > b { color: var(--vl); } .vis-myth-f > b { color: var(--vg); }
.vis-myth-m { background: repeating-linear-gradient(135deg, var(--vcard) 0 14px, var(--vsoft) 14px 15px); }
.vis-mc { display: grid; transform-style: preserve-3d; transition: transform .7s var(--vi); cursor: pointer; }
.vis-face { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 16px; border-radius: 16px; border: 1px solid var(--vline); background: var(--vcard); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.vis-fm { background: repeating-linear-gradient(135deg, var(--vcard) 0 14px, var(--vsoft) 14px 15px); }
.vis-ff { border-color: color-mix(in srgb, var(--vg) 45%, transparent); }
.vis-myth.is-js .vis-myth-m, .vis-myth.is-js .vis-myth-f { flex: 1; padding: 0; border: 0; background: none; }
.vis-ff { transform: rotateY(180deg); }
.vis-myth.is-flip .vis-mc { transform: rotateY(180deg); }

/* 11 note */
.vis-note.vis-note { margin: 1.8em 0; color: var(--page-text); font-size: 15px; line-height: 1.5; position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; padding: 18px 16px; border-radius: 18px; background: color-mix(in srgb, var(--vc) 7%, var(--page-2)); border: 1px solid color-mix(in srgb, var(--vc) 22%, transparent); }
.vis-note > * { grid-column: 2; }
.vis-note > .vis-av { grid-column: 1; grid-row: 1 / span 3; }
.vis-av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; display: grid; place-items: center; background: color-mix(in srgb, var(--vc) 68%, #05080F); color: #fff; font: 700 16px var(--vmono); letter-spacing: .02em; border: 2px solid var(--page-2); }
.vis-note p { font-size: 16px; line-height: 1.6; margin-top: 8px !important; }
.vis-note .vis-k { margin-top: 2px !important; font-size: 12px; line-height: 1.3; }
.vis-sig { font-weight: 650; font-size: 15px !important; }
.vis-sig span { display: block; font-weight: 400; font-size: 13px; color: var(--page-muted); }

/* 12 figure */
.vis-figure { position: relative; }
.vis-figure img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--vsoft); transition: opacity .6s; }
.vis-figure.is-load img { opacity: 0; }
.vis-figure img[data-pop] { cursor: zoom-in; }
.vis-figure:has(img[data-pop])::after { content: "Tap to zoom"; position: absolute; right: 10px; top: 10px; padding: 5px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; line-height: 1.3; background: rgba(5,8,15,.62); color: #fff; pointer-events: none; }
.vis-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--page-muted); }
.vis-credit { display: block; margin-top: 2px; font-size: 12px; color: var(--page-faint); }

/* 13 calc */
.vis-calc-in { display: grid; gap: 10px; margin-top: 12px; }
.vis-calc label { display: grid; gap: 6px; font-size: 14px; color: var(--page-muted); }
.vis-calc input[type=number] { min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--vline); background: var(--page); color: var(--page-text); font: 500 16px var(--vmono); width: 100%; }
.vis-calc input[type=number]:focus { outline: 2px solid var(--vc); outline-offset: 1px; }
.vis-calc-out { display: grid; gap: 8px; margin-top: 14px; }
.vis-calc-out > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--vsoft); font-size: 14px; color: var(--page-muted); }
.vis-calc output { white-space: nowrap; font: 700 20px/1.2 var(--vmono); color: var(--page-text); letter-spacing: -0.02em; text-align: right; }

/* 14 heat (selectors doubled to beat the generic learn table styles) */
.vis.vis-heat table { width: 100%; min-width: 0; margin: 10px 0 0; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font: 500 12px/1 var(--vmono); }
.vis.vis-heat th, .vis.vis-heat thead tr { background: none; }
.vis.vis-heat th { font: 600 12px/1 var(--vmono); letter-spacing: 0; text-transform: none; color: var(--page-faint); padding: 4px 0; text-align: center; border: 0; white-space: nowrap; }
.vis.vis-heat tbody th { text-align: left; width: 3.2em; color: var(--page-muted); }
.vis.vis-heat td { min-width: 0; text-align: center; vertical-align: middle; padding: 0; height: 30px; border: 0; border-radius: 5px; background: var(--vsoft); font: 500 12px/1 var(--vmono); font-variant-numeric: tabular-nums; color: var(--page-text); }
.vis.vis-heat td.is-up { background: color-mix(in srgb, var(--vg) calc(var(--t) * 62% + 8%), transparent); }
.vis.vis-heat td.is-dn { background: color-mix(in srgb, var(--vl) calc(var(--t) * 62% + 8%), transparent); }
html[data-theme="dark"] .vis.vis-heat td.is-up { background: color-mix(in srgb, var(--vg) calc(var(--t) * 40% + 8%), transparent); }
html[data-theme="dark"] .vis.vis-heat td.is-dn { background: color-mix(in srgb, var(--vl) calc(var(--t) * 40% + 8%), transparent); }
.vis.vis-heat td.is-act { outline: 2px solid var(--page-text); outline-offset: -1px; }
.vis-heat.is-js td { cursor: pointer; transition: opacity .4s var(--d, 0ms), transform .4s var(--d, 0ms); }
.vis-heat.is-pre td { opacity: 0; transform: scale(.6); }
.vis-heat table:focus-visible { outline: 2px solid var(--vc); outline-offset: 4px; border-radius: 6px; }
.vis-heat .vis-read { min-height: 0; }
@media (max-width: 719px) { .vis-heat.is-js td > span, .vis-heat.is-js .vis-hf { display: none; } .vis.vis-heat table { border-spacing: 2px; } .vis.vis-heat td { height: 26px; } .vis.vis-heat tbody th { width: 3.6em; padding-right: 4px; } }

/* 15 ticker */
.vis-ticker { position: relative; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--vline); border-bottom: 1px solid var(--vline); padding: 4px 0; }
.vis-ticker ul { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 8px 0; }
.vis-ticker li { white-space: nowrap; font: 500 13px/1.3 var(--vmono); color: var(--page-muted); }
.vis-ticker li b { color: var(--page-text); font-weight: 600; margin-right: 6px; }
.vis-ticker li .is-up { color: var(--vgt); } .vis-ticker li .is-dn { color: var(--vlt); }
.vis-tr { flex: 1; min-width: 0; display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.vis-ticker.is-js ul { flex-wrap: nowrap; flex: none; padding-right: 22px; animation: vis-tape var(--dur, 30s) linear infinite; }
.vis-ticker.is-still .vis-tr { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
.vis-ticker.is-still ul { flex-wrap: nowrap; }
.vis-ticker.is-paused ul, .vis-ticker.is-off ul, .vis-ticker:hover ul, .vis-ticker:focus-within ul { animation-play-state: paused; }
.vis-tk-p { flex: none; min-width: 72px; }
@keyframes vis-tape { to { transform: translateX(-100%); } }

/* wider screens */
@media (min-width: 720px) {
  .vis-card, .vis-bars, .vis-line, .vis-compound, .vis-donut, .vis-heat, .vis-calc, .vis-scenario, .vis-count { padding: 22px 24px; }
  .vis-counts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
  .vis-counts .vis-n { font-size: clamp(26px, 2.4vw, 34px); }
  .vis-counts .vis-count { padding: 18px; }
  .vis-bars.is-js .vis-data > li { grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) 76px; grid-template-areas: "l t v"; align-items: center; }
  .vis-bars.is-js .vis-data > li > b { text-align: right; }
  .vis-bars[data-dir="col"].is-js .vis-data { display: flex; align-items: flex-end; gap: 14px; height: 260px; }
  .vis-bars[data-dir="col"].is-js .vis-data > li { flex: 1; display: flex; flex-direction: column-reverse; align-items: stretch; height: 100%; gap: 6px; padding: 0; text-align: center; }
  .vis-bars[data-dir="col"].is-js .vis-data > li > span:first-child { font-size: 13px; min-height: 2.7em; }
  .vis-bars[data-dir="col"].is-js .vis-data > li > b { text-align: center; }
  .vis-bars[data-dir="col"] .vis-bt { flex: 1; height: auto; border-radius: 8px; }
  .vis-bars[data-dir="col"] .vis-bt i { left: 0; right: 0; width: auto; top: auto; bottom: calc(var(--a) * 100%); height: max(3px, calc(var(--s) * 100%)); transform-origin: center bottom; border-radius: 8px; }
  .vis-bars[data-dir="col"].is-pre .vis-bt i { transform: scaleY(0); }
  .vis-bars[data-dir="col"].has-neg .vis-bt::after { left: -4px; right: -4px; width: auto; top: auto; bottom: calc(var(--z) * 100%); height: 1px; }
  .vis-bars[data-dir="col"] .vis-data > li.is-neg .vis-bt i { transform-origin: center top; }
  .vis-cp-ui { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .vis-cp-st { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vis-cp-st > div:last-child { grid-column: auto; }
  .vis-split:not(.is-js) { grid-template-columns: 1fr 1fr; }
  .vis-flow[data-dir="row"] { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 16px; }
  .vis-flow[data-dir="row"] > li { padding: 52px 0 0; transition-delay: var(--d, 0ms); }
  .vis-flow[data-dir="row"] > li::before { transition-delay: var(--d, 0ms); }
  .vis-flow[data-dir="row"] > li::after { left: 44px; right: -12px; top: 17px; bottom: auto; width: auto; height: 2px; transition: background .4s var(--d, 0ms); }
  .vis-flow[data-dir="row"] > li > b { padding-top: 0; }
  ol.vis-timeline { padding-left: 0; }
  .vis-timeline::before { left: 133px; }
  .vis-timeline > li { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 44px; }
  .vis-timeline > li::before { left: 128px; }
  .vis-timeline time { grid-row: 1 / span 3; text-align: right; padding-top: 2px; }
  .vis-donut.is-js { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "h h" "d l" "s s"; column-gap: 24px; align-items: center; }
  .vis-donut.is-js > .vis-h, .vis-donut.is-js > .vis-sub { grid-area: h; }
  .vis-donut.is-js .vis-dn { grid-area: d; margin: 6px 0; }
  .vis-donut.is-js .vis-data { grid-area: l; }
  .vis-donut.is-js .vis-src { grid-area: s; }
  .vis-myths { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .vis-note { grid-template-columns: 64px minmax(0, 1fr); padding: 22px 24px; }
  .vis-note .vis-av { width: 64px; height: 64px; }
  .vis-calc-in { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .vis-calc-out { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .vis.vis-heat td { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .vis *, .vis *::before, .vis *::after { transition: none !important; animation: none !important; }
  .vis-mc { transform: none !important; }
  .vis-face { backface-visibility: visible; -webkit-backface-visibility: visible; }
  .vis-ff { transform: none; opacity: 0; } .vis-myth.is-flip .vis-ff { opacity: 1; } .vis-myth.is-flip .vis-fm { opacity: 0; }
}
