html {
    background: var(--bg);
}

body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: transparent;
    color: var(--text);
    line-height: 1.55;
    padding: 12px 20px 20px;
    min-height: 100vh;
    position: relative;
    transition: background .2s ease, color .2s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(1300px 800px at 15% -10%, var(--bg2) 0%, var(--bg) 55%, var(--bg) 100%);
    z-index: -1;
}

.topbar-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .7rem;
    margin-top: -.9rem;
    margin-bottom: 1rem;
}

.topbar-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    margin-left: auto;
}

.topmenu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

.topmenu-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

.topmenu-link {
    display: inline-flex;
    align-items: center;
    padding: 0 .25rem;   
    text-decoration: none;
   
    transition: color .2s ease, opacity .2s ease;
}

.topmenu-link:hover,
.topmenu-link:focus {
    color: var(--text);
    opacity: 1;
    text-decoration: none;
    outline: none;
}

.topmenu-link + .topmenu-link::before {
    content: "|";
    color: var(--muted);
    margin-right: .45rem;
}

.topmenu-link[aria-current="page"] {
    color: var(--text);
    font-weight: 700;
}

.topmenu-dropdown {
    position: relative;
    display: inline-block;
}

.topmenu-parent {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    user-select: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    padding-right: 0;
}

.topmenu-parent::after {
    content: "";
    width: 0;
    height: 0;
    border-left: .28rem solid transparent;
    border-right: .28rem solid transparent;
    border-top: .36rem solid currentColor;
    transition: transform .2s ease;
}

.topmenu-dropdown.is-open .topmenu-parent::after {
    transform: rotate(180deg);
}

.topmenu-submenu {
    position: absolute;
    top: calc(100% + .22rem);
    left: 50%;
    min-width: 132px;
    padding: .3rem 0;
    border-radius: .7rem;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)), var(--panel);
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 14px 28px rgba(0,0,0,.18);
    transform: translateX(-50%);
    animation: gnTopmenuDropdownReveal .16s ease;
    z-index: 20;
}

.topmenu-submenu[hidden] {
    display: none;
}

.topmenu-submenu-link {
    display: block;
    padding: .45rem .85rem;
    border-radius: 0;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease, transform .2s ease;
}

.topmenu-submenu-link + .topmenu-submenu-link {
    border-top: 1px solid rgba(255,255,255,.1);
}

.topmenu-submenu-link:hover,
.topmenu-submenu-link:focus {
    color: var(--text);
    text-decoration: none;
    background: rgba(74,168,255,.08);
    transform: translateY(-1px);
    outline: none;
}

body.light .topmenu-submenu {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,253,.96));
    border-color: rgba(33,37,41,.1);
    box-shadow: 0 14px 28px rgba(15,23,42,.12);
}

body.light .topmenu-submenu-link {
    color: #1f2937;
}

body.light .topmenu-submenu-link + .topmenu-submenu-link {
    border-top-color: rgba(33,37,41,.1);
}

body.light .topmenu-submenu-link:hover,
body.light .topmenu-submenu-link:focus {
    color: #1f2937;
    background: rgba(37,99,235,.08);
}

.topmenu-divider-special {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .45rem;
    color: var(--accent);
    font-size: .95rem;
    opacity: .75;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), var(--panel);
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 18px rgba(0,0,0,.14);
    transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.theme-switch:hover,
.theme-switch:focus {
    color: var(--text);
    transform: translateY(-1px);
    border-color: rgba(74,168,255,.5);
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
    outline: none;
}

.theme-switch .theme-icon {
    font-size: 0;
    line-height: 1;
}

.theme-switch .theme-icon::before {
    content: "\263E";
    font-size: 1.2rem;
}

.theme-switch[aria-pressed="true"] .theme-icon::before {
    content: "\2600";
}

.theme-switch .theme-text {
    display: none;
}

.topbar-actions .theme-switch {
    flex: 0 0 auto;
    margin-left: .15rem;
}

.theme-switch[aria-pressed="true"] {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,253,.96)) !important;
    color: #1f2937 !important;
    border-color: rgba(33,37,41,.12) !important;
}

.theme-switch[aria-pressed="false"] {
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), var(--panel) !important;
    color: var(--text) !important;
    border-color: rgba(255,255,255,.1) !important;
}

.filters-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
}

.filters-left {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.filter-item {
    min-width: 220px;
}

.filter-item label {
    display: block;
    margin-bottom: .35rem;
    color: var(--muted);
    font-weight: 600;
}

.filter-item.filter-item-compact {
    min-width: 0;
}

.slide-underline-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.slide-underline-tab {
    display: inline-flex;
    align-items: center;
    padding: .2rem 0 .65rem;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}

.slide-underline-tab:hover,
.slide-underline-tab:focus {
    color: var(--text);
    text-decoration: none;
    outline: none;
}

.slide-underline-tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

body.light .slide-underline-tabs {
    border-bottom-color: rgba(33,37,41,.1);
}

body.light .slide-underline-tab {
    color: #6b7280;
}

body.light .slide-underline-tab:hover,
body.light .slide-underline-tab:focus {
    color: #1f2937;
}

body.light .slide-underline-tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.slide-toggle-group {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem;
    border-radius: 999px;
    background: rgba(15, 27, 51, .7);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.slide-toggle-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: .34rem .78rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.slide-toggle-option:hover,
.slide-toggle-option:focus {
    color: var(--text);
    text-decoration: none;
    outline: none;
}

.slide-toggle-option.is-active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(74,168,255,.95), rgba(28,126,214,.95));
    box-shadow: 0 8px 18px rgba(24, 84, 146, .28);
}

body.light .slide-toggle-group {
    background: rgba(247, 250, 253, .95);
    border-color: rgba(33,37,41,.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

body.light .slide-toggle-option {
    color: #6b7280;
}

body.light .slide-toggle-option:hover,
body.light .slide-toggle-option:focus {
    color: #1f2937;
}

body.light .slide-toggle-option.is-active {
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(13, 110, 253, .22);
}

.slide-select {
    background-color: rgba(15, 27, 51, .88);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
}

.slide-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(74,168,255,.18);
}

.slide-select option {
    background-color: #0f1b33;
    color: #eaf1ff;
}

body.light .slide-select {
    background-color: #ffffff;
    color: #212529;
    border-color: rgba(33,37,41,.12);
}

body.light .slide-select option {
    background-color: #ffffff;
    color: #212529;
}

body.light .theme-switch {
    color: #1f2937;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,253,.96));
    border-color: rgba(33,37,41,.12);
    box-shadow: 0 10px 24px rgba(15,23,42,.12);
}

body.light .topmenu-link {
    color: #0066cc;
}

body.light .topmenu-link:hover,
body.light .topmenu-link:focus,
body.light .topmenu-link[aria-current="page"] {
    color: #1f2937;
}

body.light .topmenu-link + .topmenu-link::before {
    color: #94a3b8;
}

body.light .topmenu-divider-special {
    color: #3b82f6;
}

@media (max-width: 991.98px) {
    .filter-item {
        width: 100%;
        min-width: 0;
    }

    .topmenu-links,
    .filters-left,
    .topbar-actions,
    .topmenu {
        width: 100%;
    }

    .topbar-actions,
    .topmenu,
    .topmenu-links {
        align-items: center;
        justify-content: flex-start;
    }

    .topmenu-links {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
        overflow: visible;
        padding: .1rem 0 .2rem;
    }

    .topmenu-link {
        width: auto;
        flex: 0 1 auto;
        max-width: 100%;
        min-height: 0;
        padding: .12rem .45rem;
        border-radius: 0;
        border: 0;
        background: transparent;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }

    .topmenu-link + .topmenu-link::before {
        content: "|";
        margin-right: .45rem;
    }

    .topmenu-link[aria-current="page"] {
        color: var(--text);
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .topmenu-divider-special {
        display: none;
    }

    .topbar-actions {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: .45rem;
    }

    .topmenu {
        min-width: 0;
        flex: 0 1 auto;
    }

    .slide-toggle-group {
        width: 100%;
        justify-content: stretch;
    }

    .slide-toggle-option {
        flex: 1 1 0;
        min-width: 0;
    }

    .theme-switch {
        width: 38px;
    }

    body.light .topmenu-link {
        background: transparent;
        border-color: transparent;
    }

    body.light .topmenu-link[aria-current="page"] {
        color: #1f2937;
        background: transparent;
        border-color: transparent;
    }
}

body.slide-overview-page .header,
body.slide-summary-page .header {
    text-align: center;
}

body.slide-overview-page .header h1,
body.slide-summary-page .header h1 {
    margin: 0 0 6px;
    letter-spacing: .3px;
    color: var(--accent);
}

body.slide-overview-page .kpi-card,
body.slide-summary-page .kpi-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01)), var(--panel);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 16px 36px rgba(10, 18, 32, .14);
}

body.slide-overview-page .kpi-card::before,
body.slide-summary-page .kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--accent), rgba(74,168,255,.22));
}

body.slide-overview-page .kpi-label,
body.slide-summary-page .kpi-label {
    color: var(--muted);
    font-weight: 600;
    letter-spacing: .02em;
}

body.slide-overview-page .kpi-value,
body.slide-summary-page .kpi-value {
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

body.light.slide-overview-page .kpi-card,
body.light.slide-summary-page .kpi-card {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,253,.96));
    border-color: rgba(33,37,41,.08);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

body.slide-overview-page .header {
    margin-bottom: 14px;
    position: relative;
}

body.slide-overview-page .header h1 {
    font-size: 26px;
}

body.slide-overview-page .kpi-card {
    padding: .85rem 1rem;
    min-height: 96px;
}

body.slide-overview-page .kpi-label {
    font-size: .92rem;
    margin-bottom: .28rem;
}

body.slide-overview-page .kpi-value {
    font-size: 1.7rem;
    margin-bottom: 0;
}

body.slide-summary-page .header {
    margin-bottom: 20px;
}

body.slide-summary-page .header h1 {
    font-size: 28px;
}

body.slide-summary-page .sub-title {
    color: var(--muted);
    font-size: 17px;
}

body.slide-summary-page .leader-summary-grid td,
body.slide-summary-page .leader-summary-grid th {
    vertical-align: top;
}

body.slide-summary-page .leader-summary-grid {
    width: 100%;
}

body.slide-summary-page .leader-summary-grid .project-name-cell {
    min-width: 340px;
    max-width: 520px;
}

body.slide-summary-page .project-name-text {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    max-width: 520px;
}

body.slide-summary-page .investor-name-wrap {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

body.slide-summary-page .investor-toggle {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(74,168,255,.95);
    font-size: 15px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    transform: translateY(-1px);
}

body.slide-summary-page .investor-toggle:hover,
body.slide-summary-page .investor-toggle:focus {
    color: #7abfff;
    outline: none;
}

body.slide-summary-page .investor-toggle-spacer {
    visibility: hidden;
    cursor: default;
}

body.light.slide-summary-page .investor-toggle {
    color: #2563eb;
}

body.light.slide-summary-page .investor-toggle:hover,
body.light.slide-summary-page .investor-toggle:focus {
    color: #1d4ed8;
}

body.slide-summary-page .detail-text {
    white-space: normal;
    line-height: 1.45;
    min-width: 220px;
    max-width: 360px;
    color: var(--text);
}

body.slide-summary-page .detail-text p {
    margin: 0;
}

body.slide-summary-page .detail-collapse {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .45rem;
}

body.slide-summary-page .detail-collapse .detail-full {
    display: none;
}

body.slide-summary-page .detail-collapse.expanded .detail-preview {
    display: none;
}

body.slide-summary-page .detail-collapse.expanded .detail-full {
    display: block;
}

body.slide-summary-page .detail-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

body.slide-summary-page .detail-toggle:hover,
body.slide-summary-page .detail-toggle:focus {
    color: #7abfff;
    text-decoration: underline;
    outline: none;
}

body.light.slide-summary-page .detail-toggle {
    color: #2563eb;
}

body.light.slide-summary-page .detail-toggle:hover,
body.light.slide-summary-page .detail-toggle:focus {
    color: #1d4ed8;
}

body.slide-summary-page .sort-header-link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

body.slide-summary-page .sort-header-link:hover,
body.slide-summary-page .sort-header-link:focus {
    color: var(--accent);
    text-decoration: none;
    outline: none;
}

body.light.slide-summary-page .sort-header-link {
    color: inherit;
}

body.slide-summary-page .export-button {
    border-radius: 999px;
    padding: .45rem .95rem;
    font-weight: 700;
    border: 1px solid rgba(33, 115, 70, .35);
    background: transparent;
    color: #27B165;
}

body.slide-summary-page .export-button:hover,
body.slide-summary-page .export-button:focus {
    color: #1b5e3a;
    background: rgba(33, 115, 70, .08);
    border-color: rgba(33, 115, 70, .55);
    box-shadow: none;
}

body.slide-summary-page .kpi-card {
    padding: .85rem 1rem;
    min-height: 96px;
}

body.slide-summary-page .kpi-label {
    font-size: .95rem;
    margin-bottom: .65rem;
}

body.slide-summary-page .kpi-value {
    font-size: 2rem;
    margin-bottom: .4rem;
}

body.slide-summary-page .kpi-meta {
    color: var(--muted);
    font-size: .9rem;
}

body.slide-summary-page .pct-badge {
    padding: .3rem .6rem;
    border-radius: 999px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 5rem;
    text-align: center;
}

body.slide-summary-page .pct-verylow {
    background-color: #d32f2f;
    border: 1px solid #b71c1c;
    color: #fff;
}

body.slide-summary-page .pct-low {
    background: #ffb84d22;
    border: 1px solid #ffb84d66;
    color: #ffe7bf;
}

body.slide-summary-page .pct-mid {
    background: #0288d1;
    border: 1px solid #0277bd;
    color: #eaf6ff;
}

body.slide-summary-page .pct-high {
    background: #43a047;
    border: 1px solid #2e7d32;
    color: #c8f5df;
}

body.light.slide-summary-page .pct-verylow {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

body.light.slide-summary-page .pct-low {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

body.light.slide-summary-page .pct-mid {
    background: #cce5ff;
    border: 1px solid #b8daff;
    color: #004085;
}

body.light.slide-summary-page .pct-high {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

body.light.slide-summary-page .leader-summary-grid {
    --bs-table-color: #212529;
    --bs-table-bg: #ffffff;
    --bs-table-striped-bg: #f6f8fb;
    --bs-table-striped-color: #212529;
    --bs-table-hover-bg: #eef3f8;
    --bs-table-hover-color: #212529;
    --bs-table-border-color: rgba(33,37,41,.08);
}

body.light.slide-summary-page .leader-summary-grid thead tr,
body.light.slide-summary-page .leader-summary-grid thead th,
body.light.slide-summary-page .leader-summary-grid tr th {
    background: #dbe7f6 !important;
    color: #16324f !important;
    border-bottom: 1px solid rgba(33,37,41,.08) !important;
}

body.light.slide-summary-page .leader-summary-grid tbody td,
body.light.slide-summary-page .leader-summary-grid tbody th {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-top: 1px solid rgba(33,37,41,.08) !important;
}

body.light.slide-summary-page .leader-summary-grid tbody tr:nth-child(even) > * {
    background-color: #f6f8fb !important;
    color: #212529 !important;
}

body.light.slide-summary-page .leader-summary-grid tbody tr:hover > * {
    background-color: #eef3f8 !important;
    color: #212529 !important;
}

body.light.slide-summary-page .leader-summary-grid .detail-text,
body.light.slide-summary-page .leader-summary-grid .project-name-text,
body.light.slide-summary-page .leader-summary-grid .money,
body.light.slide-summary-page .leader-summary-grid .fw-bold {
    color: #212529 !important;
}

@keyframes gnTopmenuDropdownReveal {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 991.98px) {
    body.slide-summary-page .detail-text {
        max-width: none;
        min-width: 0;
    }

    body.slide-summary-page .leader-summary-grid .project-name-cell,
    body.slide-summary-page .project-name-text {
        min-width: 0;
        max-width: none;
    }
}
