/* Критерии проверки (ISPRAVLENIE-kriterii-2026-10-24.md, sections 2-3): the page /app/proverka/kriterii (.crt-*), the editor of a set
   (.crt-row ...), the table Кто что может (templates/cp/_rights.html, .crt-rights), the quiz (templates/cp/_quiz.html, .crq-*) and its
   dialog on the landing. Cabinet parts use only the tokens of static/app/app.css (light and dark theme). The quiz and the rights table
   also live on the site: there they take the tokens of static/cp/cp.css (landing) or the colors of the tariffs page (site.css). */

/* ============ 1. the page Критерии ============ */
.crt-page { min-width: 0; }
.crt-lead { max-width: 64ch; margin: 0; color: var(--text-strong); font-size: 17px; font-weight: 600; line-height: 1.45; }

/* Сейчас действует */
.crt-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, auto); gap: 18px 28px; align-items: center; }
.crt-eyebrow { margin: 0 0 2px; color: var(--success); font-size: 13px; font-weight: 700; }
.crt-now-title { margin: 0 0 10px; color: var(--text-strong); font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.crt-rule { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.crt-rule li { position: relative; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.45; }
.crt-rule li::before { content: ""; position: absolute; top: .42em; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--neutral-solid); }
.crt-rule li.is-red::before { background: var(--danger-solid); }
.crt-rule li.is-yellow::before { background: var(--attention-solid); }
.crt-rule li.is-green::before { background: var(--success-solid); }
.crt-rule b { color: var(--text-strong); }
.crt-now-side { display: grid; gap: 6px; justify-items: start; padding-left: 28px; border-left: 1px solid var(--line); }
.crt-now-n { margin: 0; color: var(--text); font-size: 14px; }
.crt-now-n b { color: var(--text-strong); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.crt-now-c { margin: 0 0 6px; color: var(--text-muted); font-size: 13px; }

/* Что можно на вашем тарифе */
.crt-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.crt-plan-head .card-subtitle { margin: 0; }
.crt-plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(250px, .85fr); gap: 12px; align-items: stretch; }
.crt-plan-grid.is-paid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.crt-plan-col { min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.crt-plan-col h3 { margin: 0 0 6px; color: var(--success); font-size: 15px; font-weight: 800; }
.crt-plan-col.is-pro { border-color: var(--accent-line); background: var(--accent-soft-2); }
.crt-plan-col.is-pro h3 { color: var(--accent-hover); }
.crt-plan-col ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.crt-plan-col li { position: relative; padding-left: 16px; color: var(--text); font-size: 14px; line-height: 1.45; }
.crt-plan-col li::before { content: ""; position: absolute; top: .55em; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--success-solid); }
.crt-plan-col.is-pro li::before { background: var(--accent); }
.crt-plan-cta { display: grid; align-content: center; gap: 8px; min-width: 0; }
.crt-plan-cta .btn { white-space: normal; text-align: center; line-height: 1.3; }
.crt-plan-cta p { margin: 0; color: var(--text-muted); font-size: 12.5px; text-align: center; }

/* ready and own sets: rows of a list */
.crt-sets-head { align-items: flex-start; }
.crt-requiz { display: grid; justify-items: end; gap: 4px; flex: 0 0 auto; }
.crt-requiz span { color: var(--text-muted); font-size: 12px; }
.crt-sets { margin: 0; padding: 0; list-style: none; }
.crt-set { border-top: 1px solid var(--line); }
.crt-set-row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.25fr) auto; gap: 10px 20px; align-items: center; padding: 14px 4px; }
.crt-set.is-cur > .crt-set-row { margin: 0 -8px; padding-left: 12px; padding-right: 12px; border-radius: var(--radius-md); background: var(--success-bg); }
.crt-set-name { min-width: 0; }
.crt-set-name h3 { margin: 0; color: var(--text-strong); font-size: 16px; font-weight: 800; }
.crt-set-name p, .crt-set-main p { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.crt-set-main { min-width: 0; }
.crt-set-main p:first-child { margin-top: 0; color: var(--text); font-size: 13.5px; }
.crt-k { color: var(--text-muted); font-weight: 600; }
.crt-upd { font-size: 12.5px !important; }
.crt-set-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.crt-set-acts .btn { min-height: 40px; }
.crt-state { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.crt-state.is-cur { color: var(--success); }
.crt-state .i { width: 16px; height: 16px; }
.crt-del { color: var(--text-muted); }
.crt-del:hover { color: var(--danger); background: var(--danger-bg); }
.crt-pts { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface-2); }
.crt-said { margin: 0 0 6px; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.crt-said.is-red b { color: var(--danger); }
.crt-said.is-yellow b { color: var(--warning); }
.crt-pts-list { display: grid; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: pt; }
.crt-pt { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.crt-pt-q { min-width: 0; color: var(--text-strong); }
.crt-pt-q::before { counter-increment: pt; content: counter(pt) ". "; color: var(--text-muted); font-weight: 700; }
.crt-pt-s { flex: 0 0 auto; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--neutral-bg); color: var(--neutral); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.crt-pt-s.is-stop { background: var(--danger-bg); color: var(--danger); }
.crt-pt-s.is-warn { background: var(--warning-bg); color: var(--warning); }
.crt-pts-foot { margin: 10px 0 0; font-size: 14px; }
.crt-pts .loading-row { padding: 8px 0; }

/* the transfer of a paper regulation */
.crt-move { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.crt-move-text { min-width: 0; flex: 1 1 360px; }

/* the quiz inside the cabinet */
.crt-quiz { min-width: 0; }

/* ============ 2. the editor ============ */
.crt-ed { min-width: 0; }
.crt-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 40px; color: var(--link); font-size: 14px; font-weight: 600; }
.crt-back .i { width: 16px; height: 16px; }
.crt-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.crt-thead, .crt-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto minmax(110px, 160px); grid-template-areas: "n q sev src"; gap: 8px 16px; align-items: center; }
.crt-thead { padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); color: var(--text-muted); font-size: 12.5px; font-weight: 700; }
.crt-thead span:nth-child(3) { grid-column: 3; }
.crt-rows { margin: 0; padding: 0; list-style: none; }
.crt-row { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.crt-row:last-child { border-bottom: 0; }
.crt-row.is-new { background: var(--accent-soft-2); border-radius: var(--radius-md); }
.crt-n { grid-area: n; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--neutral-bg); color: var(--text-muted); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crt-q { grid-area: q; min-width: 0; margin: 0; color: var(--text-strong); font-size: 14.5px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.crt-row[data-sev="off"] .crt-q { color: var(--text-muted); }
.crt-in.input { display: inline-block; width: 6.5ch; min-width: 0; min-height: 40px; margin: 2px 6px; padding: 6px 8px; vertical-align: middle; font-size: 14.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.crt-in.input[data-p="max_rub"] { width: 12ch; }
.crt-in.input[data-p="max_pct"] { width: 6ch; }
.crt-in.input:disabled { background: var(--surface-2); color: var(--text-strong); }
.crt-sev { grid-area: sev; display: flex; gap: 6px; }
.crt-sev-b {
  min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  cursor: pointer; transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.crt-sev-b:hover { border-color: var(--accent-line); color: var(--text-strong); }
.crt-sev-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crt-sev-b[aria-pressed="true"] { font-weight: 800; }
.crt-sev-b.is-stop[aria-pressed="true"] { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger); }
.crt-sev-b.is-warn[aria-pressed="true"] { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning); }
.crt-sev-b.is-off[aria-pressed="true"] { border-color: var(--neutral-line); background: var(--neutral-bg); color: var(--neutral); }
.crt-sev-b:disabled { cursor: default; }
.crt-sev-b:disabled:not([aria-pressed="true"]) { opacity: .55; }
.crt-src { grid-area: src; min-width: 0; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.crt-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.crt-lib, .crt-man { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.crt-lib-list { max-height: 360px; margin: 10px 0 0; padding: 0; overflow: auto; list-style: none; }
.crt-lib-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.crt-lib-list li > span { min-width: 0; }
.crt-lib-list b { display: block; color: var(--text-strong); font-weight: 600; }
.crt-lib-list small { display: block; color: var(--text-muted); font-size: 12px; }
.crt-man { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.crt-man .field { flex: 1 1 280px; }
.crt-rule-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 0 8px; color: var(--text-strong); font-size: 15px; font-weight: 600; }
.crt-rule-line .crt-in.input { width: 7ch; margin-left: 4px; }

/* the preview */
.crt-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crt-ba > div { min-width: 0; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--surface-2); }
.crt-ba > div + div { box-shadow: inset 0 0 0 1px var(--accent-line); background: var(--accent-soft-2); }
.crt-ba-l { display: block; color: var(--text-muted); font-size: 12.5px; font-weight: 700; }
.crt-ba p { margin: 2px 0 0; color: var(--text); font-size: 15px; font-weight: 600; }
.crt-lv { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crt-lv.is-red { color: var(--danger); }
.crt-lv.is-yellow { color: var(--warning); }
.crt-lv.is-green { color: var(--success); }
.crt-chg-h { margin: 14px 0 4px; color: var(--text-strong); font-size: 14px; font-weight: 700; }
.crt-chg { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.crt-chg-h + .crt-chg { margin-top: 0; }
.crt-chg li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 14px; }
.crt-chg li span { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12.5px; }
.crt-prev-wait { margin: 0; color: var(--text-muted); font-size: 14px; }

/* save, history */
.crt-save-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0 8px; }
.crt-save-row .field { flex: 1 1 260px; max-width: 420px; }
.crt-save-row .btn { white-space: normal; text-align: center; }
.crt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 0; color: var(--text-muted); font-size: 13px; }
.crt-linkbtn { min-height: 40px; padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.crt-hist { margin-top: 6px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--surface-2); }
.crt-hist-list { display: grid; margin: 0; padding: 0; list-style: none; }
.crt-hist-list li { padding: 6px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 13.5px; }
.crt-hist-list li:first-child { border-top: 0; }
.crt-hist-list span { display: block; color: var(--text-muted); font-size: 12.5px; }
.crt-bar {
  position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 10px 14px; border: 1px solid var(--accent-line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md);
}
.crt-bar p { flex: 1 1 280px; margin: 0; color: var(--text-strong); font-size: 13.5px; font-weight: 600; }
.crt-bar .link { min-height: 40px; display: inline-flex; align-items: center; font-size: 13.5px; }
.crt-bar .btn-sm, .crt-lib-list .btn-sm { min-height: 40px; }
.crt-bar.is-off { visibility: hidden; }

/* ============ 3. Кто что может (cabinet and /tarify/) ============ */
.crt-rights.is-app { --rt-line: var(--line); --rt-head: var(--surface-2); --rt-cur: var(--accent-soft-2); --rt-cur-h: var(--accent-soft); --rt-ink: var(--text-strong); --rt-text: var(--text); --rt-muted: var(--text-muted); --rt-acc: var(--accent-hover); --rt-bg: var(--surface); }
.crt-rights.is-site { --rt-line: #EDF2F8; --rt-head: #EEF4FB; --rt-cur: #F1F8FE; --rt-cur-h: #D9EEFC; --rt-ink: #0A1128; --rt-text: #243A57; --rt-muted: #53667F; --rt-acc: #0A7BC4; --rt-bg: #FFFFFF; }
.crt-rights { min-width: 0; }
.crt-rights .cp-rights-wrap { overflow: hidden; border: 1px solid var(--rt-line); border-radius: 14px; background: var(--rt-bg); }
.crt-rights .cp-rights { width: 100%; border-collapse: collapse; color: var(--rt-text); font-size: 14px; line-height: 1.4; }
.crt-rights .cp-rights th, .crt-rights .cp-rights td { padding: 10px 14px; border-bottom: 1px solid var(--rt-line); text-align: left; vertical-align: top; }
.crt-rights .cp-rights tbody tr:last-child > * { border-bottom: 0; }
.crt-rights .cp-rights thead th { background: var(--rt-head); color: var(--rt-ink); font-size: 13.5px; font-weight: 800; vertical-align: bottom; }
.crt-rights .cp-rights thead th.is-cur { background: var(--rt-cur-h); }
.crt-rights .cp-rights tbody th { width: 26%; color: var(--rt-ink); font-weight: 600; }
.crt-rights .cp-rights td { width: 18.5%; }
.crt-rights .cp-rights td.is-cur { background: var(--rt-cur); color: var(--rt-ink); font-weight: 600; }
.crt-rights .cp-rights-cur { display: block; margin-top: 2px; color: var(--rt-acc); font-size: 12px; font-weight: 700; }
/* /tarify/, tab Проверка: a section under the plans */
.crt-rights-sec { padding: 10px 0 30px; }
.crt-rights-sec h2 { margin: 0; color: #0A1128; font-size: 30px; line-height: 1.2; font-weight: 800; }
.crt-rights-sec .crt-rights-sub { margin: 8px 0 18px; color: var(--p4-mut, #4F637C); font-size: 17px; }
.crt-rights-sec .crt-rights-foot { margin: 14px 0 0; color: var(--p4-mut, #4F637C); font-size: 15px; }
.crt-rights-sec .crt-rights-foot a { color: var(--p4-blue, #1478D8); font-weight: 700; }

/* ============ 4. the quiz (cabinet and landing) ============ */
.crq {
  --k-acc: var(--cp-accent, #2456B5); --k-acc-h: var(--cp-accent-h, #1C4594); --k-acc-soft: #EAF0FB; --k-ink: var(--cp-ink, #0E1A2B);
  --k-muted: var(--cp-muted, #4A5669); --k-line: var(--cp-line, #D9E0EA); --k-field: #8C99AD; --k-surface: #FFFFFF; --k-soft: var(--cp-bg, #F3F5F9);
  --k-red: var(--st-fail, #BE2D27); --k-red-bg: var(--st-fail-bg, #FBE6E4); --k-red-mark: #E0453E;
  --k-yel: var(--st-manual, #855800); --k-yel-bg: var(--st-manual-bg, #FFF1C9); --k-yel-mark: var(--st-manual-mark, #DFA019);
  --k-green: var(--st-ok, #1D7838); --k-green-bg: var(--st-ok-bg, #E4F2E7); --k-green-mark: #2E9E52;
  min-width: 0; color: var(--k-ink);
}
.crq.is-app {
  --k-acc: var(--accent); --k-acc-h: var(--accent-hover); --k-acc-soft: var(--accent-soft-2); --k-ink: var(--text-strong);
  --k-muted: var(--text-muted); --k-line: var(--line); --k-field: var(--field-border); --k-surface: var(--surface); --k-soft: var(--surface-2);
  --k-red: var(--danger); --k-red-bg: var(--danger-bg); --k-red-mark: var(--danger-solid);
  --k-yel: var(--warning); --k-yel-bg: var(--warning-bg); --k-yel-mark: var(--warning-solid);
  --k-green: var(--success); --k-green-bg: var(--success-bg); --k-green-mark: var(--success-solid);
}
.crq *, .crq *::before, .crq *::after { box-sizing: border-box; }
.crq [hidden] { display: none !important; }
.crq-head { margin-bottom: 18px; }
.crq-title { margin: 0; color: var(--k-ink); font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.crq-title:focus { outline: 0; }
.crq-sub { margin: 6px 0 14px; color: var(--k-muted); font-size: 15px; }
.crq-prog { display: flex; align-items: center; gap: 14px; }
.crq-bar { flex: 1 1 auto; max-width: 460px; height: 8px; overflow: hidden; border-radius: 999px; background: var(--k-soft); box-shadow: inset 0 0 0 1px var(--k-line); }
.crq-bar i { display: block; height: 100%; border-radius: inherit; background: var(--k-acc); transition: width .2s ease; }
.crq-count { color: var(--k-muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.crq-form { margin: 0; }
.crq-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.crq-q { padding: 0; color: var(--k-ink); font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.crq-q:focus { outline: 0; }
.crq-hint { margin: 4px 0 14px; color: var(--k-muted); font-size: 14px; }
.crq-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.crq-opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px;
  border: 1.5px solid var(--k-line); border-radius: 12px; background: var(--k-surface); color: var(--k-ink);
  font-size: 16px; font-weight: 600; line-height: 1.3; cursor: pointer; transition: border-color .14s ease, background .14s ease;
}
.crq-opt:hover { border-color: var(--k-acc); }
.crq-opt:has(input:checked) { border-color: var(--k-acc); background: var(--k-acc-soft); }
.crq-opt input {
  appearance: none; -webkit-appearance: none; display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; margin: 0;
  border: 2px solid var(--k-field); border-radius: 50%; background: var(--k-surface); cursor: pointer;
}
.crq-opt input[type="checkbox"] { border-radius: 6px; }
.crq-opt input:checked { border-color: var(--k-acc); background: var(--k-acc); box-shadow: inset 0 0 0 4px var(--k-surface); }
.crq-opt input[type="checkbox"]:checked {
  box-shadow: none;
  background: var(--k-acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.crq-opt input:focus-visible { outline: 3px solid var(--k-acc); outline-offset: 2px; }
.crq-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.crq-nav .crq-btn { min-width: 150px; }
.crq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 20px;
  border: 1.5px solid transparent; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.25;
  text-align: center; text-decoration: none; cursor: pointer; transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.crq-btn--primary, .crq a.crq-btn--primary { background: var(--k-acc); color: #fff; }
.crq-btn--primary:hover, .crq a.crq-btn--primary:hover { background: var(--k-acc-h); color: #fff; }
.crq-btn--line, .crq a.crq-btn--line { border-color: var(--k-line); background: var(--k-surface); color: var(--k-acc); }
.crq-btn--line:hover, .crq a.crq-btn--line:hover { border-color: var(--k-acc); color: var(--k-acc-h); }
.crq-btn:disabled, .crq-btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.crq-btn:focus-visible { outline: 3px solid var(--k-acc); outline-offset: 2px; }
.crq-skip, .crq-linkbtn {
  min-height: 44px; margin-top: 10px; padding: 0 2px; border: 0; background: none; color: var(--k-acc);
  font: inherit; font-size: 14.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.crq-msg, .crq-amsg, .crq-ex-msg { margin: 10px 0 0; color: var(--k-muted); font-size: 14px; }
.crq-msg:empty, .crq-amsg:empty, .crq-ex-msg:empty { display: none; }
.crq-msg.is-err, .crq-amsg.is-err, .crq-ex-msg.is-err { color: var(--k-red); font-weight: 700; }
.crq-amsg a, .crq-ex-msg a { color: var(--k-acc); font-weight: 700; }

/* the result */
.crq-rgrid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 20px 28px; align-items: start; }
.crq-rmain { min-width: 0; }
.crq-eyebrow { margin: 0; color: var(--k-green); font-size: 13.5px; font-weight: 700; }
.crq-rtitle { margin: 4px 0 12px; color: var(--k-ink); font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.crq-rtitle:focus { outline: 0; }
.crq-ans { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 16px; padding: 12px 0; border-top: 1px solid var(--k-line); border-bottom: 1px solid var(--k-line); }
.crq-ans dt { color: var(--k-muted); font-size: 12.5px; font-weight: 600; }
.crq-ans dd { margin: 0; color: var(--k-ink); font-size: 15px; font-weight: 600; }
.crq-said { margin: 0 0 10px; padding: 12px 16px; border-left: 4px solid var(--k-line); border-radius: 0 12px 12px 0; background: var(--k-soft); color: var(--k-ink); font-size: 15px; line-height: 1.5; }
.crq-said.is-red { border-left-color: var(--k-red-mark); background: var(--k-red-bg); }
.crq-said.is-red b { color: var(--k-red); }
.crq-said.is-yellow { border-left-color: var(--k-yel-mark); background: var(--k-yel-bg); }
.crq-said.is-yellow b { color: var(--k-yel); }
.crq-counts { margin: 0; color: var(--k-muted); font-size: 14px; }
.crq-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.crq-order { display: grid; gap: 12px; max-width: 520px; margin-top: 14px; padding: 16px; border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-surface); }
.crq-order h3 { margin: 0; color: var(--k-ink); font-size: 17px; font-weight: 800; }
.crq-field { display: grid; gap: 6px; min-width: 0; }
.crq-field > span:first-child { color: var(--k-ink); font-size: 14px; font-weight: 700; }
.crq-field input {
  width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--k-field); border-radius: 10px;
  background: var(--k-surface); color: var(--k-ink); font: inherit; font-size: 16px;
}
.crq-field input:focus { border-color: var(--k-acc); outline: 0; box-shadow: 0 0 0 3px rgba(36, 86, 181, .18); }
.crq-check { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; color: var(--k-ink); font-size: 14px; cursor: pointer; }
.crq-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--k-acc); }
.crq-check a { color: var(--k-acc); }
.crq-note { margin: 0; color: var(--k-muted); font-size: 13px; }
.crq-ex { min-width: 0; padding: 18px; border: 1px solid var(--k-line); border-radius: 16px; background: var(--k-soft); }
.crq-ex h3 { margin: 0; color: var(--k-ink); font-size: 19px; font-weight: 800; }
.crq-ex-sub { margin: 2px 0 14px; color: var(--k-muted); font-size: 13.5px; }
.crq-ex-k { margin: 0; color: var(--k-muted); font-size: 12.5px; font-weight: 700; }
.crq-ex-name { margin: 2px 0 0; color: var(--k-ink); font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.crq-ex-inn { margin: 0; color: var(--k-muted); font-size: 13px; }
.crq-ex-lv { margin: 12px 0 0; padding: 12px 14px; border-left: 4px solid var(--k-line); border-radius: 0 12px 12px 0; background: var(--k-surface); }
.crq-ex-lv span { display: block; color: var(--k-muted); font-size: 13px; font-weight: 600; }
.crq-ex-lv b { display: block; font-size: 26px; line-height: 1.15; font-weight: 800; }
.crq-ex-lv p { margin: 6px 0 0; color: var(--k-ink); font-size: 13.5px; }
.crq-ex-lv.is-red { border-left-color: var(--k-red-mark); background: var(--k-red-bg); }
.crq-ex-lv.is-red b { color: var(--k-red); }
.crq-ex-lv.is-yellow { border-left-color: var(--k-yel-mark); background: var(--k-yel-bg); }
.crq-ex-lv.is-yellow b { color: var(--k-yel); }
.crq-ex-lv.is-green { border-left-color: var(--k-green-mark); background: var(--k-green-bg); }
.crq-ex-lv.is-green b { color: var(--k-green); }
.crq-ex-note { margin: 10px 0 0; color: var(--k-muted); font-size: 13px; }
.crq-ex-inn-f { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--k-line); }
.crq-inn-row { display: flex; gap: 8px; }
.crq-inn-row input { flex: 1 1 auto; }
.crq-inn-row .crq-btn { flex: 0 0 auto; min-height: 46px; padding: 10px 14px; }

/* the landing: the quiz in a dialog */
.crq-dlg {
  width: min(1040px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); margin: auto; padding: 0;
  border: 0; border-radius: 18px; background: #fff; color: var(--cp-ink, #0E1A2B); box-shadow: 0 24px 64px rgba(6, 29, 61, .28);
  font-family: var(--cp-font, "Manrope", system-ui, sans-serif); overflow: auto; overscroll-behavior: contain;
}
.crq-dlg:not([open]) { display: none; }
.crq-dlg::backdrop { background: rgba(6, 20, 40, .6); }
.crq-dlg-in { position: relative; padding: 28px 32px 30px; }
.crq-dlg .crq-title { padding-right: 48px; }
.crq-dlg .crq-rgrid { padding-top: 30px; }   /* the close button never covers the example */
.crq-x {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--cp-muted, #4A5669); cursor: pointer;
}
.crq-x:hover { background: var(--cp-bg, #F3F5F9); color: var(--cp-ink, #0E1A2B); }
.crq-x:focus-visible { outline: 3px solid var(--cp-accent, #2456B5); outline-offset: 2px; }
html.crq-lock { overflow: hidden; }
.cp-demo-quiz { margin-top: 18px !important; }
.cp-demo-quiz .cp-btn { white-space: normal; text-align: center; line-height: 1.3; }

/* ============ 5. responsive ============ */
@media (max-width: 1180px) {
  .crt-thead { display: none; }
  .crt-row { grid-template-columns: 32px minmax(0, 1fr) minmax(0, auto); grid-template-areas: "n q q" "n sev src"; align-items: start; padding: 12px 4px; }
  .crt-src { align-self: center; text-align: right; }
  .crt-plan-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .crt-plan-cta { grid-column: 1 / -1; justify-items: start; }
  .crt-plan-cta p { text-align: left; }
  .crt-set-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .crt-set-acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .crq-rgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .crt-lead { font-size: 15px; }
  .crt-now { grid-template-columns: 1fr; gap: 12px; }
  .crt-now-title { font-size: 21px; margin-bottom: 8px; }
  .crt-rule li { font-size: 13.5px; }
  .crt-now-side { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .crt-now-n b { font-size: 20px; }
  .crt-now-c { grid-column: 1; margin: 0; }
  .crt-now-side .btn { grid-column: 2; grid-row: 1 / span 2; }
  .crt-plan-head { margin-bottom: 10px; }
  .crt-plan-grid, .crt-plan-grid.is-paid { grid-template-columns: 1fr; gap: 8px; }
  .crt-plan-col { padding: 10px 14px; }
  .crt-plan-col h3 { margin-bottom: 4px; font-size: 14.5px; }
  .crt-plan-col li { font-size: 13.5px; }
  .crt-plan-cta { order: -1; justify-items: stretch; margin-bottom: 2px; }   /* the pay button stays in the first screen (priemka 7.1) */
  .crt-plan-cta .btn { width: 100%; }
  .crt-now-c { display: none; }
  .crt-set-acts .crt-state { flex: 1 1 150px; }
  .crt-sets-head { flex-wrap: wrap; }
  .crt-requiz { justify-items: start; }
  .crt-set-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 0; }
  .crt-set.is-cur > .crt-set-row { margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
  .crt-set-acts .btn { flex: 1 1 150px; }
  .crt-pts { padding: 12px; }
  .crt-pt { flex-direction: column; }
  .crt-move .btn { width: 100%; }

  /* the editor: a row becomes a card, the question, the threshold and the three buttons under each other (priemka 7.5) */
  .crt-rows { display: grid; gap: 10px; }
  .crt-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "n q" "n src" "sev sev"; gap: 6px 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
  .crt-row:last-child { border-bottom: 1px solid var(--line); }
  .crt-src { text-align: left; }
  .crt-sev { flex-direction: column; gap: 6px; margin-top: 4px; }
  .crt-sev-b { width: 100%; min-height: 44px; font-size: 14px; white-space: normal; }
  .crt-in.input { min-height: 40px; font-size: 16px; }
  .crt-ba { grid-template-columns: 1fr; gap: 8px; }
  .crt-save-row { display: grid; }
  .crt-save-row .field { max-width: none; }
  .crt-save-row .btn { width: 100%; }
  .crt-bar { bottom: 8px; padding: 10px 12px; }
  .crt-bar p { flex-basis: 100%; }
  .crt-lib-list li { flex-direction: column; align-items: stretch; }
  .crt-add .btn { flex: 1 1 100%; }

  /* the rights table: one plan per cell, two cells in a row */
  .crt-rights .cp-rights-wrap { border: 0; border-radius: 0; background: transparent; }
  .crt-rights .cp-rights thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .crt-rights .cp-rights, .crt-rights .cp-rights tbody { display: block; }
  .crt-rights .cp-rights tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--rt-line); border-radius: 12px; background: var(--rt-bg); }
  .crt-rights .cp-rights tbody th, .crt-rights .cp-rights td { display: block; width: auto; padding: 0; border: 0; }
  .crt-rights .cp-rights tbody th { grid-column: 1 / -1; margin-bottom: 2px; font-size: 15px; font-weight: 800; }
  .crt-rights .cp-rights td { padding: 8px 10px; border-radius: 8px; background: var(--rt-head); font-size: 13.5px; }
  .crt-rights .cp-rights td::before { content: attr(data-l); display: block; color: var(--rt-muted); font-size: 12px; font-weight: 600; }
  .crt-rights .cp-rights td.is-cur { background: var(--rt-cur-h); }
  .crt-rights .cp-rights td.is-cur::before { content: attr(data-l) ", ваш тариф"; color: var(--rt-acc); }
  .crt-rights-sec h2 { font-size: 25px; }
  .crt-rights-sec .crt-rights-sub { font-size: 15px; }

  /* the quiz on a phone */
  .crq-title { font-size: 22px; }
  .crq-sub { font-size: 14px; }
  .crq-q { font-size: 20px; }
  .crq-opts { grid-template-columns: 1fr; gap: 8px; }
  .crq-opt { min-height: 52px; }
  .crq-nav { display: grid; grid-template-columns: 1fr 1.4fr; }
  .crq-nav .crq-btn { min-width: 0; }
  .crq-nav [data-crq-back][hidden] + [data-crq-next] { grid-column: 1 / -1; }
  .crq-skip { display: block; width: 100%; text-align: center; }
  .crq-rtitle { font-size: 25px; }
  .crq-acts { display: grid; }
  .crq-acts .crq-btn { width: 100%; }
  .crq-dlg { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .crq-dlg-in { padding: 18px 16px 24px; }
  .crq-x { top: 8px; right: 6px; }
}
@media (prefers-reduced-motion: reduce) { .crq-bar i { transition: none; } }

/* ============ 5. the set by mail next to the quiz result (cp/_quiz.html [data-quiz-mail]), макет voronka/quiz_mail_1440.png ============ */
.crq-mail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 28px; align-items: start; margin-top: 20px; padding: 16px 18px;
  border: 1px solid var(--k-line); border-radius: 16px; background: var(--k-surface); }
.crq-mail-h { margin: 0; color: var(--k-ink); font-size: 19px; line-height: 1.25; font-weight: 800; }
.crq-mail-sub { margin: 4px 0 0; color: var(--k-muted); font-size: 14px; }
.crq-mail-f { display: grid; gap: 2px; min-width: 0; margin: 0; }
.crq-mail-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.crq-mail-in {
  flex: 1 1 180px; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--k-field); border-radius: 10px;
  background: var(--k-surface); color: var(--k-ink); font: inherit; font-size: 16px;
}
.crq-mail-in:focus { border-color: var(--k-acc); outline: 0; box-shadow: 0 0 0 3px rgba(36, 86, 181, .18); }
.crq-mail-row .crq-btn { flex: 0 0 auto; min-height: 46px; min-width: 130px; }
.crq-mail .crq-check { align-items: flex-start; padding: 4px 0; line-height: 1.4; }
.crq-mail-opt { color: var(--k-muted); }
.crq-mail .cp-msg { margin: 4px 0 0; color: var(--k-muted); font-size: 14px; }
.crq-mail .cp-msg:empty { display: none; }
.crq-mail .cp-msg--err { color: var(--k-red); font-weight: 700; }
.crq-mail .cp-msg--ok { color: var(--k-green); font-weight: 700; }
@media (max-width: 760px) {
  .crq-mail { grid-template-columns: minmax(0, 1fr); padding: 14px; margin-top: 16px; }
  .crq-mail-h { font-size: 17px; }
  .crq-mail .crq-check { font-size: 13.5px; }
}
