/* ============================================================================
   GUIDES, ? KEY AND COMPARE MARKERS (v37)
   Loaded last; only adds. The guide is a printed instruction plate clipped to
   the side of the comp stack, not a web modal: it points at the controls it
   explains and never covers them.
   ========================================================================= */

/* ---- the ? key, top right of the comp stack -------------------------------- */
.helpbtn{
  position:absolute; top:12px; right:18px; z-index:20;
  width:24px; height:24px; border-radius:50%; padding:0; cursor:pointer;
  font:700 13px/1 var(--mono); color:#22292c;
  background:radial-gradient(circle at 36% 30%, #f4f6f3, #c5ccce 46%, #8c979a 80%, #5d686c);
  border:1px solid #1d2427;
  box-shadow:0 2px 0 #20282b, 0 3px 6px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.8);
}
.helpbtn:active{transform:translateY(1px); box-shadow:0 1px 0 #20282b, 0 2px 3px rgba(0,0,0,.5)}
.helpbtn[aria-expanded="true"]{background:radial-gradient(circle at 36% 30%,#ffe7bb,var(--amber) 48%,#a86c14); color:#2a1c05}
.helpbtn:focus-visible{outline:2px solid #ad7312; outline-offset:2px}

/* ---- the instruction plates ------------------------------------------------ */
.guide{
  position:absolute; z-index:30; right:calc(var(--comp-w,283px) + 18px); top:40px; width:318px; /* beside the comp bay, which is the right-most bay of .midrow */
  padding:16px 18px 14px; color:#dcdfd8; font:12px/1.55 var(--mono); letter-spacing:.01em;
  background:linear-gradient(#20282b,#14191b);
  border:1px solid #070a0b; border-radius:4px;
  box-shadow:0 0 0 1px rgba(255,255,255,.07) inset, 0 14px 30px rgba(0,0,0,.6);
}
.guide::after{               /* pointer toward the comp stack */
  content:""; position:absolute; top:22px; right:-8px; width:14px; height:14px;
  background:#1b2224; border-top:1px solid #070a0b; border-right:1px solid #070a0b;
  transform:rotate(45deg);
}
.guide h3{font:700 11px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--amber);
  margin:0 0 10px; padding-bottom:9px; border-bottom:1px solid rgba(255,255,255,.08)}
.guide ul{list-style:none; margin:0; padding:0}
.guide li{position:relative; padding-left:14px; margin:0 0 7px}
.guide li::before{content:""; position:absolute; left:0; top:.62em; width:5px; height:5px; border-radius:50%;
  background:var(--amber); box-shadow:0 0 5px rgba(240,168,50,.6)}
.guide b{color:#f3efe2; font-weight:700}
.guide p{margin:0 0 8px}
.guide .keys{margin:10px 0 12px; color:#97a3a6; font-size:10.5px; line-height:2}
.guide kbd{display:inline-block; min-width:18px; padding:0 5px; margin-right:3px; border-radius:3px;
  font:700 10px/16px var(--mono); text-align:center; color:#1d2427;
  background:linear-gradient(#e9ecea,#aab4b6); box-shadow:0 1px 0 #2b3337}
.guide-ok{
  display:block; margin-left:auto; padding:6px 14px; cursor:pointer; border-radius:3px;
  font:700 11px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:#2a1c05;
  background:linear-gradient(#ffd98f,var(--amber) 55%,#c08322); border:1px solid #3a2a0c;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 2px 0 #3a2a0c;
}
.guide-ok:active{transform:translateY(1px); box-shadow:inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 #3a2a0c}
.guide-ok:focus-visible{outline:2px solid #7fd4ff; outline-offset:2px}

/* the compare note sits level with the CMP / SOLO keys */
.guide.tip{top:auto; bottom:42px; width:300px}
.guide.tip::after{top:auto; bottom:30px}

/* ---- compare markers on the rows ------------------------------------------- */
/* B's switch lights blue; A keeps the amber lamp. Everything else is off. */
.lrow[data-cmp="b"] .sw{background-image:url('assets/layer-blue.webp');filter:none}
.lrow{position:relative}
.lrow[data-cmp="a"],.lrow[data-cmp="b"]{border-radius:3px}
.lrow[data-cmp="a"]{box-shadow:inset 0 0 0 2px rgba(240,168,50,.9), 0 0 10px rgba(240,168,50,.35)}
.lrow[data-cmp="b"]{box-shadow:inset 0 0 0 2px rgba(88,190,255,.9), 0 0 10px rgba(88,190,255,.35)}
.lrow[data-cmp="a"]::after,.lrow[data-cmp="b"]::after{
  position:absolute; right:30px; top:50%; margin-top:-8px; width:16px; height:16px; border-radius:3px;
  font:700 10px/16px var(--mono); text-align:center; color:#101416;
}
.lrow[data-cmp="a"]::after{content:"A"; background:var(--amber)}
.lrow[data-cmp="b"]::after{content:"B"; background:#58beff}

/* ---- compare hint: shown while comparing, after the first-time note -------- */
.guide.hint{top:auto; bottom:42px; width:auto; max-width:300px; padding:9px 14px 9px; white-space:nowrap}
.guide.hint p{margin:0}
.guide.hint::after{top:auto; bottom:12px}
.guide.hint b.a{display:inline-block; min-width:16px; padding:0 3px; border-radius:3px; text-align:center;
  font:700 10px/16px var(--mono); color:#101416; background:var(--amber)}

/* ---- hover bubbles (v43) --------------------------------------------------- */
.htip{
  position:fixed; z-index:1000; max-width:250px; padding:10px 13px 11px; pointer-events:none;
  color:#dcdfd8; font:11.5px/1.5 var(--mono,ui-monospace,Menlo,Consolas,monospace);
  background:linear-gradient(#20282b,#14191b); border:1px solid #070a0b; border-radius:4px;
  box-shadow:0 0 0 1px rgba(255,255,255,.07) inset, 0 10px 24px rgba(0,0,0,.6);
  opacity:0; transform:translateY(3px); transition:opacity .14s ease-out, transform .14s ease-out;
}
.htip.in{opacity:1; transform:none}
.htip b{display:block; margin-bottom:4px; font-size:10.5px; letter-spacing:.18em; text-transform:uppercase; color:var(--amber,#f0a832)}
.htip span{display:block}
.htip kbd{display:inline-block; margin-top:7px; min-width:18px; padding:0 5px; border-radius:3px;
  font:700 10px/16px var(--mono,ui-monospace,Menlo,monospace); text-align:center; color:#1d2427;
  background:linear-gradient(#e9ecea,#aab4b6); box-shadow:0 1px 0 #2b3337}
.htip kbd:empty{display:none}
.htip::after{content:""; position:absolute; width:12px; height:12px; background:#171d1f;
  border:1px solid #070a0b; transform:rotate(45deg)}
.htip[data-side="above"]::after{left:calc(var(--arrow,50%) - 6px); bottom:-7px; border-top:0; border-left:0}
.htip[data-side="below"]::after{left:calc(var(--arrow,50%) - 6px); top:-7px; border-bottom:0; border-right:0; background:#20282b}
.htip[data-side="right"]::after{top:calc(var(--arrow,20px) - 6px); left:-7px; border-top:0; border-right:0}
@media (prefers-reduced-motion:reduce){ .htip{transition:none} }

/* v69: the small zoom tip on the picture while comparing (same family as the hover bubbles, smaller) */
.zoomtip{position:absolute; z-index:10; left:50%; transform:translateX(-50%); pointer-events:none;
  top:calc(var(--gt) + 12px); white-space:nowrap;
  font-size:10px; letter-spacing:.1em; color:#dfe5e1; background:rgba(16,20,22,.88);
  border:1px solid rgba(255,255,255,.16); border-radius:4px; padding:5px 10px; box-shadow:0 3px 12px rgba(0,0,0,.5)}
.zoomtip kbd{display:inline-block; min-width:16px; padding:0 4px; margin-right:2px; border-radius:3px; text-align:center;
  font:inherit; color:#1b1406; background:var(--amber,#f0a832)}

/* v70: the Ctrl-click hint is now a small tooltip, like the zoom tip: click for B, Ctrl-click for A */
.guide.hint{width:auto; max-width:none; padding:6px 11px; white-space:nowrap; font:10px/1.3 var(--mono); letter-spacing:.08em;
  background:rgba(16,20,22,.92); border:1px solid rgba(255,255,255,.16); border-radius:4px; box-shadow:0 3px 12px rgba(0,0,0,.5)}
.guide.hint::after{width:9px; height:9px; right:-5px; bottom:9px; background:rgba(16,20,22,.92); border-color:rgba(255,255,255,.16)}
.guide.hint kbd{display:inline-block; min-width:16px; padding:0 4px; margin:0 1px; border-radius:3px; text-align:center;
  font:inherit; color:#1b1406; background:var(--amber,#f0a832); box-shadow:none}
.guide.hint .sep{color:#6c7a7e; margin:0 6px}
.guide.hint i{font-style:normal; display:inline-block; min-width:14px; padding:0 3px; border-radius:3px; text-align:center; color:#101416; font-weight:700}
.guide.hint i.a{background:var(--amber,#f0a832)} .guide.hint i.b{background:#6fb7ef}


/* v88 (site v54): first-visit veil. A fixed, click-through layer over the whole Bench with a hole cut
   where the guide sits, so the instructions stand out; OK, Esc or a click anywhere closes both. */
.guide-veil{position:fixed;z-index:9000;pointer-events:none;border-radius:6px;
  box-shadow:0 0 0 300vmax rgba(3,5,6,.5), 0 0 40px 8px rgba(3,5,6,.35);opacity:0;transition:opacity .5s ease-out}
.guide-veil.on{opacity:1}
