/* code-bench.css — the bench labs on /code/labs/<lab> (web/static/js/labs/_bench.js). Chrome is the
   muted steel of the viz tokens; bright colour is for the equipment and data only. Scoped under .bl. */
.bl { display: flex; flex-direction: column; gap: .7rem; }
.bl-board { position: relative; width: 100%; border-radius: .9rem; overflow: hidden; border: 1px solid rgba(148, 163, 184, .3); background: #0b1220; }
.bl-canvas { display: block; }
.bl-fx { position: absolute; top: 0; left: 0; pointer-events: none; }
.bl-board-wrap { position: relative; }
.bl-board.bl-zoomed { overflow-x: auto; overscroll-behavior-x: contain; }
.bl-zoom { position: absolute; top: .4rem; right: .4rem; z-index: 2; border-radius: 999px; border: 1px solid rgba(148, 163, 184, .45); background: rgba(2, 6, 23, .8); color: #e2e8f0; padding: .25rem .65rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.bl-zoom[hidden] { display: none; }
.bl-goal { display: flex; align-items: center; gap: .55rem; padding: .5rem .75rem; border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .3); color: #e2e8f0; }
.bl-goal-mark { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .4); }
.bl-goal.bl-done { border-color: rgba(253, 224, 71, .55); background: rgba(253, 224, 71, .08); }
.bl-goal.bl-done .bl-goal-mark { color: #0b1220; background: #fde047; border-color: #fde047; }
.bl-read { margin: 0; min-height: 1.3em; color: #e2e8f0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bl-read b { color: #fde68a; }
.bl-controls { display: flex; flex-direction: column; gap: .45rem; }
.bl-slider { display: grid; grid-template-columns: minmax(8rem, auto) 1fr 6rem; align-items: center; gap: .6rem; color: #cbd5e1; font-size: .9rem; }
.bl-slider input { width: 100%; accent-color: #7dd3fc; }
.bl-slider output { text-align: right; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.bl-choice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #cbd5e1; font-size: .9rem; }
.bl-choice-label { min-width: 8rem; }
.bl-seg { display: flex; flex-wrap: wrap; gap: .3rem; }
.bl-seg .bl-btn[aria-pressed="true"] { background: rgba(125, 211, 252, .18); border-color: #7dd3fc; color: #e0f2fe; font-weight: 700; }
.bl-buttons, .bl-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.bl-btn { border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .3); background: rgba(15, 23, 42, .55); color: #e2e8f0; padding: .35rem .85rem; font-size: .88rem; cursor: pointer; }
.bl-btn:hover { border-color: #7d93ad; }
.bl-btn:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }
.bl-btn:disabled { opacity: .5; cursor: default; }
.bl-primary { background: #0ea5e9; border-color: #0ea5e9; color: #04121f; font-weight: 700; }
.bl-primary:hover { background: #38bdf8; border-color: #38bdf8; }
.bl-answer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #cbd5e1; font-size: .9rem; }
.bl-answer input { width: 7rem; padding: .3rem .5rem; border-radius: .5rem; border: 1px solid rgba(148, 163, 184, .4); background: #0b1220; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.bl-note { margin: 0; padding: .45rem .7rem; border-radius: .6rem; font-size: .9rem; background: rgba(148, 163, 184, .1); color: #e2e8f0; }
.bl-note[hidden] { display: none; }
.bl-note.bl-ok { background: rgba(16, 185, 129, .14); color: #d1fae5; }
.bl-note.bl-warn { background: rgba(251, 191, 36, .12); color: #fde68a; }
.bl-data { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: flex-start; }
.bl-data[hidden] { display: none; }
.bl-table-wrap { max-height: 14rem; overflow: auto; border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .25); }
.bl-table { border-collapse: collapse; font-size: .85rem; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.bl-table th, .bl-table td { padding: .3rem .7rem; text-align: right; border-bottom: 1px solid rgba(148, 163, 184, .15); }
.bl-table th { position: sticky; top: 0; background: #111a2b; color: #cbd5e1; font-weight: 600; }
.bl-empty { color: #94a3b8; text-align: center !important; }
.bl-graph { display: block; border-radius: .6rem; background: rgba(2, 6, 23, .5); }
.bl-fit { margin: .3rem 0 0; font-size: .82rem; color: #fde68a; }
@media (max-width: 520px) { .bl-slider { grid-template-columns: 1fr auto; } .bl-slider label { grid-column: 1 / -1; } .bl-choice-label { min-width: 0; width: 100%; } }
/* The light theme's global border colour outranks .bl-*: restore the edges (the bench stays dark). */
html[data-theme="light"] .bl .bl-btn, html[data-theme="light"] .bl .bl-board, html[data-theme="light"] .bl .bl-goal { border-color: rgba(148, 163, 184, .3); }
html[data-theme="light"] .bl .bl-goal.bl-done { border-color: rgba(253, 224, 71, .55); }

/* /code/labs: the bench-lab cards */
.bx-grid { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.bx-card { --h: 200; display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: .9rem 1rem; border-radius: 1rem; text-decoration: none; color: #e2e8f0;
  background: linear-gradient(150deg, hsla(var(--h), 80%, 45%, .22), hsla(var(--h), 70%, 30%, .08)); border: 1px solid hsla(var(--h), 80%, 60%, .4); transition: transform .15s; }
.bx-card:hover { transform: translateY(-2px) rotate(-.4deg); border-color: hsla(var(--h), 85%, 65%, .8); }
.bx-emoji { font-size: 1.6rem; line-height: 1; }
.bx-card strong { color: #fff; font-size: 1.02rem; }
.bx-card span.bx-sub { color: #cbd5e1; font-size: .86rem; line-height: 1.4; flex: 1; }
.bx-meta { display: flex; justify-content: space-between; color: #94a3b8; font-size: .78rem; }
.bx-meta .bx-done { color: #6ee7b7; font-weight: 600; }
.bx-h2 { font-size: 1.3rem; font-weight: 700; color: #fff; margin: .5rem 0 .75rem; }
@media (prefers-reduced-motion: reduce) { .bx-card { transition: none; } .bx-card:hover { transform: none; } }
html[data-theme="light"] .bx-card { color: #334155; } html[data-theme="light"] .bx-card strong, html[data-theme="light"] .bx-h2 { color: #0f172a; }
html[data-theme="light"] .bx-card span.bx-sub { color: #475569; }
