/* The remaining wizard screens share controls, while keeping distinct layouts. */
.helpmeal-app main:has(.wizard-step) > .hero { display: none; }
main:has(.wizard-step) .app-card { overflow: visible; border: 0; background: transparent; box-shadow: none; }
main:has(.wizard-step) .app-head { display: flex; align-items: center; gap: 16px; padding: 0 0 22px; border: 0; }
main:has(.wizard-step) .app-head > div { min-width: 0; }
main:has(.wizard-step) .app-head h2 { margin: 0; color: var(--ink-soft); font-size: 1rem; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
main:has(.wizard-step) .app-head p { display: none; }
main:has(.wizard-step) .app-head-side { margin: 0; }
main:has(.wizard-step) .account-menu { min-width: 0; max-width: 100%; }
main:has(.wizard-step) .account-trigger { width: 100%; }
main:has(.wizard-step) .step-count { max-width: 100%; color: var(--ink-soft); font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
main:has(.wizard-step) .app-body { padding: 0; }
.wizard-step *, .ws-progress * { min-width: 0; }
.ws-progress { margin-bottom: 32px; }
.ws-progress .wizard-progress { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; margin: 0; padding: 0; background: transparent; border: 0; }
.ws-progress .wizard-progress:has(.step-dot:nth-child(5):last-child) { grid-template-columns: repeat(5,minmax(0,1fr)); }
.ws-progress .step-dot { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; padding: 0; border: 0; color: var(--ink-soft); font-size: .875rem; font-weight: 500; background: transparent; border-radius: 0; }
.ws-progress .step-dot::after { position: absolute; content: ''; top: 17px; left: 46px; right: 0; height: 1px; background: var(--control-border); }
.ws-progress .step-dot:last-child::after { display: none; }
.ws-progress .step-dot .step-number { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--control-border); border-radius: 50%; background: var(--cream); color: var(--ink-soft); font-size: .875rem; }
.ws-progress .step-dot .step-label { display: block; white-space: normal; overflow-wrap: anywhere; }
.ws-progress .step-dot.is-active { color: var(--green-dark); font-weight: 600; }
.ws-progress .step-dot.is-active .step-number { border-color: var(--green); background: var(--green); color: white; box-shadow: 0 0 0 5px var(--mint); }
.ws-progress .step-dot.is-done .step-number { background: var(--mint); color: var(--green-dark); border-color: var(--green); }
.ws-progress-track { display: none; }
.wizard-step .ws-intro { margin: 0 0 30px; }
.wizard-step .ws-intro .eyebrow { margin: 0 0 14px; font-size: .875rem; font-weight: 500; line-height: 1.5; letter-spacing: .02em; text-transform: none; color: var(--green-dark); }
.wizard-step .ws-intro h3 { max-width: 24ch; margin: 0 0 16px; color: var(--ink); font-size: clamp(2rem,3.5vw,2.875rem); line-height: 1.12; letter-spacing: -.04em; font-weight: 600; }
.wizard-step .ws-intro > p:last-child { max-width: 68ch; margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.wizard-step h4, .wizard-step legend { color: var(--ink); font-size: 1.125rem; line-height: 1.4; letter-spacing: -.015em; font-weight: 600; }
.wizard-step h4 { margin: 0 0 12px; }
.wizard-step p { font-size: 1rem; line-height: 1.6; }
.wizard-step .field > label, .wizard-step .macro-field > label { display: block; margin: 0 0 10px; font-size: 1rem; line-height: 1.5; font-weight: 600; }
.wizard-step .field small, .wizard-step small, .wizard-step .sport-day-help, .wizard-step .sport-day-status { font-size: .875rem; line-height: 1.6; }
.wizard-step .field { margin-bottom: 20px; }
.wizard-step .field:last-child { margin-bottom: 0; }
.wizard-step .form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap: 20px; align-items: start; }
.wizard-step .form-grid .field { margin: 0; }
.wizard-step fieldset { min-width: 0; }
.wizard-step .field-error { display: block; margin: 10px 0 0; color: var(--coral); }
.wizard-step .note { margin: 16px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--success-surface); border-color: var(--line); color: var(--ink); font-size: .875rem; line-height: 1.6; }
.ws-goal-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,.85fr); align-items: start; gap: 28px; }
.ws-main { display: grid; gap: 24px; }
.ws-section { margin: 0; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.ws-objective { border-top: 4px solid var(--green); }
.ws-objective > .note:first-child { margin: 0; }
.wizard-step .ws-sport { padding: 26px; margin: 0; }
.wizard-step .ws-sport > p { margin: 0 0 20px; color: var(--ink-soft); }
.wizard-step .ws-sport > .field { margin-top: 20px; }
.wizard-step .ws-sport .form-grid { margin-top: 20px; }
.ws-number { display: flex; align-items: stretch; min-height: 54px; border: 1px solid var(--control-border); border-radius: 10px; background: white; }
.wizard-step .field .ws-number input[type="number"], .wizard-step .macro-field .ws-number input[type="number"] { flex: 1 1 0; width: 100%; min-width: 0; min-height: 52px; padding: 10px 10px 10px 12px; border: 0; border-radius: 10px 0 0 10px; background: transparent; color: var(--ink); font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums; box-shadow: none; }
.ws-unit { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 38px; padding: 8px; border-left: 1px solid var(--line); color: var(--ink-soft); font-size: .875rem; }
.ws-number:has(input:focus-visible), .ws-choice:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 4px; }
.wizard-step .ws-number input:focus-visible, .ws-choice input:focus-visible { outline: none; box-shadow: none; }
.ws-number:has(input[aria-invalid=true]) { border-color: var(--coral); }
.wizard-step .macro-settings { margin: 0; }
.wizard-step .macro-settings > p { margin: 0 0 22px; color: var(--ink-soft); font-size: .875rem; }
.wizard-step .macro-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: 16px; }
.wizard-step .macro-field { padding: 0; border: 0; background: transparent; }
.wizard-step .macro-field .ws-unit { position: static; }
.wizard-step .macro-total { display: block; margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--mint); color: var(--green-dark); font-size: .875rem; line-height: 1.6; }
.wizard-step .macro-total.is-invalid { background: var(--error-surface); color: var(--coral); }
.ws-reference { padding: 28px; border-radius: 22px; background: var(--ink); color: var(--cream); }
.wizard-step .ws-reference .metric-card { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--cream); }
.wizard-step .ws-reference .metric-label { color: var(--mint); font-size: .875rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.wizard-step .ws-reference .metric-number { margin: 16px 0; color: var(--cream); font-size: clamp(2rem,3vw,2.75rem); line-height: 1.15; letter-spacing: -.04em; font-weight: 500; font-variant-numeric: tabular-nums; }
.wizard-step .ws-reference .metric-card > p { margin: 0; color: var(--mint); font-size: 1rem; }
.wizard-step .ws-reference .metric-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; margin-top: 24px; }
.wizard-step .ws-reference .mini-metric { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; padding: 14px 0; border: 0; border-top: 1px solid var(--control-border); border-radius: 0; background: transparent; }
.wizard-step .ws-reference .mini-metric strong { min-width: 5ch; color: var(--cream); font-size: 1.375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.wizard-step .ws-reference .mini-metric span { color: var(--mint); font-size: .875rem; }
.wizard-step .ws-reference .note { background: var(--cream); color: var(--ink); }
.wizard-step .ws-reference .journey-summary { margin: 24px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--control-border); border-radius: 0; background: transparent; }
.wizard-step .ws-reference .journey-summary h4, .wizard-step .ws-reference .journey-summary p, .wizard-step .ws-reference .journey-summary small { color: var(--mint); }
.wizard-step .ws-reference .journey-summary p, .wizard-step .ws-reference .journey-summary small { font-size: .875rem; }
.ws-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; margin: 0; padding: 12px 14px; border: 1px solid var(--control-border); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1.5; cursor: pointer; }
.ws-choice input[type="checkbox"], .ws-choice input[type="radio"] { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.ws-choice > span { display: block; overflow-wrap: anywhere; }
.ws-choice:hover { border-color: var(--green); background: var(--success-surface); }
.ws-choice:active { background: var(--mint); }
.ws-choice:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--mint); }
.ws-choice:has(input[aria-invalid=true]) { border-color: var(--coral); }
.wizard-step fieldset.is-invalid > legend { color: var(--coral); }
.ws-choice:has(input:disabled) { color: var(--ink-soft); cursor: default; background: var(--success-surface); border-color: var(--line); }
.wizard-step .ws-diet, .ws-question, .ws-supplement-list { margin: 0; padding: 0; border: 0; }
.ws-diet legend, .ws-question legend, .ws-supplement-list > legend { width: 100%; margin: 0 0 16px; padding: 0; }
.ws-diet-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.ws-diet-choice { min-height: 112px; padding: 22px; }
.ws-diet-choice strong { display: block; margin-bottom: 8px; font-size: 1.25rem; font-weight: 600; }
.ws-diet-choice > span > span { display: block; color: var(--ink-soft); font-size: .875rem; }
.ws-exclusions { margin-top: 36px; }
.ws-exclusions > h4 { margin-bottom: 22px; }
.ws-food-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 28px; row-gap: 28px; }
.ws-food-group { margin: 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--control-border); }
.wizard-step .ws-food-group legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; font-size: 1rem; }
.ws-food-group .check-grid { display: grid; clear: both; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.ws-dislikes-note { margin-top: 28px; }
.ws-habits { display: grid; gap: 0; }
.wizard-step .ws-habit { margin: 0; padding: 26px 0; border: 0; border-top: 1px solid var(--control-border); border-radius: 0; background: transparent; }
.ws-habit-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.ws-habit-heading label, .ws-main-meal label strong { color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.ws-habit-heading .btn { min-height: 44px; font-size: .875rem; }
.ws-habit-days { margin: 18px 0 0; padding: 0; border: 0; }
.wizard-step .ws-habit-days legend { margin: 0 0 12px; padding: 0; font-size: .875rem; }
.wizard-step .habit-days { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8.5rem),1fr)); gap: 10px; }
.wizard-step .habit-days .ws-choice { font-size: .875rem; }
.wizard-step .main-meal-intro { margin: 26px 0 22px; }
.wizard-step .main-meal-intro p { margin: 0; color: var(--ink-soft); }
.ws-main-meals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.wizard-step .ws-main-meal { margin: 0; padding: 24px; border: 0; border-radius: 18px; background: var(--mint); }
.ws-main-meal label { display: block; margin-bottom: 14px; }
.ws-main-meal label span { display: block; margin-top: 10px; font-size: 1rem; font-weight: 400; }
.ws-main-meal label span small { display: block; color: var(--ink-soft); }
.ws-main-meal > small { display: block; margin-top: 12px; color: var(--ink-soft); }
.ws-free-meal { margin-top: 36px; }
.wizard-step .ws-sub-intro { margin-bottom: 22px; }
.wizard-step .ws-sub-intro h4 { font-size: 1.5rem; }
.ws-sub-intro p { margin: 0; color: var(--ink-soft); }
.ws-free-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 24px; align-items: start; }
.ws-binary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.wizard-step .ws-cheat-details { margin: 24px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); }
.ws-supplement-questions { display: grid; gap: 26px; max-width: 820px; }
.ws-supplement-questions .ws-question { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.ws-supplement-questions .ws-question legend { float: left; margin-bottom: 18px; }
.ws-supplement-questions .ws-question .ws-binary { clear: both; }
.ws-supplement-questions .ws-choice { min-height: 58px; }
.wizard-step .ws-supplement-list { margin-top: 30px; }
.ws-supplement-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.ws-supplement-item > .field { padding: 18px 4px 0; }
.wizard-step .ws-supplement-note { max-width: 820px; margin-top: 26px; }
.ws-review-hero { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 26px; align-items: start; }
.ws-budget { padding: 28px; border-radius: 22px; background: var(--ink); color: var(--cream); }
.wizard-step .ws-budget h4 { color: var(--mint); font-size: 1rem; font-weight: 500; }
.wizard-step .ws-budget-value { margin: 16px 0; font-size: clamp(2.75rem,4vw,3.75rem); line-height: 1.1; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ws-budget-value > span { font-size: 1.125rem; letter-spacing: 0; }
.ws-budget > p:not(.ws-budget-value) { margin: 0 0 26px; color: var(--mint); font-size: 1rem; }
.ws-macro-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr)); gap: 18px; margin: 18px 0 0; }
.ws-macro-summary dt { color: var(--mint); font-size: .875rem; }
.ws-macro-summary dd { margin: 8px 0 0; color: var(--cream); font-size: 1.75rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ws-macro-summary dd span { margin-left: 3px; font-size: .875rem; }
.ws-review-date { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.wizard-step .menu-start-field { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.wizard-step .menu-start-field > label { display: grid; gap: 14px; margin-bottom: 0; font-size: 1.125rem; }
.wizard-step .menu-start-field input[type=date] { min-height: 52px; }
.ws-review-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; margin-top: 32px; }
.ws-summary-section { padding-top: 22px; border-top: 1px solid var(--control-border); }
.ws-summary-list { margin: 0; }
.wizard-step .ws-summary-list .summary-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: 16px; margin: 0; padding: 16px 0; border-color: var(--line); font-size: 1rem; line-height: 1.5; }
.ws-summary-list dt { color: var(--ink-soft); }
.ws-summary-list dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.wizard-step .ws-review-habits, .wizard-step > .journey-summary { margin: 28px 0 0; padding: 24px; border: 0; border-radius: 18px; background: var(--mint); }
.ws-review-habits ul { margin: 18px 0 0; padding-left: 20px; }
.ws-review-habits li + li { margin-top: 18px; }
.wizard-step .form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--control-border); }
.wizard-step .form-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; font-size: 1rem; }
.wizard-step .form-actions .btn-primary { gap: 24px; padding-inline: 24px; }
.wizard-step .planning-options { margin-top: 30px; }
.wizard-step.ws-generation { max-width: 850px; }
.wizard-step.ws-generation h3 { color: var(--ink); font-size: clamp(2rem,3.5vw,2.75rem); line-height: 1.15; letter-spacing: -.035em; font-weight: 600; }
.wizard-step.ws-generation p { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.wizard-step.ws-generation .spinner { border-top-color: var(--green); }
@media(prefers-reduced-motion:reduce) { .wizard-step.ws-generation .spinner { animation: none; } }
.wizard-step .ws-field-label { display: block; margin-bottom: 10px; color: var(--ink); font-size: 1rem; font-weight: 600; }
.wizard-step .ws-reference .mini-metric strong small { color: var(--mint); font-size: .875rem; font-weight: 400; }
@media(max-width:820px) {
 .ws-progress { position: relative; }
 .ws-progress .wizard-progress, .ws-progress .wizard-progress:has(.step-dot:nth-child(5):last-child) { display: block; }
 .ws-progress .step-dot.is-active { flex-direction: row; align-items: center; padding: 0; gap: 12px; font-size: 1rem; }
 .ws-progress .step-dot::after { display: none; }
 .ws-progress .step-dot:not(.is-active) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
 .ws-progress-track { display: flex; gap: 6px; margin-top: 16px; }
 .ws-progress-track span { flex: 1; height: 4px; border-radius: 2px; background: var(--control-border); }
 .ws-progress-track .is-active { background: var(--green); }
 .ws-progress-track .is-done { background: var(--green-dark); }
}
@media(max-width:1000px) {
 .ws-goal-layout { grid-template-columns: minmax(0,1fr); }
 .wizard-step .ws-reference .metric-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: 20px; }
 .ws-main-meals, .ws-free-layout { grid-template-columns: minmax(0,1fr); }
 .ws-diet-choice { padding: 18px; }
 .ws-review-hero { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:700px) {
 .ws-progress .wizard-progress { gap: 10px; }
 .ws-progress .step-dot { font-size: .75rem; }
 .ws-food-groups, .ws-supplement-grid, .ws-review-details { grid-template-columns: minmax(0,1fr); }
 .ws-diet-options { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .ws-diet-choice { min-height: 84px; }
 .ws-diet-choice strong { margin-bottom: 4px; font-size: 1.125rem; }
}
@media(max-width:600px) {
 main:has(.wizard-step) .app-head { flex-direction: row; flex-wrap: nowrap; gap: 12px; padding-bottom: 24px; }
 main:has(.wizard-step) .app-head h2 { max-width: 13ch; font-size: .875rem; }
 main:has(.wizard-step) .account-trigger { max-width: 190px; }
 main:has(.wizard-step) .auth-user-email { max-width: 145px; }
 .ws-progress { position: relative; margin-bottom: 28px; }
 .ws-progress .wizard-progress, .ws-progress .wizard-progress:has(.step-dot:nth-child(5):last-child) { display: block; }
 .ws-progress .step-dot.is-active { flex-direction: row; align-items: center; padding: 0; gap: 12px; font-size: 1rem; }
 .ws-progress .step-dot::after { display: none; }
 .ws-progress .step-dot:not(.is-active) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
 .ws-progress-track { display: flex; gap: 6px; margin-top: 16px; }
 .ws-progress-track span { flex: 1; height: 4px; border-radius: 2px; background: var(--control-border); }
 .ws-progress-track .is-active { background: var(--green); }
 .ws-progress-track .is-done { background: var(--green-dark); }
 .wizard-step .ws-intro h3 { font-size: 2rem; }
 .ws-section, .wizard-step .ws-sport, .ws-reference, .ws-budget, .ws-review-date { padding: 22px; border-radius: 18px; }
 .wizard-step .ws-intro { margin-bottom: 24px; }
 .wizard-step .ws-sport .form-grid { grid-template-columns: minmax(0,1fr); }
 .wizard-step .ws-sport .sport-days-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr)); gap: 10px; }
 .wizard-step .ws-sport .sport-days-grid .check-label { min-height: 48px; }
 .wizard-step .macro-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
 .ws-food-group .check-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr)); }
 .ws-binary { grid-template-columns: repeat(auto-fit,minmax(min(100%,7rem),1fr)); }
 .ws-supplement-questions .ws-question { padding: 22px; }
 .ws-habit-heading { align-items: flex-start; }
 .ws-habit-heading .btn { width: 100%; }
 .wizard-step .ws-summary-list .summary-row { grid-template-columns: minmax(0,1fr); gap: 6px; }
 .wizard-step .form-actions { margin-top: 24px; padding-top: 22px; }
 .wizard-step .form-actions .btn-primary { width: 100%; order: -1; }
}
