/* Alternating Series and Absolute Convergence: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css).
   Colour meanings (planning/colour.md), one macro each in katex-macros.json:
     \rgt  blue    a step to the right: a positive term, a sign that is +1, the first term left out when it is positive
     \lft  pink    a step to the left: a negative term, a sign that is -1, the first term left out when it is negative
     \strc green   the stretch a step covers, and its length
     \sz   violet  the size of a term |a_n|, its function f(x), and the series of sizes, sum |a_n|
     \err  orange  the error: the gap to S and the error a problem allows
   S, positions, verdicts and routine arithmetic stay ink. Every rule is scoped to main.col because the sheet styles
   outrank a plain page selector. */

/* one chain, two breaks: the wide one on a screen, a narrower break of the same maths on a phone */
:root[data-alive-ui] body main.col .asr-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .asr-wide{display:none}
  :root[data-alive-ui] body main.col .asr-narrow{display:block}
}

/* a figure beside its rows, drawn at its own width (360 px); the rows take what is left. Stacks on a phone. */
:root[data-alive-ui] body main.col .look-pair.asr-pair{grid-template-columns:auto minmax(0,1fr);column-gap:32px}
:root[data-alive-ui] body main.col .look-pair.asr-pair .look-rows .math-chain{justify-content:center}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-pair.asr-pair{grid-template-columns:1fr}
}

/* a named block's title (the alternating series test, the alternating p-series): set as a title, centred, in ink */
:root[data-alive-ui] body main.col .look-card>.row-title{text-align:center;font:500 19px/1.35 'STIX Two Text',Georgia,serif;color:var(--ink);margin:0 0 14px}

/* a row with its words beside it: the words in a column of their own, the maths after them */
:root[data-alive-ui] body main.col .look-card .row.asr-lrow{display:grid;grid-template-columns:170px minmax(0,1fr);column-gap:18px;align-items:center}
:root[data-alive-ui] body main.col .look-card .row.asr-lrow>.row-label{font:500 15px/1.35 var(--lf-label);color:var(--ink);min-width:0;width:auto}
:root[data-alive-ui] body main.col .look-card .row.asr-lrow>.math-chain,:root[data-alive-ui] body main.col .look-card .row.asr-lrow>.katex-display{grid-column:2;margin:0}
:root[data-alive-ui] body main.col .look-card .row.asr-then{margin-top:16px}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-card .row.asr-lrow{grid-template-columns:96px minmax(0,1fr);column-gap:12px}
  :root[data-alive-ui] body main.col .look-card .row.asr-lrow>.row-label{font-size:14px}
}

/* the words that head a case or a check, in the same face as a row's words */
:root[data-alive-ui] body main.col .asr-tag{font:600 14.5px/1.35 var(--lf-label);color:var(--ink);margin:0 0 12px}
:root[data-alive-ui] body main.col .look-three .look-head.asr-tag{margin:0;align-items:center}

/* a goal of two lines: the series, then what is asked of it */
:root[data-alive-ui] body main.col .look-goal>*+*{margin-top:6px}

/* a card's maths is centred in it: a short row pinned to the left edge of a wide card left most of the card empty */
:root[data-alive-ui] body main.col .look-card>.row:not(.asr-lrow) .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .look-case .look-a{color:var(--ink)}

/* Key concepts: the small number line drawn at its own size beside the test's rows */
:root[data-alive-ui] body main.col .look-kpair{grid-template-columns:auto minmax(0,1fr)}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-kpair{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col .look-card .row.asr-lrow{grid-template-columns:84px minmax(0,1fr)}
}
/* on a phone a goal is set at the size of the cards' maths there, not larger, so its series stays on one line */
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-goal .katex{font-size:1.02em}
}
