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

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

body {
    margin: 0;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: var(--leading-body);
}

h1, h2, h3 {
    margin: 0 0 var(--space-4);
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: var(--leading-tight);
    letter-spacing: -0.01em;
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }

p, ul, ol { margin: 0 0 var(--space-4); }

a {
    color: var(--color-link);
    text-underline-offset: 0.18em;
}
a:hover { color: var(--color-link-hover); }

:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
caption {
    padding-bottom: var(--space-2);
    text-align: left;
    color: var(--color-text-secondary);
}
th, td {
    padding: var(--space-1) var(--space-3);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
th {
    font-weight: 600;
    border-bottom-color: var(--color-border-strong);
}

label { font-size: var(--text-sm); color: var(--color-text-secondary); }

select, button {
    font: inherit;
    font-size: var(--text-sm);
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    padding: var(--space-1) var(--space-3);
}
button { cursor: pointer; }
button:hover { background: var(--color-surface-muted); }

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
}
