/* ============================================================================
   "All jobs at once" (#scale): two charts, by hand vs with Loopr, drawn week by week as the page scrolls.
   Drawn by scale.js. Colours: tokens, plus the chart's eight greens below (shades of "live": each line is one
   growth job at work), checked for colour-blind separation of neighbouring lines in both themes.
   ========================================================================== */
#scale{--sc-g1:#16744a;--sc-g2:#66a915;--sc-g3:#007658;--sc-g4:#61ab00;--sc-g5:#426f31;--sc-g6:#00ad96;--sc-g7:#347400;--sc-g8:#00ad97;
  --sc-hours:var(--err);--sc-limit:var(--ink);--sc-wait:color-mix(in srgb,var(--need) 34%,transparent)}
:root[data-theme="light"] #scale{--sc-g1:#17703A;--sc-g2:#43B86A;--sc-g3:#00866E;--sc-g4:#8AB524;--sc-g5:#1D7A45;--sc-g6:#4FC4A0;--sc-g7:#4E7F14;--sc-g8:#7CCB72;
  --sc-wait:color-mix(in srgb,var(--need) 40%,transparent)}

/* the pinned screen (sticky only while scrolling through it, landing.css .scrolly); one screen tall either way */
#scale .sc-story .pin{height:calc(100svh - 79px);display:flex;flex-direction:column;justify-content:flex-start}
#scale .sc-in{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;padding-top:clamp(14px,2.4svh,32px);padding-bottom:clamp(12px,2svh,28px)}
#scale .sc-h{font-size:clamp(1.9rem,min(3.4vw,5.2svh),3.2rem);line-height:1.04;letter-spacing:-.035em;margin:0;max-width:none}
#scale .sc-sub{color:var(--muted);font-size:clamp(.95rem,1.15vw,1.12rem);line-height:1.5;margin:clamp(6px,1.2svh,14px) 0 0;max-width:46em}

#scale .sc-pair{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:clamp(12px,2.4svh,28px)}
#scale .sc-chart{margin:0;display:flex;flex-direction:column;min-height:0;border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);padding:14px 14px 8px 8px}
#scale .sc-ch{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:0 4px 0 10px}
#scale .sc-ch h3{font-size:1.3rem;font-weight:500;letter-spacing:-.02em}
#scale .sc-stat{display:flex;gap:16px;font-size:.9rem;color:var(--muted);white-space:nowrap;margin:0}
#scale .sc-stat b{font-family:var(--font-display);font-weight:600;color:var(--ink);font-size:1.05rem;letter-spacing:-.01em;margin-right:4px;font-variant-numeric:tabular-nums}
#scale .sc-plot{position:relative;flex:1;min-height:0}
#scale .sc-plot svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}

#scale .t-tick{font-family:var(--font-mono);font-size:10.5px;fill:var(--meta);font-variant-numeric:tabular-nums}
#scale .t-axis{font-family:var(--font-body);font-size:11px;fill:var(--meta)}
#scale .t-lab,#scale .t-note,#scale .t-wait,#scale .t-block{font-family:var(--font-body);font-size:11px;paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
#scale .t-lab{font-size:11.5px;font-weight:500;fill:var(--ink)}
#scale .t-lab.h{font-weight:600}
#scale .t-note,#scale .t-block{fill:var(--muted)}
#scale .t-note.lim,#scale .t-block tspan{fill:var(--ink);font-weight:600}
#scale .t-wait{font-style:italic;fill:var(--need-text)}
#scale .sc-grid line{stroke:var(--line);stroke-width:1}
#scale .sc-line{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#scale .sc-halo{fill:none;stroke:var(--sc-wait);stroke-width:7;stroke-linecap:round}
#scale .sc-leader{fill:none;stroke:var(--faint);stroke-width:1}
#scale .sc-now,#scale .sc-cross{stroke:var(--line-2);stroke-width:1}
#scale .sc-tip{position:absolute;pointer-events:none;background:var(--surface);border:1px solid var(--line-2);border-radius:10px;padding:8px 10px;font-size:12px;line-height:1.45;box-shadow:0 8px 24px rgba(0,0,0,.14);white-space:nowrap;z-index:3}
#scale .sc-tip p{margin:0;display:flex;align-items:center;gap:7px}
#scale .sc-tip i{width:10px;height:2px;border-radius:2px;display:inline-block}
#scale .sc-tip span{margin-left:auto;padding-left:12px;font-variant-numeric:tabular-nums}

#scale .sc-foot{display:flex;align-items:center;gap:8px 28px;margin-top:clamp(8px,1.6svh,16px);flex-wrap:wrap}
#scale .sc-clock{display:flex;align-items:center;gap:12px;font-size:.9rem;color:var(--muted);white-space:nowrap;margin:0}
#scale .sc-clock b{font-family:var(--font-display);font-weight:600;font-size:1.15rem;color:var(--ink);font-variant-numeric:tabular-nums}
#scale .sc-track{display:flex;gap:3px}
#scale .sc-track i{width:9px;height:4px;border-radius:2px;background:var(--line-2)}
#scale .sc-track i.on{background:var(--ink)}
#scale .sc-key{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:.84rem;color:var(--muted);margin:0;padding:0;list-style:none}
#scale .sc-key li{display:flex;align-items:center;gap:7px;white-space:nowrap}
#scale .sc-key i{width:18px;height:2px;border-radius:2px}
#scale .sc-key .g{background:linear-gradient(90deg,var(--sc-g1) 0 33%,var(--sc-g2) 33% 66%,var(--sc-g3) 66%)}
#scale .sc-key .r{background:var(--sc-hours)}
#scale .sc-key .l{height:4px;background:var(--sc-limit)}
#scale .sc-key .w{height:8px;border-radius:4px;background:var(--sc-wait)}
#scale .sc-made{margin:0 0 0 auto;font-size:.8rem;color:var(--meta);white-space:nowrap}
#start .close{margin-top:clamp(28px,4vw,48px)}

/* phones: both charts stacked on the one pinned screen */
@media (max-width:820px){
  #scale .sc-story .pin{top:65px;height:calc(100svh - 65px)}
  #scale .sc-in{padding-top:12px;padding-bottom:10px}
  #scale .sc-h{font-size:1.6rem}
  #scale .sc-sub{font-size:.88rem;margin-top:6px;line-height:1.42}
  #scale .sc-pair{grid-template-columns:1fr;grid-template-rows:1fr 1fr;gap:8px;margin-top:10px}
  #scale .sc-chart{padding:8px 6px 2px 2px}
  #scale .sc-ch{padding:0 4px 0 8px}
  #scale .sc-ch h3{font-size:1.02rem}
  #scale .sc-stat{gap:10px;font-size:.78rem}
  #scale .sc-stat b{font-size:.9rem}
  #scale .t-lab{font-size:10px}
  #scale .t-note,#scale .t-wait,#scale .t-block,#scale .t-axis{font-size:9.5px}
  #scale .t-tick{font-size:9px}
  #scale .sc-foot{margin-top:8px;gap:4px 12px}
  #scale .sc-key{font-size:.72rem;gap:3px 12px}
  #scale .sc-clock{font-size:.78rem}
  #scale .sc-clock b{font-size:.95rem}
  #scale .sc-made{margin:0;font-size:.7rem}
}
/* reduced motion: no pinning, so the section is just its one-screen pin, without the usual section padding */
#scale:not(.scrolly){padding:0}
