/* Shared browser defaults and typography. Edit these files directly; no compiler is needed. */
@layer base, components;

@font-face {
    font-family: 'Nunito Sans';
    src: url('../fonts/nunito-sans-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
}

@layer base {
    :root {
        --font-sans: 'Nunito Sans', ui-sans-serif, system-ui, sans-serif;
        --radius-card: 1rem;
        --radius-control: 0.625rem;
    }

    *, ::before, ::after, ::backdrop {
        box-sizing: border-box;
        border: 0 solid;
    }

    html {
        font-family: var(--font-sans);
        font-size: 100%;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        tab-size: 4;
    }

    body {
        margin: 0;
        background: var(--bg);
        color: var(--text);
        font-optical-sizing: auto;
    }

    h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
        margin: 0;
    }

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

    h1, h2, h3, p { overflow-wrap: anywhere; }
    a { color: inherit; text-decoration: inherit; }
    b, strong { font-weight: bolder; }
    ol, ul, menu { margin: 0; padding: 0; list-style: none; }
    img, svg, video, canvas { display: block; vertical-align: middle; }
    img, video { max-width: 100%; height: auto; }
    table { text-indent: 0; border-color: inherit; border-collapse: collapse; }

    button, input, select, optgroup, textarea {
        margin: 0;
        padding: 0;
        font: inherit;
        letter-spacing: inherit;
        color: inherit;
        background-color: transparent;
        border-radius: 0;
    }

    button, input[type='button'], input[type='reset'], input[type='submit'] { appearance: button; }
    button, summary { cursor: pointer; }
    textarea { resize: vertical; }
    input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
    input[type='search'] { appearance: textfield; }
    ::-webkit-search-decoration { -webkit-appearance: none; }
    ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
    summary { display: list-item; }
    fieldset { min-width: 0; margin: 0; padding: 0; }
    legend { padding: 0; }
    dialog { margin: auto; padding: 0; color: inherit; }
    progress { vertical-align: baseline; }
    time { font-variant-numeric: tabular-nums; }
    :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
}

/* Visibility must win over layout helpers, including during Alpine initialization. */
[hidden]:not([hidden='until-found']), [x-cloak] { display: none !important; }
