@layer base {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        margin: 0;
        min-height: 100vh;
        min-height: 100dvh;
        background: var(--bg);
        color: var(--text);
        font-family: var(--font-mono);
        font-size: 1rem;
        line-height: 1.6;
        padding-left: max(env(safe-area-inset-left), 0px);
        padding-right: max(env(safe-area-inset-right), 0px);
    }

    a {
        color: var(--link);
        text-decoration: none;
    }

    a:hover {
        text-decoration: underline;
    }

    :focus-visible {
        outline: 2px solid var(--focus);
        outline-offset: 2px;
        border-radius: 2px;
    }

    ::selection {
        background: var(--accent);
        color: var(--bg);
    }

    h1,
    h2,
    h3,
    p {
        margin-top: 0;
    }

    button,
    input,
    textarea {
        font: inherit;
        color: inherit;
    }

    img {
        max-width: 100%;
    }

    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}
