html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 30px auto;
    padding: 0px;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    max-width: 900px;
    font-family: "Nitti Grotesk Semi Lt", sans-serif;
    text-align: left;
    list-style: decimal;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

blockquote {
    padding: 0 25px !important;
    font-size: 90% !important;
}

body {
    margin: 45px;
    line-height: 1.6;
    font-size: 130%;
    max-width: 800px;
    margin-top: 100px;
    margin-bottom: 100px;
    background-color: #E4DCD9;
    color: #1A0800;
    font-family: "Nitti Grotesk Semi Lt", sans-serif;
}

h1 {
    font-size: 220%;
    font-family: "Nitti Grotesk Bd", sans-serif;
}

h2 {
    font-family: "Nitti Grotesk Bd", sans-serif;
    font-size: 160%;
}

.title-image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    margin: 30px auto 60px auto;
    padding: 0;
}

a {
  color: darkred;
}

@media (max-width: 768px) {
    body {
        font-size: 130%;
        margin: 20px;
        margin-top: 50px;
        margin-bottom: 50px;
        padding-left: 20px;
    }
    
    h1 {
        font-size: 220%;
    }
    
    h2 {
        font-size: 160%;
    }
    
    ol, ul {
        padding-left: 20px;
        margin-left: 0;
    }
}

/* SVG styling */
svg {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Footnote styling */
.footnote-ref {
    vertical-align: super;
    font-size: 0.7em;
    text-decoration: none;
    position: relative;
    top: -0.3em;
}

.footnote-ref:hover {
    text-decoration: underline;
}

/* Footnote backref styling */
.footnote-backref {
    text-decoration: none;
    font-size: 0.8em;
}

.footnote-backref:hover {
    text-decoration: underline;
}

/* Table styling */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 30px auto;
    font-size: 85%;
    border: 2px solid #8B7355;
    background-color: #F5F1ED;
}

th, td {
    border: 1px solid #B8A082;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #D4C4B0;
    font-weight: bold;
    font-family: "Nitti Grotesk Bd", sans-serif;
    font-size: 90%;
}

/* Highlight first column */
td:first-child {
    background-color: #E8DDD4;
    font-weight: bold;
    font-family: "Nitti Grotesk Bd", sans-serif;
}

/* Zebra striping for better readability */
tr:nth-child(even) {
    background-color: #F8F5F1;
}

tr:nth-child(even) td:first-child {
    background-color: #EBE0D7;
}

/* Hover effect */
tr:hover {
    background-color: #F0E6DB;
}

tr:hover td:first-child {
    background-color: #E3D4C8;
}

@media (max-width: 768px) {
    table {
        font-size: 75%;
    }
    
    th, td {
        padding: 8px 10px;
    }
}

@media (prefers-color-scheme: dark) {
    body {
      color: #E4DCD9;
      background-color: #1A0800;
        }
    a {
      color: burlywood;
    }
    
    /* Change black SVG elements to white in dark mode */
    svg [fill="#000000"] {
        fill: #E4DCD9 !important;
    }
    
    svg [stroke="#000000"] {
        stroke: #E4DCD9 !important;
    }
    
    /* Dark mode table styling */
    table {
        border: 2px solid #6B5A47;
        background-color: #2D1F0F;
    }
    
    th, td {
        border: 1px solid #4A3D2A;
    }
    
    th {
        background-color: #3D2B1A;
        color: #E4DCD9;
    }
    
    td:first-child {
        background-color: #342318;
        color: #E4DCD9;
    }
    
    tr:nth-child(even) {
        background-color: #251A0D;
    }
    
    tr:nth-child(even) td:first-child {
        background-color: #2F1E12;
    }
    
    tr:hover {
        background-color: #3A2817;
    }
    
    tr:hover td:first-child {
        background-color: #42301E;
    }
}
