.site-stats { margin-top: 24px; min-width: 0; }
.site-stats [hidden] { display: none !important; }
.stats-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.stats-heading h2 { font-size: 24px; }
.stats-heading label { display: grid; gap: 6px; min-width: 180px; }
.stats-heading p { margin-top: 8px; font-size: 13px; }
#statsStatus { margin: 16px 0; }
.stats-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 24px 0; border-block: 1px solid var(--line); }
.stats-totals > div { padding: 18px 12px; min-width: 0; }
.stats-totals dt { color: var(--muted); font-size: 14px; }
.stats-totals dd { margin: 8px 0 0; font-size: 30px; font-weight: 700; color: var(--cyan); overflow-wrap: anywhere; }
.stats-totals > div:nth-child(2) dd { color: var(--amber); }
.stats-totals > div:nth-child(3) dd { color: var(--green); }
.stats-period-counts { font-size: 13px; color: var(--muted); line-height: 1.6; }
.stats-chart { padding: 16px 0; }
.stats-chart canvas { display: block; width: 100%; height: 250px; }
.stats-legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; }
.stats-legend span:first-child { color: var(--cyan); }
.stats-legend span:last-child { color: var(--amber); }
.stats-tables { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; margin: 24px 0; }
.stats-tables section { min-width: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.site-stats h3 { margin: 0 0 16px; font-size: 18px; }
.site-stats table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
.site-stats th,.site-stats td { padding: 10px 8px; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); text-align: left; }
.site-stats th:last-child,.site-stats td:last-child { text-align: right; width: 100px; }
.stats-day-table { max-height: 320px; overflow: auto; }
.stats-day-table th:last-child,.stats-day-table td:last-child { width: 60px; }
.stats-note { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 12px 0; }
.site-stats a { color: var(--cyan); }
.quick-nav a[aria-current="page"] { border-color: var(--green); color: var(--green); }
@media(max-width:640px) {
  .stats-heading { align-items: stretch; flex-direction: column; }
  .stats-tables { grid-template-columns: minmax(0,1fr); }
  .stats-totals { grid-template-columns: minmax(0,1fr); }
  .stats-totals > div { padding: 12px 0; }
}
