:root {
    --bs-body-font-family: 'Sora', system-ui, sans-serif;
    --bs-font-monospace: 'DM Mono', monospace;

    /* Brand palette */
    --nepse-primary: #0f4c8a;
    --nepse-primary-light: #e8f0fb;
    --nepse-up: #0a7c4e;
    --nepse-up-bg: #e6f6ef;
    --nepse-up-border: #b6e8d2;
    --nepse-down: #c0392b;
    --nepse-down-bg: #fdf0ef;
    --nepse-down-border: #f5c6c3;
    --nepse-muted: #6b7280;
    --nepse-surface: #ffffff;
    --nepse-bg: #f0f4f8;
    --nepse-border: #dde3ea;
    --nepse-shadow: 0 1px 4px rgba(15,35,65,.06), 0 4px 16px rgba(15,35,65,.05);
}

        * { box-sizing: border-box; }

        body {
            background: var(--nepse-bg);
            font-family: var(--bs-body-font-family);
            color: #1a2332;
            font-size: 0.875rem;
        }

        /* ── Topbar ── */
        .topbar {
            background: var(--nepse-primary);
            background-image: linear-gradient(135deg, #0a3669 0%, #1565c0 100%);
            padding: 0.6rem 0;
            border-bottom: 1px solid rgba(255,255,255,.08);
        }

        .topbar-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .brand-mark {
            display: flex;
            align-items: center;
            gap: 0.85rem;
        }

        .brand-logo {
            width: 44px;
            height: 44px;
            object-fit: contain;
            border-radius: 8px;
            background: rgba(255,255,255,.12);
            padding: 3px;
        }

        .brand-text h1,
        .brand-site-name {
            font-size: 1.1rem;
            font-weight: 800;
            color: #fff;
            line-height: 1.2;
            letter-spacing: -0.01em;
            margin: 0;
        }

        .brand-text p {
            font-size: 0.72rem;
            color: rgba(255,255,255,.65);
            margin: 0;
            font-weight: 400;
        }

        .topbar-meta {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .market-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.3rem 0.75rem;
            border-radius: 999px;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .market-badge.live {
            background: rgba(10,124,78,.25);
            color: #5ee9ac;
            border: 1px solid rgba(94,233,172,.3);
        }

        .market-badge.closed {
            background: rgba(255,255,255,.1);
            color: rgba(255,255,255,.55);
            border: 1px solid rgba(255,255,255,.15);
        }

        .badge-dot {
            width: 7px; height: 7px;
            border-radius: 50%;
            background: currentColor;
        }

        .market-badge.live .badge-dot {
            animation: blink 1.4s ease-in-out infinite;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50%       { opacity: 0.3; }
        }

        .last-updated-text {
            font-size: 0.72rem;
            color: rgba(255,255,255,.5);
        }

        /* ── Stats Row ── */
        .stat-card {
            background: var(--nepse-surface);
            border: 1px solid var(--nepse-border);
            border-radius: 12px;
            padding: 1rem 1.1rem;
            box-shadow: var(--nepse-shadow);
            transition: box-shadow .15s;
        }

        .stat-card:hover {
            box-shadow: 0 2px 8px rgba(15,35,65,.1), 0 8px 24px rgba(15,35,65,.07);
        }

        .stat-label {
            font-size: 0.68rem;
            font-weight: 600;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--nepse-muted);
            margin-bottom: 0.3rem;
        }

        .stat-value {
            font-size: 1.3rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            line-height: 1.1;
            font-variant-numeric: tabular-nums;
        }

        .stat-value.up   { color: var(--nepse-up); }
        .stat-value.down { color: var(--nepse-down); }
        .stat-value.neu  { color: var(--nepse-primary); }

        /* ── Section header ── */
        .section-title {
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--nepse-muted);
            margin-bottom: 0;
        }

        /* ── Cards ── */
        .n-card {
            background: var(--nepse-surface);
            border: 1px solid var(--nepse-border);
            border-radius: 14px;
            box-shadow: var(--nepse-shadow);
            overflow: hidden;
        }

        .n-card-header {
            padding: 0.85rem 1.2rem;
            border-bottom: 1px solid var(--nepse-border);
            background: #fafbfc;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            min-height: 3.1rem;
        }

        .n-card-title {
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #374151;
            line-height: 1.2;
            margin: 0;
        }

        .n-card-body { padding: 1rem 1.2rem; }

        /* ── NEPSE Chart ── */
        .chart-index-badge {
            display: flex;
            align-items: baseline;
            gap: 0.5rem;
        }

        .chart-index-value {
            font-size: 1.65rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }

        .chart-index-change {
            font-size: 0.8rem;
            font-weight: 600;
            padding: 0.2rem 0.5rem;
            border-radius: 6px;
        }

        .chart-index-change.up   { background: var(--nepse-up-bg); color: var(--nepse-up); }
        .chart-index-change.down { background: var(--nepse-down-bg); color: var(--nepse-down); }

        .chart-date-label {
            font-size: 0.75rem;
            color: var(--nepse-muted);
            font-weight: 500;
        }

        .chart-canvas {
            width: 100%;
            height: 220px;
            display: block;
        }

        .chart-tooltip {
            position: absolute;
            min-width: 148px;
            padding: 0.55rem 0.7rem;
            border-radius: 10px;
            background: rgba(15,28,52,.95);
            color: #f9fafb;
            font-size: 0.75rem;
            box-shadow: 0 8px 24px rgba(15,28,52,.45);
            pointer-events: none;
            transform: translate(-50%, -110%);
            z-index: 10;
            display: none;
            backdrop-filter: blur(4px);
        }

        .chart-tooltip-title { font-weight: 700; margin-bottom: 0.25rem; font-size: 0.72rem; color: rgba(255,255,255,.65); }
        .chart-tooltip-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.78rem; }
        .chart-canvas-wrap { position: relative; padding: 0 1rem 1rem; }

        /* ── Sector cards ── */
        .sector-scroller {
            display: flex;
            gap: 0.7rem;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            scroll-behavior: smooth;
            padding: 0.85rem 1.2rem;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .sector-scroller::-webkit-scrollbar { display: none; }

        .sector-pill {
            flex: 0 0 192px;
            scroll-snap-align: start;
            border: 1px solid var(--nepse-border);
            border-radius: 10px;
            padding: 0.8rem 0.9rem;
            background: #fff;
            transition: border-color .15s, box-shadow .15s;
            cursor: default;
        }

        .sector-pill:hover {
            border-color: #b0c4e0;
            box-shadow: 0 4px 14px rgba(15,35,65,.08);
        }

        .sector-pill-name {
            font-size: 0.75rem;
            font-weight: 700;
            color: #374151;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 0.35rem;
        }

        .sector-pill-index {
            font-size: 1.05rem;
            font-weight: 800;
            letter-spacing: -0.01em;
            font-variant-numeric: tabular-nums;
        }

        .sector-pill-change {
            font-size: 0.75rem;
            font-weight: 600;
            margin-top: 0.15rem;
        }

        .sector-pill-meta {
            font-size: 0.7rem;
            color: var(--nepse-muted);
            margin-top: 0.4rem;
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .sector-scroller-wrap { position: relative; }
        .sector-scroller-wrap::before,
        .sector-scroller-wrap::after {
            content: '';
            position: absolute;
            top: 0; bottom: 0;
            width: 2rem;
            pointer-events: none;
            z-index: 2;
        }
        .sector-scroller-wrap::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
        .sector-scroller-wrap::after  { right: 0; background: linear-gradient(to left, #fff, transparent); }

        .sector-nav-btn {
            width: 30px; height: 30px;
            border: 1px solid var(--nepse-border);
            border-radius: 8px;
            background: #fff;
            color: #374151;
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background .12s, border-color .12s;
            line-height: 1;
        }
        .sector-nav-btn:hover { background: var(--nepse-bg); border-color: #b0c4e0; }
        .sector-nav-btn:disabled { opacity: .3; cursor: not-allowed; }

        /* ── Transaction Summary ── */
        .tx-summary-card {
            height: auto;
        }

        .tx-summary-body {
            padding: 1rem 1.1rem 1.1rem;
        }

        .tx-summary-layout {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .tx-turnover-hero {
            position: relative;
            background: linear-gradient(135deg, var(--nepse-primary-light) 0%, #f8fbff 100%);
            border: 1px solid #c5d8f5;
            border-radius: 12px;
            padding: 1rem 1.1rem 0.95rem;
        }

        .tx-updated-pill {
            position: absolute;
            top: 0.7rem;
            right: 0.75rem;
            font-size: 0.65rem;
            font-weight: 600;
            color: #5a7fa8;
            white-space: nowrap;
        }

        .tx-turnover-label {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--nepse-primary);
            padding-right: 6rem;
        }

        .tx-turnover-value {
            font-size: clamp(1.45rem, 3vw, 1.75rem);
            font-weight: 800;
            letter-spacing: -0.02em;
            color: var(--nepse-primary);
            line-height: 1.1;
            margin-top: 0.25rem;
            font-variant-numeric: tabular-nums;
        }

        .tx-stats-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.65rem;
        }

        .tx-stat-box {
            background: #fafbfc;
            border: 1px solid var(--nepse-border);
            border-radius: 10px;
            padding: 0.75rem 0.85rem;
        }

        .tx-stat-box.tx-stat-up {
            background: var(--nepse-up-bg);
            border-color: var(--nepse-up-border);
        }

        .tx-stat-box.tx-stat-down {
            background: var(--nepse-down-bg);
            border-color: var(--nepse-down-border);
        }

        .tx-stat-label {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: var(--nepse-muted);
        }

        .tx-stat-label i {
            font-size: 0.78rem;
            opacity: 0.85;
        }

        .tx-stat-value {
            font-size: 1.05rem;
            font-weight: 800;
            letter-spacing: -0.01em;
            margin-top: 0.25rem;
            font-variant-numeric: tabular-nums;
            color: #1a2332;
        }

        .tx-stat-up .tx-stat-value { color: var(--nepse-up); }
        .tx-stat-down .tx-stat-value { color: var(--nepse-down); }

        .tx-breadth-wrap {
            padding-top: 0.15rem;
        }

        .tx-breadth-label {
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--nepse-muted);
            margin-bottom: 0.45rem;
        }

        .tx-breadth-bar {
            display: flex;
            height: 8px;
            border-radius: 999px;
            overflow: hidden;
            background: #eef2f6;
        }

        .tx-breadth-seg {
            display: block;
            height: 100%;
            min-width: 2px;
        }

        .tx-breadth-up { background: var(--nepse-up); }
        .tx-breadth-down { background: var(--nepse-down); }
        .tx-breadth-flat { background: #cbd5e1; }

        .tx-breadth-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 0.65rem 1rem;
            margin-top: 0.45rem;
            font-size: 0.72rem;
            font-weight: 600;
        }

        @media (min-width: 768px) {
            .tx-stats-grid {
                grid-template-columns: repeat(6, minmax(0, 1fr));
            }

            .tx-stat-span-3 { grid-column: span 3; }
            .tx-stat-span-2 { grid-column: span 2; }
        }

        @media (max-width: 575.98px) {
            .tx-updated-pill {
                position: static;
                display: block;
                margin-bottom: 0.45rem;
                padding-right: 0;
            }

            .tx-turnover-label {
                padding-right: 0;
            }
        }

        /* ── Movers ── */
        .movers-nav-tabs {
            display: flex;
            border-bottom: 1px solid var(--nepse-border);
        }

        .movers-nav-tab {
            flex: 1;
            padding: 0.7rem 0.5rem;
            border: none;
            border-bottom: 2px solid transparent;
            background: none;
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 700;
            cursor: pointer;
            color: var(--nepse-muted);
            margin-bottom: -1px;
            transition: color .12s, border-color .12s;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .movers-nav-tab:hover { color: #1a2332; }
        .movers-nav-tab.active { color: #1a2332; border-bottom-color: var(--nepse-primary); }
        .movers-nav-tab[data-mover="gainers"].active { color: var(--nepse-up); border-bottom-color: var(--nepse-up); }
        .movers-nav-tab[data-mover="losers"].active  { color: var(--nepse-down); border-bottom-color: var(--nepse-down); }

        .mover-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.55rem 1.2rem;
            border-bottom: 1px solid #f0f3f7;
            font-size: 0.8rem;
        }
        .mover-row:last-child { border-bottom: none; }

        .mover-ticker { font-weight: 800; font-size: 0.82rem; }
        .mover-name   { font-size: 0.7rem; color: var(--nepse-muted); max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        /* ── Main Table ── */
        .main-table-card .toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.65rem;
            padding: 0.85rem 1.2rem;
            border-bottom: 1px solid var(--nepse-border);
            background: #fafbfc;
        }

        .view-tab-group {
            display: flex;
            gap: 0.3rem;
        }

        .view-tab {
            padding: 0.4rem 0.85rem;
            border: 1px solid var(--nepse-border);
            background: var(--nepse-surface);
            border-radius: 7px;
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            color: var(--nepse-muted);
            transition: background .12s, color .12s, border-color .12s;
        }

        .view-tab:hover { background: var(--nepse-bg); }
        .view-tab.active { background: var(--nepse-primary); border-color: var(--nepse-primary); color: #fff; }

        .search-box {
            flex: 1;
            min-width: 180px;
            position: relative;
        }

        .search-box input {
            width: 100%;
            padding: 0.42rem 0.9rem 0.42rem 2.1rem;
            border: 1px solid var(--nepse-border);
            border-radius: 7px;
            font-family: inherit;
            font-size: 0.825rem;
            background: var(--nepse-surface);
            color: #1a2332;
            outline: none;
            transition: border-color .12s, box-shadow .12s;
        }

        .search-box input:focus {
            border-color: var(--nepse-primary);
            box-shadow: 0 0 0 3px rgba(15,76,138,.12);
        }

        .search-box .bi-search {
            position: absolute;
            left: 0.65rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--nepse-muted);
            font-size: 0.8rem;
            pointer-events: none;
        }

        .sector-select {
            padding: 0.42rem 0.85rem;
            border: 1px solid var(--nepse-border);
            border-radius: 7px;
            font-family: inherit;
            font-size: 0.8rem;
            background: var(--nepse-surface);
            color: #1a2332;
            outline: none;
            min-width: 155px;
            transition: border-color .12s, box-shadow .12s;
        }

        .sector-select:focus {
            border-color: var(--nepse-primary);
            box-shadow: 0 0 0 3px rgba(15,76,138,.12);
        }

        /* ── Table styles ── */
        .n-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }

        .n-table thead { background: #f5f7fa; position: sticky; top: 0; z-index: 1; }

        .n-table th {
            padding: 0.6rem 0.9rem;
            font-size: 0.67rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--nepse-muted);
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            border-bottom: 1px solid var(--nepse-border);
            text-align: left;
        }

        .n-table th:hover  { color: #1a2332; }
        .n-table th.sorted { color: var(--nepse-primary); }

        .n-table td {
            padding: 0.55rem 0.9rem;
            border-top: 1px solid #f0f3f7;
            white-space: nowrap;
            vertical-align: middle;
        }

        .n-table tbody tr:hover { background: #f8fafc; }

        .ticker-sym { font-weight: 800; font-size: 0.82rem; }
        .ticker-name { font-size: 0.68rem; color: var(--nepse-muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

        .num { font-variant-numeric: tabular-nums; font-weight: 500; }

        .chg-up   { color: var(--nepse-up); font-weight: 700; }
        .chg-down { color: var(--nepse-down); font-weight: 700; }
        .chg-flat { color: var(--nepse-muted); font-weight: 500; }

        .sector-badge {
            display: inline-block;
            padding: 0.18rem 0.5rem;
            border-radius: 5px;
            font-size: 0.67rem;
            font-weight: 600;
            background: var(--nepse-primary-light);
            color: var(--nepse-primary);
            letter-spacing: 0.01em;
        }

        .empty-msg { padding: 2.5rem; text-align: center; color: var(--nepse-muted); font-size: 0.85rem; }

        /* ── Misc ── */
        footer {
            text-align: center;
            font-size: 0.72rem;
            color: #9ca3af;
            padding: 1.5rem 0 0.75rem;
        }

        .table-wrap { overflow-x: auto; }

        /* ── Responsive ── */
        @media (max-width: 575px) {
            .brand-text h1,
            .brand-site-name { font-size: 0.9rem; }
            .chart-index-value { font-size: 1.25rem; }
            .tx-turnover-value { font-size: 1.25rem; }
        }

        /* ── Site navigation ── */
        .site-nav {
            background: #fff;
            border-bottom: 1px solid var(--nepse-border);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(15,35,65,.04);
        }

        .site-nav-inner {
            display: flex;
            gap: 0.35rem;
            overflow-x: auto;
            padding: 0.55rem 0;
            scrollbar-width: none;
        }

        .site-nav-inner::-webkit-scrollbar { display: none; }

        .site-nav-link {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--nepse-muted);
            text-decoration: none;
            white-space: nowrap;
            border: 1px solid transparent;
            transition: background .15s, color .15s, border-color .15s;
        }

        .site-nav-link:hover {
            color: var(--nepse-primary);
            background: var(--nepse-primary-light);
        }

        .site-nav-link.active {
            color: #fff;
            background: var(--nepse-primary);
            border-color: var(--nepse-primary);
        }

        /* ── Page hero & SEO sections ── */
        .breadcrumb-nav { margin-bottom: 0.75rem; }

        .breadcrumb-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            list-style: none;
            padding: 0;
            margin: 0;
            font-size: 0.72rem;
            color: var(--nepse-muted);
        }

        .breadcrumb-item + .breadcrumb-item::before {
            content: '/';
            margin-right: 0.35rem;
            color: #cbd5e1;
        }

        .breadcrumb-item a {
            color: var(--nepse-primary);
            text-decoration: none;
        }

        .page-hero h1 {
            font-size: clamp(1.35rem, 2.5vw, 1.85rem);
            font-weight: 800;
            letter-spacing: -0.02em;
            color: #1a2332;
            margin: 0 0 0.45rem;
        }

        .page-lead {
            font-size: 0.92rem;
            color: var(--nepse-muted);
            max-width: 820px;
            margin: 0;
            line-height: 1.55;
        }

        .page-section-title {
            font-size: 1rem;
            font-weight: 800;
            color: #1a2332;
            margin: 0 0 0.85rem;
            letter-spacing: -0.01em;
            line-height: 1.3;
        }

        .section-headings-row {
            align-items: flex-end;
            margin-bottom: 0.75rem;
        }

        .section-headings-row .page-section-title {
            margin: 0;
            min-height: 2.75rem;
            display: flex;
            align-items: flex-end;
        }

        .section-content-row {
            margin-top: 0 !important;
        }

        @media (min-width: 992px) {
            .section-headings-row .page-section-title {
                min-height: 2.6rem;
            }
        }

        .related-links-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 0.75rem;
        }

        .related-link-card {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            padding: 0.85rem 1rem;
            border: 1px solid var(--nepse-border);
            border-radius: 12px;
            background: #fff;
            text-decoration: none;
            color: #1a2332;
            box-shadow: var(--nepse-shadow);
            transition: border-color .15s, transform .15s;
        }

        .related-link-card:hover {
            border-color: #b0c4e0;
            transform: translateY(-1px);
            color: var(--nepse-primary);
        }

        .related-link-card i { font-size: 1.1rem; color: var(--nepse-primary); }
        .related-link-card small { color: var(--nepse-muted); font-size: 0.68rem; line-height: 1.35; }

        .sector-scroller.sector-grid-expanded {
            display: grid !important;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 0.75rem;
            overflow: visible !important;
            flex-wrap: unset;
        }

        .sector-expanded .sector-scroller-wrap::before,
        .sector-expanded .sector-scroller-wrap::after { display: none; }

        /* ── Trade time columns ── */
        .trade-time {
            font-size: 0.72rem;
            white-space: nowrap;
            min-width: 5.5rem;
        }

        .trade-time-short { display: none; }
        .floorsheet-company { max-width: 220px; }

        /* ── Mobile menu button ── */
        .mobile-menu-btn {
            display: none;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border: 1px solid rgba(255,255,255,.25);
            border-radius: 10px;
            background: rgba(255,255,255,.1);
            color: #fff;
            font-size: 1.35rem;
            padding: 0;
            flex-shrink: 0;
        }

        .mobile-menu-btn:hover { background: rgba(255,255,255,.18); }

        .mobile-nav-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 35, 65, 0.48);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s ease, visibility 0.25s ease;
            z-index: 1190;
        }

        .mobile-nav-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        .mobile-nav-drawer {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: min(88vw, 320px);
            background: #fff;
            box-shadow: 8px 0 32px rgba(15,35,65,.18);
            transform: translateX(-105%);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1200;
            display: flex;
            flex-direction: column;
        }

        .mobile-nav-drawer.open {
            transform: translateX(0);
        }

        .mobile-nav-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1rem 0.85rem;
            border-bottom: 1px solid var(--nepse-border);
            background: linear-gradient(135deg, #0a3669 0%, #1565c0 100%);
            color: #fff;
        }

        .mobile-nav-title {
            font-size: 0.95rem;
            font-weight: 800;
            letter-spacing: -0.01em;
        }

        .mobile-nav-close {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.25rem;
            height: 2.25rem;
            border: 1px solid rgba(255,255,255,.25);
            border-radius: 8px;
            background: rgba(255,255,255,.1);
            color: #fff;
            font-size: 1rem;
            padding: 0;
        }

        .mobile-nav-links {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            padding: 0.85rem;
            overflow-y: auto;
        }

        .mobile-nav-link {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.75rem 0.85rem;
            border-radius: 12px;
            text-decoration: none;
            color: #1a2332;
            font-size: 0.88rem;
            font-weight: 700;
            border: 1px solid transparent;
        }

        .mobile-nav-link i {
            width: 1.25rem;
            color: var(--nepse-primary);
            font-size: 1rem;
        }

        .mobile-nav-link:hover {
            background: var(--nepse-primary-light);
            color: var(--nepse-primary);
        }

        .mobile-nav-link.active {
            background: var(--nepse-primary);
            color: #fff;
            border-color: var(--nepse-primary);
        }

        .mobile-nav-link.active i { color: #fff; }

        body.nav-open { overflow: hidden; }

        @media (max-width: 991.98px) {
            .mobile-menu-btn { display: inline-flex; }

            .desktop-nav { display: none !important; }

            .topbar-inner {
                display: grid;
                grid-template-columns: auto 1fr auto;
                align-items: center;
                gap: 0.65rem;
            }

            .brand-mark { min-width: 0; }

            .brand-text p { display: none; }

            .brand-site-name {
                font-size: 0.92rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .topbar-meta {
                flex-direction: column;
                align-items: flex-end;
                gap: 0.2rem;
            }

            .last-updated-text {
                font-size: 0.62rem;
                text-align: right;
                max-width: 9rem;
                line-height: 1.25;
            }

            .market-badge {
                font-size: 0.66rem;
                padding: 0.24rem 0.55rem;
            }

            .page-hero h1 { font-size: 1.25rem; }
            .page-lead { font-size: 0.84rem; }

            .toolbar {
                flex-direction: column;
                align-items: stretch;
            }

            .view-tab-group,
            .search-box,
            .sector-select {
                width: 100%;
            }

            .search-box input,
            .sector-select {
                min-height: 2.65rem;
            }

            .stat-card { padding: 0.8rem 0.9rem; }
            .stat-value { font-size: 1.05rem; }

            .n-card-header {
                flex-wrap: wrap;
                gap: 0.5rem;
            }

            .chart-index-value { font-size: 1.15rem; }

            .trade-time-full { display: none; }
            .trade-time-short { display: inline; }

            .n-table { font-size: 0.78rem; }
            .n-table th,
            .n-table td { padding: 0.55rem 0.45rem; }

            .ticker-name { max-width: 120px; }
            .floorsheet-company { max-width: 140px; }

            .related-links-grid {
                grid-template-columns: 1fr 1fr;
            }

            .breadcrumb-list { font-size: 0.68rem; }
        }

        @media (max-width: 575.98px) {
            main.container-xxl {
                padding-left: 0.85rem !important;
                padding-right: 0.85rem !important;
            }

            .related-links-grid {
                grid-template-columns: 1fr;
            }

            .movers-nav-tab,
            .view-tab {
                flex: 1;
                text-align: center;
            }

            .chart-canvas-wrap { min-height: 220px; }

            .tx-turnover-value { font-size: 1.15rem; }

            .sector-pill {
                min-width: 138px;
            }
        }

        /* ── AdSense ── */
        .ad-slot {
            margin: 1rem 0 1.25rem;
            padding: 0.65rem 0.75rem 0.75rem;
            border: 1px solid var(--nepse-border);
            border-radius: 12px;
            background: #fff;
            box-shadow: var(--nepse-shadow);
            overflow: hidden;
        }

        .ad-slot-label {
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #9ca3af;
            margin-bottom: 0.45rem;
            text-align: center;
        }

        .ad-slot-inner {
            min-height: 90px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ad-slot-top {
            margin-top: 0.25rem;
        }

        .ad-slot-bottom {
            margin-top: 1.5rem;
            margin-bottom: 0.5rem;
        }

        @media (max-width: 991.98px) {
            .ad-slot {
                margin: 0.85rem 0 1rem;
                padding: 0.55rem 0.65rem 0.65rem;
            }

            .ad-slot-inner {
                min-height: 72px;
            }
        }
