/* Video pinned at the top, Plotly charts that follow it underneath. Colours come from the active theme (--fg, --line, --bg). */
.page:has(.sim) { max-width: 80rem; }
.sim { margin: 1rem 0; }
/* The video always sits above everything else on the page, charts included. */
.sim .vid { position: sticky; top: .5rem; z-index: 100; width: fit-content; max-width: 100%; margin: 0 auto; }
.sim video { display: block; max-height: 42vh; width: auto; max-width: 100%; margin: 0 auto; border-radius: 6px; background: #000; }
.sim .charts, .sim .below { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); position: relative; z-index: 0; }
.sim .below { margin-top: .5rem; }
.sim .chart { position: relative; height: 260px; min-width: 0; overflow: hidden; isolation: isolate; }
.sim .cur { position: absolute; pointer-events: none; background: #e5534b; z-index: 3; }
.sim .cur.x { width: 2px; margin-left: -1px; }
.sim .cur.y { height: 2px; margin-top: -1px; }
.sim .chart.seek { cursor: ew-resize; touch-action: pan-y; }

