

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

html {
    min-height: 100%;
    font-size: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--font-base);
    line-height: 1.5;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

h1 {
    font-size: var(--font-page-title);
}

h2 {
    font-size: var(--font-section-title);
}

h3 {
    font-size: var(--font-card-title);
}

p {
    margin: 0;
    overflow-wrap: anywhere;
}

a {
    color: var(--color-accent);
    text-underline-offset: 0.2em;
}

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

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

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--color-divider);
}

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

[hidden] {
    display: none !important;
}

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

.text-small {
    font-size: var(--font-sm);
}

.text-metadata {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
}

.preserved-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    z-index: 100;
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-control);
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-weight: 600;
    transform: translateY(-200%);
}

.skip-link:focus {
    color: var(--color-on-accent);
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
