/* Page-specific teaching figures. SVG labels keep their size on narrow screens. */
body.ml-reader .lesson-full .ml03-diagram {
  max-width: 490px;
  margin-inline: auto;
}

.ml03-diagram > svg,
#diagram-reader-stage > svg.ml03-svg {
  color: var(--fg);
}

.ml03-box,
.ml03-highlight {
  fill: var(--quote-bg);
  stroke: var(--fg);
  stroke-width: 1.2;
}

.ml03-highlight {
  fill: var(--accent-soft);
  stroke-width: 1.8;
}

.ml03-fit {
  stroke: var(--link);
}

body.ml-reader .lesson-full .ml03-table table {
  table-layout: fixed;
  min-width: 0;
}

body.ml-reader .lesson-full .ml03-table :is(th, td) {
  min-width: 0;
  padding: .4rem .25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ml03-table caption {
  padding: .45rem 0;
  font-weight: 700;
  text-align: left;
}

body.ml-reader .lesson-full .ml03-flow {
  padding: 0;
  margin: 1.5rem 0;
}

.ml03-flow-title {
  padding-bottom: .35rem;
}

body.ml-reader .lesson-full .ml03-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 1rem;
  margin: .35rem 0 .75rem;
  padding-left: 1.55rem;
}

body.ml-reader .lesson-full .ml03-flow-two ol {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ml-reader .lesson-full .ml03-flow-fit ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.ml-reader .lesson-full .ml03-flow li {
  margin: 0;
  padding: .55rem 0;
  border-top: 1px solid var(--border);
}

.ml03-flow li > span {
  display: block;
}

body.ml-reader .lesson-full .ml03-flow figcaption {
  color: var(--muted);
  font-size: var(--ml-caption);
  text-align: left;
}

@media (max-width: 600px) {
  body.ml-reader .lesson-full :is(.ml03-flow, .ml03-flow-two, .ml03-flow-fit) ol {
    grid-template-columns: minmax(0, 1fr);
  }

  body.ml-reader .lesson-full .ml03-table :is(th, td) {
    font-size: .875rem;
  }
}
