/* equation_balancer.css — coefficient steppers + atom tally (see equation_balancer.js). */
.eqb-eq { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.3rem 0.5rem;
  padding: 0.8rem 0.6rem; border-radius: 0.7rem; border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.25)); transition: border-color 0.15s, box-shadow 0.15s; }
.eqb-eq.is-balanced { border-color: #34d399; box-shadow: 0 0 0 2px color-mix(in srgb, #34d399 22%, transparent); }
.eqb-term { display: inline-flex; align-items: center; gap: 0.25rem; }
.eqb-step { display: inline-flex; flex-direction: column; align-items: center; }
.eqb-pm { border: none; background: none; color: #64748b; cursor: pointer; font-size: 0.7rem; line-height: 0.9; padding: 0 0.2rem; transition: color 0.12s; }
.eqb-pm:hover { color: #e2e8f0; }
.eqb-coef { min-width: 1.2rem; text-align: center; font-size: 1.3rem; font-weight: 800; color: #64748b; font-variant-numeric: tabular-nums; }
.eqb-coef.on { color: #fbbf24; }
.eqb-formula { font-size: 1.35rem; font-weight: 700; color: #f1f5f9; }
.eqb-op { color: #94a3b8; font-size: 1.2rem; font-weight: 700; }
.eqb-arrow { color: #cbd5e1; font-size: 1.4rem; padding: 0 0.15rem; }
.eqb-tally { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; }
.eqb-trow { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4rem; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.7rem; border-radius: 0.45rem; font-variant-numeric: tabular-nums; }
.eqb-trow span:not(.eqb-el):not(.eqb-mark) { text-align: center; color: #cbd5e1; }
.eqb-thead { color: #94a3b8; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding-bottom: 0; }
.eqb-thead span { text-align: center; }
.eqb-el { font-weight: 800; color: #e8eef6; }
.eqb-trow.ok { background: rgba(52, 211, 153, 0.12); }
.eqb-trow.bad { background: rgba(251, 113, 133, 0.1); }
/* colour the left/right counts by match, so an imbalance is obvious at a glance */
.eqb-trow.ok span:not(.eqb-el):not(.eqb-mark) { color: #6ee7b7; }
.eqb-trow.bad span:not(.eqb-el):not(.eqb-mark) { color: #fb7185; }
.eqb-mark { font-weight: 800; }
.eqb-trow.ok .eqb-mark { color: #34d399; }
.eqb-trow.bad .eqb-mark { color: #fb7185; }
