:root {
    --mfs-error-glow: rgba(31, 90, 85, 0.14);
}

.mfs-error-page main {
    min-height: min(760px, calc(100vh - 260px));
}

.mfs-error-shell {
    position: relative;
    display: grid;
    min-height: min(720px, calc(100vh - 260px));
    padding: clamp(3rem, 8vw, 7rem) 0;
    place-items: center;
    overflow: hidden;
}

.mfs-error-shell::before,
.mfs-error-shell::after {
    position: absolute;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    background: var(--mfs-error-glow);
    content: "";
    filter: blur(3px);
    pointer-events: none;
}

.mfs-error-shell::before {
    top: -18rem;
    right: -12rem;
}

.mfs-error-shell::after {
    bottom: -22rem;
    left: -15rem;
}

.mfs-error-card {
    position: relative;
    z-index: 1;
    width: min(100%, 780px);
    padding: clamp(2rem, 6vw, 4.5rem);
    border: 1px solid var(--mfs-line);
    border-radius: var(--mfs-radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--mfs-shadow);
    text-align: center;
}

.mfs-error-code {
    margin: 0 0 0.25rem;
    color: var(--mfs-mint);
    font-size: clamp(5rem, 18vw, 11rem);
    font-weight: 850;
    letter-spacing: -0.08em;
    line-height: 0.82;
    user-select: none;
}

.mfs-error-card h1 {
    max-width: 15ch;
    margin-inline: auto;
}

.mfs-error-lead {
    max-width: 62ch;
    margin: 0 auto 1.6rem;
    color: var(--mfs-ink-soft);
    font-size: clamp(1.04rem, 2vw, 1.2rem);
}

.mfs-error-actions {
    justify-content: center;
}

.mfs-error-help {
    margin-top: 1.5rem;
    color: var(--mfs-ink-soft);
    font-size: 0.94rem;
}

@media (max-width: 700px) {
    .mfs-error-shell {
        min-height: auto;
        padding: 2rem 0 3rem;
    }

    .mfs-error-card {
        padding: 2rem 1.25rem;
        border-radius: var(--mfs-radius);
    }

    .mfs-error-actions {
        display: grid;
    }

    .mfs-error-actions .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mfs-error-shell::before,
    .mfs-error-shell::after {
        filter: none;
    }
}

@media print {
    .mfs-error-shell::before,
    .mfs-error-shell::after,
    .site-header,
    .site-footer,
    .mfs-error-actions {
        display: none !important;
    }

    .mfs-error-card {
        border: 0;
        box-shadow: none;
    }
}
