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

.rd #ch-test { font-family: var(--f-ui); color: var(--ink); }
.rd #ch-test p { display: block; font-size: inherit; opacity: 1; margin: 0; }
.rd #ch-test .ch-screen { width: 100%; }
.rd #ch-test .rd-label { display: block; font: 500 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.rd #ch-test .rdh-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

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

/* ===== интро ===== */
.rd #ch-test .ch-lead { font: 400 17px/1.6 var(--f-text); margin: 0 0 24px; max-width: 760px; }
.rd #ch-test .ch-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; padding: 0; margin: 0 0 24px; }
.rd #ch-test .ch-facts li { background: var(--tile); border-radius: 20px; padding: 20px 16px; margin: 0; }
.rd #ch-test .ch-facts li::before { display: none; }
.rd #ch-test .ch-facts b { display: block; font: 700 32px/1 var(--f-ui); letter-spacing: -1px; }
.rd #ch-test .ch-facts span { display: block; font: 400 13px/1.3 var(--f-ui); color: var(--mute); margin-top: 8px; }
.rd #ch-test .ch-resume { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--accent-soft); border-radius: 20px; padding: 16px 20px; margin: 0 0 16px; }
.rd #ch-test .ch-resume p { font-size: 15px; }
.rd #ch-test .ch-resume .button { background: #fff; border-color: #fff; }
.rd #ch-test .ch-start-wrap { margin: 0 0 16px; }
.rd #ch-test #ch-start { width: 100%; height: 60px; font-size: 17px; }
.rd #ch-test .ch-disclaimer { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== экран вопроса ===== */
.rd #ch-test .ch-prog__meta, .rd #ch-test .ch-scale-legend { display: none; }
.rd #ch-test .rdq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rd #ch-test .rdq-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.rd #ch-test .rdq-pill span { opacity: .55; }
.rd #ch-test .rdq-status { display: inline-flex; align-items: center; gap: 6px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ch-test .ch-prog { margin-bottom: 20px; }
.rd #ch-test .ch-prog__bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.rd #ch-test .ch-prog__fill { height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width .25s; }

.rd #ch-test .rdh-qcard { background: var(--tile); border-radius: 20px; padding: 28px 24px; margin-bottom: 20px; }
.rd #ch-test .ch-qtext { font: 600 30px/1.3 var(--f-ui); letter-spacing: -.4px; margin-bottom: 12px; }
.rd #ch-test .rdq-hint { font: 400 14px/1.5 var(--f-ui); color: var(--mute); margin-bottom: 24px; }
.rd #ch-test .ch-opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.rd #ch-test .ch-opt { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 10px 8px; box-sizing: border-box; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.rd #ch-test .ch-opt:hover { border-color: var(--accent-mid); }
.rd #ch-test .ch-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd #ch-test .ch-opt__dot { display: none; }
.rd #ch-test .ch-opt__lbl { font: 600 15px/1.25 var(--f-ui); opacity: 1; color: inherit; }
.rd #ch-test .ch-opt.is-sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ch-test .ch-opt.is-sel .ch-opt__lbl { font-weight: 600; }

.rd #ch-test .ch-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd #ch-test .ch-nav .button { flex: none; min-width: 140px; }
.rd #ch-test #ch-next, .rd #ch-test #ch-finish { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #ch-test .rdq-sel { margin-left: auto; font: 400 14px/1.3 var(--f-ui); color: var(--mute); }
.rd #ch-test .rdq-sel:empty + #ch-next, .rd #ch-test #ch-finish { margin-left: auto; }
.rd #ch-test .rdq-foot { margin-top: 16px; font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== результат ===== */
.rd #ch-test #ch-result { display: flex; flex-direction: column; gap: 16px; }
.rd #ch-test #ch-result[style*="none"] { display: none; }
.rd #ch-test .ch-shared, .rd #ch-test .ch-prev { background: var(--accent-soft); border-radius: 20px; padding: 16px 20px; font: 400 14px/1.5 var(--f-ui); }
.rd #ch-test .rdr-tile { background: var(--tile); border-radius: 20px; padding: 28px; }
.rd #ch-test .rdr-h3 { font: 600 18px/1.3 var(--f-ui); margin: 0 0 8px; }
.rd #ch-test .rdr-sub { font: 400 14px/1.5 var(--f-ui); color: var(--mute); margin-bottom: 20px; }

.rd #ch-test .rdr-sum__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rd #ch-test .rdr-sum__head .rd-label { color: var(--ink); }
.rd #ch-test .rdr-sum__date { display: inline-flex; align-items: center; gap: 6px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ch-test .rdr-sum__name { font: 700 34px/1.15 var(--f-mono); letter-spacing: -1px; margin-bottom: 14px; }
.rd #ch-test .rdr-sum__text { font: 400 16px/1.6 var(--f-text); margin-bottom: 18px; }
.rd #ch-test .rdr-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.rd #ch-test .rdr-badge { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 14px; box-sizing: border-box; border-radius: 999px; border: 1px solid var(--ink); font: 500 13px/1.3 var(--f-ui); }
.rd #ch-test .rdr-badge--ink { background: var(--ink); color: #fff; }

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

.rd #ch-test .rdr-radar { margin: 8px 0 4px; }
.rd #ch-test .rdh-radar { display: block; width: 100%; height: auto; overflow: visible; }
.rd #ch-test .rdh-radar--m { display: none; max-width: 360px; margin: 0 auto; }
.rd #ch-test .rdh-radar__grid { fill: none; stroke: var(--line); stroke-width: 1; }
.rd #ch-test .rdh-radar__axis { stroke: var(--line); stroke-width: 1; }
.rd #ch-test .rdh-radar__shape { fill: rgba(79, 91, 213, .14); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.rd #ch-test .rdh-radar__dot { fill: var(--accent); }
.rd #ch-test .rdh-radar__lbl { font: 500 14px var(--f-ui); fill: var(--ink); }
.rd #ch-test .rdh-radar--m .rdh-radar__lbl { font-size: 12px; stroke: var(--tile); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
.rd #ch-test .rdh-radar__lbl.is-top { fill: var(--accent); font-weight: 600; }
.rd #ch-test .rdr-legend { font: 400 13px/1.4 var(--f-ui); color: var(--mute); text-align: center; }

.rd #ch-test .rdr-mean { padding: 16px 0; border-top: 1px solid var(--line); }
.rd #ch-test .rdr-mean:first-of-type { border-top: 0; padding-top: 8px; }
.rd #ch-test .rdr-mean__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.rd #ch-test .rdr-mean__head span { font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #ch-test .rdr-mean__head b { font: 700 15px/1.3 var(--f-mono); }
.rd #ch-test .rdr-mean__text { font: 400 15px/1.6 var(--f-text); }

.rd #ch-test .rdr-points { background: #fff; border-radius: 16px; padding: 16px 20px; margin-bottom: 20px; }
.rd #ch-test .rdr-points summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; font: 600 15px/1.3 var(--f-ui); }
.rd #ch-test .rdr-points summary::-webkit-details-marker { display: none; }
.rd #ch-test .rdr-points__mark::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pill); font: 500 16px/1 var(--f-ui); }
.rd #ch-test .rdr-points[open] .rdr-points__mark::before { content: "−"; }
.rd #ch-test .rdr-points ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.rd #ch-test .rdr-points li { margin: 0; padding: 0; font: 400 14px/1.4 var(--f-mono); }
.rd #ch-test .rdr-points li::before { display: none; }
.rd #ch-test .rdr-rules { display: flex; flex-direction: column; gap: 14px; }
.rd #ch-test .rdr-rules p { margin-top: 4px; font: 400 15px/1.5 var(--f-text); }

.rd #ch-test .rdr-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rd #ch-test .rdr-actions .button { flex: 1 1 240px; }
.rd #ch-test .rdr-copy { background: var(--tile); border-color: var(--tile); }
.rd #ch-test .ch-note { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== статья ===== */
.rd .rd-article__body ol.rdh-traits { list-style: none; counter-reset: rdh; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.rd .rd-article__body ol.rdh-traits > li { counter-increment: rdh; list-style: none; position: relative; background: var(--tile); border-radius: 18px; padding: 18px 20px 18px 72px; margin: 0; }
.rd .rd-article__body ol.rdh-traits > li::before { content: counter(rdh, decimal-leading-zero); position: absolute; left: 20px; top: 18px; font: 700 16px/1.5 var(--f-mono); color: var(--accent); }
.rd .rd-article__body ol.rdh-traits > li strong { display: block; margin-bottom: 4px; }
.rd .rd-article__body table.rdh-levels td:first-child { white-space: nowrap; font-family: var(--f-mono); }
.rd .rdh-src__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rd .rdh-src__list li { margin: 0; padding: 0; font-size: 14px; line-height: 1.4; }
.rd .rdh-src__list li::before { display: none; }
.rd .rdh-src__list b { display: block; font-weight: 600; }
.rd .rdh-src__list span { display: block; color: var(--mute); margin-top: 2px; }

/* ===== адаптив ===== */
@media (max-width: 1023px) {
    .rd #ch-test .ch-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .rd #ch-test .ch-facts { grid-template-columns: 1fr 1fr; }
    .rd #ch-test .ch-facts b { font-size: 26px; }
    .rd #ch-test .ch-resume { flex-direction: column; align-items: stretch; }
    .rd #ch-test .rdh-qcard { padding: 22px 18px; }
    .rd #ch-test .ch-qtext { font-size: 22px; }
    .rd #ch-test .ch-opts { grid-template-columns: 1fr; gap: 8px; }
    .rd #ch-test .ch-opt { min-height: 52px; }
    .rd #ch-test .ch-nav .button { min-width: 0; padding: 14px 18px; }
    .rd #ch-test .rdq-sel { order: 3; flex-basis: 100%; margin-left: 0; font-size: 13px; }
    .rd #ch-test #ch-next, .rd #ch-test #ch-finish { margin-left: auto; }
    .rd #ch-test .rdr-tile { padding: 22px 18px; }
    .rd #ch-test .rdr-sum__name { font-size: 26px; }
    .rd #ch-test .rdh-radar--d { display: none; }
    .rd #ch-test .rdh-radar--m { display: block; }
    .rd #ch-test .rdr-points { padding: 14px 16px; }
    .rd #ch-test .rdr-points li { font-size: 13px; }
    .rd .rd-article__body ol.rdh-traits > li { padding: 16px 16px 16px 56px; }
    .rd .rd-article__body ol.rdh-traits > li::before { left: 16px; top: 16px; }
}
