:root {
    --white: #ffffff;
    --off-white: #f2f2f2;
    --border-grey: #ced4da;
    --grey: #717171;
    --dark-grey: #616161;
    --black: #222222;
    --brand-orange: #c92d0c;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100%;

    font-family: Arial, 'Basis Grotesque Light', sans-serif;
    font-weight: 400;
    color: var(--dark-grey);
    background-color: var(--off-white);
    background-image: url(BG-graphic-circles-grey.jpg);
    background-size: cover;
    margin: 0;
    padding: 0;
}

.skip-link {
    position: absolute;
    top: -3em;
}

.skip-link:focus {
    top: 0;
    background-color: var(--white);
}

main, header.global > div {
    max-width: 1280px;
    width: 90%;
    box-sizing: border-box;
    background-color: var(--white);
}
main {
    padding: 0 5%;
    flex-grow: 1;
}
header.global > div {
    margin: 0 auto;
}

@media only screen and (min-width: 601px) {
    main, header.global > div {
        width: 85%;
    }
}

@media only screen and (min-width: 993px) {
    main, header.global > div {
        width: 70%;
    }
}

.global {
    width: 100%;
}

h2 {
    font-family: 'Basis Grotesque Regular', sans-serif;
    font-size: 1.8em;
    font-weight: 400;
    color: var(--black);
    margin-block: 1em;
}

a {
    color: var(--brand-orange);
    text-decoration: underline;
    cursor: pointer;
}

nav ul {
    margin: 0;
    padding: 0;
}

nav li {
    display: inline-block;
    list-style: none;
    text-align: left;
}

nav a {
    display: inline-block;
    padding: 0.4em 0.6em;
}

.global nav a {
    text-decoration: none;
    color: inherit;
}

.global nav a:active,
.global nav a:focus,
.global nav a:hover {
    text-decoration: underline;
}

header.global nav {
    color: var(--white);
    font-size: 0.9em;
}

header.global nav a {
    padding: 0.6em 1.2em;
    display: block;
}

footer.global {
    background-color: var(--black);
    color: var(--white);
    font-size: 0.7em;
    text-align: center;
}

footer.global > * {
    margin: 0.3em;
}

footer.global nav li:not(:last-of-type)::after {
    content: '|';
}

footer.global nav a {
    margin: 0 0.5em;
    padding: 0;
}

#global-nav-toggle,
label[for="global-nav-toggle"] {
    display: none;
}

@media not all and (min-width: 992px) {
    header.global {
        background-color: var(--white);
        border-bottom: var(--grey) 1px solid;
        margin-bottom: auto;
        display: grid;
        grid-template-areas:
                "nav nav"
                "brand toggle";
    }

    header.global nav {
        grid-area: nav;
    }

    .branding {
        grid-area: brand;
        justify-self: start;
    }

    label[for="global-nav-toggle"] {
        display: initial;
        cursor: pointer;
        grid-area: toggle;
        align-self: center;
        justify-self: end;
        font-size: 2em;
        margin: 0.5em;
        padding: 0 0.5em;
    }

    #global-nav-toggle:not(:checked) ~ #global-nav {
        display: none;
    }

    header.global nav ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* simulate an internal border with the gutter */
        grid-gap: 1px;
        background-color: var(--grey);
    }

    @media (min-width: 600px) {
        header.global nav ul {
            grid-template-columns: 1fr 1fr 1fr;
        }
    }

    header.global nav li {
        background-color: var(--black);
    }

    header.global nav li:first-child a {
        background-image: url(CSU-logo-crest-header-white.svg);
        background-position: left 1.2em center;
        background-repeat: no-repeat;
        background-size: contain;
        padding-left: calc(1.2em + 24px + 0.6em);
    }
}

@media (min-width: 992px) {
    header.global {
        text-align: center;
    }

    header.global nav {
        background-color: var(--black);
        display: flex;
        justify-content: end;
    }

    footer.global {
        display: flex;
        justify-content: space-between;
        box-sizing: border-box;
        padding: 1.1em;
    }

    footer.global p {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        min-width: 0;
    }

    footer.global nav {
        flex-shrink: 0;
    }
}

.branding {
    margin: 1em;
}

a.branding {
    display: inline-block;
}

.branding img {
    max-height: 4em;
    max-width: 100%;
    vertical-align: bottom;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border-width: 0;
    margin-block: 1em;
}
th, td {
    padding: 0.5em;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    white-space: nowrap;
}
td:first-of-type {
    white-space: normal;
}
td:first-of-type a {
    line-break: anywhere;
}
thead tr {
    background-color: #757575;
    color: var(--white);
}
thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}
tbody tr:nth-of-type(odd) {
    background-color: #f2eee9;
}

.alert {
    color: var(--black);
    border-radius: 2.5rem;
    padding: 0.75rem 1.25rem 0.75rem 46px;
    background: url(icon-alert-circle.svg) no-repeat 12px center;
    background-size: 24px 24px;
}
.alert-error {
    background-color: #f2dede;
}
.alert-success {
    background-color: #7cc2a0;
}

.disruption-description {
    font-size: 1.1em;
    white-space: pre-line;
}

.disruption-details {
    display: grid;
    grid: auto-flow / 50% 50%;
}

.disruption-column>span {
    display: block;
    margin-block: 0.5em;
}
.disruption-column>div {
    margin-block: 1em;
}
.disruption-column p {
    margin-block-start: 0.5em;
}

.disruption-details label {
    display: block;
    font-weight: 600;
}
.disruption-details span>label {
    display: inline-block;
}
.disruption-details span>label::after {
    content: ":";
}
