/* ===================================================================
   Backlink Maker (/backlink-maker)

   Scoped under .bm. Reads the site-wide --az-* tokens (tool-shell.css,
   a2z-tokens.css) and adds only what this tool needs: an accent, the
   three link states, and motion.

   Accent: the A-Z palette colour for the letter B (az-color-palette.js,
   primaryForLetter("B") = #6085ef). --bm-accent-strong is the same hue
   darkened for text on white (5.4:1).

   Motion is decoration only - every state is also carried by text and
   an icon - and prefers-reduced-motion switches it off at the bottom.
   =================================================================== */

.bm {
    --bm-accent: #6085ef;
    --bm-accent-strong: #3a5cc2;
    --bm-accent-soft: #eef2fe;
    --bm-accent-ring: rgba(96, 133, 239, .35);

    --bm-ink: var(--az-ink, #10162b);
    --bm-ink-2: var(--az-ink-2, #454d63);
    --bm-ink-3: var(--az-ink-3, #5f677d);
    --bm-bg: var(--az-bg, #fbf9f7);
    --bm-surface: var(--az-surface, #ffffff);
    --bm-line: var(--az-line, #e8e6e3);
    --bm-line-2: var(--az-line-2, #f0eeeb);

    --bm-live: #17864f;
    --bm-live-soft: #e7f6ee;
    --bm-prot: #8f5600;
    --bm-prot-soft: #fff2dc;
    --bm-fail: #c62f2f;
    --bm-fail-soft: #fdeeee;

    --bm-grad: linear-gradient(110deg, var(--az-a-1, #5b8def) 0%, var(--az-a-2, #7b5bf0) 50%, var(--az-z-1, #f0655f) 100%);
    --bm-r-sm: 10px;
    --bm-r: var(--az-r, 14px);
    --bm-r-lg: var(--az-r-lg, 18px);
    --bm-shadow: var(--az-shadow, 0 4px 16px rgba(16, 22, 43, .06));
    --bm-shadow-lg: 0 18px 40px -18px rgba(16, 22, 43, .22);
    --bm-ease: cubic-bezier(.2, .8, .2, 1);

    background: var(--bm-bg);
    color: var(--bm-ink-2);
    padding-bottom: 28px;
}

.bm *, .bm *::before, .bm *::after { box-sizing: border-box; }

/* style.css sets section { overflow: hidden }, which silently disables the
   sticky results toolbar (sticky needs a non-clipping ancestor). */
.bm section { overflow: visible; }
.bm [hidden] { display: none !important; }

.bm-shell { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.bm h1, .bm h2, .bm h3 { color: var(--bm-ink); letter-spacing: -.01em; }

.bm :is(a, button, input, select):focus-visible {
    outline: 3px solid var(--bm-accent-ring);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.bm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 16px; border-radius: 12px;
    font: inherit; font-weight: 700; font-size: .92rem; line-height: 1;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: transform .16s var(--bm-ease), box-shadow .16s var(--bm-ease), background-color .16s, border-color .16s, color .16s;
}
.bm-btn:disabled { opacity: .55; cursor: not-allowed; }

.bm-btn-primary {
    position: relative; overflow: hidden;
    min-height: 52px; padding: 0 22px; font-size: 1rem;
    color: #fff; background: var(--bm-ink);
    box-shadow: 0 10px 22px -10px rgba(16, 22, 43, .55);
}
.bm-btn-primary::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .22) 50%, transparent 80%);
    transform: translateX(-120%);
}
.bm-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(16, 22, 43, .6); }
.bm-btn-primary:hover:not(:disabled)::after { animation: bm-sheen .9s var(--bm-ease); }
.bm-btn-primary:active:not(:disabled) { transform: translateY(0); }
.bm-btn-arrow { transition: transform .18s var(--bm-ease); }
.bm-btn-primary:hover .bm-btn-arrow { transform: translateX(3px); }

.bm-spinner {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: bm-spin .8s linear infinite;
}
.bm-btn-primary.is-busy .bm-spinner { display: inline-block; }
.bm-btn-primary.is-busy .bm-btn-arrow { display: none; }

.bm-btn-soft {
    color: var(--bm-accent-strong); background: var(--bm-surface); border-color: var(--bm-line);
}
.bm-btn-soft:hover:not(:disabled) { border-color: var(--bm-accent); background: var(--bm-accent-soft); transform: translateY(-1px); }

.bm-btn-ghost {
    min-height: 38px; padding: 0 12px; font-size: .85rem;
    color: var(--bm-ink-2); background: transparent; border-color: var(--bm-line);
}
.bm-btn-ghost:hover:not(:disabled) { border-color: var(--bm-accent); color: var(--bm-accent-strong); }

.bm-link-btn {
    border: 0; background: none; padding: 0; font: inherit; font-weight: 700;
    color: var(--bm-accent-strong); text-decoration: underline; cursor: pointer;
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.bm-hero { padding: 26px 0 18px; text-align: center; }

.bm-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; margin-bottom: 12px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--bm-accent-strong); background: var(--bm-accent-soft);
    animation: bm-rise .5s var(--bm-ease) both;
}

.bm-hero h1 {
    margin: 0 0 10px; font-weight: 800; line-height: 1.15;
    font-size: clamp(1.6rem, 3.6vw, 2.4rem);
    animation: bm-rise .55s .05s var(--bm-ease) both;
}

.bm-lead {
    max-width: 700px; margin: 0 auto 16px; font-size: 1.02rem; line-height: 1.55; color: var(--bm-ink-3);
    animation: bm-rise .6s .1s var(--bm-ease) both;
}

.bm-chips {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    list-style: none; margin: 0; padding: 0;
    animation: bm-rise .65s .15s var(--bm-ease) both;
}
.bm-chips li {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 999px; font-size: .84rem; font-weight: 600;
    color: var(--bm-ink-2); background: var(--bm-surface); border: 1px solid var(--bm-line);
}
.bm-chips i { color: var(--bm-accent); }

/* ---------------------------------------------------------------
   Workbench
   --------------------------------------------------------------- */
.bm-bench {
    position: relative;
    padding: 22px 22px 18px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-line);
    border-radius: var(--bm-r-lg);
    box-shadow: var(--bm-shadow-lg);
    animation: bm-rise .6s .12s var(--bm-ease) both;
}
.bm-bench::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    border-radius: var(--bm-r-lg) var(--bm-r-lg) 0 0; background: var(--bm-grad);
}

.bm-label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .9rem; color: var(--bm-ink); }

.bm-inputrow { display: flex; gap: 10px; }

.bm-input {
    position: relative; flex: 1; min-width: 0;
    display: flex; align-items: center;
    background: var(--bm-surface); border: 1.5px solid var(--bm-line); border-radius: 12px;
    transition: border-color .16s, box-shadow .16s;
}
.bm-input:focus-within { border-color: var(--bm-accent); box-shadow: 0 0 0 4px var(--bm-accent-ring); }
.bm-input.is-invalid { border-color: var(--bm-fail); box-shadow: 0 0 0 4px rgba(198, 47, 47, .14); animation: bm-shake .32s; }
.bm-input > i { position: absolute; left: 14px; color: var(--bm-accent); pointer-events: none; }
.bm-input input {
    width: 100%; min-height: 52px; padding: 0 44px 0 42px;
    border: 0; background: transparent; border-radius: 12px;
    font: inherit; font-size: 1.02rem; color: var(--bm-ink);
}
.bm-input input:focus { outline: none; }
.bm-input input::placeholder { color: #9aa0ae; }

.bm-clear {
    position: absolute; right: 8px; width: 32px; height: 32px; border-radius: 8px;
    border: 0; background: transparent; color: var(--bm-ink-3); cursor: pointer;
}
.bm-clear:hover { background: var(--bm-line-2); color: var(--bm-ink); }

.bm-hint { margin: 8px 0 0; font-size: .84rem; color: var(--bm-ink-3); }

.bm-error {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 10px; padding: 10px 12px; border-radius: var(--bm-r-sm);
    font-size: .9rem; font-weight: 600;
    color: var(--bm-fail); background: var(--bm-fail-soft); border: 1px solid rgba(198, 47, 47, .25);
    animation: bm-rise .25s var(--bm-ease) both;
}
.bm-error .bm-link-btn { color: var(--bm-fail); margin-left: auto; }

.bm-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.bm-recent-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bm-ink-3); margin-right: 2px; }
.bm-recent button {
    border: 1px solid var(--bm-line); background: var(--bm-bg); border-radius: 999px;
    padding: 4px 10px; font: inherit; font-size: .82rem; color: var(--bm-ink-2); cursor: pointer;
    transition: border-color .15s, color .15s;
}
.bm-recent button:hover { border-color: var(--bm-accent); color: var(--bm-accent-strong); }

/* ---- Steps ---- */
.bm-steps {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    list-style: none; margin: 18px 0 0; padding: 14px 0 0; counter-reset: none;
    border-top: 1px solid var(--bm-line-2);
}
.bm-steps li {
    position: relative; display: flex; align-items: center; gap: 8px; min-width: 0;
    font-size: .84rem; font-weight: 600; color: var(--bm-ink-3);
}
.bm-steps li:not(:last-child)::after {
    content: ""; flex: 1; height: 2px; margin: 0 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--bm-accent) 0 var(--fill, 0%), var(--bm-line) var(--fill, 0%) 100%);
    transition: --fill .4s;
}
.bm-step-dot {
    position: relative; flex: none; display: grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%;
    font-size: .8rem; font-weight: 800; color: var(--bm-ink-3);
    background: var(--bm-bg); border: 1.5px solid var(--bm-line);
    transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--bm-ease);
}
.bm-step-dot i { display: none; font-size: .72rem; }
.bm-step-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bm-steps li.is-active { color: var(--bm-ink); }
.bm-steps li.is-active .bm-step-dot {
    color: #fff; background: var(--bm-accent); border-color: var(--bm-accent); transform: scale(1.08);
    box-shadow: 0 0 0 0 var(--bm-accent-ring); animation: bm-pulse 1.4s infinite;
}
.bm-steps li.is-done { color: var(--bm-ink-2); }
.bm-steps li.is-done::after { --fill: 100%; background: var(--bm-accent); }
.bm-steps li.is-done .bm-step-dot { color: #fff; background: var(--bm-live); border-color: var(--bm-live); }
.bm-steps li.is-done .bm-step-dot span { display: none; }
.bm-steps li.is-done .bm-step-dot i { display: block; animation: bm-pop .35s var(--bm-ease); }

/* ---- Progress ---- */
.bm-progress {
    position: relative;
    display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
    margin-top: 16px; padding: 16px; border-radius: var(--bm-r);
    background: linear-gradient(180deg, #f7f8ff 0%, var(--bm-surface) 100%);
    border: 1px solid #e3e8fb;
    animation: bm-rise .35s var(--bm-ease) both;
}

.bm-ring { position: relative; width: 118px; height: 118px; }
.bm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bm-ring-track { fill: none; stroke: #e6e9f6; stroke-width: 10; }
.bm-ring-bar {
    fill: none; stroke: url(#bmRingGrad); stroke-width: 10; stroke-linecap: round;
    stroke-dasharray: 326.73; stroke-dashoffset: 326.73;
    transition: stroke-dashoffset .45s var(--bm-ease);
}
.bm-progress.is-indeterminate .bm-ring svg { animation: bm-spin 1.1s linear infinite; }
.bm-progress.is-indeterminate .bm-ring-bar { stroke-dashoffset: 240; }
.bm-ring-text {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.bm-ring-text strong { font-size: 1.45rem; font-weight: 800; color: var(--bm-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.bm-ring-text span { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bm-ink-3); }

.bm-progress-body { min-width: 0; }
.bm-progress-title { margin: 0; font-weight: 800; color: var(--bm-ink); font-size: 1.02rem; }
.bm-progress-meta { margin: 2px 0 10px; font-size: .84rem; color: var(--bm-ink-3); font-variant-numeric: tabular-nums; }

.bm-bar {
    position: relative; display: flex; height: 10px; overflow: hidden;
    border-radius: 999px; background: #e6e9f6;
}
.bm-bar-seg { height: 100%; width: 0; transition: width .45s var(--bm-ease); }
.bm-bar-seg.is-live { background: var(--bm-live); }
.bm-bar-seg.is-protected { background: #e39b1b; }
.bm-bar-seg.is-failed { background: var(--bm-fail); }
.bm-progress.is-running .bm-bar::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
    transform: translateX(-100%); animation: bm-sweep 1.4s infinite;
}

.bm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.bm-stat {
    padding: 8px 10px; border-radius: var(--bm-r-sm); background: var(--bm-surface); border: 1px solid var(--bm-line);
    border-left-width: 3px;
}
.bm-stat dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bm-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-stat dd { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--bm-ink); font-variant-numeric: tabular-nums; }
.bm-stat dd.is-bump { animation: bm-bump .3s var(--bm-ease); }
.bm-stat.is-live { border-left-color: var(--bm-live); }
.bm-stat.is-protected { border-left-color: #e39b1b; }
.bm-stat.is-failed { border-left-color: var(--bm-fail); }
.bm-stat.is-pending { border-left-color: var(--bm-accent); }

.bm-progress-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bm-progress-actions:empty { display: none; }

.bm-progress.is-done { border-color: rgba(23, 134, 79, .28); background: linear-gradient(180deg, #f1fbf5 0%, var(--bm-surface) 100%); }
.bm-progress.is-done .bm-ring-text strong { color: var(--bm-live); }

/* Completion burst - small dots flung out from the ring. */
.bm-burst { position: absolute; left: 75px; top: 50%; width: 0; height: 0; pointer-events: none; }
.bm-burst i {
    position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--c, var(--bm-accent)); opacity: 0;
    animation: bm-fling .9s var(--bm-ease) forwards;
}

/* ---------------------------------------------------------------
   Ad slot
   --------------------------------------------------------------- */
.bm-ad { margin-top: 16px; }
.bm-ad:empty { display: none; }

/* ---------------------------------------------------------------
   Results
   --------------------------------------------------------------- */
.bm-results { margin-top: 18px; animation: bm-rise .45s var(--bm-ease) both; }

.bm-results-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px;
    margin-bottom: 12px;
}
.bm-results-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; }
.bm-results-head h2:focus { outline: none; }
#bmHost { color: var(--bm-accent-strong); overflow-wrap: anywhere; }
.bm-sub { margin: 2px 0 0; font-size: .88rem; color: var(--bm-ink-3); }
.bm-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.bm-toolbar {
    position: sticky; top: 0; z-index: 5;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px; margin-bottom: 10px;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px);
    border: 1px solid var(--bm-line); border-radius: var(--bm-r);
}

.bm-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bm-bg); border: 1px solid var(--bm-line-2); }
.bm-tabs button {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
    font: inherit; font-size: .86rem; font-weight: 700; color: var(--bm-ink-3); background: transparent; cursor: pointer;
    transition: background-color .16s, color .16s, box-shadow .16s;
}
.bm-tabs button:hover { color: var(--bm-ink); }
.bm-tabs button[aria-selected="true"] { color: var(--bm-ink); background: var(--bm-surface); box-shadow: 0 1px 3px rgba(16, 22, 43, .1); }
.bm-count {
    min-width: 22px; padding: 1px 6px; border-radius: 999px; text-align: center;
    font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--bm-ink-2); background: var(--bm-line-2);
}
.bm-tabs [data-filter="live"] .bm-count { color: var(--bm-live); background: var(--bm-live-soft); }
.bm-tabs [data-filter="protected"] .bm-count { color: var(--bm-prot); background: var(--bm-prot-soft); }
.bm-tabs [data-filter="failed"] .bm-count { color: var(--bm-fail); background: var(--bm-fail-soft); }

.bm-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-search { position: relative; display: flex; align-items: center; margin: 0; }
.bm-search i { position: absolute; left: 11px; font-size: .85rem; color: var(--bm-ink-3); pointer-events: none; }
.bm-search input, .bm-select select {
    min-height: 40px; border: 1px solid var(--bm-line); border-radius: 10px; background: var(--bm-surface);
    font: inherit; font-size: .9rem; color: var(--bm-ink);
}
.bm-search input { width: 210px; padding: 0 10px 0 32px; }
.bm-select { margin: 0; }
.bm-select select { padding: 0 30px 0 10px; max-width: 230px; }
.bm-search input:focus, .bm-select select:focus { outline: none; border-color: var(--bm-accent); box-shadow: 0 0 0 3px var(--bm-accent-ring); }

.bm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.bm-item {
    --tile: var(--bm-accent);
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--bm-r);
    background: var(--bm-surface); border: 1px solid var(--bm-line);
    transition: border-color .2s, box-shadow .2s, transform .2s var(--bm-ease), background-color .3s;
    animation: bm-rise .4s var(--bm-ease) both;
    animation-delay: calc(min(var(--i, 0), 30) * 18ms);
}
.bm-item:hover { border-color: #cfd8f7; box-shadow: var(--bm-shadow); }

.bm-tile {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
    font-weight: 800; font-size: .98rem; color: var(--tile);
    background: color-mix(in srgb, var(--tile) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--tile) 30%, #fff);
}
@supports not (background: color-mix(in srgb, red 10%, white)) {
    .bm-tile { background: var(--bm-accent-soft); border-color: #d9e1fb; }
}

.bm-item-main { min-width: 0; }
.bm-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bm-item-name { font-weight: 700; color: var(--bm-ink); overflow-wrap: anywhere; }
.bm-cat {
    padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700;
    color: var(--bm-ink-3); background: var(--bm-line-2);
}
.bm .bm-item-url {
    display: block; margin-top: 2px; font-size: .82rem; color: var(--bm-ink-3) !important;
    text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bm .bm-item-url:hover { color: var(--bm-accent-strong) !important; text-decoration: underline; }

.bm-status {
    display: inline-flex; align-items: center; gap: 6px; min-width: 132px; justify-content: center;
    padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap;
    color: var(--bm-ink-3); background: var(--bm-line-2);
    transition: background-color .25s, color .25s;
}
.bm-status i { font-size: .85rem; }
.bm-ms { font-weight: 600; opacity: .75; font-variant-numeric: tabular-nums; }
.bm-ms:empty { display: none; }

.bm-item.is-checking { border-color: #d5ddfa; background: linear-gradient(90deg, var(--bm-surface) 0%, #f5f7ff 50%, var(--bm-surface) 100%); background-size: 200% 100%; animation: bm-rise .4s var(--bm-ease) both, bm-shimmer 1.2s linear infinite; }
.bm-item.is-checking .bm-status { color: var(--bm-accent-strong); background: var(--bm-accent-soft); }
.bm-item.is-live .bm-status { color: var(--bm-live); background: var(--bm-live-soft); }
.bm-item.is-protected .bm-status { color: var(--bm-prot); background: var(--bm-prot-soft); }
.bm-item.is-failed { border-color: rgba(198, 47, 47, .22); }
.bm-item.is-failed .bm-status { color: var(--bm-fail); background: var(--bm-fail-soft); }
.bm-item.is-settled .bm-status i { animation: bm-pop .38s var(--bm-ease); }
.bm-item.is-opened .bm-item-name::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    margin-left: 6px; font-size: .72rem; color: var(--bm-live);
}

.bm-item-actions { display: flex; gap: 4px; }
.bm .bm-icon-btn {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid var(--bm-line); background: var(--bm-surface); color: var(--bm-ink-2) !important;
    cursor: pointer; text-decoration: none;
    transition: border-color .15s, color .15s, background-color .15s, transform .15s var(--bm-ease);
}
.bm .bm-icon-btn:hover { border-color: var(--bm-accent); color: var(--bm-accent-strong) !important; background: var(--bm-accent-soft); transform: translateY(-1px); }
.bm .bm-icon-btn.is-copied { border-color: var(--bm-live); color: var(--bm-live) !important; background: var(--bm-live-soft); }

.bm-empty {
    padding: 28px 16px; text-align: center; color: var(--bm-ink-3);
    border: 1px dashed var(--bm-line); border-radius: var(--bm-r); background: var(--bm-surface);
}
.bm-empty i { font-size: 1.6rem; color: var(--bm-accent); }
.bm-empty p { margin: 8px 0 6px; }

/* ---------------------------------------------------------------
   How it works + note
   --------------------------------------------------------------- */
.bm-info { margin-top: 26px; }
.bm-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bm-how-card {
    padding: 16px; border-radius: var(--bm-r); background: var(--bm-surface); border: 1px solid var(--bm-line);
    box-shadow: 4px 4px 0 var(--card-offset-background, #f8f2ee);
}
.bm-how-icon {
    display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 12px;
    color: var(--bm-accent-strong); background: var(--bm-accent-soft);
}
.bm-how-card h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.bm-how-card p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--bm-ink-3); }

.bm-note {
    display: flex; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: var(--bm-r);
    background: var(--bm-accent-soft); border: 1px solid #dbe3fb; color: var(--bm-ink-2);
}
.bm-note > i { margin-top: 3px; color: var(--bm-accent-strong); }
.bm-note p { margin: 0; font-size: .9rem; line-height: 1.55; }

/* ---------------------------------------------------------------
   Toast
   --------------------------------------------------------------- */
.bm-toast {
    position: fixed; left: 50%; bottom: 22px; z-index: 1080;
    display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
    padding: 12px 16px; border-radius: 12px;
    color: #fff; background: var(--bm-ink); box-shadow: 0 16px 34px -12px rgba(16, 22, 43, .5);
    font-weight: 600; font-size: .92rem;
    transform: translate(-50%, 0); animation: bm-toast-in .3s var(--bm-ease) both;
}
.bm-toast i { color: #7fe0ab; }
.bm-toast.is-leaving { animation: bm-toast-out .25s ease-in both; }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 860px) {
    .bm-how { grid-template-columns: 1fr; }
    .bm-toolbar { position: static; }
    .bm-filters, .bm-search, .bm-search input { width: 100%; }
    .bm-select, .bm-select select { width: 100%; max-width: none; }
}

@media (max-width: 640px) {
    .bm-hero { padding-top: 18px; }
    .bm-bench { padding: 18px 14px 14px; }
    .bm-inputrow { flex-direction: column; }
    .bm-btn-primary { width: 100%; }
    .bm-steps { grid-template-columns: repeat(4, auto); justify-content: space-between; }
    .bm-steps li:not(:last-child)::after { display: none; }
    .bm-step-name { display: none; }
    .bm-steps li.is-active .bm-step-name { display: inline; }
    .bm-progress { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .bm-progress-body { width: 100%; }
    .bm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bm-progress-actions { justify-content: center; }
    .bm-burst { left: 50%; top: 75px; }
    .bm-actions { width: 100%; }
    .bm-actions .bm-btn { flex: 1 1 calc(50% - 8px); }
    .bm-tabs { width: 100%; }
    .bm-tabs button { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
    .bm-item { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; }
    .bm-status { grid-column: 2 / 3; justify-self: start; min-width: 0; }
    .bm-item-actions { grid-column: 3 / 4; grid-row: 1 / 3; flex-direction: column; }
}

/* ---------------------------------------------------------------
   Motion
   --------------------------------------------------------------- */
@keyframes bm-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bm-spin { to { transform: rotate(360deg); } }
@keyframes bm-sheen { to { transform: translateX(120%); } }
@keyframes bm-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes bm-pulse { 0% { box-shadow: 0 0 0 0 var(--bm-accent-ring); } 70% { box-shadow: 0 0 0 8px rgba(96, 133, 239, 0); } 100% { box-shadow: 0 0 0 0 rgba(96, 133, 239, 0); } }
@keyframes bm-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
@keyframes bm-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes bm-sweep { to { transform: translateX(100%); } }
@keyframes bm-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes bm-fling {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.4); }
}
@keyframes bm-toast-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bm-toast-out { to { opacity: 0; transform: translate(-50%, 10px); } }

@media (prefers-reduced-motion: reduce) {
    .bm *, .bm *::before, .bm *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: .01ms !important;
    }
    .bm-item.is-checking { background: #f5f7ff; }
    .bm-burst { display: none; }
}
