/* NQ visuals: answer path, key figures, evidence panel and visual explainers.
   Colours come from NQ tokens (nq-ui.css / tokens.css), so light and dark themes
   follow the page. Motion only inside prefers-reduced-motion: no-preference. */

.nqv-root { display: grid; gap: 0.75rem; margin: 0.75rem 0 0; }
.nqv-root:empty { display: none; }
.nqv-muted { color: var(--nq-text-muted); font-size: 0.85rem; margin: 0; }
.nqv-note { color: var(--nq-text-muted); font-size: 0.8rem; line-height: 1.55; margin: 0; }
.nqv-label { color: var(--nq-text-secondary); font: 600 0.72rem/1.4 var(--f-mono); letter-spacing: 0.02em; margin: 0; }
.nqv-kicker { color: var(--nq-text-muted); font: 600 0.68rem/1.4 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Key figures ── */
.nqv-figs { display: grid; gap: 0.4rem; }
.nqv-fig-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.nqv-fig {
  display: inline-flex; align-items: baseline; gap: 0.15rem;
  min-height: 2rem; padding: 0.3rem 0.7rem;
  border: 1px solid var(--nq-border); border-radius: 8px;
  background: var(--nq-bg-secondary);
  color: var(--nq-text); font: 600 0.9rem/1.2 var(--f-sans);
  font-variant-numeric: tabular-nums;
}
.nqv-fig .nqv-num { color: var(--nq-accent); }
.nqv-fig .nqv-num, .nqv-fig { white-space: nowrap; }

/* ── Explainer card ── */
.nqv-card {
  display: grid; gap: 0.75rem;
  padding: 0.9rem 1rem 0.95rem;
  border: 1px solid var(--nq-border); border-radius: var(--nq-radius);
  background: var(--nq-bg-secondary);
}
.nqv-card-head { display: grid; gap: 0.2rem; }
.nqv-card-head h3 { margin: 0; color: var(--nq-text); font: 650 1rem/1.3 var(--f-sans); letter-spacing: -0.01em; }
.nqv-card-body { min-width: 0; }
.nqv-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.9rem; border-top: 1px solid var(--nq-border); padding-top: 0.6rem; }
.nqv-caption { margin: 0; color: var(--nq-text-secondary); font-size: 0.82rem; line-height: 1.5; flex: 1 1 16rem; }
.nqv-tool {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.25rem;
  color: var(--nq-accent); font-size: 0.85rem; font-weight: 600; text-decoration: none;
  text-underline-offset: 3px;
}
.nqv-tool:hover { text-decoration: underline; }

/* ── Shared widget layout ── */
.nqv-split { display: grid; gap: 0.9rem; }
.nqv-stack { display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
.nqv-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.nqv-btn-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nqv-btn {
  min-height: 40px; padding: 0 0.8rem;
  border: 1px solid var(--nq-border-hover); border-radius: 8px;
  background: var(--nq-bg-tertiary); color: var(--nq-text);
  font: 600 0.8rem/1 var(--f-sans); cursor: pointer;
}
.nqv-btn:hover { border-color: var(--nq-accent); color: var(--nq-accent); }
.nqv-btn[aria-pressed="true"] { border-color: var(--nq-accent); color: var(--nq-accent); background: color-mix(in srgb, var(--nq-accent) 10%, transparent); }
.nqv-field { display: grid; gap: 0.25rem; min-width: 0; }
.nqv-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; color: var(--nq-text-secondary); font-size: 0.82rem; }
.nqv-out { color: var(--nq-text); font: 600 0.82rem/1 var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nqv-range { width: 100%; height: 40px; margin: 0; accent-color: var(--nq-accent); cursor: pointer; }
.nqv-number, .nqv-text {
  width: 100%; min-height: 40px; padding: 0 0.6rem;
  border: 1px solid var(--nq-border-hover); border-radius: 8px;
  background: var(--nq-bg); color: var(--nq-text); font: 500 0.9rem var(--f-mono);
}
.nqv-number:focus-visible, .nqv-text:focus-visible, .nqv-range:focus-visible { outline: 2px solid var(--nq-accent); outline-offset: 2px; }
.nqv-big { margin: 0; color: var(--nq-text); font: 700 1.5rem/1.2 var(--f-sans); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.nqv-status { margin: 0; color: var(--nq-text-secondary); font-size: 0.86rem; line-height: 1.55; min-height: 1.5em; }
.nqv-status[data-state="fault"] { color: var(--nq-error); }
.nqv-status[data-state="over"], .nqv-status[data-state="under"] { color: var(--nq-warn); }
.nqv-formula { margin: 0; color: var(--nq-text-secondary); font: 500 0.78rem/1.6 var(--f-mono); overflow-wrap: anywhere; }
.nqv-subst { display: block; color: var(--nq-text-muted); }
.nqv-list { margin: 0; padding-left: 1.1rem; color: var(--nq-text-secondary); font-size: 0.84rem; line-height: 1.6; display: grid; gap: 0.3rem; }
.nqv-svg { display: block; width: 100%; max-width: 520px; height: auto; overflow: visible; }
.nqv-svg text { font: 500 12px var(--f-mono); fill: var(--nq-text-muted); }
.nqv-svg-short { margin-top: 0.4rem; }
.nqv-axis { font: 500 12px var(--f-mono); fill: var(--nq-text-muted); }
.nqv-grid { stroke: var(--nq-border); stroke-width: 1; }
.nqv-line-main { stroke: var(--nq-accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.nqv-line-warn { stroke: var(--nq-warn); stroke-width: 1.8; }
.nqv-setpoint { stroke: var(--nq-text-secondary); stroke-width: 1.2; stroke-dasharray: 5 4; }
.nqv-band { fill: color-mix(in srgb, var(--nq-accent) 10%, transparent); }
.is-hidden, .nqv-root [hidden] { display: none !important; }

/* ── SVG marks that need explicit paint ── */
.nqv-dot { fill: var(--nq-text); }
.nqv-cursor { stroke: var(--nq-text-muted); stroke-width: 1; stroke-dasharray: 2 3; }
.nqv-nyq { stroke: var(--nq-text-secondary); stroke-width: 1; stroke-dasharray: 4 3; }
.nqv-mark-src { fill: var(--nq-accent); }
.nqv-mark-alias { fill: var(--nq-bg-secondary); stroke: var(--nq-warn); stroke-width: 2; }
.nqv-zone-early { fill: color-mix(in srgb, var(--nq-warn) 7%, transparent); }
.nqv-zone-random { fill: color-mix(in srgb, var(--nq-text-muted) 6%, transparent); }
.nqv-zone-wear { fill: color-mix(in srgb, var(--nq-error) 7%, transparent); }
.nqv-ref { fill: none; stroke: var(--nq-text-muted); stroke-width: 1.4; stroke-dasharray: 4 3; }

/* ── Key-value rows ── */
.nqv-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0; }
.nqv-kv-wide { grid-template-columns: 1fr; }
.nqv-kv > div { border: 1px solid var(--nq-border); border-radius: 8px; padding: 0.45rem 0.6rem; background: var(--nq-bg); min-width: 0; }
.nqv-kv dt { color: var(--nq-text-muted); font: 500 0.7rem/1.4 var(--f-mono); }
.nqv-kv dd { margin: 0; }
.nqv-val { color: var(--nq-text); font: 600 0.95rem/1.3 var(--f-sans); font-variant-numeric: tabular-nums; }

/* ── Loop scaler ── */
.nqv-gauge .nqv-zone-base { fill: none; stroke: var(--nq-border); stroke-width: 14; stroke-linecap: butt; }
.nqv-zone { fill: none; stroke-width: 14; stroke-linecap: butt; }
.nqv-zone-ok { stroke: color-mix(in srgb, var(--nq-ok) 65%, transparent); }
.nqv-zone-warn { stroke: color-mix(in srgb, var(--nq-warn) 70%, transparent); }
.nqv-zone-fault { stroke: color-mix(in srgb, var(--nq-error) 70%, transparent); }
.nqv-tick { stroke: var(--nq-text-muted); stroke-width: 1.2; }
.nqv-needle { stroke: var(--nq-text); stroke-width: 3; stroke-linecap: round; }
.nqv-hub { fill: var(--nq-accent); }
.nqv-x-bg { fill: var(--nq-bg); stroke: var(--nq-error); stroke-width: 1.5; }
.nqv-x { stroke: var(--nq-error); stroke-width: 2; stroke-linecap: round; fill: none; }
.nqv-pct { margin: 0; color: var(--nq-text-secondary); font: 500 0.82rem/1.4 var(--f-mono); }
.nqv-span { position: relative; height: 12px; border: 1px solid var(--nq-border-hover); border-radius: 6px; background: var(--nq-bg); overflow: visible; }
.nqv-span-fill { position: absolute; inset: 0; border-radius: 5px; background: color-mix(in srgb, var(--nq-accent) 55%, transparent); transform-origin: left center; transform: scaleX(0.5); }
.nqv-span-mark { position: absolute; top: -5px; width: 2px; height: 22px; margin-left: -1px; background: var(--nq-text); border-radius: 1px; }
.nqv-span-mark[data-out="true"] { background: var(--nq-error); }

/* ── Control chart ── */
.nqv-limit-bad { stroke: var(--nq-error); stroke-width: 1.4; }
.nqv-limit-soft { stroke: var(--nq-text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.nqv-center { stroke: var(--nq-text-secondary); stroke-width: 1.2; }
.nqv-shift-line { stroke: var(--nq-text-muted); stroke-width: 1; stroke-dasharray: 2 3; }
.nqv-pt { fill: var(--nq-accent); }
.nqv-pt-warn { fill: var(--nq-warn); }
.nqv-pt-bad { fill: var(--nq-error); }
.nqv-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.nqv-legend li { min-height: 2rem; display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border: 1px solid var(--nq-border); border-radius: 999px; font: 500 0.75rem var(--f-mono); color: var(--nq-text-secondary); }
.nqv-legend-bad { border-color: color-mix(in srgb, var(--nq-error) 45%, transparent) !important; }
.nqv-legend-warn { border-color: color-mix(in srgb, var(--nq-warn) 45%, transparent) !important; }

/* ── OEE waterfall ── */
.nqv-wf { display: grid; gap: 0.7rem; }
.nqv-wf-row { display: grid; gap: 0.3rem; }
.nqv-wf-head { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--nq-text-secondary); font-size: 0.84rem; }
.nqv-wf-val { color: var(--nq-text); font: 600 0.84rem var(--f-mono); font-variant-numeric: tabular-nums; }
.nqv-wf-track { position: relative; height: 22px; border-radius: 6px; background: var(--nq-bg-tertiary); border: 1px solid var(--nq-border); overflow: hidden; }
.nqv-wf-keep { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; background: color-mix(in srgb, var(--nq-accent) 60%, transparent); }
.nqv-wf-loss { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--nq-warn) 55%, transparent) 0 4px, transparent 4px 8px); display: flex; align-items: center; justify-content: center; }
.nqv-wf-loss::after { content: attr(data-label); font: 600 0.7rem var(--f-mono); color: var(--nq-text); background: var(--nq-bg-secondary); padding: 0 0.3rem; border-radius: 4px; white-space: nowrap; }

/* ── Spectrum ── */
.nqv-spectrum { cursor: ew-resize; }
.nqv-handle { fill: var(--nq-accent); stroke: var(--nq-bg-secondary); stroke-width: 2; }
.nqv-mark { stroke-width: 1; stroke-dasharray: 3 3; }
.nqv-mark.is-speed { stroke: var(--nq-accent); }
.nqv-mark.is-defect { stroke: var(--nq-warn); }
.nqv-mark-label.is-speed { fill: var(--nq-accent); }
.nqv-mark-label.is-defect { fill: var(--nq-warn); }

/* ── Modbus byte strips ── */
.nqv-bf-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.nqv-bf {
  flex-basis: 0; min-width: 4.2rem; min-height: 56px; padding: 0.4rem 0.45rem;
  display: grid; gap: 0.2rem; align-content: space-between; text-align: left;
  border: 1px solid var(--nq-border-hover); border-radius: 8px;
  background: var(--nq-bg); color: var(--nq-text); cursor: pointer;
}
.nqv-bf-name { font: 600 0.7rem/1.25 var(--f-sans); color: var(--nq-text-secondary); }
.nqv-bf-hex { font: 600 0.9rem/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--nq-text); }
.nqv-bf-mbap { background: color-mix(in srgb, var(--nq-accent) 9%, var(--nq-bg)); }
.nqv-bf-addr { background: color-mix(in srgb, var(--nq-accent) 16%, var(--nq-bg)); }
.nqv-bf-crc { background: color-mix(in srgb, var(--nq-warn) 14%, var(--nq-bg)); }
.nqv-bf.is-on, .nqv-bf:hover, .nqv-bf:focus-visible { border-color: var(--nq-accent); box-shadow: inset 0 0 0 1px var(--nq-accent); }

/* ── OPC UA ── */
.nqv-radios { border: 0; margin: 0; padding: 0; display: grid; gap: 0.5rem; min-width: 0; }
.nqv-radios legend { padding: 0; margin-bottom: 0.4rem; }
.nqv-radio-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.nqv-radio-card {
  min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.4rem 0.5rem; text-align: center; cursor: pointer;
  border: 1px solid var(--nq-border-hover); border-radius: 8px; background: var(--nq-bg);
  color: var(--nq-text-secondary); font: 600 0.8rem/1.25 var(--f-sans);
}
.nqv-radio-card:has(input:checked) { border-color: var(--nq-accent); color: var(--nq-accent); background: color-mix(in srgb, var(--nq-accent) 10%, transparent); }
.nqv-radio-card:has(input:focus-visible) { outline: 2px solid var(--nq-accent); outline-offset: 2px; }
.nqv-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nqv-radio-card { position: relative; }
.nqv-opc-track { position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.8fr); align-items: center; gap: 0.5rem; }
.nqv-end { display: grid; gap: 0.15rem; padding: 0.6rem 0.5rem; border: 1px solid var(--nq-border); border-radius: 8px; background: var(--nq-bg); text-align: center; font-size: 0.78rem; color: var(--nq-text-muted); }
.nqv-end b { color: var(--nq-text); font-size: 0.85rem; }
.nqv-lane { position: relative; height: 64px; border-top: 1px dashed var(--nq-border-hover); border-bottom: 1px dashed var(--nq-border-hover); }
.nqv-packet {
  position: absolute; left: 0; top: 50%; transform: translate(0, -50%);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; max-width: 100%;
  padding: 0.3rem 0.45rem; border: 1px solid var(--nq-accent); border-radius: 6px;
  background: var(--nq-bg-secondary); color: var(--nq-text); font: 500 0.72rem/1.3 var(--f-mono);
}
.nqv-packet-opc { z-index: 1; }
.nqv-pkt-body { overflow-wrap: anywhere; }
.nqv-badge { display: none; font: 600 0.62rem/1 var(--f-mono); padding: 0.15rem 0.3rem; border-radius: 4px; border: 1px solid currentColor; }
.nqv-packet.is-signed .nqv-badge-sign { display: inline-block; color: var(--nq-ok); }
.nqv-packet.is-locked .nqv-badge-lock { display: inline-block; color: var(--nq-accent); }
.nqv-packet.is-locked { border-color: var(--nq-accent); }
.nqv-packet.is-signed:not(.is-locked) { border-color: var(--nq-ok); }

/* ── MQTT ── */
.nqv-mq-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr); gap: 0.6rem; align-items: center; }
.nqv-mq-col { display: grid; gap: 0.5rem; align-content: center; min-width: 0; }
.nqv-pub, .nqv-sub, .nqv-broker {
  display: grid; gap: 0.15rem; min-height: 44px; padding: 0.5rem 0.55rem; min-width: 0;
  border: 1px solid var(--nq-border-hover); border-radius: 8px; background: var(--nq-bg);
  color: var(--nq-text); text-align: left; font: inherit;
}
.nqv-pub { cursor: pointer; }
.nqv-pub:hover, .nqv-pub:focus-visible { border-color: var(--nq-accent); }
.nqv-pub b, .nqv-sub b, .nqv-broker b { font: 600 0.8rem/1.25 var(--f-sans); color: var(--nq-text); }
.nqv-pub code, .nqv-sub code { font: 500 0.66rem/1.35 var(--f-mono); color: var(--nq-text-muted); overflow-wrap: anywhere; }
.nqv-pub-val { font: 600 0.72rem var(--f-mono); color: var(--nq-accent); }
.nqv-broker { text-align: center; border-color: var(--nq-accent); background: color-mix(in srgb, var(--nq-accent) 8%, var(--nq-bg)); }
.nqv-broker span { font-size: 0.7rem; color: var(--nq-text-muted); }
.nqv-sub-state { font: 500 0.66rem var(--f-mono); color: var(--nq-text-muted); min-height: 1em; }
.nqv-sub.is-hit { border-color: var(--nq-ok); }
.nqv-sub.is-hit .nqv-sub-state { color: var(--nq-ok); }
.nqv-sub.is-miss { opacity: 0.6; }
.nqv-packet-mq { top: 0; left: 0; transform: none; z-index: 2; pointer-events: none; font-weight: 600; color: var(--nq-accent); background: var(--nq-bg); }
.nqv-log { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.2rem; color: var(--nq-text-secondary); font: 500 0.74rem/1.5 var(--f-mono); overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .nqv-mq-stage { grid-template-columns: 1fr; }
}

/* ── Retrieval fallback ── */
.nqv-flow { display: grid; gap: 0.5rem; }
.nqv-flow-node { display: grid; gap: 0.25rem; padding: 0.6rem 0.75rem; border: 1px solid var(--nq-border-hover); border-radius: 8px; background: var(--nq-bg); min-width: 0; }
.nqv-flow-node b { color: var(--nq-text); font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; }
.nqv-flow-arrow { justify-self: center; color: var(--nq-text-muted); font: 600 0.9rem var(--f-mono); line-height: 1; }
.nqv-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.nqv-rank-row { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
.nqv-rank-no { font: 600 0.75rem var(--f-mono); color: var(--nq-text-muted); text-align: center; }
.nqv-rank-row.is-used .nqv-rank-no { color: var(--nq-accent); }
.nqv-rank-row { grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; }
.nqv-rank-title { color: var(--nq-text); font-size: 0.82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nqv-used { font: 500 0.66rem var(--f-mono); color: var(--nq-accent); white-space: nowrap; }

/* ── Evidence panel ── */
.nqv-evidence { display: grid; gap: 0.6rem; padding: 0.85rem 0.95rem; border: 1px solid var(--nq-border); border-radius: var(--nq-radius); background: var(--nq-bg-secondary); }
.nqv-ev-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.3rem 0.6rem; }
.nqv-ev-counts { color: var(--nq-text-secondary); font: 600 0.78rem var(--f-mono); font-variant-numeric: tabular-nums; }
.nqv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.nqv-bar { display: grid; gap: 0.25rem; padding: 0.2rem 0.3rem; margin: 0 -0.3rem; border-radius: 6px; }
.nqv-bar.is-on { background: color-mix(in srgb, var(--nq-accent) 8%, transparent); }
.nqv-bar-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; min-width: 0; }
.nqv-bar-title { color: var(--nq-text); font-size: 0.82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nqv-bar-val { color: var(--nq-text-secondary); font: 600 0.75rem var(--f-mono); font-variant-numeric: tabular-nums; flex: none; }
.nqv-track { height: 8px; border-radius: 4px; border: 1px solid var(--nq-border); background: var(--nq-bg-tertiary); overflow: hidden; }
.nqv-fill { display: block; width: 100%; height: 100%; background: color-mix(in srgb, var(--nq-accent) 75%, transparent); transform-origin: left center; }
.nqv-bar.is-on .nqv-fill { background: var(--nq-accent); }
.nqv-bar-note { margin: 0; color: var(--nq-text-muted); font-size: 0.76rem; line-height: 1.5; }
.nqv-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.nqv-chip-item { display: contents; }
.nqv-chip {
  display: inline-flex; align-items: center; min-height: 40px; max-width: 100%;
  padding: 0.25rem 0.7rem; border: 1px solid var(--nq-border-hover); border-radius: 999px;
  background: var(--nq-bg); color: var(--nq-text-secondary); font: 500 0.72rem/1.3 var(--f-mono);
  text-align: left; text-decoration: none; cursor: pointer; overflow-wrap: anywhere;
}
.nqv-chip:hover, .nqv-chip:focus-visible { border-color: var(--nq-accent); color: var(--nq-accent); }
.nqv-chip[aria-pressed="true"] { border-color: var(--nq-accent); color: var(--nq-accent); background: color-mix(in srgb, var(--nq-accent) 10%, transparent); }
.nqv-chip-link { color: var(--nq-accent); }
.nqv-qpages { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nqv-limits { margin: 0; color: var(--nq-text-muted); font-size: 0.76rem; line-height: 1.55; border-top: 1px solid var(--nq-border); padding-top: 0.5rem; }

/* ── Answer path (pending) ── */
.nqv-thinking-main { display: grid; gap: 0.6rem; min-width: 0; }
.thinking-shell:has(.nqv-path) { align-items: flex-start; }
.thinking-shell:has(.nqv-path) .pulse { margin-top: 0.15rem; }
.nqv-path { min-width: 0; }
.nqv-path-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.nqv-step { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 0.6rem; padding-bottom: 0.55rem; }
.nqv-step:last-child { padding-bottom: 0; }
.nqv-step:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 15px; bottom: 2px; width: 1px; background: var(--nq-border-hover); }
.nqv-node { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 1.5px solid var(--nq-border-hover); background: var(--nq-bg); box-sizing: border-box; }
.nqv-step[data-state="done"] .nqv-node { background: var(--nq-accent); border-color: var(--nq-accent); }
.nqv-step[data-state="active"] .nqv-node { border-color: var(--nq-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--nq-accent) 18%, transparent); }
.nqv-step[data-state="todo"] { opacity: 0.55; }
.nqv-step-body { display: grid; gap: 0.1rem; min-width: 0; }
.nqv-step-body b { color: var(--nq-text); font: 600 0.82rem/1.4 var(--f-sans); }
.nqv-step-sub { color: var(--nq-text-muted); font: 500 0.74rem/1.4 var(--f-sans); font-variant-numeric: tabular-nums; }
.nqv-step[data-state="active"] .nqv-step-sub { color: var(--nq-text-secondary); }

/* ── Motion (only when the user has not asked for reduced motion) ── */
@media (prefers-reduced-motion: no-preference) {
  .nqv-root { animation: nqvIn 0.45s var(--nq-ease) both; }
  .nqv-fill { transition: transform 0.75s var(--nq-ease); }
  .nqv-span-fill { transition: transform 0.35s var(--nq-ease); }
  .nqv-span-mark { transition: left 0.35s var(--nq-ease); }
  .nqv-wf-keep, .nqv-wf-loss { transition: width 0.4s var(--nq-ease), left 0.4s var(--nq-ease); }
  .nqv-step[data-state="active"] .nqv-node { animation: nqvPulse 1.6s ease-in-out infinite; }
  .nqv-dot { animation: nqvPop 0.35s var(--nq-ease) both; }
  .nqv-bf.is-sweep { animation: nqvSweep 0.9s var(--nq-ease) both; }
  .nqv-rank-row { animation: nqvIn 0.4s var(--nq-ease) both; }
  .nqv-gauge .nqv-needle { transition: none; }
  .nqv-chip, .nqv-btn, .nqv-radio-card, .nqv-bf, .nqv-pub { transition: border-color 0.15s, color 0.15s, background-color 0.15s, box-shadow 0.15s; }
}
@keyframes nqvIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes nqvPulse { 0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--nq-accent) 14%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--nq-accent) 6%, transparent); } }
@keyframes nqvPop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes nqvSweep { 0% { box-shadow: inset 0 0 0 2px var(--nq-accent); } 100% { box-shadow: none; } }

/* ── Breakpoints ── */
@media (min-width: 720px) {
  .nqv-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 1.2rem; }
  .nqv-card { padding: 1.05rem 1.2rem 1.1rem; }
}
@media (max-width: 480px) {
  .nqv-grid3 { grid-template-columns: 1fr; }
  .nqv-radio-row { grid-template-columns: 1fr; }
  .nqv-opc-track { grid-template-columns: 1fr; }
  .nqv-lane { height: 48px; }
  .nqv-kv { grid-template-columns: 1fr; }
  .nqv-bf { min-width: 3.6rem; }
  .nqv-card-foot { flex-direction: column; align-items: flex-start; }
}
