/* Article "What got more expensive, and what got cheaper" (/articles/what-got-more-expensive/):
   its own pictures, on top of articles.css. Classes start with pg-. Three groups,
   the same in every chart: rose more than pay (--bad), more than prices but less
   than pay (--s2, orange), less than prices (--good). Yardsticks are ink. */

.art { --pg-hi: var(--bad); --pg-mid: var(--s2); --pg-lo: var(--good); }
.sw-sq.pg-hi { background: var(--pg-hi); }
.sw-sq.pg-mid { background: var(--pg-mid); }
.sw-sq.pg-lo { background: var(--pg-lo); }
.ln.pg-wage, .pg-ref-wage { stroke: var(--ink); stroke-width: 3; }
.ln.pg-all, .pg-ref-all { stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: 6 4; }
.legend .ln.pg-all { stroke-dasharray: 5 3; }
.pg-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.pg-dot.g-hi { background: var(--pg-hi); } .pg-dot.g-mid { background: var(--pg-mid); } .pg-dot.g-lo { background: var(--pg-lo); }
.pg-table tr.pg-ref th, .pg-table tr.pg-ref td { font-weight: 650; color: var(--ink); background: var(--surface-2); }
.pg-tip-note { margin-top: 4px; font-size: 11px; color: var(--muted); }

/* ---------- the fan ---------- */
.pg-plot-fan { min-height: 500px; }
.pg-plot-fan svg, .pg-plot-eras svg, .pg-plot-race svg { touch-action: pan-y; }
.pg-zero { stroke: var(--ink); stroke-opacity: 0.4; stroke-width: 1.2; }
.pg-ln { fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; transition: opacity 0.12s; }
.pg-ln.pg-hi { stroke: var(--pg-hi); } .pg-ln.pg-mid { stroke: var(--pg-mid); } .pg-ln.pg-lo { stroke: var(--pg-lo); }
.pg-ref-all, .pg-ref-wage { fill: none; stroke-linejoin: round; transition: opacity 0.12s; }
.pg-ln.on { stroke-width: 3.2; opacity: 1; }
.pg-ln.dim, .pg-ref-all.dim, .pg-ref-wage.dim, .pg-lead.dim, .pg-lbl.dim { opacity: 0.16; }
.pg-lead { fill: none; stroke-width: 1; opacity: 0.7; }
.pg-lead.pg-hi { stroke: var(--pg-hi); } .pg-lead.pg-mid { stroke: var(--pg-mid); } .pg-lead.pg-lo { stroke: var(--pg-lo); }
.pg-lead.pg-ref { stroke: var(--ink); }
.pg-lbl { fill: var(--ink); font: 550 11.5px var(--font); }
.pg-lbl.ref { font-weight: 700; }
.pg-lbl.on { font-weight: 700; }
.pg-lbl-v { font: 600 11px var(--mono); letter-spacing: -0.03em; }
.pg-lbl-v.pg-hi { fill: var(--pg-hi); } .pg-lbl-v.pg-mid { fill: var(--pg-mid); } .pg-lbl-v.pg-lo { fill: var(--pg-lo); }
.pg-lbl-v.pg-ref { fill: var(--ink); }
.pg-cross { stroke: var(--axis); stroke-width: 1; }
.pg-hot { stroke: var(--surface); stroke-width: 2; }
.pg-hot.pg-hi { fill: var(--pg-hi); } .pg-hot.pg-mid { fill: var(--pg-mid); } .pg-hot.pg-lo { fill: var(--pg-lo); } .pg-hot.pg-ref { fill: var(--ink); }
@media (max-width: 640px) { .pg-lbl { font-size: 10.5px; } .pg-lbl-v { font-size: 10px; } }

/* ---------- price tags ---------- */
.pg-tags { list-style: none; margin: 0; padding: 8px 8px 8px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px 22px; }
.pg-tag { --c: var(--pg-hi); position: relative; display: flex; flex-direction: column; min-width: 0; padding: 13px 14px 12px 20px;
  border-radius: 5px 16px 16px 5px; background: color-mix(in srgb, var(--c) 9%, var(--surface-2)); }
.pg-tag.g-mid { --c: var(--pg-mid); } .pg-tag.g-lo { --c: var(--pg-lo); }
.pg-tag::before { content: ""; position: absolute; left: -12px; top: 50%; width: 25px; height: 25px; border-radius: 5px;
  transform: translateY(-50%) rotate(45deg); background: inherit; }
.pg-tag-hole { position: absolute; z-index: 1; left: -3px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.pg-tag > span:not(.pg-tag-hole) { position: relative; z-index: 1; }
.pg-tag-name { font: 650 14px/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.pg-tag-was { margin-top: 6px; font: 500 11.5px/1.2 var(--mono); color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.pg-tag-now { margin-top: 2px; font: 650 28px/1.05 var(--mono); letter-spacing: -0.05em; color: var(--ink); }
.pg-tag-sub { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.pg-pill { align-self: flex-start; margin-top: 8px; padding: 4px 9px; border-radius: 999px; font: 650 12px/1 var(--mono); letter-spacing: -0.02em;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.pg-pill.g-hi { --c: var(--pg-hi); } .pg-pill.g-mid { --c: color-mix(in srgb, var(--pg-mid) 72%, var(--ink)); } .pg-pill.g-lo { --c: var(--pg-lo); }
@media (max-width: 560px) {
  .pg-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding: 6px 4px 6px 16px; }
  .pg-tag { padding: 11px 10px 10px 16px; }
  .pg-tag-name { font-size: 13px; }
  .pg-tag-now { font-size: 23px; }
}

/* ---------- hours of work: one block per hour ---------- */
.pg-hours { --nw: 118px; --vw: 92px; --gap: 12px; --bg: 3px; position: relative; padding: 30px 10px 6px; }
.pg-hr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pg-hr-row { --c: var(--pg-hi); display: grid; grid-template-columns: var(--nw) minmax(0, 1fr) var(--vw); align-items: center; gap: var(--gap); }
.pg-hr-row.g-mid { --c: var(--pg-mid); } .pg-hr-row.g-lo { --c: var(--pg-lo); }
.pg-hr-name { font: 600 13px/1.2 var(--font); color: var(--ink); text-align: right; }
.pg-hr-track { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--bg); }
.pg-hr-track i { height: 17px; border-radius: 4px; background: linear-gradient(90deg, var(--c) calc(var(--f) * 100%), var(--track) 0); }
.pg-hr-v { font: 600 12.5px/1 var(--mono); letter-spacing: -0.03em; color: var(--ink-2); white-space: nowrap; }
/* the January 2000 mark: hour h = i whole blocks plus r of the next one */
.pg-hr-mark { --tw: calc(100% - 20px - var(--nw) - var(--vw) - 2 * var(--gap)); --pitch: calc((var(--tw) + var(--bg)) / var(--n));
  position: absolute; top: 20px; bottom: 2px; width: 0; border-left: 2px dashed var(--ink); opacity: 0.75; pointer-events: none;
  left: calc(10px + var(--nw) + var(--gap) + var(--pitch) * var(--i) + (var(--pitch) - var(--bg)) * var(--r) - 1px); }
.pg-hr-mark span { position: absolute; top: -20px; left: 0; transform: translateX(-50%); white-space: nowrap; font: 650 11.5px/1 var(--mono); color: var(--ink); }
.pg-sw-block { display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: var(--ink-2); }
.pg-sw-mark { display: inline-block; width: 0; height: 12px; border-left: 2px dashed var(--ink); vertical-align: -1px; margin: 0 2px; }
@media (max-width: 560px) {
  .pg-hours { --nw: 84px; --vw: 62px; --gap: 7px; --bg: 2px; }
  .pg-hr-name { white-space: nowrap; }
  .pg-hr-name { font-size: 11.5px; }
  .pg-hr-v { font-size: 11px; }
  .pg-hr-track i { height: 15px; border-radius: 3px; }
}

/* ---------- the quality note ---------- */
.pg-note { margin: 6px 0 0; padding: 16px 20px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; line-height: 1.6; }
.pg-note .label { margin: 0 0 4px; }
.pg-note p:last-child { margin: 0; }

/* ---------- before and after 2000 ---------- */
.pg-plot-eras { min-height: 520px; }
.pg-era-hl { fill: var(--hover); }
.pg-era-name { fill: var(--ink); font: 550 12.5px var(--font); }
.pg-era-name.ref { font-weight: 750; }
.pg-era-link { stroke: var(--axis); stroke-width: 2.4; stroke-linecap: round; }
.pg-era-ring { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.6; }
.pg-era-dot { stroke: var(--surface); stroke-width: 1.5; }
.pg-era-dot.pg-hi { fill: var(--pg-hi); } .pg-era-dot.pg-mid { fill: var(--pg-mid); } .pg-era-dot.pg-lo { fill: var(--pg-lo); }
.pg-era-dot.pg-ref { fill: var(--ink); }
.pg-era-v { fill: var(--ink-2); font: 600 11.5px var(--mono); letter-spacing: -0.03em; }
.pg-sw-ring, .pg-sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; }
.pg-sw-ring { box-shadow: inset 0 0 0 1.6px var(--ink-2); }
.pg-sw-dot { background: var(--ink); }
.pg-sw-dot.pg-hi { background: var(--pg-hi); } .pg-sw-dot.pg-mid { background: var(--pg-mid); } .pg-sw-dot.pg-lo { background: var(--pg-lo); }
@media (max-width: 640px) { .pg-era-name { font-size: 11px; } .pg-era-v { font-size: 10.5px; } }

/* ---------- the race ---------- */
.pg-race-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 2px 52px 10px 10px; }
.pg-race-ctl .label { margin: 0; }
.pg-play { padding: 9px 14px; font-size: 13px; }
.pg-plot-race { min-height: 330px; }
.pg-lane { fill: var(--track); opacity: 0.7; }
.pg-lane.on { opacity: 1; }
.pg-lane-name { fill: var(--ink); font: 600 12.5px var(--font); }
.pg-start { stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 1.4; stroke-dasharray: 3 3; }
.pg-trail { stroke-width: 3; stroke-linecap: round; opacity: 0.35; }
.pg-trail.a-spx { stroke: var(--spx); } .pg-trail.a-gold { stroke: var(--gold); } .pg-trail.a-home { stroke: var(--home); }
.pg-trail.a-cash { stroke: var(--cash); } .pg-trail.c3 { stroke: var(--s3); } .pg-trail.pg-ink { stroke: var(--ink); }
.dot.pg-ink { fill: var(--ink); }
.sw-sq.pg-ink { background: var(--ink); }
.pg-runner { stroke: var(--surface); stroke-width: 2.5; }
.pg-runner-v { fill: var(--ink); font: 650 12.5px var(--mono); letter-spacing: -0.03em; paint-order: stroke; stroke: var(--track); stroke-width: 3px; }
.pg-rank { fill: var(--muted); font: 650 12px var(--mono); }
.pg-rank.gold { fill: var(--ink); }
.pg-race-date { fill: var(--ink); font: 650 12.5px var(--mono); }
.pg-race-log { fill: var(--muted); font: 500 10.5px var(--font); }
.pg-race-table td.pg-win { font-weight: 750; color: var(--ink); }
.pg-race-table .sw-sq, .pg-table .pg-dot { margin-right: 9px; }
@media (max-width: 640px) { .pg-lane-name { font-size: 11px; } .pg-runner-v { font-size: 11px; } .pg-race-ctl { padding-right: 44px; } }
