.sp-404-page {
    --bg: #f4f3f1;
    --ink: #141517;
    --black: #141312;
    --white: #ffffff;
    --orange: #e85d04;
    --orange-hover: #cf4f00;
    --orange-light: #fff3ea;
    --border: #ebe5df;
    --text-muted: #555e6d;
    --font-saira: 'Saira', system-ui, -apple-system, sans-serif;
    --font-jakarta: 'Plus Jakarta Sans', system-ui, sans-serif;
    padding: clamp(40px, 5vw, 70px) 0 clamp(60px, 8vw, 100px);
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-saira);
}

:where(.sp-404-page) a {
    color: inherit;
    text-decoration: none;
}

:where(.sp-404-page) button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.sp-404-page .crumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 400;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sp-404-page .crumbs a {
    color: var(--orange);
    transition: color 0.2s;
}

.sp-404-page .crumbs a:hover {
    color: var(--orange-hover);
    text-decoration: underline;
}

.sp-404-page .crumbs .cur {
    color: var(--ink);
    font-weight: 500;
}

.sp-404-page .crumbs svg {
    width: 6px;
    height: 12px;
    stroke: #9ca3af;
}

.sp-404-page .sp-404__card {
    position: relative;
    width: 100%;
    background: var(--white);
    border-radius: clamp(30px, 4vw, 48px);
    padding: clamp(36px, 5.5vw, 72px) clamp(20px, 5vw, 64px);
    border: 1px solid var(--border);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(20px, 2.5vw, 28px);
    overflow: hidden;
}

.sp-404-page .sp-404__code-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--ink);
    color: var(--white);
    padding: 12px 34px;
    border-radius: 28px;
    box-shadow: 0 12px 30px rgba(20, 21, 23, 0.14);
}

.sp-404-page .sp-404__code {
    font-family: var(--font-jakarta);
    font-size: clamp(46px, 6vw, 76px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 4px;
    color: var(--white);
}

.sp-404-page .sp-404__code span {
    color: var(--orange);
}

.sp-404-page .sp-404__code-wrap svg {
    width: clamp(34px, 3.8vw, 46px);
    height: auto;
    flex-shrink: 0;
}

.sp-404-page .sp-404__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 720px;
    width: 100%;
}

.sp-404-page .sp-404__head h1 {
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
}

.sp-404-page .sp-404__rule {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 14px;
    margin: 2px 0;
}

.sp-404-page .sp-404__rule::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, rgba(20, 21, 23, 0), rgba(20, 21, 23, 0.4) 50%, rgba(20, 21, 23, 0));
}

.sp-404-page .sp-404__rule i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    background: var(--orange);
    transform: translate(-50%, -50%) rotate(45deg);
}

.sp-404-page .sp-404__desc {
    font-size: clamp(15px, 1.25vw, 19px);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 620px;
}

.sp-404-page .sp-404__search {
    width: 100%;
    max-width: 520px;
    height: 58px;
    background: var(--bg);
    border: 1.5px solid transparent;
    border-radius: 16px;
    padding: 0 8px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.sp-404-page .sp-404__search:focus-within {
    background: var(--white);
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.12);
}

.sp-404-page .sp-404__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--font-saira);
    font-size: 16px;
    color: var(--ink);
}

.sp-404-page .sp-404__search input::placeholder {
    color: #6b7280;
}

.sp-404-page .sp-404__search-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--orange);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.sp-404-page .sp-404__search-btn:hover {
    background: var(--orange-hover);
}

.sp-404-page .sp-404__btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: 480px;
}

.sp-404-page .sp-404__btn {
    flex: 1 1 0;
    min-width: 0;
    height: 56px;
    border-radius: 16px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 17px;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sp-404-page .sp-404__btn--primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 8px 22px rgba(232, 93, 4, 0.28);
}

.sp-404-page .sp-404__btn--primary:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
}

.sp-404-page .sp-404__btn--secondary {
    border: 1px solid var(--black);
    color: var(--black);
    background: transparent;
}

.sp-404-page .sp-404__btn--secondary:hover {
    background: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}

.sp-404-page .sp-404__quick {
    width: 100%;
    max-width: 860px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.sp-404-page .sp-404__quick-item {
    background: var(--orange-light);
    border: 1px solid rgba(232, 93, 4, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.sp-404-page .sp-404__quick-item:hover {
    transform: translateY(-2px);
    background: #ffebe0;
}

.sp-404-page .sp-404__quick-item svg {
    width: 18px;
    height: 18px;
    color: var(--orange);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .sp-404-page .sp-404__quick {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sp-404-page .sp-404__btns {
        flex-direction: column;
        max-width: 100%;
    }

    .sp-404-page .sp-404__btn {
        width: 100%;
        flex: none;
    }

    .sp-404-page .sp-404__quick {
        grid-template-columns: 1fr;
    }
}