/* Derivatives of Inverse and Inverse Trig Functions: page layout. No colours here: every colour is the course palette's
   (../lib/lesson-colors.css), through the macros in katex-macros.json (planning/colour.md):
     \fside  blue    f, the function being inverted, and a, its input (sin y, tan y, sec y and the angle y in §3–5)
     \inv    pink    f⁻¹, every inverse, and b, the inverse's input (x from §3 on; the inside u in §6)
     \slope  green   f′(a) and what it becomes (the tall leg, cos y, sec²y, sec y tan y and their forms in x)
     \one    violet  §1–2: the leg of length 1          \co  violet  §5: the co-function angle and its minus
     \du     orange  u′, the inside's derivative that multiplies (§6 and the practice solutions)
   Every rule is scoped :root[data-alive-ui] body main.col …, because the sheet styles outrank a plain page selector. */

/* a figure beside its rows, drawn at its own size: the shared .9fr/1.1fr split shrank the 348–379 px graphs with their labels */
:root[data-alive-ui] body main.col .look-pair.ifd-pair{grid-template-columns:auto minmax(0,1fr);column-gap:30px}
:root[data-alive-ui] body main.col .look-pair.ifd-pair .look-rows{justify-self:center}
/* a subsection's result, set under its triangle and the rows read off it, so the rows beside the triangle stay short */
:root[data-alive-ui] body main.col .look-pair.ifd-pair>.ifd-under{grid-column:1/-1;justify-self:center;margin:14px 0 0}
:root[data-alive-ui] body main.col .look-pair.ifd-pair>.ifd-under .math-chain{justify-content:center}
/* an answer field's label is the problem's maths, so it reads at the size of the statement (the shared label sets it in the 15 px muted caption font) */
:root[data-alive-ui] body main.col .prob .answer-fields label,:root[data-alive-ui] body main.col .prob .choices label{font-size:18px;color:var(--ink)}
/* rows grouped by job: space, not a rule or a caption, between the groups */
:root[data-alive-ui] body main.col :is(.look-card,.look-rows) .row.ifd-next{margin-top:22px}
/* one chain, two breaks: one line on a wide screen, stacked on a phone, so nothing wraps mid-expression */
:root[data-alive-ui] body main.col .ifd-narrow{display:none}
/* the inverse function rule: the formula the whole lesson uses, set a little larger than the rows around it */
:root[data-alive-ui] body main.col .look-card.ifd-rule{text-align:center}
:root[data-alive-ui] body main.col .look-card.ifd-rule .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .look-card.ifd-rule .katex{font-size:1.24em}
/* a table of values as a test sets it */
:root[data-alive-ui] body main.col .look-card.ifd-table{width:fit-content;max-width:100%;margin-left:auto;margin-right:auto;padding:16px 30px}
/* the six derivatives: each with its co-function partner beside it, the pair kept together when they stack */
:root[data-alive-ui] body main.col .ifd-six{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 28px;align-items:center}
:root[data-alive-ui] body main.col .ifd-six>.row{margin:0!important}
:root[data-alive-ui] body main.col .look-krows .ifd-six .katex{font-size:1.02em}
/* the subsections of §4 */
: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}
/* the practice solutions' step names in the page's ink, upright */
:root[data-alive-ui] body main.col .sol .ln .step{display:block;font:500 17px/1.4 'STIX Two Text',Georgia,serif;letter-spacing:0;text-transform:none;color:var(--ink);margin:0 0 2px}
:root[data-alive-ui] body main.col .sol .ln+.ln{margin-top:14px}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ifd-wide{display:none}
  :root[data-alive-ui] body main.col .ifd-narrow{display:block}
  :root[data-alive-ui] body main.col .look-pair.ifd-pair{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col .look-pair.ifd-pair .look-rows{justify-self:stretch}
  :root[data-alive-ui] body main.col .look-card.ifd-rule .katex{font-size:1.1em}
  :root[data-alive-ui] body main.col .ifd-six{grid-template-columns:1fr;gap:12px}
  :root[data-alive-ui] body main.col .ifd-six>.row:nth-child(2n+3){margin-top:10px!important}
}
