/* Sign-in page: a living picture (colour clouds, haze, light rays, drops, waves), the site's own
   tank drawing and level gauge sitting inside it, three floating hints and a glass card with a
   turning light rim. Loaded after ui-system.css, so it replaces the plain gate look. */

@property --lg-ang {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.auth-gate {
    --lg-ease: cubic-bezier(.22, 1, .36, 1);
    --lg-ink: #17233b;
    --lg-ink2: #5a6580;
    --lg-indigo: #5b63e0;
    --lg-violet: #7a5ae0;
    --lg-a: #e9efff;
    --lg-b: #f2fbf6;
    --lg-glass: rgba(255, 255, 255, .72);
    --lg-solid: rgba(255, 255, 255, .94);
    --lg-line: rgba(255, 255, 255, .85);
    --lg-field: rgba(255, 255, 255, .86);
    --lg-field-line: rgba(91, 99, 224, .2);
    --lg-shadow: rgba(40, 52, 120, .22);
    --lg-blob: .55;
    --mx: 0;
    --my: 0;
    isolation: isolate;
    background: linear-gradient(135deg, var(--lg-a), var(--lg-b));
    color: var(--lg-ink);
}

html[data-theme="dark"] .auth-gate {
    --lg-ink: #eef2fa;
    --lg-ink2: #aab4cc;
    --lg-a: #0a1020;
    --lg-b: #0b1c22;
    --lg-glass: rgba(20, 28, 48, .66);
    --lg-solid: rgba(22, 30, 50, .96);
    --lg-line: rgba(255, 255, 255, .14);
    --lg-field: rgba(255, 255, 255, .07);
    --lg-field-line: rgba(160, 170, 255, .28);
    --lg-shadow: rgba(0, 0, 0, .6);
    --lg-blob: .38;
    background: linear-gradient(135deg, var(--lg-a), var(--lg-b));
    color: var(--lg-ink);
}

/* ---------- the picture behind everything ---------- */
.lg-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.lg-blob {
    position: absolute;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    opacity: var(--lg-blob);
    translate: calc(var(--mx) * -26px) calc(var(--my) * -18px);
    animation: lg-drift 24s ease-in-out infinite alternate;
}

.lb1 {
    top: -16%;
    left: -10%;
    background: radial-gradient(circle, #6f7bff, transparent 66%);
}

.lb2 {
    top: 10%;
    right: -14%;
    background: radial-gradient(circle, #33c2b0, transparent 66%);
    animation-duration: 30s;
    animation-delay: -8s;
}

.lb3 {
    bottom: -22%;
    left: 18%;
    background: radial-gradient(circle, #ffb35c, transparent 66%);
    animation-duration: 27s;
    animation-delay: -4s;
}

.lb4 {
    bottom: -18%;
    right: 6%;
    background: radial-gradient(circle, #ff7aa8, transparent 66%);
    animation-duration: 33s;
    animation-delay: -12s;
}

.lb5 {
    top: 30%;
    left: 34%;
    width: 30vmax;
    height: 30vmax;
    background: radial-gradient(circle, #6cb4ff, transparent 66%);
    animation-duration: 21s;
}

.lg-rays {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 70%;
    height: 140%;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 42%, transparent 52%);
    mix-blend-mode: soft-light;
    opacity: .55;
    transform-origin: 0 0;
    animation: lg-rays 16s ease-in-out infinite alternate;
}

.lr-b {
    left: -22%;
    background: linear-gradient(115deg, transparent 36%, rgba(255, 236, 200, .55) 46%, transparent 55%);
    opacity: .45;
    animation-duration: 22s;
    animation-delay: -6s;
}

html[data-theme="dark"] .lg-rays {
    opacity: .28;
}

.lg-fog {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 68%);
    opacity: .5;
    translate: calc(var(--mx) * 30px) calc(var(--my) * 10px);
    animation: lg-fog 40s ease-in-out infinite alternate;
}

.lf-1 {
    left: -6%;
    top: 44%;
    width: 46%;
    height: 220px;
}

.lf-2 {
    left: 26%;
    top: 62%;
    width: 52%;
    height: 200px;
    opacity: .4;
    animation-duration: 52s;
    animation-delay: -14s;
}

.lf-3 {
    right: -8%;
    top: 30%;
    width: 44%;
    height: 240px;
    opacity: .36;
    animation-duration: 46s;
    animation-delay: -22s;
}

html[data-theme="dark"] .lg-fog {
    background: radial-gradient(ellipse at center, rgba(140, 160, 255, .5), rgba(140, 160, 255, 0) 68%);
    opacity: .35;
}

.lg-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px 3px rgba(255, 255, 255, .8);
    opacity: 0;
    animation: lg-twinkle 6s ease-in-out infinite;
}

.ls1 { left: 8%; top: 22%; }
.ls2 { left: 15%; top: 68%; animation-delay: -1.5s; }
.ls3 { left: 24%; top: 34%; animation-delay: -3s; animation-duration: 8s; }
.ls4 { left: 31%; top: 80%; animation-delay: -4.5s; }
.ls5 { left: 40%; top: 18%; animation-delay: -2s; animation-duration: 7s; }
.ls6 { left: 58%; top: 84%; animation-delay: -5s; }
.ls7 { left: 66%; top: 16%; animation-delay: -1s; animation-duration: 9s; }
.ls8 { left: 74%; top: 72%; animation-delay: -3.5s; }
.ls9 { left: 83%; top: 24%; animation-delay: -2.5s; animation-duration: 7s; }
.ls10 { left: 90%; top: 62%; animation-delay: -4s; }
.ls11 { left: 48%; top: 44%; animation-delay: -6s; animation-duration: 10s; }
.ls12 { left: 5%; top: 50%; animation-delay: -.5s; animation-duration: 8s; }

.lg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(91, 99, 224, .22) 1.2px, transparent 1.4px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
    animation: lg-dots 40s linear infinite;
}

html[data-theme="dark"] .lg-dots {
    background-image: radial-gradient(rgba(170, 180, 255, .28) 1.2px, transparent 1.4px);
}

.lg-drop {
    position: absolute;
    top: -30px;
    width: 14px;
    height: 14px;
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    animation: lg-fall 14s linear infinite;
}

.ld1 { left: 6%; background: #f0922b; }
.ld2 { left: 16%; background: #c4553a; animation-delay: -5s; animation-duration: 17s; width: 10px; height: 10px; }
.ld3 { left: 27%; background: #3b8be8; animation-delay: -9s; animation-duration: 15s; }
.ld4 { left: 38%; background: #f0922b; animation-delay: -2s; animation-duration: 19s; width: 9px; height: 9px; }
.ld5 { left: 52%; background: #3b8be8; animation-delay: -11s; animation-duration: 16s; }
.ld6 { left: 63%; background: #c4553a; animation-delay: -7s; animation-duration: 18s; width: 11px; height: 11px; }
.ld7 { left: 72%; background: #f0922b; animation-delay: -13s; animation-duration: 14s; }
.ld8 { left: 81%; background: #3b8be8; animation-delay: -3s; animation-duration: 20s; width: 9px; height: 9px; }
.ld9 { left: 90%; background: #c4553a; animation-delay: -10s; animation-duration: 16s; }
.ld10 { left: 96%; background: #f0922b; animation-delay: -6s; animation-duration: 21s; width: 9px; height: 9px; }

.lg-wave {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%;
    height: 150px;
}

.lg-wave path {
    fill: currentColor;
}

.lw1 {
    color: rgba(31, 143, 134, .26);
    animation: lg-wave 16s linear infinite;
}

.lw2 {
    color: rgba(91, 99, 224, .2);
    height: 120px;
    animation: lg-wave 22s linear infinite reverse;
}

/* ---------- the site's tank and level gauge, inside the picture ---------- */
.lg-left {
    position: fixed;
    left: 3%;
    top: 50%;
    z-index: 2;
    display: none;
    width: 380px;
    height: 600px;
    margin-top: -300px;
    direction: ltr;
    pointer-events: none;
    translate: calc(var(--mx) * -22px) calc(var(--my) * -14px);
}

.lg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(46px);
    animation: lg-glow 7s ease-in-out infinite alternate;
}

.lg-orange {
    top: 4%;
    left: 6%;
    width: 330px;
    height: 230px;
    background: radial-gradient(ellipse, rgba(255, 170, 70, .85), rgba(255, 170, 70, 0) 70%);
}

.lg-green {
    top: 52%;
    left: 28%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(70, 205, 130, .75), rgba(70, 205, 130, 0) 70%);
    animation-delay: -3s;
}

html[data-theme="dark"] .lg-orange {
    background: radial-gradient(ellipse, rgba(255, 150, 60, .6), rgba(255, 150, 60, 0) 70%);
}

.lg-floor {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(60, 50, 140, .38), rgba(60, 50, 140, 0) 72%);
    filter: blur(8px);
    animation: lg-floor 8s ease-in-out infinite;
}

.lfl-1 {
    top: 36%;
    left: 6%;
    width: 340px;
    height: 34px;
}

.lfl-2 {
    top: 79%;
    left: 20%;
    width: 250px;
    height: 30px;
    animation-delay: -3s;
}

html[data-theme="dark"] .lg-floor {
    background: radial-gradient(ellipse, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 72%);
}

.lg-obj {
    position: absolute;
}

.lo-tank {
    top: 4%;
    left: 6%;
    width: 330px;
    animation: lg-float 8s ease-in-out infinite;
}

.lo-gauge {
    top: 50%;
    left: 24%;
    width: 232px;
    animation: lg-float 9s ease-in-out infinite -3s;
}

.lg-vessel {
    display: block;
    width: 330px;
    height: auto;
    mix-blend-mode: multiply;
    filter: saturate(1.15) contrast(1.04) drop-shadow(0 18px 18px rgba(70, 60, 160, .3));
    -webkit-box-reflect: below -6px linear-gradient(transparent 62%, rgba(255, 255, 255, .24));
}

html[data-theme="dark"] .lg-vessel {
    mix-blend-mode: normal;
    filter: brightness(.72) saturate(1.2) drop-shadow(0 18px 18px rgba(0, 0, 0, .5));
}

.lg-gauge {
    position: relative;
    width: 232px;
    filter: drop-shadow(0 20px 20px rgba(30, 90, 70, .38));
}

html[data-theme="dark"] .lg-gauge {
    filter: drop-shadow(0 20px 22px rgba(0, 0, 0, .6)) brightness(.9);
}

.lg-gauge .sg-grid {
    display: block;
}

.lg-gauge .stock-gauge,
.lg-gauge .stock-gauge::before,
.lg-gauge .stock-gauge::after {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.lg-gauge .stock-gauge {
    padding: 0 !important;
}

.lg-halo {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 196px;
    height: 196px;
    margin-left: -98px;
    border-radius: 50%;
    border: 2px dashed rgba(70, 205, 130, .55);
    animation: lg-spin 26s linear infinite;
}

.lg-bub {
    position: absolute;
    bottom: 40px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 0 10px rgba(120, 230, 170, .9);
    opacity: 0;
    animation: lg-rise 5s ease-in infinite;
}

.lbb1 { left: 40%; }
.lbb2 { left: 54%; animation-delay: -2s; animation-duration: 6s; }
.lbb3 { left: 47%; animation-delay: -3.5s; animation-duration: 7s; width: 6px; height: 6px; }

.lg-mist {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 70%);
    filter: blur(20px);
    animation: lg-mist 18s ease-in-out infinite alternate;
}

.lm-1 {
    top: 30%;
    left: -4%;
    width: 360px;
    height: 120px;
    opacity: .6;
}

.lm-2 {
    top: 84%;
    left: 6%;
    width: 330px;
    height: 110px;
    opacity: .55;
    animation-delay: -9s;
}

html[data-theme="dark"] .lg-mist {
    background: radial-gradient(ellipse, rgba(150, 170, 255, .45), rgba(150, 170, 255, 0) 70%);
}

/* ---------- the three floating hints ---------- */
.lg-hints {
    position: fixed;
    right: 4%;
    top: 22%;
    z-index: 2;
    display: none;
    flex-direction: column;
    gap: 18px;
    pointer-events: none;
    translate: calc(var(--mx) * 12px) calc(var(--my) * 8px);
}

.lg-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 270px;
    padding: 12px 14px;
    border-radius: 20px;
    border: 1px solid var(--lg-line);
    background: var(--lg-glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 34px var(--lg-shadow), inset 0 1px 0 rgba(255, 255, 255, .7);
    animation: lg-float 8s ease-in-out infinite;
}

.lg-hint b,
.lg-hint small {
    display: block;
}

.lg-hint b {
    font-size: 15px;
    color: var(--lg-ink);
}

.lg-hint small {
    font-size: 12.5px;
    color: var(--lg-ink2);
}

.lh2 {
    margin-inline-end: 40px;
    animation-delay: -3s;
}

.lh3 {
    margin-inline-start: 24px;
    animation-delay: -5s;
}

.lg-hc {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(145deg, #7e8bff, #4f56d6);
    box-shadow: 0 10px 20px rgba(91, 99, 224, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.lh2 .lg-hc {
    background: linear-gradient(145deg, #4fd0c0, #14766e);
    box-shadow: 0 10px 20px rgba(31, 143, 134, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.lh3 .lg-hc {
    background: linear-gradient(145deg, #ffb35c, #d9731f);
    box-shadow: 0 10px 20px rgba(217, 115, 31, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.lg-hc i {
    color: #fff;
    font-size: 24px;
}

/* the three languages of a hint: only the page language shows */
.lgx-ps,
.lgx-en {
    display: none;
}

html[lang="ps"] .lgx-fa,
html[lang="en"] .lgx-fa {
    display: none;
}

html[lang="ps"] .lgx-ps,
html[lang="en"] .lgx-en {
    display: inline;
}

/* ---------- the card ---------- */
.auth-gate .auth-card {
    position: relative;
    z-index: 5;
    width: min(100%, 440px);
    padding: 0;
    border: 0;
    border-radius: 32px;
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: lg-card-in .9s var(--lg-ease) both;
}

.auth-gate .auth-card::before {
    content: '';
    position: absolute;
    inset: 4px;
    z-index: -1;
    border-radius: 32px;
    background: conic-gradient(from var(--lg-ang), #5b63e0, #1f8f86, #f0922b, #d2457f, #5b63e0);
    filter: blur(26px);
    opacity: .45;
    animation: lg-spin-ang 7s linear infinite;
}

.lg-rim {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 32px;
    padding: 2.5px;
    background: conic-gradient(from var(--lg-ang), #5b63e0, #7a5ae0, #1f8f86, #f0922b, #d2457f, #5b63e0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: lg-spin-ang 7s linear infinite;
    pointer-events: none;
}

.lg-inner {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 30px 34px 26px;
    border-radius: 32px;
    background: var(--lg-glass);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    box-shadow: 0 30px 70px var(--lg-shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
    overflow: hidden;
}

.lg-inner::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 90, 224, .25), transparent 70%);
    pointer-events: none;
}

.lg-inner > * {
    animation: lg-up .8s var(--lg-ease) both;
}

.auth-gate .auth-brand {
    position: relative;
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    margin: 0 auto 4px;
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation-delay: .15s;
}

.lg-logo {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(91, 99, 224, .32), 0 0 0 6px rgba(255, 255, 255, .55);
    animation: lg-bob 5s ease-in-out infinite;
}

.auth-gate .auth-logo {
    width: auto;
    height: 58px;
}

.lg-ring {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    border: 2px solid rgba(91, 99, 224, .5);
    animation: lg-ring 3.6s ease-out infinite;
}

.lring-2 {
    border-color: rgba(31, 143, 134, .5);
    animation-delay: 1.8s;
}

.lg-orbit {
    position: absolute;
    inset: 4px;
    animation: lg-spin 9s linear infinite;
}

.lg-orbit i {
    position: absolute;
    top: 0;
    left: 50%;
    width: 11px;
    height: 11px;
    margin-left: -5px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9aa3ff, #5b63e0);
    box-shadow: 0 0 14px rgba(91, 99, 224, .8);
}

.lorb-2 {
    inset: -4px;
    animation-duration: 13s;
    animation-direction: reverse;
}

.lorb-2 i {
    width: 9px;
    height: 9px;
    background: linear-gradient(145deg, #ffcf8a, #f0922b);
    box-shadow: 0 0 14px rgba(240, 146, 43, .85);
}

.lorb-3 {
    inset: 14px;
    animation-duration: 6s;
}

.lorb-3 i {
    width: 7px;
    height: 7px;
    background: linear-gradient(145deg, #7ce6d8, #1f8f86);
    box-shadow: 0 0 12px rgba(31, 143, 134, .85);
}

.auth-gate .auth-heading {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
    animation-delay: .25s;
}

.auth-gate .auth-eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 4px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(91, 99, 224, .14), rgba(31, 143, 134, .14));
    border: 1px solid rgba(91, 99, 224, .2);
    color: var(--lg-indigo);
    font-size: 13.5px;
    font-weight: 400;
}

html[data-theme="dark"] .auth-gate .auth-eyebrow {
    color: #aeb6ff;
}

.auth-gate .auth-heading h1 {
    margin: 4px 0 0;
    font-size: 32px;
    line-height: 1.5;
    background: linear-gradient(90deg, #1b2a52, #5b63e0, #1f8f86, #d2457f, #1b2a52);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: lg-shimmer 9s linear infinite;
}

html[data-theme="dark"] .auth-gate .auth-heading h1 {
    background-image: linear-gradient(90deg, #ffffff, #aeb6ff, #7ce6d8, #ffb3d1, #ffffff);
}

.auth-gate .auth-heading > p:last-child {
    margin: 0 0 14px;
    color: var(--lg-ink2);
    font-size: 14.5px;
}

.auth-gate .auth-form {
    gap: 14px;
}

.auth-gate .auth-field {
    gap: 6px;
    color: var(--lg-ink);
    font-size: 13.5px;
    font-weight: 700;
    animation: lg-up .8s var(--lg-ease) both;
    transition: color .2s;
}

.auth-gate .auth-field:nth-of-type(1) {
    animation-delay: .48s;
}

.auth-gate .auth-field:nth-of-type(2) {
    animation-delay: .56s;
}

.auth-gate .auth-field:focus-within {
    color: var(--lg-indigo);
}

.auth-gate .auth-input-wrap > i.ti {
    inset-inline-start: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #8590ff, #4f56d6);
    box-shadow: 0 8px 16px rgba(91, 99, 224, .34), inset 0 1px 0 rgba(255, 255, 255, .45);
    color: #fff;
    font-size: 21px;
    transition: transform .35s var(--lg-ease);
}

.auth-gate .auth-field:nth-of-type(2) .auth-input-wrap > i.ti {
    background: linear-gradient(145deg, #4fd0c0, #14766e);
    box-shadow: 0 8px 16px rgba(31, 143, 134, .34), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.auth-gate .auth-field:focus-within .auth-input-wrap > i.ti {
    transform: rotate(-8deg) scale(1.1);
}

.auth-gate .auth-input-wrap input {
    min-height: 58px;
    padding: 10px 60px 10px 60px;
    border: 1.5px solid var(--lg-field-line);
    border-radius: 19px;
    background: var(--lg-field);
    color: var(--lg-ink);
    font-size: 17px;
    transition: border-color .25s, box-shadow .25s, transform .25s var(--lg-ease);
}

.auth-gate .auth-input-wrap input:hover {
    border-color: rgba(91, 99, 224, .45);
}

.auth-gate .auth-input-wrap input:focus {
    border-color: var(--lg-indigo);
    background: var(--lg-field);
    box-shadow: 0 0 0 5px rgba(91, 99, 224, .16), 0 16px 30px rgba(91, 99, 224, .22);
    transform: translateY(-2px);
}

.auth-gate .auth-password-toggle {
    inset-inline-end: 10px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--lg-ink2);
}

.auth-gate .auth-password-toggle:hover {
    background: rgba(91, 99, 224, .14);
    color: var(--lg-indigo);
}

.auth-gate .auth-message {
    color: #c43e45;
}

html[data-theme="dark"] .auth-gate .auth-message {
    color: #ff9aa0;
}

.auth-gate .auth-message.is-success {
    color: #21835a;
}

.auth-gate .auth-submit {
    position: relative;
    min-height: 60px;
    gap: 12px;
    margin-top: 2px;
    border-radius: 20px;
    background: linear-gradient(110deg, #4f6be0, #7a5ae0, #1f8f86, #4f6be0);
    background-size: 300% 100%;
    box-shadow: 0 18px 36px rgba(91, 99, 224, .42), inset 0 1px 0 rgba(255, 255, 255, .4);
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
    animation: lg-up .8s var(--lg-ease) both .66s, lg-shimmer 7s linear infinite;
    transition: transform .25s var(--lg-ease), box-shadow .25s, opacity .18s;
}

.auth-gate .auth-submit:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 24px 44px rgba(91, 99, 224, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.auth-gate .auth-submit:active:not(:disabled) {
    transform: scale(.98);
}

.auth-gate .auth-submit > i.ti {
    font-size: 22px;
    animation: lg-nudge 2.4s ease-in-out infinite;
}

.auth-gate .auth-submit.is-loading > i.ti {
    animation: authSpin .8s linear infinite;
}

.lg-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-130%);
    animation: lg-sweep 3.8s ease-in-out infinite 1.2s;
    pointer-events: none;
}

.auth-gate .auth-footnote {
    gap: 8px;
    margin: 10px 0 0;
    color: var(--lg-ink2);
    font-size: 13px;
    animation-delay: .78s;
}

.auth-gate .auth-footnote i {
    border-radius: 50%;
    color: #1f8f5a;
    font-size: 20px;
    animation: lg-pulse 2.6s ease-out infinite;
}

/* ---------- motion ---------- */
@keyframes lg-card-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(.94);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes lg-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes lg-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(8vmax, 5vmax) scale(1.12);
    }

    100% {
        transform: translate(-5vmax, 9vmax) scale(.94);
    }
}

@keyframes lg-rays {
    from {
        transform: rotate(-4deg);
        opacity: .35;
    }

    to {
        transform: rotate(5deg);
        opacity: .7;
    }
}

@keyframes lg-fog {
    from {
        transform: translateX(-4%);
    }

    to {
        transform: translateX(9%);
    }
}

@keyframes lg-twinkle {
    0%,
    100% {
        opacity: 0;
        transform: scale(.4);
    }

    50% {
        opacity: .9;
        transform: scale(1);
    }
}

@keyframes lg-dots {
    to {
        background-position: 28px 56px;
    }
}

@keyframes lg-fall {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(-45deg);
    }

    8% {
        opacity: .75;
    }

    85% {
        opacity: .6;
    }

    100% {
        opacity: 0;
        transform: translateY(105vh) rotate(-45deg);
    }
}

@keyframes lg-wave {
    to {
        transform: translateX(-50%);
    }
}

@keyframes lg-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

@keyframes lg-glow {
    from {
        opacity: .55;
        transform: scale(.94);
    }

    to {
        opacity: .95;
        transform: scale(1.08);
    }
}

@keyframes lg-floor {
    0%,
    100% {
        transform: scale(1);
        opacity: .9;
    }

    50% {
        transform: scale(.88);
        opacity: .6;
    }
}

@keyframes lg-mist {
    from {
        transform: translateX(-10%);
    }

    to {
        transform: translateX(14%);
    }
}

@keyframes lg-rise {
    0% {
        transform: translateY(0) scale(.6);
        opacity: 0;
    }

    15% {
        opacity: .9;
    }

    100% {
        transform: translateY(-110px) scale(1.1);
        opacity: 0;
    }
}

@keyframes lg-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes lg-spin-ang {
    to {
        --lg-ang: 360deg;
    }
}

@keyframes lg-ring {
    0% {
        transform: scale(.85);
        opacity: .8;
    }

    100% {
        transform: scale(1.75);
        opacity: 0;
    }
}

@keyframes lg-bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes lg-shimmer {
    to {
        background-position: -300% 0;
    }
}

@keyframes lg-sweep {
    0% {
        transform: translateX(-130%);
    }

    45%,
    100% {
        transform: translateX(130%);
    }
}

@keyframes lg-nudge {
    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-6px);
    }
}

@keyframes lg-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(31, 143, 90, .45);
    }

    100% {
        box-shadow: 0 0 0 12px transparent;
    }
}

/* ---------- wide screens show the tank, the gauge and the hints ---------- */
@media (min-width: 1180px) {
    .lg-left {
        display: block;
    }

    .lg-hints {
        display: flex;
    }
}

@media (max-width: 520px) {
    .lg-inner {
        padding: 24px 20px 20px;
    }

    .auth-gate .auth-heading h1 {
        font-size: 28px;
    }

    .auth-gate .auth-brand {
        width: 108px;
        height: 108px;
    }

    .lg-logo {
        width: 72px;
        height: 72px;
        border-radius: 24px;
    }

    .auth-gate .auth-logo {
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-gate *,
    .auth-gate *::before,
    .auth-gate *::after {
        animation-duration: .001s !important;
        animation-iteration-count: 1 !important;
    }
}

/* ---------- phones and tablets: a light, steady version ----------
   On a real phone the full effect (a blurred glass card over moving, blended layers, with a turning
   light rim) was drawn in torn pieces: white blocks, missing texts and fields. Touch screens get the
   same colours and the same card, without the effects that make the phone redraw big areas every frame. */
@media (max-width: 900px), (hover: none) {
    .lg-rays,
    .lg-fog,
    .lg-dots,
    .lg-spark,
    .lg-left,
    .lg-hints,
    .lb5 {
        display: none;
    }

    .lg-blob {
        translate: none;
    }

    .auth-gate .auth-card {
        animation: lg-up .6s var(--lg-ease) both;
    }

    .auth-gate .auth-card::before,
    .lg-rim {
        display: none;
    }

    .lg-inner {
        border: 2px solid transparent;
        background:
            linear-gradient(var(--lg-solid), var(--lg-solid)) padding-box,
            linear-gradient(135deg, #5b63e0, #1f8f86, #f0922b, #d2457f) border-box;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: 0 18px 40px var(--lg-shadow);
    }

    .lg-inner::after {
        display: none;
    }

    .lg-inner > * {
        animation-duration: .5s;
    }

    /* the title is plain ink: text cut out of a moving gradient was one of the pieces that vanished */
    .auth-gate .auth-heading h1 {
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        color: var(--lg-ink);
        animation: none;
    }

    .auth-gate .auth-submit {
        background-size: 100% 100%;
        animation: lg-up .5s var(--lg-ease) both .4s;
    }

    .lg-shine {
        display: none;
    }

    .auth-gate .auth-field {
        animation-duration: .5s;
    }

    .auth-gate .auth-input-wrap input:focus {
        transform: none;
        box-shadow: 0 0 0 4px rgba(91, 99, 224, .16);
    }

    .lg-wave {
        animation: none;
    }

    /* nothing keeps moving on a phone: only the card fades in once */
    .lg-blob,
    .lg-logo,
    .lg-halo {
        animation: none;
    }

    .lg-drop,
    .lg-orbit,
    .lg-ring,
    .lw2 {
        display: none;
    }

    .auth-gate .auth-card {
        animation: lg-fade .35s ease both;
    }

    .lg-inner > *,
    .auth-gate .auth-field,
    .auth-gate .auth-footnote {
        animation: none;
    }

    .auth-gate .auth-submit {
        animation: none;
    }

    .auth-gate .auth-eyebrow i,
    .auth-gate .auth-footnote i,
    .auth-gate .auth-submit > i.ti {
        animation: none;
    }

    .auth-gate .auth-submit.is-loading > i.ti {
        animation: authSpin .8s linear infinite;
    }

    .auth-gate .auth-input-wrap > i.ti,
    .auth-gate .auth-input-wrap input,
    .auth-gate .auth-submit {
        transition: none;
    }

    .auth-gate .auth-field:focus-within .auth-input-wrap > i.ti {
        transform: none;
    }
}

@keyframes lg-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* While the sign-in page is up, the application behind it is not drawn and its animations are
   paused, so the phone does not keep working for something nobody can see. */
html.auth-pending body > *:not(#authGate):not(#fuel-loader) {
    visibility: hidden;
}

html.auth-pending,
html.auth-pending::before,
html.auth-pending::after,
html.auth-pending body,
html.auth-pending body::before,
html.auth-pending body::after,
html.auth-pending body > *:not(#authGate):not(#fuel-loader),
html.auth-pending body > *:not(#authGate):not(#fuel-loader)::before,
html.auth-pending body > *:not(#authGate):not(#fuel-loader)::after,
html.auth-pending body > *:not(#authGate):not(#fuel-loader) *,
html.auth-pending body > *:not(#authGate):not(#fuel-loader) *::before,
html.auth-pending body > *:not(#authGate):not(#fuel-loader) *::after {
    animation-play-state: paused !important;
}

/* language choice on the sign-in card */
.auth-lang {
    position: relative;
    z-index: 2;
    display: flex;
    justify-self: center;
    gap: 4px;
    margin: 0 0 8px;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--lg-a, #5b63e0) 22%, rgba(120, 130, 170, .25));
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    direction: ltr;
}

html[data-theme="dark"] .auth-lang {
    background: rgba(255, 255, 255, .07);
}

.auth-lang button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text2, #5a6580);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: background .25s, color .25s, box-shadow .25s;
}

.auth-lang button:hover {
    background: rgba(91, 99, 224, .1);
}

.auth-lang button.on {
    background: linear-gradient(145deg, #8a93ff, #5b63e0);
    box-shadow: 0 6px 14px rgba(91, 99, 224, .3);
    color: #fff;
}

.auth-lang button svg {
    flex: none;
    border-radius: 3px;
}

.auth-lang button:focus-visible {
    outline: 2px solid #5b63e0;
    outline-offset: 2px;
}
