/* Colors */
body {
    --base: hsl(41, 60%, 96%);
    --ink-900: hsl(40, 20%, 20%);
    --ink-700: hsl(40, 20%, 33%);

    --link: hsl(38, 70%, 32%);
    --link-light: hsla(38, 41%, 97%);
    --mute: hsl(40, 15%, 40%);
    --border-color: hsl(40, 12%, 50%);

    --red: #f00;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 10000;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--ink-700);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    clip-path: inset(50%);
}

.skip-link:focus,
.skip-link:focus-visible {
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
}

.bg-base {
    background: var(--base);
}

body {
    margin: 0;
    font-size: 110%;
    line-height: 1.4;
    color: var(--ink-700);
    background: var(--base);

    --font-body: "Mulish", sans-serif;
    --font-headings: "Rethink Sans", sans-serif;
    font-family: var(--font-body);
}

h1,
h2,
h3,
nav,
.breadcrumbs,
.heading {
    font-family: var(--font-headings);
    font-weight: 500;
    color: var(--ink-900);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

img {
    max-width: 100%;
    height: auto;
}

video {
    width: 100%;
    max-width: 100%;
    height: auto;
}

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

/* Content links must not rely on colour alone to distinguish them from text. */
main a:not(.button),
footer a {
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
}

main a:not(.button):hover,
main a:not(.button):focus-visible,
footer a:hover,
footer a:focus-visible {
    text-decoration-thickness: 0.14em;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--link);
    outline: 2px solid var(--link);
    outline-offset: 0;
}

[tabindex="-1"]:focus {
    outline: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 48px 0 32px;
    padding: 0;
}

footer {
    margin-top: 96px;
    margin-bottom: 48px;
    color: var(--mute);
}

/* Typography: https://type-scale.com */
p {
    margin-bottom: 1rem;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1ch;
}

h1 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

h2,
h3,
h4,
h5 {
    margin: 0.75em 0 0.5em;
}

h1,
h2,
h3,
h4,
h5 {
    line-height: 1.1;
}

.smaller {
    font-size: 0.8em;
}

.larger {
    font-size: 1.2em;
}

.font-size-14 {
    font-size: 1.4em;
}

.text-align-center {
    text-align: center;
}

/* Button */
button,
.button,
input[type="submit"],
input[type="button"] {
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: var(--link);
    color: #fff;
    cursor: pointer;
    font-size: 0.9em;
    margin-right: 1em;
}

/* forms */
.form-field {
    margin-bottom: 16px;
}

.form-field label {
    font-weight: bold;
    display: block;
}

.form-field input[type="email"],
.form-field input[type="text"],
.form-field input[type="url"],
.form-field input[type="password"],
.form-field input[type="file"],
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
}

.form-field .options ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-field .options ul li label {
    font-weight: 400;
}

.form-field .options ul li label input {
    display: inline-block;
    width: auto;
}

label.label-body {
    font-weight: normal;
}

.form-field .helptext {
    font-weight: normal;
    color: var(--mute);
    font-size: smaller;
}

/* utility classes */
.sticky {
    position: sticky;
    top: 0;
}
.border {
    border: 1px solid var(--border-color);
}

.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.border-radius {
    border-radius: 4px;
}

.ink-900 {
    color: var(--ink-900);
}

.ink-700 {
    color: var(--ink-700);
}

.ink-link {
    color: var(--link);
}
.margin-0 {
    margin: 0;
}

.margin-top-8 {
    margin-top: 8px;
}
.margin-top-16 {
    margin-top: 16px;
}
.margin-top-24 {
    margin-top: 24px;
}

.margin-top-32 {
    margin-top: 32px;
}

.margin-top-48 {
    margin-top: 48px;
}

.margin-top-64 {
    margin-top: 64px;
}

.margin-right-0 {
    margin-right: 0;
}

.margin-bottom-0 {
    margin-bottom: 0;
}

.margin-bottom-8 {
    margin-bottom: 8px;
}

.margin-bottom-16 {
    margin-bottom: 16px;
}

.margin-bottom-24 {
    margin-bottom: 24px;
}

.margin-bottom-48 {
    margin-bottom: 48px;
}

.margin-bottom-64 {
    margin-bottom: 64px;
}

.margin-left-24 {
    margin-left: 24px;
}

.padding-top-8 {
    padding-top: 8px;
}

.padding-top-16 {
    padding-top: 16px;
}

.padding-bottom-8 {
    padding-bottom: 8px;
}

.padding-left-0 {
    padding-left: 0;
}

.padding-right-0 {
    padding-right: 0;
}

.mute {
    color: var(--mute);
}

.flex {
    display: flex;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-gap-8 {
    gap: 8px;
}

.flex-gap-48 {
    gap: 48px;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-space-between {
    justify-content: space-between;
}

.flex-space-around {
    justify-content: space-around;
}

.flex-baseline {
    align-items: baseline;
}

.flex-align-center {
    align-items: center;
}

.flex-grow {
    flex-grow: 1;
}

.children-margin-left-12 > * + * {
    margin-left: 12px;
}

.max-width-400 {
    box-sizing: border-box;
    max-width: 400px;
}

/* Trix Editor */
trix-editor.trix-editor-large {
    min-height: 15em;
}

figure {
    text-align: center;
}

figcaption {
    font-size: 0.8em;
    color: var(--mute);
}

/* Messages and errors */
ul.messages {
    font-weight: 500;
    list-style: none;
    padding: 0;
}

ul.messages li {
    padding: 8px 16px;
    border: 1px solid;
    border-radius: 4px;
}

ul.messages li.error {
    border-color: var(--red);
    color: var(--red);
}

ul.messages li.success {
    border-color: var(--link);
}

.form-field.has-error input,
.form-field.has-error textarea {
    border-color: var(--red);
}

.errorlist {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--red);
    font-weight: 500;
}

.errorlist li {
    margin: 0;
}

.errorlist.nonfield {
    padding: 8px 16px;
    border: 1px solid var(--red);
    border-radius: 4px;
    margin-bottom: 16px;
}

article {
    margin-bottom: 48px;
}

header nav {
    padding: 36px 0 0;
}

.logo {
    height: 60px;
    width: auto;
}

/* hide element */
.hidden {
    display: none;
}

table {
    font-size: 0.9em;
    margin: 2em 0;
    border: 1px solid var(--border-color);
}

thead {
    background-color: var(--link-light);
}

table,
th,
td {
    border-bottom: 1px solid var(--border-color);
    border-collapse: collapse;
    text-align: center;
}

th,
td {
    padding: 4px 8px;
}

/* card */
.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;

    --card-padding: 24px;
    padding: var(--card-padding);

    margin-top: 20px;
    background: #fff;
}

.fill-card-width {
    margin-left: calc(-1 * var(--card-padding));
    margin-right: calc(-1 * var(--card-padding));
    padding-left: var(--card-padding);
    padding-right: var(--card-padding);
}

.fill-card-width.padding-left-0 {
    padding-left: 0;
}
.fill-card-width.padding-right-0 {
    padding-right: 0;
}

/* breadcrumbs */
.breadcrumbs:empty,
.breadcrumbs:not(:has(ul)) {
    display: none;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 8px 0;
    padding: 0;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.088px;
    text-transform: none;
    color: var(--mute);
}

.breadcrumbs ul li {
    padding: 0;
    margin: 0;
}

.breadcrumbs ul li + li::before {
    content: "/";
    color: var(--mute);
    margin: 0 12px;
}

.change-list .toplinks {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.change-list .toplinks a,
.change-list .toplinks .date-back {
    color: var(--link);
    font-weight: 600;
    font-size: 0.9em;
}

.sidebar-panel .title {
    font-family: var(--font-headings);
    font-weight: 500;
}

ul.striped li:nth-child(even),
.striped tbody tr:nth-child(even),
ul.striped-first li:nth-child(odd),
.striped-first tbody tr:nth-child(odd),
tr.stripe {
    background-color: var(--base);
}

.change-list-filter {
    font-size: 0.9em;
}

.change-list-filter + .change-list-filter {
    margin-top: 16px;
}

.change-list-filter summary {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    font-family: var(--font-headings);
    font-weight: 500;
    list-style: none;
}

.change-list-filter summary::-webkit-details-marker {
    display: none;
}

.change-list-filter summary::after {
    color: var(--ink-700);
    content: "\E81B";
    font-family: "fontello";
}

.change-list-filter details[open] summary::after {
    color: var(--ink-700);
    content: "\E836";
    font-family: "fontello";
}

.change-list-filter details ul {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    margin: 0px;
    list-style: none;
}

.change-list-filter details ul li {
    margin: 0;
    padding: 0;
}

.change-list-filter li a {
    display: block;
    color: var(--ink-900);
    padding: 8px 16px;
    line-height: 1;
}

.change-list-filter li.selected a {
    color: var(--link);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--base);
}

.change-list-filter li.selected a::after {
    content: "\E823";
    font-family: "fontello";
    color: var(--link);
}

#changelist-search > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

#changelist-search > div label {
    margin: 0;
    margin-right: -27px;
    z-index: 1;
    padding-left: 12px;
    line-height: 1;
}

#changelist-search > div #searchbar {
    padding: 5px 12px;
    padding-left: 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;

    width: 110px;
    flex-grow: 1;
}

.card #changelist-search > div #searchbar {
    max-width: 450px;
}

@media (min-width: 768px) {
    .no-card #changelist-search > div #searchbar {
        width: 200px;
        padding-top: 11px;
        padding-bottom: 11px;
    }
}

#changelist-search > div input[type="submit"] {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
}

.change-list #toolbar-wrapper input[type="submit"],
.change-list #toolbar-wrapper button {
    margin-right: 4px;
    padding: 8px 12px;
}

@media (min-width: 768px) {
    .no-card.change-list #toolbar-wrapper input[type="submit"],
    .no-card.change-list #toolbar-wrapper button {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

.change-list #toolbar .quiet {
    margin: 4px;
}

/* pagination */
.paginator {
    font-size: 0.9em;
    color: var(--ink-700);
    padding: 2px 6px;
    margin-top: 12px;
}

.paginator a {
    padding: 2px 6px;
    background: var(--base);
    border-radius: 2px;
}

.paginator .this-page {
    padding: 2px 6px;
    color: var(--ink-900);
}

.paginator .end {
    margin-right: 8px;
}

.responsive-holder {
    overflow: auto;
}

.scrollable-table {
    max-height: 400px;
    overflow-y: auto;
}

.responsive-holder .results #result_list {
    width: 100%;
    margin: 0;
}

.sorted.descending .text::after,
.asc::after {
    content: " ⇣";
}

.sorted.ascending .text::after,
.desc::after {
    content: " ⇡";
}

.sortoptions {
    display: none;
}
