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

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

    body {
        margin: 0;
        min-height: 100vh;
        background: var(--bg);
        color: var(--text);
        font-family: var(--font-ui);
        font-size: var(--text-md);
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }

    h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset {
        margin: 0;
    }

    ul, ol {
        padding-inline-start: 1.25rem;
    }

    fieldset {
        padding: 0;
        border: 0;
        min-width: 0;
    }

    img, svg {
        display: block;
        max-width: 100%;
    }

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

    button {
        cursor: pointer;
    }

    a {
        color: var(--accent-text);
    }

    code {
        font-family: var(--font-mono);
        font-size: 0.9em;
    }

    [hidden] {
        display: none !important; /* hidden must always win over a component's display */
    }

    :focus-visible {
        outline: none;
        box-shadow: var(--focus-ring);
    }

    ::selection {
        background: var(--accent-strong);
        color: #fff;
    }

    svg.lucide {
        width: 1.1em;
        height: 1.1em;
        flex-shrink: 0;
        stroke-width: 1.75;
    }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.01ms !important; /* user's OS setting beats every component */
            transition-duration: 0.01ms !important; /* same */
        }
    }
}

@layer utilities {
    .muted {
        color: var(--text-muted);
    }

    .prose {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
}
