.content-section h3 {
  color: #243763;
  font-weight: 700;
  border-bottom: 2px solid #848dc6;
  padding-bottom: 0.3rem;
  margin: 1.5rem 0 1rem 0;
}
 
 
/* ============================================================
   Overview icon buttons
   ============================================================ */
 
.model-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5rem;
  margin: 2rem 0;
}
 
.model-btn {
  display: block;
  flex: 0 0 auto;
  width: clamp(10rem, 22vw, 16rem);
  aspect-ratio: 1 / 1;          /* same square box for all three */
  transition: transform 0.2s ease;
}
 
.model-btn:hover { transform: translateY(-6px); }
 
.model-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  animation: wiggle 2.5s ease-in-out infinite;
}
 
@keyframes wiggle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
 
.model-btn:nth-child(1) img { animation-delay: 0s; }
.model-btn:nth-child(2) img { animation-delay: 0.4s; }
.model-btn:nth-child(3) img { animation-delay: 0.8s; }
 
@media (max-width: 768px) {
  .content-layout { flex-direction: column; }
  .model-toc { position: static; flex-basis: auto; width: 100%; }
}
 
 
/* ============================================================
   Figures
 
   NOTE: model.css previously carried a placeholder rule that
   matched any <img> whose src was not .png / .jpg / .svg. Once
   every image moved to .avif, that rule applied to every real
   figure — which is where the dashed purple border and grey-blue
   background came from. The placeholder is now an explicit class
   (.is-placeholder) so it cannot misfire on a format change.
   ============================================================ */
 
.model-figure {
  margin: 2rem auto;
  text-align: center;
}
 
.model-figure img {
  width: auto;
  max-width: min(100%, 46rem);
  height: auto;
  display: block;
  margin: 0 auto;
  border: none;
  background: transparent;
}
 
.model-figure figcaption {
  font-size: 0.85rem;
  font-style: italic;
  color: #5a6280;
  line-height: 1.5;
  margin-top: 0.6rem;
  text-align: left;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}
 
/* a figure holding two images side by side (e.g. forward vs inverted linkage) */
.model-figure:has(img + img) {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: flex-start;
}
 
.model-figure:has(img + img) img {
  flex: 1 1 20rem;
  max-width: calc(50% - 0.75rem);
}
 
.model-figure:has(img + img) figcaption {
  flex: 1 1 100%;
  margin-top: 0.2rem;
}
 
/* linker section: keep the four diagrams to one scale */
#m-linker .model-figure img {
  max-width: min(100%, 42rem);
}
 
#m-linker .model-figure:has(img + img) img {
  max-width: calc(50% - 0.75rem);
}
 
/* figures inside an accordion sit tighter */
.acc-body .model-figure { margin: 1.2rem 0 0.4rem; }
.acc-body .model-figure figcaption { font-size: 0.8rem; }
 
.figure-group-title {
  color: #243763;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #d9d9d9;
}
 
/* explicit placeholder — add class="is-placeholder" to an <img> awaiting art */
.model-figure img.is-placeholder {
  min-height: 12rem;
  border: 2px dashed #848dc6;
  background: #eef0f5;
}
 
/* standalone placeholder block */
.figure-placeholder {
  background: #eef0f5;
  border: 2px dashed #848dc6;
  color: #5a6280;
  padding: 2rem;
  text-align: center;
  font-style: italic;
  border-radius: 8px;
  margin: 1.5rem 0;
}
 
@media (max-width: 680px) {
  .model-figure:has(img + img) { display: block; }
  .model-figure:has(img + img) img {
    max-width: 100%;
    margin-bottom: 1rem;
  }
}
 
@media (max-width: 640px) {
  .model-figure figcaption { font-size: 0.78rem; }
}
 
 
/* ============================================================
   System diagrams (pipeline / attractor SVGs)
   ============================================================ */
 
.sys-figure {
  margin: 2rem 0 2.5rem;
  text-align: center;
}
 
.sys-figure svg,
.sys-figure img {
  width: 100%;
  max-width: 62rem;
  height: auto;
  display: block;
  margin: 0 auto;
  border: none;
  background: transparent;
}
 
/* let inline SVG labels inherit the page typeface */
.sys-diagram { font-family: inherit; }
 
.sys-figure figcaption {
  font-size: 0.85rem;
  font-style: italic;
  color: #4a5270;
  line-height: 1.55;
  margin-top: 0.9rem;
  text-align: left;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}
 
.sys-figure figcaption strong {
  font-style: normal;
  color: #141937;
}
 
@media (max-width: 720px) {
  .sys-figure { width: 100%; overflow: visible; }
  .sys-figure svg,
  .sys-figure img {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
  }
  .sys-figure figcaption { font-size: 0.8rem; }
}
 
 
/* ============================================================
   Accordion (matches the description page)
   ============================================================ */
 
.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; }
 
 
/* ============================================================
   Tables
   ============================================================ */
 
.model-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.4rem auto 0.6rem;
  display: flex;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}
 
.model-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.45;
  border: 1px solid #B0B0B0;
}
 
.model-table th,
.model-table td {
  border: 1px solid #D8D8D8;
  padding: 0.5rem 0.65rem;
  vertical-align: middle;
}
 
/* header row */
.model-table thead th {
  background: #0E5A6B;
  color: #FFFFFF;
  font-weight: 700;
  text-align: center;
  border-color: #0E5A6B;
}
 
.model-table thead th:first-child { text-align: left; }
 
/* first column = row labels */
.model-table tbody th {
  background: transparent;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}
 
/* data cells centred */
.model-table tbody td { text-align: center; }
 
/* zebra striping */
.model-table tbody tr:nth-child(even) th,
.model-table tbody tr:nth-child(even) td {
  background: #EAF2F4;
}
 
/* grouping band rows (Table 2) */
.model-table tr.group-row th {
  background: #D6E7EC;
  font-weight: 700;
  color: #0E5A6B;
  text-align: left;
}
 
/* reset striping inside the grouped table so the bands stay clean */
.model-table.grouped tbody tr:nth-child(even) th,
.model-table.grouped tbody tr:nth-child(even) td {
  background: transparent;
}
 
.model-table.grouped tbody tr.alt th,
.model-table.grouped tbody tr.alt td {
  background: #EAF2F4;
}
 
/* emphasis for winning values */
.model-table .best {
  font-weight: 700;
  color: #0E5A6B;
}
 
.model-table-caption {
  font-size: 0.85rem;
  font-style: italic;
  color: #5a6280;
  line-height: 1.5;
  margin-top: 0.6rem;
  text-align: left;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}
 
@media (max-width: 640px) {
  .model-table { font-size: 0.82rem; }
  .model-table th, .model-table td { padding: 0.4rem 0.45rem; }
}
 
 
/* ============================================================
   Display equations
   ============================================================ */
 
.eq {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 1.1rem 0 1.2rem;
}
 
.eq-body {
  font-family: "Cambria Math", Cambria, "Times New Roman", serif;
  font-size: 1.15rem;
  color: #243763;
  line-height: 1.6;
  padding: 0.55rem 1.4rem;
  white-space: nowrap;
}
 
.eq-body i   { font-style: italic; }
.eq-body sub { font-size: 0.72em; }
 
/* optional numbered equations */
.eq-num {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #6b7292;
}
 
@media (max-width: 560px) {
  .eq-body {
    font-size: 1rem;
    padding: 0.45rem 0.9rem;
    white-space: normal;
    text-align: center;
  }
}
 
 
/* ============================================================
   Four-condition quadrant (Pathways)
   ============================================================ */
 
.quad { margin: 2rem 0 2.5rem; }
 
.quad-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #141937;
  margin: 0 0 1rem;
}
 
.quad-grid {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
 
.quad-colhead {
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5270;
  text-align: center;
  padding-bottom: 0.2rem;
}
 
.quad-rowhead {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5270;
}
 
.quad-cell {
  background: #EFEEEA;
  border: 1.5px solid #B6C7D8;
  border-radius: 10px;
  padding: 0.9rem 1rem 1rem;
}
 
.quad-cell h5 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #141937;
}
 
.quad-cell p {
  margin: 0 0 0.3rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #3a4160;
}
 
.quad-cell .quad-readout {
  margin-top: 0.55rem;
  margin-bottom: 0;
  font-size: 0.83rem;
  color: #6b7292;
  font-style: italic;
}
 
/* the result quadrant */
.quad-cell.is-result {
  background: #DFEE87;
  border-color: #B9CC5E;
  border-width: 2px;
}
.quad-cell.is-result .quad-readout { color: #5c6b23; }
 
/* the undetermined quadrant */
.quad-cell.is-open {
  background: transparent;
  border-style: dashed;
  border-color: #848DC6;
}
 
.quad-caption {
  font-size: 0.85rem;
  font-style: italic;
  color: #4a5270;
  line-height: 1.55;
  margin: 1rem 0 0;
  max-width: 46rem;
}
 
@media (max-width: 680px) {
  .quad-grid { grid-template-columns: 1fr; }
  .quad-corner, .quad-colhead { display: none; }
  .quad-rowhead {
    margin-top: 0.6rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #e2e4ec;
  }
}
 
 
/* ============================================================
   Citations and reference list
   ============================================================ */
 
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: #ffffff;
  text-decoration: none;
}
 
a.cite:focus-visible {
  outline: 2px solid #141937;
  outline-offset: 1px;
}
 
.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;
}
 
.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;   /* clears a sticky header when jumped to */
  transition: background 0.4s ease;
  border-radius: 4px;
}
 
.ref-list .ref-num {
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #848DC6;
}
 
.ref-list em { font-style: italic; }
 
/* brief highlight on the entry you jumped to */
.ref-list li:target,
.ref-list li.is-flash {
  background: #DFEE87;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  padding-right: 0.5rem;
}
 
@media (max-width: 560px) {
  .ref-list li { padding-left: 2.4rem; font-size: 0.84rem; }
}
 
/* references as an accordion */
.ref-accordion { margin: 1rem 0 0; }
 
.ref-accordion .acc-item { border-bottom: none; }
 
.ref-accordion .acc-header {
  font-size: 1rem;
  color: #243763;
}
 
.ref-accordion .acc-body { padding-top: 0.4rem; }
 
/* the list can be long — cap it and scroll rather than push the page */
.ref-accordion .ref-list {
  max-height: 34rem;
  overflow-y: auto;
  padding-right: 0.6rem;
}
 
.ref-accordion .ref-list::-webkit-scrollbar { width: 8px; }
.ref-accordion .ref-list::-webkit-scrollbar-thumb {
  background: #c9cbdd;
  border-radius: 4px;
}
 
 
/* ============================================================
   Utilities
   ============================================================ */
 
/* visually-hidden caption for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
