/* Draft notice and HTML layout/TOC overrides for race-and-ancestry.qmd */
.quarto-title-block .title,
.quarto-title .title,
.quarto-title h1.title,
header .title {
  font-weight: 700;
  color: #1a1a1a;
}
/* Quarto appends "Other Formats" after the TOC list; move PDF link under the TOC heading */
#TOC {
  display: flex;
  flex-direction: column;
}
#TOC #toc-title {
  order: 1;
  margin-left: 0;
  padding-left: 0;
}
#TOC .quarto-alternate-formats {
  order: 2;
  padding-left: 1rem;
}
#TOC .quarto-alternate-formats > h2 {
  margin-left: 0;
  padding-left: 0;
}
#TOC > ul {
  order: 3;
}
/* In-column TOC (#TOC-body): no list bullets (margin sidebar uses #TOC) */
#TOC ul,
#TOC-body ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}
/* ### nest under each ## section.
   Default (our shared rule before split): 1.1rem on both TOCs.
   Margin sidebar only: reduced so long ### / #### titles fit the narrow column. */
#TOC ul ul {
  padding-left: 0.65rem;
}
#TOC-body ul ul {
  padding-left: 1.1rem;
}
/* h4 (4th-level headings): smaller type; body TOC uses a slightly darker blue at small size */
/* Body TOC: #### nest — unchanged from original 0.85rem */
#TOC-body ul ul ul {
  padding-left: 0.85rem;
}
#TOC-body a,
#TOC-body a:link,
#TOC-body a:visited {
  font-weight: 400;
  color: var(--bs-link-color, #3498db);
}
#TOC ul ul ul a {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.35;
  display: block;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
}
/* Quarto Bootstrap theme sets link padding-left on margin-sidebar TOC entries
   (.sidebar nav[role=doc-toc] ul>li>ul>li>a and …>ul>li>ul>li>a), not on nested <ul>.
   Defaults: ### 1.2em, #### 2.4em. Reduced here so #### titles (e.g. 3.12.1) fit one line;
   #TOC-body is unchanged. */
#quarto-margin-sidebar #TOC ul ul a {
  padding-left: 0.9em;
}
#quarto-margin-sidebar #TOC ul ul ul a {
  padding-left: 1.3em;
}
#TOC-body ul ul ul a {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.35;
  display: block;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  color: color-mix(in srgb, var(--bs-link-color, #3498db) 80%, #000);
}
#TOC-body ul ul ul a:link,
#TOC-body ul ul ul a:visited {
  color: color-mix(in srgb, var(--bs-link-color, #3498db) 80%, #000);
}
#TOC-body ul ul ul a:hover {
  color: color-mix(
    in srgb,
    var(--bs-link-hover-color, var(--bs-link-color, #3498db)) 85%,
    #000
  );
}
#TOC ul ul ul li,
#TOC-body ul ul ul li {
  margin: 0.05rem 0;
}
/* Body TOC: no max-height scroll (re-enable in #TOC-body if the list feels too long). */
#TOC-body {
  /* max-height: min(70vh, 42rem); */
  /*overflow-y: auto; */
  padding-right: 0.25rem;
}
#quarto-document-content {
  --first-section-pad-after: 3rem;
  --first-section-margin-after: 1.5rem;
  --first-section-margin-top: 1.25rem;
  --first-section-gap-after-toc: calc(
    var(--first-section-pad-after) + var(--first-section-margin-after) + var(--first-section-margin-top)
  );
}
#quarto-document-content > #TOC-body {
  padding-bottom: 0;
  margin-bottom: 0;
}
#quarto-document-content > #TOC-body + section.level2 {
  margin-top: var(--first-section-gap-after-toc);
}
#quarto-document-content > section.level2 + section.level2 {
  margin-top: 5rem;
}

.race-draft-notice {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid #856404;
  background: #fff8e6;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.race-draft-notice p {
  margin: 0 0 0.75rem 0;
}

.race-draft-notice p:last-child {
  margin-bottom: 0;
}

/* Word custom-style "default-red" (via filters/default-red.lua) */
.default-red {
  color: #ff0000;
}

/* Bootstrap article theme grays out .header-section-number; inherit heading/link style. */
#quarto-document-content .header-section-number {
  color: inherit;
  font-weight: inherit;
}

#TOC .header-section-number,
#TOC-body .header-section-number {
  color: inherit;
  font-weight: inherit;
}

/* Quarto default: table captions above (caption-top). race-and-ancestry.qmd sets
   tbl-cap-location: bottom; this flex order is a fallback when caption-top is still emitted. */
.quarto-float-tbl figure.quarto-float-tbl {
  display: flex;
  flex-direction: column;
}

.quarto-float-tbl .quarto-float-caption-top {
  order: 2;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.quarto-float-tbl > div[aria-describedby],
.quarto-float-tbl > table {
  order: 1;
}
