:root {
  --md-primary-fg-color: #eef4fb;
  --md-accent-fg-color: #eef4fb;
  --md-typeset-a-color: #0f33c9; /* For regular content links */
  --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2"/></svg>');
  --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>');
  --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
  --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 10H2v2h12v-2m0-4H2v2h12V6M2 16h8v-2H2v2m19.5-4.5L23 13l-6.99 7-4.51-4.5L13 14l3.01 3 5.49-5.5z"/></svg>');
}

/* Reset sidebar backgrounds to white */
.md-sidebar--primary,
.md-sidebar__scrollwrap,
.md-nav--primary .md-nav__list,
.md-nav--primary .md-nav__item,
.md-nav--primary .md-nav__item .md-nav,
.md-nav--primary .md-nav {
    background-color: white;
}

/* Website title in sidebar */
.md-nav__list .md-nav--primary .md-nav__title,
.md-nav--primary > .md-nav__title,
.md-nav--primary .md-nav__title[for="__drawer"] {
    color: #0f172a !important;
    background-color: #eef4fb;
}

/* Regular nav items */
.md-nav--primary .md-nav__link {
    color: #0f172a;
}

/* Selected/active nav item */
.md-nav--primary .md-nav__item--active > .md-nav__link {
    color: #0f33c9 !important;
    background-color: transparent;
}

/* Header elements */
.md-header__topic,
.md-header__title {
    color: #0f172a !important;
}

/* Hover state for nav items */
.md-nav__link:hover {
    background-color: transparent !important;
    color: #0f33c9 !important;
}

/* Remove any background colors on active items */
.md-nav__item--active {
    background-color: transparent;
}

/* Header menu icon color */
.md-header__button.md-icon {
    color: #0f172a !important;
}

.md-header__button.md-icon svg {
    fill: #0f172a;
}

/* Content links */
.md-content a {
    color: #0f33c9;
}

.md-content a:hover {
    color: #0f33c9;
    text-decoration: underline;
}

/* Navigation links in content area */
.md-typeset a {
    color: #0f33c9;
}

.md-typeset a:hover {
    color: #0f33c9;
    text-decoration: underline;
}

/* Video styling */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2em 0;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Header styling */
.md-header {
    height: 4rem;
    background-color: white;
    box-shadow: none;
}

.md-header__inner {
    display: flex;
    align-items: center;
    padding: 0 0.2rem;
}

/* Desktop header layout */
.md-header__button.md-logo {
    order: 0;                    /* First item */
    padding: 0.3rem;
    margin-right: 0.5rem;
}

.md-header__title {
    order: 1;                    /* Second item */
    flex: 1;                     /* Take remaining space */
}

.md-search {
    order: 2;                    /* Last item */
    margin-left: auto;           /* Push to right */
}

/* Mobile header layout */
@media screen and (max-width: 76.1875em) {
    .md-header__button[for="__drawer"] { order: 0; }
    .md-header__button.md-logo         { order: 1; }
    label[for="__search"]              { order: 2; margin-left: auto; }
}

/* Logo sizing */
.md-header__button.md-logo img {
    height: 2.5rem;
    width: auto;
}

/* Adjust search box vertical alignment for taller header */
.md-search__inner {
    margin-top: 0.6rem;
}

/* Remove any box shadows that might be added by the theme */
.md-header[data-md-state="shadow"] {
    box-shadow: none;
}

/* Ensure header elements remain visible on white background */
.md-header__button.md-icon,
.md-header__topic,
.md-header__title {
    color: #0f172a !important;
}

.md-header__button.md-icon svg {
    fill: #0f172a;
}

/* Navigation headers */
.md-nav__title {
    font-weight: 700 !important;
    color: #0f172a !important;
    font-size: 1rem !important;
    margin-bottom: 1rem;
}

/* Section headers in content */
.md-typeset h1 {
    font-weight: 700;
    color: #0f33c9;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.md-typeset h2 {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.5rem;
    margin-top: 2rem;
}

.md-typeset h3 {
    font-weight: 600;
    color: #0f172a;
    font-size: 1.2rem;
}

/* Make nested navigation headers (like in Processes section) stand out */
.md-nav__item--nested > .md-nav__link {
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Hide navigation title in left sidebar */
.md-nav--primary > .md-nav__title {
    display: none;
}

/* Adjust spacing at top of navigation without title */
.md-nav--primary > .md-nav__list {
    margin-top: 0.5rem;
}

/* Make navigation items (not title) bold */
.md-nav__item > .md-nav__link {
    font-weight: 600;
    color: #0f172a;
}

/* Keep nested items (sub-navigation) regular weight */
.md-nav__item .md-nav__item > .md-nav__link {
    font-weight: 400;
}

/* Keep hover and active states as before */
.md-nav__link:hover,
.md-nav__item--active > .md-nav__link {
    color: #0f33c9 !important;
    background-color: transparent !important;
}

/* Button styling */
.md-button {
    background-color: #0f33c9 !important;
    color: white !important;
    border-color: #0f33c9 !important;
}

.md-button:hover {
    background-color: #0f33c9 !important;
    opacity: 0.9;
}

/* For secondary/outline buttons */
.md-button--secondary {
    background-color: transparent !important;
    color: #0f33c9 !important;
    border-color: #0f33c9 !important;
}

.md-button--secondary:hover {
    background-color: #0f33c9 !important;
    color: white !important;
}

/* Tree-like navigation styling - desktop only */
.md-nav__list .md-nav {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

@media screen and (min-width: 76.1875em) {  /* Only show lines on desktop */
    .md-nav__list .md-nav {
        border-left: 1px solid #e5e7eb;
    }
}

/* Remove all tree styling on mobile */
@media screen and (max-width: 76.1875em) {
    .md-nav__list .md-nav {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
}

/* Right navigation specific adjustments */
.md-sidebar--secondary .md-nav__list {
    padding-left: 0;
    margin-left: 0;
}

/* Keep vertical spacing consistent */
.md-nav__item {
    margin: 0.4rem 0;
}

/* Adjust nested items */
.md-nav__item .md-nav__item {
    padding-left: 0.2rem;
}

/* Remove the bullet points */
.md-nav__link:before {
    content: none;
}

/* Search box styling */
.md-search {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.md-search__inner {
    margin: 0;
    height: 2.5rem;  /* Match logo height */
    display: flex;
    align-items: center;
}

.md-search__form {
    height: 2rem;    /* Slightly smaller than container */
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin: 0;
}

/* Search icon color */
.md-search__icon svg {
    color: #0f172a;
}

/* Search input text color */
.md-search__input {
    color: #0f172a;
}

/* Search input placeholder color */
.md-search__input::placeholder {
    color: #9ca3af;
}

/* Remove default background color and shadow */
.md-search__input {
    background-color: transparent !important;
}

/* Site name logo styling */
.md-header__title {
    display: flex;
    align-items: center;
}

.md-header__title img {
    height: 2rem;
    margin-right: 0.5rem;
}

/* Hide the text logo */
.md-header__title .md-header__topic {
    display: none;
}

/* Info admonition - using accent color */
.md-typeset .admonition.info,
.md-typeset details.info {
    border-color: #c1e8fe;
}

.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
    background-color: #eef4fb;
    border-color: #c1e8fe;
}

.md-typeset .info > .admonition-title::before,
.md-typeset .info > summary::before {
    background-color: #c1e8fe;
}

/* Tip admonition - using success green */
.md-typeset .admonition.tip,
.md-typeset details.tip {
    border-color: #00c853;
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
    background-color: rgba(0, 200, 83, 0.1);
    border-color: #00c853;
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
    background-color: #00c853;
}

/* Warning admonition - using an attention-getting orange */
.md-typeset .admonition.warning,
.md-typeset details.warning {
    border-color: #ff9800;
}

.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
    background-color: rgba(255, 152, 0, 0.1);
    border-color: #ff9800;
}

.md-typeset .warning > .admonition-title::before,
.md-typeset .warning > summary::before {
    background-color: #ff9800;
}

/* Note admonition - using a neutral gray-blue */
.md-typeset .admonition.note,
.md-typeset details.note {
    border-color: #6b7280;
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
    background-color: rgba(107, 114, 128, 0.1);
    border-color: #6b7280;
}

.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
    background-color: #6b7280;
}

/* Mobile header adjustments */
@media screen and (max-width: 76.1875em) {
    .md-header__inner {
        height: 3rem;
        padding: 0 0.2rem;
    }

    .md-header__button.md-logo {
        display: block !important;
    }

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

    .md-header__title {
        display: none;
    }
}

/* Reset sidebar backgrounds but with more specific selectors */
.md-sidebar--primary,
.md-sidebar__scrollwrap {
    background-color: white;
}

.md-nav--primary > .md-nav__list > .md-nav__item {
    background-color: white;
}

.md-nav--primary .md-nav__item--nested .md-nav {
    background-color: white;
}

/* Footer styling */
.md-footer {
    background-color: #eef4fb;
}

.md-footer-meta {
    background-color: #eef4fb;
    width: 100%;
}

.md-footer-meta__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0.4rem;
}

/* Footer text color */
.md-footer-copyright,
.md-footer-copyright__highlight {
    color: #0f172a;
}

.md-footer-copyright,
.md-social {
    margin: 0;
}

/* Mobile adjustments */
@media screen and (max-width: 45rem) {
    .md-footer-meta__inner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Social icons styling */
.md-social__link img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.md-social__link {
    margin: 0 0.3rem;
}

/* Add space after first navigation item */
.md-nav--primary > .md-nav__list > .md-nav__item:first-child {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

/* Chip styling */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0.2rem;
    color: white;
}

/* Risk level chips */
.chip--low {
    background-color: #2dcda7;
}

.chip--medium {
    background-color: #ffa43a;
}

.chip--high {
    background-color: #e35169;
}
