/* Two colour sets. The browser picks one from the visitor's system setting
   (prefers-color-scheme), so there is no JavaScript, cookie or storage. */
:root {
    color-scheme: light dark;

    /* light */
    --bg: #ffffff;
    --fg: #222222;
    --muted: #595959;
    --link: #0057b8;
    --rule: #767676;
    --focus: #222222;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #262d2f;
        --fg: #f5f7f7;
        --muted: #c9d1d3;
        --link: #cee007;
        --rule: #9aa5a7;
        --focus: #ffffff;
    }
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.5em;
    min-height: 100vh;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    color: var(--fg);
    background: var(--bg);
}

header {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

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

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

a:hover {
    text-decoration-thickness: 2px;
}

a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
}

a[aria-current="page"] {
    font-weight: bold;
}

/* Menu: one horizontal row, no bullets; wraps on narrow screens */
nav ul {
    list-style: none;
    margin: 1em 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4em 0;
}

nav li {
    list-style: none;
    padding: 0 0.7em;
}

nav li + li {
    border-left: 1px solid var(--rule);
}

@media (max-width: 40em) {
    nav ul {
        gap: 0.4em 1.2em;
    }

    nav li {
        padding: 0;
    }

    nav li + li {
        border-left: 0;
    }
}

/* Skip link: hidden until a keyboard user tabs to it */
.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--bg);
    color: var(--link);
    padding: 0.5em 1em;
    z-index: 10;
}

.skip:focus {
    left: 0;
}

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

main {
    flex: 1;
    width: min(100%, 960px);
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.legal {
    text-align: left;
    width: min(100%, 720px);
    margin: 0 auto;
    line-height: 1.5;
    font-size: 0.75em;
}

.legal h1 {
    font-size: 1.6em;
}

footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    font-size: 0.8em;
    color: var(--muted);
    box-sizing: border-box;
}
