:root{--page:#fbfcf8;--surface:#fff;--surface-soft:#f0f6e9;--text:#063f2d;--text-soft:#66776a;--notice-bg:#edf5e7;--notice-text:#31573e;--error-bg:#fbefe8;--error-text:#8d4636;--rank-color:#63824c}
body{background:var(--page);color:var(--text)}.appearance-toggle{display:grid;place-items:center;border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:22px;width:42px;height:42px;border-radius:50%;flex:0 0 auto;cursor:pointer}.topbar{gap:16px}#greetingPrefix{color:inherit;font-style:normal}.s4-project-footer{display:flex;justify-content:center;padding:32px 20px;border-top:1px solid var(--line);background:var(--page)}.s4-project-footer a{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--text-soft);font-size:12px}.s4-project-footer img{width:68px;height:32px;object-fit:contain;filter:brightness(0)}.member-view .s4-project-footer{padding-bottom:120px}.admin-page>.s4-project-footer{padding-left:220px}
.form-error:not(:empty){border:1px solid #c8d9c1;border-left:3px solid #719454;border-radius:12px;background:var(--notice-bg);color:var(--notice-text);padding:12px 15px;font-size:12px;line-height:1.6;min-height:0}.form-error[role=alert]:not(:empty),.form-error[data-tone=error]:not(:empty){background:var(--error-bg);color:var(--error-text);border-color:#dcb6a6;border-left-color:#b9664b}.form-error[data-tone=success]:not(:empty){background:var(--notice-bg);color:var(--notice-text);border-color:#c8d9c1}.field-error{display:block;color:var(--error-text);font-size:11px;line-height:1.5;margin-top:7px;font-weight:500}input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:#b9664b;background:var(--error-bg)}.toast{top:auto;bottom:100px;border:1px solid #5c8054;max-width:calc(100% - 36px);width:max-content;box-shadow:0 12px 30px #122b2320;font-size:13px;line-height:1.5;opacity:0;transform:translate(-50%,160px);border-radius:15px}.toast.show{transform:translate(-50%,0);opacity:1}.toast[data-tone=error]{background:var(--error-bg);color:var(--error-text);border-color:#b77c66}.dialog-feedback{margin:12px 0}
.confirm-dialog,.profile-dialog,.rank-dialog{width:calc(100% - 32px);max-height:calc(var(--visual-viewport-height,100dvh) - 30px);background:var(--surface);color:var(--text);overflow:auto}.confirm-dialog{max-width:470px}.confirm-content{padding:32px}.confirm-leaf{width:52px;height:52px;display:grid;place-items:center;background:var(--surface-soft);border-radius:15px;color:var(--rank-color);font-size:37px;margin-bottom:20px}.confirm-content h2{font-size:29px;line-height:1.1;letter-spacing:-.8px;margin:9px 0 16px}.confirm-content>p:not(.eyebrow){font-size:14px;color:var(--text-soft);line-height:1.7}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:28px}.confirm-actions>button{padding:14px 12px;min-height:52px;font-size:13px;width:100%}.profile-dialog{max-width:560px;position:relative}.profile-dialog>.dialog-x{position:absolute;right:18px;top:13px;background:none;color:var(--text);border:0;font-size:25px;z-index:2}.profile-content{padding:34px}.profile-content h2{font-size:32px;line-height:1.1;letter-spacing:-1px;margin:8px 0}.profile-content>p:not(.eyebrow){font-size:13px;color:var(--text-soft);overflow-wrap:anywhere}.profile-content form{padding:15px 0!important;display:grid;gap:14px}.profile-appearance{padding:22px 0;border-top:1px solid var(--line);margin:15px 0}.profile-appearance h3{font-size:23px;letter-spacing:-.5px;margin:0 0 18px}.profile-appearance label{margin-bottom:14px}.profile-appearance .text-btn{padding-left:0;font-size:12px}.profile-logout{width:100%}.profile-rank{display:flex;gap:16px;align-items:center;padding:12px 0}.profile-rank>p{font-size:12px;line-height:1.6;color:var(--text-soft)}.rank-badge{width:140px;height:auto;display:block;color:var(--rank-color);flex:0 0 auto}.profile-rank .rank-badge{width:100px}.rank-card{display:flex;align-items:center;gap:24px;border:1px solid var(--line);background:var(--surface-soft);border-radius:22px;padding:22px;margin:24px 0}.rank-card h3{font-size:30px;letter-spacing:-.7px;line-height:1;margin:9px 0 14px}.rank-card p{font-size:13px;color:var(--text-soft)}.rank-card .fineprint{font-size:11px}.rank-dialog{max-width:420px}.rank-celebration{padding:35px;text-align:center}.rank-celebration .rank-badge{width:200px;margin:auto}.rank-celebration h2{font-size:32px;letter-spacing:-.8px;margin:10px 0 20px}.rank-celebration>p:not(.eyebrow){font-size:13px;line-height:1.7;color:var(--text-soft)}.rank-celebration .primary{width:100%;margin-top:15px}
[data-theme=dark]{color-scheme:dark;--page:#101a15;--surface:#18291f;--surface-soft:#1d3223;--text:#e1eddc;--text-soft:#a2b6a5;--notice-bg:#213e2a;--notice-text:#c4dfb5;--error-bg:#392820;--error-text:#e4b6a2;--rank-color:#b4d18f;--white:#18291f;--cream:#101a15;--line:#344b39;--muted:#a2b6a5;--sage:#294530;--shadow:0 18px 60px #0006}
[data-theme=dark] body{background:var(--page);color:var(--text)}[data-theme=dark] .topbar{background:var(--page);border-bottom-color:var(--line)}[data-theme=dark] .topbar>.brand img,[data-theme=dark] .landing-footer>img{filter:brightness(0) invert(1)}[data-theme=dark] .s4-project-footer img{filter:brightness(0) invert(1)}[data-theme=dark] .site-nav a{color:var(--text)}[data-theme=dark] .greeting h1 span:not(#greetingPrefix){color:#b1cf99}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:#15251b;color:var(--text);border-color:#496147}[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#93a68f}[data-theme=dark] .primary{background:#d8fa63;color:#183322;border-color:#d8fa63}[data-theme=dark] .primary:hover{background:#e3ff8a}[data-theme=dark] .secondary,[data-theme=dark] .pill{background:#263f2b;color:#deedd6;border-color:#56724a}[data-theme=dark] .ghost,[data-theme=dark] .text-btn{color:#d3e4c9;background:transparent}[data-theme=dark] .check,[data-theme=dark] label{color:var(--text)}[data-theme=dark] .auth-tabs{background:var(--surface-soft);border:1px solid var(--line)}[data-theme=dark] .auth-tabs button{color:var(--text)}[data-theme=dark] .auth-tabs button:not(.active):hover{background:var(--sage)}[data-theme=dark] .auth-tabs button.active{background:#d8fa63;color:#183322}[data-theme=dark] .auth-tabs button:focus-visible{outline:2px solid var(--text);outline-offset:2px}[data-theme=dark] .auth-card,[data-theme=dark] .onboard-card{background:var(--surface);border-color:var(--line)}[data-theme=dark] .auth-card h2,[data-theme=dark] .onboard-card h2{color:var(--text)}[data-theme=dark] .calorie-result{background:var(--surface-soft);color:var(--text)}[data-theme=dark] .choice-stack label,[data-theme=dark] .plan-options label,[data-theme=dark] .segmented>label{background:#172b1e;color:var(--text);border-color:var(--line)}[data-theme=dark] .selection-count{background:var(--surface-soft);color:var(--text)}[data-theme=dark] .like-option{background:var(--surface);border-color:var(--line)}[data-theme=dark] .recipe-peek{background:#314b34;color:#e4efd9}
[data-theme=dark] .water-card{background:#193b37;color:#e3f0df}[data-theme=dark] .water-card h2,[data-theme=dark] .water-card h2 small,[data-theme=dark] .water-card p{color:#cee3d4}[data-theme=dark] .water-vessel{border-color:#66a6a2}[data-theme=dark] .water-vessel div{background:#377a77}[data-theme=dark] .rollover-card,[data-theme=dark] .day-totals,[data-theme=dark] .empty-state{background:var(--surface-soft);border-color:var(--line)}[data-theme=dark] .rollover-summary{color:var(--text)!important}[data-theme=dark] .week-days button,[data-theme=dark] .training-days button{background:var(--surface);color:var(--text);border-color:var(--line)}[data-theme=dark] .week-days button.active,[data-theme=dark] .training-days button.active{background:#a8cd7e;color:#163420;border-color:#b7d994}[data-theme=dark] .day-totals small{color:#aec4a6}[data-theme=dark] .day-totals p{color:#e0c28e}[data-theme=dark] .day-totals .within-target{color:#b0d89f}[data-theme=dark] .planned-meal,[data-theme=dark] .meal-card,[data-theme=dark] .shop-item,[data-theme=dark] .food-log-item,[data-theme=dark] .chart-card{background:var(--surface);color:var(--text);border-color:var(--line)}[data-theme=dark] .planned-controls{background:#14251a;border-color:var(--line)}[data-theme=dark] .planned-meal.eaten,[data-theme=dark] .shop-item.checked{background:#1d3524;opacity:1}[data-theme=dark] .recipe-title{color:var(--text)}[data-theme=dark] .meal-state{background:#314e31;color:#d8eccc}[data-theme=dark] .meal-image,[data-theme=dark] .recipe-hero{background:linear-gradient(145deg,#24452d,#303c26)}[data-theme=dark] .favourite{background:#203b28;color:#d8fa93}[data-theme=dark] .suggestion-panel{background:#16432b;border:1px solid #385c3b}[data-theme=dark] .meal-tabs button{color:var(--text-soft)}[data-theme=dark] .meal-tabs button.active{color:#d8fa93;border-color:#d8fa93}[data-theme=dark] .recipe-dialog,[data-theme=dark] dialog{background:var(--surface);color:var(--text)}[data-theme=dark] .recipe-dialog>.dialog-x{background:#203427;color:var(--text);border-color:#52644b}[data-theme=dark] .recipe-nutrition,[data-theme=dark] .swap-verdict{background:#28472d;color:#d5ebc9}[data-theme=dark] .recipe-ingredients li{border-color:var(--line)}[data-theme=dark] .recipe-method li::marker{color:#c2e696}[data-theme=dark] .workout-section{background:#1c3021}[data-theme=dark] .exercise{border-color:#38543b}[data-theme=dark] .exercise .num{background:#36543b;color:#ddecce}[data-theme=dark] .workout-live{background:var(--page);color:var(--text)}[data-theme=dark] .set-rows{background:var(--surface)}[data-theme=dark] .set-row input:disabled{background:#29412d;color:#d3e4c9}[data-theme=dark] .chart-bars span{background:#638451}[data-theme=dark] .chart-bars span:last-child{background:#c8e590}[data-theme=dark] .workout-history{border-color:var(--line)}[data-theme=dark] .bottom-nav{background:#203e2c;border:1px solid #4a6748}[data-theme=dark] .bottom-nav button.active{background:#38583a}
[data-theme=dark] .landing{background:var(--page)}[data-theme=dark] .hero-copy h1 em{color:#acc78f}[data-theme=dark] .hero-proof{color:#b3cc9e}[data-theme=dark] .product-preview{background:#173f2c}[data-theme=dark] .preview-energy{background:#294e38}[data-theme=dark] .preview-water{background:#20453d;color:#d5edda}[data-theme=dark] .preview-water small,[data-theme=dark] .preview-water span{color:#bfdac9}[data-theme=dark] .preview-meal{background:#243d2a;color:var(--text)}[data-theme=dark] .feature-grid article{background:var(--surface);border-color:var(--line)}[data-theme=dark] .feature-grid article>span{background:#355536;color:#d5e8c4}[data-theme=dark] .how-section{background:#1c3121}[data-theme=dark] .how-section li{border-color:#3b5238}[data-theme=dark] .how-section li:before{color:#c1da9e}[data-theme=dark] .landing-strip{color:#163420}[data-theme=dark] .landing-strip i{background:#163420}
[data-theme=dark] .admin-table,[data-theme=dark] .admin-stats article,[data-theme=dark] .content-editor,[data-theme=dark] .content-item,[data-theme=dark] .ingredient-row,[data-theme=dark] .programme-exercise{background:var(--surface);color:var(--text);border-color:var(--line)}[data-theme=dark] .content-item{background:#1d3424}[data-theme=dark] .admin aside{background:#143626}[data-theme=dark] .editor-fieldset,[data-theme=dark] .training-day-editor{border-color:#496342}[data-theme=dark] .row-remove{background:#2b3c2d;color:#dfbdac;border-color:#5a5e45}[data-theme=dark] .admin nav button.active{background:#3a5738;color:#d8fa93}[data-theme=dark] .form-error:not(:empty){border-color:#4b6743}[data-theme=dark] .form-error[role=alert]:not(:empty),[data-theme=dark] .form-error[data-tone=error]:not(:empty){border-color:#815646}[data-theme=dark] .form-error[data-tone=success]:not(:empty){background:var(--notice-bg);color:var(--notice-text);border-color:#4b6743}[data-theme=dark] input[aria-invalid=true],[data-theme=dark] select[aria-invalid=true],[data-theme=dark] textarea[aria-invalid=true]{background:var(--error-bg);border-color:#b78871}
@media(max-width:800px){input,select,textarea{font-size:16px!important}.auth-dialog,.profile-dialog,.confirm-dialog,.rank-dialog{position:fixed;inset:auto;left:50%;top:calc(var(--visual-viewport-top,0px) + var(--visual-viewport-height,100dvh)/2);transform:translate(-50%,-50%);margin:0;width:calc(100% - 24px);max-height:calc(var(--visual-viewport-height,100dvh) - 24px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.auth-dialog .auth-card{padding:24px}.auth-dialog .dialog-x{min-width:36px;min-height:36px}.profile-content,.confirm-content,.rank-celebration{padding:26px}.profile-content h2{font-size:30px}.confirm-actions{gap:10px}.confirm-actions>button{font-size:12px;padding:14px 10px;min-height:52px}.topbar{gap:9px}.appearance-toggle{width:36px;height:36px;font-size:20px}.public-actions button{padding-left:12px;padding-right:12px}.profile-rank .rank-badge{width:90px}.rank-card{gap:14px;padding:18px}.rank-card .rank-badge{width:100px}.rank-card h3{font-size:26px}.rank-card p{font-size:12px}.admin-page>.s4-project-footer{padding-left:20px}.toast{bottom:98px}.s4-project-footer{padding-top:26px;padding-bottom:26px}body:has(dialog[open]){overflow:hidden}}
