/* Раздел «Тестирование» (10.11.2026). Цвета и шрифты — из style.css сайта. */

.tst-main { padding: 44px 0 70px; }
.tst-wrap { width: min(calc(100% - 32px), 860px); margin: 0 auto; }

/* ---------- каталог ---------- */
.tst-intro { max-width: 760px; color: var(--text-soft); font-size: 16px; line-height: 1.7; margin: 0 0 30px; }
.tst-cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.tst-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.tst-card-cover { aspect-ratio: 16 / 9; background: var(--navy-900); overflow: hidden; }
.tst-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tst-card-body { display: flex; flex-direction: column; gap: 12px; padding: 24px 26px 26px; flex: 1; }
.tst-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.3; color: var(--navy-950); }
.tst-card p { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.65; }
.tst-audience { color: var(--gold-dark); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tst-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; padding: 0; list-style: none; }
.tst-meta li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--silver-50); color: var(--navy-900); font-size: 12.5px; font-weight: 700; }
.tst-card .tst-btn { margin-top: auto; align-self: flex-start; }

.tst-note {
    margin-top: 34px; padding: 22px 26px; border: 1px solid var(--line); border-left: 3px solid var(--gold);
    background: rgba(255,255,255,.55); border-radius: var(--radius); color: var(--text); font-size: 14.5px; line-height: 1.7;
}
.tst-note h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 18px; color: var(--navy-950); }
.tst-note ol { margin: 0; padding-left: 20px; }
.tst-note p { margin: 8px 0 0; }
.tst-privacy { margin-top: 18px; color: var(--silver-500); font-size: 13px; line-height: 1.6; }

/* ---------- кнопки ---------- */
.tst-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 2px;
    font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    text-decoration: none; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.tst-btn-primary { color: var(--navy-950); background: linear-gradient(135deg, #d7c597, #b49a65); }
.tst-btn-primary:hover { background: linear-gradient(135deg, #e1d2aa, #c0a872); }
.tst-btn-dark { color: var(--white); background: var(--navy-800); }
.tst-btn-dark:hover { background: var(--navy-700); }
.tst-btn-ghost { color: var(--navy-900); background: transparent; border-color: rgba(27,51,64,.28); }
.tst-btn-ghost:hover { border-color: var(--gold); }
.tst-btn:disabled { opacity: .45; cursor: default; }
.tst-btn:focus-visible, .tst-opt:focus-within, .tst-dot:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- прохождение ---------- */
.tst-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; }
.tst-start-cover { margin: -30px -32px 26px; aspect-ratio: 16 / 7; overflow: hidden; background: var(--navy-900); border-radius: var(--radius) var(--radius) 0 0; }
.tst-start-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tst-panel h1 { margin: 6px 0 12px; font-family: Georgia, serif; font-size: clamp(26px, 4vw, 36px); line-height: 1.2; color: var(--navy-950); }
.tst-lead { margin: 0 0 18px; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.tst-disclaimer { margin: 18px 0 0; padding: 14px 16px; background: var(--silver-50); border: 1px solid var(--line); border-radius: 2px; color: var(--text-soft); font-size: 13.5px; line-height: 1.6; }
.tst-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tst-preview-badge { display: inline-block; margin-bottom: 14px; padding: 6px 12px; background: #fbe0c9; color: #8a4a12; font-size: 12.5px; font-weight: 700; border-radius: 2px; }

.tst-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; color: var(--silver-500); font-size: 13px; }
.tst-progress-row strong { color: var(--navy-950); font-size: 15px; }
.tst-bar { height: 6px; background: var(--silver-150); border-radius: 3px; overflow: hidden; margin-bottom: 24px; }
.tst-bar span { display: block; height: 100%; background: linear-gradient(90deg, #b49a65, #d7c597); transition: width .25s ease; }
.tst-q { margin: 0 0 20px; font-family: Georgia, serif; font-size: clamp(19px, 2.6vw, 23px); line-height: 1.45; color: var(--navy-950); font-weight: 400; }
.tst-opts { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.tst-opt {
    display: flex; gap: 14px; align-items: flex-start; padding: 15px 16px; min-height: 56px;
    border: 1px solid var(--silver-300); border-radius: 3px; background: var(--white); cursor: pointer;
    font-size: 16px; line-height: 1.5; color: var(--text); transition: border-color .15s ease, background .15s ease;
}
.tst-opt:hover { border-color: var(--gold); }
.tst-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tst-opt .tst-letter {
    flex-shrink: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--silver-300); border-radius: 50%; font-weight: 700; font-size: 14px; color: var(--navy-900);
}
.tst-opt.is-checked { border-color: var(--navy-800); background: #eef3f6; box-shadow: inset 0 0 0 1px var(--navy-800); }
.tst-opt.is-checked .tst-letter { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.tst-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; }
.tst-nav .tst-btn { flex: 1 1 0; max-width: 240px; }
.tst-finish-row { margin-top: 18px; text-align: center; }
.tst-link { background: none; border: 0; padding: 6px; color: var(--navy-800); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.tst-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.tst-dot { width: 34px; height: 34px; border: 1px solid var(--silver-300); border-radius: 3px; background: var(--white); font: inherit; font-size: 13px; color: var(--silver-500); cursor: pointer; }
.tst-dot.is-answered { background: var(--silver-150); color: var(--navy-900); border-color: var(--silver-400); }
.tst-dot.is-current { border-color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--navy-800); color: var(--navy-950); font-weight: 700; }

/* окно «не на все вопросы ответили» */
.tst-dialog-bg { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,16,22,.6); }
.tst-dialog { width: 100%; max-width: 460px; background: var(--white); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: var(--shadow-strong); }
.tst-dialog h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 21px; color: var(--navy-950); }
.tst-dialog p { margin: 0 0 6px; color: var(--text-soft); line-height: 1.6; }

/* ---------- результат ---------- */
.tst-result { text-align: center; }
.tst-result-logo { width: 64px; height: auto; margin: 0 auto 8px; display: block; }
.tst-result-kicker { color: var(--gold-dark); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tst-result h1 { font-size: clamp(22px, 3.4vw, 30px); }
.tst-score { margin: 18px 0 6px; font-family: Georgia, serif; font-variant-numeric: lining-nums; font-size: clamp(40px, 8vw, 60px); line-height: 1; color: var(--navy-950); }
.tst-score small { font-size: .42em; color: var(--silver-500); }
.tst-level { display: inline-block; margin: 12px 0 10px; padding: 8px 16px; border-radius: 2px; font-weight: 700; font-size: 15px; }
.tst-level-0 { background: #d9ecd9; color: #1f5a1f; }
.tst-level-1 { background: #e3eef7; color: #1f4a73; }
.tst-level-2 { background: #fbefd2; color: #7a5410; }
.tst-level-3 { background: #f6dede; color: #7f2626; }
.tst-result-comment { max-width: 560px; margin: 4px auto 0; color: var(--text-soft); line-height: 1.7; }
.tst-result .tst-actions { justify-content: center; }
.tst-copy-status { min-height: 20px; margin-top: 10px; color: #256125; font-size: 13.5px; }
.tst-cta { margin-top: 28px; padding: 20px 22px; border-top: 1px solid var(--line); text-align: center; color: var(--text-soft); font-size: 14.5px; line-height: 1.6; }
.tst-cta strong { display: block; margin-bottom: 4px; color: var(--navy-950); font-family: Georgia, serif; font-size: 18px; font-weight: 400; }
.tst-cta .tst-btn { margin-top: 12px; }

/* ---------- разбор ---------- */
.tst-review-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.tst-review-head h1 { margin: 0; font-size: clamp(22px, 3vw, 28px); }
.tst-review-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.tst-review-item:last-child { border-bottom: 0; }
.tst-review-n { color: var(--silver-500); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tst-review-item h2 { margin: 6px 0 12px; font-family: Georgia, serif; font-size: 18px; line-height: 1.45; font-weight: 400; color: var(--navy-950); }
.tst-ans { margin: 6px 0; padding: 10px 12px; border-radius: 3px; font-size: 15px; line-height: 1.5; }
.tst-ans b { display: block; margin-bottom: 2px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.tst-ans-wrong { background: #f9e7e7; color: #6d2020; }
.tst-ans-right { background: #e3f1e3; color: #1f4f1f; }
.tst-ans-none { background: var(--silver-100); color: var(--text-soft); }
.tst-expl { margin: 10px 0 0; padding-left: 14px; border-left: 3px solid var(--gold); color: var(--text); font-size: 14.5px; line-height: 1.65; }

.tst-error { text-align: center; }
.tst-loading { color: var(--silver-500); text-align: center; padding: 40px 0; }

@media (max-width: 600px) {
    .tst-main { padding: 22px 0 50px; }
    .tst-wrap { width: calc(100% - 24px); }
    .tst-panel { padding: 22px 18px; }
    .tst-start-cover { margin: -22px -18px 20px; }
    .tst-card-body { padding: 20px; }
    .tst-opt { font-size: 15.5px; padding: 13px 13px; gap: 12px; }
    .tst-actions .tst-btn { flex: 1 1 100%; }
    .tst-nav .tst-btn { max-width: none; }
}

/* ---------- Дополнение № 1: свайпы по карточке вопроса ---------- */
.tst-viewport { overflow: hidden; margin: -6px; padding: 6px; }
.tst-qcard { touch-action: pan-y; will-change: transform; }
.tst-opt { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.tst-swipe-hint { margin-top: 14px; text-align: center; color: var(--silver-500); font-size: 12.5px; }
.tst-toast {
    position: fixed; left: 50%; bottom: 18px; z-index: 900; width: max-content; max-width: calc(100% - 32px);
    padding: 11px 16px; border-radius: 3px; background: var(--navy-900); color: var(--white);
    font-size: 14px; line-height: 1.45; text-align: center; box-shadow: var(--shadow-strong);
    opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.tst-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .tst-qcard, .tst-toast { transition: none !important; } }
