/* =============================================================================
   vizzi-panel.css — the hero's output panel (labs 570)
   Tokens only (--ink, --ink-55, --line, --accent, --accent-fill, --taken), so
   the paper and the dark edition are both answered by the same lines; the two
   literals that are surfaces get their html[data-dark] line at the foot.
   Desktop: in the hero's empty left field, beside the copy, never moving it.
   Below 1260px: under the hero's buttons, as a strip on the same measure.
   ========================================================================== */
.vzo {
    --vzo-r: 3px;
    position: relative;
    display: grid; gap: .7rem;
    margin-top: 1.6rem;
    padding: .85rem .9rem .8rem;
    border: 1px solid var(--line); border-radius: var(--vzo-r);
    background: var(--paper);
    color: var(--ink-77);
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 0 var(--line-soft), 0 14px 32px -24px rgba(17, 22, 28, .28);
    -webkit-user-select: none; user-select: none;
}
.vzo::before {           /* the accent hairline every LABS panel opens with */
    content: ''; position: absolute; left: .9rem; top: -1px; width: 26px; height: 1px; background: var(--accent);
}
.vzo__hd { display: flex; align-items: center; gap: .6rem; }
.vzo__hd .vzo__st { margin-left: auto; }
/* the panel's dice: a compact Play key; app.js paints its ring and lamp like every other */
.vzo__dice {
    -webkit-appearance: none; appearance: none;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 26px; height: 26px; padding: 0; margin: -4px 0;
    color: var(--ink); background: transparent; cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--ink) 58%, transparent); border-radius: var(--vzo-r);
    --vzp-r: var(--vzo-r);
}
.vzo__dice .vz-play__die { width: 15px; height: 15px; display: block; }
.vzo__dice[data-vz-state="play"] { color: var(--vzp-c); border-color: var(--vzp-c); }
.vzo__dice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vzo__dice:active { transform: translateY(1px); }
.vzo__eb {
    font-size: .62rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; color: var(--ink-55);
}
.vzo__st {
    display: inline-flex; align-items: center; gap: .38rem;
    font-size: .56rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-55);
    white-space: nowrap;
}
.vzo__st i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.vzo[data-state="live"] .vzo__st { color: var(--free); }
.vzo[data-state="live"] .vzo__st i { background: var(--free); box-shadow: 0 0 0 3px var(--free-wash); animation: vzo-beat 1.6s ease-in-out infinite; }
.vzo[data-state="muted"] .vzo__st, .vzo[data-state="mic"] .vzo__st { color: var(--accent); }
.vzo[data-state="muted"] .vzo__st i, .vzo[data-state="mic"] .vzo__st i { background: var(--accent); box-shadow: none; }
@keyframes vzo-beat { 50% { opacity: .45; } }

/* THE LOADING READOUT (571): in the header's blank run, between OUTPUT and the status.
   The status's own type — small caps, .14em, ink-55 — with the number in the accent and
   a hairline bar UNDER the words (it takes no width: the header is 224px of type). While
   it shows, the status keeps its lamp and gives up its word, so the row never overflows;
   with nothing loading it is gone and the header is exactly what it was. */
.vzo__hd { min-width: 0; }
.vzo__ld {
    position: relative; display: inline-flex; align-items: center; gap: .32rem; min-width: 0; overflow: visible;
    font-size: .56rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-55);
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
.vzo__ld[data-ld="off"] { display: none; }
.vzo__ld:not([data-ld="off"]) + .vzo__st > span { display: none; }
.vzo__ldp { font-weight: 700; color: var(--accent); min-width: 3.4ch; text-align: right; }
.vzo__ldp:empty { display: none; }
.vzo__ldb { position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--line); border-radius: 1px; overflow: hidden; text-decoration: none; }
.vzo__ldb u { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); text-decoration: none; transition: width .12s linear; }
.vzo__ld[data-ld="ind"] .vzo__ldb u { width: 40%; animation: vzo-sweep 1.1s ease-in-out infinite; transition: none; }
.vzo__ld[data-ld="done"] { color: var(--free); }
.vzo__ld[data-ld="done"] .vzo__ldp { color: var(--free); }
.vzo__ld[data-ld="done"] .vzo__ldb u { background: var(--free); }
@keyframes vzo-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .vzo__ld[data-ld="ind"] .vzo__ldb u { animation: none; width: 100%; opacity: .5; } }

/* THE TWO DESK FOLDS (571, app.js foldKey): the mode keys and the effect keys, minimised
   until this browser opens them. The key wears the Symbols key's square; its chevron turns
   when open. Desk only — the phone keeps its own folds (516), so the key is gone there. */
.vz-foldk svg { transition: transform .18s ease; }
.vz-foldk[aria-expanded="true"] svg { transform: rotate(180deg); }
.vz-moderail > .vz-foldk, .vz-fxhead > .vz-foldk { margin-left: 0; flex: 0 0 auto; }
@media (max-width: 700px) { .vz-foldk { display: none !important; } }
@media (min-width: 701px) {
    .console[data-fold-modes="closed"] #vz-modek,
    .console[data-fold-modes="closed"] #vz-modepg,
    .console[data-fold-modes="closed"] .vz-moderail > .vz-modekr,
    .console[data-fold-modes="closed"] .vz-moderail > .vz-mdiv { display: none !important; }
    .console[data-fold-modes="closed"] .vz-moderail > .vz-code { margin-left: auto; }
    .console[data-fold-fxkeys="closed"] .vz-fxhead > .vz-fx { display: none !important; }
}

/* ---------------------------------------------------------------- dial + readouts */
.vzo__top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: .8rem; align-items: center; }
.vzo__dial {
    position: relative; width: 96px; height: 96px; border-radius: 50%;
    cursor: ns-resize; touch-action: none; outline: none;
}
.vzo__dial svg { display: block; width: 100%; height: 100%; overflow: visible; }
.vzo__ticks line { stroke: var(--line); stroke-width: 1; }
.vzo__ticks line.maj { stroke: var(--ink-55); }
.vzo__trk { fill: none; stroke: var(--line); stroke-width: 3.2; stroke-linecap: round; }
.vzo__val { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; transition: stroke .2s; }
.vzo__cap { fill: var(--paper); stroke: var(--line); stroke-width: 1; transition: stroke .2s; }
.vzo__dial svg .vzo__cap { r: 28; }
.vzo__ptr { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.vzo__dial:hover .vzo__cap, .vzo__dial.is-drag .vzo__cap { stroke: var(--ink-55); }
.vzo__dial:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--accent); }
.vzo__pct {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-38%);
    display: flex; justify-content: center; align-items: baseline; gap: 1px; pointer-events: none;
    font-family: 'Orbitron', ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ink);
}
.vzo__pct b { font-size: 1.12rem; font-weight: 600; letter-spacing: .02em; line-height: 1; }
.vzo__pct i { font-style: normal; font-size: .55rem; font-weight: 600; color: var(--ink-55); }
.vzo__pct.is-mute b { font-size: .62rem; letter-spacing: .16em; color: var(--accent); }
.vzo__pct.is-mute i { display: none; }
.vzo.is-muted .vzo__val { stroke: var(--ink-55); stroke-dasharray: 2 3.2; }

.vzo__rd { display: grid; gap: .28rem; min-width: 0; }
.vzo__r {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: .28rem;
    padding-bottom: .26rem; border-bottom: 1px solid var(--line-soft);
}
.vzo__r span, .vzo__ft span {
    font-size: .53rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted, var(--ink-55));
}
.vzo__r b {
    justify-self: end;
    font-family: 'Orbitron', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .7rem; font-weight: 500; color: var(--ink); letter-spacing: 0; white-space: nowrap;
}
.vzo__r b.is-hot { color: var(--taken); }
.vzo__r em { font-style: normal; font-size: .48rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-55); min-width: 1.45rem; }
.vzo__mute {
    -webkit-appearance: none; appearance: none;
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    margin-top: .2rem; height: 26px; padding: 0 .6rem;
    font: inherit; font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink); background: transparent;
    border: 1px solid var(--line); border-radius: var(--vzo-r); cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.vzo__mute:hover { border-color: var(--ink-55); }
.vzo__mute:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vzo__mute svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vzo__mute .spk { fill: currentColor; stroke: none; }
.vzo__mute .off { display: none; }
.vzo__mute[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.vzo__mute[aria-pressed="true"] .on { display: none; }
.vzo__mute[aria-pressed="true"] .off { display: inline; }
.vzo__mute.is-nudge { animation: vzo-nudge .7s ease-in-out 2; }
@keyframes vzo-nudge { 50% { box-shadow: 0 0 0 4px var(--accent-fill); } }

/* ---------------------------------------------------------------- meters + spectrum */
.vzo__mt { position: relative; padding-left: .85rem; }
.vzo__mt canvas { display: block; width: 100%; height: 14px; }
.vzo__sc { position: relative; height: 12px; margin-top: 3px; }
.vzo__sc span {
    position: absolute; left: -.85rem; font-size: .5rem; font-weight: 700; color: var(--ink-55); line-height: 1;
}
.vzo__sc span:first-child { top: -17px; }
.vzo__sc span:nth-child(2) { top: -10px; }
.vzo__sc i, .vzo__hz i {
    position: absolute; top: 0; transform: translateX(-50%);
    font-style: normal; font-size: .48rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-55); white-space: nowrap;
}
.vzo__sc i:nth-of-type(1) { transform: none; }
.vzo__sc i:last-of-type { transform: translateX(-100%); }
.vzo__sp canvas { display: block; width: 100%; height: 44px; }
.vzo__hz { display: flex; justify-content: space-between; margin-top: 3px; }
.vzo__hz i { position: static; transform: none; }

/* ---------------------------------------------------------------- tempo · pitch · space */
.vzo__ft {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem;
    padding-top: .55rem; border-top: 1px solid var(--line);
}
.vzo__ft div { display: grid; gap: .22rem; min-width: 0; }
/* THE SHUFFLE BOXES: square, 11px, a hairline when off, the accent with an ink tick when on */
.vzo__ck { display: inline-flex; align-items: center; gap: .36rem; cursor: pointer; min-width: 0; }
.vzo__ck input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.vzo__ck i {
    position: relative; flex: 0 0 auto; width: 11px; height: 11px; border-radius: 2px;
    border: 1px solid var(--ink-55); background: transparent;
    transition: background .12s, border-color .12s;
}
.vzo__ck i::after {
    content: ''; position: absolute; left: 3px; top: 0.5px; width: 3px; height: 6px;
    border: solid var(--on-accent, #2A1206); border-width: 0 1.6px 1.6px 0;
    transform: rotate(42deg) scale(.4); opacity: 0; transition: transform .12s, opacity .12s;
}
.vzo__ck input:checked + i { background: var(--accent-fill); border-color: var(--accent); }
.vzo__ck input:checked + i::after { opacity: 1; transform: rotate(42deg) scale(1); }
.vzo__ck:hover i { border-color: var(--ink); }
.vzo__ck input:focus-visible + i { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--accent); }
.vzo__ft div:has(input:not(:checked)) b { color: var(--ink-55); font-weight: 500; }
.vzo__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font-style: normal; }
.vzo__ft b {
    font-size: .74rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .5s;
}
.vzo__ft.is-new b.is-moved { color: var(--accent); transition: none; }

/* ---------------------------------------------------------------- placement */
@media (min-width: 1260px) {
    .hero.has-vzo .hero__in { position: relative; min-height: 318px; }
    .hero .vzo {
        position: absolute; top: 0; margin: 0;
        right: calc(100% - var(--gutter) + 36px);
        width: min(252px, calc(50vw - 22rem - 36px));
    }
}
@media (max-width: 1259.98px) {
    .vzo { max-width: 40rem; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.2rem; }
    .vzo__hd, .vzo__ft { grid-column: 1 / -1; }
    .vzo__top { grid-row: span 2; align-self: start; grid-template-columns: 96px 11.5rem; }
}
@media (max-width: 640px) {
    .vzo { grid-template-columns: minmax(0, 1fr); }
    .vzo__top { grid-row: auto; grid-template-columns: 88px minmax(0, 1fr); }
    .vzo__dial { width: 88px; height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
    .vzo[data-state="live"] .vzo__st i, .vzo__mute.is-nudge { animation: none; }
}
@media print { .vzo { display: none !important; } }

/* ---------------------------------------------------------------- the dark edition */
html[data-dark] .vzo { background: var(--deep-soft, #171E26); box-shadow: 0 14px 32px -22px rgba(0, 0, 0, .7); }
html[data-dark] .vzo__cap { fill: var(--deep-soft, #171E26); }
