/**
 * Hoqmail — Base
 *
 * A small reset plus the default appearance of bare HTML elements.
 * Every value here comes from tokens.css.
 */

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

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

body {
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--fs-body-3);
    line-height: var(--lh-loose);
    font-weight: var(--fw-regular);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings inherit colour so a section can recolour its own type. */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: inherit;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p {
    margin: 0;
}

a {
    color: var(--color-text-strong);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-brand-ink);
}

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

svg {
    flex-shrink: 0;
}

hr {
    height: 1px;
    margin: 0;
    border: 0;
    background-color: var(--color-border);
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

code, pre, kbd, samp {
    font-family: var(--font-mono);
}

/* Form controls inherit type instead of falling back to the UA font. */
button,
input,
select,
textarea {
    margin: 0;
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

/*
 * One visible focus style for the whole theme. Pointer users never see it,
 * keyboard users always do.
 */
:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
    outline: none;
}

::selection {
    background-color: var(--color-brand-tint);
    color: var(--color-text-strong);
}

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