:root {
    --highlight: #003399;
    --ink: #1f1f1f;
    --paper: #fff;
    --gray: #f0f0f0;
    --sans: "Helvetica Neue", Arial, sans-serif;
    --serif: "Rockwell", "Roboto Slab", Georgia, serif;
    --serif-cond: "Rockwell", "Roboto Slab", Georgia, serif;
    --dot: radial-gradient(
        circle,
        var(--ink) 0.8px,
        color-mix(in srgb, var(--ink) 80%, transparent) 1.1px,
        transparent 1.6px
    );
    --pad: 15px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-bottom: 64px;
    background: var(--gray);
    color: var(--ink);
    font-family: var(--sans);
    overflow-x: hidden;
}

strong {
    font-weight: bold;
}

a {
    color: var(--highlight);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body > div {
    max-width: 1020px;
    margin: 0 auto;
    background: var(--paper);
    hyphens: auto;
}

/* ---------- top bar ---------- */

#top-bar {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: flex-end;
    height: 52px;
    padding: 0 var(--pad);
    background: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

/* ---------- header ---------- */

header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    height: 89px;
    padding: 0 10px;
    background: var(--paper);
}

header::before,
header::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 2px;
    background: var(--dot) 0 50% / 6px 6px repeat-x;
}

header::before {
    top: 0;
}
header::after {
    bottom: 0;
}

#logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 89px;
    margin-right: 24px;
    background: var(--highlight);
    color: #fff;
    font-size: 46px;
    font-weight: 700;
    letter-spacing: -2px;
}

header nav {
    display: flex;
    gap: 20px;
    font-size: 16px;
}

/* support pill in header  */
#support {
    margin-left: auto;
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--highlight);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- lead article ---------- */

main > article {
    display: flex;
    flex-direction: row-reverse;
    padding: var(--pad);
}

main > article > img {
    /* the image is sized by its height so it matches the text next to it,
       instead of taking a fixed share of the row's width */
    flex: 0 1 auto;
    width: auto;
    height: auto;
    max-height: 230px;
    max-width: 45%;
    margin-left: 30px;
    align-self: center;
}

main > article > div {
    flex: 1 1 0;
}

main > article h1 {
    margin: 0 0 10px;
    font-family: var(--serif-cond);
    font-size: 31px;
    font-weight: 600;
    line-height: 1.2;
}

main > article > div p {
    margin: 0 0 15px;
    font-family: var(--serif-cond);
    font-size: 25px;
    font-weight: 300;
    line-height: 1.2;
}

/* lists in page content match the paragraph style */
main > article ul,
main > article ol {
    margin: 0 0 15px;
    padding-left: 1.2em;
    font-family: var(--serif-cond);
    font-size: 25px;
    font-weight: 300;
    line-height: 1.2;
}

main > article li {
    margin-bottom: 8px;
}

/* headings in plain page content (e.g. FAQ questions) */
main > article h2 {
    margin: 25px 0 10px;
    font-family: var(--serif-cond);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.15;
}

/* kicker (lead and cards) */
article > span,
article > div > span:first-child {
    display: block;
    margin: 0 0 10px;
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.2;
}

/* author line */
article footer {
    font-size: 15px;
    line-height: 1.2;
}

/* ---------- topic sections ---------- */

body > div > nav,
main > section,
main > aside {
    position: relative;
}

/* colored blocks extend a darkened version of their background into the gutters */
body > div > nav::after,
main > section:nth-of-type(odd)::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: inherit;
    filter: brightness(0.92);
    z-index: -1;
}

main > section::before,
main > aside::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 2px;
    background: var(--dot) 0 50% / 6px 6px repeat-x;
}

main > section {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 40px;
    /* keep anchor targets clear of the sticky header */
    scroll-margin-top: 89px;
}

main > section:nth-of-type(odd) {
    background: var(--gray);
}

main > section h2 {
    width: 100%;
    margin: 0;
    padding: var(--pad) var(--pad) 0;
    color: var(--ink);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: lowercase;
}

main > section article {
    width: 50%;
    padding: var(--pad) var(--pad) 0;
    position: relative;
}

/* a lone article fills the whole section */
main > section article:only-of-type {
    width: 100%;
}

main > section article:only-of-type > img {
    max-height: 300px;
    object-fit: cover;
}

/* dotted divider between the two cards */
main > section article + article::before {
    content: "";
    position: absolute;
    left: -1px;
    top: var(--pad);
    bottom: 0;
    width: 2px;
    background: var(--dot) 50% 0 / 6px 6px repeat-y;
}

main > section article > img {
    display: block;
    width: 100%;
    margin-bottom: var(--pad);
}

main > section h3 {
    margin: 0 0 10px;
    font-family: var(--serif-cond);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.15;
}

main > section article p {
    margin: 0 0 15px;
    font-size: 17px;
    line-height: 1.3;
}

/* listing sections (events, news) */
main > section h3 a {
    color: inherit;
}

main > section article p.meta {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.2;
}

/* ---------- forms (taz-style: pill inputs on gray, pill submit) ---------- */

main form input[type="text"],
main form input[type="email"] {
    width: 100%;
    max-width: 320px;
    height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 20px;
    background: var(--gray);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
}

main form input[type="text"]:focus,
main form input[type="email"]:focus {
    outline: 2px solid var(--highlight);
}

main form input[type="submit"] {
    padding: 11px 20px;
    border: 0;
    border-radius: 30px;
    background: var(--highlight);
    color: #fff;
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
}

main form input[type="submit"]:hover {
    filter: brightness(1.2);
}

main form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--highlight);
}

main > article form p,
main > section article form p {
    margin: 0 0 12px;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.3;
}

main form altcha-widget {
    display: block;
    margin: 0 0 12px;
}

/* h3 in plain page content (e.g. the subscribe form heading) */
main > article h3 {
    margin: 25px 0 10px;
    font-family: var(--serif-cond);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.15;
}

/* ---------- footer ---------- */

body > div > footer {
    padding: 40px var(--pad) 20px;
}

body > div > footer > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 60px;
}

body > div > footer h3 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
}

body > div > footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body > div > footer li {
    margin-bottom: 14px;
    font-size: 15.5px;
}

#main-footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #000;
}

#main-footer p {
    margin: 0;
    font-size: 15.5px;
}

#main-footer small {
    font-size: 12px;
}

#main-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    max-width: 480px;
}

#main-footer li {
    margin: 0;
}

/* ---------- wide screens: logo hugs the viewport edge ---------- */

@media (min-width: 1360px) {
    #logo {
        position: absolute;
        left: calc(50% - 50vw);
    }
}

/* ---------- mobile ---------- */

@media (max-width: 768px) {
    body > div > nav {
        display: none;
    }

    header {
        flex-wrap: wrap;
        height: auto;
    }

    #logo {
        margin-right: auto;
    }

    header nav {
        order: 5;
        width: 100%;
        padding: 14px var(--pad);
        position: relative;
    }

    header nav::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 2px;
        background: var(--dot) 0 50% / 6px 6px repeat-x;
    }

    main > article {
        flex-direction: column;
        padding: 0 0 var(--pad);
    }

    main > article > img {
        margin: 0 auto var(--pad);
        width: auto;
        max-width: 70%;
        max-height: none;
    }

    main > article > div {
        padding: 0 var(--pad);
    }

    main > section article {
        width: 100%;
        padding-bottom: var(--pad);
    }

    main > section article + article::before {
        left: var(--pad);
        right: var(--pad);
        top: -1px;
        bottom: auto;
        width: auto;
        height: 2px;
        background: var(--dot) 0 50% / 6px 6px repeat-x;
    }

    main > aside {
        flex-direction: column;
    }

    main > aside > img {
        width: 70%;
    }

    #main-footer {
        flex-direction: column;
    }
}
