/* /tools/linkedin-summary-generator/ in the painted theme (template-parts/painted/pages/linkedin-summary-generator.php):
   beside the generator's form, whose About section it is (Jordan O. and the role), then one card: the section's title,
   its four paragraphs, each named by the part it plays with a swatch of its colour, and a bar of LinkedIn's 2,600 where
   each paragraph fills its own stretch (--x where it starts and --w how long it is, both shares, unitless), the two
   shades taking turns so the parts read apart, with the count and the room left under it.

   On entry, from the first paint and in CSS alone: the paragraphs come in one by one and each fills its stretch of the
   bar as it lands, then the count shows. The drawn state is the whole section and the filled bar, so with reduced
   motion, or in a browser that runs no animation, it stands drawn from the first paint. */

.lsg { display: grid; gap: 10px; margin: 0; text-align: left; }
.lsg-to { display: flex; align-items: center; gap: 10px; }
.lsg-to .gsp-face { flex: none; width: 34px; height: 34px; border-radius: 50%; }
.lsg-to p { display: grid; gap: 2px; margin: 0; font-size: 13px; line-height: 1.3; }
.lsg-to b { font-weight: 600; color: var(--ink); }
.lsg-to span { font-size: 12px; color: var(--mute); }
.lsg-h { margin: 6px 0 0; font: 600 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--cd) 82%, #000); }
.lsg-lead { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text); }

.lsg-card { display: grid; gap: 12px; margin-top: 2px; padding: 16px 16px 14px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(70, 50, 36, .06), 0 18px 34px -26px rgba(80, 52, 40, .5); }
.lsg-t { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--ink); }
/* a paragraph: the part it plays on the left, its words on the right; the swatch is its stretch's shade */
.lsg-ps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lsg-p { --sh: var(--c); display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: baseline; gap: 12px; }
.lsg-p:nth-child(even) { --sh: color-mix(in srgb, var(--c) 50%, #fff); }
.lsg-k { display: flex; align-items: center; gap: 6px; font: 600 9.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.lsg-k i { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--sh); }
.lsg-p p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text); }

/* the bar of 2,600: a track, each paragraph's stretch in its shade, a hairline of white between them */
.lsg-m { display: grid; gap: 7px; padding-top: 12px; border-top: 1px dashed var(--line); }
.lsg-bar { position: relative; display: block; height: 12px; overflow: hidden; border-radius: 999px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line-2); }
.lsg-bar i { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%); width: calc(var(--w) * 1%); background: var(--c); box-shadow: inset -1.5px 0 0 #fff; transform-origin: left center; }
.lsg-bar i:nth-child(even) { background: color-mix(in srgb, var(--c) 50%, #fff); }
.lsg-bar i:last-child { box-shadow: none; }
.lsg-scale { display: flex; justify-content: space-between; gap: 10px; margin: 0; font: 500 11.5px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--mute); }
.lsg-scale b { font-weight: 600; color: var(--cd); }
.lsg-ft { font-size: 11.5px; line-height: 1.4; color: color-mix(in srgb, var(--mute) 75%, var(--ink)); }

/* the moment, in ms from the first paint: a paragraph every 380 ms, its stretch 150 ms after it, then the count */
@media (prefers-reduced-motion: no-preference) {
  .lsg-p { animation: lsg-in .45s cubic-bezier(.2, .8, .3, 1) calc(200ms + var(--i) * 380ms) backwards; }
  .lsg-bar i { animation: lsg-grow .45s cubic-bezier(.3, .7, .3, 1) calc(350ms + var(--i) * 380ms) backwards; }
  .lsg-scale { animation: lsg-in .35s ease 1900ms backwards; }
}
@keyframes lsg-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes lsg-grow { from { transform: scaleX(0); } }

@media (max-width: 480px) {
  .lsg-card { padding: 14px 14px 12px; }
  .lsg-p { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
