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

.rd #iq-test { font-family: var(--f-ui); color: var(--ink); }
.rd #iq-test p { display: block; font-size: inherit; opacity: 1; margin: 0; }
.rd #iq-test .iq-screen { width: 100%; }

/* кнопки теста: у .button на сайте font-size 0, возвращаем текст */
.rd #iq-test .button { font: 500 15px/1 var(--f-ui); border-radius: 999px; padding: 16px 24px; border: 1px solid var(--line); background: transparent; color: var(--ink); transition: opacity .15s, background .15s; }
.rd #iq-test .button:hover { opacity: .85; color: var(--ink); }
.rd #iq-test .button.black { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd #iq-test .button.black:hover { color: #fff; }
.rd #iq-test .button:disabled { opacity: .35; cursor: default; }

/* ===== интро ===== */
.rd #iq-test .iq-lead { font: 400 17px/1.6 var(--f-text); margin: 0 0 24px; max-width: 760px; }
.rd #iq-test .iq-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; padding: 0; margin: 0 0 24px; }
.rd #iq-test .iq-facts li { background: var(--tile); border-radius: 20px; padding: 20px 16px; margin: 0; }
.rd #iq-test .iq-facts li::before { display: none; }
.rd #iq-test .iq-facts b { display: block; font: 700 32px/1 var(--f-ui); letter-spacing: -1px; }
.rd #iq-test .iq-facts span { display: block; font: 400 13px/1.3 var(--f-ui); color: var(--mute); margin-top: 8px; }

.rd #iq-test .iq-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 24px; }
.rd #iq-test .iq-resume p { font-size: 15px; }

.rd #iq-test .iq-demo { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin: 0; }
.rd #iq-test .iq-demo__field { display: flex; flex-direction: column; gap: 8px; }
.rd #iq-test .iq-demo__field > label { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.rd #iq-test #iq-age { box-sizing: border-box; width: 140px; height: 48px; padding: 0 16px; background: var(--tile); border: 1px solid var(--line); border-radius: 14px; font: 500 16px/48px var(--f-ui); color: var(--ink); }
.rd #iq-test #iq-age:focus { border-color: var(--accent); }
.rd #iq-test .iq-demo__gender { display: flex; gap: 8px; }
.rd #iq-test .iq-demo__gender label { position: relative; display: inline-flex; align-items: center; height: 48px; padding: 0 18px; border-radius: 999px; background: var(--pill); font: 500 14px/1 var(--f-ui); cursor: pointer; }
.rd #iq-test .iq-demo__gender input[type="radio"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rd #iq-test .iq-demo__gender label:has(input:checked) { background: var(--ink); color: #fff; }
.rd #iq-test .iq-demo__gender label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd #iq-test .iq-demo__note { flex: 1 1 100%; font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

.rd #iq-test .iq-untimed-row { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; }
.rd #iq-test .iq-untimed { position: relative; flex: none; width: 44px; height: 26px; margin: 0; }
.rd #iq-test .iq-untimed input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.rd #iq-test .iq-untimed .slider { position: absolute; inset: 0; border-radius: 999px; background: var(--pill); transition: background .15s; }
.rd #iq-test .iq-untimed .slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rd #iq-test .iq-untimed input:checked + .slider { background: var(--accent); }
.rd #iq-test .iq-untimed input:checked + .slider::before { transform: translateX(18px); }
.rd #iq-test .iq-untimed__label { font: 500 14px/1.3 var(--f-ui); cursor: pointer; }

.rd #iq-test .iq-start-wrap { margin: 24px 0 16px; }
.rd #iq-test #iq-start { width: 100%; height: 60px; font-size: 17px; }
.rd #iq-test .iq-disclaimer { font: 400 13px/1.5 var(--f-ui); color: var(--mute); }

/* ===== экран вопроса ===== */
.rd #iq-test .iq-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.rd #iq-test .iq-qnum { display: none; }
.rd #iq-test .rdq-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rd #iq-test .rdq-label__main { font: 500 12px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.rd #iq-test .rdq-label__diff { font: 400 12px/1.3 var(--f-mono); color: var(--mute); }
.rd #iq-test .iq-timer { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--pill); font: 500 14px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.rd #iq-test .iq-timer.is-low { background: var(--bad-soft); color: var(--bad); }

.rd #iq-test .iq-prog { display: none; }
.rd #iq-test .rdq-prog { display: flex; gap: 6px; margin-bottom: 24px; }
.rd #iq-test .rdq-prog__seg { position: relative; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rd #iq-test .rdq-prog__seg i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; transition: width .3s; }
.rd #iq-test .rdq-prog__seg.is-cur { box-shadow: 0 0 0 1px var(--accent-mid); }

.rd #iq-test .iq-card { background: var(--tile); border-radius: 20px; padding: 32px; margin-bottom: 20px; }
.rd #iq-test .iq-qtext { font: 600 24px/1.35 var(--f-ui); letter-spacing: -.3px; margin-bottom: 24px; }
.rd #iq-test .iq-stem { display: flex; justify-content: center; margin: 0 0 24px; }

/* фигуры SVG */
.rd #iq-test .iqfig { width: 64px; height: 64px; display: block; }
.rd #iq-test .iq-seq { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rd #iq-test .iq-seq__c { width: 56px; height: 56px; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; font: 600 20px/1 var(--f-ui); }
.rd #iq-test .iq-seq__c .iqfig { width: 48px; height: 48px; }
.rd #iq-test .iq-seq__q { font: 700 26px/1 var(--f-ui); color: var(--accent); }
.rd #iq-test .iq-seq__op { font-size: 22px; padding: 0 2px; }
.rd #iq-test .iq-stem .iqfig { width: 150px; height: 150px; background: #fff; border-radius: 14px; }
.rd #iq-test .iq-opt .iqfig { width: 70px; height: 70px; background: #fff; border-radius: 10px; }
.rd #iq-test .iq-rev__row .iqfig { width: 40px; height: 40px; display: inline-block; vertical-align: middle; background: #fff; border-radius: 6px; }

/* варианты ответа */
.rd #iq-test .iq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd #iq-test .iq-opt { display: flex; align-items: center; gap: 14px; min-height: 60px; width: 100%; box-sizing: border-box; text-align: left; background: var(--card); border: 1.5px solid transparent; border-radius: 16px; padding: 10px 16px; font: 500 16px/1.3 var(--f-ui); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.rd #iq-test .iq-opt:hover { border-color: var(--accent-mid); }
.rd #iq-test .iq-opt.is-selected { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.rd #iq-test .rdq-letter { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font: 600 13px/1 var(--f-ui); }
.rd #iq-test .iq-opt.is-selected .rdq-letter { background: var(--accent); border-color: var(--accent); color: #fff; }

/* навигация */
.rd #iq-test .iq-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rd #iq-test .iq-nav .iq-prog-txt { flex: 1; text-align: center; font: 400 14px/1.3 var(--f-ui); color: var(--mute); margin: 0; }
.rd #iq-test .iq-nav .button { flex: none; min-width: 150px; }

/* ===== результат ===== */
.rd #iq-test .rdr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rd #iq-test .rdr-head .rd-label { font: 500 12px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.rd #iq-test .rdr-copy { padding: 10px 16px; font-size: 14px; }

.rd #iq-test .iq-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; text-align: left; border: 0; padding: 0; margin: 0 0 24px; }
.rd #iq-test .iq-score__num { font: 600 96px/.9 var(--f-ui); letter-spacing: -4px; color: var(--accent); }
.rd #iq-test .iq-score__band { font: 700 28px/1.2 var(--f-ui); letter-spacing: -.5px; margin: 0; }
.rd #iq-test .iq-score__range { flex-basis: 100%; font: 400 14px/1.4 var(--f-ui); color: var(--mute); opacity: 1; margin: 0; }

/* колокол */
.rd #iq-test .rdr-bell { background: var(--tile); border-radius: 20px; padding: 28px 28px 20px; margin-bottom: 16px; }
.rd #iq-test .rdr-bell__bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.rd #iq-test .rdr-bell__bar { position: relative; flex: 1; background: #D3D6E0; border-radius: 6px 6px 2px 2px; }
.rd #iq-test .rdr-bell__bar.is-range { background: var(--accent-mid); }
.rd #iq-test .rdr-bell__bar.is-you { background: var(--accent); }
.rd #iq-test .rdr-bell__you { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); font: 600 12px/1 var(--f-mono); color: var(--accent); white-space: nowrap; }
.rd #iq-test .rdr-bell__axis { display: flex; justify-content: space-between; margin-top: 8px; font: 400 11px/1 var(--f-mono); color: var(--mute); }
.rd #iq-test .rdr-zones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.rd #iq-test .rdr-zones span { padding: 7px 12px; border-radius: 999px; background: var(--pill); font: 500 12px/1 var(--f-ui); color: var(--mute); }
.rd #iq-test .rdr-zones span.is-cur { background: var(--accent); color: #fff; }

.rd #iq-test .iq-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rd #iq-test .iq-meta__row { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; background: var(--tile); border: 0; border-radius: 16px; padding: 16px; font: 700 20px/1.2 var(--f-ui); }
.rd #iq-test .iq-meta__row span { font: 500 11px/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); opacity: 1; }
.rd #iq-test .iq-band-note { font: 400 15px/1.6 var(--f-text); color: var(--ink); background: transparent; border-radius: 0; padding: 0; margin: 0 0 8px; }
.rd #iq-test .iq-scale-note { font: 400 13px/1.5 var(--f-ui); color: var(--mute); margin: 0 0 24px; }

.rd #iq-test .iq-h3, .rd #iq-test .rdr-h3 { font: 700 20px/1.3 var(--f-ui); letter-spacing: -.3px; margin: 0 0 16px; padding: 0; }
.rd #iq-test .iq-profile { margin-bottom: 24px; }
.rd #iq-test .iq-profile .iq-bar { display: none; }
.rd #iq-test .iq-profile__hint { font: 400 13px/1.5 var(--f-ui); color: var(--mute); margin: 12px 0 0; }

/* шкалы областей */
.rd #iq-test .rdr-dom { display: grid; grid-template-columns: 220px 1fr 120px; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.rd #iq-test .rdr-dom:first-of-type { border-top: 0; }
.rd #iq-test .rdr-dom__name { font: 600 15px/1.3 var(--f-ui); }
.rd #iq-test .rdr-dom__name small { display: block; font: 400 13px/1.3 var(--f-ui); color: var(--mute); margin-top: 2px; }
.rd #iq-test .rdr-dom__track { position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.rd #iq-test .rdr-dom__norm { position: absolute; top: 0; bottom: 0; background: var(--pill); border-left: 1px dashed var(--mute); border-right: 1px dashed var(--mute); }
.rd #iq-test .rdr-dom__mid { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 1px; background: var(--mute); }
.rd #iq-test .rdr-dom__dot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px var(--accent); }
.rd #iq-test .rdr-dom.is-above .rdr-dom__dot { background: var(--good); box-shadow: 0 0 0 1px var(--good); }
.rd #iq-test .rdr-dom.is-below .rdr-dom__dot { background: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.rd #iq-test .rdr-dom__vs { font: 600 14px/1.3 var(--f-ui); text-align: right; }
.rd #iq-test .rdr-dom.is-above .rdr-dom__vs { color: var(--good); }
.rd #iq-test .rdr-dom.is-below .rdr-dom__vs { color: var(--bad); }
.rd #iq-test .rdr-dom__scale { display: grid; grid-template-columns: 220px 1fr 120px; gap: 16px; font: 400 11px/1 var(--f-mono); color: var(--mute); margin-top: 4px; }
.rd #iq-test .rdr-dom__scale div { display: flex; justify-content: space-between; }

/* карта 40 заданий */
.rd #iq-test .rdr-map { margin-bottom: 24px; }
.rd #iq-test .rdr-map__grid { display: grid; grid-template-columns: repeat(auto-fill, 46px); gap: 6px; }
.rd #iq-test .rdr-map__cell { width: 46px; height: 46px; border-radius: 12px; border: 0; padding: 0; font: 600 14px/46px var(--f-ui); text-align: center; cursor: pointer; background: var(--pill); color: var(--mute); }
.rd #iq-test .rdr-map__cell.is-ok { background: var(--good-soft); color: var(--good); }
.rd #iq-test .rdr-map__cell.is-no { background: var(--bad-soft); color: var(--bad); }
.rd #iq-test .rdr-map__cell:hover { outline: 2px solid var(--accent-mid); }
.rd #iq-test .rdr-map__legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font: 400 13px/1.3 var(--f-ui); color: var(--mute); }
.rd #iq-test .rdr-map__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

.rd #iq-test .rdr-summary { background: var(--accent-soft); border-radius: 20px; padding: 24px 28px; margin-bottom: 24px; font: 400 16px/1.6 var(--f-text); }
.rd #iq-test .rdr-summary b { font-weight: 600; }

.rd #iq-test .iq-actions { display: flex; gap: 12px; margin: 0 0 24px; }
.rd #iq-test .iq-actions .button { flex: 1 1 0; height: 56px; }

.rd #iq-test .iq-review { border-top: 1px solid var(--line); padding-top: 20px; }
.rd #iq-test .iq-rev { background: var(--tile); border: 0; border-left: 4px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; scroll-margin-top: 80px; }
.rd #iq-test .iq-rev.is-ok { border-left-color: var(--good); }
.rd #iq-test .iq-rev.is-no { border-left-color: var(--bad); }
.rd #iq-test .iq-rev.is-flash { box-shadow: 0 0 0 2px var(--accent); }
.rd #iq-test .iq-rev__head { font: 600 15px/1.4 var(--f-ui); margin-bottom: 8px; }
.rd #iq-test .iq-rev.is-ok .iq-rev__badge { color: var(--good); }
.rd #iq-test .iq-rev.is-no .iq-rev__badge { color: var(--bad); }
.rd #iq-test .iq-rev__row { font: 400 14px/1.5 var(--f-ui); margin-bottom: 4px; }
.rd #iq-test .iq-rev__expl { font: 400 14px/1.55 var(--f-text); color: var(--mute); margin-top: 6px; }

/* статья */
.rd .iq-formula { font: 600 17px/1.4 var(--f-ui); background: var(--tile); border-radius: 14px; padding: 16px 20px; text-align: center; }
.rd .table-scroll { overflow-x: auto; }
.rd .iq-table { border-collapse: collapse; width: 100%; }

/* ===== адаптив ===== */
@media (max-width: 1024px) {
    .rd #iq-test .rdr-dom, .rd #iq-test .rdr-dom__scale { grid-template-columns: 170px 1fr 100px; }
}
@media (max-width: 639px) {
    .rd #iq-test .iq-lead { font-size: 16px; }
    .rd #iq-test .iq-facts { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .rd #iq-test .iq-facts li { padding: 16px 14px; border-radius: 16px; }
    .rd #iq-test .iq-facts b { font-size: 26px; }
    .rd #iq-test .iq-resume { flex-direction: column; align-items: stretch; }
    .rd #iq-test #iq-age { width: 110px; }
    .rd #iq-test .iq-demo__gender label { padding: 0 14px; }

    .rd #iq-test .iq-topbar { align-items: flex-start; }
    .rd #iq-test .iq-card { padding: 20px 16px; border-radius: 18px; margin-left: -4px; margin-right: -4px; }
    .rd #iq-test .iq-qtext { font-size: 19px; margin-bottom: 18px; }
    .rd #iq-test .iq-opts { grid-template-columns: 1fr; gap: 8px; }
    .rd #iq-test .iq-opts--grid { grid-template-columns: 1fr 1fr; }
    .rd #iq-test .iq-opt { min-height: 56px; font-size: 15px; padding: 8px 12px; gap: 10px; }
    .rd #iq-test .iq-opt .iqfig { width: 56px; height: 56px; }
    .rd #iq-test .iq-stem .iqfig { width: 120px; height: 120px; }
    .rd #iq-test .iq-seq__c { width: 44px; height: 44px; font-size: 17px; }
    .rd #iq-test .iq-seq__c .iqfig { width: 38px; height: 38px; }
    .rd #iq-test .iq-nav { flex-wrap: wrap; }
    .rd #iq-test .iq-nav .iq-prog-txt { order: -1; flex-basis: 100%; }
    .rd #iq-test .iq-nav .button { flex: 1 1 0; min-width: 0; }

    .rd #iq-test .iq-score__num { font-size: 72px; letter-spacing: -3px; }
    .rd #iq-test .iq-score__band { font-size: 22px; }
    .rd #iq-test .rdr-bell { padding: 20px 14px 14px; }
    .rd #iq-test .rdr-bell__bars { height: 120px; gap: 3px; }
    .rd #iq-test .rdr-bell__axis span:nth-child(even) { visibility: hidden; }
    .rd #iq-test .iq-meta { grid-template-columns: 1fr 1fr; gap: 8px; }
    .rd #iq-test .iq-meta__row { font-size: 17px; padding: 14px; }
    .rd #iq-test .rdr-dom { grid-template-columns: 1fr auto; gap: 8px 12px; }
    .rd #iq-test .rdr-dom__track { grid-column: 1 / -1; grid-row: 2; }
    .rd #iq-test .rdr-dom__scale { display: none; }
    .rd #iq-test .rdr-map__grid { grid-template-columns: repeat(8, 1fr); }
    .rd #iq-test .rdr-map__cell { width: auto; height: auto; aspect-ratio: 1; line-height: 1; display: flex; align-items: center; justify-content: center; font-size: 13px; border-radius: 10px; }
    .rd #iq-test .rdr-summary { padding: 20px; font-size: 15px; }
    .rd #iq-test .iq-actions { flex-direction: column; }
}

.rd #iq-test .rdr-map__legend i { box-shadow: inset 0 0 0 1px rgba(13,13,13,.18); }
