/* Second order around Kerr-Newman (knalgo.js): the pipeline from bhs_future,
   without the text. jry-plots frames and inkwell colours. Right: the equation
   solved at each stage, the current one in ink. */

#kn-algo { --jb: #1F4E99; --jr: #B2352B; }
:root[data-theme="dark"] #kn-algo { --jb: #8CA3D0; --jr: #E07A6E; }
.ka-svg { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; }
.ka-cv { position: absolute; }
.jf-box { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.jf-tk { stroke: var(--ink); stroke-width: 2; }
.jf-num { fill: var(--ink); font: 26px ETbb, Georgia, serif; font-variant-numeric: lining-nums; text-anchor: middle; }
.jf-end { text-anchor: end; }
.jf-start { text-anchor: start; }
.jf-lab { fill: var(--ink); font: italic 32px ETbb, Georgia, serif; text-anchor: middle; }
.jf-sm { font-size: 26px; }
.ka-g { transition: opacity 0.5s; }
.ka-lab { fill: var(--ink); font: italic 28px ETbb, Georgia, serif; }
.ka-note { fill: var(--muted); font: 24px ETbb, Georgia, serif; }
.ka-it { fill: none; stroke: var(--jb); stroke-width: 3; }
.ka-itl { stroke: var(--jb); stroke-width: 2; stroke-dasharray: 6 6; }
.ka-root { fill: var(--accent); }
.ka-sweep { stroke: var(--ink); stroke-width: 3; }
.ka-band { fill: var(--muted); font: italic 24px ETbb, Georgia, serif; text-anchor: middle; }
.ka-gl { stroke: var(--ink); stroke-width: 1; opacity: 0.45; }
.ka-gl2 { stroke-width: 2.5; opacity: 0.9; }
.ka-grid, .ka-read { transition: opacity 0.4s; }
.ka-readl { stroke: var(--accent); stroke-width: 8; }
.ka-readt { fill: var(--accent); font: italic 30px ETbb, Georgia, serif; }
.ka-num { position: absolute; left: 720px; top: 650px; width: 480px; white-space: nowrap; display: flex; flex-direction: column; gap: 26px; font-size: 38px; opacity: 0; transition: opacity 0.5s; }
.ka-end { fill: var(--muted); font: italic 26px ETbb, Georgia, serif; text-anchor: middle; }
.ka-env { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 8 6; }
.ka-curve { fill: none; stroke-width: 3.5; stroke-linejoin: round; }
.ka-cb { stroke: var(--jb); } .ka-cr { stroke: var(--jr); } .ka-ck { stroke: var(--ink); }
.ka-dash { stroke-dasharray: 12 8; } .ka-dot { stroke-dasharray: 3 6; stroke-width: 3; }
.ka-key { fill: var(--ink); font: italic 24px ETbb, Georgia, serif; text-anchor: end; }
.ka-key.ka-start { text-anchor: start; }
.ka-kb { fill: var(--jb); } .ka-kr { fill: var(--jr); }
.ka-sm { font-size: 22px; }
.ka-halo { paint-order: stroke; stroke: var(--bg); stroke-width: 6px; }
.ka-onf { fill: #1A1A1A; paint-order: stroke; stroke: rgba(255,255,255,0.75); stroke-width: 6px; }  /* on the colormap, either theme */
.ka-reg { stroke: none; }
.ka-reg0 { fill: var(--jb); opacity: 0.18; } .ka-reg1 { fill: var(--muted); opacity: 0.15; } .ka-reg2 { fill: var(--jr); opacity: 0.18; }
.ka-regt { fill: var(--ink); font: italic 24px ETbb, Georgia, serif; text-anchor: middle; }
.ka-regl { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 6; }
.ka-patch { opacity: 0; }
.ka-pfill { stroke: none; opacity: 0.10; }
.ka-pf0 { fill: var(--jb); } .ka-pf1 { fill: var(--jr); } .ka-pf2 { fill: #1E7B3C; }
.ka-node { fill: var(--ink); opacity: 0.7; }
.ka-pedge { stroke: var(--ink); stroke-width: 3; }
.ka-rbox { fill: var(--bg); stroke: var(--accent); stroke-width: 3; }
.ka-rval { fill: var(--accent); font: 40px ETbb, Georgia, serif; text-anchor: middle; }
.ka-rt { text-anchor: end; }
#kn-algo.ka-solved:not(.s-on1) .ka-num { opacity: 1; }
#kn-algo.s-on1 .ka-num { opacity: 0; }

/* the equations, one per stage */
.ka-eqs { position: absolute; left: 1270px; top: 230px; width: 600px; margin: 0; padding: 0; list-style: none; counter-reset: ka; }
.ka-eqs li { counter-increment: ka; position: relative; padding-left: 56px; margin-bottom: 64px; font-size: 34px;
             opacity: 0.3; transition: opacity 0.4s; white-space: nowrap; }
.ka-eqs li::before { content: counter(ka, lower-roman) "."; position: absolute; left: 0; color: var(--accent); }
#kn-algo .ka-e0, #kn-algo.s-on1 .ka-e1, #kn-algo.s-on2 .ka-e2, #kn-algo.s-on3 .ka-e3 { opacity: 1; }
#kn-algo.s-on1 .ka-e0, #kn-algo.s-on2 .ka-e1, #kn-algo.s-on3 .ka-e2 { opacity: 0.3; }
