/* Infinite Limits: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css).
   Colour meanings (planning/colour.md), as KaTeX macros in katex-macros.json: \tp the top of the fraction (blue),
   \bt the bottom, its nonzero factors and the divisor (green), \zr whatever goes to 0 (pink), \gph the graph (violet),
   \ra the root A in ∞ − ∞ (orange, section 6 only), \gd a guide (mute). */

/* A chain with its own break for a phone: the same maths twice, one shown per width, so nothing wraps mid-move. The
   two wide figures (fig-1's pair, fig-3's two windows) have a stacked phone version the same way: side by side they
   are wider than a phone's column, and shrinking them would shrink their labels. */
:root[data-alive-ui] body main.col .il-narrow{display:none}
:root[data-alive-ui] body main.col figure.diagram>svg.il-fig-phone{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .il-wide{display:none}
  :root[data-alive-ui] body main.col .il-narrow{display:block}
  :root[data-alive-ui] body main.col figure.diagram>svg.il-fig-wide{display:none}
  :root[data-alive-ui] body main.col figure.diagram>svg.il-fig-phone{display:block}
}

/* A figure beside its rows at its own size: the shared pair's .9fr column would draw these 360 and 420 px figures
   smaller, labels and all. */
:root[data-alive-ui] body main.col .look-pair.il-own{grid-template-columns:auto minmax(0,1fr)}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-pair.il-own{grid-template-columns:1fr}
}
/* The same in Key concepts 1: the sketches at their own size beside the note. */
:root[data-alive-ui] body main.col .look-kpair.il-own{grid-template-columns:auto minmax(0,1fr)}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-kpair.il-own{grid-template-columns:1fr}
}
/* 1/x far out (section 4): the two windows are wider than a column beside rows, so the readings go under the figure,
   side by side where they fit. */
:root[data-alive-ui] body main.col .look-pair.il-stack{grid-template-columns:1fr;justify-items:center}
:root[data-alive-ui] body main.col .look-rows.il-side{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:14px 40px}
:root[data-alive-ui] body main.col .look-rows.il-side>.row+.row{margin-top:0}

/* The degree rule's three cases: a words head over the fraction and its leading terms. */
:root[data-alive-ui] body main.col .il-degree .look-head{font:500 17px/1.3 'STIX Two Text',Georgia,serif;text-align:center}

/* A case's question (x → 3⁺, x = 1) reads as the case's head, then its rows. */
:root[data-alive-ui] body main.col .look-case .look-a .math-chain{justify-content:flex-start}
