.flex { display: flex !important; }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-center { justify-content: center; }
.flex-start { justify-content: flex-start; }
.flex-around { justify-content: space-around; }
.flex-between { justify-content: space-between; }
.flex-end { justify-content: flex-end; }
.flex-items-center { align-items: center; }
.flex-items-baseline { align-items: baseline; }
.flex-items-start { align-items: flex-start; }
.flex-items-end { align-items: flex-end; }
.flex-items-stretch { align-items: stretch; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.flex-grow { flex-grow: 1; }
.flex-none { flex: none !important; }
.flex > * { min-width: 0; }
@media (max-width: 768px) {
    .flex-column-mobile { flex-direction: column; }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-small { font-size: var(--size-small); }
.text-medium { font-size: var(--size-default); }
.text-medium > label {
    font-size: var(--size-default);
    text-transform: none;
}
.text-blue { color: var(--color-blue); }
.text-gray { color: var(--color-secondary); }

.show-on-small {
    display: none;
}

.text-ellipsis {
    overflow-x: hidden;
    text-overflow: ellipsis;
}

.text-break {
    word-break: break-all;
}

.first {
    margin-top: 0 !important;
}

.spaced > *:not(:last-child) {
    margin-right: var(--space-default);
}

.app {
    display: flex;
    flex: 1 1 auto;
    min-height: 100vh;
    /* mobile viewport bug fix */
    min-height: -webkit-fill-available;
}

@media (max-width: 768px) {
    .spaced > *:not(:last-child) {
        margin-right: var(--space-quarter);
    }
}

.contentWithGuide {
    display: flex;
    flex-grow: 1;
    flex-direction: row;
    overflow: hidden;
}

.container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.innerContainer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scrollableContainer {
    overflow: auto;
}

.scrollContainer {
    overflow-x: auto;
    overflow-y: scroll;
}

.subTitle {
    font-size: var(--size-subheader);
    font-weight: 400;
    line-height: 1;
    margin: 0 0 calc(var(--space-half) * 1.5) 0;
}

.title {
    font-size: var(--size-title);
    font-weight: 400;
    line-height: 1;
    margin: 0 0 var(--space-half) 0;
}
@media (min-width: 1200px) {
    .title {
        margin: 0 0 var(--space-default) 0;
    }
}

button, textarea {
    font-family: inherit;
}

.content {
    flex: 1;
    margin: 0 auto;
    max-width: var(--content-width);
    padding: 0 var(--space-default);
    width: 100%;
}

.content.narrow {
    max-width: var(--content-width-small);
}

.content.larger {
    max-width: var(--content-width-larger);
}

.content.padded {
    padding-top: var(--space-default);
}

@media (max-width: 768px) {
    .content {
        padding: 0 var(--space-half);
    }
}

.tabs {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
}

.tabs .tab {
    width: 50%;
    height: 52px;
    border: solid 1px var(--color-gray);
    transition: all .2s ease-out;
}

.tabs .tab.active {
    border: solid 1px var(--color-blue);
}

.tabs .tab button {
    width: 100%;
    height: 100%;
    padding: var(--space-quarter);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    font-size: var(--size-default);
    color: var(--color-secondary);
    transition: all .2s ease-out;
}

.tabs .tab.active button {
    color: var(--color-blue);
    background-color: var(--background-secondary);
}

@media (max-width: 768px) {
    .tabs .tab a {
        font-size: var(--size-small);
    }
}

.row:not(:first-child) {
    margin-top: var(--space-quarter);
}

.row:not(:first-child).extra {
    margin-top: var(--space-half);
}

.isVerticallyCentered {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.box {
    background-color: var(--background-secondary);
    padding: var(--space-half);
}

.box > *:first-child {
    margin-top: 0;
}

.box.large {
    padding: var(--space-default);
}

.box.larger {
    padding: var(--space-large);
}

.box.slim {
    padding: 0;
}

.box.slim.divide > *:not(:first-child) {
    border-top: solid 1px var(--background);
}

.box .buttons {
    margin-top: var(--space-default);
    width: 100%;
}

.box .buttons.ignore {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.box .buttons.ignore.reverse {
    flex-direction: row-reverse;
}

.box .buttons.ignore > *:not(:first-child) {
    margin-left: var(--space-half);
    margin-right: 0;
}

.box .buttons.ignore.reverse > *:not(:first-child) {
    margin-right: var(--space-half);
    margin-left: 0;
}

.box .buttons:not(.ignore) > *:not(:first-child) {
    margin-top: var(--space-quarter);
}

.box .buttons:not(.ignore) button,
.box .buttons:not(.ignore) button,
.box .buttons:not(.ignore) a {
    width: 100%;
}

/* UTILITIES */
.m-none { margin: 0 !important; }
.m-top-none { margin-top: 0 !important;}
.m-top-quarter { margin-top: var(--space-quarter) !important; }
.m-top-half { margin-top: var(--space-half) !important; }
.m-top-default { margin-top: var(--space-default) !important; }
.m-top-default-extra { margin-top: calc(var(--space-default) * 1.5) !important; }
.m-top-large { margin-top: var(--space-large) !important; }
.m-right-tiny { margin-right: calc(var(--space-quarter) / 2) !important; }
.m-right-quarter { margin-right: var(--space-quarter) !important; }
.m-right-half { margin-right: var(--space-half) !important; }
.m-right-default { margin-right: var(--space-default) !important; }
.m-bottom-none { margin-bottom: 0 !important; }
.m-bottom-quarter { margin-bottom: var(--space-quarter) !important; }
.m-bottom-half { margin-bottom: var(--space-half) !important; }
.m-bottom-default { margin-bottom: var(--space-default) !important; }
.m-bottom-large { margin-bottom: calc(var(--space-half) * 1.5) !important; }
.m-bottom-xlarge { margin-bottom: calc(var(--space-half) * 3) !important; }
.m-bottom-xxlarge { margin-bottom: calc(var(--space-half) * 6) !important; }
.m-left-quarter { margin-left: var(--space-quarter) !important; }
.m-left-half { margin-left: var(--space-half) !important; }
.m-left-default { margin-left: var(--space-default) !important; }

.width-1-1 {
    width: 100% !important;
}

.noPadding {
    padding: 0 !important;
}

.p-none { padding: 0 !important; }
.p-top-none { padding-top: 0 !important;}
.p-top-quarter { padding-top: var(--space-quarter) !important; }
.p-top-half { padding-top: var(--space-half) !important; }
.p-top-default { padding-top: var(--space-default) !important; }
.p-top-default-extra { padding-top: calc(var(--space-default) * 1.5) !important; }
.p-top-large { padding-top: var(--space-large) !important; }
.p-right-none { padding-right: 0 !important; }
.p-right-quarter { padding-right: var(--space-quarter) !important; }
.p-right-half { padding-right: var(--space-half) !important; }
.p-right-default { padding-right: var(--space-default) !important; }
.p-bottom-none { padding-bottom: 0 !important; }
.p-bottom-quarter { padding-bottom: var(--space-quarter) !important; }
.p-bottom-half { padding-bottom: var(--space-half) !important; }
.p-bottom-default { padding-bottom: var(--space-default) !important; }
.p-bottom-large { padding-bottom: calc(var(--space-half) * 1.5) !important; }
.p-left-none { padding-left: 0 !important; }
.p-left-quarter { padding-left: var(--space-quarter) !important; }
.p-left-half { padding-left: var(--space-half) !important; }
.p-left-default { padding-left: var(--space-default) !important; }

.wrapped {
    margin-top: calc(var(--spacing-half) * -1);
}

.wrapped > * {
    margin-top: var(--spacing-half);
}

.items {
    flex-shrink: 0;
    position: relative;
    margin: calc(var(--space-quarter) * -1);
}

.items.marginBottom {
    margin-bottom: var(--space-half);
}

.buttons-end {
    text-align: right;
}

.items > * {
    display: inline-block;
    margin: var(--space-quarter);
}

.stacked {
    position: relative;
}

.stacked img {
    transition: opacity 0.2s ease;
}

.stacked img:last-child {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.transparent {
    display: none;
}

@media (max-width: 768px) {
    .row:not(:first-child) {
        margin-top: var(--space-quarter);
    }

    .box.large {
        padding: var(--space-half);
    }

    .box.larger {
        padding: var(--space-default);
    }

    .m-top-quarter-on-small {
        margin-top: var(--space-quarter);
    }

    .full-width-on-small {
        width: 100%;
    }

    .hide-on-small {
        display: none;
    }

    .show-on-small {
        display: initial;
    }
}

.light-mode .show-in-darkmode,
.dark-mode .show-in-lightmode {
    display: none;
}