header {
    display: flex;
    align-items: baseline;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
}

header h1, h2, h3, h4, h5, h6 {
    flex: 1;
}

header nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

article h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0;
}

article header:not(:first-child) {
    margin-top: 18px !important;
}

a[role=button] {
    margin-bottom: 20px;
    width: 100%;
}

.inline input, .inline a[role=button], header input, header a[role=button] {
    width: auto;
    margin: 0.25rem;
    padding: 0.125rem;
    vertical-align: middle;
    font-weight: bold;
    display: inline-block !important;
    text-decoration: none;
    height: 80%;
}

.icon-button {
    height: 1.5rem !important;
    width: 1.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
}

body header nav {
    border-bottom: 0.25rem solid var(--pico-primary);
}

td.highlighted-cell {
    background-color: rgb(from var(--pico-primary) r g b / 0.1);
}

td.highlighted-cell-user {
    background-color: rgb(from var(--pico-primary) r g b / 0.2);
    font-weight: bold;
}

dl {
    display: flex;
    gap: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: 0.25rem solid var(--pico-primary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

article dl {
    justify-content: space-between;
}

dl dt {
    font-weight: bold;
}
dl dd {
    margin: 0;
}

a {
    text-decoration: underline dotted;
}

.helptext {
    font-size: 80%;
    margin-bottom: 0.25rem;
    /* TODO: update template to just use <small> */
}

.disabled-warning {
    border: 1px solid var(--pico-primary);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
    font-weight: bold;
}

/* Small screens */
@media screen and (max-width: 400px) {
  dl {
     flex-direction: column;
  }
    header h1, h2, h3, h4, h5, h6 {
        flex: 0 0 100%;
    }

    header small {
        display: none;
    }
    header nav {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
    }
    header nav li {
        padding: 0.25rem;
    }
}

details {
    margin: 1rem;
}
