/* Neutral surfaces, yellow actions and blue links, based on the supplied reference. */
:root,[data-theme="light"]{
 --ink:#333336;--muted:#686b72;--paper:#fff;--white:#fff;--acid:#ffdd2d;
 --line:#e7e8ea;--dark:#242528;--soft:#f5f6f7;--radius:24px;
 --surface:#f5f6f7;--surface-raised:#fff;--surface-hover:#ebedf0;
 --accent-soft:#fff8d6;--link:#1267d5;--focus:#2678ed;--field:#fff;
 --hero:#eef1f7;--shadow:0 8px 28px #1b263b08;--warning:#965713;
 color-scheme:light;
}
[data-theme="dark"]{
 --ink:#f3f4f5;--muted:#b0b2ba;--paper:#17181b;--white:#232428;
 --line:#3b3d44;--dark:#101114;--soft:#292b30;
 --surface:#232428;--surface-raised:#2c2e34;--surface-hover:#363941;
 --accent-soft:#3e3821;--link:#8abbff;--focus:#8abbff;--field:#2c2e34;
 --hero:#282d38;--shadow:none;--warning:#f2bd7b;
 color-scheme:dark;
}
html{background:var(--paper)}
body{background:var(--paper);color:var(--ink);font-family:Arial,Helvetica,sans-serif;font-weight:400;line-height:1.55;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit}
h1,h2,h3{color:var(--ink);font-weight:700}
h1{letter-spacing:-1.2px;line-height:1.12}h2{letter-spacing:-.5px}
a{color:var(--link);text-underline-offset:4px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
::selection{background:#ffdd2d;color:#242528}
.sidebar{background:var(--paper);color:var(--ink);border-right:1px solid var(--line);padding-top:32px}
.sidebar .brand{color:var(--ink);font-size:21px!important;letter-spacing:-.5px;text-decoration:none}
.brand .brand-plan{color:var(--muted)!important;font-weight:400}
.sidebar-caption,.signature,.signature small,.method p,.nav,.nav span{color:var(--muted)}
.method{border-color:var(--line)}.method strong{color:var(--ink)}
.nav{font-weight:500;border-radius:14px;padding:14px 13px}
.nav.active,.nav.active span{color:#292a2e;background:#ffdd2d}
.nav:hover:not(.active){background:var(--surface);color:var(--ink)}
.workspace>header{height:auto;min-height:88px;border-color:var(--line);flex-wrap:wrap;gap:14px;padding-block:16px}
.prototype{color:var(--muted);letter-spacing:.8px;flex-wrap:wrap}.prototype:before{background:#ffdd2d}
.account-link{color:var(--link);font-size:14px;font-weight:400;text-decoration:none;letter-spacing:0}
.route-status{font-size:14px;color:var(--muted)}.route-status strong{color:var(--ink);font-weight:500}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:18px;margin-left:auto;flex-wrap:wrap}
.theme-switch{display:inline-flex;align-items:center;gap:3px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:4px;flex:0 0 auto}
.theme-switch button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 10px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:12px;font-weight:500;line-height:1.2;cursor:pointer;white-space:nowrap}
.theme-switch button[aria-pressed="true"]{background:var(--surface-raised);color:var(--ink);box-shadow:0 2px 6px #0000000d}
.theme-switch svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
main{padding-top:48px}.simple-flow{max-width:850px;margin-top:24px}
.simple-flow h1{max-width:760px;font-size:clamp(32px,3.6vw,48px)}
.simple-flow .lead{font-size:18px;color:var(--muted)}
.eyebrow,.small-label,.asset .filetag,.week-card .n,.route-mark,.source-catalog-title{color:var(--muted);font-weight:500;letter-spacing:.9px}
.card,.week-card,.reader-article,.reader-navigation,.option,.print-preview{background:var(--surface);color:var(--ink);border:1px solid transparent;border-radius:var(--radius);box-shadow:none}
.card{padding:30px}.card p,.option small,.week-card p,.lead{color:var(--muted)}
.help-options .option:is(:hover,:focus-visible,:active){background:#ffdd2d;color:#111;border-color:#ffdd2d}
.help-options .option:is(:hover,:focus-visible,:active) :is(span,small){color:inherit}
.primary,.secondary,.text-btn{font-weight:500;letter-spacing:0;gap:12px}
.primary{background:#ffdd2d;color:#292a2e;border-radius:12px;min-height:48px;padding:14px 22px}
.primary:hover{background:#ffcd33;color:#292a2e}.primary:active{background:#f5c400}
.secondary{color:var(--link);background:var(--surface-raised);border-color:var(--line);border-radius:12px;min-height:44px}
.secondary:hover{background:var(--surface-hover)}.text-btn,.back{color:var(--link)}
.focus,.progress-masthead{background:var(--hero);color:var(--ink)}
.focus h2,.progress-masthead h2,.progress-stats strong{color:var(--ink)}
.focus p,.progress-masthead p,.progress-stats span,.completion-ring span{color:var(--muted)}
.focus .eyebrow,.progress-masthead .eyebrow{color:var(--link)}
.focus:after{color:var(--line)}
.route-card,.journey-strip{background:var(--hero);border-color:transparent;color:var(--ink)}
.route-card p,.journey-strip p,.route-card .route-mark{color:var(--muted)}
.route-options{gap:16px;margin-top:32px}
.route-options label{background:var(--surface);border:2px solid transparent;border-radius:24px;padding:28px;transition:border-color .15s,background .15s}
.route-options label:hover{background:var(--surface-hover)}
.route-options label:has(input:checked){background:var(--accent-soft);border-color:#ffdd2d}
.route-options strong{font-size:22px;font-weight:700;color:var(--ink)}.route-options small{color:var(--muted)}
.route-options input{accent-color:#bd9700}
input:not([type="radio"]):not([type="checkbox"]),select,textarea,.tool-field input,.flow-date input{background:var(--field);color:var(--ink);border:1px solid var(--line);border-radius:12px}
input[type="checkbox"],input[type="radio"],progress{accent-color:#bd9700}
.check-item input{background:var(--field);border-color:var(--muted)}
.check-item input:checked{background:#ffdd2d;border-color:#ffdd2d}.check-item input:checked+span{color:var(--muted)}
.check-item input:checked:after{color:#292a2e}
.track,.workout-selector,.flow-steps span{background:var(--surface);color:var(--muted)}
.track input:checked+span{background:var(--surface-raised);color:var(--ink)}
.week-dot{color:var(--muted);border-color:var(--line)}
.week-dot.current,.flow-steps .current,.flow-steps .done{background:#ffdd2d;color:#292a2e;border-color:#ffdd2d}
.week-card.selected{border-color:#ffdd2d}.week-card:hover{box-shadow:var(--shadow)}
.pill,.checklist li+li,.checkpoint,.flow-details,.reader-copy td,.reader-copy th,.lesson-body td,.lesson-body th,.chart-grid,.diary-table td,.diary-table th{border-color:var(--line)}
.phase-note,.notice,.personal-line,.result-tag,.food-result,.lesson-body .note,.source-note,.action-timing,.action-example,.action-done,.photo-howto,.diary-reminders,.learning-adaptation{background:var(--soft);color:var(--ink);border-color:var(--line)}
.action-example,.diary-reminders{border-left-color:#ffdd2d}
.next-action,.movement-step{border-top-color:#ffdd2d}
.action-instructions li::marker{color:var(--muted)}
.action-visual figcaption,.pose-return,.pose-equipment-note,.privacy-note,.result .review,.lesson-body p,.reader-copy,.helper-side p{color:var(--muted)}
.reader-article,.reader-navigation{border-color:var(--line)}
.reader-toc a{color:var(--link)}.reader-toc a.active{background:var(--accent-soft);color:var(--ink)}
.pose,.exercise-card{background:var(--surface);border-color:var(--line)}
.pose figcaption{background:var(--surface);border-color:var(--line);color:var(--ink)}
.pose-number{background:#ffdd2d;color:#292a2e}
.photo-slot,.badge{background:var(--surface);border-color:var(--line);color:var(--ink)}
.photo-pick,.photo-placeholder,.chart-empty{background:var(--soft);color:var(--muted);border-color:var(--muted)}
.photo-timeline button,.daily-actions .check-item,.diary-table thead,.diary-anchor-nav button,.start-milestones>span{background:var(--surface);color:var(--ink);border-color:var(--line)}
.photo-timeline button.selected,.badge.earned{background:var(--accent-soft);color:var(--ink);border-color:#bd9700}
.diary-anchor-nav button:hover{background:var(--surface-hover)}
.completion-ring{background:conic-gradient(#ffdd2d var(--completion),var(--line) 0)}.completion-ring>div{background:var(--hero)}
.journey-strip progress{accent-color:#bd9700}
.comparison-pair{background:var(--surface)}.comparison-pair img,.comparison-empty{background:var(--soft);color:var(--muted)}
.comparison-pair figcaption{color:var(--ink)}.comparison-pair figcaption span{color:var(--muted)}
.metric-chart svg text{fill:var(--muted)}
.diary-feedback,.flow-feedback{color:var(--warning)}
.helper-side .big{color:var(--line)}
dialog{background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:24px}
.dialog-close{background:var(--surface);color:var(--ink)}
#toast{background:var(--ink);color:var(--paper)}
footer{color:var(--muted);border-color:var(--line)}
.print-preview>span{border-color:var(--ink);border-top-color:#ffdd2d}
/* Account and authentication pages share the same theme and controls. */
.auth-page .shell{max-width:1080px;padding-top:32px}
.auth-topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:64px}
.auth-page .brand{margin:0;color:var(--ink);font-size:23px;letter-spacing:-.5px;font-weight:700;text-decoration:none}
.auth-page .brand span{color:var(--muted);font-size:14px;font-weight:400}
.auth-page .card{margin-inline:auto;max-width:560px;padding:40px}.auth-page .card.wide{max-width:none}
.auth-page h1{font-size:36px}.auth-page h2{font-size:23px}
.auth-page button:not([data-theme-choice]){background:#ffdd2d;color:#292a2e;font-weight:500;border-radius:12px}
.auth-page button.secondary{background:var(--surface-raised);color:var(--link)}
.auth-page .hint{color:var(--muted)}.auth-page .feedback{color:var(--warning)}
.auth-page th,.auth-page td{border-color:var(--line)}
.auth-page #invitation{background:var(--accent-soft)}
@media(min-width:881px){.sidebar{width:250px}.workspace{margin-left:250px}.simple-flow .lead{max-width:700px}}
@media(max-width:1100px) and (min-width:881px){.workspace>header{padding-inline:28px}.header-actions{gap:12px}.prototype-label{display:none}.account-link{margin-left:0}}
@media(max-width:880px){
 .sidebar{border-bottom:1px solid var(--line);border-right:0;background:var(--paper)}
 .sidebar .brand{font-size:18px!important;margin:0}
 .sidebar.menu-ready .mobile-menu-toggle{color:var(--ink);border-color:var(--line);background:var(--surface)}
 .sidebar.menu-ready.menu-open nav{background:var(--paper);border-color:var(--line)}
 .mobile-menu-toggle[aria-expanded="true"]{color:#292a2e!important}
 .workspace>header{align-items:flex-start;padding:14px;gap:12px}
 .header-actions{gap:12px}.workspace>header .route-status{font-size:12px;flex-wrap:wrap}
 .theme-switch button{min-height:36px;padding:7px 9px}.theme-switch button span{display:none}
 main{padding-top:28px}.simple-flow{margin-top:12px}
 .simple-flow h1{font-size:clamp(30px,7.7vw,40px)}
 .route-options label{padding:22px 18px;border-radius:20px}.route-options strong{font-size:20px}
 .card{padding:24px;border-radius:20px}
 .auth-topbar{margin-bottom:36px;gap:14px}.auth-page .brand{font-size:19px}
 .auth-page .shell{padding:24px 16px 48px}.auth-page .card{padding:26px 22px}
 .auth-page h1{font-size:30px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.training-guide,.reader-toc{background:var(--surface);color:var(--ink);border-color:var(--line)}
.exercise-details summary,.workout-level-note{background:var(--soft);color:var(--ink)}
.exercise-number{color:var(--muted)}.reader-copy a{color:var(--link)}
.exercise-ref{background:var(--accent-soft);color:var(--ink)}
.workout-options input:checked+span{background:#ffdd2d;color:#292a2e;border-color:#ffdd2d}
.workout-options input:focus-visible+span,.track input:focus-visible+span{outline:3px solid var(--focus)}
a.primary:hover{background:#ffcd33;color:#292a2e}
.exercise-card{padding:0}.exercise-videos a{background:var(--surface-raised);color:var(--link)}
/* Week 1: one new dinner skill, with optional recipe details. */
.dinner-library{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}
.dinner-library>summary{cursor:pointer;font-size:18px;font-weight:700;line-height:1.5;min-height:44px}
.dinner-library[open]>summary{margin-bottom:18px}
.dinner-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}
.dinner-recipe{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--surface-raised)}
.dinner-recipe>img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.dinner-recipe-copy{padding:18px}.dinner-recipe h3{font-size:18px;line-height:1.4}
.recipe-meta{color:var(--link)!important;font-size:13px}.recipe-note{font-size:13px;line-height:1.65;color:var(--muted)}
.dinner-recipe details>summary{color:var(--link);cursor:pointer;padding:8px 0;min-height:44px}
.dinner-recipe ul,.dinner-recipe ol{padding-left:20px;font-size:14px}.dinner-recipe li{margin-bottom:12px;overflow-wrap:anywhere}
@media(max-width:1100px){.dinner-grid{grid-template-columns:minmax(0,1fr)}.dinner-recipe>img{max-height:360px;aspect-ratio:3/2}.dinner-recipe-copy{padding:20px}}
/* Week 2: one calculator shared by the lesson and the menu. */
.week-two-tools{margin-top:24px}.week-two-resource,.meal-day{padding:18px 0;border-top:1px solid var(--line)}
.week-two-resource>summary,.meal-day>summary{cursor:pointer;font-weight:600;line-height:1.5;min-height:44px;padding-block:8px;overflow-wrap:anywhere}
.week-two-resource[open]>summary,.meal-day[open]>summary{margin-bottom:16px}
.nutrition-widget,.fatsecret-guide{margin:20px 0;min-width:0;max-width:100%}
.nutrition-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}
.nutrition-fields label,.nutrition-widget form>label{display:grid;gap:8px;font-size:14px;font-weight:600;min-width:0}
.nutrition-widget form>label{margin:18px 0}
.nutrition-fields .nutrition-wide{grid-column:1/-1}
.nutrition-widget input,.nutrition-widget select,.nutrition-widget textarea{width:100%;min-width:0;max-width:100%;padding:12px;min-height:48px;font:inherit;line-height:1.5}
.nutrition-widget textarea{resize:vertical}
.nutrition-feedback{font-size:14px;color:var(--warning)!important;white-space:pre-wrap;margin-top:14px}
.nutrition-feedback:empty{display:none}
.nutrition-result{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.nutrition-numbers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 24px}
.nutrition-numbers>div{background:var(--accent-soft);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:4px;min-width:0}
.nutrition-numbers strong{font-size:24px;line-height:1.3;color:var(--ink);overflow-wrap:anywhere}
.nutrition-numbers span{font-size:13px;color:var(--muted)}
.nutrition-table{border-collapse:collapse;width:100%;text-align:left;font-size:14px;line-height:1.6}
.nutrition-table td,.nutrition-table th{border-bottom:1px solid var(--line);padding:13px 10px;vertical-align:top}
.nutrition-table th{font-weight:600}.nutrition-table thead{background:var(--soft)}
.nutrition-table ul{padding-left:18px;margin:0}.nutrition-table li{margin:0 0 8px}
.nutrition-table td:first-child{min-width:110px}.nutrition-table td:nth-child(2){min-width:200px}
.nutrition-meals{margin-top:30px}.fatsecret-guide li{margin-bottom:18px;line-height:1.7}
[data-nutrition-results][hidden]{display:none!important}
@media(min-width:881px){.sidebar{overflow-y:auto}.sidebar .method{margin-top:28px}}
@media(max-width:650px){.nutrition-fields{grid-template-columns:minmax(0,1fr);gap:16px}.nutrition-fields .nutrition-wide{grid-column:auto}.nutrition-numbers{grid-template-columns:repeat(2,minmax(0,1fr))}.nutrition-widget{padding:18px}.nutrition-numbers strong{font-size:22px}.nutrition-widget .secondary{white-space:normal;text-align:center}.nutrition-table{font-size:13px}.nutrition-table td,.nutrition-table th{padding:10px 8px}}
.nutrition-goal{margin:0;padding:0;border:0;min-width:0}
.nutrition-goal legend{font-size:14px;font-weight:600;margin-bottom:8px}
.nutrition-goal label{display:flex;align-items:flex-start;gap:12px;padding:16px;margin:0 0 10px;background:var(--field);border:1px solid var(--line);border-radius:12px;cursor:pointer;line-height:1.6;font-weight:400}
.nutrition-goal label:has(input:checked){border-color:var(--acid);background:var(--accent-soft)}
.nutrition-goal input[type="radio"]{flex:0 0 20px;width:20px;height:20px;min-height:20px;padding:0;margin:3px 0 0;accent-color:#bd9700}
.nutrition-goal span{min-width:0;overflow-wrap:anywhere}
/* Yellow is reserved for the main action; supporting controls use a quiet outline. */
:root,[data-theme="light"]{--button-secondary:#fff8d9;--button-secondary-ink:#35321f;--button-border:#d5bd51}
[data-theme="dark"]{--button-secondary:#302c1f;--button-secondary-ink:#ffe992;--button-border:#746537}
body button,body a.primary{background:#ffdd2d!important;color:#111!important;border-color:#ffdd2d!important}
body button.secondary,body a.secondary,body .photo-pick,body .exercise-videos a{background:var(--button-secondary)!important;color:var(--button-secondary-ink)!important;border:1px solid var(--button-border)!important}
body button.text-btn,body a.text-btn,body button.back,body a.back{background:transparent!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:12px;padding:10px 14px}
body button.nav{background:transparent!important;color:var(--ink)!important;border:1px solid transparent!important;margin-bottom:6px}
body button.nav.active{background:#ffdd2d!important;color:#111!important}
body .theme-switch button[aria-pressed="false"]{background:var(--surface-raised)!important;color:var(--ink)!important;border:1px solid var(--line)!important}
body button :is(span,small,strong),body a:is(.primary,.secondary,.text-btn,.back) :is(span,small,strong){color:inherit!important}
body button:not(:disabled):hover,body a.primary:hover{background:#ffcd33!important;color:#111!important}
body button.secondary:not(:disabled):hover,body a.secondary:hover,body button.text-btn:hover,body button.nav:not(.active):hover{background:var(--accent-soft)!important;color:var(--ink)!important;border-color:var(--button-border)!important}
body button:disabled{opacity:.6;cursor:wait}
body .theme-switch button[aria-pressed="true"],body .photo-timeline button.selected{box-shadow:inset 0 0 0 2px #111}
body .theme-switch{gap:6px}
.nutrition-widget>.primary,.nutrition-widget>form>.primary{margin:18px 12px 12px 0}
.nutrition-widget>.secondary{margin:12px 12px 12px 0}
.meal-photo{margin:20px 0;max-width:430px}
.meal-photo img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:18px}
.meal-photo figcaption{font-size:13px;color:var(--muted);margin-top:8px}
.meal-ingredients{padding-left:22px;line-height:1.8}
.meal-day-picker{display:grid;gap:8px;margin:24px 0;font-weight:600}
.nutrition-widget [type="radio"]{width:20px;min-height:20px;height:20px}
@media(max-width:650px){.nutrition-widget .primary,.nutrition-widget .secondary{max-width:100%;white-space:normal;line-height:1.5}.meal-photo{max-width:100%}}
body summary{background:var(--surface-raised);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:12px 16px;cursor:pointer}
body summary:hover{background:var(--accent-soft);border-color:var(--button-border)}

.food-exclusions{border:1px solid var(--line);border-radius:14px;padding:12px;margin-top:12px}
.food-exclusions fieldset{border:0;margin:0 0 14px;padding:0;min-width:0}.food-exclusions legend{font-size:13px;font-weight:700;padding:0;margin-bottom:8px}
.food-exclusions fieldset>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.food-exclusions label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:400;line-height:1.4;border:1px solid var(--line);border-radius:9px;padding:9px;cursor:pointer;min-height:40px}
.food-exclusions label:has(input:checked){background:var(--accent-soft);border-color:var(--button-border)}
.food-exclusions input[type="checkbox"]{appearance:auto!important;position:static!important;width:17px!important;height:17px!important;min-height:17px!important;flex:0 0 17px;margin:0;padding:0;accent-color:#bd9700}
.food-exclusions [hidden]{display:none!important}.nutrition-widget input[type="search"]{font-size:16px}.nutrition-widget [data-nutrition-form="exclusions"]>.primary{display:block}
.action-single{line-height:1.7}.next-action>.primary{margin:20px 12px 12px 0}.next-action>.secondary{margin-top:12px}
@media(max-width:650px){.food-exclusions fieldset>div{grid-template-columns:repeat(2,minmax(0,1fr))}.food-exclusions{padding:9px}.food-exclusions label{font-size:13px;padding:8px}}

.food-exclusion-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.food-exclusion-tools p{margin:0}.food-exclusion-tools .secondary{font-size:13px;min-height:38px;padding:8px 12px}.nutrition-widget [data-nutrition-form="exclusions"]>.primary{margin-top:14px}
body button:is(.mobile-menu-toggle,.dialog-close,.exercise-ref),body .photo-timeline button:not(.selected),body .diary-anchor-nav button,body button.week-dot:not(.current){background:var(--button-secondary)!important;color:var(--button-secondary-ink)!important;border-color:var(--button-border)!important}
body button.mobile-menu-toggle[aria-expanded="true"]{background:#ffdd2d!important;color:#111!important;border-color:#ffdd2d!important}

/* Keep the return action below the main next-step button on every screen. */
.nutrition-widget .step-back,.next-action .step-back,.simple-flow>.step-back{display:block!important;width:fit-content;clear:both;margin:24px 0 0!important;max-width:100%}
.flow-navigation{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:24px}
.nutrition-download-box{margin:22px 0;padding:0;border:0;border-radius:0;background:transparent}
.nutrition-download-box .recipe-note{margin:10px 0 0}.nutrition-download{display:block!important;white-space:normal;line-height:1.5;text-align:center;font-weight:700}

.nutrition-download-box .nutrition-download{width:auto}
.meal-plan-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}
.meal-plan-actions>button{flex:0 1 auto;max-width:100%;margin:0}
.nutrition-widget .breakfast-preferences{margin:24px 0 20px}
@media(max-width:600px){.meal-plan-actions{flex-direction:column;align-items:stretch}.meal-plan-actions>button,.nutrition-download-box .meal-plan-actions .nutrition-download{width:100%}}
/* Account footer: a quiet profile row and a disclosure menu, like a personal cabinet. */
.sidebar-account{position:relative;flex:0 0 auto;margin-top:auto;padding-top:22px;min-width:0}
.sidebar-account [hidden],.account-profile-settings [hidden]{display:none!important}
body .sidebar-account .sidebar-account-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:64px;padding:10px;border:1px solid var(--line)!important;border-radius:14px;background:var(--surface)!important;color:var(--ink)!important;text-align:left;cursor:pointer}
body .sidebar-account .sidebar-account-toggle:hover,body .sidebar-account .sidebar-account-toggle[aria-expanded="true"]{background:var(--surface-hover)!important;color:var(--ink)!important;border-color:var(--button-border)!important}
.account-avatar{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;overflow:hidden;border-radius:50%;background:var(--accent-soft);color:var(--ink);font-size:17px;font-weight:700;line-height:1;box-shadow:inset 0 0 0 1px var(--line)}
.account-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.account-row-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.account-row-copy strong{display:block;font-size:14px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .sidebar-account-toggle .account-row-copy small{font-size:11px;line-height:1.4;color:var(--muted)!important}
.account-more{font-size:20px;flex:0 0 auto}
.sidebar-account-popover{position:absolute;left:0;right:0;bottom:calc(100% - 12px);z-index:35;display:flex;flex-direction:column;padding:10px;background:var(--surface-raised);border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 30px #0002;max-height:65vh;overflow-y:auto}
.sidebar-account-popover .account-menu-name{font-size:14px;font-weight:700;margin:5px 8px 3px;overflow-wrap:anywhere}
.sidebar-account-popover .account-menu-email{font-size:11px;color:var(--muted);margin:0 8px 10px;overflow-wrap:anywhere;line-height:1.5}
.sidebar-account-popover a,body .sidebar-account-popover button{display:flex;align-items:center;min-height:42px;padding:9px 8px;text-align:left;text-decoration:none;font-size:13px;font-weight:400;line-height:1.4;border-radius:9px;border:0!important;background:transparent!important;color:var(--ink)!important}
.sidebar-account-popover a:hover,body .sidebar-account-popover button:hover{background:var(--accent-soft)!important;color:var(--ink)!important}
.account-menu-status{font-size:12px;color:var(--warning);line-height:1.5;margin:6px 8px}.account-menu-status:empty{display:none}
.account-profile-settings{margin-top:28px;padding-top:6px;border-top:1px solid var(--line)}
.account-photo-editor{display:flex;align-items:center;gap:18px;margin:20px 0;scroll-margin-top:24px}.account-photo-editor>div{display:grid;gap:8px}
.account-avatar-large{width:88px;height:88px;flex-basis:88px;font-size:32px}
.account-photo-editor button{font-size:14px;padding:10px 14px;line-height:1.4}
.auth-page #profile-name{scroll-margin-top:24px}
@media(min-width:881px){.sidebar{display:flex;flex-direction:column;padding-bottom:20px}.sidebar #course-menu{display:flex;flex-direction:column;flex:1;min-height:max-content}.sidebar .brand,.sidebar-caption{flex:0 0 auto}}
@media(max-width:880px){.sidebar-account{grid-column:1/-1;margin-top:8px;padding-top:12px;border-top:1px solid var(--line)}.sidebar-account-popover{left:0;right:0;bottom:calc(100% - 4px)}.account-row-copy strong{font-size:15px}body .sidebar-account-toggle .account-row-copy small{font-size:12px}}
@media(max-width:400px){.account-photo-editor{gap:12px}.account-avatar-large{width:76px;height:76px;flex-basis:76px}.account-photo-editor button{font-size:13px}}
.sidebar-account-popover a,body .sidebar-account-popover button{justify-content:flex-start;overscroll-behavior:contain}
.sidebar-account-popover{overscroll-behavior:contain}

/* Whole-day meals and the complete FatSecret guide stay on one page. */
.day-summary{border-left:5px solid #ffdd2d;padding:12px 18px;margin:24px 0;background:var(--surface-alt,var(--bg));border-radius:12px}
.day-summary h3,.day-summary p{margin:6px 0}
.day-meals{display:grid;gap:28px;margin:24px 0}
.day-meal{border:1px solid var(--border,#ddd);border-radius:20px;padding:24px;min-width:0}
.day-meal>header{display:flex;align-items:center;gap:16px;margin-bottom:20px}
.day-meal header h3,.day-meal header p{margin:4px 0}
.meal-number{display:grid;place-items:center;background:#ffdd2d;color:#151515;border-radius:12px;flex:0 0 42px;height:42px;font-weight:700}
.meal-pictures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:600px}
.meal-pictures figure{margin:0;min-width:0}.meal-pictures img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:12px}.meal-pictures figcaption{font-size:13px;line-height:1.4;margin-top:4px;color:var(--muted)}
.meal-pictures-single{grid-template-columns:minmax(0,1fr);max-width:560px}
.recipe-steps{padding-left:24px}.recipe-steps li{padding-left:6px;margin:16px 0;line-height:1.65}
.fatsecret-steps{list-style:none;counter-reset:fat;padding:0;display:grid;gap:16px;margin:24px 0}.fatsecret-steps li{counter-increment:fat;border:1px solid var(--border,#ddd);border-radius:16px;padding:20px}.fatsecret-steps h3{margin-top:0}.fatsecret-steps h3:before{content:counter(fat) '. ';color:var(--text)}
.account-exit-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.account-exit-actions a{display:inline-flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;padding:14px 20px;border-radius:12px;font-weight:600;min-height:48px}
@media(max-width:650px){.day-meal{padding:16px}.meal-pictures{grid-template-columns:repeat(2,minmax(0,1fr))}.meal-pictures-single{grid-template-columns:minmax(0,1fr);max-width:560px}.day-meal>header{gap:10px}.account-exit-actions{align-items:stretch}.account-exit-actions>*{flex:1 1 150px}}
@media(max-width:650px){.account-exit-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.account-exit-actions>*{width:100%;min-width:0;font-size:14px;padding:12px 8px;line-height:1.4;white-space:normal}}

.auth-page .account-brand{display:flex;align-items:center;gap:12px;min-width:0}.auth-page .account-brand>img{width:54px;height:54px;flex:none;object-fit:contain;background:none;border-radius:50%;padding:0}.auth-page .account-brand .account-brand-copy{display:grid;gap:6px;min-width:0}.auth-page .account-brand strong{font-size:20px;color:var(--ink);line-height:1.2}.auth-page .account-brand-copy>span{display:block;font-size:14px;color:var(--muted)}
.week-three-tool{margin:24px 0;padding:22px;border:1px solid var(--border,#ddd);border-radius:18px}.week-three-tool label{display:grid;gap:8px}.week-three-tool input,.week-three-tool select{width:100%;max-width:100%;min-width:0;padding:12px;font:inherit;min-height:48px}.week-three-tool form>.secondary{margin-top:18px}.sleep-schedule{margin-top:24px}
@media(max-width:650px){.auth-page .account-brand>img{width:42px;height:42px}.auth-page .account-brand strong{font-size:16px}.auth-page .account-brand-copy>span{font-size:12px}.auth-page .account-brand{gap:8px}.week-three-tool{padding:16px}}
#daily-metrics .nutrition-table,.sleep-schedule .nutrition-table{table-layout:fixed;min-width:0}#daily-metrics .nutrition-table td,.sleep-schedule .nutrition-table td{min-width:0;overflow-wrap:anywhere}#daily-metrics .nutrition-table th:nth-child(1){width:34%}#daily-metrics .nutrition-table th:nth-child(2){width:44%}#daily-metrics .nutrition-table th:nth-child(3){width:22%}
#daily-metrics input{font:inherit;min-height:48px;padding:12px;min-width:0;max-width:100%}#daily-metrics{scroll-margin-top:20px}

/* Meal headings must not inherit the workspace toolbar layout. */
.day-meal>header{display:flex;justify-content:flex-start;align-items:center;flex-direction:row;gap:16px;height:auto;min-height:0;padding:0;margin:0 0 20px;border:0;background:transparent}.day-meal>header>div{flex:1;min-width:0;text-align:left}
.calendar-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap}.calendar-toolbar label{display:grid;gap:8px;min-width:0;max-width:100%}.calendar-toolbar select{max-width:100%;font:inherit;padding:12px;min-height:48px}.calendar-week-nav{display:flex;justify-content:space-between;gap:12px;margin:20px 0}.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:20px 0 28px}.calendar-day{display:flex;flex-direction:column;gap:7px;align-items:flex-start;padding:12px 10px;min-height:105px;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none;min-width:0}.calendar-day strong{font-size:22px}.calendar-day span,.calendar-day small{font-size:12px;line-height:1.35}.calendar-day.is-today{border:2px solid #c5a900}.calendar-day.is-selected{background:#ffdd2d;color:#181818;border-color:#ffdd2d}.calendar-tasks{list-style:none;padding:0;display:grid;gap:12px}.calendar-tasks li{display:flex;align-items:start;flex-wrap:wrap;gap:8px 14px;padding:14px;border:1px solid var(--line);border-radius:12px}.calendar-tasks a{flex:1;min-width:160px}.task-state{font-size:12px;font-weight:600;background:var(--soft);padding:5px 8px;border-radius:6px}.task-complete .task-state{background:#fff1a2;color:#171717}.calendar-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}.calendar-fields label,.calendar-schedule form>label{display:grid;gap:8px;font-weight:600;min-width:0}.calendar-fields input,.calendar-schedule input[type=date]{font:inherit;width:100%;max-width:100%;min-width:0;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:10px}.calendar-report fieldset{border:0;padding:0;min-width:0}.calendar-report legend{font-size:18px;font-weight:600}.calendar-report .primary{margin-top:20px}.calendar-report .training-confirm{margin:20px 0}.calendar-summary-table{table-layout:fixed;min-width:0}.calendar-summary-table td,.calendar-summary-table th{min-width:0!important;overflow-wrap:anywhere}.calendar-summary-table th{width:34%}.calendar-summary li{margin:12px 0;line-height:1.6}.calendar-sleep-help{border-left:4px solid #ffdd2d;padding:8px 0 8px 18px;margin:24px 0}.calendar-sleep-help li{margin:12px 0;line-height:1.65}.calendar-schedule{margin:24px 0}.calendar-schedule summary,.calendar-overdue summary{cursor:pointer;font-weight:600;font-size:18px}.calendar-schedule form>label{max-width:300px;margin:20px 0}.training-days{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.calendar-missing-days{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}.calendar-missing-days a{padding:8px;border:1px solid var(--line);border-radius:8px}.weekly-checkin h2{margin-top:8px}.step-back[href]{display:block;width:fit-content;margin-top:24px}
@media(max-width:650px){.calendar-days{gap:4px}.calendar-day{padding:8px 4px;min-height:90px;align-items:center}.calendar-day small{font-size:10px;text-align:center;overflow-wrap:anywhere}.calendar-day strong{font-size:18px}.calendar-day span{font-size:11px}.calendar-fields{grid-template-columns:minmax(0,1fr)}.training-days{grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-toolbar{align-items:stretch}.calendar-toolbar label{width:100%}.calendar-sleep-help{padding-left:12px}.calendar-tasks li{padding:10px}.calendar-tasks a{min-width:140px}.day-meal>header{justify-content:flex-start;padding:0}}

.calendar-legend{display:none}@media(max-width:650px){.calendar-day small{font-size:0;line-height:1.2}.calendar-day small:after{content:attr(data-compact);font-size:11px;line-height:1.3}.calendar-day{min-height:84px}.calendar-legend{display:block;font-size:12px;color:var(--muted);margin:12px 0}}
.fiber-product-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}.fiber-product-grid figure{margin:0;padding:20px;background:var(--surface,#f6f7f8);border:1px solid var(--border,#e5e7eb);border-radius:18px}.fiber-product-grid img{width:100%;height:240px;object-fit:contain;background:#fff;border-radius:12px}.fiber-product-grid figcaption{font-weight:700;margin:12px 0}.fiber-product-grid a{font-size:14px}@media(max-width:600px){.fiber-product-grid{grid-template-columns:1fr}.fiber-product-grid img{height:220px}}

.kitchen-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0;border:0;padding:0;margin:20px 0}.kitchen-choices legend{grid-column:1/-1;margin-bottom:12px}.kitchen-choices .check-item{display:flex;align-items:center;gap:12px;min-width:0;min-height:56px;margin:0;padding:14px;border:1px solid var(--line);border-radius:12px}.kitchen-choices input[type="checkbox"]{appearance:auto;position:static;flex:0 0 20px;width:20px;height:20px;min-height:20px;max-width:20px;margin:0;padding:0;accent-color:#bd9700}.kitchen-choices input[type="checkbox"]:after{content:none}.kitchen-choices .check-item span{min-width:0;overflow-wrap:anywhere;color:var(--ink)}.kitchen-choices .check-item:has(input:checked){border-color:#bd9700;background:var(--soft)}@media(max-width:550px){.kitchen-choices{grid-template-columns:1fr}}

.meal-pictures-single img{aspect-ratio:auto;object-fit:contain}

.photo-gap-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;margin-left:5px;padding:2px 8px;background:#ffdd2d;color:#111;border-radius:999px;font-size:14px}

html[data-theme="dark"] body .sidebar .report-count{color:#000!important}

html[data-theme="dark"] .metric-data-line{stroke:#ffdf26}html[data-theme="dark"] .metric-data-point{fill:#ffdf26}
.month-photo-angle{border:2px solid #ffdf26;border-radius:16px;padding:20px;margin:24px 0}.month-photo-angle>h4{margin-top:0}

.meal-budget-choices strong,.meal-budget-choices small{display:block}
.meal-budget-choices small{margin-top:4px;font-size:13px;line-height:1.6;color:var(--muted)}

/* Keep the current week visible beside the route on every viewport. */
.workspace>header .prototype-label{display:inline}
@media(max-width:880px){.workspace>header{align-items:center;gap:8px;flex-wrap:nowrap}.workspace>header .prototype{display:flex;font-size:10px;letter-spacing:.3px;flex-shrink:0}.workspace>header .header-actions{flex:1;gap:8px}.workspace>header .route-status{gap:5px}.workspace>header .prototype:before{display:none}.workspace>header .theme-switch button{padding:7px;min-width:32px}}

/* Compact course chrome and readable calendar dates in both themes. */
.workspace>header{min-height:60px;padding-block:6px}
.calendar-day strong{font-size:30px;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
.calendar-day span{font-size:18px;font-weight:600}
.calendar-legend{display:none!important}
@media(max-width:880px){
 .sidebar{padding-block:7px}
 .sidebar .brand{align-items:center;font-size:16px!important}
 .sidebar .brand-moon{width:32px;height:32px;flex-basis:32px}
 .sidebar .brand .brand-plan{margin-top:2px!important;font-size:10px!important}
 .sidebar.menu-ready .mobile-menu-toggle{min-height:44px;padding-block:7px}
 .workspace>header{min-height:52px;padding-block:3px}
 .workspace>header .header-actions{flex-wrap:nowrap}
 .workspace>header .theme-switch{padding:2px;gap:3px}
 .workspace>header .theme-switch button{min-height:38px;padding:6px}
}
@media(max-width:650px){
 .calendar-days{grid-template-columns:repeat(7,minmax(56px,1fr));overflow-x:auto;padding-bottom:4px}
 .calendar-day{padding:10px 2px;gap:8px;min-height:84px}
 .calendar-day strong{font-size:22px;letter-spacing:-.5px}
 .calendar-day span{font-size:16px}
}

.final-photo-card{max-width:540px;margin-block:20px}
.final-photo-card select{display:block;min-height:44px;padding:8px 12px;color:var(--ink);background:var(--field);border:1px solid var(--line);border-radius:10px;font:inherit}
.final-photo-card canvas{display:block;width:100%;height:auto;border-radius:12px}
.final-photo-actions[hidden]{display:none}

/* Unified course summary: route itself opens the route chooser. */
.workspace>header{gap:20px;height:auto;min-height:104px;padding-block:20px}
.course-summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 5px;font-size:14px;line-height:1.6;min-width:0}
.workspace>header .course-summary .route-status{display:inline-flex;gap:0;font-size:inherit}
.course-summary .route-status a{text-decoration:underline;text-underline-offset:3px}
.course-summary .prototype-label{display:inline!important;white-space:nowrap;font-size:inherit;letter-spacing:normal;color:var(--muted)}
.workspace>header .header-actions{flex:0 0 auto;margin-left:auto}
@media(max-width:880px){.workspace>header{min-height:80px;gap:12px;align-items:center}.course-summary{font-size:12px}.workspace>header .route-status{font-size:inherit}.workspace>header .header-actions{flex:0 0 auto}}
