/* Fluid Pressure and Force: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css).
   Colour meanings (planning/colour.md), one KaTeX macro each (katex-macros.json):
     \dep  pink    depth below the liquid's surface: h, 3 − y, 4 − y, the column's height, 1.5 and 1 as middle depths
     \wid  blue    the strip's width: w, 2, 4 − 2h, 2√(1 − y²), widths read at two depths
     \prs  green   pressure: 9800, 62.4, (density) · 9.8, pressure values such as 29,400
     \thk  violet  the strip's thickness: dh, dy
     \ax   orange  where y = 0 sits: readings on the y-axis (y = 1, y = −0.5)
   Forces, areas, bounds and antiderivatives stay ink. */

/* A single fact read off the step before it: its own line, centred, not a card and not lit (a lone equation is not a
   block). Multi-row groups, chains and figure pairs are the lesson look's cards. */
:root[data-alive-ui] body main.col .ff-line{margin:16px 0 20px}
:root[data-alive-ui] body main.col .ff-line .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .ff-line .katex{font-size:1.1em}

/* A labelled row: the writer's label as a small heading over its maths, so long maths keeps the card's full width
   instead of wrapping under a label column. Not uppercased: a label can hold maths (depth h). */
:root[data-alive-ui] body main.col .ff-lab{font:600 15px/1.35 var(--lf-label);color:var(--ink);margin:0 0 4px}
:root[data-alive-ui] body main.col .ff-lab .katex{font-size:1.08em}
:root[data-alive-ui] body main.col .look-card .row.ff-lrow+.row.ff-lrow{margin-top:18px}

/* A chain read one move per "=": two moves to a line on a wide screen, one on a phone. */
:root[data-alive-ui] body main.col .ff-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ff-wide{display:none}
  :root[data-alive-ui] body main.col .ff-narrow{display:block}
}

/* A figure beside a few short rows: the figure takes the larger share, since the rows are short. */
:root[data-alive-ui] body main.col .look-pair.ff-pair{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
@media (max-width:640px){:root[data-alive-ui] body main.col .look-pair.ff-pair{grid-template-columns:1fr}}
:root[data-alive-ui] body main.col .ff-pair .look-rows .math-chain{justify-content:center}

/* Key concepts: rows on the quiet sheet, each label over its maths. */
:root[data-alive-ui] body main.col .look-kgrid .look-krows .kh{display:block;margin:0 0 4px}
:root[data-alive-ui] body main.col .look-kgrid .look-krows .row+.kh{margin-top:14px}
:root[data-alive-ui] body main.col .look-kgrid .look-krows .row+.row{margin-top:8px}
:root[data-alive-ui] body main.col .look-kgrid .look-krows .math-chain{justify-content:flex-start}

/* An answer reads as one line: F = [   ] N */
:root[data-alive-ui] body main.col .prob .answer-fields label .katex{font-size:1.1em;color:var(--ink)}

/* The labelled rows read from the left, under their label. */
:root[data-alive-ui] body main.col .ff-lrow .math-chain{justify-content:flex-start}
:root[data-alive-ui] body main.col .ff-lrow .katex-display{text-align:left}
/* a variable named in a label's words, set as the maths sets it */
:root[data-alive-ui] body main.col .ff-var{font:italic 400 1.12em/1 'STIX Two Text',Georgia,serif}

/* A 3D figure standing in its own card sits in the middle of it, as the drawn figures do. */
:root[data-alive-ui] body main.col figure.diagram>.fig3d>svg{display:block;margin-left:auto;margin-right:auto}
@media (max-width:420px){:root[data-alive-ui] body main.col>section>figure.diagram{padding-left:6px;padding-right:6px}}
/* A worked chain or a group of facts reads from the middle of its card, like the single lines between them. */
:root[data-alive-ui] body main.col .look-card>.row:not(.ff-lrow) .math-chain{justify-content:center}
/* Key concepts: a figure beside its rows at the figure's own size */
@media (min-width:641px){:root[data-alive-ui] body main.col .look-kgrid .kc.wide .look-kpair{grid-template-columns:minmax(0,250px) minmax(0,1fr)}}
:root[data-alive-ui] body main.col .prob .answer-fields label .katex{font-size:1.3em}
