html.dark:root {
    --primary-blue: #60a5fa;      
    --primary-blue-dark: #3b82f6; 
    --secondary-grey: #4b5563;    
    --secondary-grey-dark: #6b7280; 
    --text-dark: #f3f4f6;         
    --text-light: #d1d5db;        
    --background-light: #1f2937;  
    --background-white: #374151;  
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-medium: rgba(255, 255, 255, 0.2);
}

html.dark:root body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden; 
    background-color: var(--background-light) !important;
    color: var(--text-dark) !important;
}

html.dark:root article {
    background-color: var(--background-light) !important;
}

html.dark:root .article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light) !important;
}

html.dark:root a {
    color: var(--primary-blue) !important;
    text-decoration: none;
    font-weight: bold;
}

html.dark:root .article-content a {
    color: var(--primary-blue) !important;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
html.dark:root .article-content a:hover {
    color: var(--primary-blue-dark) !important;
}

html.dark:root .article-header h1,
html.dark:root page-header h1,
html.dark:root .article-content h2,
html.dark:root .article-content h3 {
    color: var(--primary-blue-dark) !important;
}

html.dark:root header {
    box-shadow: none !important;
}

html.dark:root .article-content li {
    color: var(--secondary-grey) !important;
}

html.dark:root article h1 {
    color: var(--text-dark) !important;
}

html.dark:root article {
    border-top-color: var(--text-dark) !important;
}

html.dark:root article h2 {
    border-color: var(--text-dark) !important;
}

html.dark:root .series-sidebar {
    border-color: var(--primary-blue) !important;
    background-color: var(--background-light) !important;
}

html.dark:root .series-sidebar h3 {
    color: var(--text-light) !important;
    border-color: var(--secondary-grey-dark) !important;
}

html.dark:root .series-sidebar li .font-bold.text-secondary-brown {
    color: var(--primary-blue-dark) !important;
}

html.dark:root .series-sidebar li .text-primary-leaf {
    color: var(--primary-blue) !important;
}

html.dark:root .highlight-stat {
    background-color: var(--background-white) !important;
    color: var(--primary-blue) !important;
    padding: 1rem 1.5rem;
    border-left: 5px solid var(--primary-blue) !important;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 2rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px var(--shadow-light) !important;
}

html.dark:root .highlight-stat-text {
    color: var(--primary-blue) !important;
    font-weight: bold;
    font-size: 2.25rem;
}

html.dark:root .highlight-age {
    color: var(--primary-blue) !important;
    font-weight: bold;
    font-size: 1.125rem;
}

html.dark:root .highlight-age-larger {
    color: var(--primary-blue-darker) !important;
    font-weight: bold;
    font-size: 2.25rem;
}

html.dark:root .keyword {
    font-weight: 700;
    color: var(--primary-blue-dark) !important;
}

html.dark:root .data-table-container {
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    border-collapse: collapse; 
    box-shadow: 0 4px 6px var(--shadow-light) !important;
    background-color: var(--background-light) !important;
    border-radius: 8px;
    overflow-x: auto; /* <-- It adds a scrollbar ONLY if needed */
    -webkit-overflow-scrolling: touch; /* <-- For smooth scrolling on iPhones */
    /*overflow: hidden;*/
    border: 1px solid var(--shadow-light) !important;
}

html.dark:root .data-table-container th, 
html.dark:root .data-table-container td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--shadow-light) !important;
    font-size: 1rem;
}
html.dark:root .data-table-container th {
    background-color: var(--background-light) !important;
    color: var(--primary-blue-dark) !important;
    font-weight: 700;
    text-transform: uppercase;
}
html.dark:root .data-table-container thead th {
    background-color: var(--background-white) !important; 
    color: var(--text-dark) !important;
}

html.dark:root .data-table-container a {
    color: var(--primary-blue) !important;
    text-decoration: underline;
}

html.dark:root page-header {
    color: var(--secondary-grey) !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 2.0rem;
    font-weight: 700;
    text-align: center;
    display: block;
}

html.dark:root .next-in-series-box {
    background-color: var(--background-white) !important;
    border-color: var(--primary-blue) !important;
}

html.dark:root .call-to-action-highlight {
    color: var(--primary-blue) !important;
}

html.dark:root .unpublished-blog-link span {
    color: var(--secondary-grey) !important; 
    transition: none !important; 
}

html.dark:root .unpublished-blog-link:hover span {
    color: var(--shadow-light) !important;
}

html.dark:root .unpublished-blog-link:hover div {
    background-color: transparent !important;
}