/* Base: fonts, reset, typography, focus and print. Values come from tokens.css. */

/* Open Sans 3, variable weight 300 to 800, split by unicode-range so latin-ext loads only when used. */

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(../fonts/opensans/opensans-latin-wght-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(../fonts/opensans/opensans-latin-ext-wght-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: 300 800;
    font-display: swap;
    src: url(../fonts/opensans/opensans-latin-wght-italic.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: 300 800;
    font-display: swap;
    src: url(../fonts/opensans/opensans-latin-ext-wght-italic.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--nx-font);
    font-size: var(--nx-size-md);
    line-height: var(--nx-leading);
    font-weight: var(--nx-weight);
    color: var(--nx-text);
    background: var(--nx-ground);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
    margin: 0;
}

h1, h2, h3, h4 {
    color: var(--nx-ink);
    font-weight: var(--nx-weight-strong);
    line-height: var(--nx-leading-tight);
}

h1 { font-size: var(--nx-size-title); font-weight: var(--nx-weight); }
h2 { font-size: var(--nx-size-xl); }
h3 { font-size: var(--nx-size-lg); }
h4 { font-size: var(--nx-size-md); }

b, strong {
    font-weight: var(--nx-weight-strong);
}

a {
    color: var(--nx-area-ink, var(--nx-add-ink));
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img, svg {
    max-width: 100%;
}

code, pre {
    font-family: var(--nx-font-mono);
    font-size: var(--nx-size-sm);
}

/* Focus is always visible and takes the area colour. */
:focus-visible {
    outline: 2px solid var(--nx-area-ink, var(--nx-add));
    outline-offset: 2px;
}

::selection {
    background: var(--nx-area-tint, var(--nx-add-tint));
}

/* Reduced motion: the same movements, quicker. They show what changed, so they are not dropped. */
@media (prefers-reduced-motion: reduce) {
    :root {
        --nx-fast: 80ms;
        --nx-base: 110ms;
        --nx-slide: 130ms;
    }
}

@media print {
    .nx-nav, .nx-topbar, .nx-savebar, .nx-header-actions, .nx-back, .nx-noprint {
        display: none !important;
    }

    body, .nx-main {
        background: #fff;
    }

    .nx-card {
        border-color: #999;
        box-shadow: none;
    }
}

/* A heading given focus by the app after navigation (so screen readers start there) shows no ring. */
[tabindex="-1"]:focus-visible {
    outline: none;
}
