/* Article listing table on index.qmd (templates/article-listing.ejs) */

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.article-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  border-bottom: 2px solid #dee2e6;
  padding: 0.5rem;
  text-align: left;
}

.article-table td {
  vertical-align: top;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

/* Pandoc emits a colgroup with four equal 25% columns; neutralise it so the
   header-cell widths below decide the layout. */
.article-table colgroup col { width: auto !important; }

.article-col-date { width: 7rem; }
.article-col-category { width: 8rem; }
.article-col-tags { width: 16rem; }

.article-date {
  white-space: nowrap;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Smaller-than-page heading, in a muted navy that sits well with cosmo's
   primary blue (#2780e3) without competing with it. */
.article-title {
  font-size: 1.15rem;
  margin: 0 0 0.3rem 0;
}

.article-title a {
  color: #274c77;
  text-decoration: none;
}

.article-title a:hover {
  color: #2780e3;
  text-decoration: underline;
}

.article-desc {
  margin: 0;
  color: #495057;
  font-size: 0.92rem;
}

.article-category {
  display: inline-block;
  background: #e7f1ff;
  color: #274c77;
  border-radius: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
}

.article-tag {
  display: inline-block;
  background: #f1f3f5;
  color: #495057;
  border-radius: 0.25rem;
  padding: 0.1rem 0.45rem;
  margin: 0 0.15rem 0.25rem 0;
  font-size: 0.78rem;
}

/* Stack the table on narrow screens instead of squeezing four columns. */
@media (max-width: 768px) {
  .article-table thead { display: none; }
  .article-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid #e9ecef; }
  .article-table td { display: block; border: none; padding: 0.15rem 0; }
}
