:root{--bg-primary: #f8fafc;--bg-surface: #ffffff;--bg-muted: #f1f5f9;--bg-subtle: #e2e8f0;--border-light: #e2e8f0;--border-strong: #cbd5e1;--text-main: #0f172a;--text-muted: #64748b;--text-dim: #94a3b8;--accent: #2563eb;--accent-hover: #1d4ed8;--accent-light: #eff6ff;--color-correct: #059669;--color-error: #dc2626;--color-error-bg: #fee2e2;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 16px;--font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .08), 0 2px 4px -2px rgb(0 0 0 / .06);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .08), 0 4px 6px -4px rgb(0 0 0 / .05)}@media(prefers-color-scheme:dark){:root{--bg-primary: #090d16;--bg-surface: #111827;--bg-muted: #1f2937;--bg-subtle: #374151;--border-light: #1f2937;--border-strong: #374151;--text-main: #f3f4f6;--text-muted: #9ca3af;--text-dim: #6b7280;--accent: #3b82f6;--accent-hover: #60a5fa;--accent-light: #1e293b;--color-correct: #10b981;--color-error: #ef4444;--color-error-bg: #450a0a}}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{font-family:var(--font-sans);background-color:var(--bg-primary);color:var(--text-main);line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{min-height:100vh;display:flex;flex-direction:column}a{color:var(--accent);text-decoration:none;transition:color .15s ease}a:hover{text-decoration:underline}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.container{width:100%;max-width:980px;margin:0 auto;padding:0 1.25rem}.site-header{border-bottom:1px solid var(--border-light);background-color:var(--bg-surface);position:relative;z-index:40}.header-inner{display:flex;align-items:center;justify-content:space-between;height:64px}.brand{display:flex;align-items:center;gap:.6rem;font-weight:700;font-size:1.125rem;color:var(--text-main);text-decoration:none}.brand-icon{width:28px;height:28px;color:var(--accent)}.lang-switch{display:flex;gap:.5rem;align-items:center}.lang-link{font-size:.875rem;font-weight:600;padding:.35rem .65rem;border-radius:var(--radius-sm);color:var(--text-muted);border:1px solid var(--border-light);background:var(--bg-muted);text-decoration:none}.lang-link.active{background:var(--accent);color:#fff;border-color:var(--accent)}.hero{padding:2rem 0 1.25rem;text-align:center}.hero h1{font-size:clamp(1.75rem,4vw,2.5rem);font-weight:800;letter-spacing:-.025em;margin-bottom:.75rem;color:var(--text-main)}.hero-tagline{color:var(--text-muted);font-size:clamp(.95rem,2vw,1.125rem);max-width:650px;margin:0 auto}.controls-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem;background-color:var(--bg-surface);border:1px solid var(--border-light);border-radius:var(--radius-md);padding:.85rem 1.25rem;margin-bottom:1.5rem;box-shadow:var(--shadow-sm)}.control-group{display:flex;align-items:center;gap:.5rem}.control-label{font-size:.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}.pill-group{display:flex;background-color:var(--bg-muted);padding:3px;border-radius:var(--radius-sm);border:1px solid var(--border-light)}.pill-btn{border:none;background:transparent;color:var(--text-muted);font-size:.875rem;font-weight:600;padding:.35rem .75rem;border-radius:4px;cursor:pointer;transition:all .15s ease}.pill-btn:hover{color:var(--text-main)}.pill-btn.active{background-color:var(--bg-surface);color:var(--accent);box-shadow:var(--shadow-sm)}.metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem}@media(max-width:640px){.metrics-grid{grid-template-columns:repeat(2,1fr)}}.metric-card{background-color:var(--bg-surface);border:1px solid var(--border-light);border-radius:var(--radius-md);padding:1rem 1.25rem;text-align:center;box-shadow:var(--shadow-sm)}.metric-value{font-size:clamp(1.75rem,3.5vw,2.25rem);font-weight:800;font-family:var(--font-mono);color:var(--accent);line-height:1.1}.metric-name{font-size:.8125rem;color:var(--text-muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em;margin-top:.25rem}.typing-box{background-color:var(--bg-surface);border:2px solid var(--border-light);border-radius:var(--radius-lg);padding:1.75rem;position:relative;min-height:200px;box-shadow:var(--shadow-md);cursor:text;transition:border-color .2s ease}.typing-box:focus-within,.typing-box.focused{border-color:var(--accent)}.words-display{display:flex;flex-wrap:wrap;gap:.65rem .5rem;font-family:var(--font-mono);font-size:clamp(1.15rem,2.5vw,1.45rem);line-height:1.8;max-height:160px;overflow:hidden;position:relative;user-select:none}.word{display:inline-flex;border-radius:4px;padding:0 2px;position:relative}.word.active-word{background-color:var(--accent-light)}.char{color:var(--text-dim);position:relative;transition:color .05s ease}.char.correct{color:var(--color-correct)}.char.error{color:var(--color-error);text-decoration:underline wavy var(--color-error);background-color:var(--color-error-bg);border-radius:2px}.char.caret:before{content:"";position:absolute;left:0;top:15%;height:70%;width:2px;background-color:var(--accent);animation:caret-blink 1s infinite}@keyframes caret-blink{0%,to{opacity:1}50%{opacity:0}}.typing-input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:text;z-index:10;font-size:16px}.pause-overlay{position:absolute;inset:0;background:#0f172abf;backdrop-filter:blur(4px);border-radius:var(--radius-lg);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:20;color:#fff;padding:1.5rem;text-align:center}.pause-overlay h3{font-size:1.5rem;margin-bottom:.5rem}.pause-overlay p{color:#e2e8f0;margin-bottom:1.25rem;max-width:400px}.btn-primary{background-color:var(--accent);color:#fff;border:none;font-size:.95rem;font-weight:600;padding:.65rem 1.4rem;border-radius:var(--radius-sm);cursor:pointer;transition:background-color .15s ease}.btn-primary:hover{background-color:var(--accent-hover)}.btn-secondary{background-color:var(--bg-muted);color:var(--text-main);border:1px solid var(--border-strong);font-size:.95rem;font-weight:600;padding:.65rem 1.4rem;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s ease}.btn-secondary:hover{background-color:var(--bg-subtle)}.btn-outline{background:transparent;color:var(--text-muted);border:1px solid var(--border-light);font-size:.8125rem;padding:.4rem .8rem;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s ease}.btn-outline:hover{color:var(--color-error);border-color:var(--color-error)}.results-card{background-color:var(--bg-surface);border:1px solid var(--border-light);border-radius:var(--radius-lg);padding:2rem;margin-top:1.5rem;box-shadow:var(--shadow-lg);display:none}.results-card.active{display:block}.results-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem;border-bottom:1px solid var(--border-light);padding-bottom:1rem}.badge-record{background-color:#fef3c7;color:#92400e;font-size:.8125rem;font-weight:700;padding:.35rem .75rem;border-radius:9999px;display:inline-flex;align-items:center;gap:.35rem}.results-stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:1.25rem;margin-bottom:1.75rem}.result-item{background-color:var(--bg-muted);padding:1rem;border-radius:var(--radius-sm);text-align:center}.result-item .val{font-size:1.5rem;font-weight:800;font-family:var(--font-mono);color:var(--text-main)}.result-item .lbl{font-size:.75rem;font-weight:600;text-transform:uppercase;color:var(--text-muted);margin-top:.25rem}.results-actions{display:flex;flex-wrap:wrap;align-items:center;gap:1rem}.info-section{padding:3rem 0;border-top:1px solid var(--border-light);margin-top:3rem}.info-section h2{font-size:1.5rem;font-weight:700;margin-bottom:1rem;color:var(--text-main)}.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem;margin-top:1.5rem}.info-box{background-color:var(--bg-surface);border:1px solid var(--border-light);border-radius:var(--radius-md);padding:1.25rem}.info-box h3{font-size:1.05rem;font-weight:600;margin-bottom:.5rem;color:var(--accent)}.info-box p{color:var(--text-muted);font-size:.9rem}.faq-list{display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem}.faq-item{background-color:var(--bg-surface);border:1px solid var(--border-light);border-radius:var(--radius-md);padding:1.25rem}.faq-item h3{font-size:1.05rem;font-weight:600;margin-bottom:.5rem;color:var(--text-main)}.faq-item p{color:var(--text-muted);font-size:.925rem}.site-footer{margin-top:auto;border-top:1px solid var(--border-light);background-color:var(--bg-surface);padding:2rem 0;color:var(--text-muted);font-size:.875rem}.footer-inner{display:flex;flex-direction:column;gap:.75rem;align-items:center;text-align:center}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.input-mode-selector{display:flex;flex-direction:column;gap:.85rem;padding:1.05rem 1.2rem;margin-bottom:1.2rem;border:1px solid var(--border-light);border-radius:var(--radius-lg);background:var(--bg-surface);box-shadow:var(--shadow-sm)}.input-mode-intro h2{font-size:1.04rem;letter-spacing:-.01em;margin-bottom:.2rem}.input-mode-intro p,.input-mode-note{color:var(--text-muted);font-size:.87rem;line-height:1.55}.input-mode-note{padding:.65rem .75rem;background:var(--bg-muted);border-radius:var(--radius-sm)}.input-mode-note[hidden]{display:none}.input-mode-options{display:flex;flex-wrap:wrap;gap:.5rem}.input-mode-options button{min-height:44px;flex:1 1 150px;color:var(--text-muted);background:var(--bg-muted);border:1px solid var(--border-light);border-radius:var(--radius-md);padding:.6rem .75rem;font:600 .9rem/1.2 var(--font-sans);cursor:pointer;transition:border-color .16s ease,background-color .16s ease}.input-mode-options button.active{background:var(--accent-light);color:var(--accent);border-color:var(--accent)}.touch-start-row{display:none;margin-bottom:.9rem}.typing-app-wrapper[data-input-mode=phone] .touch-start-row,.typing-app-wrapper[data-input-mode=tablet] .touch-start-row{display:flex}.touch-start-row .btn-primary{min-height:48px;width:100%}.result-input-mode{font-weight:700;font-size:.78rem;color:var(--accent);text-transform:uppercase;letter-spacing:.045em;margin-bottom:.2rem}@media(max-width:700px){.hero{padding:1.05rem 0 .75rem}.hero h1{margin-bottom:.3rem}.input-mode-selector{padding:.8rem;gap:.6rem}.input-mode-options button{font-size:.8rem;padding:.5rem .4rem;flex-basis:95px}.controls-bar{padding:.75rem;gap:.6rem}.control-group{flex-wrap:wrap}.pill-btn{min-height:36px;padding:.4rem .55rem}.metrics-grid{gap:.5rem;margin-bottom:.75rem}.metric-card{padding:.55rem .4rem}.metric-value{font-size:1.55rem}.metric-name{font-size:.66rem}.typing-box{min-height:145px;padding:.8rem}.words-display{max-height:125px;font-size:1.07rem;line-height:1.65;gap:.42rem .35rem}.typing-app-wrapper.keyboard-visible .input-mode-selector,.typing-app-wrapper.keyboard-visible .controls-bar,.typing-app-wrapper.keyboard-visible .touch-start-row{display:none}.typing-app-wrapper.keyboard-visible .metric-card{padding:.32rem}.typing-app-wrapper.keyboard-visible .metrics-grid{margin-bottom:.35rem}.typing-app-wrapper.keyboard-visible .typing-box{min-height:115px;padding:.6rem}.typing-app-wrapper.keyboard-visible .words-display{max-height:94px}}@media(max-width:380px){.input-mode-options{gap:.25rem}.input-mode-options button{font-size:.72rem;padding:.4rem .2rem;flex-basis:85px}.control-label{font-size:.71rem}}.data-tools{display:flex;justify-content:flex-end;margin:1.25rem 0}@media(max-width:700px){.hero{padding:.6rem 0 .45rem}.hero h1{font-size:1.52rem;line-height:1.18;margin-bottom:.3rem}.hero-tagline{font-size:.79rem;line-height:1.38}.input-mode-selector{padding:.6rem;gap:.4rem;margin-bottom:.55rem}.input-mode-intro h2{font-size:.86rem;margin-bottom:0}.input-mode-intro p{display:none}.input-mode-note{display:none!important}.input-mode-options button{min-height:39px;flex-basis:90px;font-size:.74rem;line-height:1.1;padding:.34rem .2rem}.controls-bar{padding:.45rem .6rem;gap:.42rem;margin-bottom:.6rem}.control-group{flex-wrap:nowrap;width:100%;justify-content:space-between}.control-label{font-size:.71rem}.pill-btn{min-height:32px;padding:.29rem .48rem;font-size:.79rem}.metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;margin-bottom:.6rem}.metric-card{padding:.55rem .12rem;min-width:0}.metric-value{font-size:1.22rem}.metric-name{font-size:.54rem;letter-spacing:0}.touch-start-row{margin-bottom:.5rem}.touch-start-row .btn-primary{min-height:40px;padding:.45rem;font-size:.86rem}.typing-box{min-height:132px;padding:.65rem}.words-display{max-height:110px;font-size:1.03rem;line-height:1.55}.typing-app-wrapper.keyboard-visible .controls-bar,.typing-app-wrapper.keyboard-visible .touch-start-row,.typing-app-wrapper.keyboard-visible .input-mode-selector{display:none}.typing-app-wrapper.keyboard-visible .metrics-grid{margin-bottom:.3rem}.typing-app-wrapper.keyboard-visible .typing-box{min-height:100px}}.lang-switch{flex-wrap:wrap;justify-content:flex-end}.lang-link{min-height:34px;display:inline-flex;align-items:center;justify-content:center}@media(max-width:650px){.header-inner{height:auto;min-height:60px;padding-top:.5rem;padding-bottom:.5rem;flex-wrap:wrap;gap:.35rem}.lang-switch{width:100%;gap:.3rem;justify-content:space-between;flex-wrap:nowrap}.lang-link{flex:1 1 0;font-size:.74rem;padding:.28rem .25rem}}.lang-switch select{min-height:44px;max-width:min(50vw,230px);padding:.4rem .7rem;border:1px solid var(--border-light, #59616c);border-radius:8px;color:inherit;background:var(--bg-surface, #1e2228);font:inherit;cursor:pointer}@media(max-width:650px){.lang-switch{width:auto;flex-shrink:0}.lang-switch select{max-width:48vw;font-size:.85rem}}html[dir=rtl] .words-display{direction:rtl;text-align:right}html[dir=rtl] .typing-box{direction:rtl}html[dir=rtl] .word{direction:rtl;unicode-bidi:isolate}html[dir=rtl] .terminal-window,html[dir=rtl] .terminal-screen{direction:ltr;unicode-bidi:isolate;text-align:left}
