#main-navigation #logout-session{margin-top:12px;width:100%;font-weight:600}#client-context .pill{margin-left:auto} .sex-choice{display:flex;gap:20px;margin:20px 0}.sex-choice label{display:flex;align-items:center;gap:8px;font-size:18px}.sex-choice input{width:auto;margin:0}@media(max-width:900px){main>header>.eyebrow{display:block;text-align:center;width:100%}body.authenticated-client main>header .profile{display:none}#client-context{justify-content:space-between}#client-context>b{min-width:0}#client-context .pill{flex-shrink:0}}
#client-greeting{font-size:clamp(18px,3vw,24px);font-weight:700;text-align:center;margin:0 0 16px;line-height:1.4}#client-greeting:empty{display:none}body.authenticated-client #client-context>b{display:none}#client-context.needs-new-block{justify-content:center;padding-block:24px;margin:0 0 12px}#client-context.needs-new-block>.pill{margin:0}#main-navigation #logout-session{display:block;text-align:left;font-size:inherit;padding:14px 13px;margin:8px 0}

#client-cards>.panel .bottom{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:12px}#client-cards>.panel .bottom>button{margin:0;text-align:left}#client-cards>.panel>.client-access-button,#client-cards>.panel>.remove-client-button{display:block;margin:16px 0 0;text-align:left}#client-cards>.panel>.remove-client-button{background:#d32f2f;border-color:#d32f2f;color:#fff;font-weight:600}#client-cards>.panel>.remove-client-button:hover{background:#b71c1c;border-color:#b71c1c;color:#fff}#client-cards>.panel>.remove-client-button:focus-visible{outline:2px solid #9c1717;outline-offset:3px}
.client-name-link{padding:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:#cbbd99;text-underline-offset:4px}.client-name-link:hover{color:#806021}.intake-form{display:grid;gap:22px}.intake-form>label{display:grid;gap:8px}.intake-form fieldset{border:1px solid #d9d1c3;border-radius:10px;padding:16px;display:grid;gap:10px}.intake-form fieldset label{display:flex;align-items:center;gap:10px;font-size:14px;text-transform:none;letter-spacing:0}.intake-form input[type=checkbox]{width:18px;height:18px;margin:0}.intake-form textarea{width:100%;resize:vertical}.intake-dialog{width:min(720px,calc(100% - 32px));max-height:85vh;overflow:auto;border:1px solid #d9d1c3;border-radius:14px;background:#fffcf5;padding:24px;color:#292823}.intake-dialog::backdrop{background:#0008}.intake-dialog section{border-top:1px solid #e3dccf;padding:12px 0}.intake-dialog h3{font-size:15px}.intake-dialog p{white-space:pre-wrap;overflow-wrap:anywhere}#client-preview-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:20px}#client-preview-bar strong{flex:1 1 220px}body.coach-client-preview #migration-import{display:none}

.profile-mode-label{display:grid;gap:5px;font-size:12px}.profile-mode-label select{margin:0;min-width:165px}body.coach-client-preview main>header .profile{display:none}

.profile-block-count{font-size:13px;font-weight:400;display:inline-block;margin-top:5px}
#client-cards>.panel>h2{display:block;line-height:1.4;margin-bottom:14px;overflow-wrap:anywhere}#client-cards>.panel>h2 .client-name-link{display:block;max-width:100%;line-height:1.4;white-space:normal;overflow-wrap:anywhere}#client-cards>.panel>.pill{display:table;max-width:100%;margin-top:0;margin-bottom:18px;white-space:normal;line-height:1.5}#client-cards>.panel>.bottom{margin-top:0}

#clients>.clients-heading{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-start;gap:12px}#clients>.clients-heading h1{margin:0}#clients>.clients-heading #migration-import{margin:0}#clients>.clients-heading #add-client{margin-left:auto}

#client-profile-actions{display:none;gap:12px;flex-wrap:wrap;align-items:center}body.coach-client-preview.coach-mode #client-profile-actions{display:flex}body.coach-mode main>header>.eyebrow{display:none}body.coach-client-preview.coach-mode #client-context>b,body.coach-client-preview.coach-mode #client-context>.pill{display:none}body.coach-client-preview.coach-mode #client-context{padding-block:12px;min-height:0}.coach-program-title{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.coach-program-title h1{margin:0}.coach-program-title .pill{margin:0}#client-profile-actions .remove-profile-client{background:#d32f2f;border-color:#d32f2f;color:white;font-weight:600}#client-profile-actions .remove-profile-client:hover{background:#b71c1c;border-color:#b71c1c}

.coach-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}.coach-heading-actions .week-select-label{margin:0;display:flex;align-items:center;gap:10px}.coach-heading-actions .week-select-label select{margin:0}.coach-sheet-heading{flex-wrap:wrap;gap:16px}

#client-picker{display:none}main:has(>#clients:not(.hidden))>header{display:none}.clients-heading-actions{display:flex;align-items:center;gap:12px;margin-left:auto;flex-wrap:wrap}.clients-heading-actions #mode{margin:0}.clients-heading-actions #add-client{margin:0}#client-cards>.panel>.client-program-pill{display:inline-block;margin:0;text-align:left;background:#d5ad4c;border:1px solid #c69d3e;color:#302811;border-radius:999px;padding:9px 14px;box-shadow:0 3px 7px #59411926;transition:background-color .18s,box-shadow .18s;white-space:normal;line-height:1.5}#client-cards>.panel>.client-program-pill:hover,#add-client:hover{background:#e0bb63;box-shadow:0 4px 9px #59411933}#add-client{transition:background-color .18s,box-shadow .18s}

body:not(.coach-mode) main>header>.eyebrow{display:block;width:100%;text-align:center}body:not(.coach-mode) #client-context:not(.needs-new-block)>.pill{display:none}body:not(.coach-mode) #client-context:not(.needs-new-block){padding-block:0;min-height:0;margin:0}body:not(.coach-mode) #client-context>b{display:none}#client-week-toolbar{display:flex;justify-content:flex-start;margin:0 0 16px}#client-week-toolbar:empty,body.coach-mode #client-week-toolbar{display:none}#client-week-toolbar .week-select-label{display:flex;align-items:center;gap:10px;margin:0}#client-week-toolbar select{margin:0}.profile-mode-label select{font:inherit;font-size:14px;line-height:1.5;min-height:40px;padding:9px 12px;color:#5a4d35}.profile-mode-label{font-size:14px}#client-preview-bar>.secondary{font-size:14px;line-height:1.5;min-height:40px;padding:9px 12px}
#client-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}#client-cards>.panel{min-width:0;padding:18px 14px;margin:0}#client-cards>.panel>h2{font-size:18px;margin-bottom:14px}#client-cards>.panel>.client-program-pill{font-size:11px;padding:8px 10px;max-width:100%}@media(max-width:1100px){#client-cards>.panel{padding:16px 10px}#client-cards>.panel>h2{font-size:16px}}@media(max-width:900px){#client-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){#client-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:380px){#client-cards{grid-template-columns:1fr}}
#client-cards>.panel>.client-program-pill.phase-early{background:#cce7d3;border-color:#82b58e;color:#205c35}#client-cards>.panel>.client-program-pill.phase-early:hover{background:#ddf0e2}#client-cards>.panel>.client-program-pill.phase-last-training{background:#d5ad4c;border-color:#c69d3e;color:#302811}#client-cards>.panel>.client-program-pill.phase-last-training:hover{background:#e0bb63}#client-cards>.panel>.client-program-pill.phase-deload{background:#f0b7b2;border-color:#ce7770;color:#7e201b}#client-cards>.panel>.client-program-pill.phase-deload:hover{background:#f6ccc8}
@media(max-width:900px){#clients>.clients-heading #migration-import{display:none}}

#main-navigation .nav-vector{background:transparent;mix-blend-mode:normal;isolation:auto}#main-navigation [data-view="calories"] .nav-vector{clip-path:none}
/* Mobile trainer navigation and compact client heading. */
body.coach-mode #client-context:not(.needs-new-block)>.pill{display:none}
@media(max-width:900px){
 body:not(.authenticated-client):not(.coach-client-preview) main>header .profile{display:flex;justify-content:flex-end;width:100%}
 body:not(.authenticated-client) main>header .profile #mode{display:block;min-height:44px;max-width:100%;margin:0}
 #clients>.clients-heading{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;flex-wrap:nowrap}
 #clients>.clients-heading h1{font-size:clamp(20px,5.4vw,28px);line-height:1.2;margin:0}
 #clients>.clients-heading .clients-heading-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;min-width:0;margin:0;align-items:center}
 #clients>.clients-heading #mode,#clients>.clients-heading #add-client{min-width:0;width:100%;min-height:44px;font-size:clamp(10px,2.8vw,14px);padding:9px 6px;margin:0;white-space:nowrap;line-height:1.3}
}
/* Balanced profile header: identity and intake above matching view/back controls. */
#client-preview-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:center}
#client-preview-bar>strong{grid-column:1;grid-row:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}
#client-preview-bar>.profile-intake-button{grid-column:2;grid-row:1;justify-self:end;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;line-height:1.25;padding:8px 16px;min-height:48px;margin:0}
#client-preview-bar>.profile-mode-label{grid-column:1;grid-row:2;display:block;min-width:0;margin:0}
#client-preview-bar>.profile-mode-label select,#client-preview-bar>.profile-back-button{width:100%;min-width:0;height:44px;min-height:44px;padding:9px 10px;margin:0;font-family:inherit;font-size:14px;line-height:1.5;font-weight:600;box-sizing:border-box}
#client-preview-bar>.profile-back-button{grid-column:2;grid-row:2}
#client-preview-bar>.profile-intake-button{font-size:14px;font-weight:600}
@media(max-width:900px){
 #clients>.clients-heading{grid-template-columns:auto auto;justify-content:space-between;gap:6px}
 #clients>.clients-heading h1{font-size:clamp(24px,6.7vw,30px)}
 #clients>.clients-heading .clients-heading-actions{display:flex;flex-wrap:nowrap;gap:6px;margin-left:0}
 #clients>.clients-heading #mode,#clients>.clients-heading #add-client{width:auto;flex:none;font-size:clamp(10px,3vw,14px);font-weight:600;min-height:44px;height:44px;padding:8px 6px;line-height:1.4}
 #clients>.clients-heading #mode{field-sizing:content;max-width:none}
 #client-preview-bar{padding:18px;gap:14px 10px}
}
/* Client home uses the same warm cards as the workout selector. */
body.coach-mode #main-navigation .home-nav-button{display:none}
#home{padding-top:24px}
.client-home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:680px;margin:0 auto}
.home-tile{min-width:0;aspect-ratio:1;background:#ece8dd;color:#292823;border:1px solid #d9d1c3;border-radius:14px;padding:20px;text-align:center;font:inherit;box-sizing:border-box;transition:background-color .18s,border-color .18s,box-shadow .18s}
.home-tile:hover,.home-tile[open]{background:#eadcb5;border-color:#aa893b;box-shadow:0 3px 8px #59411916}
.home-tile summary{list-style:none;cursor:pointer;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;font-size:22px;font-weight:700;line-height:1.25}
.home-tile summary::-webkit-details-marker{display:none}
.home-tile-icon{width:36px;height:36px;flex-shrink:0;color:#806021}
.home-tile[open]{display:flex;flex-direction:column;justify-content:center}
.home-tile[open] summary{height:auto;flex-direction:row;gap:8px;margin-bottom:12px;font-size:18px}
.home-tile[open] .home-tile-icon{width:24px;height:24px}
.home-tile-options{display:grid;gap:8px}
.home-tile-options button{margin:0;min-height:36px;padding:6px 8px;width:100%;font-size:14px;line-height:1.3}
.home-direct{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;cursor:pointer;font-size:22px;font-weight:700}
.home-contact{grid-column:1 / -1;aspect-ratio:2.05}
.home-tile summary:focus-visible,.home-tile:focus-visible{outline:3px solid #aa893b;outline-offset:3px}
@media(max-width:900px){#home{padding-top:20px}.client-home-grid{gap:10px}.home-tile{padding:14px}.home-tile summary,.home-direct{font-size:20px}.home-tile[open]{padding:10px}.home-tile[open] summary{font-size:16px;margin-bottom:8px}.home-tile-options{gap:6px}.home-tile-options button{font-size:12px;min-height:32px;padding:5px}.home-tile[open] .home-tile-icon{width:20px;height:20px}}

/* Categories open their own tile screen; contact takes half its former height. */
.home-contact{aspect-ratio:4.1;flex-direction:row;gap:14px}
.home-subpage>h1{max-width:680px;margin:0 auto 20px;font-size:28px}
.home-subpage .home-direct{line-height:1.3;overflow-wrap:anywhere}
@media(max-width:900px){.home-contact{padding:10px}.home-contact .home-tile-icon{width:28px;height:28px}.home-subpage>h1{font-size:24px;margin-bottom:16px}}
/* IP gold palette shared by the landing tiles and category screens. */
:root{--ip-tile-a:linear-gradient(145deg,#fff1b9,#dfb84f);--ip-tile-b:linear-gradient(145deg,#fbe9ab,#cfa344);--ip-tile-c:linear-gradient(145deg,#f6dc8b,#d5ad4c);--ip-tile-d:linear-gradient(145deg,#fff3c7,#e6c66d);--ip-tile-e:linear-gradient(110deg,#f3dc99,#cda044)}
#home .home-tile,.weight-week-tile{background:var(--ip-tile-a);border-color:#c4a258;color:#302811;box-shadow:0 3px 8px #59411918}
#home .home-tile:nth-child(2),.weight-week-tile:nth-child(4n+2){background:var(--ip-tile-b)}
#home .home-tile:nth-child(3),.weight-week-tile:nth-child(4n+3){background:var(--ip-tile-c)}
#home .home-tile:nth-child(4),.weight-week-tile:nth-child(4n){background:var(--ip-tile-d)}
#home .home-contact{background:var(--ip-tile-e)}
#home .home-tile:hover,.weight-week-tile:hover{filter:brightness(1.05);border-color:#9f7b2d;box-shadow:0 5px 12px #59411926}
#home .home-tile-icon{color:#715419;width:36px;height:36px}
#weight .weight-scroll{overflow:visible;padding:0;background:transparent;border:0;box-shadow:none}
#weight #weight-grid{min-width:0;width:100%}
.weight-week-tiles,.weight-day-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.weight-week-tile{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;cursor:pointer;font-size:18px;font-weight:600;aspect-ratio:1}
.weight-week-tile strong{font-size:28px}
.weight-week-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
.weight-week-heading h2,.weight-week-heading button{margin:0}
.weight-day-tile{aspect-ratio:1;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:16px;border:1px solid #d9d1c3;border-radius:14px;background:#fffcf5;font-size:15px;font-weight:600;text-transform:none;letter-spacing:0;color:#302811}
.weight-day-tile input{width:100%;max-width:130px;min-width:0;min-height:44px;margin:0;text-align:center;font-size:24px;padding:8px}
.weight-mean-tile{background:var(--ip-tile-a);border-color:#c4a258}
.weight-mean-tile output{font-size:28px;font-weight:700}
@media(max-width:900px){.weight-week-tiles,.weight-day-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.weight-week-tile{font-size:18px}.weight-day-tile{padding:12px;font-size:14px;gap:12px}}
/* Illustrated yellow home icons based on Ian's supplied references. */
#home #home-main-grid .home-art-tile{position:relative;overflow:hidden;padding:0;isolation:isolate;background:#ffca0a;border-color:#d4a71d}
#home .home-art-image{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}
#home .home-art-tile>span{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);max-width:calc(100% - 16px);padding:3px 10px;background:#ffca0aeb;border-radius:8px;color:#20201c;line-height:1.3;white-space:nowrap;font-weight:700}
@media(max-width:380px){#home .home-art-tile>span{font-size:18px;bottom:7px;padding:2px 7px}}
/* Shared sunny yellow for interactive cards, with separate artwork/title rows. */
:root{--ip-clickable-yellow:#ffca0a;--ip-clickable-ink:#20201c;--ip-card-shadow:0 4px 10px #59411920;--ip-card-shadow-hover:0 6px 14px #59411930}
#home .home-tile,button.day,button.weight-week-tile,button.recipe-card,button.cardio-choice,#client-cards>.panel>.client-program-pill{background:var(--ip-clickable-yellow)!important;color:var(--ip-clickable-ink)!important;border-color:#d4a71d;box-shadow:var(--ip-card-shadow);transition:filter .16s ease,box-shadow .16s ease,border-color .16s ease;-webkit-tap-highlight-color:#fff4a640}
#home #home-main-grid .home-art-tile{display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:center;justify-items:center;gap:4px;padding:10px 12px 12px}
#home .home-art-image{position:static;inset:auto;display:block;width:100%;height:100%;max-width:78%;object-fit:contain;min-height:0;z-index:auto}
#home .home-art-tile>span{position:static;transform:none;max-width:100%;padding:0;background:transparent;border-radius:0;line-height:1.3;white-space:normal;font-weight:700;color:var(--ip-clickable-ink);font-size:clamp(18px,2vw,24px)}
button.day.selected,button.cardio-choice.chosen{border-color:#775813;outline:2px solid #775813;outline-offset:-3px}
@media(hover:hover){#home .home-tile:hover,button.day:hover,button.weight-week-tile:hover,button.recipe-card:hover,button.cardio-choice:hover,#client-cards>.panel>.client-program-pill:hover{filter:brightness(1.06);box-shadow:var(--ip-card-shadow-hover)}}
#home .home-tile:active,button.day:active,button.weight-week-tile:active,button.recipe-card:active,button.cardio-choice:active,#client-cards>.panel>.client-program-pill:active{filter:brightness(1.08);box-shadow:var(--ip-card-shadow-hover)}
#home .home-tile:focus-visible,button.day:focus-visible,button.weight-week-tile:focus-visible,button.recipe-card:focus-visible,button.cardio-choice:focus-visible{filter:brightness(1.06);outline:3px solid #775813;outline-offset:3px}
@media(prefers-reduced-motion:reduce){#home .home-tile,button.day,button.weight-week-tile,button.recipe-card,button.cardio-choice,#client-cards>.panel>.client-program-pill{transition:none}}
/* Program urgency retains its semantic colors instead of the general tile yellow. */
#client-cards>.panel>.client-program-pill.phase-early{background:#cce7d3!important;color:#205c35!important;border-color:#82b58e}
#client-cards>.panel>.client-program-pill.phase-last-training{background:#d5ad4c!important;color:#302811!important;border-color:#c69d3e}
#client-cards>.panel>.client-program-pill.phase-deload{background:#f0b7b2!important;color:#7e201b!important;border-color:#ce7770}
#home .home-art-image{background:transparent;border:0;box-shadow:none}
#mobile-menu-toggle{background:var(--ip-clickable-yellow)!important;color:var(--ip-clickable-ink)!important;border-color:#d4a71d;box-shadow:var(--ip-card-shadow);transition:filter .16s ease,box-shadow .16s ease}
@media(hover:hover){#mobile-menu-toggle:hover{filter:brightness(1.06);box-shadow:var(--ip-card-shadow-hover)}}
#mobile-menu-toggle:active{filter:brightness(1.08);box-shadow:var(--ip-card-shadow-hover)}
#mobile-menu-toggle:focus-visible{outline:3px solid #775813;outline-offset:3px}
@media(prefers-reduced-motion:reduce){#mobile-menu-toggle{transition:none}}
#home .home-contact .contact-art-image{display:block;width:64px;height:64px;object-fit:contain;flex-shrink:0;background:transparent;border:0;box-shadow:none}
@media(max-width:900px){#home .home-contact .contact-art-image{width:48px;height:48px}}
/* Keep the weight overview compact: four week cards per row on phones too. */
@media(max-width:900px){
 #weight .weight-week-tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 #weight .weight-week-tile{padding:8px 3px;gap:7px;border-radius:10px;min-height:64px;font-size:clamp(10px,2.8vw,14px);line-height:1.3}
 #weight .weight-week-tile>span{white-space:nowrap}
 #weight .weight-week-tile strong{font-size:clamp(16px,4.8vw,22px);line-height:1.2}
}
/* All category icons and their labels use the same black ink. */
#home .home-subpage .home-tile,#home .home-subpage .home-tile>span,#home .home-subpage .home-tile-icon{color:#000!important}
#home .home-subpage img.home-tile-icon{filter:brightness(0);background:transparent}
.weight-unit{font-size:12px;font-weight:400;color:#626057;line-height:1}
@media(max-width:900px){
 #weight .weight-day-tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 #weight .weight-day-tile{padding:8px 3px;gap:5px;border-radius:10px;min-height:94px;aspect-ratio:auto;font-size:clamp(9px,2.65vw,13px);line-height:1.3}
 #weight .weight-day-tile>span:first-child{max-width:100%;overflow-wrap:anywhere}
 #weight .weight-day-tile input{width:100%;padding:5px 1px;min-height:36px;font-size:16px;line-height:1.2;border-radius:6px}
 #weight .weight-mean-tile output{font-size:clamp(14px,4vw,20px);padding:5px 1px;white-space:nowrap}
 #weight .weight-unit{font-size:10px}
}
.weight-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:28px 0 12px}
.weight-title-row h1,.weight-title-row button{margin:0}
.weight-title-row button{min-height:44px;background:var(--ip-clickable-yellow);color:#000;box-shadow:var(--ip-card-shadow);flex-shrink:0}
#weight .weight-mean-tile .weight-average{background:transparent;color:#000;border:0;border-radius:0;box-shadow:none}
.subpage-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:28px 0 16px}
.subpage-title-row h1,.subpage-title-row .page-back-button{margin:0}
.subpage-title-row h1{min-width:0;overflow-wrap:anywhere}
.subpage-back-row{display:flex;justify-content:flex-end;margin:12px 0 16px}
.page-back-button{min-height:44px;flex-shrink:0;background:var(--ip-clickable-yellow);color:#000;box-shadow:var(--ip-card-shadow)}
.home-subpage>.subpage-title-row{max-width:680px;margin:0 auto 20px}
.home-subpage>.subpage-title-row h1{font-size:28px}
.page-back-button:hover{filter:brightness(1.06)}.page-back-button:active{filter:brightness(1.08)}
@media(max-width:900px){.home-subpage>.subpage-title-row h1{font-size:24px}}
#calculator .aligned-page-title,#cookbook .aligned-page-title,.program-back-title-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:12px;width:100%;margin:28px 0 16px}
.aligned-page-title h1,.program-back-title-row h1,.program-back-title-row h2{margin:0!important;min-width:0}
.aligned-page-title .page-back-button,.program-back-title-row .page-back-button,.coach-program-title>.page-back-button{margin:0 0 0 auto;flex-shrink:0}
#cookbook #cookbook-calories,#calculator #rir-how-to{display:inline-flex;margin:0 0 16px;align-items:center}
#training .work-title-line>.program-back-title-row{margin:0}
#training .top>div:first-child{min-width:0;flex:1}
@media(max-width:900px){#training .top{flex-wrap:wrap}#training .top>div:first-child{flex-basis:100%}}
/* Landing page tagline and compact view selector. */
main:has(>#home:not(.hidden))>header>.eyebrow{display:none!important}
main:has(>#home:not(.hidden))>header{border-bottom:0;padding-bottom:8px}
main:has(>#home:not(.hidden))>header #mode,body:has(#home:not(.hidden)) #client-preview-bar .profile-mode-label select{height:32px;min-height:32px;padding:4px 10px;font-size:13px;line-height:1.3}
.home-progress-tagline{grid-column:1 / -1;text-align:center;color:var(--ip-clickable-yellow);font-size:clamp(12px,3vw,18px);letter-spacing:2px;text-transform:uppercase;font-weight:600;line-height:1.5;margin:12px 0}
#contact>.subpage-title-row{width:100%;justify-content:space-between}
#contact>.contact-name{margin:0 0 20px}
#contact>.contact-portrait{position:static;display:block;float:none;width:clamp(160px,45vw,280px);max-width:100%;height:auto;object-fit:contain;margin:0 0 24px}
/* Compact mobile landing page fitted to the available viewport. */
@media(max-width:900px){
 body:has(#home:not(.hidden)) main{padding-top:8px;padding-bottom:12px}
 main:has(>#home:not(.hidden))>header{margin:0 0 6px;padding:0;border:0;min-height:0}
 main:has(>#home:not(.hidden))>header .profile{gap:0;margin:0;align-items:center}
 main:has(>#home:not(.hidden))>header #mode,body:has(#home:not(.hidden)) #client-preview-bar .profile-mode-label select{height:auto;min-height:38px;padding:6px 28px 6px 10px!important;line-height:1.4;font-size:14px;box-sizing:border-box}
 #home{padding-top:4px}
 #home-main-grid{width:100%;max-width:min(100%,calc((100svh - var(--ip-mobile-header-height,80px) - 132px)*.8));gap:10px;align-items:stretch}
 #home-main-grid .home-art-tile{padding:7px 10px 10px;gap:3px}
 #home-main-grid .home-art-tile>span{font-size:clamp(16px,4.4vw,20px);line-height:1.2}
 #home-main-grid .home-art-image{max-width:76%}
 #home-main-grid .home-progress-tagline{margin:2px 0;font-size:clamp(10px,2.7vw,13px);letter-spacing:1.5px;line-height:1.4}
 #home-main-grid .home-contact{min-height:50px;padding:6px 10px;font-size:19px}
 #home-main-grid .home-contact .contact-art-image{width:40px;height:40px}
}
/* A single workout heading with the exercise count beside it. */
#training-detail #daytitle,#training-detail .program-back-title-row>.page-back-button{display:none!important}
#training-detail .program-back-title-row{display:contents}
#training-detail .work-title-line{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:12px}
#training-detail #worktitle{margin:0!important}
#training-detail #workmeta{margin:0!important;line-height:1.4;font-size:14px!important;white-space:nowrap}
#training .work-actions #training-back,#training .work-actions #weight-shortcut,#training .work-actions #previous-weeks{background:var(--ip-clickable-yellow)!important;color:#000!important;border-color:#d4a71d;box-shadow:var(--ip-card-shadow);transition:filter .16s ease,box-shadow .16s ease}
@media(hover:hover){#training .work-actions #training-back:hover,#training .work-actions #weight-shortcut:hover,#training .work-actions #previous-weeks:hover{filter:brightness(1.06);box-shadow:var(--ip-card-shadow-hover)}}
#training .work-actions #training-back:active,#training .work-actions #weight-shortcut:active,#training .work-actions #previous-weeks:active{filter:brightness(1.08)}
/* Trainer return action beside the client name. */
body.coach-mode #client-context{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
body.coach-mode #client-context>.page-back-button{margin:0 0 0 auto;flex-shrink:0}
/* Replace remaining old gold action fills, keeping phase/status colors intact. */
button.gold,a.gold,.exercise-link,.history-icon-button,#rir-how-to{background:var(--ip-clickable-yellow)!important;color:#000!important;border-color:#d4a71d;box-shadow:var(--ip-card-shadow)}
@media(hover:hover){button.gold:hover,a.gold:hover,.exercise-link:hover,.history-icon-button:hover,#rir-how-to:hover{filter:brightness(1.06);box-shadow:var(--ip-card-shadow-hover)}}
button.gold:active,a.gold:active,.exercise-link:active,.history-icon-button:active,#rir-how-to:active{filter:brightness(1.08)}
/* Grow the landing tagline inside its current line without changing card gaps. */
#home-main-grid{container-type:inline-size}
#home-main-grid .home-progress-tagline{width:96%;justify-self:center;white-space:nowrap;font-size:clamp(13px,5.1cqw,30px);line-height:20px;letter-spacing:.08em;text-align:justify;text-align-last:justify}
/* Keep the landing screens free of transfer controls and sync footer text. */
main:has(>#home:not(.hidden))>#sync-status,main:has(>#home:not(.hidden))>.program-transfer{display:none!important}
#home-main-grid .home-progress-tagline{letter-spacing:normal;word-spacing:normal;text-align:center;text-align-last:auto}
/* Client week selection and block label share one horizontal toolbar. */
body:not(.coach-mode) #client-week-toolbar{align-items:center;justify-content:space-between;gap:10px;flex-wrap:nowrap}
#client-week-toolbar>.block-heading-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin-left:auto;min-width:0}
#client-week-toolbar #block-badge{margin:0;white-space:nowrap}
#client-week-toolbar #block-dates{margin:0;text-align:right}
#client-week-toolbar #block-dates[hidden]{display:none}
@media(max-width:900px){#client-week-toolbar .week-select-label{gap:8px;flex-shrink:0;font-size:12px}#client-week-toolbar select{width:72px;min-width:0}#client-week-toolbar #block-badge{font-size:10px;padding:8px}#client-week-toolbar #block-dates{font-size:10px}}
/* In trainer profile preview, the profile header owns the sole back action. */
body.coach-client-preview.coach-mode #training .page-back-button{display:none!important}

/* Explicit dimensions prevent Safari from sizing menu SVGs and grid items by their intrinsic size. */
#main-navigation button>svg,#main-navigation button>img{width:22px!important;height:22px!important;min-width:22px;max-width:22px;max-height:22px;flex:0 0 22px;object-fit:contain;background:transparent}
#main-navigation button{box-sizing:border-box;min-width:0}
@media(max-width:900px){
 aside.mobile-menu-open #main-navigation{max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain}
 #main-navigation button{align-items:center;min-height:44px}
 #home-main-grid{box-sizing:border-box;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
 #home #home-main-grid>.home-tile{width:100%;min-width:0;max-width:100%;margin:0;box-sizing:border-box;justify-self:stretch}
 #home #home-main-grid>.home-art-tile{aspect-ratio:1 / 1;grid-template-rows:minmax(0,1fr) auto}
 #home #home-main-grid .home-art-image{width:76%;max-width:76%;min-width:0;height:100%;min-height:0;max-height:100%;justify-self:center;object-fit:contain}
 #home #home-main-grid>.home-contact{grid-column:1 / -1;aspect-ratio:auto;min-height:50px;height:auto;flex-direction:row;justify-content:center;align-items:center;padding:6px 10px}
 #home #home-main-grid>.home-contact>span{flex:0 1 auto;min-width:0}
 #home #home-main-grid>.home-progress-tagline{min-width:0;max-width:100%}
}

/* Weekly average shares the current brand yellow. */
#weight .weight-mean-tile{background:var(--ip-clickable-yellow);border-color:#d4a71d;color:#000}

/* Transfer tools belong to the trainer's client overview, not content pages. */
main:not(:has(>#clients:not(.hidden)))>#sync-status,
main:not(:has(>#clients:not(.hidden)))>.program-transfer,
body:not(.coach-mode) main>#sync-status,
body:not(.coach-mode) main>.program-transfer{display:none!important}
/* Desktop landing: four balanced tiles, then tagline and contact. */
@media(min-width:901px){
 #home #home-main-grid{width:100%;max-width:960px;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-inline:auto}
 #home #home-main-grid>.home-art-tile{width:100%;min-width:0;aspect-ratio:1;padding:12px;grid-template-rows:minmax(0,1fr) auto;gap:8px}
 #home #home-main-grid .home-art-image{width:76%;max-width:76%;height:100%;min-height:0;object-fit:contain}
 #home #home-main-grid>.home-art-tile>span{font-size:clamp(16px,1.7vw,21px);line-height:1.3}
 #home #home-main-grid>.home-progress-tagline{grid-column:1 / -1;width:100%;font-size:24px;line-height:1.4;margin:8px 0;white-space:normal}
 #home #home-main-grid>.home-contact{grid-column:1 / -1;justify-self:center;width:calc(50% - 8px);aspect-ratio:auto;min-height:80px;box-sizing:border-box;margin:0;padding:12px 20px;flex-direction:row;justify-content:center;gap:16px;font-size:22px}
 #home #home-main-grid>.home-contact .contact-art-image{width:48px;height:48px}
}

/* Desktop navigation uses the current brand yellow for the selected page. */
@media(min-width:901px){#main-navigation button.active,#main-navigation button.active:hover{background:var(--ip-clickable-yellow);color:var(--ip-clickable-ink)}#main-navigation button.active:hover{filter:brightness(1.06)}}

/* Mobile navigation matches the current yellow desktop selection. */
@media(max-width:900px){#main-navigation button.active,#main-navigation button.active:hover{background:var(--ip-clickable-yellow);color:var(--ip-clickable-ink)}#main-navigation button.active:active{filter:brightness(1.06)}}
.password-form{display:grid;gap:16px;margin-block:20px}.password-form label{display:grid;gap:8px;text-transform:none;letter-spacing:normal;font-size:14px}.password-form input{width:100%;box-sizing:border-box;min-height:44px;margin:0;font-size:16px}.password-form button{min-height:44px}.password-form p{margin:0;line-height:1.5}.password-form [role=status]:empty{display:none}

.password-input-wrap{position:relative;display:block;min-width:0}.password-form .password-input-wrap input{padding-right:50px}.password-form .password-visibility{position:absolute;right:0;top:0;bottom:0;display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:6px;background:transparent;color:#20201c;box-shadow:none}.password-visibility svg{display:block;flex:none}.password-form .password-visibility:hover{background:#00000008}.password-visibility:focus-visible{outline:2px solid #806021;outline-offset:-3px}

body.trainer-account .sidefoot{display:none}
.desktop-account-bar{display:none}
@media(min-width:901px){
 body.trainer-account #main-navigation #logout-session{display:none}
 .desktop-account-bar{display:flex;align-items:center;justify-content:flex-end;gap:14px;width:100%;box-sizing:border-box;margin:0 0 20px;min-height:44px}
 .desktop-account-bar strong{font-size:14px;color:#292823;font-weight:600}
 .desktop-account-bar button{min-height:40px;padding:8px 14px;margin:0;font-size:14px}
}

@media(min-width:901px){
 .desktop-account-bar>#mode{margin:0 auto 0 0;width:auto;min-height:40px;padding:8px 30px 8px 12px;font-size:14px}
 body.trainer-account main:has(>#home:not(.hidden))>header{display:none}
 main:has(>#home:not(.hidden)){min-height:100svh}
 main:has(>#home:not(.hidden))>#home{min-height:calc(100svh - 124px);padding-top:0;display:flex;flex-direction:column;justify-content:center}
 #home-main-grid{flex-shrink:0}
}

.supplement-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch}
.supplement-card.panel{padding:20px;margin:0;min-width:0}
.supplement-card h2{font-size:20px;line-height:1.3;margin:0 0 16px;color:#20201c}
.supplement-card dl{margin:0;display:grid;gap:12px}
.supplement-card dl>div{display:grid;gap:4px}
.supplement-card dt{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#746e63}
.supplement-card dd{margin:0;font-size:14px;font-weight:600;line-height:1.5;color:#292823}
.supplement-card .supplement-explanation{border-top:1px solid #ded7ca;margin:16px 0 0;padding-top:14px;line-height:1.6;font-size:14px}
.supplement-notes{margin-top:20px}
@media(max-width:1100px){.supplement-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.supplement-cards{grid-template-columns:1fr;gap:12px}.supplement-card.panel{padding:18px}}

#home .home-subpage .supplement-capsule-icon{width:64px;height:64px;object-fit:contain;background:transparent}

.supplement-product{display:flex;justify-content:center;margin:0 0 12px}
.product-cutout{display:block;width:168px;height:168px;max-width:100%;background-repeat:no-repeat;background-size:200% 200%}
.sprite-a{background-image:url('supplements/products-a.png')}.sprite-b{background-image:url('supplements/products-b.png')}
.product-slot-0{background-position:0 0}.product-slot-1{background-position:100% 0}.product-slot-2{background-position:0 100%}.product-slot-3{background-position:100% 100%}
.supplement-product-name{display:block;font-size:12px;line-height:1.4;margin-bottom:16px;color:#806021}.supplement-sources{font-size:12px;line-height:1.6}

.supplement-discount-card.panel{margin:16px 0;padding:20px}.supplement-discount-card .supplement-discount{margin:0;line-height:1.6}.supplement-discount-card strong{color:#20201c}

.weight-recommend-row{margin:8px 0 12px}
.weight-recommend-row .weight-recommend-button{grid-column:4;min-width:0;width:100%;min-height:40px;padding:8px 3px;margin:0;font-size:12px}
.weight-recommend-button[aria-pressed=true]{outline:2px solid #806021;outline-offset:2px}
.weight-recommend-status{grid-column:1 / -1;font-size:12px;line-height:1.5;color:#746e63}.weight-recommend-status:empty{display:none}
#exercises input.suggested-weight::placeholder{color:#292823;opacity:.42;-webkit-text-fill-color:#292823}

/* Client set entries: centered columns, compact badges and quiet row separators. */
#training-detail .set-header>span{text-align:center;justify-self:stretch;line-height:1.35}
#training-detail .set-row:not(.set-header)+.set-row:not(.set-header){border-top:1px solid #29282310;padding-top:5px;margin-top:5px}
#training-detail .set-index{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;min-width:0}
#training-detail .set-index>b{flex:0 0 20px}
#training-detail .set-tags{display:grid;grid-template-columns:repeat(2,24px);gap:4px;max-width:none;align-items:center}
#training-detail .set-tags .record-badge,#training-detail .set-tags .set-tag{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;padding:3px;margin:0;gap:0;border-radius:5px;position:relative}
#training-detail .set-tags .record-badge>span,#training-detail .set-tags .set-tag>span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#training-detail .set-tags svg{width:16px;height:16px;flex:0 0 16px}
#training-detail .weight-recommend-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0}
#training-detail .weight-recommend-row .exercise-max{margin:0;line-height:1.4;min-width:0}
#training-detail .weight-recommend-row .weight-recommend-button{width:auto;min-width:0;flex:0 0 auto;padding:10px 14px;margin:0;min-height:40px;font-size:14px}
@media(max-width:520px){#training-detail .set-index{gap:3px}#training-detail .set-index>b{flex-basis:18px}#training-detail .set-tags{gap:3px}}
/* The table header already identifies the sets; avoid repeating their count. */
#training-detail .set-controls>span.muted{display:none}
body:not(.coach-mode) #training-detail .set-controls{display:none}
#training-detail .set-header>span{font-weight:600}

/* Keep workout title, live status and exercise count on one balanced heading row. */
#training-detail .workhead>div:first-child{width:100%;min-width:0}
#training-detail .work-title-line{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;flex-wrap:nowrap}
#training-detail #worktitle,#training-detail #workmeta{font-size:22px!important;font-weight:700;color:#292823;line-height:1.25}
#training-detail #workmeta{text-align:right;justify-self:end}
#training-detail #status{justify-self:center;margin:0;max-width:100%;box-sizing:border-box;text-align:center;white-space:normal;line-height:1.35}
body:not(.coach-mode) #client-week-toolbar:not(:empty){padding-top:12px}
@media(max-width:900px){#training-detail #worktitle,#training-detail #workmeta{font-size:19px!important}#training-detail .work-title-line{gap:8px}#training-detail #status{font-size:11px;padding:7px 9px}}
@media(max-width:360px){#training-detail #worktitle,#training-detail #workmeta{font-size:17px!important}#training-detail .work-title-line{gap:6px}#training-detail #status{font-size:10px;padding:6px}}

/* Workout status sits immediately before the block label in the week toolbar. */
#client-week-toolbar>#status{margin:0 0 0 auto;flex:0 1 auto;text-align:center;font-size:10px;padding:8px;line-height:1.35}
#client-week-toolbar>#status[hidden]{display:none!important}
#client-week-toolbar>#status:not([hidden])+.block-heading-meta{margin-left:0}
#training-detail .work-title-line{grid-template-columns:auto minmax(0,1fr)}
body.coach-mode #training-detail .work-title-line{grid-template-columns:auto minmax(0,1fr) auto}

/* Native week picker includes its label; the weight action owns the right edge. */
body:not(.coach-mode) #training .work-actions{grid-template-columns:auto 1fr auto auto}
body:not(.coach-mode) #training .work-actions #previous-weeks{grid-column:3;grid-row:1;justify-self:end}
body:not(.coach-mode) #training .work-actions #weight-shortcut{grid-column:4;grid-row:1;justify-self:end}
#client-week-toolbar .unified-week-select{flex:0 0 auto;gap:0}
#client-week-toolbar .unified-week-select select{width:112px;min-width:0;padding:8px 26px 8px 10px;margin:0;border:1px solid #c7bc9d;border-radius:999px;background-color:transparent;color:#80652b;font-size:12px;line-height:1.4;cursor:pointer;appearance:auto;-webkit-appearance:menulist}
@media(max-width:360px){#client-week-toolbar .unified-week-select select{width:100px;font-size:11px;padding-left:8px}body:not(.coach-mode) #client-week-toolbar{gap:6px}}

/* Three equal, full-width week/status/block cells share typography and height. */
body:not(.coach-mode) #client-week-toolbar:has(>#status:not([hidden])){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start}
#client-week-toolbar:has(>#status:not([hidden]))>.unified-week-select,
#client-week-toolbar:has(>#status:not([hidden]))>.block-heading-meta{width:100%;min-width:0;margin:0}
#client-week-toolbar:has(>#status:not([hidden])) .unified-week-select select,
#client-week-toolbar:has(>#status:not([hidden]))>#status,
#client-week-toolbar:has(>#status:not([hidden])) #block-badge{width:100%;min-width:0;height:52px;box-sizing:border-box;margin:0;font-size:12px!important;font-weight:400;line-height:1.35;letter-spacing:normal;border-radius:26px;text-align:center}
#client-week-toolbar:has(>#status:not([hidden])) .unified-week-select select{padding:8px 20px 8px 8px;text-align-last:center}
#client-week-toolbar:has(>#status:not([hidden]))>#status,
#client-week-toolbar:has(>#status:not([hidden])) #block-badge{display:flex;align-items:center;justify-content:center;padding:6px 8px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:520px){#client-week-toolbar:has(>#status:not([hidden])) .unified-week-select select,#client-week-toolbar:has(>#status:not([hidden]))>#status,#client-week-toolbar:has(>#status:not([hidden])) #block-badge{font-size:11px!important}}

/* Client workout card starts with navigation, followed by its title/count row. */
body:not(.coach-mode) #training-detail .workhead{display:flex;flex-direction:column;align-items:stretch;gap:16px}
body:not(.coach-mode) #training-detail .workhead>div{width:100%;min-width:0}
body:not(.coach-mode) #training .work-actions{display:grid;grid-template-columns:auto auto 1fr auto;gap:10px;align-items:center}
body:not(.coach-mode) #training .work-actions #training-back{grid-column:1;grid-row:1;justify-self:start}
body:not(.coach-mode) #training .work-actions #previous-weeks{grid-column:2;grid-row:1;justify-self:start}
body:not(.coach-mode) #training .work-actions #weight-shortcut{grid-column:4;grid-row:1;justify-self:end}
body:not(.coach-mode) #training-detail .work-title-line{grid-template-columns:minmax(0,1fr) auto;width:100%}

/* Keep workout navigation outside, directly above the workout content card. */
#workout-navigation{display:none}
body.client-workout-open #workout-navigation{display:block;margin:0 0 16px}
#training #workout-navigation .work-actions{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:10px;width:100%}
#training #workout-navigation #training-back{grid-column:1;grid-row:1;justify-self:start}
#training #workout-navigation #previous-weeks{grid-column:2;grid-row:1;justify-self:start}
#training #workout-navigation #weight-shortcut{grid-column:4;grid-row:1;justify-self:end}

#training-detail [data-legend-jump]{cursor:pointer;font:inherit;box-sizing:border-box}
#training-detail [data-legend-jump]:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.training-legend{scroll-margin-top:calc(var(--ip-mobile-header-height,80px) + 16px)}
.training-legend:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Discreet floating return action, clear of mobile safe areas. */
#content-back-to-top{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom));z-index:80;display:flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;padding:0;border:1px solid #c7bc9d;border-radius:50%;background:#fffdf4ed;color:#665b40;box-shadow:0 3px 12px #29282320;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(6px);transition:opacity .2s ease,transform .2s ease,visibility .2s}
#content-back-to-top.is-visible{opacity:.9;visibility:visible;pointer-events:auto;transform:translateY(0)}
#content-back-to-top:hover,#content-back-to-top:focus-visible{opacity:1;background:#ffca0a;color:#20201c}
#content-back-to-top:focus-visible{outline:2px solid #806021;outline-offset:3px}
@media(prefers-reduced-motion:reduce){#content-back-to-top{transition:none}}

#energy-results{scroll-margin-top:calc(var(--ip-mobile-header-height,80px) + 18px)}
#energy-results .monthly-loss{display:block;margin-top:5px;font-size:12px;line-height:1.4;font-weight:400;color:#746e63}

#energy-results .monthly-weight-change{font-weight:700;color:#292823}

#home .macro-calculator-link{text-decoration:none;font-family:inherit;box-sizing:border-box;color:#000}

/* A short menu with the same categories as the landing screen. */
#main-navigation>button[data-view]{display:none!important}
#main-navigation>.compact-menu-item{display:flex;align-items:center;gap:12px}
body.trainer-account #main-navigation #logout-session{display:block!important}
#home .macro-calculator-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;font-weight:700;line-height:1.25}

.macro-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.macro-form label{display:flex;flex-direction:column;gap:7px;font-size:13px;letter-spacing:normal;text-transform:none;min-width:0}
.macro-form input,.macro-form select{width:100%;min-width:0;box-sizing:border-box;min-height:44px;font-size:16px;margin:0}
.macro-form fieldset{border:1px solid #d9d1c3;border-radius:10px;margin:18px 0;padding:16px}
.macro-form [hidden]{display:none!important}
#macro-error:empty{display:none}#macro-error{color:#a33228}
#macro-results{scroll-margin-top:calc(var(--ip-mobile-header-height,80px) + 18px)}
.macro-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.macro-result-grid>div{display:flex;flex-direction:column;gap:8px;text-align:center;padding:16px 8px;background:#ffca0a;border-radius:12px;color:#20201c}
.macro-result-grid strong{font-size:25px}.macro-result-grid small{font-size:12px}
.macro-explanation p{line-height:1.6}.macro-explanation a{color:#806021}
@media(max-width:600px){.macro-fields{grid-template-columns:1fr}.macro-result-grid{gap:8px}.macro-result-grid strong{font-size:21px}.macro-result-grid span{font-size:12px;overflow-wrap:anywhere}}

/* Keep native Safari controls inside the macro card instead of widening the page. */
#macros{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow-x:clip;touch-action:pan-y pinch-zoom}
#macros>.panel,#macros .macro-fields,#macros .macro-fields>label,#macros fieldset,#macros .macro-result-grid,#macros .macro-result-grid>div{min-width:0;min-inline-size:0;max-width:100%;box-sizing:border-box}
#macros input,#macros select{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#macros select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#macros .macro-explanation,#macros .energy-result,#macros p{overflow-wrap:anywhere}
#macros .subpage-title-row{min-width:0;max-width:100%}
#macros .subpage-title-row button{flex:0 0 auto}
@media(max-width:900px){body:has(#macros:not(.hidden)){overflow-x:clip}main:has(>#macros:not(.hidden)){min-width:0;max-width:100%;box-sizing:border-box;overflow-x:clip}}

#macro-detailed{margin:18px 0}#macro-detailed legend{font-weight:600;padding:0 6px}
.macro-plan-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:22px 0 12px}
.macro-plan-button{min-width:0;white-space:normal;padding:12px 6px;font-size:13px;border:1px solid #c7bc9d;border-radius:8px;background:#f2eee3;color:#292823;cursor:pointer}
.macro-plan-button.selected{background:#ffca0a;border-color:#aa893b;font-weight:700}
.macro-plan-button:focus-visible{outline:2px solid #806021;outline-offset:2px}
#macro-results>details{font-size:13px;line-height:1.6}#macro-results>details summary{cursor:pointer;font-weight:600}
@media(max-width:400px){.macro-plan-tabs{gap:5px}.macro-plan-button{font-size:11px;padding:12px 3px}}

/* A little breathing room below the final weighing summary on phones. */
@media(max-width:900px){#weight{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}}

/* Submenu tiles keep identical squares even with a two-line title. */
#home .home-subpage .client-home-grid{grid-auto-rows:1fr;align-items:stretch}
#home .home-subpage .client-home-grid>.home-tile{width:100%;min-width:0;min-height:0;aspect-ratio:1 / 1;align-self:stretch;box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:12px;font-size:clamp(16px,4.7vw,22px);line-height:1.3}
#home .home-subpage .client-home-grid>.home-tile>span{display:flex;align-items:center;justify-content:center;min-height:2.6em;max-width:100%;flex:0 0 auto;text-align:center;line-height:1.3;overflow-wrap:normal}
#home .home-subpage .client-home-grid>.home-tile>.home-tile-icon,#home .home-subpage .client-home-grid>.home-tile>.supplement-capsule-icon{width:40px;height:40px;min-height:0;max-width:40px;object-fit:contain;flex:0 0 40px}

/* Trainer shortcuts to the client overview in both navigation and landing screen. */
body:not(.coach-mode) #main-navigation>.trainer-clients-nav,body:not(.coach-mode) #home-main-grid>.home-clients-button{display:none!important}
body.coach-mode #main-navigation>.trainer-clients-nav{display:flex}
#home #home-main-grid>.home-clients-button{grid-column:1 / -1;justify-self:center;width:100%;aspect-ratio:auto;min-height:44px;padding:12px 20px;margin:0;box-sizing:border-box;font-size:18px;font-weight:700}
@media(min-width:901px){#home #home-main-grid>.home-clients-button{width:calc(50% - 8px)}}

.coach-program-title .block-navigation-button{cursor:pointer;background:transparent;box-shadow:none;font-family:inherit;line-height:1.4}
.coach-program-title .block-navigation-button:hover{background:#ffca0a20}
.coach-program-title .block-navigation-button:focus-visible{outline:2px solid #806021;outline-offset:3px}

/* Client profile and contact share the final landing row. */
body.coach-mode #home-main-grid>.home-profile-button{display:none!important}
#home #home-main-grid>.home-profile-button{grid-column:1;aspect-ratio:auto;min-height:50px;padding:6px 10px;display:flex;flex-direction:row;gap:10px;justify-content:center;font-size:19px}
body:not(.coach-mode) #home #home-main-grid>.home-contact{grid-column:2;width:100%;min-height:50px;aspect-ratio:auto;gap:10px;font-size:19px}
#home #home-main-grid>.home-profile-button>svg{flex:0 0 36px;width:36px;height:36px;color:#000}
@media(min-width:901px){body:not(.coach-mode) #home #home-main-grid>.home-profile-button{grid-column:1 / 3;min-height:80px;font-size:22px}body:not(.coach-mode) #home #home-main-grid>.home-contact{grid-column:3 / 5;min-height:80px;font-size:22px}}
.personal-profile-form{margin-top:20px}.personal-profile-form fieldset{border:0;padding:0;margin:0;min-inline-size:0}
.personal-profile-form label{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;font-size:14px;letter-spacing:normal;text-transform:none;min-width:0}
.personal-profile-form input,.personal-profile-form select,.personal-profile-form textarea{width:100%;box-sizing:border-box;min-width:0;min-height:44px;font-size:16px;margin:0}
#profile{min-width:0;max-width:100%;overflow-wrap:anywhere}
#profile [hidden]{display:none!important}
#profile-intake dl{margin:18px 0 0}#profile-intake dt{font-weight:600;margin-top:18px;font-size:14px}#profile-intake dd{margin:6px 0 0;font-size:14px;line-height:1.6;white-space:pre-wrap}
#profile-intake>p,#profile-load-status,#profile-save-status,#profile-password-status{font-size:14px;line-height:1.5}
#profile-password{margin-bottom:24px}

/* Persistent mobile navigation: the same actions remain available while scrolling. */
@media(max-width:900px){
 body>aside #mobile-menu-toggle{display:none!important}
 body>aside{overflow:visible;flex-wrap:nowrap}
 body>aside .app-brand{width:100%;min-width:0;flex-wrap:nowrap;gap:12px}
 body>aside .app-brand>img{flex:0 0 52px;width:52px;height:52px}
 body>aside .app-brand .coaching-mobile{--wordmark-width:min(66vw,260px);width:var(--wordmark-width);height:calc(var(--wordmark-width) * .1875);flex:0 1 var(--wordmark-width);margin:0}
 body>aside .app-brand .coaching-mobile img{width:calc(var(--wordmark-width) * 1.491);max-width:none;height:auto;left:calc(var(--wordmark-width) * -.446);top:calc(var(--wordmark-width) * -.107)}
 body #main-navigation,body #main-navigation{position:fixed;inset:auto 0 0;z-index:120;display:flex!important;flex-direction:row;align-items:center;justify-content:space-evenly;flex-wrap:nowrap;gap:0;width:100%;height:calc(64px + env(safe-area-inset-bottom,0px));max-height:none;margin:0;padding:6px max(4px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px));box-sizing:border-box;background:#eae4d8;border-top:1px solid #d7cfbf;box-shadow:0 -3px 12px #2928230d;overflow:visible}
 body #main-navigation>.compact-menu-item,body.trainer-account #main-navigation #logout-session,body #main-navigation #logout-session{position:relative;display:flex!important;flex:1 1 0;align-items:center;justify-content:center;min-width:0;max-width:64px;width:auto;min-height:44px;height:48px;margin:0;padding:8px 0;border-radius:12px;gap:0;background:transparent;border:0;box-shadow:none;color:#292823}
 body:not(.coach-mode) #main-navigation>.trainer-clients-nav{display:none!important}
 body #main-navigation>.compact-menu-item.active{background:#ffca0a;color:#111}
 body #main-navigation button>svg,body #main-navigation button>img{margin:0!important;width:24px!important;height:24px!important;min-width:24px;max-width:24px;max-height:24px;flex:0 0 24px;color:currentColor}
 body #main-navigation .nav-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body #main-navigation #logout-session>svg{display:block}
 main{padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))!important}
 #content-back-to-top{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
 #home-main-grid{max-width:min(100%,calc((100svh - var(--ip-mobile-header-height,80px) - 202px)*.8))}
}
@media(min-width:901px){#main-navigation #logout-session{display:flex!important;align-items:center;gap:10px}#main-navigation #logout-session .nav-icon{flex:0 0 22px}}

/* Five mobile destinations, with the landing tiles back at full content width. */
@media(max-width:900px){
 body #main-navigation>[data-menu-category="clients"],body #main-navigation>[data-menu-category="contact"],body #main-navigation #logout-session,body.trainer-account>aside #main-navigation #logout-session{display:none!important}
 body #main-navigation>.compact-menu-item{max-width:none;flex:1 1 20%}
 #home #home-main-grid{width:100%;max-width:680px;margin-inline:auto;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 #home #home-main-grid>.home-art-tile{width:100%;min-width:0;min-height:0;aspect-ratio:1 / 1;box-sizing:border-box}
 #home #home-main-grid>.home-profile-button,body:not(.coach-mode) #home #home-main-grid>.home-contact{min-width:0;width:100%;min-height:58px;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;padding:8px;overflow:hidden;font-size:clamp(16px,4.5vw,19px);line-height:1.25}
 #home #home-main-grid>.home-profile-button>svg,body:not(.coach-mode) #home #home-main-grid>.home-contact>.contact-art-image{width:32px;height:32px;min-width:32px;flex:0 0 32px}
 #home #home-main-grid>.home-profile-button>span,body:not(.coach-mode) #home #home-main-grid>.home-contact>span{min-width:0;max-width:100%;white-space:normal;text-align:center;overflow-wrap:normal}
}

/* Shorter mobile brand header and a compact, clearly divided bottom bar. */
@media(max-width:900px){
 body>aside{background:#000;border-color:#000;padding:8px 22px;min-height:56px;box-sizing:border-box}
 body>aside .app-brand{gap:14px;align-items:center}
 body>aside .app-brand>img{width:40px;height:40px;flex:0 0 40px;border-radius:0;background:transparent;object-fit:contain}
 body>aside .app-brand .coaching-mobile{--wordmark-width:min(62vw,230px);flex-shrink:1;mix-blend-mode:screen}
 body #main-navigation,body #main-navigation{height:calc(54px + env(safe-area-inset-bottom,0px));padding-top:3px;padding-bottom:calc(3px + env(safe-area-inset-bottom,0px))}
 body #main-navigation>.compact-menu-item{height:44px;min-height:44px;border-radius:0}
 body #main-navigation>.compact-menu-item[data-menu-category="training"]::before,
 body #main-navigation>.compact-menu-item[data-menu-category="nutrition"]::before,
 body #main-navigation>.compact-menu-item[data-menu-category="calculators"]::before,
 body #main-navigation>.compact-menu-item[data-menu-category="weight"]::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:1px;background:#000;opacity:.45;pointer-events:none}
 #content-back-to-top{bottom:calc(70px + env(safe-area-inset-bottom,0px))}
 main{padding-bottom:calc(80px + env(safe-area-inset-bottom,0px))!important}
}
.app-brand>.brand-mark{display:block;flex-shrink:0}
@media(max-width:900px){body>aside .app-brand>.brand-mark{width:40px;height:40px;flex:0 0 40px}body>aside .app-brand>.brand-mark>img{display:block;width:40px;height:40px;max-width:100%;object-fit:contain;border-radius:0;background:transparent}}

/* Match visible letter heights, rather than the transparent image canvases. */
@media(max-width:900px){
 body>aside .app-brand .coaching-mobile{--wordmark-width:min(55.8vw,207px)}
 body>aside .app-brand>.brand-mark{display:flex;align-items:center;justify-content:center;overflow:visible}
 body>aside .app-brand>.brand-mark>img{width:calc(min(55.8vw,207px) * .225);height:calc(min(55.8vw,207px) * .225);max-width:none;flex-shrink:0}
 body #main-navigation>.compact-menu-item::before{top:0!important;bottom:0!important}
}

/* The complete brand sits centrally, with the IP letters a little taller. */
@media(max-width:900px){
 body>aside .app-brand{width:100%;justify-content:center;align-items:center;margin-inline:auto;gap:14px}
 body>aside .app-brand>.brand-mark>img{width:calc((min(55.8vw,207px) * .144 + 3px) * 1.556);height:calc((min(55.8vw,207px) * .144 + 3px) * 1.556)}
 body #main-navigation [data-menu-category="weight"]>img{filter:url("#nav-scale-bold")}
}

/* Crisp straight scale outlines and a further three-pixel reduction of the bar. */
@media(max-width:900px){
 body #main-navigation,body #main-navigation{height:calc(51px + env(safe-area-inset-bottom,0px));padding-top:3px;padding-bottom:calc(3px + env(safe-area-inset-bottom,0px))}
 body #main-navigation>.compact-menu-item{height:41px;min-height:41px}
 body #main-navigation [data-menu-category="weight"]>img{filter:none}
 #content-back-to-top{bottom:calc(67px + env(safe-area-inset-bottom,0px))}
 main{padding-bottom:calc(77px + env(safe-area-inset-bottom,0px))!important}
}

/* Safari renders the scale inline; keep the active tab compact and softly rounded. */
@media(max-width:900px){
 body #main-navigation>.compact-menu-item.active{background:transparent}
 body #main-navigation>.compact-menu-item.active>svg{background:#ffca0a;border-radius:9px;padding:6px;box-sizing:content-box}
 body #main-navigation [data-menu-category="weight"]>svg{display:block;flex-shrink:0;overflow:visible;filter:none}
}

/* Warm directional light and a lifted surface on the six landing actions. */
#home #home-main-grid>.home-tile{background:linear-gradient(135deg,#ffdc43 0%,#ffcc13 52%,#ffbb16 100%)!important;box-shadow:6px 8px 16px #77500035,1px 2px 4px #77500018;transition:filter .14s ease,transform .12s ease,box-shadow .12s ease;transform:translate(0,0);touch-action:manipulation}
#home #home-main-grid>.home-tile:hover,#home #home-main-grid>.home-tile.touch-lit{filter:brightness(1.07);box-shadow:7px 10px 18px #7750003b,1px 2px 4px #77500018}
#home #home-main-grid>.home-tile:active,#home #home-main-grid>.home-tile.press-feedback{filter:brightness(1.06);transform:translate(2px,3px) scale(.985);box-shadow:2px 3px 6px #77500032,inset 1px 2px 4px #80530018}
@media(max-width:900px){
 #home #home-main-grid>.home-profile-button,body:not(.coach-mode) #home #home-main-grid>.home-contact{width:calc(100% - 10px);justify-self:center;min-height:54px;padding:6px 8px}
 #main-navigation>.compact-menu-item{transition:filter .12s ease,transform .12s ease,background-color .12s ease;touch-action:manipulation}
 body #main-navigation>.compact-menu-item:hover,body #main-navigation>.compact-menu-item.touch-lit{background:#ffdf663d;filter:brightness(1.1)}
 body #main-navigation>.compact-menu-item:active,body #main-navigation>.compact-menu-item.press-feedback{background:#ffce3452;transform:translateY(1px) scale(.95);box-shadow:inset 1px 2px 4px #2928231c}
}
@media(min-width:901px){body:not(.coach-mode) #home #home-main-grid>.home-profile-button,body:not(.coach-mode) #home #home-main-grid>.home-contact{width:calc(100% - 10px);justify-self:center;min-height:74px;padding:10px 16px}}
@media(prefers-reduced-motion:reduce){#home #home-main-grid>.home-tile,#main-navigation>.compact-menu-item{transition:none}}

/* Enlarge the IP upwards from its current baseline; deepen the warm tile gradient. */
#home #home-main-grid>.home-tile{background:linear-gradient(135deg,#ffca0a 0%,#edaa0f 55%,#b87308 100%)!important}
@media(max-width:900px){
 body>aside .app-brand>.brand-mark>img{width:calc((min(55.8vw,207px) * .144 + 6px) * 1.556);height:calc((min(55.8vw,207px) * .144 + 6px) * 1.556);transform:translateY(-1.5px)}
 body #main-navigation>.compact-menu-item.active{background:transparent!important;box-shadow:none!important;filter:none}
 body #main-navigation>.compact-menu-item.active>svg{background:#ffca0a}
}

/* Reverse the light direction while retaining the exact current tile palette. */
#home #home-main-grid>.home-tile{background:linear-gradient(225deg,#ffca0a 0%,#edaa0f 55%,#b87308 100%)!important}
@font-face{font-family:'IP Racing';src:url('fonts/racing-sans-one.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
#home #home-main-grid>.home-progress-tagline{font-family:'IP Racing','Arial Black',sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;background:linear-gradient(45deg,#ae6204 0%,#d39616 48%,#f8c632 100%);background-clip:text;-webkit-background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent}

/* Shared golden surface across landing categories, nested cards and primary actions. */
:root{--ip-golden-fill:linear-gradient(135deg,#ffca0a 0%,#edaa0f 55%,#b87308 100%);--ip-card-shadow:6px 8px 16px #77500035,1px 2px 4px #77500018;--ip-card-shadow-hover:7px 10px 18px #7750003b,1px 2px 4px #77500018}
#home #home-main-grid>.home-tile,#home .home-subpage .home-tile,
main button.gold,main a.gold,main button.day,main button.weight-week-tile,main button.recipe-card,main button.cardio-choice,
main .page-back-button,main .exercise-link,main .history-icon-button,#weight-all-weeks,
#training .work-actions #training-back,#training .work-actions #weight-shortcut,#training .work-actions #previous-weeks,
#rir-how-to,#weight .weight-mean-tile,#macro-results .macro-result-grid>div,#macro-results .macro-plan-button.selected{background:var(--ip-golden-fill)!important;box-shadow:var(--ip-card-shadow);transition:filter .14s ease,transform .12s ease,box-shadow .12s ease;touch-action:manipulation}
main button,main .exercise-link,main a.gold{transition:filter .14s ease,transform .12s ease,box-shadow .12s ease}
main button.touch-lit,main .exercise-link.touch-lit,main a.gold.touch-lit{filter:brightness(1.07)}
@media(hover:hover){main button:not(:disabled):hover,main .exercise-link:hover,main a.gold:hover{filter:brightness(1.07)}}
main button:not(:disabled):active,main button.press-feedback,main .exercise-link:active,main .exercise-link.press-feedback,main a.gold:active{filter:brightness(1.06);transform:translate(2px,3px) scale(.985);box-shadow:2px 3px 6px #77500032,inset 1px 2px 4px #80530018}
#home .home-subpage .home-tile.touch-lit,#home .home-subpage .home-tile:hover{filter:brightness(1.07);box-shadow:var(--ip-card-shadow-hover)}
#home .home-subpage .home-tile:active,#home .home-subpage .home-tile.press-feedback{transform:translate(2px,3px) scale(.985);box-shadow:2px 3px 6px #77500032,inset 1px 2px 4px #80530018}
@media(prefers-reduced-motion:reduce){main button,main a.gold,main .exercise-link,#home .home-tile{transition:none}}
main button.press-feedback,main button:not(:disabled):active{box-shadow:2px 3px 6px #77500032,inset 1px 2px 4px #80530018!important}

/* Workout controls and account access use the same flat yellow as the active tab. */
#training button.day,#training button.gold,#training a.gold,#training .page-back-button,
#training .exercise-link,#training .history-icon-button,
#training .work-actions #training-back,#training .work-actions #weight-shortcut,#training .work-actions #previous-weeks,
#access-screen button.gold{background:#ffca0a!important}

/* Keep the mobile dock outside the sticky header and anchored to the viewport. */
@media(max-width:900px){body>#main-navigation{position:fixed!important;top:auto!important;right:0!important;bottom:0!important;left:0!important;z-index:120;width:100%;margin:0;transform:none!important;transition:none!important;animation:none!important;will-change:auto}}

/* The mobile dock contains only the five main destinations. */
@media(max-width:900px){
 body #main-navigation #logout-session,body.trainer-account #main-navigation #logout-session{display:none!important}
}

/* Optional installation action, without changing the landing tile layout. */
#home>.install-app-action{display:block;margin:24px auto 12px;min-height:44px;font-size:14px}
#home>.install-app-action[hidden]{display:none!important}
.install-app-dialog{width:min(440px,calc(100% - 32px));max-height:80dvh;overflow:auto;padding:24px;border:1px solid #d9d1c3;border-radius:16px;background:#fffdf5;color:#292823;box-shadow:0 12px 40px #0003}
.install-app-dialog::backdrop{background:#0007}.install-app-dialog h2{font-size:22px;margin-top:0}.install-app-dialog p{line-height:1.6;font-size:15px}.install-app-dialog button{display:block;margin:18px 0 0 auto;min-height:44px;background:#ffca0a;color:#111}

/* A solid landing slogan and a vertically centred group of landing actions. */
#home #home-main-grid>.home-progress-tagline{background:none!important;background-clip:initial;-webkit-background-clip:initial;color:#ffca0a!important;-webkit-text-fill-color:#ffca0a}
main:has(>#home:not(.hidden))>#home{display:flex;flex-direction:column;justify-content:center;min-height:var(--ip-home-available-height,0px);padding-top:0}
#home #home-main-grid{flex-shrink:0}

/* One flat-yellow question card at a time. */
.intake-wizard{max-width:600px;margin:20px auto 0}
.intake-wizard .intake-progress{font-size:14px;margin:0 0 12px;color:#6b655a}
.intake-wizard .intake-question-card{display:block;min-width:0;margin:0;padding:22px;border:0;border-radius:16px;background:#ffca0a;color:#20201c}
.intake-wizard .intake-question-card legend{float:left;width:100%;margin:0 0 18px;padding:0;font-size:23px;font-weight:700;line-height:1.35;letter-spacing:normal;text-transform:none}
.intake-wizard .intake-question-card legend+*{clear:both}
.intake-wizard .intake-hint{font-size:14px;margin:0 0 12px}
.intake-wizard .intake-choices{display:grid;gap:10px}
.intake-wizard .intake-choice{width:100%;min-height:48px;padding:12px 16px;background:#fffdf3;border:2px solid #29282340;border-radius:10px;box-shadow:none;color:#292823;text-align:center;font-weight:600;font-size:16px;white-space:normal}
.intake-wizard .intake-choice[aria-pressed="true"]{background:#292823;border-color:#292823;color:#ffca0a;box-shadow:0 0 0 2px #fff9}
.intake-wizard .intake-question-card input,.intake-wizard .intake-question-card textarea{display:block;width:100%;min-width:0;min-height:48px;background:#fffdf3;color:#292823;font-size:16px;border:1px solid #29282360;border-radius:10px;padding:12px;box-sizing:border-box}
.intake-wizard .intake-step-actions{display:flex;justify-content:space-between;gap:14px;margin-top:18px}
.intake-wizard .intake-step-actions button{min-height:46px;min-width:100px;text-align:center}
.intake-wizard .intake-step-actions .gold{background:#ffca0a!important;color:#20201c}
.intake-wizard button:focus-visible,.intake-wizard input:focus-visible,.intake-wizard textarea:focus-visible{outline:3px solid #292823;outline-offset:3px}
.intake-wizard .intake-error{color:#953328;font-size:14px;line-height:1.5}
@media(max-width:600px){#access-screen:has(.intake-wizard){align-items:flex-start;padding-top:24px}.intake-wizard .intake-question-card{padding:18px}.intake-wizard .intake-question-card legend{font-size:21px}}

.invitation-preview{margin-top:20px;border-top:1px solid #d9d1c3;padding-top:16px}
.invitation-preview textarea{width:100%;box-sizing:border-box;min-width:0;font-size:14px;line-height:1.6;resize:vertical;white-space:pre-wrap}
.invitation-preview .invitation-mail-link{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:10px 16px;margin:12px 10px 0 0;border-radius:8px;background:#ffca0a;color:#292823;font-weight:600;text-decoration:none}
.invitation-preview button{margin-top:12px;min-height:44px}

/* Inside a client's trainer view, focus on the editable programme and block archive. */
body.coach-client-preview.coach-mode main>header>.profile,
body.coach-client-preview.coach-mode main>header>.eyebrow,
body.coach-client-preview.coach-mode #client-context,
body.coach-client-preview.coach-mode #training>#program-content,
body.coach-client-preview.coach-mode #training>#no-workouts-message,
body.coach-client-preview.coach-mode #coach-workspace .coach-quick-notes{display:none!important}
body.coach-client-preview.coach-mode main>header{padding-block:0;min-height:0}
body.coach-client-preview.coach-mode #client-profile-actions{margin-top:0}
body.coach-client-preview.coach-mode #coach-workspace{margin-top:20px}

/* No divider beneath the client management buttons in the trainer programme. */
body.coach-client-preview.coach-mode main>header{border:0!important;box-shadow:none!important;background-image:none!important}
body.coach-client-preview.coach-mode #client-profile-actions{border:0!important;box-shadow:none!important;background-image:none!important}

/* Equal outer spacing and evenly separated client-management actions. */
body.coach-client-preview.coach-mode #client-profile-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;padding:0 12px;box-sizing:border-box;align-items:stretch}
body.coach-client-preview.coach-mode #client-profile-actions>button{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 8px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;line-height:1.3}
@media(max-width:450px){body.coach-client-preview.coach-mode #client-profile-actions{gap:8px;padding-inline:8px}body.coach-client-preview.coach-mode #client-profile-actions>button{font-size:12px;padding:10px 5px}}

/* The profile card shares its content width in both preview modes. */
body.coach-client-preview main{max-width:1430px;padding-inline:48px}
#client-preview-bar{width:100%;box-sizing:border-box}
#client-preview-bar .profile-client-full-name{display:block;line-height:1.4}
#client-preview-bar .profile-block-count{display:block}
#client-preview-bar>.profile-mode-label select,body:has(#home:not(.hidden)) #client-preview-bar>.profile-mode-label select{height:44px;min-height:44px;padding:9px 24px 9px 8px!important;font-size:12px;letter-spacing:normal;line-height:1.4;text-overflow:clip}
@media(max-width:900px){body.coach-client-preview main{padding-inline:22px}}
@media(max-width:360px){#client-preview-bar>.profile-mode-label select,body:has(#home:not(.hidden)) #client-preview-bar>.profile-mode-label select{font-size:11px;padding-right:20px!important}}

/* Cardio settings stay available beside the trainer's programme. */
body.coach-client-preview.coach-mode #coach-workspace .coach-cardio{display:flex;flex-wrap:wrap;gap:16px}
#coach-workspace .coach-cardio label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
#coach-workspace .coach-cardio input{width:76px;min-width:0}
#coach-workspace .coach-cardio select{max-width:100%}

/* Two explicit rows keep invitation actions in the requested order. */
.client-access-dialog .client-access-action-rows{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;width:100%}
.client-access-primary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.client-access-secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.client-access-primary>button,.client-access-secondary>button{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 8px;text-align:center;white-space:normal;line-height:1.35}
@media(max-width:600px){.client-access-primary,.client-access-secondary{gap:7px}.client-access-primary>button,.client-access-secondary>button{font-size:12px;padding:10px 5px}}

.coach-table .coach-add-exercise-row > td { text-align: left; padding: 10px 12px; }

/* Clear, aligned workout column titles on phones and desktops. */
#training .set-row.set-header,#training .set-row.set-header>span{font-size:12px;font-weight:800;letter-spacing:.35px;text-align:center;color:#49453c}
#training .coach-table thead th{font-size:13px;font-weight:800;text-align:center}
@media(max-width:380px){#training .set-row.set-header,#training .set-row.set-header>span{font-size:11px;letter-spacing:0}}

/* The desktop sidebar remains in place while a real narrow viewport is open. */
.viewport-switch{display:none}
#device-preview{display:none}
@media(min-width:901px){
 body>aside{padding-inline:13px}
 body>aside .app-brand{position:relative;min-height:143px}
 body>aside .viewport-switch{position:absolute;top:0;left:120px;width:78px;height:112px;display:grid;grid-template-rows:1fr 1fr;gap:6px}
 .viewport-switch button{display:flex;align-items:center;justify-content:center;text-align:center;min-width:0;padding:5px 3px;font-size:11px;line-height:1.25;font-weight:700;border:1px solid #c9b98f;border-radius:7px;background:#f5f0e5;color:#292823}
 .viewport-switch button[aria-pressed=true]{background:#ffca0a;border-color:#d7a900}
 .viewport-switch button:hover{filter:brightness(1.07)}
 .viewport-switch button:active{transform:translateY(1px)}
 body.device-mobile-preview>main{display:none!important}
 body.device-mobile-preview #device-preview{display:flex;position:fixed;inset:0 0 0 232px;justify-content:center;align-items:center;padding:16px;background:#e4dfd4;z-index:80}
 #device-preview iframe{display:block;width:390px;max-width:100%;height:100%;max-height:900px;border:1px solid #bfb7a7;border-radius:18px;background:#f4f0e7;box-shadow:4px 7px 24px #0002}
 body.device-mobile-preview #content-back-to-top{display:none!important}
}

/* Bold device symbols retain the existing button dimensions and accessible names. */
.viewport-switch button svg{display:block;width:25px;height:25px;flex:none}
/* Set numbers sit in the gutter, to the left of the row separators. */
body:not(.coach-mode) #training-detail .set-row:not(.set-header){position:relative}
body:not(.coach-mode) #training-detail .set-index>b{position:absolute;left:-32px;width:22px;text-align:left;flex:none}
body:not(.coach-mode) #training-detail .set-index{min-height:30px}
#training-detail .set-drop-detail{grid-column:2 / -1;color:#276091;font-size:12px;font-weight:700;line-height:1.4;padding:2px 0 4px;text-align:left}
body:not(.coach-mode) #training-detail .exercise-link b{font-size:18px;line-height:1.35}
@media(max-width:900px){body:not(.coach-mode) #training-detail .set-table{margin-left:22px}body:not(.coach-mode) #training-detail .set-index>b{left:-28px;width:20px}}
@media(max-width:520px){body:not(.coach-mode) #training-detail .exercise-link b{font-size:17px}}

#weight-progress .weight-change-total{font-size:18px;font-weight:700;margin:10px 0 24px;line-height:1.5}
#weight-progress .weight-chart-panel{margin:24px 0 16px;padding:20px;max-width:800px;width:100%;min-width:0;text-align:left}
#weight-progress .weight-chart-panel h2{font-size:20px;letter-spacing:normal}
.weight-chart{display:block;width:100%;height:auto;margin-top:15px;overflow:visible}
.weight-chart text{font:14px system-ui,sans-serif;fill:#595348}
.weight-chart-grid{stroke:#ded7ca;stroke-width:1}
.weight-chart-axis{fill:none;stroke:#716a5c;stroke-width:1.5}
.weight-chart-line{fill:none;stroke:#b57d00;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
.weight-chart circle{fill:#ffca0a;stroke:#292823;stroke-width:2}
.weight-chart circle:focus{outline:none;stroke:#b57d00;stroke-width:4}
#weight-progress .weight-chart-note{font-size:12px;font-weight:400;letter-spacing:normal;margin:4px 0 0}
@media(max-width:520px){#weight-progress .weight-chart-panel{padding:15px 10px}#weight-progress .weight-chart-panel h2{font-size:18px}.weight-chart text{font-size:17px}}

/* Exercise names wrap naturally; history stretches to match the complete title button. */
body:not(.coach-mode) #training-detail #exercises .exhead{align-items:stretch}
body:not(.coach-mode) #training-detail #exercises .exname{align-items:stretch;min-width:0}
body:not(.coach-mode) #training-detail #exercises .exercise-link{height:auto;min-height:44px;padding:10px 12px;font-size:18px;font-weight:700;line-height:1.35}
body:not(.coach-mode) #training-detail #exercises .exercise-link b,
body:not(.coach-mode) #training-detail #exercises .exercise-ordinal{font:inherit;font-weight:700;line-height:inherit}
body:not(.coach-mode) #training-detail #exercises .exercise-link b{min-width:0;white-space:normal;overflow-wrap:anywhere}
body:not(.coach-mode) #training-detail #exercises .history-exercise{height:auto;min-height:44px;align-self:stretch;display:flex;align-items:center;justify-content:center}
@media(max-width:520px){body:not(.coach-mode) #training-detail #exercises .exercise-link{font-size:17px}}

/* Give the three result fields more room while keeping two badges side by side. */
body:not(.coach-mode) #training-detail .set-row{grid-template-columns:80px repeat(3,minmax(0,1fr))}
body:not(.coach-mode) #training-detail .set-tags{column-gap:8px;row-gap:4px}
@media(max-width:600px){body:not(.coach-mode) #training-detail .set-row{grid-template-columns:64px repeat(3,minmax(0,1fr))}}

/* Keep the workout focused and reduce all three metadata pills by five pixels. */
body:has(#training:not(.hidden)) main>header>.eyebrow{display:none!important}
#client-week-toolbar:has(>#status:not([hidden])) .unified-week-select select,
#client-week-toolbar:has(>#status:not([hidden]))>#status,
#client-week-toolbar:has(>#status:not([hidden])) #block-badge{height:43px;min-height:0;border-radius:21.5px}

/* Equal horizontal and vertical badge spacing with slightly slimmer buttons. */
body:not(.coach-mode) #training-detail .set-tags{column-gap:8px;row-gap:8px}
body:not(.coach-mode) #training-detail .set-tags .record-badge,
body:not(.coach-mode) #training-detail .set-tags .set-tag{height:20px;min-height:20px;padding:1px 3px}

/* Start the workout metadata without the header divider. */
body:has(#training:not(.hidden)) main>header{border-bottom:0!important;padding-bottom:0}
body.client-workout-open:not(.coach-mode) #client-week-toolbar:not(:empty){border-top:0;padding-top:0}

/* A single compact cookbook heading, with its green calculator between title and back. */
body:has(#cookbook:not(.hidden)) main>header{border-bottom:0!important}
#cookbook .cookbook-intro{border-top:0}
#cookbook .cookbook-title-line{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) auto;gap:12px;align-items:center}
#cookbook .cookbook-title-line h1{min-width:0;font-size:clamp(20px,5.5vw,36px)}
#cookbook #cookbook-calories,#cookbook .cookbook-title-line .page-back-button{height:44px;min-height:44px;margin:0;padding:6px 10px;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.2;font-size:13px}
#cookbook #cookbook-calories{width:100%;min-width:0;white-space:normal;background:#51a568!important;background-image:none!important;color:#fff!important;border:1px solid #3c8250;box-shadow:2px 3px 7px #275d2720;font-weight:700}
@media(max-width:520px){#cookbook .cookbook-title-line{gap:8px}#cookbook #cookbook-calories,#cookbook .cookbook-title-line .page-back-button{font-size:12px;padding-inline:7px}}

/* Keep each exercise count beside its workout title, without changing tile dimensions. */
#week .day .card-title-line{flex-wrap:nowrap;justify-content:space-between;gap:6px;min-width:0}
#week .day .card-title-line>b,#week .day .card-title-line>small{white-space:nowrap;flex-shrink:0}
@media(max-width:420px){#week .day .card-title-line>b{font-size:clamp(14px,3.9vw,16px)}#week .day .card-title-line>small{font-size:10.5px}}
/* Balance the native week selector around its text, while retaining a visible chevron. */
#client-week-toolbar .unified-week-select select{appearance:none!important;-webkit-appearance:none!important;text-align:center;text-align-last:center;padding-inline:22px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2380652b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:10px 7px}
#client-week-toolbar.has-completed-block-dates{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1.35fr);gap:8px;align-items:center}
#client-week-toolbar.has-completed-block-dates>.unified-week-select,#client-week-toolbar.has-completed-block-dates>.block-heading-meta{width:100%;min-width:0;margin:0}
#client-week-toolbar.has-completed-block-dates .unified-week-select select,#client-week-toolbar.has-completed-block-dates #block-badge{width:100%;min-width:0;height:43px;margin:0;font-size:11px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal}
#client-week-toolbar .completed-block-dates{display:flex;align-items:center;justify-content:center;height:43px;margin:0;padding:5px 7px;border:1px solid #80ad8b;border-radius:22px;background:#e3f1e6;color:#237147;font-size:10px;font-weight:600;line-height:1.4;text-align:center}

/* A small gap below the view selector, with a stronger cookbook title and green depth. */
body:has(#cookbook:not(.hidden)) main>header{padding-bottom:0;margin-bottom:0}
#cookbook .cookbook-intro{margin-top:12px;padding-top:0}
#cookbook .cookbook-title-line{margin-top:0}
#cookbook .cookbook-title-line h1{font-size:clamp(22px,6vw,38px);line-height:1.2}
#cookbook #cookbook-calories{background:linear-gradient(135deg,#70bf86 0%,#4fa366 48%,#28733f 100%)!important;border-color:#3c8250;box-shadow:3px 4px 9px #275d272c}

/* Remove the redundant upper divider consistently across app pages. */
body main>header{border-bottom:0!important;padding-bottom:0!important;margin-bottom:0;box-shadow:none}
main>section:not(#home)>.subpage-title-row,
main>section:not(#home)>.subpage-back-row,
main>section:not(#home)>h1,
#calculator .aligned-page-title{margin-top:12px}
#cookbook .cookbook-title-line{margin-top:0}

/* Centre the week text and chevron as one group; the native select remains fully clickable. */
#client-week-toolbar .unified-week-select{position:relative;display:grid!important;place-items:center;min-height:43px;border:1px solid #c7bc9d;border-radius:999px;color:#80652b;overflow:hidden}
#client-week-toolbar .unified-week-select select{position:absolute;inset:0;width:100%!important;height:100%!important;margin:0;opacity:0;cursor:pointer;z-index:2}
#client-week-toolbar .unified-week-select:focus-within{outline:2px solid #b88717;outline-offset:2px}
.week-select-caption{display:inline-flex;align-items:center;justify-content:center;gap:6px;pointer-events:none;white-space:nowrap;font-size:12px;font-weight:400;padding:8px 10px;line-height:1.4}
.week-select-caption svg{display:block;flex:none}
@media(max-width:900px){
 #access-screen{min-height:100dvh}
 #access-screen input,#access-screen textarea{font-size:16px!important}
 #access-screen.has-focused-input{align-items:flex-start;min-height:var(--visible-access-height,100dvh);padding-top:20px;padding-bottom:45vh}
}

/* Matching metadata pills in both the workout overview and an open workout. */
body:not(.coach-mode) #client-week-toolbar:not(:empty){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:center}
body:not(.coach-mode) #client-week-toolbar:has(>#status:not([hidden])),
body:not(.coach-mode) #client-week-toolbar.has-completed-block-dates{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#client-week-toolbar>.unified-week-select,#client-week-toolbar>.block-heading-meta{width:100%;min-width:0;margin:0;flex:none}
#client-week-toolbar>.unified-week-select,#client-week-toolbar #block-badge{height:43px;min-height:43px;max-height:43px;box-sizing:border-box;border-radius:22px;border-width:1px}
#client-week-toolbar #block-badge{display:flex;align-items:center;justify-content:center;width:100%;padding:5px 8px;text-align:center;white-space:normal;overflow-wrap:anywhere;font-size:12px!important;line-height:1.3}
#client-week-toolbar .week-select-caption{font-size:12px;line-height:1.3}

/* A client editing sheet uses the full desktop width below its profile header. */
@media(min-width:901px){
 body.coach-client-preview.coach-mode:not(.device-mobile-preview)>aside{position:absolute;top:0;left:0;height:var(--trainer-brand-bottom,200px);min-height:185px;overflow:hidden;border-bottom:1px solid #d7cfbf}
 body.coach-client-preview.coach-mode:not(.device-mobile-preview)>aside>:not(.app-brand){display:none!important}
 body.coach-client-preview.coach-mode:not(.device-mobile-preview)>main{margin-left:0;width:100%;max-width:none}
 body.coach-client-preview.coach-mode:not(.device-mobile-preview) #client-preview-bar{margin-left:232px;width:calc(100% - 232px);min-height:155px}
}
/* Only buttons inside an opened workout lose their gradient. */
body.client-workout-open #training-detail button.cardio-choice,
body.client-workout-open #training #training-back{background:#ffca0a!important;background-image:none!important}

@media(min-width:901px){body>aside .brand-mark[role=link]{cursor:pointer}body>aside .brand-mark[role=link]:focus-visible{outline:3px solid #d7a900;outline-offset:4px;border-radius:8px}}
/* The trainer's client identity replaces the branding header on phones. */
@media(max-width:900px){
 body.coach-client-preview.coach-mode>aside{display:none!important}
 body.coach-client-preview.coach-mode>main{margin-top:0!important;padding-top:10px!important}
 body.coach-client-preview.coach-mode #client-preview-bar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;margin:0 0 16px;padding:14px;border-radius:14px;background:#fffcf5}
 body.coach-client-preview.coach-mode #client-preview-bar>strong{grid-column:1;grid-row:1;min-width:0;font-size:19px}
 body.coach-client-preview.coach-mode #client-preview-bar .profile-heading-label{display:none}
 body.coach-client-preview.coach-mode #client-preview-bar .profile-block-count{font-size:12px;margin-top:4px}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-intake-button{grid-column:2;grid-row:1;margin:0;padding:8px;font-size:12px;min-height:44px}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-back-button{grid-column:3;grid-row:1;margin:0;padding:8px 12px;font-size:12px;min-height:44px}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label{grid-column:1/-1;grid-row:2;width:100%}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label select{width:100%}
}

/* Remaining block weeks share the directory's green/yellow/red progress stages. */
#coach-workspace .block-navigation-button.phase-early{background:#dcefdc!important;background-image:none!important;border-color:#70a478!important;color:#265e36!important}
#coach-workspace .block-navigation-button.phase-last-training{background:#ffca0a!important;background-image:none!important;border-color:#d4a71d!important;color:#292823!important}
#coach-workspace .block-navigation-button.phase-deload{background:#f5d4d1!important;background-image:none!important;border-color:#cf7972!important;color:#8a2922!important}
#client-cards a.client-name-link{display:block;font:inherit;font-weight:700;text-decoration:underline;text-decoration-color:#cbbd99;text-underline-offset:4px}
/* Highlight the workout title, leaving the current-week table band unchanged. */
#coach-workspace .coach-workout-heading{background:#ffca0a!important;background-image:none!important;color:#292823!important}
#coach-workspace .coach-workout-heading h2 small{color:#49453c}

/* Trainer controls use solid action colours. */
body.coach-mode #add-client,
body.coach-mode #client-preview-bar>.profile-back-button{background:#ffca0a!important;background-image:none!important}
#coach-workspace .coach-workout-heading{--workout-heading-size:22px;display:flex;align-items:center;flex-wrap:wrap;gap:12px}
#coach-workspace .coach-workout-heading h2{font-size:var(--workout-heading-size);font-weight:700;line-height:1.4}
#coach-workspace .coach-workout-heading h2 small{font:inherit;font-weight:inherit;color:inherit}
#coach-workspace .coach-workout-heading>.coach-workout-status{font-size:var(--workout-heading-size);font-weight:400;line-height:1.4;color:#000!important;border-color:#000!important;background:transparent!important;background-image:none!important;white-space:normal}
#coach-workspace .coach-workout-status .completion-check{color:#2b8650;font-weight:700}
#coach-workspace .coach-workout-heading>.coach-remove-workout{background:#d32f2f!important;background-image:none!important;border-color:#d32f2f!important;color:#fff!important;font-weight:600}
#coach-workspace .coach-workout-heading>.coach-remove-workout:hover{background:#b71c1c!important;border-color:#b71c1c!important}

/* Compact completion badge matches the adjacent remove action. */
#coach-workspace .coach-workout-heading h2 small{font-size:calc(var(--workout-heading-size) - 3px)}
#coach-workspace .coach-workout-heading>.coach-workout-status,
#coach-workspace .coach-workout-heading>.coach-remove-workout{display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;min-height:32px;height:32px;margin:0;padding:6px 9px;font-size:11px;line-height:1.4;border-width:1px;white-space:nowrap}

/* Client profile actions belong to the identity card, above the editing sheet. */
body.coach-client-preview.coach-mode #client-greeting,
body.coach-client-preview.coach-mode main>header>.profile,
body.coach-client-preview.coach-mode #logout-session{display:none!important}
body.coach-client-preview.coach-mode #client-preview-bar>#client-profile-actions{grid-column:1/-1;grid-row:3;margin:0;padding:0;gap:12px}
@media(min-width:901px){
 body.coach-client-preview.coach-mode #client-preview-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:center;gap:12px;padding:16px;min-height:0}
 body.coach-client-preview.coach-mode #client-preview-bar>strong{grid-column:1/3;grid-row:1;display:flex;align-items:center;flex-wrap:wrap;gap:12px;font-size:16px}
 body.coach-client-preview.coach-mode #client-preview-bar .profile-client-full-name{display:inline;font-size:inherit}
 body.coach-client-preview.coach-mode #client-preview-bar .profile-block-count{display:inline;margin:0;font-size:14px}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-intake-button{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;margin:0}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label{grid-column:1/3;grid-row:2;width:100%}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label select{width:100%}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-back-button{grid-column:3;grid-row:2;width:100%;margin:0;min-height:44px}
}
#coach-workspace .coach-cardio{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:12px 14px}
#coach-workspace .coach-cardio-group{display:grid;gap:8px;min-width:0}
#coach-workspace .coach-cardio-title{font-weight:700}
#coach-workspace .coach-cardio .cardio-options{display:flex;flex-wrap:wrap;gap:8px}
#coach-workspace .coach-cardio button.cardio-choice{background:#ffca0a!important;background-image:none!important;min-height:36px;padding:8px 12px;font-size:13px}
#coach-workspace .coach-cardio-values{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px}
#coach-workspace .coach-cardio-values input{width:70px;margin:0}
@media(max-width:600px){#coach-workspace .coach-cardio{grid-template-columns:minmax(0,1fr)}}
/* Equal desktop controls, single-line intake label and one-row cardio choices. */
body.coach-client-preview.coach-mode .desktop-account-bar{display:none!important}
body.coach-client-preview.coach-mode #client-preview-bar>.profile-intake-button{flex-direction:row;gap:4px;white-space:nowrap}
@media(min-width:901px){
 body.coach-client-preview.coach-mode #client-preview-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.coach-client-preview.coach-mode #client-preview-bar>strong{grid-column:1;grid-row:1}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-intake-button{grid-column:2;grid-row:1;width:100%;min-height:44px;justify-self:stretch}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label{grid-column:1;grid-row:2;min-width:0;width:100%}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-back-button{grid-column:2;grid-row:2;min-width:0;width:100%;height:44px}
}
#coach-workspace .coach-cardio .cardio-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#coach-workspace .coach-cardio .cardio-options>button{min-width:0;width:100%;white-space:nowrap;padding-inline:6px}
/* Centered client identity, followed by two matching rows of three controls. */
@media(min-width:901px){
 body.coach-client-preview.coach-mode #client-preview-bar{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 body.coach-client-preview.coach-mode #client-preview-bar>strong{grid-column:1/-1;grid-row:1;justify-content:center;text-align:center;margin-bottom:2px}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label{grid-column:1;grid-row:2;width:100%;margin:0}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-intake-button{grid-column:2;grid-row:2;width:100%}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-back-button{grid-column:3;grid-row:2;width:100%}
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-mode-label select,
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-intake-button,
 body.coach-client-preview.coach-mode #client-preview-bar>.profile-back-button,
 body.coach-client-preview.coach-mode #client-preview-bar #client-profile-actions>button{box-sizing:border-box;height:44px;min-height:44px;padding:10px 8px;font-size:14px;line-height:1.4;box-shadow:2px 4px 9px #59411925}
 body.coach-client-preview.coach-mode #client-preview-bar>#client-profile-actions{gap:12px}
 /* Both cardio phases fit on one shared baseline, with a subtle vertical divider. */
 #coach-workspace .coach-cardio{display:flex!important;align-items:center;flex-wrap:nowrap!important;gap:14px;overflow-x:auto}
 #coach-workspace .coach-cardio-group{display:flex;flex:1 0 auto;align-items:center;gap:9px;white-space:nowrap}
 #coach-workspace .coach-cardio-group+.coach-cardio-group{border-left:1px solid #c9bfae;box-shadow:-2px 0 3px -2px #59411945;padding-left:14px}
 #coach-workspace .coach-cardio-title{font-size:12px;flex:none}
 #coach-workspace .coach-cardio .cardio-options{display:flex;flex-wrap:nowrap;gap:5px;flex:none}
 #coach-workspace .coach-cardio .cardio-options>button{width:auto;min-height:30px;padding:5px 7px;font-size:11px;line-height:1.4}
 #coach-workspace .coach-cardio-values{flex-wrap:nowrap;gap:5px;font-size:11px}
 #coach-workspace .coach-cardio-values input{width:48px;min-width:48px;min-height:30px;padding:5px;font-size:12px}
}
/* Tighter trainer profile and programme spacing. */
@media(min-width:901px){
 body.coach-client-preview.coach-mode #client-preview-bar{row-gap:10px;padding-top:14px}
 body.coach-client-preview.coach-mode #client-preview-bar>strong{font-size:18px;margin-bottom:0}
 body.coach-client-preview.coach-mode #client-preview-bar .profile-block-count{font-size:16px}
 body.coach-client-preview.coach-mode #coach-workspace{margin-top:12px}
 #coach-workspace .coach-sheet-heading{margin:10px 0;gap:10px}
 #coach-workspace .coach-program-title{margin-bottom:4px;gap:12px}
 #coach-workspace .coach-heading-actions{gap:10px}
 #coach-workspace .coach-heading-actions .week-select-label select,
 #coach-workspace #coach-add-workout{min-height:36px;padding-top:7px;padding-bottom:7px;margin-top:0;margin-bottom:0}
 #coach-workspace .coach-cardio{padding-top:7px;padding-bottom:7px;gap:10px}
 #coach-workspace .coach-cardio-group{gap:7px}
 #coach-workspace .coach-cardio .cardio-options>button{flex:none}
}

/* Additional spacing refinements in the desktop trainer profile. */
@media(min-width:901px){
 body.coach-client-preview.coach-mode #client-preview-bar{padding-top:10px;row-gap:10px}
 #coach-workspace .coach-sheet-heading{margin-top:4px;margin-bottom:6px}
}

@media(min-width:901px){#coach-workspace .coach-cardio{padding-top:2px;padding-bottom:2px}}
/* Fine spacing and softer cardio shadows in the trainer's desktop sheet. */
@media(min-width:901px){
 #coach-workspace .coach-sheet-heading{margin-top:-6px;margin-bottom:4px}
 #coach-workspace .coach-cardio{padding-top:0;padding-bottom:0;margin-top:-2px}
 #coach-workspace .coach-cardio button.cardio-choice{box-shadow:1px 2px 5px #59411918!important}
 #coach-workspace .coach-cardio button.cardio-choice:hover{box-shadow:1px 3px 6px #59411922!important}
}
/* Larger exercise titles and a compact vertical delete action in the name cell. */
#coach-workspace .coach-table .coach-name-cell{position:relative;padding-right:62px}
#coach-workspace .coach-name-cell>a{font-size:24px;line-height:1.4;font-weight:650;overflow-wrap:anywhere}
#coach-workspace .coach-name-cell>.remove-exercise{position:absolute;right:8px;top:8px;width:46px;min-width:46px;height:58px;min-height:58px;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background:#d32f2f!important;background-image:none!important;border:1px solid #d32f2f!important;color:#fff!important;border-radius:7px}
#coach-workspace .coach-name-cell>.remove-exercise:hover{background:#b71c1c!important;border-color:#b71c1c!important}
#coach-workspace .coach-name-cell>.remove-exercise:focus-visible{outline:2px solid #8a1717;outline-offset:3px}
#coach-workspace .coach-name-cell>.remove-exercise svg{width:24px;height:24px;pointer-events:none}
@media(min-width:901px){
 #coach-workspace .coach-sheet-heading{margin-top:-16px}
 #coach-workspace .coach-cardio{margin-top:-4px;margin-bottom:-2px}
}
/* A narrower, two-step removal button prevents accidental exercise deletion. */
#coach-workspace .coach-table .coach-name-cell{padding-right:53px}
#coach-workspace .coach-name-cell>.remove-exercise{width:36.8px;min-width:36.8px;background:#f6d9dc!important;border-color:#e6a8af!important;color:#a33340!important;box-shadow:none}
#coach-workspace .coach-name-cell>.remove-exercise:hover{background:#f1c7cc!important;border-color:#d98d97!important}
#coach-workspace .coach-name-cell>.remove-exercise.removal-armed,
#coach-workspace .coach-name-cell>.remove-exercise.removal-armed:hover{background:#d32f2f!important;border-color:#d32f2f!important;color:#fff!important}
@media(min-width:901px){
 #coach-workspace .coach-sheet-heading{margin-top:-18px}
 #coach-workspace .coach-cardio{margin-top:-6px}
}
/* Keep the cardio separator inside its own row and narrow the delete action again. */
#coach-workspace .coach-name-cell>.remove-exercise{width:29.44px;min-width:29.44px}
#coach-workspace .coach-table .coach-name-cell{padding-right:46px}
@media(min-width:901px){
 #coach-workspace .coach-sheet-heading{margin-top:-20px}
 #coach-workspace .coach-cardio{position:relative;clip-path:inset(0);isolation:isolate}
 #coach-workspace .coach-cardio-group+.coach-cardio-group{position:relative;border-left:0;box-shadow:none}
 #coach-workspace .coach-cardio-group+.coach-cardio-group::before{content:'';position:absolute;left:0;top:8px;bottom:4px;width:1px;background:#c9bfae;box-shadow:-1px 0 2px #59411930;pointer-events:none}
}
/* The trainer's client preview uses the same centered profile-card layout. */
body.coach-client-preview:not(.coach-mode) #client-preview-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:center}
body.coach-client-preview:not(.coach-mode) #client-preview-bar>strong{grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;text-align:center;font-size:18px;margin:0 0 2px;min-width:0}
body.coach-client-preview:not(.coach-mode) #client-preview-bar .profile-client-full-name{display:inline;font-size:inherit}
body.coach-client-preview:not(.coach-mode) #client-preview-bar .profile-block-count{display:inline;margin:0;font-size:16px}
body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-mode-label{grid-column:1;grid-row:2;width:100%;min-width:0;margin:0}
body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-intake-button{grid-column:2;grid-row:2;width:100%;min-width:0;flex-direction:row;gap:4px;white-space:nowrap;justify-self:stretch}
body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-back-button{grid-column:3;grid-row:2;width:100%;min-width:0;background:#ffca0a!important;background-image:none!important}
body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-mode-label select,
body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-intake-button,
body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-back-button{box-sizing:border-box;width:100%;height:44px;min-height:44px;margin:0;padding:10px 8px;font-size:14px;line-height:1.4;box-shadow:2px 4px 9px #59411925!important}
@media(max-width:600px){
 body.coach-client-preview:not(.coach-mode) #client-preview-bar{gap:8px;padding:12px}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>strong{font-size:16px;gap:7px}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar .profile-block-count{font-size:14px}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-mode-label select,
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-intake-button,
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-back-button{font-size:clamp(9px,2.5vw,13px);padding-inline:4px!important}
}
.profile-account-pane{display:none}
@media(min-width:901px){
 body.coach-client-preview:not(.coach-mode) .desktop-account-bar{display:none!important}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(140px,.7fr)}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>strong{grid-column:1/4}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-account-pane{display:grid;grid-column:4;grid-row:1/3;grid-template-rows:subgrid;align-items:center;gap:12px;padding-left:16px;border-left:1px solid #bcb8ae45;height:100%;min-width:0}
 body.coach-client-preview:not(.coach-mode) .profile-account-pane>strong{font-size:16px;text-align:center}
 body.coach-client-preview:not(.coach-mode) .profile-account-pane>button{width:100%;height:44px;min-height:44px;margin:0;padding:10px 8px;font-size:14px;line-height:1.4;box-shadow:2px 4px 9px #59411925}
}
/* Account actions take only the width of the trainer's name. */
@media(min-width:901px){
 body.coach-client-preview:not(.coach-mode) #client-preview-bar{grid-template-columns:repeat(3,minmax(0,1fr)) max-content}
 body.coach-client-preview:not(.coach-mode) #client-preview-bar>.profile-account-pane{width:max-content;grid-template-columns:max-content;justify-items:stretch}
 body.coach-client-preview:not(.coach-mode) .profile-account-pane>strong{white-space:nowrap}
 body.coach-client-preview:not(.coach-mode) .profile-account-pane>button{width:100%;min-width:0;justify-self:stretch}
}
.mobile-profile-week{display:none}
@media(max-width:900px){
 body.coach-client-preview>aside{display:none!important}
 body.coach-client-preview>main{margin-top:0!important;padding-top:10px!important}
 body.coach-client-preview .desktop-account-bar{display:none!important}
 body.coach-client-preview #client-preview-bar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px;padding:12px;margin-top:0}
 body.coach-client-preview #client-preview-bar>strong{grid-column:1/-1!important;grid-row:1!important;display:flex!important;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;text-align:center;font-size:18px;margin:0 0 2px}
 body.coach-client-preview #client-preview-bar .profile-heading-label,
 body.coach-client-preview #client-preview-bar .profile-block-count{display:none!important}
 body.coach-client-preview #client-preview-bar .profile-client-full-name{display:inline;font-size:18px}
 body.coach-client-preview #client-preview-bar .mobile-profile-week{display:inline;font-size:14px;font-weight:400;white-space:nowrap}
 body.coach-client-preview #client-preview-bar>.profile-mode-label{grid-column:1!important;grid-row:2!important;width:100%;min-width:0;margin:0}
 body.coach-client-preview #client-preview-bar>.profile-intake-button{grid-column:2!important;grid-row:2!important;flex-direction:row;white-space:nowrap;width:100%;min-width:0;gap:3px}
 body.coach-client-preview #client-preview-bar>.profile-back-button{grid-column:3!important;grid-row:2!important;width:100%;min-width:0}
 body.coach-client-preview #client-preview-bar>.profile-mode-label select,
 body.coach-client-preview #client-preview-bar>.profile-intake-button,
 body.coach-client-preview #client-preview-bar>.profile-back-button{height:44px;min-height:44px;margin:0;padding:8px 5px!important;font-size:clamp(10px,2.7vw,13px)!important;line-height:1.35;width:100%;box-shadow:2px 4px 9px #59411925}
}
@media(min-width:901px){
 body.client-workout-open:not(.coach-mode) #training #workout-navigation .work-actions{grid-template-columns:auto auto minmax(0,1fr) auto}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar{grid-column:3;grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:center;gap:8px;min-width:0;margin:0;padding:0!important;border:0}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>*{min-width:0}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar .pill,
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar .unified-week-select{height:43px;min-height:43px;max-height:43px;display:flex;align-items:center;justify-content:center;line-height:1.3;font-size:12px;padding:6px 8px;white-space:normal;text-align:center}
}
@media(min-width:901px){
 body.coach-mode #clients>.clients-heading{display:flex;align-items:center;flex-wrap:nowrap;margin-top:0;gap:12px}
 body.coach-mode #clients>.clients-heading .clients-heading-actions{flex-wrap:nowrap;align-items:center;gap:12px}
 body.coach-mode #clients .clients-heading-actions>.desktop-account-bar{display:flex;width:auto;min-width:max-content;min-height:44px;margin:0;gap:12px;flex:none}
 body.coach-mode #clients .desktop-account-bar>strong{white-space:nowrap}
 body.coach-mode #clients .desktop-account-bar>button{height:44px;min-height:44px;margin:0}
 body.coach-mode #clients .clients-heading-actions>#mode,
 body.coach-mode #clients .clients-heading-actions>#add-client{height:44px;min-height:44px;margin:0}
}
/* Three equal metadata pills stay on one desktop navigation line. */
@media(min-width:901px){
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:43px!important;grid-auto-flow:column;gap:8px;width:100%;min-width:0}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>.unified-week-select{grid-column:1!important;grid-row:1!important}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>#status{grid-column:2!important;grid-row:1!important}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>.block-heading-meta{grid-column:3!important;grid-row:1!important}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>.unified-week-select,
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>#status,
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar>.block-heading-meta{width:100%!important;min-width:0!important;height:43px!important;min-height:43px!important;max-height:43px!important;margin:0!important;box-sizing:border-box;align-self:center}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar #block-badge{width:100%!important;height:43px!important;margin:0!important}
 body.client-workout-open:not(.coach-mode) #workout-navigation #client-week-toolbar #block-dates{display:none}
}
/* Compact spacing only in the mobile client workout. */
@media(max-width:900px){
 body.client-workout-open:not(.coach-mode) #client-week-toolbar{margin-top:-5px;margin-bottom:12px}
 body.client-workout-open:not(.coach-mode) #training-detail{padding-top:20px}
 body.client-workout-open:not(.coach-mode) #training-detail .workhead{margin-bottom:17px}
 body.client-workout-open:not(.coach-mode) #workout-notes .notes-grid{margin-bottom:22px}
 body.client-workout-open:not(.coach-mode) #warmup .cardio-panel{margin-bottom:21px}
}
/* Mobile greetings belong only to Home; weighing has no slogan. */
@media(max-width:900px){
 body:has(main>#home.hidden) #client-greeting{display:none!important}
 body:has(main>#weight:not(.hidden)) main>header>.eyebrow{display:none!important}
}
/* Mobile content pages omit the home slogan and weighing starts near the top. */
@media(max-width:900px){
 body:has(main>:is(#history,#nutrition,#cookbook,#supplements,#calculator,#rir,#macros):not(.hidden)) main>header>.eyebrow{display:none!important}
 #weight>.weight-title-row{margin-top:10px;margin-bottom:12px}
 body.authenticated-client:has(#weight:not(.hidden)) main>header,
 body.coach-client-preview:has(#weight:not(.hidden)) main>header{min-height:0;padding-block:0!important;margin:0}
}
/* Center completed-block dates within their pill on every screen size. */
#client-week-toolbar #block-dates,
#client-week-toolbar #block-dates.completed-block-dates{width:100%;text-align:center;justify-content:center;align-items:center;margin-inline:0}
/* Retain only compact client cards from the premium visual exploration. */
#client-cards>.panel{border-radius:16px;border-top:3px solid #e6bc37;padding:16px 18px;min-height:0;box-shadow:0 4px 14px #5941190c}
#client-cards>.panel>h2{margin-bottom:10px}
#client-cards>.panel>.client-program-pill{margin-bottom:12px}
#profile-intake-toggle{background:#ffca0a!important;background-image:none!important;margin:0;font-size:16px}
#profile-intake:not([hidden]){margin-top:16px}
/* A curved amber top edge gives large client navigation cards a consistent finish. */
body #home button.home-tile,
body #training button.day,
body #weight button.weight-week-tile,
body #cookbook button.recipe-card{border-top:4px solid #b98928!important;border-top-left-radius:17px;border-top-right-radius:17px;box-sizing:border-box;box-shadow:0 4px 12px #59411916,0 1px 2px #5941190a}
@media(hover:hover){
 body #home button.home-tile:hover,
 body #training button.day:hover,
 body #weight button.weight-week-tile:hover,
 body #cookbook button.recipe-card:hover{border-top-color:#9c721c!important;box-shadow:0 6px 16px #59411920,0 2px 4px #5941190d}
}
/* Black home tagline and a softly lit ivory edge on the large navigation cards. */
#home #home-main-grid>.home-progress-tagline{color:#111!important;-webkit-text-fill-color:#111!important;background:none!important;background-image:none!important}
body #home button.home-tile{border-color:#fff7dc!important;border-top-color:#fffdf2!important;box-shadow:inset 0 2px 3px #ffffff9c,inset 1px 0 2px #ffffff4d,0 4px 12px #59411916,0 1px 2px #5941190a}
@media(hover:hover){body #home button.home-tile:hover{border-top-color:#fffef8!important;box-shadow:inset 0 2px 4px #ffffffb3,inset 1px 0 2px #ffffff59,0 6px 16px #59411920}}
/* Frosted gold navigation cards: deep amber at top-left, milky ivory at bottom-right. */
body #home #home-main-grid>button.home-tile,
body #home .home-subpage button.home-tile,
body #training button.day,
body #weight button.weight-week-tile,
body #cookbook button.recipe-card{background:linear-gradient(135deg,#b87308d9 0%,#e7ae30c9 30%,#f4d88db5 58%,#fffdf2e8 100%)!important;border-color:#fff9e5d9!important;border-top-color:#fffdf2!important;box-shadow:inset 1px 1px 3px #ffffffa6,inset -1px -1px 2px #ffffff80,4px 6px 14px #77500022;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);color:#20201c!important}
@media(hover:hover){
 body #home button.home-tile:hover,
 body #training button.day:hover,
 body #weight button.weight-week-tile:hover,
 body #cookbook button.recipe-card:hover{box-shadow:inset 1px 1px 4px #ffffffbf,inset -1px -1px 2px #ffffff99,5px 8px 18px #77500028}
}
/* Thin reflective edges and translucent surfaces inspired by the supplied glass UI. */
body #home .client-home-grid{background:radial-gradient(ellipse at 10% 12%,#d28b1733,transparent 48%),radial-gradient(ellipse at 88% 90%,#f5cb4d38,transparent 50%);border-radius:24px}
body #home #home-main-grid>button.home-tile,
body #home .home-subpage button.home-tile,
body #training button.day,
body #weight button.weight-week-tile,
body #cookbook button.recipe-card{position:relative;overflow:hidden;background:linear-gradient(135deg,#bc851e70 0%,#e4b85045 36%,#ffffff30 68%,#fffef994 100%)!important;border:1px solid #fffdf2b8!important;border-top:1px solid #fffef7e8!important;border-radius:18px;box-shadow:inset 0 1px 1px #ffffffd9,inset 1px 0 1px #ffffff70,inset 0 -1px 1px #bca77c2b,0 7px 18px #71501c1f,0 1px 3px #71501c12;backdrop-filter:blur(16px) saturate(135%);-webkit-backdrop-filter:blur(16px) saturate(135%);color:#20201c!important}
body #home button.home-tile::before,
body #training button.day::before,
body #weight button.weight-week-tile::before,
body #cookbook button.recipe-card::before{content:'';position:absolute;inset:0 0 auto;height:30%;background:linear-gradient(168deg,#ffffff55 0%,#ffffff16 50%,transparent 82%);border-radius:inherit;pointer-events:none}
@media(hover:hover){
 body #home button.home-tile:hover,
 body #training button.day:hover,
 body #weight button.weight-week-tile:hover,
 body #cookbook button.recipe-card:hover{border-color:#fffffff0!important;box-shadow:inset 0 1px 2px #fffffff0,inset 1px 0 1px #ffffff8c,0 9px 22px #71501c26}
}
/* Richer gold glass and a continuous warm backdrop confined to the content. */
body #home .client-home-grid{background:none}
body #home #home-main-grid>button.home-tile,
body #home .home-subpage button.home-tile,
body #training button.day,
body #weight button.weight-week-tile,
body #cookbook button.recipe-card{background:linear-gradient(90deg,#cd7b08f0 0%,#e39e1bc9 30%,#edc367a6 60%,#e7d19bed 100%)!important}
body>main{background:linear-gradient(90deg,#edcf9561 0%,#f4e6c740 43%,#e8e5de70 100%);min-height:100dvh}
@media(max-width:900px){
 body>main{background:linear-gradient(90deg,#edcf9561 0%,#f4e6c740 43%,#e8e5de70 100%);min-height:calc(100dvh - var(--ip-mobile-header-height,80px));background-attachment:fixed}
}
/* Full-surface reflection avoids a curved seam on the two shallow cards. */
body #home #home-main-grid>button.home-profile-button::before,
body #home #home-main-grid>button.home-contact::before{inset:0;height:auto;border-radius:inherit;background:linear-gradient(180deg,#ffffff26 0%,#ffffff0d 42%,#ffffff00 100%)}

/* Back navigation always uses the established solid yellow. */
body main button.page-back-button,body main button.profile-back-button,
body main #training .work-actions #training-back,body main #macro-back,
body main #profile-back,body main button[data-home-target="home"]{background:#ffca0a!important;background-image:none!important}
/* Match the client cards' curved gold rim on the four main destinations only. */
body #home #home-main-grid>button.home-art-tile{border-top:3px solid #e6bc37!important}
body main #clients #add-client{background:#ffca0a!important;background-image:none!important}

/* The trainer directory shares the new glass finish without changing status colors. */
body.coach-mode #client-cards>.panel{background:linear-gradient(90deg,#cd7b08f0 0%,#e39e1bc9 30%,#edc367a6 60%,#e7d19bed 100%);border:1px solid #fffdf2b8;border-top:3px solid #e6bc37;box-shadow:inset 0 1px 1px #ffffffd9,inset 1px 0 1px #ffffff70,0 7px 18px #71501c1f;backdrop-filter:blur(16px) saturate(135%);-webkit-backdrop-filter:blur(16px) saturate(135%)}
/* Timed exercises retain their set count and use a single seconds field. */
body .duration-toggle{display:block;margin:6px auto 0;padding:5px 3px;min-height:30px;font-size:10px;line-height:1.2;border:1px solid #c9bfa7;border-radius:7px;background:#eee8dc;color:#292823;cursor:pointer}
body .duration-toggle[aria-pressed="true"]{background:#ffca0a!important;border-color:#d6a70b;color:#000}
.coach-duration-cell label{display:flex;align-items:center;justify-content:center;gap:8px;font-size:11px;white-space:nowrap}
.coach-duration-cell input{width:76px!important;max-width:100%}
#exercises .duration-table .set-row{grid-template-columns:minmax(100px,1fr) minmax(100px,1fr)}
/* Equal lower home cards in trainer mode. */
body.coach-mode #home #home-main-grid>.home-clients-button,
body.coach-mode #home #home-main-grid>.home-contact{grid-row:4;grid-column:1;width:calc(100% - 10px);min-height:54px;aspect-ratio:auto;justify-self:center;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;padding:6px 8px;font-size:19px;box-sizing:border-box}
body.coach-mode #home #home-main-grid>.home-contact{grid-column:2}
body.coach-mode #home #home-main-grid>.home-clients-button::before{inset:0;height:auto;background:linear-gradient(180deg,#ffffff26 0%,#ffffff0d 42%,#ffffff00 100%)}
@media(min-width:901px){
 body.coach-mode #home #home-main-grid>.home-clients-button{grid-column:1 / 3;grid-row:3;min-height:74px;padding:10px 16px;font-size:22px}
 body.coach-mode #home #home-main-grid>.home-contact{grid-column:3 / 5;grid-row:3;min-height:74px;padding:10px 16px;font-size:22px}
}
body.coach-mode #client-cards>.panel{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none}
/* Compact icon mode switch matches the series count input. */
body .coach-count-cell .duration-toggle{width:100%;min-width:0;box-sizing:border-box;height:30px;min-height:30px;padding:4px 0;display:flex;align-items:center;justify-content:center;margin:6px 0 0;background:#f5d55f!important;border:1px solid #d8bd59;box-shadow:0 2px 4px #59411918;color:#292823}
body .coach-count-cell .duration-toggle[aria-pressed="true"]{background:#f5d55f!important;border-color:#d8bd59}
body .coach-count-cell .duration-toggle svg{display:block;flex:none}
/* Client workout choices use a flat yellow surface like Back. */
body:not(.coach-mode) #training #week>button.day{background:#ffca0a!important;background-image:none!important;backdrop-filter:none;-webkit-backdrop-filter:none}
body:not(.coach-mode) #training #week>button.day::before{content:none;background:none}
/* Calculator actions share the same solid yellow surface. */
body main #rir-how-to,body main #calorie-form button[type="submit"],body main #macro-form button[type="submit"]{background:#ffca0a!important;background-image:none!important;color:#000}
body main #macro-form button[type="submit"]{margin-top:10px}

/* One horizontal color field, with no partial-height reflection over it. */
body #home #home-main-grid>button.home-tile::before,
body #home .home-subpage button.home-tile::before,
body #training button.day::before,
body #weight button.weight-week-tile::before,
body #cookbook button.recipe-card::before{content:none!important;background:none!important}
/* Weigh-in heading is tighter; week cards fade vertically beneath a gold rim. */
#weight>.weight-title-row{margin-top:18px}
@media(max-width:900px){#weight>.weight-title-row{margin-top:0}}
body #weight button.weight-week-tile{background:linear-gradient(180deg,#cd7b08f0 0%,#e39e1bc9 30%,#edc367a6 60%,#e7d19bed 100%)!important;border-top:3px solid #b98524!important}
/* A gentle diagonal from upper right toward lower left on the home cards. */
body #home #home-main-grid>button.home-tile{background:linear-gradient(250deg,#cd7b08f0 0%,#e39e1bc9 30%,#edc367a6 60%,#e7d19bed 100%)!important}
/* Week navigation stays flat; the average repeats the vertical week-card fill. */
body main #weight #weight-all-weeks{background:#ffca0a!important;background-image:none!important;color:#000}
body main #weight .weight-mean-tile{background:linear-gradient(180deg,#cd7b08f0 0%,#e39e1bc9 30%,#edc367a6 60%,#e7d19bed 100%)!important}
/* Empty workout notes expand on demand in the mobile client view. */
.note-expand{display:none}
.workout-note-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(max-width:900px){
 body.client-workout-open:not(.coach-mode) #workout-notes .workout-note.note-empty textarea{display:none}
 body.client-workout-open:not(.coach-mode) #workout-notes .workout-note.note-empty .note-expand{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;margin:0;background:#ffca0a!important;border:1px solid #d6ae21;border-radius:7px;box-shadow:0 2px 4px #59411918;color:#000;font-size:22px;line-height:1;cursor:pointer}
}
/* Compact client cardio controls with an inline incline unit. */
body:not(.coach-mode) #warmup .cardio-panel{padding-top:13px}
body:not(.coach-mode) #warmup .cardio-heading{margin-bottom:-3px}
.cardio-metrics{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:13px 0}
.cardio-metrics .duration-line{margin:0;white-space:nowrap}
.cardio-metrics .incline-metric{border-left:1px solid #bcb8af;padding-left:10px}
.incline-input-wrap{position:relative;display:inline-flex;align-items:center}
.duration-line .incline-input-wrap input{width:76px;padding-right:24px;box-sizing:border-box;-moz-appearance:textfield}
.incline-input-wrap input::-webkit-inner-spin-button,.incline-input-wrap input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.incline-unit{position:absolute;right:9px;pointer-events:none;font-size:13px;color:#5e5544}
/* Keep mobile client cardio values compact on one line. */
@media(max-width:900px){
 body.client-workout-open:not(.coach-mode) .cardio-metrics{flex-wrap:nowrap;gap:8px}
 body.client-workout-open:not(.coach-mode) .cardio-metrics .duration-line{min-width:0;gap:5px;font-size:12px;flex-shrink:0}
 body.client-workout-open:not(.coach-mode) .cardio-metrics .duration-line input{width:48px;min-width:0;padding:8px 5px;box-sizing:border-box;text-align:center;-moz-appearance:textfield}
 body.client-workout-open:not(.coach-mode) .cardio-metrics .duration-line input::-webkit-inner-spin-button,
 body.client-workout-open:not(.coach-mode) .cardio-metrics .duration-line input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
 body.client-workout-open:not(.coach-mode) .cardio-metrics .incline-metric{padding-left:8px}
 body.client-workout-open:not(.coach-mode) .cardio-metrics .incline-input-wrap input{width:53px;padding-right:18px}
 body.client-workout-open:not(.coach-mode) .cardio-metrics .incline-unit{right:5px;font-size:12px}
}
/* Category cards repeat the exact home-card gradient, including Home tiles. */
body #home .home-subpage button.home-tile{background:linear-gradient(250deg,#cd7b08f0 0%,#e39e1bc9 30%,#edc367a6 60%,#e7d19bed 100%)!important}
.workout-skipped{color:#bd2525!important;font-weight:600}
body main #coach-finish-week{background:#ffca0a!important;background-image:none!important;white-space:nowrap}
#client-cards>.client-opened-group{grid-column:1 / -1;margin:16px 0 2px;font-size:17px;font-weight:600;color:#514b40}
#client-cards>.client-opened-group:first-child{margin-top:0}
/* The mobile trainer toolbar stays on one row beneath the program title. */
@media(max-width:900px){
 body.coach-mode #coach-workspace .coach-sheet-heading{display:flex;flex-direction:column;align-items:stretch;gap:8px}
 body.coach-mode #coach-workspace .coach-heading-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);width:100%;gap:6px;align-items:stretch}
 body.coach-mode #coach-workspace .coach-heading-actions .week-select-label{display:block;min-width:0;width:100%;margin:0}
 body.coach-mode #coach-workspace .coach-heading-actions .week-select-label select,
 body.coach-mode #coach-workspace .coach-heading-actions>button{width:100%;min-width:0;height:38px;min-height:38px;box-sizing:border-box;margin:0;padding:6px 5px;font-size:11px;line-height:1.2;white-space:nowrap}
 body.coach-mode #coach-workspace .coach-heading-actions .week-select-label select{padding-right:18px}
 body.coach-mode #coach-workspace .coach-workout-heading{flex-wrap:nowrap;gap:6px;padding:8px}
 body.coach-mode #coach-workspace .coach-workout-heading h2{display:flex;align-items:center;gap:5px;flex:1 1 auto;min-width:0;margin:0;white-space:nowrap;font-size:22px}
 body.coach-mode #coach-workspace .coach-workout-heading h2 small{font-size:11px;line-height:1.15;white-space:nowrap}
 body.coach-mode #coach-workspace .coach-workout-heading>.coach-workout-status{flex:0 1 auto;min-width:0;max-width:90px;height:auto;min-height:28px;padding:3px 5px;font-size:9px;line-height:1.15;white-space:normal;text-align:center}
 body.coach-mode #coach-workspace .coach-workout-heading>.coach-remove-workout{display:flex;flex-direction:column;gap:0;flex:0 0 48px;width:48px;height:28px;min-height:28px;padding:2px 3px;font-size:10px;line-height:1.05;white-space:nowrap}
}
