@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Inter:wght@400;500&display=swap');

.dash-dropdown .Select-multi-value-wrapper {
    max-height: 300px;
    overflow-y: auto;
}

.dash-dropdown .Select-value {
    text-overflow: ellipsis;
}

.nav-link {
    color: #374440 !important;/*rgba(255, 255, 255, 0.85) !important; */
}

.nav-link:hover {
    color: #88a9c3 !important;/*#9a9c8f !important;*/
} 

.dropdown-menu {
    background-color: #343a40;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.85) !important;
}

.dropdown-item:hover {
    background-color: #2c3136;
    color: white !important;
}

/* Bookmark navigation - ensure horizontal layout */
.bookmark-navigation {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

/* Force bookmark-bar collapse to display nav horizontally */
.bookmark-navigation .navbar-collapse,
.bookmark-navigation .collapse {
    display: flex !important;
    flex-direction: row !important;
}

.bookmark-navigation .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.bookmark-navigation .nav-link {    
    color: #495057 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    margin: 0 3px !important;
    background-color: rgb(248, 249, 250) !important;
    transition: all 0.2s ease;
}

.bookmark-navigation .nav-link:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-1px);
}

.bookmark-nav-link {
    color: #495057 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    margin: 0 3px !important;
    background-color: transparent !important;
    transition: all 0.2s ease;
}

.bookmark-nav-link:hover {
    background-color: #f8f9fa !important;
    border-color: #495057 !important;
    transform: translateY(-1px);
}
/* Alternative: More specific override for data page navbar */
.navbar_data_page .bookmark-navigation .nav-link {
    color: #6c757d !important;
}

.navbar_data_page .bookmark-navigation .nav-link:hover {
    color: #495057 !important;
}

/* Card hover effect - only for content tiles */
.content-tile {
    transition: transform 0.2s ease-in-out;
}

/* .content-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(20, 174, 92, 0.2);
} */

.hover-shadow:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* default theme colors */
a {
    color: inherit;
}

a:hover {
    color: inherit;
}

/* Navbar hamburger styling */
.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.75rem !important;
    margin: 0 !important;
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
}

.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler:hover {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

/* Prevent hamburger from moving when clicked */
.navbar-toggler[aria-expanded="true"],
.navbar-toggler[aria-expanded="false"] {
    position: relative !important;
    transform: none !important;
    margin: 0 !important;
}

/* Ensure logo and hamburger stay together */
.navbar-brand {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.navbar {
    background-color: #ffffff !important; /* #00588D; */
    font-family: 'Inter', sans-serif;
    color: #404040;
    font-size: clamp(14px, 2vw, 16px);
}

/* Navbar container */
.navbar .container-fluid {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

/* Force wrapper inside collapse to take remaining space - ONLY for main navbar */
@media (min-width: 992px) {
    /* Target only the main navbar collapse, not bookmark-bar */
    .navbar:not(.bookmark-bar) #navbar-collapse > div {
        width: calc(100vw - 160px) !important;
    }
    
    /* Ensure right nav is pushed to the right and aligns with content edge - ONLY for main navbar */
    .navbar:not(.bookmark-bar) #navbar-collapse > div > .navbar-nav:last-child {
        margin-left: auto !important;
        padding-right: 110px !important;
    }
}

/* Change navbar brand color */
.navbar-brand {
    color: #0F4D8B; /* #14AE5C ; */ 
}

.navbar-brand:hover {
    color: #ffffff !important; 
}

.navbar_data_page {
    background-color: #ffffff !important; /* #343a40; */
    font-family: 'Inter', sans-serif;
    color: RGB(26,27,37) !important;
    font-size: clamp(14px, 2vw, 16px);
    padding: 0.5rem 1rem;
}

.navbar_data_page .nav-link {
    color: RGB(26,27,37) !important; /* Dark text for white background */
    transition: all 0.3s ease;
    padding: 0.5rem 2rem 0.5rem 1rem !important;
    border-radius: 20px;
}

.navbar_data_page .nav-link:hover {
    color: RGB(26,27,37) !important; /* Keep same color */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    background-color: #f5f6f8;
}

.navbar_data_page .dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #e9ecef; /* Light border for contrast f5f6f8 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.navbar_data_page .dropdown-item {
    color: RGB(26,27,37) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar_data_page .dropdown-item:hover {
    background-color: #f5f6f8; 
    color: RGB(26,27,37) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    background-color: #fafbfc;
}

.navbar_data_page .navbar-brand {
    color: RGB(26,27,37) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem 0.5rem 2rem;
    border-radius: 4px;
}

.navbar_data_page .navbar-brand:hover {
    color: RGB(26,27,37) !important; /* Keep same color */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    background-color: #fafbfc;
}

body {
    font-family: 'Inter'; /* Example font */
}

/* Range Slider Styles */
.custom-range-slider .rc-slider-track {
    background-color: #88a9c3;
}

.custom-range-slider .rc-slider-handle {
    border-color: #395970;
    background-color: #88a9c3;
}

.custom-range-slider .rc-slider-handle:hover {
    border-color: #88a9c3; /*#45a049;*/
}

.custom-range-slider .rc-slider-handle:active {
    border-color: #395970; /*#45a049;*/
    background-color: #88a9c3;
    box-shadow: 0 0 2px #88a9c3;
}

.chart-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.chart-container > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Typography hierarchy */
.landing-page-title 
{
    font-family: 'Roboto Mono', sans-serif;
    font-weight: 500; 
    text-align: center;
    font-size: calc(1.4rem + 1.2vw);
    font-style: normal;
    color: #2C3E50;
    margin: 0.67em 0;
    margin-bottom: 24px; 
    line-height: 120%;
    letter-spacing: -0.00001em; /*-0.96px; */
}
/* {position: absolute;
width: 1552px;
height: 248px;
left: 32px;
top: 115px;

font-family: 'Roboto Mono';
font-style: normal;
font-weight: 500;
font-size: 64px;
line-height: 150%;
text-align: center;
letter-spacing: -0.022em; 

color: rgba(0, 0, 0, 0.8);} */

/* Subsection headers (h3) */
.landing-page-description {
    font-family: 'Roboto Mono', sans-serif;
    font-weight: 400; /* Increased from 100 for better readability */
    font-style: normal;
    color: rgba(64, 64, 64, 0.8); /* Increased opacity for better contrast */
    text-align: center;
    max-width: 85%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem; /* Reduced from 2rem */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6; /* Increased from 120% */
    letter-spacing: -0.022em;
    font-size: calc(0.8rem + 0.5vw); 
}

/* Hero section improvements */
.hero-section {
    padding: 2rem 0 1.5rem 0; /* Reduced padding */
    margin-bottom: 1rem; /* Reduced from 2rem */
}

.hero-icon {
    margin: 1.5rem 0; /* Reduced from 2rem */
    transition: transform 0.3s ease;
}

.hero-icon:hover {
    transform: scale(1.05);
}

/* KPI stat strip: single row, separator-only dividers */
.kpi-strip-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.kpi-strip-scroll::-webkit-scrollbar {
    display: none;
}

/* Gradient fade-out on the right edge — signals more cards to scroll */
.kpi-scroll-fade {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 52px;
    background: linear-gradient(to right, transparent, #ffffff);
    pointer-events: none;
}

.kpi-row-mobile {
    align-items: flex-start !important;
}

.kpi-col {
    align-items: flex-start;
}

.kpi-card {
    background: transparent;
    border: none;
    border-right: 1px solid #d0dae3;
    box-shadow: none;
    border-radius: 0;
    padding: 0.5rem 1.4rem;
    text-align: center;
    min-height: unset;
    height: auto;
    width: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.kpi-col:last-child .kpi-card {
    border-right: none;
}

.kpi-card .card-body {
    padding: 0.15rem 0.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.kpi-value {
    font-size: clamp(1.65rem, 2.2vw, 2.2rem);
    font-weight: 700;
    color: #395970;
    margin: 0 0 0.35rem 0;
    line-height: 1.1;
    min-height: 1.1em;
    white-space: nowrap;
    flex-shrink: 0;
}

.kpi-title {
    font-size: clamp(0.78rem, 0.9vw, 0.92rem);
    color: #6c757d;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
    width: 100%;
}

/* Mobile: fixed-width cards — show ~3 at a time, scroll for the rest */
@media (max-width: 767.98px) {
    /*
     * IMPORTANT: justify-content: center on an overflowing flex-nowrap row pushes
     * content off both edges; the left overflow is unreachable because you can't
     * scroll to a negative position. Force flex-start so the strip begins at x=0.
     */
    .kpi-row-mobile {
        justify-content: flex-start !important;
        /* right padding keeps the last card clear of the gradient fade overlay */
        padding-right: 48px !important;
    }

    .kpi-col {
        flex: 0 0 auto !important;
        width: 120px !important;
        min-width: 120px !important;
    }

    .kpi-card {
        padding: 0.45rem 0.7rem !important;
    }

    /* Labels: allow natural wrapping — no truncation */
    .kpi-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }
}

/* Content tiles improvements - enhanced hover effects */
.content-tile {
    border-radius: 12px; /* Increased from default */
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.content-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #00bf63; /* Green border on hover */
}

.content-tile .card-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.content-tile .card-text {
    color: #6c757d;
    line-height: 1.5;
}

/* Section spacing improvements */
.section-container {
    padding: 1.5rem 0; /* Reduced from 3rem */
    margin: 1rem 0; /* Reduced from 2rem */
}

.section-divider {
    margin: 2rem 0 1.5rem 0; /* Reduced margins */
    border-color: #e9ecef;
    opacity: 0.6;
}

.page-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #404040;
    margin-bottom: 20px;
    font-size: clamp(20px, 3vw, 28px);
}

.page-description {
    font-family: 'Inter', sans-serif;
    font-weight: 100;
    font-style: normal;
    color: rgba(64, 64, 64, 0.7); /* RGBA notation of #404040 */
    text-align: center;
    max-width: 80%;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8; /* 24px */
    font-size: calc(0.6rem + 0.5vw); 
}

/* Section headers (h2) */
.section-header {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #404040;
    margin-bottom: 16px;
    font-size: clamp(18px, 2vw, 26px);
}

/* Subsection headers (h3) */
.subsection-header {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #404040;
    margin-bottom: 12px;
    font-size: clamp(16px, 2.5vw, 24px);
}

/* Body text */
.body-text {
    font-family: 'Inter', sans-serif;
    color: #404040;
    margin-bottom: 16px;
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.5;
}

/* Small text / captions */
.small-text {
    font-family: 'Inter', sans-serif;
    color: #666666;
    font-size: clamp(12px, 1.5vw, 14px);
}

.filter-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #4A5568;
    margin-bottom: 8px;
}

/* wider, responsive tooltips across the app */
.tooltip .tooltip-inner {
  max-width: clamp(240px, 35vw, 340px); /* grows with viewport, capped */
  white-space: normal;                  /* allow wrapping */
  text-align: left;                     
  padding: 10px 12px;  
}

.button-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.download-button {
    background-color: #4CAF50 !important;  /* Default state - lighter green */
}

.download-button:active {
    transform: scale(0.98);
    background-color: #4A5568 !important; /* #3d8b40  4CAF50*/
}

.download-button:hover {
    background-color: #246B42 !important; /* #4CAF50 */
}

  @media (max-width: 600px) {
      
      /* Mobile hero improvements */
      .landing-page-title {
          font-size: calc(1rem + 2vw);
          margin-bottom: 1rem;
      }
      
      .landing-page-description {
          max-width: 90%;
          font-size: calc(0.7rem + 0.8vw);
          margin-bottom: 1rem;
      }
      
      /* Mobile content tiles */
      .content-tile {
          margin-bottom: 1rem;
      }
      
      .content-tile .card-img {
          height: 140px !important;
      }
      
      /* Mobile section spacing */
      .section-container {
          padding: 1rem 0;
          margin: 0.5rem 0;
      }
  }

    @media (max-width: 1000px) {
      
      /* Tablet hero improvements */
      .landing-page-title {
          font-size: calc(1.1rem + 1.8vw);
      }
      
      .landing-page-description {
          max-width: 80%;
          font-size: calc(0.75rem + 0.6vw);
      }
      
      /* Tablet section spacing */
      .section-container {
          padding: 1.25rem 0;
          margin: 0.75rem 0;
      }
  }

/* Loading and interaction states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.content-tile:focus {
    outline: 2px solid #00588D;
    outline-offset: 2px;
}

/* Button improvements */
.btn-primary {
    background-color: #00588D;
    border-color: #00588D;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #004a73;
    border-color: #004a73;
    transform: translateY(-1px);
}

.back-to-top-btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.back-to-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .dropdown-toggle::after {
    display: inline-block !important;
    margin-left: 0.5em !important;
    vertical-align: 0.125em !important;
    content: "" !important;
    border-top: 0.3em solid !important;
    border-right: 0.3em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important;
    position: static !important;
}

.navbar-nav .nav-item:not(:last-child) {
    margin-right: 1rem !important; /* ✅ 2rem space between items */
}

/* Fix dropdown toggle layout */
.navbar-nav .dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}
.navbar-data-page-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500; /* Increased from 500 for better hierarchy */
    font-size: calc(0.3rem + 1.5vw);
    font-style: normal;
    color: #2C3E50;
    /*margin: 0.67em 0; */
    margin-bottom: 0px; /* Reduced from 32px */
    line-height: 120%;
    letter-spacing: -0.96px;
}

/* Card image improvements */
.content-tile .card-img {
    transition: transform 0.3s ease;
}

/* Links and references styles */

.text-link {
    color: #00588D;           /* Brand blue or your preferred color */
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}
.text-link:hover, .text-link:focus {
    color: #005fa3;           /* Darker shade on hover/focus */
    text-decoration: none;
}

/* Accordion elements */

button.accordion-button::after {
    margin-left: 0.5rem !important; /* Reduce or increase as needed */
}
button.accordion-button {
    padding-left: 0.5rem !important;
    gap: 0.3rem !important;
    box-shadow: none !important;
}

.filter-accordion .accordion-item {
    background-color: #f8f9fa;
}

.filter-accordion .accordion-button:not(.collapsed) {
    background-color: #ffffff;/*#f8fff9; /* Very light green background */
    color: #333;
    font-weight: 500;
}

.filter-accordion.accordion .accordion-button:focus {
    border-color: #ffffff;
    box-shadow: none;
}

.filter-accordion.accordion .accordion-flush {
    border: none !important;
    border-color: transparent !important;
    box-shadow: none;
}

/* Filters */

.filter-group-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}
.filter-label {
    font-size: 0.9rem;
    /*font-weight: bold;*/
    display: block;
    margin-bottom: 0.09rem;
    color: #333;
}

.filter-label_disabled {
    font-size: 0.9rem;
    /*font-weight: bold;*/
    display: none; /* Hidden until ready to be added to UI */
    margin-bottom: 0.09rem;
    color: #aaa;
}

.filter-box {
    font-size: 0.85rem;
    padding-bottom: 5px;
    /*border: 1px solid #babdc0;*/
    border-radius: 5px;
    margin: 5px;
}

.filter-box .dash-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Space between checkbox rows */
}

.filter-box .dash-checklist input[type="checkbox"] {
    margin-right: 8 px; /* Space between checkbox and text */
}

/* Style individual checkbox items */
.filter-box .dash-checklist label {
    display: flex;
    align-items: center;
    gap: 16px; /* Space between checkbox and text */
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
}

.filter-box-disabled {
    font-size: 0.85rem;
    padding-bottom: 5px;
    /*border: 1px solid #babdc0;*/
    border-radius: 5px;
    margin: 5px;
    font-size: 0.85rem;
    color: #aaa;
    display: none; /* Hidden until ready to be added to UI */
}

.horizontal-checklist label > input[type="checkbox"] {
    margin-right: 4px !important;
    margin-left: 4px !important;
}

.slider-wrapper {
    padding-left: 5px !important;
}

/* Bookmark styles */
/* Base bookmark button styling */
.bookmark-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #007bff;
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 8px 15px;          /* ✅ Balanced padding for better centering */
    font-size: 0.85rem;
    margin: 0 5px;              /* ✅ Space between buttons */
    height: 32px;               /* ✅ Set explicit height for consistent centering */
}

/* Bookmark button hover state */
.bookmark-btn {
    transition: all 0.3s ease;
    color: #333; /* Bootstrap muted color */ 
}

.bookmark-btn:hover {
    color: #6c757d !important;
    text-decoration: none !important;
    opacity: 0.8;
}

.bookmark-btn:hover,
.bookmark-btn:focus,
.bookmark-btn:active {
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Bookmark tab button styling (for tab navigation) */
.bookmark-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.85rem;
    margin: 0 5px;
    height: 32px;
    cursor: pointer;
}

.bookmark-tab-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    background-color: #c9d8e4 !important;
}

.bookmark-bar {
    left: 320px;            /* ✅ Start after sidebar */
    right: 0;               /* ✅ Extend to right edge */
    background-color: white;
    padding: 30px 10px 10px 10px;
    height: 35px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Ensure global policies tabs are always visible */
#global-policies-tabs-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Anchor offset for fixed navbar */
a[id$="-section"] {
    display: block;
    position: relative;
    top: -160px; /* Adjust based on your navbar height */
    visibility: hidden;
}

/* Section highlight animation */
.section-highlight {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: rgba(0,123,255,0.1); }
    50% { background-color: rgba(0,123,255,0.2); }
    100% { background-color: transparent; }
}

/* Responsive bookmark bar */
@media (max-width: 768px) {
    .bookmark-navigation .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bookmark-btn {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 8px;
        justify-content: flex-start;
    }
    
    /* Adjust anchor offset for mobile */
    a[id$="-section"] {
        top: -100px;
    }
}

/* Mobile responsiveness */
@media (max-width: 767.98px) {
    .responsive-content {
        margin-left: 0 !important;
        padding: 10px !important;
    }
    
    /* Hide sidebar on mobile */
    .filters-sidebar {
        display: none !important;
    }
    
    /* Stack chart title and buttons vertically on small screens */
    .chart-header-mobile {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .chart-buttons-mobile {
        margin-top: 10px !important;
        align-self: flex-end !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .responsive-content {
        margin-left: 0 !important;
    }
}

@media (min-width: 992px) {
    .responsive-content {
        margin-left: 320px !important;
    }
}

/* Style disabled checklist items (for instrument, objective, and tag filters) */
/* Dash Checklist wraps items in labels -- target labels containing disabled checkboxes */
/* Modern browsers: use :has() selector */
#gp_instrument.dash-checklist label:has(input[type="checkbox"]:disabled),
#gp_objective.dash-checklist label:has(input[type="checkbox"]:disabled),
#gp_tag.dash-checklist label:has(input[type="checkbox"]:disabled),
#gp_instrument label:has(input[type="checkbox"]:disabled),
#gp_objective label:has(input[type="checkbox"]:disabled),
#gp_tag label:has(input[type="checkbox"]:disabled) {
    color: #999 !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Fallback for older browsers: target labels that are siblings of disabled checkboxes */
#gp_instrument input[type="checkbox"]:disabled + label,
#gp_instrument input[type="checkbox"]:disabled ~ label,
#gp_objective input[type="checkbox"]:disabled + label,
#gp_objective input[type="checkbox"]:disabled ~ label,
#gp_tag input[type="checkbox"]:disabled + label,
#gp_tag input[type="checkbox"]:disabled ~ label {
    color: #999 !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* If items are wrapped in divs (using :has() for modern browsers) */
#gp_instrument > div:has(input[type="checkbox"]:disabled),
#gp_objective > div:has(input[type="checkbox"]:disabled),
#gp_tag > div:has(input[type="checkbox"]:disabled) {
    color: #999 !important;
    opacity: 0.6;
}

#gp_instrument > div:has(input[type="checkbox"]:disabled) label,
#gp_objective > div:has(input[type="checkbox"]:disabled) label,
#gp_tag > div:has(input[type="checkbox"]:disabled) label {
    color: #999 !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Style the disabled checkbox itself */
#gp_instrument input[type="checkbox"]:disabled,
#gp_objective input[type="checkbox"]:disabled,
#gp_tag input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Policy details modal table styles */
.policy-details-table {
    table-layout: auto;
}

.policy-details-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.policy-details-table tbody tr:hover {
    background-color: #f8f9fa;
}

.policy-details-table td,
.policy-details-table th {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.policy-details-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.policy-details-table tbody tr:nth-child(even):hover {
    background-color: #f0f2f4;
}

/* Policy details modal - positioned over treemap */
.policy-details-modal-overlay .modal-dialog {
    position: fixed;
    top: 28%;
    left: 50%;
    right: auto;
    margin: 0;
    max-width: 680px;
    width: 90%;
    transform: translateX(-30%) !important;
}

.policy-details-modal-overlay .modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-left: 120px;
    margin-top: 400px;
    padding: 0px;
}

.policy-details-modal-overlay .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.policy-details-modal-overlay .modal-footer {
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Keep backdrop visible but allow treemap to show through */
.policy-details-modal-overlay + .modal-backdrop {
    opacity: 0.3 !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .policy-details-modal-overlay .modal-dialog {
        max-width: 75%;
        transform: translateX(-40%) !important;
    }
}

@media (max-width: 992px) {
    .policy-details-modal-overlay .modal-dialog {
        max-width: 90%;
        top: 15%;
        left: 50%;
        transform: translateX(-50%) !important;
    }
}

/* ── Company Profile – Reporting Profile AG Grid ────────────────────── */

.cp-reporting-profile-grid .ag-header-cell-label {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.cp-reporting-profile-grid .ag-cell {
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

/* Contact Us dropdown element */
.custom-dropdown .Select-control {
    border: 1px solid #dee2e6 !important; /* Bootstrap gray-300 */
    border-radius: 0.375 !important;    /* Bootstrap rounded-1 */
    min-height: 38px;                   /* Standard Bootstrap height */
}

/* Match the focus state (the blue glow) */
.custom-dropdown.is-focused .Select-control {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Match the multi-select "tags" to your theme colors */
.custom-dropdown .Select-value {
    /*background-color: #88a9c3 !important;*/
    /*border: 1px solid #2d4658 !important;*/
    font-size: 1em;
    color: black !important;
}

.custom-dropdown .Select-value-icon {
    border-right: 1px solid rgba(255,255,255,0.2) !important;
    color: #999 !important;
}

.custom-dropdown .Select-value-icon:hover {
    background-color: rgba(255,255,255,0.1) !important;
}

.custom-dropdown .Select-placeholder {
    color: #575b5e !important;
    opacity: 1;
    font-weight: 400;
    font-size: 1em;
}

.custom-dropdown.is-focused:not(.is-open) .Select-control {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Truncate long company names in sidebar dropdowns */
.filter-box .Select-value-label,
.filter-box .Select-single-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-box .VirtualizedSelectOption,
.filter-box .Select-option {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-section-divider {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b4b2a9;
    margin: 6px 0 8px;
}

.custom-tabs-container {
    width: fit-content;
    margin-top: 4px;
    margin-bottom: 10px;
}

.custom-tabs-container .tab-parent {
    display: flex;
    border-bottom: none !important;
    gap: 0;
}

.custom-tab {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 8px 16px !important;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    color: #6c757d;
    white-space: nowrap;
}

.custom-tab--selected {
    color: #395970 !important;
    border-bottom: 2px solid #395970 !important;
    font-weight: bold;
}

/* ================================================================
   MOBILE RESPONSIVE OVERHAUL
   Fixes portrait + landscape for phones & small tablets.
   Desktop (≥992px) is NOT touched — all rules are behind max-width.
   ================================================================ */

/* --- Viewport meta helper (set in app.py) --- */

/* --- Mobile filter sidebar: collapsible overlay --- */
@media (max-width: 991.98px) {
    .filter-sidebar-mobile {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        z-index: 1050 !important;
        background: #fff !important;
        padding: 70px 20px 20px 20px !important;
        overflow-y: auto !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: none !important;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

    .filter-sidebar-mobile.filter-sidebar-open {
        transform: translateX(0) !important;
    }

    /* Inline filter button injected into button rows (mobile only) — matches btn-light btn-sm */
    .mobile-filter-inline-btn {
        display: inline-flex !important;
        align-items: center;
        cursor: pointer;
    }

    .mobile-filter-inline-btn .mobile-filter-label {
        font-size: 0.8rem;
    }

    /* Static filter button in page headers (e.g. Company Overview) */
    .mobile-filter-static {
        display: inline-flex !important;
    }

    /* Close button injected inside sidebar by JS */
    .filter-close-btn-inside {
        display: block !important;
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 1070;
        background: transparent;
        border: none;
        font-size: 1.8rem;
        color: #333;
        cursor: pointer;
        padding: 8px;
        line-height: 1;
    }

    /* Main content: no left margin on mobile */
    .data-page-content {
        margin-left: 0 !important;
        padding: 10px !important;
        min-height: auto !important;
    }

    /* Override any inline marginLeft on main content divs */
    .data-page-content,
    [style*="marginLeft: 320px"],
    [style*="margin-left: 320px"] {
        margin-left: 0 !important;
    }
}

@media (min-width: 992px) {
    .filter-toggle-btn {
        display: none !important;
    }
    .filter-close-btn-inside {
        display: none !important;
    }
    .mobile-filter-inline-btn {
        display: none !important;
    }
    .mobile-filter-static {
        display: none !important;
    }
}

/* --- Mobile tabs (visible below 992px for tabbed pages) --- */
@media (max-width: 991.98px) {
    .mobile-tabs-bar {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 1020;
        background: #fff;
        border-bottom: 1px solid #dee2e6;
        padding: 6px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        white-space: nowrap;
    }

    .mobile-tabs-bar .bookmark-tab-btn {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        flex-shrink: 0;
    }

    /* Remove spacer gap that desktop fixed tabs need */
    .tabs-spacer {
        height: 8px !important;
    }
}

@media (min-width: 992px) {
    .mobile-tabs-bar {
        display: none !important;
    }
}


/* --- Home page: landing cards responsive --- */
@media (max-width: 767.98px) {
    .landing-cards-row {
        flex-direction: column !important;
        align-items: center !important;
    }

    .landing-cards-row > div {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .landing-cards-row .content-tile {
        width: 90% !important;
        max-width: 340px !important;
        margin: 0 auto !important;
    }

    .landing-cards-row .card-img {
        height: 140px !important;
    }

    .landing-cards-row a.p-2 {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }
}

/* --- Navbar: ensure hamburger menu works on mobile --- */
@media (max-width: 991.98px) {
    .navbar .container-fluid {
        flex-wrap: wrap !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
    }

    .navbar-brand img {
        max-height: 50px !important;
    }

    .navbar-toggler {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.2rem !important;
        color: #333 !important;
        background-color: transparent !important;
        order: -1 !important;
        margin-right: 8px !important;
    }

    .navbar-collapse {
        width: 100% !important;
        flex-basis: 100% !important;
    }

    .navbar-collapse .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
    }

    .navbar-collapse > div {
        flex-direction: column !important;
        width: 100% !important;
    }

    .navbar-collapse .navbar-nav .nav-item {
        margin-right: 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .navbar-collapse .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 1rem;
        background-color: #f8f9fa !important;
    }

    .navbar-collapse .dropdown-menu {
        font-size: inherit !important;
    }

    .navbar-collapse .dropdown-item {
        color: #333 !important;
        font-size: inherit !important;
        padding: 0.35rem 1rem !important;
    }

    .navbar-collapse .dropdown-item:hover {
        color: #000 !important;
        background-color: #e9ecef !important;
    }

    .navbar-collapse .nav-link {
        color: #333 !important;
    }
}

/* --- Data pages: fix vertical text & content squishing --- */
@media (max-width: 991.98px) {
    /* Prevent text from going vertical in narrow containers */
    h5, .card-header h5, .text-left,
    .accordion-button, .filter-accordion .accordion-button,
    .accordion-body, .filter-accordion .accordion-body {
        word-break: normal !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        min-width: 0 !important;
    }

    /* Figure cards: full width */
    .card-header {
        flex-wrap: wrap !important;
    }

    .card-header .float-end {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 8px;
    }

    /* Accordion in figure card headers */
    .filter-accordion {
        width: 100% !important;
    }

    /* sub-tabs (dcc.Tabs) inside pages */
    .custom-tabs-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-top: 4px !important;
        margin-bottom: 8px !important;
    }

    .custom-tabs-container .tab-parent {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        border-bottom: none !important;
    }

    .custom-tab {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}

/* --- Landscape mode: reduce header/navbar vertical space --- */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 0.15rem 1rem !important;
    }

    .navbar .container-fluid {
        padding: 0 !important;
    }

    .navbar-brand img {
        max-height: 36px !important;
    }

    /* Bookmark bar less vertical space */
    .bookmark-bar {
        padding: 4px 10px !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .bookmark-btn, .bookmark-tab-btn {
        padding: 3px 10px !important;
        font-size: 0.75rem !important;
        height: auto !important;
    }

    /* Hero section compact */
    .hero-section {
        padding: 0.5rem 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .landing-page-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.3rem !important;
    }

    .landing-page-description {
        font-size: 0.75rem !important;
        margin-bottom: 0.3rem !important;
    }
}

/* --- Expanded modal: smaller title on mobile --- */
@media (max-width: 991.98px) {
    .modal-fullscreen .modal-header {
        padding: 0.5rem 1rem !important;
    }

    .modal-fullscreen .modal-title {
        font-size: 0.9rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }

    .modal-fullscreen .modal-body {
        padding: 0 !important;
    }

    /* Expanded graph fills width; respect inline height so tall content can scroll */
    .modal-fullscreen .js-plotly-plot {
        width: 100% !important;
        min-height: 300px;
    }
    /* Make modal body scrollable for tall heatmaps */
    .modal-fullscreen .modal-body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: calc(100vh - 50px) !important;
    }
}

/* Desktop: scrollable modal body too */
.modal-fullscreen .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-height: 500px) and (orientation: landscape) {
    .modal-fullscreen .modal-header {
        padding: 0.25rem 0.75rem !important;
    }

    .modal-fullscreen .modal-title {
        font-size: 0.8rem !important;
    }
}

/* --- desktop-prompt overlay for figures on portrait mobile --- */
.desktop-prompt {
    display: none;
}

@media (max-width: 767.98px) and (orientation: portrait) {
    .desktop-prompt {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 16px 16px;
        text-align: center;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px dashed #dee2e6;
        margin: 8px 0;
        min-height: 80px;
    }

    .desktop-prompt .rotate-icon {
        font-size: 1.2rem;
        color: #0F4D8B;
        margin-bottom: 6px;
    }

    .desktop-prompt .prompt-text {
        color: #6c757d;
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

@media (min-width: 768px), (orientation: landscape) {
    .desktop-prompt {
        display: none !important;
    }
}

/* --- Clear filters button visibility --- */
@media (max-width: 991.98px) {
    .filter-sidebar-mobile [id*="clear-filters"],
    .filter-sidebar-mobile [id*="Clear"] {
        display: block !important;
        visibility: visible !important;
    }
}

/* --- Bookmark bar on mobile: make scrollable horizontally --- */
@media (max-width: 991.98px) {
    .bookmark-navigation {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        padding: 6px 10px !important;
    }

    .bookmark-navigation .d-flex {
        flex-wrap: nowrap !important;
    }

    .bookmark-bar {
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }

    .bookmark-btn {
        width: auto !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }
}

/* --- Policy modal adjustments for mobile --- */
@media (max-width: 767.98px) {
    .policy-details-modal-overlay .modal-dialog {
        top: 5% !important;
        left: 50% !important;
        max-width: 95% !important;
        transform: translateX(-50%) !important;
    }

    .policy-details-modal-overlay .modal-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════════════════════ */

.site-footer {
    background-color: #395970;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', sans-serif;
    margin-top: auto;
}

/* ── Main section (brand + sitemap) ── */
.footer-main {
    padding: 3rem 1.5rem 2rem;
}

/* Brand column */
.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-brand-name {
    font-family: 'Roboto Mono', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    /*letter-spacing: 0.03em;*/
    line-height: 120%;
    letter-spacing: 0.00001em;
    max-width: 180px;
}

.footer-tagline {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0;
    max-width: 220px;
}

/* Sitemap columns */
.footer-col-heading {
    font-family: 'Roboto Mono', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    /*letter-spacing: 0.1em;*/
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 120%;
    letter-spacing: 0.00001em;
}

.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.footer-link-item {
    line-height: 1.3;
}

.footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.15s ease;
}

.footer-link:hover,
.footer-link:focus {
    color: #ffffff;
    text-decoration: underline;
    outline-offset: 2px;
}

/* ── Legal strip ── */
.footer-legal-strip {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 1.5rem;
}

.footer-legal-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.8rem;
}

.footer-legal-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-legal-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.footer-legal-link {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.footer-legal-link:hover,
.footer-legal-link:focus {
    color: #ffffff;
}

/* ── Sidebar clips cleanly when JS shrinks its height (desktop only) ── */
@media (min-width: 992px) {
    .filter-sidebar-mobile {
        overflow: hidden !important;
    }
}

/* ── Mobile ── */
@media (max-width: 767.98px) {
    .footer-main {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-brand-col {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-legal-inner {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }

    .footer-legal-sep {
        display: none;
    }
}

/* --- Back nav button: scroll with content on mobile --- */
@media (max-width: 991.98px) {
    .back-nav-btn {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin: 10px 15px !important;
        z-index: auto !important;
    }
}

/* --- Hide modebar on mobile (keep in expanded modal and desktop) --- */
@media (max-width: 991.98px) {
    .js-plotly-plot .modebar-container {
        display: none !important;
    }
    .modal-fullscreen .js-plotly-plot .modebar-container {
        display: flex !important;
    }
}

/* --- Expand figure containers on mobile: let Plotly size itself, free the width --- */
@media (max-width: 991.98px) {
    /* Make plotly outer wrapper fill available width (Plotly will resize internals) */
    .js-plotly-plot {
        width: 100% !important;
        min-width: 0 !important;
    }
    /* Card bodies: tight padding so charts sit close to action buttons */
    .card-body {
        padding: 0.25rem 0.5rem !important;
    }
    /* Reduce main content container horizontal padding to give charts more room */
    .data-page-content > .container-fluid,
    .data-page-content .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    /* Bootstrap Row gutters shrunk for denser layout */
    .data-page-content .row {
        --bs-gutter-x: 0.5rem !important;
    }
    /* PUE/WUE chart row: cards should hug their columns fully */
    .data-page-content .card {
        border: none;
    }
    /* Tighten card header: title + action-buttons row should sit close to chart */
    .data-page-content .card-header {
        padding: 4px 10px !important;
        margin-bottom: 0 !important;
    }
    .data-page-content .card-header h5 {
        margin-bottom: 2px !important;
        font-size: 1rem !important;
    }
    /* After the float-end buttons wrap to a new row, keep gap small */
    .card-header .float-end {
        margin-top: 4px !important;
        margin-bottom: 0 !important;
    }
    /* dcc.Graph wrapper should have no extra top spacing */
    .card-body > .js-plotly-plot {
        margin-top: 0 !important;
    }
}


/* Landscape: give charts more vertical room, let heatmap body scroll */
@media (max-width: 991.98px) and (orientation: landscape) {
    /* Top-level chart graphs need a generous min-height so legends + plot fit */
    .data-page-content .card-body > .js-plotly-plot,
    .data-page-content .card-body > div > .js-plotly-plot,
    .data-page-content .card-body .js-plotly-plot {
        min-height: 360px !important;
    }
    /* Body containers (heatmaps with many rows): scrollable */
    [id$="-body-container"] {
        max-height: none !important;
        min-height: 260px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    /* Heatmap graphs INSIDE scroll containers: keep their computed height, do NOT force min */
    [id$="-body-container"] .js-plotly-plot,
    [id$="-header-container"] .js-plotly-plot {
        min-height: 0 !important;
    }
    /* Fix the pue_wue.py dual-chart scrollable body that was calc(65vh - 180px) = ~73px */
    .data-page-content [style*="calc(65vh - 180px)"] {
        max-height: calc(100vh - 200px) !important;
        min-height: 260px !important;
    }
}

@media (max-width: 991.98px) and (orientation: portrait) {
    .data-page-content .card-body > .js-plotly-plot,
    .data-page-content .card-body > div > .js-plotly-plot,
    .data-page-content .card-body .js-plotly-plot {
        min-height: 420px !important;
    }
    [id$="-body-container"] {
        min-height: 400px !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
    [id$="-body-container"] .js-plotly-plot,
    [id$="-header-container"] .js-plotly-plot {
        min-height: 0 !important;
    }
    .data-page-content [style*="calc(65vh - 180px)"] {
        max-height: calc(100vh - 200px) !important;
        min-height: 400px !important;
    }
}

/* --- PUE/WUE bookmark bar: hide on mobile --- */
@media (max-width: 991.98px) {
    .bookmark-bar {
        display: none !important;
    }
}


/* --- Action buttons row: stack below title on mobile --- */
@media (max-width: 991.98px) {
    .action-buttons-row {
        float: none !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        margin-top: 6px !important;
        margin-bottom: 4px !important;
    }
}

/* --- Mobile: rotate & thin x-axis tick labels on narrow charts --- */
@media (max-width: 767.98px) {
    .js-plotly-plot .xaxislayer-above .xtick:nth-child(even) text {
        opacity: 0 !important;
    }
}

/* --- CP comparison charts: scrollable container on mobile --- */
@media (max-width: 991.98px) {
    .cp-comparison-scroll {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: 70vh !important;
    }
    .cp-comparison-scroll .js-plotly-plot {
        min-height: 600px !important;
    }
}


/* ============================================================
   Lab timeline (Our Research page, /research)
   Palette: primary blue #00588D, headings #2C3E50,
   body #495057, borders #e9ecef — matches site conventions.
   ============================================================ */

.lab-timeline-page {
    background-color: #ffffff;
    padding: 24px 16px 48px;
}

.lab-timeline-title {
    font-family: 'Roboto Mono', sans-serif;
    font-weight: 500;
    color: #2C3E50;
    text-align: center;
    font-size: calc(1.2rem + 0.8vw);
    line-height: 120%;
    margin: 24px 0 10px;
}

.lab-timeline-subtitle {
    font-family: 'Inter', sans-serif;
    color: rgba(64, 64, 64, 0.8);
    text-align: center;
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 36px;
}

.lab-timeline {
    max-width: 860px;
    margin: 0 auto;
}

.lab-timeline-entry {
    display: grid;
    grid-template-columns: 96px 28px 1fr;
    column-gap: 12px;
    padding-bottom: 26px;
}

.lab-timeline-year {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    font-size: 0.92rem;
    color: #00588D;
    text-align: right;
    white-space: nowrap;
    padding-top: 5px;
}

.lab-timeline-node {
    position: relative;
}

/* rail segment: from this dot down to the next entry's dot */
.lab-timeline-node::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    bottom: -26px;
    width: 2px;
    background-color: #d0dae3;
}

.lab-timeline-entry:last-child .lab-timeline-node::before {
    display: none;
}

.lab-timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #00588D;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #00588D;
    z-index: 1;
}

.lab-timeline-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.lab-timeline-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.lab-timeline-event {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2C3E50;
    margin: 0 0 6px;
}

.lab-timeline-brief {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    color: #495057;
    line-height: 1.55;
    margin: 0;
}

.lab-timeline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 10px;
}

.lab-timeline-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #00588D;
    text-decoration: none;
}

.lab-timeline-links a:hover {
    color: #004a73;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .lab-timeline-entry {
        grid-template-columns: 62px 22px 1fr;
        column-gap: 8px;
    }
    .lab-timeline-year {
        font-size: 0.76rem;
        padding-top: 7px;
    }
    .lab-timeline-card {
        padding: 14px 16px;
    }
}
