html, body {
  scroll-behavior: smooth;
  /*background-color: rgb(197, 193, 181) !important;*/
  background-color: rgb(253, 244, 219) !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



a {
    color: rgb(31, 33, 36);
}

a:hover {
    color: rgba(31, 33, 36, 0.5) !important;
}

pre {
    background-color: rgba(200, 200, 200, 1.0);
}

.a-no-hover:hover {
    background-color: rgba(0,0,0,0) !important;
}

.black {
    color: rgba(31, 33, 36, 0.5) !important;
}


/* Fade-in animation */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(0, 0); /* Starting position */
  }
  50% {
    transform: translate(0, 10px); /* Move down 10px */
  }
}

.navbar-background {
    background-color: rgb(85, 70, 64) !important;
}

.img-h50 {
    height: 50px !important;
    width: auto !important;
}

.img-h70 {
    height: 70px !important;
    width: auto !important;
}

.img-h80 {
    height: 80px !important;
    width: auto !important;
}

.card-img-top {
  height: 256px;
  object-fit: cover;
  object-position: center;
}

.button {
    background-color: #554640 !important;
    color: white !important;
}

.button:hover {
    background-color: #3a302c !important;
    color: white !important;
}

/* Full-height Seamless Navbar Tabs */
.navbar {
    padding: 0 !important;
}

.navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 0;
}

.navbar-nav {
    align-items: stretch;
    height: 100%;
}

.navbar-nav .nav-item {
    display: flex;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0 1.5rem !important;
    height: 100%;
    min-height: 56px;
    border-radius: 0;
    margin: 0;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: none;
    box-shadow: none;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    transform: none;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.22);
    color: #fff !important;
    font-weight: 700;
}

/* Cleanup for navbar dark defaults */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
    color: #fff;
}

.navbar-brand {
    color: #fff !important;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
    color: #fff !important;
}

/* ==========================================================================
   ATLAS DASHBOARD - CENTRALIZED STYLES
   ========================================================================== */

/* --- HOME & ABOUT PAGE SECTIONS --- */
.about-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(0,0,0,0.05);
}
.flow-step {
    position: relative;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 5px solid #554640;
    height: 100%;
    transition: transform 0.2s ease;
}
.flow-step:hover {
    transform: translateY(-5px);
}
.flow-icon {
    font-size: 2rem;
    color: #554640;
    margin-bottom: 1rem;
}
.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #dee2e6;
}
@media (max-width: 768px) {
    .flow-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}
.concept-card {
    border: none;
    border-top: 3px solid #dee2e6;
    transition: all 0.3s ease;
}
.concept-card:hover {
    border-top-color: #554640;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.pillar-icon {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #554640;
    border: 1px solid #eee;
}
.btn-cta {
    background-color: #554640;
    color: white !important;
    border-radius: 50px;
    font-weight: 600;
    padding: 1rem 3rem;
    transition: all 0.3s ease;
    border: none;
}
.btn-cta:hover {
    background-color: #3d322e;
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(85, 70, 64, 0.3);
}

/* --- DATA PREPARATION & LOADING SECTIONS --- */
#columnConfigModal .modal-header { background: #f0f0f0; }
#columnConfigModal table th { font-weight: 600; color: #333; font-size: 0.85rem; }
#columnConfigModal table td { font-size: 0.9rem; }
.type-badge-num { background-color: #554640; color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.75rem; }
.type-badge-cat { background-color: #28a745; color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.75rem; }
.preview-cell {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    color: #444;
    background-color: #fcfcfc;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

/* --- VISUALIZATION & ANALYSIS SECTIONS --- */
.metadata-card {
    border-left: 4px solid #554640;
}
.status-link {
    transition: all 0.2s ease;
    cursor: pointer;
}
.status-link:hover {
    background-color: #f0f0f0 !important;
    transform: translateY(-2px);
}
.accordion-button {
    cursor: pointer;
    padding: 0.75rem 1rem; /* Compact padding */
    background-color: #fdfdfd !important; /* Uniform subtle background */
    color: #444;
    font-size: 0.85rem;
}
.accordion-button:not(.collapsed) {
    background-color: rgba(139, 94, 60, 0.08) !important; /* Very subtle brown-theme tint */
    color: #554640;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}
.accordion-header-unified {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid rgba(0,0,0,.125);
}
.accordion-button::after {
    background-size: 0.8rem;
}
.accordion-body {
    padding: 0.75rem; /* Reduced from standard p-4 */
}
.cursor-pointer {
    cursor: pointer !important;
}

/* --- DYNAMIC RESPONSIVE LAYOUTS --- */
.dynamic-viewport-container {
    min-height: calc(100vh - 140px); /* Balance between navbar and bottom whitespace */
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

/* --- THEMATIC DATATABLES --- */
.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #554640 !important;
    border-color: #554640 !important;
    color: white !important;
    border-radius: 4px;
}
.page-item.active .page-link {
    background-color: #554640 !important;
    border-color: #554640 !important;
    color: white !important;
}
.page-link {
    color: #554640 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #554640 !important;
}
.dataTables_wrapper .dataTables_filter input {
    border-radius: 20px;
    padding: 0.4rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #554640;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(85, 70, 64, 0.15);
}
.table-hover tbody tr:hover {
    background-color: rgba(85, 70, 64, 0.03) !important;
}
.bg-brown-theme { background-color: #554640 !important; }
.bg-brown-theme-light { background-color: rgba(139, 94, 60, 0.1) !important; }
.text-brown-theme { color: #554640 !important; }
.border-brown-theme { border-color: #554640 !important; }
.border-brown-theme-subtle { border-color: rgba(139, 94, 60, 0.2) !important; }

.btn-outline-brown-theme {
    color: #554640;
    border-color: #554640;
    transition: all 0.3s ease;
}
.btn-outline-brown-theme:hover {
    background-color: rgba(85, 70, 64, 0.1);
    color: #554640;
    border-color: #554640;
    transform: scale(1.05);
}
.btn-check:checked + .btn-outline-brown-theme,
.btn-check:active + .btn-outline-brown-theme,
.btn-outline-brown-theme:active,
.btn-outline-brown-theme.active {
    color: #fff !important;
    background-color: #554640 !important;
    border-color: #554640 !important;
}
/* Fix hover text when checked */
.btn-check:checked + .btn-outline-brown-theme:hover {
    background-color: #3d322e !important;
    color: white !important;
}

/* --- UTILITY & SEMANTIC CLASSES --- */
.text-atlas { color: #554640 !important; }
.border-atlas { border-color: #554640 !important; }
.bg-atlas { background-color: #554640 !important; }

.font-xs { font-size: 0.75rem !important; }
.font-xxs { font-size: 0.7rem !important; }
.font-sm { font-size: 0.85rem !important; }

.hero-atlas-title { color: #554640; font-weight: 700; }
.max-w-800 { max-width: 800px !important; }
.max-w-900 { max-width: 900px !important; }
.max-w-300 { max-width: 300px !important; }

.metadata-label {
    color: #6c757d;
    display: block;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.7rem;
}

.step-title { color: #554640; font-weight: 700; }
.preview-table { font-size: 0.85rem !important; }
.config-card { border-color: #554640; padding: 1.5rem; }

.large-spinner { width: 3.5rem; height: 3.5rem; }
.opacity-50 { opacity: 0.5 !important; }

.hover-atlas:hover {
    background-color: #3d322e !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(85, 70, 64, 0.2);
}

.w-40px { width: 40px !important; }
.w-80px { width: 80px !important; }
.w-130px { width: 130px !important; }
.min-w-0 { min-width: 0 !important; }

/* --- PREMIUM HEADERS --- */
.premium-header-container {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(85, 70, 64, 0.1);
    animation: headerEntryFade 0.6s ease-out forwards;
}
.premium-header-container::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #554640;
    border-radius: 2px;
}
.h1-premium {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #554640;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    min-width: 0; /* Crucial for flex truncation */
}
.text-truncate-title {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.h1-premium i {
    font-size: 0.8em;
    opacity: 0.8;
}
.header-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* --- STATUS BADGES (TABLE) --- */
.badge-status {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-status-ready {
    background-color: #6ea194;
    color: white;
}

.badge-status-na {
    background-color: #f0f0f0;
    color: #999;
    border: 1px solid #e0e0e0;
}

.badge-status i {
    font-size: 0.55rem;
}

@keyframes headerEntryFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- GLOBAL ENTRY ANIMATIONS --- */
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.reveal-in {
    opacity: 0;
    animation: revealIn 0.6s ease-out forwards;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealIn {
    to {
        opacity: 1;
    }
}

/* Staggering Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

@media (max-width: 768px) {
    .dynamic-viewport-container {
        min-height: auto;
        justify-content: flex-start;
    }
}

/* --- PROCESSING DASHBOARD & TERMINAL --- */
.processing-dashboard {
    width: 100%;
    max-width: 800px;
    background: #1e1e1e;
    border: 1px solid #333;
    color: #d4d4d4;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    text-align: left !important;
}

.processing-dashboard h3 {
    color: #fff !important;
}

.processing-dashboard p.text-muted {
    color: #aaa !important;
}

.terminal-container {
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1.5rem;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 350px;
}

.terminal-header {
    background-color: #333;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #aaa;
}

.terminal-body {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    scrollbar-width: thin;
    scrollbar-color: #444 #1e1e1e;
    display: flex;
    flex-direction: column;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.terminal-body::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 4px;
}

.log-entry-info { color: #4fc1ff; }
.log-entry-error { color: #f44747; }
.log-entry-warning { color: #cca700; }
.log-entry-timestamp { color: #858585; margin-right: 0.5rem; }

.progress-premium {
    height: 12px;
    background-color: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-premium-bar {
    background-color: #554640;
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DARK MODAL OVERRIDES --- */
.modal-dark-atlas .modal-content {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid #333 !important;
}

.modal-dark-atlas .modal-header,
.modal-dark-atlas .modal-footer {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #fff !important;
}

.modal-dark-atlas .modal-title {
    color: #fff !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px !important;
    left: auto !important;
    width: 48px;
    height: 48px;
    background-color: #8B5E3C !important; /* Specific Atlas Brown */
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 10000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #3d322e;
    transform: translateY(-5px);
    color: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* --- VISUALIZATION DASHBOARD REFINEMENTS --- */

/* Premium Sidebar Navigation */
.analysis-section-sidebar {
    position: sticky;
    top: 20px;
    height: min-content;
    max-height: 80vh;
    overflow-y: auto;
}

.u-variable-sidebar {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 520px;
    overflow: hidden;
}

.u-variable-nav {
    flex: 1 1 auto;
    min-height: 220px;
    height: 520px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    flex-wrap: wrap;
    align-content: flex-start;
}

.cu-variable-sidebar {
    max-height: none;
    overflow-y: visible;
}

.cu-variable-nav {
    height: auto;
    min-height: 0;
    overflow-y: visible;
}

.u-variable-item {
    flex: 0 0 auto;
    width: 165px;
    max-width: 165px;
}

.u-selected-container {
    flex: 0 0 auto;
}

.u-selected-nav {
    max-height: 120px;
    overflow-x: hidden;
}

@media (max-width: 767.98px) {
    .u-variable-sidebar {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    .u-variable-nav {
        height: auto;
        max-height: 45vh;
        overflow-y: auto;
        overflow-x: hidden !important;
        flex-wrap: nowrap;
    }

    .u-variable-item {
        flex-basis: 100%;
        max-width: 100%;
    }
}

.local-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 4px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}
.local-nav-link:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--atlas-brown);
}
.local-nav-link.active {
    background-color: rgba(139, 94, 60, 0.05);
    color: var(--atlas-brown);
    border-left-color: var(--atlas-brown);
    font-weight: 600;
}

.u-plot-card {
    transition: transform 0.2s;
}
.u-plot-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08) !important;
}
.u-plot-card-header {
    background-color: #fdfdfd; /* Match accordion button bg */
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.08); /* Same subtle separator */
    transition: background-color 0.2s;
    cursor: pointer;
}
.u-plot-card-header:hover {
    background-color: #f5f0ed; /* Slight warm tint on hover */
}
.u-plot-card-header h6 {
    cursor: pointer !important;
}
.univariate-card-wrapper {
    margin-bottom: 0.5rem; /* Reduced to allow for tighter layout */
}

.target-badge {
    background: linear-gradient(45deg, #17a2b8, #007bff);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.univariate-dual-plot {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.univariate-dual-plot > div {
    width: 100%;
    overflow: hidden;
}

/* Checklist Styling */
.var-check-label {
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: flex-start; /* Align checkbox with the top of the text */
    gap: 0.5rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    width: 100%;
    color: #495057;
    white-space: normal; /* Allow text to wrap */
    word-break: break-word; /* Break long underscores/words if needed */
    line-height: 1.2;
}
.var-check-label:hover {
    background-color: rgba(139, 94, 60, 0.05);
    color: #554640;
}
.var-check-input {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin-top: 2px; /* Slight offset for better alignment with text */
}

/* Search Container */
.u-sidebar-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.u-empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: #fdfdfd;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    color: #adb5bd;
}

/* Selected Tags Styling */
.u-selected-container {
    border-top: 1px dashed #dee2e6;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}
.selected-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(139, 94, 60, 0.05);
    color: #554640;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    margin: 0;
    font-weight: 500;
    border: 1px solid rgba(139, 94, 60, 0.15);
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}
.selected-tag:hover {
    background: rgba(139, 94, 60, 0.1);
    border-color: #554640;
}
.btn-close-var {
    font-size: 0.6rem;
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.8;
    color: white;
    transition: transform 0.2s;
}
.btn-close-var:hover {
    opacity: 1;
    transform: scale(1.2);
    color: #ffc107; /* Hint of gold on delete */
}

/* Force Plotly to respect container width */
.js-plotly-plot, .plotly-graph-div {
    width: 100% !important;
}
/* --- NOUI SLIDER CUSTOM STYLING --- */
.noUi-connect {
    background: #554640 !important;
}

.noUi-horizontal {
    height: 6px !important;
}

.noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #554640 !important;
    cursor: pointer !important;
    top: -7px !important;
}

.noUi-handle::before,
.noUi-handle::after {
    display: none !important;
}

.noUi-tooltip {
    font-size: 10px !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    background: #554640 !important;
    color: white !important;
    border: none !important;
}

/* --- ADDITIONAL UTILITY CLASSES --- */
.h-40vh { max-height: 40vh !important; }
.min-h-350 { min-height: 350px !important; }
.h-500 { height: 500px !important; }

/* --- RESULT PACKS TABLE STYLES --- */
#resultsTable tbody tr {
    cursor: pointer;
}

.table-col-select { width: 4%; }
.table-col-name-demo { width: 26%; }
.table-col-name { width: 22%; }
.table-col-desc-demo { width: 26%; }
.table-col-desc { width: 22%; }
.table-col-modules-demo { width: 20%; }
.table-col-modules { width: 16%; }
.table-col-size-demo { width: 14%; }
.table-col-size { width: 12%; }
.table-col-date-demo { width: 14%; }
.table-col-date { width: 12%; }
.table-col-actions { width: 12%; }

.result-col-desc { max-width: 250px; }
.result-col-name { max-width: 250px; }
.result-col-filename { max-width: 250px; }
.result-col-status { max-width: 180px; }

/* --- LEFT RESULTS NAVIGATION SIDEBAR --- */
.sidebar-nav-toggle {
    position: fixed;
    top: 25%;
    left: 0;
    z-index: 10050 !important;
    background-color: #3d322e !important;
    color: #fdf4db !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-left: none !important;
    border-radius: 0 12px 12px 0 !important;
    padding: 14px 7px !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.sidebar-nav-toggle:hover {
    background-color: #554640 !important;
    color: #ffffff !important;
    padding-right: 10px !important;
}

.sidebar-toggle-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e0d0c1;
    white-space: nowrap;
}

.sidebar-toggle-top,
.sidebar-toggle-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav-panel {
    position: fixed;
    top: 20%;
    max-height: 75vh;
    left: -340px;
    width: 310px;
    background-color: #ffffff !important;
    z-index: 10060 !important;
    display: flex;
    flex-direction: column;
    transition: left 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(85, 70, 64, 0.2);
    border-left: none;
    border-radius: 0 1rem 1rem 0;
    box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden;
}

.sidebar-nav-panel.open {
    left: 0;
}

.sidebar-nav-toggle.open {
    display: none !important;
}

.sidebar-nav-header {
    background-color: #554640 !important;
    color: #ffffff !important;
    padding: 8px 14px !important;
}

.sidebar-nav-body {
    flex: 0 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav-body::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav-body::-webkit-scrollbar-thumb {
    background: rgba(85, 70, 64, 0.25);
    border-radius: 4px;
}

.sidebar-nav-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav-item {
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
    border-color: #554640 !important;
}

/* Custom Utility & Layout Classes */
.alert-bordered-left {
    border-left: 5px solid rgba(0, 0, 0, 0.2) !important;
}

.btn-hero-cta {
    min-width: 200px;
    padding: 0.75rem 2rem;
}

.max-w-500 {
    max-width: 500px;
}

/* Visualization Loading Overlay & Accordion Styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
}

#loading-overlay.fade-out {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

.spinner-premium {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid #8B5A2B;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-premium-anim .75s linear infinite;
}

@keyframes spinner-premium-anim {
    100% {
        transform: rotate(360deg);
    }
}

.accordion-button {
    font-size: 1.15rem !important;
    padding: 1.25rem 1.5rem !important;
    font-weight: 600 !important;
}

.accordion-button::after {
    display: block !important;
    content: "" !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23554640'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-size: 1.25rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-left: auto !important;
    transition: transform .2s ease-in-out !important;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg) !important;
}

#analysisAccordion {
    border: 1px solid rgba(0, 0, 0, .125) !important;
    overflow: hidden;
}

.accordion-item {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, .125) !important;
}

.accordion-item:last-child {
    border-bottom: none !important;
}

/* Index Sidebar Styles */
.sidebar-sticky-panel {
    position: sticky !important;
    top: 1rem !important;
    max-height: calc(100vh - 2rem) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(139, 90, 43, 0.3) transparent !important;
}

.sidebar-icon-box, .sidebar-icon-btn {
    width: 28px;
    height: 28px;
}

.bg-atlas-subtle {
    background-color: rgba(139, 90, 43, 0.1) !important;
}

.hover-translate-x {
    transition: all 0.2s ease-in-out !important;
}

.hover-translate-x:hover {
    transform: translateX(4px) !important;
    border-color: #8B5A2B !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.08) !important;
}

.sidebar-link-active {
    background-color: #ffffff !important;
    color: #8B5A2B !important;
    font-weight: 700 !important;
    border-color: #8B5A2B !important;
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.1) !important;
}

.accordion-button {
    background-color: #ffffff !important;
    color: #212529 !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: #ffffff !important;
    color: #8B5A2B !important;
    box-shadow: none !important;
    border-bottom: 2px solid rgba(139, 90, 43, 0.15) !important;
}

.sidebar-collapsed-col {
    flex: 0 0 52px !important;
    max-width: 52px !important;
    width: 52px !important;
    padding: 0 !important;
}

.sidebar-expanded-workspace {
    flex: 1 1 calc(100% - 52px) !important;
    max-width: calc(100% - 52px) !important;
    width: calc(100% - 52px) !important;
}

#sidebarCol {
    position: sticky !important;
    top: 1rem !important;
    align-self: flex-start !important;
    z-index: 1000 !important;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), flex 0.35s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#workspaceCol {
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), flex 0.35s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 0 !important;
}

#sidebarNavCard {
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar-collapsed-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.1rem !important;
    background-color: #ffffff !important;
    color: #8B5A2B !important;
    border: 1px solid rgba(139, 90, 43, 0.25) !important;
    box-shadow: 0 6px 16px rgba(139, 90, 43, 0.18) !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.sidebar-collapsed-btn:hover {
    transform: scale(1.15) !important;
    background-color: #8B5A2B !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.3) !important;
}

.home-hero-wrapper {
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Table & DataTables Enhancements */
table.dataTable, .table-atlas, table.table {
    width: 100% !important;
    margin-bottom: 1rem;
    vertical-align: middle;
    border-color: rgba(0, 0, 0, 0.08);
}

table.dataTable thead th, .table-atlas thead th, table.table thead th {
    background-color: #f8f9fa !important;
    color: #554640 !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid rgba(139, 90, 43, 0.2) !important;
    padding: 0.75rem 1rem !important;
}

table.dataTable tbody td, .table-atlas tbody td, table.table tbody td {
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

table.dataTable tbody tr:hover, .table-atlas tbody tr:hover, table.table tbody tr:hover {
    background-color: rgba(139, 90, 43, 0.04) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #8B5A2B !important;
    color: white !important;
    border-color: #8B5A2B !important;
    border-radius: 50px !important;
}

.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
    border-radius: 0.375rem !important;
    border: 1px solid #dee2e6 !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.85rem !important;
}

.hover-bg-danger-subtle:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
}

.btn-outline-atlas {
    color: #8B5A2B !important;
    border-color: rgba(139, 90, 43, 0.35) !important;
    background-color: #ffffff !important;
}

.btn-outline-atlas:hover {
    color: #ffffff !important;
    background-color: #8B5A2B !important;
    border-color: #8B5A2B !important;
}

/* Unified Visualisation Header Buttons */
.btn-header-action, .btn-header-primary {
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    padding: 0.45rem 1rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
}

.btn-header-action {
    background-color: #ffffff !important;
    color: #554640 !important;
    border: 1px solid rgba(139, 90, 43, 0.25) !important;
}

.btn-header-action:hover {
    background-color: rgba(139, 90, 43, 0.08) !important;
    color: #8B5A2B !important;
    border-color: #8B5A2B !important;
    box-shadow: 0 3px 8px rgba(139, 90, 43, 0.12) !important;
}

.btn-header-danger {
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.25) !important;
}

.btn-header-danger:hover {
    background-color: rgba(220, 53, 69, 0.08) !important;
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-header-primary {
    background-color: #8B5A2B !important;
    color: #ffffff !important;
    border: 1px solid #8B5A2B !important;
    min-width: 220px;
}

.btn-header-primary:hover {
    background-color: #724722 !important;
    color: #ffffff !important;
    border-color: #724722 !important;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.2) !important;
}

.btn-header-danger-solid {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border: 1px solid #dc3545 !important;
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    padding: 0.45rem 1rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
}

.btn-header-danger-solid:hover {
    background-color: #bb2d3b !important;
    border-color: #b02a37 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
}

.header-back-link {
    color: #8B5A2B !important;
    font-size: 0.825rem !important;
    font-weight: 700 !important;
    transition: all 0.2s ease-in-out !important;
}

.header-back-link:hover {
    color: #554640 !important;
    text-decoration: underline !important;
}

/* UCI Repository Dataset List Styling */
.uci-dataset-card {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.uci-dataset-card:hover {
    border-color: rgba(139, 90, 43, 0.3) !important;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.08) !important;
}

.uci-expand-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.hover-shadow-sm:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.uci-dataset-card .fa-solid,
.uci-dataset-card .fa-regular {
    margin-right: 0.4rem !important;
}

/* --- HOME LANDING --- */
.home-landing { max-width: 1000px; width: 100%; }
.home-eyebrow {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: #6b5a50;
}
.home-title {
    font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 500; line-height: 1;
    letter-spacing: -0.03em; color: #2e2420;
}
.home-subtitle { max-width: 560px; font-size: 1.2rem; font-weight: 600; color: #2e2420; line-height: 1.4; }
.home-lead { max-width: 620px; color: #6b5f58; line-height: 1.6; }

.home-card {
    background: #fff; border: 1px solid rgba(85, 70, 64, 0.12);
    border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
}
.home-card-figure {
    background: #f3e9d6; height: 220px; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid rgba(85, 70, 64, 0.08);
}
.home-card-figure svg { width: 100%; max-width: 380px; height: 100%; }
/* Figure split in two independent panels (time | sources) */
.home-card-figure-split { padding: 0; align-items: stretch; }
.home-fig-half {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-width: 0; padding: 1.6rem 0.75rem 0.75rem;
}
.home-fig-time { flex: 1 1 0; }
.home-fig-sources { flex: 1 1 0; border-left: 1px solid rgba(85, 70, 64, 0.3); }
.home-fig-caption {
    position: absolute; top: 0.6rem; left: 0.85rem;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8a7d75;
}
.home-fig-label { font-size: 9px; fill: #6b5f58; }
.home-card-body { padding: 1.5rem 1.25rem 1.75rem; }
.home-card-kicker {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #554640; margin-bottom: 0.4rem;
}
.home-card-title { font-size: 1.35rem; font-weight: 700; color: #2e2420; margin-bottom: 0.6rem; }
.home-card-text { color: #5c514b; font-size: 0.95rem; line-height: 1.55; margin-bottom: 1rem; }
.home-chip {
    background: #f3e9d6; color: #4a3a30; font-size: 0.7rem; font-weight: 500;
    border-radius: 50px; padding: 0.28rem 0.6rem; white-space: nowrap;
}

.home-btn {
    border-radius: 50px; font-weight: 600; padding: 0.7rem 2rem; min-width: 200px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.home-btn-primary { background: #4a3a30; color: #fff !important; border: 1px solid #4a3a30; }
.home-btn-primary:hover { background: #2e2420; color: #fff !important; box-shadow: 0 8px 18px rgba(74, 58, 48, 0.25); }
.home-btn-lg {
    padding: 0.95rem 2.6rem; font-size: 1.15rem; min-width: 240px;
    box-shadow: 0 10px 24px rgba(74, 58, 48, 0.28);
}
.home-btn-lg i { transition: transform 0.2s ease; }
.home-btn-lg:hover i { transform: translateX(4px); }
.home-btn-outline { background: transparent; color: #4a3a30; border: 1px solid #4a3a30; }
.home-btn-outline:hover { background: rgba(74, 58, 48, 0.08); color: #4a3a30 !important; }

.home-package { border-top: 1px solid rgba(85, 70, 64, 0.15); }
.home-package a { color: #2e2420; }
.home-pip {
    display: inline-block; background: #2e2420; color: #f3e9d6;
    border-radius: 6px; padding: 0.4rem 0.75rem; font-size: 0.85rem;
}

.navbar-github {
    color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; text-decoration: none;
    padding: 0 1.5rem; display: flex; align-items: center; min-height: 56px;
}
.navbar-github:hover { color: #fff !important; }

.navbar-admin { padding-left: 1rem; }
.navbar-admin-badge {
    background: #c4a283; color: #2e2420; font-size: 0.75rem; font-weight: 700;
    border-radius: 50px; padding: 0.3rem 0.75rem; text-decoration: none; white-space: nowrap;
}
.navbar-admin-badge:hover { background: #d2b9a0; color: #2e2420 !important; }
.navbar-admin-logout {
    background: transparent; border: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; padding: 0.3rem 0.5rem;
}
.navbar-admin-logout:hover { color: #fff; }

.home-copy-btn {
    background: transparent; border: 1px solid rgba(85, 70, 64, 0.25); color: #4a3a30;
    border-radius: 6px; width: 34px; height: 34px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 0.85rem;
    transition: background-color 0.2s ease;
}
.home-copy-btn:hover { background: rgba(74, 58, 48, 0.08); }

/* --- STUDY ATTRIBUTION (citation / license) --- */
.study-attribution {
    display: grid; gap: 0.4rem; font-size: 0.85rem; color: #2e2420;
    background: #fbf7f0; border-left: 3px solid #c4a283; border-radius: 6px; padding: 0.75rem 1rem;
}
.study-attribution > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0.5rem; word-break: break-word; }
.study-attribution span { color: #8a7d75; }
@media (max-width: 575.98px) { .study-attribution > div { grid-template-columns: 1fr; gap: 0; } }

/* --- SITE FOOTER --- */
.site-footer { border-top: 1px solid rgba(85, 70, 64, 0.12); }
.site-footer-logos img { max-width: 100%; }
.site-footer-text { font-size: 0.85rem; color: #6c757d; }
.site-footer-text a { color: #4a3a30; }
.site-footer-text a.site-footer-admin { color: #8a7d75; }

/* --- STUDIES (demo) : toolbar + table --- */
.ds-toolbar {
    background: #fff; border: 1px solid rgba(85, 70, 64, 0.12); border-radius: 14px; padding: 1rem 1.25rem;
}
.ds-search { position: relative; }
.ds-search i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: #8a7d75; font-size: 0.85rem; }
.ds-search input {
    padding: 0.55rem 0.9rem 0.55rem 2.3rem; border-radius: 50px; border: 1px solid rgba(85, 70, 64, 0.2);
    background: #fbf7f0; font-size: 0.9rem;
}
.ds-search input:focus { border-color: #4a3a30; box-shadow: 0 0 0 3px rgba(74, 58, 48, 0.12); background: #fff; }
.ds-segment {
    display: inline-flex; background: #f3e9d6; border-radius: 50px; padding: 3px;
    max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.ds-segment button {
    border: 0; background: transparent; color: #5c514b; font-size: 0.8rem; font-weight: 500;
    padding: 0.35rem 0.85rem; border-radius: 50px; white-space: nowrap; transition: background-color 0.15s ease;
}
.ds-segment button:hover { color: #2e2420; }
.ds-segment button.active { background: #4a3a30; color: #fff; }
.ds-toolbar-meta { font-size: 0.8rem; color: #6b5f58; }
.ds-toolbar-meta .btn-link { font-size: 0.8rem; color: #4a3a30; text-decoration: none; }

.ds-table-wrap {
    background: #fff; border: 1px solid rgba(85, 70, 64, 0.12); border-radius: 14px; overflow: hidden;
}
.ds-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; color: #2e2420; }
.ds-table thead th {
    background: #fbf7f0; color: #6b5f58; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(85, 70, 64, 0.12);
    white-space: nowrap; position: sticky; top: 0;
}
.ds-sortable { cursor: pointer; user-select: none; }
.ds-sortable:hover { color: #2e2420; }
.ds-sortable i { margin-left: 0.3rem; opacity: 0.5; }
.ds-table td { padding: 0.75rem 1rem; vertical-align: middle; }
.ds-row { cursor: pointer; border-top: 1px solid rgba(85, 70, 64, 0.08); transition: background-color 0.15s ease; }
.ds-row-group:first-of-type .ds-row { border-top: 0; }
.ds-row:hover, .ds-row[aria-expanded="true"] { background: #fdfaf4; }
.ds-row:focus-visible { outline: 2px solid #c4a283; outline-offset: -2px; }
.ds-row-chevron { font-size: 0.65rem; color: #8a7d75; transition: transform 0.2s ease; width: 0.7rem; }
.ds-row[aria-expanded="true"] .ds-row-chevron { transform: rotate(90deg); }
/* width:100% + max-width:0 lets the name column take the free space while still ellipsizing */
.ds-cell-name { width: 100%; max-width: 0; min-width: 0; }
.ds-name {
    font-weight: 600; color: #2e2420; text-decoration: none; word-break: break-word; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ds-name:hover, .ds-name:focus { color: #2e2420 !important; text-decoration: underline; }
.ds-row-desc {
    font-size: 0.75rem; color: #8a7d75; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ds-icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f3e9d6; color: #6b4d38; font-size: 1.1rem;
}
.ds-label-task { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #8a6244; }
.ds-label-desc { font-size: 0.8rem; color: #2e2420; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ds-type { display: inline-flex; align-items: center; gap: 0.4rem; color: #4a3a30; }
.ds-type i { font-size: 0.75rem; color: #8a6244; }
.ds-nature { font-size: 0.72rem; font-weight: 500; border-radius: 50px; padding: 0.2rem 0.6rem; }
.ds-nature-real { background: #e8f1e4; color: #3d6b35; }
.ds-nature-synthetic { background: #e6ecf6; color: #3b5a8c; }
.ds-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.ds-target { font-family: 'Consolas', 'Monaco', monospace; font-size: 0.8rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-muted { color: #8a7d75; }
.ds-open-btn {
    background: #4a3a30; color: #fff !important; border-radius: 50px; font-size: 0.75rem; font-weight: 600;
    padding: 0.35rem 0.85rem; text-decoration: none; transition: background-color 0.2s ease;
}
/* Override the global a:hover grey, which made the label unreadable on the dark button */
.ds-open-btn:hover, .ds-open-btn:focus { background: #2e2420; color: #fff !important; }
.ds-open-btn:focus-visible { outline: 2px solid #c4a283; outline-offset: 2px; }
.ds-detail-row td { border: 0; }
.ds-details {
    display: block;
    background: #fdfaf4; padding: 0.5rem 1rem 1.25rem 2.7rem; font-size: 0.8rem;
}
.ds-details-specs { display: grid; gap: 0.4rem; }
.ds-details-specs > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0.5rem; word-break: break-word; }
.ds-details-specs span, .ds-details-label { color: #8a7d75; }
.ds-details-label { display: block; margin-bottom: 0.4rem; }
.ds-modules { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ds-module {
    font-size: 0.72rem; color: #4a3a30; background: #f3e9d6; border-radius: 50px;
    padding: 0.2rem 0.6rem; text-decoration: none;
}
.ds-module:hover, .ds-module:focus { background: #e8d9bd; color: #2e2420 !important; }
.ds-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin-top: 0.35rem; font-size: 0.72rem; color: #6b5f58; }
.ds-row-meta strong { color: #2e2420; font-weight: 600; }
.ds-row-meta code { color: #2e2420; font-size: 0.72rem; }
.ds-row-meta .ds-nature { font-size: 0.68rem; padding: 0.1rem 0.5rem; }
@media (max-width: 767.98px) {
    .ds-details { padding-left: 1rem; }
}
@media (max-width: 575.98px) {
    .ds-toolbar { padding: 0.85rem; }
    .ds-segment { display: flex; width: 100%; }
    .ds-segment button { flex: 1 1 auto; padding: 0.35rem 0.5rem; font-size: 0.75rem; }
    .ds-segment button i { display: none; }
    .ds-table td { padding: 0.7rem 0.6rem; }
    .ds-table thead th { padding: 0.65rem 0.6rem; }
    .ds-open-btn { padding: 0.45rem 0.65rem; }
    .ds-details-specs > div { grid-template-columns: 1fr; gap: 0; }
}

@media (min-width: 768px) {
    .ds-cell-name { width: 40%; }
    .ds-table thead th:not(:first-child):not(:last-child) { width: 15%; }
    .ds-table thead th:last-child { width: 1%; }
}

.ds-modules-inline { margin-top: 0.5rem; }
.ds-col-modules .ds-modules { gap: 0.3rem; }
@media (min-width: 992px) {
    /* short columns hug their content; Study and Label take the rest */
    .ds-table thead th:not(:first-child):not(:last-child) { width: 1%; }
    .ds-table thead th:not(:first-child):not(:last-child).ds-col-label { width: 12%; min-width: 140px; }
    .ds-table td.ds-num, .ds-table th.text-end { padding-left: 1.25rem; }
}
@media (min-width: 992px) {
    .ds-cell-name { width: 34%; }
}
@media (min-width: 1400px) {
    /* Modules column appears: Study, Label and Modules share the free width */
    .ds-cell-name { width: 28%; }
    .ds-table thead th:not(:first-child):not(:last-child).ds-col-label { width: 12%; }
    .ds-table thead th:not(:first-child):not(:last-child).ds-col-modules { width: 24%; }
}

/* Product suffix (e.g. "HORIZON") at half the size of the brand name next to it */
.brand-suffix { font-size: 0.5em; }
