:root {
    color-scheme: dark;
}

html,
body {
    min-height: 100%;
}

body.yomo-login {
    --verse-bg: #0a0a0a;
    --verse-grid: rgba(229, 231, 235, .16);
    --verse-grid-strong: rgba(229, 231, 235, .34);
    --verse-text: #d4d4d4;
    --verse-muted: #737373;
    --verse-subtle: #171717;
    margin: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--verse-bg);
    color: var(--verse-text);
    font-family: "Geist Mono", "SF Mono", Consolas, ui-monospace, monospace;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

body.yomo-login *,
body.yomo-login *::before,
body.yomo-login *::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

body.yomo-login a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    display: grid;
    min-height: 100dvh;
    padding: clamp(20px, 5vh, 56px) 24px;
    place-items: start center;
}

.login-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(1080px, 100%);
    border-top: 1px solid var(--verse-grid);
    border-left: 1px solid var(--verse-grid);
    background: var(--verse-bg);
}

.login-cell {
    min-width: 0;
    border-right: 1px solid var(--verse-grid);
    border-bottom: 1px solid var(--verse-grid);
    background: var(--verse-bg);
}

.login-header,
.login-footer {
    grid-column: 1 / -1;
}

.login-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .58fr);
    gap: 24px;
    min-height: 150px;
    padding: 16px;
}

.login-identity h1 {
    margin: 0 0 18px;
    color: var(--verse-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.login-identity p {
    max-width: 42ch;
    margin: 0;
    color: var(--verse-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-wrap: pretty;
}

.login-contact {
    display: grid;
    align-content: end;
    gap: 8px;
    margin: 0;
}

.login-contact div,
.login-terminal-lines p,
.login-auth-link,
.login-meta-row,
.login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.login-contact dt,
.login-terminal-lines span,
.login-meta-row,
.login-footer {
    color: var(--verse-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.43;
}

.login-contact dd {
    margin: 0;
    color: var(--verse-text);
    font-size: 14px;
    line-height: 1.5;
    text-align: right;
}

.login-media,
.login-terminal,
.login-system,
.login-access {
    min-height: 286px;
}

.login-media,
.login-system,
.login-access {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.login-media-frame {
    display: grid;
    min-height: 228px;
    place-items: center;
    overflow: hidden;
}

.login-media-frame img {
    display: block;
    width: min(218px, 54%);
    height: auto;
    opacity: .74;
    outline: 1px solid rgba(255, 255, 255, .1);
    outline-offset: -1px;
}

.login-meta-row {
    min-height: 58px;
    padding: 0 16px;
    border-top: 1px solid var(--verse-grid);
    text-transform: uppercase;
}

.login-terminal {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.login-terminal-lines {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 16px;
}

.login-terminal-lines p {
    margin: 0;
    color: var(--verse-text);
    font-size: 14px;
    line-height: 1.5;
}

.login-terminal-lines span {
    min-width: 72px;
}

.login-auth-link {
    min-height: 58px;
    padding: 0 16px;
    border-top: 1px solid var(--verse-grid);
    color: var(--verse-text);
    font-size: 14px;
    line-height: 1.5;
    transition-property: color, background-color, border-color, transform;
    transition-duration: 160ms;
    transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}

.login-auth-link span:last-child {
    color: var(--verse-muted);
    font-size: 11px;
    line-height: 1.43;
    text-transform: uppercase;
}

.login-auth-link:hover {
    background: var(--verse-subtle);
    color: #ffffff;
}

.login-auth-link:active {
    transform: scale(.96);
}

.login-auth-link:focus-visible {
    position: relative;
    z-index: 1;
    outline: 1px solid var(--verse-grid-strong);
    outline-offset: -1px;
}

.login-system-map {
    position: relative;
    display: grid;
    min-height: 228px;
    padding: 16px;
    place-items: center;
    overflow: hidden;
}

.login-system-map::before,
.login-system-map::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 1px;
    height: 132px;
    background: var(--verse-grid);
    transform-origin: top;
}

.login-system-map::before {
    transform: rotate(48deg);
}

.login-system-map::after {
    transform: rotate(-48deg);
}

.login-system-map span {
    position: absolute;
    color: var(--verse-text);
    font-size: 11px;
    line-height: 1.43;
    text-transform: uppercase;
}

.login-system-map span:nth-child(1) {
    top: 72px;
    left: 20%;
}

.login-system-map span:nth-child(2) {
    top: 72px;
    right: 20%;
}

.login-system-map span:nth-child(3) {
    bottom: 72px;
    left: 23%;
}

.login-system-map span:nth-child(4) {
    bottom: 72px;
    right: 22%;
}

.login-system-map span::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    margin: 8px auto 0;
    background: var(--verse-text);
}

.login-footer {
    min-height: 58px;
    padding: 0 16px;
    text-transform: uppercase;
}

.login-reveal {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(4px);
    animation: loginCellIn 420ms cubic-bezier(.22, 1, .36, 1) forwards;
}

.login-reveal:nth-child(1) {
    animation-delay: 40ms;
}

.login-reveal:nth-child(2) {
    animation-delay: 120ms;
}

.login-reveal:nth-child(3) {
    animation-delay: 200ms;
}

.login-reveal:nth-child(4) {
    animation-delay: 280ms;
}

.login-reveal:nth-child(5) {
    animation-delay: 360ms;
}

.login-reveal:nth-child(6) {
    animation-delay: 440ms;
}

@keyframes loginCellIn {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@media (max-width: 760px) {
    .login-shell {
        padding: 16px;
        place-items: start stretch;
    }

    .login-grid,
    .login-header {
        grid-template-columns: 1fr;
    }

    .login-header {
        min-height: 0;
    }

    .login-contact div,
    .login-terminal-lines p,
    .login-auth-link,
    .login-meta-row,
    .login-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .login-contact dd {
        text-align: left;
    }

    .login-media,
    .login-terminal,
    .login-system,
    .login-access {
        min-height: 248px;
    }

    .login-media-frame,
    .login-system-map {
        min-height: 190px;
    }

    .login-media-frame img {
        width: min(168px, 52%);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Final login QA pass */
body.yomo-login {
    --verse-accent: #00d084;
    --verse-accent-soft: rgba(0, 208, 132, .12);
    --verse-ring: 0 0 0 1px var(--verse-grid);
    --verse-ring-strong: 0 0 0 1px var(--verse-grid-strong);
}

.login-shell {
    place-items: center;
}

.login-grid {
    width: min(980px, 100%);
    box-shadow: var(--verse-ring);
}

.login-cell {
    min-width: 0;
}

.login-identity h1,
.login-identity p,
.login-terminal-lines p {
    text-wrap: balance;
}

.login-contact dd,
.login-terminal-lines p,
.login-auth-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-contact dd,
.login-auth-link span:first-child {
    white-space: nowrap;
}

.login-auth-link {
    min-height: 60px;
    color: #ffffff;
}

.login-auth-link:hover {
    background: #111111;
}

.login-auth-link:active {
    scale: .96;
    transform: none;
}

.login-auth-link:focus-visible {
    outline: 0;
    box-shadow: var(--verse-ring-strong), 0 0 0 4px var(--verse-accent-soft);
}

.login-auth-link span:last-child {
    color: var(--verse-accent);
}

.login-media-frame img {
    max-width: 218px;
    filter: none;
}

.login-system-map span::after {
    background: var(--verse-accent);
}

.login-reveal {
    will-change: transform, opacity, filter;
}

@media (max-width: 760px) {
    .login-shell {
        place-items: start stretch;
    }

    .login-grid {
        width: 100%;
    }

    .login-contact dd,
    .login-auth-link span:first-child {
        white-space: normal;
    }
}
