/* התקדמות (#/progress), מעקב גוף (#/body), הסקירה השבועית (#/review) and their sheets: goals, records,
   the exercise history, the weigh-in, photos, the weekly questionnaire, the share cards.
   pg- = progress, bt- = body tracking. Tokens only; type in rem. */

/* ---------- shared layout ---------- */
.pg-zone{display:flex;flex-direction:column;gap:12px;min-width:0}
.pg-zone:empty{display:none}
.pg-zone[aria-busy="true"]{opacity:.55}
.pg-h{padding-inline:2px}
.pg-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
.pg-center{text-align:center}
.pg-nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.pg-nums .tile{padding:14px 12px;gap:2px}
.pg-nums .stat b{font-weight:800}
.btn.sm.pg-wide{width:100%}
label.btn{cursor:pointer}
.pg-stat{background:var(--tile-2);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
.pg-stat > span:first-child{font-size:.78rem;color:var(--ink-3)}
.pg-stat b{font-size:1.375rem;font-weight:700;line-height:1.15}
.pg-stat .pill{margin-top:3px}
.pg-door{flex-direction:row;align-items:center;gap:12px}
.pg-door .row-t{flex:1}
/* a native select, with the chevron the reset took away */
.pg-sel{position:relative}
.pg-sel select{padding-inline-end:38px;text-overflow:ellipsis}
.pg-sel::after{content:"";position:absolute;inset-inline-end:16px;top:50%;width:8px;height:8px;margin-top:-6px;border-right:2px solid var(--ink-3);border-bottom:2px solid var(--ink-3);transform:rotate(45deg);pointer-events:none}

/* ---------- charts ---------- */
.chart .trend{fill:none;stroke:var(--ink-3);stroke-width:1.5;stroke-dasharray:4 5;stroke-linecap:round}
.pg-legend{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--ink-3)}
.pg-legend i{width:18px;height:0;border-top:2px dashed var(--ink-3)}
#strengthTile[aria-busy="true"] [data-chart]{opacity:.5}
.bt-fat .chart .line{stroke:var(--secondary)}
.bt-fat .chart .dot{fill:var(--secondary)}
.bt-waist .chart .line{stroke:var(--decor)}
.bt-waist .chart .dot{fill:var(--decor)}
.bt-waist .chart .area{fill:var(--decor-tint)}

/* ---------- goals ---------- */
.pg-goals{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.pg-goal{position:relative;align-items:center;text-align:center;gap:6px;padding:16px 12px 14px}
.pg-goal .ring-in b{font-size:.94rem;font-weight:700}
.pg-goal .ring-in svg{width:24px;height:24px;color:var(--secondary-text);stroke-width:2.6}
.pg-goal-t{font-size:.9rem;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.pg-goal-v{font-size:.78rem;color:var(--ink-3)}
.pg-del{position:absolute;top:6px;inset-inline-end:6px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--ink-3);transition:transform 120ms var(--ease-out),background-color 120ms ease}
.pg-del:active{transform:scale(.94);background:var(--tile-2)}
.pg-del svg{width:17px;height:17px}
.pg-del[aria-busy="true"]{opacity:.4;pointer-events:none}

/* ---------- records ---------- */
.pg-fig{font-size:.94rem;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.pg-more{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.pg-hall{display:flex;flex-direction:column}
.pg-hall-i{display:flex;flex-direction:column;gap:8px;padding:12px 2px;text-align:start;transition:background-color 120ms ease}
.pg-hall-i + .pg-hall-i{border-top:1px solid var(--line)}
.pg-hall-i:active{background:var(--tile-2)}
.pg-hall-h{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pg-hall-h b{font-size:.97rem;font-weight:600;min-width:0}
.pg-cells{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.pg-cell{background:var(--tile-2);border-radius:12px;padding:9px 6px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.pg-cell b{font-size:1.0625rem;font-weight:700}
.pg-cell small{font-size:.7rem;color:var(--ink-3)}
.pg-sets .kv{padding:9px 2px;font-size:.875rem}
.pg-sets .kv > span{color:var(--ink-3)}
.pg-sets .kv b{font-weight:600}

/* ---------- achievements ---------- */
.pg-achs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.pg-ach{gap:6px;padding:14px}
.pg-ach .av{background:var(--tile-2);color:var(--ink-3)}
.pg-ach b{font-size:.94rem;font-weight:600}
.pg-ach small{font-size:.78rem;color:var(--ink-3)}
.pg-ach.on .av{background:var(--wash);color:var(--secondary-text)}
.pg-ach small.pg-ach-ok{display:inline-flex;align-items:center;gap:4px;font-weight:600;color:var(--secondary-text)}
.pg-ach-ok svg{width:14px;height:14px;stroke-width:2.6}
.pg-ach .pbar{margin-top:2px}

/* ---------- share cards ---------- */
.pg-card{border-radius:18px;overflow:hidden}
.pg-card svg{display:block;width:100%;height:auto}
.pg-card-img{width:100%;border-radius:14px;-webkit-touch-callout:default;user-select:auto;-webkit-user-select:auto}

/* ---------- the weekly review ---------- */
.pg-doc{display:flex;flex-direction:column;gap:12px}
.pg-sec{display:flex;align-items:baseline;gap:10px}
.pg-sec > span{font-size:.78rem;font-weight:800;color:var(--secondary-text);letter-spacing:.04em}
.pg-kvs{display:flex;flex-direction:column;margin-block:-6px}
.pg-kvs .kv{padding:10px 2px;align-items:baseline}
.pg-kvs .kv > span{font-size:.9rem;color:var(--ink-2);min-width:0}
.pg-kvs .kv > b{font-size:.97rem;font-weight:600;text-align:end;font-variant-numeric:tabular-nums}
.pg-kvs .kv small{display:block;font-size:.75rem;font-weight:500;color:var(--ink-3)}
.pg-recs{font-size:.8125rem;font-weight:600;color:var(--secondary-text)}
.pg-quote h3{margin-bottom:4px}
.pg-quote p{background:var(--tile-2);border-radius:12px;padding:10px 12px;font-size:.94rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.pg-answers{display:flex;flex-direction:column;gap:12px}
.pg-answers:empty{display:none}
.pg-ans{display:flex;flex-direction:column;gap:6px}
.pg-ans-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:.875rem}
.pg-ans-h span{color:var(--ink-2)}
.pg-ans-h b{font-weight:600}
.pg-reply{background:var(--wash)}
.pg-reply .eyebrow{color:var(--secondary-text)}
.pg-reply-t{font-size:.97rem;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.pg-reply .btn.ghost{background:var(--tile)}
.pg-fill{text-align:center;align-items:stretch}

/* ---------- body tracking ---------- */
.bt-ms{display:flex;flex-direction:column;margin-block:-4px}
.bt-rest{margin-block:0;border-top:1px solid var(--line)}
.bt-m{padding:10px 2px;display:flex;flex-direction:column;gap:1px}
.bt-m + .bt-m{border-top:1px solid var(--line)}
.bt-m p{font-size:.94rem}
.bt-m b{font-weight:700}
.bt-m small{font-size:.78rem;color:var(--ink-3)}
.bt-m .bt-note{font-size:.84rem;color:var(--ink-2);overflow-wrap:anywhere}

.bt-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.bt-cell{position:relative;aspect-ratio:3 / 4;border-radius:12px;overflow:hidden;background:var(--tile-2);display:block;transition:transform 120ms var(--ease-out)}
.bt-cell:active{transform:scale(.97)}
.bt-cell img{width:100%;height:100%;object-fit:cover}
.bt-tag{position:absolute;inset-inline-start:6px;bottom:6px;padding:2px 8px;border-radius:999px;background:var(--toast-bg);color:var(--toast-ink);font-size:.7rem;font-weight:600}
.bt-eye{position:absolute;inset-inline-end:6px;top:6px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--toast-bg);color:var(--toast-ink)}
.bt-eye svg{width:14px;height:14px}
.bt-eye-l{display:flex;align-items:center;gap:6px}
.bt-eye-l svg{width:15px;height:15px;flex:none}
.bt-missing{width:100%;height:100%;display:grid;place-items:center;padding:8px;text-align:center;font-size:.78rem;color:var(--ink-3);background:var(--tile-2)}
.bt-full{width:100%;border-radius:16px}
div.bt-full{aspect-ratio:3 / 4}
.bt-thumb{max-width:160px;border-radius:12px}
.bt-compare{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.bt-compare figure{margin:0;display:flex;flex-direction:column;gap:6px}
.bt-compare img{width:100%;aspect-ratio:3 / 4;object-fit:cover;border-radius:12px;background:var(--tile-2)}
.bt-compare figcaption{font-size:.78rem;color:var(--ink-3);text-align:center}
.bt-compare figcaption b{color:var(--ink);font-weight:600}

/* choosing a picture */
.bt-pick{display:flex;flex-direction:column;gap:10px}
.bt-prev{min-height:120px;border-radius:14px;background:var(--tile-2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px;font-size:.84rem;color:var(--ink-3);text-align:center}
.bt-prev svg{width:28px;height:28px;color:var(--secondary)}
.bt-prev img{max-height:260px;border-radius:12px}
.bt-file{position:relative}
.bt-file:focus-within{outline:2px solid var(--secondary);outline-offset:2px}

/* the questionnaire's sliders */
.bt-sl-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.bt-sl-h label{font-size:.84rem;font-weight:600;color:var(--ink-2)}
.bt-sl-h b{font-size:.94rem;font-weight:700}
.bt-range{width:100%;height:34px;margin:0;accent-color:var(--accent);background:transparent;touch-action:pan-y}

@media (hover: hover) and (pointer: fine){
  .pg-hall-i:hover{background:var(--tile-2)}
  .pg-del:hover{background:var(--tile-2)}
}
@media (prefers-reduced-motion: reduce){
  .pg-del:active,.bt-cell:active{transform:none}
}
