/* Soulence — самопроверка и страницы продуктов. Дополняет style.css, токены берёт оттуда. Без cookies и трекеров. */

[hidden] { display: none !important; }

/* Страницы без нижней мобильной кнопки: убираем отступ, который style.css добавляет под неё */
@media (max-width: 899px) { body.no-mobile-cta { padding-bottom: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .option, .option input::before, .progress-fill { transition: none; }
  .btn:hover { transform: none; }
}

.narrow { max-width: 760px; }
.tool-hero { padding: 40px 0 8px; }
@media (min-width: 900px) { .tool-hero { padding: 72px 0 16px; } }
.tool-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.tool-section { padding: 24px 0 64px; }
@media (min-width: 900px) { .tool-section { padding: 32px 0 96px; } }

/* Кнопки-элементы <button> в стиле .btn из style.css */
button.btn { font-family: var(--sans); line-height: 1.3; border: 0; cursor: pointer; }
button.btn-ghost { background: transparent; border: 1.5px solid var(--olive); }
.btn-text { background: none; border: 0; padding: 12px 4px; font: inherit; font-weight: 700; color: var(--sage-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-text:hover { color: var(--olive); }
.btn[hidden], .btn-text[hidden] { display: none; }

/* Карточка инструмента */
.tool-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow); scroll-margin-top: 84px; }
@media (min-width: 560px) { .tool-card { padding: 32px; } }
.tool-card > :last-child { margin-bottom: 0; }

.facts { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: .85rem; font-weight: 700; color: var(--sage-deep); background: #e6ebdf; border-radius: 999px; padding: 5px 12px; }

/* Прогресс */
.progress { margin-bottom: 22px; }
.progress-text { display: block; font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .06em; line-height: 1.4; color: var(--sage-deep); margin: 0 0 8px; }
.progress-track { height: 6px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--sage-deep); border-radius: 999px; transition: width .25s ease; }

/* Вопросы */
.quiz fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz legend { padding: 0; margin: 0 0 18px; font-family: var(--serif); font-weight: 600; color: var(--olive); font-size: clamp(1.45rem, 4.6vw, 1.95rem); line-height: 1.2; }
.quiz legend:focus { outline: none; }
.quiz legend:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.hint { font-size: .92rem; color: var(--muted); margin: -8px 0 16px; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--cream); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.option:hover { border-color: var(--sage); }
.option span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.option input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 2px 0 0; border: 2px solid var(--sage-deep); border-radius: 50%; background: var(--paper); display: grid; place-items: center; cursor: pointer; }
.option input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--olive); transform: scale(0); transition: transform .12s ease; }
.option input:checked::before { transform: scale(1); }
.option input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.option:has(input:checked) { border-color: var(--olive); background: #e6ebdf; }
.option:has(input:focus-visible) { border-color: var(--gold); }
@media (forced-colors: active) {
  .option input { appearance: auto; -webkit-appearance: auto; }
  .option input::before { display: none; }
}

.quiz-error { min-height: 1.6em; margin: 12px 0 0; font-size: .95rem; font-weight: 700; color: #8a3b2e; }
.quiz-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.quiz-nav .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .quiz-nav .btn { flex: 0 0 auto; } }

/* Результат */
.result h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.result h2:focus { outline: none; }
.result h2:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.scenario { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; }
.scenario:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.scenario h3 { font-size: clamp(1.45rem, 4.2vw, 1.8rem); }
.today { background: var(--sand); border-radius: 16px; padding: 18px 20px; margin-top: 16px; }
.today h4 { margin: 0 0 6px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); }
.today p { margin: 0; }
.today.course .btn { margin-top: 12px; }
.result-actions { display: grid; gap: 12px; margin-top: 26px; }
.result-actions .btn { width: 100%; }
@media (min-width: 720px) { .result-actions { grid-template-columns: 1fr 1fr; } }
.result-again { margin-top: 14px; text-align: center; }
.small-print { font-size: .88rem; color: var(--muted); margin-top: 18px; }

.notice.tool-notice { margin-top: 24px; }
.notice.tool-notice p:last-child { margin-bottom: 0; }
.nojs-note { background: var(--sand); border-radius: var(--radius); padding: 22px; }
.nojs-note p:last-child { margin-bottom: 0; }

/* Страница продукта */
.product-hero { padding: 40px 0 56px; }
@media (min-width: 900px) { .product-hero { padding: 80px 0 88px; } }
.product-hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.5rem); }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 22px; }
.price-line b { font-family: var(--serif); font-size: 2.2rem; color: var(--olive); line-height: 1; }
.price-line span { color: var(--muted); font-size: .95rem; }
.status-note { margin-top: 14px; font-size: .92rem; color: var(--muted); }
.check-list, .cross-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li, .cross-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--sage-deep); }
.cross-list li::before { content: "—"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--gold); }
.lessons { counter-reset: lesson; display: grid; gap: 18px; }
@media (min-width: 720px) { .lessons { grid-template-columns: repeat(2, 1fr); } }
.lesson { counter-increment: lesson; }
.lesson .meta { font-size: .85rem; font-weight: 700; color: var(--sage-deep); margin-bottom: 8px; }
.lesson .meta::before { content: "Урок " counter(lesson) " · "; }
.lesson .task { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .95rem; }
.lesson .task b { color: var(--olive); }
