html {
    font-family: sans-serif;

    /*
     * Style variables
     */
    --hue: 205;
    --blockBg: hsl(var(--hue), 25%, 100%);
    --blockBgAlt: hsl(var(--hue), 35%, 93%);
    --blockBgDark: hsla(0, 0%, 0%, 25%);

    --borderRadius: 4px;
    --blockBorderRadius: var(--borderRadius);

    --textColor: hsl(var(--hue), 35%, 15%);
    --textColorHighlight: hsl(var(--hue), 80%, 25%);
    --textColorDim: hsl(var(--hue), 15%, 40%);

    --pageEdgeSpacing: 20px;
    --paddingH: 50px;
    --paddingV: 40px;

    --inputBg: hsl(var(--hue), 75%, 98%);
    --inputHoverBg: hsl(var(--hue), 75%, 95%);
    --inputBorder: hsl(var(--hue), 15%, 95%);
    --inputShadow: hsl(var(--hue), 25%, 75%);

    color: var(--textColor);

    background: hsl(var(--hue), 90%, 15%) radial-gradient(100vw 100vw at top right, hsl(var(--hue), 90%, 30%), hsl(var(--hue), 85%, 15%));
    scrollbar-width: thin;
}

/* Global page structure */
body, html {
    min-height: 100%;
    margin: 0;
    font-size: 1em;
}

.page-width {
    max-width: 1200px;
    margin: auto;
}

.page-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pageEdgeSpacing);
}

/* Global page styling */
.highlighted {
    color: var(--textColorHighlight);
    font-family: monospace;
    background: var(--blockBgAlt);
    padding: 3px 5px;
    border-radius: var(--borderRadius);
}

p {
    line-height: 1.3em;
}

* {
    box-sizing: border-box;
}

*:focus {
    outline: 3px solid hsl(var(--hue), 95%, 45%);
}

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

a .icon path {
    fill: var(--textColorHighlight);
}

a.iconic {
    display: inline-flex;
    align-items: center;
}

a.iconic.right .icon {
    padding-left: 5px;
}

a.iconic.left .icon {
    padding-right: 5px;
}

a:not(.button):hover {
    text-decoration: underline;
}

[disabled] {
    filter: saturate(0%);
    cursor: not-allowed;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]:after,
[data-tooltip]:before {
    display: none;
}

[data-tooltip]:hover:after,
[data-tooltip]:hover:before,
[data-tooltip]:active:after,
[data-tooltip]:active:before,
[data-tooltip]:focus:after,
[data-tooltip]:focus:before {
    display: block;
}

[data-tooltip]:after {
    content: attr(data-tooltip);
    position: absolute;
    color: white;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: var(--borderRadius);
    padding: 5px 10px;
}

[data-tooltip]:before {
    content: '';
    position: absolute;
    top: calc(100% - 8px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.75);
}

.breadcrumb {
    color: var(--textColorDim);
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb svg {
    width: 1em;
    height: 1em;
}

.breadcrumb li path {
    fill: var(--textColorDim);
}

.breadcrumb a {
    color: inherit;
}

.icon {
    width: 1em;
    height: 1em;
    box-sizing: content-box;
}

.banner {
    --bgColorDark: hsl(160deg, 33%, 89%);
    --bgColorLight: hsl(160deg, 35%, 94%);
    --textColor: hsl(160deg, 45%, 15%);
    --headingColor: hsl(160deg, 55%, 30%);
    --imgSize: 450%;

    background: var(--bgColorDark) radial-gradient(farthest-corner at bottom left, var(--bgColorLight), var(--bgColorDark));
    padding: 20px var(--paddingH);
    max-width: 850px;
    position: relative;
    color: var(--textColor);
}

@keyframes vanish {
    from {
        max-height: 150px;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

.vanish {
    overflow: hidden;
    animation: vanish .5s 10s forwards;
}

.banner.titled {
    padding: var(--paddingV) var(--paddingH);
    --imgSize: 250%;
}

.banner:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    background: url("../../img/swoop.svg") bottom left/auto var(--imgSize) no-repeat;
    opacity: .15;
}

.banner > * {
    position: relative;
    z-index: 1;
}

.banner h2 {
    font-weight: normal;
    color: var(--headingColor);
    display: flex;
    align-items: center;
    margin: 0 0 10px 0;
}

.banner h2,
.banner p {
    display: flex;
    align-items: center;
}

.banner svg {
    margin-right: .4em;
}

.banner path {
    fill: var(--headingColor);
}

.banner p {
    margin: 0;
}

.stats {
    display: block;
    padding: 0;
    list-style: none;
    margin: 0;
}

.stats.space {
    margin-top: 10px;
}

.stats dt {
    color: var(--textColorDim);
    font-size: .8em;
}

.stats dt:after {
    content: ':';
}

.stats dd {
    text-align: left;
    margin-left: 0;
    word-wrap: break-word;
}

.stats dd + dt {
    margin-top: 7px;
}

.stats .username {
    display: inline-block;
    font-size: .8em;
}

/* Blocks */
.blocks > * {
    margin-top: 20px;
}

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

.container,
.block-container {
    border-radius: var(--blockBorderRadius);

    box-shadow: 0 0 3px hsla(var(--hue), 40%, 15%, 50%);
    overflow: hidden;
}

.d-h {
    display: none;
}

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

.f-s {
    justify-content: space-between;
}

.p-m {
    padding: 10px;
}

.b-t {
    border-top: 1px solid var(--inputBorder);
}

.b-a {
    border: 1px solid var(--inputBorder);
}

.block {
    background: var(--blockBg);
}

.block.alt {
    background: var(--blockBgAlt);
}

.block-body {
    background: var(--blockBg);
    flex-grow: 1;
    flex-shrink: 0;
    max-width: 450px;
    width: 100vw;
}

.block-body.double {
    max-width: 850px;
}

.block-body.accent {
    position: relative;
    padding-top: 40px;
    padding-bottom: 40px;
}

.block-body.any-width {
    width: initial;
    max-width: initial;
}

.block-body.accent:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    background: url("../../img/domainBackingCircle.svg") bottom left/100% auto no-repeat;
    opacity: .25;
}

.block-body h2,
.block-body h1 {
    font-size: 1.6em;
    font-weight: 200;
    color: var(--textColorHighlight);
    margin-top: 0;
    margin-bottom: 0;
    word-wrap: break-word;
}

.block-content {
    padding: var(--paddingV) var(--paddingH) 20px;
    position: relative;
}

.block-content.reduce-padding {
    padding: 20px var(--paddingH) 20px;
}

.block-content.small-padding {
    padding: 20px;
}

.block-content.full-padding {
    padding: var(--paddingV) var(--paddingH);
}

.block-content:not(.block-columns) > *,
.block-column > * {
    margin-top: 20px;
}

.block-content > *:first-child,
.block-column > *:first-child {
    margin-top: 0;
}

.block-columns {
    display: flex;
    flex-wrap: wrap-reverse;
    gap: 20px;
}

.block-columns.sidebar-after {
    flex-wrap: wrap;
}

.block-columns.align {
    align-items: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blockBgDark);
    z-index: 999;
    backdrop-filter: blur(5px);
}

.main {
    flex-basis: 0;
    flex-grow: 999;
    min-width: 50%;
}

.sidebar {
    flex-basis: 350px;
    flex-grow: 1;
}

.block-content > .block-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: .8em;
}

.panel {
    background: var(--blockBgAlt);

    border: 1px solid hsl(var(--hue), 15%, 85%);
    padding: 20px;
    border-radius: var(--borderRadius);
}

.panel.spaced > *:not(:first-child) {
    margin-top: 7px;
}

.panel h3 {
    /*font-size: 1.6em;*/
    font-weight: 200;
    color: var(--textColorHighlight);
    margin-top: 0;
    margin-bottom: 14px;
}


.block-footer {
    background: var(--blockBgAlt);

    border-top: 1px solid hsl(var(--hue), 15%, 85%);
    padding: 20px var(--paddingH);
    text-align: center;
}

.block-footer a {
    color: inherit;
}

header {
    padding: 40px var(--paddingH);
    text-align: center;
}

header:not(.card) {
    background: var(--blockBgDark) url('../../img/domainBackingCircle.svg') bottom center/cover no-repeat;
    text-shadow: 0 0 15px hsla(0, 0%, 0%, 50%);
}

header.card {
    --bgColorDark: hsl(160deg, 33%, 89%);
    --bgColorLight: hsl(160deg, 35%, 94%);
    /*--textColor: hsl(160deg, 45%, 15%);*/
    --headingColor: hsl(160deg, 55%, 30%);
    /*--imgSize: 450%;*/
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--bgColorDark) linear-gradient(to bottom, var(--bgColorLight), var(--bgColorDark));
}

header.card .icon {
    width: 50px;
    height: 50px;
    background: var(--blockBgAlt);
    border-radius: 50%;
    padding: 10px;
    /*box-sizing: border-box;*/
}

header.card .icon svg {
    width: 50px;
    height: 50px;
}

header.card .icon path {
    fill: var(--headingColor)
}

header h1 {
    font-weight: 200;
    color: #fff;
    margin: 0;
}

.separator {
    display: flex;
    align-items: center;
    font-size: .8em;
    color: var(--textColorDim)
}

.separator:before,
.separator:after {
    content: "";
    border-bottom: 1px solid var(--inputBorder);
    flex-grow: 1;
    margin: 0 7px;
}

/* Lander specific styles */
.lander {
    display: flex;
    flex-grow: 1;
    align-items: stretch;
}

.lander aside {
    background: var(--blockBgDark) url('../../img/domainBackingCircle.svg') bottom center/cover no-repeat;

    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: hsl(var(--hue), 25%, 90%);
    position: relative;
    text-align: center;
    padding: 40px var(--paddingH);

    word-wrap: break-word;
    overflow: auto;

    text-shadow: 0 0 15px hsla(0, 0%, 0%, 50%);
}

.lander aside:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to left, hsla(0, 0%, 0%, 15%), hsla(0, 0%, 0%, 0%));
}

.lander aside h1 {
    margin-bottom: 10px;
    max-width: 100%;
    margin-top: 10px;
    width: 100%;
    transition: 300ms;
    font-family: sans-serif !important;
    font-weight: normal !important;
}

.lander aside h1 svg {
    width: 100%;
    max-height: 150px;
}

.lander aside h1 text {
    fill: #fff;
    font-family: sans-serif !important;
    font-weight: normal !important;
}

.lander aside h3 {
    font-size: 2em;
    margin: 0 0 10px;
    max-width: 100%;
    font-weight: normal;
    font-family: monospace;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.lander aside h3:after {
    content: '';
    background: url('../../img/warn.svg') center/contain no-repeat;
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-left: 5px;
}

.lander aside h2 {
    font-size: 1.5em;
    font-weight: normal;
    margin: 0;
}

.user {
    border-radius: var(--borderRadius);
    display: flex;
    padding: 15px;
    box-shadow: inset 0 0 3px hsl(var(--hue), 25%, 75%);
    background: #fff;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: hsl(var(--hue), 90%, 30%);

    display: none;
    /* TODO re-enable at some point
}

.user .details {
    padding-left: 15px;*/
}

.user h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    font-weight: normal;
    margin: 0;
    font-size: 1em;
}

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

.verification-icon {
    width: 1em;
    margin-left: 4px;
}

.verification-icon path {
    fill: var(--textColorHighlight);
}

.displayname {
    margin-right: 4px;
}

.username {
    margin-top: 2px;
}

.lander .verification,
.lander .username {
    color: var(--textColorDim);
    font-size: .8em;
}

.details {
    flex-grow: 1;
}

/* Block messages */

.block-message {
    display: flex;
    border-radius: var(--borderRadius);
    padding: 10px;
    font-size: .8em;
    align-items: center;

    background: linear-gradient(to bottom, hsl(var(--hue), 85%, 97%), hsl(var(--hue), 85%, 95%));
    border: 1px solid hsl(var(--hue), 65%, 90%);
    color: hsl(var(--hue), 25%, 20%);
    box-shadow: 0 0 3px hsl(var(--hue), 85%, 93%);
    position: relative;
}

.block-message.iconic:before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.block-message p,
.block-message ul {
    margin: 0;
}

.block-message ul {
    /*padding-left: 10px;*/
    padding-left: 0;
    list-style: none;
}

.block-message li:not(:last-child) {
    margin-bottom: 5px;
}

.block-message:before {
    background: url('../../img/info.svg') center/contain no-repeat;
}

.block-message.warn {
    --hue: 35;
}

.block-message.warn:before {
    background: url('../../img/warn.svg') center/contain no-repeat;
}

.block-message.error {
    --hue: 0;
}

.block-message.error:before {
    background: url('../../img/error.svg') center/contain no-repeat;
}

.block-message.success {
    --hue: 120;
}

/* Form styling */

form .block-message {
    margin-top: 5px;
}

form label {
    display: block;
    margin-top: 10px;
    font-size: .8em;
    color: var(--textColorDim);
    margin-bottom: 5px;
}

.desc {
    display: block;
    font-size: .8em;
    color: var(--textColorDim);
    margin: 15px 0 0 0;
}

form .checkbox {
    display: flex;
    align-items: center;
}

form .checkbox input {
    width: auto;
}

form .checkbox label {
    flex-grow: 1;
}

form .checkbox label {
    color: var(--textColor)
}

form label.required:after {
    content: 'Required *';
    color: hsl(0, 59%, 52%);
    float: right;
}

form label.readonly:after {
    content: 'Cannot change';
    color: hsl(0, 59%, 52%);
    float: right;
}

form input,
form select,
form textarea {
    font-size: inherit;
    color: inherit;
    font-family: inherit;

    width: 100%;
    display: block;
    padding: 10px;

    border-radius: var(--borderRadius);
    border: 1px solid var(--inputBorder);
    box-shadow: inset 0 0 3px var(--inputShadow);
    background-color: var(--inputBg);
    transition: border-color 300ms, background-color 300ms;
}

form input:hover,
form select:hover,
form textarea:hover {
    background-color: var(--inputHoverBg);
}

form textarea {
    resize: vertical;
    max-height: 250px;
    min-height: 100px;
}

form:not(.button-only) > button,
form .buttonRow,
form p {
    margin-top: 15px;
}

form p {
    margin-bottom: 0;
}

form .multi-input {
    display: flex;
}

form .input-message {
    background: var(--blockBgAlt);
    white-space: nowrap;
    border-radius: var(--borderRadius);
    padding: 10px;
}

form .multi-input > *:not(:last-child) {
    margin-right: 5px;
}

form .input-offer > *:last-child {
    flex-grow: 1;
}

form .input-offer > *:first-child {
    width: auto;
    flex-shrink: 1;
}

/* Button styling */
button,
.button {
    --satVariation: 0%;

    font-size: inherit;
    font-family: inherit;

    padding: 10px;

    border-radius: var(--borderRadius);
    border: 1px solid hsla(0, 0%, 0%, 4%);
    box-shadow: inset 0 0 3px hsla(0, 0%, 100%, 25%);
    cursor: pointer;
    transition: opacity 300ms, filter 300ms;
    display: inline-block;

    color: hsl(var(--hue), 50%, 95%);
    background: linear-gradient(to bottom, hsl(var(--hue), calc(90% + var(--satVariation)), 35%), hsl(var(--hue), calc(85% + var(--satVariation)), 25%));
}

button.remove,
.button.remove {
    --hue: 0;
    --satVariation: -30%;
}

.button.full-width {
    width: 100%;
}

button.min,
.button.min {
    background: var(--blockBgAlt);
    box-shadow: none;
    border-color: var(--blockBgAlt);
    color: var(--textColorHighlight);
}

button:hover,
.button:hover {
    opacity: 0.9;
}

button:focus:not(:focus-visible),
.button:focus:not(:focus-visible) {
    outline: none;
}

.button.will-load:after {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: repeating-radial-gradient(100% 100% at 50% 0%, rgba(255, 255, 255, 0.3), transparent, rgba(255, 255, 255, 0.3));
    /*background-repeat: repeat-x;*/
    background-size: 200% 100%;
    background-position: 0 0;
    animation: linear loading 5s infinite;
    content: "";
    transition: 300ms;
    opacity: 0;
}

.button.will-load {
    position: relative;
    overflow: hidden;
}

.button.loading:after {
    opacity: 1;
}

.button.space {
    margin-top: 10px;
}

@keyframes loading {
    from {
        background-position: 0
    }
    to {
        background-position-x: 200%
    }
}

form .form-body {
    position: relative;
}

@keyframes rotate {
    to {
        transform: rotate(360deg)
    }
}

form.loading {
    cursor: progress;
}

form.loading * {
    cursor: progress;
}

form .loader {
    display: none;
    width: 50px;
    height: 50px;
    padding: 5px;
    border-radius: 50%;
    background: var(--blockBgAlt);
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    z-index: 1;
}

form.loading .loader {
    display: block;
    animation: linear infinite rotate 1s;
}

form.loading .loader svg {
    width: 100%;
    height: 100%;
}

form .loader path {
    fill: var(--textColorHighlight)
}

form .loading-zone {
    transition: 300ms;
}

form.loading .loading-zone {
    opacity: .5;
    transform: scale(.9);
}

.buttonRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Quotes */
.block-content > blockquote {
    margin-left: 0;
}
.block-content > blockquote > footer {
    padding-top: 0;
}
.block-content > blockquote > p::before {
    content: "\201C";
}
.block-content > blockquote > p::after {
    content: "\201D";
}

/* Footer styling */
footer {
    --ctaBackground: var(--blockBgDark) url("../../img/swoop.svg") bottom left/auto 100% no-repeat;

    padding: var(--pageEdgeSpacing);
    color: hsl(var(--hue), 25%, 90%);
}

footer .cta {
    background: var(--ctaBackground);
    padding: var(--paddingV) var(--paddingH);

    display: flex;
    align-items: center;
}

footer .cta p {
    margin: 0 40px;
}

footer .button {
    white-space: nowrap;
}

footer img {
    display: block;
}

footer .copyright {
    font-size: .7em;
    text-align: center;
    margin-bottom: 0;
}

footer .copyright a {
    color: inherit;
}

.payment-select ol {
    padding: 0;
    list-style: none;
    margin: 0;
}

.payment-select h4 {
    color: var(--textColorHighlight);
    margin: 0;
    font-weight: normal;
    display: flex;
    align-items: center;
}

.payment-select h4:before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    outline: 2px solid var(--textColorHighlight);
    border: 3px solid var(--blockBgAlt);
    margin-right: 10px;
}

.payment-select .selected h4:before {
    background: var(--textColorHighlight);
}

.payment-select li {
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(to bottom, hsl(var(--hue), 90%, 35%), hsl(var(--hue), 85%, 25%));
    border-radius: var(--borderRadius);
    /*transition: 300ms;*/
    /*box-shadow: 0 0 5px var(--textColorHighlight);*/
}

.payment-select .block {
    padding: 10px;
}

.payment-select .container {
    border: 1px solid var(--inputBorder)
}

.payment-select .action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.payment-select li.selected {
    padding: 3px;
}

.payment-select li .details {
    display: none;
    border-top: 1px solid var(--inputBorder)
}

.payment-select li.selected .details {
    display: block;
}

.payment-select button {
    margin-top: 0;
}

.payment-select label {
    margin-top: 0;
}

.drawer {
    overflow: hidden;
}

/*.payment-select li.selected {*/
/*    background: linear-gradient(to right, hsl(var(--hue), 50%, 50%), var(--blockBg));*/
/*}*/

.payment-select p {
    font-size: 1.2em;
    margin: 0;
    text-align: right;
}

.payment-select p span {
    white-space: nowrap;
    display: inline-block;
}

.payment-select .smaller {
    color: var(--textColorDim);
    font-size: 1rem;
}

/* Handle domain sizing on different screen sizes */
@media (max-width: 1240px) {
    .lander aside h1 {
        font-size: 1vw;
    }
}

/* Handle lander area on smaller screen sizes */
@media (max-width: 1000px) {
    .screen-l {
        display: none;
    }

    html {
        --paddingH: 20px;
        --paddingV: 20px;
    }

    .block-container {
        box-shadow: none;
    }

    .page-wrapper {
        min-height: auto;
    }

    .lander {
        flex-direction: column;
    }

    .lander aside h1 {
        font-size: 2vw;
    }

    .lander aside h2 {
        font-size: 3vw;
    }

    .lander aside:after {
        display: none;
    }

    .block-body {
        max-width: 100%;
        display: flex;
        flex-direction: column-reverse;
    }

    .block-footer {
        border-top: none;
        border-bottom: 1px solid hsl(var(--hue), 15%, 85%);
    }
}

/* Handle footer on smaller screens */
@media (max-width: 800px) {
    .screen-m {
        display: none;
    }

    .blocks > * {
        margin-top: 0;
    }

    html {
        --pageEdgeSpacing: 0px;
        --blockBorderRadius: 0px;
    }

    .page-content {
        min-height: auto;
    }

    footer {
        background: var(--ctaBackground);
        padding: 40px var(--paddingH) var(--paddingV);
    }

    footer .cta {
        flex-direction: column;
        background: none;
        padding-top: 0;
    }

    footer .cta p {
        margin: var(--paddingV) 0;
        text-align: center;
    }

    footer .copyright {
        margin: 0;
    }
}