* Global reset-ish */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #05060a;
    color: #f5f5f7;
    overflow-x: auto;
}

/* Layout */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a:link {
    text-decoration: none;
    color: #4da3ff;
}

.wrap1 {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    justify-self: start;
}

#wrn {
    font-size: 0.9rem;
    white-space: nowrap;
}

.home {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #05060a;
}

.banner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    padding: 0 15px;
    height: 75px;
    border-bottom: solid 3px silver;
    min-width: max-content;
    justify-content: space-between;
}

.main-nav {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;
    justify-content: space-between;
}

    .main-nav a {
        display: block;
        padding: 0.4rem 0.6rem;
        text-decoration: none;
        color: inherit;
    }

.banner h1 {
    justify-self: start;
}

.banner h2 {
    justify-self: center;
    padding: 0 10px 0 0;
}

.banner h3 {
    justify-self: end;
}

.banner h1,
.banner h1,
.banner h3 {
    white-space: nowrap;
}

/* Transparency layout */

/*
#mission {
    padding: 20px;
    border-right: 1px solid #333;
    background: #111;
    color: #eee;
}

#file-list {
    padding: 20px;
    border-bottom: 1px solid #333;
    overflow-y: auto;
    background: #181818;
    color: #eee;
}

#code-viewer {
    grid-column: 1 / span 2;
    padding: 20px;
    background: #000;
    color: #0f0;
    overflow-y: auto;
    white-space: pre;
    border-top: 1px solid #333;
}

.file-entry {
    cursor: pointer;
    padding: 5px 0;
}

    .file-entry:hover {
        color: #0f0;
    } */

#container {
    display: grid;
    grid-template-columns: 450px 1fr;
    grid-template-rows: auto 1fr;
    height: calc(100vh - 75px);
}

#mission {
    grid-column: 1;
    grid-row: 1;
    padding: 20px;
    border: 1px solid #333;
    background: #111;
    max-height: 500px;

}

#file-list {
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
    border: 1px solid #333;
    max-height: auto;
    background: #181818;
}

#code-viewer {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 20px;
    background: #000;
    color: #0f0;
    max-height: auto;
    overflow-y: auto;
    white-space: pre;
    border-left: 1px solid #333;
}

.timestamp {
    color: #888;
    font-size: 0.8em;
    margin-left: 10px;
}

.sticky-header {
    position: sticky;
    top: 0;
    background: #333;
    margin: 0;
    padding: 5px 10px;
    z-index: 10;
    border-bottom: 1px solid silver;
}

.scrollable {
    overflow-y: auto;
    max-height: 250px;
}

.header,
.footer {
    padding: 1.5rem 1.5rem 0;
    max-width: 720px;
    margin: 0 auto;
}

    .header h2 {
        margin: 0;
        font-size: 1.9rem;
        letter-spacing: 0.03em;
    }

.tagline {
    margin: 0.4rem 0 0;
    color: #a0a3b1;
    font-size: 0.95rem;
}

.main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
}

/* Card */
.card {
    width: 100%;
    max-width: 720px;
    background: #0b0d14;
    border-radius: 12px;
    padding: 1.5rem 1.75rem 1.75rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    border: 1px solid #181b26;
    overflow-wrap: break-word;
}

.card-title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #c3c6d4;
}

.input,
.textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    border: 1px solid #2a2f3f;
    font: inherited;
    resize: vertical;
}

    .input:focus,
    .textarea:focus {
        outline: none;
        border-color: #4f8cff;
        box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.4);
        overflow: auto;
    }

textarea {
    resize: none;
    overflow: auto;
}

/* Button */
.button {
    margin-top: 0.4rem;
    align-self: flex-start;
    padding: 0.55rem 1.2rem;
    border-radius: 99px;
    border: none;
    background: linear-gradient(135deg, #4f8cff, #7b5cff);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, filter 0.08s ease-out;
    box-shadow: 0 10px 25px rgba(79, 140, 255, 0.35);
}

    .button:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
    }

button:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(79, 140, 255, 0.25);
}

/* Status / output */
.status,
.output {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    background: #050711;
    border: 1px solid #25293a;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace: font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Footer */
.footer {
    padding: 0.1rem 1.5rem;
    font-size: 0.8rem;
    color: #7b7f90;
    text-align: center;
}

/* Small screens */
@media (max-width: 600px) {
    .card {
        padding: 1.25rem, 1.1rem, 1.4rem;
    }

    .header,
    .footer {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .banner {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* left-align all headings */
        padding: 10px 15px;
        width: 100%;
        height: auto;
        gap: 0.25rem;
        border-bottom: 0;
    }

        .banner h1 {
            border-bottom: 3px solid silver;
            align-self: stretch;
        }

        .banner h2,
        .banner h3 {
            font-size: smaller;
        }

        .banner h1,
        .banner h2,
        .banner h3 {
            margin: 0;
            padding: 0;
            white-space: normal; /* allow wrapping naturally */
        }

    .main-nav {
        display: flex;
        gap: 1rem;
        list-style: none;
        margin: 0;
        padding: 0.5rem 1rem;
        justify-content: space-between;
    }

        .main-nav a {
            display: block;
            padding: 0.4rem 0.6rem;
            text-decoration: none;
            color: inherit;
        }

    #container {
        display: flex;
        flex-direction: column;
        max-width: 100%;
    }

    #mission {
        padding: 20px;
        border-right: 1px solid #333;
        overflow-y: auto;
        min-height: 350px;
        max-height: 500px;
        background: #181818;
    }

    #file-list {
        padding: 20px;
        border-right: 1px solid #333;
        overflow-y: auto;
        min-height: 200px;
        max-height: 500px;
        background: #181818;
    }

    #code-viewer {
        padding: 20px;
        background: #000;
        color: #0f0;
        max-height: auto;
        overflow-y: auto;
        white-space: pre;
        border-left: 1px solid #333;
    }
}

a:hover {
    color: silver;
}

a:visited {
    color: grey;
}

a:active {
    transform: translateY(0);
}

.donations {
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #05060a;
    color: #f5f5f7;
}

