/* Scoped to Stats: no changes to the Practice navigation or typing window. */
.typing-dashboard {--stats-ink:#22394d;--stats-muted:#617585;--stats-blue:#477899;--stats-border:#dde6ec;--stats-surface:#fff;color:var(--stats-ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.6;display:grid;gap:22px;min-width:0;font-variant-numeric:tabular-nums}
.typing-dashboard *, .typing-dashboard *::before,.typing-dashboard *::after {box-sizing:border-box}
.typing-dashboard h1,.typing-dashboard h2,.typing-dashboard h3 {font-family:Manrope,Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:-.025em;color:var(--stats-ink);line-height:1.25}
.typing-dashboard h2 {font-size:18px;font-weight:700;margin:0}
.typing-dashboard p {margin:6px 0 0;color:var(--stats-muted)}
.stats-hero {position:relative;isolation:isolate;overflow:hidden;padding:30px 32px;background:#ecf2f6;border:1px solid #d7e3ec;display:flex;align-items:center;justify-content:space-between;gap:24px}
.stats-hero::after {content:"";position:absolute;inset:0 0 0 56%;z-index:-1;opacity:.35;background-image:linear-gradient(45deg,transparent 48%,#b7cbdc 49%,#b7cbdc 50%,transparent 51%),linear-gradient(-45deg,transparent 48%,#b7cbdc 49%,#b7cbdc 50%,transparent 51%);background-size:46px 46px;mask-image:linear-gradient(to right,transparent,#000)}
.stats-eyebrow {font-size:13px;letter-spacing:.1em;text-transform:uppercase;font-weight:750;color:#50728b;display:block;margin-bottom:8px}
.stats-hero h1 {font-size:32px;letter-spacing:-.04em;margin:0;font-weight:800}
.stats-hero p {font-size:14px;margin-top:10px}
.stats-hero-streak {flex-shrink:0;display:flex;align-items:center;gap:12px;padding:14px 22px;border:1px solid #c8d9e6;background:#ffffffb8}
.stats-hero-streak>span {color:#527d9e;font-size:30px}
.stats-hero-streak strong {font-size:29px;line-height:1.15}.stats-hero-streak small {display:block;font-size:13px;color:var(--stats-muted);font-weight:500;margin-top:5px}
.stats-panel,.stats-metric {background:var(--stats-surface);border:1px solid var(--stats-border);box-shadow:0 2px 6px #243e5405;min-width:0}
.stats-panel {padding:23px}
.stats-toolbar,.stats-section-head {display:flex;align-items:center;justify-content:space-between;gap:16px}
.stats-toolbar>div>span {display:block;font-size:13px;color:var(--stats-muted);margin-top:3px}
.stats-toolbar strong {font-size:16px;font-weight:650}
.stats-periods {display:flex;border:1px solid var(--stats-border);background:#edf2f6;padding:3px;flex-shrink:0;gap:3px}
.stats-periods a {font-size:13px;font-weight:650;color:#597084;text-decoration:none;padding:7px 12px;border-radius:4px;white-space:nowrap}
.stats-periods a.selected {background:#fff;color:#315e80;box-shadow:0 1px 4px #253a4b14}.stats-periods a:hover {color:#203e56}
.stats-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.stats-metric {padding:17px 18px;position:relative}.stats-metric h2 {font-size:13px;font-family:inherit;font-weight:550;color:#526b7e;letter-spacing:0;margin:0 22px 9px 0}
.stats-metric>strong {display:block;font-size:28px;line-height:1.3;font-weight:750;letter-spacing:-.035em}.stats-metric p {font-size:13px;margin-top:6px;line-height:1.5}
.stats-metric-icon {position:absolute;right:15px;top:13px;font-size:18px;color:#6b8aa1}
.stats-section-head {margin-bottom:20px;align-items:flex-start}.stats-section-head p {font-size:13px}.stats-small-label {color:var(--stats-muted);font-size:13px;white-space:nowrap}
.stats-legend {display:flex;gap:20px;font-size:13px;color:#52697c}.stats-legend span {display:flex;align-items:center;gap:6px}.stats-legend i {width:14px;height:3px;background:#477899;border-radius:2px}.stats-legend span+span i {background:#4c8d7c}
.stats-chart {display:block;width:100%;height:auto;overflow:visible;min-width:0}.stats-chart text {font-size:13px;fill:#647b8e}.stats-grid-line {stroke:#e6edf2;stroke-dasharray:3 5;stroke-width:1}.stats-speed-line,.stats-accuracy-line {stroke:#477899;fill:none;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}.stats-accuracy-line {stroke:#4c8d7c;stroke-width:2;stroke-dasharray:5 3}.stats-point {fill:#fff;stroke:#477899;stroke-width:2;cursor:pointer}.stats-point:hover,.stats-point:focus {fill:#477899;stroke-width:4;outline:none}
.typing-dashboard .stats-chart-readout {font-size:13px;text-align:center;min-height:20px;margin:6px 0 12px}.stats-data-table {font-size:13px;color:#52728b}.stats-data-table summary {cursor:pointer;display:list-item}.stats-data-table>div {max-height:240px;overflow:auto;margin-top:12px}.stats-data-table table {border-collapse:collapse;width:100%;text-align:left}.stats-data-table :is(td,th) {padding:8px 12px;border-bottom:1px solid #e4ebf0}.stats-data-table th {background:#f4f7f9;position:sticky;top:0}
.stats-trends {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:20px -23px -23px;border-top:1px solid #e5ecf0;background:#fafcfd;}.stats-trends>div {padding:15px 22px}.stats-trends>div+div {border-left:1px solid #e5ecf0}.stats-trends span,.stats-trends small {display:block;color:var(--stats-muted);font-size:13px}.stats-trends strong {display:block;font-size:18px;font-weight:650;margin:4px 0}.stats-trends small {font-size:13px}
.stats-recommendation {padding:21px 24px;background:#ecf3f7;border:1px solid #d4e2ec;display:flex;align-items:center;gap:18px}.stats-recommendation p {font-size:13px;max-width:620px}.stats-recommendation-icon {display:flex;align-items:center;justify-content:center;background:#dbe9f2;border:1px solid #c9dce9;color:#477899;width:44px;height:44px;flex-shrink:0;font-size:24px}.stats-recommendation .stats-button {margin-left:auto;flex-shrink:0}.stats-recommendation .stats-eyebrow {margin-bottom:5px}
.stats-button {display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 16px;border:1px solid #477899;border-radius:5px;text-decoration:none;background:#477899;color:#fff;font-size:13px;font-weight:650;gap:10px}.stats-button:hover {background:#365e7a}.stats-button-secondary {background:#fff;color:#477899;border-color:#c7d8e5}.stats-button-secondary:hover {background:#edf3f7}
.stats-two-column {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.stats-section-icon {font-size:20px;color:#6b899e}.stats-text-link {font-size:13px;color:#3e6c8d;text-decoration:none;font-weight:650;display:inline-flex;margin-top:14px;align-items:center;gap:8px}.stats-text-link:hover {text-decoration:underline}
.typing-dashboard .stats-fine {color:#617585;font-size:13px;line-height:1.65;margin:0}.stats-panel>.stats-fine {margin-top:16px}.stats-notice {padding:12px 16px;background:#eef4f8;border-left:3px solid #7c9db6;font-size:13px}.stats-preview {display:flex;align-items:center;gap:12px;padding:12px 16px;border:1px solid #dfcf9c;background:#fffaf0;font-size:13px;color:#765c25}.stats-preview a {margin-left:auto;color:#765c25;font-weight:650}.stats-preview span {flex:1}
.stats-empty {text-align:center;padding:46px 28px;background:radial-gradient(ellipse at 50% 0,#edf5fa 0,transparent 65%),#fff}.stats-empty h2 {font-size:26px;margin:12px 0}.stats-empty p {max-width:520px;margin:12px auto}.stats-empty-mark {display:flex;align-items:center;justify-content:center;width:58px;height:58px;border:1px solid #cadce8;background:#eef5f9;color:#477899;font-size:30px;margin:0 auto 20px}.stats-actions {display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:22px 0}.stats-empty .stats-fine {margin:18px auto 0}.stats-no-data {font-size:13px;line-height:1.8;padding:12px 0;color:var(--stats-muted)}
.stats-history {border-collapse:collapse;width:100%;font-size:13px;text-align:left;table-layout:fixed}.stats-history th {font-size:13px;text-transform:uppercase;letter-spacing:.025em;font-weight:650;color:#6a7f8f;background:#f5f8fa;padding:10px 5px;border-top:1px solid #e5ecf0;border-bottom:1px solid #e5ecf0;overflow-wrap:anywhere}.stats-history td {padding:15px 5px;border-bottom:1px solid #edf1f4;color:#536b7e;vertical-align:middle;overflow-wrap:anywhere}.stats-history th:nth-child(1) {width:14%}.stats-history th:nth-child(2) {width:13%}.stats-history th:nth-child(3) {width:20%}.stats-history th:nth-child(8) {width:12%}.stats-history .stats-attempt-title {font-weight:600;color:#2f485c;line-height:1.5}.stats-history th:nth-child(9) {width:9%}.stats-history tbody tr:hover {background:#fafcfd}.stats-mode {font-size:13px;line-height:1.5;padding:4px 6px;display:inline-block;background:#edf3f7;color:#426c88;border:1px solid #dce8ef}.stats-mode-learn {color:#616282;background:#f1f0f7;border-color:#e6e2ef}.stats-status {font-size:13px;color:#39745c}.stats-status-focus {color:#936724}.stats-review-button {font:inherit;font-size:13px;color:#426c88;background:#fff;border:1px solid #d6e2eb;border-radius:4px;cursor:pointer;padding:6px;min-height:32px}.stats-review-button:hover {background:#edf4f8}.stats-pagination {display:flex;align-items:center;justify-content:center;gap:24px;margin:18px 0;font-size:13px}.stats-pagination a {color:#426c88;text-decoration:none;font-weight:650}
.stats-distribution {display:grid;gap:14px}.stats-distribution>div {display:grid;grid-template-columns:1fr auto;gap:6px;font-size:13px}.stats-distribution strong {font-weight:600}.stats-distribution small {font-weight:400;color:#6a7e8e}.stats-bar {grid-column:1/-1;height:5px;border-radius:5px;background:#edf2f6;overflow:hidden}.stats-bar>span {display:block;height:100%;background:#7296b0;border-radius:5px}
.stats-heatmap {display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:5px;margin:27px 0 16px}.stats-heat {aspect-ratio:1;display:block;border:1px solid #dce7ef;position:relative}.stats-heat-0 {background:#f1f5f8}.stats-heat-1 {background:#dbe7ef}.stats-heat-2 {background:#b5cddd}.stats-heat-3 {background:#88abc3}.stats-heat-4 {background:#537f9f}.stats-heat-legend {display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:13px;color:var(--stats-muted)}.stats-heat-legend i {width:10px;height:10px;border-radius:2px}.stats-heat-legend span {margin:0 5px}
.stats-achievement-panel {background-image:radial-gradient(#b3c9da30 .6px,transparent .6px);background-size:12px 12px}.stats-achievements {list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.stats-achievements li {padding:12px 10px;border:1px solid #d8e5df;background:#f7fbf9;display:grid;grid-template-columns:22px 1fr;align-items:center;column-gap:4px}.stats-achievements li>span {font-size:15px;color:#4d8067}.stats-achievements strong {font-size:13px;font-weight:650}.stats-achievements small {grid-column:2;font-size:13px;color:#627a70}.stats-achievements .stats-achievement-locked {background:#f8fafb;border-color:#e5ebef;color:#6f7c86}.stats-achievement-locked>span {color:#82909b!important}.stats-achievement-locked small {color:#758591}
.stats-insights {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.stats-insights article {padding:18px}.stats-insights p {font-size:13px;line-height:1.8}.stats-insight-number {font-weight:700;font-size:13px;letter-spacing:.1em;color:#7692a8;display:block;margin-bottom:8px}
.stats-error-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:0}.stats-error-metrics dt {font-size:13px;color:var(--stats-muted)}.stats-error-metrics dd {font-size:20px;font-weight:650;margin:3px 0 0}.stats-duration-list>div {display:grid;grid-template-columns:1fr auto;gap:5px 12px;border-bottom:1px solid #e9eff3;padding:13px 0;font-size:13px}.stats-duration-list>div:first-child {padding-top:0}.stats-duration-list strong {font-weight:600}.stats-duration-list span {color:#426c88;font-size:13px}.stats-duration-list small {grid-column:1/-1;color:var(--stats-muted);font-size:13px}.stats-duration-list i {font-style:normal;color:#a0b1bc;margin:0 5px}
.stats-key-list,.stats-word-list {display:grid;gap:10px;min-height:100px}.stats-key-row {display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:12px;padding:7px 0;border-bottom:1px solid #edf1f4}.stats-key-row kbd {font:700 15px var(--font-ui);text-align:center;display:block;min-width:32px;padding:4px 6px;border:1px solid #d9e1e7;border-bottom-width:3px;background:#f6f8fa;color:#7d5740}.stats-key-row span {font-size:13px;color:#62798b}.stats-key-row strong {font-size:13px;color:#8a5e37}.stats-word-row {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #edf1f4;font-size:13px}.stats-word-row span {color:#8a5e37;font-size:13px}
.stats-summary-dialog {width:min(480px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto;border:1px solid #d5e2eb;padding:0;color:#263f52;box-shadow:0 18px 70px #152d4930;font-family:var(--font-ui)}.stats-summary-dialog::backdrop {background:#20394a80}.stats-summary-dialog>div {padding:28px;position:relative}.stats-summary-dialog h2 {font-size:23px;line-height:1.4;padding-right:22px;margin:12px 0;overflow-wrap:anywhere}.stats-summary-dialog p {font-size:13px;line-height:1.8;color:#617585;margin:14px 0}.stats-dialog-close {position:absolute;top:15px;right:15px;font-size:24px;width:32px;height:32px;line-height:1;background:#edf3f7;border:1px solid #dce6ec;border-radius:5px;color:#466c86;cursor:pointer}.stats-summary-dialog dl {display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.stats-summary-dialog dt {font-size:13px;color:#617585}.stats-summary-dialog dd {margin:3px 0 0;font-size:20px;font-weight:650}
.typing-dashboard :is(button,a,summary,[tabindex]):focus-visible {outline:3px solid #527f9f;outline-offset:3px}.stats-summary-dialog :is(button,a):focus-visible {outline:3px solid #527f9f;outline-offset:3px}.stats-sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px) {.stats-toolbar {align-items:flex-start;flex-direction:column}.stats-achievements {grid-template-columns:repeat(3,minmax(0,1fr))}.stats-insights {grid-template-columns:repeat(2,minmax(0,1fr))}.stats-panel {padding:18px}.stats-trends {margin:20px -18px -18px}.stats-trends>div {padding:14px}.stats-recommendation {flex-wrap:wrap}.stats-recommendation .stats-button {margin-left:62px}}
/* A real stacked-card history on smaller screens, with no horizontal table scroll. */
@media(max-width:760px) {.stats-history,.stats-history tbody {display:block;width:100%}.stats-history thead {display:none}.stats-history tr {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px;border:1px solid #e0e9ef;padding:14px;margin:0 0 12px;background:#fbfcfd}.stats-history td {display:flex;flex-direction:column;border:0;padding:0;gap:4px;min-width:0;font-size:13px}.stats-history td::before {content:attr(data-label);font-size:13px;color:#728695}.stats-history .stats-attempt-title {grid-row:1;grid-column:1/-1;font-size:14px}.stats-attempt-title::before {display:none}.stats-history td:nth-child(1) {grid-row:2;grid-column:1/3;font-size:13px}.stats-history td:nth-child(2) {grid-row:2;grid-column:3}.stats-history td:nth-child(4) {grid-row:3;grid-column:3}.stats-history td:nth-child(5) {grid-row:3;grid-column:1}.stats-history td:nth-child(6) {grid-row:3;grid-column:2}.stats-history td:nth-child(7) {grid-row:4;grid-column:1}.stats-history td:nth-child(8) {grid-row:4;grid-column:2}.stats-history td:nth-child(9) {grid-row:4;grid-column:3}.stats-history td:nth-child(9)::before {display:none}.stats-review-button {align-self:flex-start;margin-top:auto}.stats-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}.stats-two-column {grid-template-columns:1fr}.stats-hero h1 {font-size:28px}.stats-hero {padding:24px}.stats-hero-streak {padding:12px}.stats-hero-streak>span {display:none}.stats-heatmap {grid-template-columns:repeat(18,minmax(0,1fr))}}
@media(max-width:480px) {.typing-dashboard {gap:18px}.stats-hero {padding:23px 18px;align-items:flex-start}.stats-hero h1 {font-size:25px}.stats-hero p {font-size:13px}.stats-hero-streak {padding:9px}.stats-hero-streak strong {font-size:23px}.stats-hero-streak small {font-size:13px}.stats-eyebrow {font-size:13px}.stats-metric {padding:15px 13px}.stats-metric>strong {font-size:25px}.stats-metric h2 {font-size:13px}.stats-metric p {font-size:13px}.stats-metric-icon {font-size:15px;right:11px}.stats-periods {max-width:100%;width:100%;justify-content:space-between;overflow-x:auto}.stats-periods a {padding:7px 10px;font-size:13px}.stats-toolbar {gap:12px}.stats-section-head {flex-wrap:wrap;gap:10px}.stats-trends {grid-template-columns:1fr}.stats-trends>div {display:grid;grid-template-columns:1fr auto;gap:3px 12px}.stats-trends strong {margin:0;font-size:16px}.stats-trends small {grid-column:1/-1}.stats-trends>div+div {border-left:0;border-top:1px solid #e5ecf0}.stats-recommendation {padding:18px;gap:12px}.stats-recommendation-icon {display:none}.stats-recommendation .stats-button {margin-left:0}.stats-achievements {grid-template-columns:repeat(2,minmax(0,1fr))}.stats-insights {grid-template-columns:1fr}.stats-empty {padding:32px 18px}.stats-empty h2 {font-size:23px}.stats-preview {flex-wrap:wrap;gap:5px}.stats-preview span {flex-basis:100%}.stats-preview a {margin-left:0}.stats-heatmap {grid-template-columns:repeat(15,minmax(0,1fr))}.stats-chart-readout {font-size:13px!important}.stats-error-metrics {gap:15px}.stats-duration-list>div {grid-template-columns:1fr}.stats-duration-list small {grid-column:auto}}
@media(prefers-reduced-motion:reduce) {.typing-dashboard * {scroll-behavior:auto}}

.stats-axis-labels {display:flex;justify-content:space-between;gap:20px;font-size:13px;color:#617585;margin:0 0 5px;padding:0 5px}.stats-chart-mobile-dates {display:none}
.stats-history {font-size:13px}.stats-history th {font-size:13px}.stats-mode,.stats-status {font-size:13px}
@media(max-width:480px) {.stats-chart text {display:none}.stats-chart-mobile-dates {display:flex;justify-content:space-between;font-size:13px;color:#617585;margin-top:-10px;padding:0 15px}.stats-chart {min-height:150px}.stats-axis-labels {font-size:13px}.stats-mode,.stats-status {font-size:13px}}
