.bm { --bm-ink:#17324f; --bm-line:#d8dee6; --bm-wash:#f2f8fd; scroll-margin-top:5rem; }
.bm [hidden] { display:none!important; }
.bm .bm-notice,.bm .bm-basis { color:#4b5d54; font-size:.92rem; }
.bm .bm-routes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1.25rem 0; }
.bm .bm-routes button { display:flex; flex-direction:column; gap:.35rem; padding:1.1rem; border:1px solid var(--bm-line); border-radius:.7rem; color:var(--bm-ink); background:#fff; text-align:left; white-space:normal; line-height:1.45; }
.bm .bm-routes button[aria-expanded=true] { border:2px solid var(--bm-ink); padding:calc(1.1rem - 1px); background:var(--bm-wash); }
.bm .bm-routes button:focus-visible,.bm .bm-output a:focus-visible,.bm .bm-output summary:focus-visible { outline:2px solid #0873ce; outline-offset:3px; }
.bm .bm-workspace { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr); gap:48px; align-items:start; }
.bm[data-route=""] .bm-workspace { display:block; }
.bm .bm-inputs,.bm .bm-results { min-width:0; }
.bm [data-bm-panel=questions] .gbi-match__workspace { display:block; }
/* Native JS keeps its own scope/question lifecycle. Only its result buffer is mirrored. */
.bm [data-bm-panel=questions] .gbi-match__ranking-column { display:none; }
/* Original Match card classes/score bars/explanation styling own this output. */
.bm .bm-output { margin:0; padding:0; overflow-wrap:anywhere; }
.bm .bm-output .gbi-match__card-header { gap:.65rem; }
.bm .bm-beers h5 { font-size:.95rem; margin:1rem 0 .5rem; }
.bm .bm-beers ul { margin:.5rem 0; padding-left:1.1rem; }
.bm .bm-beers li { margin:.6rem 0; }
.bm .bm-beers li span { white-space:normal; }
.bm .bm-abv { margin-left:.4rem; color:#4b5d54; font-size:.85rem; }
.bm .bm-medals { display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.3rem; }
.bm .bm-medals .gbi-medal { display:inline-block; min-width:0; max-width:100%; box-sizing:border-box; white-space:normal; overflow-wrap:anywhere; line-height:1.4; font-size:.75rem; text-decoration:none; }
.bm .bm-more-beers summary { cursor:pointer; font-size:.9rem; }
.bm .bm-results h3 { font-size:1.2rem; margin:0 0 .8rem; }
.bm .bm-results[aria-busy=true] { opacity:.65; }
.bm .bm-results.is-stale { opacity:.65; }
.bm .bm-refinement summary { cursor:pointer; font-weight:650; padding:.75rem 0; }
.bm .gbi-finder__header,.bm .gbi-finder__start-controls>label,.bm .gbi-finder__panel { display:none; }
.bm .gbi-finder__start-controls,.bm .gbi-finder__workspace { display:block; }
.bm .gbi-finder__start { margin-top:0; }
.bm .gbi-finder__axis { grid-template-columns:minmax(140px,1fr) minmax(70px,1fr) 112px; }
.bm .gbi-finder__portrait { font-size:.8rem; }
.bm .bm-refinement>.gbi-finder__reset { margin-bottom:.75rem; }
.bm .bm-status { min-height:1.5em; }
@media(max-width:900px) { .bm .bm-routes,.bm .bm-workspace { grid-template-columns:minmax(0,1fr); } }
@media(max-width:550px) { .bm .gbi-finder__axis { grid-template-columns:minmax(0,1fr) 112px; } }

/* The wrapper owns the one visible, announced status and expiry recovery. */
.bm [data-match-status], .bm [data-finder-status], .bm.bm-has-status [data-match-announcement] { display: none; }
.bm .bm-status:empty { display: none; }

/* Compact metadata wraps between whole fields when the result column is narrow. */
.bm .bm-candidate-context { font-size:.85rem; line-height:1.5; margin:.35rem 0 .45rem; }
.bm .bm-candidate-context > span { display:inline-block; }
.bm .bm-match-summary { margin:.45rem 0 .8rem; }
.bm .bm-scope-choice { cursor:default; }
.bm .bm-scope-choice .bm-scope-start { width:100%; border:0; background:transparent; padding:0; margin:0 0 .35rem; }
.bm .bm-scope-choice .gbi-match__answer-text { margin:0; }
