.el-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tests-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
}

.tests-toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 160px;
}

.tests-toolbar__field--grow {
  flex: 1 1 240px;
}

.tests-toolbar__field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.tests-toolbar__check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.tests-toolbar__actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.tests-table-card {
  margin-bottom: 1rem;
}

table.tests-table td {
  vertical-align: middle;
}

.tests-table__name {
  min-width: 260px;
  max-width: 460px;
}

.tests-table__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.35;
}

.tests-table__title:hover {
  color: var(--color-primary);
}

.tests-table__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.tests-table__progress {
  min-width: 160px;
}

.tests-table__deadline {
  white-space: nowrap;
  font-size: 0.86rem;
}

.tests-table__action {
  text-align: right;
  white-space: nowrap;
}

.progress-meter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-meter__label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.progress-meter__label strong {
  color: var(--color-text);
}

.progress-meter__bar {
  display: block;
  width: 100%;
  max-width: 180px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-accent);
  overflow: hidden;
}

.progress-meter__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.tests-closed {
  margin-bottom: 1rem;
}

.tests-closed__summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

.tests-closed__summary::-webkit-details-marker {
  display: none;
}

.tests-closed__summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--transition);
}

.tests-closed[open] > .tests-closed__summary::before {
  transform: rotate(45deg);
}

.tests-closed[open] > .tests-closed__summary {
  border-bottom: 1px solid var(--color-border);
}

.tests-closed__hide,
.tests-closed[open] .tests-closed__show {
  display: none;
}

.tests-closed[open] .tests-closed__hide {
  display: inline;
}

.test-detail__heading {
  min-width: 0;
}

.test-detail__heading h1 {
  overflow-wrap: anywhere;
}

.test-detail__subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.state-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.state-tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.15rem;
}

.state-tile__label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.state-tile__value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
}

.state-tile__value small {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.state-tile__value .badge {
  font-size: 0.82rem;
}

.state-tile__value--date {
  font-size: 1.05rem;
}

.state-tile__note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.participants-table td {
  vertical-align: top;
}

.participants-table .badge {
  margin-right: 0.25rem;
}

.participants-table__sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.participants-table__revealed {
  color: #92400e;
}

.participants-table__date {
  white-space: nowrap;
  font-size: 0.84rem;
}

.participants-table__links {
  text-align: right;
  white-space: nowrap;
}

.materials-list {
  margin: 0;
  padding: 0.6rem 1.25rem;
  list-style: none;
}

.materials-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.materials-list li:last-child {
  border-bottom: 0;
}

.materials-lock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--color-border);
  background: #f8fafc;
}

.materials-lock__icon {
  display: flex;
  color: var(--color-text-muted);
}

.materials-lock p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

.regenerate-blocked {
  display: inline-flex;
  cursor: not-allowed;
}

.regenerate-reason {
  margin: 0;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.generation-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  max-width: 520px;
  margin: 1.75rem auto;
  padding: 1.5rem;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  background: var(--color-error-bg);
  text-align: center;
}

.generation-error--neutral {
  border-color: var(--color-border);
  background: #f8fafc;
}

.generation-error__icon {
  display: flex;
  color: var(--color-error);
}

.generation-error h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text);
}

.generation-error p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-error);
  overflow-wrap: anywhere;
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}

.rules-heading {
  margin: 1.25rem 0 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text);
}

.file-remove-cell {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.file-remove {
  color: var(--color-error);
}

.results-choice__option--static {
  cursor: default;
}

@media (max-width: 900px) {
  .state-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .tests-toolbar__actions {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .state-tiles {
    grid-template-columns: 1fr;
  }
}
