/* The Definite Integral: 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): \ab blue, area above the x-axis; \bw pink, area below;
   \stp green, the strip f(x) dx; \ub orange, the upper bound and F there; \lb violet, the lower bound and F there.
   The page's own blocks are cards in the shared look (../alive/lesson-look.css), each a lamp block:
     dfi-side   a figure at its own size with its short rows beside it (stacked under 800 px, where the column can't
                hold a 400 px figure and rows side by side). A look-pair splits the column .9/1.1, which drew these
                400 px figures at 72%, so their labels shrank with them.
     dfi-stack  a figure at its own size with its rows under it, centred, for rows too wide to sit beside it.
   Rows: dfi-lab a row's name set above it (beside it, the name pushed the maths under it on a phone); dfi-chips short
   facts side by side that wrap whole; dfi-grid2 two parallel rows side by side (one per column of the figure above);
   dfi-wide / dfi-narrow one chain in two breaks, the narrow one under 640 px. */
:root[data-alive-ui] body main.col :is(.dfi-side,.dfi-stack){margin:22px 0 28px;padding:18px 24px;background:var(--look-card);border:1px solid var(--look-edge);border-radius:var(--look-r);box-shadow:var(--look-shadow)}
:root[data-alive-ui] body main.col .dfi-side{display:grid;grid-template-columns:auto minmax(0,1fr);gap:14px 30px;align-items:center}
:root[data-alive-ui] body main.col .dfi-stack{display:flex;flex-direction:column;align-items:center;gap:16px}
:root[data-alive-ui] body main.col .dfi-stack>.look-rows{align-self:stretch}
:root[data-alive-ui] body main.col .dfi-stack .math-chain{justify-content:center}
:root[data-alive-ui] body main.col :is(.dfi-side,.dfi-stack)>figure.diagram{margin:0;padding:0;min-width:0;background:none;border:0;box-shadow:none}
:root[data-alive-ui] body main.col :is(.dfi-side,.dfi-stack)>figure.diagram>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block;margin:0 auto}
@media (max-width:800px){
  :root[data-alive-ui] body main.col .dfi-side{grid-template-columns:minmax(0,1fr)}
  :root[data-alive-ui] body main.col .dfi-side .math-chain{justify-content:center}
}
@media (max-width:640px){
  :root[data-alive-ui] body main.col :is(.dfi-side,.dfi-stack){padding:14px}
}
:root[data-alive-ui] body main.col .dfi-lab{font:500 17px/1.35 'STIX Two Text',Georgia,serif;color:var(--ink);margin:0 0 6px}
:root[data-alive-ui] body main.col .dfi-lab-next{margin-top:18px}
:root[data-alive-ui] body main.col .dfi-chips{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px 44px}
:root[data-alive-ui] body main.col .dfi-chips>*{margin:0;flex:0 0 auto}
:root[data-alive-ui] body main.col .dfi-recall{gap:12px 36px}
:root[data-alive-ui] body main.col .dfi-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 28px;align-items:start}
:root[data-alive-ui] body main.col .look-rows.dfi-grid2 .row+.row{margin-top:0}
:root[data-alive-ui] body main.col .dfi-grid2 .math-chain{justify-content:center}
@media (max-width:640px){:root[data-alive-ui] body main.col .dfi-grid2{grid-template-columns:minmax(0,1fr)}}
:root[data-alive-ui] body main.col .look-card .row.dfi-gap,:root[data-alive-ui] body main.col .look-card .dfi-gap{margin-top:18px}
:root[data-alive-ui] body main.col :is(.look-card,.look-rows) .row.dfi-total{margin-top:18px}
:root[data-alive-ui] body main.col .look-case.dfi-mid{display:flex;align-items:center}
:root[data-alive-ui] body main.col .look-case.dfi-mid>.look-rows{width:100%}
:root[data-alive-ui] body main.col .dfi-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .dfi-wide{display:none}
  :root[data-alive-ui] body main.col .dfi-narrow{display:block}
}
/* Practice 1's graph, and its copy in the solution: drawn at its own size, no card of its own (the problem is the card) */
:root[data-alive-ui] body main.col figure.diagram.dfi-prob-fig{margin:14px 0 8px;padding:0;background:none;border:0;box-shadow:none}
:root[data-alive-ui] body main.col figure.diagram.dfi-prob-fig>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block;margin:0 auto}
/* the antiderivatives to recall: three to a line on a wide screen, two on a phone, each whole */
:root[data-alive-ui] body main.col .dfi-recall{display:grid;grid-template-columns:repeat(3,max-content);gap:14px 44px;align-items:center}
:root[data-alive-ui] body main.col .dfi-recall>*{margin:0}
@media (max-width:640px){:root[data-alive-ui] body main.col .dfi-recall{grid-template-columns:repeat(2,max-content);gap:12px 26px}}
/* Key concepts 1: the figure over its row, at its own size (beside the row it drew at 74%) */
:root[data-alive-ui] body main.col .dfi-kfig{display:flex;flex-direction:column;align-items:center;gap:10px;margin-bottom:12px}
:root[data-alive-ui] body main.col .dfi-kfig .review-figure svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block}
/* a Key idea's inline maths may break at a relation or a sign: its long formulas otherwise ran past a phone's edge */
:root[data-alive-ui] body main.col .key-idea span.nb{white-space:normal}
/* on a phone a figure standing alone keeps the card's narrower padding, so it draws near its own size */
@media (max-width:640px){:root[data-alive-ui] body main.col>section>figure.diagram{padding:14px}}
:root[data-alive-ui] body main.col .key-idea span.nb,:root[data-alive-ui] body main.col .key-idea span.nb>.katex{display:inline;white-space:normal}
