.stat-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1.5rem;
  padding: 1rem 0;
  margin: 2rem 0;
}
 
/* every slide shares one cell */
.stat-slide {
  grid-row: 1;
  grid-column: 1;
  display: flex;             /* was display: none */
  align-items: center;
  gap: 2.5rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
 
.stat-slide.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
 
/* controls sit in their own row, so they never move */
.stat-controls {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0;
}
 
/* ---- figure: one box for every chart ----
   The five charts differ in aspect ratio. Capping the height and
   using object-fit keeps them inside the same box without stretching
   any of them. Adjust the two values together if you want it larger. */
.stat-figure {
  flex: 1 1 70%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.stat-figure img {
  width: 100%;
  height: auto;
  max-height: 26rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
 
/* ---- text column ---- */
.stat-text {
  flex: 1 1 30%;
  text-align: right;
  align-self: center;
}
 
.stat-title {
  color: #141937;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin-bottom: 0.75rem;
}
 
.stat-text p {
  color: #243763;
  line-height: 1.6;
  margin: 0;
}
 
/* ---- controls ---- */
.stat-counter { color: #848dc6; font-weight: 700; }
 
.stat-arrow {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: #848dc6;
  color: #fcfcf3;
  font-size: 1.2rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
 
.stat-arrow:hover { opacity: 0.85; }
.stat-arrow:disabled { opacity: 0.3; cursor: default; }
 
/* ---- phones: stack, and let the box grow with the text ---- */
@media (max-width: 768px) {
  .stat-slide {
    flex-direction: column;
    gap: 1.25rem;
  }
  .stat-text { text-align: left; }
  .stat-figure img { max-height: 18rem; }
  .stat-controls { justify-content: center; }
}
 
@media (prefers-reduced-motion: reduce) {
  .stat-slide { transition: none; }
}
 
 .subtype-diagram { margin: 2rem 0; }
 .subtype-diagram img { width: 100%; height: auto; display: block; }
 
 /* Accordion of subtypes */
 .accordion { margin: 2rem 0; }
 .acc-item { border-bottom: 1px solid #d9d9d9; }
 .acc-header {
   width: 100%;
   text-align: left;
   background: none;
   border: none;
   padding: 1rem 2rem 1rem 0;
   font-size: 1.1rem;
   font-weight: 700;
   color: #141937;
   cursor: pointer;
   position: relative;
 }
 .acc-header::after {
   content: "+";
   position: absolute;
   right: 0.5rem;
   color: #848dc6;
   font-weight: 700;
 }
 .acc-header.is-open::after { content: "−"; }
 .acc-header:hover { color: #848dc6; }
 .acc-body {
   display: none;
   padding: 0 0 1.25rem 0;
   color: #243763;
   line-height: 1.6;
 }
 .acc-body.is-open { display: block; }
 .acc-sublist { margin-top: 0.75rem; }
 .acc-sublist li { margin-bottom: 0.5rem; }
/* ===== Added for the completed Description page ===== */
 
/* a conclusion or key framing pulled out of the surrounding prose */
.desc-note {
  background: #f6f7fc;
  border-left: 4px solid #848dc6;
  border-radius: 0 8px 8px 0;
  padding: 0.95rem 1.15rem;
  margin: 1.4rem 0;
  line-height: 1.6;
  color: #243763;
  max-width: 46rem;
}
.desc-note strong { color: #141937; }
 
/* figures */
.model-figure { margin: 2rem 0; text-align: center; }
.model-figure img { width: 100%; max-width: 46rem; height: auto; display: block; margin: 0 auto; }
.model-figure figcaption {
  font-size: 0.85rem; font-style: italic; color: #5a6280;
  line-height: 1.55; margin-top: 0.7rem; text-align: left;
  max-width: 46rem; margin-left: auto; margin-right: auto;
}
 
/* in-text citations */
a.cite {
  color: #848DC6; font-weight: 700; text-decoration: none;
  padding: 0 0.05em; border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease;
}
a.cite:hover, a.cite:focus { background: #848DC6; color: #fff; text-decoration: none; }
 
/* reference list */
.ref-note { font-size: 0.85rem; font-style: italic; color: #6b7292; margin: 0 0 1.1rem; }
.ref-list { list-style: none; padding: 0; margin: 0; max-height: 34rem; overflow-y: auto; padding-right: 0.6rem; }
.ref-list li {
  position: relative; padding-left: 3rem; margin-bottom: 0.7rem;
  font-size: 0.88rem; line-height: 1.55; color: #3a4160;
  scroll-margin-top: 6rem; border-radius: 4px; transition: background 0.4s ease;
}
.ref-list .ref-num { position: absolute; left: 0; font-weight: 700; color: #848DC6; }
.ref-list li:target, .ref-list li.is-flash {
  background: #DFEE87; padding-top: 0.35rem; padding-bottom: 0.35rem; padding-right: 0.5rem;
}
.ref-accordion .acc-item { border-bottom: none; }
 
@media (max-width: 560px) {
  .ref-list li { padding-left: 2.4rem; font-size: 0.84rem; }
  .desc-note { padding: 0.8rem 0.95rem; }
}
 
