/* Тест по ключам. Поле 田字格 связывает экран с изучением написания знаков. */
.rq-head { display: grid; grid-template-columns: minmax(0, 1fr) 158px; align-items: center; gap: var(--sp-6); }
.rq-head .eddy-lead { max-width: 760px; }
.rq-head__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-5); }
.rq-head__facts span { padding: 7px 11px; border: 1px solid var(--border-default); border-radius: 100px; background: var(--surface-card); font-size: 13px; font-weight: 600; color: var(--text-muted); }
.rq-head__jump { display: inline-block; margin-top: var(--sp-4); font-size: 14px; font-weight: 700; text-underline-offset: 4px; }
.rq-head__mark { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--red-200); border-radius: var(--r-md); background: var(--paper-100); overflow: hidden; }
.rq-head__mark::before, .rq-head__mark::after, .rq-stage__cell::before, .rq-stage__cell::after { content: ""; position: absolute; background: var(--red-200); opacity: .62; }
.rq-head__mark::before, .rq-stage__cell::before { width: 1px; height: 100%; left: 50%; top: 0; }
.rq-head__mark::after, .rq-stage__cell::after { height: 1px; width: 100%; top: 50%; left: 0; }
.rq-head__mark span { position: absolute; z-index: 1; font-family: var(--font-hanzi), "Noto Sans SC", sans-serif; font-size: 73px; line-height: 1; }
.rq-head__mark span:first-child { transform: translate(-25px, 19px); color: var(--jade-500); }
.rq-head__mark span:last-child { transform: translate(30px, -17px); color: var(--red-500); }

.rq-shell { max-width: 760px; margin: 0 auto; }
.rq-topline { display: flex; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); font-size: 14px; color: var(--text-muted); }
.rq-topline strong { color: var(--text-body); font-variant-numeric: tabular-nums; }
.rq-progress { display: flex; gap: 4px; margin-bottom: var(--sp-5); }
.rq-progress__step { flex: 1; height: 7px; border-radius: 20px; background: var(--border-subtle); transition: background .18s ease, transform .18s ease; }
.rq-progress__step.is-current { background: var(--ink-400); transform: scaleY(1.35); }
.rq-progress__step.is-right { background: var(--jade-500); }
.rq-progress__step.is-wrong { background: var(--red-400); }

.rq-card { padding: clamp(24px, 5vw, 44px); border: 1px solid var(--border-default); border-radius: var(--r-lg); background: var(--surface-card); box-shadow: var(--sh-sm); }
.rq-card[hidden], .rq-result[hidden], .rq-feedback[hidden] { display: none; }
.rq-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.rq-kind { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red-600); }
.rq-card__number { font-size: 13px; color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.rq-stage { min-height: 214px; display: grid; place-items: center; padding: var(--sp-5) 0; }
.rq-stage__cell { position: relative; display: grid; place-items: center; width: 176px; height: 176px; border: 1px solid var(--red-200); border-radius: var(--r-md); background: var(--paper-100); overflow: hidden; }
.rq-stage__glyph { z-index: 1; padding: 10px; font-family: var(--font-hanzi), "Noto Sans SC", sans-serif; font-size: 88px; font-weight: 500; line-height: 1; color: var(--ink-900); }
.rq-stage__cell--word { width: min(100%, 350px); height: 132px; border-color: var(--jade-500); background: var(--jade-50); }
.rq-stage__cell--word::before, .rq-stage__cell--word::after { display: none; }
.rq-stage__word { z-index: 1; padding: 12px; text-align: center; font-size: clamp(24px, 5vw, 34px); font-weight: 700; color: var(--jade-700); }
.rq-prompt { margin: 0 0 var(--sp-5); text-align: center; font-size: clamp(19px, 3vw, 23px); line-height: 1.35; }
.rq-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rq-option { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 13px 16px; border: 1px solid var(--border-default); border-radius: var(--r-control); background: var(--surface-card); color: var(--text-body); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.rq-option:hover:not(:disabled), .rq-option:focus-visible { border-color: var(--jade-500); }
.rq-option:focus-visible, .rq-actions button:focus-visible { outline: 3px solid var(--jade-500); outline-offset: 2px; }
.rq-option:active:not(:disabled) { transform: scale(.985); }
.rq-option:disabled { cursor: default; }
.rq-option__key { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-sunken); color: var(--text-muted); font-size: 12px; font-weight: 800; }
.rq-option__label { min-width: 0; font-size: 16px; line-height: 1.35; }
.rq-option--glyph .rq-option__label { font-family: var(--font-hanzi), "Noto Sans SC", sans-serif; font-size: 31px; }
.rq-option.is-selected { border-color: var(--jade-500); background: var(--jade-50); }
.rq-option.is-selected .rq-option__key, .rq-option.is-right .rq-option__key { background: var(--jade-500); color: #fff; }
.rq-option.is-right { border-color: var(--jade-500); background: var(--jade-50); }
.rq-option.is-wrong { border-color: var(--red-400); background: var(--red-50); }
.rq-option.is-wrong .rq-option__key { background: var(--red-400); color: #fff; }
.rq-feedback { margin-top: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-control); line-height: 1.55; }
.rq-feedback.is-right { background: var(--jade-50); color: var(--jade-700); }
.rq-feedback.is-wrong { background: var(--red-50); color: var(--red-700); }
.rq-feedback strong { display: block; margin-bottom: 4px; }
.rq-feedback p { margin: 0; }
.rq-feedback a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.rq-actions { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-5); }
.rq-actions button { min-width: 220px; }
.rq-actions__hint { font-size: 13px; color: var(--text-muted); }
.rq-actions[hidden] { display: none; }
.rq-result { padding: clamp(24px, 5vw, 44px); border: 1px solid var(--border-default); border-radius: var(--r-lg); background: var(--surface-card); box-shadow: var(--sh-sm); text-align: center; }
.rq-result__score { margin: 12px 0; font-size: clamp(52px, 10vw, 84px); font-weight: 800; line-height: 1; color: var(--jade-700); font-variant-numeric: tabular-nums; }
.rq-result__score span { font-size: .42em; color: var(--text-muted); }
.rq-result h2 { margin: 0; font-size: clamp(24px, 5vw, 32px); }
.rq-result p { color: var(--text-muted); }
.rq-result__review { margin: var(--sp-6) 0; padding: var(--sp-5); border-radius: var(--r-control); background: var(--paper-100); text-align: left; }
.rq-result__review h3 { margin: 0 0 var(--sp-3); font-size: 17px; }
.rq-result__review ul { margin: 0; padding-left: 20px; }
.rq-result__review li { margin: 6px 0; }
.rq-result__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: var(--sp-5); }
.rq-after p { max-width: 760px; margin: 0 auto; font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.rq-empty { max-width: 760px; margin: 0 auto; }
@media (max-width: 640px) {
    .rq-head { grid-template-columns: 1fr; }
    .rq-head__mark { display: none; }
    .rq-card { padding: 22px 18px; }
    .rq-options { grid-template-columns: 1fr; }
    .rq-option { min-height: 62px; }
    .rq-stage { min-height: 190px; }
    .rq-stage__cell { width: 152px; height: 152px; }
    .rq-stage__glyph { font-size: 76px; }
    .rq-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .rq-progress__step, .rq-option { transition: none; }
}
