/* homeless-health.css
   Styles for the Hamilton Counted Homeless Health dashboard (HomelessHealthDashboard.razor).
   Reference this ONCE from the host page (wwwroot/index.html, App.razor or _Host.cshtml) as a
   GLOBAL stylesheet. Do not convert it to Blazor scoped CSS (HomelessHealthDashboard.razor.css): the
   charts, tooltips and notes are injected into the DOM by JavaScript at runtime, and scoped-CSS
   attributes would not reach them. */

  :root{
    --ink:#14211d; --muted:#5f6f69; --line:#e3e9e7; --bg:#f5f8f7;
    --brand:#386858; --brand-d:#2b5144; --brand-l:#4f8770; --brandwash:#eef4f1;
    --c0:#386858; --c1:#c9772f; --c2:#3b6ea5; --c3:#a8556f; --dist:#9aa7a2;
  }
  *{box-sizing:border-box}
  body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg);line-height:1.45}
  /* Top ribbon, matching the Crime page: title + logo bar, then a darker full-width row of tabs.
     Both stay fixed at the top while scrolling. */
  .topbar{position:sticky; top:0; z-index:100; box-shadow:0 2px 6px rgba(20,33,29,.18)}
  header{background:var(--brand);color:#fff;padding:10px 28px;line-height:1.45;
    display:flex;align-items:center;justify-content:space-between;gap:16px}
  header h1{margin:0;font-size:26px;font-weight:700}
  @media (max-width:560px){ header h1{font-size:22px} }
  header .wordmark{display:block; height:20px; width:auto; margin:0}
  @media (max-width:420px){ header{padding:10px 16px} header .wordmark{height:15px} }
  header p{margin:4px 0 0;font-size:13px;opacity:.9}
  .tabs{display:flex;gap:4px;background:var(--brand-d);padding:0 28px;flex-wrap:wrap;line-height:1.45}
  .tabs button{appearance:none;background:transparent;border:0;color:#dfeae6;padding:13px 18px;font-size:16px;font-weight:600;
    font-family:inherit;cursor:pointer;border-bottom:3px solid transparent}
  .tabs button:hover{color:#fff}
  .tabs button.active{color:#fff;border-bottom-color:#fff;background:rgba(255,255,255,.08)}
  .tabs button:focus-visible{outline:3px solid #c9772f; outline-offset:-3px}
  /* narrow screens: one scrollable row of tabs so the fixed bar stays short */
  @media (max-width:760px){ .tabs{flex-wrap:nowrap;overflow-x:auto;padding:0 8px;scrollbar-width:thin} .tabs button{white-space:nowrap;flex:0 0 auto} }
  .wrap{max-width:1080px;margin:0 auto;padding:22px 28px 60px}
  .card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px 20px;margin-bottom:20px}
  .step{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--brand);margin:0 0 10px}
  .charttitle{font-size:23px;font-weight:700;color:var(--brand-d);margin:2px 0 12px;line-height:1.25}
  .gradebtns{display:flex;gap:10px;flex-wrap:wrap}
  .gradebtns button{flex:1;min-width:150px;padding:12px;border:1.5px solid var(--line);background:#fff;border-radius:8px;
    font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;transition:.12s}
  .gradebtns button:hover{border-color:var(--brand-l)}
  .gradebtns button.active{background:var(--brand);border-color:var(--brand);color:#fff}
  .legend{font-size:12px;color:var(--muted);margin:0 0 10px}
  .swatch{display:inline-block;width:11px;height:11px;border-radius:2px;margin-right:5px;vertical-align:middle}
  .note{font-size:12.5px;color:var(--muted);margin-top:8px}
  .mbody h4{color:var(--brand-d);margin:0 0 6px;font-size:13.5px;text-transform:uppercase;letter-spacing:.04em}
  .mbody p{margin:4px 0;font-size:13.5px;color:#33403b}
  .mbody b{color:var(--brand-d)}
  .notes h3{font-size:15px;color:var(--brand-d);margin:0 0 8px;font-weight:700}
  .notes p{font-size:13px;color:#33403b;margin:0 0 10px;line-height:1.55}
  .notes ul{margin:0;padding-left:20px}
  .notes li{font-size:13px;color:#33403b;margin:7px 0;line-height:1.55}
  .notes li b{color:var(--brand-d)}
  .foot{font-size:11.5px;color:var(--muted);margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
  .tt{position:absolute;pointer-events:none;background:#20302a;color:#fff;font-size:12px;padding:6px 9px;border-radius:6px;
    opacity:0;transition:opacity .1s;white-space:nowrap;z-index:5}
  .chartwrap{position:relative}
  rect.bar{cursor:pointer}
  rect.bar:hover{filter:brightness(1.08)}
