/* =====================================================================
   THE LIVE SKELETON - capture section companion (index.html #capture)
   A sagittal-plane figure lifts a 12 kg carton from a lift table to a
   shelf on a loop. Every frame is scored with REBA from the skeleton's
   own joint angles (js/ergosphere-skeleton.js), painted onto a timeline,
   and the worst frame is flagged. "Raise the table" re-plans the lift.
   ===================================================================== */

.esk_band { margin: 88px 0 0; }
.esk_head { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.esk_head h4 { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; color: #fff; line-height: 1.25; margin: 0 0 14px; }
.esk_head h4 span { color: #00d4ff; }
.esk_head p { font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.72); margin: 0; }
.esk_mono { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; }

.esk_body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.esk_stage { position: relative; aspect-ratio: 16 / 11; background:
  radial-gradient(ellipse at 45% 35%, rgba(0,212,255,.07), transparent 60%), #0a1424; }
.esk_stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.esk_live { position: absolute; top: 14px; left: 16px; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: rgba(255,255,255,.55); }
.esk_live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f87171; box-shadow: 0 0 8px #f87171; animation: esk_blink 1.6s ease-in-out infinite; }
.esk_band.is-paused .esk_live::before { animation: none; background: rgba(255,255,255,.35); box-shadow: none; }
@keyframes esk_blink { 50% { opacity: .25; } }

/* ---------- readout panel ---------- */
.esk_panel { padding: 22px 22px 18px; border-left: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.015); }
.esk_score { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.esk_num { font-family: 'Poppins', sans-serif; font-size: 64px; font-weight: 700; line-height: 1; color: #4ade80; transition: color .25s ease; min-width: 1.3ch; }
.esk_bandtxt { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #4ade80; transition: color .25s ease; }
.esk_score.b-low .esk_num, .esk_score.b-low .esk_bandtxt, .esk_score.b-neg .esk_num, .esk_score.b-neg .esk_bandtxt { color: #4ade80; }
.esk_score.b-med .esk_num, .esk_score.b-med .esk_bandtxt { color: #fbbf24; }
.esk_score.b-high .esk_num, .esk_score.b-high .esk_bandtxt { color: #f87171; }
.esk_score.b-vhigh .esk_num, .esk_score.b-vhigh .esk_bandtxt { color: #ef4444; }
.esk_cap { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.45); margin: 0 0 14px; }
.esk_ab { font-size: 12px; color: rgba(255,255,255,.55); margin: 0 0 14px; }
.esk_ab b { color: #fff; font-weight: 600; }
.esk_list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.07); }
.esk_list li { display: grid; grid-template-columns: 1fr auto 28px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 13px; color: rgba(255,255,255,.75); }
.esk_list b { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 12.5px; font-weight: 500; color: #fff; }
.esk_list i { font-style: normal; text-align: center; font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 600;
  border-radius: 4px; padding: 2px 0; background: rgba(74,222,128,.12); color: #4ade80; transition: background .25s ease, color .25s ease; }
.esk_list i.l-1 { background: rgba(251,191,36,.14); color: #fbbf24; }
.esk_list i.l-2 { background: rgba(248,113,113,.15); color: #f87171; }

/* ---------- timeline ---------- */
.esk_tl { padding: 16px 22px 6px; border-top: 1px solid rgba(255,255,255,.07); }
.esk_row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 140px; align-items: center; gap: 14px; margin: 0 0 10px; }
.esk_rl { font-size: 12.5px; color: rgba(255,255,255,.6); }
.esk_row.is-on .esk_rl { color: #fff; }
.esk_strip { display: block; width: 100%; height: 34px; border-radius: 4px; background: rgba(255,255,255,.03); }
.esk_peak { font-size: 12px; color: rgba(255,255,255,.5); text-align: right; white-space: nowrap; }
.esk_peak b { font-weight: 600; }

/* ---------- controls ---------- */
.esk_foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 10px 22px 20px; }
.esk_verdict { flex: 1 1 320px; margin: 0; font-family: 'Poppins', sans-serif; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.82); min-height: 2.6em; }
.esk_ctrls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.esk_ctrls > span { font-size: 12.5px; color: rgba(255,255,255,.5); margin-right: 4px; }
.esk_band button.esk_chip { appearance: none; cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: transparent !important; color: rgba(255,255,255,.75) !important;
  transition: border-color .2s ease, color .2s ease, background .2s ease; }
.esk_band button.esk_chip:hover { border-color: rgba(0,212,255,.6); color: #fff !important; }
.esk_band button.esk_chip[aria-pressed="true"] { background: #00d4ff !important; border-color: #00d4ff; color: #062033 !important; }
.esk_band button.esk_play { appearance: none; cursor: pointer; width: 38px; height: 38px; margin-left: 6px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: transparent !important; color: #fff !important; font-size: 13px; line-height: 1; }
.esk_band button.esk_play:hover { border-color: #00d4ff; color: #00d4ff !important; }
.esk_band button:focus-visible { outline: 2px solid #00d4ff; outline-offset: 3px; }
.esk_note { margin: 14px auto 0; max-width: 820px; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.45); text-align: center; }

@media (max-width: 900px) {
  .esk_body { grid-template-columns: minmax(0, 1fr); }
  .esk_panel { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); display: grid; grid-template-columns: auto 1fr; gap: 0 22px; align-items: start; }
  .esk_panel .esk_list { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .esk_band { margin-top: 64px; }
  .esk_head h4 { font-size: 23px; }
  .esk_row { grid-template-columns: 1fr; gap: 6px; }
  .esk_peak { text-align: left; }
  .esk_tl, .esk_foot { padding-left: 14px; padding-right: 14px; }
  .esk_stage { aspect-ratio: 3 / 4; }
  .esk_panel { grid-template-columns: 1fr; padding: 18px 16px 14px; }
  .esk_list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .esk_list li { grid-template-columns: 1fr auto 24px; gap: 6px; font-size: 12.5px; }
  .esk_num { font-size: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .esk_live::before { animation: none; }
  .esk_num, .esk_bandtxt, .esk_list i { transition: none; }
}

/* ---------- NIOSH: the same lift, scored as a task ---------- */
.esk_niosh { padding: 6px 22px 14px; }
.esk_nhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 10px; }
.esk_nhead .esk_cap { margin: 0; }
.esk_nhead em { font-style: normal; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.45); }
.esk_ncells { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.esk_ncell { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 2px; align-items: center;
  padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.02); transition: border-color .3s ease, background .3s ease; }
.esk_nlab { grid-column: 1 / -1; font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 4px; }
.esk_li { grid-row: 2 / 4; font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: rgba(255,255,255,.5); white-space: nowrap; }
.esk_li b { font-size: 34px; font-weight: 700; letter-spacing: 0; margin-right: 5px; color: #4ade80; transition: color .3s ease; }
.esk_nband { font-size: 12.5px; line-height: 1.45; font-weight: 600; color: #4ade80; transition: color .3s ease; }
.esk_nmeta { font-size: 11px; line-height: 1.45; color: rgba(255,255,255,.5); }
.esk_ncell.b-med { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.05); }
.esk_ncell.b-med .esk_li b, .esk_ncell.b-med .esk_nband { color: #fbbf24; }
.esk_ncell.b-high { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.06); }
.esk_ncell.b-high .esk_li b, .esk_ncell.b-high .esk_nband { color: #f87171; }
@media (max-width: 560px) {
  .esk_niosh { padding: 6px 14px 12px; }
  .esk_ncells { grid-template-columns: 1fr; }
  .esk_ncell { grid-template-columns: 1fr; }
  .esk_li { grid-row: auto; margin-bottom: 2px; }
}

/* ---------- carton weight slider ---------- */
.esk_ctrlwrap { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.esk_wctrl label { font-size: 12.5px; color: rgba(255,255,255,.5); margin: 0 4px 0 0; }
.esk_band input.esk_kg { -webkit-appearance: none; appearance: none; width: 170px; height: 4px; margin: 0; padding: 0; border: 0 !important; border-radius: 2px;
  background: linear-gradient(90deg, #4ade80 0%, #4ade80 17%, #fbbf24 17%, #fbbf24 40%, #f87171 40%, #f87171 100%) !important; box-shadow: none !important; outline: none; cursor: pointer; }
.esk_band input.esk_kg::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #00d4ff; box-shadow: 0 0 10px rgba(0,212,255,.6); }
.esk_band input.esk_kg::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #00d4ff; box-shadow: 0 0 10px rgba(0,212,255,.6); }
.esk_band input.esk_kg:focus-visible { outline: 2px solid #00d4ff; outline-offset: 6px; }
.esk_kgv { min-width: 48px; font-size: 13px; font-weight: 600; color: #fff; text-align: right; }
@media (max-width: 900px) { .esk_ctrlwrap { align-items: flex-start; } }
@media (max-width: 560px) { .esk_band input.esk_kg { width: 150px; } }
