/* Working Memory — only test-specific overrides */
:root { --test-accent: #6c63ff; }
.t-intro-icon::before {
  content: 'psychology';
}


/* ── STIMULUS BOX ── */
.wm-box {
  border-radius: 18px;
  min-height: 480px;
  background: var(--color-surface-container-low);
  border: 2.5px solid var(--color-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s;
}

.wm-box[data-state="flash"]  { background: #ffffff; }
.wm-box[data-state="input"]  { background: var(--color-surface-container-low); }
.wm-box[data-state="hit"]    { background: #edfaf4; }
.wm-box[data-state="miss"]   { background: #fef2f1; }

/* ── TASK HEADER (lives + count + restart) ── */
.wm-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wm-lives {
  display: flex;
  gap: 4px;
}

.wm-life {
  font-size: 22px;
  line-height: 1;
  color: #e74c3c;
  transition: opacity 0.2s, transform 0.2s;
}

.wm-life.lost {
  color: var(--color-outline-variant);
  transform: scale(0.85);
}

.wm-restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1.5px solid var(--color-outline-variant);
  border-radius: 8px;
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s;
}
.wm-restart-btn:hover { border-color: var(--test-accent); color: var(--test-accent); }
.wm-restart-btn:active { transform: scale(0.96); }

/* ── TIMER BAR ── */
.wm-timer-track {
  height: 6px;
  background: var(--color-surface-variant);
  border-radius: 10px;
  overflow: hidden;
}

.wm-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 10px;
  background: var(--test-accent);
  transition: none; /* driven by rAF */
}

/* ── IDLE MSG ── */
.wm-idle-msg {
  display: none;
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-faint);
  animation: pulse 1s infinite;
}
.wm-box[data-state="idle"] .wm-idle-msg {
  display: block;
}

/* ── ALL DIGITS SHOWN AT ONCE ── */
.wm-digit-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.5vw, 12px);
  flex-wrap: nowrap;
  padding: 24px 8px;
  width: 100%;
}
.wm-box:not([data-state="flash"]) .wm-digit-row {
  display: none;
}

.wm-digit-card {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(48px, 12vw, 120px);
  font-weight: 900;
  color: var(--test-accent);
  animation: cardPop 0.18s ease both;
  flex-shrink: 1;
  line-height: 1;
}

@keyframes cardPop {
  from { opacity: 0; transform: scale(0.75); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── DELETED SLOTS CSS ── */

/* ── INPUT UI (Numpad) ── */
.wm-input-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 300px;
  padding: 16px 20px 20px;
}
.wm-box[data-state="input"] .wm-input-wrap,
.wm-box[data-state="hit"] .wm-input-wrap,
.wm-box[data-state="miss"] .wm-input-wrap {
  display: flex;
  animation: fadeSlideUp 0.28s ease both;
}

.wm-display {
  width: 100%;
  min-height: 80px;
  background: transparent;
  border: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 800;
  letter-spacing: clamp(0.05em, 1vw, 0.15em);
  color: var(--test-accent);
  white-space: nowrap;
  padding: 8px;
  transition: color 0.2s;
}

.wm-display.correct {
  color: #2ecc71;
}
.wm-display.wrong {
  color: #e74c3c;
}

.wm-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.wm-key {
  height: 52px;
  background: #fff;
  border: 1.5px solid var(--color-outline-variant);
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--color-outline-variant);
  transition: all 0.08s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.wm-key:active { transform: translateY(4px); box-shadow: 0 0 0 var(--color-outline-variant); }

.wm-key.clear { font-size: 13px; font-weight: 800; color: var(--text-muted); background: var(--color-surface-container-low); }
.wm-key.submit { background: var(--test-accent); border-color: var(--test-accent); box-shadow: 0 4px 0 color-mix(in srgb, var(--test-accent) 60%, black); color: #fff; }
.wm-key.submit:active { box-shadow: 0 0 0 color-mix(in srgb, var(--test-accent) 60%, black); }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── INTRO VISUAL MAPPING ── */
/* ── INTRO VISUAL EXAMPLE ── */
.wm-preview-arena {
  position: relative;
  width: 280px;
  height: 120px;
  background: color-mix(in srgb, var(--test-accent) 2%, rgba(0,0,0,0.35));
  border: 1.5px solid var(--color-outline);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

html.light .wm-preview-arena {
  background: color-mix(in srgb, var(--test-accent) 4%, rgba(0,0,0,0.04));
}

.wm-preview-card {
  background: var(--color-surface-container-high);
  border: 1.5px solid var(--color-outline);
  border-radius: 8px;
  padding: 12px 16px;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.wm-preview-digits {
  font-family: var(--font-h);
  font-size: 24px;
  font-weight: 800;
  color: var(--test-accent);
  letter-spacing: 4px;
  height: 28px;
}

.wm-preview-digits::after {
  content: '4  1  7';
  animation: wmDigitsText 5.5s infinite steps(1);
}

@keyframes wmDigitsText {
  0%, 40% { content: '4  1  7'; }
  41%, 100% { content: ''; }
}

.wm-preview-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--color-outline);
  width: 80px;
  height: 20px;
  font-family: var(--font-h);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  animation: wmInputBorder 5.5s infinite steps(1);
}

@keyframes wmInputBorder {
  0%, 76% { border-color: var(--color-outline); color: var(--text); }
  77%, 88% { border-color: #10b981; color: #10b981; }
  89%, 100% { border-color: var(--color-outline); color: var(--text); }
}

.wm-preview-input-val::after {
  content: '';
  animation: wmInputValue 5.5s infinite steps(1);
}

@keyframes wmInputValue {
  0%, 47% { content: ''; }
  48%, 57% { content: '4'; }
  58%, 67% { content: '41'; }
  68%, 88% { content: '417'; }
  89%, 100% { content: ''; }
}

.wm-preview-cursor {
  color: var(--test-accent);
  animation: wmCursorBlink 1.0s infinite;
}

@keyframes wmCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.wm-preview-caption {
  font-family: var(--font-b);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  line-height: 1.4;
  margin-bottom: 16px;
}

.wm-preview-caption .wm-highlight {
  color: var(--test-accent);
  font-weight: 700;
}

@media (max-width: 480px) {
  .wm-box {
    min-height: 320px;
  }
}


