html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

h1:focus {
    outline: none;
}

.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
}

.blazor-error-boundary {
    background: var(--danger);
    padding: 1rem;
    color: #fff;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* Keyboard focus is always visible; mouse clicks don't draw a ring. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline-offset: 0;
}

/* Text only screen readers hear. */
.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;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Inputs that sit inside a styled box hide their own outline, so the box shows focus instead. */
.search:focus-within, .find:focus-within, .addt:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Borderless title and subject fields: an underline marks keyboard focus. */
input.title:focus-visible, input.subject:focus-visible, input.typing:focus-visible {
    box-shadow: inset 0 -2px 0 var(--accent);
}
