/* =============================================================
   CHEXX review (NO) — page-scoped styles
   Файл: css/chexx-review.css
   Изоляция: .cx-review (есть в разметке). Fallback: .page-id-N .cx-review
   Тема: тёмная. Шрифты и цвета ссылок НЕ переопределяются.
   ============================================================= */

/* ---------- 1. Переменные (префикс --cx-) ---------- */
.cx-review {
  --cx-bg:        #0e1116;
  --cx-surface:   #161b22;
  --cx-surface-2: #1c2230;
  --cx-border:    #2a3240;
  --cx-text:      #e6edf3;
  --cx-muted:     #9aa7b8;
  --cx-accent:    #22c55e;
  --cx-accent-2:  #16a34a;
  --cx-danger:    #ef4444;
  --cx-ok:        #22c55e;
  --cx-warn:      #f59e0b;
  --cx-radius:    12px;
  --cx-radius-sm: 8px;
  --cx-gap:       1rem;

  display: block;
  max-width: 960px;
  margin-inline: auto;
  padding: 0 16px 48px;
  background: var(--cx-bg);
  color: var(--cx-text);
  line-height: 1.65;
  overflow-wrap: break-word;
}

.cx-review * { box-sizing: border-box; }

/* ---------- 2. Типографика внутри статьи ---------- */
.cx-review h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2; margin: 0 0 .6em; }
.cx-review h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.25; margin: 2em 0 .6em; padding-top: .2em; border-top: 1px solid var(--cx-border); }
.cx-review h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.cx-review p  { margin: 0 0 1em; }
.cx-review ul, .cx-review ol { margin: 0 0 1em 1.25em; padding: 0; }
.cx-review li { margin: .35em 0; }
.cx-review strong { color: #fff; }
.cx-review small { color: var(--cx-muted); }

/* WordPress-обёртки */
.cx-review .entry-content > * { max-width: 100%; }
.cx-review .wp-block-image img,
.cx-review figure img { max-width: 100%; height: auto; border-radius: var(--cx-radius-sm); }

/* ---------- 3. Hero / лид / скор ---------- */
.cx-review .cx-hero {
  background: linear-gradient(180deg, var(--cx-surface-2), var(--cx-surface));
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  margin: 0 0 1.5rem;
}
.cx-review .cx-lead { font-size: 1.05rem; color: var(--cx-muted); }
.cx-review .cx-score { font-size: 1.1rem; }
.cx-review .cx-score strong { color: var(--cx-accent); font-size: 1.25rem; }
.cx-review .cx-hero ul { margin-top: 1em; }

/* ---------- 4. CTA-кнопки ---------- */
.cx-review .cx-cta { text-align: center; margin: 1.5em 0; }
.cx-review .cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;              /* кликабельная зона ≥ 40px */
  padding: .75em 1.6em;
  background: var(--cx-accent);
  color: #06210f;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--cx-radius-sm);
  transition: background .15s ease, transform .15s ease;
}
.cx-review .cx-btn:hover { background: var(--cx-accent-2); }
.cx-review .cx-btn:active { transform: translateY(1px); }
.cx-review .cx-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cx-review .cx-cta small { display: inline-block; margin-top: .5em; }

/* ---------- 5. Takeaway / TOC ---------- */
.cx-review .cx-takeaways,
.cx-review .cx-toc {
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-left: 4px solid var(--cx-accent);
  border-radius: var(--cx-radius-sm);
  padding: 1em 1.2em;
  margin: 1.5em 0;
}
.cx-review .cx-toc ol { columns: 2; column-gap: 2rem; }
.cx-review .cx-toc a { text-decoration: none; }
.cx-review .cx-toc a:hover { text-decoration: underline; }

/* ---------- 6. Скоркарта ---------- */
.cx-review .cx-scorecard {
  list-style: none;
  margin: 1em 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .5rem 1rem;
}
.cx-review .cx-scorecard li {
  display: flex; justify-content: space-between; gap: .5rem;
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  padding: .55em .8em;
}
.cx-review .cx-scorecard strong { color: var(--cx-accent); }

/* ---------- 7. Таблицы ---------- */
.cx-review .cx-table-wrap {
  overflow-x: auto;
  margin: 1.2em 0;
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  -webkit-overflow-scrolling: touch;
}
.cx-review table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .95rem; }
.cx-review caption { caption-side: top; text-align: left; padding: .8em 1em .2em; color: var(--cx-muted); font-size: .9rem; }
.cx-review th, .cx-review td { padding: .6em .8em; text-align: left; border-bottom: 1px solid var(--cx-border); vertical-align: top; }
.cx-review thead th { background: var(--cx-surface-2); color: #fff; font-weight: 600; position: sticky; top: 0; }
.cx-review tbody th { font-weight: 600; color: #fff; }
.cx-review tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.cx-review tbody tr:hover { background: rgba(255,255,255,.05); }

/* ---------- 8. Шаги ---------- */
.cx-review .cx-steps { list-style: none; margin: 1.2em 0; padding: 0; counter-reset: cx-step; }
.cx-review .cx-steps li {
  position: relative;
  padding: .8em 1em .8em 3.2em;
  margin: 0 0 .6em;
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  counter-increment: cx-step;
}
.cx-review .cx-steps li::before {
  content: counter(cx-step);
  position: absolute; left: .8em; top: .8em;
  width: 1.9em; height: 1.9em;
  display: grid; place-items: center;
  background: var(--cx-accent); color: #06210f;
  font-weight: 700; border-radius: 50%; font-size: .9rem;
}
.cx-review .cx-steps li br + * { color: var(--cx-muted); }

/* ---------- 9. «Делать / не делать» ---------- */
.cx-review .cx-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5em 0;
}
.cx-review .cx-two > div {
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  padding: 1em 1.2em;
}
.cx-review .cx-pos { border-top: 4px solid var(--cx-ok); }
.cx-review .cx-neg { border-top: 4px solid var(--cx-danger); }
.cx-review .cx-pos .cx-h { color: var(--cx-ok); }
.cx-review .cx-neg .cx-h { color: var(--cx-danger); }
.cx-review .cx-two ul { margin-bottom: 0; }
.cx-review .cx-pos li::marker { color: var(--cx-ok); }
.cx-review .cx-neg li::marker { color: var(--cx-danger); }

/* ---------- 10. Tip / Note ---------- */
.cx-review .cx-tip,
.cx-review .cx-note {
  display: block;
  background: var(--cx-surface-2);
  border: 1px solid var(--cx-border);
  border-left: 4px solid var(--cx-warn);
  border-radius: var(--cx-radius-sm);
  padding: 1em 1.2em;
  margin: 1.5em 0;
}
.cx-review .cx-note { border-left-color: var(--cx-accent); }
.cx-review .cx-tip p:last-child,
.cx-review .cx-note p:last-child { margin-bottom: 0; }

/* ---------- 11. Инструменты (общая обёртка) ---------- */
.cx-review .cx-tool {
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius);
  padding: 1.2em;
  margin: 1.5em 0;
}
.cx-review .cx-out { margin-top: 1em; padding-top: 1em; border-top: 1px dashed var(--cx-border); }
.cx-review .cx-out p { margin: .3em 0; }
.cx-review .cx-out:empty { display: none; }

/* ---------- 12. Чек-лист (cx-check + <progress>) ---------- */
.cx-review .cx-tool progress {
  width: 100%;
  height: 8px;
  margin: .5em 0 .8em;
  accent-color: var(--cx-accent);
}
.cx-review .cx-check { list-style: none; margin: 0 0 1em; padding: 0; }
.cx-review .cx-check li { margin: 0 0 .5em; }
.cx-review .cx-check label {
  display: flex;
  align-items: flex-start;
  gap: .7em;
  padding: .7em .9em;
  min-height: 44px;
  background: var(--cx-surface-2);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cx-review .cx-check label:hover { border-color: var(--cx-accent); }
.cx-review .cx-check input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: .15em;
  flex-shrink: 0;
  accent-color: var(--cx-accent);
}
.cx-review .cx-check label:focus-within { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
.cx-review .cx-check label:has(input:checked) {
  background: rgba(34,197,94,.12);
  border-color: var(--cx-accent);
}
.cx-review .cx-check small { display: block; color: var(--cx-muted); margin-top: .2em; }
.cx-review .cx-tool [data-out="done"] {
  margin: 0;
  background: rgba(34,197,94,.12);
  border-color: var(--cx-accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- 13. Тест «подходит ли» (cx-q / cx-res) ---------- */
.cx-review .cx-q {
  padding: 1em;
  margin: 0 0 .7em;
  background: var(--cx-surface-2);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
}
.cx-review .cx-q p:first-child { margin-top: 0; }
.cx-review .cx-q p:last-child { margin-bottom: 0; }
.cx-review .cx-q label {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 40px;
  margin: 0 .6em .4em 0;
  padding: .45em 1em;
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cx-review .cx-q label:hover { border-color: var(--cx-accent); }
.cx-review .cx-q label:focus-within { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
.cx-review .cx-q label:has(input:checked) {
  background: rgba(34,197,94,.14);
  border-color: var(--cx-accent);
}
.cx-review .cx-q input[type="radio"] { accent-color: var(--cx-accent); }
.cx-review .cx-res { list-style: none; margin: 1em 0 0; padding: 0; }
.cx-review .cx-res li {
  padding: .55em .8em;
  margin: 0 0 .4em;
  background: var(--cx-surface-2);
  border-left: 4px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  font-size: .93rem;
}
.cx-review .cx-res li.is-ok  { border-left-color: var(--cx-ok); }
.cx-review .cx-res li.is-no  { border-left-color: var(--cx-danger); }
.cx-review .cx-res li.is-mid { border-left-color: var(--cx-warn); }

/* ---------- 14. «Правда / миф» ---------- */
.cx-review .cx-myth {
  background: var(--cx-surface-2);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  padding: 1em;
  margin: .8em 0;
}
.cx-review .cx-myth p:first-child { margin-top: 0; }
.cx-review .cx-myth button {
  min-height: 40px;
  min-width: 88px;
  padding: .5em 1.1em;
  margin: 0 .4em .4em 0;
  background: var(--cx-surface);
  color: var(--cx-text);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  cursor: pointer;
  font: inherit;
  transition: background .15s, border-color .15s;
}
.cx-review .cx-myth button:hover:not(:disabled) { border-color: var(--cx-accent); }
.cx-review .cx-myth button:focus-visible { outline: 3px solid var(--cx-accent); outline-offset: 2px; }
.cx-review .cx-myth button:disabled { opacity: .55; cursor: default; }
.cx-review .cx-myth.is-right { border-color: var(--cx-ok); box-shadow: inset 4px 0 0 var(--cx-ok); }
.cx-review .cx-myth.is-wrong { border-color: var(--cx-danger); box-shadow: inset 4px 0 0 var(--cx-danger); }
.cx-review .cx-ans {
  margin: .8em 0 0;
  padding-top: .8em;
  border-top: 1px dashed var(--cx-border);
  color: var(--cx-muted);
}
.cx-review .cx-ans strong { margin-right: .4em; }
.cx-review .cx-myth.is-right .cx-ans strong { color: var(--cx-ok); }
.cx-review .cx-myth.is-wrong .cx-ans strong { color: var(--cx-danger); }

/* ---------- 15. Календарь промо (data-cx-tool="week") ---------- */
.cx-review .cx-tool select {
  min-height: 40px;
  padding: .45em .9em;
  background: var(--cx-surface-2);
  color: var(--cx-text);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  font: inherit;
  cursor: pointer;
}
.cx-review .cx-tool select:focus-visible { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
.cx-review .cx-day { margin: 1em 0 0; }
.cx-review .cx-day[hidden] { display: none; }
.cx-review .cx-promo {
  background: var(--cx-surface-2);
  border: 1px solid var(--cx-border);
  border-left: 4px solid var(--cx-accent);
  border-radius: var(--cx-radius-sm);
  padding: .8em 1em;
  margin: 0 0 .6em;
}
.cx-review .cx-promo:last-child { margin-bottom: 0; }
.cx-review .cx-promo b { color: #fff; }

/* ---------- 16. Калькулятор оценки (chips) ---------- */
.cx-review .cx-chips {
  list-style: none;
  margin: 1em 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.cx-review .cx-chips label {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 40px;
  padding: .4em .9em;
  background: var(--cx-surface-2);
  border: 1px solid var(--cx-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: .92rem;
  transition: border-color .15s, background .15s;
}
.cx-review .cx-chips label:hover { border-color: var(--cx-accent); }
.cx-review .cx-chips label:focus-within { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
.cx-review .cx-chips label:has(input:checked) {
  background: rgba(34,197,94,.14);
  border-color: var(--cx-accent);
}
.cx-review .cx-chips input { accent-color: var(--cx-accent); }
.cx-review .cx-chips input:disabled + * { opacity: .5; }

/* ---------- 17. FAQ (details / summary) ---------- */
.cx-review .cx-faq details {
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: var(--cx-radius-sm);
  margin: 0 0 .6em;
}
.cx-review .cx-faq summary {
  cursor: pointer;
  padding: .9em 2.4em .9em 1em;
  font-weight: 600;
  color: #fff;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.cx-review .cx-faq summary::-webkit-details-marker { display: none; }
.cx-review .cx-faq summary::after {
  content: "+";
  position: absolute; right: 1em;
  font-size: 1.3em;
  color: var(--cx-accent);
  transition: transform .2s;
}
.cx-review .cx-faq details[open] summary::after { content: "–"; }
.cx-review .cx-faq details > p { margin: 0; padding: 0 1em 1em; color: var(--cx-muted); }
.cx-review .cx-faq summary:focus-visible { outline: 3px solid var(--cx-accent); outline-offset: -3px; }

/* ---------- 18. Вердикт ---------- */
.cx-review .cx-verdict {
  display: block;
  background: linear-gradient(180deg, var(--cx-surface-2), var(--cx-surface));
  border: 1px solid var(--cx-border);
  border-top: 4px solid var(--cx-accent);
  border-radius: var(--cx-radius);
  padding: 1.2em 1.4em;
  margin: 1.5em 0;
}
.cx-review .cx-verdict p:last-child { margin-bottom: 0; }

/* ---------- 19. Изображения ---------- */
.cx-review figure { margin: 1.5em 0; }
.cx-review figcaption { font-size: .88rem; color: var(--cx-muted); margin-top: .5em; text-align: center; }

/* ---------- 20. Адаптив ---------- */
@media (max-width: 860px) {
  .cx-review { padding-inline: 14px; }
  .cx-review .cx-toc ol { columns: 1; }
  .cx-review .cx-two { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .cx-review { padding-inline: 12px; --cx-gap: .75rem; }
  .cx-review h1 { font-size: 1.5rem; }
  .cx-review .cx-hero { padding: 1.1rem; }
  .cx-review .cx-scorecard { grid-template-columns: 1fr; }
  .cx-review .cx-q label { flex: 1 1 calc(50% - .6em); justify-content: center; }
  .cx-review .cx-chips label { flex: 1 1 calc(50% - .5rem); justify-content: center; }
  .cx-review .cx-steps li { padding: .8em .9em .8em 2.9em; }
  .cx-review table { font-size: .88rem; }
  .cx-review th, .cx-review td { padding: .5em .6em; }
}

/* ---------- 21. Доступность / reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cx-review *, .cx-review *::before, .cx-review *::after {
    transition: none !important;
    animation: none !important;
  }
}