/* Frame 45: the wage equation in words over two tracks, trade above AI, each led by its painting under
   its name (prototype F of prototypes/immiserizing/). Each track runs from 1 (even adoption) to 8 on a
   ratio scale, so equal steps are equal ratios. Adoption jaggedness is a red bar from 1 to its value and
   1 + frontier jaggedness a blue tick across the track, both painted by trade-equation.js; the whole
   denominator is blue, so each blue tick reads as it. Trade's two numbers name their terms; each track
   ends in an arrow to its verdict, in the workers' plum like "Wage growth", with a painted arrow the way
   wages go. */
.trade-equation-frame { --adopt: var(--palette-purchase); --frontier: var(--palette-machine); }
.trade-equation-frame .trade-deck { max-width: none; }
.trade-equation-frame .we-body { margin: auto 0; }
.trade-equation-frame .wf-eq { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 70px .6em; padding: 64px 0 0; font: 500 clamp(26px, 2.45vw, 42px)/1.15 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.trade-equation-frame .wf { display: inline-grid; grid-template-rows: 1fr 1fr; text-align: center; white-space: nowrap; }
.trade-equation-frame .wf > span { padding: 0 .2em; }
.trade-equation-frame .wf > span:first-child { padding-bottom: .2em; border-bottom: 2px solid currentColor; }
.trade-equation-frame .wf > span:last-child { padding-top: .2em; }
.trade-equation-frame .wf-op { font-family: var(--math); font-weight: 400; white-space: nowrap; }
.trade-equation-frame .wf-term { position: relative; }
.trade-equation-frame .wf-term--adopt { color: var(--adopt); }
.trade-equation-frame .wf-term--frontier { color: var(--frontier); }
.trade-equation-frame .wf-scale { position: absolute; left: 50%; display: flex; align-items: center; gap: 12px; transform: translateX(-50%); white-space: nowrap; font: 400 21px/1 var(--serif); letter-spacing: -.005em; }
.trade-equation-frame .wf-scale--above { bottom: calc(100% + 30px); }
.trade-equation-frame .wf-scale svg { width: 64px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.trade-equation-frame .wf-wage { color: var(--palette-human); }
.trade-equation-frame .tr-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; column-gap: 56px; row-gap: 56px; align-items: center; padding-top: 64px; }
.trade-equation-frame .tr { display: contents; }
.trade-equation-frame .tr-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.trade-equation-frame .tr-name { margin: 0; display: grid; gap: 5px; }
.trade-equation-frame .tr-name strong { color: var(--ink); font: 600 30px/1.05 var(--serif); letter-spacing: -.02em; }
/* Each painting is a crop of a larger one in the deck: the port of the trade title slide and the computer of
   the cost slide. The port's paper ground gets a hand-cut edge from trade-equation.js. */
.trade-equation-frame .tr-art { position: relative; height: clamp(100px, 15vh, 150px); overflow: hidden; }
.trade-equation-frame .tr-art--port { aspect-ratio: 812 / 670; -webkit-mask: var(--edge) center / 100% 100% no-repeat; mask: var(--edge) center / 100% 100% no-repeat; }
.trade-equation-frame .tr-art--desk { aspect-ratio: 850 / 590; }
.trade-equation-frame .tr-art img { display: block; max-width: none; height: auto; }
.trade-equation-frame .tr-art--port img { width: 205.91%; margin: -16.01% 0 0 -105.91%; }
.trade-equation-frame .tr-art--desk img { width: 255.53%; margin: -12.94% 0 0 -152.94%; }
.trade-equation-frame .tr-track { position: relative; height: 40px; }
.trade-equation-frame .tr-track::before { content: ""; position: absolute; left: 0; right: -26px; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--palette-rule-dark); }
.trade-equation-frame .tr-bar { position: absolute; left: 0; top: 50%; }
.trade-equation-frame .tr-tick { position: absolute; left: var(--line); top: 50%; margin: -28px 0 0 -6px; }
.trade-equation-frame .tr-arrow { position: absolute; left: calc(100% + 16px); top: 50%; width: 12px; height: 20px; margin-top: -10px; overflow: visible; fill: none; stroke: var(--palette-rule-dark); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trade-equation-frame .tr-mark { position: absolute; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); }
.trade-equation-frame .tr-mark--adopt { left: var(--at); bottom: calc(50% + 13px); align-items: flex-end; color: var(--adopt); transform: translateX(calc(-100% + 4px)); }
.trade-equation-frame .tr-mark--line { left: var(--line); top: calc(50% + 32px); color: var(--frontier); }
.trade-equation-frame .tr-mark b { font: 600 30px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.trade-equation-frame .tr-label { position: absolute; font: 400 21px/1.2 var(--serif); letter-spacing: -.005em; white-space: nowrap; }
.trade-equation-frame .tr-mark--adopt .tr-label { right: 0; bottom: calc(100% + 8px); }
.trade-equation-frame .tr-mark--line .tr-label { left: 0; top: calc(100% + 8px); }
.trade-equation-frame .tr-verdict { display: flex; align-items: center; gap: .28em; margin: 0; color: var(--palette-human); font: 600 clamp(30px, 2.55vw, 44px)/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.trade-equation-frame .tr-verdict-arrow { flex: none; display: block; }

@media (max-height: 760px) and (min-width: 761px) {
  .trade-equation-frame .wf-scale { font-size: 19px; }
  .trade-equation-frame .tr-rows { padding-top: 40px; row-gap: 40px; }
  .trade-equation-frame .tr-label { font-size: 19px; }
}
/* On a phone each track spans the width, under its name, with the painting small beside it, and its verdict. */
@media (max-width: 760px) {
  .trade-equation-frame .wf-eq { padding-top: 28px; row-gap: 64px; font-size: clamp(19px, 5.6vw, 26px); }
  .trade-equation-frame .wf-scale { font-size: 15px; gap: 8px; }
  .trade-equation-frame .wf-scale--above { bottom: calc(100% + 20px); }
  .trade-equation-frame .wf-scale svg { width: 36px; }
  .trade-equation-frame .tr-rows { grid-template-columns: minmax(0, 1fr); row-gap: 18px; padding-top: 24px; }
  .trade-equation-frame .tr { display: grid; grid-template-columns: minmax(0, 1fr) max-content; grid-template-areas: "name verdict" "track track"; column-gap: 12px; align-items: center; }
  .trade-equation-frame .tr-head { grid-area: name; flex-direction: row; align-items: center; gap: 12px; }
  .trade-equation-frame .tr-art { order: -1; height: 50px; }
  .trade-equation-frame .tr-name strong { font-size: 24px; }
  .trade-equation-frame .tr-verdict { grid-area: verdict; justify-content: flex-end; font-size: 24px; }
  .trade-equation-frame .tr-track { grid-area: track; margin: 44px 26px 40px 0; }
  .trade-equation-frame .tr--trade .tr-track { margin: 70px 26px 72px 0; }
  .trade-equation-frame .tr-mark b { font-size: 24px; }
  .trade-equation-frame .tr-label { font-size: 15px; }
}
