/* =====================================================================
   ППО-ТРЕНАЖЁР — ГЛОБАЛЬНЫЕ СТИЛИ

   Дизайн-концепция: «приборная панель». Тёмный графитово-синий фон,
   инструментальный зелёный акцент (как индикатор авиагоризонта / HUD)
   и янтарный акцент для предупреждений/статусов. Моноширинный шрифт
   используется для кодов модулей и статусов — как на приборной доске.
   ===================================================================== */

:root {
  /* Цвета */
  --bg: #10151b;
  --bg-elevated: #171e26;
  --bg-card: #1b2330;
  --line: #2a3442;
  --line-soft: #232b38;

  --text: #e7ecf2;
  --text-dim: #97a3b3;
  --text-faint: #5f6b7a;

  --accent: #3ee6a8;       /* авиагоризонт / HUD зелёный */
  --accent-dim: #24996f;
  --accent-glow: rgba(62, 230, 168, 0.18);

  --warn: #f2b84b;         /* янтарный, для «не реализовано» */
  --warn-dim: #8a6a2a;

  /* Типографика */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  /* Форма */
  --radius: 14px;
  --radius-sm: 8px;
}

@font-face {
  font-family: "Space Grotesk";
  src: local("Space Grotesk");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at top, #141b23 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ===================== ШАПКА ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 21, 27, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.brand-mark {
  color: var(--accent);
  font-size: 1.2rem;
  transform: rotate(45deg);
  display: inline-block;
}

.brand-accent {
  color: var(--accent);
  font-weight: 500;
}

.header-nav {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.header-nav a:hover {
  color: var(--text);
}

/* ===================== ГЕРОЙ-БЛОК ===================== */

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px 32px;
}

.hero-inner {
  max-width: 680px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  color: var(--text);
}

.hero-subtitle {
  margin: 20px 0 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
}

/* Строка статуса — сигнатурный элемент дизайна */

.status-strip {
  margin-top: 48px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.status-strip-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  white-space: nowrap;
}

.status-strip-track {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.status-dot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: none;
  flex-shrink: 0;
}

.status-dot-item.is-ready .status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ===================== СЕТКА МОДУЛЕЙ ===================== */

.modules {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

.modules-header {
  margin-bottom: 28px;
}

.modules-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.modules-header p {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.test-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}

.test-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  background: #1e2734;
}

.test-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.test-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.test-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.test-card-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  padding-top: 4px;
}

.test-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.test-card-desc {
  font-size: 0.87rem;
  color: var(--text-dim);
  margin: 0;
  flex-grow: 1;
}

.test-card-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 7px;
}

.test-card-status .status-dot {
  width: 7px;
  height: 7px;
}

.test-card.is-ready .test-card-status {
  color: var(--accent);
}

.test-card.is-ready .test-card-status .status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ===================== ОБЛАСТЬ ЗАПУСКА ТЕСТА ===================== */

.test-area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

#test-container:empty {
  display: none;
}

/* ===================== ПОДВАЛ ===================== */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 28px 24px 40px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ===================== УВЕДОМЛЕНИЕ (TOAST) ===================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100% - 48px);
  text-align: center;
  z-index: 50;
}

.toast::before {
  content: "⚠";
  color: var(--warn);
  margin-right: 8px;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* ===================== АДАПТИВНОСТЬ ===================== */

@media (max-width: 640px) {
  .header-nav {
    display: none;
  }

  .hero {
    padding: 48px 20px 24px;
  }

  .modules {
    padding: 48px 20px 32px;
  }
}

/* ===================== СНИЖЕНИЕ АНИМАЦИИ ===================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .test-card {
    transition: none;
  }
}








/* ===================== АКТИВНЫЙ ТЕСТ ===================== */

.active-test {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.active-test-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}

.back-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.back-button:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.active-test-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.test-mount {
  padding: 40px 24px;
  text-align: center;
}

.arithmetic-timer-wrap {
  margin-bottom: 8px;
}

.arithmetic-timer {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--warn);
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.arithmetic-progress {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  margin: 24px 0 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.arithmetic-column {
  display: inline-block;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 36px;
  margin: 20px 0;
  line-height: 1.7;
}

.arithmetic-column .op,
.arithmetic-column .num {
  display: block;
}

.arithmetic-column .op {
  padding-left: 25px;
  color: var(--accent);
}

.arithmetic-answer-input {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  padding: 14px 18px;
  width: 200px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  margin-top: 8px;
}

.arithmetic-answer-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-primary {
  margin-top: 20px;
  padding: 14px 34px;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  background: var(--accent);
  color: #0c1310;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
  background: #58edb8;
  transform: translateY(-1px);
}

.arithmetic-result {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 1rem;
  min-height: 1.4em;
}

.arithmetic-result.is-correct {
  color: var(--accent);
}

.arithmetic-result.is-wrong {
  color: #f2735b;
}

.arithmetic-final .score {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  color: var(--accent);
  margin: 16px 0;
}

.arithmetic-final p {
  color: var(--text-dim);
  margin: 6px 0;
}





/* ---- тест «Отсчёт времени» ---- */

.slider-container {
  margin: 20px 0 28px;
}

.slider-container input[type="range"] {
  width: 280px;
  accent-color: var(--accent);
}

.selected-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 8px;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--text);
  margin: 14px 0;
}

.btn-start,
.btn-stop,
.btn-restart {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin: 6px 6px 6px 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-start {
  background: var(--accent);
  color: #0c1310;
}

.btn-start:hover:not(:disabled) {
  background: #58edb8;
  transform: translateY(-1px);
}

.btn-stop {
  background: var(--warn);
  color: #241a05;
}

.btn-restart {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
}

.btn-start:disabled,
.btn-stop:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.attempt {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 10px 0;
  text-align: left;
}

.result {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.test-mount .test-container {
  display: inline-block;
  max-width: 560px;
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.test-mount .test-container h1 {
  font-size: 1.3rem;
  text-align: center;
  margin-top: 0;
}

.test-mount .test-container h3 {
  text-align: center;
}






/* ---- тест «Количественные отношения» ---- */

.gl-start-page h2,
.gl-results-page h2 {
  text-align: center;
  margin-bottom: 8px;
}

.gl-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.gl-instructions {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  text-align: left;
}

.gl-instructions h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1rem;
}

.gl-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.gl-instructions li {
  padding: 5px 0 5px 20px;
  position: relative;
}

.gl-instructions li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 4px;
}

.gl-example {
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.gl-example h3 {
  color: var(--warn);
  margin-bottom: 12px;
  font-size: 1rem;
}

.gl-example-conditions,
.gl-example-solution {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
  color: var(--text);
  background: var(--bg-card);
  padding: 14px;
  border-radius: var(--radius-sm);
}

.gl-example-solution {
  margin-top: 12px;
  border-top: 1px dashed var(--warn-dim);
  padding-top: 14px;
}

.gl-example-answer {
  margin-top: 10px;
  font-weight: 700;
  color: var(--accent);
}

.gl-start-btn,
.gl-restart-btn {
  width: 100%;
}

.gl-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.gl-progress-text {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.gl-timer {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--warn);
}

.gl-timer.is-warning {
  animation: gl-pulse 1s infinite;
}

@keyframes gl-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.gl-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  margin-bottom: 32px;
  overflow: hidden;
}

.gl-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.gl-condition-line {
  font-size: 1.1rem;
  padding: 8px 0;
}

.gl-label {
  font-weight: 700;
  color: var(--accent);
}

.gl-multiplier {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--warn);
  font-weight: 600;
  margin-left: 8px;
}

.gl-question-line {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 32px 0;
  letter-spacing: 6px;
}

.gl-q-mark {
  color: var(--warn);
}

.gl-answer-buttons {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
}

.gl-answer-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 2.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gl-answer-btn:hover:not(:disabled) {
  border-color: var(--accent-dim);
  transform: scale(1.06);
}

.gl-answer-btn.is-correct {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.gl-answer-btn.is-wrong {
  border-color: #f2735b;
  background: rgba(242, 115, 91, 0.12);
  color: #f2735b;
}

.gl-results-score {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
}

.gl-results-score span {
  font-size: 1.1rem;
  color: var(--text-faint);
}

.gl-result-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--line);
  padding: 16px 20px;
  margin-bottom: 14px;
  text-align: left;
}

.gl-result-item.is-correct { border-left-color: var(--accent); }
.gl-result-item.is-wrong { border-left-color: #f2735b; }

.gl-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.gl-result-number {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.gl-result-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.gl-result-status.is-correct { background: var(--accent); color: #0c1310; }
.gl-result-status.is-wrong { background: #f2735b; color: #2a0d07; }

.gl-result-conditions {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  line-height: 1.7;
}

.gl-result-question {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.gl-wrong-mark { color: #f2735b; }
.gl-correct-mark { color: var(--accent); margin-left: 10px; font-weight: 400; font-size: 0.85rem; }

.gl-result-explanation {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  white-space: pre-wrap;
}







/* ---- тест «Шкалы» ---- */

.sc-start-page h2,
.sc-results-page h2 {
  text-align: center;
  margin-bottom: 8px;
}

.sc-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.sc-instructions {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  text-align: left;
}

.sc-instructions h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1rem;
}

.sc-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.sc-instructions li {
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.6;
}

.sc-instructions li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 4px;
}

.sc-start-btn,
.sc-restart-btn {
  width: 100%;
}

.sc-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sc-progress-text {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.sc-timer {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--warn);
}

.sc-timer.is-warning {
  animation: sc-pulse 1s infinite;
}

@keyframes sc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sc-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}

.sc-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.sc-scales-section h3,
.sc-route-section h3 {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.sc-scales-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
  justify-items: center;
}

.sc-scale-wrapper svg {
  border-radius: 8px;
}

.sc-route-section {
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.sc-route-container {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.sc-answer-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sc-answer-section label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
}

.sc-answer-input {
  width: 150px;
  padding: 12px 16px;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: center;
}

.sc-answer-input:focus {
  outline: none;
  border-color: var(--accent);
}

.sc-answer-input.is-error {
  border-color: #f2735b;
  animation: sc-shake 0.4s;
}

@keyframes sc-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.sc-next-btn {
  width: auto;
  padding: 12px 30px;
}

.sc-results-score {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
}

.sc-results-score span {
  font-size: 1.1rem;
  color: var(--text-faint);
}

.sc-result-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--line);
  padding: 16px 20px;
  margin-bottom: 14px;
  text-align: left;
}

.sc-result-item.is-correct { border-left-color: var(--accent); }
.sc-result-item.is-wrong { border-left-color: #f2735b; }

.sc-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sc-result-number {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.sc-result-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.sc-result-status.is-correct { background: var(--accent); color: #0c1310; }
.sc-result-status.is-wrong { background: #f2735b; color: #2a0d07; }

.sc-result-route {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  line-height: 1.6;
}

.sc-result-answer {
  font-size: 0.95rem;
  font-weight: 600;
}

.sc-correct-val { color: var(--accent); }
.sc-wrong-val { color: #f2735b; }






/* ---- тест «Реакция» ---- */

.rx-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.rx-overlay.is-playing {
  padding: 0;
  display: block;
}

.rx-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.rx-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.rx-instruction {
  max-width: 620px;
  text-align: center;
}

.rx-instruction h2 {
  margin-bottom: 20px;
}

.rx-instructions-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
}

.rx-instructions-list li {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 6px 0 6px 20px;
  position: relative;
}

.rx-instructions-list li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 4px;
}

.rx-speed-control {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.rx-speed-input {
  width: 70px;
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.rx-speed-input:focus {
  outline: none;
  border-color: var(--accent);
}

.rx-game {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.rx-plank {
  position: absolute;
  left: 150px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 80vh;
  background: var(--bg-card);
  border: 3px solid var(--accent-dim);
  border-radius: 4px;
}

.rx-dot {
  position: absolute;
  width: 18px;
  height: 30px;
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.rx-info-panel {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  gap: 20px;
}

.rx-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.rx-feedback.is-visible {
  opacity: 1;
}

.rx-feedback.is-success {
  color: var(--accent);
}

.rx-feedback.is-fail {
  color: #f2735b;
}

.rx-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 500px;
  text-align: center;
}

.rx-result-text {
  color: var(--text-dim);
  margin: 0 0 20px;
}

/* ---- фикс раскладки блока с инструкцией теста «Реакция» ---- */

.rx-overlay {
  flex-direction: column;
}

.rx-instruction {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.rx-instructions-list {
  width: 100%;
  box-sizing: border-box;
}

.rx-speed-control {
  width: 100%;
}

.rx-start-btn {
  width: auto;
  min-width: 220px;
  align-self: center;
}




/* ---- информационная карточка (СМИЛ и подобные) ---- */

.test-card.is-info {
  cursor: default;
}

.test-card.is-info:hover {
  transform: none;
}

.test-card-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-card-link {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.test-card-link:hover {
  background: var(--accent);
  color: #0c1310;
}


/* ---- тест «Арифметика на слух» ---- */

.aa-instructions h2 {
  text-align: center;
  margin-bottom: 8px;
}

.aa-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.aa-instructions-box {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  text-align: left;
}

.aa-instructions-box h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1rem;
}

.aa-instructions-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.aa-instructions-box li {
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.6;
}

.aa-instructions-box li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 4px;
}
.aa-example {
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}
.aa-example h3 {
  color: var(--warn);
  margin-bottom: 12px;
  font-size: 1rem;
}

.aa-example-numbers,
.aa-example-solution {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  padding: 14px;
  border-radius: var(--radius-sm);
}
.aa-example-solution {
  margin-top: 12px;
  border-top: 1px dashed var(--warn-dim);
  padding-top: 14px;
}
.aa-example-answer {
  margin-top: 10px;
  font-weight: 700;
  color: var(--accent);
}
.aa-start-btn {
  width: 100%;
}

.aa-progress {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.aa-display {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 16px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aa-status {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  min-height: 24px;
  margin-bottom: 10px;
}

.aa-countdown {
  color: var(--accent);
  font-weight: 700;
}

.aa-input-area {
  text-align: center;
  margin: 20px 0;
}

.aa-answer-input {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  padding: 14px;
  width: 260px;
  text-align: center;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.aa-answer-input:focus {
  outline: none;
  border-color: var(--accent);
}

.aa-start-series-wrap {
  text-align: center;
}

.aa-results h2 {
  text-align: center;
  margin-bottom: 20px;
}

.aa-series-result {
  background: var(--bg-elevated);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
  text-align: left;
  color: var(--text-dim);
  line-height: 1.7;
}

.aa-series-result strong {
  color: var(--text);
}

.aa-series-result.is-correct {
  border-left-color: var(--accent);
}

.aa-series-result.is-wrong {
  border-left-color: #f2735b;
  background: rgba(242, 115, 91, 0.06);
}

.aa-summary {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  text-align: center;
}

.aa-summary h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

.aa-summary p {
  color: var(--text-dim);
  margin: 6px 0;
}

.aa-restart-btn {
  display: block;
  margin: 20px auto 0;
}




/* ---- тест «Траектория» ---- */

.tj-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
}

.tj-canvas-container {
  position: relative;
  flex: 1 1 640px;
  max-width: 760px;
}

.tj-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.tj-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 21, 27, 0.94);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.tj-menu-overlay.is-hidden {
  display: none;
}

.tj-menu-overlay h2 {
  margin-bottom: 16px;
}

.tj-instructions {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  max-width: 480px;
  text-align: left;
  margin-bottom: 18px;
}

.tj-instructions h3 {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.tj-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.tj-instructions li {
  padding: 4px 0 4px 18px;
  position: relative;
  line-height: 1.5;
}

.tj-instructions li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 2px;
}

.tj-speed-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.tj-speed-control input[type="range"] {
  width: 180px;
  accent-color: var(--accent);
}

.tj-speed-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 30px;
}

.tj-hint {
  margin-top: 10px;
  text-align: center;
  color: var(--text);
  font-size: 0.9rem;
  min-height: 20px;
}

.tj-info {
  margin-top: 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.tj-results-panel {
  flex: 0 0 300px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: none;
}

.tj-results-panel.is-visible {
  display: block;
}

.tj-results-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.tj-result-item {
  margin-bottom: 14px;
}

.tj-label {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.tj-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
}

.tj-score {
  font-size: 2.4rem;
  font-weight: 700;
  text-align: center;
  margin: 16px 0;
}

.tj-score.is-excellent { color: var(--accent); }
.tj-score.is-good { color: var(--warn); }
.tj-score.is-poor { color: #f2735b; }

.tj-verdict {
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: 18px;
}

.tj-verdict.is-passed {
  background: var(--accent);
  color: #0c1310;
}

.tj-verdict.is-failed {
  background: #f2735b;
  color: #2a0d07;
}

.tj-legend {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.7;
}

.tj-restart-btn {
  width: 100%;
  margin-top: 18px;
}


/* ---- полноэкранный режим теста «Траектория» ---- */

.tj-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.tj-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tj-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.tj-canvas-container {
  max-width: 1000px;
}



/* ---- тест «Компасы» (полноэкранный режим) ---- */

.cp-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow-y: auto;
  padding: 40px 24px 60px;
}

.cp-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cp-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.cp-start-screen,
.cp-test-screen,
.cp-results-screen {
  max-width: 900px;
  margin: 0 auto;
}

.cp-start-screen h2,
.cp-test-screen h2,
.cp-results-screen h2 {
  text-align: center;
  margin-bottom: 20px;
}

.cp-instruction-box {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.cp-instruction-box h3 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 10px;
}

.cp-instruction-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.cp-instruction-box li {
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.6;
}

.cp-instruction-box li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 4px;
}

.cp-instruction-box ul ul {
  margin-top: 6px;
}

.cp-start-btn,
.cp-finish-btn,
.cp-restart-btn {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 24px auto 0;
}

.cp-timer {
  position: fixed;
  top: 20px;
  right: 160px;
  z-index: 1000;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
}

.cp-timer.is-warning {
  border-color: var(--warn-dim);
  color: var(--warn);
}

.cp-timer.is-danger {
  border-color: #f2735b;
  color: #f2735b;
  animation: cp-pulse 0.6s infinite;
}

@keyframes cp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cp-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  margin-bottom: 24px;
  overflow: hidden;
}

.cp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

.cp-compass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.cp-compass-item {
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  transition: border-color 0.15s ease;
}

.cp-compass-item.is-answered {
  border-color: var(--accent-dim);
}

.cp-compass-svg {
  width: 120px;
  height: 120px;
  margin: 0 auto 8px;
}

.cp-direction-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.cp-direction-btn {
  padding: 6px 4px;
  font-size: 0.72rem;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-dim);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cp-direction-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.cp-direction-btn.is-selected {
  background: var(--accent);
  color: #0c1310;
  border-color: var(--accent);
  font-weight: 700;
}

.cp-results-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 28px;
}

.cp-score-display {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.cp-percentage-display {
  color: var(--text-dim);
  margin-bottom: 20px;
}

.cp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.cp-stat-box {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.cp-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

.cp-stat-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.cp-review-container {
  margin-bottom: 20px;
}

.cp-review-item {
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cp-review-item.is-correct {
  border-color: var(--accent-dim);
}

.cp-review-item.is-incorrect {
  border-color: #f2735b;
}

.cp-review-item .cp-compass-svg {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  margin: 0;
}

.cp-review-info {
  flex: 1;
  text-align: left;
}

.cp-review-answer {
  font-size: 0.9rem;
  line-height: 1.6;
}

.cp-review-answer.is-correct {
  color: var(--accent);
}

.cp-review-answer.is-incorrect {
  color: #f2735b;
}

@media (max-width: 640px) {
  .cp-timer {
    right: 20px;
    top: 70px;
  }
}




/* ---- тест «Часы» (полноэкранный режим) ---- */

.cl-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow-y: auto;
  padding: 40px 24px 60px;
}

.cl-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cl-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.cl-start-screen,
.cl-test-screen,
.cl-results-screen {
  max-width: 1000px;
  margin: 0 auto;
}

.cl-start-screen h2,
.cl-test-screen h2,
.cl-results-screen h2 {
  text-align: center;
  margin-bottom: 8px;
}

.cl-start-btn,
.cl-finish-btn,
.cl-restart-btn {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 24px auto 0;
}

.cl-timer {
  position: fixed;
  top: 20px;
  right: 160px;
  z-index: 1000;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
}

.cl-timer.is-warning {
  border-color: var(--warn-dim);
  color: var(--warn);
}

.cl-timer.is-danger {
  border-color: #f2735b;
  color: #f2735b;
  animation: cl-pulse 0.6s infinite;
}

@keyframes cl-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cl-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  margin-bottom: 24px;
  overflow: hidden;
}

.cl-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

/* justify-content: center решает "уезжание" неполного последнего ряда */
.cl-clock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  justify-content: center;
  gap: 22px;
  margin-bottom: 24px;
}

.cl-clock-item {
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: border-color 0.15s ease;
}

.cl-clock-item.is-answered {
  border-color: var(--accent-dim);
}

.cl-clock-svg {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
}

.cl-time-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.cl-time-input input {
  width: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.cl-time-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.cl-time-input span {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dim);
}

.cl-results-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 28px;
}

.cl-score-display {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.cl-percentage-display {
  color: var(--text-dim);
  margin-bottom: 20px;
}

.cl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.cl-stat-box {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.cl-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

.cl-stat-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.cl-review-container {
  margin-bottom: 20px;
}

.cl-review-item {
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cl-review-item.is-correct {
  border-color: var(--accent-dim);
}

.cl-review-item.is-incorrect {
  border-color: #f2735b;
}

.cl-review-item .cl-clock-svg {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  margin: 0;
}

.cl-review-info {
  flex: 1;
  text-align: left;
}

.cl-review-answer {
  font-size: 0.9rem;
  line-height: 1.6;
}

.cl-review-answer.is-correct {
  color: var(--accent);
}

.cl-review-answer.is-incorrect {
  color: #f2735b;
}

@media (max-width: 640px) {
  .cl-timer {
    right: 20px;
    top: 70px;
  }
}





/* ---- тест «Таблица Шульте» ---- */

.sh-wrap {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.sh-wrap h2 {
  margin-bottom: 20px;
}

.sh-menu-section {
  margin-bottom: 18px;
}

.sh-menu-section h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.sh-menu {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.sh-mode-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.sh-mode-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.sh-mode-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0c1310;
  font-weight: 600;
}

.sh-toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 14px 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.sh-toggle-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.sh-instruction {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 18px 0;
  text-align: left;
}

.sh-instruction-main {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.sh-instruction-line {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-top: 6px;
}

.sh-letter-reminder {
  color: var(--warn);
  font-weight: 600;
}

.sh-color-tag {
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 700;
  color: #fff;
}

.sh-color-tag.sh-color-red { background: #c0392b; }
.sh-color-tag.sh-color-black { background: #1a1a1a; }
.sh-color-tag.sh-color-blue { background: #2980b9; }

.sh-info {
  margin: 14px 0;
}

.sh-timer {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--warn);
}

.sh-modern-grid,
.sh-retro-grid {
  display: grid;
  gap: 4px;
  margin: 16px auto 0;
  justify-content: center;
  width: fit-content;
}

.sh-retro-grid {
  gap: 6px;
  background: #d0d0d0;
  padding: 10px;
  border: 3px solid #000;
  border-radius: var(--radius-sm);
}

.sh-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  transition: background 0.1s, transform 0.1s;
  position: relative;
}

.sh-cell:hover { transform: scale(1.05); }

.sh-num {
  font-size: 26px;
  font-weight: bold;
  line-height: 1;
}

.sh-letter {
  font-size: 13px;
  font-weight: bold;
  opacity: 0.85;
  margin-top: 3px;
}

.sh-cell.sh-color-red   { background: #c0392b; color: #fff; }
.sh-cell.sh-color-black { background: #1a1a1a; color: #fff; }
.sh-cell.sh-color-blue  { background: #2980b9; color: #fff; }
.sh-cell.is-error       { background: #e74c3c !important; }

.sh-retro-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  position: relative;
  border: 3px solid #000;
  transition: background 0.1s;
}

.sh-retro-cell .sh-num { font-size: 30px; }
.sh-retro-cell .sh-letter { font-size: 15px; margin-top: 3px; }

.sh-retro-cell.sh-color-blue  { background: #4a90e2; color: #000; }
.sh-retro-cell.sh-color-red   { background: #8b0000; color: #fff; }
.sh-retro-cell.sh-color-black { background: #222; color: #fff; }
.sh-retro-cell.is-error       { background: #e74c3c !important; }

.sh-cursor {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 13px;
  background: #8b008b;
  border: 2px solid #000;
}

.sh-result {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-dim);
}

.sh-answer {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

.sh-answer-label {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.sh-answer-value {
  color: var(--accent);
  font-size: 1.2rem;
  letter-spacing: 3px;
  word-break: break-all;
  line-height: 1.8;
}

.sh-restart-btn {
  margin-top: 18px;
  width: auto;
  padding: 12px 32px;
}

/* ---- новый пошаговый флоу Шульте: скрытие экранов ---- */

.sh-selection-screen.is-hidden,
.sh-pre-screen.is-hidden {
  display: none;
}

.sh-continue-btn,
.sh-begin-btn {
  margin-top: 20px;
  width: auto;
  padding: 14px 40px;
}

.sh-continue-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ---- фикс: is-hidden не был объявлен для игровых блоков Шульте ---- */

.sh-modern-grid.is-hidden,
.sh-retro-grid.is-hidden,
.sh-info.is-hidden,
.sh-result.is-hidden,
.sh-restart-btn.is-hidden {
  display: none;
}

.sh-selection-hint {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.sh-num-tag {
  display: inline-block;
  min-width: 24px;
  padding: 2px 9px;
  margin: 0 2px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-align: center;
}

.sh-num-tag.sh-color-red   { background: #c0392b; }
.sh-num-tag.sh-color-black { background: #1a1a1a; border: 1px solid #444; }
.sh-num-tag.sh-color-blue  { background: #2980b9; }





/* ---- тест «Кольца Ландольта» (полноэкранный режим) ---- */

.ld-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow-y: auto;
  padding: 40px 24px 60px;
}

.ld-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ld-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.ld-screen {
  display: none;
  max-width: 1000px;
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ld-screen.is-active {
  display: flex;
}

.ld-test-screen.is-active {
  max-width: none;
  display: block;
}

.ld-results-screen.is-active {
  max-width: none;
  width: 100%;
}

.ld-results-task-block,
.ld-results-stats,
.ld-results-grid-title,
.ld-legend {
  max-width: 1000px;
  width: 100%;
}

.ld-mode-screen h2,
.ld-instruction-screen h2,
.ld-task-screen h2,
.ld-results-screen h2 {
  margin-bottom: 24px;
}

.ld-mode-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.ld-mode-select-btn {
  width: auto;
  padding: 20px 40px;
  font-size: 1.05rem;
}

.ld-instruction-text {
  max-width: 560px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 30px;
}

.ld-instruction-text strong {
  color: var(--text);
}

.ld-key {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 5px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0 4px;
}

.ld-continue-btn,
.ld-start-test-btn,
.ld-restart-btn {
  width: auto;
  padding: 16px 50px;
  font-size: 1.05rem;
}

.ld-timer-display {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 28px;
}

.ld-timer-display.is-warning {
  color: #f2735b;
  animation: ld-pulse 1s infinite;
}

@keyframes ld-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ld-task-examples {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.ld-task-example-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 30px;
  background: var(--bg-elevated);
  border: 2px solid var(--warn-dim);
  border-radius: var(--radius);
}

.ld-task-example-card .ld-ring-svg {
  width: 110px;
  height: 110px;
}

.ld-example-label {
  font-weight: 700;
  color: var(--warn);
}

.ld-cross-symbol {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f2735b;
}

.ld-task-hint {
  max-width: 500px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.ld-test-hint {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-dim);
  z-index: 1000;
}

.ld-test-timer {
  position: fixed;
  top: 20px;
  right: 160px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--warn);
  z-index: 1000;
}

.ld-test-timer.is-warning {
  border-color: #f2735b;
  color: #f2735b;
  animation: ld-pulse 1s infinite;
}

.ld-rings-grid {
  display: grid;
  grid-template-columns: repeat(25, 1fr);
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 70px auto 90px;
}

.ld-ring-cell {
  position: relative;
  padding: 6px 6px 18px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.ld-ring-cell.is-active {
  border-color: var(--accent);
  transform: scale(1.12);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 10;
}

.ld-ring-cell.is-marked {
  border-color: var(--accent-dim);
  background: #1c2b26;
}

.ld-ring-cell.is-passed {
  opacity: 0.45;
}

.ld-ring-svg {
  width: 38px;
  height: 38px;
  display: block;
}

.ld-underline-container {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.ld-underline-line {
  width: 26px;
  height: 3px;
  background: var(--accent);
  border-radius: 1px;
}

.ld-crossmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
}

.ld-crossmark::before,
.ld-crossmark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  background: #f2735b;
  border-radius: 1px;
}

.ld-crossmark::before { transform: rotate(45deg); }
.ld-crossmark::after { transform: rotate(-45deg); }

.ld-progress-bar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-dim);
  z-index: 1000;
}

.ld-results-task-block {
  background: var(--bg-elevated);
  border: 2px solid var(--warn-dim);
  border-radius: var(--radius);
  padding: 20px 30px;
  margin-bottom: 24px;
  width: 100%;
}

.ld-results-task-title {
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 14px;
}

.ld-results-task-examples {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.ld-results-task-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--warn-dim);
  border-radius: var(--radius-sm);
}

.ld-results-task-card .ld-ring-svg {
  width: 70px;
  height: 70px;
}

.ld-task-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--warn);
}

.ld-results-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.ld-accuracy-score {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.ld-time-line {
  color: var(--text-dim);
  margin-bottom: 20px;
}

.ld-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.ld-stat-box {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.ld-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.ld-stat-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.ld-stat-correct { color: var(--accent); }
.ld-stat-incorrect { color: #f2735b; }
.ld-stat-warning,
.ld-stat-missed { color: var(--warn); }

.ld-results-grid-title {
  font-weight: 700;
  margin-bottom: 14px;
}

.ld-legend {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ld-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.ld-legend-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.ld-legend-box.ld-legend-ok { background: #1c2b26; border: 2px solid var(--accent); }
.ld-legend-box.ld-legend-err { background: #2a1613; border: 2px solid #f2735b; }
.ld-legend-box.ld-legend-miss { background: #2a2213; border: 2px dashed var(--warn); }
.ld-legend-box.ld-legend-neutral { background: var(--bg-elevated); border: 2px solid var(--line); }

.ld-results-grid {
  display: grid;
  grid-template-columns: repeat(25, 1fr);
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 30px;
}

.ld-result-cell {
  position: relative;
  padding: 6px 6px 18px 6px;
  background: var(--bg-elevated);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.ld-result-cell.is-correct { border: 2px solid var(--accent); background: #1c2b26; }
.ld-result-cell.is-wrong { border: 2px solid #f2735b; background: #2a1613; }
.ld-result-cell.is-missed { border: 2px dashed var(--warn); background: #2a2213; }
.ld-result-cell.is-neutral { border: 1px solid var(--line); }

.ld-result-cell .ld-ring-svg { width: 34px; height: 34px; }


.ld-underline-result {
  bottom: 12px;
}

.ld-crossmark-small {
  width: 26px;
  height: 26px;
}

.ld-result-label {
  position: absolute;
  bottom: 2px;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

.ld-label-ok { color: var(--accent); }
.ld-label-err { color: #f2735b; }
.ld-label-miss { color: var(--warn); }






/* ---- тест «Шифровка» (полноэкранный режим) ---- */

.ci-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow-y: auto;
  padding: 40px 24px 60px;
}

.ci-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ci-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.ci-screen {
  display: none;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.ci-screen.is-active {
  display: block;
}

.ci-test1-screen.is-active,
.ci-test2-screen.is-active,
.ci-results-screen.is-active {
  max-width: none;
}

.ci-screen h2 {
  margin-bottom: 16px;
}

.ci-config-info {
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin: 16px auto;
  max-width: 560px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.ci-start-btn,
.ci-start-early-btn,
.ci-restart-btn {
  width: auto;
  padding: 16px 44px;
  margin-top: 20px;
}

.ci-timer-box {
  background: var(--bg-elevated);
  border: 2px solid #f2735b;
  border-radius: var(--radius);
  padding: 14px 30px;
  margin: 16px auto;
  max-width: 260px;
}

.ci-timer-label {
  color: #f2988a;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.ci-timer {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: #f2735b;
}

.ci-memorize-box,
.ci-reference-table {
  background: var(--bg-elevated);
  border: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 26px;
  margin: 24px auto;
  max-width: 900px;
}

.ci-reference-table {
  border-color: var(--warn-dim);
}

.ci-memorize-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}

.ci-reference-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 14px;
}

.ci-pairs-grid {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.ci-pair-cell {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--accent-dim);
  border-radius: 4px;
  overflow: hidden;
  width: 56px;
}

.ci-reference-table .ci-pair-cell {
  border-color: var(--warn-dim);
}

.ci-pair-top {
  background: var(--bg-card);
  color: var(--text);
  padding: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid var(--accent-dim);
}

.ci-reference-table .ci-pair-top {
  border-bottom-color: var(--warn-dim);
}

.ci-pair-bottom {
  background: var(--bg-elevated);
  color: var(--accent);
  padding: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
}

.ci-stage-label {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: 20px;
}

.ci-test-grid-wrapper {
  margin: 20px auto;
  max-width: 100%;
  overflow-x: auto;
}

.ci-test-grid,
.ci-results-grid {
  display: grid;
  gap: 4px;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
}

.ci-test-cell,
.ci-result-cell {
  border: 2px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 52px;
  background: var(--bg-elevated);
  transition: border-color 0.1s;
}

.ci-test-symbol {
  background: var(--bg-card);
  color: var(--text);
  padding: 8px 2px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid var(--line);
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.ci-test-input {
  background: var(--bg-elevated);
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  user-select: none;
}

.ci-test-cell.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.ci-test-cell.is-active .ci-test-input {
  background: #1c2b26;
}

.ci-test-cell.is-filled .ci-test-input {
  background: var(--bg-card);
}

.ci-test-hint {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  margin-top: 18px;
}

.ci-results-summary {
  background: var(--bg-elevated);
  padding: 26px;
  border-radius: var(--radius);
  margin: 0 auto 24px;
  max-width: 1000px;
}

.ci-score {
  font-size: 2.6rem;
  font-weight: 700;
  text-align: center;
  margin: 16px 0;
}

.ci-score.is-good { color: var(--accent); }
.ci-score.is-mid { color: var(--warn); }
.ci-score.is-poor { color: #f2735b; }

.ci-stats-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 14px 0;
  font-size: 0.9rem;
}

.ci-stat {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
}

.ci-stat-correct { background: #1c2b26; color: var(--accent); }
.ci-stat-wrong { background: #2a1613; color: #f2735b; }
.ci-stat-skipped { background: #2a2213; color: var(--warn); }
.ci-stat-total { background: var(--bg-card); color: var(--text-dim); }

.ci-results-content h3 {
  max-width: 1000px;
  margin: 24px auto 12px;
  font-size: 0.95rem;
  color: var(--text-dim);
  text-align: center;
}

.ci-result-cell.ci-correct { border-color: var(--accent); }
.ci-result-cell.ci-correct .ci-test-input { background: #1c2b26; color: var(--accent); }

.ci-result-cell.ci-wrong { border-color: #f2735b; }
.ci-result-cell.ci-wrong .ci-test-input { background: #2a1613; color: #f2735b; font-size: 0.75rem; }

.ci-result-cell.ci-skipped { border-color: var(--warn); }
.ci-result-cell.ci-skipped .ci-test-input { background: #2a2213; color: var(--warn); }


.ci-pairs-grid-small {
  margin-bottom: 18px;
}

.ci-pairs-grid-small .ci-pair-cell {
  width: 38px;
}

.ci-pairs-grid-small .ci-pair-top,
.ci-pairs-grid-small .ci-pair-bottom {
  padding: 7px 4px;
  font-size: 0.9rem;
}







/* ---- тест «Задачи на время» ---- */

.wp-screen {
  display: none;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.wp-screen.is-active {
  display: block;
}

.wp-screen h2 {
  margin-bottom: 20px;
}

.wp-start-btn,
.wp-restart-btn {
  width: 100%;
  margin-top: 20px;
}

.wp-progress {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.wp-timer {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 20px;
}

.wp-timer.is-warning {
  color: #f2735b;
  animation: wp-pulse 1s infinite;
}

@keyframes wp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.wp-question {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 24px;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: left;
}

.wp-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wp-answer-btn {
  background: var(--bg-elevated);
  border: 2px solid var(--accent-dim);
  color: var(--text);
  padding: 16px 20px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.wp-answer-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #0c1310;
  transform: translateX(4px);
}

.wp-answer-btn:disabled {
  cursor: default;
}

.wp-answer-btn.is-correct {
  background: var(--accent);
  border-color: var(--accent);
  color: #0c1310;
}

.wp-answer-btn.is-wrong {
  background: #f2735b;
  border-color: #f2735b;
  color: #2a0d07;
}

.wp-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 24px;
}

.wp-summary h2 {
  margin-bottom: 8px;
}

.wp-summary-score {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin: 12px 0;
}

.wp-summary-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.wp-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.wp-stat-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.wp-result-item {
  background: var(--bg-elevated);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
  text-align: left;
}

.wp-result-item.is-correct { border-left-color: var(--accent); }
.wp-result-item.is-wrong { border-left-color: #f2735b; }

.wp-result-question {
  font-weight: 700;
  margin-bottom: 10px;
}

.wp-result-answer {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
  background: var(--bg-card);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}











/* ---- тест «Совмещение вырезов» (полноэкранный режим) ---- */

.cx-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow-y: auto;
  padding: 40px 24px 60px;
}

.cx-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cx-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.cx-screen {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.cx-screen.is-active {
  display: block;
}

.cx-test-screen.is-active,
.cx-results-screen.is-active {
  max-width: 1000px;
}

.cx-answers-section,
.cx-results-table,
.cx-score-box {
  width: 100%;
}

.cx-screen h2 {
  margin-bottom: 16px;
}

.cx-description-box p {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 0.9rem;
  text-align: left;
}

.cx-start-btn {
  width: 100%;
  max-width: 400px;
  margin-top: 10px;
}

.cx-test-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.cx-timer {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 10px;
}

.cx-timer.is-warning {
  color: #f2735b;
  animation: cx-pulse 1s infinite;
}

@keyframes cx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cx-progress-bar {
  width: 100%;
  max-width: 700px;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  margin: 10px auto 24px;
  overflow: hidden;
}

.cx-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s linear;
}

.cx-figures-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.cx-figures-row {
  display: grid;
  grid-template-columns: repeat(5, 166px);
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.cx-figure-item {
  text-align: center;
  border: 3px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--bg-elevated);
  transition: all 0.15s ease;
}

.cx-figure-item.is-matched {
  border-color: var(--accent);
  background: #1c2b26;
}

.cx-figure-item canvas {
  display: block;
  margin: 0 auto;
}

.cx-figure-label {
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 5px;
  color: var(--text-dim);
}

.cx-divider {
  width: 85%;
  height: 3px;
  background: var(--line);
  margin: 12px auto;
  border-radius: 2px;
}

.cx-answers-section {
  margin: 25px 0;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
}

.cx-answers-section h3 {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.95rem;
}

.cx-answers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.cx-answer-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.cx-answer-cell label {
  min-width: 22px;
  font-weight: 700;
}

.cx-answer-cell select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
}

.cx-finish-btn {
  width: 100%;
  max-width: 400px;
  margin: 25px auto 0;
}

.cx-score-box {
  text-align: center;
  font-size: 1.1rem;
  margin: 15px 0;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.cx-score-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}

.cx-score-detail {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.cx-results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
}

.cx-results-table th {
  background: var(--bg-card);
  color: var(--accent);
  padding: 12px;
  font-size: 0.8rem;
}

.cx-results-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.cx-results-table tr:last-child td {
  border-bottom: none;
}

.cx-correct { color: var(--accent); font-weight: 700; }
.cx-incorrect { color: #f2735b; font-weight: 700; }

.cx-review-section {
  margin: 25px 0;
  text-align: left;
}

.cx-review-section h3 {
  margin-bottom: 15px;
  color: var(--accent);
  font-size: 1.05rem;
  text-align: center;
}

.cx-review-grid {
  display: grid;
  grid-template-columns: repeat(3, 430px);
  justify-content: center;
  gap: 15px;
}

.cx-review-pair {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 15px;
  text-align: center;
  box-sizing: border-box;
}

.cx-pair-label {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dim);
}

.cx-pair-canvases {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cx-plus-sign {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.cx-equals-sign {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--warn);
}

.cx-restart-btn {
  width: 100%;
  max-width: 400px;
  margin: 25px auto 0;
}

@media (max-width: 750px) {
  .cx-figures-row { grid-template-columns: repeat(3, 166px); }
  .cx-answers-grid { grid-template-columns: repeat(3, 1fr); }
  .cx-review-grid { grid-template-columns: repeat(2, 430px); }
}





/* ---- тест «Циферблат» ---- */

.dl-wrap {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.dl-wrap h2 {
  margin-bottom: 8px;
}

.dl-phase.is-hidden {
  display: none;
}

.dl-phase-indicator {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.dl-memorize-timer {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: #f2735b;
  margin-bottom: 20px;
}

.dl-tables-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dl-table-title {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-weight: 600;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  grid-template-rows: repeat(3, 76px);
  gap: 4px;
  background: var(--line);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

.dl-grid.dl-grid-small {
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 52px);
}

.dl-cell {
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 4px;
  color: var(--text);
}

.dl-grid-small .dl-cell {
  font-size: 1rem;
}

.dl-cell.dl-number-cell { background: #16233a; color: #7db8f0; }
.dl-cell.dl-symbol-cell { background: #2a2213; color: var(--warn); font-size: 1.6rem; }
.dl-grid-small .dl-cell.dl-symbol-cell { font-size: 1.2rem; }
.dl-cell.dl-center-cell { background: #241c33; color: #c79ee8; }

.dl-early-start-btn,
.dl-start-btn,
.dl-restart-btn {
  width: auto;
  padding: 14px 40px;
  margin-top: 10px;
}

.dl-progress-bar {
  width: 100%;
  height: 24px;
  background: var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
}

.dl-progress-fill {
  height: 100%;
  background: var(--accent);
  color: #0c1310;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s;
}

.dl-subtask-timer-container {
  max-width: 460px;
  margin: 14px auto;
}

.dl-subtask-timer-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}

.dl-subtask-timer-bar {
  width: 100%;
  height: 30px;
  background: var(--line);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.dl-subtask-timer-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.1s linear, background 0.3s;
  border-radius: 15px;
}

.dl-subtask-timer-fill.is-warning {
  background: var(--warn);
}

.dl-subtask-timer-fill.is-danger {
  background: #f2735b;
  animation: dl-pulse 0.5s ease-in-out infinite;
}

@keyframes dl-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.dl-subtask-timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.dl-number-display {
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 340px;
  border: 3px dashed var(--line);
}

.dl-answer-display {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  min-height: 60px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 6px;
}

.dl-answer-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.dl-symbol-btn {
  background: var(--bg-elevated);
  color: var(--text);
  border: 2px solid var(--line);
  padding: 12px 20px;
  font-size: 1.3rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.dl-symbol-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.dl-symbol-btn.is-selected {
  background: var(--accent);
  color: #0c1310;
  border-color: var(--accent);
}

.dl-results {
  text-align: center;
  padding: 26px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin: 20px 0;
}

.dl-results h3 {
  color: var(--accent);
  margin-bottom: 16px;
}

.dl-stat {
  font-size: 1.05rem;
  margin: 10px 0;
  color: var(--text-dim);
}

.dl-analysis-section {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.dl-analysis-section h3 {
  color: var(--text);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.dl-reference-tables {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dl-answers-list {
  max-width: 700px;
  margin: 0 auto;
}

.dl-answer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-card);
  border-left: 4px solid var(--line);
}

.dl-answer-row.dl-correct { border-left-color: var(--accent); }
.dl-answer-row.dl-wrong { border-left-color: #f2735b; }
.dl-answer-row.dl-skipped { border-left-color: var(--warn); }

.dl-answer-number {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  min-width: 60px;
}

.dl-answer-user {
  color: var(--text-dim);
  min-width: 100px;
}

.dl-answer-correct {
  color: var(--accent);
  font-weight: 700;
  min-width: 100px;
}

.dl-answer-status {
  font-size: 1.2rem;
  min-width: 30px;
}





/* ---- тест «Утверждения» ---- */

.st-wrap {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.st-wrap h2 {
  margin-bottom: 8px;
}

.st-screen.is-hidden {
  display: none;
}

.st-compass-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.st-compass-item {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 2px solid var(--line);
}

.st-direction {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.st-degrees {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 4px;
}

.st-symbols {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.st-rule-box {
  background: var(--bg-elevated);
  border: 2px solid var(--warn-dim);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  text-align: left;
}

.st-rule-box h4 {
  color: var(--warn);
  margin-bottom: 10px;
}

.st-rule-box p {
  color: var(--text-dim);
  line-height: 1.6;
  margin: 5px 0;
  font-size: 0.9rem;
}

.st-example {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.st-start-btn {
  width: 100%;
  margin-top: 10px;
}

.st-progress-bar-container {
  background: var(--line);
  border-radius: 10px;
  height: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.st-progress-bar {
  background: var(--accent);
  height: 100%;
  transition: width 0.4s ease;
  border-radius: 10px;
}

.st-question-counter {
  color: var(--text-dim);
  margin-bottom: 22px;
  font-size: 0.95rem;
}

.st-question-box {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
  background: var(--bg-elevated);
}

.st-symbols-row {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  margin-bottom: 22px;
}

.st-symbol-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.st-symbol-label {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  font-weight: 600;
}

.st-symbol-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-card);
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.st-symbol-value.is-empty {
  color: var(--text-faint);
  background: var(--bg-elevated);
}

.st-statement-section {
  background: var(--bg-card);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--accent);
}

.st-statement-label {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  font-weight: 600;
}

.st-statement-text {
  font-size: 1.6rem;
  color: var(--text);
  font-weight: 700;
}

.st-buttons {
  display: flex;
  gap: 14px;
}

.st-btn {
  flex: 1;
  padding: 18px;
  font-size: 1.05rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 700;
  color: #0c1310;
}

.st-btn-yes {
  background: var(--accent);
}

.st-btn-yes:hover {
  transform: translateY(-2px);
  background: #58edb8;
}

.st-btn-no {
  background: #f2735b;
  color: #2a0d07;
}

.st-btn-no:hover {
  transform: translateY(-2px);
  background: #f58e78;
}

.st-score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  color: var(--text);
}

.st-score {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.st-score-total {
  font-size: 1rem;
  color: var(--text-dim);
}

.st-feedback-text {
  font-size: 1.05rem;
  margin: 20px 0;
  padding: 20px;
  border-radius: var(--radius);
  line-height: 1.6;
}

.st-feedback-excellent { background: #1c2b26; color: var(--accent); }
.st-feedback-good { background: #2a2213; color: var(--warn); }
.st-feedback-bad { background: #2a1613; color: #f2735b; }

.st-analysis {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 22px;
  text-align: left;
  max-height: 500px;
  overflow-y: auto;
}

.st-analysis h3 {
  color: var(--text);
  margin-bottom: 14px;
  text-align: center;
}

.st-analysis-item {
  padding: 14px;
  margin: 10px 0;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--line);
  background: var(--bg-card);
}

.st-analysis-correct { border-left-color: var(--accent); }
.st-analysis-wrong { border-left-color: #f2735b; }

.st-analysis-header {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--text);
}

.st-analysis-detail {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 4px 0;
  line-height: 1.5;
}

.st-restart-btn {
  width: 100%;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .st-symbol-value { width: 70px; height: 70px; font-size: 1.8rem; }
  .st-symbols-row { gap: 10px; }
  .st-statement-text { font-size: 1.2rem; }
  .st-compass-table { grid-template-columns: 1fr; }
}



/* ---- тест «Словесный тест» ---- */

.ey-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.ey-wrap h2 {
  margin-bottom: 8px;
}

.ey-screen {
  display: none;
  text-align: left;
}

.ey-screen.is-active {
  display: block;
}

.ey-recommendations {
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.ey-recommendations strong {
  color: var(--warn);
}

.ey-note {
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.ey-note strong {
  color: var(--accent);
}

.ey-start-btn {
  width: 100%;
  margin-top: 10px;
}

.ey-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ey-question-number {
  color: var(--accent);
  font-weight: 700;
}

.ey-progress {
  background: var(--bg-elevated);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.ey-type-badge {
  display: inline-block;
  background: var(--accent);
  color: #0c1310;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.ey-question-text {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-dim);
  line-height: 1.6;
}

.ey-question-example {
  background: var(--bg-elevated);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}

.ey-letter-count {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 6px;
  font-style: italic;
}

.ey-input-group {
  margin: 22px 0;
}

.ey-input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-weight: 500;
}

.ey-answer-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
}

.ey-answer-input:focus {
  outline: none;
  border-color: var(--accent);
}

.ey-hint-btn {
  background: var(--bg-card);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 6px;
  transition: all 0.2s ease;
}

.ey-hint-btn:hover {
  background: var(--accent);
  color: #0c1310;
}

.ey-hint-text {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  padding: 12px 14px;
  border-radius: 5px;
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.ey-hint-text.is-shown {
  display: block;
}

.ey-navigation {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.ey-nav-btn {
  flex: 1;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ey-nav-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.ey-next-btn {
  flex: 1;
  width: auto;
  margin-top: 0;
}

.ey-result-screen {
  text-align: center;
}

.ey-score-display {
  font-size: 3.2rem;
  color: var(--accent);
  font-weight: 700;
  margin: 16px 0;
}

.ey-iq-level {
  padding: 16px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  font-weight: 500;
  font-size: 1rem;
}

.ey-iq-excellent { background: #1c2b26; color: var(--accent); }
.ey-iq-good { background: #2a2213; color: var(--warn); }
.ey-iq-average { background: var(--bg-elevated); color: var(--text-dim); }

.ey-result-block {
  background: var(--bg-elevated);
  padding: 22px;
  border-radius: var(--radius);
  margin: 20px 0;
  text-align: left;
}

.ey-result-block h3 {
  color: var(--accent);
  margin-bottom: 14px;
}

.ey-result-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.ey-result-item:last-child {
  border-bottom: none;
}

.ey-answer-info {
  flex: 1;
  color: var(--text-dim);
}

.ey-answer-info small {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.ey-hint-used {
  color: var(--warn) !important;
}

.ey-explanation {
  margin-top: 6px !important;
}

.ey-status {
  font-size: 1.3rem;
  margin-left: 10px;
}

.ey-restart-btn {
  width: 100%;
  margin-top: 10px;
}



/* ---- тест «Диктант» ---- */

.dc-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.dc-wrap h2 {
  text-align: center;
  margin-bottom: 24px;
}

.dc-alert {
  padding: 14px 18px;
  border-left: 5px solid;
  border-radius: 4px;
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dc-alert p {
  margin: 6px 0 0;
}

.dc-alert-red {
  background: #2a1613;
  border-color: #f2735b;
  color: #f2988a;
}

.dc-alert-blue {
  background: #16233a;
  border-color: #7db8f0;
  color: #a8cdf5;
}

.dc-alert-yellow {
  background: #2a2213;
  border-color: var(--warn);
  color: var(--warn);
}

.dc-label-heading {
  color: #7db8f0;
  font-weight: 700;
  margin: 20px 0 8px;
}

.dc-tasks {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.dc-tasks li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.dc-start-intro {
  width: 100%;
  margin-top: 10px;
}

.dc-tests.is-hidden {
  display: none;
}

.dc-intro.is-hidden {
  display: none;
}

.dc-sep {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

.dc-dict-header {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 1.2rem;
  padding: 12px;
  margin: 0 0 18px;
  color: var(--accent);
}

.dc-green {
  color: var(--accent);
  font-weight: 700;
  margin: 14px 0 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dc-section p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

.dc-red-bold {
  color: #f2735b;
  font-weight: 700;
}

.dc-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.dc-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0c1310;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease;
}

.dc-play-btn:hover:not(:disabled) {
  background: #58edb8;
}

.dc-play-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.dc-label {
  font-size: 0.9rem;
  flex: 1;
  min-width: 180px;
  color: var(--text);
}

.dc-count {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.dc-track {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  min-width: 100px;
}

.dc-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}

.dc-counter {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-width: 60px;
  text-align: right;
  color: var(--text-dim);
}

.dc-dashed {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  text-align: center;
  padding: 16px;
  margin: 14px 0;
  font-size: 0.9rem;
}

.dc-results {
  margin-top: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.dc-results.is-hidden {
  display: none;
}

.dc-results h4 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.9rem;
}

.dc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dc-chip {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.dc-hint {
  color: var(--text-faint);
  text-align: center;
  font-size: 0.85rem;
  margin-top: 26px;
}





/* ---- тест «Запоминание слов» ---- */

.wm-wrap {
  max-width: 1000px;
  margin: 0 auto;
}

.wm-wrap h2 {
  text-align: center;
  margin-bottom: 20px;
}

.wm-screen.is-hidden {
  display: none;
}

.aa-instructions-box p {
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.92rem;
}

.wm-example {
  background: var(--bg-elevated);
  border: 1px solid var(--warn-dim);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}

.wm-example-title {
  color: var(--warn);
  font-weight: 700;
  margin-bottom: 12px;
}

.wm-example-inner {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.wm-example-word {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
}

.wm-ex-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.wm-ex-opt {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.wm-start-btn {
  width: 100%;
  margin-top: 20px;
}

.wm-topbar {
  position: sticky;
  top: 70px;
  z-index: 5;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.wm-topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.wm-topbar-meta {
  display: flex;
  gap: 18px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.wm-topbar-meta strong {
  font-family: var(--font-mono);
  color: var(--accent);
}

.wm-memo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.wm-cell {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 8px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
}

.wm-memo-continue,
.wm-finish-btn,
.wm-retry-btn {
  width: 100%;
  margin-top: 10px;
}

.wm-quiz-hint {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.wm-qcard {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 16px;
}

.wm-qnum {
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.wm-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wm-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.wm-opt:hover {
  border-color: var(--accent-dim);
}

.wm-opt input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex: none;
}

.wm-opt span {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.wm-opt.is-checked {
  border-color: var(--accent);
  background: #1c2b26;
}

.wm-opt.is-checked span {
  color: var(--accent);
}

.wm-score-text {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin: 18px 0;
  color: var(--text);
}

.wm-rev {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid;
  font-size: 0.88rem;
}

.wm-rev.wm-ok {
  background: #1c2b26;
  border-color: var(--accent-dim);
  color: var(--accent);
}

.wm-rev.wm-bad {
  background: #2a1613;
  border-color: #f2735b;
  color: #f2988a;
}

@media (max-width: 700px) {
  .wm-memo-grid { grid-template-columns: repeat(2, 1fr); }
  .wm-opts { grid-template-columns: 1fr; }
}



/* ---- «Беседа» ---- */

.iv-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.iv-wrap h2 {
  text-align: center;
  margin-bottom: 8px;
}

.iv-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 24px;
  flex-wrap: wrap;
}

.iv-mode-btn {
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iv-mode-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.iv-mode-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0c1310;
}

.iv-category-block {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.iv-category-header {
  padding: 16px 20px;
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}

.iv-category-header:hover {
  background: #1c2530;
}

.iv-category-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.iv-category-content.is-open {
  padding: 20px;
  max-height: 20000px;
}

.iv-question-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.iv-question-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.iv-q-text {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.05rem;
}

.iv-info-block {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.iv-criteria {
  background: #2a2213;
  border-left: 4px solid var(--warn);
}

.iv-criteria-title {
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 6px;
  display: block;
}

.iv-tip {
  background: #16233a;
  border-left: 4px solid #7db8f0;
}

.iv-tip-title,
.iv-tip-heading {
  font-weight: 700;
  color: #7db8f0;
  margin-bottom: 6px;
  display: block;
}

.iv-example {
  background: #1c2b26;
  border-left: 4px solid var(--accent);
  cursor: pointer;
}

.iv-example-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.iv-example-text {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--accent-dim);
  color: var(--text-dim);
}

.iv-example.is-open .iv-example-text {
  display: block;
}

.iv-example-arrow {
  transition: transform 0.2s ease;
}

.iv-example.is-open .iv-example-arrow {
  transform: rotate(180deg);
}

.iv-flashcard {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.iv-progress-text {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 0.82rem;
  color: var(--text-faint);
  font-weight: 600;
}

.iv-train-question {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 20px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iv-train-tip {
  display: none;
  margin-top: 20px;
  padding: 18px;
  background: #16233a;
  border-left: 4px solid #7db8f0;
  text-align: left;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

.iv-train-tip.is-visible {
  display: block;
}

.iv-flashcard-controls {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.iv-btn-secondary {
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iv-btn-secondary:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.iv-btn-next {
  width: auto;
  padding: 12px 28px;
}





/* ---- тест «Флаги» ---- */

.fl-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.fl-page {
  display: none;
}

.fl-page.is-active {
  display: block;
}

.fl-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}

.fl-card h2 {
  margin-bottom: 8px;
}

.fl-card h3 {
  margin-bottom: 10px;
}

.fl-muted {
  color: var(--text-faint);
}

.fl-steps {
  margin: 10px 0 0 20px;
  color: var(--text-dim);
}

.fl-steps li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.fl-note {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.fl-center {
  text-align: center;
  margin-top: 6px;
}

.fl-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.fl-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.fl-opt {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px 6px;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.12s ease, border-color 0.12s, box-shadow 0.12s;
}

.fl-opt:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.fl-opt.is-selected {
  border-color: var(--accent);
  background: #1c2b26;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.fl-opt.is-selected::after {
  content: '✓ выбран';
  position: absolute;
  top: -10px;
  right: 8px;
  background: var(--accent);
  color: #0c1310;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.fl-num {
  position: absolute;
  top: 6px;
  left: 9px;
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 700;
}

.fl-mark {
  position: absolute;
  top: 3px;
  right: 9px;
  font-size: 16px;
  font-weight: 800;
}

.fl-cap {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 3px;
  min-height: 14px;
  text-align: center;
  line-height: 1.3;
}

.fl-opt svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.fl-opt.fl-mini {
  width: 118px;
  padding: 10px 5px 4px;
  cursor: default;
}

.fl-opt.fl-mini:hover {
  transform: none;
  box-shadow: none;
}

.fl-opt.fl-mini .fl-mark {
  font-size: 14px;
}

.fl-opt.fl-locked {
  cursor: default;
}

.fl-opt.fl-locked:hover {
  transform: none;
  box-shadow: none;
}

.fl-res-ok { border-color: var(--accent) !important; background: #1c2b26 !important; }
.fl-res-ok .fl-mark { color: var(--accent); }
.fl-res-miss { border-color: var(--warn) !important; background: #2a2213 !important; }
.fl-res-miss .fl-mark { color: var(--warn); }
.fl-res-fa { border-color: #f2735b !important; background: #2a1613 !important; }
.fl-res-fa .fl-mark { color: #f2735b; }
.fl-res-neutral { opacity: 0.7; }
.fl-res-neutral .fl-mark { color: var(--text-faint); }

.fl-you {
  background: var(--accent);
  color: #0c1310;
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 10px;
  margin-left: 4px;
}

.fl-ref-block {
  background: var(--bg-card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 20px;
  text-align: center;
}

.fl-lbl {
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
  font-weight: 700;
}

.fl-hint {
  color: var(--text-dim);
  font-size: 14px;
  margin: 12px 0 16px;
  text-align: center;
}

.fl-hint.fl-warn {
  color: #f2735b;
  font-weight: 600;
}

.fl-hint.fl-ok {
  color: var(--accent);
  font-weight: 600;
}

.fl-demo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.fl-btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fl-btn-secondary:hover {
  background: var(--accent);
  color: #0c1310;
}

.fl-btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fl-btn-ghost:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.fl-btn-start {
  padding: 16px 36px;
  width: auto;
}

.fl-test-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fl-progress-info {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
}

.fl-timer {
  font-family: var(--font-mono);
  color: var(--warn);
}

.fl-progress {
  height: 10px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.fl-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s;
}

.fl-task-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.fl-btn-next {
  padding: 16px 36px;
  width: auto;
}

.fl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.fl-stat {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.fl-v {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.fl-k {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 4px;
}

.fl-verdict {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 15px;
  line-height: 1.5;
}

.fl-vt {
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 4px;
}

.fl-v-ok { background: #1c2b26; border-color: var(--accent-dim); color: var(--accent); }
.fl-v-good { background: #16233a; border-color: #7db8f0; color: #a8cdf5; }
.fl-v-mid { background: #2a2213; border-color: var(--warn-dim); color: var(--warn); }
.fl-v-low { background: #2a1613; border-color: #f2735b; color: #f2988a; }

.fl-lg {
  display: flex;
  align-items: center;
  margin: 6px 0;
  font-size: 14px;
  color: var(--text-dim);
}

.fl-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-right: 8px;
  border: 2px solid;
}

.fl-c-ok { background: #1c2b26; border-color: var(--accent); }
.fl-c-miss { background: #2a2213; border-color: var(--warn); }
.fl-c-fa { background: #2a1613; border-color: #f2735b; }
.fl-c-n { background: var(--bg-card); border-color: var(--line); }

.fl-chip-btn {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.15s ease;
}

.fl-chip-btn.is-on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.fl-task-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.fl-task-detail {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.fl-status {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fl-st-ok { background: #1c2b26; color: var(--accent); }
.fl-st-part { background: #2a2213; color: var(--warn); }
.fl-st-bad { background: #2a1613; color: #f2735b; }

.fl-task-body {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.fl-ref-mini {
  flex: 0 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.fl-opts-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

@media (max-width: 640px) {
  .fl-card { padding: 18px; }
}










/* =====================================================================
   Стили теста «Закономерности» (patterns.js)
   Использует переменные темы проекта: --bg, --bg-elevated, --bg-card,
   --line, --accent, --accent-dim, --text, --text-dim, --font-body,
   --font-mono, --radius-sm.
   Проверьте названия --warn ниже перед вставкой — если в вашей теме
   переменная называется иначе, останется рабочий fallback-цвет.
   ===================================================================== */

   .pt-wrap {
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .pt-wrap .hidden {
    display: none !important;
  }
  
  .pt-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  
  .pt-topbar b {
    font-family: var(--font-mono);
    color: var(--text);
  }
  
  .pt-rowline {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  
  .pt-rownum {
    font-weight: 700;
    color: var(--text-dim);
    min-width: 24px;
  }
  
  .pt-code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.05rem;
    background: var(--bg-card);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    letter-spacing: 2px;
    white-space: nowrap;
  }
  
  .pt-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
  }
  
  .pt-word {
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
  }
  
  .pt-word:hover {
    border-color: var(--accent-dim);
  }
  
  .pt-word.marked {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
  }
  
  .pt-word.is-ok {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--accent);
  }
  
  .pt-word.is-err {
    background: var(--bg-card);
    border-color: #f2735b;
    color: #f2735b;
  }
  
  .pt-word.is-miss {
    background: var(--bg-card);
    border-color: var(--warn, #d4a017);
    color: var(--warn, #d4a017);
  }
  
  .pt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 18px 0;
  }
  
  .pt-stat {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
  }
  
  .pt-stat .v {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-mono);
  }
  
  .pt-stat .l {
    color: var(--text-dim);
    font-size: .9rem;
  }
  
  .pt-legend span {
    display: inline-block;
    margin-right: 16px;
    font-size: .9rem;
    color: var(--text-dim);
  }
  
  .pt-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: -1px;
  }
  
  .pt-dot-ok { background: var(--accent); }
  .pt-dot-err { background: #f2735b; }
  .pt-dot-miss { background: var(--warn, #d4a017); }
  
  .pt-finish-btn {
    margin-top: 8px;
  }
  
  @media (max-width: 640px) {
    .pt-code { white-space: normal; }
  }




/* =====================================================================
   Стили теста «Авиагоризонт» (air-horizon.js)
   Цвета самого прибора (небо/земля/лимб) зашиты в SVG намеренно —
   это иллюстрация физического инструмента, не элемент чужой темы.
   Обвязка карточек — на переменных темы проекта.
   ===================================================================== */

   .ah-wrap {
    max-width: 900px;
    margin: 0 auto;
  }
  
  .ah-wrap .hidden {
    display: none !important;
  }
  
  .ah-demo {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 18px;
    text-align: center;
  }
  
  .ah-demo-note {
    color: var(--text-dim);
    font-size: .9rem;
    line-height: 1.5;
    margin-top: 10px;
  }
  
  .ah-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  
  .ah-topbar b {
    font-family: var(--font-mono);
    color: var(--text);
  }
  
  .ah-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
  }
  
  .ah-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    color: var(--text);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .ah-num {
    font-weight: 700;
    color: var(--text-dim);
    width: 30px;
  }
  
  .ah-inst {
    flex: 0 0 auto;
  }
  
  .ah-controls {
    flex: 1;
    min-width: 240px;
  }
  
  .ah-step {
    color: var(--accent);
    font-weight: 600;
    margin: 6px 0;
    font-size: .85rem;
  }
  
  .ah-angles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .ah-angle {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: .95rem;
    cursor: pointer;
  }
  
  .ah-angle:hover {
    border-color: var(--accent-dim);
  }
  
  .ah-angle.is-picked {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
  }
  
  .ah-dirs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
  }
  
  .ah-dir {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-size: .95rem;
    cursor: pointer;
  }
  
  .ah-dir:hover:not(:disabled) {
    border-color: var(--accent-dim);
  }
  
  .ah-dir.is-picked {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
  }
  
  .ah-dir:disabled {
    opacity: .4;
    cursor: default;
  }
  
  .ah-sel {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: .85rem;
  }
  
  .ah-finish-btn {
    margin-top: 8px;
  }
  
  .ah-score-text {
    font-weight: 700;
    margin: 4px 0 16px;
    font-size: 1.1rem;
    color: var(--text);
  }
  
  .ah-rev {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 10px;
    color: var(--text);
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid var(--line);
  }
  
  .ah-rev.is-ok {
    background: var(--bg-elevated);
    border-color: var(--accent);
  }
  
  .ah-rev.is-bad {
    background: var(--bg-elevated);
    border-color: #f2735b;
  }
  
  .ah-rule {
    width: 100%;
    color: var(--text-dim);
    font-size: .85rem;
    line-height: 1.5;
  }
  
  .ah-retry-btn {
    margin-top: 8px;
  }







  /* =====================================================================
   Стили теста «Числовые ряды» (number-series.js)
   На переменных темы проекта.
   ===================================================================== */

.nr-wrap {
  max-width: 880px;
  margin: 0 auto;
}

.nr-wrap .hidden {
  display: none !important;
}

.nr-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.nr-topbar b {
  font-family: var(--font-mono);
  color: var(--text);
}

.nr-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.nr-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  flex-wrap: wrap;
}

.nr-idx {
  width: 28px;
  color: var(--text-dim);
  font-weight: 600;
}

.nr-seq {
  display: flex;
  gap: 18px;
  flex: 1;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.nr-seq span {
  min-width: 30px;
  text-align: center;
}

.nr-input {
  width: 96px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: center;
}

.nr-input:focus {
  outline: none;
  border-color: var(--accent);
}

.nr-finish-btn {
  margin-top: 8px;
}

.nr-score-text {
  font-weight: 700;
  margin: 4px 0 16px;
  font-size: 1.1rem;
  color: var(--text);
}

.nr-rev {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
  color: var(--text);
  border: 1px solid var(--line);
}

.nr-rev.is-ok {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.nr-rev.is-bad {
  background: var(--bg-elevated);
  border-color: #f2735b;
}

.nr-rule {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: .85rem;
  line-height: 1.5;
}

.nr-retry-btn {
  margin-top: 8px;
}








/* =====================================================================
   Стили теста «Пространственное мышление» (spatial.js)
   На переменных темы проекта. Заливка граней фигур (#fff) и обводка
   (#1a1a1a) заданы прямо в canvas-коде (drawFigure) — это отрисовка
   самой иллюстрации, а не элемент темы сайта.
   ===================================================================== */

   .sp-wrap {
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .sp-wrap .hidden {
    display: none !important;
  }
  
  .sp-time-warning {
    font-weight: 700;
    color: #f2735b;
  }
  
  .sp-axis-diagram {
    text-align: center;
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
  }
  
  .sp-axis-diagram img {
    max-width: 30%;
    height: auto;
    border-radius: var(--radius-sm);
  }
  
  /* ---- прогресс и таймер ---- */
  .sp-progress-text {
    text-align: center;
    font-size: .9rem;
    color: var(--text-dim);
    margin-bottom: 10px;
  }
  
  .sp-progress-bar {
    background: var(--bg-card);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 20px;
    overflow: hidden;
  }
  
  .sp-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
    transition: width .3s;
  }
  
  .sp-timer {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text);
    margin-bottom: 15px;
    font-variant-numeric: tabular-nums;
    transition: color .3s;
  }
  
  .sp-timer.is-warning {
    color: var(--warn, #d4a017);
  }
  
  .sp-timer.is-danger {
    color: #f2735b;
    animation: sp-pulse 1s infinite;
  }
  
  @keyframes sp-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
  }
  
  /* ---- карточка задания ---- */
  .sp-task-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent-dim);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
  }
  
  .sp-task-card.is-correct { border-left-color: var(--accent); }
  .sp-task-card.is-wrong { border-left-color: #f2735b; }
  
  .sp-task-number {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 12px;
  }
  
  .sp-task-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  
  .sp-task-figure {
    flex-shrink: 0;
    text-align: center;
    position: relative;
  }
  
  .sp-task-figure canvas {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
  }
  
  .sp-view-arrow {
    position: absolute;
    left: -10px;
    bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-dim);
  }
  
  .sp-figure-label {
    font-size: .75rem;
    color: var(--text-dim);
    margin-top: 6px;
    line-height: 1.3;
  }
  
  .sp-task-instruction { flex: 1; min-width: 240px; }
  
  .sp-task-instruction p {
    font-size: 1rem;
    line-height: 1.6;
    background: var(--bg-card);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
  }
  
  .sp-subtitle {
    font-size: .9rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-align: center;
  }
  
  .sp-options-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
  }
  
  .sp-option-figure { text-align: center; }
  
  .sp-opt-num {
    font-size: .8rem;
    color: var(--text-dim);
    margin-top: 4px;
  }
  
  /* ---- кнопки-варианты ---- */
  .sp-answer-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .sp-answer-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s, transform .15s;
  }
  
  .sp-answer-btn:hover:not(:disabled) {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
  }
  
  .sp-answer-btn.is-selected {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
  }
  
  .sp-answer-btn.is-correct-answer {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
  }
  
  .sp-answer-btn.is-wrong-answer {
    border-color: #f2735b;
    background: #f2735b;
    color: #fff;
  }
  
  .sp-answer-btn:disabled {
    cursor: default;
  }
  
  /* ---- результаты ---- */
  .sp-results {
    text-align: center;
    padding: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }
  
  .sp-score {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--accent);
    margin: 12px 0;
    font-family: var(--font-mono);
  }
  
  .sp-score.is-bad { color: #f2735b; }
  .sp-score.is-good { color: var(--accent); }
  .sp-score.is-medium { color: var(--warn, #d4a017); }
  
  .sp-score-text { color: var(--text); margin-bottom: 8px; }
  
  .sp-avg-time {
    font-size: 1.05rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    display: inline-block;
  }
  
  .sp-score-comment {
    color: var(--text-dim);
    margin-top: 10px;
  }
  
  .sp-review-line {
    font-size: .9rem;
    margin-top: 10px;
    text-align: center;
  }
  
  .sp-ok-text { color: var(--accent); font-weight: 700; }
  .sp-bad-text { color: #f2735b; font-weight: 700; }
  
  /* ---- пошаговый разбор ---- */
  .sp-steps-block {
    margin-top: 16px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
  }
  
  .sp-steps-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    text-align: center;
  }
  
  .sp-steps-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .sp-step-item { text-align: center; }
  
  .sp-step-item canvas {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
  }
  
  .sp-step-caption {
    font-size: .7rem;
    color: var(--text-dim);
    max-width: 100px;
    margin-top: 4px;
    line-height: 1.25;
  }
  
  .sp-step-item.is-final .sp-step-caption {
    color: var(--accent);
    font-weight: 600;
  }
  
  .sp-step-arrow {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin: 0 2px;
    text-align: center;
  }











/* =====================================================================
   Стили теста «Чтение» (stroop-reading.js)
   На переменных темы проекта. Цвета слов/фигур в самих заданиях
   заданы инлайн через JS (это данные теста, а не тема сайта).
   ===================================================================== */

   .cw-wrap {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
  }
  
  .cw-wrap p,
  .cw-wrap ul,
  .cw-wrap li,
  .cw-wrap div {
    text-align: left;
  }
  
  .cw-wrap .hidden {
    display: none !important;
  }
  
  /* ---- индикатор шагов ---- */
  .cw-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    gap: 10px;
  }
  
  .cw-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-dim);
    flex-shrink: 0;
  }
  
  .cw-step.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
  }
  
  .cw-step.is-completed {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--accent);
  }
  
  /* ---- цветные боксы-колбэки ---- */
  .cw-box {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 14px 0;
    font-size: .9rem;
    line-height: 1.55;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
  }
  
  .cw-box-info { border-left: 4px solid var(--accent-dim); }
  .cw-box-warning { border-left: 4px solid var(--warn, #d4a017); }
  .cw-box-success { border-left: 4px solid var(--accent); }
  .cw-box-error { border-left: 4px solid #f2735b; color: #f2a08e; }
  .cw-box-shift { border-left: 4px solid var(--warn, #d4a017); }
  
  .cw-wrap ul.cw-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .cw-wrap ul.cw-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 5px;
    line-height: 1.5;
    text-align: left !important;
  }
  
  .cw-wrap ul.cw-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
  }
  
  .cw-box ul.cw-list {
    margin-top: 8px !important;
  }
  
  .cw-https-check.is-ok { border-left: 4px solid var(--accent); }
  
  /* ---- задание: сетка слов / фигур ---- */
  .cw-word-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 2;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
  }
  
  .cw-shape-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
  }
  
  .cw-shape { width: 50px; height: 50px; }
  .cw-shape-circle { border-radius: 50%; }
  .cw-shape-square { border-radius: 4px; }
  .cw-shape-triangle {
    width: 0; height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid;
  }
  
  /* ---- запись / таймер ---- */
  .cw-recording-indicator {
    color: #f2735b;
    font-size: 1.05rem;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .cw-recording-indicator:not(:empty)::before {
    content: "";
    width: 12px;
    height: 12px;
    background: #f2735b;
    border-radius: 50%;
    animation: cw-blink 1s infinite;
  }
  
  @keyframes cw-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
  }
  
  .cw-timer {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
    margin: 16px 0;
  }
  
  .cw-live-transcript {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin: 15px 0;
    min-height: 50px;
    font-size: 1rem;
    color: var(--text);
  }
  
  .cw-task-counter {
    font-size: 1.05rem;
    color: var(--text-dim);
    margin-bottom: 16px;
    font-weight: 700;
  }
  
  /* ---- редактирование текста ---- */
  .cw-highlighted-text {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px;
    min-height: 70px;
    font-size: 1.05rem;
    line-height: 2.1;
    margin: 14px 0;
    color: var(--text);
  }
  
  .cw-word-ok { color: var(--accent); font-weight: 700; }
  .cw-word-suspicious {
    background: rgba(242, 115, 91, .15);
    color: #f2735b;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: underline wavy #f2735b;
    cursor: help;
  }
  
  .cw-legend { display: flex; gap: 20px; flex-wrap: wrap; margin: 14px 0; font-size: .85rem; color: var(--text-dim); }
  .cw-legend-item { display: flex; align-items: center; gap: 8px; }
  .cw-legend-box { width: 18px; height: 18px; border-radius: 4px; }
  .cw-legend-box.cw-legend-ok { background: rgba(46, 204, 113, .2); border: 2px solid var(--accent); }
  .cw-legend-box.cw-legend-suspicious { background: rgba(242, 115, 91, .2); border: 2px solid #f2735b; }
  
  .cw-stats-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0;
    padding: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
  }
  
  .cw-stat { font-size: .85rem; color: var(--text-dim); }
  .cw-stat strong { font-size: 1.1rem; color: var(--text); }
  .cw-stat-ok strong { color: var(--accent); }
  .cw-stat-bad strong { color: #f2735b; }
  
  .cw-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
  }
  
  .cw-manual-toggle {
    font-size: .85rem;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    margin: 10px 0;
    display: inline-block;
  }
  
  .cw-mic-log {
    background: var(--bg-card);
    padding: 10px;
    border-radius: var(--radius-sm);
    margin: 10px 0;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-dim);
    max-height: 150px;
    overflow-y: auto;
  }
  
  textarea.cw-final-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin: 10px 0;
    background: var(--bg-card);
    color: var(--text);
    resize: vertical;
    font-family: var(--font-body);
  }
  
  textarea.cw-final-input:focus {
    outline: none;
    border-color: var(--accent);
  }
  
  /* ---- кнопки ---- */
  .cw-btn {
    display: inline-block;
    border: none;
    padding: 11px 24px;
    font-size: .95rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity .15s;
    margin: 6px 6px 6px 0;
    color: #fff;
    background: var(--accent-dim);
    font-family: var(--font-body);
    font-weight: 600;
  }
  
  .cw-btn:hover { opacity: .85; }
  .cw-btn:disabled { opacity: .4; cursor: not-allowed; }
  
  .cw-btn-success { background: var(--accent); color: var(--bg); }
  .cw-btn-danger { background: #f2735b; }
  .cw-btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--line); }
  .cw-btn-fix { background: #c98a2e; }
  .cw-btn-split { background: #8f5fd1; }
  .cw-btn-clean { background: #2a9db0; }
  .cw-btn-toggle { background: var(--bg-card); color: var(--text-dim); border: 1px solid var(--line); padding: 8px 16px; font-size: .85rem; }
  
  /* ---- результаты ---- */
  .cw-task-result {
    margin-bottom: 24px;
    padding: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }
  
  .cw-task-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .cw-task-result-header h3 { margin: 0; flex-grow: 1; color: var(--text); }
  
  .cw-task-details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  
  .cw-task-details.is-collapsed { display: none; }
  
  .cw-errors-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-top: 10px;
  }
  
  .cw-errors-list .cw-box { margin: 6px 0; padding: 8px 12px; font-size: .85rem; }
  
  code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
    color: var(--text);
  }










  /* =====================================================================
   Стили теста «Переплетения» (interweavings.js)
   Полноэкранный оверлей, как у .rx-overlay — на переменных темы.
   ===================================================================== */

.iw-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  overflow-y: auto;
  padding: 40px 24px;
}

.iw-exit-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.iw-exit-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.iw-wrap {
  max-width: 1400px;
  margin: 0 auto;
}

.iw-wrap .hidden {
  display: none !important;
}

.iw-server-hint {
  background: var(--bg-elevated);
  border: 1px solid var(--warn, #d4a017);
  border-left: 4px solid var(--warn, #d4a017);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: .85rem;
  color: var(--text-dim);
}

.iw-server-hint code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  color: var(--text);
}

.iw-timer {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f2735b;
  text-align: center;
  margin: 12px 0 20px;
}

.iw-test-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .iw-test-layout { grid-template-columns: 1fr; }
}

.iw-canvas-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.iw-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.iw-answers-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius-sm);
  max-height: 85vh;
  overflow-y: auto;
}

.iw-answers-panel h3 {
  margin-top: 0;
  color: var(--text);
}

.iw-answers-panel table {
  width: 100%;
  border-collapse: collapse;
}

.iw-answers-panel th,
.iw-answers-panel td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.iw-answers-panel th {
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 600;
}

.iw-answers-panel input[type="number"] {
  width: 68px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 4px;
  text-align: center;
  font-size: .9rem;
  font-family: var(--font-mono);
}

.iw-answers-panel input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.iw-answers-panel .btn-primary,
.iw-screen-intro .btn-primary {
  display: block;
  margin: 20px auto 0;
}

tr.is-correct td { background: rgba(46, 204, 113, .12) !important; }
tr.is-wrong td { background: rgba(242, 115, 91, .12) !important; }

.iw-stats {
  font-size: 1.15rem;
  text-align: center;
  margin: 20px auto;
  max-width: 1400px;
  padding: 15px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.iw-stats b {
  color: var(--accent);
  font-size: 1.4rem;
}

.iw-failed {
  margin-top: 12px;
  color: #f2735b;
  font-size: 1.4rem;
  font-weight: 800;
}









/* =====================================================================
   Стили теста «Кубы» (cubes.js)
   На переменных темы проекта. Линии/стрелки самого куба (SVG) —
   фиксированный тёмный цвет #111, чтобы читались на белой заливке
   ячейки независимо от темы.
   ===================================================================== */

   .cb-wrap {
    max-width: 1050px;
    margin: 0 auto;
  }
  
  .cb-wrap .hidden {
    display: none !important;
  }
  
  .cb-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    margin-bottom: 16px;
  }
  
  .cb-timer {
    font-weight: 800;
    font-size: 1.2rem;
    font-family: var(--font-mono);
    color: var(--accent);
  }
  
  .cb-rows {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .cb-row {
    display: flex;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .cb-cell {
    width: 104px;
    height: 104px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .15s;
    flex-direction: column;
  }
  
  .cb-cell:hover { border-color: var(--accent-dim); }
  .cb-cell.cb-ref { border: 2px solid var(--accent); cursor: default; }
  .cb-cell.cb-sel { border: 2px solid var(--accent); box-shadow: 0 0 0 2px var(--accent-dim) inset; }
  .cb-cell.cb-correct-answer { background: #eafaf0; border-color: var(--accent); }
  
  .cb-edge { stroke: #111; stroke-width: 2; fill: none; stroke-linecap: round; }
  .cb-arr { stroke: #111; stroke-width: 1.8; }
  
  .cb-result-summary {
    text-align: center;
    margin-bottom: 24px;
  }
  
  .cb-percent {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    margin: 10px 0;
    font-family: var(--font-mono);
  }
  
  .cb-score {
    font-size: 1.05rem;
    color: var(--text);
  }
  
  .cb-review-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
  }
  
  .cb-review-row {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 14px;
  }
  
  .cb-review-row.is-correct { border-left: 4px solid var(--accent); }
  .cb-review-row.is-wrong { border-left: 4px solid #f2735b; }
  
  .cb-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .cb-row-num { font-weight: 700; font-size: 1.05rem; color: var(--text); }
  
  .cb-status {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 700;
  }
  
  .cb-status.is-correct { background: rgba(46, 204, 113, .15); color: var(--accent); }
  .cb-status.is-wrong { background: rgba(242, 115, 91, .15); color: #f2735b; }
  
  .cb-review-cubes {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .cb-review-cube-item { text-align: center; }
  
  .cb-review-cube-item .cb-cell { cursor: default; }
  .cb-review-cube-item .cb-cell.cb-ref { background: rgba(139, 92, 246, .12); }
  
  .cb-label {
    font-size: .8rem;
    color: var(--text-dim);
    margin-top: 8px;
    font-weight: 500;
  }
  
  .cb-review-arrow {
    font-size: 1.4rem;
    color: var(--text-dim);
    margin: 0 6px;
  }