:root {
    --primary-color: #333;
    --secondary-color: #fcfcfc;
    --ternary-color: #f2f2f2;
}

html {
    background-color: var(--primary-color);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

main {
    flex: 1;
}

header, footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1em;
    text-align: center;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--secondary-color);
    text-decoration: underline;
}

footer a:hover {
    color: var(--ternary-color);
}

#indexlist {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

tr.indexhead {
    background-color: var(--ternary-color);
}

th, td {
    padding: .9em;
    text-align: left;
    border-bottom: 1px solid #ddd;
    overflow-wrap: break-word;
}

th.indexcolname, td.indexcolname {
    width: 50%;
}

th.indexcolsize, td.indexcolsize {
    width: 15%;
}

th.indexcollastmod, td.indexcollastmod {
    width: 20%;
}

th.indexcoldesc, td.indexcoldesc {
    width: 15%;
}

tr.breakrow {
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
}

tr.odd {
    background-color: #f9f9f9;
}

tr.even {
    background-color: #fff;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Hide parent directory row when it refers to root. */
tr:has(td a[href='/']) {
  display: none;
}

td.indexcolname a {
    color: var(--primary-color);
}
