/* JOY visual fixes, 10.11.2026. Подключается после usability.css на всех страницах.
   Селекторы усилены префиксом html, чтобы перекрыть старые правила без правки исходных файлов. */

/* 1. Меню: полоса под пунктом равна ширине слова, без стрелки-шеврона (12px + gap 6px). */
html [data-navlink]:has(> [data-chev])::after{right:18px}
/* Один шрифт и одна высота строки у всех пунктов: на страницах услуг меню было в Plus Jakarta Sans,
   а «Отрасли» (кнопка) — с line-height:normal и сдвигом на ~0,7px. */
html [data-hdr]{font-family:Manrope,"Plus Jakarta Sans","Segoe UI",system-ui,sans-serif}
html [data-hdr] [data-navlink]{font-family:Manrope,"Plus Jakarta Sans","Segoe UI",system-ui,sans-serif!important}
@media (min-width:1024px){
  html [data-hdr] [data-navlink]{line-height:20px!important;padding-top:0!important;padding-bottom:0!important}
}

/* 2. Карточки кейсов: без светлой каймы и «рваных» углов при смене сторон.
   Фон карточки переносим на лицевую сторону, сама карточка фон не рисует,
   стороны — прямоугольники, скругление даёт обрезка родителя. */
html [data-case]{-webkit-background-clip:text!important;background-clip:text!important}
html [data-case] [data-cfront]{background-color:inherit}
html [data-case] [data-cfront],html [data-case] [data-cres]{border-radius:0}
html [data-case] [data-cres]{transform:translate3d(100%,0,0)}
html [data-case]:hover [data-cfront],html [data-case]:focus-within [data-cfront]{transform:translate3d(-100%,0,0)}
html [data-case]:hover [data-cres],html [data-case]:focus-within [data-cres]{transform:translate3d(0,0,0)}

/* 3. Узкий экран: при наведении описание кейса не пропадает.
   Мышь — показываем сторону с результатом; сенсорный экран — лицевая сторона остаётся на месте. */
@media (max-width:767px) and (hover:hover) and (pointer:fine){
  html [data-case] [data-cres]{display:flex!important;padding:24px!important}
}
@media (hover:none),(pointer:coarse){
  html [data-case]:hover [data-cfront],html [data-case]:focus-within [data-cfront]{transform:none}
}

/* 4. Блок услуг: параллакс-наклон за курсором, как у «Все направления» — делает card-tilt.js (главная).
   Здесь только тень при наведении; transform в transition не входит, иначе наклон за курсором запаздывает. */
@media (hover:hover) and (pointer:fine){
  html [data-sc2]{transform-style:preserve-3d;will-change:transform;transition:border-color 420ms,box-shadow 420ms!important}
  html [data-sc2]:hover,html [data-sc2]:focus-within{box-shadow:0 18px 38px rgba(24,20,20,.16)}
}
@media (prefers-reduced-motion:reduce){
  html [data-sc2]:hover,html [data-sc2]:focus-within{transform:none!important}
}

/* 5. Новые страницы (v2): красный как на главной.
   Главная: кнопка #b81720 → #e12a34, акцент #de3a43, ссылки на светлом #c91c24. */
html:root{--v2-red:#c91c24}
html .cd-page{--accent:#c91c24}
html .v2page .v2-button{background:linear-gradient(135deg,#b81720 0%,#e12a34 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 8px 22px rgba(184,23,32,.24)}
html .v2-hero h1 em{color:#de3a43}
html .service-detail .v2-hero h1 em{color:#fff;text-decoration-color:#de3a43}
html .service-detail .v2-hero h1 em::after{background:#de3a43}
html .v2-textlink{border-bottom-color:#c91c24}
html .v2-card .v2-index,html .v2-list li::before,html .sd-faq summary span,html .cd-query b{color:#c91c24}
html .sd-steps article,html .sd-formats article{border-top-color:#c91c24}
html .sd-case:hover,html .v2page .v2-audit-button:hover{border-color:#c91c24}
html .ux-query i{background:#c91c24}
html [data-industry-panel] a:hover,html [data-industry-panel] a:focus-visible{color:#c91c24}
html .v2-industry-card{--industry-accent:#c91c24}
html .v2page-services .v2-start-steps .v2-index,
html .v2page .v2-audit-offer a.v2-textlink,
html .v2page .v2-industry-card .v2-index,
html .v2-industry-card-link,
html .v2page .v2-project-more,
html .v2page .v2-projects-poster .v2-project-more,
html .v2page .v2-audit-button{color:#b81720}
html .v2page .v2-audit-button{border-color:#e7e7e7;background:#f5f4f1}
/* Розоватые акценты на тёмном фоне — оттенок главной, контраст не ниже 5:1. */
html .v2-projects-report .v2-project-reveal>span,html .v2-med-path article>span{color:#f26b72}
html .v2page :focus-visible,html .service-detail a:focus-visible,html .sd-faq summary:focus-visible,html .service-detail button:focus-visible{outline-color:#c91c24}
/* Подсветка первого экрана: красный тон главной вместо коричневого. */
html body .v2-hero{background:radial-gradient(ellipse at 100% 0%,rgba(201,28,36,.1),transparent 55%),#202020}
html .v2page-industry-meditsina .v2-hero{background:radial-gradient(ellipse at 100% 10%,rgba(201,28,36,.14),transparent 60%),#202020}
html .sd-seo .v2-hero{background:radial-gradient(ellipse at 82% 65%,rgba(201,28,36,.12),transparent 55%),#202020}
html .sd-sozdanie-saitov .v2-hero{background:#242424}
html .sd-yandex-direct .v2-hero{background:#242323}

/* 6. Блоки кейсов на страницах услуг и «О нас» — в формате «Связанные материалы»
   (эталон: /cases/kwikpay-geo, [data-relc]). Тёмная полоса на всю ширину, полупрозрачные карточки. */
html .v2page section:is(:has(> .sd-cases),:has(a.rp-related),:has(> .v2-grid > a.v2-card[href*="/cases/"])),
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]){
  position:relative;color:#e9e7e2;background:#202020!important;
  border-image:linear-gradient(#202020,#202020) fill 0/ /0 100vmax;
  border-radius:0!important;padding-top:clamp(64px,8vw,104px)!important;padding-bottom:clamp(64px,8vw,104px)!important;margin-top:0!important;margin-bottom:0!important}
html .v2page section:is(:has(> .sd-cases),:has(a.rp-related),:has(> .v2-grid > a.v2-card[href*="/cases/"]),.v2-section:has(> a.v2-button[href*="/cases/"])) :is(h2,h2 b,h2 em){color:#e9e7e2!important}
html .v2page section:is(:has(> .sd-cases),:has(a.rp-related),:has(> .v2-grid > a.v2-card[href*="/cases/"]),.v2-section:has(> a.v2-button[href*="/cases/"])) :is(.v2-section-head p,.rp-head p,.v2-wrap > p,> p):not(.v2-eyebrow){color:rgba(233,231,226,.68)!important}
html .v2page section:is(:has(> .sd-cases),:has(a.rp-related),:has(> .v2-grid > a.v2-card[href*="/cases/"]),.v2-section:has(> a.v2-button[href*="/cases/"])) .v2-eyebrow{color:rgba(233,231,226,.52)!important}
/* Сетка: как [data-relg] */
html .v2page .sd-cases,html .v2page .v2-grid:has(> a.v2-card[href*="/cases/"]){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))!important;gap:16px!important}
/* Карточка: как [data-relc] */
html .v2page :is(a.sd-case,a.rp-related,.v2-grid > a.v2-card[href*="/cases/"]){
  display:flex!important;flex-direction:column;gap:12px;padding:26px 24px 22px!important;border-radius:22px!important;
  background:rgba(255,255,255,.045)!important;border:1px solid rgba(255,255,255,.11)!important;box-shadow:none!important;color:#fcfcfb!important;
  text-decoration:none;transition:transform 240ms cubic-bezier(.22,.8,.2,1),background-color 240ms ease,border-color 240ms ease}
html .v2page :is(a.sd-case,a.rp-related,.v2-grid > a.v2-card[href*="/cases/"]):hover{transform:translateY(-4px);background:rgba(255,255,255,.075)!important;border-color:rgba(222,58,67,.5)!important}
html .v2page :is(a.sd-case,a.rp-related,.v2-grid > a.v2-card[href*="/cases/"]) > :is(.v2-eyebrow,.v2-index,span:first-child){font-style:normal;font-size:11px!important;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:rgba(255,255,255,.45)!important;margin:0!important}
html .v2page a.sd-case > strong,html .v2page a.rp-related > b{font-family:Montserrat,Manrope,sans-serif;font-size:30px!important;font-weight:600!important;letter-spacing:-.04em;line-height:1;color:#ff7a80!important;margin:4px 0 0!important}
html .v2page a.rp-related > b{font-size:20px!important}
html .v2page a.sd-case > span:not(.v2-eyebrow):not(.v2-textlink),html .v2page a.sd-case > small{color:rgba(255,255,255,.62)!important;margin:0!important}
html .v2page a.sd-case > small{font-size:12px}
html .v2page :is(a.sd-case,a.rp-related,.v2-grid > a.v2-card[href*="/cases/"]) h3{font-family:Montserrat,Manrope,sans-serif;font-size:19px!important;font-weight:600!important;letter-spacing:-.028em;line-height:1.2;color:#fcfcfb!important;margin:6px 0 0!important}
html .v2page :is(a.sd-case,a.rp-related,.v2-grid > a.v2-card[href*="/cases/"]) p{margin:0!important;font-size:14.5px!important;line-height:1.5;color:rgba(255,255,255,.62)!important}
html .v2page :is(a.sd-case > .v2-textlink,a.rp-related > strong,.v2-grid > a.v2-card[href*="/cases/"] > .v2-industry-card-link){margin-top:auto!important;padding-top:6px!important;border:0!important;font-size:13.5px!important;font-weight:600!important;color:#ff7a80!important;display:inline-flex;gap:7px}
/* Кейс «43 → 167» после финального блока — тоже тёмный */
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]) h2{font-family:Montserrat,Manrope,sans-serif}

/* 7. Палитра и скругления страниц услуг — как на главной.
   Светлые плашки #f5f4f1, тёмные #242424/#202020, карточки 20px, панели 28px, акцент — красный главной. */
html .v2page :is(.sd-cost,.sd-audit,.geo-answer,.geo-lab-row,.serm-search,.ux-design-desk,.ux-stage-buttons,.ux-ad-format-0,.content-paper){background-color:#f5f4f1!important}
html .v2page :is(.sd-cost,.sd-audit,.geo-answer,.serm-search,.ux-design-desk,.ux-ad-format-visual,.ux-campaign-board,.sd-steps.ux-ads-steps){border-radius:20px!important}
html .v2page :is(.ux-seo-scope,.serm-decisions,.content-formats) > article{border-radius:20px!important;background-color:#f5f4f1!important}
html .v2page .ux-seo-scope > article:nth-child(2){background-color:#242424!important}
html .v2page .ux-seo-scope > article:nth-child(3){background-color:#fff!important;box-shadow:inset 0 0 0 1px #e7e7e7}
html .v2page .sd-steps.ux-web-steps > article{background-color:#f5f4f1!important}
html .v2page .sd-steps.ux-web-steps > article:nth-child(even){background-color:#ecebe8!important}
html .v2page .sd-deliver{background-color:#f5f4f1!important}
html .v2page.sd-yandex-direct .sd-deliver{border-radius:20px!important}
html .v2page.sd-sozdanie-saitov .sd-deliver{background-color:#242424!important;border-radius:20px!important}
html .v2page :is(.ux-ad-format-1,.sd-steps.ux-ads-steps,.geo-network-center){background-color:#242424!important}
html .v2page .ux-ad-format-2,html .v2page .geo-mark,html .v2page .serm-reply{background-color:#c91c24!important}
html .v2page .rp-section.rp-light{background-color:#f5f4f1!important;border-radius:28px!important}
html .v2page .rp-section.rp-dark{background-color:#202020!important;border-radius:28px!important}
html .v2page .rp-process > article{border-color:#c91c24!important}
html .v2page .reputation-map > article{border-color:rgba(255,255,255,.14)!important}
/* Ссылочные блоки со вшитыми цветами (бежевый фон, бордовая ссылка) */
html .v2page > section[style*="243, 238, 235"],html .v2page > section[style*="#f3eeeb"]{background:#f5f4f1!important}
html .v2page > section[style*="243, 238, 235"] a,html .v2page > section[style*="#f3eeeb"] a{color:#b81720!important}

/* 8. Тёмная шапка при прокрутке — как на главной (там скрипт задаёт почти непрозрачный фон;
   на остальных страницах она была прозрачной на 40% и над белым фоном выглядела серой). */
html [data-hdr][data-theme="dark"] [data-hbar][data-solid]::before{background:rgba(24,24,24,.92)}

/* 6a. rp-страницы (GEO, SERM, контент): у них свои правила html body .rp-page a.rp-related … !important — перекрываем точнее. */
html body .v2page.rp-page a.rp-related{color:#fcfcfb!important}
html body .v2page.rp-page a.rp-related > b{color:#ff7a80!important}
html body .v2page.rp-page a.rp-related > strong{color:#ff7a80!important}
html body .v2page.rp-page a.rp-related h3{color:#fcfcfb!important}
html .rp-hero h1 em{color:#de3a43!important}
/* Сетка кейсов — как [data-relg]: 3 / 2 / 1 колонки */
html .v2page .sd-cases,html .v2page .v2-grid:has(> a.v2-card[href*="/cases/"]){grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media (max-width:1023px){html .v2page .sd-cases,html .v2page .v2-grid:has(> a.v2-card[href*="/cases/"]){grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:767px){html .v2page .sd-cases,html .v2page .v2-grid:has(> a.v2-card[href*="/cases/"]){grid-template-columns:1fr!important}}

/* 9. «Обсудим вашу задачу?» (v2-cta: SEO, Директ) — панель как у блока «Обсудим ваш проект?» на главной:
   тёмная полоса, внутри скруглённая панель с тонкой рамкой и красным свечением. Форму не переносим — только вид. */
html .v2page .v2-cta{background:#171717!important;padding:clamp(56px,7vw,96px) 0!important;border:0!important;border-radius:0!important}
html .v2page .v2-cta > .v2-wrap{position:relative;overflow:hidden;display:flex!important;align-items:center;justify-content:space-between;gap:32px;
  padding:clamp(32px,4vw,52px) clamp(24px,4vw,56px)!important;border-radius:24px;border:1px solid rgba(255,255,255,.1);
  background:radial-gradient(ellipse at 100% 100%,rgba(201,28,36,.22),transparent 55%),rgba(255,255,255,.035)}
html .v2page .v2-cta > .v2-wrap::before{content:"Свяжитесь с JOY";position:absolute;top:clamp(32px,4vw,52px);left:clamp(24px,4vw,56px);font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.45)}
html .v2page .v2-cta > .v2-wrap > div{padding-top:28px}
html .v2page .v2-cta h2{font-family:Montserrat,Manrope,sans-serif;font-weight:400!important;font-size:clamp(30px,3.2vw,44px)!important;letter-spacing:-.03em;line-height:1.1;color:#fff!important;margin:0 0 14px!important}
html .v2page .v2-cta p{color:rgba(255,255,255,.62)!important;font-size:15px;line-height:1.5;margin:0!important;max-width:46ch}
html .v2page .v2-cta .v2-button{flex:0 0 auto;padding:18px 28px}
@media (max-width:767px){
  html .v2page .v2-cta > .v2-wrap{flex-direction:column;align-items:flex-start;margin:0 16px;width:auto}
  html .v2page .v2-cta .v2-button{width:100%;justify-content:center}
}
/* без серой линии между тёмными блоками */
html .v2page section:is(:has(> .sd-cases),:has(a.rp-related),:has(> .v2-grid > a.v2-card[href*="/cases/"])),
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]){border-top:0!important;border-bottom:0!important}
/* Кейс «43 → 167» сразу после CTA — карточка «Связанных материалов» в той же тёмной зоне (#171717). */
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]){
  border-image:none!important;background:#212121!important;border:1px solid rgba(255,255,255,.11)!important;border-radius:22px!important;
  padding:28px 28px 26px!important;margin:0 auto clamp(56px,7vw,96px)!important;width:auto;max-width:min(1280px,calc(100% - 32px));box-sizing:border-box;
  box-shadow:0 0 0 100vmax #171717;clip-path:inset(-1px -100vmax calc(-1 * clamp(56px,7vw,96px)) -100vmax);
  display:flex;flex-direction:column;gap:10px}
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]) > .v2-eyebrow{font-size:11px!important;font-weight:600;letter-spacing:.09em;color:rgba(255,255,255,.45)!important;margin:0!important}
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]) > h2{font-size:clamp(24px,2.4vw,30px)!important;font-weight:600!important;letter-spacing:-.03em;line-height:1.15;color:#ff7a80!important;margin:4px 0 0!important}
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]) > p:not(.v2-eyebrow){color:rgba(255,255,255,.62)!important;font-size:14.5px!important;margin:0!important}
html .v2page .v2-cta ~ section.v2-section:has(> a.v2-button[href*="/cases/"]) > a.v2-button{background:none!important;box-shadow:none!important;padding:6px 0 0!important;color:#ff7a80!important;font-size:13.5px!important;font-weight:600;align-self:flex-start}
html .v2page .v2-cta:has(~ section.v2-section > a.v2-button[href*="/cases/"]){padding-bottom:24px!important}

/* 10. Выделение в главном заголовке страницы — цвет главной (#de3a43, как «маркетинг» на главной). */
html body :is(main,div,section):not(.service-detail) h1 em{color:#de3a43!important}
html body main.v2page.service-detail h1 em{color:#fff!important}

/* 11. Обложка кейса Aristokrat в каталоге: градиент вшит в разметку (#282629 → #532830, лиловый) — тёмный → тёмно-красный главной. */
html .v2-project.project-bankrotstvo .v2-project-cover{background:linear-gradient(135deg,#262626,#5a1014)!important}

/* 12. Кейсы на шаблоне «сцен» (УГН-статья, УГН-массаж, KWIKPAY-контент, Aristokrat): единый вид карточек и пунктов. */
html .case-scenes .scene-points li{border:1px solid #e7e7e7!important;border-radius:16px!important;background:#fff!important;padding:20px 22px 20px 58px!important;line-height:1.6}
html .case-scenes .scene-points>ul>li::before,html .case-scenes .scene-points>ol>li::before{left:22px!important;top:22px!important;color:#c91c24!important;font-size:13px!important;font-weight:700!important;line-height:1.6}
html .case-scenes .scene-mini{border:1px solid #e7e7e7!important;border-radius:20px!important;background:#fff!important;box-shadow:none!important}
html .case-scenes .scene-mini::before{color:#c91c24!important}
html .case-scenes .scene-mini .scene-points li{border:0!important;border-top:1px solid #ececea!important;border-radius:0!important;background:none!important;padding:12px 0 12px 28px!important}
html .case-scenes .scene-mini .scene-points li::before{left:0!important;top:12px!important}
html .case-scenes .scene-mini .scene-points li h3{font-size:16px;line-height:1.3;margin:0 0 4px;font-weight:600}
html .case-scenes.scenes-article .case-scene:not(.scene-result) .scene-heading{border-bottom-color:#e7e7e7!important}
html .case-scenes .scene-proof{border-color:#e7e7e7!important;box-shadow:none!important}

/* Сцена с одной карточкой (УГН-статья, 02): на всю ширину — слева запросы плашками, справа результат, ниже 4 шага пути. */
html .case-scenes .scene-mini-grid:has(> .scene-mini:only-child){grid-template-columns:1fr!important}
@media (min-width:768px){
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:48px;align-items:start;padding:32px 36px!important}
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points)::before{grid-column:1/-1}
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > h4{grid-column:1;margin-top:0}
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(1){grid-column:1}
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-text{grid-column:2;grid-row:2 / span 2;align-self:center;margin:0!important;padding:22px 24px;border-radius:16px;background:#f5f4f1}
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(3){grid-column:1/-1;margin-top:28px}
  html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(3) > ul{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
}
html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(1) > ul{display:flex!important;flex-wrap:wrap;gap:8px}
html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(1) li{border:1px solid #e7e7e7!important;border-radius:999px!important;padding:8px 16px!important;font-size:15px}
html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(1) li::before{content:none!important}
html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(3) li{border:0!important;border-radius:16px!important;background:#f5f4f1!important;padding:18px 20px!important;counter-increment:point}
html .case-scenes .scene-mini:only-child:has(> .scene-points ~ .scene-text ~ .scene-points) > .scene-points:nth-of-type(3) li::before{content:counter(point,decimal-leading-zero)!important;position:static!important;display:block;margin-bottom:10px}

/* Варианты шаблона: убрать цветные полоски и «срезанные» углы */
html .case-scenes.scenes-research .scene-mini{border-radius:20px!important;border-top-width:1px!important}
html .case-scenes.scenes-decision .scene-points li{border-left-width:1px!important}
html .case-scenes.scenes-article .scene-points li{border-radius:16px!important}

/* Сцены-результаты (04, 06): не чёрная полоса с розовыми цифрами, а светлый блок как остальные; цифры — жирные тёмные. */
html .case-scenes .case-scene.scene-result{background:#f5f4f1!important;color:#242424!important}
html body .case-scenes .case-scene.scene-result :is(h2,h3,h4){color:#242424!important}
html .case-scenes .case-scene.scene-result .scene-heading>span{color:#c91c24!important}
html .case-scenes .case-scene.scene-result :is(p,li){color:#3a3a3a!important}
html .case-scenes .case-scene.scene-result .scene-text strong{color:#242424!important;font-weight:700!important}
html .case-scenes .case-scene.scene-result :is(.scene-mini,.scene-points li){background:#fff!important;border-color:#e7e7e7!important;color:#242424!important}
html .case-scenes .case-scene.scene-result :is(.scene-mini,.scene-points li)::before{color:#c91c24!important}
html .case-scenes .case-scene.scene-result .scene-content a{color:#c91c24!important}
/* Мелкие подписи на тёмных story-блоках — серые, как подписи на тёмных карточках главной, а не розово-красные. */
html .case-scenes .story :is(.search-questions,.capacity-unit) > span{color:rgba(255,255,255,.5)!important}

/* 13. Главная. Карточки услуг: место под заголовок в две строки у всех, чтобы цена, описание и ссылка стояли ровно;
   карточки чуть выше (260 → 296px), чтобы двухстрочным заголовкам хватало места и на обороте. */
@media (min-width:681px){
  html [data-scards] [data-sc2],html [data-scards] > a > [data-ctacard]{height:296px!important}
  html [data-scards] [data-sc2] h3{min-height:56px;min-height:2lh;text-wrap:balance}
}
/* Кейсы на телефоне: «Больше кейсов» — в конец блока, а не между кейсами. */
@media (max-width:767px){
  html [data-cgrid] > div:has(> [data-allc]){order:99}
}
/* «Берём ответственность за результат» на телефоне: вертикальная гармошка (why-accordion.js ставит data-jacc / data-jopen). */
@media (max-width:767px){
  html #why [data-p6][data-jacc]{gap:10px!important}
  html #why [data-p6][data-jacc] > [data-pr]{max-height:74px;min-height:0!important;overflow:hidden;cursor:pointer;border-color:#e7e7e7!important;background:#f8f8f6!important;box-shadow:none;
    transition:max-height .55s cubic-bezier(.22,.8,.2,1),min-height .55s cubic-bezier(.22,.8,.2,1),border-color .3s,background-color .3s,box-shadow .3s}
  html #why [data-p6][data-jacc] > [data-pr] [data-prcov],html #why [data-p6][data-jacc] > [data-pr] [data-prbody]{opacity:0;transition:opacity .3s}
  html #why [data-p6][data-jacc] > [data-pr] [data-prnum]{color:#9a9a9a!important;font-size:18px!important;line-height:20px!important;transition:color .3s}
  html #why [data-p6][data-jacc] > [data-pr]:not([data-jopen]){padding-top:27px!important}
  html #why [data-p6][data-jacc] > [data-pr] [data-prtop]{min-height:20px}
  html #why [data-p6][data-jacc] > [data-pr] [data-prcompact]{display:block!important;position:absolute;left:62px;right:18px;top:50%;transform:translateY(-50%);font-size:15px!important;font-weight:600;line-height:19px;color:#242424!important;
    white-space:normal;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;transition:opacity .25s}
  html #why [data-p6][data-jacc] > [data-pr][data-jopen]{max-height:420px;min-height:350px!important;cursor:default;border-color:#c91c24!important;background:#fff!important;box-shadow:0 14px 30px rgba(24,20,20,.08)}
  html #why [data-p6][data-jacc] > [data-pr][data-jopen] :is([data-prcov],[data-prbody]){opacity:1;transition:opacity .35s .15s}
  html #why [data-p6][data-jacc] > [data-pr][data-jopen] [data-prnum]{color:#c91c24!important}
  html #why [data-p6][data-jacc] > [data-pr][data-jopen] [data-prcompact]{opacity:0}
}
@media (max-width:767px) and (prefers-reduced-motion:reduce){
  html #why [data-p6][data-jacc] > [data-pr],html #why [data-p6][data-jacc] > [data-pr] *{transition:none!important}
}

/* 14. Отзывы. Главная, «Нас рекомендуют партнёры»: задние карточки стопки — белые с тонкой рамкой, без серой заливки
   и без логотипов, срезанных краем карточки; на телефоне логотип не уходит за правый край. */
html [data-rvcard]:is([data-pos="mid"],[data-pos="back"]){background:#fff!important;box-shadow:0 0 0 1px #ececea,0 8px 22px rgba(20,21,19,.05)!important}
html [data-rvcard]:is([data-pos="mid"],[data-pos="back"]) [data-rvbg]{opacity:0!important}
@media (hover:hover) and (min-width:768px){
  html [data-rvcard]:is([data-pos="mid"],[data-pos="back"]):hover{box-shadow:0 0 0 1px #e2e2df,0 14px 34px rgba(20,21,19,.08)!important}
}
@media (max-width:767px){
  html [data-rvcard] [data-rvbg]{right:22px!important}
}
/* Кейсы на шаблоне сцен, «Отзыв клиента»: белая карточка на светлом фоне вместо серо-бежевой полосы. */
html .case-scenes .case-scene.scene-quote{background:#f5f4f1!important}
html .case-scenes .case-scene.scene-quote .scene-content{position:relative;max-width:900px;padding:clamp(28px,4vw,44px) clamp(24px,4vw,48px)!important;border:1px solid #e7e7e7;border-radius:20px;background:#fff;box-sizing:border-box}
html .case-scenes .case-scene.scene-quote .scene-text em{font-style:italic;color:#242424}

/* 15. Узкие экраны (главная).
   Первый экран: панель «Услуги» заезжает на него на 72px, и подпись «Одна система для роста бизнеса» оказывалась
   в 4px от края панели — добавляем отступ, чтобы между ними было ~40px. */
@media (max-width:1040px){
  html [data-hero] [data-hstage]{padding-bottom:116px!important}
}
/* Карусель отзывов на телефоне прокручивается вбок и обрезает всё, что выходит за её край: тени под карточкой
   не хватало места снизу (20px при глубине ~50px). Даём место внутри и возвращаем его отрицательным отступом. */
@media (max-width:767px){
  html [data-rvstage]{padding-top:12px!important;padding-bottom:60px!important;margin-bottom:-40px!important}
}
/* Тень карточки отзыва на телефоне: карусель режет всё за своими краями, а по бокам у карточки только 20px —
   большая тень (blur 36px) обрывалась и по бокам. Компактная тень + тонкая рамка целиком помещаются в эти 20px. */
@media (max-width:767px){
  html [data-rvstage] [data-rvcard]{box-shadow:0 0 0 1px #ececea,0 6px 16px rgba(20,21,19,.06)!important}
  html [data-rvstage]{padding-bottom:28px!important;margin-bottom:-8px!important}
}
/* «Смотреть кейсы →» на первом экране (узкие экраны): ссылка шириной в текст, а не во всю строку —
   иначе красная линия-подсветка тянулась под всей шириной экрана. */
@media (max-width:1040px){
  html [data-hero] [data-hstage] a:is([href="#cases"],[href="/cases"]){align-self:flex-start!important;width:auto!important;max-width:max-content}
}
/* Поля карусели отзывов по бокам: без них карусель была ровно шириной карточки и срезала тень по бокам до нуля. */
@media (max-width:767px){
  html [data-rvstage]{padding-left:20px!important;padding-right:20px!important;margin-left:-20px!important;margin-right:-20px!important;scroll-padding-inline:20px;gap:40px!important}
}
/* «Смотреть кейсы →» — текстовая ссылка, но на ней класс кнопки scp2, и .scp2:hover давал ей свечение 0 20px 44px:
   без фона оно висело отдельным красноватым пятном под линией (на телефоне залипало после касания). */
html a[data-caselink],html a[data-caselink]:hover,html a[data-caselink]:focus-visible{box-shadow:none!important}

/* 16. Главная, кейсы: при наведении карточка поднимается на 6px и у нижнего края уезжала из-под курсора —
   hover мигал, описание откатывалось и застревало на полпути (слева была видна светлая полоса обложки).
   Наведение считаем по неподвижной обёртке карточки, поэтому состояние не мигает. */
@media (hover:hover) and (pointer:fine) and (min-width:768px){
  html [data-cgrid] > div:hover > [data-case]{transform:translateY(-6px);box-shadow:rgba(24,20,20,.18) 0 24px 50px}
  html [data-cgrid] > div:hover > [data-case] [data-cfront]{transform:translate3d(-100%,0,0)}
  html [data-cgrid] > div:hover > [data-case] [data-cres]{transform:translate3d(0,0,0)}
  html [data-cgrid] > div:hover > [data-case] [data-rv]{opacity:1;transform:none}
}
/* То же для карточек услуг: оборот с описанием держим по неподвижной обёртке (наклон приподнимает карточку на 5px). */
@media (hover:hover) and (pointer:fine){
  html [data-scards] > div:hover > [data-sc2] [data-sc2f]{opacity:0;transform:translateY(-6px);pointer-events:none}
  html [data-scards] > div:hover > [data-sc2] [data-sc2d]{opacity:1;transform:none;pointer-events:auto}
  html [data-scards] > div:hover > [data-sc2] :is([data-sc2list],[data-sc2li]){opacity:1}
  html [data-scards] > div:hover > [data-sc2]{border-color:rgba(223,41,53,.35);box-shadow:0 18px 38px rgba(24,20,20,.16)}
}
