:root {
    /* BioGrids brand colors - Updated to use green theme r:37 g:109 b:42 */
    --md-primary-fg-color:        #256d2a;
    --md-primary-fg-color--light: #2f8535;
    --md-primary-fg-color--dark:  #1b5520;
    --md-accent-fg-color:         #256d2a;
    --md-accent-fg-color--light:  #2f8535;
    --md-accent-fg-color--dark:   #1b5520;
    
    /* BioGrids green color scheme */
    --biogrids-green: #256d2a;
    --biogrids-green-dark: #1b5520;
    --biogrids-green-light: #2f8535;
    --biogrids-gray: #666666;
    --biogrids-gray-light: #999999;
    --biogrids-dark: #333333;
    --biogrids-text: #333333;
    --biogrids-text-light: #666666;
}

/* Typography improvements to match BioGrids.org */
.md-typeset {
    font-size: 0.8rem;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Enhanced text styling for better readability */
.md-typeset p {
    color: var(--biogrids-text);
    margin-bottom: 1rem;
}

.md-typeset li {
    color: var(--biogrids-text);
}

/* Consistent heading styling for all levels */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
    font-weight: 600;
}

.md-typeset h1 {
    font-weight: bold;
    margin-bottom: 1rem;
}

.md-typeset h2 {
    padding-bottom: 0.3rem;
}

/* Light mode heading colors - Updated to match biogrids.org */
[data-md-color-scheme="default"] .md-typeset h1,
[data-md-color-scheme="default"] .md-typeset h2,
[data-md-color-scheme="default"] .md-typeset h3,
[data-md-color-scheme="default"] .md-typeset h4,
[data-md-color-scheme="default"] .md-typeset h5,
[data-md-color-scheme="default"] .md-typeset h6 {
    color: var(--biogrids-text);
}

/* Dark mode text colors - Ensure all text is white/light for readability */
[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3,
[data-md-color-scheme="slate"] .md-typeset h4,
[data-md-color-scheme="slate"] .md-typeset h5,
[data-md-color-scheme="slate"] .md-typeset h6 {
    color: #ffffff !important;
}

/* Dark mode body text - Override default gray with white */
[data-md-color-scheme="slate"] .md-typeset p,
[data-md-color-scheme="slate"] .md-typeset li,
[data-md-color-scheme="slate"] .md-typeset td,
[data-md-color-scheme="slate"] .md-typeset {
    color: #ffffff !important;
}

/* Dark mode strong/bold text */
[data-md-color-scheme="slate"] .md-typeset strong,
[data-md-color-scheme="slate"] .md-typeset b {
    color: #ffffff !important;
}

/* Link styling to match BioGrids brand */
.md-typeset a {
    color: var(--biogrids-green);
    text-decoration: none;
}

.md-typeset a:hover {
    color: var(--biogrids-green-dark);
    text-decoration: underline;
}

/* Dark mode link styling - Use lighter green for better contrast on dark background */
[data-md-color-scheme="slate"] .md-typeset a {
    color: #68d391 !important;
}

[data-md-color-scheme="slate"] .md-typeset a:hover {
    color: #9ae6b4 !important;
}

/* Code blocks with theme-aware styling */
.md-typeset code {
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 0.85em;
}

.md-typeset pre code {
    border-radius: 5px;
}

/* Light mode code blocks */
[data-md-color-scheme="default"] .md-typeset code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #24292e;
}

[data-md-color-scheme="default"] .md-typeset pre code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #24292e;
}

/* Dark mode code blocks */
[data-md-color-scheme="slate"] .md-typeset code {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

[data-md-color-scheme="slate"] .md-typeset pre code {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

/* Syntax highlighting improvements for dark mode */
[data-md-color-scheme="slate"] .md-typeset .highlight {
    background-color: #2d3748;
}

[data-md-color-scheme="slate"] .md-typeset .highlight pre {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* Button styling to match BioGrids.org */
.md-button {
    background: linear-gradient(to bottom, var(--biogrids-green), var(--biogrids-green-dark));
    color: white;
    border-radius: 4px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.md-button:hover {
    background: linear-gradient(to bottom, var(--biogrids-green-dark), var(--biogrids-green));
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Admonition styling */
.md-typeset .admonition {
    border-left: 4px solid var(--biogrids-green);
    border-radius: 4px;
}

.md-typeset .admonition.note {
    border-left-color: var(--biogrids-green);
}

.md-typeset .admonition.warning {
    border-left-color: #f39c12;
}

.md-typeset .admonition.danger {
    border-left-color: #e74c3c;
}

.md-typeset .admonition.success {
    border-left-color: var(--biogrids-green);
}

/* Light mode admonitions */
[data-md-color-scheme="default"] .md-typeset .admonition {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Dark mode admonitions */
[data-md-color-scheme="slate"] .md-typeset .admonition {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    background-color: #374151;
}

[data-md-color-scheme="slate"] .md-typeset .admonition p,
[data-md-color-scheme="slate"] .md-typeset .admonition li {
    color: #ffffff !important;
}

[data-md-color-scheme="slate"] .md-typeset .admonition .admonition-title {
    color: #ffffff !important;
}

/* Navigation refinements - Clean professional styling */
.md-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    background-color: var(--biogrids-green-dark) !important;
}

/* Header title styling */
.md-header__title {
    color: white !important;
    font-weight: 600;
}

/* Header logo styling */
.md-header__button.md-logo {
    margin: 0.2rem;
}

.md-header__button.md-logo img {
    height: 2rem;
    width: auto;
}

/* Header navigation elements */
.md-header__source,
.md-header__option {
    color: white;
}

/* Search button in header */
.md-header .md-search__form {
    background-color: rgba(255, 255, 255, 0.1);
}

.md-header .md-search__input {
    background-color: transparent;
    color: white;
}

.md-header .md-search__input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Dark mode header adjustments */
[data-md-color-scheme="slate"] .md-header {
    background-color: var(--biogrids-green-dark) !important;
}

[data-md-color-scheme="slate"] .md-header__title {
    color: white !important;
}

/* Hamburger menu button styling for both modes */
.md-header__button.md-icon {
    color: white !important;
}

[data-md-color-scheme="slate"] .md-header__button.md-icon {
    color: white !important;
}

/* Theme toggle button styling */
.md-header .md-header__option [data-md-color-media] {
    color: white !important;
}

.md-header .md-header__option [data-md-color-scheme] {
    color: white !important;
}

.md-tabs {
    background: var(--md-primary-fg-color);
}

/* Clean navigation styling */
.md-nav__title {
    font-weight: 600;
}

.md-nav__link {
    color: var(--biogrids-text-light);
}

.md-nav__link:hover {
    color: var(--biogrids-green);
}

/* Dark mode navigation text */
[data-md-color-scheme="slate"] .md-nav__title {
    color: #ffffff !important;
}

[data-md-color-scheme="slate"] .md-nav__link {
    color: #e2e8f0 !important;
}

[data-md-color-scheme="slate"] .md-nav__link:hover {
    color: #68d391 !important;
}

/* Footer styling */
.md-footer {
    background-color: var(--biogrids-gray);
    color: white;
}

/* Table styling */
.md-typeset table {
    border-collapse: collapse;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.md-typeset table th {
    background-color: var(--biogrids-green);
    color: white;
    font-weight: 600;
}

/* Light mode tables */
[data-md-color-scheme="default"] .md-typeset table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Dark mode tables */
[data-md-color-scheme="slate"] .md-typeset table tr:nth-child(even) {
    background-color: #374151;
}

[data-md-color-scheme="slate"] .md-typeset table {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* BioGrids-specific branding elements */
.biogrids-logo {
    max-height: 40px;
    margin-right: 10px;
}

/* Command line styling for BioGrids commands - Updated colors */
.md-typeset .biogrids-cmd {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border-left: 4px solid var(--biogrids-green);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Homepage hero section styling - Updated colors */
.biogrids-hero {
    background: linear-gradient(135deg, var(--biogrids-green) 0%, var(--biogrids-green-dark) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(37, 109, 42, 0.1);
}

.biogrids-hero h1 {
    color: white !important;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.biogrids-hero p {
    color: white !important;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Ensure hero text is always white in both light and dark modes */
[data-md-color-scheme="default"] .biogrids-hero h1,
[data-md-color-scheme="default"] .biogrids-hero p {
    color: white !important;
}

[data-md-color-scheme="slate"] .biogrids-hero h1,
[data-md-color-scheme="slate"] .biogrids-hero p {
    color: white !important;
}