/* Sequences: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css), through the
   macros in katex-macros.json: \sg pink (the sign), \bd blue (what holds the terms in: size, walls, gap, ceiling),
   \mlt green (the multiplier r and the factors), \fx orange (the function of x), \fst violet (the fastest-growing term).
   The meanings are planning/colour.md's. */

/* a figure beside its rows, drawn at its own size: the shared pair gives the figure .9fr of the card, which drew these
   360 px dot graphs at about 80% with their labels; here the figure takes its own width and the rows the rest */
:root[data-alive-ui] body main.col .look-pair.sq-pair{grid-template-columns:auto minmax(0,1fr)}

/* a figure over its rows, where the rows need the card's width: the two sign figures of section 4, the same layout for
   both so that only the size changes between them */
:root[data-alive-ui] body main.col .look-card.sq-stack>figure.diagram{margin:0 auto 14px}
:root[data-alive-ui] body main.col .look-card.sq-stack .math-chain{justify-content:center}

/* a figure inside a card or a case is drawn at its own size, centred (the shared .diagram>svg would stretch it) */
:root[data-alive-ui] body main.col :is(.look-card,.look-case)>figure.diagram{margin:16px auto 0;width:100%;max-width:none;display:flex;justify-content:center}
:root[data-alive-ui] body main.col :is(.look-card,.look-case)>figure.diagram>svg{width:auto;max-width:100%;height:auto;display:block;margin:0 auto}
:root[data-alive-ui] body main.col .look-case>figure.diagram{margin:0 auto 12px}

/* the two ways to diverge: each case is its picture with its list under it, centred */
:root[data-alive-ui] body main.col .sq-cases .look-a .math-chain{justify-content:center}

/* the result a chain arrives at sits a little apart from the steps that reach it */
:root[data-alive-ui] body main.col :is(.look-rows,.look-card)>.row.sq-result,:root[data-alive-ui] body main.col .look-case>.look-a.sq-result{margin-top:18px}

/* two goals one after the other read as a pair, not as two parts of the section */
:root[data-alive-ui] body main.col .look-goal.sq-goal2+.look-goal.sq-goal2{margin-top:-10px}

/* a single line of maths a sentence arrives at: displayed and centred, not a card (one equation is not a block) */
:root[data-alive-ui] body main.col .sq-line{margin:18px 0 22px}
:root[data-alive-ui] body main.col .sq-line .math-chain{justify-content:center;margin:0}
:root[data-alive-ui] body main.col .sq-line .katex{font-size:1.1em}

/* the six powers of r in pairs, each r over its negative, so a pair is one size with and without the sign; on a phone
   the verdict takes its own line */
:root[data-alive-ui] body main.col .sq-rtable .math-chain{justify-content:center}

/* a row of short facts that wrap as wholes; a verdict ("diverges") and the steps of a passed-on bound sit closer */
:root[data-alive-ui] body main.col .row.sq-items{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:44px;row-gap:6px}
:root[data-alive-ui] body main.col .row.sq-items.sq-verdict{column-gap:18px}
:root[data-alive-ui] body main.col .row.sq-items.sq-steps{column-gap:10px}
:root[data-alive-ui] body main.col .row.sq-items>*{margin:0}

/* Key concepts: the r line over its rule */
:root[data-alive-ui] body main.col .sq-kfig{margin:0 auto 12px;display:flex;justify-content:center}
:root[data-alive-ui] body main.col .sq-kfig>svg{width:auto;max-width:100%;height:auto;display:block;margin:0 auto}

/* a chain drawn twice: two "=" to a line on a wide screen, one on a phone */
:root[data-alive-ui] body main.col .sq-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .sq-wide{display:none}
  :root[data-alive-ui] body main.col .sq-narrow{display:block}
  :root[data-alive-ui] body main.col .look-pair.sq-pair{grid-template-columns:1fr}
}

/* the answer's own label (aₙ =) at the size of the statement's maths */
:root[data-alive-ui] body main.col .prob .answer-fields label>.katex{font-size:1.15em}
