/* Product and Quotient Rules: this page's own layout. It defines no colours: every colour on the page is a course palette role
   (lib/lesson-colors.css, through alive/lesson-look.css), set in the maths by the macros in katex-macros.json. The page is about
   two functions and which one is being differentiated, so two roles follow the slot, not the letter:
     \fc   (lc-blue)    f: the first factor, or the top of a quotient, with its derivative, df, and every value of f or f′
                        carried into the rule;
     \gc   (lc-pink)    g: the second factor, or the bottom of a quotient, with its derivative, dg, its values, and the
                        bottom squared, which stays pink down a whole chain;
     \gain (lc-green)   a term of the product rule that adds area (or revenue) at a point, and its value: 8, 30, 36, 150;
     \loss (lc-orange)  a term that takes area away, and its value: −5, the 3 of 4 − 3, 200;
     \tg   (lc-violet)  a tangent drawn on the graph of a quotient, and its slope.
   The meanings, and where colour is left out on purpose, are planning/colour.md. */
.fq .f .w,.fq .say,figcaption,.el>.lab .t,.lab .t,.kc .knote,.hint,.feedback-copy{color:var(--body)!important}
figcaption{font-style:normal!important}
.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}
.sol .ln+.ln{margin-top:14px}

/* A rule, the result the page keeps: centred and a little larger in its card, its name above it in the page's ink. The
   only two cards on the page that are a formula to keep rather than a step. */
:root[data-alive-ui] body main.col .look-card.pq-rule{text-align:center}
:root[data-alive-ui] body main.col .look-card.pq-rule .pq-name{font:500 17px/1.4 'STIX Two Text',Georgia,serif;color:var(--ink);margin:0 0 6px}
:root[data-alive-ui] body main.col .look-card.pq-rule .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .look-card.pq-rule .katex{font-size:1.3em}
/* a step set apart from the reminder above it in the same card, by space rather than a rule */
:root[data-alive-ui] body main.col .look-card .row.pq-then{margin-top:20px}

/* The value table: a real table, its f columns blue and its g columns pink (the colour is on the maths in the cells, so
   the header and the value it heads match). Hairline under the header, centred columns. */
:root[data-alive-ui] body main.col .pq-table-card{display:flex;justify-content:center}
:root[data-alive-ui] body main.col .pq-table{border-collapse:collapse;margin:0}
:root[data-alive-ui] body main.col .pq-table :is(th,td){padding:6px 20px;text-align:center;font-weight:400}
:root[data-alive-ui] body main.col .pq-table th{border-bottom:1px solid var(--look-edge)}
:root[data-alive-ui] body main.col .pq-table td{padding-top:10px}
:root[data-alive-ui] body main.col .pq-table .katex{font-size:1.12em}
@media (max-width:640px){:root[data-alive-ui] body main.col .pq-table :is(th,td){padding-left:9px;padding-right:9px}}

/* A graph read at a point: the figure at its own size beside the four numbers read off it, then the rule with those four
   numbers across the whole card under both, so the figure, its readings and their use are one block. */
:root[data-alive-ui] body main.col .look-pair.pq-pair{grid-template-columns:auto minmax(0,1fr)}
:root[data-alive-ui] body main.col .look-pair.pq-pair>.pq-under{grid-column:1/-1;margin-top:14px}
:root[data-alive-ui] body main.col .look-pair.pq-pair .look-rows .math-chain{justify-content:center}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-pair.pq-pair{grid-template-columns:minmax(0,1fr)}
  :root[data-alive-ui] body main.col .look-pair.pq-pair>.pq-under{margin-top:6px}
}

/* A chain too long for a phone: its wide break, and a narrower break of the same chain under 640 px */
:root[data-alive-ui] body main.col .pq-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .pq-wide{display:none}
  :root[data-alive-ui] body main.col .pq-narrow{display:block}
}

/* practice: answer fields in one row, each one line ("f′(x) = [  ]") */
:root[data-alive-ui] body main.col .prob .answer-fields{display:flex;flex-wrap:wrap;gap:12px 26px;align-items:baseline}
:root[data-alive-ui] body main.col .prob .answer-fields input.wide{width:280px;max-width:100%}
:root[data-alive-ui] body main.col .prob .answer-fields .pq-unit{margin-left:10px;font:400 17px/1.4 'STIX Two Text',Georgia,serif;color:var(--ink)}

/* On a phone a figure's card keeps less padding, so the figure keeps its labels at a readable size (fig-1 and fig-4 read at
   12 px inside the 24 px padding at 390) */
@media (max-width:640px){
  :root[data-alive-ui] body main.col>section>figure.diagram,
  :root[data-alive-ui] body main.col .look-pair{padding-left:12px;padding-right:12px}
}

/* Key concepts 1: the rectangle at its own size beside the rule (the shared .8fr column squeezed it to about two thirds,
   and its strip labels to 10 px) */
:root[data-alive-ui] body main.col .look-kpair.pq-kfig{grid-template-columns:auto minmax(0,1fr)}
@media (max-width:640px){:root[data-alive-ui] body main.col .look-kpair.pq-kfig{grid-template-columns:minmax(0,1fr)}}
