/* =============================================================================
   Base — reset, typography, focus
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--svr-surface-page);
    color: var(--svr-text);
    font-family: var(--svr-font-body);
    font-size: var(--svr-size-base);
    line-height: var(--svr-leading-body);
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--svr-text-strong);
    font-family: var(--svr-font-display);
    font-weight: 700;
    line-height: var(--svr-leading-heading);
    /* Uppercase comes from the draft. Headings only, never body text or
       links — with letter-spacing, because uppercase runs together otherwise. */
    text-transform: uppercase;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

h1 {
    font-size: var(--svr-size-h1);
}

h2 {
    font-size: var(--svr-size-h2);
}

h3 {
    font-size: var(--svr-size-h3);
}

h4 {
    font-size: var(--svr-size-h4);
    font-weight: 600;
}

p {
    margin: 0 0 var(--svr-space-md);
    max-width: var(--svr-measure);
    text-wrap: pretty;
}

a {
    color: var(--svr-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: var(--svr-focus-ring);
    outline-offset: 2px;
}

/* Jump targets must not disappear under the sticky header. */
:target {
    scroll-margin-top: calc(var(--svr-header-height, 5rem) + var(--svr-space-md));
}

/* =============================================================================
   Visible to screen readers, not to the eye

   Not display:none — that would remove the content from the accessibility
   tree as well.
   ========================================================================== */

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