/* The Disk Method: 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:
     \rad  green   the radius, and the rectangle's height that becomes it
     \crv  pink    the curve, its value or its x at a point; across the axis, the part above
     \blw  blue    the part below the axis, set against a part above
     \ax   orange  the axis of rotation and its number
     \thk  violet  the thickness dx or dy;  \bnd violet  the bounds (both say where the disks sit along the axis) */

/* a chain that reads one move per "=" on a phone: a wide and a narrow copy, one shown per width */
:root[data-alive-ui] body main.col .dk-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .dk-wide{display:none}
  :root[data-alive-ui] body main.col .dk-narrow{display:block}
}

/* §2: one rectangle beside one disk, then both added up, in the figure's left/right order; a single column on a phone */
:root[data-alive-ui] body main.col .dk-steps{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"h1 h2" "r1 r2" "h3 h3" "a v";column-gap:28px;row-gap:4px;justify-items:center}
:root[data-alive-ui] body main.col .dk-steps .row+.row{margin-top:0}
:root[data-alive-ui] body main.col .dk-steps .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .dk-h{font:500 18px/1.3 'STIX Two Text',Georgia,serif;color:var(--ink)}
:root[data-alive-ui] body main.col .dk-h1{grid-area:h1} :root[data-alive-ui] body main.col .dk-h2{grid-area:h2}
:root[data-alive-ui] body main.col .dk-h3{grid-area:h3;margin-top:18px}
:root[data-alive-ui] body main.col .dk-r1{grid-area:r1} :root[data-alive-ui] body main.col .dk-r2{grid-area:r2}
:root[data-alive-ui] body main.col .dk-a{grid-area:a} :root[data-alive-ui] body main.col .dk-v{grid-area:v}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .dk-steps{grid-template-columns:1fr;grid-template-areas:"h1" "r1" "h2" "r2" "h3" "a" "v"}
  :root[data-alive-ui] body main.col .dk-h2,:root[data-alive-ui] body main.col .dk-h3{margin-top:16px}
}

/* rows beside a figure, each with its name to the left; the name never pushes its maths onto a line below */
:root[data-alive-ui] body main.col .dk-lr{display:grid;grid-template-columns:6.6em minmax(0,1fr);column-gap:14px;align-items:center}
:root[data-alive-ui] body main.col .dk-lr .row-label{font:500 14px var(--lf-label);color:var(--ink);letter-spacing:.04em;text-transform:uppercase}
:root[data-alive-ui] body main.col .dk-lr .math-chain{justify-content:flex-start}

/* centred rows in a card of working */
:root[data-alive-ui] body main.col .look-card .math-chain{justify-content:center}

/* goal rows: two or three centred lines; a little smaller on a phone so a line of the region's name fits */
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-goal .katex{font-size:1.02em}
}

/* Key concepts: rows centred on their quiet sheet */
:root[data-alive-ui] body main.col .look-krows .row+.row{margin-top:10px}
:root[data-alive-ui] body main.col .look-krows .math-chain{justify-content:center;margin:0}
:root[data-alive-ui] body main.col .look-krows .katex-display{margin:0}

/* practice: the answer reads as one line, "V = [ ]" */
:root[data-alive-ui] body main.col .prob .answer-fields label{display:inline-flex;align-items:center;gap:10px}
:root[data-alive-ui] body main.col .prob .answer-fields label>.katex{font-size:1.12em}

/* sub-headings inside a section: in the page's ink and serif, like the section titles */
:root[data-alive-ui] body main.col h3.sub{font:500 22px/1.3 'STIX Two Text',Georgia,serif;color:var(--ink);margin:40px 0 4px}
:root[data-alive-ui] body main.col h3.sub .katex{font-size:1em}

/* §3: the rows under fig-2 centre once the pair stacks on a phone */
@media (max-width:640px){
  :root[data-alive-ui] body main.col .dk-centre .math-chain{justify-content:center}
}
