/* ============================================================
   MODEL PAGE  —  static/model.css

   Only what the Model page needs on top of rail.css.
   Three heading levels: h2 chapters (rail.css), h3 numbered
   subsections, h4 the steps inside a module.
   ============================================================ */

/* ---------- subsections ---------- */
.ir-main h3 {
  font-size: clamp(20px, 2.1vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin: 56px 0 1.1rem;
}

/* ---------- steps inside a subsection ---------- */
.ir-main h4 {
  font-size: 19.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ir-accent);
  margin: 46px 0 .8rem;
}

/* ---------- the three modules ---------- */
.mo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0 40px;
}
.mo-card {
  background: var(--deep-purple, #190F4F);
  border-radius: 18px;
  padding: 26px 24px 24px;
}
.ir-main .mo-card h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--purple-100, #E4CAFF);
}
.ir-main .mo-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  text-align: left;
  color: #EDE9FF;
}
.ir-main .mo-card strong { color: #FFFFFF; }
:root[data-theme="dark"] .mo-card {
  background: #241B63;
  border: 1px solid rgba(199, 161, 239, .22);
}
@media (max-width: 900px) {
  .mo-cards { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- a result that changed the wet lab ---------- */
.ir-main .mo-impact {
  margin: 36px 0 0;
  padding: 20px 26px;
  border-left: 4px solid var(--ir-accent);
  border-radius: 0 14px 14px 0;
  background: color-mix(in srgb, var(--ir-accent) 9%, transparent);
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  text-align: left;
}

/* ---------- the four questions ---------- */
.mo-questions {
  position: relative;
  list-style: none;
  margin: 30px 0 34px;
  padding-left: 34px;
}
.mo-questions::before {
  content: "";
  position: absolute;
  left: 7px; top: 10px; bottom: 10px;
  width: 2px; border-radius: 2px;
  background: var(--ir-line);
}
.mo-questions li { position: relative; margin-bottom: 26px; }
.mo-questions li:last-child { margin-bottom: 0; }
.mo-questions li::before {
  content: "";
  position: absolute;
  left: -31px; top: .55em;
  width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%;
  background: var(--ir-hole);
  box-shadow: 0 0 0 2px var(--ir-accent);
}
.mo-questions .n {
  display: block;
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ir-accent);
  margin-bottom: 3px;
}
.mo-questions .q { font-size: 17.5px; line-height: 1.5; }

/* ---------- two-panel schematic ---------- */
.mo-schema { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mo-panel {
  border-radius: 16px;
  padding: 18px 18px 12px;
  background: color-mix(in srgb, var(--ir-accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--ir-accent) 16%, transparent);
}
.ir-main .mo-panel-label {
  font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ir-accent); margin: 0 0 12px; text-align: left;
}
.mo-panel svg { display: block; width: 100%; height: auto; }
.mo-node  { fill: var(--ir-hole); stroke: var(--ir-accent); stroke-width: 1.8; }
.mo-name  { fill: currentColor; font-size: 15px; font-weight: 700; }
.mo-sub   { fill: currentColor; opacity: .55; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; }
.mo-flow  { stroke: currentColor; stroke-width: 1.8; fill: none; opacity: .7; }
.mo-fb    { stroke: var(--ir-accent); stroke-width: 1.8; fill: none; }
@media (max-width: 900px) { .mo-schema { grid-template-columns: 1fr; } }


/* ---------- collapsible methods panel ---------- */
.mo-drop {
  border-radius: 14px;
  overflow: hidden;
  margin: 26px 0;
  background: color-mix(in srgb, var(--ir-accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--ir-accent) 18%, transparent);
}
.mo-drop + .mo-drop { margin-top: 14px; }

.mo-drop summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 15px 48px 15px 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ir-accent);
}
.mo-drop summary::-webkit-details-marker { display: none; }
.mo-drop summary::after {
  content: "";
  position: absolute;
  right: 22px; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.mo-drop[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.mo-drop summary:focus-visible { outline: 2px solid var(--ir-accent); outline-offset: -4px; }

.mo-drop-body { padding: 4px 20px 18px; }
.ir-main .mo-drop-body > :last-child { margin-bottom: 0; }

/* ---------- equations ---------- */
.mo-eq {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ir-accent) 7%, transparent);
  font-size: 16px;
  line-height: 2.1;
  overflow-x: auto;
  text-align: left;
}
.mo-eq i { font-style: italic; }
.mo-eq sub, .mo-eq sup { font-style: normal; }

.mo-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  text-align: center;
  margin: 0 .2em;
  line-height: 1.25;
}
.mo-frac .num { border-bottom: 1px solid currentColor; padding: 0 .35em .12em; }
.mo-frac .den { padding: .12em .35em 0; }

.ir-main .mo-src {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  opacity: .7;
  text-align: left;
}

/* ---------- parameter tables ---------- */
.mo-tablewrap {
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}
.mo-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}
.mo-table th {
  text-align: left;
  vertical-align: bottom;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ir-accent);
  padding: 0 16px 10px 0;
  border-bottom: 2px solid color-mix(in srgb, var(--ir-accent) 35%, transparent);
}
.mo-table td {
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--ir-line);
  vertical-align: top;
  line-height: 1.5;
}
.mo-table th:last-child, .mo-table td:last-child { padding-right: 0; }
.mo-table .mo-sym { font-weight: 700; white-space: nowrap; }
.mo-table .mo-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mo-table .mo-unit { white-space: nowrap; opacity: .8; }
.mo-table.mo-wrap .mo-sym { white-space: normal; }
/* ---------- a figure not made yet ---------- */
.mo-fig-ph {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 30px 24px;
  border-radius: 14px;
  border: 2px dashed color-mix(in srgb, var(--ir-accent) 38%, transparent);
  background: color-mix(in srgb, var(--ir-accent) 4%, transparent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.6;
  text-align: center;
  color: var(--ir-accent);
}


/* ---------- references ---------- */

/* ---------- references sub-list label ---------- */
.ir-main .mo-reflabel {
  margin: 26px 0 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ir-accent);
}

/* ---------- plots carry their own frame ---------- */
.ir-fig .mo-plot {
  display: grid;
  justify-items: center;
}
.ir-fig .mo-plot img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
}
.ir-fig .mo-plot.mo-narrow img { max-width: min(100%, 760px); }

/* ---------- fourth level, inside a step ---------- */
.ir-main h5 {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.4;
  margin: 28px 0 .6rem;
}

/* ============================================================
   ADD TO static/model.css
   Decisive-measurement rows for the Future steps chapter.
   ============================================================ */

.mo-reqs {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  counter-reset: req;
}
.mo-reqs > li {
  counter-increment: req;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0 40px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--ir-line);
}
.mo-reqs > li:last-child { border-bottom: 1px solid var(--ir-line); }

/* ---- the number that makes the requirement scannable ---- */
.mo-req-figure { position: relative; padding-top: 2px; }
.mo-req-figure::before {
  content: counter(req, decimal-leading-zero);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--ir-accent);
  opacity: .55;
  margin-bottom: 10px;
}
.ir-main .mo-req-num {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ir-accent);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.ir-main .mo-req-unit {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  line-height: 1.45;
  opacity: .62;
  text-align: left;
}

/* ---- the requirement itself ---- */
.ir-main .mo-reqs h4 {
  margin: 0 0 .7rem;
  font-size: 18.5px;
  font-weight: 800;
  line-height: 1.3;
  color: inherit;
  text-wrap: balance;
}
.ir-main .mo-req-body > p { margin-bottom: 0; }

.ir-main .mo-req-from {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  opacity: .7;
  text-align: left;
}
.ir-main .mo-req-from a { font-weight: 700; }

@media (max-width: 760px) {
  .mo-reqs > li { grid-template-columns: 1fr; gap: 16px 0; padding: 26px 0; }
  .mo-req-figure { display: flex; align-items: baseline; gap: 12px; }
  .mo-req-figure::before { margin-bottom: 0; }
  .ir-main .mo-req-num { font-size: 28px; }
  .ir-main .mo-req-unit { margin: 0; }
}

.mo-eq .mo-rates {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 .35em;
  font-size: .82em;
  line-height: 1.15;
}

.ir-main { counter-reset: eq; }
.mo-eq {
  position: relative;
  counter-increment: eq;
  padding-right: 60px;
}
.mo-eq::after {
  content: "(" counter(eq) ")";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  opacity: .55;
  font-variant-numeric: tabular-nums;
}