/*
   CanCham public foundation.
   Small local reset/foundation based on common normalize.css and modern-normalize patterns.
   It loads before main.css and page CSS, so existing page design stays in control.
*/

:root {
    color-scheme: light;
    --site-content-max: 1240px;
    --site-gutter-fluid: clamp(1rem, 3vw, 2rem);
    --site-section-y: clamp(2.75rem, 6vw, 5.5rem);
    --site-card-radius: 8px;
    --site-control-radius: 8px;
}

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

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    tab-size: 4;
}

body {
    margin: 0;
    min-width: 320px;
}

main {
    display: block;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    overflow-wrap: anywhere;
}

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

img,
video {
    height: auto;
}

iframe {
    max-width: 100%;
}

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

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

textarea {
    resize: vertical;
}

table {
    border-collapse: collapse;
}

:target {
    scroll-margin-block: 6rem;
}

.site-shell {
    width: min(100% - (var(--site-gutter-fluid) * 2), var(--site-content-max));
    margin-inline: auto;
}

.page-main {
    min-width: 0;
}

.button,
button,
input,
select,
textarea {
    max-width: 100%;
}

.button {
    text-wrap: balance;
}

@media (max-width: 700px) {
    :root {
        --site-gutter-fluid: 1rem;
        --site-section-y: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
}
