/* Error and not-found pages (error.html, projects/forbidden.html, projects/*not_found.html).
   One card for all of them (partials/_error_state.html): a status mark, a mono code line,
   the title, one line of why, optional reference row, then the way out. Standalone pages
   (no project shell) sit it over a still dot field, the login page's family. */

/* ---------- Standalone: see-through top bar over a still dot field ---------- */
.page-error .top-nav { position: relative; z-index: 2; background: transparent; border-bottom-color: transparent; }
.err-field {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(circle, var(--fill-2) 1px, transparent 1.4px);
    background-size: 11px 11px;
    -webkit-mask-image: radial-gradient(ellipse 50% 46% at 50% 42%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 50% 46% at 50% 42%, black 0%, transparent 75%);
}
.err-page {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    min-height: calc(100dvh - var(--topbar-h));
    padding: 14vh 16px 48px;
    box-sizing: border-box;
}
.err-foot { color: var(--label-3); font-size: 13px; text-decoration: none; }
.err-foot:hover { color: var(--label-1); }

/* ---------- Inside the project shell: the card centred in the page column ---------- */
.err-in-shell { display: flex; justify-content: center; padding: 10vh 0 24px; }

/* ---------- The card ---------- */
.overview-card.err-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; max-width: 420px; padding: 28px 28px 24px; box-sizing: border-box; }
.err-mark {
    display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
    border: 1px solid var(--hairline); border-radius: 10px;
    background: var(--fill-1); color: var(--label-2);
}
.err-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.err-mark.is-warn { border-color: transparent; background: var(--amber-tint); color: var(--amber); }
.err-mark.is-bad { border-color: transparent; background: var(--red-tint); color: var(--red); }
.err-code { margin: 18px 0 0; }
.err-card h1 { margin: 6px 0 0; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: var(--label-1); }
.err-text { margin: 6px 0 0; color: var(--label-2); font-size: 14px; line-height: 1.5; }
.err-hint { margin: 4px 0 0; color: var(--label-3); font-size: 13px; line-height: 1.5; }
/* What was asked for (an ID) or what went wrong (the server's detail), in a quiet well */
.err-ref {
    display: flex; align-items: baseline; gap: 10px; width: 100%; margin: 16px 0 0; padding: 8px 10px;
    border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--fill-1);
    box-sizing: border-box; color: var(--label-2); font-size: 13px; line-height: 1.45;
}
.err-ref > .micro { flex-shrink: 0; }
.err-ref > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.err-ref code { padding: 0; background: none; color: var(--label-1); font: 12.5px var(--font-mono); }
.err-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.err-actions .btn { flex-shrink: 0; }
.err-actions [hidden] { display: none; }

@media (max-width: 600px) {
    .err-page { padding-top: 6vh; }
    .err-in-shell { padding-top: 4vh; }
    .overview-card.err-card { padding: 22px 20px 20px; }
}
