/* Offer Ready: bitmask DP visualizer styles (.bm-*). Inputs and readouts reuse .va-input, .va-presets, .va-read. */
.bm-fields { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: end; }
.bm-fields > div { display: grid; gap: var(--s-1); min-width: 0; flex: 1 1 14rem; max-width: 26rem; }
.bm { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: 2px 3px; }
.bm-cost { border-collapse: separate; border-spacing: 3px; font: var(--text-sm)/1 var(--font-mono); font-stretch: var(--stretch-mono); width: max-content; max-width: 100%; }
.bm-cost caption { text-align: left; font: var(--text-xs)/1.4 var(--font-ui, inherit); padding-bottom: 4px; caption-side: top; }
.bm-cost th { font-size: var(--text-2xs); font-weight: 400; color: var(--ink-3); padding: 2px 6px; text-align: center; }
.bm-cost th.used { text-decoration: line-through; opacity: .6; }
.bm-corner { white-space: nowrap; }
.bm-cost td {
  min-width: 36px; height: 34px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); color: var(--ink);
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.bm-cost td.used { color: var(--ink-3); background: transparent; border-style: dashed; }
.bm-cost tr.row td:not(.used) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-soft-ink); }
.bm-cost td.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.bm-cost td.best { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; max-width: 46rem; }
.bm-tile {
  display: grid; justify-items: center; gap: 4px; padding: 5px 2px 6px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); min-width: 0;
  font-family: var(--font-mono); font-stretch: var(--stretch-mono); color: var(--ink-3);
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.bm-bits { display: inline-flex; gap: 1px; font-size: var(--text-2xs); line-height: 1; }
.bm-bits i { font-style: normal; padding: 1px 2px; border-radius: 2px; }
.bm-bits i.new { background: var(--accent); color: var(--surface); }
.bm-tile b { font-size: var(--text-base); font-weight: 500; line-height: 1; }
.bm-tile.fill { color: var(--ink); }
.bm-tile.tgt { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-soft-ink); }
.bm-tile.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.bm-tile.best { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.bm-math { font: var(--text-sm)/1.4 var(--font-mono); font-stretch: var(--stretch-mono); min-height: 1.4em; overflow-wrap: anywhere; }
.bm-asg { overflow-wrap: anywhere; }
@media (max-width: 760px) { .bm-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); } .bm-cost td { min-width: 32px; height: 30px; } }
@media (prefers-reduced-motion: reduce) { .bm-tile, .bm-cost td { transition: none; } }
