/* "Fix my bug" R&D puzzle (rnd-puzzle.js). Uses the site tokens from style.css and the code colours from rnd-panel.css. */
.bp { --bad: #ff5d6c; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }

.bp-screen { position: relative; aspect-ratio: 780 / 420; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #04060a; }
.bp-screen canvas { display: block; width: 100%; height: 100%; }
.bp-status { position: absolute; left: 10px; top: 10px; font: 600 11px var(--mono); letter-spacing: .08em; padding: 3px 8px; border-radius: 3px; color: #04060a; }
.bp-status.bad { background: var(--bad); }
.bp-status.good { background: var(--rd); }
.bp-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bp-cue { position: absolute; left: 10px; bottom: 10px; font: 11px var(--mono); color: var(--fg); background: rgba(4, 6, 10, 0.7); padding: 4px 8px; border-radius: 3px; pointer-events: none;
  max-width: calc(100% - 160px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* stops short of the fire button */
.bp-status, .bp-fire { z-index: 2; }
.bp-fire { position: absolute; right: 10px; bottom: 10px; font: 11px var(--mono); color: var(--fg); background: rgba(4, 6, 10, 0.7); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.bp-fire:hover { border-color: var(--rd); }
.bp-graph { display: block; width: 100%; height: 86px; margin-top: 10px; border-radius: 6px; background: #070b10; border: 1px solid var(--line); }
.bp-graph-label { margin-top: 6px; font: 10px var(--mono); color: var(--dim); }

.bp-intro { color: var(--dim); line-height: 1.55; font-size: 15px; margin-bottom: 12px; }
.bp-intro b, .bp-verdict b { color: var(--fg); font-weight: 500; }
.bp-pre { position: relative; margin: 0; padding: 28px 14px 12px; overflow-x: auto; border-radius: 8px; background: #070b10; border: 1px solid var(--line); font: 12px/1.6 var(--mono); color: #c9d6df; }
.bp-pre i { font-style: normal; }
.bp-file { position: absolute; top: 8px; left: 14px; font-size: 10px; color: var(--dim); }
.bp-slot { display: inline-block; padding: 0 4px; margin: 0 -4px; border-radius: 3px; transition: background .2s; }
.bp-slot.bad { background: rgba(255, 93, 108, 0.16); text-decoration: underline wavy var(--bad); text-underline-offset: 4px; }
.bp-slot.good { background: rgba(93, 255, 180, 0.14); }

.bp-ask { font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 16px 0 8px; }
.bp-choices { display: flex; flex-direction: column; gap: 6px; }
.bp-choice { text-align: left; font: 12.5px var(--mono); color: #c9d6df; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); transition: border-color .2s, background .2s; }
.bp-choice i { font-style: normal; }
.bp-choice:hover { border-color: rgba(93, 255, 180, 0.5); }
.bp-choice.on { border-color: var(--rd); background: rgba(93, 255, 180, 0.06); }
.bp-choice.on.wrong { border-color: var(--bad); background: rgba(255, 93, 108, 0.06); }
.bp-verdict { margin-top: 12px; min-height: 3em; font-size: 14px; line-height: 1.55; color: var(--dim); border-left: 2px solid var(--line); padding-left: 10px; }
.bp-verdict.good { border-color: var(--rd); }
.bp-verdict.bad { border-color: var(--bad); }
.bp-verdict code { font: 12px var(--mono); color: var(--fg); }
.bp-hint { color: var(--rd); }

@media (max-width: 760px) {
  .bp { grid-template-columns: minmax(0, 1fr); gap: 16px; }   /* minmax: long code lines scroll instead of widening the page */
}
