/* The trainee's side, light greens only. Phone first; on a computer the app sits in the middle, phone-wide. */
body.trainee { background: var(--g2); color: var(--ink); font-size: 16px; display: flex; justify-content: center; min-height: 100vh; min-height: 100dvh; }
.app { width: 100%; max-width: 440px; min-height: 100vh; min-height: 100dvh; background: var(--g0); position: relative; display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,.10); overflow-x: hidden; }

/* the banner, as in sketch 21 */
.bnr { background: var(--banner); color: #fff; padding: 14px 18px 18px; border-radius: 0 0 28px 28px; display: grid; gap: 12px; }
.bnr.small { padding-bottom: 12px; gap: 8px; }
.bnr-top { display: flex; justify-content: space-between; align-items: center; }
.bnr-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: .12em; font-size: 13px; direction: ltr; }
.bnr-logo svg { width: 28px; height: 20px; }
.menu { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); border: 0; display: grid; place-items: center; color: #fff; }
.menu svg { width: 18px; height: 18px; }
.bnr-main { display: flex; align-items: center; gap: 14px; }
.ring { width: 78px; height: 78px; position: relative; flex: none; }
.ring svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 19px; }
.bnr.small .ring, .bnr.small .ring svg { width: 52px; height: 52px; }
.bnr.small .ring span { font-size: 14px; }
.hi { font-size: 22px; line-height: 1.25; }
.hi span { color: var(--mint-300); font-weight: 500; }
.hi b { font-weight: 900; }
.bnr.small .hi { font-size: 18px; }
.sub { font-size: 13px; opacity: .85; margin-top: 3px; }
.toptabs { display: grid; grid-template-columns: 1fr 1fr; background: rgba(0,0,0,.25); border-radius: 99px; padding: 4px; }
.toptabs button { border: 0; background: none; color: #fff; padding: 8px 0; border-radius: 99px; font-weight: 700; opacity: .8; }
.toptabs button.on { background: var(--mint-200); color: var(--teal-900); opacity: 1; }

.pad { padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
h2.sec { margin: 4px 0 0; font-size: 17px; color: var(--teal-900); }
.card { background: #fff; border: 1px solid var(--g2); border-radius: 18px; padding: 14px; display: grid; gap: 10px; }
.card h3 { margin: 0; font-size: 19px; color: var(--teal-900); }
.card .when { font-size: 13px; color: var(--g6); }
.tiles { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.tile { flex: 1 0 30%; min-width: 98px; background: #fff; border: 1.5px solid var(--g2); border-radius: 16px; padding: 10px; text-align: center; display: grid; gap: 2px; }
.tile b { color: var(--teal-900); font-size: 16px; display: flex; gap: 5px; justify-content: center; align-items: center; }
.tile small { color: var(--g6); font-size: 12.5px; }
.tile.on { border-color: var(--teal-800); box-shadow: inset 0 0 0 1px var(--teal-800); }
.tile.done { background: var(--mint-50); border-color: var(--mint-300); }
.tile .ok { width: 18px; height: 18px; border-radius: 50%; background: var(--mint-600); color: #fff; display: inline-grid; place-items: center; font-size: 11px; }
.exl { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.exl li { display: flex; gap: 10px; align-items: center; }
.L { width: 28px; height: 28px; border-radius: 9px; background: var(--mint-100); color: var(--teal-700); display: grid; place-items: center; font-weight: 900; font-size: 14px; flex: none; }
.L.ok { background: var(--mint-600); color: #fff; }
.ssbox { border: 2px solid var(--mint-300); border-radius: 12px; overflow: hidden; }
.exl li.ssbox { display: block; }
.ssbox .t { background: var(--teal-600); color: #fff; font-weight: 800; font-size: 13px; padding: 5px 10px; }
.ssbox ul { padding: 8px 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-radius: 14px; background: var(--teal-800); color: #fff; font-weight: 800; font-size: 17px; }
.btn:disabled { opacity: .4; }
.btn.light { background: var(--mint-100); color: var(--teal-800); }
.lnk { background: none; border: 0; color: var(--teal-700); text-decoration: underline; font-weight: 700; padding: 6px; }
.goal { background: var(--mint-50); border: 1px solid var(--mint-200); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.goal b { display: block; color: var(--teal-800); font-size: 13px; }
.empty { color: var(--g6); text-align: center; padding: 26px 8px; }

/* inside a workout */
.strip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px 6px; font-size: 14px; color: var(--teal-900); }
.strip b { font-weight: 800; }
.pillbtn { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--mint-300); border-radius: 99px; background: #fff; padding: 3px 10px; font-weight: 800; font-size: 13px; color: var(--teal-800); }
.bar { height: 5px; background: var(--g2); margin: 0 16px; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--mint-600); transition: width .3s; }
.video { aspect-ratio: 16 / 9; border-radius: 16px; background: linear-gradient(135deg, var(--teal-700), var(--teal-900)); display: grid; place-items: center; color: #fff; position: relative; }
.video span { width: 54px; height: 54px; border-radius: 50%; background: #fff; color: var(--teal-900); display: grid; place-items: center; font-size: 20px; }
.video small { position: absolute; bottom: 8px; inset-inline-start: 12px; font-size: 12px; opacity: .8; }
.xt { display: flex; gap: 10px; align-items: center; }
.xt h3 { margin: 0; font-size: 21px; color: var(--teal-900); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { background: #fff; border: 1px solid var(--g2); border-radius: 12px; padding: 8px 4px; text-align: center; }
.stats b { display: block; font-size: 18px; color: var(--teal-900); }
.stats small { color: var(--g6); font-size: 12px; }
.cue { background: var(--mint-50); border: 1px solid var(--mint-200); border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.cue b { display: block; color: var(--teal-700); font-size: 13px; }
.prev { font-size: 14px; color: var(--teal-800); background: var(--mint-200); border-radius: 12px; padding: 8px 12px; }
.prev b { display: block; font-size: 12.5px; color: var(--teal-600); }
/* inside a workout the banner holds the workout: the hamburger on the right opens all of it */
.bnr.wk { padding: 12px 16px 14px; }
.wkrow { display: flex; align-items: center; gap: 12px; }
.wkt { flex: 1; min-width: 0; display: grid; }
.wkt b { font-size: 18px; font-weight: 900; }
.wkt span { font-size: 13px; opacity: .85; }
.bnr.wk .ring, .bnr.wk .ring svg { width: 48px; height: 48px; }
.bnr.wk .ring span { font-size: 13px; }
.sent { display: flex; gap: 8px; align-items: center; background: var(--mint-100); color: var(--teal-800); border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 700; }
.sent .lnk { margin-inline-start: auto; padding: 0; }
.sstabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sstabs button { border: 1.5px solid var(--mint-300); background: #fff; border-radius: 10px; padding: 7px 0; font-weight: 700; color: var(--teal-800); }
.sstabs button.on { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.sshead { background: var(--teal-600); color: #fff; font-weight: 800; font-size: 13px; border-radius: 10px; padding: 6px 10px; }

/* sheets: open from the bottom, over a dim background, closed with X */
.dim { position: fixed; inset: 0; background: rgba(22,50,45,.45); z-index: 10; display: flex; justify-content: center; align-items: flex-end; }
.sheet { width: 100%; max-width: 440px; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px 18px; display: grid; gap: 10px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--g3); margin: 0 auto 4px; }
.sh-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sh-row h3 { margin: 0; font-size: 19px; color: var(--teal-900); }
.sh-row small { display: block; color: var(--g6); font-size: 13px; font-weight: 500; }
.xclose { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--g1); border: 0; color: var(--g7); font-size: 18px; }
.lbl { font-weight: 800; color: var(--teal-900); font-size: 15px; }
.lbl small { color: var(--g6); font-weight: 500; }
.pain { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pain button { border: 1.5px solid var(--mint-300); background: #fff; border-radius: 12px; padding: 10px 0; font-size: 18px; font-weight: 800; color: var(--teal-900); }
.pain button.on { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.pain button.on.lo { background: var(--mint-600); border-color: var(--mint-600); }
.painl { display: flex; justify-content: space-between; font-size: 12px; color: var(--g6); margin-top: -4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.two button, .three button { border: 1.5px solid var(--mint-200); background: #fff; border-radius: 12px; padding: 10px 0; font-weight: 700; color: var(--teal-800); }
.two button.on, .three button.on { background: var(--mint-600); border-color: var(--mint-600); color: #fff; }
.setl { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 8px; align-items: center; border: 1.5px solid var(--g2); border-radius: 12px; padding: 6px 8px; }
.setl b { font-size: 14px; color: var(--teal-900); }
.stp { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; text-align: center; }
.stp button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--g3); background: #fff; font-size: 17px; line-height: 1; color: var(--teal-800); }
.stp b { font-size: 17px; }
.numin { width: 100%; min-width: 0; border: 1.5px solid transparent; border-radius: 8px; background: none; text-align: center; font: 800 18px var(--font); color: var(--ink); padding: 3px 0; }
.numin:focus { outline: none; border-color: var(--mint-600); background: var(--mint-50); }
.stp small { grid-column: 1 / -1; color: var(--g6); font-size: 11px; }
textarea.note { width: 100%; border: 1.5px solid var(--g3); border-radius: 12px; padding: 10px; min-height: 70px; resize: vertical; }
.lrow { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--g1); background: none; border-width: 0 0 1px; width: 100%; text-align: start; color: inherit; font-size: 15px; }
.lrow .st { margin-inline-start: auto; font-size: 13px; color: var(--g6); }
.lrow.now { background: var(--mint-50); border-radius: 10px; }
.mitem { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--g1); background: none; border-width: 0 0 1px; width: 100%; text-align: start; font-size: 15px; color: inherit; }
.mitem span { color: var(--teal-700); font-weight: 700; font-size: 14px; }

/* finish: rises from the bottom over the dimmed last exercise */
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.fin-dim { animation: fadein .25s ease-out; }
.fin-sheet { animation: rise .45s cubic-bezier(.2, .9, .3, 1); padding-top: 8px; gap: 12px; }
.fin-hero { background: var(--banner); color: #fff; border-radius: 18px; padding: 18px 14px 16px; text-align: center; display: grid; justify-items: center; gap: 4px; position: relative; overflow: hidden; }
.fin-hero .spark { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.fin-hero .cup { width: 74px; height: 74px; position: relative; }
.fin-hero h2 { margin: 4px 0 0; font-size: 24px; position: relative; }
.fin-hero p { margin: 0; opacity: .85; font-size: 14px; position: relative; }
.fin-sub { margin: 0; color: var(--g6); font-size: 14px; text-align: center; }
.fin-chart { display: grid; gap: 10px; }
.fin-chart .fh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fin-chart .fh b { font-size: 18px; color: var(--teal-900); }
.fin-chart .lg { font-size: 12px; color: var(--g6); display: inline-flex; align-items: center; gap: 5px; }
.fin-chart .lg i { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
.fin-chart .lg i.prev { background: var(--mint-200); } .fin-chart .lg i.now { background: var(--mint-600); margin-inline-start: 6px; }
.cr { display: grid; gap: 4px; }
.cr .cn { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--g7); }
.cr .cn b { font-size: 13px; white-space: nowrap; }
.cr.up .cn span { color: var(--teal-900); font-weight: 800; }
.cr.up .cn b { color: #fff; background: var(--mint-600); border-radius: 99px; padding: 0 9px; }
.cr.eq .cn b { color: var(--teal-700); }
.cr.dn .cn b { color: var(--g5); font-weight: 600; }
.cb { display: grid; gap: 3px; }
.cb i { display: block; height: 10px; border-radius: 99px; width: 0; animation: grow .9s .35s cubic-bezier(.2, .9, .3, 1) forwards; }
.cb i.prev { background: var(--mint-200); height: 7px; }
.cb i.now { background: var(--mint-500); }
.cr.up .cb i.now { background: var(--teal-600); height: 13px; }
.cr.dn .cb i.now { background: var(--g3); }
@keyframes grow { to { width: var(--w); } }
@media (prefers-reduced-motion: reduce) { .fin-sheet, .fin-dim { animation: none; } .cb i { animation: none; width: var(--w); } }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--teal-900); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 12px; z-index: 30; max-width: 90vw; text-align: center; }

/* login */
.login { padding: 24px 18px; display: grid; gap: 14px; }
.login h2 { margin: 0; color: var(--teal-900); }
.inp { border: 1.5px solid var(--g3); border-radius: 12px; padding: 12px; font-size: 17px; width: 100%; background: #fff; }
.code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.code input { text-align: center; font-size: 24px; font-weight: 800; border: 1.5px solid var(--mint-300); border-radius: 12px; padding: 10px 0; width: 100%; }
.lrow.left { color: var(--g6); }
/* finish: taller sheet, real charts, moving stars (Shahar, 2.11) */
.fin-sheet { align-content: start; background: var(--mint-50); }
.fin-hero .tw { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s var(--d) ease-in-out infinite; }
.fin-hero .fl, .wkdone .fl { animation: floaty 3.2s var(--d) ease-in-out infinite; }
.wkdone .tw { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s var(--d) ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.55) rotate(0); opacity: .45; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-7px); opacity: 1; } }
.fin-hero .cup { animation: pop .6s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.fin-big { text-align: center; display: grid; gap: 2px; padding-top: 4px; }
.fin-big b { font-size: 22px; color: var(--teal-900); }
.fin-big span { font-size: 14px; color: var(--g6); }
.fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fin-stats div { background: #fff; border: 1px solid var(--mint-200); border-radius: 14px; padding: 8px 4px; text-align: center; font-size: 12.5px; color: var(--g6); display: grid; }
.fin-stats b { font-size: 20px; color: var(--teal-900); line-height: 1.2; }
.gc { background: #fff; border: 1px solid var(--mint-200); border-radius: 18px; padding: 12px 12px 10px; display: grid; gap: 4px; animation: up .5s calc(.25s + var(--k) * .12s) cubic-bezier(.2, .9, .3, 1) both; }
@keyframes up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.gh { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gh > div { display: grid; gap: 0; min-width: 0; }
.gn { font-size: 14px; color: var(--g7); font-weight: 700; }
.gv { font-size: 24px; color: var(--teal-900); line-height: 1.15; }
.gv small { font-size: 13px; font-weight: 700; color: var(--g6); }
.gt { flex: none; font-size: 12.5px; font-weight: 800; border-radius: 99px; padding: 3px 10px; background: var(--mint-100); color: var(--teal-700); max-width: 52%; text-align: center; }
.gc.up .gt, .gc.new .gt { background: var(--mint-600); color: #fff; }
.gc.dn .gt { background: var(--g1); color: var(--g6); font-weight: 600; }
.gb { background: var(--mint-100); color: var(--teal-800); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; font-weight: 800; text-align: center; }
.lc { width: 100%; height: auto; display: block; overflow: visible; }
.lc .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s calc(.45s + var(--k, 0) * .12s) ease-out forwards; }
.gc .lc .ln { animation-delay: calc(.45s + var(--k) * .12s); }
.lc .ar { opacity: 0; animation: fadein .6s 1.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lc .pt { opacity: 0; transform-box: fill-box; animation: fadein .3s calc(.5s + var(--i) * .25s) forwards; }
.lc .tv { font: 700 12px var(--font, inherit); fill: var(--g6); }
.lc .tv.now { font-size: 15px; font-weight: 900; fill: var(--teal-900); }
.lc .tx { font: 600 11px var(--font, inherit); fill: var(--g5); }
.lc .tx.now { font-weight: 900; fill: var(--teal-700); }
.lc .halo { fill: var(--mint-500); transform-box: fill-box; transform-origin: center; animation: halo 1.8s 1.4s ease-out infinite; opacity: 0; }
@keyframes halo { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(2.2); opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
/* home: the whole week is done */
.wkdone { position: relative; overflow: hidden; background: var(--banner); color: #fff; border-radius: 20px; padding: 16px 14px 14px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.wkdone .spark { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.wd-cup .cup { width: 62px; height: 62px; position: relative; animation: pop .6s .1s cubic-bezier(.2, 1.6, .4, 1) both; }
.wd-t { display: grid; gap: 2px; position: relative; }
.wd-t b { font-size: 20px; }
.wd-t span { font-size: 14px; opacity: .85; }
.btn.mint { background: var(--mint-300); color: var(--teal-900); position: relative; min-height: 48px; }
@media (prefers-reduced-motion: reduce) { .tw, .fl, .halo, .cup, .gc, .lc .ln, .lc .ar, .lc .pt { animation: none !important; opacity: 1; stroke-dashoffset: 0; } }
.fin-sheet { grid-auto-rows: max-content; }
/* finish v3 (2.11): opens to about half, the workout shows behind; one chart for the whole workout, a short list under it */
.fin-dim { background: rgba(22,50,45,.28); }
.fin-sheet { gap: 10px; padding-bottom: 14px; }
.fin-hero { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: start; gap: 12px; padding: 12px 14px; }
.fin-hero .cup { width: 52px; height: 52px; }
.fh-t { position: relative; display: grid; gap: 2px; }
.fin-hero h2 { margin: 0; font-size: 21px; }
.fin-hero p { font-size: 13px; }
.fin-list { display: grid; gap: 6px; }
.fl-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fl-h b { font-size: 16px; color: var(--teal-900); }
.fl-h span { font-size: 12.5px; color: var(--g6); }
.fin-list ul { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--mint-200); border-radius: 14px; overflow: hidden; }
.fin-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 78px; gap: 8px; align-items: center; padding: 7px 10px; font-size: 14px; color: var(--g7); border-top: 1px solid var(--g1); animation: up .4s calc(.6s + var(--k, 0) * .05s) both; }
.fin-list li:first-child { border-top: 0; }
.fin-list li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.fin-list li span i { font-style: normal; width: 20px; height: 20px; border-radius: 6px; background: var(--mint-100); color: var(--teal-700); font-size: 11.5px; font-weight: 900; display: inline-grid; place-items: center; flex: none; }
.fin-list li b { color: var(--teal-900); font-size: 14.5px; white-space: nowrap; }
.fin-list li b small { font-size: 11px; color: var(--g6); }
.fin-list li em { font-style: normal; font-size: 12px; font-weight: 800; text-align: center; border-radius: 99px; padding: 2px 6px; white-space: nowrap; background: var(--g1); color: var(--g6); }
.fin-list li.up em { background: var(--mint-600); color: #fff; }
.fin-list li.new em { background: var(--mint-200); color: var(--teal-800); }
.fin-list li.eq em { background: var(--mint-100); color: var(--teal-700); }
.fin-sheet .gc { padding: 10px 12px 8px; }
