/* Page basics: reset, body, headings, links, focus ring. */

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

html, body { margin: 0; padding: 0; }

/* On a touch screen the browser paints a grey square with sharp corners where a finger lands. The buttons have their own pressed look, so I switch it off. */
a, button, input, select, textarea, label, summary, [role="button"], [tabindex] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.04em; line-height: 1.2; }
h1 { font-size: 30px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }

/* Blazor moves focus to the h1 after a page loads, and the ring below made it look selected. I hide the ring only for that case. */
h1:focus, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

/* One clear ring for keyboard users, on everything that can be focused. */
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

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

.muted { color: var(--color-text-muted); }

/* Smaller headings on phones so long titles do not wrap into three lines. */
@media (max-width: 600px) {
    h1 { font-size: 24px; }
}
