/* BC.Game Monthly Bonus Calculator: page-local layout on the shared Dyutam
   theme tokens. One frame for the whole page: the calculator and the guide
   bands share the same two column tracks, so the seam runs straight down.
   The page fills the site container, so its edges line up with the header
   and the breadcrumb at every width. */
.bmb-page {
    --bmb-form-w: 440px;
    --bmb-form-col: minmax(360px, var(--bmb-form-w));
    --bmb-gap: 24px;
    --bmb-row-gap: 16px;
    --bmb-field-h: 44px;
    padding: 10px 0 28px;
    color: var(--text);
    font-family: var(--font-sans);
}
.bmb-page *, .bmb-page *::before, .bmb-page *::after { box-sizing: border-box; }
.bmb-page :is(h1, h2, h3, p, dl, dd, ul) { margin: 0; }
.bmb-page ul { padding: 0; list-style: none; }
.bmb-page [hidden] { display: none !important; }
.bmb-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.bmb-page .bmb-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 16px;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.5;
    text-transform: uppercase;
}
.bmb-updated { font-weight: 500; letter-spacing: .06em; }
.bmb-header { margin-bottom: 16px; }
.bmb-header h1 {
    margin-bottom: 8px;
    font-family: var(--headline);
    font-weight: var(--headline-weight);
    line-height: 1.08;
}
.bmb-header > p:last-child {
    max-width: 180ch;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
}

/* ---- calculator frame ---- */
.bmb-workspace {
    display: grid;
    grid-template-columns: var(--bmb-form-col) minmax(0, 1fr);
    grid-template-areas: "form results" "facts facts";
    gap: var(--bmb-row-gap) var(--bmb-gap);
    align-items: stretch;
}
.bmb-form { grid-area: form; }
.bmb-results { grid-area: results; }
.bmb-facts { grid-area: facts; }
.bmb-form, .bmb-results, .bmb-facts {
    min-width: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--r);
    background: var(--surface);
}
.bmb-form, .bmb-results { display: flex; flex-direction: column; padding: 18px 24px 20px; }
/* Any height the form gains from the taller card beside it is shared between
   its groups instead of pooling at the bottom. */
.bmb-form { justify-content: space-between; gap: 12px; }
.bmb-panel-heading {
    display: flex;
    min-height: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bmb-results .bmb-panel-heading { margin-bottom: 12px; }
.bmb-panel-heading h2 {
    font-family: var(--font-sans);
    font-weight: var(--tools-ui-heading-weight);
    font-size: var(--tools-ui-title-size);
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
}
.bmb-panel-heading > span { color: var(--text-muted); font-size: 13px; line-height: 1.35; text-align: right; }

.bmb-workspace:has(.bmb-rates[open]) .bmb-results { align-self: start; }

/* ---- inputs ---- */
.bmb-page fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.bmb-field { min-width: 0; }
.bmb-field > label, .bmb-field > legend {
    display: block;
    padding: 0;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.bmb-field > legend span { color: var(--text-muted); font-weight: 400; }
.bmb-page .bmb-field input[type="text"] {
    width: 100%;
    min-width: 0;
    height: var(--bmb-field-h);
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}
.bmb-field input[type="text"]:hover { border-color: var(--text-dim); }
.bmb-page .bmb-field input[aria-invalid="true"] { border-color: var(--down-text); }
.bmb-field.is-off > label, .bmb-field.is-off .bmb-affix > span { color: var(--text-dim); }
.bmb-page .bmb-field input:disabled { opacity: .55; cursor: not-allowed; }
.bmb-affix { position: relative; }
.bmb-affix > span {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    height: var(--bmb-field-h);
    color: var(--text-muted);
    font: 500 15px/1 var(--font-mono);
    pointer-events: none;
}
.bmb-affix-start > span { left: 13px; }
.bmb-page .bmb-affix-start input[type="text"] { padding-left: 28px; }
.bmb-affix-end > span { right: 13px; }
.bmb-page .bmb-affix-end input[type="text"] { padding-right: 32px; }
.bmb-segments {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--tools-field-border);
    border-radius: 8px;
    background: var(--surface-2);
}
.bmb-segments input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bmb-segments label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 2px 4px;
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.bmb-page .bmb-segments label small { margin: 0; color: inherit; font-size: 12px; font-weight: 500; opacity: .9; }
.bmb-segments label:hover { color: var(--text); background: var(--surface-3); }
.bmb-segments input:checked + label { background: var(--accent); color: var(--accent-ink); }
.bmb-segments input:focus-visible + label { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.bmb-page :is(input, button, summary, a, textarea, [tabindex="0"]):focus-visible,
.bmb-page #bmb-results-title:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.bmb-page small { display: block; margin-top: 5px; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.bmb-page .bmb-field-error { margin-top: 5px; color: var(--down-text); font-size: 13px; line-height: 1.4; }
/* A field's error takes the place of its hint. */
.bmb-field:has(input[aria-invalid="true"]) > small { display: none; }
.bmb-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    vertical-align: 1px;
    white-space: nowrap;
}
.bmb-reset, .bmb-copy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 4px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: 600 13px/1.4 var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
}
.bmb-reset:hover, .bmb-copy:not(:disabled):hover { border-color: var(--text-dim); background: var(--surface-3); }
.bmb-copy:disabled { opacity: .5; cursor: not-allowed; }

/* ---- disclosures (assumptions, questions) ---- */
.bmb-page summary {
    position: relative;
    padding: 11px 28px 11px 0;
    list-style: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}
.bmb-page summary::-webkit-details-marker { display: none; }
.bmb-page summary::after { position: absolute; right: 2px; top: 9px; content: '+'; color: var(--text-muted); font-size: 20px; font-weight: 400; }
.bmb-page details[open] > summary::after { content: '\2212'; }
.bmb-rates { border-top: 1px solid var(--border); }
.bmb-page .bmb-rates > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; min-height: 40px; padding: 4px 28px 0 0; }
.bmb-page .bmb-rates > summary::after { top: 6px; }
.bmb-rates-summary { color: var(--text-muted); font-size: 13px; font-weight: 400; }
.bmb-rates > .bmb-field { max-width: 240px; margin-top: 6px; }
.bmb-rates .bmb-field > label { font-size: 13px; }
.bmb-form noscript p { color: var(--text-muted); font-size: 13px; line-height: 1.55; }

/* ---- the answer ---- */
.bmb-slab {
    /* Any height the card gains from a taller form beside it goes to the answer. */
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 28px;
    align-items: center;
    align-content: center;
    padding: 16px 22px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--bg);
}
.bmb-page .bmb-slab-label { color: var(--text-muted); font-size: 14px; line-height: 1.4; }
.bmb-total {
    display: flex;
    align-items: baseline;
    gap: .22em;
    margin: 3px 0 5px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: clamp(36px, 3.7vw, 50px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.06em;
    overflow-wrap: anywhere;
}
#bmb-total.is-long { font-size: .76em; }
#bmb-total.is-xlong { font-size: .56em; letter-spacing: -.04em; }
.bmb-approx { align-self: center; color: var(--text-muted); font-size: .62em; letter-spacing: 0; }
.bmb-page .bmb-slab-sub { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.bmb-page .bmb-working-title { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.bmb-page .bmb-work {
    margin: 5px 0 10px;
    padding: 8px 12px;
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: color-mix(in srgb, var(--text) 6%, transparent);
    color: var(--text);
    font: 500 18px/1.3 var(--font-mono);
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}
.bmb-work-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bmb-work-legend dt { color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.bmb-work-legend dd {
    margin-top: 2px;
    color: var(--text);
    font: 500 19px/1.25 var(--font-mono);
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}
.bmb-work-legend .bmb-work-note {
    margin-top: 1px;
    color: var(--text-muted);
    font: 400 12px/1.4 var(--font-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.bmb-against { margin-top: 10px; padding: 11px 16px 12px; border-radius: 10px; background: var(--surface-3); }
.bmb-against-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bmb-page .bmb-against-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.bmb-page .bmb-against-count { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.bmb-against-count strong { color: var(--text); font: 500 15px/1.3 var(--font-mono); letter-spacing: -.03em; }
.bmb-against-bar {
    --bmb-back: 1%;
    height: 8px;
    margin: 7px 0;
    overflow: hidden;
    border-radius: 4px;
    background: color-mix(in srgb, var(--text-dim) 28%, var(--surface-3));
}
.bmb-against-bar span { display: block; width: var(--bmb-back); height: 100%; border-radius: 4px; background: var(--accent); }
.bmb-page #bmb-against-text { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.bmb-page .bmb-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.bmb-metrics > div {
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}
.bmb-metrics dt { color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.bmb-metrics dd {
    margin-top: 3px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: clamp(17px, 1.5vw, 21px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -.05em;
    overflow-wrap: anywhere;
}
.bmb-metrics .bmb-metric-note {
    margin-top: 2px;
    color: var(--text-muted);
    font: 400 12px/1.4 var(--font-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.bmb-results-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 12px; }
.bmb-page .bmb-model-note { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.bmb-page .bmb-copy-status { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.bmb-page .bmb-copy-status:not(:empty) { margin-top: 8px; }
.bmb-copy-fallback {
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid var(--tools-field-border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text);
    font: 400 12px/1.5 var(--font-mono);
    resize: vertical;
}
.bmb-page[data-stale] #bmb-status { color: var(--warn-text); font-weight: 600; }

/* ---- what BC.Game says ---- */
.bmb-facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 12px 24px 14px; }
.bmb-page .bmb-facts-title {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.5;
    text-transform: uppercase;
}
.bmb-page .bmb-facts-source { grid-row: 1; grid-column: 2; color: var(--text-muted); font-size: 12px; line-height: 1.5; text-align: right; }
.bmb-page :is(.bmb-facts-source, .bmb-note, .bmb-band p) a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.bmb-facts-list { grid-row: 2; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.bmb-facts-list > div { min-width: 0; padding-left: 14px; border-left: 2px solid var(--border-strong); }
.bmb-facts-list dt { color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.bmb-facts-list dd { margin-top: 2px; font-size: 16px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.bmb-facts-list .bmb-fact-note { margin-top: 2px; color: var(--text-muted); font-size: 13px; font-weight: 400; line-height: 1.45; }

/* ---- guide bands ---- */
.bmb-band {
    display: grid;
    grid-template-columns: var(--bmb-form-col) minmax(0, 1fr);
    gap: var(--bmb-gap);
    align-items: start;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border-strong);
}
.bmb-band-side, .bmb-band-main { min-width: 0; }
.bmb-band-main { padding-left: 24px; }
.bmb-band h2 {
    margin-bottom: 8px;
    font-family: var(--headline);
    font-size: clamp(22px, 2.1vw, 28px);
    font-weight: var(--headline-weight);
    line-height: var(--section-title-leading);
    letter-spacing: var(--section-title-tracking);
}
.bmb-band :is(p, ul) + h2, .bmb-band .bmb-table-scroll + .bmb-note + h2 { margin-top: 22px; }
.bmb-band h3 { margin-bottom: 6px; font-family: var(--font-sans); font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.bmb-band p { max-width: var(--tools-measure); color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.bmb-band p + p { margin-top: 8px; }
.bmb-band p strong, .bmb-list strong { color: var(--text); font-weight: 600; }
.bmb-list li {
    position: relative;
    max-width: var(--tools-measure);
    padding-left: 16px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.bmb-list li + li { margin-top: 6px; }
.bmb-list li::before { position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-dim); content: ''; }
.bmb-says + h2 { margin-top: 22px; }
.bmb-list-cols { columns: 2; column-gap: 32px; }
.bmb-list-cols li { margin: 0 0 6px; break-inside: avoid; }
.bmb-list-cols li + li { margin-top: 0; }
.bmb-says { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.bmb-says > div { padding: 12px 16px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.bmb-says > div:first-child { background: var(--surface-2); }
.bmb-band .bmb-games-title { margin-top: 16px; }
.bmb-table-scroll { max-width: 100%; overflow-x: auto; }
.bmb-table { width: 100%; border-collapse: collapse; }
.bmb-table :is(th, td) {
    padding: 7px 0 7px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    text-align: right;
}
.bmb-table tr > :first-child { padding-left: 0; text-align: left; }
.bmb-table thead th { color: var(--text-muted); font-size: 12px; font-weight: 400; vertical-align: bottom; }
.bmb-table tbody th { font-weight: 600; }
.bmb-table tr.is-current > * { background: var(--accent-soft); }
.bmb-table tr.is-current > :first-child { padding-left: 12px; box-shadow: inset 3px 0 0 var(--accent); }
.bmb-table tr.is-current > :last-child { padding-right: 12px; }
.bmb-versus :is(th, td) { text-align: left; vertical-align: top; }
.bmb-versus tbody th { width: 19%; color: var(--text-muted); font-weight: 400; }
.bmb-versus td { width: 27%; }
.bmb-games :is(th, td) { padding-left: 10px; font-size: 13px; }
.bmb-games thead th:first-child { white-space: normal; }
.bmb-edge { color: var(--text-muted); font-weight: 400; }
.bmb-band .bmb-note { margin-top: 10px; font-size: 13px; line-height: 1.55; }
.bmb-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: bmb-tier; }
.bmb-tiers li {
    counter-increment: bmb-tier;
    padding: 5px 11px 5px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.bmb-tiers li::before { margin-right: 6px; color: var(--text-dim); font: 500 11px/1 var(--font-mono); content: counter(bmb-tier); }
.bmb-faq-section { margin-top: 22px; }
.bmb-faq { border-top: 1px solid var(--border-strong); }
.bmb-faq > details { border-bottom: 1px solid var(--border-strong); }
.bmb-faq > details > p { padding: 0 28px 12px 0; }

/* ---- related tools and closing note ---- */
.bmb-related { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-strong); }
.bmb-related ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bmb-related a {
    display: block;
    height: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    text-decoration: none;
    transition: border-color .15s;
}
.bmb-related a:hover { border-color: var(--accent); }
.bmb-related strong { display: block; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.4; }
.bmb-related a span { display: block; margin-top: 2px; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.bmb-page .bmb-limit-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.bmb-limit-note strong { color: var(--text); }

/* ---- result strip (stacked layouts only) ---- */
.bmb-strip { display: none; }

/* Wide screens: the site container steps up at 1600px (1440px of content) and
   1920px (1700px), so the columns step up with it instead of leaving the page
   inset. From 1920px the facts become a third column beside the answer. */
@media (min-width: 1600px) {
    .bmb-page { --bmb-form-w: 470px; }
    .bmb-slab { gap: 40px; padding: 20px 28px; }
    .bmb-total { font-size: 56px; }
    .bmb-work-legend dd { font-size: 21px; }
    .bmb-page .bmb-work { font-size: 20px; }
    .bmb-page .bmb-metrics { gap: 12px; }
    .bmb-metrics > div { padding: 12px 18px; }
    .bmb-metrics dd { font-size: 23px; }
    .bmb-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start; border-top: 0; }
    .bmb-faq > details { border-top: 1px solid var(--border-strong); border-bottom: 0; }
    .bmb-faq > details:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border-strong); }
}
@media (min-width: 1920px) {
    .bmb-page { --bmb-form-w: 480px; }
    .bmb-workspace { grid-template-columns: var(--bmb-form-col) minmax(0, 1fr) 340px; grid-template-areas: "form results facts"; }
    .bmb-facts { display: flex; flex-direction: column; gap: 0; padding: 18px 22px 20px; }
    .bmb-page .bmb-facts-title {
        min-height: 32px;
        margin-bottom: 12px;
        color: var(--text);
        font-size: var(--tools-ui-title-size);
        font-weight: var(--tools-ui-heading-weight);
        letter-spacing: 0;
        line-height: 32px;
        text-transform: none;
    }
    .bmb-facts-list { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
    .bmb-facts-list > div { padding: 0 0 12px; border-left: 0; border-bottom: 1px solid var(--border); }
    .bmb-facts-list dd { font-size: 17px; }
    .bmb-page .bmb-facts-source { margin-top: 12px; text-align: left; }
    .bmb-says { gap: 16px; }
}
@media (max-width: 1239px) {
    .bmb-page { --bmb-form-w: 400px; }
    .bmb-slab { gap: 20px; padding: 16px 18px; }
    .bmb-page .bmb-metrics { gap: 8px; }
    .bmb-metrics > div { padding: 10px 12px; }
    .bmb-facts-list { gap: 0 16px; }
    .bmb-band-main { padding-left: 8px; }
}
@media (max-width: 1099px) {
    .bmb-page { --bmb-form-col: minmax(330px, 370px); }
    .bmb-slab { gap: 16px; padding: 14px 16px; }
    .bmb-total { font-size: 38px; }
    .bmb-work-legend { gap: 12px; }
    .bmb-work-legend dd { font-size: 17px; }
    .bmb-page .bmb-work { font-size: 16px; }
    .bmb-results-foot { align-items: flex-start; }
}
@media (max-width: 999px) {
    .bmb-page { --bmb-field-h: 46px; padding: 14px 0 24px; }
    .bmb-header { margin-bottom: 14px; }
    .bmb-header > p:last-child { font-size: 15px; }
    .bmb-workspace { grid-template-columns: minmax(0, 1fr); grid-template-areas: "strip" "form" "results" "facts"; gap: 14px; }
    .bmb-band { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; padding-top: 18px; }
    .bmb-band-main { padding-left: 0; }
    .bmb-strip {
        grid-area: strip;
        position: sticky;
        top: calc(var(--bmb-stick, 64px) + 8px);
        z-index: 50;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 1px 14px;
        padding: 8px 14px;
        border: 1px solid var(--border-strong);
        border-radius: 12px;
        background: var(--bg);
        box-shadow: var(--shadow);
        color: var(--text);
        text-decoration: none;
        transition: opacity .2s, visibility .2s;
    }
    .bmb-strip.is-off { visibility: hidden; opacity: 0; pointer-events: none; }
    .bmb-page :is(input, button) { scroll-margin-top: 150px; }
    .bmb-strip-main { font-size: 14px; line-height: 1.4; }
    .bmb-strip-main strong { margin-left: 4px; color: var(--text); font: 500 18px/1.2 var(--font-mono); letter-spacing: -.04em; }
    .bmb-strip-parts { grid-column: 1; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
    .bmb-strip-go { grid-column: 2; grid-row: 1 / span 2; color: var(--text); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
    .bmb-segments label { min-height: 44px; }
    .bmb-form, .bmb-results { padding: 16px 20px 18px; }
    .bmb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; align-items: start; }
    .bmb-form > :is(.bmb-panel-heading, .bmb-rates, noscript) { grid-column: 1 / -1; }
    .bmb-slab { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; padding: 16px 20px; }
    .bmb-total { font-size: 44px; }
    .bmb-facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
    .bmb-facts { grid-template-columns: minmax(0, 1fr); }
    .bmb-page .bmb-facts-source { grid-row: 3; grid-column: 1; text-align: left; }
    .bmb-band-levels { grid-template-columns: minmax(250px, 2fr) minmax(0, 3fr); }
    .bmb-related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #bmb-results-title { scroll-margin-top: 100px; }
    /* Stacked layouts: each feature becomes a row of three labelled cells, so no column hides off-screen. */
    .bmb-versus thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .bmb-versus tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
    .bmb-page .bmb-versus :is(th, td) { width: auto; padding: 0; border-bottom: 0; font-size: 13px; }
    .bmb-versus tbody th { grid-column: 1 / -1; width: auto; margin-bottom: 2px; color: var(--text); font-weight: 600; }
    .bmb-versus td { width: auto; }
    .bmb-versus td::before { display: block; color: var(--text-muted); font-size: 11px; line-height: 1.4; content: attr(data-label); }
}
@media (min-width: 700px) and (max-width: 999px) {
    /* Tablets usually show the answer on the first screen, so here the strip
       floats over the page and takes no space of its own. */
    .bmb-workspace { grid-template-areas: "form" "results" "facts"; }
    .bmb-strip {
        position: fixed;
        top: calc(var(--bmb-stick, 64px) + 8px);
        left: var(--bmb-strip-left, 24px);
        width: var(--bmb-strip-width, calc(100% - 48px));
    }
}
@media (max-width: 699px) {
    .bmb-form, .bmb-results { padding: 14px 16px 16px; }
    .bmb-form { display: flex; align-items: stretch; }
    .bmb-facts { padding: 14px 16px 16px; }
    .bmb-slab { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px 16px; }
    .bmb-total { font-size: 40px; }
    .bmb-page .bmb-metrics { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .bmb-metrics > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: baseline; padding: 9px 12px; }
    .bmb-metrics dd { margin-top: 0; text-align: right; }
    .bmb-metrics .bmb-metric-note { grid-column: 1 / -1; text-align: left; }
    .bmb-results-foot { flex-direction: column; align-items: stretch; gap: 10px; }
    .bmb-copy { justify-content: center; min-height: 44px; }
    .bmb-reset { min-height: 36px; }
    .bmb-says { grid-template-columns: minmax(0, 1fr); }
    .bmb-list-cols { columns: 1; }
    .bmb-related ul { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .bmb-related a { padding: 9px 14px; }
    .bmb-table :is(th, td) { padding-left: 10px; font-size: 13px; }
    .bmb-band-levels { grid-template-columns: minmax(0, 1fr); }
    .bmb-eyebrow { justify-content: flex-start; }
    .bmb-intro-more { display: none; }
}
@media (max-width: 379px) {
    .bmb-facts-list { grid-template-columns: minmax(0, 1fr); }
    .bmb-work-legend { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .bmb-page *, .bmb-page *::before, .bmb-page *::after { transition: none !important; }
}
@media (forced-colors: active) {
    .bmb-segments input:checked + label { outline: 2px solid Highlight; outline-offset: -2px; }
    .bmb-segments input:checked:focus-visible + label { outline: 4px double Highlight; outline-offset: 1px; }
    .bmb-against-bar { forced-color-adjust: none; }
    .bmb-page .bmb-work { border-left-color: Highlight; }
}
