/* VOICE: calm teaching instrument, a lab bench for one network.
   IDEA: a physics bench: the graph is the specimen, the panel is the set of dials.
   PICTURE: the live force-directed network, filling the right side.
   COLOUR and TYPE: stone ground, white panels, black ink, brick accent; Schibsted Grotesk.
   LAYOUT: controls column left, network right; stacks under 820px. */
:root{color-scheme:light dark;--bg:light-dark(#e7e4df,#171513);--panel:light-dark(#fff,#211e1b);--ink:light-dark(#141210,#eeeae4);--mute:light-dark(#615b54,#a59e95);--line:light-dark(#d4cfc8,#3a352f);--acc:#c8371e;--edge:light-dark(#8d8579,#77706a)}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 "Schibsted Grotesk",system-ui,sans-serif;overflow-x:clip}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
header{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:baseline;justify-content:space-between;padding:18px max(2vw,16px) 10px}
h1{font-size:30px;line-height:1.05;margin:0;font-weight:700}
header p{margin:0;color:var(--mute);max-width:70ch}
.wrap{display:grid;grid-template-columns:340px minmax(0,1fr);gap:14px;padding:0 max(2vw,16px) 14px;height:calc(100vh - 92px);min-height:560px}
@media(max-width:820px){.wrap{grid-template-columns:minmax(0,1fr);height:auto}.stage{order:-1;height:70vh;min-height:420px}aside{max-height:none}}
aside{background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow-y:auto;padding:12px 14px}
.btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:10px}
button{font:inherit;font-weight:600;min-height:40px;border-radius:7px;border:1px solid var(--line);background:var(--bg);color:var(--ink);cursor:pointer}
button.pri{background:var(--acc);border-color:var(--acc);color:#fff}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
fieldset{border:0;border-top:1px solid var(--line);margin:0;padding:10px 0 8px}
legend{display:contents}
.hd{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;cursor:pointer}
.hd input{width:18px;height:18px;accent-color:var(--acc)}
.note{margin:2px 0 6px;color:var(--mute);font-size:13px;line-height:1.4}
.row{display:grid;grid-template-columns:7.2em minmax(0,1fr) 4.2em;align-items:center;gap:8px;min-height:32px}
.row label{font-size:13px}
.row output{font-variant-numeric:tabular-nums;text-align:right;font-size:13px;white-space:nowrap}
.row input[type=range]{width:100%;accent-color:var(--acc)}
.chk{display:flex;gap:8px;align-items:center;font-size:13px;min-height:30px}
.chk input{accent-color:var(--acc);width:16px;height:16px}
.off{opacity:.42}
select{font:inherit;font-size:14px;padding:6px;border-radius:6px;border:1px solid var(--line);background:var(--bg);color:var(--ink);width:100%}
.credit{border-top:1px solid var(--line);margin:6px 0 0;padding-top:10px;font-size:12px;color:var(--mute)}.credit a{color:inherit}
.hint{font-size:12px;color:var(--mute);margin:2px 0 0}
.stage{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.stage svg{position:absolute;inset:0;width:100%;height:100%;cursor:grab;touch-action:none}
.hud{position:absolute;left:12px;top:10px;right:12px;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;pointer-events:none}
.hud b{font-variant-numeric:tabular-nums}
.meter{width:120px;height:8px;background:var(--line);border-radius:4px;overflow:hidden;align-self:center}
.meter i{display:block;height:100%;width:0;background:var(--acc)}
.legend{position:absolute;left:12px;bottom:10px;display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--mute);pointer-events:none}
.legend span::before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--c);margin-right:5px;vertical-align:-1px}
.tip{position:absolute;pointer-events:none;background:var(--ink);color:var(--panel);font-size:12px;padding:4px 8px;border-radius:5px;display:none;white-space:nowrap}
.legend em{font-style:normal}
