/* Workshop: the default theme. Dark green factory floor, riveted plates,
   treaded belts for data, pipes for proofs, dashed lines for types. */
:root {
  color-scheme: dark;
  --page:#171e19; --panel:#212c25; --plate:#33453b; --edge:#a2beab;
  --text:#e9f1e7; --muted:#baccc0; --belt:#a3d9bd; --pipe:#a9d1ef;
  --type:#b2d4ec; --note:#f2cb91; --grid:#50675a; --bad:#ff8f7a;
  --line:#647d6c; --button:#2c3b32; --button-edge:#6f8a78; --input:#18211b; --board:#232d26;
}

svg text { fill:currentColor; font:600 13px ui-monospace,monospace; pointer-events:none }
svg .gridline { stroke:var(--grid); opacity:.6; fill:none }

/* Zones: thick top band (parameters) and bottom band (result), thin side walls. */
svg .zone { fill:#293c32; fill-opacity:.68; stroke:var(--edge); stroke-width:2.5 }
svg .zone.floor { fill:#25352c; stroke-width:3.5 }
svg .zone.lambda { fill:#2b3a40; stroke:#9fc3cf }
svg .zone.blueprint, svg .zone.pi { fill:#30364a; stroke:#c4b7e4 }
svg .zone.arm { fill:#343b2d; stroke:#c4c49b }
svg .zone.match { fill:#26332b; fill-opacity:.85; stroke:#d9b98c; stroke-width:3 }
svg .zone.echo { fill:none; stroke-width:1.2; stroke-dasharray:6 6; opacity:.55; pointer-events:none }
svg .band { fill:#3a5144; stroke:none; cursor:move }
svg .band.floor { fill:#33493d; cursor:default }
svg .band.lambda { fill:#36515a }
svg .band.blueprint, svg .band.pi { fill:#45405e }
svg .band.arm { fill:#4a4f37 }
svg .band.match { fill:#5a4a33 }
svg .outerwall { fill:#2f2a3d; fill-opacity:.8; stroke:#c4b7e4; stroke-width:5; cursor:move }
svg .wallgap { fill:#232d26; stroke:#c4b7e4; stroke-width:1 }
svg .zonetitle { fill:#e9e4d0; font:750 12px system-ui,sans-serif }
svg .selected.zone, svg .selected.outerwall, svg .selected.dock { stroke:var(--note); stroke-width:3.5 }
svg .resize { fill:var(--edge); cursor:nwse-resize }

/* Blocks: constants are riveted plates, constructors are capsules, Build is a hatched frame with a slot
   on its left, Self a miniature floor. */
svg .plate { fill:var(--plate); stroke:var(--edge); stroke-width:2; cursor:move }
svg .plate.type { fill:#2f4552 }
svg .plate.ctor { fill:#4a3f2a; stroke:#e6c17a; stroke-width:2.5 }
svg .plate.build { fill:#2c2840; stroke:#c4b7e4; stroke-width:2.5; stroke-dasharray:7 3 }
svg .plate.self { fill:#43303a; stroke:#e0a7bd; stroke-width:2.5 }
svg .blocklabel.ctor { fill:#f6deb0 }
svg .blocklabel.build { fill:#ddd3f5 }
svg .buildmark { fill:none; stroke:#c4b7e4; stroke-width:2 }
svg .mini { fill:#25352c; stroke:var(--edge); stroke-width:1.5; pointer-events:none }
svg .miniband { fill:#4d6b5a; pointer-events:none }
svg .inset { fill:none; stroke:#8da999; stroke-width:1; pointer-events:none }
svg .rivet { fill:var(--page); stroke:var(--edge); stroke-width:1; pointer-events:none }
svg .selected .plate, svg .selected .bpwall { stroke:var(--note); stroke-width:3 }
svg .bpbox { fill:#3a3450; fill-opacity:.6; stroke:none; cursor:move }
svg .bpwall { fill:none; stroke:#c4b7e4; stroke-width:3.5; pointer-events:none }
svg .lid { fill:#c4b7e4; stroke:#1a271f; stroke-width:1; pointer-events:none }

/* Ports, docks and slots. */
svg .dock { fill:var(--plate); stroke:var(--edge); stroke-width:2; cursor:move }
svg .port { fill:#23372c; stroke:currentColor; stroke-width:1.7; cursor:crosshair }
svg .port.hole { stroke-dasharray:3 2; fill:#2b2a22 }
svg .port.bad { stroke:var(--bad) }
svg .port.capped { fill:#3a3450 }
svg .port.forced { stroke-dasharray:1 2 }
svg .porttext { font-size:11px }
svg .slot { fill:#1d2a26; stroke:var(--type); stroke-width:1.2; stroke-dasharray:3 2; pointer-events:none }
svg .belt { color:var(--belt) }
svg .pipe { color:var(--pipe) }
svg .type { color:var(--type) }
svg .route { fill:none; stroke:#a7b2a0; stroke-width:2; stroke-linecap:round; pointer-events:none }
svg .internal { fill:none; stroke:var(--type); stroke-width:1.4; stroke-dasharray:3 3; pointer-events:none }
svg .riser { fill:none; stroke:#c9c3a6; stroke-width:1.2; stroke-dasharray:2 3; pointer-events:none }
svg .link { fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round }
svg .stageinputs { fill:#e9e4d0; font:700 13px ui-monospace,monospace; pointer-events:none }
svg .stage.above { fill:#e9e4d0; fill-opacity:.1; pointer-events:none }
svg .stage.below { fill:#000; fill-opacity:.18; pointer-events:none }
svg .stagemark { fill:none; stroke:#e9e4d0; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; pointer-events:none }
svg .stagecut { fill:none; stroke:var(--edge); stroke-width:2; stroke-dasharray:4 3; pointer-events:none }
svg .gate { fill:#3c473b; stroke:#a7b2a0; stroke-width:1.5; pointer-events:none }
svg .gate.band { fill:#5a4a33; stroke:#d9b98c; stroke-width:2 }
svg .gate.capture { fill:#c9c3a6; stroke:#1a271f }
svg .gate.seal { fill:#c4b7e4; stroke:#1a271f }

/* Wires: belts carry data, pipes carry proofs, dashed lines carry types. */
svg .wire { fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; pointer-events:none }
svg .belt .rail, svg .pipe .rail { stroke-width:6 }
svg .belt .inner { stroke:#2b5040; stroke-width:2.4; stroke-dasharray:1 6 }
svg .pipe .inner { stroke:#223c46; stroke-width:2.7 }
svg .type .rail { stroke-width:2; stroke-dasharray:5 4 }
svg .bad .rail { stroke:var(--bad) }
svg .hit { fill:none; stroke:transparent; stroke-width:12; cursor:pointer }
svg .selected .hit { stroke:rgba(242,203,145,.45) }
svg .junction { fill:currentColor; pointer-events:none }
svg .nodeerr { fill:var(--bad); font-size:11px }
svg .drag { stroke:var(--note); stroke-width:2; stroke-dasharray:4 3; fill:none; pointer-events:none }

/* Automation. */
svg .auto circle { fill:var(--note); stroke:#292016; stroke-width:1 }
svg .auto path { stroke:#292016; stroke-width:1.4; stroke-linecap:round }
svg .auto { pointer-events:none }

/* Levels: the level below shows through; other levels fade when all are shown.
   Labels on those levels are left out so they cannot cover the focused level's. */
svg .statement { opacity:.4 }
svg .ghost { opacity:.25 }
svg .ghost * { pointer-events:none }
svg .ghost.reach .port { pointer-events:auto }
svg .ghost .porttext, svg .ghost .zonetitle, svg .ghost .gate { display:none }
svg .dim { opacity:.32 }
svg .dim .porttext, svg .dim .zonetitle, svg .dim .gate, svg .dim .zone.echo, svg .dim .riser, svg .dim .auto { display:none }
svg .dim .wire.inner { display:none }
