/* Series and Convergence: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css).
   The colour mechanism is katex-macros.json, one macro per meaning of planning/colour.md:
     \tm  blue    the terms aₙ (and a general term, its pieces when one term is rewritten, the steps between partial sums)
     \ps  pink    the partial sums Sₙ, S_N and their values
     \fa  violet  a, the first term of a geometric series, where the work reads it as a
     \rr  orange  r, the ratio, and its powers
     \sv  green   the survivors of a telescoping partial sum, and their limits
     \cx  mute    a cancelled piece, struck
   Answers, the gap 1/2ⁿ, bounds and routine arithmetic stay ink. */

/* A chain that reads one move per line on a phone: a wide and a narrow copy of the same maths, one shown per width. */
:root[data-alive-ui] body main.col .scv-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .scv-wide{display:none}
  :root[data-alive-ui] body main.col .scv-narrow{display:block}
}

/* A figure beside its rows is drawn at its own size (360 px, so its 15–16 px labels stay readable); the rows take the rest.
   The shared pair splits the card .9 : 1.1, which drew these number lines and bars at 73%. */
@media (min-width:641px){
  :root[data-alive-ui] body main.col .look-pair{grid-template-columns:auto minmax(0,1fr)}
  /* the harmonic blocks' rows are as wide as the room beside their bars, so the bars sit above them */
  :root[data-alive-ui] body main.col .look-pair.scv-stack{grid-template-columns:minmax(0,1fr);justify-items:center;row-gap:14px}
}

/* A row that keeps its label (the series and the improper integral it mirrors; the terms and the partial sums): the label
   beside the maths, so the two rows read as a pair; above it on a phone. */
:root[data-alive-ui] body main.col .look-card .row:has(>.row-label){display:grid;grid-template-columns:180px minmax(0,1fr);column-gap:18px;align-items:center}
:root[data-alive-ui] body main.col .look-card .row>.row-label{min-width:0;width:auto;margin:0}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-card .row:has(>.row-label){grid-template-columns:1fr;row-gap:4px}
}
