/*
 * deck-audit.css — the audit renderer's styles (static/js/deck-audit.js), shared by
 * /commander-bracket and the deck builder's Stats view. Everything is scoped under
 * .bc-audit, which carries its own tokens so the audit looks the same on a page
 * whose :root defines different ones (the deck editor's do). Moved verbatim out of
 * templates/bracket_calculator.html; class names keep their bc- prefix.
 */
.bc-audit {
    --bg-deep: #0a0a0f; --bg-surface: #12121a; --bg-elevated: #1a1a28; --bg-card: #16161f;
    --border-subtle: #2a2a40; --border-medium: #3a3a55;
    --accent-primary: #a855f7; --accent-primary-dim: rgba(168, 85, 247, 0.15);
    --accent-secondary: #f59e0b; --accent-success: #22c55e; --accent-danger: #ef4444;
    --text-primary: #f4f4f5; --text-secondary: #a1a1aa; --text-muted: #83838d; --text-accent: #c4b5fd;
    --font-display: 'Cinzel Decorative', serif; --font-body: 'Outfit', sans-serif; --font-mono: 'JetBrains Mono', monospace;
    color: var(--text-primary); font-family: var(--font-body);
}
.bc-audit *, .bc-audit *::before, .bc-audit *::after { box-sizing: border-box; }
/* Borrowed from the bracket page's input styles: "why this bracket" jump buttons,
   hints and card links render inside the audit. */
.bc-audit .bc-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.bc-audit .bc-tab { background: var(--bg-elevated); border: 1px solid var(--border-subtle); color: var(--text-secondary);
    padding: 0.5rem 1rem; border-radius: 999px; cursor: pointer; font-size: 0.9rem; font-family: inherit; }
.bc-audit .bc-hint { color: var(--text-muted); font-size: 0.8rem; }
.bc-spinner {
    width: 18px; height: 18px; border: 2px solid var(--border-medium); border-top-color: var(--accent-primary);
    border-radius: 50%; animation: bcspin .8s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes bcspin { to { transform: rotate(360deg); } }


/* --- combos panel: the Combo Finder's cards (static/css/combo-card.css) ---
   Same renderer as /combos, sized down to sit inside an audit panel. */
.bc-combos .combo-card { background: var(--bg-deep); margin-bottom: 0.75rem; }
.bc-combos .combo-piece-img { width: 150px; }
.bc-combos .combo-card-meta { min-width: 0; }
.bc-combos .bc-combo-group + .bc-combo-group { margin-top: 1.25rem; }


/* --- verdict --- */
.bc-results { display: none; margin-top: 1.5rem; }
.bc-verdict { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.bc-badge {
    width: 92px; height: 92px; border-radius: 18px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; font-family: var(--font-display); flex-shrink: 0;
}
.bc-badge-num { font-size: 2.4rem; line-height: 1; font-weight: 700; }
.bc-badge-word { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.bc-b1 { background: rgba(34,197,94,.12); border: 2px solid #22c55e; color: #22c55e; }
.bc-b2 { background: rgba(59,130,246,.12); border: 2px solid #3b82f6; color: #3b82f6; }
.bc-b3 { background: rgba(245,158,11,.12); border: 2px solid #f59e0b; color: #f59e0b; }
.bc-b4 { background: rgba(239,68,68,.12); border: 2px solid #ef4444; color: #ef4444; }
.bc-b5 { background: rgba(168,85,247,.12); border: 2px solid #a855f7; color: #a855f7; }
.bc-bx { background: rgba(113,113,122,.12); border: 2px dashed #71717a; color: #a1a1aa; }
.bc-verdict-body { flex: 1; min-width: 240px; }
.bc-verdict-name { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.2rem; }
.bc-verdict-desc { color: var(--text-secondary); font-size: 0.92rem; }
.bc-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; }
.bc-chip {
    background: var(--accent-primary-dim); border: 1px solid rgba(168,85,247,.35); color: var(--text-accent);
    padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.78rem;
}

/* --- notices --- */
.bc-notice {
    border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.85rem; margin-top: 1rem;
    border: 1px solid var(--border-subtle); background: var(--bg-elevated); color: var(--text-secondary);
}
.bc-notice-warn { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); color: #fcd34d; }
.bc-notice strong { color: var(--text-primary); }

/* --- "how to move down a bracket" --- */
.bc-moves {
    margin-top: 1rem; border: 1px solid var(--border-subtle); border-radius: 12px;
    background: var(--bg-elevated); padding: 0.9rem 1rem;
}
.bc-moves-title {
    font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.7rem;
    color: var(--text-primary);
}
.bc-move + .bc-move { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--border-subtle); }
.bc-move-head { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--text-secondary); }
.bc-move-badge {
    width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.bc-move-steps { margin: 0.5rem 0 0; padding-left: 1.15rem; color: var(--text-secondary); font-size: 0.87rem; }
.bc-move-steps li { margin-bottom: 0.35rem; }
.bc-move-cards { margin-top: 0.2rem; font-size: 0.82rem; opacity: 0.85; line-height: 1.5; }
.bc-move-foot { margin-top: 0.8rem; font-size: 0.78rem; color: var(--text-muted, var(--text-secondary)); opacity: 0.8; }

/* --- deck health (legality) ---
   Loud on purpose: an illegal card means the deck cannot be played as written,
   which matters more than any number on this page. It never moves the bracket. */
.bc-health {
    margin-top: 1rem; border-radius: 12px; padding: 0.9rem 1rem;
    border: 1px solid rgba(239,68,68,.45); background: rgba(239,68,68,.09);
}
.bc-health-ok { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.07); }
.bc-health-title {
    font-family: var(--font-display); font-size: 1rem; color: var(--text-primary);
    display: flex; align-items: center; gap: 0.5rem;
}
.bc-problem + .bc-problem { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid rgba(239,68,68,.2); }
.bc-problem-label { font-size: 0.9rem; color: #fca5a5; font-weight: 600; margin-top: 0.6rem; }
.bc-problem-detail { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.2rem; }
.bc-problem-cards { margin-top: 0.35rem; font-size: 0.82rem; line-height: 1.6; }
.bc-problem-extra { color: var(--text-muted, var(--text-secondary)); font-size: 0.78rem; }

/* --- mana consistency ---
   Named .bc-src-* rather than .bc-mana-*: these once collided with the audit's
   own pip-bar classes, which used the same names for a text-letter symbol rather
   than an <img>. That section has since been merged into this one, but the
   distinct names are worth keeping — reusing them is what hid the collision. */
.bc-src-row {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle); font-size: 0.87rem;
}
.bc-src-row:last-child { border-bottom: 0; }
.bc-src-sym { width: 22px; height: 22px; flex-shrink: 0; }
.bc-mana-count { font-family: var(--font-mono); font-weight: 700; min-width: 2.6rem; }
.bc-mana-note { color: var(--text-secondary); font-size: 0.82rem; }
.bc-mana-ok { color: var(--accent-success); }
.bc-mana-short { color: #fcd34d; }
.bc-split { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.bc-split-part {
    flex: 1 1 90px; background: var(--bg-deep); border-radius: 8px; padding: 0.5rem 0.65rem;
}
.bc-split-value { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; }
.bc-split-label { font-size: 0.72rem; color: var(--text-secondary); }

/* --- land suggestions --- */
.bc-band + .bc-band { margin-top: 1rem; }
.bc-band-head {
    display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.85rem;
    color: var(--text-secondary); margin-bottom: 0.5rem;
}
.bc-band-lead {
    background: var(--accent-primary-dim); border: 1px solid rgba(168,85,247,.35);
    color: var(--text-accent); padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.7rem;
}
.bc-land { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.35rem 0; font-size: 0.87rem; }
.bc-land-tier {
    font-family: var(--font-mono); font-weight: 700; font-size: 0.72rem; width: 1.3rem;
    text-align: center; border-radius: 5px; flex-shrink: 0; padding: 0.1rem 0;
}
.bc-tier-S { background: rgba(168,85,247,.22); color: #d8b4fe; }
.bc-tier-A { background: rgba(59,130,246,.18); color: #93c5fd; }
.bc-land-why { color: var(--text-secondary); font-size: 0.8rem; }
.bc-land-price { margin-left: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted, var(--text-secondary)); }

/* --- audit grid --- */
.bc-section-title {
    font-family: var(--font-display); font-size: 1.15rem; margin: 1.75rem 0 0.85rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.bc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 0.85rem; }
.bc-audit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bc-subtitle { font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--text-secondary); margin: 1.1rem 0 0.6rem; font-weight: 600; letter-spacing: .03em; }
.bc-power-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; }
.bc-power-grid .bc-metric { padding: 0.7rem 0.75rem; }
.bc-power-grid .bc-metric-label { font-size: 0.8rem; }
.bc-price-share { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border-subtle); }
.bc-price-share .bc-mana-track { display: block; width: 100%; max-width: none; margin-bottom: 0.5rem; }
.bc-price-share-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }
.bc-price-share-text strong { color: var(--text-primary); }
@media (max-width: 900px) {
    .bc-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bc-power-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bc-power-grid .bc-metric:last-child { grid-column: span 2; }
}
@media (max-width: 640px) {
    .bc-audit-grid, .bc-power-grid { gap: 0.5rem; }
    .bc-audit-grid .bc-metric { padding: 0.7rem; }
    .bc-audit-grid .bc-metric-label { font-size: 0.8rem; }
}
.bc-metric { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 0.9rem; }
.bc-metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.bc-metric-label { color: var(--text-secondary); font-size: 0.85rem; }
.bc-metric-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); }
.bc-metric-note { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.4rem; display: flex; justify-content: space-between; gap: 0.4rem; }
.bc-est {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: .06em;
    border: 1px solid var(--border-medium); color: var(--text-muted); border-radius: 4px; padding: 0 0.3rem;
}
.bc-metric-cards { margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; display: none; }
.bc-cardlink { color: var(--text-accent); text-decoration: none; border-bottom: 1px dotted rgba(196,181,253,.35); }
.bc-cardlink:hover { color: #fff; }

/* --- curve --- */
.bc-curve { display: flex; align-items: flex-end; gap: 0.5rem; height: 130px; padding: 0.5rem 0; }
.bc-curve-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; height: 100%; justify-content: flex-end; }
.bc-curve-bar { width: 100%; background: linear-gradient(180deg, var(--accent-primary), #6d28d9); border-radius: 5px 5px 0 0; min-height: 3px; }
.bc-curve-n { font-size: 0.72rem; color: var(--text-secondary); font-family: var(--font-mono); }
.bc-curve-x { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }

/* --- mana bars ---
   .bc-mana-row / .bc-mana-sym / .bc-mana-num were removed with the old
   "Mana base estimate" section they styled; the bar itself lives on inside the
   merged Mana base card, so track and fill stay. */
.bc-mana-track { flex: 1; height: 8px; background: var(--bg-deep); border-radius: 99px; overflow: hidden; }
/* display:block is load-bearing and was missing since this shipped: the fill is a
   <span>, and an inline element ignores width and height, so every one of these
   bars rendered 0x0 no matter what percentage the JS wrote into it. The track has
   size only because it is a flex item and gets blockified; its child is not. */
.bc-mana-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent-primary); }
/* The bar now reads as a verdict, so it carries the verdict's colour. */
.bc-fill-ok { background: var(--accent-success); }
.bc-fill-short { background: var(--accent-secondary); }

/* --- price --- */
.bc-price-row { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.85rem; }
.bc-price-row:last-child { border-bottom: none; }
.bc-price-total { font-size: 1.9rem; font-weight: 700; font-family: var(--font-mono); color: var(--accent-secondary); }


/* --- Game Changers ---
   Card grid on desktop, plain comma list on mobile. Both are always in the DOM;
   the media query at the bottom of this file swaps which one is shown. */

/* --- combos --- */
.bc-combo-group { margin-bottom: 1.2rem; }
.bc-combo-group:last-child { margin-bottom: 0; }
.bc-combo-head {
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
    margin-bottom: 0.55rem;
}
.bc-combo-count {
    background: var(--bg-deep); border: 1px solid var(--border-subtle); border-radius: 999px;
    padding: 0.05rem 0.5rem; font-family: var(--font-mono); font-size: 0.72rem;
}
.bc-combo {
    padding: 0.6rem 0; border-bottom: 1px solid var(--border-subtle);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem;
}
.bc-combo:last-child { border-bottom: none; }
.bc-combo-cards { font-size: 0.92rem; }
.bc-combo-plus { color: var(--text-muted); margin: 0 0.4rem; }
.bc-combo-source {
    display: inline-block; margin-top: 0.6rem; font-size: 0.75rem;
    color: var(--text-muted); text-decoration: none;
}
.bc-combo-source:hover { color: var(--text-accent); text-decoration: underline; }

/* --- next step: save the deck (signed-out CTA and signed-in button share it) ---
   Lives in the result, right under the verdict, because that is the moment the
   visitor cares. .bc-cta is the server-rendered CTA variant, moved in by script. */
.bc-act, .bc-cta {
    display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; margin-top: 0.75rem;
    padding: 1rem 1.25rem; border-radius: 14px; border: 1px solid rgba(168,85,247,.35);
    background: linear-gradient(135deg, rgba(168,85,247,.14), rgba(168,85,247,.04));
}
.bc-cta[hidden] { display: none; }
.bc-act-body, .bc-cta-body { flex: 1 1 320px; min-width: 0; }
.bc-cta-title, .bc-act-title { font-weight: 700; font-size: 1.02rem; color: var(--text-primary); }
.bc-cta-text, .bc-act-text { color: var(--text-secondary); font-size: 0.88rem; margin-top: 0.15rem; }
.bc-cta-btn, .bc-act-btn {
    display: inline-flex; align-items: center; gap: 0.4rem; background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: #fff; text-decoration: none; font: inherit; font-weight: 700; font-size: 0.92rem; padding: 0.65rem 1.25rem;
    border-radius: 10px; border: 0; cursor: pointer; white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(168,85,247,.8);
}
.bc-act-btn:disabled { opacity: .6; cursor: default; }
.bc-act-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.bc-act-link {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.95rem; border-radius: 10px; font-size: 0.88rem;
    text-decoration: none; color: var(--text-primary); background: var(--bg-elevated); border: 1px solid var(--border-medium); font-weight: 600;
}
.bc-act-link:hover { border-color: var(--accent-primary); }
.bc-act.saved { border-color: rgba(34,197,94,.45); background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.03)); }
.bc-act-err { color: #fca5a5; font-size: 0.82rem; flex-basis: 100%; }
.bc-c-add {
    position: absolute; right: 4px; top: 4px; z-index: 2; font: inherit; font-size: 0.66rem; font-weight: 700; padding: 0.18rem 0.45rem;
    border-radius: 5px; border: 1px solid rgba(168,85,247,.6); background: rgba(10,10,15,.9); color: var(--text-accent); cursor: pointer;
}
.bc-c-add:hover { background: var(--accent-primary); color: #fff; }
.bc-c-add.done { border-color: rgba(34,197,94,.6); color: #86efac; cursor: default; }
.bc-fix-save { background: none; border: 0; padding: 0; font: inherit; color: var(--text-accent); text-decoration: underline; cursor: pointer; }
.bc-dp-signin { text-align: center; padding: 2rem 1rem; }
.bc-dp-signin-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.4rem; }
.bc-dp-signin p { color: var(--text-secondary); font-size: 0.9rem; max-width: 46ch; margin: 0 auto 1rem; }


/* --- results: the audit inspector (Nov 2026 redesign) ---
   A compact verdict strip, then a two-pane inspector: a sticky list of every
   category on the left (status dot, count, range bar) and the selected
   category's detail on the right, swapped in place — nothing on the page moves
   when you click. Every pane is rendered up front and hidden by class, so the
   HTML scripts/test_bracket_page.js reads still contains every section. Phones
   (<=760px) get one column: the open pane is moved under its own row.
   The audit runs wider than the 1100px page: the cards are the content here. */
.bc-wide { width: min(1440px, calc(100vw - 2.5rem)); margin-left: calc((100% - min(1440px, calc(100vw - 2.5rem))) / 2); }

.bc-v {
    position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--border-subtle);
    background: var(--bg-card); margin-top: 0.75rem;
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1.5rem; align-items: center; padding: 1.3rem 1.6rem;
}
.bc-v-art { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: .25;
            -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%); mask-image: linear-gradient(90deg, #000 0%, transparent 70%); }
.bc-v > *:not(.bc-v-art) { position: relative; }
.bc-eyebrow { font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.bc-v-name { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.15; margin: 0.2rem 0 0.45rem; overflow-wrap: anywhere; }
.bc-v-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; color: var(--text-secondary); font-size: 0.86rem; }
.bc-v-meta .bc-src-sym { width: 17px; height: 17px; }
.bc-dot { color: var(--text-muted); }
.bc-v-stat { display: flex; align-items: center; gap: 0.85rem; }
.bc-v-stat .bc-badge { width: 64px; height: 64px; border-radius: 14px; }
.bc-v-stat .bc-badge-num { font-size: 1.9rem; }
.bc-v-stat .bc-badge-word { display: none; }
.bc-v-word { font-weight: 600; font-size: 1.05rem; }
.bc-v-sub { color: var(--text-secondary); font-size: 0.8rem; }
.bc-linkbtn {
    background: none; border: none; padding: 0.2rem 0; color: var(--text-accent); font: inherit; font-size: 0.8rem;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.bc-linkbtn:hover { color: #fff; }
.bc-beta {
    font-family: var(--font-body); font-size: 0.6rem; letter-spacing: .1em; text-transform: uppercase;
    font-weight: 700; color: var(--text-accent); border: 1px solid rgba(168,85,247,.5);
    border-radius: 999px; padding: 0.1rem 0.45rem; vertical-align: 2px;
}
.bc-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.bc-ring svg { width: 100%; height: 100%; display: block; }
.bc-ring-track { fill: none; stroke: var(--border-subtle); stroke-width: 10; }
.bc-ring-fill { fill: none; stroke: var(--accent-primary); stroke-width: 10; stroke-linecap: round; }
.bc-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bc-ring-num span { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.bc-ring-num small { display: none; }
.bc-alerts { margin: 0.9rem 0 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bc-alerts .bc-notice, .bc-alerts .bc-health { margin: 0; }

.bc-insp { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.bc-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1rem; }
.bc-nav-title { font-size: 0.68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin: 0 0.7rem 0.3rem; font-weight: 600; }
.bc-nr {
    width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 0.6rem; align-items: center;
    text-align: left; padding: 0.5rem 0.7rem; border-radius: 10px; border: 0; background: none; color: var(--text-primary);
    font: inherit; cursor: pointer; transition: background .12s;
}
.bc-nr:hover { background: var(--bg-card); }
.bc-nr.on { background: var(--bg-elevated); box-shadow: inset 2px 0 0 var(--accent-primary); }
.bc-nr:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 1px; }
.bc-nr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.bc-nr-dot.ok { background: var(--accent-success); } .bc-nr-dot.warn { background: #fbbf24; } .bc-nr-dot.bad { background: #f87171; }
.bc-nr-dot.info { background: var(--text-accent); } .bc-nr-dot.none { background: transparent; border: 1px solid var(--border-medium); }
.bc-nr-label { font-size: 0.92rem; }
.bc-nr-val { font-family: var(--font-mono); font-size: 0.86rem; color: var(--text-secondary); }
.bc-nr.on .bc-nr-val { color: var(--text-primary); }
.bc-nr-bar { grid-column: 2 / 4; position: relative; height: 3px; border-radius: 2px; background: var(--border-subtle); margin-top: 0.15rem; }
.bc-nr-bar i { position: absolute; top: 0; bottom: 0; background: rgba(34,197,94,.35); border-radius: 2px; }
.bc-nr-bar u { position: absolute; top: -3px; width: 3px; height: 9px; margin-left: -1px; border-radius: 2px; background: var(--text-primary); }
.bc-nr-bar.warn u { background: #fbbf24; } .bc-nr-bar.bad u { background: #f87171; }

.bc-panes { min-width: 0; }
.bc-pane { display: none; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 1.5rem 1.6rem; min-height: 460px; }
.bc-pane.active { display: block; }
.bc-pane-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.bc-pane-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.bc-pane-count { font-family: var(--font-mono); font-size: 1.3rem; color: var(--text-secondary); }
.bc-pane-head .bc-pill { margin-left: auto; }
.bc-pane-say { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.55; margin: 0.5rem 0 1.1rem; max-width: 68ch; }
.bc-pane-say b { color: var(--text-primary); font-weight: 600; }
.bc-pane-foot { display: flex; justify-content: space-between; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.bc-pane-foot button { background: none; border: 0; font: inherit; font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; padding: 0.3rem 0.1rem; }
.bc-pane-foot button:hover { color: var(--text-primary); }
.bc-pane-foot kbd { font-family: var(--font-mono); font-size: 0.7rem; border: 1px solid var(--border-medium); border-radius: 4px; padding: 0 0.3rem; margin-left: 0.35rem; color: var(--text-muted); }
.bc-pill { font-size: 0.72rem; font-weight: 600; border: 1px solid currentColor; border-radius: 999px; padding: 0.15rem 0.6rem; }
.bc-pill-ok { color: var(--accent-success); } .bc-pill-warn { color: #fbbf24; }
.bc-pill-bad { color: #f87171; } .bc-pill-info { color: var(--text-accent); }
.bc-panel-text { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; margin-bottom: 0.8rem; max-width: 720px; }

.bc-scale { margin: 0 0 1.4rem; }
.bc-scale-track { position: relative; height: 8px; border-radius: 4px; background: var(--bg-deep); }
.bc-scale-band { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: rgba(34,197,94,.22); border: 1px solid rgba(34,197,94,.4); }
.bc-scale-mark { position: absolute; top: -5px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--text-primary); }
.bc-scale-mark.warn { background: #fbbf24; } .bc-scale-mark.bad { background: #f87171; }
.bc-scale-legend { display: flex; justify-content: space-between; margin-top: 0.45rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }

.bc-sub { margin-top: 1.4rem; }
.bc-scale + .bc-sub, .bc-pane-say + .bc-sub { margin-top: 0; }
.bc-sub-title { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 0.6rem; }
.bc-sub-title span { font-family: var(--font-mono); letter-spacing: 0; color: var(--text-secondary); }
.bc-sub.bc-fixit { background: var(--bg-deep); border: 1px dashed var(--border-medium); border-radius: 12px; padding: 1rem; }
.bc-fixit .bc-sub-title { color: var(--text-accent); }
.bc-fix-note { font-size: 0.78rem; color: var(--text-muted); margin: -0.2rem 0 0.7rem; }
.bc-subblock { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.bc-subhead { font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 0.6rem; }

/* Five across: each card's name reads, hover shows the whole card (Adam, 11-30). */
.bc-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; }
.bc-c { position: relative; aspect-ratio: 488 / 680; border-radius: 6px; overflow: hidden; background: var(--bg-deep); transition: transform .15s, box-shadow .15s; }
.bc-c img { width: 100%; height: 100%; display: block; }
.bc-c:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -10px rgba(0,0,0,.8); z-index: 2; }
.bc-c-noimg { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0.5rem; font-size: 0.8rem; color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.bc-c-buy {
    position: absolute; left: 4px; bottom: 4px; z-index: 1; font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700;
    padding: 0.12rem 0.38rem; border-radius: 4px; background: rgba(10,10,15,.88); color: #fcd34d; text-decoration: none;
    border: 1px solid rgba(252,211,77,.25); transition: background .12s, color .12s;
}
.bc-c-buy:hover { background: #fcd34d; color: #0a0a0f; }
.bc-c-buy.nop { color: var(--text-secondary); border-color: var(--border-medium); }
.bc-c-tag { position: absolute; right: 4px; bottom: 4px; font-size: 0.6rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 4px; background: rgba(10,10,15,.88); color: var(--text-accent); }
.bc-cards + .bc-cards { margin-top: 0.7rem; }

.bc-fixes { display: flex; flex-direction: column; gap: 0.6rem; }
.bc-fix {
    display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; text-align: left; cursor: pointer;
    background: var(--bg-deep); border: 1px solid var(--border-subtle); border-radius: 12px;
    padding: 0.85rem 1rem; color: var(--text-primary); font: inherit; transition: border-color .15s;
}
.bc-fix:hover { border-color: var(--accent-primary); }
.bc-fix:focus-visible, .bc-linkbtn:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.bc-fix-n { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.82rem; font-family: var(--font-mono); }
.bc-fix-warn .bc-fix-n { background: rgba(245,158,11,.14); color: #fbbf24; }
.bc-fix-bad .bc-fix-n { background: rgba(248,113,113,.14); color: #f87171; }
.bc-fix-title { display: block; font-weight: 600; font-size: 0.95rem; }
.bc-fix-sub { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.15rem; }
.bc-fix-go { color: var(--text-muted); font-size: 0.8rem; }
.bc-score-row { display: grid; grid-template-columns: 110px 1fr 64px; gap: 0.75rem; align-items: center; padding: 0.4rem 0; font-size: 0.88rem; }
.bc-score-pts { font-family: var(--font-mono); text-align: right; color: var(--text-secondary); }

@media (max-width: 1000px) and (min-width: 761px) {
    .bc-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bc-insp { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .bc-wide { width: auto; margin-left: 0; }
    .bc-v { grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.1rem; }
    .bc-v-who { grid-column: 1 / -1; }
    .bc-v-name { font-size: 1.25rem; }
    .bc-v-stat .bc-badge, .bc-ring { width: 52px; height: 52px; }
    .bc-insp { display: block; }
    .bc-nav { position: static; }
    .bc-panes { display: none; }
    .bc-nr.on { box-shadow: none; border-radius: 10px 10px 0 0; }
    .bc-pane.inline { display: block; min-height: 0; border-radius: 0 0 12px 12px; border: 0; background: var(--bg-elevated); padding: 1rem; margin-bottom: 0.4rem; }
    .bc-pane.inline .bc-pane-head, .bc-pane.inline .bc-pane-foot { display: none; }
    .bc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bc-score-row { grid-template-columns: 90px 1fr 56px; }
}
@media (max-width: 640px) { .bc-title { font-size: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .bc-c, .bc-nr, .bc-fix { transition: none; } .bc-c:hover { transform: none; } }

/* --- deck builder: a deck card in the audit opens the editor's own card menu --- */
.bc-c.bc-c-menu { cursor: pointer; }
.bc-c.bc-c-menu:active { transform: translateY(-1px) scale(.98); }

/* --- deck builder Stats view (deck_edit.html renderAuditStats) --- */
.dk-stats { padding: 0.5rem 0 3rem; }
.dk-audit-loading { display: flex; align-items: center; gap: 0.6rem; justify-content: center; padding: 4rem 1rem; color: var(--text-secondary); }
.dk-trim { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 0.85rem 1.1rem; border-radius: 14px;
    border: 1px solid rgba(168,85,247,.35); background: linear-gradient(135deg, rgba(168,85,247,.14), rgba(168,85,247,.03)); }
.dk-trim.done { border-color: rgba(34,197,94,.45); background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.03)); }
.dk-trim-quiet { padding: 0.5rem 1rem; }
.dk-trim-main { flex: 1 1 320px; min-width: 0; }
.dk-trim-title { font-weight: 700; }
.dk-trim-sub, .dk-trim-check { color: var(--text-secondary); font-size: 0.84rem; margin-top: 0.15rem; display: flex; align-items: center; gap: 0.4rem; }
.dk-trim-sub .bc-spinner, .dk-trim-check .bc-spinner { width: 12px; height: 12px; border-width: 2px; }
.dk-trim-bar { height: 6px; border-radius: 3px; background: var(--bg-deep); margin-top: 0.5rem; overflow: hidden; max-width: 520px; }
.dk-trim-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, var(--accent-primary)); border-radius: 3px; transition: width .25s; }
.dk-trim.done .dk-trim-bar i { background: var(--accent-success); }
.dk-trim-tray { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.dk-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; padding: 0.25rem 0.3rem 0.25rem 0.6rem; border-radius: 999px;
    background: var(--bg-elevated); border: 1px solid var(--border-medium); color: var(--text-primary); }
.dk-chip em { font-style: normal; color: var(--text-muted); font-size: 0.68rem; }
.dk-chip button { font: inherit; font-size: 0.7rem; color: var(--text-accent); background: none; border: 0; padding: 0.05rem 0.4rem; border-radius: 999px; cursor: pointer; }
.dk-chip button:hover { background: var(--accent-primary-dim); }
/* The classic stats grid, inside its "Deck breakdown" pane. */
.dk-audit #bc-pane-breakdown .stats-view { margin-top: 0.5rem; }
/* trimMode: over-range is "heavy", in blue (where to cut, not a problem). */
.bc-nr-dot.heavy { background: #60a5fa; }
.bc-nr-bar.heavy u, .bc-scale-mark.heavy { background: #60a5fa; }
.bc-pill-heavy { color: #93c5fd; }
.bc-fix-heavy .bc-fix-n { background: rgba(96,165,250,.14); color: #93c5fd; font-size: 0.75rem; width: auto; padding: 0 0.45rem; }
