/* The Squeeze Theorem and Trigonometric Limits: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css). */

/* A small heading over a group of rows in a card ("Plugging in", "At x = 4"), upright and in ink. It is its own class,
   not a .row-label: that one is uppercased, which would turn the x of "At x = 4" into a capital, and it sits beside the
   maths, where a phone has no room for "The product law" and its row. */
:root[data-alive-ui] body main.col .sq-head{font:500 15px/1.4 var(--lf-label);color:var(--ink);margin:0 0 6px}
:root[data-alive-ui] body main.col .sq-head .katex{font-size:1.08em}
:root[data-alive-ui] body main.col .sq-group+.sq-group{margin-top:20px}
:root[data-alive-ui] body main.col .look-rows .sq-group+.row{margin-top:14px}

/* Two short results side by side, such as the two walls' limits: each stays whole and they wrap as units on a phone,
   where one line split at "=" read "lim(−x²) = 0, lim x²" / "= 0". */
:root[data-alive-ui] body main.col .sq-two{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 48px}
:root[data-alive-ui] body main.col .look-goal.sq-two{justify-content:center;gap:10px 56px}
:root[data-alive-ui] body main.col .sq-two>.math-chain,:root[data-alive-ui] body main.col .sq-two>.katex-display{margin:0}
:root[data-alive-ui] body main.col .sol .sq-two{margin:10px 0}

/* A figure beside its rows keeps its own drawn size: the shared pair's .9fr column is narrower than the 360 px theorem
   and wall figures, and a shrunk figure shrinks its labels. The rows take what is left, and the pair stacks on a phone. */
:root[data-alive-ui] body main.col .look-pair.sq-own{grid-template-columns:max-content minmax(0,1fr)}
:root[data-alive-ui] body main.col .look-pair.sq-own>.look-rows{justify-self:center}

/* In the theorem, the conclusion is set a little apart from the two conditions it follows from. */
:root[data-alive-ui] body main.col .sq-theorem .row.sq-then{margin-top:22px}
:root[data-alive-ui] body main.col .look-card .row.sq-last{margin-top:18px}

/* One chain, two breaks: two "=" to a line on a wide screen, one on a phone, so nothing scrolls sideways. */
:root[data-alive-ui] body main.col .sq-narrow{display:none}

@media (max-width:640px){
  :root[data-alive-ui] body main.col .look-pair.sq-own{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col .sq-wide{display:none}
  :root[data-alive-ui] body main.col .sq-narrow{display:block}
  :root[data-alive-ui] body main.col .sq-two{gap:6px 32px}
}

/* The theorem's condition sits under the inequality it qualifies: beside the 360 px figure, one line held both and broke at "≤". */
:root[data-alive-ui] body main.col .look-rows .row.sq-cond{margin-top:2px}

/* Key concepts: every card spans the grid, formulas on the left at their own width and the note beside them. In half-width
   cards the formulas broke over three lines ("→ ½" alone) and each note ran twenty lines down a narrow column. */
:root[data-alive-ui] body main.col .kb.sq-kside{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:10px 26px;align-items:center}
:root[data-alive-ui] body main.col .kb.sq-kside>.knote{margin:0}
:root[data-alive-ui] body main.col .look-kpair.sq-own{grid-template-columns:max-content minmax(0,1fr)}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .kb.sq-kside,:root[data-alive-ui] body main.col .look-kpair.sq-own{grid-template-columns:1fr}
}
