:root {
  --primary-color: #008080;           /* Classic teal */
  --secondary-color: #5c4430;         /* Rich bronze-brown */
  --accent-color: #d88c4a;            /* Warm bronze-gold highlight */
  --background-color: #fcfcf9;        /* Gentle ivory-white */
  --text-color: #2c2c2c;              /* Clean dark gray */
  --card-background: #ffffff;
  --card-border-color: #e3ded8;
  --bibtex-background: #f2f7f6;
  --link-color: var(--primary-color);
  --link-hover-color: var(--accent-color);
  --header-gradient-start: #008080;
  --header-gradient-end: #5c4430;
  --button-text-color: #ffffff;
  --footer-background-light: var(--secondary-color);
  --footer-text-light: #fffaf5;
  --copy-button-light-bg: #e0e0dc;
  --copy-button-light-text: #3c3c3c;
  --sidebar-button-light-bg: #76c7c0;   /* Softened teal */
  --sidebar-button-light-text: #004d4d;
  --sidebar-button-light-hover-bg: #008080;
  --sidebar-button-light-hover-text: #fff;
  --table-border-color: #d6d3cd;
  --table-header-bg: #5c4430;
  --table-header-text: #ffffff;
  --table-row-bg: #ffffff;
  --table-row-alt-bg: #f7f7f3;
  --table-text-color: #2c2c2c;
  --table-hover-bg: #e0f2f1;
  --beam-yes-color: #388e3c;
  --beam-no-color: #c62828;
  --beam-yes-bg: #e0f2f1;
}



[data-theme="dark"] {
  --primary-color: #4dd0e1;           /* Soft teal highlight */
  --secondary-color: #a1887f;         /* Muted bronze-taupe */
  --accent-color: #f4b183;            /* Bronze-gold accent */
  --background-color: #1e1e1c;
  --text-color: #e4e4e0;
  --card-background: #2a2a28;
  --card-border-color: #44423d;
  --bibtex-background: #2e2e2b;
  --link-color: var(--primary-color);
  --link-hover-color: var(--accent-color);
  --header-gradient-start: #2a2a28;
  --header-gradient-end: #5c4430;
  --button-text-color: #ffffff;
  --footer-background-dark: #1e1e1c;
  --footer-text-dark: #e0dcd6;
  --table-border-color: #4a4742;
  --table-header-bg: #3c342b;
  --table-header-text: #f5f5f5;
  --table-row-bg: #2a2a28;
  --table-row-alt-bg: #35332f;
  --table-text-color: #e4e4e0;
  --beam-yes-color: #81c784;
  --beam-no-color: #ef5350;
  --beam-yes-bg: #214c47;
  --table-hover-bg: #34514e;
  --sidebar-button-light-text: #000;
}



@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    animation: fadeIn 0.5s ease-out;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(120deg, var(--header-gradient-start), var(--header-gradient-end));
    color: #fff;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: 10px;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.15);
    letter-spacing: 1px;
    font-weight: 700;
}

header h2 {
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: 400;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

.content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 40px;
    gap: 25px; /* Reduced from 40px to 25px */
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 900px; /* Increased from 800px to 900px */
    width: 100%;
}

/* Justify paragraph text in the main content area */
.main-content p {
    text-align: justify;
}

/* Styling for page/post logos */
.page-logo {
    display: block;
    margin: 20px auto 30px auto; /* Top, LR auto for centering, Bottom */
    max-width: 400px; /* Adjust as needed */
    width: 100%; /* Responsive up to max-width */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sidebar {
    flex: 0 0 280px; /* Fixed width sidebar: don't grow, don't shrink, width of 280px */
    min-width: 280px; /* Ensure minimum width */
    max-width: 280px; /* Ensure maximum width */
    padding-top: 20px;
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Update CT sidebar to match the standard sidebar width */
#ct-sidebar {
    align-items: flex-start;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    flex: 0 0 280px; /* Match the standard sidebar width */
    min-width: 280px;
    max-width: 280px;
}

#ct-sidebar .sidebar-section {
    width: 100%; /* Ensure sections take full width */
    box-sizing: border-box; /* Consistent width calculation */
    align-self: flex-start; /* Force these sections to left-align within #ct-sidebar */
    margin-left: 0; /* Ensure sections don't have auto left margins */
    padding-left: 0; /* Ensure no left padding within the section div itself */
}

#ct-sidebar .sidebar-section h4,
#ct-sidebar .sidebar-section ul,
#ct-sidebar .sidebar-section ul li {
    text-align: left; /* Explicitly align text to the left */
}

/* Ensure consistent left alignment for CT sidebar content */
#ct-sidebar .sidebar-section h4 {
    padding-left: 0;
    margin-left: 0;
}

#ct-sidebar .sidebar-section ul.sidebar-links { /* Targeting the ul with the class */
    padding-left: 0; /* Ensure no padding for the list itself */
    margin-left: 0;
}

.profile-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 4px solid #fff;
}

.profile-image:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.links {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

.links a {
    background: var(--sidebar-button-light-bg);
    color: var(--sidebar-button-light-text) !important;
    padding: 0 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 120px;
    height: 32px;
    font-size: 0.9em;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    justify-self: center;
    letter-spacing: 0.3px;
}

.links a.wide-sidebar-button {
    grid-column: 1 / -1;
    justify-self: center;
    width: 180px;
}

.links a:hover {
    background: var(--sidebar-button-light-hover-bg);
    color: var(--sidebar-button-light-hover-text) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.section-title {
    font-size: 2em;
    color: var(--secondary-color);
    border-bottom: none;
    padding-bottom: 6px;
    margin-bottom: 24px;
    position: relative;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.publication {
    background: var(--card-background);
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.publication:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.publication h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.publication h3 a {
    color: var(--link-color);
    text-decoration: none;
}

.publication h3 a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.bibtex-button {
    background: var(--primary-color);
    color: var(--button-text-color);
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(66, 99, 235, 0.2);
}

.bibtex-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 112, 87, 0.25);
}

/* Dark mode specific styling for BibTeX button */
[data-theme="dark"] .bibtex-button {
    background: linear-gradient(135deg, #7579ff, #b721ff);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(183, 33, 255, 0.3);
}

[data-theme="dark"] .bibtex-button:hover {
    background: linear-gradient(135deg, #b721ff, #7579ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(183, 33, 255, 0.4);
}

.bibtex-text {
    display: none;
    background: var(--bibtex-background);
    color: var(--text-color);
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    text-align: left;
    border: 1px solid var(--card-border-color);
    font-family: monospace;
}

footer {
    background: var(--footer-background-light);
    color: var(--footer-text-light);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

@media(max-width: 768px) {
    header {
        padding: 30px 0; /* Reduced padding */
    }
    header h1 {
        font-size: 2.2em; /* Reduced font size */
    }
    header h2 {
        font-size: 1.2em; /* Reduced font size */
    }

    .content {
        flex-direction: column;
        margin-top: 20px;
        gap: 20px; /* Reduce gap on mobile */
    }

    .main-content {
        max-width: 100%; /* Allow full width on mobile */
        margin-right: 0;
        margin-bottom: 0; /* Remove margin since we're using gap */
        overflow-x: hidden; /* Prevent horizontal scrolling at container level */
    }

    /* Handle table overflow on mobile */
    .main-content table {
        width: var(--mobile-table-width) !important;
        max-width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Add horizontal scrolling to math elements and code blocks on mobile */
    .main-content .MathJax_Display,
    .main-content pre {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Better handling of algorithm displays and large formulas */
    .main-content mjx-container {
        overflow-x: auto;
        display: block;
        max-width: 100%;
    }

    .sidebar, #ct-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding-top: 0;
        position: static;
        height: auto;
    }

    .profile-image {
        width: 150px; /* Smaller profile image */
        height: 150px;
        margin-bottom: 15px;
    }

    .links {
        grid-template-columns: 1fr; /* Single column for buttons */
        gap: 8px; /* Slightly reduced gap */
    }
    .links a, .links a.wide-sidebar-button {
        max-width: 280px; /* But not too wide */
        margin-left: auto;
        margin-right: auto;
        justify-self: center; /* Ensure they center in the 1fr grid cell */
    }

    .page-logo {
        max-width: 90%; /* Allow logo to be wider relative to small screen */
        margin-top: 15px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 1.6em; /* Reduced font size */
    }

    .theme-switch-wrapper {
        top: 10px; /* Adjust position for smaller header */
        right: 10px;
    }
    .theme-switch-wrapper span {
        font-size: 0.8em; /* Smaller text for toggle */
    }

    /* Ensure CT sidebar content is also responsive */
    #ct-sidebar .sidebar-section {
        padding-left: 10px; /* Add some padding on mobile for CT sidebar content */
        padding-right: 10px;
    }
}

/* Theme Toggle Switch Styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 48px;
    margin-left: 10px;
}

.theme-switch input {
    display:none;
}

.slider {
    background-color: rgba(255, 255, 255, 0.3);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .3s;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.slider:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: .3s;
    width: 18px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-switch-wrapper span {
    color: #fff;
    font-size: 0.9em;
}

/* Adjustments for links in About Me section */
.main-content section a {
    color: var(--link-color);
    text-decoration: none;
}

.main-content section a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Ensure links within paragraphs in main content sections also get standard link styling */
.main-content section p a {
    color: var(--link-color);
    text-decoration: none;
}

.main-content section p a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Ensure publication status and details text color adapts */
.publication p {
    color: var(--text-color);
}

.publication ul li {
    color: var(--text-color);
}

/* Ensure header text color is consistent */
header h1, header h2, header p {
    color: #fff;
}

/* Ensure section title color adapts */
.section-title {
    color: var(--secondary-color);
    border-bottom-color: var(--accent-color);
}

/* Sidebar link button adjustments for dark mode */
[data-theme="dark"] .links a {
    background-color: var(--primary-color);
    color: #111;
}

[data-theme="dark"] .links a:hover {
    background-color: var(--accent-color);
    color: #111;
}

/* General Sidebar Styling */
.sidebar h3, .sidebar h4 {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 8px;
    margin-top: 15px;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar a {
    color: var(--link-color);
    text-decoration: none;
    display: block;
    padding: 5px 0;
}

.sidebar a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.sidebar-section {
    margin-bottom: 25px;
}

/* Styling for BEAM algorithm comments in MathJax */
.beam-comment {
    color: #0056b3;
}

[data-theme="dark"] .beam-comment {
    color: #87cefa;
}

[data-theme="dark"] footer {
    background: var(--footer-background-dark);
    color: var(--footer-text-dark);
}

/* Minor Section Title (e.g., for Share/Comments sections) */
.section-title-minor {
    font-size: 1.5em; /* Slightly smaller than main section titles */
    color: var(--secondary-color);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 8px;
    margin-top: 30px; /* Add some space above */
    margin-bottom: 15px;
}

/* Share Buttons Styling */
.share-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border-color);
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9em;
}

a.share-button.share-x {
    background-color: #1DA1F2; /* Twitter Blue */
    color: #fff; /* Explicit white text */
}
a.share-button.share-x:hover {
    background-color: #0c85d0;
}

[data-theme="dark"] a.share-button.share-x {
    background-color: #1a91da; /* Slightly adjusted Twitter Blue for dark mode */
    color: #fff; /* Explicit white text */
}
[data-theme="dark"] a.share-button.share-x:hover {
    background-color: #177fbf;
}

a.share-button.share-linkedin {
    background-color: #0A66C2; /* LinkedIn Blue */
    color: #fff; /* Explicit white text */
}
a.share-button.share-linkedin:hover {
    background-color: #004182;
}

[data-theme="dark"] a.share-button.share-linkedin {
    background-color: #0059a8; /* Slightly adjusted LinkedIn Blue for dark mode */
    color: #fff; /* Explicit white text */
}
[data-theme="dark"] a.share-button.share-linkedin:hover {
    background-color: #004a8c;
}

.share-copy {
    background-color: var(--copy-button-light-bg);
    color: var(--copy-button-light-text);
}
.share-copy:hover {
    filter: brightness(0.95);
}

[data-theme="dark"] .share-copy {
    background-color: var(--accent-color); /* Use accent color in dark mode for Copy */
    color: #1c2833; /* Dark text for better contrast on accent background */
}
[data-theme="dark"] .share-copy:hover {
    filter: brightness(0.9);
}


/* Comments Section Styling */
.comments-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border-color);
}

#comment-system-placeholder {
    min-height: 100px; /* Placeholder height */
    background-color: var(--card-background);
    border: 1px dashed var(--card-border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 20px;
}

/* Staticman Comment Form Styling */
#staticman-form .form-group {
    margin-bottom: 15px;
}

#staticman-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

#staticman-form input[type="text"],
#staticman-form input[type="email"],
#staticman-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--card-border-color);
    border-radius: 5px;
    background-color: var(--card-background);
    color: var(--text-color);
    box-sizing: border-box; /* Ensure padding doesn't add to width */
}

#staticman-form textarea {
    resize: vertical;
    min-height: 100px;
}

#staticman-form input[type="text"]:focus,
#staticman-form input[type="email"]:focus,
#staticman-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color-translucent, rgba(52, 152, 219, 0.25)); /* Define --primary-color-translucent if needed or use rgba */
}

.staticman-submit-button {
    background-color: var(--primary-color);
    color: #fff; /* Assuming primary color is dark enough for white text */
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.staticman-submit-button:hover {
    background-color: var(--accent-color); /* Or a darker shade of primary */
}

[data-theme="dark"] .staticman-submit-button {
    background-color: var(--primary-color); /* Dark theme primary */
    color: #1c2833; /* Dark text for contrast on lighter blue button if primary is light in dark mode */
}

[data-theme="dark"] .staticman-submit-button:hover {
    background-color: var(--accent-color); /* Dark theme accent */
}

#staticman-form-status {
    margin-top: 15px;
    font-style: italic;
    color: var(--text-color); /* Adapts with theme */
}

/* Staticman Comments List Styling */
#staticman-comments-list {
    margin-top: 20px;
}

.staticman-comment {
    background-color: var(--card-background);
    border: 1px solid var(--card-border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.staticman-comment header {
    margin-bottom: 10px;
    padding-bottom: 5px;
    padding-top: 5px;
    border-bottom: 1px dashed var(--card-border-color);
    background: none;
    width: fit-content; /* Make it only as wide as the content */
    text-align: left; /* Ensure left alignment */
}

.staticman-comment header strong {
    color: var(--primary-color); /* Adapts with theme */
    font-size: 1.1em;
    display: inline-block; /* Ensure proper alignment */
}

.staticman-comment .comment-date {
    font-size: 0.9em;
    color: var(--secondary-color); /* Adapts with theme */
    margin-left: 10px;
    display: inline-block; /* Ensure proper alignment */
}

.staticman-comment .comment-message {
    line-height: 1.6;
    color: var(--text-color); /* Default text color */
    white-space: pre-wrap; /* Preserve newlines from textarea */
}

/* Ensure high contrast for comment text in dark mode */
[data-theme="dark"] .staticman-comment .comment-message {
    color: #ecf0f1; /* Ensure this is the bright, main dark theme text color */
}

[data-theme="dark"] #staticman-form label,
[data-theme="dark"] #staticman-form-status {
    color: #ecf0f1; /* Ensure form labels and status messages are also light in dark mode */
}

[data-theme="dark"] .staticman-comment header strong {
    color: var(--primary-color); /* Should be a light blue, check if this is readable enough */
}

[data-theme="dark"] .staticman-comment .comment-date {
    color: #ecf0f1; /* Changed from var(--secondary-color) to the main light text color for better contrast */
}

/* Style placeholder text for dark mode */
[data-theme="dark"] #staticman-form input[type="text"]::placeholder,
[data-theme="dark"] #staticman-form input[type="email"]::placeholder,
[data-theme="dark"] #staticman-form textarea::placeholder {
    color: #bbc1c2; /* A lighter, somewhat desaturated grey for dark mode placeholders */
    opacity: 1; /* Firefox needs this to override default opacity */
}

/* Go to Top Button Styles */
#goToTopBtn {
    display: none; /* Hidden by default, JS will show it */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--sidebar-button-light-bg);
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%; /* Make it round */
    font-size: 14px; /* For the 'Top' text */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background-color 0.3s, opacity 0.3s, visibility 0.3s;
    width: 50px; /* Fixed width */
    height: 50px; /* Fixed height */
    display: flex; /* For aligning icon and text */
    align-items: center;
    justify-content: center;
    flex-direction: column; /* Stack icon and text */
}

#goToTopBtn:first-child {
    font-size: 24px; /* Make the arrow bigger */
    margin-bottom: 2px; /* Space between arrow and text */
}

#goToTopBtn:hover {
    background-color: var(--accent-color);
}

[data-theme="dark"] #goToTopBtn {
    background-color: var(--primary-color);
    color: #1c2833;
}

[data-theme="dark"] #goToTopBtn:hover {
    background-color: var(--primary-color);
}

/* Footnotes Section */
.footnotes-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border-color);
}

.footnotes-section h3 {
    margin-bottom: 20px;
}

.footnotes-section ol {
    padding-left: 20px;
    margin: 0;
}

.footnotes-section li {
    margin-bottom: 10px;
    color: var(--text-color);
    text-align: justify;
    font-size: 0.9em;
}

.footnotes-section li a {
    color: var(--link-color);
    text-decoration: none;
}

.footnotes-section li a:hover {
    text-decoration: underline;
}

/* Table Styles */
.results-table {
    width: var(--table-width);
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px auto;
    font-size: 0.9em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: var(--table-row-bg);
    color: var(--table-text-color);
    text-align: center;
    border: 1px solid var(--table-border-color);
    border-radius: 8px;
    overflow: hidden;
}

.results-table caption {
    caption-side: bottom;
    padding: 15px;
    font-size: 0.9em;
    color: var(--text-color);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

.results-table thead tr:first-child th {
    background-color: var(--table-header-bg);
    color: var(--table-header-text);
    font-weight: 600;
    border-bottom: 2px solid var(--table-border-color);
}

.results-table thead tr:last-child th {
    background-color: var(--table-header-bg);
    color: var(--table-header-text);
    font-weight: 600;
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    border: 1px solid var(--table-border-color);
}

.results-table tbody tr {
    transition: background-color 0.3s ease;
}

.results-table tbody tr:nth-of-type(even) {
    background-color: var(--table-row-alt-bg);
}

.results-table tbody tr:hover {
    background-color: var(--table-hover-bg);
}

.results-table tbody tr:last-of-type td {
    border-bottom: none;
}

.results-table .beam-yes-row td {
    font-weight: 600;
    border-bottom: 1px solid var(--table-border-color);
}

.results-table .beam-yes {
    color: var(--beam-yes-color);
    font-size: 1.2em;
    font-weight: bold;
}

.results-table .beam-no {
    color: var(--beam-no-color);
    font-size: 1.2em;
    font-weight: bold;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .results-table {
        width: 100%;
        font-size: 0.8em;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
}
