body.testing-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.82)),
    url("/assets/images/tests-fon.jpg") center / cover fixed no-repeat;
}

.testing-page > header,
.testing-page > footer {
  display: none;
}

.tests-page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
}

.tests-legacy-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.tests-brand {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  padding-top: 0.25rem;
}

.tests-brand-logo {
  display: block;
  width: min(220px, 52vw);
  height: auto;
  object-fit: contain;
}

.tests-brand-copy {
  display: grid;
  gap: 0.45rem;
}

.tests-brand-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
}

.tests-brand-subtitle {
  margin: 0;
  color: #111827;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
}

.tests-brand-note {
  margin: 0;
  max-width: 42rem;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
}

.tests-app-shell {
  width: 100%;
}

.tests-app-frame,
.tests-form-card,
.tests-detail,
.tests-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tests-app-frame {
  padding: 1.25rem;
}

.tests-app-head {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  text-align: center;
  margin-bottom: 1rem;
}

.tests-eyebrow {
  margin: 0;
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tests-app-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 800;
  line-height: 1.2;
}

.tests-app-subtitle,
.tests-muted,
.tests-card-meta,
.tests-card-description,
.tests-detail-copy,
.tests-placeholder,
.tests-progress,
.tests-status,
.tests-brand-note,
.tests-login-note {
  color: #4b5563;
  line-height: 1.6;
}

.tests-app-subtitle {
  margin: 0;
  max-width: 46rem;
}

.tests-runtime {
  display: grid;
  gap: 1rem;
}

.tests-runtime-login {
  justify-items: center;
}

.tests-login-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
  width: 100%;
}

.tests-form-card {
  width: 100%;
  padding: 1rem;
}

.tests-form-card h3,
.tests-side-card h3,
.tests-detail h3,
.tests-card-title,
.tests-section-title {
  margin-top: 0;
  color: #111827;
}

.tests-form-card h3,
.tests-card-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.tests-side-card {
  display: none;
}

.tests-form {
  display: grid;
  gap: 0.9rem;
}

.tests-field {
  display: grid;
  gap: 0.4rem;
}

.tests-field label {
  color: #111827;
  font-weight: 600;
}

.tests-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  padding: 0.7rem 0.85rem;
  outline: none;
}

.tests-input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.tests-status {
  min-height: 1.25rem;
  margin: 0;
}

.tests-status.is-error {
  color: #b91c1c;
}

.tests-detail-actions,
.tests-luscher-actions,
.tests-hero-actions,
.tests-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tests-primary-link,
.tests-secondary-link,
.tests-button,
.tests-button-secondary,
.tests-card-action,
.tests-logout,
.tests-grade-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.tests-primary-link:hover,
.tests-secondary-link:hover,
.tests-button:hover,
.tests-button-secondary:hover,
.tests-card-action:hover,
.tests-logout:hover,
.tests-grade-button:hover,
.tests-choice-button:hover,
.tests-pair-button:hover {
  background: #e5e7eb;
  text-decoration: none;
}

.tests-primary-link:active,
.tests-secondary-link:active,
.tests-button:active,
.tests-button-secondary:active,
.tests-card-action:active,
.tests-logout:active,
.tests-grade-button:active,
.tests-choice-button:active,
.tests-pair-button:active {
  transform: translateY(1px);
}

.tests-button:disabled,
.tests-button-secondary:disabled,
.tests-card-action:disabled,
.tests-logout:disabled,
.tests-grade-button:disabled,
.tests-choice-button:disabled,
.tests-pair-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tests-login-note {
  margin: 0;
}

.tests-session-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tests-session-title {
  margin: 0;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 700;
}

.tests-participant-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f3f4f6;
  padding: 0.45rem 0.85rem;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 600;
}

.tests-portal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tests-cards {
  display: grid;
  gap: 0.85rem;
}

.tests-card {
  padding: 1rem;
}

.tests-card.is-active {
  border-color: #93c5fd;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.12);
}

.tests-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.tests-card-meta,
.tests-card-description {
  margin: 0;
}

.tests-card-footer {
  margin-top: 0.85rem;
}

.tests-card-action {
  width: 100%;
}

.tests-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.tests-badge.is-ready {
  color: #0a7c5a;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
}

.tests-badge.is-completed {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.25);
  background: rgba(29, 78, 216, 0.08);
}

.tests-badge.is-in-progress {
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.08);
}

.tests-badge.is-sync-required,
.tests-badge.is-migration,
.tests-badge.is-not-assigned {
  color: #6b7280;
  border-color: rgba(107, 114, 128, 0.22);
  background: rgba(107, 114, 128, 0.08);
}

.tests-detail {
  padding: 1rem;
}

.tests-detail-copy {
  margin: 0;
}

.tests-detail-copy :is(p, ul, ol):first-child {
  margin-top: 0;
}

.tests-detail-copy :is(p, ul, ol):last-child {
  margin-bottom: 0;
}

.tests-question-text {
  margin: 0.9rem 0 1.5rem;
  color: #111827;
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  line-height: 1.55;
}

.tests-choice-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tests-choice-button {
  min-width: 120px;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.tests-choice-button.is-yes {
  background: #0a7c5a;
  border-color: rgba(16, 185, 129, 0.5);
}

.tests-choice-button.is-no {
  background: #b91c1c;
  border-color: rgba(239, 68, 68, 0.6);
}

.tests-grade-grid {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tests-grade-button {
  min-width: 140px;
  background: #4b5563;
  border-color: #374151;
  color: #ffffff;
}

.tests-pair-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tests-pair-button {
  min-width: 160px;
  min-height: 110px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.tests-placeholder {
  margin-top: 0.75rem;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  padding: 0.9rem 1rem;
}

.tests-summary-block {
  margin-top: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.85rem 1rem;
}

.tests-section-title {
  margin-bottom: 0.7rem;
  font-size: 1rem;
  font-weight: 700;
}

.tests-summary-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.tests-inline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tests-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #dbeafe;
  padding: 0.4rem 0.7rem;
  color: #1f2937;
  font-size: 0.88rem;
  font-weight: 600;
}

.tests-ranking {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tests-ranking-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.45rem 0.75rem;
  color: #111827;
  font-weight: 600;
}

.tests-ranking-swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .tests-portal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tests-page-shell {
    padding: 1rem 0.75rem 2rem;
  }

  .tests-app-frame,
  .tests-form-card,
  .tests-detail,
  .tests-card {
    padding: 0.9rem;
  }

  .tests-session-head,
  .tests-luscher-actions,
  .tests-detail-actions,
  .tests-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .tests-card-header {
    flex-direction: column;
  }

  .tests-badge {
    align-self: flex-start;
  }

  .tests-choice-grid {
    gap: 0.75rem;
  }

  .tests-choice-button,
  .tests-grade-button,
  .tests-pair-button {
    width: 100%;
  }
}
