/* Research Metrics Calculator (scoped) */
#research-metrics-calculator {
  --bg: #0b0c10;
  --panel:#12141a;
  --ink:#e8eef4;
  --muted:#9fb0c3;
  --accent:#66d9ef;
  --good:#3ddc97;
  --warn:#ffd166;
  --bad:#ef476f;
  --ring: 0 0 0 2px rgba(102,217,239,.35);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}
#research-metrics-calculator[data-theme="light"],
#research-metrics-calculator[data-theme="auto"]@media (prefers-color-scheme: light) {}
@media (prefers-color-scheme: light) {
  #research-metrics-calculator[data-theme="auto"] {
    --bg:#f7fbff; --panel:#ffffff; --ink:#0d1b2a; --muted:#4b5b6b; --accent:#0077ff; --good:#15803d; --warn:#b45309; --bad:#b91c1c;
  }
}
#research-metrics-calculator[data-theme="light"] {
  --bg:#f7fbff; --panel:#ffffff; --ink:#0d1b2a; --muted:#4b5b6b; --accent:#0077ff; --good:#15803d; --warn:#b45309; --bad:#b91c1c;
}
#research-metrics-calculator[data-theme="dark"] {
  --bg: #0b0c10; --panel:#12141a; --ink:#e8eef4; --muted:#9fb0c3; --accent:#66d9ef; --good:#3ddc97; --warn:#ffd166; --bad:#ef476f;
}
#research-metrics-calculator .rmc-header{
  padding:24px 16px; border-bottom:1px solid #1f2530;
}
#research-metrics-calculator .sub{ color:var(--muted); margin:0 }
#research-metrics-calculator .rmc-main{ max-width:1100px; margin:24px auto; padding:0 16px 80px; display:grid; grid-template-columns: 1fr 380px; gap:18px; }
@media (max-width: 1020px){ #research-metrics-calculator .rmc-main{ grid-template-columns:1fr; } }
#research-metrics-calculator section, #research-metrics-calculator aside{
  background:var(--panel); border:1px solid #1f2530; border-radius:12px; padding:16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
#research-metrics-calculator .row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
#research-metrics-calculator input[type="text"], #research-metrics-calculator input[type="number"]{
  width:100%; padding:10px 12px; background:#0e1218; color:var(--ink); border:1px solid #2a3342; border-radius:8px;
}
#research-metrics-calculator input:focus, #research-metrics-calculator select:focus{ outline:none; box-shadow: var(--ring); border-color: var(--accent); }
#research-metrics-calculator button{
  border:1px solid #233044; background:#0f1722; color:var(--ink); padding:10px 14px; border-radius:9px; cursor:pointer; font-weight:600;
}
#research-metrics-calculator button.primary{ background: linear-gradient(180deg, #1b2b3e, #0f1722); border-color:#27425e; }
#research-metrics-calculator button:hover{ transform: translateY(-1px); }
#research-metrics-calculator .grid{ width:100%; overflow:auto; border-radius:10px; border:1px solid #233044; }
#research-metrics-calculator table{ border-collapse: collapse; width:100%; min-width:720px; }
#research-metrics-calculator th, #research-metrics-calculator td{ border-bottom:1px solid #1e2633; padding:8px 10px; text-align:left; }
#research-metrics-calculator thead th{ position:sticky; top:0; background:#0f1622; z-index:1; }
#research-metrics-calculator .muted{ color:var(--muted); }
#research-metrics-calculator .card{ border:1px solid #223147; background:linear-gradient(180deg, #111826, #0e1420); border-radius:12px; padding:12px; }
#research-metrics-calculator .metrics{ display:grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap:10px; }
#research-metrics-calculator .big{ font-size:28px; font-weight:800; letter-spacing:.3px; }
#research-metrics-calculator .bar{ height:160px; display:flex; align-items:flex-end; gap:4px; }
#research-metrics-calculator .bar div{ flex:1; background:#30455f; border-radius:4px 4px 0 0; }
#research-metrics-calculator .hint{ font-size:12px; color:var(--muted); }
#research-metrics-calculator .pill{ display:inline-flex; gap:8px; align-items:center; border:1px dashed #2b3b52; padding:8px 10px; border-radius:10px; margin:6px 0;}
#research-metrics-calculator code.inline{ background:#0e141e; border:1px solid #203146; padding:2px 6px; border-radius:6px; }
#research-metrics-calculator details{ border:1px solid #233044; border-radius:10px; padding:10px 12px; }
#research-metrics-calculator details summary{ cursor:pointer; font-weight:700; }
#research-metrics-calculator .right-sticky{ position:sticky; top:88px; height:fit-content; }
#research-metrics-calculator .footer-note{ margin-top:10px; font-size:12px; color:var(--muted); }
#research-metrics-calculator .good{ color:var(--good) } 
#research-metrics-calculator .warn{ color:var(--warn) } 
#research-metrics-calculator .bad{ color:var(--bad) }
#research-metrics-calculator .help{ color:var(--accent); text-decoration:underline dotted; cursor:help; }
