.ch01 {
  --ink: #17394c;
  --paper: #f4f2ec;
  --orange: #d77b49;
  --supply: #bb3d38;
  --return: #246a9b;
}
.ch01-toolbar, .ch01-positions, .ch01-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.ch01-toolbar { justify-content: space-between; margin-bottom: 14px; }
.ch01-positions button[aria-pressed="true"] {
  background: #fff0df; border-color: var(--orange); box-shadow: inset 0 -2px var(--orange);
}
.ch01-controls button:disabled { opacity: .46; cursor: default; }
.ch01-controls select { width: auto; font-size: .9rem; padding: 5px 6px; }
.ch01-stage { margin-top: 8px; }
.ch01-system { margin-top: 24px; scroll-margin-top: 14px; }
.ch01-system h3 { margin: 0 auto 0 0; }
.ch01-system-grid { display: grid; grid-template-columns: minmax(220px, 35%) minmax(0, 1fr); gap: 14px; }
.ch01-scenario { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ch01-scenario select { width: auto; font-size: .9rem; }
.ch01-circuit-panel { margin: 0; border: 1px solid #d5dfdc; border-radius: 7px; overflow: hidden; }
#ch01-circuit > svg { display: block; width: 100%; height: auto; }
.ch01-circuit-label { fill: #17394c; font-size: 16px; font-weight: 650; }
.ch01-pipe { fill: none; stroke: #a4b9be; stroke-width: 4; stroke-linejoin: round; }
.ch01-circuit-stream { fill: none; stroke-width: 3.5; stroke-linejoin: round; stroke: transparent; }
.ch01-circuit-stream[data-kind="supply"] { stroke: var(--supply); }
.ch01-circuit-stream[data-kind="return"] { stroke: var(--return); }
.ch01-circuit-stream.moving { stroke-dasharray: 8 5; animation: ch01-circuit-flow var(--flow-duration, .8s) linear infinite; }
@keyframes ch01-circuit-flow { to { stroke-dashoffset: -13; } }
.ch01-circuit-stream[data-line="A"][data-kind="return"], .ch01-circuit-stream[data-line="B"][data-kind="return"] { animation-direction: reverse; }
.ch01-circuit-stream[data-line="suction"].moving { stroke: #789fae; }
.ch01-paused .ch01-circuit-stream, .ch01-cutaway-idle .ch01-flow-particles { animation-play-state: paused; }
[data-chamber][data-kind="supply"] { fill: #f4d6cf; }
[data-chamber][data-kind="return"] { fill: #d3e8f2; }
[data-relief-arrow].relieving { stroke: var(--return); stroke-width: 2.6; }
.ch01-port-readings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 9px; text-align: center; }
.ch01-port-readings span { background: #f1f5f3; padding: 4px; font-weight: 700; }
.ch01-port-readings output { font-weight: 500; white-space: nowrap; }
.ch01 [data-spool] { cursor: ew-resize; touch-action: none; }
.ch01-drawing, .ch01-readout { margin: 0; border: 1px solid #d5dfdc; border-radius: 7px; overflow: hidden; }
.ch01-drawing svg, #ch01-symbol svg { display: block; width: 100%; height: auto; }
.ch01-drawing figcaption {
  display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 9px 14px; color: #3a5965; font-size: .78rem;
}
.ch01-drawing figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.ch01-drawing figcaption i { width: 13px; height: 4px; border-radius: 3px; }
.ch01-feed { background: var(--supply); }
.ch01-return { background: var(--return); }
.ch01-coil { background: var(--orange); }
.ch01-callouts path { fill: none; stroke: #657f8b; stroke-width: 1.5; }
.ch01-flow-supply { color: var(--supply); }
.ch01-flow-return { color: var(--return); }
.ch01-flow-particles { animation: ch01-flow var(--flow-duration, .75s) linear infinite; }
@keyframes ch01-flow { to { stroke-dashoffset: -20; } }
.ch01-paused .ch01-flow-particles { animation-play-state: paused; }
.is-energized .coil-winding { fill: #d77b49; stroke: #ffe1be; }
.ch01-readout { padding: 16px; background: #f7f8f4; }
.ch01-status { border-top: 1px solid #d5dfdc; padding-top: 10px; }
.ch01-status strong { font-size: 1.05rem; }
.ch01-status p { margin: 3px 0 14px; }
.ch01-port-key, .ch01-note { color: #46626b; margin: 12px 0 0; font-size: .82rem; }
.ch01-table { width: 100%; border-collapse: collapse; text-align: left; }
.ch01-table th, .ch01-table td { border-bottom: 1px solid #d5dfdc; padding: 8px; }
.ch01-table thead { background: #eef3f1; }
@media (max-width: 880px) {
  .ch01-system-grid { grid-template-columns: 1fr; }
  #ch01-symbol { max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch01-flow-particles, .ch01-circuit-stream.moving { animation: none; }
}
