/* RioFit UI - optimized stylesheet (cleaned from style.css) */
:root{
  --bg:#F3F1EA;
  --frame:#E8E5DC;
  --panel:#DDE3D6;
  --card:#E3E8DE;
  --chip:#DAD7CD;
  --chip-active:#C9CFC2;
  --mint:#CFE7D8;
  --mint-hover:#C1DCCF;
  --text:#1E2A23;
  --muted:#4B5A52;
  --border:rgba(30,42,35,.28);
  --shadow:0 10px 18px rgba(0,0,0,.12);
  --r-xl:24px;
  --r-lg:20px;
  --r-md:16px;
  --r-pill:999px;
  --container:1280px;
  --topbar-h:84px;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* Layout */
.page{min-height:100vh;display:flex;flex-direction:column;}
main{flex:1;padding-bottom:30px;}
.frame{
  position:relative;
  width:min(var(--container),calc(100% - 24px));
  margin:0 auto;
  min-height:calc(100vh - var(--topbar-h));
}
.frame::before,.frame::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width:2px;
  background:rgba(30,42,35,.22);
}
.frame::before{left:0;}
.frame::after{right:0;}
.frame__inner{padding:28px 22px 36px;}
.section{margin-top:22px;}
.panel{
  background:var(--panel);
  border-radius:var(--r-xl);
  padding:26px 28px;
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}

/* Header */
.topbar{background:var(--frame);border-bottom:2px solid rgba(30,42,35,.22);}
.topbar__row{
  width:min(var(--container),calc(100% - 24px));
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:18px;
  padding:14px 6px;
}
.logo{
  font-family:"Brush Script MT","Segoe Script",cursive;
  font-size:34px;
  font-weight:900;
  letter-spacing:.3px;
  text-decoration:none;
  color:var(--text);
}
.nav{display:flex;gap:18px;flex:1;justify-content:center;}
.nav__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:44px;
  min-width:220px;
  padding:0 22px;
  border-radius:var(--r-pill);
  background:var(--chip);
  border:2px solid rgba(30,42,35,.18);
  color:var(--text);
  text-decoration:none;
  font-size:22px;
  font-weight:800;
}
.nav__link:hover{filter:brightness(.99);}
.nav__link.is-active{background:var(--chip-active);}
.nav__right{display:flex;align-items:center;gap:10px;}
.user-ico{width:30px;height:30px;display:inline-block;}

/* Typography */
.h1{margin:0 0 8px;font-size:56px;letter-spacing:.2px;}
.h2{margin:0 0 12px;font-size:40px;}
.lead{margin:0;color:var(--muted);font-size:26px;line-height:1.25;}

/* Buttons and badges */
.btn,.btn-start,.small-btn,.btn-secondary,.profile-link-btn{
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:52px;
  min-width:240px;
  padding:0 26px;
  border:0;
  border-radius:var(--r-pill);
  background:var(--mint);
  box-shadow:var(--shadow);
  font-size:28px;
  font-weight:900;
}
.btn:hover{background:var(--mint-hover);}
.btn--md{height:54px;min-width:260px;font-size:30px;}
.btn-start{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:74px;
  min-width:320px;
  border:0;
  border-radius:var(--r-pill);
  background:var(--mint);
  box-shadow:var(--shadow);
  font-size:38px;
  font-weight:900;
}
.btn-start:hover{background:var(--mint-hover);}
.small-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 16px;
  border:0;
  border-radius:var(--r-pill);
  background:var(--mint);
  box-shadow:var(--shadow);
  font-size:18px;
  font-weight:900;
}
.small-btn:hover{background:var(--mint-hover);}
.small-btn--ghost{
  background:rgba(255,255,255,.18);
  border:2px solid rgba(30,42,35,.22);
  box-shadow:none;
}
.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:48px;
  min-width:220px;
  padding:0 20px;
  border:2px solid rgba(30,42,35,.18);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.16);
  box-shadow:0 6px 12px rgba(0,0,0,.06);
  font-size:20px;
  font-weight:900;
}
.btn-secondary:hover{background:rgba(255,255,255,.24);}
.badge{
  display:inline-flex;
  align-items:center;
  height:36px;
  padding:0 14px;
  border:2px solid rgba(30,42,35,.28);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.14);
  font-size:18px;
  font-weight:900;
}
.badge--done{background:var(--mint);border-color:rgba(30,42,35,.18);}

/* Chips */
.chips{display:flex;gap:14px;flex-wrap:wrap;}
.chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  height:44px;
  padding:0 18px;
  border:2px solid rgba(30,42,35,.35);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.18);
  font-size:22px;
  font-weight:900;
}
.chip__bars{display:inline-grid;grid-auto-flow:column;gap:3px;align-items:end;}
.chip__bars span{display:block;width:4px;background:rgba(30,42,35,.75);border-radius:2px;}
.chip__bars span:nth-child(1){height:10px;}
.chip__bars span:nth-child(2){height:16px;}
.chip__bars span:nth-child(3){height:22px;}

/* Alerts */
.alert{
  margin-top:14px;
  padding:12px 14px;
  border:2px solid rgba(30,42,35,.18);
  border-radius:16px;
  background:rgba(255,255,255,.22);
  color:var(--text);
  font-weight:800;
}
.alert--error{border-color:rgba(180,50,50,.35);}
.helper-note{margin-top:8px;color:var(--muted);font-size:14px;font-weight:800;}

/* Forms */
.form{display:grid;gap:14px;margin-top:14px;text-align:left;}
.form .field{display:grid;gap:6px;}
.form label{color:var(--text);font-size:16px;font-weight:900;}
.form input,.form textarea,.input{
  width:100%;
  padding:14px 16px;
  border:2px solid rgba(30,42,35,.22);
  border-radius:14px;
  background:rgba(255,255,255,.65);
  outline:none;
  font-size:16px;
  font-weight:700;
}
.form input:focus,.form textarea:focus,.input:focus{
  border-color:rgba(30,42,35,.45);
  box-shadow:0 0 0 4px rgba(47,107,79,.10);
}
.center-card-wrap{display:flex;justify-content:center;padding-top:34px;}
.center-card{
  width:min(560px,100%);
  padding:34px 28px;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
  text-align:center;
}
.center-card__title{margin:0;font-size:54px;font-weight:900;}
.center-card__text{margin:10px 0 18px;color:var(--muted);font-size:18px;font-weight:800;line-height:1.35;}
.center-card__actions,.actions-center{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;}
.actions-center{gap:14px;}

/* Index page */
.how-grid,.features-grid{display:grid;gap:16px;align-items:stretch;}
.how-grid{grid-template-columns:repeat(3,1fr);}
.features-grid{grid-template-columns:repeat(3,1fr);gap:18px;}
.how-step,.feature{
  background:var(--card);
  border-radius:var(--r-lg);
  box-shadow:0 8px 16px rgba(0,0,0,.08);
}
.how-step{
  min-height:140px;
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.how-step__title{margin:0 0 6px;font-size:22px;font-weight:900;}
.how-step__sub{margin:0;color:var(--muted);font-size:16px;font-weight:700;}
.how-btn .btn,.feature .btn{width:100%;min-width:0;}
.feature{min-height:260px;padding:18px;display:flex;flex-direction:column;justify-content:space-between;}
.feature__text{padding:6px 10px;color:var(--text);font-size:18px;font-weight:800;line-height:1.35;text-align:left;}
.feature .btn{height:56px;font-size:26px;}

/* Programs list */
.program-list{display:grid;gap:22px;}
.program-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px 26px;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.program-card__left{display:flex;flex-direction:column;gap:10px;}
.program-card__right{display:flex;justify-content:flex-end;align-items:flex-end;min-width:320px;}
.program-card__title{margin:0 0 14px;font-size:60px;font-weight:900;letter-spacing:.2px;}

/* Program page */
.program-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:26px 28px;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.program-hero__left{display:flex;flex-direction:column;gap:8px;}
.program-hero__right{display:flex;align-items:flex-end;justify-content:flex-end;min-width:320px;}
.program-hero__title{margin:0 0 14px;font-size:64px;font-weight:900;}
.program-subtitle{margin:26px 0 12px;font-size:44px;font-weight:900;}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;}
.day-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;justify-content:center;}
.tile-link{display:block;color:inherit;text-decoration:none;}
.tile{
  height:220px;
  padding:18px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  border-radius:var(--r-lg);
  background:var(--card);
  box-shadow:0 8px 16px rgba(0,0,0,.08);
  font-size:22px;
  font-weight:900;
  text-align:center;
}
.tile--active{outline:3px solid rgba(30,42,35,.35);box-shadow:0 12px 22px rgba(0,0,0,.12);}
.workout-frame{
  padding:22px;
  border-radius:var(--r-xl);
  background:rgba(255,255,255,.12);
  box-shadow:0 10px 18px rgba(0,0,0,.08);
}
.workout-panel{display:grid;grid-template-columns:420px 1fr;gap:26px;align-items:start;}
.workout-panel__left{min-height:320px;border-radius:var(--r-xl);background:var(--card);box-shadow:0 8px 18px rgba(0,0,0,.08);}
.workout-panel__right{padding-top:6px;}
.workout-panel__title{margin:0 0 10px;font-size:52px;font-weight:900;}
.workout-panel__group{margin-top:12px;font-size:18px;font-weight:900;}
.workout-panel ul{margin:6px 0 0;padding-left:20px;font-size:18px;}
.workout-panel li{margin:6px 0;}
.done-wrap{display:flex;justify-content:flex-end;margin-top:18px;}
.split{display:grid;grid-template-columns:380px 1fr;gap:26px;align-items:start;}
.block{min-height:220px;border-radius:var(--r-xl);background:var(--panel);box-shadow:0 8px 18px rgba(0,0,0,.08);}
.block--pad{padding:18px 22px;}
.workout-title{margin:0 0 10px;font-size:44px;font-weight:900;}
.list{margin:8px 0 0;padding-left:22px;font-size:18px;}
.list li{margin:6px 0;}

/* Achievements */
.ach-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
.ach-title{margin:10px 0 18px;font-size:54px;font-weight:900;}
.ach-progress{display:flex;gap:10px;flex-wrap:wrap;}
.progress-bar,.lvl-bar{
  width:min(520px,100%);
  height:16px;
  border:2px solid rgba(30,42,35,.18);
  border-radius:999px;
  background:rgba(255,255,255,.18);
  overflow:hidden;
}
.progress-bar__fill,.lvl-bar__fill{height:100%;width:0;background:var(--mint);}
.ach-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
.ach-card{
  height:260px;
  padding:18px 18px 16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.ach-card.is-done{outline:3px solid rgba(30,42,35,.18);}
.ach-card__name{margin:0;font-size:34px;font-weight:900;}
.ach-card__desc{margin:10px 0 0;color:var(--muted);font-size:16px;font-weight:800;line-height:1.25;}
.ach-card__meta{display:flex;justify-content:space-between;align-items:center;gap:12px;}

/* Profile */
.profile,.profile-wrap{
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.profile{padding:24px 28px;}
.profile-wrap{padding:26px 28px;}
.profile__top,.profile-top{display:grid;align-items:center;}
.profile__top{grid-template-columns:320px 1fr;gap:26px;}
.profile-top{grid-template-columns:340px 1fr;gap:28px;}
.avatar{
  width:300px;
  height:300px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:50%;
  background:rgba(0,0,0,.10);
}
.avatar img{width:100%;height:100%;object-fit:cover;}
.avatar--clickable{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease;}
.avatar--clickable:hover{transform:scale(1.01);box-shadow:0 10px 22px rgba(0,0,0,.10);}
.avatar-hidden-input{
  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;
  opacity:0!important;
  pointer-events:none!important;
}
.avatar-actions,.avatar-upload-form{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:12px;}
.avatar-upload-wrap{position:relative;display:inline-block;}
.avatar-click-hint{
  margin-top:10px!important;
  text-align:center!important;
  color:rgba(30,42,35,.60)!important;
  font-size:15px!important;
  font-weight:800!important;
  line-height:1.25!important;
}
.file-input{
  width:100%;
  padding:10px 12px;
  border:2px solid rgba(30,42,35,.22);
  border-radius:14px;
  background:rgba(255,255,255,.65);
  font-weight:800;
}
.profile__name,.profile-name{margin:0 0 10px;font-weight:900;}
.profile__name{font-size:44px;}
.profile-name{font-size:54px;}
.profile__meta{margin:0;font-size:28px;font-weight:700;}
.profile-bullets{margin:0;padding-left:26px;font-size:28px;font-weight:800;line-height:1.35;}
.profile__bio,.profile-bio{margin-top:26px;font-size:30px;font-weight:900;}
.profile__bio{font-weight:800;}
.profile-bio span{font-weight:800;}
.profile-top-actions{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:12px!important;
  flex-wrap:wrap!important;
  margin-top:14px!important;
}
.profile-link-btn,.profile-top-actions a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:42px!important;
  padding:0 16px!important;
  border:2px solid rgba(30,42,35,.16)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.16)!important;
  box-shadow:0 4px 10px rgba(0,0,0,.05)!important;
  color:rgba(30,42,35,.90)!important;
  font-size:16px!important;
  font-weight:900!important;
  text-decoration:none!important;
  cursor:pointer!important;
}
.profile-link-btn:hover,.profile-top-actions a:hover{background:rgba(255,255,255,.26)!important;text-decoration:none!important;}
.profile-link-btn:active,.profile-top-actions a:active{transform:translateY(1px)!important;}
.profile-top-actions a:link,.profile-top-actions a:visited,.profile-top-actions a:hover,.profile-top-actions a:active{text-decoration:none!important;}
.lvl-box{
  margin-top:14px;
  padding:12px 14px;
  border:2px solid rgba(30,42,35,.16);
  border-radius:18px;
  background:rgba(255,255,255,.16);
}
.lvl-line{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;font-weight:900;}
.lvl-muted{color:var(--muted);font-weight:800;}
.lvl-bar{width:100%;margin-top:10px;}
.bio-box{
  margin-top:18px;
  padding:16px 18px;
  border:2px solid rgba(30,42,35,.16);
  border-radius:var(--r-xl);
  background:rgba(255,255,255,.16);
}
.bio-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;}
.bio-title{margin:0;font-size:28px;font-weight:900;}
.bio-text{margin-top:10px;color:var(--muted);font-size:18px;font-weight:800;line-height:1.35;}
.bio-actions{display:flex;justify-content:flex-end;margin-top:14px;}

/* Nutrition */
.nutrition-wrap{
  padding:26px 28px;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.nutrition-title{margin:0 0 8px;font-size:54px;font-weight:900;}
.nutrition-sub{margin:0 0 18px;color:var(--muted);font-size:20px;font-weight:800;}
.pills{display:flex;gap:12px;flex-wrap:wrap;}
.pill{
  padding:12px 18px;
  border:2px solid rgba(30,42,35,.22);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.18);
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}
.pill input{display:none;}
.pill.is-active{background:var(--mint);border-color:rgba(30,42,35,.18);}
.nut-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px;}
.result-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px;}
.result-card{padding:14px 16px;border-radius:var(--r-lg);background:var(--card);box-shadow:0 8px 16px rgba(0,0,0,.08);}
.result-card__label{color:var(--muted);font-size:14px;font-weight:900;}
.result-card__value{margin-top:6px;font-size:28px;font-weight:900;}

/* Menu */
.menu-title{margin:0 0 14px;font-size:54px;font-weight:900;}
.menu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
.menu-card{
  min-height:250px;
  padding:18px 18px 16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.menu-card__name{margin:0;font-size:28px;font-weight:900;}
.menu-card__kcal{margin-top:10px;color:var(--muted);font-size:16px;font-weight:900;}
.menu-card__meta,.menu-card__actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;}
.menu-card__actions{margin-top:14px;}
.recipe{
  display:none;
  margin-top:10px;
  padding:12px;
  border:2px solid rgba(30,42,35,.18);
  border-radius:16px;
  background:rgba(255,255,255,.18);
  color:var(--text);
  font-size:14px;
  font-weight:800;
  line-height:1.35;
}
.recipe.is-open{display:block;}
.today-panel{
  margin-bottom:18px;
  padding:18px 18px 14px;
  border-radius:var(--r-xl);
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.today-title{margin:0 0 10px;font-size:34px;font-weight:900;}
.today-sub{margin:0 0 14px;color:var(--muted);font-weight:800;}
.today-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.meal-col{
  min-height:140px;
  padding:12px;
  border:2px solid rgba(30,42,35,.16);
  border-radius:var(--r-lg);
  background:rgba(255,255,255,.14);
}
.meal-title{margin:0 0 10px;font-size:18px;font-weight:900;}
.menu-item{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid rgba(30,42,35,.12);}
.menu-item:last-child{border-bottom:0;}
.menu-item__name{font-size:14px;font-weight:900;line-height:1.25;}
.menu-item__meta{margin-top:4px;color:var(--muted);font-size:12px;font-weight:900;}
.del-btn{
  height:34px;
  padding:0 12px;
  border:2px solid rgba(180,50,50,.25);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.16);
  font-weight:900;
  cursor:pointer;
}
.del-btn:hover{filter:brightness(.98);}
.today-actions{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px;}
.total-badge{
  display:inline-flex;
  align-items:center;
  height:40px;
  padding:0 14px;
  border:2px solid rgba(30,42,35,.18);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.18);
  font-weight:900;
}

/* Calendar */
.cal-header{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
.cal-title{margin:0;font-size:54px;font-weight:900;}
.cal-summary,.cal-legend{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:16px;}
.cal-legend{gap:10px;margin-bottom:0;}
.legend-pill,.status,.mark{
  display:inline-flex;
  align-items:center;
  border:2px solid rgba(30,42,35,.18);
  border-radius:var(--r-pill);
  background:rgba(255,255,255,.14);
  font-weight:900;
}
.legend-pill{gap:8px;height:40px;padding:0 14px;}
.legend-pill--ok,.status--ok,.mark--ok{background:var(--mint);}
.cal-weekdays,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:12px;}
.cal-weekdays{margin:12px 0 10px;}
.weekday{text-align:center;color:var(--muted);font-weight:900;}
.cal-cell{
  min-height:120px;
  padding:12px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  border-radius:18px;
  background:var(--panel);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.cal-cell--out{opacity:.45;}
.cal-date{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:900;}
.cal-daynum{font-size:20px;}
.cal-month{color:var(--muted);font-size:12px;font-weight:900;}
.cal-marks{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start;}
.mark{height:30px;padding:0 10px;justify-content:center;font-size:14px;gap:6px;}
.cal-note,.small-muted{margin-top:8px;color:var(--muted);font-size:12px;font-weight:800;line-height:1.25;}
.small-muted{margin-top:6px;font-size:14px;}
.cal-table{width:100%;border-collapse:separate;border-spacing:0 12px;}
.cal-row{border-radius:var(--r-xl);background:var(--panel);box-shadow:0 8px 18px rgba(0,0,0,.08);}
.cal-row td{padding:14px 16px;font-weight:900;vertical-align:top;}
.cal-row td:first-child{width:180px;border-top-left-radius:var(--r-xl);border-bottom-left-radius:var(--r-xl);}
.cal-row td:last-child{border-top-right-radius:var(--r-xl);border-bottom-right-radius:var(--r-xl);}
.status{height:38px;padding:0 14px;font-size:16px;gap:8px;}

/* Responsive */
@media (max-width:1100px){
  .nav__link{min-width:170px;font-size:18px;}
  .h1{font-size:44px;}
  .lead{font-size:20px;}
  .tiles{grid-template-columns:repeat(2,1fr);}
  .features-grid{grid-template-columns:1fr;}
  .feature__text{text-align:center;}
}
@media (max-width:1000px){
  .program-card{flex-direction:column;align-items:stretch;}
  .program-card__right{min-width:0;}
  .btn-start{width:100%;min-width:0;}
  .program-card__title{font-size:46px;}
}
@media (max-width:980px){
  .split,.workout-panel,.profile__top,.profile-top{grid-template-columns:1fr;}
  .program-hero{flex-direction:column;align-items:stretch;}
  .program-hero__right{min-width:0;}
  .day-tiles,.how-grid,.menu-grid,.today-grid,.ach-grid,.nut-grid{grid-template-columns:1fr;}
  .result-grid{grid-template-columns:repeat(2,1fr);}
  .avatar{width:220px;height:220px;}
  .profile-name{font-size:44px;}
  .profile-bullets{font-size:22px;}
  .profile-bio{font-size:24px;}
  .ach-title{font-size:44px;}
  .cal-weekdays,.cal-grid{gap:8px;}
  .cal-cell{min-height:110px;}
}
@media (max-width:900px){.bio-actions{justify-content:center;}}
@media (max-width:700px){
  :root{--topbar-h:120px;}
  .cal-weekdays,.cal-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:680px){
  .nav{justify-content:flex-start;overflow:auto;}
  .nav__link{min-width:150px;}
  .tiles{grid-template-columns:1fr;}
}


/* Image blocks */
.media-img,
.program-card__media img,
.program-hero__media img,
.tile__img,
.workout-panel__left img,
.feature__img,
.how-step__img,
.ach-card__img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.program-card{
  min-height:170px;
  align-items:center;
}
.program-card__media{
  width:300px;
  height:126px;
  flex:0 0 300px;
  overflow:hidden;
  border-radius:var(--r-lg);
  background:var(--card);
  box-shadow:inset 0 0 0 2px rgba(30,42,35,.10);
}
.program-card__left{
  flex:1;
  min-width:0;
}
.program-card__title{
  font-size:54px;
  line-height:1.05;
}

.program-hero{
  min-height:170px;
}
.program-hero__media{
  width:300px;
  height:126px;
  flex:0 0 300px;
  overflow:hidden;
  border-radius:var(--r-lg);
  background:var(--card);
  box-shadow:inset 0 0 0 2px rgba(30,42,35,.10);
}
.program-hero__left{
  flex:1;
  min-width:0;
}
.program-hero__title{
  font-size:56px;
  line-height:1.05;
}

.tile{
  height:240px;
  padding:12px;
  align-items:stretch;
  justify-content:space-between;
  gap:12px;
  flex-direction:column;
}
.tile__img{
  height:128px;
  flex:0 0 128px;
  border-radius:16px;
  background:var(--panel);
}
.tile__text{
  padding:0 6px 2px;
}
.tile__day{
  font-size:18px;
  font-weight:900;
}
.tile__name{
  margin-top:6px;
  font-size:18px;
  font-weight:900;
}

.workout-panel__left{
  overflow:hidden;
}
.workout-panel__left img{
  border-radius:var(--r-xl);
}

.feature{
  min-height:320px;
  gap:14px;
}
.feature__img{
  height:150px;
  flex:0 0 150px;
  border-radius:18px;
  background:var(--panel);
}
.feature__text{
  flex:1;
  display:flex;
  align-items:center;
}

.how-step{
  min-height:180px;
  flex-direction:column;
  gap:12px;
}
.how-step__img{
  height:90px;
  flex:0 0 90px;
  border-radius:16px;
  background:rgba(255,255,255,.18);
}
.how-step > div{
  width:100%;
}

.ach-card{
  height:300px;
  gap:12px;
}
.ach-card__img{
  height:112px;
  flex:0 0 112px;
  border-radius:18px;
  background:var(--card);
}
.ach-card__body{
  flex:1;
  min-height:0;
}
.ach-card__name{
  font-size:28px;
  line-height:1.1;
}
.ach-card__desc{
  margin-top:8px;
  font-size:14px;
}
.ach-card__meta{
  flex:0 0 auto;
}

@media (max-width:1000px){
  .program-card,
  .program-hero{
    flex-direction:column;
    align-items:stretch;
  }
  .program-card__media,
  .program-hero__media{
    width:100%;
    height:180px;
    flex:auto;
  }
  .program-card__right,
  .program-hero__right{
    min-width:0;
  }
}

@media (max-width:700px){
  .program-card__title,
  .program-hero__title{
    font-size:42px;
  }
  .feature__img,
  .tile__img{
    height:130px;
    flex-basis:130px;
  }
}

/* Fixed image sizes */
.program-card__media,
.program-hero__media{
  width:300px !important;
  height:130px !important;
  min-width:300px !important;
  flex:0 0 300px !important;
  overflow:hidden !important;
  border-radius:var(--r-lg);
}

.program-card__media img,
.program-hero__media img{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:cover !important;
}

.tile__img{
  width:100% !important;
  height:128px !important;
  min-height:128px !important;
  max-height:128px !important;
  flex:0 0 128px !important;
  display:block !important;
  object-fit:cover !important;
}

.workout-panel__left{
  width:100%;
  min-height:320px;
  height:320px;
}

.workout-panel__left img{
  width:100% !important;
  height:320px !important;
  display:block !important;
  object-fit:cover !important;
}

.feature__img{
  width:100% !important;
  height:150px !important;
  min-height:150px !important;
  max-height:150px !important;
  flex:0 0 150px !important;
  display:block !important;
  object-fit:cover !important;
}

.how-step__img{
  width:100% !important;
  height:90px !important;
  min-height:90px !important;
  max-height:90px !important;
  flex:0 0 90px !important;
  display:block !important;
  object-fit:cover !important;
}

.ach-card__img{
  width:100% !important;
  height:112px !important;
  min-height:112px !important;
  max-height:112px !important;
  flex:0 0 112px !important;
  display:block !important;
  object-fit:cover !important;
}

@media (max-width:1000px){
  .program-card__media,
  .program-hero__media{
    width:100% !important;
    height:180px !important;
    min-width:0 !important;
    flex:0 0 180px !important;
  }
}

@media (max-width:700px){
  .feature__img,
  .tile__img{
    height:130px !important;
    min-height:130px !important;
    max-height:130px !important;
    flex-basis:130px !important;
  }
}

/* Index feature cards: image / text / button cells */
.features-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.feature{
  height: 390px;
  padding: 14px;
  display: grid;
  grid-template-rows: 150px 1fr 56px;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 16px rgba(0,0,0,.08);
  overflow: hidden;
}

.feature-img{
  width: 100%;
  height: 150px;
  display: block;
  object-fit: cover;
  border-radius: 16px;
}

.feature__text{
  min-height: 0;
  padding: 0 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
}

.feature .btn{
  width: 100%;
  min-width: 0;
  height: 56px;
  font-size: 24px;
  align-self: end;
}

@media (max-width: 1100px){
  .features-grid{
    grid-template-columns: 1fr;
  }

  .feature{
    height: auto;
    min-height: 390px;
    grid-template-rows: 150px auto 56px;
  }

  .feature__text{
    overflow: visible;
  }
}

