.header-section-number {
  padding-right: 9px; /* Adjust as needed */
}

.quarto-figure figcaption,
figure figcaption,
.figure-caption {
  text-align: center;
}

div.csl-entry a {
    color: #9999aa;
    text-decoration: underline;
}

/* --- Margin citation / footnote styling: safer version --- */

.column-margin,
.margin-caption,
.margin-ref,
.footnote-body {
  color: #666677;
}

/* Default margin links: not underlined */
.column-margin a,
.footnote-body a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Keep titles italicised */
.column-margin em,
.footnote-body em,
.column-margin cite,
.footnote-body cite {
  font-style: italic;
}

/* Only external URLs / DOI links underlined */
.column-margin a[href^="http"],
.footnote-body a[href^="http"],
.column-margin a[href^="https://doi.org"],
.footnote-body a[href^="https://doi.org"] {
  color: #9999aa;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Hover only actual external links */
.column-margin a[href^="http://"]:hover,
.column-margin a[href^="https://"]:hover,
.footnote-body a[href^="http://"]:hover,
.footnote-body a[href^="https://"]:hover {
  color: #007bff;
  text-decoration: underline;
}

/* Quarto/Pandoc usually gives bare URLs class="uri" */
.column-margin a.uri,
.footnote-body a.uri {
  color: #9999aa;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/*
.column-margin a.uri:hover,
.footnote-body a.uri:hover {
  color: #007bff;
  text-decoration: underline;
}
*/
/* Hover external links only */
.column-margin a[href^="http"]:hover,
.footnote-body a[href^="http"]:hover {
  color: #007bff;
  text-decoration: underline;
}

/* Optional subtle hover for whole margin citation */
.column-margin .footnote:hover,
.column-margin .footnote-body:hover,
.column-margin li:hover {
  background: rgba(0, 123, 255, 0.04);
}

/* For new lua file */
.column-margin a.citation-url,
.footnote-body a.citation-url,
div.csl-entry a.citation-url {
  color: #007bff;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.column-margin a.citation-url:hover,
.footnote-body a.citation-url:hover,
div.csl-entry a.citation-url:hover {
  color: #0056b3;
}