body {
    width: 500px;
    margin: 0 auto;
    font-family: 'Times New Roman', Times, serif;
}

table {
    width: 500px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

figure {
    width: 500px;
    margin: 20px 0;
}

figcaption {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}

body > table th:nth-child(1), 
body > table td:nth-child(1),
figure:nth-of-type(1) table th:nth-child(1), 
figure:nth-of-type(1) table td:nth-child(1) {
    text-align: center;
}

body > table {
    border: 2px dotted black;
    border-collapse: separate;
    border-spacing: 2px;
}

body > table th, body > table td {
    border: 2px dotted black;
    padding: 5px;
    text-align: left;
}

figure:nth-of-type(1) table {
    border: 2px solid blue;
}

figure:nth-of-type(1) table th, 
figure:nth-of-type(1) table td {
    border: 2px solid blue;
    padding: 5px;
    text-align: left;
}

figure:nth-of-type(1) table th {
    background-color: lightgray;
    color: black;
}

figure:nth-of-type(1) table tr:nth-child(odd) {
    background-color: lightgray;
}

figure:nth-of-type(1) table tr:nth-child(even) {
    background-color: white;
}

figure:nth-of-type(1) table tr:first-child {
    background-color: lightgray;
}

figure:nth-of-type(2) table {
    border: 2px solid black;
    border-collapse: collapse;
    width: 100%;
}

figure:nth-of-type(2) table th {
    border: 2px solid black;
    background-color: lightblue;
    padding: 5px;
    text-align: center;
}

figure:nth-of-type(2) table td {
    border: 2px solid black;
    padding: 5px;
    text-align: left !important;
    font-weight: normal !important;
}

figure:nth-of-type(2) table th:nth-child(1),
figure:nth-of-type(2) table td:nth-child(1) {
    text-align: center !important;
}

figure:nth-of-type(2) table th:nth-child(3) {
    text-align: left;
    padding-left: 0;
}

figure:nth-of-type(2) table th:nth-child(2) {
    text-align: right;
    padding-right: .25em;
}

figure:nth-of-type(2) table td:nth-child(2),
figure:nth-of-type(2) table td:nth-child(3) {
    text-align: center;
    width: 20%;
}

figure:nth-of-type(2) table td:nth-child(2) {
    border-right: none; 
    text-align: right !important;
    padding-right: .25em;
    font-weight: normal;
}

figure:nth-of-type(2) table td:nth-child(3) {
    border-left: none;
    text-align: left;
    padding-left: 0;
}

figure:nth-of-type(2) table th:nth-child(2) {
    border-right: none;
}

figure:nth-of-type(2) table th:nth-child(3) {
    border-left: none;
}

figure:nth-of-type(2) table td:nth-child(4) {
    text-align: center !important;
    font-weight: normal !important;
    background-color: transparent !important;
}

figure:nth-of-type(2) table tr:nth-child(odd) td:nth-child(1),
figure:nth-of-type(2) table tr:nth-child(odd) td:nth-child(2),
figure:nth-of-type(2) table tr:nth-child(odd) td:nth-child(3) {
    background-color: lightgray;
}

figure:nth-of-type(2) table tr:nth-child(even) td:nth-child(1),
figure:nth-of-type(2) table tr:nth-child(even) td:nth-child(2),
figure:nth-of-type(2) table tr:nth-child(even) td:nth-child(3) {
    background-color: white;
}

figure:nth-of-type(2) table td:nth-child(4),
figure:nth-of-type(2) table td:nth-child(5) {
    background-color: transparent !important;
}

figure:nth-of-type(2) table td:last-child {
    font-weight: bold;
    text-align: right;
}

figure:nth-of-type(2) table td:nth-child(5){
    text-align: right !important;
    font-weight: bold !important;
}