/* Concavity, Inflection Points, and the Shape of a Graph: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css). */

/* A chain that reads on one line on a wide page is broken into its steps on a phone, so nothing runs off the card or breaks
   mid-step: the same maths twice, one shown per width. */
:root[data-alive-ui] body main.col .cc-narrow{display:none}
:root[data-alive-ui] body main.col .look-card .row+.row{margin-top:12px}

/* Key concepts: rows given the card's width (the shared side-by-side label left the maths 120 px), and the first card's
   figure at its own size beside its rows */
:root[data-alive-ui] body main.col .look-kgrid .kr{display:block;border:0;padding:0;margin:0}
:root[data-alive-ui] body main.col .look-kgrid .kr+.kr{margin-top:12px}
:root[data-alive-ui] body main.col .look-kgrid .kr .kv{min-width:0;padding:0}
:root[data-alive-ui] body main.col .look-kgrid .kv .math-chain{margin:0}
:root[data-alive-ui] body main.col .look-kgrid .kc.wide .look-kpair{grid-template-columns:auto minmax(0,1fr)}
:root[data-alive-ui] body main.col .look-kgrid .kc>.kb>.review-figure>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block;margin:0 auto}

@media (max-width:640px){
  :root[data-alive-ui] body main.col .cc-wide{display:none}
  :root[data-alive-ui] body main.col .cc-narrow{display:block}
  /* a figure standing on its own takes the card's phone padding, so it keeps its size */
  :root[data-alive-ui] body main.col>section>figure.diagram{padding:14px}
  :root[data-alive-ui] body main.col .look-kgrid .kc.wide .look-kpair{grid-template-columns:1fr}
}

/* a Key concepts title with maths in it reads as one line of text (the shared flex title split it into pieces) */
:root[data-alive-ui] body main.col .look-kgrid .kn{display:block}
:root[data-alive-ui] body main.col .look-kgrid .kn::before{margin-right:10px;vertical-align:2px}
