body {
  font-family: 'Helvetica', sans-serif;
  margin: 2em;
  background-color: #fafafa;
  line-height: 1.6;
  color: #333;
}

h1, h2 {
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3em;
}

h2 {
  font-weight: normal;
}

h3 {
  font-weight: bold;
  font-size: 1.2em;
  /*  border-bottom: 1px solid #ddd;  */
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

table img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Colour header row of tables light gray  */
table thead tr {
    background-color: #f0f0f0;
    font-weight: bold
}

/* Colour the averages row in tables light pink */
.average-row {
    background-color: #fae6e6;
}

/* Colour the figures row in tables light blue */
.figures-row {
    background-color: #e6f0fa;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5em 1em;
  text-align: center;
  vertical-align: middle;
}

img.plot {
  display: block;
  margin: 2em auto;
  max-width: 100%;
}

/* For notes text (put it in red) */
.notes {
  color: red;
}

/* Stuff for the drop-down menus */
/* Hide browser default marker */
/* Base nested dropdown styling */
/* Shared styling for all dropdowns */
details {
  margin-bottom: 1em;
}

details summary {
  list-style: none;
  cursor: pointer;
  font-weight: normal;
  font-size: 1.5em;
  padding-left: 1.2em;
  position: relative;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3em;
}

details summary::-webkit-details-marker {
  display: none;
}
details summary::marker {
  display: none;
}

/* Custom arrow */
details summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0.25em;
  font-size: 0.8em;
  font-family: Arial, sans-serif;
  transition: transform 0.2s ease-in-out;
}

details[open] > summary::before {
  content: "▼";
  font-size: 0.8em;
  font-family: Arial, sans-serif;
}

details summary::after {
  content: "(click to expand)";
  font-size: 0.6em;
  color: #888888;
  margin-left: 0.9em;
  display: inline-block;
}

details[open] > summary::after {
  content: "(click to collapse)";
}

details div {
  padding-left: 1.5em;
  padding-top: 1.0em;
}

/* Make nested sections visually distinct */
details details summary {
    font-size: 1.2em;
}

details details details summary {
    font-size: 1em;
}


/* For the header link */
.header-link {
    color: black;
    text-decoration: underline;
    cursor: default;
    transition: color 0.3s ease;
}

.header-link:hover {
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

/* For the overview plots */
.container {
    display: flex;
    gap: 1em;
    flex-wrap: wrap; /* Allows wrapping on small screens */
    justify-content: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1.3em;
    padding-top: 1.3em;
}

.block {
    background: white;
    border: 1px solid #ddd;
    padding: 1em;
    width: 24%; /* About 4 blocks side-by-side with gap */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
}

  /* Center the LaTeX title */
.latex-title {
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.2em;
    margin-bottom: 0.1em;
    text-align: center;
    line-height: 1.2;
}

/* Center images */
.plot {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.1em;
}

/* Center links container */
.links {
    text-align: center;
}

.links a {
    margin: 0 0.5em;
    color: #007bff;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* Responsive: stack blocks on narrow screens */
@media (max-width: 768px) {
    .block {
        width: 100%;
        margin-bottom: 1.5em;
    }
}

