.ci-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.ci-tab {
    background: #f1f5f9;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
}

.ci-tab.active {
    background: #0f172a;
    color: #fff;
}

.ci-tab-content {
    display: none;
}

.ci-tab-content.active {
    display: block;
}

.ci-article img {
    margin: 15px 0;
    max-width: 100%;
}

/* Base table styling */
.ci-table {
    width: 100%;
    border-collapse: collapse; /* ensures single border */
    font-size: 14px;
    border: 1px solid #d1d5db; /* outer border */
}

/* Header alignment and styling */
.ci-table th {
    text-align: center;
    vertical-align: middle;
    white-space: normal;        /* Allow wrapping */
    line-height: 1.25;
    padding: 10px 8px;
    background-color: #f8fafc;
    font-weight: 600;
    border: 1px solid #d1d5db; /* header borders */
}

/* Default body cells */
.ci-table td {
    padding: 8px 8px;
    border: 1px solid #d1d5db; /* vertical & horizontal borders */
}

/* Right-align numeric columns */
.ci-table td:not(:first-child) {
    text-align: center;
}

/* Keep first column left-aligned (Sector, Ticker, Year) */
.ci-table td:first-child {
    text-align: left;
    font-weight: 500;
}

/* Zebra striping for readability */
.ci-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Hover effect for rows */
.ci-table tbody tr:hover {
    background-color: #eef2ff;
}

/* Space between consecutive tables */
.ci-table-wrapper {
    margin: 25px 0;
}
/* =========================================
   Scrollable table container
   ========================================= */

/* Enable scrolling */
.ci-table-wrapper {
    max-height: 420px;              /* ~10 rows */
    overflow-y: auto;               /* vertical scroll */
    overflow-x: auto;               /* horizontal scroll */
    -webkit-overflow-scrolling: touch;
}

/* Prevent table from shrinking */
.ci-table {
    min-width: 900px;               /* forces horizontal scroll on small screens */
}

/* Sticky header (optional but recommended) */
.ci-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .ci-table-wrapper {
        max-height: 350px;
    }

    .ci-table {
        min-width: 700px;
    }
}
