/* Navbar */
.dea-navbar {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 0.65rem 0;
}
.dea-navbar .navbar-brand {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ecf0f1 !important;
}
.dea-navbar .nav-meta {
    font-size: 0.78rem;
    color: #95a5a6;
    letter-spacing: 0.01em;
}
.navbar-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.6rem;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.26);
    color: #ecf0f1;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.nav-feedback-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    padding: 0.32rem 0.82rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.22);
    color: #ecf0f1;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}
.nav-feedback-link:hover {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}

/* Stat cards */
.stat-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}
.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.stat-card .card-body {
    padding: 1.1rem 1.25rem;
    border-left: 4px solid var(--accent-color, #3366cc);
}
.stat-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}
.stat-icon {
    color: var(--accent-color, #2c3e50);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}
.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    color: var(--accent-color, #2c3e50);
}
.stat-label {
    font-size: 0.82rem;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    white-space: nowrap;
}

/* Tabs */
.dea-tabs .nav-link {
    font-weight: 500;
    font-size: 0.92rem;
    color: #7f8c8d;
    border: none;
    padding: 0.6rem 1.2rem;
}
.dea-tabs .nav-link.active {
    color: #2c3e50 !important;
    border-bottom: 2.5px solid #3366cc !important;
    background: transparent !important;
}
.dea-tabs {
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 1.25rem;
}

/* Section description text */
.section-desc {
    font-size: 0.88rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.linked-data-uptake-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e3ebf3;
}
.linked-data-uptake-heading {
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-size: 1.22rem;
    font-weight: 700;
}

/* Chart containers */
.chart-wrapper {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 4px;
    margin-bottom: 1rem;
}
.chart-tips-button {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.48rem;
    border: 1px solid #d8e2ec;
    border-radius: 999px;
    background: rgba(255,255,255,0.94);
    color: #526575;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.chart-tips-button:hover,
.chart-tips-button:focus {
    color: #2c3e50;
    border-color: #b8cadb;
    background: #ffffff;
}
.chart-tips-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #edf3f8;
    color: #456173;
    font-size: 0.68rem;
    font-weight: 800;
}
.chart-tips-list {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.82rem;
    line-height: 1.45;
}
.chart-tips-list li {
    margin-bottom: 0.28rem;
}
.chart-tips-list li:last-child {
    margin-bottom: 0;
}

/* Table */
.dea-table .dash-spreadsheet-container .dash-spreadsheet-inner th {
    background-color: #2c3e50 !important;
    color: white !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 12px !important;
    border: none !important;
}
.dea-table .dash-spreadsheet-container .dash-spreadsheet-inner td {
    border-color: #f0f0f0 !important;
    font-size: 0.85rem;
}
.enriched-register-table-container,
.enriched-register-table-container .dash-table-container,
.enriched-register-table-container .dash-spreadsheet-container {
    min-width: 0;
    max-width: 100%;
}
.enriched-register-table-container .dash-table-container {
    width: 100%;
}
.enriched-register-table-container .dash-spreadsheet-container {
    overflow-x: auto !important;
    width: 100% !important;
    max-width: 100% !important;
}
/* Pinned-column alignment. fixed_columns renders the table twice; the copy that
   does not own a header cell is emptied, so the pinned copy's header row is
   taller than the scrolling copy's and every body row below it is offset. A
   shared minimum header height equalises the two. On a table cell `height` is a
   minimum, so a header that needs more room still grows (in one copy only).
   Sized in px because style_header sets the header font in px; the tallest
   header (Project ID, three lines in 90px) needs about 70px. */
.enriched-register-table-container .dash-spreadsheet-inner th {
    height: 80px;
}
.enriched-preview {
    display: block;
    min-width: 0;
}
.enriched-preview-text {
    overflow-wrap: anywhere;
}
.enriched-detail-trigger {
    display: inline;
    margin: 0.35rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #245f91;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.enriched-detail-trigger:focus-visible {
    outline: 2px solid #245f91;
    outline-offset: 2px;
    border-radius: 2px;
}
.enriched-record-detail-fields {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    gap: 0;
    margin: 0;
}
.enriched-record-detail-fields > div {
    display: contents;
}
.enriched-record-detail-fields dt,
.enriched-record-detail-fields dd {
    margin: 0;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid #e9eef2;
}
.enriched-record-detail-fields dt {
    font-weight: 600;
    color: #2c3e50;
    background: #f5f8fa;
}
.enriched-record-detail-fields dd {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
@media (max-width: 575.98px) {
    .enriched-record-detail-fields {
        grid-template-columns: 1fr;
    }
    .enriched-record-detail-fields dt {
        padding-bottom: 0.2rem;
    }
    .enriched-record-detail-fields dd {
        padding-top: 0.2rem;
    }
}
.rationale-cell {
    min-width: 0;
}
.rationale-details {
    margin: 0;
}
.rationale-details[data-overflow="false"] {
    display: none;
}
.rationale-details summary {
    cursor: pointer;
    list-style: none;
    outline-offset: 3px;
}
#enriched-register-table .rationale-details summary:focus-visible {
    outline: 2px solid #245f91;
    border-radius: 2px;
}
.rationale-details summary::-webkit-details-marker {
    display: none;
}
.rationale-preview {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.rationale-toggle {
    display: inline-block;
    margin-top: 0.3rem;
    color: #245f91;
    font-weight: 600;
    text-decoration: underline;
}
.rationale-show-less,
.rationale-details[open] .rationale-read-more {
    display: none;
}
.rationale-details[open] .rationale-show-less {
    display: inline;
}
.rationale-cell.rationale-expanded > .rationale-preview {
    display: none;
}
.rationale-full {
    margin-top: 0.45rem;
    white-space: pre-wrap;
}
.rationale-short {
    white-space: pre-wrap;
}

/* Footer */
.dea-footer {
    text-align: center;
    padding: 1.5rem 0 1rem;
    font-size: 0.78rem;
    color: #95a5a6;
    border-top: 1px solid #ecf0f1;
    margin-top: 2rem;
}

/* Filter controls */
.filter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
}
.collection-display-toggle {
    min-height: 38px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0;
    color: #4f6274;
}

/* Enriched Register filter grid: keep every control in a row on the same line
   even when one label wraps. Bootstrap already stretches the columns of a row to
   equal height, so pushing each control to the bottom of its column aligns them
   without reserving a fixed label height. */
@media (min-width: 768px) {
    .enriched-filter-row > [class*="col-"] {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
}

/* Hero search */
.hero-search {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.hero-search h4 {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}
.hero-search .hero-subtitle {
    font-size: 0.92rem;
    color: #7f8c8d;
    margin-bottom: 1.25rem;
}
.hero-search .hero-helper {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 0.75rem;
}

/* Overview lead */
.overview-lead {
    background: linear-gradient(135deg, #f7fbff 0%, #eef5fb 100%);
    border: 1px solid #d9e6f2;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}
.overview-lead h4 {
    font-weight: 700;
    color: #1f3c5a;
    margin-bottom: 0.75rem;
}
.overview-lead p {
    font-size: 1rem;
    color: #5f7387;
    margin-bottom: 0.9rem;
    line-height: 1.8;
    max-width: 1100px;
}
.overview-lead p:last-child {
    margin-bottom: 0;
}
.prototype-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: rgba(255,255,255,0.72);
}
.prototype-note p {
    margin: 0;
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.5;
}
.feedback-link {
    white-space: nowrap;
}

.analysis-shell {
    margin-top: 0.75rem;
}

.analysis-panel {
    background: #f7fafc;
    border: 1px solid #dde7f0;
    border-radius: 12px;
    padding: 1.25rem 1.35rem 1rem;
    margin-bottom: 1rem;
}

.analysis-tabs-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #607387;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.analysis-tabs {
    border-bottom: none;
    margin-bottom: 1.25rem;
}
.analysis-tabs .nav {
    gap: 0.5rem;
}
.analysis-tabs .nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: #4f6274;
    background: #e8eef5;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    line-height: 1.2;
}
.analysis-tabs .nav-link:hover {
    color: #30475c;
    background: #dfe7f0;
}
.analysis-tabs .nav-link.active {
    color: #17324d !important;
    background: #d5e6f8 !important;
    border: 1px solid #b7d0ea !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.about-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.about-content h4 {
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e3ebf3;
}
.about-content hr {
    margin: 2rem 0 1.5rem;
}

.page-title {
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 1.55rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Mode cards */
.mode-card {
    border: 1px solid #ecf0f1;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
}
.mode-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.mode-card h5 {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}
.mode-card p {
    font-size: 0.88rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

/* Navbar search button */
.nav-search-btn {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    color: #ecf0f1 !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    padding: 0.3rem 0.9rem !important;
    border-radius: 6px !important;
    transition: background 0.2s !important;
}
.nav-search-btn:hover {
    background: rgba(255,255,255,0.22) !important;
}

/* Project Explorer result bar */
.explorer-result-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

/* Taxonomy label/definition tables (Layer Definitions accordion) */
.taxonomy-defs table {
    width: 100%;
    border-collapse: collapse;
}
.taxonomy-defs h4 {
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
}
.taxonomy-defs h4:first-child {
    margin-top: 0;
}
.taxonomy-defs th,
.taxonomy-defs td {
    padding: 0.45rem 0;
    vertical-align: top;
    border-bottom: 1px solid #eef2f6;
}
.taxonomy-defs th:first-child,
.taxonomy-defs td:first-child {
    min-width: 13rem;
    padding-right: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
}
.deterministic-defs details,
.deterministic-defs details p,
.deterministic-defs details li {
    font-size: 0.88rem;
    line-height: 1.55;
}
.deterministic-defs summary {
    cursor: pointer;
    color: #2c3e50;
    font-weight: 600;
}
.subsection-heading {
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid #e3ebf3;
    color: #2c3e50;
    font-weight: 700;
}

/* Page background */
body {
    background-color: #f8f9fb !important;
}
