/* Manifest Reset - browser style normalizer */

@layer base, components, utilities;

@layer base {

    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        border: 0 solid
    }

    :where(:root) {
        -webkit-tap-highlight-color: transparent;
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        text-size-adjust: 100%;
        text-rendering: optimizeLegibility;
        overflow-wrap: break-word;
        -moz-tab-size: 4;
        -o-tab-size: 4;
        tab-size: 4;

        /* Device safe-area insets (0 unless viewport-fit=cover on a notched screen) */
        --safe-top: env(safe-area-inset-top, 0px);
        --safe-right: env(safe-area-inset-right, 0px);
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --safe-left: env(safe-area-inset-left, 0px)
    }

    :where(html),
    :host {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        line-height: 1.5;
        tab-size: 4;
        font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
        font-feature-settings: normal;
        font-variation-settings: normal;
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
        scroll-behavior: smooth;
        -ms-overflow-style: none;
        scrollbar-width: none;

        &::-webkit-scrollbar {
            display: none
        }

        &:has(dialog:popover-open) {
            overflow: hidden
        }
    }

    :where(body) {
        max-width: 100vw;
        min-height: 100vh;
        margin: 0;
        line-height: inherit
    }

    :where(a) {
        color: inherit;
        -webkit-text-decoration: inherit;
        text-decoration: inherit;
    }

    :where(abbr[title]) {
        -webkit-text-decoration: underline dotted;
        text-decoration: underline dotted
    }

    :where([aria-controls]) {
        cursor: pointer
    }

    :where([aria-hidden=false][hidden]) {
        display: initial
    }

    :where([aria-hidden=false][hidden]:not(:focus)) {
        clip: rect(0, 0, 0, 0);
        position: absolute
    }

    :where(audio:not([controls])) {
        display: none;
        height: 0
    }

    :where(b, strong) {
        font-weight: bolder
    }

    :where(button, input, optgroup, select, textarea) {
        margin: 0;
        padding: 0;
        font-family: inherit;
        font-feature-settings: inherit;
        font-variation-settings: inherit;
        font-size: 100%;
        font-weight: inherit;
        line-height: inherit;
        letter-spacing: inherit;
        color: inherit
    }

    :where(button, select) {
        text-transform: none
    }

    :where(button, input:where([type='button'], [type='reset'], [type='submit']), ::file-selector-button) {
        appearance: button;
        background-color: transparent;
        background-image: none
    }

    :where(::-webkit-file-upload-button) {
        -webkit-appearance: button;
        font: inherit
    }

    :where(::-webkit-inner-spin-button, ::-webkit-outer-spin-button) {
        height: auto
    }

    :where(::-webkit-search-decoration) {
        -webkit-appearance: none
    }

    :where(button, [role=button]) {
        cursor: pointer
    }

    :where(code, samp, pre) {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 1em;
        font-feature-settings: normal;
        font-variation-settings: normal;
    }

    :where([dir=rtl]) {
        direction: rtl
    }

    :where([disabled], :disabled, [aria-disabled=true], .disabled) {
        opacity: .5;
        cursor: default;
        pointer-events: none
    }

    :where(figcaption) {
        font-size: 75%
    }

    :where(figure) {
        display: block;
        padding: 0
    }

    :where(::file-selector-button) {
        margin-inline-end: 4px
    }

    :where(h1, h2, h3, h4, h5, h6) {
        font-size: inherit;
        font-weight: inherit
    }

    :where(hr) {
        height: 1px;
        color: inherit;
        background-color: var(--color-line, color-mix(in oklch, oklch(20.5% 0 0) 12%, transparent));
        border: 0 none
    }

    :where(img, svg, video, canvas, audio, iframe, embed, object) {
        display: block
    }

    :where(img, video) {
        max-width: 100%;
        height: auto
    }

    :where(::-webkit-autofill, :-webkit-autofill:focus) {
        transition: background-color 0s 600000s, color 0s 600000s
    }

    :where(::-webkit-date-and-time-value) {
        min-height: 1lh;
        text-align: inherit
    }

    :where(::-webkit-datetime-edit) {
        display: inline-flex
    }

    :where(::-webkit-datetime-edit-fields-wrapper) {
        padding: 0
    }

    :where(::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field) {
        padding-block: 0
    }

    :where(select:is([multiple], [size])) optgroup {
        font-weight: bolder
    }

    :where(select:is([multiple], [size])) optgroup option {
        padding-inline-start: 20px
    }

    :where(small) {
        font-size: 80%
    }

    :where(span) {
        color: inherit
    }

    :where(sub, sup) {
        font-size: 50%;
        line-height: 0;
        position: relative;
        vertical-align: baseline
    }

    :where(sub) {
        bottom: -0.25em
    }

    :where(sup) {
        top: -0.5em
    }

    :where(svg):not([fill]) {
        fill: currentColor
    }

    :where(svg):not(:root) {
        overflow: hidden
    }

    :where(table) {
        text-indent: 0;
        border-color: inherit;
        border-collapse: collapse
    }

    :-moz-focusring {
        outline: auto
    }

    :-moz-ui-invalid {
        box-shadow: none
    }

    :where(::placeholder) {
        opacity: 1;
        color: color-mix(in oklab, currentcolor 50%, transparent)
    }

    /* Animates `scale`, not `transform`: a transform animation with fill `both`
       keeps its final value and would override any transform an author sets on
       a popover of their own. */
    @keyframes mnfst-popover-in {
        from {
            scale: .9;
        }

        to {
            scale: 1;
        }
    }

    :where([popover]):not(.unstyle):popover-open {
        display: flex;
        animation: mnfst-popover-in .15s ease-in both;
    }

    :where(progress) {
        vertical-align: baseline
    }

    :where([type='search']) {
        -webkit-appearance: textfield;
        appearance: textfield;
        outline-offset: -2px
    }

    :where(summary) {
        display: list-item
    }

    :where(textarea) {
        resize: vertical
    }

    [hidden],
    [un-cloak],
    [v-cloak],
    [x-cloak] {
        display: none
    }

    [x-route][hidden] {
        display: none !important
    }

    /* @ rule - font smoothing for iOS and Mac */
    @media (-webkit-min-device-pixel-ratio: 2) {
        :where(html) {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale
        }
    }

    /* @ rule - reduced motion */
    @media (prefers-reduced-motion:reduce) {

        :not([aria-busy=true]),
        :not([aria-busy=true])::after,
        :not([aria-busy=true])::before {
            background-attachment: initial !important;
            animation-duration: 1ms !important;
            animation-delay: -1ms !important;
            animation-iteration-count: 1 !important;
            scroll-behavior: auto !important;
            transition-delay: 0s !important;
            transition-duration: 0s !important
        }
    }

    /* @ rule - reverse animation direction for rtl mode */
    @media (prefers-reduced-motion:no-preference) {
        [dir=rtl] progress:indeterminate {
            animation-direction: reverse
        }
    }

    /* View transition styles */
    ::view-transition-group(*) {
        animation-duration: var(--view-transition-duration, 200ms);
        animation-timing-function: var(--view-transition-easing, cubic-bezier(0.4, 0, 0.2, 1))
    }

    /* Skip view transition for live/non-rasterizable content */
    iframe,
    video,
    canvas,
    [data-no-view-transition] {
        view-transition-name: none
    }
}

/* Cross-document view transitions opt-in */
@view-transition {
    navigation: auto
}

/* Unlayered on purpose: a closed popover must beat layer-based layout classes. */
[popover]:not(.unstyle):not(:popover-open) {
    display: none;
}
