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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

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

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

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

/* Consistent keyboard-focus ring for every interactive element that doesn't
   define its own. :focus-visible fires only on keyboard navigation, so mouse
   and touch users see no change. Component-specific focus styles (toggle,
   cards, .field inputs) override this via higher specificity. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Visually hidden but available to screen readers (e.g. table captions). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app {
    display: flex;
    min-height: 100vh;
}

