/* Bar lock-on (qf-bars.js): one overlay over the bar under the pointer. Its palette is stated here so it reads the same
   on every page: teal brackets and scan line, pink for a press. Motion is transform and opacity. */
.qfb-hud { --qfb-t: #00a89a; --qfb-p: #ff5aa8;
  position: fixed; left: 0; top: 0; z-index: 35; pointer-events: none; opacity: 0; transition: opacity .1s ease-out; will-change: transform; }
[data-theme=dark] .qfb-hud { --qfb-t: #3ff0dc; --qfb-p: #ff4fa3; }
.qfb-hud.on { opacity: 1; }
/* riding inside the bar's own element (an Efficiency bar or phone-list row): it scrolls and moves with it */
.qfb-hud.qfb-in { position: absolute; z-index: 3; }
.qfb-frame { position: absolute; left: 0; top: 0; }

/* four L ticks, 6px legs, closing in from 4px outside the bar */
.qfb-frame > i { position: absolute; width: 6px; height: 6px; border: 0 solid var(--qfb-t); opacity: 0; }
.qfb-frame > .tl { left: -3px; top: -3px; border-width: 1.5px 0 0 1.5px; --qfb-from: translate(-4px, -4px); }
.qfb-frame > .tr { right: -3px; top: -3px; border-width: 1.5px 1.5px 0 0; --qfb-from: translate(4px, -4px); }
.qfb-frame > .bl { left: -3px; bottom: -3px; border-width: 0 0 1.5px 1.5px; --qfb-from: translate(-4px, 4px); }
.qfb-frame > .br { right: -3px; bottom: -3px; border-width: 0 1.5px 1.5px 0; --qfb-from: translate(4px, 4px); }
.qfb-hud.on .qfb-frame > i { animation: qfb-lock .16s ease-out both; }

/* one scan line runs up the bar: a 1px line at the top edge of a layer that rises through the clipped box */
.qfb-scan { position: absolute; inset: 0; overflow: hidden; }
.qfb-scan::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 100%; opacity: 0;
  background: linear-gradient(180deg, var(--qfb-t) 0 1px, color-mix(in srgb, var(--qfb-t) 18%, transparent) 1px, transparent 10px); }
.qfb-hud.on .qfb-scan::before { animation: qfb-scan .3s ease-out .04s both; }

/* a press: the outline flashes pink and a target ring pulses out from the bar's middle */
.qfb-flash { position: absolute; inset: -2px; border: 1.5px solid var(--qfb-p); opacity: 0; }
.qfb-ring { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 1.5px solid var(--qfb-p); border-radius: 50%; opacity: 0; }
.qfb-hud.hit .qfb-flash { animation: qfb-flash .32s ease-out both; }
.qfb-hud.hit .qfb-ring { animation: qfb-ring .36s ease-out both; }
.qfb-hud.hit .qfb-frame > i { border-color: var(--qfb-p); }

@keyframes qfb-lock { from { opacity: 0; transform: var(--qfb-from); } to { opacity: 1; transform: none; } }
@keyframes qfb-scan { 0% { opacity: 1; transform: translateY(100%); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
@keyframes qfb-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes qfb-ring { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) {
  .qfb-hud { transition: none; }
  .qfb-hud.on .qfb-frame > i { animation: none; opacity: 1; }
  .qfb-hud.on .qfb-scan::before, .qfb-hud.hit .qfb-ring { animation: none; }
  .qfb-hud.hit .qfb-flash { animation: none; opacity: 1; }
}
