/* The live workout: a full-screen layer. Top bar with live progress, exercise slides swiped
   sideways, a rest timer docked at the bottom, and the summary. */
.wk{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--bg)}
.wk > *{width:100%;max-width:560px;margin-inline:auto}

.wk-top{flex:none;padding-top:max(10px, calc(env(safe-area-inset-top, 0px) + var(--edge)));padding-bottom:8px;display:flex;flex-direction:column;gap:9px}
.wk-row{display:flex;align-items:center;gap:10px}
.wk-t{flex:1;min-width:0}
.wk-t h1{font-size:1.19rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wk-clock{flex:none;font-size:.94rem;font-weight:600;color:var(--ink-2)}
.btn-soft{flex:none;padding:8px 14px;border-radius:10px;background:var(--wash);color:var(--secondary-text);font-weight:600;font-size:.875rem;transition:transform 120ms var(--ease-out)}
.btn-soft:active{transform:scale(.97)}
.wk-sync{display:flex;align-items:center;justify-content:center;gap:8px;padding:7px 12px;border-radius:10px;background:var(--decor-tint);box-shadow:inset 0 0 0 1px var(--decor);font-size:.8rem;font-weight:600}
.wk-sync svg{width:16px;height:16px}
.prog{height:6px;border-radius:999px;background:var(--line);overflow:hidden}
.prog i{display:block;height:100%;border-radius:999px;background:var(--accent);transform:scaleX(0);transform-origin:right center;transition:transform 300ms var(--ease-out)}
.prog-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.78rem;color:var(--ink-3);font-variant-numeric:tabular-nums}
.dots{display:flex;gap:7px}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--line-2);transition:transform 200ms var(--ease-out),background-color 200ms ease}
.dots i.on{background:var(--accent);transform:scale(1.4)}

/* ---------- slides ---------- */
.car{flex:1;min-height:0;display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;
  padding-left:max(var(--gut), env(safe-area-inset-left, 0px));padding-right:max(var(--gut), env(safe-area-inset-right, 0px))}
.car::-webkit-scrollbar,.slide::-webkit-scrollbar{display:none}
/* sideways the slide must pass the swipe on to the carousel: `contain` on both axes stopped it there (new
   Chrome applies it even with nothing to scroll), and only a swipe begun in the gap between cards moved */
.slide{flex:0 0 calc(100% - 14px);min-width:0;scroll-snap-align:center;scroll-snap-stop:always;overflow-y:auto;overscroll-behavior:auto contain;scrollbar-width:none;padding-bottom:calc(112px + env(safe-area-inset-bottom, 0px));display:flex;flex-direction:column;gap:14px}
.slide:only-child{flex-basis:100%}
.slide .tile{gap:14px}
.head,.part{display:flex;flex-direction:column;gap:10px}
.parts{display:flex;flex-direction:column;gap:16px}
.part + .part{border-top:1px solid var(--line);padding-top:16px}
.ex-h{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.ex-t{min-width:0}
.ex-t h2{font-size:1.19rem;text-wrap:balance;display:flex;align-items:center;gap:8px}
.part .ex-t h2{font-size:1.0625rem}
.ex-t p{font-size:.8125rem;color:var(--ink-3)}
.ex-a{flex:none;display:flex;gap:6px}
.ab{flex:none;width:22px;height:22px;border-radius:50%;display:inline-grid;place-items:center;background:var(--super);color:var(--on-super);font-size:.75rem;font-weight:700;line-height:1}
.info{display:flex;align-items:center;gap:5px;height:34px;padding:0 11px;border-radius:10px;background:var(--tile-2);font-size:.8125rem;font-weight:600;color:var(--ink-2);transition:transform 120ms var(--ease-out)}
.info:active{transform:scale(.97)}
.info svg{width:16px;height:16px}
.info.sq{width:34px;padding:0;justify-content:center}
.info.vid{background:var(--wash);color:var(--secondary-text)}
.meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:.78rem;color:var(--ink-3);font-variant-numeric:tabular-nums}
.meta:empty{display:none}
.meta b{font-weight:600;color:var(--ink-2)}
/* A drop set and a superset: a tinted strip that names the method in its own colour, says it in a line, and
   offers "מה זה?". A superset also shows its round as a path, with the exercise whose turn it is filled in. */
.mth{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;padding:8px 12px;border-radius:12px;font-size:.8125rem;color:var(--ink)}
.mth.drop{background:var(--drop-wash)}
.mth.super{background:var(--super-wash)}
.mth b{flex:none;padding:3px 10px;border-radius:999px;font-size:.78rem;font-weight:700}
.mth.drop b{background:var(--drop);color:var(--on-drop)}
.mth.super b{background:var(--super);color:var(--on-super)}
.mth span{flex:1;min-width:14ch}
.mth-q{flex:none;min-width:44px;min-height:36px;padding:4px 6px;font-size:.78rem;font-weight:600;text-decoration:underline;color:var(--ink-2)}
.mth-steps{margin:0;padding-inline-start:1.6em;list-style:decimal;display:flex;flex-direction:column;gap:8px;font-size:.94rem}
.mth-steps li::marker{font-weight:700;color:var(--ink-3)}
.ss-path{display:flex;align-items:center;gap:6px;margin:0;padding:0;list-style:none;font-size:.8125rem;color:var(--ink-2)}
.ss-path li{flex:0 1 auto;display:flex;align-items:center;gap:6px;min-width:2.6em;padding:5px 10px;border-radius:999px;background:var(--tile-2)}
.ss-path li span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ss-path li.arr,.ss-path li:last-child{flex:none;min-width:0}
.ss-path li.arr{padding:0;background:none;color:var(--ink-3)}
.ss-path li.on{background:var(--super);color:var(--on-super);font-weight:600}
.ss-path li.on .ab{background:var(--on-super);color:var(--super)}
.nr{padding:3px 10px;border-radius:999px;background:var(--wash);color:var(--secondary-text);font-size:.75rem;font-weight:600}
.wk-note{font-size:.8125rem;color:var(--ink-2)}
.wk-hint{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--wash);font-size:.8125rem;font-weight:500}
.wk-hint span{flex:1;min-width:0}
.wk-bump{display:flex;align-items:center;gap:8px;font-size:.78rem;color:var(--ink-3)}
.wk-bump span{flex:1;min-width:0}
.chip-btn{flex:none;min-width:48px;height:36px;padding:0 12px;border-radius:10px;background:var(--tile-2);font-size:.875rem;font-weight:600;color:var(--ink-2);transition:transform 120ms var(--ease-out)}
.chip-btn:active{transform:scale(.97)}
.wk-hint .chip-btn{background:var(--tile);color:var(--secondary-text)}

.now{background:var(--tile-2);border-radius:14px;padding:14px;transition:background-color 200ms ease}
/* the drop itself: the whole panel turns orange and says what to do now */
.now.drop{background:var(--drop-wash);box-shadow:inset 0 0 0 2px var(--drop)}
.now-alert{display:flex;align-items:center;gap:8px;font-size:1rem;font-weight:700;color:var(--drop)}
.now-alert i{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--drop);color:var(--on-drop);font-style:normal;font-size:.94rem}
.now-next{font-size:.8125rem;font-weight:600;color:var(--drop)}
.now-box,.comp{display:flex;flex-direction:column;gap:12px}
.now-ex{display:flex;align-items:center;gap:8px;font-size:1rem;font-weight:700}
.now-l{display:flex;align-items:center;gap:8px;min-height:30px;font-size:.8125rem;font-weight:600;color:var(--secondary-text)}
.now-l .chip{margin-inline-start:auto}
.chip.sm{padding:5px 12px;font-size:.78rem;background:var(--tile)}
.nr{background:var(--tile)}
.steps{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stpf{display:flex;flex-direction:column;gap:5px;min-width:0}
.stpf label{font-size:.75rem;color:var(--ink-3)}
.now .stp{grid-template-columns:38px minmax(0,1fr) 38px;background:var(--tile);box-shadow:inset 0 0 0 1px var(--line)}
.now .stp input{font-size:1.25rem}
.now .stp input[aria-invalid="true"]{box-shadow:inset 0 0 0 2px var(--danger)}
.now-x{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.now-x:empty{display:none}
.now-x .link{background:var(--tile)}
.now-x .link.on{background:var(--accent);color:var(--on-accent)}
.now-x .link svg{width:16px;height:16px}
.comp-t{display:flex;align-items:center;gap:8px;font-size:1rem;font-weight:700}
.comp-t svg{width:20px;height:20px;color:var(--secondary-text);stroke-width:2.6}

.sets li{overflow:hidden}
.sets li + li{border-top:1px solid var(--line)}
.set{display:grid;grid-template-columns:26px minmax(0,1fr) auto 30px;align-items:center;gap:10px;width:100%;padding:11px 2px;text-align:start;color:var(--ink);transition:background-color 120ms ease}
.set:active{background:var(--tile-2)}
.set .n{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:.78rem;font-weight:600;background:var(--tile-2);color:var(--ink-3)}
.set .n svg{width:14px;height:14px;color:var(--decor)}
.set .v{font-size:1rem;font-weight:500;color:var(--ink-3)}
.set.active .n{background:var(--wash);color:var(--secondary-text)}
.set.active .v{color:var(--ink);font-weight:600}
.set.done .v{color:var(--ink-2)}
.set.off .v{font-size:.875rem}
.set.off .chk{border-style:dashed}
.set[disabled]{cursor:default}
.set.drop{padding-block:7px 9px}
.set.drop .n{background:transparent;font-size:.94rem;color:var(--drop)}
.set.drop .v{font-size:.94rem}
.set.drop .chk{width:24px;height:24px;justify-self:center}
.set.drop .chk svg{width:14px;height:14px}
.badge,.tag{font-size:.72rem;font-weight:600;border-radius:999px;padding:2px 9px;white-space:nowrap}
.badge{color:var(--ink);background:var(--decor-tint);box-shadow:inset 0 0 0 1px var(--decor)}
.tag{color:var(--ink-3);background:var(--tile-2)}
.tag.drop{color:var(--drop);background:var(--drop-wash)}
.chk{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;border:1.5px solid var(--line-2)}
.chk svg{width:16px;height:16px;fill:none;stroke:var(--on-accent);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
.chk path{stroke-dasharray:1;stroke-dashoffset:1;opacity:0}
.set.done .chk{background:var(--accent);border-color:var(--accent)}
.set.done .chk path{stroke-dashoffset:0;opacity:1}
.part-a{display:flex;gap:8px}
.add{padding:8px 13px;border-radius:10px;background:var(--tile-2);color:var(--secondary-text);font-size:.84rem;font-weight:600;transition:transform 120ms var(--ease-out)}
.add:active{transform:scale(.97)}
.add-ex{justify-content:center;min-height:180px}

/* ---------- rest timer ---------- */
.rest{position:absolute;inset-inline:0;bottom:0;z-index:2;display:flex;align-items:center;gap:12px;padding-top:12px;padding-bottom:max(14px, env(safe-area-inset-bottom, 0px));background:var(--tile);border-radius:22px 22px 0 0;box-shadow:var(--lift);
  transform:translateY(110%);visibility:hidden;transition:transform 280ms var(--ease-drawer),visibility 0s 280ms}
.rest.on{transform:none;visibility:visible;transition:transform 280ms var(--ease-drawer)}
.rest-ring{position:relative;width:60px;height:60px;flex:none}
.rest-ring svg{width:60px;height:60px}
.rest-ring circle{fill:none;stroke-width:5}
.rest-ring .rt{stroke:var(--line)}
.rest-ring .rf{stroke:var(--accent);stroke-linecap:round;stroke-dasharray:163.4;stroke-dashoffset:0}
.rest-ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:1.19rem;font-weight:700}
.rest-t{flex:1;min-width:0;display:flex;flex-direction:column}
.rest-t strong{font-size:1rem;font-weight:700}
.rest-t span{font-size:.78rem;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rest .chip-btn{height:40px;min-width:52px}

/* ---------- sheets of the workout ---------- */
.sheet-sub{font-size:.94rem;font-weight:600;color:var(--ink-2)}
.tips{display:flex;flex-direction:column}
.tips li{padding:10px 0;font-size:.94rem}
.tips li + li{border-top:1px solid var(--line)}
.pick{display:flex;flex-wrap:wrap;gap:8px}
.calc-t{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.calc-t.three{grid-template-columns:repeat(3,1fr)}
.calc-t div{background:var(--tile-2);border-radius:12px;padding:9px 6px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.calc-t b{font-size:1.0625rem;font-weight:700}
.calc-t span{font-size:.7rem;color:var(--ink-3)}
.plates{display:flex;flex-wrap:wrap;gap:8px;direction:ltr}
.plate{min-width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--on-accent);font-size:.875rem;font-weight:700}
.sheet .steps{align-items:end}

/* ---------- summary ---------- */
.wk.is-sum{background:var(--bg)}
.sum{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.sum:focus{outline:none}
.sum-in{position:relative;min-height:100%;padding-top:max(26px, calc(env(safe-area-inset-top, 0px) + var(--edge)));padding-bottom:max(24px, env(safe-area-inset-bottom, 0px));display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.sum-x{position:absolute;top:max(12px, calc(env(safe-area-inset-top, 0px) + var(--edge)));inset-inline-end:max(var(--gut), env(safe-area-inset-right, 0px));background:var(--tile)}
.sum h2{font-size:1.69rem;font-weight:800}
.sum-sub{color:var(--ink-2);font-size:.94rem;max-width:32ch;text-wrap:balance}
.sum-hero{display:flex;flex-direction:column;align-items:center;gap:2px}
.sum-hero b{font-size:1.5rem;font-weight:800;direction:rtl}
.sum-hero.up b{font-size:2.6rem;line-height:1;direction:ltr;color:var(--nav-on)}
.sum-hero span{font-size:.94rem;font-weight:600}
.sum-hero small{font-size:.8125rem;color:var(--ink-3)}
.sum-week{display:flex;flex-direction:column;align-items:center;gap:8px}
.sum-week:empty{display:none}
.sum-week .week-in b{font-size:2.2rem}
.sum-week p{font-size:.875rem;font-weight:600;color:var(--ink-2)}
.stats{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stats .stat{background:var(--tile);border-radius:var(--r);padding:14px 12px;display:flex;flex-direction:column;gap:2px}
.stats .stat b{font-size:1.56rem;font-weight:700;line-height:1.15}
.sum .tile{width:100%;text-align:start}
.sum-note{font-size:.8125rem;color:var(--ink-3);max-width:38ch;text-wrap:balance}
.sum .banner{text-align:start}
.sum .btn{margin-top:4px}

@media (hover: hover) and (pointer: fine){
  .chip-btn:hover,.info:hover,.add:hover{background:var(--wash)}
  .set:not([disabled]):hover{background:var(--tile-2)}
}
@media (min-width: 600px){
  .wk > *{border-inline:1px solid var(--line)}
}
@media (prefers-reduced-motion: reduce){
  .rest,.rest.on{transition-duration:.01s}
  .btn-soft:active,.chip-btn:active,.info:active,.add:active{transform:none}
  .prog i,.dots i{transition:none}
}
