/* LibreFolio Documentation Theme */
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');

/* Flag emoji — Windows doesn't support country flags with Segoe UI Emoji */
.emoji-flag {
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
}

/* Hide built-in mkdocs-static-i18n language selector (replaced by custom site-lang-selector.js) */
.md-header__option .md-select {
    display: none !important;
}

:root {
    /* Brand Colors from Frontend */
    --md-primary-fg-color: #1a4031; /* libre-green */
    --md-primary-bg-color: #f5f4ef; /* libre-beige */
    --md-accent-fg-color: #5a947c; /* primary-400 */

    --md-sidebar-width: 12rem;
}

/* Dark mode overrides - aligned with frontend html.dark */
[data-md-color-scheme="slate"] {
    --md-primary-fg-color: #1a4031; /* Dark green header (matches frontend sidebar) */
    --md-primary-bg-color: #f8fafc; /* Text on header */
    --md-accent-fg-color: #22c55e; /* theme-accent (matches frontend) */
    --md-default-bg-color: #0f172a; /* theme-bg-primary */
    --md-default-bg-color--light: #1e293b; /* theme-bg-secondary */
    --md-default-bg-color--lighter: #334155; /* theme-bg-tertiary */
    --md-default-fg-color: #f8fafc; /* theme-text-primary */
    --md-default-fg-color--light: #cbd5e1; /* theme-text-secondary */
    --md-default-fg-color--lighter: #94a3b8; /* theme-text-muted */
    --md-default-fg-color--lightest: #334155; /* theme-border-primary */
    --md-code-bg-color: #1e293b; /* theme-bg-secondary */
    --md-code-fg-color: #e2e8f0; /* slate-200 */
    --md-typeset-a-color: #22c55e; /* theme-accent */
}

/* Logo background — white square to frame the non-square logo */
.md-logo img,
.md-header__button.md-logo img {
    background: #ffffff;
    border-radius: 6px;
    padding: 3px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.home-logo img {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-md-color-scheme="slate"] .home-logo img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dark mode header bar - dark with green accent text */
[data-md-color-scheme="slate"] .md-header {
    background-color: #0f172a; /* theme-bg-primary, very dark */
    border-bottom: 1px solid #334155;
}

/* Dark mode header title and links - green accent */
[data-md-color-scheme="slate"] .md-header .md-header__title,
[data-md-color-scheme="slate"] .md-header .md-header__topic,
[data-md-color-scheme="slate"] .md-header a {
    color: #00d681;
}

/* Dark mode header icons */
[data-md-color-scheme="slate"] .md-header .md-header__button {
    color: #cbd5e1;
}

/* Dark mode tabs bar */
[data-md-color-scheme="slate"] .md-tabs {
    background-color: #1e293b; /* theme-bg-secondary */
    border-bottom: 1px solid #334155;
}

[data-md-color-scheme="slate"] .md-tabs__link {
    color: #cbd5e1;
}

[data-md-color-scheme="slate"] .md-tabs__link--active,
[data-md-color-scheme="slate"] .md-tabs__link:hover {
    color: #22c55e;
}

/* Dark mode sidebar background */
[data-md-color-scheme="slate"] .md-sidebar {
    background-color: #0f172a;
}

/* Dark mode sidebar nav links - ensure visible text */
[data-md-color-scheme="slate"] .md-nav__link {
    color: #cbd5e1;
}

[data-md-color-scheme="slate"] .md-nav__link:hover {
    color: #22c55e;
}

/* Dark mode mobile drawer */
[data-md-color-scheme="slate"] .md-nav--primary {
    background-color: #0f172a;
}

/* Dark mode mobile drawer overlay and inner nav */
[data-md-color-scheme="slate"] .md-nav--primary .md-nav {
    background-color: #0f172a;
}

/* Dark mode mobile: back button and title */
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title {
    background-color: #1e293b;
    color: #f8fafc;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title .md-nav__icon {
    color: #cbd5e1;
}

/* Dark mode mobile: all nav items should have visible text */
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item > .md-nav__link {
    color: #cbd5e1;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item > .md-nav__link:hover,
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item > .md-nav__link:focus {
    color: #22c55e;
}

/* Dark mode mobile: active item */
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item--active > .md-nav__link {
    color: #22c55e;
}

/* Dark mode search bar */
[data-md-color-scheme="slate"] .md-search__form {
    background-color: #1e293b;
}

[data-md-color-scheme="slate"] .md-search__input {
    color: #f8fafc;
}

/* --- LAYOUT & WIDTH --- */

.md-grid {
    max-width: 96% !important;
    margin-right: auto;
    margin-left: auto;
}

/* --- PAGE CONTENT --- */

/* H1 Style - Gradient Background, Full Width, Centered */
.md-typeset h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1rem;
    color: white;
    background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block; /* Full width */
    width: 100%;
    text-align: center; /* Centered text */
    box-sizing: border-box; /* Include padding in width */
}

/* Dark mode H1 - dark background with green accent text */
[data-md-color-scheme="slate"] .md-typeset h1 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #00d681;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- LEFT SIDEBAR (Navigation) --- */

/* LEVEL 1: Main Sections - Gradient Style, Centered */
.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
    font-size: 0.75rem !important; /* Compact to fit sidebar */
    font-weight: 800 !important;
    color: white !important;
    background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
    border-radius: 4px;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: none;
    text-align: center; /* Centered text */
    display: flex; /* Flex to keep icon inline */
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Hide the expand/collapse arrow icon inside Level 1 section labels */
.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link > .md-nav__icon {
    display: none !important;
}

/* Also hide in nested nav contexts (desktop only) */
@media screen and (min-width: 76.25em) {
    .md-nav__item--section > label.md-nav__link > .md-nav__icon {
        display: none !important;
    }
}

/* Dark mode Level 1 sections - dark background with green accent */
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #00d681 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile sidebar: allow wrapping for long section names */
@media screen and (max-width: 76.1875em) {
    .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
        white-space: normal;
        word-break: break-word;
        font-size: 0.7rem !important;
        padding: 0.35rem 0.4rem;
    }
}

/* LEVEL 2: Sub-sections */
.md-nav__item--nested > .md-nav__link {
    font-weight: 700;
    color: var(--md-default-fg-color);
    margin-top: 0.5rem;
}

/* Specific styling for Level 2 headers (desktop only) */
@media screen and (min-width: 76.25em) {
    .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav > .md-nav__list > .md-nav__item--section > .md-nav__link {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: var(--md-primary-fg-color) !important;
        border-bottom: 1px solid var(--md-default-fg-color--lightest);
        margin-top: 0.8rem;
        margin-bottom: 0.3rem;
        padding-bottom: 0.2rem;
        text-transform: none;
        background: none;
        box-shadow: none;
        padding-left: 0;
        text-align: left; /* Keep level 2 left-aligned */
    }
}

/* Active link styling */
.md-nav__item .md-nav__link--active {
    font-weight: bold;
    border-left: 3px solid var(--md-primary-fg-color);
    padding-left: 0.5rem;
    background-color: rgba(0, 0, 0, 0.03);
}

/* Sidebar nav links - prevent overflow */
.md-nav__link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Level 1 section active in sidebar: keep compact style, don't enlarge */
.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link--active,
.md-nav--primary > .md-nav__list > .md-nav__item--active > .md-nav__link {
    border-left: none; /* Level 1 uses gradient background, not border */
}

/* Dark mode active link */
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: #22c55e; /* Use accent green for visibility */
}

/* Dark mode Level 2 sidebar headers - use accent green for visibility (desktop only) */
@media screen and (min-width: 76.25em) {
    [data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav > .md-nav__list > .md-nav__item--section > .md-nav__link {
        color: #22c55e !important;
        border-bottom-color: #334155;
    }
}

/* Dark mode sidebar expand arrows */
[data-md-color-scheme="slate"] .md-nav__icon {
    color: #94a3b8;
}

/* Dark mode sidebar item borders */
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__item {
    border-color: #334155;
}

/* Mobile sidebar: normalize section title when inside a sub-section */
/* mkdocs-material shows the current section title large and centered - override */
@media screen and (max-width: 76.1875em) {

    /* ALL nav titles in mobile drawer: normalize to compact left-aligned with flex row */
    .md-nav--primary .md-nav__title {
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        text-align: left !important;
        padding: 0.4rem 0.6rem !important;
        line-height: 1.4 !important;
        height: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Override any large/centered styling from desktop */
        background: none !important;
        box-shadow: none !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        justify-content: flex-start !important;
    }

    /* Mobile drawer top title: logo + text on one line */
    .md-nav--primary > .md-nav__title {
        padding: 0.5rem 0.6rem !important;
        max-width: 100%;
        line-height: 1.4 !important;
        height: auto !important;
        color: var(--md-default-fg-color) !important;
    }

    /* Truncate long site name in mobile drawer */
    .md-nav--primary > .md-nav__title::after {
        content: none;
    }

    /* Logo inside mobile drawer title - keep small, inline */
    .md-nav--primary > .md-nav__title .md-nav__button.md-logo {
        display: inline-flex !important;
        flex-shrink: 0;
        width: auto !important;
        height: auto !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .md-nav--primary > .md-nav__title .md-nav__button.md-logo img {
        width: 1.2rem;
        height: 1.2rem;
        background: #ffffff;
        border-radius: 4px;
        padding: 1px;
        object-fit: contain;
        aspect-ratio: 1 / 1;
    }

    /* Back arrow icon in mobile sub-nav titles - override absolute positioning */
    .md-nav--primary .md-nav__title .md-nav__icon {
        position: static !important;
        flex-shrink: 0 !important;
        width: 1.2rem !important;
        height: 1.2rem !important;
        font-size: inherit;
    }

    /* Sidebar nav links on mobile - allow wrapping for readability */
    .md-nav__link {
        white-space: normal !important;
        word-break: break-word;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Mobile drawer: ALL section and active item links - compact, no gradient, left-aligned */
    .md-nav--primary .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link,
    .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link,
    .md-nav--primary > .md-nav__list > .md-nav__item--active > .md-nav__link,
    .md-nav--primary > .md-nav__list > .md-nav__item--nested > .md-nav__link {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        text-align: left !important;
        background: none !important;
        box-shadow: none !important;
        color: var(--md-default-fg-color) !important;
        text-transform: none !important;
        padding: 0.4rem 0.6rem !important;
        justify-content: flex-start !important;
        border-radius: 0 !important;
        margin-top: 0.3rem !important;
        margin-bottom: 0.1rem !important;
        letter-spacing: normal !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    /* Hide the expand/collapse icon arrow in mobile TOP-LEVEL section labels only */
    .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link > .md-nav__icon {
        display: none !important;
    }

    /* Mobile: highlight ACTIVE section item with accent color (green) */
    .md-nav--primary > .md-nav__list > .md-nav__item--active > .md-nav__link,
    .md-nav--primary > .md-nav__list > .md-nav__item--active.md-nav__item--section > .md-nav__link {
        color: var(--md-accent-fg-color) !important;
    }

    /* Mobile: highlight active leaf link */
    .md-nav__item .md-nav__link--active {
        color: var(--md-accent-fg-color) !important;
        font-weight: 700 !important;
        border-left: 3px solid var(--md-accent-fg-color);
    }

    /* Dark mode: mobile drawer section/active links */
    [data-md-color-scheme="slate"] .md-nav--primary .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link,
    [data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link,
    [data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--active > .md-nav__link,
    [data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--nested > .md-nav__link {
        color: #cbd5e1 !important;
    }

    /* Dark mode: active section highlighted in green */
    [data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--active > .md-nav__link,
    [data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item--active.md-nav__item--section > .md-nav__link {
        color: #22c55e !important;
    }

    /* Dark mode: active leaf link */
    [data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active {
        color: #22c55e !important;
        border-left-color: #22c55e;
    }

}

/* --- RIGHT SIDEBAR (Table of Contents) --- */

.md-sidebar--secondary {
    font-size: 0.85rem;
}

/* --- EXTRAS --- */

.mermaid {
    background-color: var(--md-code-bg-color);
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

/* --- HOMEPAGE STYLES --- */

/* Animated Background */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -1; /* Behind content */
    /* background-color: #f5f4ef;  Removed to let theme bg show through if needed, or set explicitly */
    overflow: hidden;
    pointer-events: none; /* Allow clicking through */
}

.wave {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 60%;
    background: linear-gradient(to top, #9caf9c, transparent);
    transform-origin: bottom center;
    opacity: 0.25;
}

/* Dark mode waves */
[data-md-color-scheme="slate"] .wave {
    background: linear-gradient(to top, #00ff9a, transparent);
    opacity: 0.15;
}

.wave-1 {
    animation: wave1 12s ease-in-out infinite;
    clip-path: polygon(0% 100%, 0% 60%, 15% 55%, 30% 65%, 45% 50%, 60% 60%, 75% 45%, 90% 55%, 100% 40%, 100% 100%);
}

.wave-2 {
    opacity: 0.18;
    animation: wave2 16s ease-in-out infinite;
    clip-path: polygon(0% 100%, 0% 70%, 20% 60%, 40% 70%, 60% 55%, 80% 65%, 100% 50%, 100% 100%);
}

.wave-3 {
    opacity: 0.12;
    animation: wave3 20s ease-in-out infinite;
    clip-path: polygon(0% 100%, 0% 55%, 25% 65%, 50% 50%, 75% 60%, 100% 45%, 100% 100%);
}

@keyframes wave1 {
    0%, 100% {
        transform: scaleY(1);
    }
    25% {
        transform: scaleY(1.15);
    }
    50% {
        transform: scaleY(0.9);
    }
    75% {
        transform: scaleY(1.1);
    }
}

@keyframes wave2 {
    0%, 100% {
        transform: scaleY(1);
    }
    33% {
        transform: scaleY(1.2);
    }
    66% {
        transform: scaleY(0.85);
    }
}

@keyframes wave3 {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.25);
    }
}

.chart-svg {
    position: absolute;
    bottom: 40%;
    left: 0;
    width: 100%;
    height: 30%;
}

.chart-line {
    opacity: 0;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    stroke: #1a4031;
    stroke-width: 2;
    fill: none;
}

/* Dark mode chart lines */
[data-md-color-scheme="slate"] .chart-line {
    stroke: #4ade80;
}

.line-1 {
    animation: drawAndFade 12s ease-in-out infinite;
}

.line-2 {
    animation: drawAndFade 12s ease-in-out infinite;
    animation-delay: 4s;
}

.line-3 {
    animation: drawAndFade 12s ease-in-out infinite;
    animation-delay: 8s;
}

@keyframes drawAndFade {
    0% {
        stroke-dashoffset: 2000;
        opacity: 0;
    }
    5% {
        opacity: 0.15;
    }
    30% {
        stroke-dashoffset: -0;
    }
    55% {
        opacity: 0.15;
    }
    60% {
        stroke-dashoffset: -2000;
        opacity: 0;
    }
}

/* Home Header Adjustments for Animation */
.home-header {
    margin-bottom: 3rem;
    margin-top: 2rem;
    position: relative; /* Ensure z-index works if needed */
    z-index: 1;
    max-width: 1200px; /* Match grid cards width */
    margin-left: auto;
    margin-right: auto;
    overflow: hidden; /* Clear floats */
}

.home-logo-container {
    float: left;
    margin-right: 3rem;
    margin-bottom: 1rem;
}

.home-logo img {
    width: 250px; /* Increased width */
    height: auto;
}

.home-content {
    padding-top: 1rem;
}

.home-content h1 {
    margin-top: 0;
    background: none; /* Override default H1 style for home */
    color: var(--md-default-fg-color);
    box-shadow: none;
    padding: 0;
    font-size: 3rem;
    text-align: left; /* Left align for home header */
    width: auto;
    display: block;
}

.home-content h2 {
    margin-top: 0.5rem;
    color: var(--md-accent-fg-color);
    font-weight: 600;
    font-size: 1.5rem;
}

.mission {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--md-default-fg-color--light);
    margin-top: 1.5rem;
}

/* Asset Icons Grid */
.asset-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 600px; /* Limit width to keep them together */
}

.asset-icon-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.asset-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--md-default-fg-color--light);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;

    /* Card Styling */
    background-color: var(--md-default-bg-color);
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 12px;
    padding: 1rem;
    width: 100%; /* Fill grid cell */
    height: 110px; /* Increased height */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.asset-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--md-accent-fg-color);
    background-color: var(--md-primary-bg-color);
    color: var(--md-primary-fg-color);
}

.asset-icon img {
    width: 40px; /* Slightly larger icon */
    height: 40px;
    object-fit: contain;
}

/* Clickable Cards */
.grid.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 2 columns */
    gap: 1.5rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
    max-width: 1200px; /* Limit width */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .grid.cards {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }

    .asset-icons {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    }
}

.card-link {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: flex-start; /* Align top */
    padding: 1.5rem;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.8rem;
    background-color: var(--md-default-bg-color);
    text-decoration: none !important;
    color: var(--md-default-fg-color) !important;
    transition: all 0.2s ease-in-out;
    height: 100%;
    position: relative;
    overflow: hidden;
    gap: 1.5rem; /* Space between icon and text */
}

/* Hover Effect */
.card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--md-accent-fg-color);
    background-color: var(--md-primary-bg-color); /* Use brand beige on hover */
}

/* Dark mode card hover */
[data-md-color-scheme="slate"] .card-link:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background-color: #1e293b; /* theme-bg-secondary */
}

/* Dark mode asset icon hover */
[data-md-color-scheme="slate"] .asset-icon:hover {
    background-color: #1e293b; /* theme-bg-secondary */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Dark mode gallery screenshot containers */
[data-md-color-scheme="slate"] .screenshot-container {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Dark mode admonitions */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
    background-color: #1e293b;
}

/* Dark mode tables */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
    background-color: #1e293b;
    color: #00d681;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(2n) {
    background-color: rgba(30, 41, 59, 0.5);
}

/* Icon styling */
.card-icon {
    flex-shrink: 0;
    color: var(--md-primary-fg-color);
    transition: transform 0.2s;
    padding-top: 0.2rem; /* Align with title */
}

.card-link:hover .card-icon {
    transform: scale(1.1);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--md-primary-fg-color);
    display: block;
}

/* Dark mode card titles and icons - use green accent for visibility */
[data-md-color-scheme="slate"] .card-title {
    color: #22c55e;
}

[data-md-color-scheme="slate"] .card-icon {
    color: #22c55e;
}

.card-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--md-default-fg-color--light);
    display: block;
}

/* Responsive Home Header */
@media screen and (max-width: 768px) {
    .home-header {
        text-align: center;
    }

    .home-logo-container {
        float: none;
        margin-right: 0;
        text-align: center;
    }

    .home-logo-container .home-logo {
        display: inline-block;
    }

    .home-content {
        overflow: visible;
    }

    .home-content h1 {
        text-align: center;
    }

    .card-link {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .asset-icons {
        justify-content: center;
    }
}

/* --- BMC Header Button --- */
.bmc-header-btn {
    cursor: pointer;
    background: none;
    border: none;
    color: #fbbf24 !important; /* amber-400 */
    padding: 4px 8px !important;
    margin-left: 0.4rem;
    transition: color 0.2s, transform 0.2s;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

.bmc-header-btn:hover {
    color: #f59e0b !important; /* amber-500 */
    transform: scale(1.1);
    text-decoration: none !important;
}

.bmc-header-btn svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.bmc-header-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 20px; /* Match SVG icon height for vertical alignment */
    vertical-align: middle;
}

/* Hide label on mobile */
@media screen and (max-width: 76.1875em) {
    .bmc-header-label {
        display: none;
    }
}

[data-md-color-scheme="slate"] .bmc-header-btn {
    color: #fbbf24;
}

[data-md-color-scheme="slate"] .bmc-header-btn:hover {
    color: #fcd34d;
}

/* --- BMC Footer Container --- */
.bmc-footer-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    border-top: 1px solid var(--md-default-fg-color--lightest);
    margin-top: 2rem;
}

.bmc-footer-container img {
    transition: transform 0.2s;
}

.bmc-footer-container img:hover {
    transform: scale(1.05);
}

