* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    color: #222;
}

header {
    height: 200px;
    background-image: url("junkshelf.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

header h1 {
    margin: 0;
    color: white;
    text-align: center;
    font-size: 6em;
    line-height: 2em;
    text-shadow: 2px 2px 4px #000;
}

main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 2px solid #333;
}

caption {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
}

thead {
    background: #333;
    color: white;
}

thead th,
tbody td,
tfoot td {
    border: 1px solid #777;
    padding: 12px;
    text-align: left;
}

thead th {
    text-align: center;
}

tbody tr:nth-child(even) {
    background: #eeeeee;
}

tfoot {
    background: #ddd;
    font-style: italic;
    font-weight: bold;
}

tfoot td {
    text-align: center;
}

footer {
    margin-top: 20px;
    border-top: 3px solid red;
    text-align: center;
    font-style: italic;
    padding: 15px;
    background: #fff;
}

@media (max-width: 719px) {
    main {
        padding: 0 10px;
    }

    table,
    thead,
    tbody,
    tfoot,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    tbody tr {
        margin-bottom: 15px;
        border: 1px solid #777;
        background: white;
    }

    tbody tr:nth-child(even) {
        background: white;
    }

    tbody td {
        position: relative;
        padding-left: 45%;
        border-width: 0 0 1px 0;
        min-height: 48px;
    }

    tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        top: 12px;
        width: 38%;
        font-weight: bold;
    }

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

    tfoot td {
        border: 1px solid #777;
        padding: 12px;
    }

    header h1 {
        font-size: 3.5em;
        line-height: 3.1em;
    }
}
