/* Motion: Position, Velocity, and Acceleration: page layout. No colours here: every colour is the course palette's
   (../lib/lesson-colors.css), through the macros in katex-macros.json and the .lc-* classes:
     \pos  blue    position s, its graph, its values, the ball's height
     \vel  pink    velocity v, its values and sign, its graph, speed |v|
     \acc  green   acceleration a, its values and sign, a slope on a v-graph
     \spu  orange  speeding up, only where the page gives that verdict
     \sld  violet  slowing down, only where the page gives that verdict
   (planning/colour.md). */

/* a figure inside one of this page's cards is drawn at its own size, under the rows it belongs to */
:root[data-alive-ui] body main.col .look-card>figure.diagram{margin:16px 0 0;padding:0}
:root[data-alive-ui] body main.col .look-card>figure.diagram>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block;margin:0 auto}

/* a figure beside its rows keeps its own width and the rows take the rest; stacked on a phone */
:root[data-alive-ui] body main.col .look-pair.pva-own{grid-template-columns:auto minmax(0,1fr)}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-pair.pva-own{grid-template-columns:1fr}
}
:root[data-alive-ui] body main.col .look-pair .look-rows .math-chain{justify-content:center}

/* a single equation the paragraph reasons to: on its own line, centred, not a lamp block */
:root[data-alive-ui] body main.col .pva-line{width:fit-content;max-width:100%;margin:16px auto 20px}
:root[data-alive-ui] body main.col .pva-line .math-chain{margin:0;justify-content:center}
:root[data-alive-ui] body main.col .pva-line .katex{font-size:1.1em}

/* a list of values: each wraps whole, never split inside */
:root[data-alive-ui] body main.col .pva-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 30px}
:root[data-alive-ui] body main.col .pva-chip{white-space:nowrap}
:root[data-alive-ui] body main.col .pva-chip .katex{font-size:1.1em}

/* centred rows in a card */
:root[data-alive-ui] body main.col .look-card .math-chain{justify-content:center}

/* one aligned block, broken one way on a wide screen and another on a phone */
:root[data-alive-ui] body main.col .pva-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .pva-wide{display:none}
  :root[data-alive-ui] body main.col .pva-narrow{display:block}
}

/* a figure standing on its own takes less side padding on a phone, so it stays near its own size */
@media (max-width:640px){
  :root[data-alive-ui] body main.col>section>figure.diagram{padding:14px 10px}
}

/* Key concepts: a label head is set in capitals by the base style; the maths in it keeps its own case (s(t), not S(T)) */
:root[data-alive-ui] body main.col .kh .katex{text-transform:none}
:root[data-alive-ui] body main.col .look-kgrid .kc .look-krows .math-chain{justify-content:flex-start}

/* practice: a given graph sits under its statement, at its own size */
:root[data-alive-ui] body main.col .prob>figure.pva-prob-fig{margin:12px 0 10px 44px;padding:0}
:root[data-alive-ui] body main.col .prob>figure.pva-prob-fig>svg:not(.katex svg){width:auto;max-width:100%;height:auto;display:block}
:root[data-alive-ui] body main.col .prob .st .pva-given{margin:12px 0 2px}
:root[data-alive-ui] body main.col .prob .answer-fields{display:flex;flex-wrap:wrap;align-items:center;gap:10px 26px}
:root[data-alive-ui] body main.col .prob .answer-fields label{display:inline-flex;align-items:center;gap:10px}
:root[data-alive-ui] body main.col .prob .answer-fields input.pva-short{width:110px}
:root[data-alive-ui] body main.col .prob .pva-part{margin:16px 0 4px}
:root[data-alive-ui] body main.col .prob .part+.part{margin-top:18px}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .prob>figure.pva-prob-fig{margin-left:0}
  :root[data-alive-ui] body main.col .prob .answer-fields input.pva-short{width:110px}
}

/* a figure beside its rows: no padding of its own, so its column is the drawing's width */
:root[data-alive-ui] body main.col .look-pair.pva-own>figure.diagram{padding:0;max-width:none}

/* Key concepts here hold aligned blocks of two or three lines: the label sits above its rows, not beside them */
:root[data-alive-ui] body main.col .look-kgrid .kc .kr{grid-template-columns:1fr;gap:6px}
:root[data-alive-ui] body main.col .look-kgrid .kc .kv{overflow:visible}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-krows{padding:10px 10px}
}

/* a figure inside a card is centred under its rows */
:root[data-alive-ui] body main.col .look-card>figure.diagram{margin:16px auto 0}
/* a figure beside its rows: a narrower gap, so rows of about 260 px sit beside a 310–370 px drawing */
:root[data-alive-ui] body main.col .look-pair.pva-own{column-gap:22px}
/* the two cases of the speeding-up rule: each read top to bottom, centred, the verdict under its conditions */
:root[data-alive-ui] body main.col .look-compare .look-case{text-align:center}
:root[data-alive-ui] body main.col .look-compare .look-case .math-chain{justify-content:center}
/* captions are content: full size and in ink */
:root[data-alive-ui] body main.col figure.diagram>figcaption{font-size:17px;line-height:1.55;color:var(--ink);font-style:normal}
/* Key concepts: the rows' sheet keeps its tint with a little less side padding, so a three-line block fits the column */
:root[data-alive-ui] body main.col .look-krows{padding:12px 12px}
/* practice: the maths beside an answer field at the size of the statement's maths */
:root[data-alive-ui] body main.col .prob .answer-fields label .katex,:root[data-alive-ui] body main.col .prob .pva-part .katex{font-size:1.12em}
/* the rows' sheet: narrow side padding for the maths (a two- or three-line block needs about 230 px), the label kept inset */
:root[data-alive-ui] body main.col .look-krows{padding:12px 6px}
:root[data-alive-ui] body main.col .look-krows .kh{padding:0 6px}
:root[data-alive-ui] body main.col .look-krows{padding:12px 7px}
:root[data-alive-ui] body main.col .look-krows .kh{padding:0}
/* two steps of one card set apart: where the ball lands, then how fast */
:root[data-alive-ui] body main.col .look-card .row.pva-gap{margin-top:18px}
/* practice: the words and maths beside an answer field are content, so full size, upright and in ink (the shared label is a
   small grey italic caption) */
:root[data-alive-ui] body main.col .prob .answer-fields label{font:400 18px/1.4 'STIX Two Text',Georgia,serif;color:var(--ink)}
:root[data-alive-ui] body main.col .prob .answer-fields label .katex,:root[data-alive-ui] body main.col .prob .pva-part .katex{font-size:1.05em}
