/* "Your stats" on the Reports page. Uses only shared tokens; scoped to
   .stats-panel so nothing leaks. One series, one hue (--blue), so the chart
   needs no legend: the heading names it. */
.stats-panel { margin: 0 0 28px; }
.stats-panel > h2 { margin: 0 0 10px; }
.stats-wait { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.stats-wait .icon-badge { width: 54px; height: 54px; display: grid; place-items: center; border: 3px solid var(--edge); border-radius: 10px; background: var(--yellow); color: var(--edge); box-shadow: 3px 3px 0 var(--edge); }
.stats-wait .icon-badge .icon { width: 28px; height: 28px; }
.stats-wait h3 { margin: 0 0 4px; color: var(--surface-ink); }
.stats-wait p { margin: 0; color: var(--text-soft); }
.stats-note { margin: 0 0 12px; padding: 9px 13px; border: 2px solid var(--edge); border-radius: 7px; background: var(--panel-2); color: var(--surface-ink); font-weight: 700; font-size: .9rem; }

.stats-top { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.stats-score { display: flex; flex-direction: column; gap: 10px; }
.stats-score .big { display: flex; align-items: baseline; gap: 6px; color: var(--surface-ink); }
.stats-score .big strong { font: 900 3.4rem/1 "Arial Black", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.stats-score .big span { color: var(--text-soft); font-weight: 800; }
.stats-tier { align-self: flex-start; padding: 4px 10px; border: 2px solid var(--edge); border-radius: 4px; background: var(--yellow); color: var(--edge); font-weight: 900; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.stats-parts { display: grid; gap: 7px; margin-top: 4px; }
.stats-part { display: grid; grid-template-columns: 96px minmax(0, 1fr) 42px; gap: 8px; align-items: center; font-size: .86rem; color: var(--surface-ink); }
.stats-part b { text-align: right; font-variant-numeric: tabular-nums; }
.stats-meter { height: 10px; border-radius: 4px; background: var(--panel-2); border: 2px solid var(--edge); overflow: hidden; }
.stats-meter i { display: block; height: 100%; background: var(--blue); }
.stats-updated { color: var(--text-soft); font-size: .8rem; }

.stats-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
.stats-tile { padding: 12px 14px; border: 3px solid var(--edge); border-radius: 10px; background: var(--bg-raised); box-shadow: 3px 3px 0 var(--edge); color: var(--surface-ink); }
.stats-tile strong { display: block; font: 900 1.6rem/1.1 "Arial Black", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.stats-tile span { color: var(--text-soft); font-size: .84rem; font-weight: 700; }
.stats-tile small { display: block; margin-top: 2px; color: var(--text-soft); font-size: .76rem; }

.stats-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.stats-grid h3 { margin: 0 0 4px; color: var(--surface-ink); }
.stats-grid .hint { display: block; margin-bottom: 10px; }

/* Weekly bars: thin, 4px rounded tops anchored to the baseline, 2px gaps. */
.stats-chart { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; align-items: end; height: 150px; padding-top: 22px; border-bottom: 2px solid var(--text-soft); }
.stats-bar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.stats-bar i { display: block; width: min(28px, 70%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--blue); }
.stats-bar.empty i { background: var(--panel-2); }
.stats-bar:hover i, .stats-bar:focus-visible i { outline: 2px solid var(--edge); outline-offset: 1px; }
.stats-bar:focus-visible { outline: none; }
.stats-bar .tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 2; padding: 5px 8px; border: 2px solid var(--edge); border-radius: 6px; background: var(--bg-raised); color: var(--surface-ink); font-size: .76rem; font-weight: 700; white-space: nowrap; box-shadow: 2px 2px 0 var(--edge); pointer-events: none; opacity: 0; transition: opacity .12s; }
.stats-bar:hover .tip, .stats-bar:focus-visible .tip { opacity: 1; }
.stats-axis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; margin-top: 5px; color: var(--text-soft); font-size: .72rem; text-align: center; font-variant-numeric: tabular-nums; }
.stats-peak { position: absolute; top: 0; left: 0; color: var(--text-soft); font-size: .72rem; }

.stats-sets { display: grid; gap: 6px; margin-bottom: 14px; }
.stats-set { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 2px solid var(--edge); border-radius: 7px; background: var(--bg-raised); color: var(--surface-ink); }
.stats-set span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.stats-set small { display: block; color: var(--text-soft); font-weight: 600; }
.stats-set b { font-variant-numeric: tabular-nums; }
.stats-empty-line { color: var(--text-soft); font-size: .88rem; margin: 0 0 14px; }

@media (max-width: 820px) {
  .stats-top, .stats-grid { grid-template-columns: 1fr; }
  .stats-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .stats-bar .tip { transition: none; } }
