:root {
    color-scheme: light dark;
    --page: #f3f5f8;
    --surface: #ffffff;
    --surface-raised: #f8f9fc;
    --text: #172033;
    --muted: #657087;
    --border: #dce1ea;
    --accent: #5b55d6;
    --accent-hover: #443db7;
    --shadow: 0 18px 48px rgb(26 35 58 / 9%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #11151d;
        --surface: #1a202b;
        --surface-raised: #202735;
        --text: #edf0f7;
        --muted: #a0abc0;
        --border: #30394a;
        --accent: #aaa5ff;
        --accent-hover: #d0cdff;
        --shadow: 0 18px 48px rgb(0 0 0 / 24%);
    }
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: clamp(1.5rem, 3vh, 3rem) clamp(1rem, 4vw, 2.5rem);
    background: var(--page);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body > h1:first-of-type {
    display: none;
}

.fileshare-hero,
#indexlist {
    width: min(100%, 58rem);
    margin-inline: auto;
}

.fileshare-hero {
    padding: clamp(1.35rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: 1.25rem 1.25rem 0 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.fileshare-kicker {
    margin: 0 0 .65rem;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.fileshare-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -.045em;
    line-height: 1.1;
}

.fileshare-description {
    max-width: 42rem;
    margin: .8rem 0 0;
    color: var(--muted);
}

#indexlist {
    table-layout: auto;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 1.25rem 1.25rem;
    border-spacing: 0;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

#indexlist th,
#indexlist td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

#indexlist th {
    background: var(--surface-raised);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

#indexlist th a {
    color: inherit;
    text-decoration: none;
}

#indexlist th a:hover {
    color: var(--accent);
}

#indexlist .indexcolicon {
    width: 3rem;
    text-align: center;
}

#indexlist .indexcollastmod {
    width: 13rem;
    white-space: nowrap;
}

#indexlist .indexcolsize {
    width: 7rem;
    white-space: nowrap;
    text-align: right;
}

#indexlist tr.indexbreakrow {
    display: none;
}

#indexlist .indexcolname {
    overflow-wrap: anywhere;
}

#indexlist tbody tr:last-child td {
    border-bottom: 0;
}

#indexlist tr.even td {
    background: var(--surface);
}

#indexlist tr.odd td {
    background: var(--surface-raised);
}

#indexlist td a {
    color: var(--accent);
    font-weight: 620;
    text-decoration-thickness: .08em;
    text-underline-offset: .18em;
}

#indexlist td a:hover {
    color: var(--accent-hover);
}

#indexlist .indexcolicon img {
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
    vertical-align: middle;
}

@media (max-width: 640px) {
    body {
        padding: 1rem .75rem;
    }

    .fileshare-hero {
        border-radius: .9rem .9rem 0 0;
    }

    #indexlist {
        border-radius: 0 0 .9rem .9rem;
    }

    #indexlist th,
    #indexlist td {
        padding: .75rem .55rem;
    }

    #indexlist .indexcolicon {
        width: 2.3rem;
    }

    #indexlist .indexcollastmod {
        display: none;
    }

    #indexlist .indexcolsize {
        width: 5.25rem;
    }
}
