[hidden] {
  display:none!important;
}
:root {
  --forest:#173f35;
  --forest-2:#24584a;
  --ink:#18332c;
  --muted:#68766e;
  --brass:#b88746;
  --brass-light:#ead8b8;
  --danger:#9a403b;
  --shadow:0 14px 40px #173f3518;
  --r-sm:12px;
  --r-md:18px;
  --r-lg:28px;
  --focus:0 0 0 4px #b8874650;
  --z-workout-tray:12;
  --z-flash:19;
  --z-timer-center:19;
  --z-app-shell:20;
  --z-open-menu:30;
  --z-offline:50;
  font-family:"Liberation Sans",Arial,system-ui,sans-serif;
  color:var(--ink);
  background:var(--canvas);
  font-size:17px;
  line-height:1.5;
}
* {
  box-sizing:border-box;
}
html {
  min-height:100%;
  background:var(--canvas);
  touch-action:manipulation;
  /* no double-tap zoom on the tablet; pinch zoom stays for accessibility */
}
body {
  margin:0;
  min-height:100vh;
}
button,input,select,textarea {
  font:inherit;
  color:inherit;
}
button,.button,input,select,textarea {
  min-height:52px;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  padding:.7rem .9rem;
  background:var(--surface);
}
button,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  cursor:pointer;
  text-decoration:none;
  font-weight:700;
  transition:transform 150ms ease,background 150ms ease,border-color 150ms ease;
}
button:hover,.button:hover {
  border-color:var(--brass);
}
button:active,.button:active {
  transform:scale(.98);
}
:focus-visible {
  outline:0;
  box-shadow:var(--focus);
}
button:disabled,input:disabled {
  opacity:.5;
  cursor:not-allowed;
}
.primary {
  background:var(--forest);
  border-color:var(--forest);
  color:#fff;
}
.primary:hover {
  background:var(--forest-2);
  border-color:var(--forest-2);
}
.danger {
  color:var(--danger);
  background:transparent;
  border-color:#cfa8a3;
}
.quiet {
  background:transparent;
  border-color:transparent;
  color:var(--muted);
}
h1,h2,h3 {
  font-family:"Liberation Serif",Georgia,serif;
  line-height:1.12;
  letter-spacing:-.025em;
}
h1 {
  font-size:clamp(2.1rem,5vw,3.65rem);
  margin:.25rem 0 .75rem;
}
h2 {
  font-size:clamp(1.4rem,3vw,2rem);
}
p {
  margin:.5rem 0 1rem;
}
.eyebrow,.popover-label,small {
  color:var(--muted);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.lede {
  max-width:620px;
  color:var(--muted);
  font-size:1.08rem;
}
.icon {
  flex:none;
}
main {
  width:min(1120px,100%);
  margin:auto;
  padding:8.2rem clamp(1rem,4vw,3rem) 4rem;
}
.app-shell {
  position:fixed;
  inset:calc(.9rem + env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) auto max(1rem,env(safe-area-inset-left));
  z-index:var(--z-app-shell);
  display:flex;
  justify-content:space-between;
  pointer-events:none;
}
.corner-control {
  position:relative;
  pointer-events:auto;
}
.corner-control>summary {
  list-style:none;
}
.corner-control>summary::-webkit-details-marker {
  display:none;
}
.athlete-pill,.menu-button {
  border:1px solid #ffffffa8;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.55rem .8rem;
  cursor:pointer;
}
.athlete-identity {
  display:grid;
  min-width:0;
  line-height:1.15;
}
/* Nothing in the pill ever had min-width:0 or an ellipsis, so a long name
overflowed a fixed-height pill instead of truncating. */
.athlete-identity strong {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.athlete-pill small {
  text-transform:none;
  letter-spacing:0;
  font-weight:600;
}
.athlete-dot {
  border-radius:50%;
  background:var(--profile);
  box-shadow:inset 0 0 0 4px #ffffffa8;
  flex:none;
}
.corner-popover {
  position:absolute;
  top:calc(100% + .65rem);
  min-width:270px;
  padding:.6rem;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-md);
  box-shadow:var(--shadow);
}
.athlete-popover {
  left:0;
}
.app-menu .corner-popover {
  right:0;
}
.popover-label {
  padding:.35rem .6rem;
  margin:0;
}
.athlete-option,.menu-popover a,.menu-popover button {
  width:100%;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:.75rem;
  padding:.7rem;
  border-radius:var(--r-sm);
  text-align:left;
}
.athlete-option>span:nth-child(2) {
  display:grid;
  flex:1;
}
.athlete-option small {
  text-transform:none;
  letter-spacing:0;
  font-weight:500;
}
.athlete-option.selected {
  background:var(--surface-2);
}
.selection-mark {
  color:var(--forest);
  font-weight:900;
}
.menu-popover form {
  margin:0;
}
.menu-popover a:hover,.menu-popover button:hover {
  background:var(--surface-2);
}
.offline {
  position:fixed;
  inset:0 0 auto;
  background:var(--danger);
  color:white;
  text-align:center;
  padding:.75rem;
  z-index:var(--z-offline);
}
.flash {
  padding:1rem 1.2rem;
  border:1px solid var(--brass-light);
  border-radius:var(--r-sm);
  background:var(--surface);
}
.page-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:1.5rem;
  margin-bottom:2rem;
}
.page-heading h1 {
  margin-bottom:0;
}
.back-link {
  display:inline-block;
  margin-bottom:1rem;
  color:var(--forest);
  font-weight:800;
  text-decoration:none;
}
.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));
  gap:1rem;
}
.card,.panel,.hero,.exercise,.routine-block {
  background:var(--surface);
  padding:clamp(1.1rem,3vw,1.7rem);
  border:1px solid var(--line);
  border-radius:var(--r-md);
  margin-bottom:1rem;
}
.hero {
  border-radius:var(--r-lg);
  padding:clamp(1.5rem,5vw,3rem);
  background:linear-gradient(135deg,var(--forest),#285a4d);
  color:#fff;
  border:0;
}
.hero .eyebrow,.hero small {
  color:#d6e5de;
}
.hero .primary {
  background:var(--surface);
  color:var(--forest);
  border-color:var(--surface);
}
.routine-card {
  display:flex;
  flex-direction:column;
  min-height:270px;
  position:relative;
}
.routine-card .favourite-form {
  position:absolute;
  top:calc(clamp(1.1rem,3vw,1.7rem) - 14px);
  right:calc(clamp(1.1rem,3vw,1.7rem) - 14px);
  margin:0;
}
.routine-card>.eyebrow,.routine-card h2 {
  padding-right:3rem;
}
.routine-grid {
  grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));
}
.routine-grid>.card {
  margin-bottom:0;
}
.favourite-toggle {
  width:48px;
  height:48px;
  min-height:48px;
  display:grid;
  place-items:center;
  padding:0;
  border-color:transparent;
  background:transparent;
  color:var(--muted);
}
.favourite-toggle:hover {
  border-color:var(--line);
  color:var(--brass);
}
.favourite-toggle.on {
  color:var(--brass);
}
.favourite-toggle.on .icon {
  fill:currentColor;
}
.routine-card h2 {
  margin:.3rem 0;
}
.routine-card .routine-description {
  color:var(--muted);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.metadata {
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin:auto 0 1.2rem;
}
.metadata span {
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  border-radius:999px;
  background:var(--surface-2);
  padding:.35rem .65rem;
  font-size:.82rem;
  font-weight:750;
}
.actions {
  display:flex;
  gap:.65rem;
  flex-wrap:wrap;
}
.actions form {
  margin:0;
}
.empty-state {
  text-align:center;
  padding:3rem 1rem;
  border:1px dashed var(--line);
  border-radius:var(--r-md);
  color:var(--muted);
}
.manage-grid .destination {
  display:grid;
  grid-template-columns:52px 1fr auto;
  align-items:center;
  gap:1rem;
  text-decoration:none;
  color:inherit;
}
.destination-icon {
  display:grid;
  place-items:center;
  background:var(--forest);
  color:white;
}
.destination h2 {
  margin:0 0 .25rem;
}
.destination p {
  margin:0;
  color:var(--muted);
}
.count {
  font-weight:900;
  color:var(--brass);
}
.list-toolbar {
  display:flex;
  gap:.75rem;
  margin-bottom:1rem;
}
.search-field {
  position:relative;
  flex:1;
}
.search-field .icon {
  position:absolute;
  left:1rem;
  top:50%;
  translate:0 -50%;
  color:var(--muted);
}
.search-field input {
  width:100%;
  padding-left:3rem;
}
.compact-list {
  display:grid;
  gap:.55rem;
}
.compact-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:1rem;
  align-items:center;
  padding:.8rem 1rem;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-sm);
}
.compact-row h2,.compact-row h3 {
  font-family:inherit;
  font-size:1rem;
  letter-spacing:0;
  margin:0;
}
.compact-row p {
  color:var(--muted);
  font-size:.88rem;
  margin:.15rem 0 0;
}
.row-menu {
  position:relative;
}
.row-menu summary {
  list-style:none;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:var(--r-sm);
  cursor:pointer;
}
.row-menu>div {
  position:absolute;
  right:0;
  top:100%;
  z-index:5;
  min-width:180px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  padding:.4rem;
  box-shadow:var(--shadow);
}
.row-menu a,.row-menu button {
  width:100%;
  border:0;
  background:transparent;
  justify-content:flex-start;
}
.archived {
  opacity:.6;
}
.color-dot {
  display:inline-block;
  width:1em;
  height:1em;
  border-radius:50%;
}
.stack {
  display:grid;
  gap:.75rem;
  max-width:760px;
}
.stack label,.builder-grid label {
  display:grid;
  gap:.35rem;
  font-weight:750;
}
.stack textarea,.stack select,.stack input {
  width:100%;
}
.narrow {
  max-width:500px;
  margin:4vh auto;
}
.narrow form {
  display:grid;
  gap:.75rem;
}
.login-brand {
  text-align:center;
  margin-bottom:2rem;
}
.inline-form {
  display:flex;
  gap:.75rem;
  align-items:center;
}
.media-thumb {
  width:140px;
  max-height:100px;
  object-fit:cover;
  border-radius:10px;
}
.media-preview {
  max-width:100%;
  max-height:340px;
  border-radius:12px;
}
.error {
  color:var(--danger);
}
/* Workout */
.workout-progress {
  overflow:hidden;
}
.workout-progress span {
  display:block;
  height:100%;
  transition:width 180ms ease;
}
.exercise-tabs {
  overflow:auto;
}
.exercise-tabs button span {
  max-width:104px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.exercise-tabs button.complete {
  color:var(--forest);
  background:#dce8e1;
}
.workout-exercise {
  margin-inline:auto;
}
.exercise-heading {
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.set-count {
  white-space:nowrap;
}
.cue {
  padding:1rem;
  border-left:3px solid var(--brass);
  border-radius:0 var(--r-sm) var(--r-sm) 0;
}
.cue p {
  margin:0;
}
.exercise-navigation {
  display:flex;
}
.workout-form {
  display:grid;
  grid-template-columns:minmax(230px,1fr) minmax(180px,.7fr) minmax(210px,.9fr);
  gap:.75rem;
  align-items:end;
}
.tray-field label {
  display:block;
  font-size:.75rem;
  font-weight:800;
  margin-bottom:.25rem;
}
.stepper button {
  border-radius:var(--r-sm) 0 0 var(--r-sm);
  padding:0;
}
.stepper button:last-child {
  border-radius:0 var(--r-sm) var(--r-sm) 0;
}
.log {
  height:58px;
}
.rest-timer {
  display:flex;
  align-items:center;
  gap:1rem;
  background:var(--forest);
  color:#fff;
  padding:.55rem 1rem;
}
.rest-timer strong {
  font-size:1.5rem;
  font-variant-numeric:tabular-nums;
}
.rest-timer span {
  display:grid;
}
.rest-timer small {
  color:#d7e4df;
}
.rest-timer .actions {
  margin-left:auto;
}
.rest-timer button {
  min-height:44px;
  background:transparent;
  color:white;
  border-color:#ffffff66;
  padding:.4rem .7rem;
}
.workout-secondary {
  position:fixed;
  right:max(1rem,calc((100vw - 1050px)/2));
  bottom:8.5rem;
  z-index:11;
}
.workout-secondary>summary {
  list-style:none;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:50%;
  box-shadow:var(--shadow);
  cursor:pointer;
}
.workout-secondary>div {
  position:absolute;
  right:0;
  bottom:calc(100% + .5rem);
  width:240px;
  background:var(--surface);
  padding:.5rem;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  box-shadow:var(--shadow);
}
.workout-secondary button {
  width:100%;
  justify-content:flex-start;
  border:0;
  background:transparent;
}
.menu-slider {
  display:grid;
  gap:.3rem;
  padding:.45rem .6rem .55rem;
  font-size:.78rem;
  font-weight:600;
  color:inherit;
}
.menu-slider input {
  width:100%;
  min-height:28px;
  margin:0;
  accent-color:var(--forest);
}
/* Builder */
.routine-builder {
  margin:auto;
}
.builder-identity {
  background:var(--surface);
  border:1px solid var(--line);
  margin-bottom:1rem;
}
.builder-identity textarea {
  min-height:90px;
}
.routine-block {
  padding:0;
  overflow:hidden;
}
.routine-block>summary {
  list-style:none;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:.8rem;
  align-items:center;
  cursor:pointer;
}
.routine-block>summary::-webkit-details-marker {
  display:none;
}
.block-number {
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--forest);
  color:white;
  font-weight:900;
}
.block-summary strong,.block-summary small {
  display:block;
}
.block-settings {
  display:grid;
  gap:.75rem;
}
.block-settings label {
  display:grid;
  gap:.3rem;
}
.routine-item {
  display:grid;
  gap:.75rem;
  align-items:start;
  padding:.8rem 0;
  border-top:1px solid var(--line);
}
.drag-handle {
  height:52px;
  display:grid;
  place-items:center;
  color:var(--muted);
  cursor:grab;
}
.item-fields {
  min-width:0;
}
.item-primary {
  display:grid;
  gap:.6rem;
}
.item-primary label,.advanced-grid label {
  display:grid;
  gap:.25rem;
  font-size:.78rem;
  font-weight:800;
}
.advanced-fields {
  margin-top:.6rem;
}
.advanced-fields summary {
  cursor:pointer;
  color:var(--forest);
  font-weight:800;
  min-height:44px;
  display:flex;
  align-items:center;
}
.advanced-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.6rem;
}
.builder-actions {
  display:flex;
  gap:.3rem;
}
.builder-actions button {
  min-width:44px;
  padding:.3rem;
}
.builder-sticky {
  position:sticky;
  bottom:0;
  z-index:8;
  display:flex;
  gap:.75rem;
  justify-content:flex-end;
  padding:.8rem;
  background:var(--canvas);
  border-top:1px solid var(--line);
}
.template-picker {
  flex-wrap:wrap;
}
.remove-control {
  display:flex!important;
  align-items:center;
  gap:.5rem;
}
.remove-control input {
  width:24px!important;
  min-height:24px;
}
@media(max-width:760px) {
  .athlete-pill small,.menu-button span {
    display:none;
  }
  .athlete-pill {
    max-width:210px;
  }
  .page-heading {
    align-items:stretch;
    flex-direction:column;
  }
  .workout-form {
    grid-template-columns:1fr 1fr;
  }
  .workout-form .log,.rest-timer {
    grid-column:1/-1;
  }
  .builder-sticky {
    justify-content:stretch;
  }
  .builder-sticky>* {
    flex:1;
  }
  .inline-form {
    align-items:stretch;
    flex-direction:column;
  }
}
@media(max-width:500px) {
  .workout-form {
    grid-template-columns:1fr 1fr;
  }
  .corner-popover {
    max-width:calc(100vw - 2rem);
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}
.routine-card>.actions {
  display:grid;
  align-items:center;
}
.routine-card>.actions form,.routine-card>.actions form button {
  width:100%;
}
.routine-card>.actions .row-menu>summary {
  width:auto;
  min-width:92px;
  padding-inline:1rem;
}
.routine-card>.actions .row-menu>div {
  width:min(360px,calc(100vw - 2rem));
  padding:1rem;
}
.routine-card>.actions .row-menu>div p {
  white-space:normal;
}
.builder-sticky>.row-menu>summary {
  width:auto;
  min-width:132px;
  white-space:nowrap;
  padding-inline:1rem;
}
.builder-sticky>.row-menu>div {
  bottom:calc(100% + .5rem);
  top:auto;
  min-width:320px;
}
.builder-sticky>.row-menu {
  flex:none;
}
@media(max-width:760px) {
  .builder-sticky>.row-menu>summary {
    min-width:126px;
  }
  .builder-sticky>.row-menu {
    flex:0 0 auto;
  }
  .builder-sticky>input[type=submit] {
    min-width:0;
  }
}
.menu-popover a {
  color:inherit;
  text-decoration:none;
}
.flash {
  position:fixed;
  z-index:19;
  top:calc(1rem + env(safe-area-inset-top));
  left:50%;
  translate:-50% 0;
  width:min(560px,calc(100vw - 320px));
  margin:0;
  box-shadow:var(--shadow);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  opacity:1;
  transition:opacity .2s ease,translate .2s ease;
}
.flash.alert {
  border-color:#cfa8a3;
}
.flash button {
  flex:none;
  min-width:44px;
  min-height:44px;
  padding:.25rem;
  border:0;
  background:transparent;
  font-size:1.35rem;
}
.flash.dismissing {
  opacity:0;
  translate:-50% -10px;
}
@media(max-width:1040px) {
  body[data-current-user-id] .flash {
    top:calc(5.2rem + env(safe-area-inset-top));
  }
}
@media(max-width:760px) {
  .flash {
    top:calc(5.2rem + env(safe-area-inset-top));
    width:calc(100vw - 2rem);
  }
}
@media(max-width:500px) {
  .flash {
    width:max-content;
    max-width:calc(100vw - 1.5rem);
    padding:.5rem .65rem;
    gap:.5rem;
    border-radius:12px;
    font-size:.9rem;
  }
  /* The dismiss target stays 44px; the negative margin keeps it from setting the
  height of a strip that is otherwise two lines of small text. */
  .flash button {
    margin:-.45rem -.35rem;
    font-size:1.2rem;
  }
}
.tray-action {
  display:flex;
  align-items:center;
  gap:.65rem;
  min-width:0;
}
.tray-action .log {
  flex:1;
  min-width:0;
}
.skip-link {
  min-height:44px;
  padding:.4rem .35rem;
  background:transparent;
  border:0;
  color:var(--muted);
  font-size:.82rem;
  white-space:nowrap;
}
.previous-link {
  padding-inline:0;
}
@media(min-width:700px) {
  .exercise-coaching {
    min-width:0;
  }
  .exercise-coaching .level-picker {
    max-width:none;
    margin:0 0 .75rem;
  }
  .exercise-overview .exercise-heading {
    display:block;
  }
  .exercise-overview .set-count {
    display:inline-block;
    margin-top:.5rem;
  }
}
@media(max-width:760px) {
  .workout-secondary {
    bottom:9.5rem;
  }
}
main {
  padding-top:5rem;
}
.athlete-dot {
  width:30px;
  height:30px;
}
.athlete-pill small {
  margin-top:.1rem;
  font-size:.68rem;
}
.workout-header h1 {
  font-size:1.75rem;
  margin:.1rem 0;
}
.workout-header .eyebrow {
  font-size:.68rem;
  margin-bottom:.2rem;
}
.exercise-tabs button {
  font-size:.86rem;
}
.exercise-tabs button span {
  font-size:.65rem;
}
.workout-tray .tray-menu {
  grid-column:2;
}
.level-media-assets {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));
  gap:.75rem;
  margin-top:.75rem;
}
.exercise-media {
  display:block;
  width:100%;
  height:auto;
  max-height:220px;
  object-fit:contain;
  background:#173f3508;
}
.level-media-assets video {
  background:#111;
}
@media(max-width:699px) {
  .exercise-media {
    max-height:180px;
  }
}
.exercise-media-link {
  display:grid;
  width:min(180px,100%);
  gap:.25rem;
  color:var(--forest);
  font-size:.72rem;
  font-weight:800;
  text-decoration:none;
}
.exercise-media-link .exercise-media {
  width:100%;
  height:112px;
  object-fit:cover;
  border:1px solid var(--line);
}
.exercise-media-link span {
  text-align:center;
}
.exercise-level-visuals video {
  width:100%;
  max-height:150px;
  border-radius:var(--r-sm);
}
@media(min-width:700px) {
  .exercise-level-visuals .exercise-media-link .exercise-media {
    height:140px;
  }
}
/* Active workout dashboard */
.athlete-pill,.menu-button {
  height:56px;
  border-color:var(--line);
  box-shadow:0 3px 12px #173f350c;
}
.athlete-pill {
  border-radius:var(--r-md);
  padding:.45rem .7rem;
}
.menu-button {
  border-radius:var(--r-sm);
  padding-inline:.9rem;
}
.athlete-avatar {
  position:relative;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:none;
  border-radius:50%;
  background:var(--profile);
  color:#fff;
  font-weight:900;
  line-height:1;
  box-shadow:inset 0 0 0 1px #ffffff66;
}
.athlete-avatar i {
  position:absolute;
  right:-1px;
  bottom:-1px;
  width:11px;
  height:11px;
  border:2px solid var(--surface);
  border-radius:50%;
  background:#3d7a60;
}
.workout-header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
}
.workout-context {
  display:flex;
  align-items:baseline;
  gap:.55rem;
  min-width:0;
  margin:0;
  line-height:1.4;
  text-transform:uppercase;
}
.workout-context span:first-child {
  flex:none;
  color:var(--muted);
  font-weight:750;
}
.workout-context strong {
  min-width:0;
  color:var(--ink);
  font-size:1rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.workout-count {
  color:var(--ink);
  white-space:nowrap;
}
.workout-progress {
  border-radius:999px;
}
.workout-progress span {
  border-radius:inherit;
}
.exercise-tabs {
  display:flex;
  margin:0 0 1rem;
  padding:0 0 .15rem;
  overflow-x:auto;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
}
.exercise-tabs::-webkit-scrollbar {
  display:none;
}
.exercise-tabs button {
  display:grid;
  align-items:center;
  flex:1 0 150px;
  border:1px solid var(--line);
  text-align:left;
  scroll-snap-align:start;
}
.exercise-tab-number {
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  font-weight:900;
}
.exercise-tabs button .exercise-tab-name {
  display:block;
  max-width:none;
  overflow:hidden;
  color:inherit;
  font-size:.82rem;
  font-weight:800;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.workout-exercise {
  max-width:none;
  margin:0;
  padding:0;
  border:1px solid var(--line);
  overflow:visible;
}
.workout-main {
  display:grid;
  align-items:stretch;
  gap:0;
}
.exercise-overview,.exercise-coaching {
  min-width:0;
}
.exercise-coaching {
  border-left:1px solid var(--line);
}
.exercise-heading {
  display:block;
}
.utility-label,.tray-field>label {
  margin:0;
  color:var(--muted);
  font-size:.7rem;
  font-weight:850;
  line-height:1.3;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.exercise-heading h2 {
  overflow-wrap:anywhere;
}
.exercise-target {
  margin:0;
  color:var(--muted);
  font-size:1rem;
}
.exercise-target strong {
  color:var(--ink);
}
.set-status {
  display:flex;
  align-items:center;
}
.set-count {
  display:inline-flex;
  align-items:center;
  border:1px solid color-mix(in srgb,var(--brass) 40%,var(--brass-light));
  border-radius:999px;
  font-size:.78rem;
}
.set-indicators {
  display:flex;
  align-items:center;
  gap:.4rem;
}
.set-indicators i {
  width:9px;
  height:9px;
  border:1.5px solid #aaa99e;
  border-radius:50%;
  background:transparent;
}
.target-inline {
  font-size:.86rem;
  white-space:nowrap;
}
.exercise-level-visuals {
  margin-top:1rem;
}
.exercise-level-visuals .level-media-assets {
  display:grid;
  grid-template-columns:1fr;
  gap:.45rem;
  max-width:none;
  margin:0;
}
.exercise-media-frame {
  position:relative;
  width:100%;
  height:clamp(180px,24vw,240px);
  overflow:hidden;
  border:1px solid var(--line);
}
.exercise-media-frame.video-frame {
  background:#111;
}
.exercise-media-frame .exercise-media,.exercise-level-visuals .exercise-media-link .exercise-media {
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  border:0;
  border-radius:0;
  object-fit:contain;
  background:transparent;
}
.exercise-media-frame:not(.video-frame) .exercise-media {
  object-fit:cover;
}
.exercise-media-frame.placeholder-frame .exercise-media {
  object-fit:cover;
}
.media-expand {
  position:absolute;
  z-index:2;
  top:.75rem;
  right:.75rem;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border:1px solid #ffffff99;
}
.exercise-level-visuals .exercise-media-link {
  display:inline-flex;
  width:max-content;
  min-height:34px;
  margin:0 0 .55rem;
  padding:.15rem 0;
  border:0;
  background:transparent;
  font-size:.76rem;
  font-weight:800;
  text-decoration:none;
}
.exercise-level-visuals .exercise-media-link:hover {
  text-decoration:underline;
}
.exercise-navigation {
  justify-content:flex-start;
  margin-top:.45rem;
}
.previous-link {
  min-height:44px;
  padding:0 .25rem;
  color:var(--muted);
  font-size:.82rem;
}
.level-picker {
  display:grid;
  gap:.45rem;
  max-width:none;
  margin:0 0 .75rem;
}
.level-picker select {
  width:100%;
  height:54px;
  padding-inline:1rem;
  font-size:1rem;
  font-weight:800;
}
.cue {
  margin:0 0 .15rem;
  background:transparent;
}
.cue-check {
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#dce8e1;
  color:var(--forest);
  font-size:.78rem;
  font-weight:900;
}
.cue-check::after {
  content:"";
  width:8px;
  height:4px;
  border-bottom:2px solid var(--forest);
  border-left:2px solid var(--forest);
  transform:translateY(-1px) rotate(-45deg);
}
.cue details {
  margin:0;
}
.cue details summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  min-height:0;
  padding:0;
  list-style:none;
  cursor:pointer;
  font-size:.82rem;
  font-weight:850;
  line-height:1.25;
}
.cue details summary::-webkit-details-marker {
  display:none;
}
.cue .disclosure-chevron {
  width:8px;
  height:8px;
  margin-right:.2rem;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:translateY(-2px) rotate(45deg);
  transition:transform 150ms ease;
}
.cue details[open] .disclosure-chevron {
  transform:translateY(2px) rotate(225deg);
}
.cue-detail {
  padding:.1rem 0 0;
  font-size:.9rem;
}
.cue-detail p {
  margin:0;
  line-height:1.55;
}
.cue-detail p+p {
  margin-top:.65rem;
}
.key-points {
  margin-top:.75rem;
  border-radius:var(--r-sm);
}
.key-points h3 {
  font-family:inherit;
  letter-spacing:.11em;
  margin:0 0 .55rem;
}
.key-points ul {
  display:grid;
  gap:.45rem;
  margin:0;
  padding:0;
  list-style:none;
}
.key-points li {
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  align-items:start;
  gap:.55rem;
  font-size:.88rem;
  line-height:1.4;
}
.key-points .cue-check {
  width:20px;
  height:20px;
}
.key-points .cue-check::after {
  width:6px;
  height:3px;
}
.level-details {
  display:grid;
  gap:.4rem;
  margin-top:.75rem;
}
.level-details h3 {
  font-family:inherit;
  letter-spacing:.11em;
  margin:0;
}
.detail-chips {
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
  margin:0;
  padding:0;
  list-style:none;
}
.detail-chips li {
  padding:.3rem .6rem;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-2);
  font-size:.78rem;
  font-weight:750;
}
.detail-muscles {
  margin:0;
  color:var(--muted);
  font-size:.85rem;
  line-height:1.4;
}
.detail-muscles span {
  color:var(--ink);
  font-weight:800;
}
.progression-levels {
  display:grid;
  margin-bottom:2rem;
}
.progression-level-card {
  margin:0;
}
.level-summary {
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:1.25rem;
  align-items:start;
}
.level-guidance h3 {
  margin:.15rem 0 .5rem;
}
.level-guidance>p {
  color:var(--muted);
  margin:.25rem 0 .8rem;
}
.level-thumbnail {
  overflow:hidden;
  aspect-ratio:16/10;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  background:var(--surface-2);
}
.level-thumbnail.video-thumbnail {
  background:#111;
}
.level-thumbnail .media-thumb {
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  border-radius:0;
  object-fit:cover;
}
.level-thumbnail video.media-thumb,.level-thumbnail .placeholder-thumb {
  object-fit:contain;
}
.level-tips {
  padding:.8rem;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  background:var(--surface-2);
}
.level-tips h4 {
  margin:0 0 .55rem;
}
.level-tips ul {
  display:grid;
  gap:.45rem;
  margin:0;
  padding:0;
  list-style:none;
}
.level-tips li {
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  align-items:start;
  gap:.55rem;
  font-size:.88rem;
  line-height:1.4;
}
.level-tips .cue-check {
  width:20px;
  height:20px;
}
.level-tips .cue-check::after {
  width:6px;
  height:3px;
}
.item-log {
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top:1rem;
}
.item-log span {
  padding:.35rem .65rem;
  font-size:.8rem;
}
.workout-tray {
  position:fixed;
  z-index:var(--z-workout-tray);
  inset:auto auto max(1rem,env(safe-area-inset-bottom)) 50%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:.75rem;
  border:1px solid var(--line);
  translate:-50% 0;
  backdrop-filter:blur(12px);
}
.workout-tray .workout-form {
  grid-column:1;
  display:grid;
  align-items:center;
}
.visually-hidden {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.tray-field>label {
  display:block;
  margin-bottom:.4rem;
}
.tray-field>label span {
  font-size:.64rem;
  font-weight:750;
}
.stepper {
  display:grid;
  grid-template-columns:54px minmax(58px,1fr) 54px;
}
.reps-field {
  min-width:0;
}
.reps-stepper {
  display:flex;
  align-items:center;
  border:1px solid var(--line);
  overflow:hidden;
}
.inline-field-label {
  padding:0 .7rem;
  color:var(--muted);
  font-size:.68rem;
  font-weight:850;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.reps-stepper button {
  flex:0 0 46px;
}
.reps-stepper input {
  flex:1 1 54px;
}
.reps-stepper button,.reps-stepper input {
  border-top:0;
  border-bottom:0;
}
.reps-stepper button:first-of-type {
  border-radius:0;
}
.reps-stepper button:last-child {
  border-radius:0;
}
.reps-stepper input {
  border-left:0;
}
.stepper button {
  font-size:1.45rem;
}
.stepper input {
  min-width:0;
  width:100%;
  border-radius:0;
  text-align:center;
  font-weight:900;
  -moz-appearance:textfield;
}
.stepper input::-webkit-inner-spin-button,.stepper input::-webkit-outer-spin-button {
  margin:0;
  -webkit-appearance:none;
}
.add-load {
  width:100%;
  border-style:dashed;
  background:transparent;
}
.tray-action {
  position:relative;
}
.tray-action::before {
  content:"";
  position:absolute;
  z-index:1;
  top:50%;
  left:calc(50% - 3.65rem);
  width:9px;
  height:5px;
  border-bottom:2px solid #fff;
  border-left:2px solid #fff;
  pointer-events:none;
  transform:translateY(-65%) rotate(-45deg);
}
.tray-action .log {
  width:100%;
  box-shadow:none;
}
.workout-tray .workout-secondary {
  position:relative;
  right:auto;
  bottom:auto;
  z-index:1;
  grid-column:2;
}
.workout-tray .workout-secondary>summary {
  width:56px;
  height:56px;
  box-shadow:none;
}
.workout-tray .workout-secondary>div {
  bottom:calc(100% + .7rem);
  border-radius:var(--r-sm);
  box-shadow:0 12px 30px #173f3520;
}
.rest-timer {
  min-height:64px;
  border-radius:var(--r-sm);
}
.media-dialog {
  width:min(1000px,calc(100vw - 3rem));
  max-width:none;
  height:min(760px,calc(100vh - 3rem));
  max-height:none;
  margin:auto;
  padding:0;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
  color:var(--ink);
  box-shadow:0 24px 80px #0d2c2570;
  overflow:hidden;
}
.media-dialog::backdrop {
  background:#102c27c7;
  backdrop-filter:blur(4px);
}
.media-dialog[open] {
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
}
.media-dialog-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.7rem 1rem;
  border-bottom:1px solid var(--line);
}
.media-dialog-header button {
  width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border:0;
  background:transparent;
  font-size:1.8rem;
  font-weight:400;
}
.media-dialog-body {
  display:grid;
  place-items:center;
  min-height:0;
  padding:1rem;
  background:#173f3508;
}
.dialog-media {
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  border-radius:var(--r-sm);
}
.media-dialog-body.media-stack {
  grid-auto-flow:row;
  gap:1rem;
  align-content:start;
  justify-items:center;
  overflow:auto;
}
.media-dialog-body.media-stack .dialog-media {
  max-height:none;
}
@media(min-width:761px) and (max-height:820px) {
  .exercise-level-visuals {
    margin-top:.65rem;
  }
  .exercise-media-frame {
    height:200px;
  }
  .media-expand {
    top:.5rem;
    right:.5rem;
  }
  .exercise-level-visuals .exercise-media-link {
    margin-bottom:0;
  }
  .exercise-navigation {
    justify-content:flex-end;
    margin-top:-2.15rem;
  }
  .previous-link {
    min-height:34px;
  }
  .level-picker select {
    height:50px;
  }
  .stepper button,.stepper input,.add-load {
    height:52px;
    min-height:52px;
  }
}
@media(max-width:760px) {
  .workout-header {
    grid-template-columns:1fr;
  }
  .workout-context strong {
    white-space:normal;
  }
  .exercise-media-frame {
    height:250px;
  }
  .exercise-level-visuals .exercise-media-link {
    margin-bottom:0;
  }
  .exercise-navigation {
    justify-content:flex-end;
    margin-top:-2.15rem;
  }
  .previous-link {
    min-height:34px;
  }
  .workout-tray .workout-secondary {
    bottom:auto;
  }
  .stepper {
    grid-template-columns:46px minmax(48px,1fr) 46px;
  }
  .stepper button,.stepper input,.add-load {
    min-height:50px;
    height:50px;
  }
  .rest-timer {
    flex-wrap:wrap;
  }
  .rest-timer .actions {
    width:100%;
    margin-left:0;
  }
  .media-dialog {
    width:calc(100vw - 1.5rem);
    height:calc(100vh - 1.5rem);
  }
  .level-summary {
    grid-template-columns:minmax(0,1fr) 180px;
  }
}
@media(max-width:620px) {
  .level-summary {
    grid-template-columns:1fr;
  }
  .level-thumbnail {
    max-width:280px;
  }
}
/* Persistent multi-profile rest timers */
.timer-center {
  position:fixed;
  z-index:19;
  right:max(1rem,env(safe-area-inset-right));
  bottom:max(1rem,env(safe-area-inset-bottom));
  display:grid;
  gap:.65rem;
  width:min(17rem,calc(100vw - 2rem));
}
.timer-center.above-workout-tray {
  bottom:calc(6.4rem + env(safe-area-inset-bottom));
}
.timer-toast {
  overflow:hidden;
  border:1px solid var(--line);
  backdrop-filter:blur(12px);
}
.timer-toast>summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  min-height:62px;
  padding:.65rem .8rem;
  list-style:none;
  cursor:pointer;
}
.timer-toast>summary::-webkit-details-marker {
  display:none;
}
.timer-toast-identity {
  display:flex;
  align-items:center;
  gap:.65rem;
  min-width:0;
}
.timer-toast-identity>i {
  width:30px;
  height:30px;
  flex:none;
  border:3px solid #ffffffaa;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#fff;
  font-style:normal;
  font-size:.78rem;
  font-weight:800;
  line-height:1;
}
.timer-toast-identity>span {
  display:grid;
  min-width:0;
  line-height:1.2;
}
.timer-toast-identity strong,.timer-toast-identity small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.timer-toast-identity small {
  margin-top:.2rem;
  text-transform:none;
  letter-spacing:0;
  font-size:.7rem;
  font-weight:650;
}
.timer-toast-time {
  font-size:1.2rem;
  font-variant-numeric:tabular-nums;
}
.timer-toast-actions {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:.45rem;
  padding:.55rem .65rem .65rem;
  border-top:1px solid var(--line);
}
.timer-toast-actions button {
  min-height:44px;
  padding:.4rem .55rem;
  font-size:.78rem;
}
.timer-toast.complete .timer-toast-actions {
  grid-template-columns:1fr;
}
.timed-set-control {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  min-width:0;
  min-height:58px;
  padding:.4rem .55rem .4rem .85rem;
  border:1px solid var(--brass);
  border-radius:var(--r-sm);
  background:var(--brass-light);
}
.timed-set-control>span {
  line-height:1.1;
}
.timed-set-control small {
  color:var(--muted);
  font-size:.68rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.timed-set-control strong {
  font-size:1.35rem;
  font-variant-numeric:tabular-nums;
}
.timed-set-control .actions {
  display:flex;
  gap:.4rem;
}
.timed-set-control button {
  min-height:44px;
  padding:.4rem .7rem;
}
/* The Start label reads "Start 60s", so the display only earns its place once the
clock is running and the label is gone. */
.timed-set-control:has([data-start-timed]:not([hidden]))>span {
  display:none;
}
.timing-fields {
  display:grid;
  gap:.65rem;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
}
.timing-fields legend {
  padding:0 .35rem;
  font-weight:800;
}
.workout-tray .rest-timer {
  grid-column:1;
  min-width:0;
}
.workout-tray .rest-timer+.workout-form[hidden]~.workout-secondary {
  grid-column:2;
  align-self:center;
}
@media(max-width:760px) {
  .workout-tray .rest-timer {
    flex-wrap:nowrap;
  }
  .workout-tray .rest-timer .actions {
    width:auto;
    margin-left:auto;
    flex-wrap:nowrap;
  }
  .workout-tray .rest-timer .actions button {
    padding:.35rem .55rem;
  }
}
@media(max-width:500px) {
  main {
    padding-inline:.75rem;
  }
  .athlete-pill,.menu-button {
    height:52px;
  }
  .athlete-avatar {
    width:32px;
    height:32px;
  }
  .workout-context {
    align-items:flex-start;
    flex-wrap:wrap;
    gap:.25rem .45rem;
  }
  .workout-context strong {
    flex-basis:100%;
  }
  .tray-field>label {
    font-size:.62rem;
  }
}
/* Balanced workout visual system */
@font-face {
  font-family:"Archivo";
  src:url("/assets/Archivo-SemiBold-0f2d87d7.ttf") format("truetype");
  font-style:normal;
  font-weight:600;
  font-display:swap;
}
.workout-page {
  --workout-mineral:#35544a;
  --workout-rust:#b85c3a;
  --workout-rust-soft:#e7c9bb;
  color:var(--workout-ink);
}
.workout-page {
  padding:1rem 0 9.5rem;
}
.workout-header {
  align-items:end;
  gap:1rem;
  margin-bottom:.75rem;
}
.workout-context {
  color:var(--workout-muted);
  font-size:.8rem;
  letter-spacing:.07em;
}
.workout-context strong,.workout-count {
  color:var(--workout-ink);
}
.workout-count {
  font-size:.9rem;
  font-variant-numeric:tabular-nums;
}
.workout-progress {
  height:6px;
  margin:0 0 1rem;
  background:var(--workout-surface-2);
}
.workout-progress span {
  background:var(--workout-rust);
}
.exercise-tabs {
  gap:.4rem;
  margin-bottom:1rem;
  padding-bottom:.25rem;
}
.exercise-tabs button {
  grid-template-columns:30px minmax(0,1fr);
  gap:.55rem;
  flex-basis:146px;
  min-width:146px;
  height:58px;
  padding:.45rem .65rem;
  border-color:transparent;
  border-radius:8px;
  background:transparent;
  color:var(--workout-muted);
}
.exercise-tabs button:hover {
  border-color:var(--workout-line);
  background:#faf9f580;
}
.exercise-tab-number {
  width:30px;
  height:30px;
  border-color:var(--workout-line);
  font-size:.74rem;
}
.exercise-tabs button.active {
  border-color:color-mix(in srgb,var(--workout-rust) 52%,var(--workout-line));
  background:color-mix(in srgb,var(--workout-rust-soft) 32%,var(--workout-surface));
  box-shadow:none;
  color:var(--workout-ink);
}
.exercise-tabs button.active .exercise-tab-number {
  border-color:var(--workout-rust);
  background:var(--workout-rust);
  color:#fff;
}
.exercise-tabs button.complete:not(.active) {
  border-color:transparent;
  background:transparent;
  color:var(--workout-mineral);
}
.exercise-tabs button.complete:not(.active) .exercise-tab-number {
  border-color:var(--workout-mineral);
  background:var(--workout-mineral);
  color:#fff;
}
.workout-exercise {
  border-color:var(--workout-line);
  border-radius:16px;
  background:var(--workout-surface);
  box-shadow:0 8px 24px #24252208;
}
.workout-main {
  grid-template-columns:minmax(0,48fr) minmax(0,52fr);
}
.exercise-overview,.exercise-coaching {
  padding:clamp(1rem,2vw,1.5rem);
}
.exercise-coaching {
  border-color:var(--workout-line);
  background:#35544a05;
}
.exercise-kicker {
  display:flex;
  align-items:center;
  gap:.5rem;
  margin:0;
  color:var(--workout-muted);
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.exercise-kicker span {
  color:var(--workout-rust);
}
.exercise-heading h2 {
  margin:.25rem 0 .45rem;
  color:var(--workout-ink);
  font-family:"Archivo","Liberation Sans",Arial,sans-serif;
  font-size:clamp(2rem,3.7vw,3rem);
  font-weight:600;
  line-height:1.04;
  letter-spacing:-.035em;
  text-transform:none;
}
.set-status {
  gap:.7rem;
  margin-top:.65rem;
}
.set-count {
  min-height:34px;
  padding:.35rem .7rem;
  border-color:color-mix(in srgb,var(--workout-rust) 32%,var(--workout-line));
  background:color-mix(in srgb,var(--workout-rust-soft) 36%,var(--workout-surface));
  color:var(--workout-ink);
}
.target-inline {
  color:var(--workout-muted);
}
.target-inline strong {
  color:var(--workout-ink);
  font-variant-numeric:tabular-nums;
}
.set-indicators i.current {
  border-color:var(--workout-rust);
  background:var(--workout-rust);
}
.set-indicators i.done:not(.current) {
  border-color:var(--workout-mineral);
  background:var(--workout-mineral);
}
.previous-performance {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.5rem;
  margin:.55rem 0 0;
  color:var(--workout-ink);
  font-size:.83rem;
}
.previous-performance span {
  color:var(--workout-muted);
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.previous-performance strong {
  font-variant-numeric:tabular-nums;
}
.previous-performance small {
  color:var(--workout-muted);
  font-size:.72rem;
  /* This one carries a rung name and a date rather than a label, and the global
     small caps make a proper noun hard to read at a glance mid-set. */
  letter-spacing:.01em;
  text-transform:none;
}
/* The rung an earlier workout was logged on sits above the one this card has
   selected, so the athlete moved up on another day and this routine has not
   caught up: the point of showing last time's set at all. */
.previous-performance .level-ahead {
  padding:.15rem .45rem;
  border-radius:999px;
  background:color-mix(in srgb,var(--workout-rust-soft,var(--brass-light)) 70%,var(--workout-surface,var(--surface)));
  color:var(--workout-ink);
  font-size:.7rem;
  font-style:normal;
  font-weight:800;
  letter-spacing:.04em;
}
/* A circuit whose window has closed while a set was under way: the card says so
   here rather than in the tray, whose height is the page's bottom clearance. */
.block-grace {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.6rem;
  margin:.55rem 0 0;
  padding:.5rem .65rem;
  border:1px solid var(--brass);
  border-radius:10px;
  background:color-mix(in srgb,var(--brass-light) 40%,var(--workout-surface,var(--surface)));
  color:var(--workout-ink,var(--ink));
  font-size:.83rem;
  line-height:1.35;
}
.block-grace strong {
  font-weight:800;
}
.block-grace p {
  flex:1 1 11rem;
  margin:0;
}
.block-grace form {
  margin:0;
}
.block-grace button {
  min-height:44px;
  padding-inline:.9rem;
  white-space:nowrap;
}
.exercise-media-frame {
  border-color:var(--workout-line);
  border-radius:12px;
  background:var(--workout-surface-2);
}
.media-expand {
  border-color:#ffffffaa;
  border-radius:8px;
  background:#faf9f5e8;
  color:var(--workout-mineral);
  box-shadow:0 2px 8px #24252218;
}
.exercise-level-visuals .exercise-media-link {
  color:var(--workout-muted);
}
.exercise-level-visuals .exercise-media-link:hover {
  color:var(--workout-mineral);
}
.level-picker select {
  border-color:var(--workout-line);
  border-radius:8px;
  background:var(--workout-surface);
  color:var(--workout-ink);
}
.level-picker select option {
  min-height:48px;
  padding:.75rem 1rem;
  font-size:1.08rem;
  font-weight:700;
  line-height:1.45;
}
.cue details summary {
  color:var(--workout-mineral);
}
.cue-detail {
  color:var(--workout-muted);
}
.key-points {
  padding:.15rem 0 0;
  border:0;
  background:transparent;
}
.key-points li {
  padding:.48rem 0;
  border-top:1px solid color-mix(in srgb,var(--workout-line) 65%,transparent);
}
.key-points .cue-check {
  border-radius:50%;
  background:#dbe5df;
  color:var(--workout-mineral);
}
.key-points .cue-check::after {
  border-color:var(--workout-mineral);
}
.workout-page .level-details {
  padding-top:.7rem;
  border-top:1px solid color-mix(in srgb,var(--workout-line) 65%,transparent);
}
.workout-page .detail-chips li {
  border-color:var(--workout-line);
  background:var(--workout-surface-2);
  color:var(--workout-ink);
}
.workout-page .detail-muscles {
  color:var(--workout-muted);
}
.workout-page .detail-muscles span {
  color:var(--workout-ink);
}
.item-log {
  padding:.75rem 0 0;
  border:0;
  border-top:1px solid var(--workout-line);
  border-radius:0;
}
.item-log span {
  border-radius:6px;
  background:var(--workout-surface-2);
  font-variant-numeric:tabular-nums;
}
.workout-tray {
  bottom:max(1rem,env(safe-area-inset-bottom));
  width:min(1088px,calc(100vw - 2rem));
  padding:.8rem;
  border-color:var(--workout-line);
  border-radius:12px;
  background:#faf9f5f5;
  color:var(--workout-ink);
  box-shadow:0 10px 30px #2425221f;
}
.workout-tray .workout-form {
  grid-template-columns:minmax(230px,.9fr) minmax(170px,.65fr) minmax(240px,1fr);
  gap:.75rem;
}
.reps-stepper {
  border-color:var(--workout-line);
  border-radius:8px;
  background:var(--workout-surface);
}
.stepper button {
  min-height:56px;
  border-color:var(--workout-line);
  background:var(--workout-surface-2);
  color:var(--workout-ink);
}
.stepper button:hover {
  border-color:var(--workout-mineral);
  background:#deddd6;
}
.stepper input {
  height:56px;
  border-color:var(--workout-line);
  background:var(--workout-surface);
  color:var(--workout-ink);
  font-size:1.2rem;
  font-variant-numeric:tabular-nums;
}
.add-load {
  height:56px;
  border-color:var(--workout-line);
  color:var(--workout-mineral);
}
.tray-action::before {
  display:none;
}
.tray-action .log {
  height:60px;
  padding-left:.9rem;
  border-color:var(--workout-rust);
  border-radius:8px;
  background:var(--workout-rust);
  font-family:inherit;
  font-size:1rem;
  text-transform:none;
}
.tray-action .log:hover {
  border-color:#9f4c31;
  background:#9f4c31;
}
.workout-tray .workout-secondary>summary {
  border-color:var(--workout-line);
  border-radius:8px;
  background:var(--workout-surface);
  color:var(--workout-ink);
}
.workout-tray .workout-secondary>div {
  border-color:var(--workout-line);
  background:var(--workout-surface);
  color:var(--workout-ink);
}
.workout-page .rest-timer {
  border-radius:8px;
  background:var(--workout-mineral);
  color:#fff;
}
.workout-page .rest-timer small {
  color:#dbe5df;
}
.workout-page .rest-timer button {
  border-color:#ffffff55;
}
.workout-page .timed-set-control {
  border-color:color-mix(in srgb,var(--workout-rust) 45%,var(--workout-line));
  border-radius:8px;
  background:color-mix(in srgb,var(--workout-rust-soft) 55%,var(--workout-surface));
  color:var(--workout-ink);
}
.workout-page .stepper input {
  padding:0 .25rem;
}
.timer-toast {
  border-color:#bdc8c2;
  border-radius:12px;
  background:#faf9f5f5;
  color:#242522;
  box-shadow:0 10px 28px #24252220;
}
.timer-toast-identity small {
  color:#686b65;
}
.timer-toast-time {
  color:#35544a;
}
.timer-toast.complete {
  border-color:#b85c3a;
}
.timer-toast.complete .timer-toast-time {
  color:#b85c3a;
}
.timer-toast-actions {
  border-color:#cfcdc5;
}
.timer-toast-actions button {
  border-color:#cfcdc5;
  background:#e7e5de;
  color:#242522;
}
.timer-toast-actions .primary {
  border-color:#35544a;
  background:#35544a;
  color:#fff;
}
.workout-tray.set-logged {
  animation:workout-confirm 550ms ease-out;
}
@keyframes workout-confirm {
  0% {
    box-shadow:0 0 0 0 #b85c3a52,0 10px 30px #2425221f;
  }
  55% {
    box-shadow:0 0 0 6px #b85c3a00,0 10px 30px #2425221f;
  }
}
@media(max-width:760px) {
  .workout-page {
    padding-top:.75rem;
  }
  .exercise-tabs button {
    flex-basis:140px;
    min-width:140px;
  }
  .workout-main {
    grid-template-columns:1fr;
  }
  .exercise-overview,.exercise-coaching {
    padding:1rem;
  }
  .exercise-coaching {
    border-top:1px solid var(--workout-line);
    border-left:0;
  }
  .exercise-heading h2 {
    font-size:clamp(2rem,8vw,2.5rem);
  }
  .workout-tray {
    bottom:max(.5rem,env(safe-area-inset-bottom));
    width:calc(100vw - 1rem);
    padding:.65rem;
  }
  .workout-tray .workout-form {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:.55rem;
  }
  .workout-form .tray-action {
    grid-column:1/-1;
  }
  .timer-center.above-workout-tray {
    bottom:calc(10.4rem + env(safe-area-inset-bottom));
  }
}
@media(max-width:500px) {
  .exercise-kicker {
    flex-wrap:wrap;
  }
  .set-status {
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .target-inline {
    white-space:normal;
  }
  .reps-stepper .inline-field-label {
    display:none;
  }
  .stepper {
    grid-template-columns:44px minmax(52px,1fr) 44px;
  }
  .stepper button {
    padding:0;
  }
  .stepper input {
    padding:0 .2rem;
  }
  .load-field .stepper input {
    font-size:1.05rem;
  }
  .workout-tray .workout-secondary>summary {
    width:48px;
  }
}
@media(prefers-reduced-motion:reduce) {
  .workout-tray.set-logged {
    animation:none;
  }
}
/* Form sizing */
.stack>input[type="submit"] {
  justify-self:start;
  width:auto;
  min-width:10rem;
}
.stack>input[type="color"] {
  width:6rem;
  padding:.4rem;
}
.inline-form {
  width:min(760px,100%);
}
.inline-form>input:not([type="submit"]) {
  min-width:0;
  flex:1;
}
.inline-form>input[type="submit"] {
  align-self:flex-start;
  flex:none;
  min-width:8.5rem;
  width:auto;
}
.block-settings {
  grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr));
}
.item-primary {
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 6rem 6rem;
}
.block-settings :is(input,select),.item-primary :is(input,select),.advanced-grid :is(input,select),.block-body textarea {
  min-width:0;
  width:100%;
}
@media(max-width:760px) {
  .block-settings,.item-primary {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  .routine-item>.row-menu summary {
    width:44px;
  }
}
@media(max-width:500px) {
  .block-settings,.item-primary,.advanced-grid {
    grid-template-columns:minmax(0,1fr);
  }
}
main {
  padding-bottom:max(.75rem,env(safe-area-inset-bottom));
}
.workout-page {
  /* Clears the tray: 89px tall, sitting max(1rem,safe-area) off the bottom.
  It used to clear 89px of the 106px needed, hiding the last of the page. */
  padding-bottom:7rem;
}
@media(min-width:761px) and (max-height:820px) {
  .workout-page .exercise-media-frame {
    height:158px;
  }
}
@media(max-width:760px) {
  .workout-page {
    /* Clears the taller stacked tray: 151px plus its max(.5rem,safe-area) offset. */
    padding-bottom:10rem;
  }
  .workout-page .exercise-media-frame {
    height:208px;
  }
}
/* Standard product surfaces ------------------------------------------------ */
:root {
  --control-h:48px;
  --content-standard:1040px;
  --content-form:720px;
  --content-builder:960px;
}
.standard-shell {
  background:var(--canvas);
}
.standard-shell h1,.standard-shell h2,.standard-shell h3 {
  font-family:inherit;
  letter-spacing:-.025em;
}
.standard-shell h1 {
  font-size:clamp(2rem,4vw,2.75rem);
  line-height:1.05;
}
.standard-shell h2 {
  font-size:clamp(1.35rem,2.5vw,1.75rem);
}
.standard-shell main {
  width:min(var(--content-standard),100%);
  padding:2rem clamp(1rem,4vw,2rem) 4rem;
}
.standard-shell .app-shell {
  position:sticky;
  inset:auto;
  top:0;
  z-index:var(--z-app-shell);
  width:100%;
  min-height:88px;
  padding:max(.8rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) .8rem max(1rem,env(safe-area-inset-left));
  pointer-events:none;
}
.standard-shell .athlete-pill,.standard-shell .menu-button {
  height:52px;
  background:var(--surface);
  box-shadow:0 2px 10px #173f350a;
}
.standard-shell .page-heading {
  align-items:end;
  margin-bottom:1.5rem;
}
.standard-shell .page-heading h1 {
  margin:.15rem 0 0;
}
.standard-shell .compact-heading {
  margin-bottom:1.5rem;
}
.standard-shell .lede {
  font-size:1rem;
}
.standard-shell .back-link {
  margin-bottom:1.25rem;
  font-size:.88rem;
}
.standard-shell button,.standard-shell .button,.standard-shell input,.standard-shell select,.standard-shell textarea {
  min-height:var(--control-h);
  border-radius:8px;
}
.standard-shell .primary {
  box-shadow:none;
}
.standard-shell .card,.standard-shell .panel,.standard-shell .hero,.standard-shell .exercise,.standard-shell .routine-block {
  border-radius:14px;
  box-shadow:none;
}
.standard-shell .corner-popover {
  border-radius:12px;
  box-shadow:0 16px 40px #173f3520;
}
.standard-shell .corner-popover a,.standard-shell .row-menu a {
  color:var(--ink);
}
.standard-shell .corner-popover a:focus-visible,.standard-shell .corner-popover button:focus-visible {
  position:relative;
  z-index:1;
}
.standard-shell .row-menu summary {
  width:48px;
  height:48px;
  border-radius:8px;
}
.standard-shell .row-menu>div {
  top:calc(100% + .25rem);
  border-radius:10px;
  padding:.35rem;
  box-shadow:0 12px 28px #173f3520;
}
.standard-shell .row-menu a,.standard-shell .row-menu button {
  min-height:44px;
  border-radius:7px;
  color:var(--ink);
  text-decoration:none;
}
.standard-shell .row-menu .danger {
  color:var(--danger);
  border-top:1px solid var(--line);
  border-radius:0;
}
.form-heading {
  max-width:var(--content-form);
  margin-bottom:1.5rem;
}
.form-heading h1 {
  margin:.15rem 0 .35rem;
}
.form-heading p:last-child {
  margin:0;
  color:var(--muted);
}
.standard-shell .stack {
  max-width:var(--content-form);
  gap:.65rem;
}
.standard-shell .stack label {
  margin-top:.35rem;
  font-size:.88rem;
}
.standard-shell .stack input:not([type=submit]):not([type=button]),.standard-shell .stack select,.standard-shell .stack textarea {
  width:100%;
  background:var(--surface);
}
.form-section-title {
  margin:1rem 0 0;
  padding-top:1rem;
  border-top:1px solid var(--line);
  font-size:1.05rem;
  font-weight:850;
}
.form-section {
  margin:.25rem 0;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 55%,transparent);
}
.form-section legend {
  padding:0 .4rem;
  font-size:.9rem;
  font-weight:850;
}
.checkbox-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));
  gap:.4rem;
}
.checkbox-grid label,.media-item label {
  display:flex;
  align-items:center;
  gap:.6rem;
  font-weight:600;
  min-height:52px;
}
.checkbox-grid input[type=checkbox],.media-item input[type=checkbox] {
  width:24px!important;
  height:24px;
  min-height:24px;
  padding:0;
  flex:none;
  accent-color:var(--forest);
}
.media-gallery {
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
}
.media-item {
  display:grid;
  gap:.35rem;
  align-content:start;
}
.media-item .media-preview {
  max-height:160px;
}
.timing-fields>select {
  margin-bottom:.75rem;
}
.timing-fields [data-duration-settings] {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.75rem;
}
.timing-fields [data-duration-settings] label {
  align-self:end;
}
.color-control {
  display:flex;
  align-items:center;
  gap:.75rem;
  min-height:56px;
  padding:.5rem .65rem;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
}
.color-control input[type=color] {
  width:42px!important;
  height:42px;
  min-height:42px;
  padding:3px;
  border-radius:8px;
  cursor:pointer;
}
.color-control span {
  color:var(--muted);
  font-size:.9rem;
}
.management-section {
  margin-top:2rem;
}
.section-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1rem;
}
.section-heading h2 {
  margin:.1rem 0 0;
}
.section-heading>.eyebrow {
  margin:0;
}
.section-count {
  color:var(--muted);
  font-size:.82rem;
  font-weight:750;
}
.management-list {
  display:grid;
  border-top:1px solid var(--line);
}
.management-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:1rem;
  padding:1rem 0;
  border-bottom:1px solid var(--line);
}
.management-row h3 {
  margin:0;
  font-size:1rem;
}
.management-row p {
  margin:.2rem 0 0;
  color:var(--muted);
  font-size:.85rem;
}
.management-row .actions {
  justify-content:flex-end;
}
.management-row .actions button {
  min-width:48px;
}
.add-inline {
  max-width:620px;
  margin-top:1rem;
}
.rename-form {
  max-width:620px;
  margin-bottom:2rem;
}
.filter-empty {
  padding:2rem;
  border:1px dashed var(--line);
  border-radius:12px;
  color:var(--muted);
  text-align:center;
}
.standard-shell .compact-list {
  gap:.4rem;
}
.standard-shell .compact-row {
  min-height:70px;
  padding:.65rem .8rem;
  border-radius:10px;
}
.standard-shell .compact-row:hover {
  border-color:color-mix(in srgb,var(--forest) 28%,var(--line));
  background:color-mix(in srgb,var(--surface) 82%,var(--surface-2));
}
.manage-grid {
  grid-template-columns:repeat(3,1fr);
}
.manage-grid .destination {
  min-height:120px;
  margin:0;
  padding:1.15rem;
  border-radius:14px;
}
.destination-icon {
  width:44px;
  height:44px;
  border-radius:10px;
}
.destination h2 {
  font-size:1.25rem;
}
.destination p {
  font-size:.86rem;
  line-height:1.4;
}
/* Progressions */
.progression-heading {
  margin-bottom:1rem;
}
.progression-levels {
  gap:.65rem;
}
.standard-shell .progression-level-card {
  padding:1rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
}
.standard-shell .level-summary {
  grid-template-columns:minmax(0,1fr) 150px;
  gap:1rem;
}
.level-title-row {
  display:flex;
  align-items:flex-start;
  gap:.75rem;
}
.level-position {
  display:grid;
  place-items:center;
  flex:none;
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--surface-2);
  font-size:.75rem;
  font-weight:900;
}
.level-title-row h3 {
  margin:.15rem 0 .2rem;
  font-size:1rem;
}
.standard-shell .level-guidance>p {
  margin:.55rem 0;
  color:var(--muted);
  font-size:.9rem;
}
.standard-shell .level-tips {
  padding:.65rem 0 0;
  border:0;
  border-top:1px solid var(--line);
  border-radius:0;
  background:transparent;
}
.standard-shell .level-tips ul {
  margin-top:.45rem;
}
.standard-shell .level-thumbnail {
  border-radius:8px;
}
.level-actions {
  margin-top:.8rem;
  padding-top:.8rem;
  border-top:1px solid var(--line);
}
.level-actions button {
  min-width:48px;
}
.add-level-disclosure {
  max-width:var(--content-form);
  margin-top:1.5rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
}
.add-level-disclosure>summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:64px;
  padding:.75rem 1rem;
  list-style:none;
  cursor:pointer;
}
.add-level-disclosure>summary span:first-child {
  display:grid;
}
.add-level-disclosure>summary small {
  text-transform:none;
  letter-spacing:0;
  font-weight:500;
}
.add-level-disclosure>div {
  padding:0 1rem 1.25rem;
  border-top:1px solid var(--line);
}
/* History */
.history-list {
  display:grid;
  gap:.5rem;
}
.history-session {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  overflow:hidden;
}
.history-session>summary {
  display:grid;
  grid-template-columns:16px minmax(0,1fr) auto auto;
  align-items:center;
  gap:.75rem;
  min-height:64px;
  padding:.75rem 1rem;
  list-style:none;
  cursor:pointer;
}
.history-session>summary strong {
  min-width:0;
}
.history-session time {
  color:var(--muted);
  font-size:.78rem;
}
.history-count {
  padding:.25rem .5rem;
  border-radius:999px;
  background:var(--surface-2);
  font-size:.76rem;
  font-weight:800;
}
.history-chevron {
  width:8px;
  height:8px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(-45deg);
  transition:transform 150ms ease;
}
.history-session[open] .history-chevron {
  transform:rotate(45deg);
}
.history-sets {
  padding:0 1rem .5rem;
}
.history-set {
  display:grid;
  grid-template-columns:28px minmax(150px,1fr) minmax(100px,.6fr) minmax(150px,.8fr) auto;
  align-items:center;
  gap:.75rem;
  margin:0;
  padding:.6rem 0;
  border-top:1px solid var(--line);
  font-size:.86rem;
}
.history-set-number {
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.history-actions {
  display:flex;
  justify-content:flex-end;
  padding:.75rem 0 .35rem;
  border-top:1px solid var(--line);
}
.history-actions button {
  min-height:44px;
  font-size:.85rem;
  padding:.4rem .9rem;
}
.history-set small {
  text-transform:none;
  letter-spacing:0;
  text-align:right;
}
/* A mistake made mid-workout has nowhere to be fixed once the weights are
racked, so a row is corrected here. One editor for the page moves into the row
being edited, which is why it is a sibling of .history-set rather than part of
its grid. */
.history-set-edit {
  min-height:44px;
  padding:.35rem .8rem;
  font-size:.78rem;
}
.history-set.editing {
  background:var(--surface-2);
}
.history-editor {
  display:grid;
  gap:.75rem;
  margin:0 0 .6rem;
  padding:.85rem;
  border:1px solid var(--brass);
  border-radius:12px;
  background:var(--surface-2);
}
.history-editor-fields {
  display:grid;
  grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr);
  gap:.75rem;
}
.history-editor-fields label {
  display:grid;
  gap:.3rem;
  min-width:0;
}
.history-editor-fields select,.history-editor-fields input {
  width:100%;
  min-height:48px;
}
.history-editor .error {
  margin:0;
  font-size:.85rem;
}
.history-editor-actions {
  display:flex;
  justify-content:flex-end;
  gap:.5rem;
}
.history-editor-actions button {
  min-height:44px;
  padding:.4rem .9rem;
  font-size:.85rem;
}
.recent-workouts {
  margin-top:2.5rem;
}
.text-link {
  color:var(--forest);
  font-size:.88rem;
  font-weight:800;
}
.routine-card>.actions {
  margin-top:auto;
}
/* Routine builder */
.routine-builder {
  max-width:var(--content-builder);
}
.builder-page-heading {
  max-width:var(--content-builder);
}
.builder-identity {
  max-width:none;
  padding:1.25rem;
  border-radius:12px;
}
.builder-identity details>summary {
  display:flex;
  align-items:center;
  min-height:44px;
  cursor:pointer;
}
.builder-section-heading {
  margin:2rem 0 1rem;
}
.add-block-menu>summary {
  width:auto!important;
  min-width:132px;
  padding-inline:1rem;
}
.add-block-menu>div {
  top:calc(100% + .4rem);
  min-width:260px;
}
.template-picker {
  display:grid!important;
  gap:.2rem!important;
}
.template-picker button {
  display:grid!important;
  justify-items:start!important;
  gap:0!important;
}
.template-picker small {
  text-transform:none;
  letter-spacing:0;
  font-weight:500;
}
.standard-shell .routine-block {
  margin-bottom:.65rem;
  padding:0;
  overflow:visible;
  border-radius:12px;
}
.routine-block>summary {
  min-height:68px;
  padding:.75rem 1rem;
}
.routine-block[open]>summary {
  border-bottom:1px solid var(--line);
}
.disclosure-mark {
  transition:transform 150ms ease;
}
.routine-block[open] .disclosure-mark {
  transform:rotate(180deg);
}
.block-number {
  width:34px;
  height:34px;
}
.block-body {
  padding:0 1rem 1rem;
  border-top:0;
}
.block-settings {
  padding:.9rem 0;
}
.routine-item {
  grid-template-columns:36px minmax(0,1fr) 48px;
}
.drag-handle {
  width:36px;
}
.routine-item.pending-removal,.routine-block.pending-removal {
  opacity:.58;
}
.routine-item.pending-removal .item-primary,.routine-item.pending-removal .advanced-fields,.routine-block.pending-removal>.block-body>:not(.block-actions) {
  pointer-events:none;
}
.pending-removal {
  background:color-mix(in srgb,var(--danger) 5%,var(--surface));
}
.remove-item {
  min-height:44px!important;
  margin-top:.35rem;
  padding:.25rem 0!important;
}
.block-actions {
  margin-top:.75rem;
  padding-top:.75rem;
  border-top:1px solid var(--line);
}
.builder-actions-footer {
  display:flex;
  justify-content:flex-end;
  gap:.75rem;
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid var(--line);
}
.builder-actions-footer .primary {
  min-width:160px;
}
@media(max-width:760px) {
  .standard-shell main {
    padding:1rem 13px 3rem;
  }
  .standard-shell .app-shell {
    min-height:82px;
    /* Keeps the safe-area inset the base rule provides: replacing the whole
    shorthand here used to drop it and put the pill under the notch. */
    padding:max(.75rem,env(safe-area-inset-top)) max(17px,env(safe-area-inset-right)) .75rem max(17px,env(safe-area-inset-left));
  }
  .standard-shell .page-heading {
    align-items:stretch;
    gap:1rem;
    margin-bottom:1.25rem;
  }
  .standard-shell .page-heading>.button {
    width:100%;
  }
  .standard-shell .athlete-pill,.standard-shell .menu-button {
    height:52px;
  }
  .standard-shell .athlete-pill small,.standard-shell .menu-button span {
    display:none;
  }
  .standard-shell h1 {
    font-size:2rem;
  }
  .standard-shell .corner-popover {
    max-width:calc(100vw - 26px);
  }
  .standard-shell .row-menu>div {
    width:min(260px,calc(100vw - 26px));
  }
  .manage-grid {
    grid-template-columns:1fr;
    gap:.55rem;
  }
  .manage-grid .destination {
    grid-template-columns:44px 1fr auto;
    min-height:88px;
    padding:.85rem 1rem;
  }
  .destination h2 {
    font-size:1.1rem;
  }
  .destination p {
    font-size:.82rem;
  }
  .standard-shell .compact-row {
    min-height:68px;
  }
  .timing-fields [data-duration-settings] {
    grid-template-columns:1fr;
  }
  .management-row {
    grid-template-columns:1fr;
  }
  .management-row .actions {
    justify-content:flex-start;
  }
  .management-row .actions .button {
    flex:1;
  }
  .add-inline {
    display:grid;
    grid-template-columns:1fr;
  }
  .add-inline .primary {
    width:100%;
  }
  .standard-shell .level-summary {
    grid-template-columns:1fr;
  }
  .standard-shell .level-thumbnail {
    width:min(100%,280px);
  }
  .level-actions .button {
    flex:1;
  }
  .level-actions form:last-child {
    margin-left:auto;
  }
  .history-session>summary {
    grid-template-columns:16px minmax(0,1fr) auto;
    gap:.55rem;
  }
  .history-session time {
    grid-column:2;
  }
  .history-count {
    grid-row:1/3;
    grid-column:3;
  }
  .history-set {
    grid-template-columns:24px minmax(0,1fr) auto auto;
  }
  .history-set-edit {
    grid-row:1/3;
    grid-column:4;
  }
  .history-set small {
    grid-column:2/4;
    text-align:left;
  }
  .history-set span:nth-child(3) {
    text-align:right;
  }
  .builder-page-heading .lede {
    max-width:34ch;
  }
  .builder-section-heading {
    align-items:center;
  }
  .add-block-menu>summary {
    min-width:116px;
  }
  .add-block-menu>div {
    position:absolute!important;
    inset:auto 0 auto auto!important;
    width:min(280px,calc(100vw - 26px))!important;
    min-width:0;
  }
  .block-settings {
    grid-template-columns:1fr;
  }
  .item-primary {
    grid-template-columns:1fr 1fr;
  }
  .item-primary label:nth-child(-n+2) {
    grid-column:1/-1;
  }
  .routine-item {
    grid-template-columns:28px minmax(0,1fr) 44px;
    gap:.45rem;
  }
  .drag-handle {
    width:28px;
  }
  .routine-item>.row-menu {
    grid-column:auto;
  }
  .builder-actions-footer {
    position:static;
    padding-bottom:max(0px,env(safe-area-inset-bottom));
  }
  .builder-actions-footer>* {
    flex:1;
  }
  .builder-identity {
    padding:1rem;
  }
  .block-body {
    padding-inline:.75rem;
  }
}
.routine-builder,.routine-block,.block-body,.item-fields,.item-primary,.item-primary label {
  min-width:0;
}
.item-primary select,.item-primary input,.advanced-grid input {
  min-width:0;
  width:100%;
}
.standard-shell .button:not(.primary) {
  color:var(--ink);
}
/* Cooler neutral foundation */
:root {
  --canvas:#ececea;
  --canvas-deep:#e3e3df;
  --surface:#fcfbf8;
  --surface-2:#f3f2ef;
  --line:#d3d3d0;
}
body {
  background:radial-gradient(circle at 15% 5%,#f9f8f6 0,transparent 36%),var(--canvas);
}
.athlete-pill,.menu-button {
  background:#fcfbf8ef;
}
.workout-page {
  --workout-canvas:#eeefee;
  --workout-surface:#fafaf9;
  --workout-surface-2:#e5e7e5;
  --workout-ink:#242625;
  --workout-muted:#686c6a;
  --workout-line:#cccfcc;
}
/* Timed-set tray keeps every control on one row */
.timed-set-control {
  flex-wrap:nowrap;
}
.timed-set-control>span {
  flex:none;
  display:flex;
  align-items:center;
}
.timed-set-control strong {
  margin-top:0;
}
.timed-set-control .actions {
  flex-wrap:nowrap;
}
.timed-set-control .actions button {
  white-space:nowrap;
}
.workout-form .tray-action:has(>input[hidden]) {
  display:none;
}
.workout-form:has(.timed-set-control:not([hidden])) {
  grid-template-columns:minmax(0,1.9fr) minmax(140px,.55fr) minmax(0,auto);
}
@media(max-width:760px) {
  .workout-form:has(.timed-set-control:not([hidden])) {
    grid-template-columns:minmax(0,1fr) minmax(130px,.5fr);
  }
}
/* AMRAP block clock */
/* Round counter beside the set count on AMRAP blocks */
.amrap-round {
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:.35rem .75rem;
  border-radius:999px;
  background:var(--brass-light);
  font-weight:800;
  font-size:.78rem;
}
.set-status .set-count {
  margin-top:0;
}
summary::-webkit-details-marker {
  display:none;
}
.level-picker select {
  appearance:none;
  -webkit-appearance:none;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M2 4l4 4 4-4" fill="none" stroke="%23173f35" stroke-width="2" stroke-linecap="round"/></svg>');
  background-repeat:no-repeat;
  background-position:right 1rem center;
  padding-right:2.6rem;
}
.workout-page .amrap-round {
  border-radius:999px;
  background:color-mix(in srgb,var(--workout-rust-soft) 55%,var(--workout-surface));
  color:var(--workout-ink);
}
/* Athlete-defined timers: the tray menu opens this form in a modal */
.form-dialog {
  width:min(560px,calc(100vw - 2rem));
  max-width:none;
  margin:auto;
  padding:0;
  border:1px solid var(--workout-line,var(--line));
  border-radius:16px;
  background:var(--workout-surface,var(--surface));
  color:var(--workout-ink,var(--ink));
  box-shadow:0 24px 80px #0d2c2570;
  overflow:visible;
}
.form-dialog::backdrop {
  background:#102c27c7;
  backdrop-filter:blur(4px);
}
.form-dialog>form {
  display:grid;
  margin:0;
}
.form-dialog-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.7rem .7rem .7rem 1.1rem;
  border-bottom:1px solid var(--workout-line,var(--line));
}
.form-dialog-header strong {
  font-size:1.05rem;
}
.form-dialog-header button {
  width:52px;
  height:52px;
  min-height:52px;
  padding:0;
  border:0;
  background:transparent;
  font-size:1.8rem;
  font-weight:400;
}
.form-dialog-body {
  display:grid;
  gap:.55rem;
  padding:1.1rem;
}
.form-dialog-body .utility-label {
  margin:0;
}
.form-dialog-body>.error {
  margin:0;
}
.timer-presets {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.5rem;
  margin-bottom:.35rem;
}
.timer-presets button {
  min-height:60px;
  padding:.4rem;
  border-color:color-mix(in srgb,var(--workout-mineral,var(--forest)) 26%,var(--workout-line,var(--line)));
  background:var(--workout-surface-2,var(--surface-2));
  font-size:1rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.timer-custom-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.6rem;
  align-items:end;
}
.timer-custom-fields label {
  display:block;
  margin-bottom:.3rem;
  color:var(--workout-muted,var(--muted));
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.timer-custom-fields label small {
  text-transform:none;
  letter-spacing:0;
  font-weight:600;
}
.timer-custom-fields input {
  width:100%;
}
.timer-name-field {
  grid-column:1/-1;
}
.form-dialog-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);
  gap:.6rem;
  padding:0 1.1rem 1.1rem;
}
.form-dialog-actions button {
  min-height:56px;
}
/* The dialog is a fixed 560px in both iPad orientations, so the preset grid keys
off the point where the dialog itself starts shrinking, not the viewport. */
@media(max-width:430px) {
  /* A row menu is anchored under its own row and has no flip, so on the last
  row of a short list it opened below the viewport with no way to reach it.
  Anchor it to the screen instead. .row-menu[open] carries the open-menu band
  and creates the stacking context, so the fixed panel paints inside it and
  still clears the sticky header. */
  .row-menu[open]>div {
    position:fixed;
    inset:auto max(.75rem,env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) max(.75rem,env(safe-area-inset-left));
    top:auto;
    width:auto;
    min-width:0;
    padding:.4rem;
    border-radius:14px;
    box-shadow:0 -8px 40px #173f3530;
  }
  .row-menu[open]::before {
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    background:#24252233;
  }
  .row-menu[open]>div a,.row-menu[open]>div button {
    min-height:52px;
  }
  /* draggable="true" does nothing on touch, so Move up / Move down in the row
  menu is the only reorder path here and the grab handle is dead weight. */
  .routine-item {
    grid-template-columns:minmax(0,1fr) 48px;
    gap:.45rem;
  }
  .routine-item>.drag-handle {
    display:none;
  }
  .timer-presets {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .form-dialog-actions {
    grid-template-columns:minmax(0,1fr);
  }
}
/* Open overflow menus paint above the chrome they open into --------------- */
/* .row-menu was position:relative with no z-index, so it never created a
stacking context and its z-index:5 panel competed globally - losing to the
sticky header at 20. Give the open menu the band and let the panel sit
inside it. */
.row-menu[open] {
  z-index:var(--z-open-menu);
}
.row-menu[open]>div {
  z-index:1;
}
/* The tray kebab opens upward out of .workout-tray, which is a stacking
context twice over: z-index:12 and backdrop-filter. Nothing inside it can
ever out-rank the timer toasts at 19, whatever z-index the panel is given,
so the tray itself is raised while its menu is open. This collides at every
viewport, tablet included, not just on a phone. */
.workout-tray:has(.tray-menu[open]) {
  z-index:var(--z-open-menu);
}
.workout-tray .workout-secondary[open]>div {
  z-index:1;
}
/* The workout tray below the tablet ---------------------------------------- */
/* At 390px the tray has ~353px of inner width; minus the 48px kebab that is
~144px per column. Reps and load are two 132px steppers and read well side
by side, but the log button, the timed control and the rest timer each need
the whole row. */
@media(max-width:500px) {
  /* A floating card costs the phone its bottom margin, its rounded lower
  corners and a shadow nobody sees. Sit on the screen edge instead and spend
  the reclaimed band on the exercise. The safe-area inset moves into the
  padding, since it is no longer holding the card up off the home indicator. */
  .workout-tray {
    inset:auto 0 0 0;
    width:100%;
    translate:none;
    gap:.5rem;
    padding:.45rem .6rem calc(.45rem + env(safe-area-inset-bottom));
    border-width:1px 0 0;
    border-radius:12px 12px 0 0;
  }
  /* 56 and 60 are tablet sizes for a tablet's room. 52 still clears the 44px
  target with margin, and the tray is two rows deep here. */
  .workout-tray .stepper button {
    min-height:52px;
  }
  .workout-tray .stepper input {
    height:52px;
  }
  .workout-tray .add-load {
    height:52px;
  }
  .workout-tray .tray-action .log {
    height:52px;
  }
  /* The rest timer wraps to a second row here, so leave more headroom than the
  131px idle tray needs: the rest tray is 143 and the AMRAP one 140. Those are
  QA numbers, which run about 6% high (see AGENTS.md), so leave a rem of slack. */
  .workout-page {
    padding-bottom:9.75rem;
  }
  /* A running timed set is the one tray that does not fit that: a clock, two
  buttons and the load row make 174px. Paying for it on every reps card costs
  29px of exercise on the screen for a state most cards never enter, so charge
  it to the cards that do. Scoped to the visible card, since every card carries
  its own tray and the hidden ones would all match. */
  .workout-page:has([data-exercise-index]:not([hidden]) .timed-set-control:not([hidden])) {
    padding-bottom:11.5rem;
  }
  .workout-tray .workout-form {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:.5rem;
  }
  .workout-form .tray-action,.workout-form .timed-set-control {
    grid-column:1/-1;
  }
  .workout-form:has(.timed-set-control:not([hidden])) {
    grid-template-columns:minmax(0,1fr);
  }
  /* "+ Add load (kg)" wrapped inside a fixed-height box. Shrink it rather
  than shorten it: the exact label is asserted in the workflow test. */
  .add-load {
    font-size:.82rem;
    padding-inline:.35rem;
    white-space:nowrap;
  }
  /* The kebab had gone non-square: width dropped to 48 while height stayed 56. */
  .workout-tray .workout-secondary>summary {
    width:48px;
    height:48px;
  }
  /* A 25px clock, a label with no min-width:0 and three nowrap buttons cannot
  share 353px, so undo the tablet's flex-wrap:nowrap here. */
  .workout-tray .rest-timer {
    flex-wrap:wrap;
    row-gap:.45rem;
    min-height:0;
    padding:.5rem .6rem;
  }
  .rest-timer>span {
    flex:1 1 auto;
    min-width:0;
  }
  /* The label can be "Get ready: <long exercise name>", so wrap it rather
  than ellipsise it - the name is the information. */
  .rest-timer small {
    white-space:normal;
    overflow-wrap:anywhere;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .workout-tray .rest-timer .actions {
    width:100%;
    margin-left:0;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:.4rem;
  }
  .workout-tray .rest-timer .actions button {
    min-height:44px;
    padding:.4rem .3rem;
  }
  /* "Log without timer" alone is about 150px, so the one-row rule guaranteed
  an overflow here too. */
  .timed-set-control {
    flex-wrap:wrap;
    row-gap:.5rem;
    min-height:0;
    padding:.5rem .6rem;
  }
  .timed-set-control>span {
    flex:0 0 auto;
  }
  .timed-set-control .actions {
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.4rem;
  }
  /* Two-line wrap, not a shorter label: the string is asserted verbatim. */
  .timed-set-control .actions button {
    white-space:normal;
    padding-inline:.4rem;
    font-size:.82rem;
    line-height:1.15;
    min-height:44px;
  }
  /* Two short lines and an avatar, so 62px of summary was padding around nothing.
  48px still clears the 44px touch target. */
  .timer-toast>summary {
    min-height:48px;
    gap:.5rem;
    padding:.4rem .55rem;
  }
  .timer-toast-identity {
    gap:.5rem;
  }
  .timer-toast-identity>i {
    width:26px;
    height:26px;
    border-width:2px;
    font-size:.68rem;
  }
  .timer-toast-identity small {
    margin-top:.1rem;
    font-size:.65rem;
  }
  .timer-toast-time {
    font-size:1.05rem;
  }
  /* Three nowrap labels across a toast under 200px wide, so the columns have
  to give up their padding rather than the toast its width. */
  .timer-toast-actions {
    gap:.35rem;
    padding:.45rem .5rem .5rem;
  }
  .timer-toast-actions button {
    padding:.4rem .15rem;
    font-size:.72rem;
  }
  /* The tray owns the bottom of the screen here and its height is not knowable
  in CSS, so "10.4rem above the tray" was a guess that a taller tray breaks.
  Dock the toasts under the header instead, which also takes them out of the
  band the tray kebab opens into. Right rather than left, as on the tablet: the
  heading starts at the left margin, so a toast there buries its first word. */
  .timer-center,.timer-center.above-workout-tray {
    top:calc(5.2rem + env(safe-area-inset-top));
    bottom:auto;
    right:max(.5rem,env(safe-area-inset-right));
    left:auto;
    gap:.45rem;
    width:min(11.5rem,calc(100vw - 7rem));
  }
}
/* Exercise tabs below the tablet ------------------------------------------- */
/* At a 140px flex-basis behind a hidden scrollbar only 2.6 of 8-15 tabs were
visible, with nothing to say more existed. 3 x 118 + 2 x 6.8 = 367.6px
against 364.5px of content at 390px, so a third tab always peeks, and the
masked edge shows the strip continues. */
@media(max-width:500px) {
  .exercise-tabs {
    gap:.4rem;
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 2rem),transparent 100%);
    mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 2rem),transparent 100%);
  }
  .exercise-tabs button {
    flex:0 0 118px;
    min-width:118px;
    height:52px;
    grid-template-columns:26px minmax(0,1fr);
    gap:.45rem;
    padding:.4rem .5rem;
  }
  .exercise-tab-number {
    width:26px;
    height:26px;
    font-size:.8rem;
  }
  .exercise-tabs button .exercise-tab-name {
    font-size:.78rem;
  }
}
/* Routine builder below the tablet ----------------------------------------- */
/* .advanced-grid ran 2 columns above 500, 1 column at 421-500 and 2 again
below 420 because a max-width:420px block re-widened it with !important.
Narrower now never means more columns. .item-primary keeps its two columns,
which is what ships today and reads better for sets and reps. */
@media(max-width:500px) {
  .advanced-grid {
    grid-template-columns:minmax(0,1fr);
  }
}
/* History corrections below the tablet ------------------------------------- */
/* Three fields across a phone leaves a rung name in about 12 characters, so the
editor stacks and the row it is correcting keeps the width. */
@media(max-width:500px) {
  .history-editor-fields {
    grid-template-columns:minmax(0,1fr);
  }
  .history-editor-actions button {
    flex:1;
  }
}
/* Touch targets below the tablet ------------------------------------------- */
/* These read as text links and were 17-34px tall, well under the 44px touch
minimum. Scoped to the phone so the tablet layout is untouched. */
@media(max-width:500px) {
  .back-link {
    display:inline-flex;
    align-items:center;
    min-height:44px;
  }
  .previous-link,.exercise-level-visuals .exercise-media-link {
    min-height:44px;
  }
  .cue details summary {
    display:flex;
    align-items:center;
    min-height:44px;
  }
}
/* Phone tier ------------------------------------------------------------- */
/* Absorbs the old max-width:420px block, which a 430px Pro Max missed
entirely. 393 (15 Pro), 390 (13) and 430 (Pro Max) all land here. */
@media(max-width:430px) {
  /* The coloured avatar and its initial already identify the athlete, so the
  name is dropped rather than ellipsised and the pill cannot outgrow the
  header. The tablet keeps the name. */
  .athlete-identity {
    display:none;
  }
  .athlete-pill {
    max-width:none;
    gap:.5rem;
    padding:.4rem .55rem;
  }
  .athlete-pill>svg {
    width:16px;
    height:16px;
  }
  /* With the name gone there is room to label the only navigation control on
  the page again, instead of leaving a bare three-dot glyph. */
  .menu-button span {
    display:inline;
  }
  .menu-button {
    gap:.4rem;
    padding-inline:.75rem;
  }
  .standard-shell .corner-popover {
    min-width:0;
  }
  .history-session>summary strong {
    line-height:1.25;
  }
}
/* Timed blocks: start gate, finished state, and per-side item labels */
.workout-form.gated {
  display:none;
}
/* Sits in the form's column so the tray menu stays beside it on the same row. */
.block-gate {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.75rem;
  align-items:center;
  grid-column:1;
  padding:.6rem .75rem;
  border:1px solid color-mix(in srgb,var(--workout-mineral,var(--forest)) 30%,var(--workout-line,var(--line)));
  border-radius:10px;
  background:var(--workout-surface-2,var(--surface-2));
}
.block-gate>span {
  display:grid;
  min-width:0;
  line-height:1.25;
}
.block-gate strong {
  font-size:1rem;
}
.block-gate small {
  margin-top:.15rem;
  text-transform:none;
  letter-spacing:0;
  font-weight:600;
  color:var(--workout-muted,var(--muted));
}
.block-gate form {
  margin:0;
}
.block-gate button {
  min-height:56px;
  padding-inline:1.2rem;
  white-space:nowrap;
}
.block-gate:not(.complete) {
  padding:0;
  border:0;
  background:none;
}
.block-gate.complete {
  border-color:var(--brass);
  background:color-mix(in srgb,var(--brass-light) 40%,var(--workout-surface,var(--surface)));
}
.exercise-side {
  display:inline-block;
  vertical-align:middle;
  margin-left:.5rem;
  padding:.3rem .6rem;
  border-radius:999px;
  background:color-mix(in srgb,var(--workout-rust-soft,var(--brass-light)) 60%,var(--workout-surface,var(--surface)));
  font-family:"Liberation Sans",Arial,system-ui,sans-serif;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.06em;
  line-height:1;
  text-transform:uppercase;
}
@media(max-width:760px) {
  .block-gate {
    grid-template-columns:minmax(0,1fr);
  }
  .block-gate button {
    width:100%;
  }
}
