/* Pictures, "panel" (home/pictures/panel.js, its system at its head): each tool a device, a black panel (the page's
 * dark), its corners the small radius, its cast set where it stands (home/index.css). In it each figure's own grid, in
 * its plot area only (.gd: a hairline in white at .07, 1 px at any size, plain, simply stopping; .st a piano roll's
 * stripe, a band in white at .05, plain as well); on it white and one grey
 * (.g), and two flat steps under the white for a spectrogram's runs as they die, flush (.l1, .l2); the cyan once at
 * most, on what is lit, set or found; red on the recorder alone. A shape's tone is its class (none: the white); .fn a
 * line that is read (1 unit: the divider, white), .ln a line that is the subject (1.5), .wv a wave's bars (1 unit
 * wide), .bd a spectrum's body, bars from its floor (1 unit wide), .hl a hairline in its tone (an axis); .cut the
 * panel's own dark, cut out of what lies under it (and a pass's ground); .sh a shaded stretch; .dash a line dashed;
 * .sq an outline's corners square (a film's frames); .dotted a line dotted each 2 units; .specks dots alone (lines of
 * no length: a dash would lose them in Chromium); .span an empty box, the field's, for a group to be clipped by. A
 * readout is real text in Geist, the page's sans, its figures tabular, in two sizes: 9 units (.g: the grey, every word
 * of the head line), and the large value, at 600, 30 units (.big); it is the drawing's, out of the page's words and
 * their floor, and the head that holds the readouts (.chrome) goes whole where the device is too small to hold them at
 * 8 px (a tile under 192 px wide: a phone's two across). Every rule under the block that names the set (data-pics).
 * What moves, pointed at, is listed under Motion, below */
/* (a tone between the ink and the ground is mixed in oklab, by lightness alone between two greys: mixed in oklch,
 * through hue, a white of hue 0 and a coloured ground, the home's blue menu's, meet in a purple) */
[data-pics="panel"] .pic {
  --tone: var(--on-dark);
  --g: color-mix(in oklab, var(--on-dark) 46%, var(--dark));
  border-radius: var(--radius-sm); background: var(--dark);
}
[data-pics="panel"] .pic path { fill: var(--tone); }
[data-pics="panel"] .pic .g { --tone: var(--g); }
[data-pics="panel"] .pic .l1 { --tone: color-mix(in oklab, var(--on-dark) 62%, var(--dark)); }
[data-pics="panel"] .pic .l2 { --tone: color-mix(in oklab, var(--on-dark) 32%, var(--dark)); }
[data-pics="panel"] .pic .hot { --tone: var(--hot); }
[data-pics="panel"] .pic .rec { --tone: var(--warn); }
[data-pics="panel"] .pic .cut { --tone: var(--dark); }
[data-pics="panel"] .pic :is(.fn, .ln, .wv, .bd, .hl, .gd) { fill: none; stroke: var(--tone); stroke-linecap: round; stroke-linejoin: round; }
[data-pics="panel"] .pic :is(.fn, .wv, .bd) { stroke-width: 1; }
[data-pics="panel"] .pic :is(.wv, .bd) { stroke-linecap: butt; }
[data-pics="panel"] .pic .ln { stroke-width: 1.5; }
[data-pics="panel"] .pic :is(.hl, .gd) { stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-linecap: butt; }
[data-pics="panel"] .pic .gd { stroke: rgb(255 255 255 / .07); }
[data-pics="panel"] .pic .st { fill: rgb(255 255 255 / .05); }
[data-pics="panel"] .pic .sh { fill: rgb(255 255 255 / .06); }
[data-pics="panel"] .pic .dash { stroke-dasharray: 2 2; }
[data-pics="panel"] .pic .sq { stroke-linejoin: miter; }
[data-pics="panel"] .pic :is(.dotted, .specks) { fill: none; stroke: var(--tone); stroke-width: 1; stroke-linecap: round; }
[data-pics="panel"] .pic .dotted { stroke-dasharray: 0 2; }
[data-pics="panel"] .pic .span { fill: none; }
[data-pics="panel"] .pic text { font: 400 9px/1 var(--font-display); font-variant-numeric: tabular-nums; fill: var(--on-dark); }
[data-pics="panel"] .pic text.g { fill: var(--g); }
[data-pics="panel"] .pic text.hot { fill: var(--hot); }
[data-pics="panel"] .pic text.big { font: 600 30px/1 var(--font-display); letter-spacing: -.03em; }
/* Motion, pointed at or reached by the keys (the tile's link), never at rest and never where motion is reduced. Each
 * device does what its tool does, in a loop, as long as it is pointed at: it begins the instant it is pointed at, at
 * its own beginning, by a cut (a figure written in begins empty), plays, and at its end cuts back to its beginning and
 * plays again: no lead-in, nothing faded in before it begins; nothing moved back to where it began, but where the
 * owner asked for the way back as a move (the pauses opened again, the tune's pitch and tempo back together, the tone
 * back to A4 as it went on). A loop's time is the drawing's (--T, where panel.js sets what is said with it), each
 * motion a group of a class of its own:
 *   stream   .flow: the caret devices that work as the sound runs (panel.js, THE PASS), as written: the caret still at
 *            the middle, what runs moving on to the right at one pace, smoothly, 24 units a second, a period (--P) in
 *            --T, without end or seam: a wave's outline over its still bars, a film, notes; a noise's specks by whole
 *            dots (.flow.by, --n steps a period). On the tools' key they swipe (home/variants/tools-swipe.css)
 *   swipe    .swept: the caret devices that take the whole sound before they give, in both forms: all still, the caret
 *            at the field's left edge at once, passing to its right edge, the result written behind it (.res, its
 *            ground three fields wide: the field's edges at its thirds), held, and cut back (--loop)
 *   write    .write, .scan: a figure written from its left as time runs (--T: three quarters of it written, the rest
 *            held), and the line that writes it where there is one (--span): the lossless check's spectrum, the
 *            spectrogram, the response as the sweep reaches it, the heard chirp, the words' boxes
 *   said     .win: what is in sight for its own time of the loop (--T, --o, --v: a half loop of its opacity, ending at
 *            its end, and one of its visibility, beginning at its start), a readout's values (.says: at rest its first
 *            alone) or a mark found (the cutoff)
 *   swing    .waver, .level, .drag, .glide: the tuner's needle swinging about its reading, the meter's bar rising to
 *            the target as the gain is applied, a syllable dragged through the pitches near it, the tone gliding from
 *            note to note and held; each moving on from where it is, its readouts following it; .gain, the meter's
 *            take growing to its size with the bar; .grows, the latency's delay drawn once the heard chirp has begun
 *   key      .shade, .try, .turn: the keys read in turn (--key each), the wheel's notes re-lit to each reading's
 *            strengths (--o0…--o3), the bars settling to its likelihoods, its row lit at once (--k its turn)
 *   edit     .rise, .tight, .piece, .close path: a change made again from the start, held, and moved back: the tune's
 *            pitch, then its tempo, alone, back together; the pauses closed to what is kept of them and opened
 *   take     .take: the recording running on under the head, smoothly, a phrase a period (--P, 56 units: 4 s at 14
 *            units a second); the record key blinking
 *   light    .beat path, .beats path: the beats lit as they sound, at the metronome's 120 (each in the cyan to the next,
 *            one always lit) and the BPM finder's 128 (--k a beat's place) */
[data-pics="panel"] .pic .res { clip-path: inset(0 0 0 50%); }
[data-pics="panel"] .pic :is(.says > :not(:first-child), .later, .turn:not(.found)) { opacity: 0; }
[data-pics="panel"] .pic .scan { visibility: hidden; }
[data-pics="panel"] .pic :is(.tight, .try, .glide, .close path) { transform-box: fill-box; transform-origin: left; }
[data-pics="panel"] .pic .level { transform-box: fill-box; transform-origin: bottom; }
[data-pics="panel"] .pic .gain { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  [data-pics="panel"] .pic { --loop: 3.6s; --key: 1.4s; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .flow { animation: panel-flow var(--T) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .flow.by { animation-timing-function: steps(var(--n)); }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .swept .flow { animation: none; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .swept .res { animation: panel-pass var(--loop) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .swept .playhead { animation: panel-sweep var(--loop) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .gain { animation: panel-gain var(--T) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .grows { animation: panel-measure var(--T) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .write { animation: panel-write var(--T) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .scan { animation: panel-scan var(--T) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .win { animation: panel-o var(--T) step-end var(--o) infinite, panel-v var(--T) step-end var(--v) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .waver { animation: panel-waver var(--T) var(--ease-in-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .level { animation: panel-level var(--T) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .drag { animation: panel-drag var(--T) cubic-bezier(.37, 0, .63, 1) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .glide { animation: panel-glide var(--T) var(--ease-in-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .turn { animation: panel-turn calc(var(--key) * 4) var(--ease-in-out) calc(var(--key) * (var(--k) - 4.84) + var(--late, 0s)) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .try { animation: panel-try calc(var(--key) * 4) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .shade { animation: panel-shade calc(var(--key) * 4) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .rise { animation: panel-rise var(--T) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .tight { animation: panel-tight var(--T) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .piece { animation: panel-gather var(--loop) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .close path { animation: panel-shorten var(--loop) var(--ease-out) infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .take { animation: panel-take var(--T) linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .chrome > .rec { animation: panel-blink 1s linear infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .beat path { animation: panel-light var(--T) step-end infinite; }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .beat path:nth-child(2) { animation-delay: calc(var(--T) / 4); }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .beat path:nth-child(3) { animation-delay: calc(var(--T) / 2); }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .beat path:nth-child(4) { animation-delay: calc(var(--T) * .75); }
  [data-pics="panel"] a:is(:hover, :focus-visible) .pic .beats path { animation: panel-click calc(8 * 60s / 128) step-end calc(var(--k) * 60s / 128) infinite; }
}
/* (stream: what runs moved on by its period from where it stands at rest, so its first frame is the picture and its
 * last the same again) */
@keyframes panel-flow { from { transform: none; } to { transform: translateX(var(--P)); } }
/* (swipe: the result from nothing at the field's left edge to the whole field over 60 % of the loop, the caret with
 * its edge, held, cut back; the result's ground three fields wide, so the field's edges are its thirds) */
@keyframes panel-pass { 0% { clip-path: inset(0 66.667% 0 0); } 60%, 100% { clip-path: inset(0 33.333% 0 0); } }
@keyframes panel-sweep { 0% { transform: translateX(calc(var(--half) * -1)); } 60%, 100% { transform: translateX(var(--half)); } }
/* (write: from nothing at the loop's start, written to its end over three quarters of it, then held; the line that
 * writes it with it, gone once it is written) */
@keyframes panel-write { 0% { clip-path: inset(0 100% 0 0); } 75%, 100% { clip-path: inset(0); } }
@keyframes panel-scan { 0% { transform: none; visibility: visible; } 75%, 100% { transform: translateX(var(--span)); visibility: hidden; } }
/* (said: a half loop on, a half loop off; the two together leave a value in sight from its start to its end) */
@keyframes panel-o { 0% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes panel-v { 0% { visibility: visible; } 50%, 100% { visibility: hidden; } }
/* (the needle about +3 cents: some 3 cents either way, 1.64 units a cent; its first swing easing out, so it goes at
 * once; panel.js reads the same keyframes for the readouts) */
@keyframes panel-waver {
  /* the design system's --ease-out written out: a keyframe's timing does not read a variable */
  0% { transform: none; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  22% { transform: translateX(5px); } 47% { transform: translateX(-4.5px); } 70% { transform: translateX(3px); } 88% { transform: translateX(-1.5px); }
  100% { transform: none; }
}
/* (the normaliser: the gain applied over the loop's first 40 %, easing out, so it goes at once: the meter's bar risen
 * from the take's level to the target, the take's wave from lowered by the gain to its size; held; panel.js reads the
 * same for the reading) */
@keyframes panel-level { 0% { transform: none; } 40%, 100% { transform: var(--to); } }
@keyframes panel-gain { 0% { transform: var(--k); } 40%, 100% { transform: none; } }
/* (the latency's delay: out of sight till the caret meets the heard chirp, .75 × 34/150 = 17 % of the loop, drawn
 * from the sent chirp's start to the heard one's by 27 %; panel.js holds the drawing to these) */
@keyframes panel-measure { 0%, 17% { clip-path: inset(0 100% 0 0); } 27%, 100% { clip-path: inset(0); } }
/* (the drag: four points and on to where it began, panel.js's DRAG, each turn a sine's, so it slows only as it turns
 * (the design system's in-out lingers at each end, a stop), its first move a sine's second half, so it goes at once) */
@keyframes panel-drag { 0% { transform: var(--t0); animation-timing-function: cubic-bezier(.61, 1, .88, 1); } 100% { transform: var(--t0); } 25% { transform: var(--t1); } 55% { transform: var(--t2); } 80% { transform: var(--t3); } }
/* (the tone: a third of the loop a note, each a glide over its first 12 % and then held alike: C♯5, E5, A4) */
@keyframes panel-glide { 0% { transform: var(--t0); } 12%, 33.333% { transform: var(--t1); } 45.333%, 66.667% { transform: var(--t2); } 78.667%, 100% { transform: var(--t0); } }
/* (key: lit a quarter of the round, fading into the next) */
@keyframes panel-turn { 0%, 21% { opacity: 1; } 25%, 96% { opacity: 0; } 100% { opacity: 1; } }
/* (the key's wheel: its notes re-lit to each reading's strengths, with its bars) */
@keyframes panel-shade {
  0% { opacity: var(--o0); }
  7%, 25% { opacity: var(--o1); }
  32%, 50% { opacity: var(--o2); }
  57%, 75% { opacity: var(--o3); }
  82%, 100% { opacity: var(--o0); }
}
/* (the key's bars: settling to each reading as it is lit, a quarter each, the found key's last) */
@keyframes panel-try {
  0% { transform: var(--t0); }
  7%, 25% { transform: var(--t1); }
  32%, 50% { transform: var(--t2); }
  57%, 75% { transform: var(--t3); }
  82%, 100% { transform: var(--t0); }
}
/* (the tempo changer: from the tune as it was, its pitch raised (0 to 18 %), then its tempo drawn together (30 to
 * 48 %), held, then both back together (78 to 92 %), each move easing out; the readouts change halfway through each,
 * panel.js) */
@keyframes panel-rise { 0% { transform: translateY(var(--dy)); } 18%, 78% { transform: none; } 92%, 100% { transform: translateY(var(--dy)); } }
@keyframes panel-tight { 0%, 30% { transform: scaleX(var(--s)); } 48%, 78% { transform: none; } 92%, 100% { transform: scaleX(var(--s)); } }
/* (the pauses closed over the loop's first quarter, held, opened again to their whole length (60 to 85 %), held) */
@keyframes panel-gather { 0% { transform: none; } 25%, 60% { transform: translateX(var(--dx)); } 85%, 100% { transform: none; } }
@keyframes panel-shorten { 0% { transform: none; } 25%, 60% { transform: translateX(var(--dx)) scaleX(var(--to)); } 85%, 100% { transform: none; } }
@keyframes panel-take { to { transform: translateX(calc(var(--P) * -1)); } }
@keyframes panel-blink { 0%, 4% { opacity: 1; } 10%, 50% { opacity: .3; } 56%, 100% { opacity: 1; } }
/* (a beat sounding: in the cyan from its beat to the next, a quarter of the bar) */
@keyframes panel-light { 0% { stroke: var(--hot); } 25%, 100% { stroke: var(--on-dark); } }
@keyframes panel-click { 0% { stroke: var(--tone); } .5% { stroke: var(--hot); } 12.5%, 100% { stroke: var(--tone); } }
/* (where a device is too small to hold its head line, the line goes and the device with it is as much lower: cut at
 * its top by the line's room, 18 units, the picture kept to its foot (its preserveAspectRatio), so no empty strip stands
 * over the figure) */
@container (max-width: 191px) { [data-pics="panel"] .pic .chrome { display: none; } [data-pics="panel"] .pic { aspect-ratio: 216 / 118; } }
