@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

:root {
    --bg-body: #fcfcfc;
    --bg-panel: #ffffff;
    --bg-subtle: #f8f9fa;
    --border-main: #e5e5e5;
    --border-light: #f0f0f0;
    --border-dark: #e0e0e0;
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #999999;
    --text-strong: #111111;
    --accent-blue: #006a27;
    --up-color: #006a27;
    --down-color: #aa3443;
    --navbar-border: #222222;
    --bg-hover: #f0f0f0;
}

body.dark-theme {
    --bg-body: #0a0a0a;
    --bg-panel: #111111;
    --bg-subtle: #161616;
    --border-main: #1f1f1f;
    --border-light: #161616;
    --border-dark: #2a2a2a;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --text-strong: #f8fafc;
    --accent-blue: #006a27;
    --up-color: #006a27;
    --down-color: #aa3443;
    --navbar-border: #334155;
    --bg-hover: #1e1e1e;
}

/* Navbar specific fixes for layout */
.main-navbar {
    padding: 10px 60px;
    border-bottom: 1px solid var(--border-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
}
.main-navbar .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-strong);
}
.main-navbar .nav-brand img {
    height: 28px;
    border-radius: 6px;
}
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
}
.theme-toggle-btn:hover {
    background: var(--bg-subtle);
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ══════════════════════════════════════
               TOP NAV BAR
            ══════════════════════════════════════ */
.topnav-wrapper {
    position: -webkit-sticky; /* Safari support */
    position: sticky;
    top: 0;
    z-index: 10000;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-main);
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    max-width: 1350px;
    padding: 0 20px;
    margin: 0 auto;
}
.topnav-left {
    display: flex;
    align-items: center;
    gap: 2px;
}
.market-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    border: 1px solid var(--border-dark);
    background: var(--bg-subtle);
}
.market-selector .flag {
    font-size: 14px;
}
.market-selector .arrow {
    color: var(--text-light);
    font-size: 9px;
}
.topnav-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 8px;
}
.topnav-tab {
    padding: 0 12px;
    height: 40px;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s;
    white-space: nowrap;
}
.topnav-tab:hover {
    color: var(--text-main);
}
/* .topnav-tab.active { color: var(--text-main); border-bottom-color: var(--text-main); } */

.topnav-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}
.sentiment-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #f59e0b;
}
.sentiment-badge .bars {
    display: flex;
    gap: 1px;
    align-items: flex-end;
}
.sentiment-badge .bars span {
    width: 3px;
    background: #f59e0b;
    border-radius: 1px;
}
.market-status {
    font-size: 10px;
    color: var(--text-light);
}

/* ══════════════════════════════════════
               LAYOUT: 2 columns
            ══════════════════════════════════════ */
.page-body {
    font-family: "Outfit", sans-serif;
    display: flex;
    max-width: 1350px;
    margin: 0px auto;
    gap: 20px;
    padding: 0 20px;
}
.main-col {
    flex: 1;
    min-width: 0;
    /* border-right: 1px solid var(--border-main); */
}
.side-col {
    width: 350px;
    flex-shrink: 0;
    background: var(--bg-panel);
    align-self: flex-start;
}

/* ══════════════════════════════════════
               SECTION WRAPPER
            ══════════════════════════════════════ */
.section {
    padding: 14px 0;
    border-radius: 12px;
    margin: 20px 0 0;
    width: 100%;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.section-meta {
    font-size: 10px;
    color: var(--text-light);
}

/* ══════════════════════════════════════
               TOP ASSETS
            ══════════════════════════════════════ */
.assets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 6px;
    width: 100%;
    margin: 0;
}
.assets-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}
.assets-region {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    /* background: var(--bg-subtle); border: 1px solid var(--border-dark); */
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
}
.asset-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}
.asset-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.asset-change {
    font-size: 10px;
    margin-top: 1px;
}
.asset-abs {
    font-size: 10px;
    color: var(--text-light);
}
.asset-chart {
    height: 22px;
    margin-top: 4px;
}
.asset-chart svg {
    width: 100%;
    height: 22px;
}

.up {
    color: var(--up-color);
}
.down {
    color: var(--down-color);
}
.flat {
    color: var(--text-muted);
}

/* ══════════════════════════════════════
               MARKET SUMMARY
            ══════════════════════════════════════ */
.ms-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    gap: 8px;
}
.ms-row:last-of-type {
    border-bottom: none;
}
.ms-row:hover .ms-text {
    color: var(--text-main);
}
.ms-text {
    font-size: 11px;
    color: var(--text-muted);
    flex: 1;
    line-height: 1.45;
}
.ms-text.bold {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-main);
}
.ms-expand {
    color: var(--text-light);
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
}
.ms-body {
    font-family: "Outfit", sans-serif;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-top: 4px;
    padding-bottom: 4px;
}
.sources-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-dark);
    color: var(--up-color);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 10px;
    margin-top: 8px;
    cursor: pointer;
}

/* ══════════════════════════════════════
               HEATMAP
            ══════════════════════════════════════ */
.heatmap-wrap {
    background: var(--bg-subtle);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}
.heatmap-sectors {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.hm-sector-label {
    font-size: 9px;
    color: var(--text-muted);
}
.hm-sector-label b {
    color: var(--text-main);
    font-weight: 600;
}
.hm-grid {
    display: flex;
    grid-template-columns: repeat(14, 1fr);
    grid-auto-rows: 28px;
    gap: 2px;
}
.hm-cell {
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    line-height: 1.2;
    padding: 2px;
    transition: opacity 0.15s;
}
.hm-cell:hover {
    opacity: 0.8;
}
.hm-cell .ticker {
    font-size: 6.5px;
    font-weight: 700;
}
.hm-cell .pct {
    font-size: 6px;
    opacity: 0.85;
}

/* colours */
.hm-g3 {
    background: var(--up-color);
}
.hm-g2 {
    background: #006a27;
}
.hm-g1 {
    background: #6ee7b7;
}
.hm-g05 {
    background: #a7f3d0;
}
.hm-n {
    background: #687081;
}
.hm-r05 {
    background: #fca5a5;
}
.hm-r1 {
    background: #aa3443;
}
.hm-r2 {
    background: var(--down-color);
}
.hm-r3 {
    background: #dc2626;
}

.hm-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    font-size: 9px;
    color: var(--text-light);
}
.hm-scale {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* ══════════════════════════════════════
               RECENT DEVELOPMENTS
            ══════════════════════════════════════ */
.dev-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--text-light);
    margin-bottom: 5px;
}
.dev-time .src-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    flex-shrink: 0;
}
.dev-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
    line-height: 1.4;
}
.dev-body {
    font-family: "Outfit", sans-serif;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ══════════════════════════════════════
               POPULAR SPACES
            ══════════════════════════════════════ */
.spaces-section {
    margin: 30px 0 0;
    width: 100%;
}
.spaces-header {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.spaces-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    overflow: hidden;
}
.space-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-main);
    transition: background 0.2s ease;
}
.space-row:last-child {
    border-bottom: none;
}
.space-row:hover {
    background: var(--bg-subtle);
}
.space-info {
    flex: 1;
}
.space-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 4px;
}
.space-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}
.space-btn {
    background: transparent;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 20px;
}
.space-btn:hover {
    background: #006a27;
    color: #ffffff;
    border-color: #006a27;
}

/* Mobile responsive styles for Popular Spaces */
@media (max-width: 768px) {
    .spaces-section {
        margin: 20px 0;
        width: 100%;
    }
    .space-row {
        padding: 16px 20px;
        align-items: center;
    }
    .space-name {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .space-desc {
        font-size: 12px;
        color: var(--text-muted);
        line-height: 1.5;
        padding-right: 15px;
    }
    .space-btn {
        display: none;
    }
    .space-row::after {
        content: "";
        width: 8px;
        height: 14px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 14' fill='none'%3E%3Cpath d='M1 1L7 7L1 13' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        flex-shrink: 0;
    }
}

/* ══════════════════════════════════════
               STANDOUTS (Refined)
            ══════════════════════════════════════ */
.standouts-section {
    margin: 30px 0 40px;
    width: 100%;
}
.standout-card-v2 {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.sv2-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.sv2-company {
    display: flex;
    gap: 12px;
    align-items: center;
}
.sv2-logo {
    width: 40px;
    height: 40px;
    background: var(--bg-subtle);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-strong);
    border: 1px solid var(--border-main);
}
.sv2-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong);
}
.sv2-ticker {
    font-size: 13px;
    color: var(--text-muted);
}
.sv2-price-block {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sv2-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-strong);
}
.sv2-change {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}
.badge-pos {
    background: rgba(34, 197, 94, 0.1);
    color: #006a27;
}
.badge-neg {
    background: rgba(239, 68, 68, 0.1);
    color: #aa3443;
}
.sv2-body {
    font-family: "Outfit", sans-serif;
    display: flex;
    grid-template-columns: 1fr 200px;
    gap: 30px;
    height: 220px;
}
.sv2-chart-container {
    position: relative;
    flex: 1;
    height: 100%;
}
.sv2-prev-close-label {
    position: absolute;
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
    pointer-events: none;
    white-space: nowrap;
    z-index: 5;
    transition: top 0.1s ease;
}
.sv2-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    border-left: 1px solid var(--border-main);
    padding-left: 20px;
}
.sv2-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.sv2-stat-label {
    color: var(--text-muted);
}
.sv2-stat-value {
    color: var(--text-strong);
    font-weight: 600;
}
.sv2-footer {
    border-top: 1px solid var(--border-main);
    padding-top: 15px;
}
.sv2-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ══════════════════════════════════════
               RIGHT PANEL
            ══════════════════════════════════════ */
.rp-section {
    padding: 16px 12px;
}
.rp-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rp-settings {
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

/* Watchlist v2 - Compact */
.watchlist-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    padding: 4px 12px;
}
.wl-v2-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
}
.wl-v2-item:not(:last-child) {
    border-bottom: 1px solid var(--border-main);
}
.wl-v2-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}
.wl-v2-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.wl-v2-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.wl-v2-ticker {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}
.wl-v2-price-col {
    text-align: right;
    margin-right: 4px;
    flex-shrink: 0;
}
.wl-v2-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
}
.wl-v2-change {
    font-size: 10px;
    font-weight: 600;
    margin-top: -2px;
}
.wl-v2-change.pos {
    color: #006a27;
}
.wl-v2-change.neg {
    color: #aa3443;
}
.wl-v2-star {
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}
.wl-v2-star:hover {
    color: #f59e0b;
}

/* Prediction Markets v2 */
.pm-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pm-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 16px;
}
.pm-hidden {
    display: none;
}
.pm-show {
    display: block !important;
}
.pm-question {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 16px;
    line-height: 1.4;
}
.pm-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pm-opt {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pm-opt-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
}
.pm-opt-pct {
    font-size: 13px;
    color: var(--text-muted);
}
.pm-opt-delta {
    min-width: 80px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pm-opt-delta.pos {
    background: rgba(34, 197, 94, 0.1);
    color: #006a27;
}
.pm-opt-delta.neg {
    background: rgba(239, 68, 68, 0.1);
    color: #aa3443;
}
.pm-opt-delta.flat {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-main);
}
.pm-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
}
.pm-see-more {
    text-align: center;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-main);
    transition: all 0.2s;
}
.pm-see-more:hover {
    background: var(--border-main);
}

/* Market Tabs v2 */
.gl-tabs-v2 {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
}
.gl-tab-v2 {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.gl-tab-v2:hover {
    color: #006a27;
}
.gl-tab-v2.active {
    color: #006a27;
}
.gl-tab-v2.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: #006a27;
    border-radius: 3px;
}
[data-theme="light"] .gl-tab-v2.active::after {
    background: #006a27;
}

.market-tabs-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 4px 16px;
}
.mt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.mt-item:not(:last-child) {
    border-bottom: 1px solid var(--border-main);
}
.mt-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.mt-info {
    flex: 1;
    min-width: 0;
}
.mt-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mt-ticker {
    font-size: 11px;
    color: var(--text-muted);
}
.mt-price-col {
    text-align: right;
}
.mt-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
}
.mt-change {
    font-size: 11px;
    font-weight: 600;
}
.mt-change.pos {
    color: #006a27;
}
.mt-change.neg {
    color: #aa3443;
}

.mt-footer {
    padding: 12px 0;
    text-align: center;
    border-top: 1px solid var(--border-main);
}
.mt-see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color 0.2s;
}
.mt-see-all:hover {
    color: #006a27;
}
.gl-item:last-child {
    border-bottom: none;
}
.gl-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    flex-shrink: 0;
}
.gl-info {
    flex: 1;
    min-width: 0;
}
.gl-name {
    font-size: 11px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gl-ticker {
    font-size: 9px;
    color: var(--text-muted);
}
.gl-right {
    text-align: right;
    flex-shrink: 0;
}
.gl-price {
    font-size: 11px;
    color: var(--text-main);
}
.gl-change {
    font-size: 10px;
}
.see-all {
    font-size: 10px;
    color: var(--accent-blue);
    margin-top: 6px;
    display: inline-block;
    cursor: pointer;
}

/* Crypto Watchlist v2 */
.crypto-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 4px 16px;
}
.cw-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.cw-item:not(:last-child) {
    border-bottom: 1px solid var(--border-main);
}
.cw-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}
.cw-info {
    flex: 1;
    min-width: 0;
}
.cw-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
}
.cw-ticker {
    font-size: 11px;
    color: var(--text-muted);
}
.cw-price-col {
    text-align: right;
}
.cw-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
}
.cw-change {
    font-size: 11px;
    font-weight: 600;
}
.cw-change.pos {
    color: #006a27;
}
.cw-change.neg {
    color: #aa3443;
}

/* Disclaimer */
.disclaimer {
    padding: 10px 14px;
    font-size: 9px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-main);
    border-radius: 2px;
}

.box {
    background: var(--bg-panel);
    padding: 18px;
    border: 1px solid var(--border-main);
    border-radius: 12px;
    width: 100%;
    margin-bottom: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-main);
    background: var(--bg-subtle);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.tab.active {
    background: #006a27;
    color: #ffffff;
    font-weight: 600;
    border-color: #006a27;
}

.tab:hover:not(.active) {
    border-color: #006a27;
    color: #006a27;
    background: rgba(0, 106, 39, 0.04);
}

.name {
    width: 100px;
    font-size: 12px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row */
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.bar {
    flex: 1;
    height: 8px;
    background: var(--bg-subtle);
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    width: 0%;
    transition: width 1s ease;
    border-radius: 6px;
}

.val {
    width: 70px;
    text-align: right;
    font-size: 12px;
}

.grid-wrap {
    width: 100%;
    margin: 0;
}

/* ── Asset Cards (image-style) ── */

/* Top row: name + badge */
.ai-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.ai-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.ai-pct {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 500;
}
.ai-price {
    font-size: 12px;
    color: var(--text-muted);
}
.ai-abs {
    font-size: 12px;
    color: var(--text-muted);
}
.ai-chart {
    height: 40px;
    margin-top: 8px;
    position: relative;
}
.ai-chart canvas {
    width: 100% !important;
    height: 40px !important;
    display: block;
}
/* Skeleton */
.skel {
    background: linear-gradient(
        90deg,
        var(--border-light) 25%,
        #e4e4e4 50%,
        var(--border-light) 75%
    );
    background-size: 200% 100%;
    animation: sh 1.4s infinite;
    border-radius: 4px;
    display: inline-block;
}
@keyframes sh {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Pagination row below asset strip */
.asset-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 15px 0 25px; /* Increased top/bottom margin */
    padding: 0 4px;
}
.ap-btn {
    border: 1px solid var(--border-main);
    background: var(--bg-panel);
    color: var(--text-main);
    padding: 8px 20px; /* More substantial padding */
    border-radius: 999px; /* Pill style is more premium */
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.ap-btn:hover:not(:disabled) {
    border-color: #006a27;
    background: rgba(0, 106, 39, 0.04);
    color: #006a27;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 106, 39, 0.1);
}

.ap-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ap-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none;
    box-shadow: none;
}

.ap-info {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Refresh small */
.asset-refresh {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
}
.asset-refresh svg {
    transition: transform 0.5s;
}
.asset-refresh.loading svg {
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.topnav-tab {
    position: relative;
    color: #9aa0a6;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* hover effect */
.topnav-tab:hover {
    color: #006a27;
    transform: translateY(-1px);
}

/* active tab */
.topnav-tab.active {
    color: #006a27;
    font-weight: 600;
}

/* animated underline */
.topnav-tab::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0%;
    height: 3px;
    /* background: linear-gradient(90deg, #00e5ff, #2979ff); */
    background: linear-gradient(90deg, #006a27, #047857);
    border-radius: 50px;
    transition: all 0.4s ease;
    transform: translateX(-50%);
    /* box-shadow: 0 0 10px rgba(0, 229, 255, 0.6); */
}

/* active underline expands */
.topnav-tab.active::after {
    width: 100%;
}

/* subtle glow pulse */
/* @keyframes glowPulse {
        0% {
            box-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
        }
        50% {
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.8);
        }
        100% {
            box-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
        }
    } */

.topnav-tab.active {
    /* No glow pulse requested for now, keeping it clean */
}

/* Premium Styling Tweaks */
.section,
.box,
main {
    overflow: visible !important;
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-body);
}

.market-selector,
.space-btn,
.ap-btn,
.tab {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pos {
    color: var(--up-color) !important;
}
.neg {
    color: var(--down-color) !important;
}
.neu {
    color: var(--text-muted) !important;
}

/* ══════════════════════════════════════
   MARKET SUMMARY ACCORDION
══════════════════════════════════════ */
.ms-container {
    padding: 10px 20px 20px;
    width: 100%;
}
.ms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ms-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}
.ms-time {
    font-size: 11px;
    color: var(--text-muted);
}
.ms-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 8px;
    overflow: hidden;
}
.ms-item {
    border-bottom: 1px solid var(--border-main);
}
.ms-item:last-child {
    border-bottom: none;
}
.ms-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-main);
    transition: background 0.2s ease;
}
.ms-item-header:hover {
    background: var(--bg-hover, var(--bg-subtle));
}
.ms-item-body {
    font-family: "Outfit", sans-serif;
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.3s ease;
    opacity: 0;
}
.ms-item.open .ms-item-body {
    font-family: "Outfit", sans-serif;
    max-height: 500px;
    padding: 0 16px 16px;
    opacity: 1;
}
.ms-caret {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.ms-item.open .ms-caret {
    transform: rotate(-180deg);
}
.ms-sources {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-body);
    border: 1px solid var(--border-main);
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
    font-size: 11px;
    font-weight: 500;
    margin-top: 12px;
}
.ms-source-icons {
    display: flex;
    align-items: center;
    gap: -4px;
}
.ms-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--bg-panel);
    display: inline-block;
}
.ms-icon.red {
    background: #aa3443;
    position: relative;
    z-index: 2;
}
.ms-icon.gray {
    background: #6b7280;
    position: relative;
    left: -4px;
    z-index: 1;
}

/* ══════════════════════════════════════
   HEATMAP RICH TOOLTIP
══════════════════════════════════════ */
.hm-tooltip {
    width: 340px;
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    padding: 0;
    color: var(--text-main);
    pointer-events: none;
    overflow: hidden;
}

.hmt-inner {
    padding: 16px;
}

.hmt-sector {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 500;
}

.hmt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.hmt-logo {
    width: 20px;
    height: 20px;
    background: #d4a017;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hmt-ticker {
    font-size: 16px;
    font-weight: 700;
    margin-right: 8px;
}

.hmt-name {
    font-size: 14px;
    color: var(--text-muted);
}

.hmt-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.hmt-price {
    font-size: 18px;
    font-weight: 600;
}

.hmt-change {
    font-size: 14px;
    font-weight: 600;
}

.hmt-summary {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 16px;
    text-align: justify;
    opacity: 0.85;
}

.hmt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-main);
}

.hmt-time {
    font-size: 12px;
    color: var(--text-muted);
}

.hmt-sources {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.hmt-source-icons {
    display: flex;
    align-items: center;
}

.hmt-s-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #111;
    position: relative;
    display: inline-block;
}

/* Heatmap Interaction: Dim non-hovered cells */
#hm-grid {
    transition: all 0.3s ease;
}

#hm-grid:hover .hm-cell:not(:hover) {
    opacity: 0.45;
    filter: grayscale(0.5) brightness(0.9);
}

.hm-cell {
    transition:
        opacity 0.3s ease,
        filter 0.3s ease,
        background 0.3s ease;
    border-radius: 4px;
}

/* Theme-aware Heatmap Colors */
:root {
    --hm-r2: #aa3443;
    --hm-r1: #aa3443;
    --hm-r05: #fca5a5;
    --hm-g2: #006a27;
    --hm-g1: #4ade80;
    --hm-g05: #86efac;
    --hm-n: #334155;
}

[data-theme="dark"] {
    --hm-r2: #991b1b;
    --hm-r1: #b91c1c;
    --hm-r05: #7f1d1d;
    --hm-g2: #064e3b;
    --hm-g1: #065f46;
    --hm-g05: #022c22;
    --hm-n: #1e293b;
}

.hm-r2 {
    background-color: var(--hm-r2);
}
.hm-r1 {
    background-color: var(--hm-r1);
}
.hm-r05 {
    background-color: var(--hm-r05);
}
.hm-g2 {
    background-color: var(--hm-g2);
}
.hm-g1 {
    background-color: var(--hm-g1);
}
.hm-g05 {
    background-color: var(--hm-g05);
}
.hm-n {
    background-color: var(--hm-n);
}

.hm-cell:hover {
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    outline: 2px solid var(--text-main);
}

/* Tippy Custom Theme */
.tippy-box[data-theme~="heatmap"] {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
}
.tippy-box[data-theme~="heatmap"] .tippy-content {
    padding: 0;
}

/* ══════════════════════════════════════
               MOBILE RESPONSIVENESS
            ══════════════════════════════════════ */

@media (max-width: 1200px) {
    .page-body {
        font-family: "Outfit", sans-serif;
        flex-direction: column;
        padding: 0 10px;
    }
    .main-col {
        width: 100%;
    }
    .side-col {
        width: 100%;
        border-left: none;
        margin-top: 20px;
        padding-bottom: 40px;
        align-self: flex-start;
    }
    .topnav {
        padding: 0 10px;
    }
    .main-navbar {
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    .topnav {
        height: auto;
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .topnav-left {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }
    .topnav-right {
        position: absolute;
        right: 15px;
        top: 10px;
        text-align: right;
    }
    .sentiment-badge {
        display: none;
    }
    .topnav-tabs {
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: flex;
        border-top: 1px solid var(--border-main);
        padding-top: 5px;
    }
    .topnav-tabs::-webkit-scrollbar {
        display: none;
    }
    .topnav-tab {
        padding: 8px 12px;
        font-size: 11px;
        height: auto;
    }

    .page-body {
        flex-direction: column;
        padding: 0 12px;
        gap: 0;
    }

    .main-col,
    .side-col {
        width: 100% !important;
        padding: 0;
        margin: 0;
    }

    /* Portfolio Section (2 per row) */
    .assets-header {
        padding: 10px 0 6px;
    }
    .ai-name {
        font-size: 11px;
    }
    .ai-price {
        font-size: 13px;
    }
    .asset-pagination {
        margin: 15px 10px 0;
        padding: 0 5px;
        display: flex !important; /* Ensure it's visible on mobile if items > 2 */
    }
    .ap-btn {
        padding: 6px 16px;
        font-size: 12px;
    }

    /* Market Summary Alignment */
    .ms-container {
        padding: 15px 10px; /* Align with other sections */
        max-width: 100%;
    }
    .ms-box {
        border-radius: 12px;
    }

    .section {
        padding: 14px 15px;
        margin: 15px 0 0;
        width: 100%;
    }
    .box {
        margin: 0 0 15px 0;
        padding: 10px;
        width: 100%;
    }
    .standouts-section {
        margin: 15px 0;
        width: 100%;
    }

    .standout-card-v2 {
        padding: 16px;
    }
    .standout-card-v2 {
        padding: 16px;
    }

    /* Standouts Responsive */
    .sv2-body {
        font-family: "Outfit", sans-serif;
        grid-template-columns: 1fr;
        height: auto;
    }
    .sv2-chart-container {
        height: 200px;
    }
    .sv2-stats {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-main);
        padding-top: 20px;
    }
    .sv2-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .sv2-price-block {
        text-align: left;
        width: 100%;
        justify-content: space-between;
    }

    .grid-wrap {
        padding: 0px 5px;
    }
}

@media (max-width: 480px) {
    .market-selector {
        padding: 4px 6px;
        font-size: 10px;
    }
    .topnav-tab {
        padding: 8px 10px;
    }
    .cw-item,
    .mt-item,
    .wl-v2-item {
        gap: 8px;
    }
    .cw-logo,
    .mt-logo,
    .wl-v2-logo {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .cw-name,
    .mt-name,
    .wl-v2-name {
        font-size: 12px;
    }
    .cw-price,
    .mt-price,
    .wl-v2-price {
        font-size: 13px;
    }
    .cw-change,
    .mt-change,
    .wl-v2-change {
        font-size: 10px;
    }
}

/* ══════════════════════════════════════
               RECENT DEVELOPMENTS
            ══════════════════════════════════════ */
.dev-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dev-sources {
    display: flex;
    align-items: center;
    gap: 4px;
}
.src-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bg-panel);
    margin-right: -6px;
}
.dev-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 12px;
}
.dev-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-top: 4px;
}
.dev-divider {
    width: 100%;
    height: 1px;
    background: var(--border-light);
    opacity: 0.3;
    margin: 2px 0;
}
.dev-body {
    font-family: "Outfit", sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 992px) {
}

@media (max-width: 600px) {
    .dev-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 12px !important;
        padding: 5px 0 15px !important;
        scrollbar-width: none; /* Hide scrollbar */
    }
    .dev-grid::-webkit-scrollbar {
        display: none;
    }
    .dev-card {
        min-width: 82% !important;
        max-width: 82% !important;
        scroll-snap-align: start;
        height: auto !important;
    }
}

/* ══════════════════════════════════════
               GLOBAL OVERFLOW FIXES
            ══════════════════════════════════════ */
html,
body {
    font-family: "Outfit", sans-serif;
    max-width: 100%;
    overflow-x: clip; /* Modern way to hide horizontal overflow without breaking position: sticky */
}

@media (max-width: 768px) {
    .hm-grid {
        grid-template-columns: repeat(7, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .hm-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Image 1 Exact Style - Final (With Light/Dark Support) */
.asset-strip {
    display: flex;
    gap: 15px;
    margin: 15px 0 0;
    width: 100%;
    padding: 10px 0;
    overflow: visible;
}

.asset-item {
    flex: 1;
    min-width: 140px;
    padding: 12px 15px 0;
    border: 1px solid var(--border-main);
    border-radius: 10px;
    background: var(--bg-panel);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 115px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.asset-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-top-part {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.ai-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ai-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-price {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.ai-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.ai-pct {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

.ai-abs {
    font-size: 10px;
    font-weight: 500;
}

.ai-chart {
    height: 45px;
    margin: 8px -15px 0;
    position: relative;
    width: calc(100% + 30px);
}

@media (max-width: 768px) {
    .asset-strip {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px 10px;
    }
    .asset-item {
        min-width: unset;
        height: 120px;
    }
    .asset-pagination {
        padding: 0 10px;
        margin: 10px 0 20px;
    }
    .ap-btn {
        padding: 6px 12px;
        font-size: 10px;
    }
    .ap-info {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
}

/* Recent Developments Grid & Cards */
.dev-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 10px;
    align-items: stretch; /* Forces equal height */
}

.dev-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    height: 100%; /* Ensure it fills the grid cell */
}

.dev-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dev-header {
    margin-bottom: 12px;
}

.dev-sources {
    display: flex;
    align-items: center;
    gap: 8px;
}

.src-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.dev-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.dev-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 12px;
    /* Truncate title to 2 lines if very long */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dev-divider {
    height: 1px;
    background: var(--border-main);
    margin-bottom: 12px;
}

.dev-body {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1; /* Pushes content to fill space */
    /* Truncate body to 6 lines to keep cards equal */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 992px) {
    .dev-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dev-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 12px !important;
        padding: 5px 0 15px !important;
        scrollbar-width: none; /* Hide scrollbar */
    }
    .dev-grid::-webkit-scrollbar {
        display: none;
    }
    .dev-card {
        min-width: 82% !important;
        max-width: 82% !important;
        scroll-snap-align: start;
        height: auto !important;
    }
}
