
/* =========================================
   N0ERBJ3RG ARCHIVES
   MAIN STYLESHEET
========================================= */

* {
    box-sizing: border-box;
}

:root {
    --background: #101311;
    --panel: #171c19;
    --panel-light: #202722;
    --border: #343d36;
    --text: #c4c9c1;
    --muted: #788078;
    --green: #91a88f;
    --red: #a76d68;
}

body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Courier New", monospace;
    font-size: 14px;
    min-height: 100vh;
}

/* =========================================
   TOP BAR
========================================= */

.topbar {
    width: 100%;
    height: 65px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #151a17;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #d0d4cc;
}

.logo span {
    color: var(--green);
}

.connection {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.green-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7b9c78;
    box-shadow: 0 0 8px #7b9c78;
}

/* =========================================
   MAIN CONTENT
========================================= */

main {
    width: 86%;
    max-width: 950px;
    margin: 75px auto;
}

.welcome {
    padding-bottom: 45px;
    border-bottom: 1px solid var(--border);
}

.overline {
    color: var(--green);
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 18px;
}

h1 {
    font-size: clamp(42px, 8vw, 68px);
    letter-spacing: 5px;
    font-weight: normal;
    margin: 0;
    color: #d3d5ce;
}

h1 span {
    color: var(--green);
}

.subtitle {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 12px;
}

/* =========================================
   SYSTEM INFORMATION
========================================= */

.system-info {
    display: flex;
    gap: 55px;
    margin-top: 45px;
    flex-wrap: wrap;
}

.system-info div {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.system-info small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.system-info strong {
    color: var(--green);
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 1px;
}

/* =========================================
   SECTION TITLES
========================================= */

.directory,
.access-section {
    margin-top: 45px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--green);
}

.muted {
    color: var(--muted);
}

/* =========================================
   FOLDER BUTTONS
========================================= */

.folder-row {
    display: block;
    width: 100%;
    text-align: left;
    padding: 19px 17px;
    margin: 7px 0;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
}

.folder-row:hover {
    background: var(--panel-light);
    border-color: #687568;
    padding-left: 25px;
}

.folder-row.locked {
    color: #59615b;
    cursor: not-allowed;
    opacity: 0.6;
}

.folder-row.locked:hover {
    padding-left: 17px;
    background: var(--panel);
    border-color: var(--border);
}

/* =========================================
   ACCESS CONTROL
========================================= */

.access-box {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 22px;
}

.access-box p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 0;
}

.access-input {
    display: flex;
    gap: 10px;
}

.access-input input {
    flex: 1;
    min-width: 0;
    padding: 13px;
    background: #0d100e;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.access-input input:focus {
    border-color: var(--green);
}

.access-input button {
    padding: 0 25px;
    background: #29342c;
    border: 1px solid #536653;
    color: var(--green);
    font-family: inherit;
    cursor: pointer;
}

.access-input button:hover {
    background: #39483b;
}

#accessFeedback {
    margin-top: 13px;
    font-size: 11px;
    letter-spacing: 1px;
}

/* =========================================
   FOOTER
========================================= */

footer {
    margin-top: 75px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    color: #59615b;
    font-size: 10px;
    text-align: center;
    letter-spacing: 1px;
}

/* =========================================
   MODAL WINDOWS
========================================= */

.modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    padding: 7vh 20px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal > * {
    width: 100%;
    max-width: 850px;
}

.modal h2 {
    padding: 20px;
    margin: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--green);
    font-size: 15px;
    font-weight: normal;
    letter-spacing: 2px;
}

.modal > button {
    max-width: 850px;
}

/* =========================================
   FILE LIST
========================================= */

.file-list {
    width: 100%;
    max-width: 850px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-top: none;
    padding: 10px;
}

.file-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 17px;
    margin-bottom: 5px;
    background: #131815;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.file-row:hover {
    background: #252d27;
    border-color: #657565;
}

/* =========================================
   DOCUMENT CONTENT
========================================= */

#documentContent {
    width: 100%;
    max-width: 850px;
    background: #141916;
    border: 1px solid var(--border);
    border-top: none;
    padding: 15px;
    overflow: hidden;
}

.document-text {
    display: block;
    width: 100%;
    margin: 0;
    padding: 25px;
    background: #101411;
    border: 1px solid var(--border);
    color: #c4c9c1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: auto;
    letter-spacing: 0.2px;
}


/* =========================================
   IMAGE VIEWER
========================================= */

.image-tools {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: #171b19;
    border: 1px solid #39413d;
    color: #a9b4aa;
    font-size: 11px;
    letter-spacing: 1px;
}

.image-buttons {
    display: flex;
    gap: 6px;
}

.image-tools button {
    padding: 8px 13px;
    background: #252c28;
    color: #c5d0c5;
    border: 1px solid #59645b;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.image-tools button:hover {
    background: #39463d;
    border-color: var(--green);
}

.image-viewport {
    width: 100%;
    height: 65vh;
    overflow: auto;
    background: #0b0d0c;
    border: 1px solid #39413d;
    margin-top: 8px;
    text-align: center;
}

.document-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0 auto;
    object-fit: contain;
}

/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: #101411;
}

::-webkit-scrollbar-thumb {
    background: #39443b;
    border: 2px solid #101411;
}

::-webkit-scrollbar-thumb:hover {
    background: #627263;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {
    .topbar {
        padding: 0 5%;
    }

    main {
        width: 90%;
        margin-top: 45px;
    }

    .system-info {
        gap: 25px;
    }

    .section-title {
        font-size: 10px;
    }

    .file-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal {
        padding: 3vh 10px;
    }

    .image-viewport {
        height: 60vh;
    }

    .image-tools {
        align-items: flex-start;
    }
}

/* =========================================
   SUBJECT PROFILE / PERSONREGISTRERING
========================================= */

.subject-profile {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 20px;
    background: #101411;
    border: 1px solid var(--border);
}

.subject-portrait {
    display: block;
    width: 155px;
    height: 190px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%) contrast(1.15);
    border: 1px solid #566057;
    background: #080a09;
}

.subject-details {
    flex: 1;
    min-width: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.8;
}

.subject-details h3 {
    color: var(--green);
    font-family: "Courier New", monospace;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 2px;
    margin: 0 0 15px;
}

.subject-details p {
    margin: 5px 0;
    color: var(--text);
}

.subject-details strong {
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: 11px;
}

.subject-observations-title {
    margin: 25px 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--green);
    font-size: 12px;
    font-weight: normal;
    letter-spacing: 2px;
}

.subject-observations {
    padding-left: 20px;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 2;
}

.subject-observations li {
    padding-left: 5px;
    margin-bottom: 5px;
}

.subject-record-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 1px;
    line-height: 1.8;
}

@media (max-width: 500px) {
    .subject-profile {
        flex-direction: column;
    }

    .subject-portrait {
        width: 130px;
        height: 160px;
    }
}

/* MISSING SUBJECT IMAGE */

.subject-image-missing {
    width: 155px;
    height: 190px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #080a09;
    border: 1px solid #566057;
    color: #747d75;
    font-family: "Courier New", monospace;
    font-size: 10px;
    text-align: center;
    letter-spacing: 1px;
}

.subject-image-missing strong {
    color: #a76d68;
    font-size: 14px;
    font-weight: normal;
}

.subject-image-missing small {
    color: #555e56;
    font-size: 8px;
}

@media (max-width: 500px) {
    .subject-image-missing {
        width: 130px;
        height: 160px;
    }
}


/* =========================================
   PRIVAT ARKIVSERVER · LOGIN OG OPSTART
========================================= */

.login-screen,
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 14, 11, 0.97);
}

.login-screen.hidden,
.loading-screen.hidden {
    display: none;
}

.login-panel,
.loading-panel {
    width: 100%;
    max-width: 390px;
    padding: 30px;
    background: #151b17;
    border: 1px solid #3a463c;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.login-brand {
    color: #d0d4cc;
    font-family: "Courier New", monospace;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
}

.login-brand span {
    color: var(--green);
}

.login-divider {
    height: 1px;
    margin: 18px 0 25px;
    background: var(--border);
}

.login-system-label {
    color: var(--green);
    font-size: 10px;
    letter-spacing: 2px;
}

.login-heading h1 {
    margin: 10px 0 8px;
    color: #d3d5ce;
    font-size: 27px;
    font-weight: normal;
    letter-spacing: 3px;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.login-form label {
    color: var(--green);
    font-size: 10px;
    letter-spacing: 1.5px;
}

.login-form input {
    width: 100%;
    padding: 13px 14px;
    background: #0c100d;
    border: 1px solid #3b463d;
    border-radius: 0;
    outline: none;
    color: var(--text);
    font-family: "Courier New", monospace;
    font-size: 14px;
}

.login-form input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 1px rgba(145, 168, 143, 0.12);
}

.login-form button {
    margin-top: 5px;
    padding: 13px;
    background: #29352c;
    border: 1px solid #536653;
    color: #b8c8b5;
    font-family: "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.login-form button:hover {
    background: #354538;
    border-color: var(--green);
}

.login-feedback {
    min-height: 15px;
    color: #bd7777;
    font-size: 10px;
    letter-spacing: 1px;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 23px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: #687268;
    font-size: 9px;
    letter-spacing: 1px;
}

.loading-panel h2 {
    margin: 10px 0 25px;
    color: #d3d5ce;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 2px;
}

.last-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 22px 0;
    padding: 14px;
    background: #0d120e;
    border: 1px solid var(--border);
}

.last-login span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1.5px;
}

.last-login strong {
    color: var(--green);
    font-size: 12px;
    font-weight: normal;
}

.loading-track {
    height: 4px;
    overflow: hidden;
    background: #303a32;
}

.loading-progress {
    width: 0;
    height: 100%;
    background: #91a88f;
    animation: archive-loading 2.4s ease-in-out forwards;
}

.loading-message {
    margin-top: 12px;
    color: #849184;
    font-size: 10px;
    letter-spacing: 1px;
}

@keyframes archive-loading {
    0% { width: 0; }
    35% { width: 38%; }
    70% { width: 72%; }
    100% { width: 100%; }
}

@media (max-width: 480px) {
    .login-panel,
    .loading-panel {
        padding: 23px;
    }

    .login-footer {
        flex-direction: column;
    }
}

/* =========================================
   DISKRET VHS / CRT-SKÆRMEFFEKT
========================================= */

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.025) 0px,
        rgba(255, 255, 255, 0.025) 1px,
        transparent 1px,
        transparent 4px
    );
    opacity: 0.45;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 65%,
        rgba(0, 0, 0, 0.18) 100%
    );
}

/* Sjældne, korte signalforstyrrelser */
#vhs-glitch {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
}

#vhs-glitch.active {
    animation: vhs-flicker 0.35s steps(2, end);
}

#vhs-glitch::before {
    content: "";
    position: absolute;
    left: 0;
    top: 35%;
    width: 100%;
    height: 3px;
    background: rgba(210, 230, 210, 0.12);
    opacity: 0;
}

#vhs-glitch.active::before {
    animation: vhs-line 0.35s steps(2, end);
}

@keyframes vhs-flicker {
    0% { opacity: 0; }
    15% {
        opacity: 0.35;
        background: rgba(180, 200, 180, 0.025);
    }
    30% { opacity: 0.1; }
    55% {
        opacity: 0.25;
        background: rgba(180, 200, 180, 0.035);
    }
    100% { opacity: 0; }
}

@keyframes vhs-line {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    30% {
        opacity: 1;
        transform: translateY(30px);
    }
    70% {
        opacity: 0.6;
        transform: translateY(80px);
    }
    100% {
        opacity: 0;
        transform: translateY(120px);
    }
}

@media (prefers-reduced-motion: reduce) {
    #vhs-glitch,
    #vhs-glitch::before,
    .loading-progress {
        animation: none !important;
    }
}


/* =========================================
   LOGO-OPSTART OG LYDKONTROL
========================================= */

.startup-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 185px;
    margin: -12px 0 12px;
    overflow: hidden;
    background: #080d09;
    border: 1px solid #303b32;
    animation: startup-logo-frame 3.2s ease-out both;
}

.startup-logo {
    display: block;
    height: 178px;
    max-width: 100%;
    object-fit: contain;
    opacity: 0;
    filter: grayscale(1) sepia(0.18) hue-rotate(55deg) saturate(0.65)
            drop-shadow(0 0 7px rgba(145, 168, 143, 0.16));
    animation: startup-logo-reveal 2.7s ease-out 0.15s forwards;
}

@keyframes startup-logo-reveal {
    0% {
        opacity: 0;
        transform: scale(1.035);
        filter: grayscale(1) brightness(0.35) blur(2px);
    }
    18% { opacity: 0.35; }
    24% { opacity: 0.12; }
    32% { opacity: 0.72; }
    38% { opacity: 0.45; }
    55% {
        opacity: 0.92;
        transform: scale(1);
        filter: grayscale(1) sepia(0.18) hue-rotate(55deg) saturate(0.65)
                drop-shadow(0 0 7px rgba(145, 168, 143, 0.16));
    }
    100% { opacity: 1; }
}

@keyframes startup-logo-frame {
    0% { border-color: transparent; }
    35% { border-color: #667866; }
    100% { border-color: #303b32; }
}

.sound-toggle {
    margin-left: 12px;
    padding: 5px 8px;
    background: transparent;
    border: 1px solid #3b463d;
    color: var(--green);
    font-family: "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 1px;
    cursor: pointer;
}

.sound-toggle:hover {
    border-color: var(--green);
    background: #202a22;
}

@media (max-width: 600px) {
    .connection {
        gap: 6px;
        font-size: 9px;
    }
    .sound-toggle {
        margin-left: 3px;
        padding: 4px 5px;
        font-size: 8px;
    }
    .startup-logo-wrap {
        height: 155px;
    }
    .startup-logo {
        height: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .startup-logo,
    .startup-logo-wrap {
        animation: none !important;
    }
    .startup-logo {
        opacity: 1;
        filter: grayscale(1) sepia(0.18) hue-rotate(55deg) saturate(0.65);
    }
}


/* =========================================
   OPDATERET LOGIN OG FULDskÆRMS-OPSTART
========================================= */

/* Login-skærmen er helt dækkende, så arkivet ikke kan ses bagved. */
.login-screen {
    background: #090d0a !important;
    opacity: 1;
    backdrop-filter: none;
}

/* Opstarten bruger hele skærmen i stedet for et lille vindue. */
.loading-screen {
    padding: 0;
    overflow: hidden;
    background: #080c09;
}

.loading-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100vh;
    padding: 30px 24px 120px;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: center;
}

/* Logoet er nu det centrale element og fylder det meste af skærmen. */
.startup-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(76vw, 620px);
    height: min(68vh, 760px);
    margin: 0 auto 18px;
    overflow: visible;
    background: transparent;
    border: 0;
    animation: none;
}

.startup-logo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    opacity: 0;
    filter: grayscale(1) sepia(0.18) hue-rotate(55deg) saturate(0.65)
            drop-shadow(0 0 12px rgba(145, 168, 143, 0.20));
    animation: startup-logo-reveal 2.7s ease-out 0.15s forwards;
}

.loading-panel > .login-brand,
.loading-panel > .login-divider {
    display: none;
}

.loading-panel > .login-system-label {
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 3px;
}

.loading-panel > h2 {
    margin: 10px 0 0;
    font-size: clamp(16px, 2vw, 22px);
    letter-spacing: 3px;
}

/* Sidste login vises diskret i øverste højre hjørne. */
.loading-panel .last-login {
    position: absolute;
    top: 26px;
    right: 30px;
    min-width: 210px;
    margin: 0;
    padding: 10px 13px;
    text-align: left;
    background: rgba(13, 18, 14, 0.72);
}

/* Indlæsningsbjælken ligger helt nede ved skærmens bund. */
.loading-panel .loading-track {
    position: fixed;
    left: 8%;
    bottom: 34px;
    width: 84%;
    height: 5px;
    border: 1px solid #39443b;
    background: #1a241c;
}

.loading-panel .loading-progress {
    box-shadow: 0 0 10px rgba(145, 168, 143, 0.35);
}

.loading-panel .loading-message {
    position: fixed;
    left: 8%;
    bottom: 49px;
    margin: 0;
    text-align: left;
    font-size: 10px;
    letter-spacing: 2px;
}

@media (max-width: 600px) {
    .loading-panel {
        padding: 20px 14px 105px;
    }

    .startup-logo-wrap {
        width: 94vw;
        height: 62vh;
        margin-bottom: 14px;
    }

    .loading-panel .last-login {
        top: 14px;
        right: 14px;
        min-width: 0;
        max-width: 75%;
        padding: 8px 10px;
    }

    .loading-panel .last-login strong {
        font-size: 10px;
    }

    .loading-panel .loading-track {
        left: 5%;
        bottom: 24px;
        width: 90%;
    }

    .loading-panel .loading-message {
        left: 5%;
        bottom: 39px;
        font-size: 9px;
    }
}


/* =========================================
   MERE MINIMALISTISK LOGO + LÆNGERE OPSTART
========================================= */

.startup-logo-wrap {
    width: min(58vw, 500px);
    height: min(62vh, 560px);
    margin: 0 auto 22px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.startup-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(145, 168, 143, 0.10));
    animation: startup-logo-reveal 5.8s ease-out 0.3s forwards;
}

@keyframes startup-logo-reveal {
    0% {
        opacity: 0;
        transform: scale(0.985);
        filter: brightness(0.45) blur(1.5px);
    }
    14% { opacity: 0.22; }
    19% { opacity: 0.12; }
    28% { opacity: 0.55; }
    34% { opacity: 0.38; }
    52% {
        opacity: 0.82;
        filter: drop-shadow(0 0 5px rgba(145, 168, 143, 0.10));
    }
    100% {
        opacity: 0.92;
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(145, 168, 143, 0.10));
    }
}

.loading-panel .loading-progress {
    animation-duration: 6.2s;
}

@media (max-width: 600px) {
    .startup-logo-wrap {
        width: 82vw;
        height: 54vh;
    }
}


/* =====================================================
   N0ERBJ3RG · HELHEDSDESIGN
   RETRO CRT-ARKIV / TERMINAL
===================================================== */

:root {
    --background: #050906;
    --panel: rgba(8, 15, 10, 0.88);
    --panel-light: rgba(17, 29, 19, 0.92);
    --border: rgba(139, 165, 126, 0.34);
    --text: #c1ceb8;
    --muted: #687663;
    --green: #a5bb91;
    --red: #a76d68;
}

html {
    min-height: 100%;
    background: #050906;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% 38%, rgba(43, 65, 39, 0.16), transparent 48%),
        linear-gradient(180deg, #080e09 0%, #040705 100%);
    font-family: "Courier New", monospace;
    letter-spacing: 0.2px;
}

/* Fin CRT-struktur og mørke kanter */
body::before {
    z-index: 9996;
    background: radial-gradient(
        ellipse at center,
        transparent 48%,
        rgba(0, 0, 0, 0.42) 100%
    );
}

body::after {
    z-index: 9997;
    opacity: 0.30;
    background: repeating-linear-gradient(
        to bottom,
        rgba(210, 230, 195, 0.035) 0px,
        rgba(210, 230, 195, 0.035) 1px,
        transparent 1px,
        transparent 4px
    );
}

/* Hjørnemarkeringer som på en gammel monitor */
.screen-frame {
    position: fixed;
    inset: 0;
    z-index: 9995;
    pointer-events: none;
    --frame-inset: 22px;
    --frame-length: 48px;
    --frame-thickness: 2px;
    opacity: 0.48;
}

.topbar {
    position: relative;
    z-index: 2;
    height: 58px;
    padding: 0 8%;
    background: rgba(4, 8, 5, 0.68);
    border-bottom: 1px solid rgba(145, 168, 143, 0.22);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.22);
}

.logo {
    color: #c9d4bf;
    font-family: "Courier New", monospace;
    font-size: 13px;
    letter-spacing: 4px;
    text-shadow: 0 0 9px rgba(165, 187, 145, 0.18);
}

.logo span {
    color: var(--green);
}

.connection {
    color: #83917c;
    font-size: 9px;
    letter-spacing: 1.6px;
}

.green-dot {
    width: 6px;
    height: 6px;
    background: #a3bd8c;
    box-shadow: 0 0 10px rgba(163, 189, 140, 0.65);
}

main {
    position: relative;
    z-index: 1;
    width: min(86%, 1020px);
    max-width: 1020px;
    margin: 48px auto 70px;
}

.welcome {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 28px;
    align-items: center;
    padding: 30px 34px 34px;
    border: 1px solid rgba(145, 168, 143, 0.22);
    background:
        linear-gradient(135deg, rgba(17, 29, 19, 0.62), rgba(5, 9, 6, 0.7));
    box-shadow: inset 0 0 45px rgba(110, 145, 93, 0.035), 0 15px 45px rgba(0,0,0,0.2);
}

.archive-emblem {
    grid-row: 1 / span 3;
    width: 145px;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.82;
}

.archive-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 7px rgba(165, 187, 145, 0.16));
}

.overline {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 9px;
    letter-spacing: 3px;
}

.welcome h1 {
    color: #d0dac8;
    font-size: clamp(36px, 6vw, 58px);
    letter-spacing: 8px;
    text-shadow: 0 0 18px rgba(165, 187, 145, 0.12);
}

.welcome h1 span {
    color: var(--green);
}

.subtitle {
    margin-top: 9px;
    color: #81907b;
    font-size: 9px;
    letter-spacing: 2px;
}

.system-info {
    grid-column: 1 / -1;
    gap: 0;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(145, 168, 143, 0.18);
}

.system-info div {
    min-width: 150px;
    padding-right: 18px;
}

.system-info small {
    color: #72816c;
    font-size: 9px;
    letter-spacing: 1.5px;
}

.system-info strong {
    color: #b3c59f;
    font-size: 12px;
    letter-spacing: 2px;
}

.directory,
.access-section {
    margin-top: 34px;
}

.section-title {
    padding: 0 2px 13px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(145, 168, 143, 0.28);
    color: var(--green);
    font-size: 10px;
    letter-spacing: 2.5px;
}

.section-title .muted {
    color: #64715f;
    font-size: 9px;
}

.folder-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 66px;
    padding: 13px 18px;
    margin: 8px 0;
    background: linear-gradient(90deg, rgba(17, 29, 19, 0.82), rgba(7, 12, 8, 0.76));
    border: 1px solid rgba(145, 168, 143, 0.22);
    color: #c1ceb8;
    font-family: "Courier New", monospace;
    text-align: left;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.folder-row:hover {
    padding-left: 18px;
    transform: translateX(4px);
    background: linear-gradient(90deg, rgba(34, 52, 34, 0.86), rgba(9, 16, 10, 0.86));
    border-color: rgba(165, 187, 145, 0.58);
    box-shadow: inset 3px 0 0 rgba(165, 187, 145, 0.55);
}

.folder-icon {
    color: #a9bd91;
    font-size: 18px;
    opacity: 0.82;
}

.file-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
}

.file-info strong {
    color: #c7d3bd;
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 2px;
}

.file-info small {
    color: #71806b;
    font-size: 9px;
    letter-spacing: 1px;
}

.arrow,
.lock-label {
    color: #829579;
    font-size: 10px;
    letter-spacing: 1px;
}

.folder-row.locked {
    opacity: 0.43;
    background: rgba(8, 12, 9, 0.6);
}

.folder-row.locked:hover {
    padding-left: 18px;
    transform: none;
    border-color: rgba(145, 168, 143, 0.22);
    box-shadow: none;
}

.access-box {
    padding: 22px;
    background: rgba(7, 12, 8, 0.82);
    border: 1px solid rgba(145, 168, 143, 0.25);
    box-shadow: inset 0 0 30px rgba(110, 145, 93, 0.025);
}

.access-box p {
    color: #7e8b77;
    font-size: 10px;
    letter-spacing: 0.8px;
}

.access-input input {
    background: #030604;
    border-color: rgba(145, 168, 143, 0.30);
    color: #d0dac8;
}

.access-input input:focus {
    border-color: #a5bb91;
    box-shadow: 0 0 10px rgba(165, 187, 145, 0.08);
}

.access-input button {
    padding: 0 28px;
    background: rgba(37, 56, 38, 0.72);
    border-color: rgba(145, 168, 143, 0.48);
    color: #b9cba9;
    font-size: 10px;
    letter-spacing: 1.5px;
}

.access-input button:hover {
    background: rgba(53, 76, 51, 0.82);
}

#accessFeedback {
    color: #9caf91;
}

footer {
    margin-top: 55px;
    padding: 18px 0;
    border-top: 1px solid rgba(145, 168, 143, 0.20);
    color: #566251;
    font-size: 9px;
    letter-spacing: 1.5px;
}

footer p {
    color: #465343;
    font-size: 9px;
}

/* Filvinduer: terminalpaneler frem for almindelige modalbokse */
.modal {
    z-index: 11000;
    padding: 7vh 20px;
    background: rgba(0, 3, 1, 0.94);
    backdrop-filter: blur(2px);
}

.modal-window {
    position: relative;
    border: 1px solid rgba(145, 168, 143, 0.42);
    background: #080e09;
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.72), inset 0 0 35px rgba(100, 135, 84, 0.035);
}

.modal h2 {
    background: #101a11;
    border: 0;
    border-bottom: 1px solid rgba(145, 168, 143, 0.30);
    color: #b9cba9;
    font-size: 12px;
    letter-spacing: 2px;
}

.modal .overline {
    padding: 18px 20px 0;
    margin: 0;
    color: #829579;
}

.modal > button,
.modal-window > .close {
    color: #a5bb91;
}

.file-list {
    background: #080e09;
    border: 0;
}

.file-row {
    background: rgba(14, 23, 15, 0.78);
    border-color: rgba(145, 168, 143, 0.16);
    color: #c1ceb8;
}

.file-row:hover {
    background: rgba(30, 46, 29, 0.82);
    border-color: rgba(165, 187, 145, 0.45);
}

/* Login bevarer enkeltheden, men får samme CRT-terminalflade */
.login-screen {
    z-index: 12000;
    background:
        radial-gradient(ellipse at center, rgba(34, 52, 34, 0.16), transparent 52%),
        #040705 !important;
}

.login-panel,
.loading-panel {
    background: transparent;
    border-color: rgba(145, 168, 143, 0.34);
    box-shadow: 0 0 55px rgba(0, 0, 0, 0.45), inset 0 0 50px rgba(100, 135, 84, 0.035);
}

.login-brand {
    color: #cbd6c2;
    letter-spacing: 4px;
}

.login-heading h1 {
    color: #d0dac8;
    letter-spacing: 4px;
}

.login-form input {
    background: #030604;
    border-color: rgba(145, 168, 143, 0.34);
    color: #d0dac8;
}

.login-form button {
    background: rgba(37, 56, 38, 0.72);
    border-color: rgba(145, 168, 143, 0.48);
    color: #b9cba9;
}

.loading-screen {
    z-index: 12000;
    background:
        radial-gradient(ellipse at center, rgba(34, 52, 34, 0.13), transparent 56%),
        #040705;
}

/* Lydknap */
.sound-toggle {
    border-color: rgba(145, 168, 143, 0.30);
    color: #9caf91;
    background: rgba(8, 14, 9, 0.6);
}

/* Mobil */
@media (max-width: 700px) {
    .screen-frame {
        opacity: 0.30;
    }

    .topbar {
        padding: 0 5%;
    }

    main {
        width: 90%;
        margin-top: 28px;
    }

    .welcome {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 15px;
        padding: 20px 16px;
    }

    .archive-emblem {
        width: 76px;
        height: 95px;
    }

    .welcome h1 {
        font-size: clamp(28px, 8vw, 42px);
        letter-spacing: 4px;
    }

    .system-info {
        gap: 18px;
    }

    .system-info div {
        min-width: 125px;
    }

    .folder-row {
        min-height: 62px;
        padding: 12px;
    }

    .file-info strong {
        font-size: 10px;
    }

    .file-info small {
        font-size: 8px;
    }

    .access-input {
        flex-direction: column;
    }

    .access-input button {
        min-height: 42px;
    }

    footer {
        line-height: 1.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .folder-row,
    .startup-logo {
        transition: none !important;
        animation: none !important;
    }
}


/* Logoet vises kun under opstart – ikke på arkivets hovedside */
.archive-emblem {
    display: none !important;
}


/* Four identical corner boxes keep the frame joints and insets consistent. */
.screen-corner {
    position: absolute;
    box-sizing: border-box;
    width: var(--frame-length);
    height: var(--frame-length);
    border-top: var(--frame-thickness) solid var(--green);
    border-left: var(--frame-thickness) solid var(--green);
    transform-origin: center;
}
.screen-corner.top-left { top: var(--frame-inset); left: var(--frame-inset); }
.screen-corner.top-right { top: var(--frame-inset); right: var(--frame-inset); transform: scaleX(-1); }
.screen-corner.bottom-left { bottom: var(--frame-inset); left: var(--frame-inset); transform: scaleY(-1); }
.screen-corner.bottom-right { right: var(--frame-inset); bottom: var(--frame-inset); transform: scale(-1,-1); }


/* Luk-knapper i samme afdæmpede CRT-terminalstil som resten af arkivet */
.modal-window > .close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--green);
    background: rgba(8, 15, 10, 0.92);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: inherit;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(165, 187, 145, 0.28);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.modal-window > .close:hover {
    color: #d0ddc3;
    background: rgba(35, 51, 34, 0.96);
    border-color: var(--green);
}

.modal-window > .close:focus-visible {
    outline: 1px solid var(--green);
    outline-offset: 3px;
}

/* NYT ARKIV prototype additions */
.intro-note{margin-top:28px;max-width:680px;color:var(--muted);line-height:1.8;border-left:2px solid var(--green);padding:10px 16px;background:rgba(145,168,143,.045)}
.search-section{margin-top:45px}.archive-text{white-space:pre-wrap;line-height:1.8;color:var(--text);font:inherit;background:#0b100d;border:1px solid var(--border);padding:20px;overflow-wrap:anywhere}.document-image{display:block;max-width:100%;height:auto;margin:14px auto;border:1px solid var(--border)}
#searchFeedback,#accessFeedback{margin-top:12px;min-height:18px;color:var(--green);font-size:12px;letter-spacing:.5px}.file-row{cursor:pointer}.file-row:hover{border-color:var(--green)}audio{filter:sepia(.2)}
@media(max-width:600px){.connection{font-size:8px;gap:5px}.topbar{padding:0 5%}.system-info{gap:22px}.intro-note{font-size:12px}}


/* Prototype 002 fixes: restored archive mark + first-login notice */
.brand-lockup{display:flex;align-items:center;gap:12px;min-width:0}
.brand-mark{width:30px;height:42px;object-fit:cover;object-position:center 54%;border:1px solid #343d36;opacity:.9;filter:grayscale(.25) sepia(.2)}
.topbar .logo{display:block}
.notice-window{max-width:560px}
.notice-window h2{margin:8px 0 20px;color:#d3d5ce;letter-spacing:2px;font-weight:normal}
.notice-window .archive-text{white-space:pre-wrap;line-height:1.8;margin:0 0 22px}
.notice-confirm{width:100%;padding:14px;background:#202722;border:1px solid #687568;color:#c4c9c1;font-family:inherit;letter-spacing:1.5px;cursor:pointer}
.notice-confirm:hover{background:#29332c;border-color:#91a88f}
.system-notice{z-index:10020}
.folder-row.locked{position:relative}
.folder-row.locked .arrow{color:#59615b}


/* Prototype 003: readable typography, persistent notice, restored loading emblem */
:root { --font-ui: "Segoe UI", Arial, Helvetica, sans-serif; }
html, body, button, input, textarea, select, pre, code, .archive-text,
.login-brand, .logo, .connection, .overline, .section-title, .folder-row,
.file-row, .login-form, .login-heading, .login-footer, .loading-panel,
.modal-window, footer, .system-info, .subtitle, .intro-note {
  font-family: var(--font-ui) !important;
}
body { font-size: 15px; line-height: 1.55; }
.logo, .login-brand { letter-spacing: 2px; }
.overline, .section-title, .subtitle, .connection, .system-info small,
.system-info strong, .folder-row, .login-form label, .login-system-label,
.login-footer, .loading-message, .file-info small, #searchFeedback,
#accessFeedback { letter-spacing: .65px; }
.folder-row { font-size: 14px; }
.file-info strong { font-size: 14px; }
.file-info small { font-size: 11px; }
.access-box p, .intro-note { font-size: 14px; }
.archive-text { font-family: var(--font-ui) !important; font-size: 15px; line-height: 1.75; }
.file-row { font-family: var(--font-ui) !important; font-size: 14px; }
.notice-window { position: relative; }
.notice-close { z-index: 2; }
.loading-logo {
  display: block;
  width: min(190px, 48vw);
  height: 235px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 10px rgba(145,168,143,.16));
}
.loading-panel { text-align: center; }
.loading-panel .login-divider { margin-left: auto; margin-right: auto; }
.loading-panel .last-login { text-align: left; }
#systemNoticeOpen { margin-left: 10px; }
@media (max-width: 650px) {
 .loading-logo { height: 190px; }
 .connection { flex-wrap: wrap; justify-content: flex-end; }
}


/* PROTOTYPE 004 — integrated loading identity + softer archive interactions */
.loading-screen {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(91, 119, 87, .17), transparent 42%),
    repeating-linear-gradient(0deg, rgba(160,190,150,.025) 0 1px, transparent 1px 4px),
    #040705 !important;
}
.loading-screen::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: url("assets/n0erbj3rg-logo.png") center 42% / min(620px, 76vw) auto no-repeat;
  opacity: .105;
  filter: grayscale(1) blur(1px);
  transform: scale(1.04);
  animation: identity-breathe 7s ease-in-out infinite;
}
.loading-screen::after {
  content: "";
  position: absolute;
  inset: 22px;
  pointer-events: none;
  border: 1px solid rgba(145,168,143,.16);
  box-shadow: inset 0 0 65px rgba(145,168,143,.045), 0 0 35px rgba(0,0,0,.25);
}
.loading-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 94vw);
  max-width: 560px;
  padding: 28px 42px 32px;
  background: linear-gradient(180deg, rgba(10,16,11,.88), rgba(5,9,6,.93));
  border: 1px solid rgba(145,168,143,.48);
  box-shadow: 0 0 0 5px rgba(145,168,143,.035), 0 22px 90px rgba(0,0,0,.62), inset 0 0 50px rgba(100,135,84,.07);
}
.loading-identity {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 22px;
  padding: 6px 0 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(145,168,143,.25);
  text-align: left;
}
.loading-logo {
  width: 128px;
  height: 166px;
  margin: 0;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(145,168,143,.28);
  box-shadow: 0 0 24px rgba(145,168,143,.12);
  filter: saturate(.78) contrast(1.08);
}
.identity-caption {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #a9b99e;
}
.identity-caption span,
.identity-caption small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #778b74;
}
.identity-caption strong {
  font-size: clamp(20px, 4vw, 30px);
  letter-spacing: 3px;
  font-weight: 600;
  color: #d0d9c9;
  text-shadow: 0 0 18px rgba(145,168,143,.25);
}
.loading-panel .login-brand { font-size: 19px; }
.loading-panel .login-divider { margin: 12px auto 18px; }
@keyframes identity-breathe {
  0%,100% { opacity: .075; transform: scale(1.02); }
  50% { opacity: .15; transform: scale(1.07); }
}

/* Smooth open/close transitions for folder, document and system windows. */
.modal {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease, backdrop-filter 240ms ease;
  backdrop-filter: blur(0);
}
.modal.hidden { display: none; }
.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}
.modal.is-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
}
.modal-window {
  opacity: 0;
  transform: translateY(18px) scale(.975);
  transition: opacity 260ms cubic-bezier(.2,.75,.25,1), transform 300ms cubic-bezier(.2,.75,.25,1);
  will-change: opacity, transform;
}
.modal.is-open .modal-window {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal.is-closing .modal-window {
  opacity: 0;
  transform: translateY(10px) scale(.985);
}
.notice-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.notice-mark {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #a76d38;
  color: #0a0e0a;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(167,109,56,.17), 0 0 10px rgba(167,109,56,.22);
}
@media (max-width: 650px) {
  .loading-panel { padding: 22px 20px; }
  .loading-identity { grid-template-columns: 92px 1fr; gap: 14px; }
  .loading-logo { width: 92px; height: 126px; }
  .identity-caption strong { font-size: 19px; letter-spacing: 1px; }
  .identity-caption span, .identity-caption small { font-size: 8px; letter-spacing: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .modal, .modal-window { transition-duration: 1ms !important; }
  .loading-screen::before { animation: none; }
}


/* PROTOTYPE 005 — fullscreen logo composition, persistent progress, boot ambience */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(91,113,79,.075), transparent 46%),
    #030604 !important;
}
.loading-screen.hidden { display:none; }
.loading-screen::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.18;
  background:repeating-linear-gradient(to bottom, transparent 0 3px, rgba(150,180,135,.035) 4px);
}
.loading-screen::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-left:3px solid rgba(117,146,106,.22);
  border-right:3px solid rgba(117,146,106,.12);
  box-shadow:inset 0 0 100px rgba(0,0,0,.48);
}
.loading-center {
  position:relative;
  z-index:1;
  width:min(520px,76vw);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  margin-top:-2vh;
}
.loading-logo {
  display:block;
  width:min(430px,70vw);
  height:auto;
  max-height:58vh;
  object-fit:contain;
  margin:0 auto 34px;
  border:0;
  box-shadow:none;
  filter:none;
  mix-blend-mode:screen;
}
.loading-system-label {
  margin:0 0 12px;
  color:#8da183;
  font-size:10px;
  letter-spacing:3px;
  font-weight:600;
}
.loading-center h2 {
  margin:0;
  color:#c2c8bd;
  font-size:clamp(15px,2vw,19px);
  font-weight:400;
  letter-spacing:2px;
}
.loading-last-session {
  position:absolute;
  z-index:2;
  top:22px;
  right:28px;
  min-width:190px;
  padding:10px 13px;
  border:1px solid rgba(132,157,119,.35);
  background:rgba(8,13,9,.55);
  color:#a8b79e;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.loading-last-session span,
.loading-bottom span {
  font-size:9px;
  letter-spacing:2px;
  color:#77876f;
}
.loading-last-session strong {
  font-size:12px;
  font-weight:400;
  letter-spacing:1px;
}
.loading-bottom {
  position:absolute;
  z-index:2;
  left:7.5%;
  right:7.5%;
  bottom:30px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.loading-track {
  height:4px;
  width:100%;
  background:rgba(125,151,112,.13);
  border:1px solid rgba(125,151,112,.28);
  overflow:hidden;
}
.loading-progress {
  height:100%;
  width:0;
  background:#9aac8f;
  box-shadow:0 0 10px rgba(154,172,143,.45);
  animation:loading-fill 4.25s linear forwards;
}
@keyframes loading-fill { to { width:100%; } }
@media(max-width:650px) {
  .loading-logo { width:min(330px,78vw); margin-bottom:24px; }
  .loading-last-session { top:12px;right:12px;min-width:0;padding:7px 9px; }
  .loading-bottom { left:5%;right:5%;bottom:18px; }
}


/* PROTOTYPE 006 — original N0ERBJ3RG-style loading panel restored */
.loading-screen {
  position:fixed; inset:0; z-index:10000;
  display:flex; align-items:center; justify-content:center;
  padding:24px; background:rgba(10,14,11,.97) !important;
}
.loading-screen.hidden { display:none; }
.loading-screen::before,.loading-screen::after { content:none !important; }
.loading-panel {
  width:100%; max-width:390px; padding:30px;
  background:#151b17; border:1px solid #3a463c;
  box-shadow:0 18px 60px rgba(0,0,0,.38);
  position:relative; z-index:1;
}
.startup-logo-wrap {
  display:flex; align-items:center; justify-content:center;
  min-height:155px; margin:-4px 0 14px;
}
.startup-logo {
  display:block; width:100%; max-width:190px; max-height:155px;
  object-fit:contain; margin:0 auto; border:0; box-shadow:none;
  filter:none; mix-blend-mode:normal;
}
.loading-panel .login-brand {
  color:#d0d4cc; font-family:"Courier New",monospace;
  font-size:13px; font-weight:bold; letter-spacing:2px;
}
.loading-panel .login-brand span { color:var(--green); }
.loading-panel .login-divider {
  height:1px; margin:18px 0 25px; background:var(--border);
}
.loading-panel .login-system-label {
  color:var(--green); font-size:10px; letter-spacing:2px;
}
.loading-panel h2 {
  margin:10px 0 25px; color:#d3d5ce; font-size:20px;
  font-weight:normal; letter-spacing:2px;
}
.loading-panel .last-login {
  display:flex; flex-direction:column; gap:8px;
  margin:22px 0; padding:14px; background:#0d120e;
  border:1px solid var(--border);
}
.loading-panel .last-login span {
  color:var(--muted); font-size:9px; letter-spacing:1.5px;
}
.loading-panel .last-login strong {
  color:var(--green); font-size:12px; font-weight:normal;
}
.loading-panel .loading-track {
  height:4px; overflow:hidden; background:#303a32;
}
.loading-panel .loading-progress {
  width:0; height:100%; background:#91a88f;
  animation:archive-loading 2.4s ease-in-out forwards;
}
.loading-panel .loading-message {
  margin-top:12px; color:#849184; font-size:10px; letter-spacing:1px;
}
@keyframes archive-loading {
  0%{width:0} 35%{width:38%} 70%{width:72%} 100%{width:100%}
}
@media(max-width:480px){
 .loading-panel{padding:23px}
 .startup-logo-wrap{min-height:125px}
 .startup-logo{max-width:150px;max-height:125px}
}


/* PROTOTYPE 007 — loading screen recreated from the user's reference video */
.loading-screen{
 position:fixed;inset:0;z-index:12000;display:block;overflow:hidden;
 padding:0;background:#020503 !important;color:#9aaa8e;
}
.loading-screen.hidden{display:none}
.loading-screen::before{
 content:"";position:absolute;inset:0;pointer-events:none;
 background:
  radial-gradient(ellipse at 50% 48%,rgba(67,91,59,.105) 0%,rgba(18,29,19,.055) 31%,transparent 65%),
  repeating-linear-gradient(to bottom,rgba(140,165,125,.012) 0 1px,transparent 1px 3px);
}
.loading-screen::after{
 content:"";position:absolute;inset:0;pointer-events:none;
 border-left:3px solid rgba(116,145,104,.24);
 border-right:3px solid rgba(116,145,104,.15);
 box-shadow:inset 0 0 95px rgba(0,0,0,.36);
}
.loading-last-login{
 position:absolute;top:21px;right:28px;z-index:2;
 width:190px;padding:9px 12px 10px;
 display:flex;flex-direction:column;gap:6px;
 background:rgba(8,13,9,.55);
 border:1px solid rgba(126,151,113,.38);
 color:#91a183;
}
.loading-last-login span{
 font-family:"Courier New",monospace;font-size:8px;
 letter-spacing:1.8px;color:#78896f;
}
.loading-last-login strong{
 font-family:"Courier New",monospace;font-size:11px;
 font-weight:400;letter-spacing:.8px;color:#aab99d;
}
.loading-brand{
 position:absolute;left:50%;top:46%;
 transform:translate(-50%,-50%);
 width:min(490px,58vw);
 display:flex;flex-direction:column;align-items:center;
 gap:12px;opacity:0;animation:archive-logo-reveal 1.45s ease-out .2s forwards;
}
.loading-icon{
 display:block;width:auto;height:min(300px,34vh);max-width:160px;
 object-fit:contain;filter:drop-shadow(0 0 8px rgba(131,157,117,.12));
}
.loading-wordmark{
 display:block;width:min(460px,100%);height:auto;max-height:46px;
 object-fit:contain;filter:drop-shadow(0 0 7px rgba(131,157,117,.12));
}
.loading-status{
 position:absolute;left:50%;top:68%;
 transform:translate(-50%,-50%);width:min(500px,90vw);
 text-align:center;opacity:0;animation:archive-status-reveal .9s ease-out 1.25s forwards;
}
.loading-system-label{
 display:block;margin:0 0 10px;
 font-family:"Courier New",monospace;font-size:8px;
 font-weight:600;letter-spacing:2.2px;color:#8fa282;
}
.loading-status h2{
 margin:0;color:#c0c5bb;font-family:"Courier New",monospace;
 font-size:16px;font-weight:400;letter-spacing:2px;
}
.loading-progress-area{
 position:absolute;left:7.5%;right:7.5%;bottom:28px;
 display:flex;flex-direction:column;gap:10px;z-index:2;
 font-family:"Courier New",monospace;font-size:8px;
 letter-spacing:1.3px;color:#819276;
}
.loading-track{
 width:100%;height:4px;background:rgba(116,145,104,.13);
 border:1px solid rgba(116,145,104,.32);overflow:hidden;
}
.loading-progress{
 height:100%;width:0;background:#91a88f;
 box-shadow:0 0 9px rgba(145,168,143,.34);
 animation:archive-video-progress 5.2s linear forwards;
}
@keyframes archive-logo-reveal{
 0%{opacity:0;filter:brightness(.25);transform:translate(-50%,-47%) scale(.985)}
 100%{opacity:1;filter:brightness(1);transform:translate(-50%,-50%) scale(1)}
}
@keyframes archive-status-reveal{
 from{opacity:0;transform:translate(-50%,-44%)}
 to{opacity:1;transform:translate(-50%,-50%)}
}
@keyframes archive-video-progress{
 0%{width:0}100%{width:100%}
}
@media(max-width:700px){
 .loading-last-login{top:12px;right:12px;width:160px}
 .loading-brand{width:min(390px,72vw);top:45%}
 .loading-icon{height:min(245px,31vh);max-width:135px}
 .loading-wordmark{max-height:36px}
 .loading-status{top:70%}
 .loading-status h2{font-size:13px}
 .loading-progress-area{left:5%;right:5%;bottom:18px}
}
@media(prefers-reduced-motion:reduce){
 .loading-brand,.loading-status{animation:none;opacity:1}
 .loading-progress{animation:none;width:100%}
}


/* PROTOTYPE 008 — NYT ARKIV identity, sharper mascot, subtle CRT flicker */
.loading-brand{
 width:min(420px,58vw);
 top:46%;
 gap:14px;
}
.loading-icon{
 height:min(290px,32vh);
 max-width:126px;
 width:auto;
 object-fit:contain;
 image-rendering:auto;
 filter:drop-shadow(0 0 5px rgba(151,174,137,.18));
}
.loading-wordmark-text{
 color:#9aaa8e;
 font-family:"Courier New",monospace;
 font-size:clamp(22px,2.7vw,34px);
 font-weight:500;
 letter-spacing:.36em;
 line-height:1.15;
 text-align:center;
 padding-left:.36em;
 text-shadow:0 0 7px rgba(145,168,143,.2);
 white-space:nowrap;
}
.loading-screen{
 animation:crt-screen-flicker 7.5s linear infinite;
}
.loading-screen::before{
 animation:crt-light-pulse 5.2s ease-in-out infinite;
}
.loading-screen::after{
 border-left-color:rgba(116,145,104,.29);
 border-right-color:rgba(116,145,104,.20);
 animation:crt-edge-flicker 4.8s steps(1,end) infinite;
}
.loading-brand,.loading-status,.loading-last-login,.loading-progress-area{
 animation-duration:inherit;
}
@keyframes crt-screen-flicker{
 0%,6%,8%,43%,45%,71%,73%,100%{opacity:1;filter:brightness(1)}
 7%{opacity:.965;filter:brightness(.91)}
 44%{opacity:.985;filter:brightness(.95)}
 72%{opacity:.975;filter:brightness(.92)}
 92%{opacity:.99;filter:brightness(.97)}
}
@keyframes crt-light-pulse{
 0%,100%{opacity:1}
 48%{opacity:.93}
 49%{opacity:.98}
 84%{opacity:.95}
 85%{opacity:1}
}
@keyframes crt-edge-flicker{
 0%,100%{opacity:1}
 18%{opacity:.82}
 19%{opacity:1}
 63%{opacity:.72}
 64%{opacity:1}
}
@media(max-width:700px){
 .loading-brand{width:min(390px,72vw);top:45%}
 .loading-icon{height:min(245px,31vh);max-width:112px}
 .loading-wordmark-text{font-size:clamp(19px,5vw,27px);letter-spacing:.3em}
}
@media(prefers-reduced-motion:reduce){
 .loading-screen,.loading-screen::before,.loading-screen::after{animation:none}
}


/* PROTOTYPE 009 — approved full NYT ARKIV logo + darker restrained neon palette */
:root{
 --bg:#030405;
 --panel:#090d0d;
 --panel2:#0d1212;
 --green:#91ad8b;
 --border:#273a30;
 --muted:#718078;
 --accent:#9abf8d;
}
body{
 background:#030405;
 color:#c3ccc2;
}
.loading-screen{
 background:
  radial-gradient(ellipse at 50% 47%,rgba(47,86,59,.095),transparent 48%),
  #020304 !important;
 color:#a4b7a0;
}
.loading-screen::before{
 background:
  radial-gradient(ellipse at 50% 48%,rgba(49,91,61,.10),transparent 55%),
  repeating-linear-gradient(to bottom,rgba(151,190,145,.018) 0 1px,transparent 1px 3px);
 opacity:1;
}
.loading-screen::after{
 border-left-color:rgba(102,154,111,.27);
 border-right-color:rgba(102,154,111,.18);
 box-shadow:inset 0 0 110px rgba(0,0,0,.5),0 0 18px rgba(65,130,78,.035);
}
.loading-brand{
 top:46%;
 width:min(490px,62vw);
 gap:0;
}
.loading-complete-logo{
 display:block;
 width:min(460px,58vw);
 max-height:58vh;
 height:auto;
 object-fit:contain;
 filter:
  drop-shadow(0 0 5px rgba(105,166,115,.14))
  drop-shadow(0 0 16px rgba(68,132,82,.08));
}
.loading-status{
 color:#b7c4b3;
}
.loading-system-label{
 color:#8fac88;
 text-shadow:0 0 7px rgba(112,177,116,.2);
}
.loading-status h2{
 color:#d0d6ce;
 text-shadow:0 0 8px rgba(130,174,130,.12);
}
.loading-last-login{
 background:rgba(4,8,6,.72);
 border-color:rgba(100,147,105,.35);
 box-shadow:0 0 12px rgba(68,126,77,.045);
}
.loading-last-login strong{color:#a6c49b}
.loading-progress-area{color:#8ea28a}
.loading-track{
 background:rgba(79,111,78,.13);
 border-color:rgba(111,155,105,.32);
 box-shadow:0 0 8px rgba(76,138,84,.045);
}
.loading-progress{
 background:#9abb91;
 box-shadow:0 0 8px rgba(120,194,123,.38),0 0 18px rgba(90,162,98,.18);
}
/* Carry the same subdued dark-green/neon character through the archive UI. */
.topbar,.sidebar,.modal-window,.folder-window,.document-window{
 background-color:#080d0c;
 border-color:#26382e;
}
button,.file-card,.folder-card,.archive-panel{
 transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease;
}
button:hover,.file-card:hover,.folder-card:hover{
 border-color:rgba(126,181,121,.55);
 box-shadow:0 0 10px rgba(77,139,81,.09);
}
a{color:#a4c69b}
a:hover{text-shadow:0 0 7px rgba(132,194,128,.32)}
.notice-mark{
 background:#9b743f;
 box-shadow:0 0 0 2px rgba(155,116,63,.13),0 0 9px rgba(155,116,63,.16);
}
@media(max-width:700px){
 .loading-brand{width:min(430px,78vw)}
 .loading-complete-logo{width:min(410px,76vw);max-height:50vh}
}


/* Prototype 011 — compact intro callout and explicit progress persistence */
.intro-note{
  display:block;
  width:fit-content;
  max-width:min(620px,100%);
  box-sizing:border-box;
  margin:24px 0 0;
  padding:15px 20px 15px 22px;
  color:#aebba9;
  font-size:13px;
  line-height:1.65;
  letter-spacing:.15px;
  border:1px solid rgba(115,151,108,.20);
  border-left:3px solid #829d78;
  border-radius:2px;
  background:
    linear-gradient(110deg,rgba(91,128,83,.09),rgba(11,17,13,.52) 72%);
  box-shadow:inset 0 0 22px rgba(88,133,81,.035),0 5px 18px rgba(0,0,0,.12);
}
@media(max-width:650px){
 .intro-note{width:100%;max-width:100%;font-size:12px;padding:13px 15px 13px 17px}
}


/* Prototype 012 — horizontal archive note and modal navigation */
.intro-note{
 display:block;
 width:min(100%,920px);
 max-width:920px;
 min-height:0;
 margin:24px 0 0;
 padding:13px 20px;
 box-sizing:border-box;
 line-height:1.55;
 border:1px solid rgba(115,151,108,.20);
 border-left:3px solid #829d78;
 border-radius:2px;
 background:linear-gradient(100deg,rgba(91,128,83,.10),rgba(11,17,13,.48) 72%);
}
.back-button{
 position:relative;
 display:inline-flex;
 align-items:center;
 gap:8px;
 margin:16px 20px 4px;
 padding:8px 12px;
 color:#a9c39e;
 background:rgba(77,112,75,.10);
 border:1px solid rgba(126,166,116,.28);
 border-radius:2px;
 font:inherit;
 font-size:10px;
 letter-spacing:1.2px;
 cursor:pointer;
 transition:background .18s,border-color .18s,box-shadow .18s;
}
.back-button:hover{
 background:rgba(91,139,83,.18);
 border-color:rgba(151,190,137,.55);
 box-shadow:0 0 10px rgba(91,151,83,.10);
}
.modal-window>.close{z-index:2}
@media(max-width:650px){
 .intro-note{width:100%;max-width:100%;padding:12px 15px;font-size:12px}
 .back-button{margin:13px 14px 3px}
}


/* Prototype 013 — stable opaque boot screen; no flashes through the loading overlay */
.loading-screen{
 opacity:1 !important;
 filter:none !important;
 animation:none !important;
 background-color:#020304 !important;
}
.loading-screen::before,
.loading-screen::after{
 animation:none !important;
}
#vhs-glitch{z-index:10000}
body:has(.loading-screen:not(.hidden)) #vhs-glitch,
body:has(.loading-screen:not(.hidden)) #vhs-glitch::before{
 display:none !important;
 animation:none !important;
}
.remember-login{
 display:flex;
 align-items:center;
 gap:9px;
 margin:2px 0 8px;
 color:#879486;
 font-size:10px;
 letter-spacing:1px;
 cursor:pointer;
}
.remember-login input{
 width:14px;
 height:14px;
 accent-color:#91ad8b;
 cursor:pointer;
}


/* Prototype 014 — bring back the calm loading motion without revealing the page beneath */
.loading-screen{
 opacity:1 !important;
 filter:none !important;
 animation:none !important;
}
.loading-screen::before{
 opacity:1;
 animation:nyt-ambient-glow 5.8s ease-in-out infinite !important;
}
.loading-screen::after{
 animation:nyt-frame-glow 6.5s ease-in-out infinite !important;
}
.loading-complete-logo{
 animation:nyt-logo-arrive 1.15s cubic-bezier(.2,.7,.25,1) both,
           nyt-logo-breathe 5.5s ease-in-out 1.15s infinite,
           nyt-neon-flicker 7.4s linear 1.5s infinite;
}
.loading-status{
 animation:nyt-status-arrive .75s ease-out .25s both;
}
.loading-last-login{
 animation:nyt-status-arrive .65s ease-out .1s both;
}
.loading-progress-area{
 animation:nyt-status-arrive .7s ease-out .35s both;
}
.loading-progress{
 animation:archive-video-progress 4.25s linear forwards !important;
}
@keyframes nyt-ambient-glow{
 0%,100%{opacity:.72;filter:brightness(.94)}
 50%{opacity:1;filter:brightness(1.08)}
}
@keyframes nyt-frame-glow{
 0%,100%{box-shadow:inset 0 0 80px rgba(0,0,0,.52),0 0 12px rgba(65,130,78,.025)}
 50%{box-shadow:inset 0 0 105px rgba(0,0,0,.42),0 0 22px rgba(65,130,78,.065)}
}
@keyframes nyt-logo-arrive{
 from{opacity:0;transform:translateY(9px) scale(.985);filter:brightness(.55) drop-shadow(0 0 0 rgba(105,166,115,0))}
 to{opacity:1;transform:translateY(0) scale(1);filter:brightness(1) drop-shadow(0 0 5px rgba(105,166,115,.14)) drop-shadow(0 0 16px rgba(68,132,82,.08))}
}
@keyframes nyt-logo-breathe{
 0%,100%{filter:brightness(1) drop-shadow(0 0 5px rgba(105,166,115,.14)) drop-shadow(0 0 16px rgba(68,132,82,.08))}
 50%{filter:brightness(1.045) drop-shadow(0 0 8px rgba(105,166,115,.22)) drop-shadow(0 0 22px rgba(68,132,82,.12))}
}
@keyframes nyt-neon-flicker{
 0%,15%,18%,48%,51%,79%,82%,100%{opacity:1}
 16%,17%,49%,50%,80%,81%{opacity:.76}
}
@keyframes nyt-status-arrive{
 from{opacity:0;transform:translateY(6px)}
 to{opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){
 .loading-screen,.loading-screen::before,.loading-screen::after,
 .loading-complete-logo,.loading-status,.loading-last-login,
 .loading-progress-area,.loading-progress{animation:none !important}
 .loading-progress{width:100%}
}


/* Prototype 015 — center the bottom loading label and progress bar as one unit */
.loading-progress-area{
 left:50% !important;
 right:auto !important;
 width:min(640px,85vw) !important;
 bottom:28px !important;
 transform:translateX(-50%);
 align-items:center !important;
 text-align:center !important;
}
.loading-progress-area>span{
 display:block;
 width:100%;
 text-align:center;
}
.loading-track{
 display:block;
 width:100%;
}
@media(max-width:700px){
 .loading-progress-area{
  left:50% !important;
  right:auto !important;
  width:90vw !important;
  bottom:18px !important;
  transform:translateX(-50%);
 }
}


/* Prototype 016 — full-width bottom progress bar; status text stays beneath logo */
.loading-status{
 position:absolute !important;
 left:50% !important;
 top:68% !important;
 width:min(600px,90vw) !important;
 transform:translate(-50%,-50%) !important;
 text-align:center !important;
}
.loading-status h2{
 color:#d0d6ce;
 text-align:center;
 margin:0;
}
.loading-progress-area{
 position:absolute !important;
 left:5vw !important;
 right:5vw !important;
 bottom:22px !important;
 width:auto !important;
 height:auto !important;
 padding:0 !important;
 margin:0 !important;
 display:flex !important;
 flex-direction:column !important;
 gap:7px !important;
 box-sizing:border-box !important;
 transform:none !important;
 text-align:left !important;
}
.loading-progress-status{
 display:block;
 color:#8ea28a;
 font-family:"Courier New",monospace;
 font-size:10px;
 line-height:1.3;
 letter-spacing:1.4px;
 text-align:left;
 text-shadow:0 0 7px rgba(112,177,116,.14);
}
.loading-progress-area>.loading-progress-status{text-align:left !important}
.loading-track{
 display:block !important;
 width:100% !important;
 flex:none;
 height:5px !important;
 margin:0 !important;
 border:0 !important;
 border-radius:0 !important;
}
.loading-progress{
 height:100% !important;
}
@media(max-width:700px){
 .loading-progress-area{
  left:5vw !important;
  right:5vw !important;
  bottom:18px !important;
 }
 .loading-progress-status{font-size:9px;letter-spacing:1.1px}
}

/* Prototype 022 — larger profile viewer with simple zoom controls */
.image-viewport{height:76vh;min-height:480px;max-height:1000px;overflow:auto;display:block;padding:10px;box-sizing:border-box;}
.document-image{width:100%;max-width:none;height:auto;cursor:zoom-in;transform:none;user-select:none;-webkit-user-drag:none;}
.image-viewport.is-pannable .document-image{cursor:grab;}
.image-viewport.is-dragging .document-image{cursor:grabbing;}
.image-tools{margin-top:14px;}
.image-buttons button{min-width:42px;}
@media(max-width:700px){.image-viewport{height:68vh;min-height:360px;padding:6px;}}

/* Document viewer sizing: give the content room without fixing document height. */
.modal > .document-window {
    width: min(1120px, 100%);
    max-width: 1120px;
}

#documentContent {
    width: 100%;
    max-width: none;
}

#documentContent:has(> .archive-text) {
    max-height: 70vh;
    overflow: auto;
}

#documentContent > .archive-text {
    max-width: none;
    margin: 0;
}

.image-viewport {
    height: clamp(320px, 58vh, 720px);
    min-height: 0;
    max-height: none;
}

@media (max-width: 700px) {
    .image-viewport {
        height: clamp(280px, 52vh, 560px);
    }
}

/* Follow-up archive response fields */
.archive-answer{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
.archive-answer input{flex:1 1 220px;min-width:0;background:#090d0b;border:1px solid var(--border);color:var(--text);padding:11px 12px;font:inherit;letter-spacing:.4px}
.archive-answer button{background:#111813;border:1px solid var(--border);color:var(--text);padding:10px 14px;font:inherit;letter-spacing:.5px;cursor:pointer}
.archive-answer button:hover:not(:disabled){border-color:var(--green);color:var(--green)}
.archive-answer input:disabled,.archive-answer button:disabled{opacity:.6;cursor:default}
.archive-answer-feedback{flex-basis:100%;min-height:18px;color:#91a88f;font-size:12px;letter-spacing:.5px}
.archive-answer-feedback.is-error{color:#bd7777}

/* SAGSOVERSIGT is a second view inside the same archive interface. */
.archive-page-navigation{display:flex;justify-content:flex-end}
#caseArchiveNav.hidden,#surveillanceArchiveNav.hidden,#casePageSurveillanceNav.hidden,.case-archive-page.hidden,.archive-new-mark.hidden{display:none !important}
#mainArchivePage.hidden{display:none !important}
.archive-page-navigation{gap:10px;flex-wrap:wrap}
.case-page-navigation{justify-content:space-between;margin:24px 0 32px}
.archive-new-mark{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;margin-left:5px;border:1px solid rgba(178,190,143,.72);border-radius:50%;color:#c3d09c;font-size:11px;font-weight:bold;line-height:1;animation:archive-new-pulse 2.2s ease-in-out infinite}
@keyframes archive-new-pulse{0%,100%{box-shadow:0 0 0 rgba(157,180,129,0);opacity:.8}50%{box-shadow:0 0 9px rgba(157,180,129,.35);opacity:1}}
.case-archive-page{min-height:65vh}
.case-archive-note{max-width:760px;color:var(--text);line-height:1.8;margin:22px 0 14px}
.case-overview-summary{margin:0 0 16px;max-width:none;line-height:1.7}
.case-overview-folder-wrap{margin-top:12px}
.case-overview-folder{margin:0}
.case-folder-chevron{font-size:18px;transition:transform .18s ease}
.case-folder-contents{max-height:0;overflow:hidden;opacity:0;margin-left:20px;padding-left:14px;border-left:1px solid rgba(145,168,143,.24);transition:max-height .2s ease,opacity .18s ease}
.case-folder-contents.is-open{max-height:240px;opacity:1}
.case-file-row{display:flex;width:100%;justify-content:space-between;gap:14px;margin:5px 0;padding:13px 15px;text-align:left;font:inherit;cursor:pointer}
.case-file-row.locked{opacity:.48;cursor:not-allowed}
#caseArchiveFeedback{min-height:18px;margin-top:12px;color:var(--green);font-size:12px;letter-spacing:.5px}
.case-return-button{margin-top:38px}
.surveillance-empty-state{min-height:180px;display:flex;align-items:flex-start;padding:22px 4px;color:#64715f;font-size:10px;letter-spacing:2px;border-top:1px solid rgba(145,168,143,.16)}
.surveillance-archive-content{max-width:900px}
.surveillance-search-section{margin:0 0 24px;padding:16px;background:#0b100d;border:1px solid var(--border)}
.surveillance-search-section h2{margin:0 0 12px;color:var(--green);font-size:12px;font-weight:500;letter-spacing:1.4px}
.surveillance-search-box{margin:0}
.surveillance-search-box .access-input{margin:0}
.surveillance-search-box input{width:100%;min-width:0}
.surveillance-search-help{margin:13px 0 0;color:var(--muted);font-size:13px;line-height:1.7}
.surveillance-document-guidance{margin:4px 0 12px;color:var(--muted);font-size:13px;line-height:1.7}
.surveillance-intro{margin:0 0 30px}
.surveillance-document-heading{display:flex;justify-content:space-between;padding:14px 15px;margin-bottom:0;cursor:default}
.surveillance-intro .archive-text{margin-top:0;border-top:0;line-height:1.85}
.surveillance-audio-files{display:grid;gap:8px;margin-top:12px}
.surveillance-folder{border:1px solid rgba(145,168,143,.2);background:rgba(8,13,10,.55)}
.surveillance-folder-toggle{display:flex;align-items:center;gap:12px;width:100%;padding:14px 15px;text-align:left;color:var(--text);background:transparent;border:0;font:inherit;cursor:pointer}
.surveillance-folder-toggle strong{font-size:12px;font-weight:500;letter-spacing:1.1px}
.surveillance-folder-toggle .muted{margin-left:auto;font-size:10px}
.home-archive-folder-toggle .file-info{min-width:0}
.home-archive-folder-toggle .file-info strong{font-size:12px;font-weight:500;letter-spacing:1.1px}
.home-archive-folder-toggle .file-info small{color:var(--muted);font-size:10px;letter-spacing:1px}
.home-folder-count{margin-left:auto;font-size:10px}
.home-archive-folder-toggle .home-folder-count{margin-left:auto}
.home-archive-folder-toggle.locked{opacity:.52;cursor:not-allowed}
.home-archive-folder-toggle.locked:hover{background:transparent;border-color:transparent;box-shadow:none}
.surveillance-folder-chevron{font-size:18px;transition:transform .18s ease}
.surveillance-folder-toggle[aria-expanded="true"] .surveillance-folder-chevron{transform:rotate(180deg)}
.surveillance-folder-contents{display:grid;gap:6px;padding:0 10px 10px 26px}
.surveillance-folder-contents[hidden]{display:none}
.observation-match-form{display:grid;gap:9px;margin:18px 0;padding:16px;background:#0b100d;border:1px solid var(--border)}
.observation-match-row{display:grid;grid-template-columns:minmax(100px,.5fr) minmax(0,1fr);align-items:center;gap:14px;color:var(--text);font-size:13px}
.observation-match-row select{appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;min-height:46px;padding:11px 42px 11px 13px;color:#d1d9c9;color-scheme:dark;background-color:#090d0a;background-image:linear-gradient(45deg,transparent 50%,#9aad8e 50%),linear-gradient(135deg,#9aad8e 50%,transparent 50%);background-position:calc(100% - 19px) 19px,calc(100% - 14px) 19px;background-repeat:no-repeat;background-size:5px 5px,5px 5px;border:1px solid rgba(145,168,143,.38);border-radius:2px;font:inherit;line-height:1.4;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.observation-match-row select:hover{border-color:rgba(145,168,143,.72);background-color:#0d140f}
.observation-match-row select:focus-visible{outline:2px solid rgba(145,168,143,.6);outline-offset:2px;border-color:#a5b697;box-shadow:0 0 0 3px rgba(145,168,143,.12)}
.observation-match-row select:valid{color:#d6dfcb;border-color:rgba(145,168,143,.58)}
.observation-match-row select option{color:#d1d9c9;background:#0b100d}
.observation-match-submit{justify-self:start;margin-top:4px;padding:11px 14px;color:var(--green);background:transparent;border:1px solid var(--border);font:inherit;letter-spacing:1px;cursor:pointer}
.observation-match-submit:disabled,.observation-match-row select:disabled{opacity:.6}
.observation-match-feedback{min-height:18px;margin:0;color:var(--green);font-size:12px;line-height:1.6}
.observation-match-feedback.is-error{color:#bd7777}
.surveillance-audio-row{display:flex;width:100%;justify-content:space-between;gap:14px;text-align:left;font:inherit;padding:14px 15px;cursor:pointer}
.archive-audio-player{display:block;width:100%;max-width:680px;margin:18px 0 8px;filter:sepia(.2)}
.external-access-link{display:inline-block;margin-top:16px;padding:11px 14px;border:1px solid var(--border);color:var(--green);text-decoration:none;letter-spacing:1px}
.external-access-link:hover{border-color:var(--green)}
.external-access-confirmation{margin:10px 0;color:var(--green);line-height:1.7}
.external-access-placeholder{display:inline-block;margin:10px 0 0;padding:9px 11px;border:1px dashed var(--border);color:var(--muted);font-size:10px;letter-spacing:.8px}
@media(max-width:700px){.case-file-row{align-items:flex-start;flex-direction:column;gap:5px}.case-folder-contents{margin-left:10px;padding-left:9px}}
@media(max-width:560px){.observation-match-row{grid-template-columns:1fr;gap:6px}.surveillance-folder-toggle{gap:8px;padding:12px}.surveillance-folder-contents{padding-left:12px}}
@media(max-width:700px){.home-archive-folder-toggle .file-info strong{overflow-wrap:anywhere}.home-folder-count{white-space:nowrap}.home-archive-folders .surveillance-audio-row{align-items:flex-start;flex-direction:column;gap:5px}}
@media(max-width:560px){.home-archive-folder-toggle .file-info small{line-height:1.5}.home-folder-count{font-size:9px}}
@media(prefers-reduced-motion:reduce){.case-folder-contents,.case-folder-chevron{transition:none}.archive-new-mark{animation:none}}

/* Mobile corners use the same shared geometry at a smaller scale. */
@media(max-width:700px){
 .screen-frame{
  --frame-inset:12px;
  --frame-length:30px;
 }
}

.archive-unlock-notice.hidden{display:none !important}
.archive-unlock-notice{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:11500;display:flex;align-items:center;gap:14px;width:max-content;max-width:calc(100vw - 28px);padding:10px 16px;background:rgba(8,14,10,.97);border:1px solid rgba(145,168,143,.52);box-shadow:0 8px 28px rgba(0,0,0,.55),0 0 18px rgba(112,150,105,.12);color:#9aad8e;font-size:10px;letter-spacing:1.5px;animation:archive-unlock-arrive .28s ease-out both}
.archive-unlock-notice strong{color:#d1d9c9;font-size:11px;font-weight:normal;letter-spacing:1.3px}
.external-access-unlock-notice{z-index:11600;align-items:center;justify-content:space-between;gap:18px;width:min(660px,calc(100vw - 28px));white-space:normal;text-align:left}
.external-access-notice-copy{display:grid;gap:6px;line-height:1.45}
.external-access-notice-copy p,.external-access-notice-copy small{margin:0;color:#9aad8e;font-size:10px;letter-spacing:.8px}
.external-access-notice-copy strong{font-size:13px;letter-spacing:1.5px}
.external-access-notice-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.external-access-notice-actions .sound-toggle{padding:8px 9px;font-size:9px}
@keyframes archive-unlock-arrive{from{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:600px){.archive-unlock-notice{top:8px;gap:8px;padding:9px 11px;font-size:9px;letter-spacing:.8px}.archive-unlock-notice strong{font-size:10px;letter-spacing:.7px}}
@media(max-width:600px){.external-access-unlock-notice{align-items:flex-start;flex-direction:column;gap:10px}.external-access-notice-actions{width:100%;justify-content:flex-end}.external-access-notice-actions .sound-toggle{font-size:8px;padding:7px}}
@media(prefers-reduced-motion:reduce){.archive-unlock-notice{animation:none}}

/* Moving CRT scanlines layered over the existing edge vignette. */
body::after{
 inset:-4px 0;
 opacity:.28;
 background:repeating-linear-gradient(
  to bottom,
  rgba(210,230,195,.09) 0px,
  rgba(210,230,195,.09) 1px,
  transparent 1px,
  transparent 4px
 );
 background-size:100% 4px;
 animation:nyt-crt-scan-drift 1.8s linear infinite;
}
@keyframes nyt-crt-scan-drift{
 from{background-position:0 0}
 to{background-position:0 4px}
}
.screen-frame::before,
.screen-frame::after{
 content:"";
 position:absolute;
 inset:0;
 pointer-events:none;
}
.screen-frame::before{
 background:
  linear-gradient(rgba(145,173,139,.025),rgba(145,173,139,.025)),
  radial-gradient(ellipse at 50% 44%,rgba(145,173,139,.045),transparent 76%);
 opacity:.36;
 animation:nyt-crt-brightness 8s ease-in-out infinite alternate;
}
.screen-frame::after{
 border-radius:2.5% / 2%;
 background:radial-gradient(ellipse at 50% 48%,transparent 54%,rgba(145,173,139,.035) 74%,rgba(0,0,0,.11) 100%);
 box-shadow:inset 0 0 100px rgba(0,0,0,.055),inset 0 0 30px rgba(145,173,139,.028);
}
@keyframes nyt-crt-brightness{
 from{opacity:.36}
 to{opacity:.82}
}
body{
 text-shadow:0 0 1.5px rgba(145,173,139,.14);
}
main :is(h1,h2,h3,.overline,.section-title,.file-info strong,.surveillance-folder-toggle,.system-info strong,.muted),
.topbar .logo{
 text-shadow:0 0 2px rgba(145,173,139,.22),0 0 6px rgba(145,173,139,.08);
}
@media(prefers-reduced-motion:reduce){
 body::after{animation:none}
 .screen-frame::before{animation:none;opacity:.6}
}

/* Low-key document states and Andreas' separate investigation tool. */
.document-status{flex:0 0 auto;margin-left:auto;color:var(--muted);font-size:10px;letter-spacing:1px;white-space:nowrap}
.document-status[data-status="new"]{color:var(--green)}
.document-status[data-status="new"]::before{content:"• ";font-size:13px}
.document-status[data-status="unread"]::before{content:"○ ";color:#9a9f96}
.document-status[data-status="read"]{opacity:.68}
.investigation-open-button{white-space:nowrap}
.investigation-window{max-height:86vh;overflow-y:auto;padding:22px;background:rgba(11,16,13,.98);border:1px solid var(--border);box-shadow:0 0 38px rgba(0,0,0,.55),inset 0 0 34px rgba(145,168,143,.025)}
.investigation-window>.overline{margin:4px 42px 14px 0}
.investigation-window h2{margin-bottom:8px}
.investigation-module-body{display:grid;grid-template-columns:1fr;gap:0}
.investigation-section{padding:17px 2px;border-bottom:1px solid rgba(145,168,143,.17)}
.investigation-section:last-child{border-bottom:0}
.investigation-section h3{margin:0 0 11px;color:var(--green);font-size:11px;font-weight:normal;letter-spacing:2px}
.investigation-list{margin:0;padding:0;list-style:none}
.investigation-list li{padding:8px 0;color:#aeb6aa;font-size:12px;line-height:1.65;border-bottom:1px solid rgba(145,168,143,.08)}
.investigation-list li:last-child{border-bottom:0}
.investigation-note-group{padding:0 0 12px}
.investigation-note-group+.investigation-note-group{padding-top:13px;border-top:1px solid rgba(145,168,143,.1)}
.investigation-note-group h4{margin:0 0 3px;color:#89968a;font-size:10px;font-weight:normal;letter-spacing:1.4px}
.investigation-note-group .investigation-list li{padding:6px 0}
.investigation-empty{margin:0;color:var(--muted);font-size:12px;line-height:1.7}
.investigation-status-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px;margin:0 0 10px}
.investigation-status-list>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid rgba(145,168,143,.1)}
.investigation-status-list dt{color:var(--muted);font-size:10px;letter-spacing:.8px}
.investigation-status-list dd{margin:0;color:var(--text);font-size:12px}
.investigation-status-note{margin:0 0 12px;color:var(--muted);font-size:10px;line-height:1.6}
@media(max-width:650px){.investigation-window{max-height:90vh;padding:16px}.investigation-status-list{grid-template-columns:1fr}.investigation-window .close{top:11px;right:11px}}
@media(max-width:700px){.surveillance-archive-content .surveillance-audio-row{align-items:flex-start;flex-direction:column;gap:5px}.surveillance-archive-content .document-status{margin-left:0}}
