.stats-intro { max-width: 760px; }
.stats-info { margin: 2.5rem 0 4rem; }
.stats-info h2 { margin: .3rem 0 1rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.stats-info p { max-width: 900px; }
.stats-intro h1 { font-size: clamp(3rem, 7vw, 6rem); }
.stats-back { color: var(--gold, #d9b575); text-decoration: underline; text-underline-offset: .3em; }
.stats-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.5rem; }
.stats-heading h2 { margin: .35rem 0 0; font-size: clamp(2rem, 4vw, 3rem); }
.stats-heading > p { margin: 0; color: var(--muted, #b8c1b6); font-size: .85rem; text-align: right; }
.stats-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid rgba(219, 191, 137, .24); }
.stats-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.stats-table caption.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.stats-table td, .stats-table th { padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(219, 191, 137, .13); text-align: right; white-space: nowrap; }
.stats-table th:first-child { text-align: left; }
.stats-table thead th { color: var(--gold, #d9b575); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; background: rgba(219, 191, 137, .055); }
.stats-table tbody tr:last-child > * { border-bottom: 0; }
.stats-table tbody th { font-weight: 500; }
.stats-table a { color: var(--cream, #f0ecde); text-decoration: underline; text-underline-offset: .3em; }
.stats-table a[aria-current] { color: var(--gold, #d9b575); }
.stats-table a:focus-visible, .stats-back:focus-visible { outline: 2px solid var(--gold, #d9b575); outline-offset: 5px; }
.stats-you { font-size: .7rem; color: var(--muted, #b8c1b6); text-transform: uppercase; margin-left: .6rem; }
.stats-empty { padding: 2rem; border: 1px dashed rgba(219, 191, 137, .3); background: rgba(219, 191, 137, .025); }
.stats-empty h2, .stats-empty h3 { margin-top: 0; font-size: 1.75rem; }
.stats-empty p { max-width: 700px; margin-bottom: 0; }
.stats-profile, #speler.stats-empty { margin-top: 4rem; scroll-margin-top: 130px; }
.stats-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stats-metric { padding: 1.6rem 1.8rem; background: rgba(219, 191, 137, .055); border: 1px solid rgba(219, 191, 137, .24); }
.stats-metric h3 { margin: 0; color: var(--muted, #b8c1b6); font-family: inherit; font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; }
.stats-metric p { margin: .6rem 0 0; color: var(--gold, #d9b575); font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats-explanation { color: var(--muted, #b8c1b6); font-size: .85rem; max-width: 950px; margin: 1.25rem 0 0; }
.stats-details-heading { margin-top: 3.5rem; }
.stats-search { margin: 1.5rem 0; }
.stats-search label { display: block; margin-bottom: .6rem; font-size: .9rem; }
.stats-search input { width: 100%; padding: .9rem 1rem; border: 1px solid rgba(219, 191, 137, .4); background: #14241b; color: #f0ecde; font: inherit; }
.stats-search input:focus { outline: 2px solid #d9b575; outline-offset: 3px; }
.stats-search-status, #stats-search-status { font-size: .8rem; color: #b8c1b6; min-height: 1.5em; margin: .5rem 0; }
.stats-group { margin: .75rem 0; border: 1px solid rgba(219, 191, 137, .24); }
.stats-group > summary { cursor: pointer; padding: 1.25rem; color: #f0ecde; font-size: 1.05rem; }
.stats-group > summary > span { float: right; color: #b8c1b6; font-size: .8rem; padding-top: .2rem; }
.stats-group > summary:focus-visible { outline: 2px solid #d9b575; outline-offset: 3px; }
.stats-group .stats-table-wrap { border-width: 1px 0 0; }
.stats-group .stats-table th:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 175px; }
.stats-group .stats-table small { display: block; color: #9bab9c; font-size: .72rem; font-weight: 400; margin-top: .3rem; }
.stats-details [hidden] { display: none !important; }
.stats-search[hidden] { display: none; }
@media (max-width: 600px) {
  .stats-heading { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .stats-heading > p { text-align: left; }
  .stats-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .stats-metric { padding: 1.1rem; }
  .stats-table td, .stats-table th { padding: .85rem .8rem; }
  .stats-empty { padding: 1.4rem; }
}

.stats-periods { margin: 2.5rem 0 4rem; }
.stats-periods > h2 { font-size: clamp(2rem, 4vw, 3rem); }
.stats-period { margin: 2.5rem 0; scroll-margin-top: 120px; }
.stats-period[hidden] { display: none !important; }
.stats-period-tabs { display: flex; flex-wrap: wrap; gap: .4rem; width: fit-content; padding: .35rem; margin: 1.8rem 0 0; border: 1px solid rgba(219,191,137,.3); border-radius: .45rem; background: rgba(219,191,137,.025); }
.stats-period-tabs a { padding: .8rem 1.4rem; border: 1px solid transparent; border-radius: .25rem; color: #c6d0c4; text-decoration: none; font-weight: 700; }
.stats-period-tabs a:hover { color: #f0ecde; background: rgba(219,191,137,.08); }
.stats-period-tabs a[aria-selected="true"] { color: #14241b; background: #d9b575; border-color: #d9b575; }
.stats-period-tabs a:focus-visible,.stats-period-help summary:focus-visible,.stats-period[role="tabpanel"]:focus-visible { outline: 2px solid #d9b575; outline-offset: 4px; }
.stats-period-help { max-width: 950px; padding: 1rem 0; border-block: 1px solid rgba(219,191,137,.2); }
.stats-period-help summary { color: #e4c590; cursor: pointer; }
.stats-period-help p { color: #b8c1b6; font-size: .9rem; line-height: 1.8; }
.stats-period h3 { margin: 0; font-size: 1.8rem; }
.period-total { color: #b8c1b6; }
.period-total strong { color: #e4c590; }
.period-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.period-card { padding: 1.3rem; border: 1px solid rgba(219,191,137,.24); background: rgba(219,191,137,.04); min-width: 0; }
.period-card h4 { margin: 0 0 1rem; color: #e4c590; font-family: inherit; }
.period-card ol { padding-left: 1.5rem; margin: 0; }
.period-card li { padding: .4rem 0; }
.period-card li::marker { color: #a5b5a6; }
.period-card li a { color: #f0ecde; overflow-wrap: anywhere; }
.period-card li strong { display: block; color: #d9b575; font-weight: 500; font-size: .85rem; }
.period-pending { font-size: .85rem; color: #b8c1b6; }
@media(max-width: 600px) { .period-grid { grid-template-columns: 1fr; } }
