/* food.css
   Styles for the Hamilton Counted Food dashboard (FoodDashboard.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 (FoodDashboard.razor.css): the charts,
   tables and notes are injected into the DOM by JavaScript at runtime, and scoped-CSS attributes
   would not reach them. */

  :root{
    --green:#386858; --green-d:#2b4f43; --orange:#c9772f; --dorange:#8a4f1e;
    --grey:#a9b7b1; --grey-d:#6f7f78; --tint:#fbeee1; --teal:#2f6f7a;
    --ink:#233029; --line:#d9e0dc; --bg:#f4f6f5; --card:#ffffff;
  }
  *{box-sizing:border-box}
  body{
    margin:0; background:var(--bg); color:var(--ink);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    line-height:1.5;
  }
  /* Top ribbon, matching the Crime page: title + logo bar, then a darker full-width row of view tabs.
     Both stay fixed at the top while scrolling. */
  .topbar{position:sticky; top:0; z-index:100; box-shadow:0 2px 6px rgba(0,0,0,.12)}
  header{background:var(--green); color:#fff; padding:10px 28px; line-height:1.45;
    display:flex; align-items:center; justify-content:space-between; gap:16px}
  header .wordmark{display:block; height:20px; width:auto; margin:0}
  @media (max-width:420px){ header{padding:10px 16px} header .wordmark{height:15px} }
  header h1{margin:0; font-size:26px; font-weight:700; letter-spacing:-.01em}
  .viewTabs{display:flex; flex-wrap:wrap; gap:4px; background:var(--green-d); padding:0 28px; line-height:1.45}
  .viewTabs 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}
  .viewTabs button:hover{color:#fff}
  .viewTabs button.active{color:#fff; border-bottom-color:#fff; background:rgba(255,255,255,.08)}
  .viewTabs button:focus-visible{outline:3px solid var(--orange); outline-offset:-3px}
  /* narrow screens: one scrollable row of view tabs so the fixed bar stays short */
  @media (max-width:760px){ .viewTabs{flex-wrap:nowrap; overflow-x:auto; padding:0 8px; scrollbar-width:thin} .viewTabs button{white-space:nowrap; flex:0 0 auto} }
  .lead{margin:0 0 18px; font-size:14.5px; line-height:1.55; color:#4a564e; max-width:92ch}
  .resList{display:flex; flex-direction:column; gap:14px; margin:8px 0 4px}
  .resItem{
    border:1px solid var(--line); border-left:4px solid var(--green); border-radius:9px;
    padding:14px 16px; background:#f7faf8;
  }
  .resItem h4{margin:0 0 6px; font-size:16px; color:var(--green-d); font-weight:700; line-height:1.3}
  .resItem p{margin:0; font-size:14.5px; line-height:1.55; color:#3a4a42}
  .resContact{
    margin-top:11px; padding-top:10px; border-top:1px solid var(--line);
    display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; font-size:13.5px; color:#6f7f78;
  }
  .resContact a{font-size:16px; font-weight:700; color:var(--green-d); text-decoration:none; word-break:break-word}
  .resContact a.tel{white-space:nowrap}
  .resContact a:hover{text-decoration:underline}
  .resContact a:focus-visible{outline:3px solid var(--orange); outline-offset:2px}
  .resAddr{font-style:normal; font-size:14.5px; line-height:1.5; color:#3a4a42}
  .resSub{font-size:17.5px; color:var(--green-d); margin:24px 0 6px; font-weight:700}
  .wrap{max-width:1000px; margin:0 auto; padding:24px 20px 56px}
  .card{background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px 22px; margin-bottom:20px}
  .controls{display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:6px}
  .headline{display:flex; align-items:flex-start; justify-content:space-between; gap:20px; flex-wrap:wrap}
  .brand{background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 12px; flex:0 0 auto}
  .brand img{display:block; width:176px; height:auto}
  @media (max-width:640px){ .brand img{width:140px} }
  .seg{display:inline-flex; flex-wrap:wrap; border:1px solid var(--green); border-radius:8px; overflow:hidden}
  .seg button{
    appearance:none; border:0; background:#fff; color:var(--green);
    font-size:14px; font-weight:600; padding:9px 16px; cursor:pointer;
  }
  .seg button+button{border-left:1px solid var(--green)}
  .seg button.active{background:var(--green); color:#fff}
  .seg button:focus-visible{outline:3px solid var(--orange); outline-offset:2px}
  .legend{display:flex; gap:18px; flex-wrap:wrap; align-items:center; margin:14px 0 4px; font-size:13px}
  .legend .item{display:inline-flex; align-items:center; gap:7px; color:#3a4a42}
  .lswatch{width:22px; height:0; border-top-width:3px; border-top-style:solid; display:inline-block}
  .dot{width:9px;height:9px;border-radius:50%;display:inline-block}
  .chartbox{position:relative}
  svg{display:block; width:100%; height:auto}
  .axis-title{font-size:15px; fill:#5a675f; font-weight:700}
  .tick text{font-size:13px; fill:#6a766e; font-weight:700}
  .tick line{stroke:var(--line)}
  .yr{font-size:14px; fill:#4a564e; font-weight:700}
  .mo{font-size:11px; fill:#7a857e; font-weight:700}
  .axisline{stroke:var(--ink); stroke-width:2}
  .hit{fill:transparent; cursor:pointer}
  .hit.hl{fill:#000; opacity:.035}
  .tooltip{
    position:absolute; pointer-events:none; z-index:5; background:#fff;
    border:1px solid var(--green); border-radius:8px; padding:9px 11px;
    font-size:12px; color:var(--ink); box-shadow:0 6px 18px rgba(0,0,0,.12);
    min-width:168px; opacity:0; transition:opacity .1s;
  }
  .tooltip h4{margin:0 0 6px; font-size:13px; color:var(--green-d)}
  .tooltip .row{display:flex; justify-content:space-between; gap:14px}
  .tooltip .row span:first-child{color:#5a675f}
  .tooltip .row b{font-variant-numeric:tabular-nums}
  /* wide data table scrolls within its own box on small screens instead of widening the page */
  .tblScroll{overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%}
  table{border-collapse:collapse; width:100%; font-size:13px; font-variant-numeric:tabular-nums}
  caption{text-align:left; font-size:12px; color:#5a675f; padding:0 0 8px}
  th,td{padding:7px 10px; text-align:right; border-bottom:1px solid var(--line)}
  th:first-child,td:first-child{text-align:left}
  thead th{background:#eef3f0; color:var(--green-d); font-weight:700; border-bottom:2px solid var(--green)}
  tbody tr.latest{background:var(--tint)}
  h2.sec{font-size:16px; color:var(--green-d); margin:2px 0 10px}
  .notes{font-size:13px; color:#3a4a42}
  .notes ul{margin:6px 0 0; padding-left:18px}
  .notes li{margin:5px 0}
  .foot{font-size:12px; color:#7a857e; margin-top:8px}
  code{background:#eef3f0; padding:1px 5px; border-radius:4px; font-size:12px}
  @media (max-width:560px){
    header h1{font-size:21px}
    .wrap{padding:16px 12px 48px}
    .card{padding:16px 14px}
    th,td{padding:6px 6px; font-size:12px}
  }
