/* Trigonometric Integrals: this page's own blocks, in the shared lesson look (../alive/lesson-look.css).
   Colour meanings are planning/colour.md's, on the course palette (../lib/lesson-colors.css, which lesson-look.css
   imports), through the macros in katex-macros.json; this file defines no colour:
     \sn  lc-violet  a power of sin x or tan x and every form an identity turns it into; u when it stands for sin x or tan x
     \cn  lc-blue    a power of cos x or sec x and its forms; u when it stands for cos x or sec x
     \kd  lc-green   the factor or pair kept with dx, dx with it, and du
     \rt  lc-pink    the factor left without a partner, and the square root it becomes
     \bk  lc-orange  ∫ sec³x dx, the integral that comes back (and I, 2I)
   Every rule is scoped :root[data-alive-ui] body main.col, since the sheet styles outrank a plain page selector. */
.fq .say,figcaption,.kc .knote,.hint,.feedback-copy{color:var(--body)!important}
figcaption{font-style:normal!important}
.sol .ln .step{display:block;font:500 17px/1.4 'STIX Two Text',Georgia,serif;letter-spacing:0;text-transform:none;color:var(--ink);margin:0 0 2px}
.sol .ln+.ln{margin-top:14px}

/* a chain in two breaks: two "=" to a line where there's room, one "=" to a line on a phone, so nothing scrolls sideways */
:root[data-alive-ui] body main.col .ti-narrow{display:none}
@media (max-width:640px){
  :root[data-alive-ui] body main.col .ti-wide{display:none}
  :root[data-alive-ui] body main.col .ti-narrow{display:block}
}

/* the substitution a chain uses: u and the pair kept with dx as du, on a white box with a green outline (the decision of
   the page; coloured text on a neutral ground, as Trigonometric Substitution's substitution box). It sits above the
   chain it feeds, or beside the row it feeds in a table of choices */
:root[data-alive-ui] body main.col .ti-sub{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 22px;width:fit-content;max-width:100%;margin:0 0 16px;padding:7px 16px;border-radius:12px;background:var(--look-card);border:1.5px solid color-mix(in srgb,var(--lc-green) 55%,var(--look-edge))}
:root[data-alive-ui] body main.col .ti-sub>span{white-space:nowrap}
:root[data-alive-ui] body main.col .ti-sub .katex{font-size:1.08em}

/* a line the card is about, centred over the rows that work on it */
:root[data-alive-ui] body main.col .ti-head{display:flex;justify-content:center;margin:0 0 16px}
:root[data-alive-ui] body main.col .ti-head .math-chain{justify-content:center}

/* a table of choices: each substitution beside what it makes of the integrand, one choice per line, so the results
   line up and can be compared (∫ sin²x cos²x dx: a root either way) */
:root[data-alive-ui] body main.col .ti-choices{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:14px 22px;align-items:center}
:root[data-alive-ui] body main.col .ti-choices>.ti-sub{margin:0;flex-direction:column;align-items:flex-start;gap:2px;width:auto;justify-self:stretch}
:root[data-alive-ui] body main.col .ti-choices .math-chain{margin:0}

/* two parallel derivations side by side (sin²x on the left, cos²x on the right) */
:root[data-alive-ui] body main.col .ti-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 28px;align-items:start}
:root[data-alive-ui] body main.col .ti-cols>div{min-width:0}
:root[data-alive-ui] body main.col .ti-cols .row+.row{margin-top:10px}

/* section 3's pairs: sine and cosine on the left, tangent and secant on the right, each line the matching move.
   On a phone each pair stays together, the left item over its right partner */
:root[data-alive-ui] body main.col .ti-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 30px;align-items:baseline}
:root[data-alive-ui] body main.col .ti-two>div{min-width:0}
:root[data-alive-ui] body main.col .ti-two .math-chain{margin:0}

/* facts side by side, each wrapping as a whole */
:root[data-alive-ui] body main.col .ti-pieces{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 40px}
:root[data-alive-ui] body main.col .ti-pieces>span{min-width:0;max-width:100%}
:root[data-alive-ui] body main.col .ti-pieces .math-chain{margin:0}
:root[data-alive-ui] body main.col .look-goal .ti-pieces{justify-content:center;gap:6px 44px}

/* the one fact a chain's middle step uses, set just above the chain (the sentence before it says it); there is no room
   beside a chain that runs the card's width */
:root[data-alive-ui] body main.col .look-card>.row.ti-note{margin-bottom:14px}
:root[data-alive-ui] body main.col .look-card>.row.ti-note .math-chain{justify-content:flex-start}

/* the figure for sin²x at its own width beside the identity it pictures. Clutter pass, 2026-10-03: the column was
   `auto`, and the figure's SVG has only a viewBox (no width), so the auto track sized to 0 and the figure vanished at
   every width above 640 px; the column is now the figure's own 360 px box. */
:root[data-alive-ui] body main.col .look-pair.ti-fig{grid-template-columns:minmax(0,360px) minmax(0,1fr)}
:root[data-alive-ui] body main.col .look-pair .look-rows{align-self:center}

/* Key concepts: rows on the shared quiet sheet */
:root[data-alive-ui] body main.col .look-kgrid .look-krows .row+.row,:root[data-alive-ui] body main.col .look-kgrid .look-krows .row+.ti-pieces,:root[data-alive-ui] body main.col .look-kgrid .look-krows .ti-pieces+.row{margin-top:12px}

/* a solution line that holds several facts: each fact wraps as a whole */
:root[data-alive-ui] body main.col .sol .ti-pieces{gap:0 34px;margin:4px 0}
:root[data-alive-ui] body main.col .sol .ti-pieces .katex-display{margin:.35em 0}

@media (max-width:640px){
  :root[data-alive-ui] body main.col .ti-choices{grid-template-columns:minmax(0,1fr);gap:8px}
  :root[data-alive-ui] body main.col .ti-choices>.ti-sub:not(:first-child){margin-top:14px}
  :root[data-alive-ui] body main.col .ti-cols{grid-template-columns:minmax(0,1fr)}
  :root[data-alive-ui] body main.col .ti-cols>div+div{margin-top:8px}
  :root[data-alive-ui] body main.col .ti-two{grid-template-columns:minmax(0,1fr);gap:6px}
  :root[data-alive-ui] body main.col .ti-two>div:nth-child(2n+3){margin-top:14px}
  :root[data-alive-ui] body main.col .look-pair.ti-fig{grid-template-columns:1fr}
  :root[data-alive-ui] body main.col .ti-choices>.ti-sub{flex-direction:row;align-items:baseline;gap:2px 18px;width:fit-content;justify-self:start}
  :root[data-alive-ui] body main.col .ti-sub{padding:6px 12px;gap:2px 18px}
}
@media (max-width:640px){
  /* the Key concepts sheet keeps its tint but gives its maths the width a phone has */
  :root[data-alive-ui] body main.col .look-kgrid .look-krows{padding:12px 10px}
}

