/* The inside of the tower on the stage of the plan builder (views/plan-inside.js): a black board with the chip in its socket, the slots of memory with the modules that stand in them, the places of
   storage with the drives that are plugged into them, and the fans, as one picture of a workstation with its cover off. Colours are rules of this sheet (the CSP has no inline styles). The board
   and its parts are black in both themes; what changes with the page is the case round the window (a little lighter on a dark page, so that it does not sink into it) and the light on its
   edges. What follows the choice is `.on` (the cores of the chip, the modules, the drives): a module and a drive move in with the transitions below. */

.ps {
  --pvi-ch0: light-dark(#2c2e34, #44474f);
  --pvi-ch1: light-dark(#1c1e22, #2c2f35);
  --pvi-ch2: light-dark(#0e0f12, #1b1d21);
  --pvi-rim: light-dark(rgba(18, 22, 36, 0.6), rgba(255, 255, 255, 0.24));
  --pvi-lip: light-dark(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.5));
  --pvi-plate-a: light-dark(#17181c, #1f2125);
  --pvi-plate-b: light-dark(#0a0b0d, #101114);
}

/* ---- the colours that the gradients are made of (a stop takes its colour from one of these) ---- */
.pvi-ch0 { stop-color: var(--pvi-ch0); }
.pvi-ch1 { stop-color: var(--pvi-ch1); }
.pvi-ch2 { stop-color: var(--pvi-ch2); }
.pvi-pl0 { stop-color: var(--pvi-plate-a); }
.pvi-pl1 { stop-color: var(--pvi-plate-b); }
.pvi-k0 { stop-color: #040405; }
.pvi-k1 { stop-color: #0a0b0d; }
.pvi-k2 { stop-color: #111216; }
.pvi-k3 { stop-color: #17181c; }
.pvi-k4 { stop-color: #1e2025; }
.pvi-k5 { stop-color: #282a30; }
.pvi-k6 { stop-color: #34373e; }
.pvi-k7 { stop-color: #454952; }
.pvi-k8 { stop-color: #565b65; }
.pvi-s0 { stop-color: #2c2f35; }
.pvi-s1 { stop-color: #4b4e56; }
.pvi-s2 { stop-color: #70747c; }
.pvi-s3 { stop-color: #9b9fa7; }
.pvi-s4 { stop-color: #c4c7cd; }
.pvi-s5 { stop-color: #e4e6ea; }
.pvi-s6 { stop-color: #f8f9fb; }
.pvi-g1 { stop-color: #7a5c1c; }
.pvi-g2 { stop-color: #b08a34; }
.pvi-g3 { stop-color: #d4b25a; }
.pvi-g4 { stop-color: #f0dc98; }
.pvi-p0 { stop-color: #090a0c; }
.pvi-p2 { stop-color: #121419; }
.pvi-p3 { stop-color: #1a1d23; }
.pvi-n0 { stop-color: #05070b; }
.pvi-n1 { stop-color: #0e1424; }
.pvi-n2 { stop-color: #11151f; }
.pvi-n3 { stop-color: #1f2536; }
.pvi-a0 { stop-color: color-mix(in srgb, var(--accent) 52%, #000); }
.pvi-a1 { stop-color: color-mix(in srgb, var(--accent) 100%, #000); }
.pvi-a3 { stop-color: color-mix(in srgb, var(--accent) 62%, #fff); }
.pvi-w { stop-color: #fff; }
.pvi-b { stop-color: #000; }

/* ---- the case ---- */
.pvi-lip-hi { fill: none; stroke: var(--pvi-lip); stroke-width: 0.8; stroke-linecap: round; }
.pvi-lip-lo { fill: none; stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.8; stroke-linecap: round; }
.pvi-lip-in { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 0.8; stroke-linecap: round; }
.pvi-rim { fill: none; stroke: var(--pvi-rim); stroke-width: 0.9; }
.pvi-inner-shade { fill: none; stroke: #000; }
.pvi-brush-line { fill: rgba(255, 255, 255, 0.04); }

/* ---- the frame behind the fans, and the cable of the fans ---- */
.pvi-bar-lo { fill: none; stroke: #000; stroke-opacity: 0.5; stroke-width: 3.4; stroke-linejoin: round; }
.pvi-bar { fill: none; stroke: #7c8089; stroke-width: 2.6; stroke-linejoin: round; }
.pvi-bar-hi { fill: none; stroke: #e8eaee; stroke-opacity: 0.75; stroke-width: 0.7; stroke-linejoin: round; }
.pvi-rivet-big { fill: #aeb2ba; stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.4; }
.pvi-cable-lo { fill: none; stroke: #000; stroke-opacity: 0.5; stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.pvi-cable { fill: none; stroke: #0d0e11; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.pvi-cable-hi { fill: none; stroke: #fff; stroke-opacity: 0.28; stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the board ---- */
.pvi-tooth { fill: url(#pvs-grain-tile); opacity: 0.16; pointer-events: none; }
.pvi-edge-hi { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 0.8; stroke-linecap: round; }
.pvi-sh { fill: #000; fill-opacity: 0.075; }
.pvi-sh-lo { fill: #000; fill-opacity: 0.12; }
.pvi-sh-in { fill: #000; fill-opacity: 0.16; }
.pvi-sh2 { fill: #000; fill-opacity: 0.42; }
.pvi-trace { fill: none; stroke: #20232a; stroke-width: 0.8; stroke-linejoin: round; }
.pvi-trace-lo { fill: none; stroke: #000; stroke-opacity: 0.55; stroke-width: 0.9; stroke-linejoin: round; }
.pvi-trace-hi { fill: none; stroke: #343841; stroke-width: 0.3; stroke-linejoin: round; }
.pvi-via { fill: #292c33; }
.pvi-via-hole { fill: #050506; }
.pvi-smd { fill: #1c1e23; }
.pvi-smd-end { fill: #9a9ea6; fill-opacity: 0.85; }
.pvi-silk-line { fill: none; stroke: #9a9ea6; stroke-opacity: 0.4; stroke-width: 0.5; stroke-linejoin: round; }
.pvi-silk { fill: #9a9ea6; fill-opacity: 0.55; font-size: 3.6px; font-weight: 600; letter-spacing: 0.05em; }
.pvi-pin-hole { fill: #07080a; }
.pvi-fin { fill: none; stroke: rgba(255, 255, 255, 0.11); stroke-width: 0.9; }

/* ---- plastics, metal and gold ---- */
.pvi-hi { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 0.5; stroke-linecap: round; }
.pvi-lo { fill: none; stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.5; stroke-linecap: round; }
.pvi-conn { stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.4; }
.pvi-tower { stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.4; }
.pvi-lever { stroke: rgba(255, 255, 255, 0.16); stroke-width: 0.35; }
.pvi-rivet { fill: #9b9fa7; }
.pvi-pad { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-terminal { fill: #8a7a60; }
.pvi-polar { fill: #17181c; fill-opacity: 0.55; }
.pvi-chan { fill: #040405; stroke: rgba(0, 0, 0, 0.8); stroke-width: 0.4; }
.pvi-key { fill: #22242a; }
.pvi-comb-gold { fill: #b8963e; fill-opacity: 0.75; }
.pvi-comb-dark { fill: #7a5e22; fill-opacity: 0.5; }
/* the slots of the cards: the housing, its floor, the gold tips of the contacts, the slit between the rows, the key, the steel of the reinforcement with its tabs, the latch of light plastic */
.pvi-pc-housing { stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.4; stroke-linejoin: round; }
.pvi-pc-floor { fill: #0a0b0d; stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.3; }
.pvi-pin-gold { fill: #b8963e; fill-opacity: 0.85; }
.pvi-pc-slit { fill: none; stroke: #000; stroke-opacity: 0.85; stroke-width: 0.7; }
.pvi-pc-key { stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.3; }
.pvi-pc-steel { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; stroke-linejoin: round; }
.pvi-pc-tab { fill: #aeb2ba; }
.pvi-pc-latch { stroke: rgba(0, 0, 0, 0.45); stroke-width: 0.3; }
.pvi-pc-hook { fill: #9a9ea6; stroke: rgba(0, 0, 0, 0.45); stroke-width: 0.3; stroke-linejoin: round; }
.pvi-pc-ramp { fill: rgba(255, 255, 255, 0.4); }
.pvi-pc-ridge { fill: none; stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.4; stroke-linecap: round; }
.pvi-washer { fill: #15161a; stroke: rgba(255, 255, 255, 0.2); stroke-width: 0.4; }
.pvi-head { stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.3; }
.pvi-recess { fill: #1b1c20; }
.pvi-spark { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 0.5; stroke-linecap: round; }
.pvi-can { fill: #101114; stroke: rgba(255, 255, 255, 0.16); stroke-width: 0.4; }
.pvi-cap-top { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-cap-ring { fill: none; stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.35; }
.pvi-vent { fill: none; stroke: rgba(0, 0, 0, 0.45); stroke-width: 0.35; }
.pvi-choke-body { stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.4; }
.pvi-choke-in { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-mark { fill: none; stroke: rgba(255, 255, 255, 0.26); stroke-width: 0.4; stroke-linecap: round; }
.pvi-hole-dark { fill: #030304; }
.pvi-lip { fill: #0b0c0f; }

/* ---- the chip: the socket, the plate, the lever, the chip in it ---- */
.pvi-insert { stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.4; }
.pvi-sock-in { fill: #08090b; }
.pvi-lga-dot { fill: #c9a24a; fill-opacity: 0.7; }
.pvi-eyelet { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-pin { fill: none; stroke: #07080a; stroke-width: 1.1; stroke-linecap: round; }
.pvi-ss { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-ss-edge { fill: none; stroke: rgba(255, 255, 255, 0.6); stroke-width: 0.5; }
.pvi-ss-in { fill: none; stroke: rgba(0, 0, 0, 0.7); stroke-width: 0.8; }
.pvi-ss-tab { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-ss-brush { opacity: 0.55; pointer-events: none; }
.pvi-substrate { stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.4; }
.pvi-sub-edge { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 0.5; }
.pvi-pin1-gold { fill: #d4b25a; }
.pvi-chamfer { stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.3; stroke-linejoin: round; }
.pvi-ihs { stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.25; stroke-linejoin: round; }
.pvi-wire { fill: none; stroke: #8f939b; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pvi-wire-lo { fill: none; stroke: rgba(0, 0, 0, 0.5); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.pvi-wire-hi { fill: none; stroke: #fff; stroke-opacity: 0.6; stroke-width: 0.45; stroke-linecap: round; stroke-linejoin: round; }
.pvi-loop { fill: none; stroke: #8f939b; stroke-width: 1.6; }
.pvi-loop-lo { fill: none; stroke: rgba(0, 0, 0, 0.5); stroke-width: 2.2; }

/* what is seen through the lid: the outline of the two dies, the cores (lit with the accent when the chip has them), the light of the room over it all, the name */
.pvi-die { fill: rgba(6, 10, 22, 0.38); stroke: rgba(255, 255, 255, 0.3); stroke-width: 0.35; }
.pvi-die-block { fill: rgba(150, 170, 230, 0.08); stroke: rgba(255, 255, 255, 0.14); stroke-width: 0.25; }
.pvi-hatch-line { fill: rgba(150, 180, 255, 0.14); }
.pvi-l3 { fill: rgba(150, 170, 230, 0.16); stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.2; }
.pvs-core { fill: url(#pvi-core-off); stroke: rgba(160, 175, 215, 0.2); stroke-width: 0.25; }
.pvs-core.on { fill: url(#pvi-core-on); stroke: color-mix(in srgb, var(--accent) 60%, #fff); stroke-opacity: 0.8; stroke-width: 0.25; }
.pvi-core-line { fill: none; stroke: #000; stroke-opacity: 0.3; stroke-width: 0.3; }
.pvs-thread { fill: color-mix(in srgb, var(--accent) 18%, #fff); }
.pvi-gloss { pointer-events: none; }
.pvs-brand, .pvi-brand { font-size: 3.4px; font-weight: 600; letter-spacing: 0.26em; }
.pvs-model, .pvi-model { font-size: 4.5px; font-weight: 700; letter-spacing: -0.01em; }
.pvi-brand-empty { font-size: 6.4px; letter-spacing: 0.3em; }
.pvs-brand, .pvs-model { fill: #1d2025; fill-opacity: 0.8; }
.pvi-etch-hi { fill: #fff; fill-opacity: 0.5; }
.pvs-mark { fill: #1d2025; fill-opacity: 0.85; }

/* ---- the memory: the slots, and the modules that stand in them ---- */
.pvi-slot-wall-lo { fill: #050607; }
.pvi-slot-top { stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.3; }
.pvi-slot-key { fill: #2a2d33; }
.pvi-dimm { pointer-events: none; }
.pvi-dimm-top { fill: none; stroke: #50545d; stroke-width: 1; stroke-linecap: round; }
.pvi-dimm-notch { fill: #0a0b0d; }
.pvi-dram { fill: #0b0c0f; }
.pvi-dram-edge { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 0.4; stroke-linejoin: round; }
.pvi-dram-mark { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 0.4; stroke-linecap: round; }
.pvi-dram-dot { fill: rgba(255, 255, 255, 0.4); }
.pvi-pmic { fill: #0f1115; stroke: rgba(255, 255, 255, 0.14); stroke-width: 0.3; }
.pvi-dimm-glow { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.pvi-edge-lit { fill: none; stroke: color-mix(in srgb, var(--accent) 60%, #fff); stroke-opacity: 0.42; stroke-width: 0.36; stroke-linejoin: round; }
.pvi-dimm-bar { stroke: rgba(0, 0, 0, 0.4); stroke-width: 0.25; }
.pvi-dimm-bar-hi { fill: rgba(255, 255, 255, 0.5); }
.pvi-led { fill: color-mix(in srgb, var(--accent) 20%, #fff); }
/* a module in its slot: it comes in along the way that it leans (out of the board), from a little above, larger, with its shadow wide and soft; its shadow tightens as it lands. The parts go one at a
   time (plan-inside.js PACE): a module is in over 400 ms and its latches have snapped shut by 500, the next one starts then (--pvi-delay); one that goes out takes 220 ms, and the next goes when it
   is out (--pvi-out) */
.pvs-stick { opacity: 0; transform: translate(18px, -12.5px) scale(1.05); transform-box: fill-box; transform-origin: 30% 100%; transition: opacity 0.12s linear var(--pvi-out, 0ms), transform 0.22s ease-in var(--pvi-out, 0ms); }
.pvs-stick.on { opacity: 1; transform: none; transition: opacity 0.16s ease-out var(--pvi-delay, 0ms), transform 0.4s cubic-bezier(0.2, 0.85, 0.25, 1.05) var(--pvi-delay, 0ms); }
.pvi-dimm-shadow { opacity: 0; transform: translate(6px, 4px) scale(1.12); transform-box: fill-box; transform-origin: 0% 50%; transition: opacity 0.12s linear var(--pvi-out, 0ms), transform 0.22s ease-in var(--pvi-out, 0ms); }
.pvi-dimm-shadow.on { opacity: 1; transform: none; transition: opacity 0.24s ease-out var(--pvi-delay, 0ms), transform 0.4s cubic-bezier(0.2, 0.85, 0.25, 1.05) var(--pvi-delay, 0ms); }
/* the latches: swung out while the slot is empty, they snap in about their hinge when the module has landed */
.pvi-latch { transition: transform 0.18s ease-in var(--pvi-out, 0ms); }
.pvi-latch.up { transform: rotate(-38deg); }
.pvi-latch.dn { transform: rotate(56deg); }
.pvi-latches.full .pvi-latch { transform: none; transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--pvi-delay, 0ms) + 300ms); }

/* ---- the storage: the sockets, the standoffs, the drives ---- */
.pvi-m2-contacts { pointer-events: none; }
.pvi-gold-tail { fill: #a98531; }
.pvi-standoff { stroke: rgba(0, 0, 0, 0.55); stroke-width: 0.4; }
.pvi-m2-pcb { stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.4; }
.pvi-m2-pad { fill: #07080a; }
.pvi-m2-label { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.pvi-m2-ink { fill: none; stroke: #0b0c0f; stroke-opacity: 0.6; stroke-width: 0.6; stroke-linecap: round; }
.pvi-m2-ink-lit { fill: none; stroke: color-mix(in srgb, var(--accent) 80%, #fff); stroke-width: 0.9; stroke-linecap: round; }
.pvs-nand, .pvi-m2-dram, .pvi-m2-ctrl { stroke: rgba(255, 255, 255, 0.16); stroke-width: 0.35; }
/* a drive that is plugged in: it slides in from the left along its length (a little lifted at the far end: it settles), with its shadow wide and soft at first; then its screw drops in and turns.
   One drive at a time: it is in over 500 ms and its screw is home by 800, the next starts then (--pvi-delay); one that goes out takes 240 ms (--pvi-out) */
.pvs-drive { opacity: 0; transform: translate(-46px, 0) rotate(1.6deg); transform-box: fill-box; transform-origin: 100% 50%; transition: opacity 0.12s linear var(--pvi-out, 0ms), transform 0.24s ease-in var(--pvi-out, 0ms); }
.pvs-drive.on { opacity: 1; transform: none; transition: opacity 0.16s ease-out var(--pvi-delay, 0ms), transform 0.5s cubic-bezier(0.18, 0.82, 0.22, 1) var(--pvi-delay, 0ms); }
.pvi-drive-shadow { opacity: 0; transform: translate(-42px, 5px) scale(1.07); transform-box: fill-box; transform-origin: 100% 50%; transition: opacity 0.12s linear var(--pvi-out, 0ms), transform 0.24s ease-in var(--pvi-out, 0ms); }
.pvi-drive-shadow.on { opacity: 1; transform: none; transition: opacity 0.24s ease-out var(--pvi-delay, 0ms), transform 0.5s cubic-bezier(0.18, 0.82, 0.22, 1) var(--pvi-delay, 0ms); }
.pvi-m2-screw { opacity: 0; transform: scale(1.3) rotate(-200deg); transition: opacity 0.08s linear var(--pvi-out, 0ms), transform 0.16s ease-in var(--pvi-out, 0ms); }
.pvi-m2-screw.on { opacity: 1; transform: none; transition: opacity 0.1s ease-out calc(var(--pvi-delay, 0ms) + 470ms), transform 0.33s cubic-bezier(0.2, 0.8, 0.3, 1) calc(var(--pvi-delay, 0ms) + 470ms); }

/* ---- the fans ---- */
.pvi-fan-lip { fill: none; stroke: rgba(0, 0, 0, 0.7); stroke-width: 0.8; }
.pvi-strut { fill: #1a1b1f; }
.pvi-hole { fill: #030304; }
.pvi-hole-lip { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 0.5; }
.pvi-blade-fan { stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.4; stroke-linejoin: round; }
.pvi-blade-edge { fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 0.7; stroke-linecap: round; }
.pvi-hub-lip { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 0.5; }
.pvi-hub-label { fill: #0d0e11; stroke: rgba(255, 255, 255, 0.14); stroke-width: 0.4; }
.pvi-hub-label-in { fill: #17181c; }
.pvi-hub-mark { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 0.5; stroke-linejoin: round; }

/* a person who asked for less motion sees every part where it belongs at once */
@media (prefers-reduced-motion: reduce) {
  .pvs-stick, .pvs-stick.on, .pvi-dimm-shadow, .pvi-dimm-shadow.on, .pvi-latch, .pvi-latches.full .pvi-latch, .pvs-drive, .pvs-drive.on, .pvi-drive-shadow, .pvi-drive-shadow.on, .pvi-m2-screw, .pvi-m2-screw.on { transition: none; }
}
