/* The simple viewer (design 02 §4.2, §13–§16). A fixed window, no CSS transitions: the highlight glide and the scroll are animated from script
   with an injected clock (design 02 §16.4); reduced motion makes them instant. */
html,body{margin:0;background:#fff}
main.sv{max-width:72rem;margin:0 auto;padding:1rem;color:#1b1f24;background:#fff;font:16px/1.4 system-ui,sans-serif}
.sv-window{position:relative;height:min(calc(20 * 1.5em + 1rem),calc(100dvh - 7rem));overflow:auto;scrollbar-gutter:stable;border:1px solid #d0d7de;
           font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;tab-size:4}      /* shared by the line view and the editor */
.sv-view{margin:0;padding:.5rem 0;list-style:none}
.sv-line{--gutter:transparent;padding:0 .75rem 0 calc(10px + .5rem);white-space:break-spaces;line-break:anywhere;min-height:1.5em;     /* the 10 px gutter is the line's own background */
         background:linear-gradient(to right,var(--gutter) 0 10px,transparent 10px)}
.sv-line[data-count="1"]{--gutter:#e8eaed}
.sv-line[data-count="2"]{--gutter:#babfc6}
.sv-line[data-count="3"]{--gutter:#6a737d}                       /* 3 = "3 or more" */
.sv-note{color:#6639ba;user-select:none}                          /* a run-time value, not source (R16); aria-hidden, kept out of copied source (AC-3.7) */
.sv-line[aria-current="step"] .sv-chg{color:#a34a00;font-weight:700}   /* changed by the executing line (AC-21.3): colour and weight, only while it executes */
.sv-line[aria-current="step"]{background:linear-gradient(to right,var(--gutter) 0 10px,#9a6700 10px 13px,#fff0a0 13px)}   /* the bar sits right of the gutter and never paints over it */
.sv-hl{position:absolute;left:10px;right:0;pointer-events:none;box-sizing:border-box;border:2px solid #9a6700;border-radius:2px}
.sv-edit{display:block;width:100%;height:100%;box-sizing:border-box;border:0;resize:none;margin:0;padding:.5rem .75rem;
         font:inherit;color:inherit;tab-size:inherit;white-space:break-spaces;line-break:anywhere}
.sv-edit[hidden],.sv-view[hidden],.sv-window[hidden],.sv-bar[hidden],.sv-error[hidden],.sv-hl[hidden]{display:none}   /* display:block above would otherwise defeat the hidden attribute */
.sv-bar{display:flex;gap:.5rem;align-items:center;margin-top:.75rem}
.sv-bar button{font:inherit;padding:.4rem 1.2rem}
.sv-bar .sv-gear{padding:.4rem .6rem;line-height:1}
.sv-bar button:focus-visible{outline:3px solid #0b57d0;outline-offset:2px}
.sv-bar button[aria-pressed="true"]{font-weight:600}
.sv-rs{font-weight:600;padding:.1rem .5rem;border-radius:4px;border:1px solid;white-space:nowrap}
.sv-rs[data-rs=idle]{color:#57606a}.sv-rs[data-rs=run]{color:#0b57d0;background:#e8f0fe}.sv-rs[data-rs=done]{color:#116329;background:#e6f4ea}
.sv-settings{margin:0;padding:.75rem 1rem;border:1px solid #d0d7de;border-radius:6px;background:#fff;color:#1b1f24;font:16px/1.4 system-ui,sans-serif;inset:auto;position:fixed}   /* placed next to the gear by main.ts when it opens (top layer: no layout shift) */
.sv-settings fieldset{border:0;margin:0;padding:0}
.sv-settings legend{font-weight:600;padding:0}
.sv-settings label{display:block;padding:.15rem 0}
.sv-error{color:#b3261e;margin:.5rem 0 0;overflow-wrap:anywhere}
.sv-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
