/* Higher-Order Derivatives: page layout. No colours here: every colour is the course palette's (../lib/lesson-colors.css). */

/* A chain that reads on one line on a wide page takes one step per line on a phone, so nothing breaks mid-step */
:root[data-alive-ui] body main.col .hod-narrow{display:none}
:root[data-alive-ui] body main.col .look-card :is(.hod-wide,.hod-narrow)+.row{margin-top:12px}

/* §2's notation table: each derivative's name in a column of its own, its two notations beside it */
:root[data-alive-ui] body main.col .look-card .row.hod-lrow{display:grid;grid-template-columns:170px minmax(0,1fr);column-gap:18px;align-items:center}
:root[data-alive-ui] body main.col .look-card .row.hod-lrow>.row-label{font:500 15px/1.35 var(--lf-label);color:var(--ink);min-width:0;width:auto}
:root[data-alive-ui] body main.col .look-card .row.hod-lrow>:is(.math-chain,.katex-display){grid-column:2;margin:0}

/* Key concepts: a name over its row, the row given the card's full width. Cards 3 to 7 span both columns (kc wide): their
   rows are one line each there, where a half-width card split them at every "=" */
:root[data-alive-ui] body main.col .look-kgrid .kr{display:block;border:0;padding:0;margin:0}
:root[data-alive-ui] body main.col .look-kgrid .kr+.kr{margin-top:12px}
:root[data-alive-ui] body main.col .look-kgrid .kr .kh{display:block;margin:0 0 4px}
:root[data-alive-ui] body main.col .look-kgrid .kr .kv{min-width:0;padding:0}
:root[data-alive-ui] body main.col .look-kgrid .kv .math-chain{margin:0}

@media (max-width:640px){
  :root[data-alive-ui] body main.col .hod-wide{display:none}
  :root[data-alive-ui] body main.col .hod-narrow{display:block}
  :root[data-alive-ui] body main.col .look-card .row.hod-lrow{grid-template-columns:96px minmax(0,1fr);column-gap:12px}
  :root[data-alive-ui] body main.col .look-card .row.hod-lrow>.row-label{font-size:14px}
}

/* Practice 6's table of values fits a phone: on the narrowest screens it is set a little smaller rather than running past the edge */
@media (max-width:420px){
  :root[data-alive-ui] body main.col #p8 .st .math-chain{font-size:.86em}
}
@media (max-width:380px){
  :root[data-alive-ui] body main.col #p8 .st .math-chain{font-size:.82em}
}
