/* Learning analytics: compact, line-led and scoped to the stats page. */
#stats .la-app{display:grid;gap:16px;min-width:0;font-size:18px;line-height:1.6;padding-bottom:24px;color:var(--text,inherit)}
#stats .la-daily-svg{display:block;width:100%;height:auto;overflow:visible}
#stats .la-daily-svg .la-axis{fill:var(--muted);font-size:18px}
#stats .la-day{cursor:pointer;outline:none}
#stats .la-day-hit{fill:transparent;stroke:transparent;stroke-width:1.5}
#stats .la-day:hover .la-day-hit,#stats .la-day:focus-visible .la-day-hit{fill:var(--soft);stroke:var(--accent)}
#stats .la-activity-bar{fill:var(--accent);opacity:.55}
#stats .la-day.is-selected .la-activity-bar,#stats .la-day:hover .la-activity-bar{opacity:1}
#stats .la-bar-value{fill:var(--text);font-size:18px;font-weight:600;pointer-events:none}
#stats .la-accuracy-path{fill:none;stroke:#15803d;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
#stats .la-accuracy-dot{fill:var(--panel);stroke:#15803d;stroke-width:2}
#stats .la-accuracy-dot.is-selected{fill:#15803d}
#stats .la-day-detail{display:flex;flex-wrap:wrap;gap:6px 18px;padding-top:12px;border-top:1px solid var(--line);font-size:15px;color:var(--muted)}
#stats .la-day-detail strong{color:var(--text);font-weight:600}
body.dark #stats .la-accuracy-path,body.dark #stats .la-accuracy-dot{stroke:#86efac}
body.dark #stats .la-accuracy-dot.is-selected{fill:#86efac}
@media(max-width:760px){#stats .la-daily-svg .la-axis{font-size:24px}#stats .la-bar-value{font-size:22px}#stats .la-day-detail{font-size:14px}}
#stats .la-columns.la-skills-only{grid-template-columns:minmax(0,1fr)}
.page:has(#stats:not([hidden]))>header{margin-bottom:20px}
.page:has(#stats:not([hidden]))>header h1{font-size:30px}
.page:has(#stats:not([hidden]))>header #subtitle{font-size:18px}
#stats .la-app *{box-sizing:border-box}
#stats .la-app h2{font-size:22px;font-weight:600;line-height:1.45;margin:0}
#stats .la-app h3{font-size:18px;line-height:1.5;margin:0}
#stats .la-app p{margin:0}
#stats .la-icon{flex:0 0 20px;width:20px;height:20px}
#stats .la-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;min-width:0}
#stats .la-period,#stats .la-panel-copy{font-size:15px;color:var(--muted);margin:4px 0 0}
#stats .la-range{display:flex;gap:0;border:1px solid var(--line);border-radius:8px;padding:3px;background:var(--panel);flex-shrink:0}
#stats .la-range button{border:0;background:transparent;min-height:40px;font-size:16px;padding:7px 12px;border-radius:5px;white-space:nowrap}
#stats .la-range [aria-pressed=true]{background:var(--accent);color:#fff}
#stats .la-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:10px;background:var(--panel);overflow:hidden}
#stats .la-metric{min-width:0;padding:16px 18px;border-right:1px solid var(--line)}
#stats .la-metric:last-child{border-right:0}
#stats .la-metric-label{display:flex;align-items:center;gap:8px;font-size:16px;color:var(--muted)}
#stats .la-metric-label .la-icon{width:18px;height:18px;flex-basis:18px;color:var(--accent)}
#stats .la-number{display:block;font-size:38px;line-height:1.45;font-weight:600;font-variant-numeric:tabular-nums;margin-top:6px}
#stats .la-number small{font-size:15px;font-weight:400;margin-left:6px;color:var(--muted)}
#stats .la-metric-detail{display:block;font-size:14px;color:var(--muted);line-height:1.5}
#stats .la-recommend{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:14px;padding:16px 18px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:8px;background:var(--panel)}
#stats .la-recommend-icon{display:grid;place-items:center;width:36px;height:36px;color:var(--accent);border:1px solid var(--line);border-radius:7px}
#stats .la-kicker{font-size:13px;color:var(--muted);letter-spacing:.02em}
#stats .la-recommend h2{font-size:20px;margin:0 0 3px}
#stats .la-recommend p{font-size:15px;color:var(--muted)}
#stats .la-app button{font-family:inherit;min-height:44px;max-width:100%;font-size:18px;line-height:1.5;white-space:normal}
#stats .la-recommend>button{display:inline-flex;justify-content:center;align-items:center;gap:10px;padding:10px 14px;border-radius:7px;font-size:16px}
#stats .la-panel{padding:18px 20px;border:1px solid var(--line);border-radius:10px;background:var(--panel);min-width:0}
#stats .la-trend-state{font-size:14px;border:1px solid var(--line);border-radius:5px;padding:4px 8px;max-width:100%;color:var(--muted);line-height:1.5}
#stats .la-trend-state.is-up{color:var(--accent);background:var(--soft)}
#stats .la-trend-state.is-down{color:var(--text);border-style:dashed}
#stats .la-chart-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
#stats .la-chart-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}
#stats .la-chart-title h3{font-size:16px;font-weight:500;color:var(--muted)}
#stats .la-chart-title strong{font-size:18px;font-variant-numeric:tabular-nums}
#stats .la-line-chart{display:block;width:100%;height:auto;max-height:180px;margin:8px 0 0;overflow:visible}
#stats .la-chart-grid{stroke:var(--line);stroke-width:1;stroke-dasharray:3 4}
#stats .la-chart-line{stroke:var(--accent);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
#stats .la-chart-dot{fill:var(--panel);stroke:var(--accent);stroke-width:2;vector-effect:non-scaling-stroke}
#stats .la-axis{fill:var(--muted);font-size:14px;font-family:inherit}
#stats .la-chart-note{font-size:13px;color:var(--muted);line-height:1.6;margin:4px 0 0}
#stats .la-panel details{margin-top:14px;border-top:1px solid var(--line)}
#stats .la-app summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;min-height:44px;list-style:none;font-size:15px;color:var(--muted);padding:8px 0}
#stats .la-app summary::-webkit-details-marker{display:none}
#stats .la-app details[open]>summary>.la-icon{transform:rotate(90deg)}
#stats .la-data-table>div{display:grid;grid-template-columns:minmax(70px,1.4fr) repeat(3,minmax(0,1fr));gap:8px;padding:8px 0;border-top:1px solid var(--line);font-size:15px}
#stats .la-data-table>div>*:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
#stats .la-data-head{font-size:13px!important;color:var(--muted)}
#stats .la-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:16px}
#stats .la-count{font-size:14px;border:1px solid var(--line);border-radius:5px;padding:3px 7px;white-space:nowrap;color:var(--muted)}
#stats .la-word{display:grid;grid-template-columns:minmax(0,1fr) auto 20px;gap:12px;align-items:center;width:100%;margin:0;padding:10px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;text-align:left}
#stats .la-word:hover{color:inherit;background:var(--soft)}
#stats .la-word-main{min-width:0;overflow-wrap:anywhere}
#stats .la-word-main>strong{font-size:20px;font-weight:600}
#stats .la-word small{display:block;font-size:14px;color:var(--muted);line-height:1.5}
#stats .la-word-score{text-align:right;font-variant-numeric:tabular-nums}
#stats .la-word-score>strong{font-size:18px;font-weight:500}
#stats .la-word>.la-icon{color:var(--muted)}
#stats .la-panel-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding-top:8px;border-top:1px solid var(--line)}
#stats .la-panel-actions>button{font-size:15px;padding:6px 10px;border-radius:6px}
#stats .la-text-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;padding:0;background:transparent;color:var(--accent);font-size:15px!important}
#stats .la-text-action:hover{color:var(--accent);background:var(--soft)}
#stats .la-text-action .la-icon{width:16px;height:16px;flex-basis:16px}
#stats .la-skill{padding:10px 0;border-top:1px solid var(--line)}
#stats .la-skill-title{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:18px}
#stats .la-skill-title strong{font-weight:500}
#stats .la-skill-line{height:3px;width:100%;margin:8px 0;background:var(--line);overflow:hidden}
#stats .la-skill-line span{display:block;height:100%;background:var(--accent)}
#stats .la-skill-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;color:var(--muted)}
#stats .la-skill-note{font-size:14px;color:var(--muted);margin-top:3px!important}
#stats .la-empty{padding:16px 0;min-height:0;border-top:1px solid var(--line);color:var(--muted)}
#stats .la-empty>.la-icon{margin-bottom:6px}
#stats .la-empty p{font-size:17px}
#stats .la-empty small{display:block;font-size:14px;margin-top:4px}
#stats .la-method{border-top:1px solid var(--line);padding:0 4px}
#stats .la-method-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;padding:8px 0 12px}
#stats .la-method h3{margin-bottom:8px;font-weight:500}
#stats .la-method p{font-size:15px;color:var(--muted);margin:0 0 8px}
#stats .la-method button{font-size:16px;min-height:44px;padding:7px 10px}
#stats .la-app button:focus-visible,#stats .la-app summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#stats .la-app [role=alert]{font-size:16px}
@media(max-width:1100px){#stats .la-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#stats .la-metric:nth-child(2){border-right:0}#stats .la-metric:nth-child(-n+2){border-bottom:1px solid var(--line)}#stats .la-chart-columns{gap:18px}}
@media(max-width:760px){
 #stats .la-app{gap:12px}#stats .la-app h2{font-size:21px}#stats .la-heading{align-items:flex-start;flex-wrap:wrap;gap:10px;margin-bottom:12px}
 #stats .la-period,#stats .la-panel-copy{font-size:14px}#stats .la-range button{font-size:16px;min-height:40px;padding:6px 12px}
 #stats .la-metric{padding:13px 12px}#stats .la-metric-label{font-size:14px;gap:6px}#stats .la-metric-label .la-icon{width:16px;height:16px;flex-basis:16px}
 #stats .la-number{font-size:34px}#stats .la-number small{font-size:15px;margin-left:4px}#stats .la-metric-detail{font-size:13px}
 #stats .la-recommend{grid-template-columns:28px minmax(0,1fr);padding:13px 12px;gap:10px}#stats .la-recommend-icon{width:28px;height:28px}
 #stats .la-recommend h2{font-size:19px}#stats .la-recommend>button{grid-column:1/-1;justify-self:stretch;min-height:44px}
 #stats .la-panel{padding:14px}#stats .la-columns,#stats .la-chart-columns,#stats .la-method-grid{grid-template-columns:minmax(0,1fr);gap:14px}
 #stats .la-chart-columns>div+div{padding-top:12px;border-top:1px solid var(--line)}#stats .la-axis{font-size:20px}
 #stats .la-word{gap:8px;grid-template-columns:minmax(0,1fr) auto 18px}#stats .la-word small{font-size:13px}#stats .la-word-main>strong{font-size:20px}#stats .la-word-score>strong{font-size:17px}
 #stats .la-word>.la-icon{width:18px;height:18px;flex-basis:18px}#stats .la-skill-meta{flex-wrap:wrap;gap:4px}
 #stats .la-data-table>div{font-size:14px;gap:5px}#stats .la-data-head{font-size:12px!important}
}
@media(prefers-reduced-motion:no-preference){#stats .la-word,#stats .la-range button{transition:background-color .15s ease}}

/* Keep selected range text readable against the lighter dark-theme accent. */
body.dark #stats .la-range [aria-pressed=true]{color:var(--panel)}
