/* ========== INTERNAL PAGES CLEAN BASE ========== */
body#top .catalog-page,
body#top .services-page,
body#top .gallery-page,
body#top .prices-page,
body#top .contacts-page,
body#top .payment-docs-page,
body#top .privacy-page,
body#top .automation-product-page {
    position: relative;
    background: transparent !important;
    background-image: none !important;
}

body#top .catalog-page::before,
body#top .catalog-page::after,
body#top .services-page::before,
body#top .services-page::after,
body#top .gallery-page::before,
body#top .gallery-page::after,
body#top .prices-page::before,
body#top .prices-page::after,
body#top .contacts-page::before,
body#top .contacts-page::after,
body#top .payment-docs-page::before,
body#top .payment-docs-page::after,
body#top .privacy-page::before,
body#top .privacy-page::after,
body#top .automation-product-page::before,
body#top .automation-product-page::after {
    content: none !important;
}

body#top .catalog-page > .container,
body#top .services-page > .container,
body#top .gallery-page > .container,
body#top .prices-page > .container,
body#top .contacts-page > .container,
body#top .payment-docs-page > .container,
body#top .privacy-page > .container,
body#top .automation-product-page > .container {
    position: relative;
    z-index: 1;
}

body#top .services-header h1,
body#top .gallery-header h1,
body#top .price-header h1 {
    background: none !important;
    color: var(--theme-text-strong) !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
}

body#top .services-header .subtitle,
body#top .gallery-header .subtitle,
body#top .price-header .subtitle,
body#top .contacts-subtitle {
    color: #6a6f75 !important;
}

/* shared desktop hero header moved to header.css */

/* ========== INTERNAL DESKTOP THEME BASE ========== */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    body#top {
        --site-desktop-bg:
            radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.06), transparent 24%),
            radial-gradient(circle at 78% 8%, rgba(var(--theme-accent-rgb), 0.05), transparent 24%),
            radial-gradient(circle at top right, rgba(255, 255, 255, 0.7), transparent 20%),
            linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 48%, #f7fafc 100%);
        --site-desktop-surface: rgba(255, 255, 255, 0.98);
        --site-desktop-surface-soft: rgba(244, 240, 232, 0.9);
        --site-desktop-surface-warm: rgba(246, 240, 229, 0.94);
        --site-desktop-border: rgba(31, 51, 74, 0.08);
        --site-desktop-border-strong: rgba(36, 72, 99, 0.14);
        --site-desktop-shadow: 0 22px 42px rgba(63, 53, 38, 0.065);
        --site-desktop-shadow-soft: 0 14px 26px rgba(63, 53, 38, 0.04);
        --site-desktop-radius-xl: 32px;
        --site-desktop-radius-lg: 24px;
        --site-desktop-radius-md: 18px;
        --site-desktop-title: var(--theme-text-strong);
        --site-desktop-text: var(--theme-text);
        --site-desktop-muted: var(--theme-text-muted);
        --site-desktop-accent: var(--theme-accent);
        --site-desktop-accent-strong: var(--theme-accent-strong);
        --site-desktop-accent-soft: rgba(var(--theme-accent-rgb), 0.08);
        --site-desktop-warm: var(--theme-warm-strong);
        --site-desktop-warm-soft: rgba(248, 244, 236, 0.96);
        --site-desktop-container: min(1440px, calc(100vw - 96px));
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        background: var(--site-desktop-bg) !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page) > .container {
        width: var(--site-desktop-container) !important;
        max-width: none !important;
    }

    body#top .privacy-container {
        width: min(1180px, calc(100vw - 160px));
        max-width: none;
        border-radius: var(--site-desktop-radius-xl);
        border: 1px solid var(--site-desktop-border);
        box-shadow: var(--site-desktop-shadow);
        background: linear-gradient(180deg, var(--site-desktop-surface), var(--site-desktop-surface-soft));
    }

    body#top :is(.services-header h1, .price-header h1, .gallery-header h1, .privacy-header h1) {
        color: var(--site-desktop-title) !important;
    }

    body#top :is(.services-header .subtitle, .price-header .subtitle, .gallery-header .subtitle, .contacts-subtitle, .privacy-header .date) {
        color: var(--site-desktop-muted) !important;
    }

    body#top :is(.service-detail-card, .before-after-section .container, .gallery-item, .gallery-empty, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .automation-product-card) {
        border-radius: var(--site-desktop-radius-xl);
        border-color: var(--site-desktop-border);
        box-shadow: var(--site-desktop-shadow);
    }

    body#top :is(.gallery-item, .gallery-empty, .price-factors, .guarantee-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .automation-product-card) {
        background: linear-gradient(180deg, var(--site-desktop-surface), var(--site-desktop-surface-soft));
    }

    body#top :is(.service-header h2, .price-factors h2, .guarantee-title, .contacts-card-header h2, .gallery-header h1, .payment-docs-section__heading h2, .payment-docs-panel h2, .automation-product-title, .privacy-page .section h2) {
        color: var(--site-desktop-title);
    }

    body#top :is(.service-description, .process-step p, .catalog-group-panel__intro p, .catalog-palette-card__info p, .gallery-empty, .work-description, .factor-card p, .guarantee-text, .contact-details p, .contacts-fact p, .payment-docs-panel p, .payment-docs-section__heading p, .payment-docs-card p, .payment-docs-step p, .automation-product-description, .automation-accessories__text, .privacy-page .section p, .privacy-page .section li) {
        color: var(--site-desktop-text);
    }

    body#top :is(.catalog-group-tab, .catalog-link, .filter-btn, .service-nav-link, .price-cta .btn, .payment-docs-hero__chips span, .payment-docs-step__number, .guarantee-badge) {
        transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
    }

    body#top :is(.catalog-group-tab, .catalog-link, .filter-btn, .service-nav-link) {
        border-radius: 999px;
    }

body#top :is(.catalog-group-tab:hover, .catalog-link:hover, .filter-btn:hover, .service-nav-link:hover) {
    transform: translateY(-2px);
}

body#top :is(.catalog-group-tab.is-active:hover, .catalog-group-tab.is-active:focus-visible, .filter-btn.active:hover, .filter-btn.active:focus-visible, .filter-btn[aria-pressed="true"]:hover, .filter-btn[aria-pressed="true"]:focus-visible, .gallery-filter.is-active:hover, .gallery-filter.is-active:focus-visible, .gallery-filter[aria-pressed="true"]:hover, .gallery-filter[aria-pressed="true"]:focus-visible, .service-nav-link.active:hover, .service-nav-link.active:focus-visible, .service-nav-link[aria-current="page"]:hover, .service-nav-link[aria-current="page"]:focus-visible) {
    transform: none;
    color: #fffdf9 !important;
}

    body#top .calculator-section,
    body#top .service-header,
    body#top .pricing-table-header,
    body#top .contact-manager-card,
    body#top .contact-block {
        background: var(--site-desktop-band);
    }

    body#top :is(.payment-docs-panel__icon, .payment-docs-card__icon, .guarantee-badge, .contact-icon, .catalog-group-tab__icon, .factor-card i, .price-header h1 i) {
        color: var(--site-desktop-accent);
    }

    body#top :is(.payment-docs-panel__icon, .payment-docs-card__icon, .guarantee-badge) {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 232, 0.9));
    }

    body#top .payment-docs-step__number,
    body#top .process-step::before {
        background: linear-gradient(135deg, var(--site-desktop-accent) 0%, var(--site-desktop-accent-strong) 100%);
    }

}

@media (min-width: 1101px) {
    body#top .gallery-page .subtitle,
    body#top .gallery-page .gallery-summary__item p,
    body#top .gallery-page .gallery-toolbar__copy p,
    body#top .gallery-page .counter-text,
    body#top .prices-page .subtitle,
    body#top .prices-page .price-summary__item p,
    body#top .prices-page .factor-card p,
    body#top .prices-page .calculator-section > p:not(.price-card-kicker),
    body#top .prices-page .guarantee-text,
    body#top .prices-page .price-cta > p:not(.price-card-kicker),
    body#top .prices-page .faq-answer p,
    body#top .prices-page .section-subtitle,
    body#top .contacts-page .contacts-subtitle,
    body#top .contacts-page .contacts-hero-copy > p:last-of-type,
    body#top .contacts-page .contacts-card-header > p:last-of-type,
    body#top .contacts-page .contact-details p,
    body#top .contacts-page .contacts-inline-note span,
    body#top .contacts-page .contacts-location-copy > p:last-of-type,
    body#top .contacts-page .location-points span,
    body#top .contacts-page .form-notice,
    body#top .payment-docs-page .payment-docs-hero__lead,
    body#top .payment-docs-page .payment-docs-hero__text,
    body#top .payment-docs-page .payment-docs-panel p,
    body#top .payment-docs-page .payment-docs-section__heading p,
    body#top .payment-docs-page .payment-docs-card p,
    body#top .payment-docs-page .payment-docs-step p,
    body#top .privacy-page .privacy-header > p:not(.date),
    body#top .privacy-page .section p,
    body#top .privacy-page .section li,
    body#top .privacy-page .contact-block > p:not(.contact-response-note) {
        color: #4c6478;
        font-size: 1.04rem;
        line-height: 1.74;
    }

    body#top .gallery-page .gallery-summary__item strong,
    body#top .prices-page .price-summary__item strong,
    body#top .contacts-page .contacts-card-header h2,
    body#top .payment-docs-page .payment-docs-section__heading h2,
    body#top .payment-docs-page .payment-docs-cta h2,
    body#top .privacy-page .section h2,
    body#top .privacy-page .section h3,
    body#top .privacy-page .contact-block h3 {
        color: var(--site-desktop-title);
        letter-spacing: -0.02em;
    }

    body#top :is(.payment-docs-panel, .payment-docs-card, .payment-docs-step, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .price-header, .calculator-section, .price-cta, .privacy-page .section, .privacy-page .contact-block) {
        box-shadow: 0 18px 30px rgba(20, 28, 39, 0.07);
    }
}

/* ========== COOL THEME HARMONIZATION ========== */
body#top {
    --site-desktop-title: var(--theme-text-strong);
    --site-accent: var(--theme-accent-strong);
    --site-accent-soft: rgba(var(--theme-accent-rgb), 0.12);
}

body#top,
body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
    color: var(--theme-text);
}

body#top :is(.section-eyebrow, .contacts-eyebrow, .contacts-card-kicker, .payment-docs-card__eyebrow, .payment-docs-step__kicker, .price-card-kicker, .gallery-card__eyebrow, .gallery-summary__eyebrow) {
    color: var(--theme-accent-strong);
}

body#top :is(.request-form__eyebrow, .contact-form-meta__item, .contacts-hero-pill, .contacts-info-chip, .quick-actions .btn, .gallery-filter, .gallery-counter, .price-summary__item, .factor-card, .payment-docs-chip, .automation-product-page .product-badge) {
    border-color: rgba(var(--theme-accent-rgb), 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 232, 0.86));
    color: var(--theme-text);
    box-shadow: 0 14px 28px rgba(31, 38, 34, 0.05);
}

body#top :is(.request-form__eyebrow::before, .contact-icon, .gallery-filter.is-active, .gallery-filter[aria-pressed="true"], .payment-docs-card__icon, .payment-docs-step__icon, .automation-product-page .product-icon, .catalog-group-tab.is-active .catalog-group-tab__icon) {
    background: linear-gradient(135deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%);
    box-shadow: 0 10px 18px rgba(var(--site-action-slate-rgb), 0.14);
}

body#top :is(a, .contact-details a, .gallery-card__link, .price-cta a, .payment-docs-page a):hover {
    color: var(--theme-accent-strong);
}

body#top :is(.service-detail-card, .catalog-sidebar, .catalog-group-panels, .catalog-panel, .before-after-section .container, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-page .section, .privacy-page .contact-block) {
    border-color: var(--theme-border);
    box-shadow: 0 20px 38px rgba(31, 38, 34, 0.06);
}

@supports (content-visibility: auto) {
    body#top :is(.service-detail-card, .before-after-section .container, .price-factors, .guarantee-section, .calculator-section, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-page .section, .privacy-page .contact-block) {
        content-visibility: auto;
        contain-intrinsic-size: 1px 720px;
    }

    body#top :is(.gallery-item, .gallery-empty) {
        content-visibility: auto;
        contain-intrinsic-size: 1px 440px;
    }

    body#top .gallery-page :is(.gallery-item, .gallery-empty),
    body#top .payment-docs-page :is(.payment-docs-panel, .payment-docs-section, .payment-docs-cta) {
        content-visibility: visible;
        contain-intrinsic-size: auto;
    }
}

@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    body#top {
        --site-desktop-band:
            radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 28%),
            linear-gradient(135deg, var(--theme-band-from) 0%, var(--theme-band-mid) 54%, var(--theme-band-to) 100%);
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 198px !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__eyebrow,
    .header.header--desktop-hero .desktop-hero-header .hero-header-sub,
    .header.header--desktop-hero .desktop-hero-header .hero-header-address {
        color: rgba(var(--theme-accent-strong-rgb), 0.62) !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-main,
    .header-top--compact .phone-number {
        color: var(--theme-accent-strong) !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__text::after {
        background: linear-gradient(90deg, rgba(var(--theme-accent-strong-rgb), 0.54), rgba(var(--theme-accent-strong-rgb), 0));
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link,
    .header.header--desktop-hero .desktop-hero-header .hero-nav__link:visited {
        color: rgba(var(--theme-accent-strong-rgb), 0.84);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link::after {
        background: linear-gradient(90deg, rgba(var(--theme-accent-strong-rgb), 0) 0%, rgba(var(--theme-accent-rgb), 0.24) 18%, rgba(var(--theme-accent-rgb), 0.34) 50%, rgba(var(--theme-accent-rgb), 0.24) 82%, rgba(var(--theme-accent-strong-rgb), 0) 100%);
        box-shadow: 0 1px 3px rgba(var(--theme-accent-strong-rgb), 0.05);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link:hover {
        color: var(--theme-accent-strong);
        border-color: rgba(var(--theme-accent-rgb), 0.18);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12)),
            linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.08), rgba(255, 255, 255, 0));
        box-shadow:
            0 10px 20px rgba(var(--theme-accent-strong-rgb), 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.38);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link--active,
    .header.header--desktop-hero .desktop-hero-header .hero-nav__link--active:visited,
    .header-top--compact .nav-list a.active {
        color: var(--theme-accent-strong) !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link--active::after {
        background: linear-gradient(90deg, rgba(var(--theme-accent-strong-rgb), 0) 0%, rgba(var(--theme-accent-rgb), 0.28) 18%, rgba(var(--theme-accent-rgb), 0.52) 50%, rgba(var(--theme-accent-rgb), 0.28) 82%, rgba(var(--theme-accent-strong-rgb), 0) 100%);
        box-shadow: 0 1px 4px rgba(var(--theme-accent-strong-rgb), 0.08);
    }

    .header.header--desktop-hero .desktop-hero-header :is(.hero-header-link i, .hero-header-address i),
    .header-top--compact :is(.contact-phone i, .contact-address i) {
        color: var(--theme-accent-strong) !important;
    }
}

/* ========== COOL THEME HARD OVERRIDE FOR INNER PAGES ========== */
body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
    background:
        radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.07), transparent 24%) !important,
        radial-gradient(circle at 78% 8%, rgba(var(--theme-accent-rgb), 0.05), transparent 24%) !important,
        radial-gradient(circle at 88% 5%, rgba(255, 255, 255, 0.72), transparent 18%) !important,
        linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 46%, #f7fafc 100%) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.section-eyebrow, .contacts-eyebrow, .contacts-card-kicker, .payment-docs-card__eyebrow, .payment-docs-step__kicker, .price-card-kicker, .gallery-card__eyebrow, .gallery-summary__eyebrow) {
    color: var(--theme-accent-strong) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.request-form__eyebrow, .contact-form-meta__item, .contacts-hero-pill, .contacts-info-chip, .quick-actions .btn, .gallery-filter, .gallery-counter, .price-summary__item, .factor-card, .payment-docs-chip, .automation-product-page .product-badge, .service-nav-link, .catalog-group-tab) {
    border-color: rgba(var(--theme-accent-rgb), 0.14) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 232, 0.86)) !important;
    color: var(--theme-text) !important;
    box-shadow: 0 14px 28px rgba(31, 38, 34, 0.05) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-primary, .btn--primary, .panel-scene__action--primary, .service-overview__bridge-link, .service-cta .btn:first-child) {
    background: var(--site-action-matte) !important;
    background-image: none !important;
    border-color: var(--site-action-matte-border) !important;
    color: var(--site-action-matte-text) !important;
    box-shadow: 0 12px 24px rgba(var(--site-action-slate-rgb), 0.12) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.catalog-group-tab.is-active, .filter-btn.active, .filter-btn[aria-pressed="true"], .gallery-filter.is-active, .gallery-filter[aria-pressed="true"], .service-nav-link.active, .service-nav-link[aria-current="page"]) {
    background: linear-gradient(135deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    border-color: transparent !important;
    color: #fffdf9 !important;
    box-shadow: 0 10px 18px rgba(var(--site-action-slate-rgb), 0.14) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.request-form__eyebrow::before, .contact-icon, .payment-docs-card__icon, .payment-docs-step__icon, .automation-product-page .product-icon, .catalog-group-tab.is-active .catalog-group-tab__icon) {
    background: linear-gradient(135deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    box-shadow: 0 10px 18px rgba(var(--site-action-slate-rgb), 0.14) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.contact-details a, .gallery-card__link, .payment-docs-page a, .prices-page a, .services-page a[href]:not(.btn):not(.catalog-group-tab)) {
    color: var(--theme-accent-strong) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.service-detail-card, .catalog-sidebar, .catalog-group-panels, .catalog-panel, .before-after-section .container, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-page .section, .privacy-page .contact-block) {
    border-color: var(--theme-border) !important;
    box-shadow: 0 20px 38px rgba(31, 38, 34, 0.06) !important;
}

/* ========== DESKTOP FINAL COLLECTION LANGUAGE ========== */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        background:
            radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.06), transparent 26%) !important,
            radial-gradient(circle at 78% 8%, rgba(var(--theme-accent-rgb), 0.05), transparent 24%) !important,
            radial-gradient(circle at 90% 4%, rgba(255, 255, 255, 0.74), transparent 18%) !important,
            linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 44%, #f7fafc 100%) !important;
    }

    body#top :is(.service-detail-card, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-page .section, .privacy-page .contact-block) {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 232, 0.88)) !important;
        border: 1px solid rgba(var(--theme-accent-strong-rgb), 0.12) !important;
        box-shadow:
            0 22px 44px rgba(63, 53, 38, 0.055),
            inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
    }

    body#top :is(.gallery-toolbar, .gallery-summary__item, .price-header) {
        border-radius: 30px !important;
    }

    body#top :is(.gallery-item, .factor-card, .payment-docs-card, .payment-docs-step, .catalog-group-tab, .catalog-link, .filter-btn, .service-nav-link, .quick-actions .btn) {
        transition:
            transform 180ms ease,
            box-shadow 180ms ease,
            border-color 180ms ease,
            color 180ms ease,
            background 180ms ease !important;
    }

    body#top :is(.gallery-item:hover, .factor-card:hover, .payment-docs-card:hover, .payment-docs-step:hover, .catalog-group-tab:hover, .catalog-link:hover, .filter-btn:hover, .service-nav-link:hover, .quick-actions .btn:hover) {
        transform: translateY(-3px) !important;
        box-shadow:
            0 26px 48px rgba(63, 53, 38, 0.075),
            inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
        border-color: rgba(var(--theme-accent-rgb), 0.18) !important;
    }

    body#top :is(.calculator-section, .work-counter) {
        background:
            radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 28%),
            linear-gradient(135deg, var(--theme-band-from) 0%, var(--theme-band-mid) 56%, var(--theme-band-to) 100%) !important;
        box-shadow: 0 28px 52px rgba(31, 38, 34, 0.16) !important;
    }

    body#top :is(.btn-primary, .btn--primary, .panel-scene__action--primary, .service-overview__bridge-link, .service-cta .btn:first-child) {
        background: var(--site-action-matte) !important;
        background-image: none !important;
        border-color: var(--site-action-matte-border) !important;
        color: var(--site-action-matte-text) !important;
        box-shadow: 0 12px 24px rgba(var(--site-action-slate-rgb), 0.12) !important;
    }

    body#top :is(.catalog-group-tab.is-active, .filter-btn.active, .filter-btn[aria-pressed="true"], .gallery-filter.is-active, .gallery-filter[aria-pressed="true"], .service-nav-link.active, .service-nav-link[aria-current="page"]) {
        background: linear-gradient(135deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
        color: #fffdf9 !important;
        box-shadow: 0 10px 18px rgba(var(--site-action-slate-rgb), 0.14) !important;
    }

    body#top :is(.catalog-group-tab:hover, .catalog-link:hover, .filter-btn:hover, .service-nav-link:hover, .quick-actions .btn:hover) {
        color: var(--theme-accent-strong) !important;
    }

    body#top :is(.catalog-group-tab.is-active:hover, .catalog-group-tab.is-active:focus-visible, .filter-btn.active:hover, .filter-btn.active:focus-visible, .filter-btn[aria-pressed="true"]:hover, .filter-btn[aria-pressed="true"]:focus-visible, .gallery-filter.is-active:hover, .gallery-filter.is-active:focus-visible, .gallery-filter[aria-pressed="true"]:hover, .gallery-filter[aria-pressed="true"]:focus-visible, .service-nav-link.active:hover, .service-nav-link.active:focus-visible, .service-nav-link[aria-current="page"]:hover, .service-nav-link[aria-current="page"]:focus-visible) {
        color: #fffdf9 !important;
        transform: none !important;
    }

}

/* ========== UNIFIED INNER PAGE START ========== */
@media (min-width: 769px) and (max-width: 1100px) {
    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 92px !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 12px !important;
    }
}

@media (min-width: 561px) and (max-width: 640px) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 24px !important;
    }
}

@media (max-width: 560px) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 24px !important;
    }

    html body#top .gallery-page .gallery-heading__lead {
        min-height: 0 !important;
    }
}

/* ========== UNIFIED INNER PAGE GUTTER <= 1100PX ========== */
@media (max-width: 1100px) {
    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) > .container {
        width: min(100%, calc(100vw - 24px)) !important;
        max-width: none !important;
    }
}

/* Phone "desktop site" mode: desktop-wide CSS viewport, but portrait touch rhythm. */
@media (pointer: coarse) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (hover: none) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3) {
    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 136px !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) > .container {
        width: min(100%, calc(100vw - 24px)) !important;
        max-width: none !important;
    }
}

/* Phone "desktop site" landscape: keep the first content below the compact header. */
@media (min-width: 900px) and (max-width: 1600px) and (max-height: 900px) and (orientation: landscape) and (pointer: coarse) {
    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        padding-top: 92px !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) > .container {
        width: min(100%, calc(100vw - 24px)) !important;
        max-width: none !important;
    }
}

/* Unified inner-page footer join: trims the empty page tail before the scenic footer. */
html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
    --inner-page-footer-bottom: clamp(18px, 2.2vw, 30px);
    padding-bottom: var(--inner-page-footer-bottom) !important;
}

@media (max-width: 1100px) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        --inner-page-footer-bottom: clamp(10px, 1.4vw, 16px);
    }
}

@media (max-width: 640px) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        --inner-page-footer-bottom: clamp(6px, 2.2vw, 10px);
    }
}

@media (pointer: coarse) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (hover: none) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        --inner-page-footer-bottom: clamp(12px, 1.5vw, 20px);
    }
}

@media (min-width: 900px) and (max-width: 1600px) and (max-height: 900px) and (orientation: landscape) and (pointer: coarse) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        --inner-page-footer-bottom: clamp(10px, 1.2vw, 16px);
    }
}

@media (min-width: 1101px) and (min-height: 1400px) and (max-aspect-ratio: 9 / 10) {
    html body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        min-height: 0 !important;
        --inner-page-footer-bottom: 0px;
    }
}

/* ========== FINAL SHARED COLOR ROLES ========== */
body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-primary, .btn--primary, .pricing-estimate-card__action, .service-overview__bridge-link, .service-cta .btn:first-child) {
    background: linear-gradient(180deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #fffdf9 !important;
    -webkit-text-fill-color: #fffdf9 !important;
    box-shadow:
        0 14px 26px rgba(var(--site-action-slate-rgb), 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-primary, .btn--primary, .pricing-estimate-card__action, .service-overview__bridge-link, .service-cta .btn:first-child):hover,
body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-primary, .btn--primary, .pricing-estimate-card__action, .service-overview__bridge-link, .service-cta .btn:first-child):focus-visible {
    background: linear-gradient(180deg, #7f93a0 0%, #677d8c 100%) !important;
    background-image: linear-gradient(180deg, #7f93a0 0%, #677d8c 100%) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #fffdf9 !important;
    -webkit-text-fill-color: #fffdf9 !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-secondary, .btn-outline, .quick-actions .btn, .filter-btn, .gallery-filter, .contacts-contact-tile, .contacts-address-row, .contacts-meta-chip, .payment-docs-chip, .payment-docs-hero__chips span, .price-summary__item, .guarantee-badge, .automation-product-page .product-badge) {
    background: var(--site-action-ghost) !important;
    background-image: var(--site-action-ghost) !important;
    border-color: var(--site-action-ghost-border) !important;
    color: var(--site-action-ghost-text) !important;
    box-shadow:
        0 12px 22px rgba(var(--site-action-slate-rgb), 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-secondary, .btn-outline, .quick-actions .btn, .filter-btn, .gallery-filter, .contacts-contact-tile, .contacts-address-row, .contacts-meta-chip, .payment-docs-chip, .payment-docs-hero__chips span, .price-summary__item, .guarantee-badge, .automation-product-page .product-badge):hover,
body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.btn-secondary, .btn-outline, .quick-actions .btn, .filter-btn, .gallery-filter, .contacts-contact-tile, .contacts-address-row, .contacts-meta-chip, .payment-docs-chip, .payment-docs-hero__chips span, .price-summary__item, .guarantee-badge, .automation-product-page .product-badge):focus-visible {
    background: var(--site-action-ghost-hover) !important;
    background-image: var(--site-action-ghost-hover) !important;
    border-color: rgba(var(--theme-accent-rgb), 0.2) !important;
    color: var(--site-action-ghost-text) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.filter-btn.active, .filter-btn[aria-pressed="true"], .gallery-filter.is-active, .gallery-filter[aria-pressed="true"], .automation-product-page .catalog-group-tab.is-active) {
    background: linear-gradient(180deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #fffdf9 !important;
    -webkit-text-fill-color: #fffdf9 !important;
    box-shadow:
        0 14px 26px rgba(var(--site-action-slate-rgb), 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.filter-btn.active *, .filter-btn[aria-pressed="true"] *, .gallery-filter.is-active *, .gallery-filter[aria-pressed="true"] *, .automation-product-page .catalog-group-tab.is-active *) {
    color: #fffdf9 !important;
    -webkit-text-fill-color: #fffdf9 !important;
}

body#top :is(.services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)
    :is(.service-detail-card, .before-after-section .container, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-page .section, .privacy-page .contact-block) {
    background: var(--site-card-surface) !important;
    border-color: var(--site-card-border) !important;
    box-shadow: var(--site-card-shadow) !important;
}
