/* Typing Test — tool-specific styles */
.tt-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.tt-durs { display: flex; gap: 6px; }
.tt-dur { font-family: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; background: var(--bg-soft);
  border: 1px solid var(--line); color: var(--muted); padding: 7px 14px; border-radius: 999px;
  transition: all .15s cubic-bezier(.23,1,.32,1); -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums; }
.tt-dur:hover { color: var(--text); border-color: var(--muted-2); }
.tt-dur.active { background: var(--accent-grad); color: #0b0e1c; border-color: transparent; }
.tt-timer { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-2);
  min-width: 2.2ch; text-align: right; }
.tt-timer.running { animation: tt-pulse 1s ease-in-out infinite; }
@keyframes tt-pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
.tt-live { color: var(--muted-2); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 9ch; }
.np-spacer { flex: 1; }

.tt-words { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 22px; font-size: 1.35rem; line-height: 2.1; letter-spacing: .01em; height: 152px;
  overflow: hidden; user-select: none; -webkit-user-select: none; color: var(--muted); position: relative; }
.tt-words.done { opacity: .45; }
.tt-w { display: inline-block; margin-right: .55ch; border-radius: 4px; padding: 0 2px; }
.tt-w.cur { background: rgba(108,139,255,.18); box-shadow: 0 0 0 1px rgba(108,139,255,.35); color: var(--text); }
.tt-w.ok { color: var(--accent-2); }
.tt-w.bad { color: var(--danger); text-decoration: underline; text-decoration-color: rgba(255,107,138,.6); }

.tt-input { width: 100%; margin-top: 14px; background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--text); padding: 14px 16px; border-radius: var(--radius-sm); font-size: 1.15rem; font-family: inherit; }
.tt-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.tt-input.wrong { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,107,138,.22); }

.tt-result { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center;
  animation: ats-rise .35s cubic-bezier(.23,1,.32,1) both; }
.tt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tt-stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.tt-stat small { display: block; color: var(--muted-2); font-size: .76rem; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; }
.tt-stat b { display: block; margin-top: 4px; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-stat-main { border-color: rgba(92,214,192,.5); background: rgba(92,214,192,.07); }
.tt-stat-main b { font-size: 2.2rem; background: var(--accent-grad); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.tt-best { color: var(--muted); margin: 16px 0; font-weight: 600; }
.tt-best b { color: #ffce5c; }

@media (max-width: 640px) {
  .tt-stats { grid-template-columns: 1fr 1fr; }
  .tt-words { font-size: 1.1rem; height: 132px; }
}
