/* Endfield doc custom styles.
 * Uses mdBook theme CSS variables so text/background follow the active theme;
 * no global resets here (those previously broke dark-theme readability). */

/* Colored status marks (kept legible on both light and dark themes). */
.mark-red,
.mark-rose_red { color: #e5484d; }
.mark-orange { color: #e5810a; }
.mark-yellow { color: #d8a200; }
.mark-green { color: #2f9e68; }
.mark-blue { color: #3b82f6; }
.mark-purple { color: #8e4ec6; }
.mark-grey { color: #8b8d98; }

.callout {
  margin: 1rem 0;
  padding: .6rem 1rem;
  border: 1px solid var(--table-border-color, rgba(127, 127, 127, .35));
  border-left: 4px solid var(--links, #2b79a2);
  border-radius: 6px;
  background: var(--quote-bg, rgba(127, 127, 127, .08));
}

details {
  margin: 1rem 0;
  padding: .35rem .75rem;
  border: 1px solid var(--table-border-color, rgba(127, 127, 127, .35));
  border-radius: 6px;
}

details > summary {
  cursor: pointer;
  font-weight: 600;
}

.content img {
  max-width: 100%;
  height: auto;
}

/* Source document has no section numbering: hide mdBook's auto numbers. */
#mdbook-sidebar strong[aria-hidden="true"] {
  display: none;
}

/* Collapsible page tree. */
#mdbook-sidebar li.chapter-item:not(.expanded) > ol.section {
  display: none;
}
#mdbook-sidebar .chapter-link-wrapper {
  position: relative;
}
/* Reserve the same indent on every chapter row so expandable and
 * non-expandable entries line up (the triangle is taken out of flow). */
#mdbook-sidebar li.chapter-item > .chapter-link-wrapper {
  padding-left: 1.15em;
}
#mdbook-sidebar .page-fold {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.15em;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .7;
  user-select: none;
}
#mdbook-sidebar .page-fold::before {
  content: "\25B8"; /* ▸ */
}
#mdbook-sidebar li.chapter-item.expanded > .chapter-link-wrapper > .page-fold::before {
  content: "\25BE"; /* ▾ */
}
#mdbook-sidebar .page-fold:hover {
  opacity: 1;
}
