/*! CSS Portal — 404 / 500 error pages */
.ep {
	--ep-accent: #2563eb;
	--ep-accent-soft: rgba(37, 99, 235, .1);
	--ep-text: #0f172a;
	--ep-muted: #64748b;
	--ep-bg: #ffffff;
	--ep-surface: #f8fafc;
	--ep-border: #e2e8f0;
	--ep-code-bg: #0f172a;
	--ep-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	gap: 28px;
	padding: 48px 16px 40px;
	text-align: center;
	color: var(--ep-text);
}
html.dark-mode .ep {
	--ep-accent: #60a5fa;
	--ep-btn: #2563eb;
	--ep-accent-soft: rgba(96, 165, 250, .14);
	--ep-text: #e2e8f0;
	--ep-muted: #94a3b8;
	--ep-bg: #0f1623;
	--ep-surface: #151e2d;
	--ep-border: #263246;
	--ep-code-bg: #0b1120;
}
.ep--500 { --ep-accent: #dc2626; --ep-accent-soft: rgba(220, 38, 38, .1); }
html.dark-mode .ep--500 { --ep-btn: #dc2626; --ep-accent: #f87171; --ep-accent-soft: rgba(248, 113, 113, .14); }

/* big code */
.ep-code { margin: 0; font: 800 clamp(88px, 18vw, 168px)/1 var(--ep-mono); letter-spacing: -.04em; color: var(--ep-text); }
.ep-code span { display: inline-block; padding: 0; line-height: 1; color: var(--ep-accent); animation: ep-bob 3s ease-in-out infinite; }
@keyframes ep-bob { 50% { transform: translateY(-8%); } }
@media (prefers-reduced-motion: reduce) { .ep-code span { animation: none; } }

.ep-head { display: grid; gap: 10px; max-width: 560px; }
.ep h1.ep-title { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.25; color: var(--ep-text); }
.ep-text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ep-muted); }
.ep-path { display: inline-block; max-width: 100%; margin-top: 4px; padding: 4px 10px; font: 500 13.5px/1.5 var(--ep-mono); color: var(--ep-text); background: var(--ep-surface); border: 1px solid var(--ep-border); border-radius: 6px; overflow-wrap: anywhere; }

/* code card */
.ep-snippet { width: min(100%, 420px); margin: 0; padding: 18px 22px; font: 14px/1.7 var(--ep-mono); text-align: left; color: #e2e8f0; white-space: pre-wrap; background: var(--ep-code-bg); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); }
.ep-snippet code { padding: 0; font: inherit; color: inherit; background: none; }
.ep-snippet .s { color: #93c5fd; }
.ep-snippet .p { color: #7dd3fc; }
.ep-snippet .v { color: #fdba74; }
.ep-snippet .c { color: #64748b; font-style: italic; }

/* actions */
.ep-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ep-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.ep-btn i { font-size: 18px; }
.ep-btn--primary { color: #fff; background: var(--ep-btn, var(--ep-accent)); }
.ep-btn--primary:hover { color: #fff; filter: brightness(1.08); }
.ep-btn--ghost { color: var(--ep-text); background: var(--ep-bg); border-color: var(--ep-border); }
.ep-btn--ghost:hover { color: var(--ep-accent); border-color: var(--ep-accent); }
.ep-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ep-accent-soft); }

/* popular links */
.ep-links { width: min(100%, 760px); padding-top: 24px; border-top: 1px solid var(--ep-border); }
.ep h2.ep-links__title { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ep-muted); }
.ep-links ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ep-links li { margin: 0; }
.ep-links a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14.5px; font-weight: 600; line-height: 1.3; text-align: left; color: var(--ep-text); text-decoration: none; background: var(--ep-surface); border: 1px solid var(--ep-border); border-radius: 10px; transition: border-color .15s, color .15s, transform .15s; }
.ep-links a i { flex: none; font-size: 20px; color: var(--ep-accent); }
.ep-links a:hover { color: var(--ep-accent); border-color: var(--ep-accent); transform: translateY(-1px); }
.ep-links a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ep-accent-soft); }
