/* Introduction to Differential Equations: page layout. No colours here: every colour is the course palette's
   (../lib/lesson-colors.css), through the five macros in katex-macros.json (planning/colour.md): \yfn green, the
   unknown function y; \der pink, the derivative side; \oth blue, the other side; \cst orange, C and the condition that
   fixes it; \kfix violet, a constant the equation fixes or a sentence names.
   Almost every move on this page is a check: the derivative side against the other side. So the page's own blocks are
   built for that: a check sets the candidate, then its two sides one under the other, aligned on "=", so "the same
   expression" is seen down the column. Every rule is scoped under main.col because the sheet styles outrank a plain
   selector. */

/* a quiet displayed line: one step or one fact set on its own, centred, without a card; not a lamp block (Sohil,
   2026-09-27: the lamp lights blocks, "not the integral standalone") */
:root[data-alive-ui] body main.col .ode-line{width:fit-content;max-width:100%;margin:18px auto 24px}
:root[data-alive-ui] body main.col .ode-line .math-chain{margin:0;justify-content:center}
:root[data-alive-ui] body main.col .ode-line .katex{font-size:1.1em}
@media (max-width:640px){:root[data-alive-ui] body main.col .ode-line .katex{font-size:1em}}

/* separate items on one line that wrap as wholes (a goal with its candidates, r = ? after its equation) */
:root[data-alive-ui] body main.col .ode-items{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:4px 34px}
:root[data-alive-ui] body main.col .ode-items .math-chain{margin:0}

/* a check: the candidate, then its two sides aligned on "=" beside it; on a phone the sides wrap under the candidate */
:root[data-alive-ui] body main.col .ode-check{display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px}
:root[data-alive-ui] body main.col .ode-check .math-chain{margin:0}
/* the values at single points, as chips that wrap whole */
:root[data-alive-ui] body main.col .ode-chips{display:flex;flex-wrap:wrap;gap:8px 34px;margin-top:16px}
:root[data-alive-ui] body main.col .ode-chips .math-chain{flex-wrap:nowrap;margin:0}
/* an equation above its candidates, side by side in one card */
:root[data-alive-ui] body main.col .ode-head .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .ode-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px 28px;margin-top:16px}

/* phrase to piece (section 5): the phrase, an arrow, its piece of the equation; aligned on the arrow on a wide screen,
   and on a phone the arrow and piece wrap under a phrase that doesn't fit */
:root[data-alive-ui] body main.col .ode-words{display:grid;grid-template-columns:auto auto;justify-content:center;align-items:center;gap:10px 14px}
:root[data-alive-ui] body main.col .ode-words .ode-w{display:contents}
:root[data-alive-ui] body main.col .ode-words .ode-w>:first-child .math-chain{justify-content:flex-end}
:root[data-alive-ui] body main.col .ode-words .math-chain{margin:0}

/* a chain: one break on a wide screen, a narrower break on a phone, so nothing scrolls sideways */
:root[data-alive-ui] body main.col .ode-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ode-wide{display:none}
  :root[data-alive-ui] body main.col .ode-narrow{display:block}
  :root[data-alive-ui] body main.col .ode-pair{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col .ode-words{grid-template-columns:1fr;justify-content:start;gap:12px}
  :root[data-alive-ui] body main.col .ode-words .ode-w{display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px}
  :root[data-alive-ui] body main.col .ode-words .ode-w>:first-child .math-chain{justify-content:flex-start}
}

/* the three candidates at x = 0 (section 3), one column each: their heads hold green candidates, so the head sits on the
   card's own neutral ground rather than the shared tint (coloured text needs a neutral ground) */
:root[data-alive-ui] body main.col .ode-three .look-head{background:var(--look-card)}

/* figures: two panels that stack on a phone at their own size; the coffee sentence's wide and narrow drawings */
:root[data-alive-ui] body main.col .ode-panels{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 20px}
:root[data-alive-ui] body main.col .ode-panels>svg{flex:none;max-width:100%;height:auto;margin:0}
:root[data-alive-ui] body main.col .ode-fig2>svg{display:block;max-width:100%;height:auto;margin:0 auto}
:root[data-alive-ui] body main.col .ode-fig2>svg.ode-n2{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ode-fig2>svg.ode-w2{display:none}
  :root[data-alive-ui] body main.col .ode-fig2>svg.ode-n2{display:block}
}

/* Key concepts: a check's rows sit in the card at the size of the other rows */
:root[data-alive-ui] body main.col .look-kgrid .look-rows .katex{font-size:1.02em}
:root[data-alive-ui] body main.col .look-kgrid .look-rows .row+.row{margin-top:10px}

/* this page's rows are short: centred in their card they read as one unit instead of hugging the left edge */
:root[data-alive-ui] body main.col .look-card>.row .math-chain{justify-content:center}
:root[data-alive-ui] body main.col .look-card .ode-check{justify-content:center}
:root[data-alive-ui] body main.col .look-card .ode-chips{justify-content:center}
/* an algebra film's poster holds two problems: more space between them than between a problem's own lines */
:root[data-alive-ui] body main.col .ex[data-poster=math] .sheet-math{gap:22px}
/* on a phone each candidate at x = 0 is one row: the candidate beside its three values, not three tall columns */
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ode-three .look-col{display:grid;grid-template-columns:46% 1fr}
  :root[data-alive-ui] body main.col .ode-three .look-head{grid-row:1/4;border-bottom:0;border-right:1px solid var(--look-edge);align-items:center}
  :root[data-alive-ui] body main.col .ode-three .look-cell{padding:6px 12px}
}
/* a Key concepts title with maths in it: the shared title is a flex row, which split "Finding", r and the rest into
   three columns; as a block the words and r read as one line beside the number */
:root[data-alive-ui] body main.col .look-kgrid .kn.ode-kn{display:block}
:root[data-alive-ui] body main.col .look-kgrid .kn.ode-kn::before{display:inline-grid;vertical-align:middle;margin:-3px 10px 0 0}
