/* EGI Portal modern reset
 * --------------------------------------------------------------
 * Light-touch reset focused on consistent box model, sane media
 * defaults, and no jarring browser styles. Loaded BEFORE brand.css
 * so brand-css :root rules win. Per BRAND_SPEC.md §11.2.
 * -------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.55;
}

/* Headings inherit weight from semantic tokens (set in brand.css);
 * here we only normalize size to body so unstyled h1..h6 don't blow
 * up before components.css applies type-scale rules. */
h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* Media defaults: respect aspect-ratio, no inline-shifted baseline. */
img,
picture,
video,
canvas,
svg,
iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form controls inherit type — no Helvetica fallback in inputs. */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

/* Remove list bullets only when the list has an explicit role
 * (preserves semantics for assistive tech on default lists). */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Anchor inheritance — components.css decides link color via tokens. */
a {
    color: inherit;
    text-decoration: inherit;
}

/* Tables collapse — components.css adds spacing per §7.4. */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Reduce motion respects user preference globally. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Visible focus for keyboard users. components.css overrides per element. */
:focus-visible {
    outline: 2px solid var(--teal-500, #33BACC);
    outline-offset: 2px;
}

/* Hidden utility (matches the ARIA convention). */
[hidden] {
    display: none !important;
}
