/* css styles */

/* Homepage two-column layout */
.homepage-layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

.homepage-content {
  flex: 1 1 auto;
  min-width: 300px;
}

/* Constrain images within content column */
.homepage-content img {
  max-width: 100%;
  height: auto;
}

.homepage-widgets {
  flex: 0 0 580px;
  width: 580px;
}

/* Tablet: keep widget width sufficient for gauge */
@media (max-width: 1200px) {
  .homepage-widgets {
    flex: 0 0 520px;
    width: 520px;
  }
}

/* Mobile: stack with widgets on top */
@media (max-width: 900px) {
  .homepage-layout {
    flex-direction: column-reverse;
  }

  .homepage-content {
    width: 100%;
  }

  .homepage-widgets {
    flex: none;
    width: 100%;
    max-width: 580px;
    margin: 0 auto 1rem auto;
  }
}

/* Table captions - bottom, left-aligned, smaller font */
table caption,
caption {
  caption-side: bottom;
  text-align: left !important;
  font-size: 0.85em;
  padding-top: 0.5em;
  color: inherit;
}

/* Figure captions - left aligned */
figcaption.quarto-float-caption-tbl,
figcaption.quarto-float-caption-fig,
.quarto-float-tbl figcaption,
.quarto-float-fig figcaption,
figcaption {
  text-align: left !important;
}

/* Override Quarto's centered figure container for tables */
.quarto-float-tbl {
  text-align: left;
}

/* Table column headers - bold, no border (border is on title above) */
table th,
.table th,
.table > thead > tr > th {
  font-size: 0.95em;
  font-weight: 700;
  border-bottom: none !important;
  border-top: none !important;
  padding: 0.4em 0.6em;
}

/* Data cells should NOT be bold - headers are styled via th elements */

/* Table data cells - dense, smaller font */
table td {
  font-size: 0.85em;
  padding: 0.3em 0.6em;
  border-bottom: 1px dotted rgba(128, 128, 128, 0.4);
}

/* First column (labels) always left-justified */
table td:first-child,
table th:first-child {
  text-align: left;
}

/* Remove border from last row */
table tr:last-child td {
  border-bottom: none;
}

/* Table title (bold paragraph before table) - with underline */
p:has(+ table) {
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.3em;
  margin-bottom: 0.5em;
}

/* Table source (italic paragraph after table) - same color as body, smaller, italic */
table + p {
  font-size: 0.85em;
  font-style: italic;
  margin-top: 0.5em;
}
