.nutrition{max-width:1050px}.nutrition-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.nutrition-head h1{margin:5px 0;font-size:34px}.nutrition-head p{margin:0 0 20px;color:var(--muted)}.nutrition button{border:0;border-radius:9px;padding:10px 16px;background:var(--accent);color:#fff;font:inherit;cursor:pointer}.nutrition button:disabled{opacity:.45;cursor:not-allowed}.nutrition button.n-secondary{background:#e5f0ed;color:#205a50}.n-tabs{display:flex;gap:8px;overflow-x:auto;border-bottom:1px solid var(--line);margin:20px 0}.n-tabs button{white-space:nowrap;background:transparent;color:var(--muted);border-radius:9px 9px 0 0}.n-tabs button.active{background:#e5f0ed;color:#145f51}.n-section{background:white;border:1px solid var(--line);padding:22px;border-radius:13px}.n-toolbar,.n-actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:14px}.nutrition label{display:block;font-size:14px;font-weight:600}.nutrition input,.nutrition select,.nutrition textarea{width:100%;padding:10px;border:1px solid #b9ced2;border-radius:8px;font:inherit;background:white;color:var(--ink)}.nutrition input[type=date]{max-width:230px}.n-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:15px 0}.n-stat{border:1px solid var(--line);border-radius:10px;padding:13px;background:#f7faf9}.n-stat span{display:block;color:var(--muted);font-size:13px}.n-stat strong{font-size:20px}.n-hint{font-size:13px;color:var(--muted)}.n-meal{margin-top:16px;border:1px solid var(--line);border-radius:10px;overflow:hidden}.n-meal h3{background:#eaf2f0;padding:10px 14px;margin:0;font-size:17px}.n-item{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:12px 14px;border-top:1px solid var(--line)}.n-item small{color:var(--muted);display:block}.n-item .n-actions{margin:0}.n-item .n-actions button{padding:6px 9px;font-size:13px}.n-empty{color:var(--muted);padding:18px}.n-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.nutrition dialog{border:1px solid var(--line);border-radius:15px;padding:24px;max-width:620px;width:calc(100% - 28px);max-height:90vh;overflow:auto;box-shadow:0 20px 65px #142c3640}.nutrition dialog::backdrop{background:#142c3660}.nutrition dialog h2{margin-top:0}.nutrition textarea{resize:vertical}.nutrition #import-json{font:13px/1.5 ui-monospace,monospace}.nutrition #nutrition-status{min-height:22px;color:var(--muted);font-size:14px}@media(max-width:650px){.n-stats{grid-template-columns:repeat(2,1fr)}.n-fields{grid-template-columns:1fr}.n-section{padding:14px}.nutrition-head h1{font-size:28px}.n-item{align-items:flex-start}.n-item .n-actions{flex-direction:column}}
/* Weekly energy summary */
.n-weekly{margin:24px 0 22px;padding:18px;border:1px solid var(--line);border-radius:12px;background:#fbfdfc}
.n-week-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
.n-week-head h2{font-size:20px;margin:0 0 3px}.n-week-head p{margin:0}
.n-week-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.n-week-controls button{padding:6px 11px}.n-week-controls #week-label{font-size:14px;font-weight:650;min-width:104px;text-align:center}
.n-week-chart{width:100%;max-width:100%;min-width:0;margin-top:12px;overflow:hidden}.n-week-chart svg{display:block;width:100%;max-width:100%;min-width:0;height:auto;overflow:visible}
.n-week-details{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:10px}
.week-day{padding:7px 3px;text-align:center;border:1px solid var(--line);border-radius:8px;font-size:12px}
.week-day span,.week-day strong{display:block}.week-day strong{font-size:12px;white-space:nowrap}
.n-week-summary{font-weight:650;font-size:14px;margin:14px 0 4px}
@media(max-width:650px){.n-weekly{padding:12px}.n-week-details{grid-template-columns:repeat(4,minmax(0,1fr))}.n-week-controls{width:100%}.n-week-head h2{font-size:18px}.n-week-chart{overflow:hidden;min-width:0}.n-week-chart svg{width:100%;max-width:100%;min-width:0}}

/* Meal-level totals and the foods that make them up. */
.n-meal-record + .n-meal-record{border-top:1px solid var(--line)}
.n-meal-record>.n-item{border-top:0;align-items:flex-start}
.n-record-head{min-width:0;flex:1}
.n-note,.n-component-extra details{margin-top:5px;color:var(--muted);font-size:12px}
.n-note summary,.n-component-extra summary{cursor:pointer;color:#357b6c}
.n-note p,.n-component-extra p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.n-component-list{margin:0 14px 13px;padding:10px 12px;border-radius:9px;background:#f5faf8;border:1px solid #deece7}
.n-component-heading{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#205a50;font-weight:700;font-size:13px}
.n-component-heading small{color:var(--muted);font-weight:400}
.n-component{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:10px 0;border-top:1px solid #dcebe6;font-size:14px}
.n-component:first-of-type{margin-top:6px}
.n-component-main{min-width:0;overflow-wrap:anywhere}
.n-component-main span{color:var(--muted);font-size:12px}
.n-component small,.n-component-energy small{display:block;color:var(--muted);font-size:12px}
.n-component-energy{text-align:right;font-weight:700;color:#245b50;white-space:nowrap}
.n-component-energy small{font-weight:400}
.n-component-extra{grid-column:1 / -1;color:var(--muted);font-size:12px}
.nutrition dialog.details-dialog{max-width:760px}
.n-editor-card{margin:15px 0;padding:14px;border:1px solid #dbe9e4;border-radius:10px;background:#f9fcfb}
.n-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.n-card-head button{padding:5px 10px;font-size:13px}
.n-editor-card .n-fields{margin-bottom:8px}
.n-wide{grid-column:1 / -1}
.nutrition label.n-complete{display:flex;align-items:flex-start;gap:9px;margin:16px 0 3px;line-height:1.5}
.nutrition label.n-complete input{width:auto;margin:4px 0 0}
.nutrition label.n-review{display:flex;align-items:flex-start;gap:8px;margin:8px 0;color:#865d24;font-size:13px}
.nutrition label.n-review[hidden]{display:none}
.nutrition label.n-review input{width:auto;margin:4px 0 0}
.n-form-error{color:#a6332e;font-size:13px;font-weight:600}
.details-total{padding:10px 12px;border-radius:8px;background:#e9f4ef;color:#1b5f4e;font-size:14px;font-weight:700}
@media(max-width:650px){
  .n-wide{grid-column:auto}
  .n-component-list{margin-left:10px;margin-right:10px;padding:10px}
  .nutrition dialog.details-dialog{padding:17px;width:calc(100% - 18px);max-height:92vh}
  .n-editor-card{padding:12px}
}

