/* Ported from the current site; scoped under .simwrap. */
.simwrap {
  color-scheme: light;
  --bg: #eef1f3; --panel: #ffffff; --ink: #17212b; --muted: #5b6875; --line: #cfd6dc;
  --copper: #b4652a; --copper-soft: #f4e3d6;
  --ok: #1f7a4d; --ok-bg: #dcefe4; --warn: #9a6400; --warn-bg: #f7ead0;
  --hold: #5b6875; --hold-bg: #e3e7eb; --todo: #8a3a3a; --todo-bg: #f3dede; --board: #24493a;
  --hub: #1f5fbf; --dose: #7a3fb8; --power: #1d232a; --ups: #c0392b; --haz: #a87a00;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font-body);
  border-radius: 18px; padding: clamp(14px, 3vw, 28px); min-width: 0; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .6);
}
.simwrap h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: inherit; letter-spacing: 0.005em; margin: 0; font-variation-settings: normal; text-wrap: balance; }
.simwrap p { margin: 0; max-width: 68ch; }
.simwrap .mono, .simwrap code { font-family: var(--font-mono); font-size: 0.9em; }
.simwrap .vf { font-family: var(--font-mono); font-size: 11.5px; color: var(--warn); white-space: nowrap; }
.simwrap .sim { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.simwrap .sim .mono { overflow-wrap: anywhere; }
.simwrap .sim-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.simwrap .sim-res, .simwrap .sim-set { display: grid; gap: 14px; min-width: 0; }
.simwrap .sim-box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.simwrap .sim-box h3 { font-size: 15px; }
.simwrap .sim-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.simwrap .sim-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.simwrap .sim-tile span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.simwrap .sim-tile b { font-family: var(--font-mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.simwrap .sim-tile i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.simwrap .sim-tile.st-ok { border-color: var(--ok); } .simwrap .sim-tile.st-warn { border-color: var(--warn); background: var(--warn-bg); } .simwrap .sim-tile.st-bad { border-color: var(--todo); background: var(--todo-bg); }
.simwrap .sim-player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.simwrap .sim-player input[type=range] { flex: 1 1 260px; min-width: 0; accent-color: var(--copper); }
.simwrap .sim button { font: 500 13px var(--font-body); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.simwrap .sim button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); min-width: 74px; }
.simwrap .sim button:focus-visible, .simwrap .sim input:focus-visible, .simwrap .sim select:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.simwrap .sim select, .simwrap .sim input[type=number] { font: 14px var(--font-body); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; min-width: 0; }
.simwrap .sim input[type=number] { width: 78px; font-variant-numeric: tabular-nums; }
.simwrap .sim-clock { font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 132px; }
.simwrap .sim-flow { overflow-x: auto; }
.simwrap .sim-flow svg { display: block; width: 100%; height: auto; min-width: 520px; }
.simwrap .sim-flow text { font-family: var(--font-mono); fill: var(--ink); font-size: 11px; }
.simwrap .sim-flow .nd { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.simwrap .sim-flow .nd.live { fill: var(--panel); stroke: var(--ink); }
.simwrap .sim-flow .nd.dead { stroke-dasharray: 4 3; }
.simwrap .sim-flow .nt { font-family: var(--font-display); font-weight: 600; font-size: 12px; text-anchor: middle; }
.simwrap .sim-flow .ns { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.simwrap .sim-flow .eg { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 5 4; }
.simwrap .sim-flow .eg.on { stroke: var(--copper); stroke-width: 3.2; stroke-dasharray: none; }
.simwrap .sim-flow .eg.on.ac { stroke: var(--haz); }
.simwrap .sim-flow .ew { font-size: 10.5px; font-weight: 500; text-anchor: middle; fill: var(--muted); }
.simwrap .sim-flow .ew.on { fill: var(--ink); }
.simwrap .sim-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 6px; }
.simwrap .sim-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 4px; padding: 5px 8px; font-size: 13px; min-width: 0; }
.simwrap .sim-chip .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simwrap .sim-chip .vv { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.simwrap .sim-chip.s1, .simwrap .sim-chip.s7 { border-left-color: var(--ok); } .simwrap .sim-chip.s2, .simwrap .sim-chip.s3 { border-left-color: var(--hold); }
.simwrap .sim-chip.s4, .simwrap .sim-chip.s6 { border-left-color: var(--warn); background: var(--warn-bg); } .simwrap .sim-chip.s5 { border-left-color: var(--todo); background: var(--todo-bg); }
.simwrap .sim-chip.s0 { opacity: 0.55; }
.simwrap .sim-chart { display: grid; gap: 4px; }
.simwrap .sim-chart canvas { display: block; width: 100%; height: 150px; }
.simwrap .sim-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.simwrap .sim-leg span { display: inline-flex; align-items: center; gap: 6px; }
.simwrap .sim-leg i { display: inline-block; width: 18px; height: 0; border-top: 3px solid; }
.simwrap .sim-leg i.d { border-top-style: dashed; border-top-width: 2px; }
.simwrap .sim-leg i.sh { height: 10px; border: 0; background: var(--hold-bg); }
.simwrap .sim-ev { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; max-height: 320px; overflow-y: auto; }
.simwrap .sim-ev li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 8px; padding: 4px 6px; border-radius: 4px; color: var(--muted); }
.simwrap .sim-ev li.past { color: var(--ink); }
.simwrap .sim-ev li.past.bad { background: var(--todo-bg); } .simwrap .sim-ev li.past.out { background: var(--warn-bg); } .simwrap .sim-ev li.past.in { background: var(--ok-bg); }
.simwrap .sim-ev time { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.simwrap .sim-warn { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.simwrap .sim-warn li.past { color: var(--todo); font-weight: 500; }
.simwrap .sim-warn .ok { list-style: none; margin-left: -18px; color: var(--ok); background: none; }
.simwrap .sim fieldset { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); margin: 0; padding: 10px 12px 12px; display: grid; gap: 8px; min-width: 0; }
.simwrap .sim legend { font-family: var(--font-display); font-weight: 600; font-size: 14px; padding: 0 4px; }
.simwrap .sim .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; font-size: 13.5px; }
.simwrap .sim .row label { min-width: 0; }
.simwrap .sim .chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.simwrap .sim .chk input { accent-color: var(--copper); width: 16px; height: 16px; }
.simwrap .sim table.st { border-collapse: collapse; width: 100%; min-width: 0; font-size: 13px; }
.simwrap .sim table.st td, .simwrap .sim table.st th { padding: 3px 4px; border: 0; vertical-align: middle; text-align: left; background: none; color: inherit; font-weight: 400; line-height: inherit; }
.simwrap .sim table.st th { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.simwrap .sim table.st td.n { font-family: var(--font-mono); width: 1%; white-space: nowrap; }
.simwrap .sim table.st select { width: 100%; }
.simwrap .sim table.st input[type=number] { width: 64px; }
.simwrap .sim .hint { font-size: 12.5px; color: var(--muted); }
.simwrap .sim ul.simp { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 13.5px; max-width: 110ch; color: var(--ink); }
.simwrap .sim ul.simp li::marker { color: var(--copper); }
.simwrap .sim table.st th { font-size: 11.5px; }
@media (max-width: 1000px) { .simwrap .sim-layout { grid-template-columns: minmax(0, 1fr); } }
