* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f6f8;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.site-header {
    background: #00305c;
}

.site-header-inner,
.site-footer-inner,
.error-page-inner {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding-right: 15px;
    padding-left: 15px;
}

.site-header-inner {
    display: flex;
    align-items: center;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-brand img {
    display: block;
    width: 170px;
    max-width: 100%;
    height: auto;
    padding: 6px 0;
}

.error-page {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 48px;
}

.error-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 40px;
    border: 1px solid #e2e7eb;
    border-top: 4px solid #014e82;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 48, 92, .08);
}

.error-code {
    flex: 0 0 185px;
    color: #014e82;
    font-size: 76px;
    font-weight: 700;
    letter-spacing: -4px;
    line-height: 1;
    text-align: center;
}

.error-content {
    padding-left: 32px;
    border-left: 1px solid #e2e7eb;
}

.error-label {
    margin: 0 0 8px;
    color: #667785;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 12px;
    color: #00305c;
    font-size: 26px;
    line-height: 1.3;
}

.error-message {
    margin: 0;
    color: #555;
    font-size: 15px;
}

.home-link {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 18px;
    border: 1px solid #014e82;
    border-radius: 3px;
    background: #fff;
    color: #014e82;
    font-weight: 700;
    text-decoration: none;
}

.home-link:hover {
    background: #014e82;
    color: #fff;
}

.site-brand:focus,
.home-link:focus {
    outline: 3px solid #83b9d5;
    outline-offset: 3px;
}

.site-footer {
    flex-shrink: 0;
    padding: 18px 0;
    background: #00305c;
    color: #fff;
    font-size: 13px;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 600px) {
    .error-page {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .error-card {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 28px 22px;
    }

    .error-code {
        flex-basis: auto;
        font-size: 62px;
    }

    .error-content {
        padding-top: 20px;
        padding-left: 0;
        border-top: 1px solid #e2e7eb;
        border-left: 0;
        text-align: center;
    }

    h1 {
        font-size: 22px;
    }
}

@media (max-width: 360px) {
    .site-brand img {
        width: 150px;
    }
}
