/* ============================================================
   Тизер тестов-самопроверок.
   Использует токены premium.css (--accent, --bronze, --serif,
   --line, --radius, --mist) с безопасными фолбэками, чтобы
   компонент выглядел одинаково на любой странице сайта.
   ============================================================ */

.self-check__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 28px;
}

.self-check__all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
  font-size: 14px;
  text-decoration: none;
  color: var(--accent, #0b5f52);
  white-space: nowrap;
}

.self-check__all::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.self-check__all:hover { text-decoration: underline; text-underline-offset: 3px; }
.self-check__all:hover::after { transform: translateX(4px); }

.self-check__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
  margin-top: 32px;
}

/* Одиночная карточка не растягивается на всю ширину */
.self-check__grid--single {
  grid-template-columns: minmax(0, 460px);
}

.self-check-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 26px 24px;
  background: #fff;
  border: 1px solid var(--line, rgba(21, 36, 32, 0.12));
  border-radius: var(--radius, 12px);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 32, 27, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

/* Сигнатурная линия: акцент → латунь, раскрывается на наведении */
.self-check-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #0b5f52), var(--bronze, #a6824c));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.self-check-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 95, 82, 0.32);
  box-shadow: 0 1px 2px rgba(15, 32, 27, 0.05), 0 22px 46px rgba(15, 32, 27, 0.12);
}

.self-check-card:hover::before { transform: scaleX(1); }

.self-check-card:focus-visible {
  outline: 3px solid rgba(11, 95, 82, 0.35);
  outline-offset: 3px;
}

.self-check-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* Крупная серифная цифра — как в отчёте врача */
.self-check-card__count {
  font-family: var(--serif, "Literata", Georgia, serif);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -0.015em;
  color: var(--accent, #0b5f52);
}

.self-check-card__count small {
  display: block;
  margin-top: 7px;
  font-family: "NunitoLocal", system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted, #62706b);
}

.self-check-card__scale {
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid var(--line, rgba(21, 36, 32, 0.12));
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze, #a6824c);
}

.self-check-card__title {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink, #152420);
}

.self-check-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted, #62706b);
}

.self-check-card__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line, rgba(21, 36, 32, 0.12));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.self-check-card__meta {
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--muted, #62706b);
}

.self-check-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent, #0b5f52);
}

.self-check-card__cta::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.self-check-card:hover .self-check-card__cta::after { transform: translateX(5px); }

@media (max-width: 560px) {
  .self-check-card { padding: 24px 22px 22px; }
  .self-check-card__count { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .self-check-card,
  .self-check-card::before,
  .self-check-card__cta::after,
  .self-check__all::after { transition: none; }
  .self-check-card:hover { transform: none; }
}
