.right-panel {
    --story-ink: #ffffff;
    --story-muted: rgba(236, 244, 240, 0.76);
    --story-line: rgba(255, 255, 255, 0.24);
    --story-accent: #d9f25e;
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    background: var(--story-primary, var(--primary-color, #12372f));
    isolation: isolate;
}

.right-panel::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    background-image: var(--story-background-image, url('../../demo-images/use_this.jpg'));
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.32;
    filter: saturate(0.7) contrast(1.05);
}

.right-panel::after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    background:
        radial-gradient(circle at 82% 13%, rgba(217, 242, 94, 0.13), transparent 31%),
        linear-gradient(142deg, rgba(14, 23, 20, 0.97) 0%, rgba(18, 55, 47, 0.88) 58%, rgba(18, 55, 47, 0.73) 100%);
}

.right-panel-content {
    position: relative;
    z-index: 3;
    display: flex;
    height: 100%;
    justify-content: stretch;
    padding: clamp(48px, 6.5vw, 96px);
}

.login-story {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    color: var(--story-ink);
}

.login-story__track {
    display: flex;
    flex: 1;
    align-items: flex-end;
    padding-bottom: clamp(38px, 5vh, 64px);
}

.login-story__slide {
    width: 100%;
    max-width: 720px;
}

.login-story__slide[hidden] {
    display: none;
}

.login-story__slide.is-active {
    animation: login-story-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-story__eyebrow {
    margin: 0 0 18px;
    color: var(--story-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.login-story__title {
    max-width: 700px;
    margin: 0;
    color: var(--story-ink);
    font-size: clamp(3rem, 4.8vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.98;
    text-wrap: balance;
}

.login-story__body {
    max-width: 590px;
    margin: 28px 0 0;
    color: var(--story-muted);
    font-size: clamp(1rem, 1.35vw, 1.16rem);
    line-height: 1.65;
}

.login-story__navigation {
    display: grid;
    grid-template-columns: auto minmax(90px, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--story-line);
}

.login-story__dots,
.login-story__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-story__dot,
.login-story__control {
    appearance: none;
    border: 0;
    color: var(--story-ink);
    font: inherit;
    cursor: pointer;
}

.login-story__dot {
    position: relative;
    width: 34px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.login-story__dot::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.28);
    transition: background-color 180ms ease, transform 180ms ease;
    transform-origin: left;
}

.login-story__dot.is-active {
    color: var(--story-ink);
}

.login-story__dot.is-active::after {
    background: var(--story-accent);
    transform: scaleY(2);
}

.login-story__status {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.login-story__control {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--story-line);
    border-radius: 999px;
    background: rgba(14, 23, 20, 0.18);
    font-size: 0.84rem;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.login-story__control--toggle {
    min-width: 70px;
}

.login-story__control:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.login-story__control:disabled {
    cursor: default;
    opacity: 0.62;
}

.login-story__dot:focus-visible,
.login-story__control:focus-visible {
    outline: 3px solid var(--story-accent);
    outline-offset: 3px;
}

@keyframes login-story-enter {
    from {
        transform: translateY(14px);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .right-panel-content {
        padding: 48px;
    }

    .login-story__title {
        font-size: clamp(2.65rem, 5vw, 4rem);
    }

    .login-story__navigation {
        grid-template-columns: 1fr auto;
    }

    .login-story__status {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .right-panel {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-story__slide.is-active {
        animation: none;
    }

    .login-story__dot::after,
    .login-story__control {
        transition: none;
    }
}
