/* 404 page - deliberately isolated from the shared .hero/.container layout instead of
   reusing it: .container's flex:1 (grid.css) stretches .main to fill the leftover viewport
   height on any short page, and the old .hero was fixed-height content sitting at the top of
   that stretched box, so a page this short left a big dead gap between the hero and the
   footer with no easy way to fix it without touching hero.css/grid.css (shared by every
   other page). Scoped entirely under .notfound-page so it can't affect - or be broken by -
   anything outside this file/template.
   flex:1 alone isn't enough to reliably center this: it only has something to grow into
   when the page's total content is shorter than the viewport. The footer's three stacked
   diagnostics/quiz/stats cards make the full page taller than one viewport on most real
   window sizes (not just narrow ones - a modest laptop height hits this too), so there's no
   leftover space for flex:1 to distribute and the card just shrinks to its own content
   height instead, sitting flush under the header with a dead gap below it before the
   (much taller) footer - reading as "stuck at the top," not centered. The explicit
   min-height guarantees real room to center in regardless of how tall the rest of the page
   ends up being. */
.main:has(.notfound-page){
     display:flex;
}
.notfound-page{
     position:relative;
     flex:1;
     display:flex;
     align-items:center;
     justify-content:center;
     text-align:center;
     overflow:hidden;
     padding:48px 16px;
     min-height:min(560px, 65vh);
     border:1px solid var(--border-soft);
     background:var(--card);
}
/* Same ASCII-noise technique as .hero-ascii (backgrounds.js's [data-ascii-fill] hook), under
   this page's own class so it's never coupled to .hero's own styling. */
.notfound-ascii{
     position:absolute;
     inset:0;
     z-index:0;
     pointer-events:none;
     opacity:0.15;
     font-family:"Geist Mono", monospace;
     font-size:9px;
     line-height:10px;
     letter-spacing:1px;
     white-space:pre;
     color:var(--foreground);
     overflow:hidden;
     filter:contrast(1.1);
}
:is([data-theme="mono"],[data-color-scheme="dark"]) .notfound-ascii{
     opacity:0.13;
}
.notfound-ascii pre{
     margin:0;
     width:100%;
     height:100%;
     overflow:hidden;
     white-space:pre;
     line-height:10px;
     padding:0;
     font-size:inherit;
     letter-spacing:inherit;
}
.notfound-content{
     position:relative;
     z-index:1;
     max-width:480px;
     animation:fadeIn .4s ease;
}
.notfound-code{
     font-family:var(--display);
     font-size:clamp(96px, 18vw, 200px);
     line-height:1;
     font-weight:400;
     letter-spacing:-.03em;
     color:var(--foreground);
     opacity:0.92;
}
.notfound-title{
     margin:8px 0 0;
     font-family:var(--display);
     font-size:clamp(20px, 2.6vw, 26px);
     letter-spacing:-.02em;
     line-height:1.15;
     font-weight:400;
     color:var(--foreground);
}
.notfound-message{
     margin:10px auto 0;
     color:var(--muted-foreground);
     font-size:14px;
     line-height:1.5;
     max-width:400px;
}
.notfound-search{
     max-width:340px;
     margin:22px auto 0;
     text-align:left;
}
.notfound-cta{
     margin-top:18px;
}
@media (max-width:480px){
     .notfound-page{ padding:32px 16px; }
     .notfound-code{ font-size:clamp(72px, 24vw, 120px); }
}
