/* Тест на СДВГ в новом виде (redesign, ветка Дизайн 27.09.2026). Работает вместе с rd.css и rd-sdvg.js */

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

/* кнопки теста: у .button на сайте font-size 0, возвращаем текст */
.rd #ad-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 #ad-test .button:hover { opacity: .85; color: var(--ink); }
.rd #ad-test .button.black { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ad-test .button.black:hover { color: #fff; }

/* ===== интро ===== */

/* ===== экран вопроса ===== */
.rd #ad-test #ad-test-screen:not([style*="none"]) { display: flex; flex-direction: column; gap: 24px; }
.rd #ad-test .rdq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rd #ad-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 #ad-test .rdq-status { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ad-test .rdq-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rd #ad-test .ad-prog { margin: -8px 0 0; }
.rd #ad-test .ad-prog__bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.rd #ad-test .ad-prog__fill { height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width .25s; }
.rd #ad-test .ad-prog__meta { display: none; }
.rd #ad-test .ad-qtext { font: 600 30px/1.25 var(--f-ui); letter-spacing: -.5px; text-align: left; margin: 0; min-height: 0; }
.rd #ad-test .ad-scale-legend { font: 400 15px/1.5 var(--f-text); color: var(--mute); text-align: left; margin: -12px 0 0; }

.rd #ad-test .ad-opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; background: var(--tile); border-radius: 20px; padding: 28px 24px; margin: 0; }
.rd #ad-test .ad-opt { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font: 600 15px/1.25 var(--f-ui); color: var(--ink); text-align: center; transition: border-color .12s, background .12s; }
.rd #ad-test .ad-opt__dot { display: none; }
.rd #ad-test .ad-opt__lbl { font: inherit; opacity: 1; color: inherit; }
.rd #ad-test .ad-opt:hover, .rd #ad-test .ad-opt:focus-visible { border-color: var(--accent-mid); outline: none; }
.rd #ad-test .ad-opt.is-sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ad-test .ad-opt.is-sel .ad-opt__lbl { font-weight: 600; }

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

/* ===== результат: живые узлы прячутся, новый вид строит rd-tyazhelyy.js ===== */
.rd #ad-test #ad-result > :not(.rdh) { display: none; }
.rd #ad-test .rdh { display: flex; flex-direction: column; gap: 16px; }
.rd #ad-test .rdh-tile { background: var(--tile); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.rd #ad-test .rdh-note { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; font: 400 14px/1.5 var(--f-ui); }
.rd #ad-test .rdh-note b { font-weight: 600; }
.rd #ad-test .rdh-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd #ad-test .rdh-meta { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ad-test .rdh-verdict { font: 700 34px/1.15 var(--f-mono); letter-spacing: -.5px; }
.rd #ad-test .rdh-text { font: 400 17px/1.6 var(--f-text); max-width: 760px; }
.rd #ad-test .rdh-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.rd #ad-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 #ad-test .rdh-badge--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ad-test .rdh-h3 { font: 600 24px/1.2 var(--f-ui); letter-spacing: -.4px; margin: 0; }
.rd #ad-test .rdh-sub { font: 400 15px/1.5 var(--f-text); color: var(--mute); margin-top: -12px; max-width: 760px; }

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

.rd #ad-test .rdh-legend { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

.rd #ad-test .rdh-expl { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.rd #ad-test .rdh-h3 + .rdh-expl { border-top: 0; padding-top: 0; }
.rd #ad-test .rdh-expl__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ad-test .rdh-expl__top b { font: 600 15px/1 var(--f-mono); color: var(--ink); }
.rd #ad-test .rdh-expl__text { font: 400 14px/1.55 var(--f-text); color: var(--ink); }

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

.rd #ad-test .rdh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rd #ad-test .rdh-actions .button--gray { background: var(--tile); border-color: var(--tile); }
.rd #ad-test .rdh-actions .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rd #ad-test .rdh-foot { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== СДВГ: свои блоки ===== */
.rd .rd-hero .sd-lead { font: 400 17px/1.6 var(--f-text); color: var(--ink); max-width: 820px; margin: 16px 0 0; }
.rd .rd-hero .sd-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.rd .rd-hero .sd-facts li { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; margin: 0; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font: 500 13px/1 var(--f-ui); color: var(--ink); }
.rd .rd-hero .sd-facts li::before { display: none; }
.rd .rd-hero .sd-facts svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.rd #ad-test #ad-intro { display: none !important; }
.rd #ad-test .sd-modes-wrap { display: flex; flex-direction: column; gap: 10px; }
.rd #ad-test .sd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rd #ad-test .sd-mode { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; font: 600 15px/1.25 var(--f-ui); }
.rd #ad-test .sd-mode b { font: inherit; }
.rd #ad-test .sd-mode span { font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ad-test .sd-mode:hover { border-color: var(--accent-mid); }
.rd #ad-test .sd-mode.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ad-test .sd-mode.is-on span { color: rgba(255, 255, 255, .7); }
.rd #ad-test .sd-mode-hint { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }
.rd #ad-test .rdq-pill i { font-style: normal; color: var(--mute); margin-left: 4px; }

.rd #ad-test .ad-opts--yn { grid-template-columns: repeat(2, 1fr); }
.rd #ad-test .ad-yn__lbl { font: inherit; color: inherit; }
.rd #ad-test .ad-opt.is-sel .ad-yn__lbl { font-weight: 600; }
.rd #ad-test #ad-prev:disabled { opacity: .4; cursor: default; }
.rd #ad-test .ad-nav .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rd #ad-test .ad-qtext.ad-flash { animation: sd-flash .6s ease; }
@keyframes sd-flash { 0%, 100% { color: var(--ink); } 40% { color: var(--bad); } }

.rd #ad-test .rdh-h3 { font-size: 20px; }
.rd #ad-test .rdh-note { font-size: 16px; }
.rd #ad-test .rdh-p b { font-weight: 600; }
.rd #ad-test .sd-segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rd #ad-test .sd-seg { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.rd #ad-test .sd-seg span { font: 500 11px/1.3 var(--f-mono); letter-spacing: .06em; color: var(--mute); }
.rd #ad-test .sd-seg b { font: 600 14px/1.3 var(--f-ui); }
.rd #ad-test .sd-seg.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ad-test .sd-seg.is-on span { color: rgba(255, 255, 255, .7); }

.rd #ad-test .sd-crit { display: flex; flex-direction: column; gap: 8px; }
.rd #ad-test .sd-crit__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rd #ad-test .sd-crit__top b { font: 600 14px/1.3 var(--f-ui); }
.rd #ad-test .sd-crit__top span { font: 400 13px/1.3 var(--f-ui); color: var(--mute); white-space: nowrap; }
.rd #ad-test .sd-crit__res { font: 600 14px/1.3 var(--f-ui); }
.rd #ad-test .sd-pips { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px 6px; }
.rd #ad-test .sd-pips i { display: block; height: 12px; border-radius: 4px; background: var(--card); grid-row: 1; }
.rd #ad-test .sd-pips i.is-on { background: var(--accent); }
.rd #ad-test .sd-pips__thr { grid-row: 2; font: 500 10px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); text-align: center; white-space: nowrap; }
.rd #ad-test .sd-asrs { display: flex; flex-direction: column; gap: 12px; }
.rd #ad-test .sd-asrs__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd #ad-test .sd-asrs__num { font: 700 34px/1.1 var(--f-mono); letter-spacing: -.5px; }

.rd #ad-test .sd-tip { background: var(--card); border-radius: 14px; padding: 12px 16px; margin-top: 4px; }
.rd #ad-test .sd-tip b { display: block; font: 600 13px/1.3 var(--f-ui); margin-bottom: 4px; }
.rd #ad-test .sd-tip p { font: 400 14px/1.5 var(--f-text); }

.rd #ad-test .sd-ctx { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.rd #ad-test .sd-ctx li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 0; }
.rd #ad-test .sd-ctx__mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 600 14px/1 var(--f-ui); background: var(--ink); color: #fff; }
.rd #ad-test .sd-ctx li.is-no .sd-ctx__mark { background: var(--card); color: var(--mute); border: 1px solid var(--line); }
.rd #ad-test .sd-ctx b { display: block; font: 600 15px/1.3 var(--f-ui); }
.rd #ad-test .sd-ctx div span { display: block; font: 400 14px/1.45 var(--f-text); color: var(--mute); margin-top: 2px; }

.rd #ad-test .sd-rec { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: none; }
.rd #ad-test .sd-rec li { display: grid; grid-template-columns: 32px 1fr; gap: 8px; margin: 0; padding: 0; }
.rd #ad-test .sd-rec li::before { display: none; content: none; }
.rd #ad-test .sd-rec li span { font: 700 14px/1.5 var(--f-mono); color: var(--accent); }
.rd #ad-test .sd-rec li p { font: 400 15px/1.5 var(--f-text); }

@media (max-width: 639px) {
    .rd .rd-hero .sd-lead, .rd .rd-hero .sd-facts { display: none; }
    .rd #ad-test .sd-modes { grid-template-columns: 1fr; }
    .rd #ad-test .sd-segs { grid-template-columns: 1fr; }
    .rd #ad-test .sd-asrs__num { font-size: 28px; }
    .rd #ad-test .ad-opts, .rd #ad-test .ad-opts--yn { grid-template-columns: 1fr; padding: 16px; }
    .rd #ad-test .ad-opt { min-height: 52px; justify-content: flex-start; text-align: left; padding: 14px 18px; }
    .rd #ad-test #ad-test-screen:not([style*="none"]) { gap: 20px; }
    .rd #ad-test .rdq-status { font-size: 12px; }
    .rd #ad-test .ad-qtext { font-size: 22px; letter-spacing: -.3px; }
    .rd #ad-test .ad-scale-legend { font-size: 14px; margin-top: -8px; }
    .rd #ad-test .ad-nav { flex-wrap: wrap; }
    .rd #ad-test .ad-nav .button { padding: 14px 18px; }
    .rd #ad-test .rdq-sel { display: none; }
    .rd #ad-test #ad-prev { order: 0; }
    .rd #ad-test #ad-next, .rd #ad-test #ad-finish { margin-left: auto; }
    .rd #ad-test #ad-finish { flex: 1 1 100%; order: -1; }
    .rd #ad-test .rdh-tile { padding: 20px 18px; gap: 16px; }
    .rd #ad-test .rdh-verdict { font-size: 26px; }
    .rd #ad-test .rdh-text { font-size: 16px; }
    .rd #ad-test .rdh-h3 { font-size: 20px; }
    .rd #ad-test .rdh-sub { margin-top: -8px; font-size: 14px; }
    .rd #ad-test .rdh-row { grid-template-columns: 1fr; gap: 4px; }
    .rd #ad-test .rdh-actions .button { flex: 1 1 100%; white-space: normal; }
}
