/* Continuity and Types of Discontinuity: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css).
   Colour meanings (planning/colour.md), carried by the macros in katex-macros.json:
     \lm  blue    the limit: the height the sides approach, a one-sided limit, the lim notation, a hole's height
     \vl  pink    the value f(a), a filled dot, a value we set (c, k, g(−2))
     \ok  green   continuous: the bracket that includes an endpoint
     \lp  violet  the left side or left piece (in section 4, the fixed pieces)      \cmf violet  the common factor that cancels
     \rp  orange  the right side or right piece (the piece being placed)            \stf orange  the factor that stays, and nonzero over 0
   Every rule is scoped :root[data-alive-ui] body main.col, because the sheet styles outrank a plain page selector. */

/* one equation standing alone: centred, a little large, and not a lamp block (a single line isn't one) */
:root[data-alive-ui] body main.col .ct-line{width:fit-content;max-width:100%;margin:18px auto 22px}
:root[data-alive-ui] body main.col .ct-line .math-chain{margin:0;justify-content:center}
:root[data-alive-ui] body main.col .ct-line .katex{font-size:1.12em}
/* the definition, which the rest of the page keeps coming back to */
:root[data-alive-ui] body main.col .ct-line.ct-def .katex{font-size:1.32em}

/* cases side by side in one card, each a graph (or a head) with its own rows under it: the four changes of section 1, the
   three types of section 2, the three needs. One card, one lamp block; the cells stack on a phone */
:root[data-alive-ui] body main.col .ct-grid{display:grid;grid-template-columns:repeat(var(--ct-cols,2),minmax(0,1fr));gap:26px 22px;margin:22px 0 28px;padding:20px 22px;background:var(--look-card);border:1px solid var(--look-edge);border-radius:var(--look-r);box-shadow:var(--look-shadow)}
:root[data-alive-ui] body main.col .ct-grid.ct-3{--ct-cols:3}
:root[data-alive-ui] body main.col .ct-cell{display:flex;flex-direction:column;align-items:center;min-width:0}
:root[data-alive-ui] body main.col .ct-cell>figure.diagram{margin:0 0 6px;padding:0;min-width:0;max-width:100%}
:root[data-alive-ui] body main.col .ct-cell>figure.diagram>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block;margin:0 auto}
:root[data-alive-ui] body main.col .ct-cell>.row{margin:6px 0 0;max-width:100%}
:root[data-alive-ui] body main.col .ct-cell .math-chain{margin:0;justify-content:center}
:root[data-alive-ui] body main.col .ct-cell .katex{font-size:1.04em}
:root[data-alive-ui] body main.col .ct-head{font:500 18px/1.35 'STIX Two Text',Georgia,serif;color:var(--ink);text-align:center;margin:0 0 8px}
:root[data-alive-ui] body main.col .ct-grid.ct-needs{align-items:start}
:root[data-alive-ui] body main.col .ct-grid.ct-needs .ct-head{min-height:2.7em;display:flex;align-items:flex-end;justify-content:center}

/* the two sides of a point, left piece left and right piece right, as on the graph: a seam's values, |x|/x on each side */
:root[data-alive-ui] body main.col .ct-sides{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 30px;align-items:start}
:root[data-alive-ui] body main.col .ct-sides>div>.row+.row{margin-top:10px}
:root[data-alive-ui] body main.col .look-card .row+.ct-sides,:root[data-alive-ui] body main.col .look-card .ct-sides+.row,:root[data-alive-ui] body main.col .ct-at+.ct-sides{margin-top:14px}
:root[data-alive-ui] body main.col .ct-at{margin:0}
:root[data-alive-ui] body main.col .ct-at .katex{font-size:1.1em}
:root[data-alive-ui] body main.col .ct-seam+.ct-seam{margin-top:26px}
:root[data-alive-ui] body main.col .look-card .ct-seam+.row{margin-top:24px}

/* practice: the given graph at its own size; a choice per point as one line, the point then its options */
:root[data-alive-ui] body main.col .prob figure.lean-given{margin:14px 0 10px 44px;padding:0}
:root[data-alive-ui] body main.col .prob figure.lean-given>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block;margin:0 auto}
:root[data-alive-ui] body main.col .prob .choices.ct-pick{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:10px 0}
:root[data-alive-ui] body main.col .prob .choices.ct-pick>.ct-at{min-width:78px}
:root[data-alive-ui] body main.col .prob .choices.ct-pick label{margin:0;min-width:0}
:root[data-alive-ui] body main.col .prob .answer-fields{display:flex;flex-wrap:wrap;gap:10px 22px}

@media (max-width:640px){
  :root[data-alive-ui] body main.col .ct-grid,:root[data-alive-ui] body main.col .ct-grid.ct-3{grid-template-columns:1fr;padding:16px 14px;gap:24px}
  :root[data-alive-ui] body main.col .ct-grid.ct-needs .ct-head{min-height:0}
  :root[data-alive-ui] body main.col .ct-sides{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col>section>figure.diagram{padding:14px}
  :root[data-alive-ui] body main.col .prob figure.lean-given{margin-left:0}
  :root[data-alive-ui] body main.col .prob>.st{grid-template-columns:1fr;row-gap:8px}
  :root[data-alive-ui] body main.col .prob .choices.ct-pick>.ct-at{min-width:100%}
}

/* a goal row too wide for a phone: the same row stacked, one copy shown per width (two copies of one row are maths, not words) */
:root[data-alive-ui] body main.col .ct-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ct-wide{display:none}
  :root[data-alive-ui] body main.col .ct-narrow{display:block}
}
/* the two sides sit together, a clear gap between them, rather than pinned to the card's two halves */
:root[data-alive-ui] body main.col .ct-sides{grid-template-columns:repeat(2,max-content);column-gap:64px}
@media (max-width:640px){:root[data-alive-ui] body main.col .ct-sides{grid-template-columns:minmax(0,1fr)}}
/* Key concepts 2: the three types at their own size beside the note */
:root[data-alive-ui] body main.col .look-kpair.ct-kpair{grid-template-columns:auto minmax(0,1fr);gap:8px 28px}
:root[data-alive-ui] body main.col .look-kpair.ct-kpair .knote{margin:0}
@media (max-width:640px){:root[data-alive-ui] body main.col .look-kpair.ct-kpair{grid-template-columns:1fr}}
/* an answer's label ("k =", "f(2) =") at the size of the maths around it */
:root[data-alive-ui] body main.col .prob .answer-fields label>.katex{font-size:1.15em}
