.page-tests {
  background: #0b1020;
  color: #e5e7eb;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
}

.tests-nav {
  margin-bottom: -8px;
}

.tests-nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
}

.tests-nav a:hover {
  color: #f1f5f9;
}

.tests-nav a + a::before {
  content: '·';
  margin-right: 1rem;
  color: #475569;
}

.tests-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tests-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.tests-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  margin: 0 0 12px;
  color: #94a3b8;
}

.tests-disclaimer {
  margin: 8px 0 0;
  color: #cbd5f5;
}

.tests-stop-link {
  color: #f8fafc;
  text-decoration: none;
  border: 1px solid #94a3b8;
  padding: 8px 12px;
  border-radius: 999px;
}

.tests-panel {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
}

.tests-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.button {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.button-secondary {
  background: #f87171;
  color: #111827;
}

.tests-progress {
  margin-bottom: 20px;
}

.tests-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tests-step {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.tests-state-badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  background: #1e293b;
  color: #94a3b8;
}

.tests-progress progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: none;
  appearance: none;
  background: #1e293b;
}

.tests-progress progress::-webkit-progress-bar {
  background: #1e293b;
  border-radius: 999px;
}

.tests-progress progress::-webkit-progress-value {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.tests-progress progress::-moz-progress-bar {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 999px;
}

.tests-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tests-actions button {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background 0.15s;
}

.tests-actions button:hover {
  background: #1d4ed8;
}

.tests-actions button:active {
  transform: scale(0.97);
}

.tests-actions button:last-child:not(:first-child) {
  background: #1e293b;
  border: 1px solid #475569;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 10px 20px;
}

.tests-actions button:last-child:not(:first-child):hover {
  background: #334155;
  border-color: #94a3b8;
  color: #e2e8f0;
}

.test-intro {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  margin: 12px 0;
}

.test-intro-why {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.test-intro-how {
  margin: 0;
  color: #f1f5f9;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
}

.tests-current h2 {
  font-size: 1.3rem;
}

.tests-current #test-prompt {
  font-size: 1.15rem;
  min-height: 2em;
}

.tests-context-note {
  margin: 0;
  color: #cbd5f5;
}

.tests-context-updated {
  margin: 4px 0 16px;
  color: #94a3b8;
  font-size: 13px;
}

.tests-context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.tests-context dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.tests-context dd {
  margin: 0;
  color: #e2e8f0;
  font-weight: 600;
}

/* Radar chart */
.tests-radar-wrap {
  max-width: 380px;
  margin: 16px auto;
}

/* Results panel */
.tests-final-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.tests-final-actions .button {
  text-decoration: none;
  text-align: center;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1f2937;
}

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

.result-name {
  color: #e2e8f0;
  font-size: 0.95rem;
}

.result-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.result-ok {
  background: #064e3b;
  color: #6ee7b7;
}

.result-fail {
  background: #7f1d1d;
  color: #fca5a5;
}

.result-skipped {
  background: #78350f;
  color: #fcd34d;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .tests-shell {
    padding: 16px 12px 48px;
    gap: 14px;
  }

  .tests-header {
    flex-direction: column;
    gap: 10px;
  }

  .tests-header h1 {
    font-size: 1.3rem;
  }

  .tests-disclaimer {
    font-size: 0.88rem;
  }

  .tests-stop-link {
    align-self: flex-start;
    font-size: 0.85rem;
    padding: 6px 14px;
  }

  .tests-panel {
    padding: 14px;
    border-radius: 12px;
  }

  .tests-controls {
    flex-direction: column;
    gap: 8px;
  }

  .tests-controls .button {
    min-height: 48px;
    font-size: 1rem;
    width: 100%;
  }

  .tests-actions {
    flex-direction: column;
  }

  .tests-actions button {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
    min-height: 52px;
    border-radius: 14px;
  }

  .tests-actions button:last-child:not(:first-child) {
    font-size: 0.95rem;
    padding: 12px;
    min-height: 44px;
  }

  .test-intro {
    padding: 14px;
    border-radius: 10px;
  }

  .test-intro-how {
    font-size: 1.05rem;
  }

  .tests-nav {
    gap: 0.75rem;
    padding: 0.6rem 4vw;
    font-size: 0.82rem;
  }

  .tests-context {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
  }

  .tests-current h2 {
    font-size: 1.15rem;
  }

  .tests-current #test-prompt {
    font-size: 1rem;
  }

  .tests-radar-wrap {
    max-width: 280px;
  }

  .result-row {
    padding: 8px 0;
    font-size: 0.88rem;
  }

  .tests-final-actions {
    flex-direction: column;
  }

  .tests-final-actions .button {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .tests-shell {
    padding: 12px 8px 40px;
  }

  .tests-header h1 {
    font-size: 1.15rem;
  }

  .tests-actions button {
    font-size: 1.05rem;
    padding: 14px;
  }
}
