/* Amazon Talent — bespoke motion inside its story sheets (loaded after sheets.css) */
.tl-note { transform: translate(var(--x0), var(--y0)); transition: transform 1.3s cubic-bezier(.16,1,.3,1), fill .6s; transition-delay: calc(var(--i, 0) * 45ms + 250ms); }
.tl-synth.is-on .tl-note, .osheet:not(.os-motion) .tl-note { transform: translate(var(--x1), var(--y1)); }
.tl-users { animation: tl-spin 16s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }

/* ---- layout helpers shared by the talent sheets ---- */
/* four-up stats collided at 780px ("1,842" ran into "4"), so every talent sheet sets them 2 x 2 */
.case-talent .osheet .os-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl-list li { position: relative; padding-left: 18px; color: var(--gray); font-size: var(--t-small); line-height: 1.5; }
.tl-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--shu); }
.tl-duo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(18px, 3vw, 36px); align-items: center; }
.tl-duo--even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.tl-gallery-ex { --ar: 4 / 3; }
.tl-gallery-ex .os-slide img { --ar: 4 / 3; }

/* ---- leadership: the thread diagram needs room for its labels ---- */
.tl-thread { max-width: 640px; margin: 0 auto; }

/* ---- handoff: the highlight sweeps across the six result columns in order ---- */
.tl-sweep { transform-box: view-box; }
.osheet.os-motion .os-frame.is-on .tl-sweep { animation: tl-sweep 6s cubic-bezier(.65,0,.35,1) infinite 1s; }
@keyframes tl-sweep {
  0%, 12% { transform: translateX(0); }
  16.6%, 29% { transform: translateX(44px); }
  33.3%, 46% { transform: translateX(88px); }
  50%, 62% { transform: translateX(132px); }
  66.6%, 79% { transform: translateX(176px); }
  83.3%, 96% { transform: translateX(220px); }
  100% { transform: translateX(0); }
}

/* ---- numbers: a keyboard focus ring steps through the controls in reading order ---- */
.tl-ring { transform-box: view-box; }
.osheet.os-motion .is-in .tl-ring { animation: tl-focus 7.2s cubic-bezier(.65,0,.35,1) infinite .8s; }
@keyframes tl-focus {
  0%, 13% { transform: translate(0, 0); }
  16.6%, 29.6% { transform: translate(220px, 0); }
  33.3%, 46.3% { transform: translate(0, 80px); }
  50%, 63% { transform: translate(220px, 80px); }
  66.6%, 79.6% { transform: translate(0, 160px); }
  83.3%, 96.3% { transform: translate(220px, 160px); }
  100% { transform: translate(0, 0); }
}

/* ---- what I got wrong: Talent Pool folds into Search, then the loop resets ---- */
.tl-pool { transform-box: fill-box; transform-origin: center; }
.osheet.os-motion .tl-fold.is-on .tl-pool { animation: tl-fold 5s cubic-bezier(.6,0,.3,1) infinite 1.6s; }
@keyframes tl-fold {
  0%, 18% { transform: none; opacity: 1; }
  55% { transform: translate(-145px, -138px) scale(.3); opacity: 0; }
  80% { transform: translate(-145px, -138px) scale(.3); opacity: 0; }
  81% { transform: none; opacity: 0; }
  100% { transform: none; opacity: 1; }
}

@media (max-width: 760px) {
  .tl-duo, .tl-duo--even { grid-template-columns: 1fr; }
  .os-scrub-stage .os-stage { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-sweep, .tl-ring, .tl-pool, .tl-users { animation: none !important; }
}
/* v0.227: the 150px of room under the glossary is gone. The sticky search
   bar only parks over the last terms while they scroll off the top; at the
   end of the sheet the list ends well below it. */
/* phone: the diagrams scale to ~320px wide, so lift their small labels to stay legible */
@media (max-width: 760px) {
  .case-talent .osheet:not(#ovResearch) .os-stage text[font-size="13"],
  .case-talent .osheet:not(#ovResearch) .os-stage text[font-size="14"],
  .case-talent .osheet:not(#ovResearch) .os-stage text[font-size="15"],
  .case-talent .osheet:not(#ovResearch) .os-stage text[font-size="16"] { font-size: 18px; }
  .case-talent .tl-thread text[font-size="19"] { font-size: 23px; }
  .case-talent .tl-thread text[font-size="13"] { font-size: 16px; }
}

/* Page, not sheet: on a direct #read-deep load main.js never arms [data-lite-scene]
   in the deep view, so the (now short) deep "what I got wrong" list stayed at opacity 0.
   Keep it readable regardless. */
#depth-deep .wrongs-list li { opacity: 1; transform: none; }
