:root{--track:#edf1e8;--surface-soft:#f6f8f1;--on-primary:#fff;--subtle-text:#84927c}
.form-grid>label,.form-grid .form-input,.plan-grid>*{min-width:0}
.sidebar{overflow-y:auto}
.theme-switch{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
.theme-switch button{width:28px;height:27px;display:grid;place-items:center;border-radius:5px;color:var(--muted)}
.theme-switch button svg{width:15px;height:15px}.theme-switch button[aria-pressed=true]{background:var(--sage);color:var(--green)}
.plan-intro{display:flex;align-items:center;gap:17px;margin-bottom:24px;padding:22px 25px;background:var(--sage);border:1px solid var(--line);border-radius:12px}
.plan-leaf{font-size:38px;color:var(--green)}.plan-intro h2{font-size:18px;line-height:1.5}.plan-intro p{font-size:14px;line-height:1.8;color:var(--subtle-text);margin-top:5px}.plan-intro .badge-neutral{margin-left:auto;white-space:nowrap}
.plan-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);gap:24px;align-items:start}.plan-form-card,.plan-result-card{padding:27px}.plan-form-card .form-grid{gap:19px 17px;margin-top:23px}.plan-form-card .form-label{font-size:14px}.plan-calculate,.plan-apply{margin-top:20px;width:100%;justify-content:space-between}.plan-calculate{margin-top:21px}.plan-calculate span{font-size:18px}.plan-apply{justify-content:center}
.plan-empty{padding:22px 6px;text-align:center}.plan-empty>span{font-size:54px;color:var(--green);display:block;margin-bottom:25px}.plan-empty h2{font-size:20px;line-height:1.5}.plan-empty p{font-size:14px;line-height:1.9;color:var(--subtle-text);margin:14px auto;max-width:290px}.plan-empty small{font-size:14px;line-height:1.9;color:var(--subtle-text);display:block;max-width:270px;margin:auto}.plan-placeholder-bars{display:flex;flex-direction:column;gap:12px;max-width:240px;margin:31px auto}.plan-placeholder-bars span{height:8px;border-radius:8px;background:var(--track)}.plan-placeholder-bars span:nth-child(2){width:80%}.plan-placeholder-bars span:nth-child(3){width:60%}
.plan-small-note{margin-top:19px;padding:20px 24px;border-radius:10px;background:var(--sage);color:var(--green)}.plan-small-note strong{font-size:14px;line-height:1.7;display:block}.plan-small-note p{font-size:14px;color:var(--subtle-text);line-height:1.9;margin-top:9px}
.plan-energy-details{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:15px 0 22px;margin-top:10px;border-bottom:1px solid var(--line)}.plan-energy-details span{display:block;color:var(--subtle-text);font-size:14px;line-height:1.7}.plan-energy-details strong{display:block;margin-top:9px;font-family:Manrope,sans-serif;font-size:21px;font-weight:650}.plan-energy-details small{font-family:var(--font);font-size:14px;color:var(--subtle-text);font-weight:400}
.plan-kcal{padding:24px 0 22px}.plan-kcal>span{font-size:14px;line-height:1.7;color:var(--subtle-text)}.plan-kcal>strong{display:block;font-family:Manrope,sans-serif;font-size:42px;font-weight:750;letter-spacing:-1.5px;color:var(--green);margin-top:7px}.plan-kcal small{font-family:var(--font);font-size:14px;letter-spacing:0;font-weight:400;color:var(--subtle-text)}.plan-kcal p{font-size:14px;line-height:1.9;color:var(--subtle-text);margin-top:12px}
.plan-macros{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 15px}.plan-macros>div{padding:15px 11px;background:var(--surface-soft);border-radius:8px;border-top:3px solid var(--macro-color)}.plan-macros span{font-size:14px;color:var(--subtle-text)}.plan-macros strong{display:block;margin-top:10px;font-family:Manrope,sans-serif;font-size:22px;font-weight:650}.plan-macros small{font-family:var(--font);font-size:14px;color:var(--subtle-text);font-weight:400}
.plan-notes{padding-top:12px;border-top:1px solid var(--line);margin-top:19px}.plan-notes p{font-size:14px;line-height:1.9;color:var(--subtle-text);margin:8px 0}.plan-method{margin-top:25px;padding:21px 26px}.plan-method summary{cursor:pointer;font-size:14px;font-weight:600;line-height:1.8}.plan-method>div{padding-top:13px}.plan-method p{font-size:14px;line-height:1.95;color:var(--subtle-text);margin:12px 0}.plan-method strong{font-weight:550;color:var(--ink)}.plan-sources{padding-left:18px;font-size:14px;line-height:2.1;margin-top:20px}.plan-sources a{color:var(--green)}.plan-issues{font-size:14px;line-height:1.95;color:var(--subtle-text);padding-left:18px;margin:20px 0}.plan-result-card>h2{font-size:21px;line-height:1.55;margin-top:15px}
.portion-shortcuts{display:flex;align-items:center;gap:8px;margin-top:18px}.portion-shortcuts>span{font-size:14px;color:var(--subtle-text);margin-right:auto}.portion-shortcuts button{min-width:36px;height:30px;border:1px solid var(--line);border-radius:6px;background:var(--surface-soft);font-size:14px;color:var(--green)}.portion-shortcuts button:hover{background:var(--sage)}#portion-equivalent{line-height:1.8}.custom-unit-fields{padding:17px;background:var(--surface-soft);border-radius:9px}.define-unit{margin-top:7px}.detail-data:has(.define-unit){flex-wrap:wrap}
/* Dark palette: surfaces and text are themed independently; product photos retain
   their original pixels and the page keeps its existing layout at every width. */
:root[data-theme=dark]{--bg:#101914;--paper:#19251f;--ink:#e4ede5;--muted:#a0b2a4;--green:#9ac8a2;--dark:#c8e2ca;--sage:#263a2c;--line:#34463a;--blue:#91b9d8;--orange:#d7af85;--purple:#b5a5d2;--track:#2c3d30;--surface-soft:#202e25;--on-primary:#132519;--subtle-text:#a0b2a4;color-scheme:dark}
[data-theme=dark] .sidebar,[data-theme=dark] .card,[data-theme=dark] .meal,[data-theme=dark] .product-card,[data-theme=dark] .stat-card,[data-theme=dark] dialog,[data-theme=dark] .btn.subtle,[data-theme=dark] .search-field,[data-theme=dark] .catalog-controls select,[data-theme=dark] .store-selector select,[data-theme=dark] .catalog-stats>div{background:var(--paper);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .topbar{background:#162119;border-color:var(--line)}[data-theme=dark] .brand,[data-theme=dark] .footer-brand{color:var(--ink)}[data-theme=dark] .brand-icon{background:var(--green);color:var(--on-primary)}[data-theme=dark] .brand-dot{color:var(--green)}
[data-theme=dark] .btn.primary{background:var(--green);color:var(--on-primary);border-color:var(--green);box-shadow:none}[data-theme=dark] .btn.primary:hover{background:#b0d5b5}[data-theme=dark] .btn:disabled{opacity:.5}
[data-theme=dark] .ring-center{background:var(--paper)}[data-theme=dark] .bar,[data-theme=dark] .dot.light{background:var(--track)}[data-theme=dark] .green-text,[data-theme=dark] .text-btn,[data-theme=dark] .label-photo-link,[data-theme=dark] .form-section-title{color:var(--green)}
[data-theme=dark] :is(.workspace,.nav-item,.profile small,.breadcrumb,.top-actions,.heading p,.eyebrow,.timezone,.budget>div>span,.budget strong small,.energy-legend,.ring-label,.ring-center>span:last-child,.macro-name,.macro-numbers,.summary-foot,.section-title h2>span,.quiet,.meal-title p,.meal-calories small,.empty-meal,.entry-info small,.data-note,.card-head p,.micro-item span,.micro-item small,.calendar-days,.calendar-legend,.store-card p,.local-info,.form-grid small,.form-help,.form-label,.product-result-info small,.source-credit,.catalog-top p,.catalog-notice,.result-count,.product-card-body>small,.product-card-body p,.product-mini-macros,.product-bottom small,.progress-legend,.chart-label,.chart-value,.stat-card>span,.stat-card small,.progress-table th,.progress-table td,.nutrition-table th,.nutrition-table td:last-child,.badge-neutral,.catalog-stats span,.catalog-credit,.ingredients,.nutrient-inputs label){color:var(--muted)}
[data-theme=dark] .macro-numbers b,[data-theme=dark] .micro-item strong,[data-theme=dark] .breadcrumb strong{color:var(--ink)}[data-theme=dark] .nav-item.active,[data-theme=dark] .mobile-nav>button.active{background:var(--sage);color:var(--green)}[data-theme=dark] .nav-item:hover,[data-theme=dark] .icon-btn:hover,[data-theme=dark] .calendar>button:hover{background:var(--surface-soft)}[data-theme=dark] .nav-badge{background:var(--surface-soft);color:var(--muted)}
[data-theme=dark] .avatar{background:#384338;color:#d7dfcf}[data-theme=dark] .side-note{background:linear-gradient(140deg,#28372b,#202f24)}[data-theme=dark] .side-note p{color:var(--muted)}[data-theme=dark] .side-note .leaf{color:var(--green)}[data-theme=dark] .note-line{border-color:var(--line)}
[data-theme=dark] .today-btn,[data-theme=dark] .soft-icon,[data-theme=dark] .store-logo,[data-theme=dark] .badge-neutral,[data-theme=dark] .product-bottom button{background:var(--sage);border-color:var(--line);color:var(--green)}[data-theme=dark] .icon-btn,[data-theme=dark] .empty-meal button,[data-theme=dark] .add-round{color:var(--green)}[data-theme=dark] .add-round{border-color:var(--line)}[data-theme=dark] .empty-meal{border-color:var(--line)}
[data-theme=dark] .meal-icon{background:#3a3424;color:#d6b97f}[data-theme=dark] .meal:nth-child(2) .meal-icon{background:#353726;color:#c7bc8b}[data-theme=dark] .meal:nth-child(3) .meal-icon{background:#322d44;color:#bcaed7}[data-theme=dark] .meal:nth-child(4) .meal-icon{background:#2b3d27;color:#b0c89c}[data-theme=dark] .meal-entry{border-color:var(--line)}
[data-theme=dark] .food-thumb,[data-theme=dark] .portion-product,[data-theme=dark] .portion-macros>div,[data-theme=dark] .portion-product .food-thumb{background:var(--surface-soft)}[data-theme=dark] .portion-macros small,[data-theme=dark] .portion-product p{color:var(--muted)}
[data-theme=dark] .calendar>button{color:#b7c8b9}[data-theme=dark] .calendar>button.other-month{color:#829786}[data-theme=dark] .calendar>button.today{box-shadow:inset 0 0 0 1px var(--green);color:var(--green)}[data-theme=dark] .calendar>button.selected{background:var(--green);color:var(--on-primary);box-shadow:none}[data-theme=dark] .calendar>button.selected:after{background:#294e33}[data-theme=dark] .tiny-dot{background:var(--green)}
[data-theme=dark] .quote-card{background:#243925;border-color:#344e34}[data-theme=dark] .quote-card h3,[data-theme=dark] .quote-spark{color:#c7dfbb}[data-theme=dark] .quote-card p{color:#adc29f}[data-theme=dark] .quote-card .plant-art{opacity:.2}
[data-theme=dark] .form-input{background:var(--surface-soft);border-color:var(--line);color:var(--ink)}[data-theme=dark] input::placeholder{color:#96aa98;opacity:1}[data-theme=dark] .form-input:focus{border-color:var(--green);outline-color:#9ac8a244}[data-theme=dark] .search-field input{color:var(--ink)}[data-theme=dark] .info-box{background:#2a3423;border-color:#3c4a31;color:#c0cbb0}[data-theme=dark] .error-text,[data-theme=dark] .field-error{color:#f2aa91}[data-theme=dark] .success-text{color:var(--green)}
[data-theme=dark] .product-result{border-color:var(--line)}[data-theme=dark] .product-result:hover{background:var(--surface-soft)}[data-theme=dark] .pill{border-color:var(--line);color:var(--muted)}[data-theme=dark] .pill.active{background:var(--sage);border-color:#58705c;color:var(--green)}[data-theme=dark] .catalog-top{background:linear-gradient(115deg,#203825,var(--paper))}[data-theme=dark] .store-chip{color:var(--green)}
[data-theme=dark] .product-card>.favorite{background:#e5eae0;color:#536c57}[data-theme=dark] .product-card>.favorite.active{background:#c7dbba;color:#29492d}[data-theme=dark] .pending-nutrition{color:#d2be95}[data-theme=dark] .product-bottom{border-color:var(--line)}[data-theme=dark] .product-card-body>p{color:#b0c1b0}
[data-theme=dark] .chart-bar{background:linear-gradient(#9ac8a2,#73987b)}[data-theme=dark] .chart-bar.empty{background:var(--track)}[data-theme=dark] .goal-line{border-color:#71826a}[data-theme=dark] .goal-line span{color:var(--muted)}[data-theme=dark] .progress-table tr.today-row,[data-theme=dark] .progress-table tbody tr:hover{background:var(--surface-soft)}[data-theme=dark] .table-section td{background:var(--surface-soft);color:var(--green)!important}[data-theme=dark] footer{color:var(--muted);border-color:var(--line)}[data-theme=dark] dialog::backdrop{background:#060d08b8}[data-theme=dark] .toast{background:#b1d4b4;color:#132519}[data-theme=dark] .demo-tag{background:#383425;color:#d5c697;border-color:#5a5135}
@media(max-width:1020px){.plan-grid{gap:18px}.plan-form-card,.plan-result-card{padding:22px}.plan-intro .badge-neutral{display:none}.plan-macros{gap:6px}.plan-macros>div{padding:13px 8px}.plan-macros strong{font-size:19px}.plan-kcal>strong{font-size:36px}}
@media(max-width:760px){.plan-grid{grid-template-columns:1fr}.plan-intro{padding:19px}.plan-intro h2{font-size:16px}.plan-result-card{padding:25px}.plan-method{padding:20px}.theme-switch button{width:27px;height:25px}.top-actions{gap:13px}.top-actions:before{display:none}.plan-kcal>strong{font-size:39px}.mobile-nav{gap:4px}.mobile-nav>button{padding:7px 11px}}
@media(max-width:370px){.plan-form-card .form-grid{grid-template-columns:1fr}.plan-form-card .form-grid .full{grid-column:auto}.plan-energy-details{gap:10px}.plan-energy-details span{font-size:14px}.plan-energy-details strong{font-size:18px}.plan-macros strong{font-size:18px}.plan-intro{gap:12px}.plan-intro h2{font-size:15px}.mobile-nav>button{padding:7px 9px}}

/* Retailer choice lives inside the meal search, with one native radio selected. */
.search-stores{border:0;padding:0;margin:20px 0 17px;min-width:0}.search-stores legend{font-size:14px;font-weight:600;margin-bottom:10px;color:var(--ink)}.search-stores legend small{font-size:14px;font-weight:400;display:block;margin-top:5px;color:var(--subtle-text)}.store-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.store-option{position:relative;min-width:0;cursor:pointer}.store-option input{position:absolute;opacity:0;width:1px;height:1px}.store-option-body{display:flex;align-items:center;gap:10px;min-height:57px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--paper);border-left:4px solid var(--store-color)}.store-option input:checked+.store-option-body{border-color:var(--store-color);box-shadow:0 0 0 1px var(--store-color)}.store-option input:focus-visible+.store-option-body{outline:2px solid var(--green);outline-offset:3px}.store-option strong{display:block;font-size:14px;font-weight:600;line-height:1.5}.store-option small{display:block;font-size:14px;margin-top:2px;color:var(--subtle-text)}.retailer-logo{flex:0 0 40px;width:40px;height:32px;border-radius:4px;background:white;display:flex;align-items:center;justify-content:center;padding:3px}.retailer-logo img{max-width:100%;max-height:100%;object-fit:contain}.retailer-logo svg{width:23px;height:23px;color:#617762}.store-radio{width:13px;height:13px;border:1px solid var(--line);border-radius:50%;margin-left:auto;flex-shrink:0}.store-option input:checked+.store-option-body .store-radio{background:var(--store-color);border-color:var(--store-color);box-shadow:inset 0 0 0 3px var(--paper)}.coming-soon{cursor:default}.coming-soon .store-option-body{background:var(--surface-soft)}.coming-soon strong{color:var(--subtle-text)}.catalog-access h3{font-size:17px;line-height:1.5;margin-top:16px}.catalog-access p{line-height:1.8}.catalog-access .text-btn{margin-top:8px}.product-result>span:last-child{font-size:14px;text-align:right;max-width:115px;color:var(--green)}
@media(max-width:580px){.catalog-access{display:block}.store-option-body{gap:6px;padding:8px 7px}.retailer-logo{flex-basis:34px;width:34px;height:30px}.store-option strong{font-size:14px}.store-option small{font-size:14px}.store-radio{width:11px;height:11px}.product-result>span:last-child{max-width:85px;font-size:14px}}

.store-option:has(input[value=carrefour]) .retailer-logo{background:#004e9f}

.catalog-coverage{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.catalog-coverage article{display:flex;flex-direction:column;gap:5px;padding:15px;border:1px solid var(--line,#dfe5d8);border-radius:14px;background:var(--paper);font-size:14px}.catalog-coverage article strong{font-size:14px}.catalog-coverage small{color:var(--muted)}@media(max-width:900px){.catalog-coverage{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:430px){.catalog-coverage{grid-template-columns:1fr}}

.provenance{margin:12px 0;font-size:14px;line-height:1.65;color:var(--muted)}
.provenance summary{cursor:pointer;font-weight:600;padding:10px 0;color:var(--ink)}
.transparency{line-height:1.7;font-size:14px;overflow-wrap:anywhere}
.transparency h3{margin:26px 0 8px;font-size:17px}
.transparency p{margin:10px 0}.transparency ul{padding-left:20px}
.transparency a{text-decoration:underline;color:inherit;text-underline-offset:3px}
.transparency-stores{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.transparency-stores article{padding:14px;border:1px solid var(--line);border-radius:12px}
.transparency-stores p{font-size:14px}footer{flex-wrap:wrap;gap:12px}footer button{white-space:normal;text-align:left}
@media(max-width:440px){.transparency-stores{grid-template-columns:1fr}}

body:not(.account-ready)>.sidebar,body:not(.account-ready)>.page,body:not(.account-ready)>.account-controls{display:none}
.account-gate{min-height:100dvh;display:grid;place-items:center;padding:30px 20px;background:var(--bg)}
.account-gate[hidden]{display:none}.login-card{max-width:560px;padding:36px;border-radius:24px;border:1px solid var(--line);background:var(--paper)}
.login-brand{display:block;margin-bottom:44px;font-size:36px}.login-card h1{font-size:clamp(28px,5vw,42px);line-height:1.15;margin:16px 0 20px}.login-card p{line-height:1.7}.login-card small{display:block;margin-top:28px}.google-login{width:100%;justify-content:center;margin-top:24px;min-height:48px}.login-card #account-status{font-size:14px;min-height:44px}
.account-controls{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-left:240px;padding:10px 28px;font-size:14px;border-bottom:1px solid var(--line)}
#account-email{overflow-wrap:anywhere}#sync-state[data-state="saved"]{color:var(--green)}#sync-state[data-state="conflict"],#sync-state[data-state="offline"]{font-weight:700}
#login-notice,#sync-conflict{max-width:650px;max-height:88dvh;overflow:auto;padding:28px;line-height:1.6;color:inherit;background:var(--paper);border:1px solid var(--line);border-radius:20px}
@media(max-width:900px){.account-controls{margin-left:0;padding:12px 20px}.login-card{padding:24px}.account-controls #account-email{flex-basis:100%}}
.chain-field:not([hidden]){display:grid;gap:8px;margin:4px 0 18px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}
.chain-field small{font-size:14px;line-height:1.6;color:var(--subtle-text)}
.chain-field select{width:100%;min-width:0}
.food-variant-group{border:1px solid var(--line);border-radius:15px;background:var(--paper);min-width:0;overflow:hidden;margin:5px 0}.food-variant-group summary{list-style:none;cursor:pointer;padding:17px 20px;display:grid;gap:4px}.food-variant-group summary::-webkit-details-marker{display:none}.food-variant-group summary strong{font-size:16px;line-height:1.35}.food-variant-group summary span{color:var(--green);font-weight:700}.food-variant-group summary small,.estimate-caption{font-size:12px;color:var(--muted);line-height:1.45}.food-variant-group[open] summary{border-bottom:1px solid var(--line)}.variant-options{max-height:360px;overflow:auto}.variant-options button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:12px 19px;text-align:left;border-bottom:1px solid var(--line)}.variant-options button:hover{background:var(--surface-soft)}.variant-options button span{font-weight:650;min-width:0}.variant-options button small{display:block;color:var(--muted);font-weight:400;margin-top:4px}.variant-options button strong{color:var(--green);white-space:nowrap}.product-result .approximate,.product-card .approximate{color:var(--green)}.product-result .unverified,.product-card .unverified{font-size:12px;color:var(--muted)}.product-card .food-variant-group{grid-column:1/-1}@media(max-width:580px){.food-variant-group summary{padding:14px}.variant-options button{padding:12px 14px}.variant-options button strong{font-size:12px}}
