/* Fast Reaction Test — professional tool suite */
.rfx-root {
  --rfx-bg: #080a10;
  --rfx-surface: #111620;
  --rfx-surface2: #181f2e;
  --rfx-border: rgba(255, 255, 255, 0.09);
  --rfx-text: #f4f6fb;
  --rfx-muted: #8b95a8;
  --rfx-accent: #3b82f6;
  --rfx-accent2: #8b5cf6;
  --rfx-go: #22c55e;
  --rfx-warn: #f59e0b;
  --rfx-bad: #ef4444;
  --rfx-radius: 16px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  color: var(--rfx-text);
  background: var(--rfx-bg);
  border-radius: var(--rfx-radius);
  border: 1px solid var(--rfx-border);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.rfx-header {
  padding: 0.75rem 1rem;
  background: var(--rfx-surface);
  border-bottom: 1px solid var(--rfx-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rfx-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.rfx-pill.is-go { background: rgba(34, 197, 94, 0.2); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
.rfx-pill.is-wait { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.rfx-pill.is-bad { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.rfx-pill.is-done { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); }

.rfx-progress-track {
  flex: 1;
  min-width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.rfx-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rfx-accent), var(--rfx-accent2));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.rfx-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rfx-border);
  background: rgba(0, 0, 0, 0.2);
}

.rfx-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
}

.rfx-btn:hover { filter: brightness(1.08); }
.rfx-btn:active { transform: scale(0.97); }

.rfx-btn-primary {
  background: linear-gradient(135deg, var(--rfx-accent), var(--rfx-accent2));
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.rfx-btn-secondary {
  background: var(--rfx-surface2);
  color: var(--rfx-text);
  border: 1px solid var(--rfx-border);
}

.rfx-btn-ghost {
  background: transparent;
  color: var(--rfx-muted);
  border: 1px solid var(--rfx-border);
}

.rfx-btn.is-active {
  border-color: var(--rfx-accent);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.rfx-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 900px) {
  .rfx-layout {
    grid-template-columns: 1fr 240px;
  }
}

.rfx-body { padding: 1rem; min-width: 0; }

.rfx-side {
  padding: 0.85rem 1rem;
  background: var(--rfx-surface);
  border-top: 1px solid var(--rfx-border);
}

@media (min-width: 900px) {
  .rfx-side {
    border-top: none;
    border-left: 1px solid var(--rfx-border);
  }
}

.rfx-side-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rfx-muted);
}

.rfx-hist-list {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0 0;
  max-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 0.78rem;
  scrollbar-gutter: stable;
}

.rfx-hist-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.35rem 0.15rem 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rfx-hist-list li > span:first-child {
  flex: 1;
  min-width: 0;
}

.rfx-hist-list .val {
  font-weight: 700;
  flex-shrink: 0;
  text-align: right;
  padding-right: 0.1rem;
  white-space: nowrap;
}
.rfx-hist-list .tier-fast { color: #4ade80; }
.rfx-hist-list .tier-mid { color: #facc15; }
.rfx-hist-list .tier-slow { color: #fb7185; }

.rfx-chart {
  display: block;
  width: 100%;
  height: 56px;
  margin-top: 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.rfx-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--rfx-border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.78rem;
}

.rfx-sound-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--rfx-muted);
  cursor: pointer;
  margin-right: auto;
}

.rfx-kbd {
  color: var(--rfx-muted);
  font-size: 0.72rem;
}

.rfx-arena {
  min-height: 220px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  cursor: pointer;
  user-select: none;
  background: var(--rfx-surface2);
  border: 2px solid var(--rfx-border);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  position: relative;
}

.rfx-arena.is-wait { background: #3d2a06; border-color: #d97706; }
.rfx-arena.is-go { background: linear-gradient(160deg, #15803d, #22c55e); border-color: #4ade80; color: #052e16; }
.rfx-arena.is-early { background: #450a0a; border-color: #f87171; animation: rfx-shake 0.4s; }
.rfx-arena.is-active { background: #0f2744; border-color: var(--rfx-accent); cursor: crosshair; }
.rfx-arena.is-nogo { background: #450a0a; border-color: #ef4444; cursor: default; }
.rfx-arena.is-red { background: #3f1010; border-color: #ef4444; cursor: not-allowed; }

@keyframes rfx-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.rfx-arena-main { font-size: 1.5rem; font-weight: 800; margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
.rfx-arena-sub { font-size: 0.85rem; color: var(--rfx-muted); margin: 0.5rem 0 0; max-width: 28ch; }
.rfx-arena.is-go .rfx-arena-sub { color: rgba(0, 0, 0, 0.5); }

.rfx-score-big {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0.2rem 0;
  line-height: 1;
}

.rfx-tier-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.rfx-tier-elite { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.rfx-tier-fast { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.rfx-tier-mid { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.rfx-tier-slow { background: rgba(244, 63, 94, 0.15); color: #fb7185; }

.rfx-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.rfx-stat {
  background: var(--rfx-surface);
  border: 1px solid var(--rfx-border);
  border-radius: 12px;
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.rfx-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rfx-muted);
}

.rfx-stat-value { font-size: 1.1rem; font-weight: 800; }

.rfx-choice-btns, .rfx-stroop-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
  max-width: 360px;
}

.rfx-choice-btn, .rfx-color-btn {
  flex: 1;
  min-width: 72px;
  padding: 0.85rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid var(--rfx-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--rfx-text);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s, border-color 0.15s;
}

.rfx-choice-btn:hover, .rfx-color-btn:hover { border-color: var(--rfx-accent); transform: scale(1.02); }

.rfx-pads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-width: 240px;
  margin: 0.75rem auto 0;
}

.rfx-pad {
  aspect-ratio: 1;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.12s, transform 0.1s, box-shadow 0.12s;
}

.rfx-pad:nth-child(1) { background: #22c55e; }
.rfx-pad:nth-child(2) { background: #ef4444; }
.rfx-pad:nth-child(3) { background: #3b82f6; }
.rfx-pad:nth-child(4) { background: #eab308; }
.rfx-pad.is-lit { opacity: 1; box-shadow: 0 0 24px currentColor; transform: scale(0.96); }

.rfx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 240px;
  margin: 0.75rem auto 0;
}

.rfx-grid-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid var(--rfx-border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
}

.rfx-grid-cell.is-hot {
  background: linear-gradient(145deg, #3b82f6, #8b5cf6);
  border-color: #93c5fd;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  transform: scale(1.05);
}

.rfx-jitter-zones {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 360px;
  margin-top: 1rem;
}

.rfx-jitter-zone {
  flex: 1;
  padding: 1.25rem;
  border-radius: 14px;
  border: 2px solid var(--rfx-border);
  font-weight: 800;
  font-size: 1rem;
  opacity: 0.35;
  transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}

.rfx-jitter-zone.is-active {
  opacity: 1;
  border-color: var(--rfx-accent);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.25);
}

.rfx-target {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4ade80, #16a34a);
  border: 2px solid #fff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.55);
  cursor: pointer;
  transform: translate(-50%, -50%);
  animation: rfx-pop 0.18s ease;
}

@keyframes rfx-pop {
  from { transform: translate(-50%, -50%) scale(0); }
  to { transform: translate(-50%, -50%) scale(1); }
}

.rfx-arena-aim { position: relative; min-height: 300px; overflow: hidden; }

.rfx-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 340px;
  margin: 0 auto;
}

.rfx-input {
  font-family: inherit;
  font-size: 1.25rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rfx-border);
  background: var(--rfx-surface2);
  color: var(--rfx-text);
  text-align: center;
}

.rfx-result-card {
  margin-top: 1rem;
  padding: 1.35rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.22);
  text-align: center;
}

.rfx-percent-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  margin-top: 0.85rem;
  overflow: hidden;
}

.rfx-percent-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rfx-accent), var(--rfx-go));
  border-radius: 999px;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.rfx-hidden { display: none !important; }
.rfx-countdown { font-size: 4rem; font-weight: 800; opacity: 0.9; }

/* Site hub */
.tools-hub-section {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.05), transparent);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.15rem;
  background: rgba(12, 16, 26, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  text-decoration: none;
  color: var(--site-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(1.4);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.tool-card:hover {
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(18, 26, 40, 0.65);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 32px rgba(56, 189, 248, 0.12);
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tool-card-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.benchmark-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(139, 92, 246, 0.08));
}

.benchmark-banner-icon { font-size: 2rem; line-height: 1; }

.benchmark-banner-body { flex: 1; min-width: 200px; }
.benchmark-banner-body strong { display: block; font-size: 1rem; margin-bottom: 0.25rem; }
.benchmark-banner-body p { margin: 0; font-size: 0.82rem; color: var(--site-muted); line-height: 1.45; }

.benchmark-banner-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--site-accent);
  text-decoration: none;
  white-space: nowrap;
}

.benchmark-banner-cta:hover { text-decoration: underline; }

.test-section--benchmark { scroll-margin-top: 5rem; }

.tool-card-icon { font-size: 1.6rem; }
.tool-card h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.tool-card p { margin: 0; font-size: 0.8rem; color: var(--site-muted); flex: 1; line-height: 1.45; }
.tool-card-cta { font-size: 0.78rem; font-weight: 600; color: var(--site-accent); }

.tools-breadcrumb { font-size: 0.85rem; color: var(--site-muted); margin-bottom: 1rem; }
.tools-breadcrumb a { color: var(--site-accent); text-decoration: none; }

.tool-related { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.tool-related h2 { font-size: 1.2rem; margin-bottom: 1rem; }

/* Typing speed test */
.rfx-type-wrap {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--rfx-border);
  background: var(--rfx-surface2);
  overflow: hidden;
}

.rfx-type-words {
  min-height: 120px;
  max-height: 140px;
  overflow: hidden;
  padding: 1.1rem 1rem 0.75rem;
  font-size: 1.35rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  user-select: none;
}

.rfx-type-word {
  margin-right: 0.45em;
  opacity: 0.38;
  transition: opacity 0.12s;
}

.rfx-type-word.is-current { opacity: 1; }

.rfx-type-char.ok { color: #4ade80; }
.rfx-type-char.bad { color: #fb7185; background: rgba(251, 113, 133, 0.15); border-radius: 2px; }
.rfx-type-char.caret {
  border-bottom: 2px solid var(--rfx-accent);
  animation: rfx-blink 1s step-end infinite;
}

@keyframes rfx-blink {
  50% { border-color: transparent; }
}

.rfx-type-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-top: 1px solid var(--rfx-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--rfx-text);
  font-family: inherit;
  font-size: max(16px, 1rem);
  padding: 0.75rem 1rem;
  outline: none;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.rfx-type-input:focus {
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.rfx-type-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rfx-type-live {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rfx-muted);
  border-top: 1px solid var(--rfx-border);
  background: rgba(0, 0, 0, 0.15);
}

.rfx-type-live strong {
  color: var(--rfx-text);
  font-size: 0.95rem;
}

.rfx-type-live .is-wpm { color: #93c5fd; }

.rfx-iq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1rem;
  max-width: 320px;
  margin: 0 auto;
}

.rfx-iq-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.rfx-iq-cell:hover:not(:disabled) { transform: scale(1.04); }
.rfx-iq-cell:disabled { cursor: default; opacity: 0.85; }

.rfx-act-hud {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rfx-border);
  background: var(--rfx-surface);
}

.rfx-act-target {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--rfx-muted);
}

.rfx-act-target strong {
  font-size: 1.75rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.rfx-act-stats { margin: 0 !important; padding: 0 !important; }

.rfx-act-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.rfx-act-symbol {
  width: 120px;
  height: 120px;
  font-size: 4rem;
  line-height: 1;
  border: 3px solid var(--rfx-border);
  border-radius: 20px;
  background: var(--rfx-surface2);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.rfx-act-symbol:not(:disabled):hover { transform: scale(1.05); border-color: var(--rfx-accent); }
.rfx-act-symbol.is-target:not(:disabled) { border-color: var(--rfx-go); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }
.rfx-act-symbol.is-hit { background: rgba(34, 197, 94, 0.2); }
.rfx-act-symbol.is-bad { background: rgba(239, 68, 68, 0.2); }
.rfx-act-symbol:disabled { opacity: 0.35; cursor: default; }

.rfx-wm-stage {
  padding: 1.25rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.rfx-wm-flash {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  min-height: 1.2em;
  opacity: 0.35;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.rfx-wm-flash.is-show {
  opacity: 1;
  transform: scale(1.04);
  color: #93c5fd;
}

.rfx-wm-input {
  width: min(100%, 420px);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rfx-border);
  background: var(--rfx-surface2);
  color: var(--rfx-text);
}

.rfx-wm-input:focus {
  outline: none;
  border-color: var(--rfx-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Letter Rain arcade */
.rfx-lr-hud { padding: 0 0 0.5rem; }

.rfx-lr-stats { margin: 0 !important; padding: 0 !important; }

.rfx-lr-prompt {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--rfx-muted);
  text-align: center;
}

.rfx-lr-arena {
  position: relative;
  height: 320px;
  margin: 0 1rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--rfx-border);
  background: linear-gradient(180deg, #0a1220 0%, #060a12 70%, #1a0a0a 100%);
  overflow: hidden;
  outline: none;
}

.rfx-lr-input {
  display: block;
  width: calc(100% - 2rem);
  margin: 0 1rem 1rem;
  box-sizing: border-box;
  font-family: inherit;
  font-size: max(16px, 1rem);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rfx-border);
  background: var(--rfx-surface2);
  color: var(--rfx-text);
  outline: none;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.rfx-lr-input:focus {
  border-color: var(--rfx-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

.rfx-lr-input.rfx-hidden {
  display: none !important;
}

.rfx-lr-danger {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: linear-gradient(0deg, rgba(239, 68, 68, 0.45), transparent);
  pointer-events: none;
  border-top: 2px solid rgba(239, 68, 68, 0.6);
}

.rfx-lr-letter {
  position: absolute;
  font-size: 1.75rem;
  font-weight: 800;
  font-family: "Inter", ui-monospace, monospace;
  color: #e2e8f0;
  text-shadow: 0 2px 12px rgba(59, 130, 246, 0.5);
  user-select: none;
  pointer-events: none;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.rfx-lr-letter.is-pop {
  transform: scale(1.35);
  opacity: 0;
  color: #86efac;
}

/* Session insights panel */
.rfx-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.rfx-insights-empty {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.75rem;
  color: var(--rfx-muted);
  line-height: 1.4;
}

.rfx-insight-card {
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  background: var(--rfx-surface2);
  border: 1px solid var(--rfx-border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rfx-insight-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rfx-muted);
  font-weight: 600;
}

.rfx-insight-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rfx-text);
}

.rfx-insight-hint {
  font-size: 0.65rem;
  color: var(--rfx-muted);
  line-height: 1.3;
}

/* Audio reaction */
.rfx-audio-arena { text-align: center; }

.rfx-audio-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 48px;
  margin: 0.5rem auto 0.75rem;
}

.rfx-audio-wave span {
  width: 6px;
  height: 12px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.35);
  transition: height 0.15s ease;
}

.rfx-audio-wave.is-pulse span {
  animation: rfx-wave 0.45s ease-in-out infinite alternate;
}

.rfx-audio-wave.is-pulse span:nth-child(2) { animation-delay: 0.05s; }
.rfx-audio-wave.is-pulse span:nth-child(3) { animation-delay: 0.1s; }
.rfx-audio-wave.is-pulse span:nth-child(4) { animation-delay: 0.15s; }
.rfx-audio-wave.is-pulse span:nth-child(5) { animation-delay: 0.2s; }

@keyframes rfx-wave {
  from { height: 12px; background: rgba(59, 130, 246, 0.4); }
  to { height: 40px; background: rgba(34, 197, 94, 0.85); }
}

.rfx-audio-arena.is-go .rfx-audio-wave span {
  height: 36px;
  background: rgba(34, 197, 94, 0.9);
}

/* Reaction IQ phases */
.rfx-iq-phases {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 1rem 0;
  flex-wrap: wrap;
}

.rfx-iq-phases span {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--rfx-muted);
  border: 1px solid var(--rfx-border);
}

.rfx-iq-phases span.is-active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

.rfx-pad-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--rfx-muted);
  margin: 0 0 0.5rem;
}

.rfx-pad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  max-width: 220px;
  margin: 0 auto;
  padding: 0 1rem 0.5rem;
}

.rfx-pad-level {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  margin: 0.35rem 0 0;
}

/* Word memory pro */
.rfx-wm-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem 0;
  gap: 0.5rem;
}

.rfx-wm-diff-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.rfx-wm-streak {
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .rfx-type-words {
    min-height: 100px;
    max-height: 110px;
    font-size: 1.1rem;
    line-height: 1.65;
  }

  .rfx-type-live {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.72rem;
  }

  .rfx-lr-arena {
    height: min(42vh, 280px);
    margin-inline: 0.75rem;
  }

  .rfx-lr-input {
    width: calc(100% - 1.5rem);
    margin-inline: 0.75rem;
  }

  .rfx-lr-stats {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
