/* Epsilon-Delta Definition of a Limit: 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:
     \ep   pink    ε and everything on the output axis: L, the output range and its edges, |f(x) − L|;
     \dl   blue    δ and everything on the input axis: a, the inputs, |x − a|, 0 < |x − a| < δ, the cap on δ;
     \fc   violet  the number next to |x − a| that ε is divided by (2, |x + 3|, 7);
     \ins  green   an output checked and found inside the range;
     \outs orange  an output checked and found outside it. */

/* A chain that fits on one line on a wide screen is stacked one step to a line on a phone (the same maths twice, one shown). */
:root[data-alive-ui] body main.col .ed-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ed-wide{display:none}
  :root[data-alive-ui] body main.col .ed-narrow{display:block}
}

/* A part's goal on two lines: the claim, then what we're after. */
:root[data-alive-ui] body main.col .look-goal .math-chain+.math-chain{margin-top:4px}

/* A figure beside its rows is drawn at its own width; the rows take what's left (the shared split squeezed the 360 px graphs).
   fig-1 carries an inline max-width, which would stop it shrinking on a 360 px phone. */
:root[data-alive-ui] body main.col .look-pair.ed-pair>figure.diagram>svg:not(.katex svg){max-width:100%!important}
:root[data-alive-ui] body main.col .look-pair.ed-pair{grid-template-columns:auto minmax(0,1fr)}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-pair.ed-pair{grid-template-columns:minmax(0,1fr)}
}

/* The definition: its opening words, then the inequality with each part labelled (fig-2), then the first example. Centred,
   because it is one statement read top to bottom. */
:root[data-alive-ui] body main.col .ed-def .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .ed-def .row+.row{margin-top:6px}
:root[data-alive-ui] body main.col .ed-def figure.diagram{margin:10px auto 0;max-width:100%;display:flex;justify-content:center}
:root[data-alive-ui] body main.col .ed-def 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 .ed-def .row.ed-inst{margin-top:20px}

/* The two rows that answer the section: a little space before them. */
:root[data-alive-ui] body main.col .look-card .row.ed-last{margin-top:18px}

/* The practice graphs sit under their statements at their own size. */
:root[data-alive-ui] body main.col .prob figure.lean-given{margin:12px auto 8px;max-width:100%}
: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}

/* Key concepts: the √x figure at its own width beside its rows. */
@media (min-width:641px){
  :root[data-alive-ui] body main.col .look-kgrid .look-kpair{grid-template-columns:auto minmax(0,1fr)}
}

/* Key concepts titles with maths in them: the shared title is a flex row, which put its gap around each piece of inline
   maths ("Writing an  ε  -  δ  proof"). As a block with the badge inline, the title reads as one line of text. */
:root[data-alive-ui] body main.col .look-kgrid .kn{display:block}
:root[data-alive-ui] body main.col .look-kgrid .kn::before{display:inline-grid;vertical-align:middle;margin:-3px 10px 0 0}
