/* Typographic system for raw chapter prose */

.swap-prose {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #353535;
  font-size: 16.5px;
  line-height: 1.7;
  text-wrap: pretty;
  max-width: 780px;
}

.swap-prose > :first-child { margin-top: 0; }

.swap-prose p {
  margin: 0 0 1em;
  color: #353535;
}

.swap-prose p strong,
.swap-prose li strong {
  color: #161618;
  font-weight: 700;
}

.swap-prose em { color: inherit; }

/* H2 (species name within a focal-species or threats section) */
.swap-prose h2 {
  font-size: 22px;
  font-weight: 700;
  color: #142D3E;
  margin: 2.2em 0 0.6em;
  line-height: 1.25;
  letter-spacing: -0.005em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #61C8AF;
  display: inline-block;
}

/* H3 (sub-heading like "Goals", "Threats") */
.swap-prose h3 {
  font-size: 16px;
  font-weight: 700;
  color: #277C78;
  margin: 1.6em 0 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* H4 (threat category e.g. "Residential & Commercial Development") */
.swap-prose h4 {
  font-size: 15px;
  font-weight: 700;
  color: #161618;
  margin: 1.4em 0 0.3em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.swap-prose h4::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #AE5400;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Lists */
.swap-prose ul,
.swap-prose ol {
  margin: 0.2em 0 1em;
  padding-left: 1.4em;
}

.swap-prose ul li,
.swap-prose ol li {
  margin-bottom: 0.4em;
  padding-left: 0.2em;
}

.swap-prose ul { list-style: none; padding-left: 0; }
.swap-prose ul > li {
  position: relative;
  padding-left: 1.4em;
}
.swap-prose ul > li::before {
  content: '';
  position: absolute;
  left: 0.25em;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: #277C78;
  border-radius: 50%;
}
.swap-prose ul ul > li::before {
  background: transparent;
  border: 1.5px solid #277C78;
}
.swap-prose ul ul { padding-left: 1.2em; margin-top: 0.3em; }

.swap-prose ol { list-style: decimal; padding-left: 1.6em; }
.swap-prose ol li::marker {
  color: #277C78;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.swap-prose ol ol { list-style: lower-alpha; }

/* Tables */
.swap-prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 14px;
  border: 1px solid #D0D0D0;
  background: #fff;
}
.swap-prose table td,
.swap-prose table th {
  padding: 12px 14px;
  border-bottom: 1px solid #EAEAEA;
  border-right: 1px solid #EAEAEA;
  vertical-align: top;
  text-align: left;
}
.swap-prose table tr:first-child td {
  background: #F7F7F7;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #353535;
  border-bottom: 2px solid #277C78;
}
.swap-prose table tr:first-child td p {
  margin: 0;
  font-weight: 700;
}
.swap-prose table td p { margin: 0 0 0.4em; }
.swap-prose table td p:last-child { margin-bottom: 0; }

/* Figures */
.swap-prose figure {
  margin: 1.8em 0;
  padding: 16px;
  background: #F7F7F7;
  border: 1px solid #D0D0D0;
  border-radius: 8px;
  max-width: 100%;
}
.swap-prose figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 4px;
  background: #fff;
}
.swap-prose figure figcaption {
  font-size: 13px;
  line-height: 1.5;
  color: #707070;
  margin-top: 10px;
  font-style: italic;
}

/* Links */
.swap-prose a {
  color: #277C78;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.swap-prose a:hover { color: #142D3E; }

/* Refs / Literature Cited list */
.swap-references p {
  margin: 0 0 0.9em;
  break-inside: avoid;
  font-size: 13px;
  line-height: 1.55;
  padding-left: 1.2em;
  text-indent: -1.2em;
}
.swap-references p strong { color: #161618; }

/* Responsive */
@media (max-width: 920px) {
  .swap-prose {
    font-size: 16px;
  }
  .swap-references {
    column-count: 1 !important;
  }
}
