.lg-body {
    --lg-bg: var(--bg-primary);
    --lg-fg: var(--text-primary);
    --lg-fg-2: var(--text-secondary);
    --lg-accent: var(--dark-green);
    --lg-display: young-serif, Georgia, 'Times New Roman', serif;
    --lg-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --lg-drift-opacity: .32;
    background: var(--lg-bg) !important;
}

[data-theme="dark"] .lg-body {
    --lg-accent: var(--primary-colour);
    --lg-drift-opacity: .14;
}

.lg-page {
    min-height: calc(100vh - 110px);
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 600px);
    justify-content: center;
    column-gap: clamp(32px, 6vw, 96px);
    padding-top: 78px;
}

.lg-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
}

.lg-card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.lg-kicker {
    position: relative;
    align-self: flex-start;
    padding-bottom: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--lg-fg);
}

.lg-kicker::after,
.lg-stay::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -4px;
    bottom: -2px;
    height: 9px;
    background: var(--primary-colour);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7c40-5 90-6 140-3 20 1 38 2 56-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") left center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7c40-5 90-6 140-3 20 1 38 2 56-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") left center / 100% 100% no-repeat;
}

.lg-title {
    margin: 0;
    font-family: var(--lg-display);
    font-weight: 400;
    font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem);
    line-height: 1.06;
    letter-spacing: -.01em;
    color: var(--lg-fg);
    text-wrap: balance;
}

.lg-accent {
    color: var(--lg-accent);
}

.lg-lead {
    margin: 0 0 6px;
    color: var(--lg-fg-2);
}

.lg-card .signup-form {
    margin: 0;
    padding: 6px 0 0;
}

.lg-card .form-fields-wrapper {
    gap: 1.1rem;
}

.lg-card .input-wrapper {
    position: relative;
}

.lg-peek {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px;
    border: 0;
    background: none;
    color: var(--lg-fg-2);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.lg-peek:hover {
    color: var(--primary-colour);
}

.lg-card .forgot-password-link {
    display: block;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    color: var(--lg-accent);
}

.lg-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 26px;
    border: 0;
    border-radius: 4px;
    background: var(--primary-colour);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--dark-green);
    transition: transform .15s ease, box-shadow .15s ease;
}

.lg-submit:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--dark-green);
}

.lg-submit:focus-visible {
    outline: 3px solid #f4d35e;
    outline-offset: 3px;
}

.lg-new {
    margin: 6px 0 0;
    text-align: center;
    font-size: 15px;
    color: var(--lg-fg-2);
}

.lg-new a {
    color: var(--lg-fg);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--primary-colour);
    text-underline-offset: 4px;
}

.lg-school {
    margin-top: 10px;
    font-size: 13px;
}

.lg-school a {
    font-weight: 600;
}

.lg-scene {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 6%;
}

.lg-drift {
    position: absolute;
    inset: -10% 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding-inline: 8%;
    font-family: var(--lg-mono);
    font-size: 14px;
    color: var(--lg-fg);
    opacity: var(--lg-drift-opacity);
    white-space: nowrap;
    pointer-events: none;
    animation: lg-rise 60s linear infinite;
    -webkit-mask-image: radial-gradient(60% 55% at 55% 50%, #000 30%, transparent 80%);
    mask-image: radial-gradient(60% 55% at 55% 50%, #000 30%, transparent 80%);
}

.lg-drift span:nth-child(odd) {
    padding-left: 14%;
}

.lg-drift span:nth-child(3n) {
    padding-left: 30%;
}

@keyframes lg-rise {
    to {
        transform: translateY(-50%);
    }
}

.lg-quote {
    position: relative;
    margin: 0;
    max-width: 560px;
    text-align: left;
}

.lg-q1 {
    display: block;
    font-family: var(--lg-display);
    font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem);
    line-height: 1.15;
    color: var(--lg-fg-2);
}

.lg-change {
    display: inline-flex;
    color: var(--lg-fg);
}

.lg-change i {
    display: inline-block;
    font-style: normal;
    transition: transform 1.1s cubic-bezier(.3, 1.3, .5, 1);
}

.lg-q2 {
    display: block;
    margin-top: 10px;
    font-family: var(--lg-display);
    font-size: clamp(2.6rem, 1.4rem + 4vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -.02em;
    color: var(--lg-fg);
}

.lg-stay {
    position: relative;
    display: inline-block;
    color: var(--lg-accent);
}

.lg-stay::after {
    bottom: -.08em;
    height: .16em;
    transform-origin: left;
    transform: scaleX(0);
    animation: lg-draw .9s ease .6s forwards;
}

@keyframes lg-draw {
    to {
        transform: scaleX(1);
    }
}

@media (max-width: 900px) {
    .lg-page {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

    .lg-scene {
        order: -1;
        justify-content: flex-start;
        padding: 36px 20px 8px;
    }

    .lg-form {
        padding-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-drift {
        animation: none;
    }

    .lg-change i,
    .lg-submit {
        transition: none;
    }

    .lg-stay::after {
        animation: none;
        transform: none;
    }
}
