/* Scattering motivation (scmotiv.js): the wave experiment left, the history right. */

#sc-motiv { --sv-in: #3A6EA5; --sv-out: var(--accent); }
:root[data-theme="dark"] #sc-motiv { --sv-in: #8CA3D0; }

.sv-cv { position: absolute; left: 60px; top: 190px; width: 740px; height: 740px; }
.sv-svg { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; }
.sv-hole { fill: var(--ink); }
.sv-ring { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 6; }

.sv-key { position: absolute; left: 840px; top: 440px; width: 360px; font-size: 32px; line-height: 1.5; }
.sv-in { color: var(--sv-in); } .sv-out { color: var(--sv-out); }
.sv-w { margin-top: 14px; }
.sv-wv { display: inline-block; min-width: 80px; font-variant-numeric: lining-nums tabular-nums; }

/* the history */
.sv-hist { position: absolute; left: 1250px; top: 180px; width: 610px; height: 780px; }
.sv-tl { display: flex; justify-content: space-between; border-bottom: 2px solid var(--hair); padding: 0 30px 8px; margin-bottom: 18px;
         opacity: 0; transition: opacity 0.6s; }
.sv-y { font-size: 30px; color: var(--muted); font-variant-numeric: lining-nums; transition: color 0.4s; }
#sc-motiv.sv-on1 .sv-tl { opacity: 1; }
#sc-motiv.sv-on1:not(.sv-on2) .sv-y1, #sc-motiv.sv-on2:not(.sv-on3) .sv-y2, #sc-motiv.sv-on3 .sv-y3 { color: var(--accent); }
#sc-motiv.sv-on1 .sv-y1, #sc-motiv.sv-on2 .sv-y2, #sc-motiv.sv-on3 .sv-y3 { font-weight: 600; }

#sc-motiv figure.sv-f { position: absolute; left: 0; top: 70px; width: 610px; margin: 0; opacity: 0; transition: opacity 0.6s; pointer-events: none; }
/* fixed height, width from the image's own aspect ratio (object-fit guards against any squeeze) */
#sc-motiv .sv-f img { display: block; margin: 0 auto; padding: 10px; height: 580px; width: auto; max-width: 100%; max-height: none; object-fit: contain; }
#sc-motiv .sv-f figcaption { font-size: 28px; text-align: center; margin-top: 10px; }
#sc-motiv .sv-f .cite { display: block; text-align: center; font-size: 20px; margin-top: 4px; }
#sc-motiv.sv-on1:not(.sv-on2) .sv-f1, #sc-motiv.sv-on2:not(.sv-on3) .sv-f2, #sc-motiv.sv-on3 .sv-f3 { opacity: 1; pointer-events: auto; }

#sc-motiv .sv-ph { width: 560px; height: 420px; margin: 10px auto 0; border: 2px dashed var(--hair); border-radius: 10px;
                   display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--muted); font-style: italic; }
