.statistics-page { max-width: 1000px; }
.statistics-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.statistics-header h1 { font-size: 30px; letter-spacing: 0; }
.statistics-header > div { flex: 1; min-width: 0; }
.statistics-header .header-logo { width: 48px; height: 48px; border-radius: 8px; }
.back-link { color: var(--ink); text-decoration: none; font-size: 24px; display: grid; place-items: center; width: 40px; height: 44px; flex-shrink: 0; }
.range-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); gap: 4px; }
.range-tabs button { border: 0; border-bottom: 3px solid transparent; min-height: 44px; padding: 0 16px; background: transparent; color: var(--muted); font-weight: 650; }
.range-tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.range-tabs button:hover { background: rgba(23,60,50,.05); }
.custom-range { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-top: 20px; }
.custom-range label { display: grid; gap: 8px; font-size: 13px; flex: 1; min-width: 130px; }
.custom-range input, .chart-heading select { border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); padding: 10px; min-height: 44px; min-width: 0; max-width: 100%; }
.custom-range .primary { min-height: 44px; }
#statistics-status { margin-top: 20px; color: var(--muted); }
.range-caption { margin: 24px 0; color: var(--muted); font-size: 13px; }
.statistics-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; padding-bottom: 28px; }
.stat-value { display: block; font-size: 29px; font-family: Georgia, serif; overflow-wrap: anywhere; }
.stat-label, .stat-average { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.chart-section { padding: 28px 0; border-top: 1px solid var(--line); }
.chart-section h2 { font-size: 20px; letter-spacing: 0; }
.chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.trend-scroll { overflow-x: auto; padding-bottom: 8px; }
.trend-bars { display: flex; gap: 8px; height: 248px; min-width: 100%; align-items: stretch; }
.trend-column { flex: 1 0 46px; display: grid; grid-template-rows: 24px 190px 24px; gap: 4px; text-align: center; font-size: 11px; color: var(--muted); }
.trend-track { display: flex; align-items: end; justify-content: center; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 46px, rgba(23,60,50,.07) 47px, transparent 48px); }
.trend-bar { width: 65%; max-width: 48px; background: var(--ink); border-radius: 3px 3px 0 0; transition: height .2s ease; }
.horizontal-chart { display: grid; gap: 16px; margin-top: 24px; }
.horizontal-row { display: grid; grid-template-columns: minmax(60px, 120px) minmax(0, 1fr) 56px; gap: 12px; align-items: center; font-size: 13px; }
.horizontal-row > span:first-child { overflow-wrap: anywhere; }
.horizontal-track { background: rgba(23,60,50,.06); height: 14px; }
.horizontal-bar { height: 14px; background: var(--accent); border-radius: 0 3px 3px 0; }
.horizontal-row:nth-child(3n + 2) .horizontal-bar { background: #4d817e; }
.horizontal-row:nth-child(3n) .horizontal-bar { background: #9c7797; }
.horizontal-row > span:last-child { text-align: right; }
.statistics-empty { color: var(--muted); padding: 24px 0; font-size: 14px; }
@media (max-width: 640px) {
  .statistics-header { gap: 8px; }
  .statistics-header h1 { font-size: 25px; }
  .statistics-header .header-logo { width: 40px; height: 40px; }
  .range-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .range-tabs button { padding: 0 4px; }
  .statistics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .horizontal-row { grid-template-columns: 80px minmax(0, 1fr) 48px; gap: 8px; }
}
