/* ═══════════════════════════════════════════════════════════════════════
   NUTRIENTS (on Fuel) — styles. Loaded by ironlog.html as nutr.css?v=N.
   Theme tokens only: --green for a target hit, --fuel-warn near / over a limit,
   --supp for what came from supplements, the accent for everything else.
   ═══════════════════════════════════════════════════════════════════════ */
.nu-ic { background: var(--green-soft); color: var(--green); }

/* ── Fuel home: one row under the summary ── */
.nu-strip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: -4px 0 12px; background: var(--bg2); border: var(--card-bw, 0) solid var(--card-border, transparent); border-radius: var(--radius); color: var(--text2); font: inherit; cursor: pointer; text-align: left; }
.nu-strip .nu-ic { width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nu-strip > svg { flex-shrink: 0; color: var(--text3); }
/* With targets set it's the summary card's last row (fuel.js _fuelSummaryHTML), not a card of its own. */
.fu-sum .nu-strip { margin: 0; padding: 10px 16px 0; background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.fu-sum .nu-strip .nu-ic { width: 26px; height: 26px; border-radius: 13px; }
.fu-sum .nu-strip .nu-ic svg { width: 14px; height: 14px; }
.nu-s { flex: 1; min-width: 0; display: flex; gap: 12px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.nu-c { display: flex; align-items: baseline; gap: 3px; }
.nu-c em { font-style: normal; color: var(--text2); margin-right: 2px; }
.nu-c b { color: var(--text); font-variant-numeric: tabular-nums; }
.nu-c.w b { color: var(--fuel-warn); }
.nu-c.w::after { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--fuel-warn); align-self: center; margin-left: 3px; }
.nu-c.ok b { color: var(--green); }
.nu-more { font-size: 11px; font-weight: 700; color: var(--text3); background: var(--bg3); border-radius: 9px; padding: 2px 6px; flex-shrink: 0; }

/* ── Sheet ── */
.nu-sheet { height: auto; max-height: calc(100% - 40px - env(safe-area-inset-top)); }
.nu-sh { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.nu-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: max(30px, calc(env(safe-area-inset-bottom) + 16px)); }
.nu-seg { margin: 0; }
.nu-card { background: var(--bg3); border-radius: var(--radius); padding: 14px 14px 6px; }
.nu-card .sec-t { margin-bottom: 2px; }
.nu-note { font-size: 12.5px; color: var(--text2); line-height: 1.45; padding: 0 2px; }
.nu-note-c { background: var(--bg3); border-radius: 10px; padding: 10px 12px; color: var(--text); }
.nu-foot { font-size: 12px; color: var(--text3); line-height: 1.45; padding: 4px 2px 8px; }
.nu-lead { font-size: 13.5px; color: var(--text2); line-height: 1.45; }
.nu-lead b { color: var(--text); }
.nu-link, .nu-inl { background: none; border: none; font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.nu-link { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: 13px; padding: 6px 0; }
.nu-inl { font-size: inherit; }

/* A nutrient row: name, amount, target, bar */
.nu-r { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 9px 0; background: none; border: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.nu-h { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.nu-h .n { flex: 1; min-width: 0; }
.nu-h .n small { font-size: 11.5px; color: var(--text3); margin-left: 4px; }
.nu-h b { font-variant-numeric: tabular-nums; }
.nu-h b.warn { color: var(--fuel-warn); }
.nu-h b.ok { color: var(--green); }
.nu-h .of { font-size: 12px; color: var(--text2); white-space: nowrap; }
.nu-h > svg { color: var(--text3); align-self: center; }
.nu-bar { position: relative; height: 6px; border-radius: 3px; background: var(--fuel-track); display: flex; gap: 2px; }
.nu-bar i { display: block; height: 100%; border-radius: 3px; }
.nu-bar-l { height: 10px; border-radius: 5px; margin-top: 12px; }
.nu-bar-l i { border-radius: 5px; }
.nu-lim { position: absolute; top: -3px; width: 2px; height: calc(100% + 6px); border-radius: 1px; background: var(--text); opacity: .55; }
.nu-leg { display: flex; gap: 14px; font-size: 12px; color: var(--text2); padding: 8px 0 6px; }
.nu-leg span { display: flex; align-items: center; gap: 6px; }
.nu-leg i { width: 8px; height: 8px; border-radius: 4px; }

/* "N foods have no nutrient data" */
.nu-cov { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: 11px 12px; font: inherit; font-size: 12.5px; color: var(--text2); line-height: 1.35; text-align: left; cursor: pointer; }
.nu-cov b { color: var(--text); }
.nu-cov > svg { flex-shrink: 0; color: var(--fuel-warn); }
.nu-cov > span:nth-child(2) { flex: 1; }
.nu-go { display: flex; color: var(--text3); }

/* ── Detail ── */
.nu-big { display: flex; align-items: baseline; gap: 8px; }
.nu-big b { font-size: 42px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.nu-big span { font-size: 15px; font-weight: 600; color: var(--text2); }
.nu-big em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--text2); white-space: nowrap; }
.nu-big em.ok { color: var(--green); }
.nu-big em.warn { color: var(--fuel-warn); }
.nu-src { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.nu-card .sec-t + .nu-src { border-top: none; }
.nu-src .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nu-src .n small { display: block; font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; }
.nu-src b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nu-dot, .nu-pill { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.nu-dot { background: var(--bg4, var(--bg2)); }
.nu-dot svg, .nu-dot img { width: 18px; height: 18px; }
.nu-pill { background: var(--supp-soft); color: var(--supp); }
.nu-sec-btn { width: 100%; background: none; border-top: none; border-left: none; border-right: none; font: inherit; cursor: pointer; padding-left: 0; padding-right: 0; text-align: left; }
.nu-sec-btn:disabled { cursor: default; color: inherit; opacity: 1; }
.nu-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; position: relative; margin-top: 6px; }
.nu-week i { display: block; border-radius: 4px 4px 2px 2px; background: var(--accent); }
.nu-week i.hit { background: var(--green); }
.nu-week i.warn { background: var(--fuel-warn); }
.nu-week i.nu-wk-none { height: 3px; background: var(--fuel-track); }
.nu-tl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--text3); pointer-events: none; }
.nu-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; font-size: 11px; color: var(--text3); text-align: center; margin: 4px 0 8px; }
.nu-why { font-size: 12.5px; color: var(--text2); line-height: 1.45; }

/* ── Not counted ── */
.nu-item { padding: 10px 0 12px; border-top: 1px solid var(--border); }
.nu-card .sec-t + .nu-item { border-top: none; }
.nu-top { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.nu-top .nu-dot { width: 32px; height: 32px; border-radius: 16px; }
.nu-top .n { flex: 1; min-width: 0; }
.nu-top .n small { display: block; font-size: 12px; color: var(--text2); margin-top: 1px; }
.nu-top b { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text2); font-weight: 600; white-space: nowrap; }
.nu-why2 { font-size: 12.5px; color: var(--text2); line-height: 1.4; margin: 8px 0 10px 42px; }
.nu-acts { margin-left: 42px; display: flex; gap: 8px; }
.nu-acts > button, .nu-acts > label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 0; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nu-acts .pri { background: var(--primary); color: var(--on-accent); border: none; }
.nu-acts .sec { background: var(--bg2); color: var(--text); border: 1px solid var(--border); }
.nu-acts .busy, .nu-read.busy { opacity: .6; pointer-events: none; }
.nu-acts > button svg, .nu-acts > label svg { width: 15px; height: 15px; }
.nu-sw { display: flex; align-items: center; gap: 12px; font-size: 14px; padding: 4px 0 10px; cursor: pointer; }
.nu-sw > span:first-child { flex: 1; }
.nu-sw small { display: block; font-size: 12px; color: var(--text2); margin-top: 2px; line-height: 1.35; }

/* ── A food's / supplement's numbers ── */
.nu-read { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0; border-radius: 10px; border: 1px dashed var(--border); background: var(--bg2); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.nu-fields { display: flex; flex-direction: column; }
.nu-card.nu-fields { padding-bottom: 8px; }
.nu-f { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 14px; }
.nu-f:first-child { border-top: none; }
.nu-f > span { flex: 1; min-width: 0; }
.nu-f small { display: block; font-size: 11.5px; color: var(--text3); }
.nu-f input { width: 76px; text-align: right; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: inherit; font-size: 16px; }
.nu-f em { font-style: normal; font-size: 13px; color: var(--text2); width: 30px; }
.nu-sf { background: var(--bg3); border-radius: var(--radius); padding: 14px 14px 8px; margin-top: 14px; }
.nu-sf .sec-t { margin-bottom: 2px; }
.nu-sf .nu-acts-sf { margin: 8px 0 4px; }
.nu-sf .nu-addk { margin: 4px 0 6px; }
.nu-sf .sp-setrow { margin-top: 8px; }

/* ── Daily targets: the Nutrients card ── */
.nu-tgt { display: flex; flex-direction: column; }
.nu-tgt .wa-tgt-hd { margin-bottom: 4px; }
.nu-tgt .wa-tgt-ft { margin: 10px -16px 0; padding: 10px 16px 0; border-top: 1px solid var(--border); font-size: 12px; color: var(--text2); line-height: 1.5; }
.nu-grp { font-size: 12px; color: var(--text2); padding: 12px 0 4px; }
.nu-tr { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.nu-tr .n { flex: 1; min-width: 0; font-size: 14px; }
.nu-tr .n small { display: block; font-size: 11.5px; color: var(--text2); margin-top: 1px; }
.nu-tr > b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nu-tr > b em { font-style: normal; font-weight: 500; color: var(--text2); font-size: 12px; margin-right: 3px; }
.nu-tr.off .n, .nu-tr.off > b, .nu-tr.off .nu-tv { opacity: .45; }
.nu-tv { display: flex; align-items: center; gap: 5px; }
.nu-tv input { width: 70px; text-align: right; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: inherit; font-size: 16px; }
.nu-tv em { font-style: normal; font-size: 12px; color: var(--text2); width: 26px; }
.nu-ft2 { margin-top: 4px; color: var(--text3); }
.nu-c[hidden], .nu-more[hidden] { display: none; }
