/* /research/ hub and data studies. Built by scripts/build-research.mjs.
   Loaded after msbh-guides.css, whose hero, table, crisis and next-step styles these pages reuse. */

.msbh-rs-lead { background:#f6f8f4; border:1px solid #d5e2c8; border-left:5px solid #365C13; border-radius:12px; padding:18px 22px 6px; margin:0 0 22px; }
.msbh-rs-lead p:last-child { font-size:19px; line-height:1.6; color:#16232b; }

/* Key numbers */
.msbh-rs-keys { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin:14px 0 26px; padding:0; list-style:none; }
.msbh-rs-keys li { margin:0; background:#fff; border:1px solid #e4ebdd; border-top:4px solid #365C13; border-radius:10px; padding:14px 16px 12px; }
.msbh-rs-num { display:block; font-size:32px; line-height:1.1; font-weight:800; color:#16232b; margin-bottom:6px; }
.msbh-rs-what { display:block; font-size:16px; line-height:1.5; color:#2c3a31; }
.msbh-rs-src { display:block; font-size:13px; line-height:1.45; color:#5a6b5e; margin-top:8px; }

/* Bar chart (HTML/CSS; the table after it holds the same numbers) */
.msbh-rs-chart { margin:24px 0 8px; border:1px solid #e4ebdd; border-radius:12px; padding:18px 18px 10px; }
.msbh-rs-chart figcaption { font-weight:700; color:#16232b; margin:0 0 12px; }
.msbh-rs-legend { display:flex; flex-wrap:wrap; gap:6px 18px; margin:0 0 14px; padding:0; list-style:none; font-size:14px; color:#2c3a31; }
.msbh-rs-legend li { margin:0; display:flex; align-items:center; gap:6px; }
.msbh-rs-sw { display:inline-block; width:14px; height:14px; border-radius:3px; }
.msbh-rs-group { display:grid; grid-template-columns:minmax(120px,190px) 1fr; gap:4px 12px; align-items:center; padding:8px 0; border-top:1px solid #eef3e9; }
.msbh-rs-group:first-of-type { border-top:0; }
.msbh-rs-name { font-weight:700; font-size:15px; line-height:1.3; color:#16232b; }
.msbh-rs-bars { display:flex; flex-direction:column; gap:3px; min-width:0; }
.msbh-rs-row { display:flex; align-items:center; gap:8px; min-width:0; }
.msbh-rs-bar { display:block; height:14px; border-radius:0 3px 3px 0; min-width:2px; }
.msbh-rs-val { font-size:13px; line-height:1; color:#2c3a31; white-space:nowrap; font-variant-numeric:tabular-nums; }
.msbh-rs-c1 { background:#c9d8bb; }
.msbh-rs-c2 { background:#8fb35d; }
.msbh-rs-c3 { background:#365C13; }
.msbh-rs-c4 { background:#16232b; }
.msbh-rs-note { font-size:14px; color:#5a6b5e; margin:4px 0 0; }
@media (max-width:640px) {
  .msbh-rs-group { grid-template-columns:1fr; }
  .msbh-rs-num { font-size:28px; }
}

/* Tables: numbers right-aligned */
.msbh-rs-table td { text-align:right !important; white-space:nowrap; font-variant-numeric:tabular-nums; }
.msbh-rs-table thead th:not(:first-child) { text-align:right; }
.msbh-rs-table tbody tr.msbh-rs-hl th, .msbh-rs-table tbody tr.msbh-rs-hl td { background:#eef4e6; font-weight:700; }
.msbh-rs-caption { font-size:14px; color:#5a6b5e; margin:-18px 0 24px; line-height:1.55; }

/* Cite box + hub cards */
.msbh-rs-cite { background:#f6f8f4; border:1px solid #e4ebdd; border-radius:12px; padding:16px 22px 8px; margin:24px 0; }
.msbh-rs-cite code { display:block; white-space:normal; font-family:inherit; font-size:16px; background:#fff; border:1px solid #e4ebdd; border-radius:8px; padding:10px 12px; margin:0 0 12px; color:#16232b; }
.msbh-rs-card { display:flex; flex-direction:column; gap:8px; height:100%; box-sizing:border-box; background:#f6f8f4; border:1px solid #e4ebdd; border-radius:12px; padding:18px 20px; }
.msbh-rs-card .msbh-fg-chip { align-self:flex-start; }
.msbh-rs-card .msbh-rs-num { font-size:28px; }
.msbh-rs-meta { font-size:14px; color:#5a6b5e; }
.msbh-rs-cite .msbh-rich__h2 { margin-top:4px; }
.msbh-rs-table thead th { white-space:nowrap; }
/* Six key numbers: three per row instead of five plus one */
.msbh-rs-keys:has(> li:nth-child(6):last-child) { grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); }
