/* Reset all potential built-in rendering assumptions so we have full control. */
table, table * {
    border: none;
    padding: 0em 0em 0em 0em;
    margin: 0em 0em 0em 0em;
}
table {
    border-top: 3pt double #000;
    border-bottom: 3pt double #000;
    /* Will centre tables on iBooks and others, but annoyingly, not ADE-based devices, which ignore auto margins. */
    margin: 1em auto 1em auto;
    padding: 0.25em 0em 0.25em 0em;
    border-spacing: 0em;
}

/* Automatically label and number MMD tables. Should do nothing with RTF "captions" since those would standard paragraphs following or preceding the table, rather than <caption> elements assigned to the table. */
table caption {
    margin-top: 0.25em;
    caption-side: bottom;
    text-align: center;
}

th {
    border-bottom: 1pt solid #000;
}

/* Insert a little padding within cells, mainly horizontal, to keep tables from being cramped to the content width of each cell. */
th, td {
    padding: 0.25em 1.25em;
    vertical-align: top;
}

/* Avoid text indents in paragraphs inside cells. */
td p { margin: 0rem 0rem 0rem 0rem; text-indent: 0rem; }

/* Draw a line between the header row and main cells, and between major sections of the table (MMD tables only).  */
thead > tr:last-child > th {
    border-bottom: 1pt solid #000;
}
tbody > tr:first-child td {
    border-top: 1pt solid #ccc;
}
/* Suppress section border for the first section following the header row. */
thead + tbody > tr:first-child td {
    border-top: none;
}
