:root {
    --hp-cobalt: #3158e7;
    --hp-violet: #7658d8;
    --hp-cyan: #22b9d0;
    --hp-focus-ring: 0 0 0 4px rgba(49, 88, 231, .15);
}

html {
    min-width: 320px;
    color-scheme: light;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-gutter: stable;
}

body,
button,
input,
textarea,
select {
    font-family:
        "Segoe UI Variable Text",
        "Segoe UI Variable",
        "Aptos",
        "Segoe UI",
        -apple-system,
        BlinkMacSystemFont,
        system-ui,
        Arial,
        sans-serif;
}
::selection {
    color: #fff;
    background: rgba(49, 88, 231, .72);
}

:where(a, button, input, textarea, select, summary):focus-visible {
    outline: 2px solid transparent;
    outline-offset: 3px;
    box-shadow: var(--hp-focus-ring);
}

:where(button, [role="button"], a) {
    -webkit-tap-highlight-color: transparent;
}

:where(button, [role="button"]):not(:disabled) {
    touch-action: manipulation;
}

:where([role="dialog"], .modal-panel, .modal-card) {
    overscroll-behavior: contain;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 102, 166, .48) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(75, 102, 166, .42);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(49, 88, 231, .58);
    background-clip: padding-box;
}

@media (max-width: 430px) {
    :where(button, input, select, textarea) {
        scroll-margin-bottom: 96px;
    }
}

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

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