/* TestHub — нейро-тест «Человек или ИИ?».
   Светлая «читальная» сцена: две крупные текстовые карточки, HUD,
   прогресс и аккуратный индиго-акцент. Без горизонтального скролла. */

.ha-app {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.ha-start {
    padding: clamp(18px, 3vw, 28px);
    text-align: center;
}

.ha-start__icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.ha-start h2 {
    margin-bottom: .35em;
}

.ha-start p {
    max-width: 58ch;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted);
}

.ha-shell[hidden],
.ha-foot [hidden],
.ha-error[hidden] {
    display: none;
}

/* ---------- HUD ---------- */

.ha-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px clamp(14px, 3vw, 24px);
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: .88rem;
    font-weight: 800;
    color: #0f172a;
}

.ha-hud__category {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #4338ca;
}

.ha-hud__round {
    flex: 0 0 auto;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.ha-progress {
    height: 6px;
    background: #e2e8f0;
    overflow: hidden;
}

.ha-progress > span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #818cf8);
    transition: width .25s ease;
}

/* ---------- Сцена ---------- */

.ha-stage {
    padding: clamp(18px, 4vw, 32px) clamp(14px, 3vw, 28px) clamp(16px, 3vw, 24px);
    background:
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, .08), transparent 60%),
        #ffffff;
}

.ha-question {
    margin: 0 0 clamp(14px, 2.6vw, 20px);
    color: #0f172a;
    font-size: clamp(1.02rem, 2.2vw, 1.16rem);
    font-weight: 800;
    text-align: center;
}

.ha-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 16px);
    align-items: stretch;
}

.ha-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: clamp(14px, 2.4vw, 20px);
    border: 1px solid #dbe1ea;
    border-radius: 16px;
    background: #fbfcfe;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: transform .08s linear, border-color .14s linear, box-shadow .14s linear, background .14s linear;
}

.ha-card:hover:not(:disabled) {
    border-color: #818cf8;
    background: #f5f6ff;
    box-shadow: 0 14px 34px -24px rgba(67, 56, 202, .8);
}

.ha-card:active:not(:disabled) {
    transform: scale(.988);
}

.ha-card:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
}

.ha-card:disabled {
    cursor: default;
}

.ha-card.is-locked {
    opacity: .82;
}

.ha-card.is-picked {
    border-color: #4f46e5;
    background: #eef2ff;
    box-shadow: inset 0 0 0 1px #4f46e5;
}

.ha-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ha-card__text {
    display: block;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    color: #1f2937;
    font-size: clamp(.95rem, 2.3vw, 1.04rem);
    line-height: 1.62;
    hyphens: auto;
}

.ha-card__pick {
    display: block;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #dbe1ea;
    color: #6366f1;
    font-size: .82rem;
    font-weight: 800;
}

.ha-card:hover:not(:disabled) .ha-card__pick {
    color: #4338ca;
}

/* ---------- Обратная связь ---------- */

.ha-feedback {
    min-height: 1.4em;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
}

.ha-feedback.is-good {
    color: #047857;
}

.ha-feedback.is-warn {
    color: #b45309;
}

.ha-feedback.is-bad {
    color: #b91c1c;
}

.ha-foot {
    display: flex;
    justify-content: center;
    padding: 0 16px 14px;
    background: #ffffff;
}

.ha-error {
    margin: 0;
    padding: 0 20px 18px;
    background: #ffffff;
    color: #b91c1c;
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
}

/* ---------- Разбор по раундам на странице результата ---------- */

/* Стили .round-review живут в assets/css/style.css: страница результата
   подключает только базовый файл стилей. */

/* ---------- Адаптив ---------- */

@media (max-width: 760px) {
    .ha-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .ha-card {
        padding: 14px;
    }
}

@media (max-width: 620px) {
    .ha-hud {
        gap: 6px;
        padding: 12px;
        font-size: .78rem;
    }

    .ha-stage {
        padding: 16px 12px 18px;
    }

    .ha-card__text {
        font-size: .95rem;
        line-height: 1.56;
    }
}

@media (max-width: 400px) {
    .ha-hud__category {
        font-size: .74rem;
    }

    .ha-hud__round {
        font-size: .74rem;
    }

    .ha-card__text {
        font-size: .91rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ha-progress > span,
    .ha-card {
        transition: none;
    }
}
