/* ---------------------------------------------------------------------------
   Site overrides layered on top of the Blackburn theme.
   Loaded via the theme's custom_css hook (partials/head.html), so no theme
   file is modified and a theme update won't clobber any of this.
   --------------------------------------------------------------------------- */

/* Tables -------------------------------------------------------------------
   Hugo emits a bare <table> with no class. Blackburn ships no table CSS at
   all, and Pure.css only styles .pure-table — so markdown tables fall back to
   browser defaults: no borders, ~1px padding, auto width, and (the one that
   actually reads as "misaligned") vertical-align: middle, which floats short
   cells to the centre while long neighbours wrap.
   -------------------------------------------------------------------------- */

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.content thead th {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  background: #f6f6f6;
  border-bottom: 2px solid #cfcfcf;
}

.content tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: top; /* keeps ragged-length cells reading as rows */
}

.content tbody tr:nth-child(even) {
  background: #fafafa;
}

.content tbody tr:last-child td {
  border-bottom: none;
}

/* Long cells shouldn't force the whole row onto one line. */
.content table td,
.content table th {
  overflow-wrap: break-word;
}

/* Narrow screens: let a wide table scroll on its own instead of blowing out
   the page layout. display:block is what makes overflow-x apply to a table. */
@media (max-width: 700px) {
  .content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
