html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-rendering: optimizeLegibility;
    margin: 0;
    overflow: auto;
    height: 100%;
    background-image: repeating-conic-gradient(from 0deg at 0% 100%, #5bcffb 0deg 18deg, #f5abb9 18deg 36deg, white 36deg 54deg, #f5abb9 54deg 72deg, #5bcffb 7deg 90deg);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.stickyhead {
    width: 100%;
    margin: 0% 0% 1rem;
    padding: 0;
    top: 0;
    background-color: whitesmoke;
    position: sticky;
    border-bottom: solid 5px;
    border-image: linear-gradient(to right, #5bcffb 0% 20%, #f5abb9 20% 40%, white 40% 60%, #f5abb9 60% 80%, #5bcffb 80% 100%) 1;
    box-shadow: 0px 2px 5px black;
    z-index: 3;
}

.logo {
    width: 6rem;
}

.hamburger-switch {
    position: absolute;
    visibility: hidden;
}

.head-nav {
    list-style-type: none;
}

.head-nav li {
    font-size: larger;
}

.head-nav a {
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
}

.overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    z-index: 1;
}

.footer {
    width: 100%;
    margin: 1rem 0% 0%;
    bottom: 0;
    padding: 1rem 0;
    background-color: #202020;
    color: white;
    flex-shrink: 0;
}

.bottomtext {
    margin: auto 4rem;
    padding: 1rem;
}

.bottomtext a {
    color: inherit;
}

.content {
    background-color: #ffffff;
    border-radius: 5px;
    padding: 0.5em 2em;
    font-size: large;
    flex: 1 0 auto;
}

.content p {
    padding-left: 1em;
}

.agreement-title {
    position: relative;
    z-index: 1;
}

.agreement-markdown {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    line-height: 1.5;
}

.agreement-markdown p {
    padding-left: 0;
}

.agreement-markdown ul,
.agreement-markdown ol {
    padding-left: 2rem;
}

.agreement-markdown li {
    margin-bottom: 0.75rem;
}

.pagelist li {
    margin-bottom: 1rem;
}

summary {
    font-size: larger;
    font-weight: bold;
}

.socials {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-content: center;
    text-align: center;
}

.socials img {
    width: 40px;
    height: 40px;
}

.calendar iframe {
    box-sizing: border-box;
    width: 100%;
    height: 600px;
    border: 1px solid #777;
    border-radius: 15px;
}

    .crisis-featured {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
        margin: 1rem 0;
    }

    .crisis-emergency,
    .crisis-suicide,
    .crisis-community {
        box-sizing: border-box;
        min-width: 0;
        border-radius: 5px;
        padding: 1rem;
        color: white;
    }

    .crisis-emergency {
        background-color: #bd202b;
    }

    .crisis-suicide {
        background-color: #174b87;
    }

    .crisis-community {
        background-color: #25723a;
    }

    .crisis-featured a {
        color: white;
    }

    .crisis-number {
        display: inline-block;
        font-size: 1.75rem;
        line-height: 1.15;
    }

    .crisis-number-row {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        margin: 0.15rem 0;
    }

    .crisis-number-row .crisis-contact {
        margin-left: 0;
    }

    .crisis-contact {
        display: inline-flex;
        position: relative;
        width: 1.2em;
        height: 1.2em;
        flex: 0 0 1.2em;
        margin-left: 0.2rem;
        vertical-align: middle;
        text-decoration: none;
    }

    .crisis-contact img {
        display: block;
        width: 100%;
        height: 100%;
    }

    .crisis-contact[href^="tel:1800"]::before,
    .crisis-contact[href^="tel:1800"],
    .crisis-contact[href^="tel:1800"] img,
    .crisis-contact[href^="tel:1833"] img,
    .crisis-contact[href^="tel:1844"] img,
    .crisis-contact[href^="tel:1855"] img,
    .crisis-contact[href^="tel:1866"] img,
    .crisis-contact[href^="tel:1877"] img,
    .crisis-contact[href^="tel:1888"] img {
        content: url("../img/icons/toll-free.svg");
    }

    .crisis-description {
        margin: 0.35rem 0 0;
        padding-left: 0;
    }

    .crisis-directory .pagelist li > strong + br {
        display: none;
    }

    .content p.crisis-description {
        padding-left: 0;
    }

    .crisis-contact::after {
        position: absolute;
        z-index: 4;
        left: 50%;
        bottom: calc(100% + 0.4rem);
        padding: 0.35rem 0.5rem;
        border-radius: 4px;
        background-color: #202020;
        color: white;
        content: attr(data-tooltip);
        font-size: 0.8rem;
        font-weight: normal;
        line-height: 1.2;
        white-space: nowrap;
        transform: translateX(-50%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .crisis-contact:hover::after,
    .crisis-contact:focus-visible::after {
        opacity: 1;
        visibility: visible;
    }

    .crisis-featured .crisis-contact img {
        filter: brightness(0) invert(1);
    }

    .crisis-contact:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }

    @media screen and (width <= 600px) {
        .crisis-featured {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    .team-grid {
        display: grid;
        gap: 1rem;
        margin: 1rem;
    }

    .team-grid img {
        width: 100%;
    }

    @media screen and (width > 1295px) {
        .head-flex {
            display: flex;
            flex-wrap: wrap;
            padding: 1rem;
            justify-content: space-between;
        }

        .hamburger-label {
            display: none;
        }

        .front-spacer {
            display: none
        }

        .back-spacer {
            display: none;
        }

        .head-nav {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            text-align: center;
            align-items: center;
        }

        .head-nav a {
            padding: 0.5rem;
        }

        .head-nav a:hover {
            background-color: lightgray;
        }

        .bottomtext {
            display: flex;
            flex-wrap: nowrap;
            gap: 5vw;
        }

        .bottomtext hr {
            display: none;
        }

        .content {
            width: 50vw;
            margin: auto;
        }

        .calendar {
            width: 100%;
            margin: auto;
        }

        .team-grid {
            grid-template-columns: 33.33% auto;
        }
    }

    @media screen and (width > 769px) and (width <= 1295px) {
    .head-flex {
        padding: 1rem;
        display: grid;
        grid-template-columns: 1fr 3fr 1fr;
        align-items: center;
    }

    .logo {
        margin: auto;
    }

    .front-spacer {
        display: none
    }

    .back-spacer {
        display: block;
        width: 24px;
    }

    .hamburger-label {
        content: url(../img/icons/menu.svg);
        cursor: pointer;
    }

    .head-nav {
        visibility: hidden;
        position: fixed;
        left: -100%;
        top: 0;
        background-color: whitesmoke;
        margin: 0;
        padding: 0;
        height: 100%;
        border-right: 1px solid gray;
        z-index: 2;
        transition: visibility 0.1s allow-discrete, left 0.3s ease-in-out;
        box-shadow: 2px 0px 5px black;
    }

    .head-nav .hamburger-label {
        padding: 1rem;
    }

    .hamburger-switch:checked~.stickyhead .head-nav {
        visibility: visible;
        left: 0;
    }

    .hamburger-switch:checked~.stickyhead .front-spacer {
        display: block;
        width: 24px;
    }

    .head-nav li {
        margin: 0;
        padding: 1rem;
        padding-right: 3rem;
    }

    .head-nav li:hover {
        background-color: lightgray;
        border-radius: 8px;
    }

    .hamburger-switch:checked~.stickyhead .overlay {
        display: block;
    }

    .bottomtext {
        display: flex;
        flex-wrap: nowrap;
        gap: 5vw;
    }

    .bottomtext hr {
        display: none;
    }

    .content {
        width: 50vw;
        margin: auto;
    }

    .calendar {
        width: 100%;
        margin: auto;
    }

    .team-grid {
        grid-template-columns: 33.33% auto;
    }

}

@media screen and (width <= 769px) {
    .head-flex {
        padding: 1rem;
        display: grid;
        grid-template-columns: 1fr 3fr 1fr;
        align-items: center;
    }

    .logo {
        margin: auto;
    }

    .front-spacer {
        display: none
    }

    .back-spacer {
        display: block;
        width: 24px;
    }

    .hamburger-label {
        content: url(../img/icons/menu.svg);
        cursor: pointer;
    }

    .head-nav {
        visibility: hidden;
        position: fixed;
        left: -100%;
        top: 0;
        background-color: whitesmoke;
        margin: 0;
        padding: 0;
        height: 100%;
        border-right: 1px solid gray;
        z-index: 2;
        transition: visibility 0.1s allow-discrete, left 0.3s ease-in-out;
        box-shadow: 2px 0px 5px black;
    }

    .head-nav .hamburger-label {
        padding: 1rem;
    }

    .hamburger-switch:checked~.stickyhead .head-nav {
        visibility: visible;
        left: 0;
    }

    .hamburger-switch:checked~.stickyhead .front-spacer {
        display: block;
        width: 24px;
    }

    .head-nav li {
        margin: 0;
        padding: 1rem;
        padding-right: 3rem;
    }

    .head-nav li:hover {
        background-color: lightgray;
        border-radius: 8px;
    }

    .hamburger-switch:checked~.stickyhead .overlay {
        display: block;
    }

    .content {
        margin: 1rem;
    }

    .calendar {
        width: 100%;
    }

    .socials {
        flex-direction: row;
    }

    .team-grid {
        grid-template-rows: auto;
    }

}
