diff --git a/layouts/404.html b/layouts/404.html
index 9703bdc5a1..8377e3d9dd 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -9,49 +9,6 @@
{{- partialCached "favicon.html" . }}
{{- partial "stylesheet.html" (dict "page" . "outputFormat" $outputFormat) }}
-
{{- partial "custom-header.html" . }}
diff --git a/static/css/theme.css b/static/css/theme.css
index a30826eb5e..41cb0ca417 100644
--- a/static/css/theme.css
+++ b/static/css/theme.css
@@ -2376,3 +2376,45 @@ html[dir="rtl"] #R-sidebar ul.collapsible-menu > li > label > i.fa-chevron-right
.term-list ul > li ~ li:before {
content: " | "
}
+
+body.notfound p {
+ text-align: center
+}
+body.notfound #R-body {
+ margin-inline-start: 0;
+ max-width: 100%;
+ min-width: 100%;
+ width: 100%;
+}
+body.notfound h1 {
+ color: var(--MAIN-TEXT-color);
+ line-height: 1;
+ font-size: 5rem;
+ overflow: hidden;
+}
+body.notfound h1 span {
+ font-size: 6.5rem;
+ font-weight: 500;
+}
+body.notfound h1 i {
+ font-size: 5rem;
+ vertical-align: text-top;
+}
+body.notfound h2 {
+ color: var(--MAIN-TEXT-color);
+ font-size: 2.5rem;
+ font-weight: 500;
+ padding: 0;
+ text-align: center;
+}
+body.notfound #shrug svg,
+body.notfound #shrug svg * {
+ color: #000000;
+ color: var(--MAIN-TEXT-color);
+ fill: #000000 !important;
+ fill: var(--MAIN-TEXT-color) !important;
+}
+body.notfound #shrug svg {
+ transform: scaleX(-1);
+ width: 15rem;
+}