/* ========== GENERAL IMAGE STYLING ========== */
img {
  width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 5px;
}

/* ========== IMAGE BLOCK DEFAULT (50%) ========== */
.image-block {
  text-align: center;
  margin: 1em auto;
  max-width: 50%;
}

/* Optional override class for 70% width */
.max-70 {
  max-width: 70%;
}

/* Responsive override for mobile: allow full width */
@media screen and (max-width: 768px) {
  .image-block,
  .html-block,
  .centered-block,
  .centered-block.max-70,
  .max-70 {
    max-width: 100%;
    padding: 0 1em;
  }
  
  .responsive-table-wrapper table {
    font-size: 0.85em;
  }

}


/* ========== CAPTIONS ========== */
.caption,
figcaption,
.quarto-figure > figcaption,
.quarto-figure > p.caption,
.figure-caption,
.image-block .caption,
.html-block .caption,
.centered-block em,
.image-block em {
  font-style: italic;
  font-size: 0.8em;
  text-align: center;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.5em;
  margin-bottom: 1em;
}


/* Strong inside captions */
.quarto-figure > figcaption > strong,
.quarto-figure > p.caption > strong {
  display: block;
  text-align: center;
}

/* Caption inside .image-block */
.image-block .caption {
  font-style: italic;
  font-size: 0.8em;
  margin-top: 0.5em;
  text-align: center;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ========== TABLES ========== */
table {
  margin-left: auto;
  margin-right: auto;
}

table th {
  text-align: center;
}

/* Wrapper for included HTML tables */
.responsive-table-wrapper {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1em;
}

.responsive-table-wrapper::after {
  content: '→';
  position: absolute;
  right: 1em;
  bottom: 0.5em;
  font-size: 1.2em;
  color: rgba(0, 0, 0, 0.2);
}


.responsive-table-wrapper table {
  width: max-content; 
  min-width: 100%;  
  border-collapse: collapse;
  font-size: 0.85em;
  white-space: nowrap;
}


/* === Centered block wrapper === */
.centered-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2em auto;
  max-width: 100%;
  text-align: center;
  margin-bottom: -10px;
}

/* Optional narrower version */
.max-70 {
  max-width: 70%;
}


/* Responsive: full width on phones */
@media screen and (max-width: 768px) {
  .centered-block,
  .centered-block.max-70 {
    max-width: 100%;
    padding: 0 1em;
  }
}

/* Title styling */
.centered-block .tight-title {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 0.25em; /* tighter */
  text-align: center;
}

/* Responsive wrapper for included HTML tables */
.centered-block .responsive-table-wrapper {
  margin-top: -10px;
  margin-bottom: -20px;
}

.centered-block .responsive-table-wrapper table {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  border-collapse: collapse;
}

/* Caption (em tag used as caption) */
.centered-block em,
.centered-block.max-70 em,
.image-block em{
  display: block;
  font-style: italic;
  font-size: 0.8em;
  margin-top: 0.5em;     /* tighter */
  margin-bottom: 1em;    /* slightly tighter */
  text-align: center;
  max-width: 100%;
}

/* === Footer with data sources === */
.data-footer {
  max-width: 700px;
  margin: 3em auto;
  padding-top: 2em;
  border-top: 1px solid #ddd;
  font-size: 0.9em;
  color: #444;
}

/* === Change text font === */
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #333;
}

h1, h2, h3 {
  font-weight: 600;
  margin-top: 1.5em;
}

<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">


.left-image {
  display: block;
  margin-left: 0;
  margin-right: auto;
}

