/* Basic Reset (optional, but good for consistency) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.7;
    color: #343a40;
    background-color: #f8f9fa;
    padding: 15px;
    font-size: 17px;
}

.container {
    max-width: 900px;
    margin: 25px auto;
    padding: 30px 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

header {
    border-bottom: 2px solid #ced4da;
    margin-bottom: 35px;
    padding-bottom: 25px;
}

header h1 {
    color: #212529;
    font-size: 2.5em;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
}

main article section {
    margin-bottom: 35px;
}

h2 {
    color: #343a40;
    font-size: 2em;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
    font-weight: 500;
    line-height: 1.3;
}

h3 {
    color: #495057;
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 500;
    line-height: 1.3;
}

p {
    margin-bottom: 20px;
    text-align: justify;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 35px;
}

li {
    margin-bottom: 12px;
}

strong, b {
    font-weight: 600;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

a:hover, a:focus {
    color: #0056b3;
    text-decoration: underline;
}

blockquote {
    border-left: 5px solid #007bff;
    margin: 30px 0;
    padding: 20px 30px;
    background-color: #e9f5ff;
    font-style: italic;
    color: #212529;
    border-radius: 0 8px 8px 0;
}

blockquote p {
    margin-bottom: 0;
    font-size: 1.05em;
}

.source small, p.source small {
    font-size: 0.9em;
    color: #6c757d;
    display: block;
    margin-top: -15px;
    margin-bottom: 20px;
    text-align: left;
}

.icon {
    margin-right: 12px;
}

/* --- Table Styles --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    margin-bottom: 35px;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

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

table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #343a40;
    border-bottom: 2px solid #ced4da;
}

table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

table tbody tr:hover {
    background-color: #f1f3f5;
}

table caption {
    caption-side: bottom;
    padding: 12px;
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
    margin-top: 5px;
}

table a {
    font-weight: 500;
}


footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ced4da;
    text-align: center;
}

.footer-nav a {
    margin: 0 15px;
    font-weight: 500;
    color: #495057;
}

.footer-nav a:hover, .footer-nav a:focus {
    color: #007bff;
}

/* --- Styles for the index.html page list (Further Revised for very close grouping, no boxes, indented description) --- */
.index-list h2 { /* Specific styling for the "Available Topics:" heading */
    font-size: 1.8em;
    color: #343a40;
    margin-bottom: 15px; /* Space before the list starts */
    border-bottom: none;
    text-align: left;
}

.index-list ul {
    list-style-type: none; /* Removes default bullets */
    padding-left: 0;       /* Removes default ul padding, allowing li content to align with container padding */
}

.index-list li {
    margin-bottom: 8px;  /* NEW: Reduced space between each <li> entry (link + description pair) */
    padding: 4px 0px;    /* NEW: Minimal top/bottom padding for the list item wrapper itself */
    border: none;        /* Ensures no borders are drawn around the list item */
    background-color: transparent; /* Ensures no background color for the list item block */
}

.index-list li a {
    font-weight: 600;
    font-size: 1.2em;    /* Font size for the blue topic link */
    display: block;      /* Ensures the link takes its own line */
    margin-bottom: 2px;  /* NEW: Very small space between the link and its description */
    color: #007bff;
    text-decoration: none;
}

.index-list li a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.index-list li p {
    font-size: 0.9em;    /* Font size for the description text */
    color: #495057;       /* Color for the description text */
    margin-bottom: 0;    /* No extra space after the description within its <li> */
    text-align: left;
    line-height: 1.6;    /* Ensure good readability for the description */
    margin-left: 25px;   /* Indents the explanatory sentence under the link */
    padding-right: 5px;  /* Ensure long description lines don't touch browser edge if container is narrow */
}


/* --- Styles for mercury_toxicity.html specific intro section --- */
.intro-section {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    align-items: flex-start;
    margin-bottom: 35px;
}

.intro-text {
    flex: 2.5;
    min-width: 320px;
}

.intro-image {
    flex: 1.5;
    min-width: 240px;
    text-align: center;
    padding-top: 10px;
}

.intro-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* --- Styles for mercury_citations_checklist.html --- */
/* Citation Block Styling */
.citation {
    margin-bottom: 30px; /* Space between citations */
    padding: 18px 25px;
    border-left: 5px solid #007bff; /* Using primary link color for the border */
    background-color: #f8f9fa;    /* Light background, consistent with body or table head */
    border-radius: 0 6px 6px 0;   /* Rounded corners on the right side */
}

.citation h3 {
    font-size: 1.3em; /* Slightly smaller than general H3 for citation titles */
    color: #343a40;
    margin-top: 0;     /* Remove top margin if H3 is first in citation */
    margin-bottom: 8px;
    border-bottom: none; /* No extra border for citation H3 */
}

.citation p {
    margin-bottom: 6px; /* Tighter paragraph spacing within a citation */
    font-size: 0.95em;
    text-align: left;  /* Citations don't need to be justified */
}

.citation p strong { /* For "Authors:", "Findings:" labels */
    font-weight: 600;
    color: #495057;
}

.publication-details {
    font-style: italic;
    color: #555;
    font-size: 0.9em;
    margin-top: 8px !important; /* Ensure some space above publication details */
}

.publication-details a {
    font-weight: normal; /* Links within publication details can be normal weight */
}

.source-note { /* For notes like IAOMT/IJERPH archive suggestions */
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #ced4da; /* Separator for notes within a citation */
    line-height: 1.5;
}

/* Checklist Section Styling */
.checklist-section {
    margin-top: 40px;
    padding: 25px 30px;
    background-color: #e9f0f5; /* A distinct, clean background for the checklist area */
    border-radius: 8px;
    border: 1px solid #d1d9e0;
}

.checklist-section h2 { /* H2 inside checklist section */
    margin-top: 0;
    font-size: 1.8em; /* Match index.html list title */
    color: #343a40;
    border-bottom: 1px solid #c8d0d8; /* Border color to match its background scheme */
}
.checklist-section h3 { /* H3 for "Key Areas for Investigation" */
    font-size: 1.4em;
    color: #495057;
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: none;
}

.checklist-section ul { /* Main ul for checklist categories */
    list-style-type: none; 
    padding-left: 5px;
}

.checklist-section ul ul { /* Nested ul for sub-points in checklist */
    list-style-type: disc; 
    padding-left: 25px;  
    margin-top: 8px;
    margin-bottom: 15px;
}
.checklist-section ul ul li { /* Sub-items within checklist points */
    font-size: 0.9em;
    font-weight: normal; 
}

.checklist-item { /* For the <strong> or main <li> text of a checklist category */
    font-weight: bold;
    font-size: 1.1em; 
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 8px;
}

.checklist-section .source-note { /* Disclaimer within checklist */
    margin-top: 20px;
    font-weight: normal;
    border-top: none;
    font-style: italic;
}


/* Styling for nested lists within general content for clarity */
main article ul ul { /* General nested lists, not specific to checklist or index */
    margin-top: 10px;
    margin-bottom: 15px;
    padding-left: 30px;
    list-style-type: circle;
}

main article ul ul li { /* General nested list items */
    font-size: 0.95em;
    color: #495057;
    margin-bottom: 8px;
}

/* Ensure h2 within intro-text has appropriate margin (for mercury_toxicity.html) */
.intro-text h2 {
    margin-top: 25px;
}
.intro-text h2:first-child {
    margin-top: 0;
}


/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 16px;
    }
    .container {
        padding: 20px 25px;
        margin: 15px auto;
        border-radius: 10px;
    }
    header h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.7em;
    }
    h3 {
        font-size: 1.4em;
    }
    p { /* Paragraphs left-aligned on smaller screens for readability */
        text-align: left;
    }
    table {
        font-size: 0.9em;
    }
    table th, table td {
        padding: 8px 10px;
    }

    .intro-section { /* For mercury_toxicity.html */
        flex-direction: column;
        align-items: center;
    }
    .intro-text { /* For mercury_toxicity.html */
        order: 2;
        min-width: 100%;
    }
    .intro-image { /* For mercury_toxicity.html */
        order: 1;
        min-width: 100%;
        margin-bottom: 25px;
    }
    .intro-image img { /* For mercury_toxicity.html */
        max-width: 85%;
    }

    /* Responsive checklist section */
    .checklist-section {
        padding: 20px;
    }
    .citation {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    .container {
        padding: 15px 20px;
        border-radius: 8px;
    }
    header h1 {
        font-size: 1.7em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.25em;
    }
    table {
        font-size: 0.85em;
    }
    table th, table td {
        padding: 6px 8px;
    }
    .footer-nav a {
        display: block;
        margin: 10px 0;
    }
    .footer-nav a:not(:last-child)::after { /* Remove pipe separator for stacked links */
        content: "";
    }
     .footer-nav a:first-child {
        margin-top: 0;
    }

    /* Further responsive checklist/citation */
    .checklist-section {
        padding: 15px;
    }
    .citation {
        padding: 12px 15px;
    }
    .citation h3 {
        font-size: 1.2em;
    }
}
