body {
    background-color: var(--brand-background-light, #bcdaf4);
    font-family:
        "Roboto Slab",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen-Sans,
        Ubuntu,
        Cantarell,
        "Helvetica Neue",
        sans-serif;
    line-height: 1.3;
    font-size: 12pt;
}

* {
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: var(--brand-accent-alternative, #215c91);
}

h2 {
    color: var(--brand-dark, #215c91);
}
h3 {
    color: var(--brand-dark, #215c91);
}
h3 > small {
    color: var(--brand-text, #000);
    font-size: 1em;
    font-weight: normal;
}

header h2 {
    color: var(--brand-accent-alternative, #215c91);
    font-size: 1.2em;
}

header h1 {
    text-transform: uppercase;
    color: var(--brand-accent-alternative, #215c91);
}

header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1em 0;
}

header h1,
header h2 {
    margin: 0;
}

header p {
    margin: 0.3ex;
    font-weight: bold;
    color: var(--brand-fallback, #111);
}

hr {
    border: none;
    border-bottom: 1px solid #aaa;
}

.banner {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    margin: 0;
}

.banner img {
    height: 2.8em;
    max-width: 40%;
    margin: 0;
    padding: 0;
}

.banner img:first-child {
    object-fit: contain;
    object-position: left;
}

.banner img:last-child {
    object-fit: contain;
    object-position: right;
}

.stack {
    display: grid;
    grid-template: auto auto auto / auto auto auto;
    justify-items: stretch;
    align-items: stretch;
    justify-content: center;
    align-content: center;
    margin: 5em auto 3em;
}

.behind {
    display: grid;
    grid-area: 1 / 1 / -1 / -1;
    grid-template: subgrid / subgrid;
}

.sidebar {
    grid-row: 3;
    grid-column: 1 / -1;
}

.sidebar-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 1em;
    align-items: center;
    padding: 1em;
}
.icon {
    width: 2em;
    height: 2em;
    display: block;
    flex-shrink: 0;
}

.icon-link {
    display: flex;
    align-items: center;
    font-size: small;
    gap: 0.5ex;
}

@media (min-width: 60em) {
    .sidebar {
        grid-row: 2;
        grid-column: 3;
        width: 4em;
    }

    .sidebar-inner {
        position: sticky;
        top: 7em;
        display: flex;
        flex-direction: column;
        gap: 1em;
        align-items: center;
    }

    .icon {
        width: 100%;
        height: 100%;
        display: block;
        flex-shrink: 0;
    }

    .icon-link {
        position: relative;
        overflow: visible;
        display: flex;
        align-items: center;
        font-size: small;
        gap: 2em;
        width: 3em;
        height: 2em;
    }

    .icon-link-label {
        position: absolute;
        left: 100%;
        white-space: nowrap;
    }
}

.icon-link:hover {
    text-decoration: underline;
}

.paper {
    grid-area: 2 / 2 / -2 / -2;
    background: #fff;
    padding: 1em;
    max-width: 40em;
    width: 100%;
    box-shadow: 0 0 2em -1em #00000022;
    border-radius: 2px;
    border: 1px solid #00000022;
}

.paper a {
    color: var(--brand-dark, #0055aa);
}

.form-button,
button,
textarea,
input,
select {
    font: inherit;
}

.form-button,
button {
    background-color: var(--brand-button, #215c91);
    color: #fff;
    border: none;
    padding: 1ex;
}
.form-button:hover,
button:hover {
    background-image: linear-gradient(#fff1);
}

.form-button:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand-focus, orange);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--brand-focus, orange);
}

button:active {
    background-image: linear-gradient(#0001);
}

.secondary-button {
    background: #212121;
    font-size: 1em;
    padding: 1ex 2em;
}

.secondary-button:hover {
    background: #313131;
}

.secondary-button:focus-visible {
    outline: 2px solid var(--brand-focus, orange);
}

.secondary-button:active {
    background: #111111;
}

.link-button {
    text-align: center;
    display: flex;
    align-items: center;
    padding: 1ex 2em;
    cursor: pointer;
    text-decoration: none;
}
.link-button {
    background: #eee;
}

.link-button:hover {
    background: #dfdfdf;
}

.link-button:focus-visible {
    outline: 2px solid var(--brand-focus, orange);
}

.link-button:active {
    background: #ccc;
}

[form-button-group] {
    padding: 1ex;
    display: flex;
    gap: 1ex;
    align-items: stretch;
    flex-wrap: wrap-reverse;
}

footer {
    border-top: 1px solid #aaa;
    margin-top: 1em;
    padding: 1em 1ex 0;
    font-size: 0.8em;
    display: flex;
    gap: 1em;
    justify-content: space-around;
    flex-wrap: wrap;
}

a {
    color: var(--brand-dark, #0055aa);
}

button,
input[type="submit"],
input[type="reset"] {
    cursor: pointer;
}

.logo {
    display: block;
    width: 8em;
    margin: auto;
}

.code-entry {
    display: flex;
    flex-direction: column;
    gap: 0.5ex;
    max-width: 20em;
    margin: 2em auto 3em;
    text-align: center;
}

.code-entry input {
    text-align: center;
    font-size: 2em;
}
.code-entry input::placeholder {
    color: #ddd;
}

[data-form-row] {
    display: flex;
    flex-direction: column;
    margin: 1ex 0;
    padding: 1ex;
}

[data-form-label].required {
    font-weight: bold;
}

label[data-form-label]::after {
    content: ":";
}

[data-form-choices] [data-form-label] {
    font-weight: normal;
}

[data-form-choices] {
    display: flex;
    flex-wrap: wrap;
    gap: 1ex;
    margin: 0.5ex 0;
}

[data-form-choice] {
    display: flex;
    gap: 0.5ex;
    cursor: pointer;
    padding: 1ex;
    accent-color: var(--brand-dark);
}

[data-form-choice]:has(:checked) {
    background: #0001;
    color: var(--brand-dark, #114c81);
}

[data-form-choice]:has(:focus-visible) {
    outline: 2px solid var(--brand-focus, #114c81);
    background-color: var(--brand-background-light, #eee);
}

[data-form-choice]:has(:focus-visible) > input:focus-visible {
    outline-color: transparent;
}

[data-form-row] input[type="text"] {
    padding: 1ex;
}

[data-form-row] input[type="email"] {
    padding: 1ex;
}

[data-form-row] select {
    padding: 1ex;
    width: 100%;
}

textarea {
    min-height: 5em;
    resize: none;
}

.big-button {
    font-size: 1.4em;
    padding: 1ex 2ex;
    flex-shrink: 1;
}

[data-form-errors] {
    color: #a00;
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

[data-form-errors] {
    color: #a00;
    gap: 0.5ex;
    padding: 0.5ex 0;
    background: #fee;
}

[data-form-requirement] {
    float: right;
    font-weight: normal;
    font-size: small;
    color: #888;
}

[data-form-row-invalid] {
    background: #fee;
    color: #a00;
}

.error-summary {
    background: #fee;
    color: #a00;
    padding: 1ex;
}

.error-summary > * {
    color: inherit;
    margin: 0;
}

[data-form-row-invalid] input[type="text"],
[data-form-row-invalid] input[type="email"],
[data-form-row-invalid] select,
[data-form-row-invalid] textarea {
    outline: 1px solid #a00;
}

.invitation-error {
    color: #a00;
    font-size: 1.4em;
    margin: 1em 0;
    text-align: center;
}

dl {
    display: grid;
    grid-template: auto / auto 1fr;
    gap: 0 2em;
}

dt,
dd {
    margin: 0;
}
summary::marker {
    content: "";
}

summary::after {
    content: "...";
}
summary {
    cursor: pointer;
}
.flash {
    margin: 1ex 0;
    padding: 1ex;
    background-color: #eee;
    text-align: center;
}

.flash-success {
    background-color: var(--brand-success-light, #dfd);
    color: var(--brand-success, #042);
}

.flash-error {
    background-color: var(--brand-error-light, #fdd);
    color: var(--brand-error, #600);
}
