/* Страница «Тесты»: варианты и окно выбора типа */

.variants-page { padding-top: 40px; padding-bottom: 96px; }

.variants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 16px;
}

.variant {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    transition: border-color .15s;
}
.variant:hover { border-color: #3A3F4B; }

.variant-cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.variant-cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.4) brightness(0.55); }
.variant-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--surface) 100%); }
.variant-badge, .variant-done {
    position: absolute;
    top: 18px;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
}
.variant-badge { left: 20px; background: rgba(11, 12, 15, 0.7); border: 1px solid var(--line-2); color: var(--text-soft); }
.variant-done { right: 20px; background: var(--ok); color: var(--bg); font-weight: 600; }
.variant-num {
    position: absolute;
    left: 20px;
    bottom: 14px;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -0.03em;
}

.variant-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.variant-title { font-family: var(--font-display); font-weight: 500; font-size: 19px; }
.variant-meta { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.variant-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; }
.variant-go { font-weight: 600; color: var(--link); }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 32px; }

/* Окно выбора типа */
.type-modal { max-width: 640px; padding: 0; overflow: hidden; border-radius: 22px; }
.type-modal-head { display: flex; align-items: flex-start; gap: 16px; padding: 28px 28px 20px; }
.type-modal-head > div { flex: 1; min-width: 0; }
.type-modal-head .eyebrow { margin-bottom: 10px; }
.type-modal-head h2 { font-size: clamp(22px, 3vw, 28px); margin: 0; }
.type-modal-head .modal-close { position: static; width: 40px; height: 40px; flex: none; }

.type-modal-pad { padding: 0 28px; }
.type-full {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    background: var(--accent);
    color: var(--bg);
}
.type-full:hover { background: var(--accent-hover); color: var(--bg); }
.type-full-text { flex: 1; min-width: 0; }
.type-full-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.type-full-sub { font-size: 13px; opacity: 0.8; }
.type-full-meta { text-align: right; flex: none; font-size: 12px; }
.type-full-meta b { display: block; font-size: 13px; }
.type-full-meta span { opacity: 0.75; }
.type-full-arrow { font-size: 18px; }

.type-divider { display: flex; align-items: center; gap: 12px; padding: 24px 28px 12px; letter-spacing: 0.06em; }
.type-divider span { flex: 1; height: 1px; background: var(--line); }

.type-sections {
    padding: 0 28px 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 8px;
}
.type-section {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    min-height: 64px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--bg-2);
    color: var(--text);
}
.type-section:hover { border-color: var(--accent); background: var(--surface-hover); color: var(--text); }
.type-section b { display: block; font-size: 15px; line-height: 1.25; }
.type-section .label-mono { display: block; margin-top: 4px; text-transform: none; }
.type-num {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    background: var(--chip);
    color: var(--link);
}

.type-modal-foot {
    padding: 16px 28px;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    font-size: 13px;
    color: var(--text-2);
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
    .type-modal-head { padding: 22px 20px 16px; }
    .type-modal-pad { padding: 0 20px; }
    .type-full { flex-wrap: wrap; padding: 16px; }
    .type-full-meta { text-align: left; }
    .type-divider { padding: 20px 20px 10px; }
    .type-sections { padding: 0 20px 20px; }
    .type-modal-foot { padding: 14px 20px; }
}
