/* The error pages (400 … 504). Built on inner.css. One centred block: the code large in a
   grey gradient, the headline, one line, the actions and «Error 404 · Not Found» under them;
   404 adds a search field with its results in place. 4xx: «Where to next?» tiles; 5xx: a
   «Still not working?» card with the contact details. */

.er-page {
    padding-bottom: var(--section-space);
}

/* ---------- the message ---------- */
.er-hero {
    padding-top: 112px;
    text-align: center;
}

.er-code {
    margin: 0;
    background: linear-gradient(180deg, var(--g900) 20%, var(--g500) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(7.5rem, 14vw, 13.75rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.045em;
    font-variant-numeric: lining-nums;
    user-select: none;
}

.er-title {
    margin: 28px auto 0;
    max-width: 18em;
    color: var(--g900);
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: .005em;
    text-wrap: balance;
}

.er-lead {
    margin: 20px auto 0;
    max-width: 32em;
    text-wrap: balance;
}

.er-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 32px;
    margin-top: 40px;
}

/* (prefixed with .inner: inner.css resets every button to font: inherit) */
.inner button.btn {
    font-size: 17px;
    font-weight: 600;
}

.inner button.btn:disabled {
    background: var(--g300);
    color: var(--g700) !important;
    cursor: default;
    transform: none;
    font-variant-numeric: tabular-nums;
}

.er-meta {
    margin: 32px 0 0;
}

/* ---------- 404: search in place ---------- */
.er-search {
    position: relative;
    max-width: 560px;
    margin: 40px auto 0;
}

.er-search svg {
    position: absolute;
    top: 50%;
    left: 20px;
    width: 20px;
    height: 20px;
    color: var(--g600);
    transform: translateY(-50%);
    pointer-events: none;
}

.er-search input {
    box-sizing: border-box;
    width: 100%;
    height: 56px;
    padding: 0 20px 0 54px;
    border: 1px solid var(--g400);
    border-radius: 14px;
    background: #fff;
    color: var(--g900);
    font: 400 19px/1.2 Montserrat, Arial, sans-serif;
    letter-spacing: .005em;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.er-search input::placeholder {
    color: var(--g600);
}

.er-search input:hover {
    border-color: var(--g600);
}

.er-search input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgb(237 28 41 / .16);
    outline: none;
}

.er-results {
    max-width: 560px;
    margin: 12px auto 0;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 0 0 1px rgb(33 37 41 / .06), 2px 4px 16px rgb(0 0 0 / .08);
    list-style: none;
    text-align: left;
}

.er-results a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--g900);
    font-size: 17px;
    transition: background-color .15s linear;
}

.er-results a:hover,
.er-results a:focus-visible {
    background: var(--g100);
    outline: none;
}

.er-results small {
    flex: none;
    color: var(--g600);
    font-size: 13px;
}

.er-results .er-none {
    margin: 0;
    padding: 12px 14px;
    color: var(--g700);
    font-size: 15px;
}

/* ---------- 4xx: where to next ---------- */
.er-next {
    margin-top: 120px;
}

.er-next-title {
    margin: 0 0 var(--title-gap);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.er-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.er-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    height: 100%;
    min-height: 168px;
    padding: 28px;
    border-radius: var(--radius-card);
    background: var(--card);
    transition: background-color .25s var(--ease);
}

.er-tile:hover {
    background: var(--g200);
}

.er-tile strong {
    display: block;
    color: var(--g900);
    font-size: 21px;
    font-weight: 600;
}

.er-tile small {
    display: block;
    margin-top: 6px;
    color: var(--g700);
    font-size: 14px;
    line-height: 1.5;
}

.er-tile .ctl {
    align-self: flex-end;
    background: #fff;
}

.er-tile:hover .ctl {
    background: var(--g300);
    color: var(--g900);
}

/* ---------- 5xx: still not working ---------- */
.er-help {
    margin-top: 120px;
}

.er-help-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px 48px;
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 48px;
    border-radius: var(--radius-big);
    background: var(--card);
}

.er-help-card h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
}

.er-help-card p {
    margin: 8px 0 0;
    color: var(--g700);
    font-size: 17px;
    text-wrap: pretty;
}

.er-help-card .link {
    flex: none;
    white-space: nowrap;
}

.er-help .nowrap {
    white-space: nowrap;
}

@media (max-width: 1068px) {
    .er-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .er-help-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 734px) {
    .er-hero {
        padding-top: 72px;
    }

    .er-title {
        margin-top: 20px;
    }

    .er-actions {
        flex-direction: column;
        gap: 20px;
        margin-top: 32px;
    }

    .er-search {
        margin-top: 32px;
    }

    .er-next,
    .er-help {
        margin-top: 88px;
    }

    .er-next-title {
        font-size: 24px;
    }

    .er-tiles {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .er-tile {
        flex-direction: row;
        align-items: center;
        min-height: 0;
        padding: 22px 24px;
    }

    .er-tile .ctl {
        align-self: center;
    }

    .er-help-card {
        padding: 32px 28px;
    }
}

/* ===== phones and tablets (2026-11-07), everything here sits inside a width query, the desktop stays as it was ===== */
/* The big error number waits for its own font (user report 2026-11-09: «the digits jump: first another font,
   then it changes»): the same Montserrat file under its own name with font-display: block, so the number is drawn
   once, in Montserrat (the rest of the page keeps «swap»). */
@font-face {
    font-family: "Montserrat Number";
    src: url("/v3/assets/fonts/Montserrat-Variable.woff2") format("woff2"),url("/v3/assets/fonts/Montserrat-Variable.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: block;
}

@media screen {
    html body .er-code {
        font-family: "Montserrat Number", Montserrat, Arial, sans-serif;
    }
}
/* ===== end of phones and tablets ===== */
