/* Arc Length: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css). */

/* The arc length formula's row: its name in a column of its own beside the formula, so the formula reads on the name's
   line instead of dropping under it */
:root[data-alive-ui] body main.col .look-card .row.al-lrow{display:grid;grid-template-columns:120px minmax(0,1fr);column-gap:18px;align-items:center}
:root[data-alive-ui] body main.col .look-card .row.al-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.al-lrow>:is(.math-chain,.katex-display){grid-column:2;margin:0}

/* A list of equations that reads on one line on a wide page takes one equation per line on a phone */
:root[data-alive-ui] body main.col .al-narrow{display:none}

/* Key concepts: the first card is wide, its figure at its own size beside the two rows; a name over its row, the row given
   the card's full width (the shared side-by-side label left the maths under 120 px) */
:root[data-alive-ui] body main.col .look-kgrid .kc.wide .look-kpair{grid-template-columns:auto minmax(0,1fr);align-items:center}
: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 .kh{display:block;margin:0 0 4px}
: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}

/* a Key concept title with maths in it (card 2) reads as one line of text that wraps, not as flex pieces side by side */
: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;margin-right:10px;vertical-align:2px}
:root[data-alive-ui] body main.col .look-kgrid .kn .katex{font-size:1.04em;white-space:nowrap}

@media (max-width:640px){
  /* the shared card padding is 14 px on a phone; a figure standing on its own takes the same, 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-card .row.al-lrow{grid-template-columns:84px minmax(0,1fr);column-gap:12px}
  :root[data-alive-ui] body main.col .look-card .row.al-lrow>.row-label{font-size:14px}
  :root[data-alive-ui] body main.col .al-wide{display:none}
  :root[data-alive-ui] body main.col .al-narrow{display:block}
  :root[data-alive-ui] body main.col .look-kgrid .kc.wide .look-kpair{grid-template-columns:1fr}
}
