main { line-height:1.85; } main img { max-width:100%; } main figure { margin: 1.5em auto; text-align:center; } main figure img { max-width:360px; } main figure.wide img { max-width:620px; } figcaption { font-size:.9em; opacity:.8; } main table { font-size:.93em; } .boards { display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; } .boards figure { flex:1 1 200px; margin:0; } .boards img { width:100%; max-width:280px; } details { margin:1em 0; padding:.6em 1em; border:1px solid var(--table-border-color); }
.model-strip{display:flex;align-items:center;gap:.6rem;margin:1.4rem 0}.model-strip div{flex:1;border:1px solid #b9c9c0;border-radius:6px;padding:.8rem;text-align:center;min-width:0}.model-strip small{display:block;font-size:.82em;opacity:.8}.model-strip span{font-size:1.2em}@media(max-width:500px){.model-strip{flex-direction:column;align-items:stretch}.model-strip span{text-align:center;transform:rotate(90deg)}}

/* Initial board and solution, wrapping to fit the reading column. */
main .problem-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem;
  margin: 1rem 0 1.5rem;
}
main .problem-layout section:first-child { flex: 0 1 var(--board-size); max-width: 100%; }
main .problem-layout section:last-child { flex: 1 1 14rem; min-width: 0; }
main .problem-layout h2 { margin: 0; }
main .problem-layout figure { margin: .65rem 0 0; }
main .problem-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .8rem;
}

/* All individual board diagrams share one size, regardless of layout. */
main { --board-size: 240px; }
main figure.board img {
  display: block;
  width: var(--board-size);
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
main .boards { justify-content: center; }
main .boards figure.board {
  flex: 0 0 var(--board-size);
  max-width: 100%;
  min-width: 0;
}
/* A line is read left to right and wraps onto the next row. */
main .move-sequence {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
  list-style: none;
  padding: 0;
  gap: .8rem 1rem;
  margin: 1rem 0;
}
main .move-sequence > li { min-width: 0; }
main .move-sequence figure { margin: 0; }
main .move-sequence figcaption span {
  display: block;
  color: var(--fg);
  font-weight: 600;
}
