/* The Washer Method: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css);
   the roles are in planning/colour.md and the macros in katex-macros.json (\lx the line y = 2x, blue; \px the parabola,
   pink; \eg the straight edge, green; \ax the axis of rotation, orange; \tk the thickness dx or dy, violet). */

/* a worked chain: two "=" to a line on a wide screen, one "=" to a line on a phone, so nothing scrolls sideways */
:root[data-alive-ui] body main.col .wsh-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .wsh-wide{display:none}
  :root[data-alive-ui] body main.col .wsh-narrow{display:block}
}
/* a card's rows are separated by space, a little more between a chain and the next one */
:root[data-alive-ui] body main.col .look-card .row+.row.wsh-gap{margin-top:20px}

/* Key concepts: a row's label sits over its maths, so the maths has the card's whole width */
:root[data-alive-ui] body main.col .look-krows .kr{grid-template-columns:minmax(0,1fr);gap:2px;padding:0;border-top:0}
:root[data-alive-ui] body main.col .look-krows .kr+.kr{margin-top:12px}
:root[data-alive-ui] body main.col .look-krows .kv{overflow:visible}
:root[data-alive-ui] body main.col .look-krows .kh{font-size:15.5px}

/* a sub-heading's maths at the heading's size */
:root[data-alive-ui] body main.col h3.sub .katex{font-size:.95em}

/* Key concept 1: the slice and the ring side by side need more of the card than the shared pair gives them */
:root[data-alive-ui] body main.col .wsh-k1 .look-kpair{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
/* Key concepts 4 and 5 span the grid, their two rows side by side, so each row's maths has room on one line */
:root[data-alive-ui] body main.col .wsh-kside .look-krows{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 28px;align-items:start}
:root[data-alive-ui] body main.col .wsh-kside .look-krows .kr+.kr{margin-top:0}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .wsh-k1 .look-kpair{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col .wsh-kside .look-krows{grid-template-columns:minmax(0,1fr)}
  /* a little less side padding on the quiet sheet, so Key concept 4's volume integral fits a 360 px phone whole */
  :root[data-alive-ui] body main.col .look-krows{padding:12px 10px}
}

/* "the x-axis" written as maths and a word stays on one line, never "x" at a line's end and "-axis" on the next */
:root[data-alive-ui] body main.col .wsh-nb{white-space:nowrap}
