body {
    font-family: "Helvetica Neue", Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
  }
  text {
      fill: #555;
  }
  .inner text {
      text-anchor: middle;
  }
  

  /* Table container for mobile */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Core table styling */
table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px; /* prevents columns collapsing too much */
    table-layout: fixed; /* enables consistent column widths */
    background: white;
}

/* Header styling */
th {
    position: sticky;
    top: 0;
    background: #f8f8f8;
    cursor: pointer;
    font-weight: 600;
    padding: 8px;
    border-bottom: 2px solid #ccc;
    text-align: left;
}

/* Body cells */
td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Alternating rows */
tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* Hover highlight */
tbody tr:hover {
    background-color: #e8f2ff;
}

/* Make first column wider */
th:first-child,
td:first-child {
    width: 220px;       /* adjust to taste */
    min-width: 220px;
    text-align: left;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

/* Other columns stay compact */
th:not(:first-child),
td:not(:first-child) {
    width: 80px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ============================= */
/* Compact Mobile Mode */
/* ============================= */

@media (max-width: 768px) {

    body {
        font-size: 12px;
    }

    table {
        min-width: 700px; /* slightly smaller minimum */
    }

    th, td {
        padding: 4px 6px;
    }

    th {
        font-size: 12px;
    }

    td {
        font-size: 12px;
    }

    th:first-child,
    td:first-child {
        width: 160px;
        min-width: 160px;
    }

    th:not(:first-child),
    td:not(:first-child) {
        width: 65px;
    }
}



/* ============================= */
/* Ultra-Compact Mobile Mode */
/* ============================= */
@media (max-width: 600px) {
    td:nth-child(n+6),
    th:nth-child(n+6) {
        display: none;
    }
}