/* Vector-Valued Functions and Motion: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css),
   through the macros in katex-macros.json (\hx horizontal blue, \vy vertical pink, \vel velocity green, \acc acceleration orange,
   \pos position violet; planning/colour.md). */

/* One chain, two breaks: on a wide screen a chain holds two or three "=" to a line, breaking where it moves on; on a phone the same
   chain takes one "=" to a line, so nothing scrolls sideways. */
:root[data-alive-ui] body main.col .vm-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .vm-wide{display:none}
  :root[data-alive-ui] body main.col .vm-narrow{display:block}
}

/* A figure and the rows it shows, in one card: |v(2)| = 15 over the arrow labelled 15, the sum v + a dt over its picture,
   the arrow-against-path comparison under the two lengths. The figure keeps its own size, centred. */
:root[data-alive-ui] body main.col .look-card>figure.diagram{margin:18px 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}
:root[data-alive-ui] body main.col .look-card>figure.diagram+:is(.row,.vm-wide,.vm-narrow){margin-top:16px}
:root[data-alive-ui] body main.col .look-card .math-chain{justify-content:center}

/* ⟨t³, t²⟩ and its sharp point: the figure at its own size beside its three statements (the shared .9fr/1.1fr split shrank it). */
:root[data-alive-ui] body main.col .look-pair.vm-pair{grid-template-columns:auto minmax(0,1fr);align-items:center}
:root[data-alive-ui] body main.col .look-pair.vm-pair>figure.diagram>svg:not(.katex svg){width:auto;max-width:100%;height:auto}
@media (max-width:640px){:root[data-alive-ui] body main.col .look-pair.vm-pair{grid-template-columns:1fr}}

/* On a phone the figures are as wide as the column allows: the card around a figure keeps its top and bottom room but gives its
   sides to the drawing, so a 410 px figure isn't shrunk with its labels. */
@media (max-width:640px){
  :root[data-alive-ui] body main.col>section>figure.diagram,
  :root[data-alive-ui] body main.col .look-card.vm-stack{padding-left:6px;padding-right:6px}
  :root[data-alive-ui] body main.col .look-card.vm-stack>:not(figure){padding-left:8px;padding-right:8px}
}

/* Key concepts: every entry spans the grid (each has a formula wider than half a card), and the first sets its figure at its own
   size beside its rows, labels over their formulas. */
:root[data-alive-ui] body main.col .look-kpair.vm-kpair{grid-template-columns:auto minmax(0,1fr)}
:root[data-alive-ui] body main.col .vm-kpair .kr{grid-template-columns:1fr;gap:4px}
:root[data-alive-ui] body main.col .vm-kpair .kr:first-child{border-top:0}
:root[data-alive-ui] body main.col .look-kgrid .kv{column-gap:22px}
:root[data-alive-ui] body main.col .look-kgrid .kr .kv .katex{font-size:1.02em}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-kpair.vm-kpair{grid-template-columns:1fr}
}

/* Practice: a vector or point answer reads as one line, ⟨ [ ] , [ ] ⟩, with short boxes. */
:root[data-alive-ui] body main.col .prob .answer-fields{display:flex;flex-wrap:wrap;gap:10px 28px;align-items:center}
:root[data-alive-ui] body main.col .prob .answer-fields .vm-vec{display:inline-flex;align-items:center;gap:6px 10px;flex-wrap:wrap}
:root[data-alive-ui] body main.col .prob .answer-fields .vm-box{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
:root[data-alive-ui] body main.col .prob .answer-fields .katex{white-space:nowrap}
:root[data-alive-ui] body main.col .prob .answer-fields .vm-vec input{width:84px;min-width:0}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .prob .answer-fields .vm-vec input{width:56px}
}
