/* Тест на тревожность в новом виде (redesign, ветка Дизайн 27.09.2026). Работает вместе с rd.css и rd-trevozhnost.js */

.rd #anx-test { font-family: var(--f-ui); color: var(--ink); }
.rd #anx-test p { display: block; font-size: inherit; opacity: 1; margin: 0; }
.rd #anx-test .anx-screen { width: 100%; }
.rd #anx-test .rd-label { display: block; font: 500 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.rd #anx-test ul li::before, .rd #anx-test ol li::before { display: none; }

/* кнопки теста: у .button на сайте font-size 0, возвращаем текст */
.rd #anx-test .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px/1 var(--f-ui); border-radius: 999px; padding: 16px 24px; margin: 0; width: auto; min-width: 0; height: auto; border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
.rd #anx-test .button:hover { opacity: .85; color: var(--ink); }
.rd #anx-test .button.black { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #anx-test .button.black:hover { color: #fff; }
.rd #anx-test .button:disabled { opacity: .4; cursor: default; }

/* ===== вкладки: сегмент ===== */
.rd #anx-test .anx-tabs { display: flex; gap: 8px; background: var(--card); border-radius: 9999px; padding: 6px; margin: 0 0 28px; }
.rd #anx-test .anx-tab { flex: 1 1 0; min-height: 48px; border: 0; border-radius: 9999px; background: transparent; color: var(--ink); font: 600 15px/1.25 var(--f-ui); padding: 10px 16px; cursor: pointer; transition: background .12s, color .12s; }
.rd #anx-test .anx-tab:hover { background: var(--tile); }
.rd #anx-test .anx-tab.is-on { background: var(--ink); color: #fff; }

/* ===== интро ===== */
.rd #anx-test .anx-lead { font: 400 17px/1.6 var(--f-text); margin: 0 0 24px; max-width: 760px; }
.rd #anx-test .anx-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; padding: 0; margin: 0 0 24px; }
.rd #anx-test .anx-facts li { background: var(--tile); border-radius: 20px; padding: 20px 16px; margin: 0; border: 0; text-align: left; }
.rd #anx-test .anx-facts b { display: block; font: 700 32px/1 var(--f-ui); letter-spacing: -1px; }
.rd #anx-test .anx-facts span { display: block; font: 400 13px/1.3 var(--f-ui); color: var(--mute); margin-top: 8px; opacity: 1; }
.rd #anx-test .anx-resume { background: var(--accent-soft); border: 0; border-radius: 20px; padding: 16px 20px; margin: 0 0 24px; font: 400 15px/1.55 var(--f-ui); }
.rd #anx-test .anx-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.rd #anx-test .anx-start-wrap { margin: 0 0 16px; }
.rd #anx-test #anx-gad-start, .rd #anx-test #anx-prof-start { width: 100%; height: 60px; font-size: 17px; }
.rd #anx-test .anx-disclaimer { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== экран вопроса ===== */
.rd #anx-test #anx-gad-screen:not([style*="none"]), .rd #anx-test #anx-prof-screen:not([style*="none"]) { display: flex; flex-direction: column; gap: 24px; }
.rd #anx-test .rdq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rd #anx-test .rdq-pill { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--tile); color: var(--ink); font: 600 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.rd #anx-test .rdq-status { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #anx-test .rdq-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rd #anx-test .anx-topbar { display: none; }
.rd #anx-test .anx-progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: -8px 0 0; }
.rd #anx-test .anx-progress__fill { height: 100%; background: var(--ink); border-radius: 4px; transition: width .25s; }
.rd #anx-test .anx-group { font: 500 13px/1.4 var(--f-ui); color: var(--mute); margin: 0 0 -16px; }
.rd #anx-test .anx-qtext { font: 600 30px/1.25 var(--f-ui); letter-spacing: -.5px; text-align: left; margin: 0; }
.rd #anx-test .anx-legend { font: 400 15px/1.5 var(--f-text); color: var(--mute); margin: -12px 0 0; }

/* варианты: сетка растягивает ячейки, у ячеек align-self не задаём — высота в строке одна */
.rd #anx-test .anx-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--tile); border-radius: 20px; padding: 8px; margin: 0; }
.rd #anx-test #anx-prof-options { grid-template-columns: repeat(5, 1fr); }
.rd #anx-test .anx-opt { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 74px; padding: 14px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--ink); text-align: left; font: inherit; transition: border-color .12s, background .12s; }
.rd #anx-test #anx-prof-options .anx-opt { text-align: center; padding: 14px; }
.rd #anx-test .anx-opt__label { display: block; font: 600 16px/1.25 var(--f-ui); }
.rd #anx-test .anx-opt__hint { display: block; font: 400 13px/1.3 var(--f-ui); color: var(--mute); opacity: 1; margin: 0; }
.rd #anx-test .anx-opt:hover, .rd #anx-test .anx-opt:focus-visible { border-color: var(--accent-mid); outline: none; background: #fff; }
.rd #anx-test .anx-opt.is-on, .rd #anx-test .anx-opt.is-on:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #anx-test .anx-opt.is-on .anx-opt__hint { color: rgba(255, 255, 255, .75); }

.rd #anx-test .anx-nav { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.rd #anx-test .anx-nav .button { flex: none; padding: 14px 22px; }
.rd #anx-test #anx-gad-back, .rd #anx-test #anx-prof-back { order: 0; }
.rd #anx-test .rdq-sel { order: 1; flex: 1; text-align: right; font: 400 14px/1.3 var(--f-ui); color: var(--mute); }
.rd #anx-test .rdq-sel b { color: var(--ink); font-weight: 600; }
.rd #anx-test #anx-gad-next, .rd #anx-test #anx-prof-next { order: 2; }
.rd #anx-test .rdq-foot { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== результат: живые узлы прячутся, новый вид строит rd-trevozhnost.js ===== */
.rd #anx-test .anx-screen.is-rd > :not(.rdh) { display: none; }
.rd #anx-test .rdh { display: flex; flex-direction: column; gap: 16px; }
.rd #anx-test .rdh-tile { background: var(--tile); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.rd #anx-test .rdh-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd #anx-test .rdh-meta { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #anx-test .rdh-meta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rd #anx-test .rdh-verdict { font: 700 34px/1.15 var(--f-mono); letter-spacing: -.5px; }
.rd #anx-test .rdh-text { font: 400 17px/1.6 var(--f-text); max-width: 760px; }
.rd #anx-test .rdh-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.rd #anx-test .rdh-badge { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px; border-radius: 999px; font: 500 14px/1.3 var(--f-ui); border: 1px solid var(--line); }
.rd #anx-test .rdh-badge--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #anx-test .rdh-h3 { font: 600 24px/1.2 var(--f-ui); letter-spacing: -.4px; margin: 0; }
.rd #anx-test .rdh-sub { font: 400 15px/1.5 var(--f-text); color: var(--mute); margin-top: -12px; max-width: 760px; }

/* шкала уровней */
.rd #anx-test .rdh-scale { position: relative; padding-top: 9px; }
.rd #anx-test .rdh-scale__track { display: flex; gap: 3px; height: 12px; }
.rd #anx-test .rdh-scale__track span { display: block; height: 100%; border-radius: 6px; }
.rd #anx-test .rdh-scale__mark { position: absolute; top: 0; width: 4px; height: 30px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.rd #anx-test .rdh-scale__labels { display: flex; gap: 3px; margin-top: 12px; }
.rd #anx-test .rdh-scale__labels span { font: 400 12px/1.3 var(--f-ui); color: var(--mute); }
.rd #anx-test .rdh-scale__labels span.is-on { color: var(--ink); font-weight: 600; }
.rd #anx-test .rdh-scale__labels i { font-style: normal; }

.rd #anx-test .rdh-bars { display: flex; flex-direction: column; gap: 18px; }
.rd #anx-test .rdh-bar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font: 400 15px/1.35 var(--f-ui); color: var(--ink); }
.rd #anx-test .rdh-bar__top b { font: 600 15px/1 var(--f-mono); color: var(--ink); white-space: nowrap; }
.rd #anx-test .rdh-bar__track { height: 12px; border-radius: 6px; background: var(--card); overflow: hidden; }
.rd #anx-test .rdh-bar__track i { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.rd #anx-test .rdh-bar.is-top .rdh-bar__track i { background: var(--accent); }
.rd #anx-test .rdh-bar.is-top .rdh-bar__top b { color: var(--accent); }
.rd #anx-test .rdh-bar__lvl { margin-top: 8px; font: 600 14px/1.3 var(--f-ui); }
.rd #anx-test .rdh-bar__lvl span { font-weight: 400; color: var(--mute); }

.rd #anx-test .rdh-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.rd #anx-test .rdh-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; margin: 0; padding: 0; font: 400 16px/1.55 var(--f-text); }
.rd #anx-test .rdh-steps li b { font: 600 15px/1.6 var(--f-mono); color: var(--accent); }

.rd #anx-test .rdh-card { background: #fff; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.rd #anx-test .rdh-card .rdh-h3 { font-size: 20px; }
.rd #anx-test .rdh-card p { font: 400 15px/1.55 var(--f-text); }
.rd #anx-test .rdh-card--lead { border: 2px solid var(--ink); }

.rd #anx-test .rdh-p { font: 400 15px/1.55 var(--f-text); max-width: 760px; }
.rd #anx-test .rdh-p b { font-weight: 600; }
.rd #anx-test .rdh-pts { background: var(--card); border-radius: 16px; padding: 16px 18px; }
.rd #anx-test .rdh-pts__h { font: 600 15px/1.3 var(--f-ui); margin-bottom: 8px; }
.rd #anx-test .rdh-pts ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rd #anx-test .rdh-pts li { margin: 0; padding: 0; font: 400 15px/1.5 var(--f-text); }
.rd #anx-test .rdh-rows { display: flex; flex-direction: column; gap: 14px; margin: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.rd #anx-test .rdh-row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: baseline; }
.rd #anx-test .rdh-row dd { margin: 0; font: 400 15px/1.5 var(--f-text); }
.rd #anx-test .rdh-row dt { margin: 0; }

.rd #anx-test .rdh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rd #anx-test .rdh-tile .button--gray, .rd #anx-test .rdh-actions .button--gray { background: #fff; border-color: var(--line); align-self: flex-start; }
.rd #anx-test .rdh-actions .button--gray { background: var(--tile); border-color: var(--tile); }
.rd #anx-test .rdh-foot { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== карточка источников в колонке статьи ===== */
.rd .rdt-src { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 14px; }
.rd .rdt-src li { margin: 0; padding: 0; }
.rd .rdt-src li::before { display: none; }
.rd .rdt-src b { display: block; font: 600 14px/1.35 var(--f-ui); color: var(--ink); }
.rd .rdt-src span { display: block; margin-top: 4px; font: 400 13px/1.45 var(--f-ui); color: var(--mute); }

@media (max-width: 1023px) {
    .rd #anx-test .anx-options, .rd #anx-test #anx-prof-options { grid-template-columns: 1fr; gap: 10px; }
    .rd #anx-test .anx-opt, .rd #anx-test #anx-prof-options .anx-opt { text-align: left; padding: 16px 20px; }
}
@media (max-width: 639px) {
    .rd #anx-test .anx-tabs { margin-bottom: 20px; }
    .rd #anx-test .anx-tab { font-size: 13px; padding: 8px 10px; }
    .rd #anx-test .anx-lead { font-size: 16px; margin-bottom: 20px; }
    .rd #anx-test .anx-facts { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
    .rd #anx-test .anx-facts li { border-radius: 16px; padding: 12px 10px; }
    .rd #anx-test .anx-facts b { font-size: 18px; letter-spacing: -.3px; }
    .rd #anx-test .anx-facts span { font-size: 12px; margin-top: 6px; }
    .rd #anx-test #anx-gad-screen:not([style*="none"]), .rd #anx-test #anx-prof-screen:not([style*="none"]) { gap: 20px; }
    .rd #anx-test .anx-group { margin-bottom: -12px; }
    .rd #anx-test .rdq-status { font-size: 12px; }
    .rd #anx-test .anx-qtext { font-size: 22px; letter-spacing: -.3px; }
    .rd #anx-test .anx-legend { font-size: 14px; margin-top: -8px; }
    .rd #anx-test .anx-opt__label { font-size: 18px; }
    .rd #anx-test .anx-nav { flex-wrap: wrap; }
    .rd #anx-test .anx-nav .button { padding: 14px 18px; }
    .rd #anx-test .rdq-sel { display: none; }
    .rd #anx-test #anx-gad-next, .rd #anx-test #anx-prof-next { margin-left: auto; }
    .rd #anx-test .rdh-tile { padding: 18px; gap: 20px; }
    .rd #anx-test .rdh-verdict { font-size: 24px; }
    .rd #anx-test .rdh-text { font-size: 16px; }
    .rd #anx-test .rdh-h3 { font-size: 20px; }
    .rd #anx-test .rdh-sub { margin-top: -8px; font-size: 14px; }
    .rd #anx-test .rdh-scale__labels span { font-size: 11px; }
    .rd #anx-test .rdh-scale__labels i { display: none; }
    .rd #anx-test .rdh-steps li { grid-template-columns: 32px 1fr; font-size: 15px; }
    .rd #anx-test .rdh-row { grid-template-columns: 1fr; gap: 4px; }
    .rd #anx-test .rdh-actions .button, .rd #anx-test .rdh-tile .button { flex: 1 1 100%; width: 100%; white-space: normal; }
}
