:root{color-scheme:dark;--bg: #191b1f;--panel: #22252b;--panel-soft: #292d34;--text: #e6e1d8;--muted: #7f8792;--accent: #f2b84b;--accent-dark: #4b3a1c;--good: #8fcf9d;--bad: #e36f6f;--extra: #9b4f52;--border: #343942;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text)}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:var(--bg)}button{font:inherit}.appShell{width:min(1040px,calc(100vw - 32px));margin:0 auto;padding:32px 0}.topBar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:28px}.brand{font-size:24px;font-weight:750;letter-spacing:0}.subtitle{margin-top:4px;color:var(--muted);font-size:14px}.iconButton,.githubLink,.restartButton,.resultRestart{border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:8px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}.topActions{display:flex;align-items:center;gap:10px}.iconButton{width:42px}.githubLink{min-height:40px;padding:0 12px;color:var(--text);text-decoration:none;font-size:14px;font-weight:700}.githubLink:hover,.iconButton:hover,.restartButton:hover,.resultRestart:hover{border-color:var(--accent)}.configBar{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:28px}.segment{display:inline-flex;padding:4px;gap:4px;border-radius:8px;background:var(--panel);border:1px solid var(--border)}.segment button{min-width:72px;border:0;border-radius:6px;padding:8px 12px;background:transparent;color:var(--muted);cursor:pointer}.segment button.active{background:var(--accent);color:#151515}.segment button:disabled{cursor:not-allowed;opacity:.55}.testPanel{min-height:320px;display:flex;align-items:center;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:36px 0}.typingTest{width:100%;position:relative}.liveStats{display:flex;gap:18px;color:var(--accent);font-size:14px;font-weight:700;margin-bottom:24px}.words{display:flex;flex-wrap:wrap;gap:10px 14px;max-height:188px;overflow:hidden;contain:layout paint;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:clamp(26px,4vw,38px);line-height:1.45;letter-spacing:0}.word{position:relative;color:var(--muted);white-space:pre;contain:paint}.word.typed{color:#5e6671}.word.active{color:var(--muted)}.correct{color:var(--text)}.incorrect{color:var(--bad)}.extra{color:var(--extra)}.caret{position:absolute;left:0;top:.13em;width:2px;height:1.05em;background:var(--accent);animation:blink 1s step-end infinite;transition:transform 70ms ease-out;will-change:transform}@keyframes blink{50%{opacity:0}}.typingInput{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;min-height:220px;opacity:0;resize:none;border:0;cursor:default}.typingInput:focus{outline:none}.restartButton{margin-top:28px;padding:0 14px;position:relative;z-index:2}.results{margin-top:28px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:stretch}.resultMetric,.invalidNotice,.resultGraph{border:1px solid var(--border);background:var(--panel);border-radius:8px;padding:14px}.resultGraph{grid-column:1 / -1;min-height:188px}.resultGraphHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:13px;font-weight:700}.resultGraphLegend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}.resultGraphLegend span{display:inline-flex;align-items:center;gap:6px}.resultGraphLegend span:before{content:"";width:18px;height:3px;border-radius:999px;background:currentColor}.resultGraphLegend .legendRaw:before{background:linear-gradient(90deg,currentColor 0 45%,transparent 45% 65%,currentColor 65% 100%)}.resultGraphLegend .legendErrors:before{width:7px;height:7px}.legendWpm{color:var(--accent)}.legendRaw{color:var(--muted)}.legendErrors{color:var(--bad)}.resultGraphSvg{display:block;width:100%;height:150px;margin-top:8px;overflow:visible}.resultGraphGrid{stroke:var(--border);stroke-width:1}.resultGraphAxis,.resultGraphEmpty{fill:var(--muted);font-size:12px}.resultGraphLine{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:3}.resultGraphLine.wpm{stroke:var(--accent)}.resultGraphLine.raw{stroke:var(--muted);stroke-dasharray:7 7;opacity:.9}.resultGraphError{fill:var(--bad);opacity:.9}.resultMetric span{display:block;color:var(--muted);font-size:13px}.resultMetric strong{display:block;margin-top:6px;font-size:24px;line-height:1.1}.resultMetric.primary strong{color:var(--accent);font-size:34px}.invalidNotice{color:var(--bad);display:flex;align-items:center}.resultRestart{padding:0 16px}.history{margin-top:34px}.sectionTitle{color:var(--muted);font-weight:700;margin-bottom:10px}.emptyHistory{color:var(--muted);border:1px solid var(--border);border-radius:8px;padding:14px}.historyRows{border:1px solid var(--border);border-radius:8px;overflow:hidden}.historyRow{display:grid;grid-template-columns:1fr 1fr 1.3fr 1fr 1fr;gap:12px;padding:12px 14px;background:var(--panel);border-bottom:1px solid var(--border)}.historyRow:last-child{border-bottom:0}.historyRow span:not(:first-child){color:var(--muted)}@media(max-width:760px){.appShell{width:min(100vw - 20px,1040px);padding:20px 0}.topBar{align-items:flex-start}.topActions{flex-wrap:wrap;justify-content:flex-end}.githubLink span{display:none}.githubLink{width:42px;padding:0}.segment,.configBar{width:100%}.segment button{flex:1;min-width:0}.testPanel{min-height:360px;padding:28px 0}.liveStats{justify-content:space-between;gap:8px}.words{font-size:27px;max-height:240px}.results{grid-template-columns:repeat(2,minmax(0,1fr))}.historyRow{grid-template-columns:1fr 1fr}}
