/* NeuForm Nutrition Lab · approved direction4 · presentation only.
   Preserve the current deployed DOM/modules and all access/data/safety states.
   Scope: the Nutrition workspace and its own page-local portal surfaces. */

#nf #neuform-lab,
.nf-welcome-runtime-host,
#nf-nutrition-runtime-status,
#nf-auth-gate,
#nf-upgrade-modal {
  --nfn-ink: #092332;
  --nfn-page: #0b2535;
  --nfn-panel: #103344;
  --nfn-inset: #08212f;
  --nfn-ice: #c2e8fa;
  --nfn-text: #edf7fc;
  --nfn-muted: #b4cddc;
  --nfn-subtle: #94b4c8;
  --nfn-rule: #a1c7dd38;
  --nfn-line: #63889f;
  --nfn-radius: 8px;
  --nfn-ease: cubic-bezier(.22,.68,0,1);
  color: var(--nfn-text) !important;
  font-family: Inter, "NeuForm Inter", system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55;
  font-synthesis: none;
}

#nf #neuform-lab {
  width: min(1320px, 100%) !important;
  max-width: 1320px !important;
  margin-inline: auto;
  padding: 22px 28px 48px !important;
  color-scheme: dark;
}
#nf #neuform-lab :is(*, *::before, *::after) { box-sizing: border-box; }
#nf #neuform-lab :is(.row,.field,.left,.head,.actions,.nf-scroll-container,[data-nl-visual-root]) { min-width: 0; }
#nf #neuform-lab :is(h1,h2,h3,h4,p,legend) { overflow-wrap: break-word; }
#nf #neuform-lab :is(h1,h2,h3,h4) { color: var(--nfn-text) !important; }
#nf #neuform-lab :is(h1,h2) { font-size: clamp(24px,2.3vw,30px) !important; line-height: 1.15; font-weight: 650 !important; letter-spacing: -.035em !important; }
#nf #neuform-lab h3 { font-size: 18px !important; line-height: 1.3; font-weight: 650 !important; letter-spacing: -.02em !important; }
#nf #neuform-lab h4 { font-size: 15px !important; line-height: 1.4; font-weight: 650 !important; }
#nf #neuform-lab :is(.lede,.muted,.nf-muted,.goal-help,.protein-help,.hydr-help,.macro-help,.wp-help,.mp-help,.pp-muted,.wp-muted,.mp-muted,.nf-subcopy) { color: var(--nfn-muted) !important; }
#nf #neuform-lab :is(.lede,.nf-subcopy) { font-size: 13px !important; line-height: 1.65; max-width: 72ch; }
#nf #neuform-lab :is(.field>label,label.nf-label,.nf-label) { color: #c6dce9 !important; font-size: 12px !important; line-height: 1.5; font-weight: 600 !important; }

/* One workspace rail, followed by the active task. Existing navigation owns state. */
:is(#nf #neuform-lab,.nf-welcome-runtime-host) :is([data-nf-welcome],.get-started-hub) {
  border: 1px solid var(--nfn-rule) !important;
  border-radius: 4px!important;
  background: #102f40!important;
  box-shadow: none!important;
}
:is(#nf #neuform-lab,.nf-welcome-runtime-host) #nf-welcome-title { font-size: 27px !important; line-height: 1.15; font-weight: 650 !important; letter-spacing: -.035em !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) :is([data-nl-nav],[data-nl-group-active]) { scrollbar-width: thin; scrollbar-color: #567c92 transparent; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) [data-nl-nav] { gap: 5px; border-color: var(--nfn-rule) !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) button[data-nl-workspace-target] { min-height: 44px; padding: 10px 17px; border-radius: 6px !important; font-size: 13px !important; line-height: 1.4; font-weight: 600 !important; transition: color .16s,background-color .16s,border-color .16s; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) button[data-nl-workspace-target][aria-selected="true"],
:is(#nf #neuform-lab,.nf-welcome-runtime-host) button[data-nl-workspace-target][aria-pressed="true"] { color: var(--nfn-ink) !important; background: var(--nfn-ice) !important; border-color: #daf2ff !important; box-shadow: inset 0 1px 0 #fff8,0 3px 9px #0002 !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) :is([data-nl-recommendation],[data-nl-resume]) { background: #c2e8fa07 !important; border-color: var(--nfn-rule) !important; border-radius: 4px!important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) [data-nl-next-title] { font-size: 11px !important; font-weight: 650 !important; color: var(--nfn-subtle) !important; letter-spacing: .035em !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) [data-nl-next-reason] { font-size: 13px !important; color: var(--nfn-muted) !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) [data-nl-target-overview] { gap: 8px; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) .nf-target-metric { min-height: 94px; border: 1px solid var(--nfn-rule) !important; border-radius: 4px!important; background: #092332b3 !important; padding: 13px; box-shadow: none!important; text-align: left; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) .nf-target-metric:hover { border-color: #9bc7df !important; background: #173d50 !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) .nf-target-metric-label { color: var(--nfn-muted) !important; font-size: 11px !important; font-weight: 550 !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) .nf-target-metric-value { color: var(--nfn-ice) !important; font-size: 21px !important; line-height: 1.2; font-weight: 650 !important; letter-spacing: -.025em !important; font-variant-numeric: tabular-nums; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host) :is(.nf-target-metric-state,.nf-target-optional,.nf-target-draft) { font-size: 10px !important; line-height: 1.5; }

/* Eleven real tools share the same form/result/disclosure language. */
#nf #neuform-lab :is(#tdee-tool,#goal-tool,#protein-tool,#macro-tool,#hydration-tool,#week-planner-tool,#meal-planner-tool,#meal-prep-planner-tool,#pantry-tool,#recipe-generator-tool,#progress-tool) {
  width:100% !important;
  max-width:1120px !important;
  margin-inline:auto !important;
  padding:0 !important;
  border-color: var(--nfn-rule) !important;
  border-radius: 4px!important;
  background: #0b2939ed !important;
  box-shadow: none!important;
  scroll-margin-top: calc(var(--nf-lab-sticky-top,76px) + 16px);
}
#nf #neuform-lab :is(.card>.head,[data-nl-tool-header]) { padding: 18px 20px; grid-column:1/-1 !important; width:100% !important; border-color: var(--nfn-rule) !important; background: #12354770 !important; }
#nf #neuform-lab :is(.card>.head h2,[data-nl-tool-header] h2) { margin: 0; font-size: 25px !important; line-height: 1.2; font-weight: 650 !important; letter-spacing: -.035em !important; }
#nf #neuform-lab :is(.nf-scroll-container,.wp-panel-body,.mp-panel-body,.pp-panel-body) { scrollbar-color: #567c92 transparent; scrollbar-width: thin; }
#nf #neuform-lab :is(.wp-panel,.mp-panel,.pp-panel,.goal-source-card,.protein-source-card,.macro-source-card,.macro-target-card,.hydr-context-card,.nf-pantry-panel,.pd-panel) { border-color: var(--nfn-rule) !important; border-radius: 4px!important; background-color: #092332a6 !important; box-shadow: none !important; }
#nf #neuform-lab :is(.wp-panel-head,.mp-panel-head,.pp-panel-head,.nf-pantry-subhead) { border-color: var(--nfn-rule) !important; }
#nf #neuform-lab :is(.wp-summary-card,.mp-metric,.wp-metric,.pp-summary-card,.goal-metric,.pd-metric) { border-color: var(--nfn-rule) !important; border-radius: 4px!important; background: #c2e8fa05 !important; box-shadow: none !important; }
#nf #neuform-lab :is(.nf-result-shell,.result-card,.nf-calc-summary,[data-nl-result-summary-host]) { border-color: #8fc4df66 !important; border-radius: 4px!important; background: #102f40!important; box-shadow: none!important; }
#nf #neuform-lab :is(.nf-result-metric-value,.goal-target-value,.protein-target-value,.macro-card-value,.pd-metric-value) { color: var(--nfn-ice) !important; font-size: clamp(25px,2.7vw,34px) !important; font-weight: 650 !important; line-height: 1.13; letter-spacing: -.035em !important; font-variant-numeric: tabular-nums; }
#nf #neuform-lab :is(.nf-result-title,.goal-result-title,.protein-result-title) { font-size: 19px !important; font-weight: 650 !important; line-height: 1.3; }
#nf #neuform-lab :is(.nf-result-badge,.goal-status-badge,.macro-source-pill,.protein-source-pill,.unit-chip) { border-color: var(--nfn-rule) !important; color: #d0e8f5 !important; background: #c2e8fa09 !important; border-radius: 5px !important; font-size: 11px !important; line-height: 1.4; }
#nf #neuform-lab :is(.nf-calc-summary__facts,.nf-target-impact-board) { gap: 10px; }
#nf #neuform-lab :is(.nf-target-impact-board>li,.mp-reconcile-card) { border-color: var(--nfn-rule) !important; border-radius: 6px !important; background: #08212f88 !important; }

/* Form dimensions retain native labels, validity, disabled and access states. */
#nf #neuform-lab :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--nfn-line) !important;
  border-radius: 6px !important;
  background-color: var(--nfn-inset) !important;
  color: var(--nfn-text) !important;
  font: inherit;
  font-size: 14px !important;
  line-height: 1.4;
  box-shadow: none!important;
  padding: 10px 12px;
  transition: border-color .15s,box-shadow .15s;
}
#nf #neuform-lab textarea { min-height: 96px; resize: vertical; }
#nf #neuform-lab :is(input,textarea)::placeholder { color: #91afc2 !important; opacity: 1; }
#nf #neuform-lab :is(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color: var(--nfn-ice); }
#nf #neuform-lab :is(input[aria-invalid="true"],select[aria-invalid="true"],textarea[aria-invalid="true"]) { border-color: #f1a9ab !important; box-shadow: 0 0 0 1px #f1a9ab55 !important; }
#nf #neuform-lab :is(.err,.goal-field-error,.protein-field-error,.hydr-field-error) { color: #ffc4c7 !important; font-size: 12px !important; line-height: 1.55; }
#nf #neuform-lab :is(.nf-result-warning,.goal-warning,.protein-warning,.hydr-warning,.goal-stale-callout) { border-color: #d8b66a70 !important; color: #f2d9a2 !important; background-color: #483b1c38 !important; }

:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(button,a.btn,.btn) { font-family: inherit !important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(.btn,button[data-nl-next-action],button[data-nl-sticky-cta]) {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 6px !important;
  font-size: 13px !important;
  line-height: 1.4;
  font-weight: 600 !important;
  letter-spacing: -.005em !important;
  transition: transform .16s var(--nfn-ease),border-color .16s,background-color .16s,box-shadow .16s;
}
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(.btn.primary,.btn-primary,button[data-nl-next-action],button[data-nl-sticky-cta]) { color: #102f40!important; background: #c9e5f3!important; border: 1px solid #dcf3ff !important; box-shadow: 0 18px 48px #0008!important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(.btn.ghost,.btn.secondary) { color: #d8edf9 !important; background: #c2e8fa05 !important; border: 1px solid #63889f !important; box-shadow: 0 18px 48px #0008!important; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(.btn.primary,.btn.ghost,.btn.secondary):hover:not(:disabled) { border-color: #d9f3ff !important; box-shadow: inset 0 1px 0 #fff5,0 6px 16px #0003 !important; transform: translateY(-1px); }
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(.btn,button[data-nl-next-action]):active:not(:disabled) { transform: translateY(1px); }
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid #c2e8fa; outline-offset: 3px; }
:is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(button:disabled,input:disabled,select:disabled,textarea:disabled) { opacity: .58; cursor: not-allowed; transform: none; }
#nf #neuform-lab :is([role="tab"],.nf-tab-btn,.nf-pantry-tab) { min-height: 44px; padding: 10px 15px; font-size: 12px !important; font-weight: 600 !important; border-radius: 5px !important; }
#nf #neuform-lab :is([role="tab"],.nf-tab-btn,.nf-pantry-tab)[aria-selected="true"] { color: #092332 !important; background: #c2e8fa !important; border-color: #dcf3ff !important; }
#nf #neuform-lab details { border-color: var(--nfn-rule) !important; }
#nf #neuform-lab summary { min-height: 44px; padding-block: 11px; color: #d1e8f5 !important; font-size: 13px !important; line-height: 1.5; font-weight: 600 !important; cursor: pointer; }
#nf #neuform-lab summary::marker { color: #b0d9ef !important; }
#nf #neuform-lab :is(table,.nf-table) { font-size: 12px !important; line-height: 1.5; font-variant-numeric: tabular-nums; }
#nf #neuform-lab :is(th,td) { border-color: var(--nfn-rule) !important; }
#nf #neuform-lab th { color: #c6dce9 !important; font-weight: 600 !important; }

/* Portal styling is explicitly limited to this owning Nutrition page. */
body:has(#nf #neuform-lab) :is(#nf-auth-gate,#nf-upgrade-modal) :is(.nf-modal-card,.nf-auth-gate__card,.nf-modal-dialog) { border-color: #779eb766 !important; border-radius: 6px!important; background: #102f40!important; box-shadow: 0 18px 48px #0008!important; }
body:has(#nf #neuform-lab) #nf-data-dialog { max-width: min(840px,calc(100vw - 28px)); color: #f0f6fa!important; border: 1px solid #789fb766 !important; border-radius: 6px!important; background: #0a202c!important; font-family: Inter,"NeuForm Inter",system-ui,sans-serif !important; }

@keyframes nf-nutrition-result-in { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
#nf #neuform-lab :is(.result-card,[data-nl-result-summary-host],[role="tabpanel"]):not([hidden]) { animation: nf-nutrition-result-in .18s var(--nfn-ease) both; }

@media(max-width:760px) {
  #nf #neuform-lab { padding: 14px 14px 36px !important; }
  #nf #neuform-lab :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {font-size:16px !important;}
  #nf #neuform-lab #nf-welcome-title { font-size: 24px !important; }
  #nf #neuform-lab :is(h1,h2,.card>.head h2,[data-nl-tool-header] h2) { font-size: 24px !important; }
  #nf #neuform-lab :is(.card>.head,[data-nl-tool-header]) { padding: 15px; }
  #nf #neuform-lab button[data-nl-workspace-target] { padding-inline: 13px; font-size: 12px !important; }
  #nf #neuform-lab .nf-target-metric { min-height: 88px; padding: 11px; }
  #nf #neuform-lab .nf-target-metric-value { font-size: 20px !important; }
  #nf #neuform-lab :is(.actions,.wp-actions,.mp-actions,.nf-calc-summary__actions) { gap: 8px; flex-wrap: wrap; }
  #nf #neuform-lab :is(.wp-panel,.mp-panel,.pp-panel) { min-width: 0; }
}
@media(prefers-reduced-motion:reduce) {
  #nf #neuform-lab *,#nf #neuform-lab *::before,#nf #neuform-lab *::after,
  .nf-welcome-runtime-host *,.nf-welcome-runtime-host *::before,.nf-welcome-runtime-host *::after,
  #nf-auth-gate *,#nf-upgrade-modal * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  :is(#nf #neuform-lab,.nf-welcome-runtime-host,#nf-auth-gate,#nf-upgrade-modal) :is(.btn,button[data-nl-next-action]):is(:hover,:active) { transform: none; }
}

/* Actual portal/recovery owners found in the current runtime. */
#nf-nutrition-runtime-status {width:calc(100% - 28px) !important;max-width:1120px !important;margin:12px auto !important;padding:12px 16px !important;border:1px solid #779eb755 !important;border-radius:8px !important;background:#103344 !important;box-shadow:inset 0 1px #d6f1ff12 !important;font-size:13px !important;line-height:1.55;}
#nf-nutrition-runtime-status p {margin:0 !important;font-size:13px !important;line-height:1.55;color:#c6dfed !important;}
#nf #neuform-lab :is(.nl-field-note,.nl-method-note,.nl-input-group-note,.field>p) {font-size:13px !important;line-height:1.55 !important;color:#a5bfcd!important;}
#nf #neuform-lab {--nf-nl-ink:#f0f6fa!important;--nf-nl-muted:#b4cddc !important;--nf-nl-accent:#c9e5f3!important;--nf-nl-line:#a1c7dd38 !important;--nf-nl-line-strong:#63889f !important;--nf-nl-surface:#0a202c!important;}
body:has(#neuform-lab) :is(dialog[id^=nf-],[role=dialog][id^=nf-]) {font-family:Inter,"NeuForm Inter",system-ui,sans-serif;color:#f0f6fa;max-width:min(840px,calc(100vw - 28px));}
@media(max-width:760px){#nf #neuform-lab :is(.nl-field-note,.nl-method-note,.nl-input-group-note,.field>p){font-size:14px !important;}#nf-nutrition-runtime-status{font-size:12px !important;padding:11px 13px !important;}}
