.quarto-block {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 1rem 0;
  background-color: #f9f9f9;
  overflow: hidden;
}

.quarto-block-header {
  background-color: #f0f0f0;
  padding: 5px 10px;
  font-family: monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.code-toggle-button {
  background-color: #e0e0e0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.8em;
}

.code-toggle-button:hover {
  background-color: #d0d0d0;
}

.quarto-block-code {
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
  font-family: monospace;
}

.quarto-block-output {
  padding: 1rem;
  /* This is important for plots and tables to render correctly */
  overflow-x: auto;
  font-family: var(--font-content);
}

.quarto-block-content-wrapper {
  border: 1px solid black;
  padding: 10px;
}

/* Responsive images */
.quarto-block-output img,
.quarto-block-output figure img {
  max-width: 100%;
  height: auto;
}

/* Centering figures and tables */
.quarto-block-output figure,
.quarto-block-output table {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Styling for editable legend (caption/figcaption) */
.editable-caption {
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 4px;
  background-color: #f0f0f0; /* Slightly different background */
  border: 1px dashed #ccc;   /* Subtle border */
  font-style: italic; /* Optional: further distinguish from main content */
}

/* Styles for the new Metadata Block */
.metadata-block .quarto-block-output {
  padding: 1rem 1.5rem;
  background-color: #fafafa; /* A very light grey for subtlety */
  font-family: var(--font-content); /* Use Source Serif Pro for content */
}

.metadata-block h1 {
  font-size: 1.8rem;
  font-weight: 600;
  font-family: var(--font-content); /* Use Source Serif Pro for headings */
  margin-top: 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.metadata-block .authors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem; /* Row and column gap */
  font-size: 0.95rem;
  color: #333;
  font-family: var(--font-content); /* Use Source Serif Pro for content */
}

.metadata-block .author {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.metadata-block .author-name {
  font-weight: 500;
}

.metadata-block .author-affiliations {
  font-size: 0.85rem;
  color: #555;
}

.metadata-block sup {
  color: #c0392b;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: help;
}

/* Styles for the new Bibliography Block */
.bibliography-block .quarto-block-output {
  padding: 1rem 1.5rem;
  background-color: #fdfdfd;
  font-family: var(--font-content); /* Use Source Serif Pro for content */
}

.bibliography-block h2 {
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-content); /* Use Source Serif Pro for headings */
  margin-top: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.bibliography-block ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bibliography-block li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #333;
  font-family: var(--font-content); /* Use Source Serif Pro for content */
}

.bibliography-block li a {
  color: #2980b9;
  text-decoration: none;
  font-weight: 500;
}

.bibliography-block li a:hover {
  text-decoration: underline;
}
