/* Typing Speed — test-specific overrides */
:root { --test-accent: #2563eb; }
.t-intro-icon::before {
  content: 'keyboard';
}


/* ── TEXT DISPLAY ── */
.tp-text-box {
  background: var(--color-surface-container-low);
  border: 2.5px solid var(--color-outline);
  border-radius: 22px;
  padding: 28px 24px;
  min-height: 120px;
  line-height: 2;
  font-family: 'Lexend', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  word-wrap: break-word;
}

.tp-char {
  transition: color 0.08s, opacity 0.08s;
  opacity: 0.45;
  color: var(--text);
}
.tp-correct {
  color: var(--text);
  opacity: 1;
  font-weight: 600;
}
.tp-wrong {
  color: #ef4444;
  background: #fee2e2;
  border-radius: 3px;
  opacity: 1;
}
.tp-cursor {
  border-bottom: 2.5px solid #2563eb;
  animation: cursorBlink 1s step-end infinite;
  opacity: 1;
}

@keyframes cursorBlink {
  50% { border-color: transparent; }
}

/* ── INPUT ── */
.tp-input {
  width: 100%;
  padding: 16px 20px;
  border: 2.5px solid var(--color-outline);
  border-radius: 14px;
  font-family: 'Lexend', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  background: var(--color-surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tp-input:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }

/* ── DARK MODE OVERRIDES ── */
html.dark .tp-text-box {
  background: var(--color-surface-container-low) !important;
  border-color: var(--color-outline-variant) !important;
}

html.dark .tp-input {
  background: var(--color-surface-container) !important;
  border-color: var(--color-outline) !important;
  color: var(--text) !important;
}

html.dark .tp-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.2) !important;
}

html.dark .tp-wrong {
  background: rgba(239, 68, 68, 0.2) !important;
}

/* ── STATS ROW ── */
.tp-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.tp-stat-item {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.tp-stat-item span {
  color: var(--test-accent);
}

/* ── SCORE RANGE TABLE (reuse) ── */
.rt-range-table { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rt-range-row { display: grid; grid-template-columns: 10px 100px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-family: 'Lexend', sans-serif; font-size: 13px; }
.rt-range-dot { width: 10px; height: 10px; border-radius: 50%; }
.rt-range-label { font-weight: 700; color: var(--text); }
.rt-range-val { color: var(--text-muted); }
.rt-range-pct { font-weight: 700; text-align: right; }
.rt-range-row.elite  { background: #f0fdf4; } .rt-range-row.elite  .rt-range-dot { background: #2ecc71; } .rt-range-row.elite  .rt-range-pct { color: #2ecc71; }
.rt-range-row.fast   { background: #f0f9ff; } .rt-range-row.fast   .rt-range-dot { background: #0ea5e9; } .rt-range-row.fast   .rt-range-pct { color: #0ea5e9; }
.rt-range-row.avg    { background: #fafafa; } .rt-range-row.avg    .rt-range-dot { background: #f5a623; } .rt-range-row.avg    .rt-range-pct { color: #f5a623; }
.rt-range-row.slow   { background: #fef2f1; } .rt-range-row.slow   .rt-range-dot { background: #e74c3c; } .rt-range-row.slow   .rt-range-pct { color: #e74c3c; }

@media (max-width: 480px) {
  .tp-text-box { font-size: 15px; padding: 20px 16px; }
  .tp-input { font-size: 15px; padding: 14px 16px; }
}
