p {
  text-align: justify;
}
body {
  font-size: 0.92em;
}

/* figure captions */
.figure p.caption {
  font-size: 0.85em;
}
.figcap p {
  font-size: 0.85em;
  text-align: left;
}

/* table captions to the top */
caption {
  caption-side: top;
}

.rmdnote2 {
  border: 1px solid #002B4D;
  border-left-width: 5px;
  border-radius: 5px;
  padding: 1em;
  margin: 1em 0;
  background-color: rgba(0, 43, 77, 0.04);
}
div.rmdnote2::before {
  display: block;
  content: "Note: ";
  color: #002B4D;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 0.25em;
}

.rmdsummary {
  border: 1px solid #4A90D9;
  border-left-width: 5px;
  border-radius: 5px;
  padding: 1em;
  margin: 1em 0;
  background-color: #EDF4FB;
  font-size: 0.9em;
}
div.rmdsummary::before {
  display: block;
  content: "Quick Summary";
  color: #4A90D9;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 0.25em;
}

/* Better figure styling */
.figure {
  text-align: center;
  margin: 2rem auto;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.figure p.caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-style: italic;
  color: #495057;
  text-align: left;
  padding: 0 1rem;
}

/* Force center alignment for preface */
#preface div[style*="text-align: center"] {
  text-align: center !important;
  display: block !important;
}

#preface p {
  text-align: center !important;
}

#preface {
  border-bottom: none;
}

#preface h1 {
  border-bottom: none;
  text-align: center;
  color: #002B4D;
}
