/* The Boxes view (boxes.js, wu-1a17a7c8; every class bx-* and the display set, since the hosts style plain names like .agent and .chip): one card per box in whatever host a mode gives it (.as-boxes), beside the game-test viewer on
   a tab strip (.bx-tabs, boxes.js strip()). The host sets the colours through --bx-* (defaults below are Inside's glass). Cards side by
   side on a desk; a narrow host (.bx-fold, under 480 px) folds each card to one line, a tap opens it. Read only: no key here does anything. */
.as-boxes { --bx-line: var(--line-2, rgba(255, 255, 255, 0.12)); --bx-ink: var(--text, #e8e8ec); --bx-dim: var(--muted, rgba(232, 232, 236, 0.6)); --bx-bg: rgba(0, 0, 0, 0.3); --bx-yes: var(--green, #6fd38a); --bx-no: var(--red-2, #ff6b6b); --bx-unsure: var(--amber-2, #ffb000); --bx-radius: 10px; color: var(--bx-ink); }
.as-boxes .bx-state { margin: 0 0 10px; color: var(--bx-dim); font-size: 0.9em; }
.as-boxes .bx-state[hidden] { display: none; }
.as-boxes .bx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; align-content: start; }
.as-boxes .bx-card { display: block; border: 1px solid var(--bx-line); border-radius: var(--bx-radius); background: var(--bx-bg); min-width: 0; overflow: hidden; }
.as-boxes .bx-card.is-stale { opacity: 0.55; }
.as-boxes .bx-head { display: block; margin: 0; padding: 0; border-bottom: 1px solid var(--bx-line); }
.as-boxes .bx-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: default; }
.as-boxes .bx-toggle .bx-name { font-weight: 700; font-size: 1.05em; }
.as-boxes .bx-toggle .bx-age { margin-left: auto; color: var(--bx-dim); font-size: 0.8em; white-space: nowrap; }
.as-boxes .bx-toggle .bx-sum { display: none; flex-basis: 100%; color: var(--bx-dim); font-size: 0.85em; }
.as-boxes .bx-chip { display: inline-block; margin: 0; padding: 2px 8px; background: transparent; border-radius: 999px; border: 1px solid var(--bx-line); font-size: 0.78em; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.as-boxes .bx-card[data-safe="yes"] .bx-chip.safe { color: var(--bx-yes); border-color: var(--bx-yes); }
.as-boxes .bx-card[data-safe="no"] .bx-chip.safe { color: var(--bx-no); border-color: var(--bx-no); }
.as-boxes .bx-card[data-safe="unsure"] .bx-chip.safe { color: var(--bx-unsure); border-color: var(--bx-unsure); }
.as-boxes .bx-body { display: block; padding: 8px 12px 12px; font-size: 0.9em; }
.as-boxes .bx-reasons { margin: 0 0 8px; padding: 0 0 0 1.1em; }
.as-boxes .bx-reasons li { margin: 2px 0; }
.as-boxes .bx-quiet { color: var(--bx-dim); margin: 0 0 6px; padding: 0; list-style: none; }
.as-boxes .bx-cover { margin: 0 0 8px; color: var(--bx-unsure); }
.as-boxes .bx-sec { margin-top: 8px; }
.as-boxes .bx-sec h4 { font-family: inherit; margin: 0 0 4px; font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bx-dim); }
.as-boxes .bx-sec ul { margin: 0; padding: 0; list-style: none; }
.as-boxes .bx-sec li { display: flex; background: transparent; border-radius: 0; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--bx-line); min-width: 0; }
.as-boxes .bx-sec li:first-child { border-top: 0; }
.as-boxes .bx-sec li b { font-weight: 600; }
.as-boxes .bx-sec li .bx-for, .as-boxes .bx-sec li .bx-by, .as-boxes .bx-sec li .bx-folder, .as-boxes .bx-sec li .bx-kind { color: var(--bx-dim); }
.as-boxes .bx-sec li .bx-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.as-boxes .bx-sec li .bx-last { flex-basis: 100%; color: var(--bx-dim); font-size: 0.85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-boxes .bx-agent[data-status="working"] .bx-chip.st { color: var(--bx-yes); border-color: var(--bx-yes); }
.as-boxes .bx-agent[data-status="blocked"] .bx-chip.st { color: var(--bx-no); border-color: var(--bx-no); }
.as-boxes .bx-job.bx-waiting .bx-chip.st { color: var(--bx-no); border-color: var(--bx-no); }
.as-boxes .bx-agent.bx-unnamed b { font-weight: 500; font-style: italic; color: var(--bx-dim); }
.as-boxes .bx-agent[data-status="unknown"] .bx-chip.st, .as-boxes .bx-chip.own { color: var(--bx-unsure); border-color: var(--bx-unsure); }
.as-boxes .bx-sec p { margin: 0; }
/* folded: one line per card (name, verdict, age, the counts), the details on a tap */
.as-boxes.bx-fold .bx-cards { grid-template-columns: 1fr; }
.as-boxes .bx-toggle:hover, .as-boxes .bx-toggle:active, .as-boxes .bx-toggle:focus { background: transparent; box-shadow: none; }   /* the hosts tint any button on hover */
.as-boxes.bx-fold .bx-toggle { cursor: pointer; }
.as-boxes.bx-fold .bx-toggle:hover { background: rgba(255, 255, 255, 0.04); }
.as-boxes .bx-toggle:focus-visible { outline: 2px solid var(--bx-unsure); outline-offset: -2px; }
.as-boxes.bx-fold .bx-toggle .bx-sum { display: block; }
.as-boxes.bx-fold .bx-card:not(.is-open) .bx-body { display: none; }
.as-boxes.bx-fold .bx-card:not(.is-open) .bx-head { border-bottom: 0; }
.as-boxes.bx-fold .bx-toggle { position: relative; padding-right: 30px; }   /* the chevron sits by the age, not at the end of the counts line (which may wrap) */
.as-boxes.bx-fold .bx-toggle::after { content: ""; position: absolute; right: 14px; top: 17px; width: 7px; height: 7px; border-right: 1.5px solid var(--bx-dim); border-bottom: 1.5px solid var(--bx-dim); transform: rotate(45deg); transition: transform 0.15s; }
.as-boxes.bx-fold .bx-card.is-open .bx-toggle::after { transform: rotate(-135deg); }
/* the tab strip the host puts above the panes */
.bx-tabs { display: flex; gap: 6px; padding: 8px 12px 0; }
.bx-tabs[hidden] { display: none; }
.bx-tab { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--bx-line, rgba(255, 255, 255, 0.12)); background: transparent; color: var(--bx-dim, rgba(232, 232, 236, 0.6)); font: inherit; font-weight: 600; cursor: pointer; }
.bx-tab.on { color: var(--bx-ink, #e8e8ec); border-color: var(--bx-ink, #e8e8ec); }
.bx-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: auto; padding: 12px; }
.bx-pane[hidden] { display: none; }
@media (max-width: 699px) { .bx-tab { min-height: 44px; flex: 1; } .bx-pane { padding: 10px; } }
