/* ---- BMI (scoped) ------------------------------------------------------- */
.bc-tool-bmi{
    --bc-surface:#fff; --bc-border:#e5ecf5; --bc-muted:#6b7280;
    --bc-primary:#0a66c2; --bc-radius:14px; --bc-shadow:0 6px 20px rgba(2,6,23,.05);
    --bc-gap:22px; font-size:16px;
  }
  
  .bc-bmi-h1{ text-align:center; font-weight:900; font-size:44px; margin:8px 0 22px; }
  
  .bc-bmi-grid{ display:grid; grid-template-columns:1fr; gap:var(--bc-gap); }
  @media (min-width:900px){ .bc-bmi-grid{ grid-template-columns:1.1fr 1fr; } }
  
  .bc-bmi-card{
    background:var(--bc-surface); border:1px solid var(--bc-border);
    border-radius:var(--bc-radius); box-shadow:var(--bc-shadow); padding:22px;
  }
  
  /* fields */
  .bc-field{ margin-bottom:18px; }
  .bc-field label{ font-weight:800; display:block; margin-bottom:6px; }
  .bc-subtle{ color:var(--bc-muted); font-size:13px; margin:6px 0 10px; }
  
  /* inputs */
  .bc-input{
    width:100%; border:1px solid var(--bc-border); border-radius:12px;
    padding:12px 14px; font-size:16px; outline:none; background:#fff;
  }
  .bc-input:focus{ border-color:var(--bc-primary); box-shadow:none; }
  .bc-input:focus-visible{ outline:2px solid rgba(10,102,194,.6); outline-offset:2px; }
  
  .bc-inline-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  
  /* pill toggles */
  .bc-toggle{ display:inline-flex; gap:10px; margin:6px 0 10px; }
  .bc-btn{
    border:1px solid var(--bc-border); background:#f8fafc; color:#0f172a;
    border-radius:12px; padding:10px 16px; font-weight:800; cursor:pointer; text-decoration:none;
  }
  .bc-btn[aria-pressed="true"], .bc-btn.is-active{ background:var(--bc-primary); color:#fff; border-color:var(--bc-primary); }
  .bc-btn:focus-visible{ outline:2px solid rgba(10,102,194,.6); outline-offset:2px; }
  
  /* actions */
  .bc-actions{ margin-top:18px; display:flex; align-items:center; gap:14px; }
  .bc-btn-primary{
    background:var(--bc-primary); color:#fff; border:none; border-radius:14px;
    padding:12px 18px; font-weight:900; cursor:pointer;
  }
  .bc-link-reset{ color:var(--bc-primary); text-decoration:none; font-weight:700; }
  
  /* result */
  .bc-result-panel h2{ margin-top:0; }
  .bc-bmi-big{ font-size:28px; font-weight:900; }
  
  /* table */
  .bc-bmi-table{
    width:100%; border-collapse:separate; border-spacing:0;
    margin:6px 0 14px; font-size:14.5px; border:1px solid var(--bc-border);
    border-radius:10px; overflow:hidden;
  }
  .bc-bmi-table thead th{
    text-align:left; background:#f8fafc; border-bottom:1px solid var(--bc-border);
    padding:10px 12px; font-weight:800;
  }
  .bc-bmi-table tbody td{ padding:10px 12px; border-bottom:1px solid var(--bc-border); }
  .bc-bmi-table tbody tr:last-child td{ border-bottom:none; }
  .bc-bmi-table tbody tr.is-row{ background:#eef6ff; } /* highlight current row */
  
  /* meter */
  .bc-meter{ margin-top:10px; border:2px solid #ffffff; border-radius:6px; position:relative; padding:14px 14px 26px; }
  .bc-meter__bar{ display:grid; grid-template-columns:185fr 45fr 45fr 999fr; height:18px; border-radius:4px; overflow:hidden; }
  .bc-meter__seg{ height:100%; }
  .bc-meter__seg--u{ background:#5b2c83; }                                        /* Underweight */
  .bc-meter__seg--h{ background:#2cb9a7; }                                        /* Healthy */
  .bc-meter__seg--o{ background:#f4b125; }                                        /* Overweight */
  .bc-meter__seg--ob{ background:repeating-linear-gradient(45deg,#ee4b4b,#ee4b4b 8px,#ff8a8a 8px,#ff8a8a 16px); } /* Obese */
  .bc-meter__marker{ position:absolute; top:5px; transform:translateX(-50%); font-weight:900; font-size:18px; color:#0f172a; }
  .bc-meter__scale{ display:flex; justify-content:space-between; font-size:12px; color:#0f172a; margin-top:6px; }
  
  /* legend */
  .bc-legend{ display:grid; grid-template-columns:1fr 1fr; gap:10px; font-size:15px; margin-top:12px; }
  .bc-legend__item{ display:flex; align-items:center; gap:8px; }
  .bc-dot{ width:14px; height:14px; border-radius:3px; display:inline-block; }
  .bc-dot.u{ background:#5b2c83;}
  .bc-dot.h{ background:#2cb9a7;}
  .bc-dot.o{ background:#f4b125;}
  .bc-dot.ob{ background:#ee4b4b; }
  
  /* explanation */
  .bc-explain p{ line-height:1.7; font-size:18px; }
  
  /* notices */
  .bc-notice{ margin-top:10px; padding:10px 12px; border-radius:10px; }
  .bc-notice.error{ background:#fee2e2; border:1px solid #fecaca; color:#7f1d1d; }
  
  .bc-mt-12{ margin-top:12px; }
  