/* 404.css — themed styles for the branded 404 page.
   Scoped via body.notfound-page to avoid bleeding into other pages. */

body.notfound-page {
    --bg: #0a0e14; --bg-card: #10151c; --bg-alt: #0d1218;
    --border: #1f2937; --border-subtle: #141b24;
    --text: #e6edf3; --text-2: #9ca3af; --text-mute: #6b7785;
    --link: #60a5fa; --accent: #7ee787;
    --green: #238636; --green-bg: #0b2819; --green-text: #6ee7b7;
    --red: #da3633; --red-bg: #2a0e0e; --red-text: #fca5a5;
    --amber: #d29922; --amber-bg: #2a1f08; --amber-text: #fde68a;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    background:
        radial-gradient(ellipse 900px 500px at 50% 0%, rgba(218, 54, 51, 0.07), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.notfound-page ::selection { background: var(--accent); color: #000; }

body.notfound-page .notfound-nav { border-bottom: 1px solid var(--border-subtle); }
body.notfound-page .notfound-nav-inner {
    max-width: 1080px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
}
body.notfound-page .notfound-logo {
    font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: 0.02em;
}
body.notfound-page .notfound-nav-links {
    display: flex; gap: 22px; font-size: 12px; align-items: center;
}
body.notfound-page .notfound-nav-links a { color: var(--text-mute); }
body.notfound-page .notfound-nav-links a:hover { color: var(--text); text-decoration: none; }
body.notfound-page .notfound-status {
    display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-mute);
}
body.notfound-page .notfound-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--red);
    box-shadow: 0 0 8px var(--red);
}

body.notfound-page main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
body.notfound-page .notfound-wrap { width: 100%; max-width: 920px; }

body.notfound-page .ribbon {
    display: flex; align-items: center; gap: 10px;
    font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--red-text); margin-bottom: 22px;
}
body.notfound-page .ribbon::before {
    content: ""; display: block; width: 22px; height: 1px; background: var(--red-text);
}

body.notfound-page .notfound-h1 {
    font-family: var(--sans); font-weight: 500;
    font-size: 56px; line-height: 1.02; letter-spacing: -0.025em;
    margin-bottom: 18px;
}
body.notfound-page .notfound-h1 em {
    font-style: normal; color: var(--red-text); position: relative; white-space: nowrap;
}
body.notfound-page .notfound-h1 em::after {
    content: ""; position: absolute; inset: 52% -3px auto -3px; height: 3px; background: var(--red);
    transform: rotate(-1deg); transform-origin: left;
    animation: nf-strike .6s ease-out .9s both;
}
@keyframes nf-strike {
    from { transform: scaleX(0) rotate(-1deg); }
    to { transform: scaleX(1) rotate(-1deg); }
}

body.notfound-page .notfound-sub {
    color: var(--text-2); font-size: 15px; line-height: 1.65;
    max-width: 640px; margin-bottom: 32px; font-family: var(--sans);
}
body.notfound-page .notfound-sub code {
    color: var(--text); background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1px 6px; border-radius: 3px;
    font-family: var(--mono); font-size: 12.5px; word-break: break-all;
}

body.notfound-page .exhibit {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(218, 54, 51, 0.06), 0 30px 60px -30px rgba(218, 54, 51, 0.12);
    margin-bottom: 28px;
}
body.notfound-page .exhibit-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    font-size: 10px; color: var(--text-mute); letter-spacing: 1.5px; text-transform: uppercase;
}
body.notfound-page .exhibit-bar .dots { display: flex; gap: 5px; }
body.notfound-page .exhibit-bar .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
body.notfound-page .exhibit-bar .dots span:nth-child(1) { background: #3a1112; }
body.notfound-page .exhibit-bar .dots span:nth-child(2) { background: #3a2a08; }
body.notfound-page .exhibit-bar .dots span:nth-child(3) { background: #0e2a13; }
body.notfound-page .exhibit-bar .path {
    margin-left: auto; color: var(--text-mute); font-size: 10px;
    text-transform: none; letter-spacing: 0; max-width: 50%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

body.notfound-page .exhibit-body { padding: 16px 18px; font-size: 12.5px; line-height: 1.75; }
body.notfound-page .line {
    display: flex; gap: 10px; padding: 3px 0;
    opacity: 0; animation: nf-fadeIn .35s ease forwards;
}
body.notfound-page .line .t { color: var(--text-mute); min-width: 46px; }
body.notfound-page .line .prompt { color: var(--accent); min-width: 14px; }
body.notfound-page .line .tag-run { background: rgba(31, 111, 235, 0.15); color: #93c5fd; padding: 0 6px; border-radius: 2px; font-size: 10px; letter-spacing: 1px; }
body.notfound-page .line .tag-fail { background: var(--red-bg); color: var(--red-text); padding: 0 6px; border-radius: 2px; font-size: 10px; letter-spacing: 1px; }
body.notfound-page .line .tag-ok { background: var(--green-bg); color: var(--green-text); padding: 0 6px; border-radius: 2px; font-size: 10px; letter-spacing: 1px; }
body.notfound-page .line .q { color: var(--text-2); font-style: italic; word-break: break-all; }
body.notfound-page .line .dim { color: var(--text-mute); }
body.notfound-page .line .bad { color: var(--red-text); }
body.notfound-page .line .num { color: var(--amber-text); }
body.notfound-page .line .v { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
body.notfound-page .line:nth-child(1) { animation-delay: .1s; }
body.notfound-page .line:nth-child(2) { animation-delay: .35s; }
body.notfound-page .line:nth-child(3) { animation-delay: .65s; }
body.notfound-page .line:nth-child(4) { animation-delay: .95s; }
body.notfound-page .line:nth-child(5) { animation-delay: 1.25s; }
body.notfound-page .line:nth-child(6) { animation-delay: 1.55s; }
body.notfound-page .line:nth-child(7) { animation-delay: 1.85s; }
@keyframes nf-fadeIn { to { opacity: 1; } }

body.notfound-page .verdict {
    margin-top: 14px; padding: 12px 16px;
    background: linear-gradient(180deg, var(--red-bg), transparent 140%);
    border: 1px solid var(--red); border-radius: 4px;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    opacity: 0; animation: nf-fadeIn .4s ease forwards; animation-delay: 2.2s;
}
body.notfound-page .stamp {
    font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
    background: var(--red); color: #fff; padding: 5px 11px; border-radius: 2px;
    position: relative;
    box-shadow: 0 0 0 1px rgba(218, 54, 51, 0.3), 0 0 22px rgba(218, 54, 51, 0.25);
}
body.notfound-page .note {
    font-size: 12px; color: var(--red-text); line-height: 1.55;
    flex: 1; min-width: 240px; font-family: var(--mono);
}
body.notfound-page .note b { color: #fff; }
body.notfound-page .cursor {
    display: inline-block; width: 7px; height: 13px; background: var(--accent);
    vertical-align: middle; margin-left: 2px;
    animation: nf-blink 1s steps(2) infinite;
}
@keyframes nf-blink { 50% { opacity: 0; } }

body.notfound-page .rail {
    display: grid; grid-template-columns: 1fr; gap: 10px;
    opacity: 0; animation: nf-fadeIn .4s ease forwards; animation-delay: 2.6s;
}
@media (min-width: 720px) {
    body.notfound-page .rail { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
body.notfound-page .card-404 {
    display: block;
    border: 1px solid var(--border); background: var(--bg-card); border-radius: 6px;
    padding: 16px 18px; transition: border-color .15s, transform .15s;
    color: var(--text); text-decoration: none;
}
body.notfound-page .card-404:hover {
    border-color: var(--accent); transform: translateY(-1px); text-decoration: none;
}
body.notfound-page .card-404 .k {
    font-size: 10px; letter-spacing: 2px; color: var(--accent);
    text-transform: uppercase; margin-bottom: 6px;
}
body.notfound-page .card-404 .n {
    font-size: 13px; color: var(--text); margin-bottom: 4px;
    font-weight: 500; font-family: var(--sans);
}
body.notfound-page .card-404 .d { font-size: 11px; color: var(--text-mute); line-height: 1.5; }

body.notfound-page .nf-search { margin-top: 22px; opacity: 0; animation: nf-fadeIn .4s ease forwards; animation-delay: 2.8s; }
body.notfound-page .nf-search-label {
    font-size: 10px; letter-spacing: 2px; color: var(--text-mute);
    text-transform: uppercase; margin-bottom: 8px;
}
body.notfound-page .nf-search-row {
    display: flex; gap: 0; border: 1px solid var(--border); border-radius: 6px;
    overflow: hidden; background: var(--bg-card); transition: border-color .15s;
}
body.notfound-page .nf-search-row:focus-within { border-color: var(--accent); }
body.notfound-page .nf-search-row .p {
    padding: 0 12px; display: flex; align-items: center;
    color: var(--accent); font-size: 13px; background: var(--bg-alt);
    border-right: 1px solid var(--border);
}
body.notfound-page .nf-search-row input {
    flex: 1; background: transparent; border: 0; outline: 0;
    font: inherit; color: var(--text); padding: 11px 12px; font-size: 13px;
}
body.notfound-page .nf-search-row input::placeholder { color: var(--text-mute); }
body.notfound-page .nf-search-hints {
    display: flex; gap: 6px; margin-top: 8px;
    font-size: 11px; color: var(--text-mute); flex-wrap: wrap;
}
body.notfound-page .nf-search-hints span {
    border: 1px solid var(--border-subtle); padding: 2px 8px; border-radius: 3px; cursor: pointer;
}
body.notfound-page .nf-search-hints span:hover { border-color: var(--accent); color: var(--accent); }

body.notfound-page .notfound-foot {
    padding: 20px 24px; border-top: 1px solid var(--border-subtle);
    font-size: 11px; color: var(--text-mute);
    display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    max-width: 1080px; margin: 0 auto; width: 100%;
}
body.notfound-page .notfound-foot a { color: var(--text-mute); }
body.notfound-page .notfound-foot .right { font-family: var(--mono); color: var(--text-mute); }
body.notfound-page .notfound-foot .right code { color: var(--red-text); }
