/* Differentiability and Continuity: this page's layout.
   Colour comes only from the course palette (../lib/lesson-colors.css, the lc-* classes); planning/colour.md says which
   meaning takes which role: \lf the left side (lc-blue), \rt the right side (lc-pink), \gp the gap and the height
   difference whose limit it is (lc-orange), \dv the derivative that exists and its tangent line (lc-green).
   Shared tokens come from ../derivatives-lib/page-local.css and the Paper and Lamp layer (../alive/paper.css). */
.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 row with a short label: the label beside the maths on a wide screen, above it on a phone */
:root[data-alive-ui] body main.col .look-card .row.df-lab{display:flex;align-items:baseline;gap:6px 18px;flex-wrap:wrap}
:root[data-alive-ui] body main.col .df-lab>.row-label{font:500 15px/1.4 var(--lf-label);color:var(--ink);min-width:136px}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-card .row.df-lab{display:block}
  :root[data-alive-ui] body main.col .df-lab>.row-label{display:block;min-width:0;margin:0 0 2px}
  :root[data-alive-ui] body main.col .df-lab>.row-label:empty{display:none}
}
/* §4's three implications: beside a label the longer two dropped under theirs while the first stayed beside it, so
   each label sits above its row */
:root[data-alive-ui] body main.col .look-card.df-imp .row.df-lab{display:block}
:root[data-alive-ui] body main.col .df-imp .df-lab>.row-label{display:block;margin:0 0 2px}
:root[data-alive-ui] body main.col .look-card.df-imp .row+.row{margin-top:16px}
/* a row after a gap in the card: the step moves on (from the quotient to what each side gives) */
:root[data-alive-ui] body main.col :is(.look-card,.look-rows) .row.df-next{margin-top:20px}

/* A chain: on a wide screen it holds as many "=" as read as one move; on a phone the same chain breaks one "=" to a
   line, so nothing scrolls sideways (the Trigonometric Substitution page's tsx-wide / tsx-narrow). */
:root[data-alive-ui] body main.col .df-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .df-wide{display:none}
  :root[data-alive-ui] body main.col .df-narrow{display:block}
}

/* a figure beside the rows it explains, at its own size; the rows take what's left. A verdict row both of them lead
   to spans the card under them (§2's −1 ≠ 1). On a phone the figure stacks above its rows. */
:root[data-alive-ui] body main.col .look-pair.df-pair{grid-template-columns:auto minmax(0,1fr);gap:10px 18px}
:root[data-alive-ui] body main.col .look-pair.df-pair>.df-verdict{grid-column:1/-1;justify-self:center;margin-top:6px}
:root[data-alive-ui] body main.col .look-pair.df-pair .look-rows .row+.row{margin-top:10px}
@media (max-width:640px){:root[data-alive-ui] body main.col .look-pair.df-pair{grid-template-columns:1fr}}

/* a left row and its right row side by side, as the two sides sit on the graph: left, then right; stacked on a phone */
:root[data-alive-ui] body main.col .df-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 36px;margin-top:12px}
:root[data-alive-ui] body main.col .df-sides>.row{margin:0!important}
:root[data-alive-ui] body main.col .df-sides.df-next{margin-top:20px}
@media (max-width:640px){:root[data-alive-ui] body main.col .df-sides{grid-template-columns:1fr}}

/* a condition the next step turns on, set on its own line like a goal: large and quiet, not a lamp block */
:root[data-alive-ui] body main.col .df-eq{width:fit-content;max-width:100%;margin:18px auto 22px}
:root[data-alive-ui] body main.col .df-eq .katex{font-size:1.15em}

/* Key concepts: the four failures beside their small graphs, as a list (the graphs at their own 300 px, the list in what's
   left; the shared .8fr column let the drawing crowd the list to a sliver); on a phone the graphs stack above it */
:root[data-alive-ui] body main.col .look-kpair.df-kfail{grid-template-columns:auto minmax(0,1fr);gap:12px 24px;align-items:start}
@media (max-width:640px){:root[data-alive-ui] body main.col .look-kpair.df-kfail{grid-template-columns:1fr}}
:root[data-alive-ui] body main.col .look-kgrid .df-fails{list-style:disc;margin:0;padding:0 0 0 20px;font-size:16.5px;line-height:1.6;color:var(--body)}
:root[data-alive-ui] body main.col .look-kgrid .df-fails li+li{margin-top:8px}
/* the shared .kc li is a two-column grid for label/value rows; these are sentences, so they're plain list items */
:root[data-alive-ui] body main.col .look-kgrid .df-fails li{display:list-item;padding:0;border-top:0;font-size:16.5px;color:var(--body)}
:root[data-alive-ui] body main.col .look-kgrid .df-fails+.knote{margin-top:12px}
:root[data-alive-ui] body main.col .look-kgrid .look-kpair>.knote{margin:0}
:root[data-alive-ui] body main.col .look-kgrid .look-krows .row+.row{margin-top:8px}

/* Practice 1: the graph the problem gives, under its statement at its own size */
:root[data-alive-ui] body main.col .prob .df-given{margin:14px 0 6px 44px;width:fit-content;max-width:calc(100% - 44px)}
:root[data-alive-ui] body main.col .prob .df-given>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block}
/* Practice 2: a list of x-values needs room for its placeholder */
:root[data-alive-ui] body main.col .prob #p2-in{width:320px;max-width:100%}
/* Practice 8: the two constants side by side */
:root[data-alive-ui] body main.col .prob .answer-fields.df-two{display:flex;flex-wrap:wrap;gap:10px 28px}
:root[data-alive-ui] body main.col .prob .answer-fields.df-two input{width:140px}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .prob .df-given{margin-left:0;max-width:100%}
  :root[data-alive-ui] body main.col .prob .answer-fields.df-two input{width:120px}
}
/* on a phone a figure standing on its own takes less of the card's side padding, so fig-3's two panels keep their 16.5 px
   labels above 13 px (at the shared 24 px padding they rendered at 12.1 px) */
@media (max-width:640px){:root[data-alive-ui] body main.col>section>figure.diagram{padding:14px 8px}}
