:root {
    font-family: var(--font-body);
    line-height: 1.55;
    font-size: 16px;
}

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

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

body {
    color: var(--color-text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.55em;
    color: var(--color-text-heading);
    font-family: var(--font-heading);
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

p,
ul,
ol,
dl {
    margin: 0 0 1rem;
}

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

main,
.app-shell {
    width: min(100%, 100rem);
    margin-inline: auto;
    padding: 0.875rem;
}

.app-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.95rem;
}

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

@media (min-width: 768px) {
    main,
    .app-shell {
        padding: 1.25rem 1.5rem;
    }

    .app-layout {
        grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr);
        gap: 1.2rem;
    }
}

@media (min-width: 1024px) {
    :root {
        font-size: 17px;
    }

    main,
    .app-shell {
        padding: 1.5rem 2rem;
    }

    .app-layout {
        grid-template-columns: minmax(17rem, 23rem) minmax(0, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    main,
    .app-shell {
        padding-inline: 2.5rem;
    }

    .app-layout {
        gap: 1.9rem;
    }
}

@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;
    }
}
