/* =====================================================================
   WORKOUT (Nov 6 2026), from the Agents Lens tracker's Workout tab, in the app's look.
   Same rules as the other section files (tools/lint-ui.js): classes start pp-, colours
   live only in the :root block just below, and everything else is tokens.
   ===================================================================== */

/* Workout's own colour, a warm amber, the way Finances and Quran have theirs. A gym day
   shines in it, like the tracker's calendar did. */
:root {
  --wk: #F2A33A;
  --wk-hi: #FFC46B;
  --wk-ink: #1A1003;
  --wk-soft: rgba(242, 163, 58, 0.14);
  --wk-line: rgba(255, 196, 107, 0.4);
  --wk-shine: linear-gradient(110deg, #B66E12 0%, #F2A33A 30%, #FFE2AE 50%, #F2A33A 70%, #B66E12 100%);
  --wk-live: #FF6B5E;
  --wk-viewer: rgba(0, 0, 0, 0.94);
}

.pp-wk { padding-bottom: 48px; }
.pp-tkh-stat.is-wk b { color: var(--wk-hi); }
.pp-wk .pp-linkbtn { color: var(--wk-hi); }
.pp-wk-btn.pp-btn-primary { background: var(--wk); border-color: var(--wk); color: var(--wk-ink); }
.pp-wk-body { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; max-width: 920px; }
.pp-wk-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; max-width: none; }
.pp-wk-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.pp-wk-card {
  background: var(--surface-2);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 var(--edge-hi), var(--shadow-card);
  padding: 16px;
  min-width: 0;
}
.pp-wk-lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.pp-wk-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-faint); }
.pp-wk-none { margin: 4px 2px; font-size: 14px; color: var(--text-faint); }
.pp-wk-livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wk-live); margin-left: 7px; vertical-align: middle; animation: pp-wk-pulse 1.6s ease-in-out infinite; }
.pp-wk-livedot.is-big { width: 12px; height: 12px; margin: 0; flex: none; }
@keyframes pp-wk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pp-wk-shine { from { background-position: 100% 0; } to { background-position: -120% 0; } }

/* ---- attendance: calendar + this week ---- */
.pp-wk-attend { display: flex; gap: 20px; align-items: stretch; }
.pp-wk-cal { flex: 1; min-width: 0; }
.pp-wk-cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 30px; }
.pp-wk-cal-month { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-right: auto; }
.pp-wk-cal.is-editing .pp-wk-cal-month { margin-right: 0; }
.pp-wk-cal.is-editing .pp-wk-cal-sub { margin-left: auto; }
.pp-wk-cal-sub { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.pp-wk-arrow {
  width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--w-line); border-radius: 9px; background: var(--w-card); color: var(--text-dim); cursor: pointer;
}
.pp-wk-arrow:disabled { opacity: .3; cursor: default; }
.pp-wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.pp-wk-dow { margin-bottom: 5px; }
.pp-wk-dow span { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-faint); }
.pp-wk-day {
  height: 38px; border-radius: 9px; border: 1px solid var(--w-line); background: var(--w-card);
  display: flex; align-items: center; justify-content: center; padding: 0;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.pp-wk-day.is-blank { border-color: transparent; background: transparent; }
.pp-wk-day.is-went { background: var(--wk-shine); background-size: 240% 100%; border-color: transparent; color: var(--wk-ink); animation: pp-wk-shine 3s linear infinite; }
.pp-wk-day.is-today { border-color: var(--wk-hi); box-shadow: 0 0 0 1px var(--wk-hi); color: var(--wk-hi); }
.pp-wk-day.is-today.is-went { color: var(--wk-ink); }
.pp-wk-day.is-editable { cursor: pointer; border-style: dashed; border-color: var(--line-2); }
.pp-wk-day.is-editable.is-went { border-color: transparent; }
.pp-wk-cal.is-editing .pp-wk-day.is-locked { opacity: .3; }
.pp-wk-cal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; min-height: 32px; }
.pp-wk-cal-foot small { font-size: 12px; color: var(--text-dim); }
.pp-wk-caledit {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--w-line); background: transparent; color: var(--text-faint); font-size: 12px; font-weight: 650; cursor: pointer;
}
.pp-wk-caledit.is-on { color: var(--wk-hi); border-color: var(--wk-line); background: var(--wk-soft); }

.pp-wk-aside { width: 170px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding-left: 20px; border-left: 1px solid var(--w-line); }
.pp-wk-ring { position: relative; width: 76px; height: 76px; }
.pp-wk-ring svg { display: block; }
.pp-wk-ring-track { fill: none; stroke: var(--w-line); stroke-width: 6; }
.pp-wk-ring-prog { fill: none; stroke: var(--wk); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.pp-wk-ring-mid, .pp-wk-ring-solid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.pp-wk-ring-mid b, .pp-wk-ring-solid b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-wk-ring-mid span, .pp-wk-ring-solid span { font-size: 11px; color: var(--text-faint); }
.pp-wk-ring.is-full .pp-wk-ring-mid b { color: var(--wk-hi); }
.pp-wk-ring-solid { border-radius: 50%; background: var(--wk-shine); background-size: 240% 100%; animation: pp-wk-shine 3s linear infinite; }
.pp-wk-ring-solid b, .pp-wk-ring-solid span { color: var(--wk-ink); }

.pp-wk-box {
  width: 22px; height: 22px; flex: none; border-radius: 7px; border: 1.5px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; color: var(--wk-ink);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.pp-wk-went {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--w-line); background: var(--w-card); color: var(--text); font-size: 14px; font-weight: 650; cursor: pointer;
}
.pp-wk-went.is-on { border-color: var(--wk-line); background: var(--wk-soft); }
.pp-wk-went.is-on .pp-wk-box, .pp-wk-row.is-done .pp-wk-box { background: var(--wk); border-color: var(--wk); }
.pp-wk-cap { font-size: 12px; color: var(--text-faint); margin-top: -6px; }

/* ---- calories burned ---- */
.pp-wk-burn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.pp-wk-burn-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--wk-soft); color: var(--wk-hi); }
.pp-wk-burn-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-wk-burn-meta span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.pp-wk-burn-meta b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pp-wk-burn-meta small { font-size: 13px; font-weight: 600; color: var(--text-faint); }
.pp-wk-burn-sub { margin-left: auto; font-size: 12px; color: var(--text-faint); text-align: right; }

/* ---- chips ---- */
.pp-wk-chips { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 10px; }
.pp-wk-chip { background: var(--w-card); border: 1px solid var(--w-line); border-radius: var(--radius-card); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pp-wk-chip-k { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.pp-wk-chip-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-wk-chip-v small { font-size: 13px; font-weight: 600; color: var(--text-faint); }
.pp-wk-chip-v.is-hi { color: var(--wk-hi); }
.pp-wk-chip.is-text .pp-wk-chip-v { font-size: 15px; font-weight: 600; white-space: normal; line-height: 1.35; }
.pp-wk-chip-in { min-height: 40px; }

/* ---- sections ---- */
.pp-wk-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pp-wk-pills::-webkit-scrollbar { display: none; }
.pp-wk-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--w-line); background: var(--w-card); color: var(--text-dim); font-size: 14px; font-weight: 650; cursor: pointer; white-space: nowrap;
}
.pp-wk-pill.is-on { color: var(--text); border-color: var(--wk-line); background: var(--wk-soft); }
.pp-wk-pill-n { font-size: 12px; font-weight: 700; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.pp-wk-pill.is-on .pp-wk-pill-n { color: var(--wk-hi); }
.pp-wk-pill-add { padding: 0; width: var(--tap); justify-content: center; }

.pp-wk-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 40px; }
.pp-wk-sec-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.pp-wk-sec-count { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.pp-wk-sec-name { max-width: 260px; }
.pp-wk-list { display: flex; flex-direction: column; gap: 6px; }
.pp-wk-row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; text-align: left; width: 100%;
  border: 1px solid var(--w-line); border-radius: var(--radius-sm); background: var(--w-card); color: var(--text); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), opacity .15s var(--ease);
}
.pp-wk-row.is-done { border-color: var(--wk-line); background: var(--wk-soft); }
.pp-wk-row.is-done .pp-wk-nm { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--wk-line); }
.pp-wk-nm { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.pp-wk-pr { flex: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: var(--wk-hi); background: var(--wk-soft); }
.pp-wk-meta { flex: none; font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; text-align: right; }
.pp-wk-erow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr) var(--tap); gap: 6px; align-items: center; }
.pp-wk-addex { align-self: flex-start; margin-top: 4px; }
.pp-wk-foot { display: flex; justify-content: center; }
@media (hover: hover) {
  .pp-wk-row:hover, .pp-wk-went:hover, .pp-wk-pill:hover { border-color: var(--wk-line); }
  button.pp-wk-day:hover { border-color: var(--wk-hi); }
}

/* ---- summaries ---- */
.pp-wk-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-wk-start { min-width: 180px; }
.pp-wk-live { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.pp-wk-live b { display: block; font-size: 15px; }
.pp-wk-live small { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.pp-wk-ctl-acts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pp-wk .pp-wk-cancel { color: var(--text-faint); font-weight: 600; min-height: var(--tap); }
.pp-wk-past { display: flex; flex-direction: column; gap: 10px; }
.pp-wk-past > b { font-size: 16px; }
.pp-wk-past p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.pp-wk-past-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pp-wk-past-row .pp-fld { margin: 0; }
.pp-wk-past-row .pp-input { color-scheme: dark; }
.pp-wk-past-acts { display: flex; justify-content: flex-end; gap: 8px; }
.pp-wk-err { display: flex; align-items: center; gap: 7px; color: var(--late); font-weight: 600; }
.pp-wk-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 36px; }
.pp-wk-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 20px; color: var(--text-faint); }
.pp-wk-empty b { color: var(--text); font-size: 16px; }
.pp-wk-empty p { margin: 0; max-width: 420px; line-height: 1.5; font-size: 14px; }

.pp-wk-recap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pp-wk-recap-head small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.pp-wk-recap-head b { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.pp-wk-recap-dur { text-align: right; }
.pp-wk-recap-dur b { font-family: var(--font); font-size: 22px; font-weight: 700; color: var(--wk-hi); font-variant-numeric: tabular-nums; }
.pp-wk-recap-dur small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pp-wk-fits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.pp-wk-fit { background: var(--w-card); border: 1px solid var(--w-line); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.pp-wk-fit b { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-wk-fit b small { font-size: 12px; font-weight: 600; color: var(--text-faint); }
.pp-wk-fit b em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--text-faint); }
.pp-wk-fit span { font-size: 12px; color: var(--text-faint); }
.pp-wk-mlbl { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; }
.pp-wk-mlbl span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.pp-wk-mlbl small { font-size: 12px; color: var(--wk-hi); font-weight: 700; }
.pp-wk-machines { display: flex; flex-direction: column; gap: 4px; }
.pp-wk-mrow { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--w-line); font-size: 14px; }
.pp-wk-mrow:last-child { border-bottom: 0; }
.pp-wk-mrow .pp-ic { color: var(--wk-hi); flex: none; }
.pp-wk-mname { flex: 1; min-width: 0; font-weight: 600; }
.pp-wk-msec { flex: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-dim); }
.pp-wk-mplan { flex: none; font-size: 13px; color: var(--text-faint); text-align: right; font-variant-numeric: tabular-nums; }
.pp-wk-mplan em { font-style: normal; font-size: 11px; }

.pp-wk-hist { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.pp-wk-hrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 12px; width: 100%; text-align: left;
  border: 1px solid var(--w-line); border-radius: var(--radius-sm); background: var(--w-card); color: var(--text); cursor: pointer;
}
.pp-wk-hrow.is-on { border-color: var(--wk-line); background: var(--wk-soft); }
.pp-wk-hwhen { display: flex; flex-direction: column; min-width: 0; }
.pp-wk-hwhen b { font-size: 14px; }
.pp-wk-hwhen small { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-wk-hstats { display: flex; gap: 12px; flex: none; font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pp-wk-hstats span { display: inline-flex; align-items: center; gap: 4px; }
.pp-wk-hstats .pp-ic { color: var(--text-faint); }

/* ---- progress photos (phone only) ---- */
.pp-wk-photos-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.pp-wk-photos-head b { font-size: 16px; }
.pp-wk-photos-head small { font-size: 13px; color: var(--text-faint); }
.pp-wk-photos-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.pp-wk-file { display: none; }
.pp-wk-scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.pp-wk-sheet {
  width: min(640px, 100%); max-height: 86vh; overflow: auto; padding: 14px 16px calc(18px + var(--safe-bottom));
  background: var(--w-card-hi); border: 1px solid var(--card-line); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-card-hi);
}
.pp-wk-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pp-wk-sheet-head b { font-size: 17px; }
.pp-wk-sheet-head small { font-size: 13px; color: var(--text-faint); margin-left: 6px; }
.pp-wk-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pp-wk-thumb { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface-3); cursor: pointer; }
.pp-wk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-wk-thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11px; font-weight: 600; color: var(--text); background: linear-gradient(transparent, var(--scrim)); }
.pp-wk-viewer { position: fixed; inset: 0; z-index: 95; background: var(--wk-viewer); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(56px + var(--safe-top)) 12px calc(12px + var(--safe-bottom)); }
.pp-wk-viewer img { max-width: 100%; max-height: calc(100% - 70px); object-fit: contain; border-radius: 10px; }
.pp-wk-vx { position: absolute; top: calc(8px + var(--safe-top)); right: 8px; color: var(--text); }
.pp-wk-vnav { position: absolute; top: 50%; transform: translateY(-50%); color: var(--text); }
.pp-wk-vnav.is-left { left: 4px; }
.pp-wk-vnav.is-right { right: 4px; }
.pp-wk-vbar { width: 100%; max-width: 520px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.pp-wk-vbar b { display: block; font-size: 15px; }
.pp-wk-vbar small { font-size: 13px; color: var(--text-faint); }

/* ---- phone ---- */
@media (max-width: 1100px) {
  .pp-wk-cols { grid-template-columns: minmax(0, 1fr); max-width: 920px; }
}
@media (max-width: 760px) {
  .pp-wk-body { margin-top: 14px; gap: 12px; }
  .pp-wk-col { gap: 12px; }
  .pp-wk-card { padding: 14px; }
  .pp-wk-attend { flex-direction: column; gap: 14px; }
  .pp-wk-aside { width: auto; flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--w-line); }
  .pp-wk-aside .pp-wk-lbl { flex-basis: 100%; }
  .pp-wk-cap { flex-basis: 100%; margin-top: -4px; text-align: right; }
  .pp-wk-day { height: auto; aspect-ratio: 1; font-size: 12px; border-radius: 8px; }
  .pp-wk-grid { gap: 4px; }
  .pp-wk-burn { flex-wrap: wrap; }
  .pp-wk-burn-sub { margin-left: 54px; text-align: left; flex-basis: 100%; margin-top: -8px; }
  .pp-wk-chips { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pp-wk-chip.is-text { grid-column: 1 / -1; }
  .pp-wk-chip-v { font-size: 20px; }
  .pp-wk-meta { font-size: 12px; max-width: 34%; }
  .pp-wk-erow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); }
  .pp-wk-erow .pp-wk-ename { grid-column: 1 / -1; }
  .pp-wk-erow .pp-wk-ereps { grid-column: 2; }
  .pp-wk-fits { grid-template-columns: 1fr 1fr; }
  .pp-wk-past-row { grid-template-columns: minmax(0, 1fr); }
  .pp-wk-ctl > .pp-btn { flex: 1; }
  .pp-wk-hstats { gap: 8px; font-size: 12px; }
  .pp-wk-mplan { font-size: 12px; max-width: 38%; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-wk-day.is-went, .pp-wk-ring-solid, .pp-wk-livedot { animation: none; }
}

/* ---- Home widget (Nov 6) ---- */
.pp-wwork { display: flex; flex-direction: column; height: 100%; }
.pp-wwork-body { flex: 1; display: flex; align-items: center; gap: 14px; }
.pp-wwork-body .pp-wk-ring { flex: none; }
.pp-wwork-went { flex: 1; justify-content: center; gap: 7px; min-height: var(--tap); }
.pp-wwork-went.is-on { border-color: var(--wk); color: var(--wk-hi); }
.pp-wwork-state { flex: 1; font-size: 14px; color: var(--text-faint); }
.pp-wwork-state.is-on { color: var(--wk-hi); font-weight: 600; }
