/* SERUM Table Scroll (TCD) */
.sts-scroll {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  position: relative;
  /* Allow both vertical and horizontal finger scroll to pass through */
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
}

.sts-scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.sts-scroll::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}
.sts-scroll::-webkit-scrollbar-track {
  background: rgba(0,0,0,.05);
}

/* Ensure tables don't force page width */
.sts-scroll > table {
  width: max-content;      /* allow natural width; will exceed container if wide */
  min-width: 100%;         /* but at least fill container */
  border-collapse: collapse;
}

/* Edge fade indicators */
.sts-scroll:before,
.sts-scroll:after {
  content: "";
  position: sticky;
  top: 0;
  width: 24px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sts-scroll:before {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,.08), rgba(0,0,0,0));
}

.sts-scroll:after {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,.08), rgba(0,0,0,0));
}

/* Make the table interactions friendly to scrolling on touch */
.sts-scroll table, .sts-scroll thead, .sts-scroll tbody, .sts-scroll tr, .sts-scroll td, .sts-scroll th {
  touch-action: manipulation;
}

/* Optional: improve header readability */
.sts-scroll th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* TCD SERUM specific common containers: ensure we target the content area gracefully */
.serum .entry-content table, 
.entry .entry-content table,
.post-content table,
.article table,
#article table {
  /* JS will wrap, CSS here is a fallback */
  display: table;
}
