/* ==========================================
   RESET
   Lightweight, intentional reset.
   Only resets what is necessary - not a full
   framework-style reset.
========================================== */

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

* {
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
    font-family: var(--font-body);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Headings inherit sizing from typography system in global.css,
   this only removes default browser spacing/weight assumptions */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-bold);
    line-height: var(--leading-heading);
}

/* Responsive images/media by default */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Prevent long unbroken words from causing horizontal overflow */
p,
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* Forms inherit font instead of using browser UI defaults */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

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

/* Links keep no default styling assumptions - defined in global.css */
a {
    color: inherit;
    text-decoration: none;
}

/* Lists reset only where they are used as layout, not semantically removed */
ul,
ol {
    list-style: none;
}

/* Tables (used sparingly, e.g. spec tables) */
table {
    border-collapse: collapse;
    width: 100%;
}

/* Prevent root-level horizontal scroll issues */
html,
body {
    overflow-x: hidden;
}
