﻿/* Reset + base typography. Loaded on every page after tokens.css. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--sm-header-height) + var(--sm-space-4));
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--sm-color-bg);
    color: var(--sm-color-text);
    font-family: var(--sm-font-sans);
    font-size: var(--sm-font-size-md);
    line-height: var(--sm-line-height);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
}

body.sm-no-scroll {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: var(--sm-line-height-tight);
    font-weight: var(--sm-font-weight-bold);
    color: var(--sm-color-text);
}

h1 { font-size: var(--sm-font-size-xl); }
h2 { font-size: var(--sm-font-size-lg); }
h3 { font-size: var(--sm-font-size-md); }

@media (min-width: 768px) {
    h1 { font-size: var(--sm-font-size-2xl); }
    h2 { font-size: var(--sm-font-size-xl); }
    h3 { font-size: var(--sm-font-size-lg); }
}

p {
    margin: 0 0 var(--sm-space-3);
}

a {
    color: var(--sm-color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

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

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

hr {
    border: 0;
    border-top: 1px solid var(--sm-color-border);
    margin: var(--sm-space-4) 0;
}

:focus-visible {
    outline: none;
    box-shadow: var(--sm-shadow-focus);
    border-radius: var(--sm-radius-sm);
}

[hidden] {
    display: none !important;
}

.sm-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link for keyboard users */
.sm-skip-link {
    position: absolute;
    top: -100px;
    left: var(--sm-space-4);
    z-index: var(--sm-z-loader);
    padding: var(--sm-space-2) var(--sm-space-4);
    background: var(--sm-color-surface);
    border-radius: var(--sm-radius-md);
    box-shadow: var(--sm-shadow-md);
}

.sm-skip-link:focus {
    top: var(--sm-space-2);
}
