/* The client's nutrition screens (#/nutrition and its sheets). Shared parts live in base.css and
   kit.css; tokens only, type in rem. Motion: the only moving things here are press feedback and the
   chevron of a menu choice — logging food never animates. */

/* ---------- the diary ---------- */
.nu-z{display:flex;flex-direction:column;gap:12px}
.nu-z:empty{display:none}
.nu-day{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:8px;padding-top:2px}
.nu-day-c{text-align:center;min-width:0}
.nu-day .icon-btn[disabled]{opacity:.3;cursor:default}
.nu-day .textlink{padding:0;font-size:inherit}
.nu-off{align-items:flex-start}
.nu-off span{flex:1;min-width:0}
.nu-off .btn{flex:none;background:var(--tile)}

.nu-hero-top{display:flex;align-items:center;gap:16px}
.nu-hero .ring-in b{font-size:1.45rem;font-weight:800;line-height:1.1}
.nu-hero .ring-in span{font-size:.7rem;color:var(--ink-3)}
.nu-macros{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.nu-macro-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:5px;font-size:.8rem;color:var(--ink-2)}
.nu-macro-h b{font-size:.94rem;color:var(--ink)}
.nu-macro-h .pill{font-size:.66rem;padding:1px 7px}
.nu-bonus{font-size:.68rem;font-weight:500;color:var(--ink-3);white-space:nowrap}
.nu-tot .nu-bonus{display:block;margin-top:1px}
.nu-left{font-size:.9rem;font-weight:600;color:var(--ink-2)}
.nu-week{font-size:.8rem;color:var(--ink-3)}
.nu-kind{display:flex;flex-direction:column;gap:8px;padding-bottom:12px;margin-bottom:2px;border-bottom:1px solid var(--line)}
.nu-kind-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:.78rem;color:var(--ink-3)}
.nu-kind-h b{font-size:.9rem;color:var(--ink)}
.nu-kind-h .textlink{padding:0;font-size:inherit}
.nu-kinds{display:flex;gap:8px}
.nu-kinds .chip{flex:1;min-width:0;min-height:44px;padding:6px 4px;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.nu-kinds .chip b{font-size:.86rem;font-weight:700}
.nu-kinds .chip small{font-size:.7rem;font-weight:500;opacity:.85}
.nu-kinds .chip[aria-busy="true"]{opacity:.6}
.nu-kind-n{font-size:.78rem;color:var(--ink-3)}
.nu-day{display:flex;flex-direction:column;gap:1px;padding:10px 14px;border-radius:14px;font-size:.8rem;color:var(--ink-2)}
.nu-day b{font-size:1rem;font-weight:700}
.nu-day.high{background:var(--high-wash);box-shadow:inset 0 0 0 2px var(--high)}
.nu-day.high b{color:var(--high)}
.nu-day.low{background:var(--low-wash);box-shadow:inset 0 0 0 2px var(--low)}
.nu-day.low b{color:var(--low)}
.nu-kinds .chip[data-kind="high"][aria-pressed="true"]{background:var(--high);color:var(--on-high)}
.nu-kinds .chip[data-kind="low"][aria-pressed="true"]{background:var(--low);color:var(--on-low)}
.nu-kind-n.over{color:var(--warn-ink,var(--ink-2));font-weight:600}
.nu-plain{font-size:.9rem;color:var(--ink-2)}
.nu-plain b{font-size:1.2rem;color:var(--ink)}
.nu-waitsum{display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--ink-2)}
.nu-waitsum svg{width:15px;height:15px;flex:none;color:var(--decor)}

.nu-side{gap:14px}
.nu-meter{display:flex;align-items:center;gap:10px}
.nu-meter-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.nu-meter-t b{font-size:.94rem;font-weight:600}
.nu-meter-t small{font-size:.78rem;color:var(--ink-3)}
.nu-meter-t .pbar{margin-top:3px;height:5px}
.nu-meter .btn.sm{padding:0 11px}
.nu-side > .textlink{align-self:flex-start;padding:0;font-size:.84rem}
.nu-wbtns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.nu-wbtns .btn.sm{width:100%;padding:0 6px}
.nu-extra{gap:3px}
.nu-extra b{font-size:.94rem;font-weight:600}

.nu-meals-h{padding-top:6px}
.nu-meal{gap:10px}
.nu-meal h3{font-size:1.02rem;color:var(--ink);letter-spacing:0}
.nu-meal-t{min-width:0}
.nu-meal .link{flex:none;align-self:center;padding:6px 10px}
.nu-meal .link svg,.nu-meals-h .link svg{width:15px;height:15px}
.nu-done{display:flex;align-items:center;gap:6px;font-size:.84rem;font-weight:600;color:var(--secondary-text)}
.nu-done svg{width:16px;height:16px;flex:none}
.nu-prog{display:flex;flex-direction:column;gap:5px}
.nu-prog .pbar{height:5px}
.nu-lines{display:flex;flex-direction:column}
.nu-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:6px 0;min-height:48px}
.nu-line + .nu-line{border-top:1px solid var(--line)}
.nu-line-t{min-width:0;display:flex;flex-direction:column;text-align:start;padding:2px 0}
.nu-line-t b{font-size:.94rem;font-weight:600}
.nu-line-t small{font-size:.78rem;color:var(--ink-3)}
.nu-line-t small svg{display:inline-block;width:13px;height:13px;vertical-align:-2px;color:var(--decor)}
button.nu-line-t{transition:opacity 120ms ease}
button.nu-line-t:active{opacity:.6}
.nu-kc{font-size:.9rem;font-weight:600;color:var(--ink-2);min-width:2.2em;text-align:end}
.nu-x{width:38px;height:38px;flex:none;border-radius:50%;display:grid;place-items:center;color:var(--ink-3);transition:background-color 120ms ease}
.nu-x:active{background:var(--tile-2)}
.nu-x svg{width:18px;height:18px}
.nu-x[aria-busy="true"]{opacity:.4;pointer-events:none}
.nu-line.wait b,.nu-opt.wait b{color:var(--ink-2)}
.nu-line.gone b{text-decoration:line-through;color:var(--ink-3)}
.nu-line.gone .btn.sm{min-height:36px;padding:0 12px;font-size:.84rem;grid-column:2 / span 2;justify-self:end}
.nu-add{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;padding:6px 2px;font-size:.9rem;font-weight:600;color:var(--secondary-text);transition:opacity 120ms ease}
.nu-add:active{opacity:.6}
.nu-adds{display:flex;flex-wrap:wrap;gap:4px 18px}
/* the shopping list */
.shop-note{margin:0 2px}
.shop-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px}
.shop-c{flex:none;width:26px;height:26px;border-radius:8px;border:2px solid var(--line-strong,var(--line));display:grid;place-items:center;color:var(--on-accent)}
.shop-c svg{width:16px;height:16px}
.shop-row.done .shop-c{background:var(--accent);border-color:var(--accent)}
.shop-row.done .row-t b{text-decoration:line-through;opacity:.55}
.nu-add svg{width:17px;height:17px}
.nu-foot{display:flex;flex-direction:column;gap:10px}
.nu-foot .btn.onbg{min-height:46px;font-size:.94rem}

.nu-guide{flex-direction:row;align-items:center;gap:12px}
.nu-guide-c{flex:none;width:44px;height:58px;border-radius:8px;overflow:hidden;display:grid;place-items:center;background:var(--wash);color:var(--secondary-text)}
.nu-guide-c img{width:100%;height:100%;object-fit:cover}
.nu-guide-c svg{width:22px;height:22px}
.nu-guide .row-t{flex:1}
.nu-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.nu-stats b{display:block;font-size:1.25rem;font-weight:700}
.nu-stats b small{font-size:.8rem;font-weight:600;color:var(--ink-3)}
.nu-stats span{font-size:.72rem;color:var(--ink-3)}

/* ---------- shared by the sheets ---------- */
.nu-center{text-align:center}
.hint.center{text-align:center}
.chip small{margin-inline-start:6px;font-size:.74rem;font-weight:500;opacity:.86}
label.btn{cursor:pointer;user-select:none;-webkit-user-select:none}
.nu-file.off{opacity:.5;pointer-events:none}
.nu-danger{color:var(--danger);display:inline-flex;align-items:center;gap:6px}
.nu-danger svg{width:16px;height:16px}

/* ---------- adding food ---------- */
.nu-tools{display:flex;gap:8px}
.nu-tools .btn{flex:1 1 0;min-width:0;padding:0 8px;font-size:.84rem;white-space:nowrap}
.nu-tools .btn svg{width:17px;height:17px}
.nu-recent{display:flex;flex-direction:column;align-items:flex-start;border-radius:12px;padding:6px 12px;text-align:start}
.nu-recent b{font-size:.84rem;font-weight:600;max-width:11rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nu-recent small{margin:0;font-size:.7rem}
.nu-recent[aria-busy="true"]{opacity:.5}
.nu-results{display:flex;flex-direction:column;min-height:140px}
.nu-results[aria-busy="true"]{opacity:.55}
.nu-results .eyebrow{padding:10px 2px 2px}
.nu-results .empty{padding:18px 8px}
.nu-results .sk{min-height:48px;margin-bottom:8px;background:var(--tile-2)}
.nu-res{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:50px;padding:8px 2px;text-align:start;transition:background-color 120ms ease}
.nu-res + .nu-res{border-top:1px solid var(--line)}
.nu-res:active{background:var(--tile-2)}
.nu-res[disabled]{opacity:.5;cursor:default}
.nu-res[aria-busy="true"]{opacity:.5}
.nu-res-t{min-width:0;display:flex;flex-direction:column}
.nu-res-t b{font-size:.97rem;font-weight:600}
.nu-res-t small{font-size:.78rem;color:var(--ink-3)}
.nu-more{display:flex;justify-content:center;padding:12px 0 4px}
.nu-more .btn{width:auto}

/* ---------- the portion ---------- */
.nu-pt{position:sticky;top:0;z-index:2;display:flex;flex-direction:column;gap:10px;background:var(--tile);padding-bottom:10px;margin-bottom:-4px}
.nu-result{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px;border-radius:14px;background:var(--tile-2);text-align:center}
.nu-result b{font-size:1.5rem;font-weight:800;line-height:1.15}
.nu-result span{font-size:.94rem;font-weight:600}
.nu-result span small{font-weight:500;color:var(--ink-3)}
.nu-result > small{font-size:.8rem;color:var(--ink-3)}
.nu-slotnote{font-size:.84rem;font-weight:600;color:var(--secondary-text)}
.nu-amts{display:flex;flex-wrap:wrap;gap:6px}
.nu-amt{min-width:44px;height:42px;padding:0 10px;border-radius:11px;background:var(--tile-2);font-size:1rem;font-weight:700;color:var(--ink-2);transition:background-color 120ms ease,color 120ms ease}
.nu-amt[aria-pressed="true"]{background:var(--accent);color:var(--on-accent)}
.nu-grams{display:flex;align-items:center;gap:8px}
.nu-grams span{flex:none;color:var(--ink-3)}
.nu-egg{display:flex;flex-direction:column;border-radius:12px;background:var(--tile-2);padding:4px 12px}
.nu-egg-r{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0}
.nu-egg-r + .nu-egg-r{border-top:1px solid var(--line)}
.nu-egg .stp{background:var(--tile)}
.nu-src{font-size:.84rem;color:var(--ink-3)}
.nu-src summary{cursor:pointer;padding:4px 0;font-weight:600}
.nu-src p{padding:2px 0}
.nu-fix .field{margin:6px 0 8px}
.nu-fix .hint{margin-bottom:10px}

/* ---------- a food written by hand ---------- */
.nu-keep{padding:4px 0}
.nu-total{text-align:center;font-size:.9rem;font-weight:600}

/* ---------- scans ---------- */
.nu-codeline{display:flex;gap:8px}
.nu-codeline .input{flex:1;min-width:0}
.nu-codeline .btn{flex:none;min-height:50px}
.nu-plate-h{display:flex;align-items:center;gap:12px}
.nu-plate-h img{flex:none;width:64px;height:64px;border-radius:12px;object-fit:cover}
.nu-plate-h b{font-size:1.5rem;font-weight:800}
.nu-plate{display:flex;flex-direction:column}
.nu-plate-r{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:8px 0}
.nu-plate-r + .nu-plate-r{border-top:1px solid var(--line)}
.nu-plate-r.nomatch{grid-template-columns:auto minmax(0,1fr) auto}
.nu-check{width:30px;height:30px;flex:none;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.8px var(--line-2);color:transparent;transition:background-color 120ms ease}
.nu-check svg{width:16px;height:16px}
.nu-check[aria-pressed="true"]{background:var(--accent);box-shadow:none;color:var(--on-accent)}
.nu-check[disabled]{opacity:.4}
.nu-plate-g{display:flex;align-items:center;gap:4px;font-size:.8rem;color:var(--ink-3)}
.nu-plate-g .input{width:68px;min-height:42px;padding:0 6px;text-align:center}

/* ---------- the trainer's menu ---------- */
.nu-tot{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;text-align:center}
.nu-tot div{padding:10px 4px;border-radius:12px;background:var(--tile-2)}
.nu-tot b{display:block;font-size:1.15rem;font-weight:700}
.nu-tot span{font-size:.7rem;color:var(--ink-3)}
.nu-mtab{display:flex;flex-direction:column;align-items:flex-start;gap:1px;border-radius:12px;padding:7px 12px;text-align:start}
.nu-mtab b{font-size:.84rem;font-weight:600;white-space:nowrap}
.nu-mtab small{margin:0;font-size:.7rem}
.nu-mealb{display:flex;flex-direction:column;gap:10px}
.nu-mealb h3{font-size:1.02rem;color:var(--ink);letter-spacing:0}
.nu-slot{border-radius:14px;background:var(--tile-2);padding:0 12px}
.nu-slot summary{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:8px;min-height:50px;cursor:pointer;list-style:none;user-select:none;-webkit-user-select:none}
.nu-slot summary::-webkit-details-marker{display:none}
.nu-slot summary b{font-size:.94rem}
.nu-slot summary .sub{min-width:0;text-align:end}
.nu-slot summary svg{width:16px;height:16px;color:var(--ink-3);transform:rotate(-90deg);transition:transform 160ms var(--ease-out)}
.nu-slot[open] summary svg{transform:rotate(90deg)}
.nu-slot .hint{padding-bottom:8px}
.nu-slot .btn.ghost{background:var(--tile)}
.nu-dot{display:inline-block;width:8px;height:8px;flex:none;border-radius:50%;background:var(--line-2)}
.nu-dot.k-protein{background:var(--accent)}
.nu-dot.k-carb{background:var(--secondary)}
.nu-dot.k-fat{background:var(--decor)}
.nu-opts{display:flex;flex-direction:column}
.nu-opt{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;padding:7px 0;min-height:52px;border-top:1px solid var(--line)}
.nu-opts > .nu-opt:first-child{border-top:0}
.nu-slot .nu-opts > .nu-opt:first-child{border-top:1px solid var(--line)}
.nu-opt-t{min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:start}
.nu-opt-t b,.nu-opt-n b{font-size:.92rem;font-weight:600}
.nu-opt-t small,.nu-opt-n small{font-size:.78rem;color:var(--ink-3)}
.nu-opt-n{display:flex;flex-direction:column;align-items:flex-start;text-align:start}
.nu-opt.picked .nu-opt-t b svg,.nu-opt .btn svg{display:inline-block;width:14px;height:14px;vertical-align:-2px}
.nu-opt.picked .nu-opt-t b svg{color:var(--secondary-text)}
.nu-opt.wait small svg{display:inline-block;width:13px;height:13px;vertical-align:-2px;color:var(--decor)}
button.nu-opt-t,.nu-opt-n{transition:opacity 120ms ease}
button.nu-opt-t:active,.nu-opt-n:active{opacity:.6}
.nu-opt .btn.sm{min-height:38px;padding:0 12px}
.nu-revert{padding:2px 0;font-size:.78rem;text-align:start}
.nu-sec{display:flex;flex-direction:column;gap:2px}
.nu-sec-h{display:inline-flex;align-items:center;gap:8px;font-size:.84rem;font-weight:700;color:var(--ink-2)}

/* ---------- the iPhone steps link ---------- */
.nu-copy{display:flex;align-items:center;gap:8px}
.nu-copy code{flex:1;min-width:0;padding:9px 10px;border-radius:10px;background:var(--tile-2);font-size:.78rem;overflow-wrap:anywhere}
.nu-copy .btn{flex:none}
.nu-howto{list-style:decimal;padding-inline-start:20px;display:flex;flex-direction:column;gap:8px;font-size:.9rem;color:var(--ink-2)}

@media (hover: hover) and (pointer: fine){
  .nu-res:not([disabled]):hover{background:var(--tile-2)}
  .nu-x:hover{background:var(--tile-2)}
  button.nu-line-t:hover b,button.nu-opt-t:hover b,.nu-opt-n:hover b{color:var(--secondary-text)}
}
@media (prefers-reduced-motion: reduce){
  .nu-slot summary svg{transition:none}
}

.home-day{align-self:flex-start;margin-top:4px}
