/* Training, Nutrition, Anatomy and Community: shorter page headers on phones, simple tabs, one gold button per section and compact lists.
   Colours and type come from styles.css; the rings are the Overview's (home.css). */
@media(max-width:700px){
  .section-cover.cover-training,.section-cover.cover-nutrition,.section-cover.cover-recovery,.section-cover.cover-community{min-height:150px;padding:18px;margin-bottom:14px}
  .section-cover.cover-training h2,.section-cover.cover-nutrition h2,.section-cover.cover-recovery h2,.section-cover.cover-community h2{font-size:24px}
  .section-cover.cover-training p,.section-cover.cover-nutrition p,.section-cover.cover-recovery p,.section-cover.cover-community p{display:none}
}

/* Nutrition · Diary */
.nu-today{display:grid;gap:16px}
.nu-today .section-head{margin:0;align-items:center}
.nu-rings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-width:560px;width:100%;margin:0 auto;text-align:center}
.nu-water{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding-top:14px;border-top:1px solid var(--line)}
.nu-water>span{display:grid}
.nu-water small{color:var(--muted)}
.nu-water .bar{margin:0}
.nu-water button{width:44px;height:44px;padding:0;font-size:18px;font-weight:800}
.nu-meals-preview .section-head{margin-top:26px}

/* Nutrition · Foods: one compact row per food; its amount, unit and meal open under it. */
.food-grid.food-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.food-list .food-card{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;column-gap:14px;row-gap:2px;padding:12px 14px}
.food-list .food-card-photo{grid-column:1;grid-row:1/span 3;align-self:start;width:72px;height:72px;aspect-ratio:auto;margin:0;object-fit:cover;border-radius:10px}
.food-list .food-photo-none{display:grid;place-items:center;border:1px solid var(--line);background:#16170f;color:var(--gold);font-size:22px}
.food-list .food-card-head{grid-column:2/4;align-items:flex-start}
.food-list .food-card-head h3{margin:2px 0 0;font-size:15px;line-height:1.3}
.food-list .food-card>p{grid-column:2;margin:0;font-size:12px}
.food-list .food-card>p small{display:none}
.food-list .food-macros{grid-column:2;display:flex;flex-wrap:wrap;gap:4px 12px}
.food-list .food-add-toggle{grid-column:3;grid-row:2/span 2;align-self:end;min-height:40px;white-space:nowrap}
.food-list .food-add-toggle[aria-expanded=true]{border-color:var(--gold);color:var(--gold)}
.food-list .food-log-form{grid-column:1/-1;margin-top:12px}
.food-list+.meal-library-more{display:block;margin:14px auto 0}

/* Training · Programs and Quick workouts */
.program-card .ghost{min-height:42px;padding-inline:18px;border-color:#4b3e18;color:var(--gold);font-weight:800}
.quick-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.quick-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:16px 18px}
.quick-item .glyph{color:var(--gold);font-size:20px}
.quick-item h3{margin:0;font-size:16px}
.quick-item p{margin:2px 0 0;color:var(--muted);font-size:13px}
.quick-item .ghost{min-height:42px;border-color:#4b3e18;color:var(--gold);font-weight:800}

/* Training · My workouts: the builder opens from one gold button. */
.workout-builder-toggle{margin-bottom:18px}
.workout-builder-toggle>summary{display:inline-flex;align-items:center;min-height:46px;padding:0 20px;list-style:none;cursor:pointer}
.workout-builder-toggle>summary::-webkit-details-marker{display:none}
.workout-builder-toggle[open]>summary{margin-bottom:14px}

/* Training · Exercise library: one compact row per exercise, opening in place. */
.full-exercise-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.full-exercise-card>summary{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px 14px;list-style:none;cursor:pointer}
.full-exercise-card>summary::-webkit-details-marker{display:none}
.full-exercise-thumb{display:grid;place-items:center;width:72px;height:72px;border:1px solid var(--line);border-radius:10px;background:#16170f;color:var(--gold);object-fit:cover}
.full-exercise-card .full-exercise-copy{display:grid;gap:2px;min-width:0;padding:0}
.full-exercise-card .full-exercise-copy h3{margin:2px 0 0;font-size:15px;line-height:1.3}
.full-exercise-card .full-exercise-copy .muscle-target{font-size:12px}
.full-exercise-card>summary>i{color:var(--muted);font-size:18px;font-style:normal;transition:transform .2s}
.full-exercise-card[open]{border-color:#4b3e18}
.full-exercise-card[open]>summary>i{transform:rotate(180deg);color:var(--gold)}
.full-exercise-card.no-photo{border-top-width:1px}
.full-exercise-body{display:grid;gap:12px;padding:0 14px 16px}
.full-exercise-body .full-exercise-visual{border-radius:10px;overflow:hidden}
.full-exercise-body .library-prescription{margin:0}
.full-exercise-body .catalog-load-form{margin-top:0}

@media(max-width:900px){.food-grid.food-list{grid-template-columns:1fr}}
@media(max-width:700px){
  .nu-rings{gap:4px}
  .nu-rings .ov-dial{width:min(72px,100%)}
  .nu-rings .ov-dial strong{font-size:15px}
  .food-list .food-card{grid-template-columns:56px minmax(0,1fr) auto;column-gap:12px;padding:12px}
  .food-list .food-card-photo{width:56px;height:56px}
  .program-card{display:grid;grid-template-columns:116px minmax(0,1fr)}
  .program-card .program-card-image{height:auto;min-height:100%;padding:8px}
  .program-card .program-card-image{padding:6px}
  .program-card .program-card-image .pill{padding:3px 6px;font-size:9px;letter-spacing:0;white-space:nowrap}
  .food-tools{grid-template-columns:1fr 1fr;gap:8px;padding:16px}
  .food-tools>div,.food-tools .food-search,.food-tools #food-search,.food-tools #food-region{grid-column:1/-1}
  .food-tools h2{margin:4px 0 0;font-size:18px}
  .food-tools .scan-btn{min-width:0;padding-inline:8px}
  .food-source-note{font-size:12px}
  .program-card>div:last-child{padding:14px}
  .program-card h3{font-size:18px;margin:0 0 4px}
  .program-card p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px}
  .program-card .program-meta{margin:8px 0 10px}
  .quick-list{grid-template-columns:1fr}
  .workout-builder-toggle>summary{display:flex;justify-content:center}
  .full-exercise-card>summary{grid-template-columns:56px minmax(0,1fr) auto;gap:12px;padding:12px}
  .full-exercise-thumb{width:56px;height:56px}
  .full-library-tools{grid-template-columns:minmax(0,1fr) auto;align-items:end;padding:14px}
}
@media(max-width:900px){.full-exercise-grid{grid-template-columns:1fr}}

/* Profile: Profile, Body & plan and Account are sections of one page (the cards other scripts add stay in place). */
.profile-sections{margin-bottom:18px}
.profile-page[data-section=profile] .plan-profile,
.profile-page[data-section=profile] .profile-account,
.profile-page[data-section=profile] #account-privacy,
.profile-page[data-section=profile] #profile-editor .password-settings{display:none}
.profile-page:not([data-section=profile]) .profile-grid{grid-template-columns:minmax(0,1fr)}
.profile-page[data-section=plan] .profile-grid>div>:not(.plan-profile),
.profile-page[data-section=plan] .profile-side,
.profile-page[data-section=plan] #profile-editor{display:none}
.profile-page[data-section=account] .profile-grid>div:first-child,
.profile-page[data-section=account] .profile-side>:not(#account-privacy):not(.profile-account){display:none}
.profile-page[data-section=account] #profile-editor.hidden{display:block!important}
.profile-page[data-section=account] #profile-editor>.section-head,
.profile-page[data-section=account] #profile-form{display:none}
.profile-page:not([data-section=profile]) .profile-side,.profile-page:not([data-section=profile]) .plan-profile,.profile-page[data-section=account] #profile-editor{max-width:760px;width:100%;margin-inline:auto}

/* Academy: outline buttons on the course cards, shorter text, and the four numbers on one row on phones. */
.academy-card .academy-open{width:100%;min-height:44px;border-color:#4b3e18;color:var(--gold);font-weight:800}
.academy-card-copy p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:0}
@media(max-width:700px){
  .academy-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:12px 0}
  .academy-summary article{padding:10px 4px;text-align:center}
  .academy-summary strong{font-size:20px}
  .academy-summary small{font-size:10px;line-height:1.2}
  .academy-card-copy{padding:16px}
  .academy-card-copy h2{font-size:21px;margin:4px 0}
}

/* Pro for paid members: the membership status first (no prices), then the eight tools as rows that open with one tap. */
.pro-membership-hero.paid{padding:26px 28px}
.pro-membership-hero.paid h1{margin:8px auto;font-size:clamp(26px,3.4vw,38px)}
.pro-membership-hero.paid>p{margin-bottom:0}
.pro-membership-hero.paid .pro-price-row{display:none}
.pro-membership-hero.paid .pro-status{margin-top:16px}
.pro-benefit-grid.paid .pro-benefit{position:relative;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;transition:border-color .2s}
.pro-benefit-grid.paid .pro-benefit:hover{border-color:#4b3e18}
.pro-benefit-grid.paid .pro-benefit h3{margin:0 0 4px}
.pro-benefit-grid.paid .pro-benefit p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px}
.pro-benefit-grid.paid .pro-benefit>button{position:static;grid-column:3;white-space:nowrap}
.pro-benefit-grid.paid .pro-benefit>button::after{content:"";position:absolute;inset:0;border-radius:inherit}
@media(max-width:760px){
  .pro-membership-hero.paid{padding:20px 16px}
  .pro-benefit-grid.paid{gap:8px}
  .pro-benefit-grid.paid .pro-benefit{gap:12px;padding:14px}
  .pro-benefit-grid.paid .pro-benefit h3{font-size:16px}
  .pro-benefit-grid.paid .pro-benefit>button{width:36px;height:36px;padding:0;border-radius:50%;font-size:0}
  .pro-benefit-grid.paid .pro-benefit>button::before{content:"→";font-size:17px}
  html[dir=rtl] .pro-benefit-grid.paid .pro-benefit>button::before{content:"←"}
}

/* Anatomy: the muscles as chips above the body, the four facts two by two, shorter exercise cards. */
.anatomy-exercises article{grid-template-columns:120px minmax(0,1fr);align-items:center;gap:14px;padding:12px}
.anatomy-exercises article>img{border-radius:10px}
.anatomy-exercises article>div{padding:0}
.anatomy-muscles{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.anatomy-muscles button{display:inline-grid;grid-template-columns:28px auto;grid-template-rows:auto;column-gap:8px;padding:6px 14px 6px 6px;border-radius:999px}
.anatomy-muscles button>span{grid-row:auto;width:28px;height:28px;font-size:9px}
.anatomy-muscles button small{grid-column:2;font-size:10px}
.anatomy-muscles button b{font-size:13px}
@media(max-width:700px){
  .anatomy-muscles{flex-wrap:nowrap;margin-inline:-14px;padding:2px 14px 6px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none}
  .anatomy-muscles::-webkit-scrollbar{display:none}
  .anatomy-muscles button{flex:0 0 auto;scroll-snap-align:start}
  .anatomy-panel .anatomy-facts{grid-template-columns:1fr 1fr}
  .anatomy-facts article{padding:11px}
  .anatomy-exercises{gap:10px}
  .anatomy-exercises article{grid-template-columns:96px minmax(0,1fr)}
}

/* Community: a short post box with its buttons in one row, People as one row, and post buttons in one row on phones. */
.find-people .eyebrow{display:none}
.find-people h3{margin:0}
.composer{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.composer>.eyebrow{display:none}
.composer>h2{flex-basis:100%;margin:0 0 2px;font-size:18px}
.composer>textarea,.composer>.photo-preview,.composer>.video-preview,.composer>.media-safety-note{flex-basis:100%}
.composer textarea{min-height:56px}
.composer .photo-picker{margin:0}
.composer>select{width:auto}
.composer>button.primary{margin-inline-start:auto}
.composer>.media-safety-note{order:10;margin:2px 0 0;font-size:11px}
@media(max-width:700px){
  .card.find-people{flex-direction:row;align-items:center;padding:14px 16px;margin-bottom:12px}
  .card.find-people h3{font-size:14px}
  .card.find-people button{flex:0 0 auto}
}
@media(max-width:600px){
  .post-head{flex-wrap:wrap;align-items:center}
  .post-member-actions{order:3;flex:1 0 100%;flex-direction:row;align-items:center;padding-inline-start:50px}
}

/* My plan: each supplement shows its name and dose and opens for the reason; cautions stay visible. */
.plan-supplements details>summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;list-style:none;cursor:pointer}
.plan-supplements details>summary::-webkit-details-marker{display:none}
.plan-supplements details>summary>span:after{content:" ⌄";color:var(--muted)}
.plan-supplements details[open]>summary>span:after{content:" ⌃"}
.plan-supplements li{padding:12px 0}
