html {
    scroll-padding-top: 7rem;
}

body {
    min-width: 0;
}

#primary-content,
#primary-content > *,
.skinbg-section-container,
.site-header-inner,
.site-footer-inner {
    min-width: 0;
}

[id] {
    scroll-margin-top: 7rem;
}

img,
video,
iframe,
svg {
    max-width: 100%;
}

.skinbg-skip-link {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    z-index: 100000;
    padding: 12px 16px;
    border-radius: 8px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.skinbg-skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #0284C7;
    outline-offset: 3px;
}

:where(button, input, select, textarea) {
    font: inherit;
}

:where(p, li, dd, dt, blockquote, figcaption, h1, h2, h3, h4, h5, h6) {
    overflow-wrap: break-word;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    width: auto;
    height: auto;
    overflow: visible;
    white-space: normal;
}

#quiz-app {
    min-width: 0;
}

#quiz-app[aria-busy="true"] {
    cursor: progress;
}

.quiz-opt-container {
    position: relative;
}

.quiz-opt-container input[type="radio"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.quiz-opt-container:focus-within {
    border-color: #0284C7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18) !important;
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 5.5rem;
    }

    [id] {
        scroll-margin-top: 5.5rem;
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    #bot-anchor {
        right: max(12px, env(safe-area-inset-right)) !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
    }

    #ai-window {
        width: min(400px, calc(100vw - 24px)) !important;
        max-height: calc(100dvh - 88px) !important;
    }

    :where(a, button, input, select, textarea, summary) {
        min-height: 44px;
    }

    .skinbg-gallery-grid,
    .skinbg-testimonials-grid,
    .skinbg-faq-grid {
        min-width: 0;
    }
}

/*
 * Keep the fixed PWA installer clear of the footer's legal navigation.
 * The reserved space covers the 45.55px control, its 20px bottom offset,
 * a 12px clearance and the device safe-area inset.
 */
@media (min-width: 768px) and (max-width: 1535px) {
    #main-footer > .skinbg-section-container.skinbg-section-container--standard {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .anim-fade-in,
    .anim-shake {
        opacity: 1 !important;
        transform: none !important;
    }
}
