/* Nutrition totals. Loaded after ../mental-health-meditation/meditation.css (same pattern as the sleep guide and the disclaimer).
   One indigo family (#3F43A0 on #E8EAF6) for bars; no red/amber/green, no good/bad coding. Plain build: visual refinements are the Dashboard Designer's call. */
:root {
  --nt-ink: #1B1F3B; --nt-sec: #4A4F66; --nt-band: #3F43A0; --nt-track: #E8EAF6; --nt-outline: #595E78; --nt-line: #b9c7cf;
}
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, .nt-scroll:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
button, input, select { font-family: inherit; }
main { width: min(1040px, calc(100% - 48px)); }
main p, main li { line-height: 1.6; color: var(--nt-ink); overflow-wrap: anywhere; }
main h1 { margin-bottom: 8px; }
main h2 { font-size: 30px; margin: 32px 0 12px; }
main h3 { font-size: 24px; margin: 24px 0 10px; font-weight: 400; color: var(--navy); }
main h4 { font-size: 19px; margin: 0; font-weight: 700; color: var(--nt-ink); }
.nt-subtitle { margin: 0 0 12px; font-size: 22px; color: var(--nt-sec); }
.nt-edu { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: var(--nt-ink); }
.nt-small { margin: 4px 0; font-size: 15px; color: var(--nt-sec); }
.nt-note { margin: 8px 0; font-size: 16px; }
.nt-empty { margin: 8px 0; padding: 18px; border: 2px dashed var(--nt-outline); text-align: center; }

/* JS / no-JS views: nav.js adds the "js" class to <html> before first paint */
.nt-app { display: none; }
.js .nt-app { display: block; }
.js .nt-nojs { display: none; }
.nt-nojs { margin: 18px 0; }

/* gate */
.nt-gate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 10px; padding: 18px 20px; background: var(--ice); border-left: 8px solid var(--navy); }
.nt-q-label { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.nt-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.nt-radio { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; background: #fff; color: var(--nt-ink); border: 2px solid var(--nt-outline); border-radius: 4px; font-size: 18px; cursor: pointer; text-align: left; }
.nt-radio-dot { flex: 0 0 auto; width: 22px; height: 22px; border: 2px solid var(--nt-outline); border-radius: 50%; background: #fff; display: grid; place-content: center; }
.nt-radio[aria-checked="true"] { border-color: var(--nt-ink); box-shadow: inset 0 0 0 1px var(--nt-ink); font-weight: 700; }
.nt-radio[aria-checked="true"] .nt-radio-dot { background: var(--navy); border-color: var(--navy); }
.nt-radio[aria-checked="true"] .nt-radio-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.nt-privacy { margin: 10px 0 24px; padding: 14px 18px; background: #f2f2f2; border-left: 6px solid var(--nt-outline); font-size: 16px; }

/* steps */
.nt-searchrow label, .nt-field label { display: block; margin: 0 0 4px; font-size: 17px; font-weight: 700; }
#nt-search, #nt-amount, #nt-portion { width: 100%; min-height: 48px; padding: 8px 12px; font-size: 18px; color: var(--nt-ink); background: #fff; border: 2px solid var(--nt-outline); border-radius: 4px; }
.nt-state { margin: 6px 0; font-size: 16px; color: var(--nt-sec); }
.nt-results { list-style: none; margin: 10px 0; padding: 0; max-height: 440px; overflow-y: auto; border: 1px solid var(--nt-line); background: #fff; }
.nt-result { padding: 8px 12px; border-bottom: 1px solid #d5dde2; }
.nt-result:last-child { border-bottom: 0; }
.nt-pick { display: block; width: 100%; min-height: 44px; padding: 6px 4px; text-align: left; background: none; border: 0; color: var(--nt-ink); font-size: 18px; text-decoration: underline; cursor: pointer; }
.nt-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 14px; color: var(--nt-sec); }
.nt-tagchip { padding: 0 8px; border: 1.5px solid var(--nt-band); border-radius: 10px; color: var(--nt-ink); background: #fff; font-weight: 700; }
.nt-badge { display: block; margin: 2px 0 0; font-size: 14px; color: var(--nt-sec); }
.nt-add { margin: 14px 0; padding: 16px 18px; background: var(--ice); border-left: 8px solid var(--navy); }
.nt-add-name { margin: 0 0 6px; font-size: 22px; }
.nt-addrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 10px; }
.nt-gramsonly { display: block; margin-top: 4px; font-size: 15px; color: var(--nt-sec); }
.nt-src { margin: 6px 0; font-size: 14px; color: var(--nt-sec); }
.nt-src a { color: var(--nt-ink); }
.nt-msg { margin: 8px 0 0; font-weight: 700; }
.nt-btn { min-height: 48px; padding: 8px 22px; background: var(--navy); color: #fff; border: 2px solid var(--navy); font-size: 18px; border-radius: 4px; cursor: pointer; }
.nt-btn:hover { background: var(--ink); }
.nt-btn-quiet { background: #fff; color: var(--nt-ink); border-color: var(--nt-ink); }
.nt-btn-quiet:hover { background: var(--nt-ink); color: #fff; }
.nt-linkbtn { min-height: 44px; padding: 4px 2px; background: none; border: 0; color: var(--nt-ink); font-size: 16px; text-decoration: underline; cursor: pointer; }
.nt-listhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.nt-list-table, .nt-table, .nt-amdr, .nt-dvtable { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; }
.nt-list-table caption, .nt-table caption, .nt-amdr caption, .nt-dvtable caption { text-align: left; padding: 10px 12px; font-size: 17px; background: #f2f2f2; border-bottom: 1px solid var(--nt-line); }
.nt-list-table th, .nt-list-table td, .nt-table th, .nt-table td, .nt-amdr th, .nt-amdr td, .nt-dvtable th, .nt-dvtable td { padding: 8px 12px; border-bottom: 1px solid #d5dde2; text-align: left; vertical-align: top; color: var(--nt-ink); }
.nt-list-table thead th, .nt-table thead th, .nt-amdr thead th, .nt-dvtable thead th { background: var(--nt-ink); color: #fff; }
.nt-list-table tbody th, .nt-table tbody th, .nt-amdr tbody th, .nt-dvtable tbody th { background: var(--ice); font-weight: 700; }
.nt-entry-name { display: block; font-weight: 700; overflow-wrap: anywhere; }
.nt-list-table th, .nt-list-table td { overflow-wrap: anywhere; }
#nt-list { max-width: 100%; overflow-x: auto; }
.nt-list-table th:nth-child(2), .nt-list-table td:nth-child(2),
.nt-list-table th:nth-child(3), .nt-list-table td:nth-child(3) { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.nt-entry-note { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--nt-sec); }
.nt-showrow { margin: 22px 0 8px; }
#nt-gatemsg { margin: 12px 0 0; padding: 0; font-size: 18px; }
#nt-gatemsg:not(:empty) { padding: 12px 16px; background: var(--nt-track); border-left: 6px solid var(--nt-band); }

/* totals */
.nt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 14px 0; }
.nt-card { padding: 14px 16px; background: var(--ice); border-top: 6px solid var(--navy); min-width: 0; }
.nt-card-name { margin: 0; font-size: 17px; font-weight: 700; }
.nt-card-val { margin: 2px 0 6px; font-size: 26px; line-height: 1.25; }
.nt-miss, .nt-zero { margin: 4px 0; font-size: 15px; }
.nt-calctl { margin: 6px 0 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.nt-calctl p { margin: 0; flex: 1 1 320px; }
.nt-details { margin: 10px 0; border: 1px solid var(--nt-line); background: #fff; }
.nt-details summary { min-height: 44px; padding: 10px 14px; font-size: 16px; font-weight: 700; cursor: pointer; color: var(--nt-ink); }
.nt-details > :not(summary) { margin-left: 14px; margin-right: 14px; }
.nt-details > :last-child { margin-bottom: 14px; }
.nt-blurb { font-size: 16px; }
.nt-quote { margin: 8px 14px; padding: 6px 14px; border-left: 4px solid var(--nt-outline); font-size: 16px; color: var(--nt-ink); }
.nt-split-svg { display: block; width: 100%; height: 36px; margin: 8px 0; }
.nt-split-list { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 6px 0; padding: 0; list-style: none; font-size: 18px; font-weight: 700; }
.nt-rows { list-style: none; margin: 10px 0; padding: 0; }
.nt-row { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--nt-line); background: #fff; }
.nt-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.nt-row-val { margin: 0; font-size: 20px; }
.nt-row-pct { font-size: 18px; font-weight: 700; margin-left: auto; }
.nt-row-alt { margin: 6px 0; font-size: 16px; }
.nt-bar { display: block; width: 100%; height: 14px; margin: 6px 0 4px; overflow: visible; }
.nt-bar-track { fill: var(--nt-track); stroke: var(--nt-outline); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.nt-bar-fill { fill: var(--nt-band); }
.nt-ul { margin: 8px 0; padding: 10px 14px; border: 2px solid var(--nt-outline); background: #fff; font-size: 16px; }
.nt-misslist { margin: 4px 0; padding: 8px 12px; background: #f2f2f2; font-size: 15px; }
.nt-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--nt-line); }
.nt-table { min-width: 720px; }
.nt-table-wrap.is-collapsed { display: none; }
.nt-tableview .nt-table-wrap { margin-top: 12px; }
.nt-pointers { margin: 18px 0; }

/* support block: static, always visible */
.nt-support { margin: 30px 0 16px; padding: 18px 22px; background: var(--ice); border-left: 8px solid var(--navy); }
.nt-support h2 { margin-top: 0; font-size: 26px; }
.nt-support ul { margin: 8px 0 0; padding-left: 22px; }
.nt-support li { margin: 4px 0; }
.nt-support a, .nt-foot a, .nt-sources a { color: var(--nt-ink); }
.nt-foot, .nt-sources { margin: 24px 0; }
.nt-foot p, .nt-sources li { font-size: 16px; }
.nt-sources h2 { font-size: 26px; }

@media (max-width: 560px) {
  .nt-list-table th, .nt-list-table td { padding: 6px 6px; font-size: 15px; }
  .nt-list-table .nt-btn { min-height: 44px; min-width: 44px; padding: 6px 8px; font-size: 15px; white-space: nowrap; }
}
@media (max-width: 720px) {
  main { width: min(1040px, calc(100% - 32px)); }
  main h1 { font-size: 36px; }
  .nt-gate { grid-template-columns: minmax(0, 1fr); }
  .nt-addrow { grid-template-columns: minmax(0, 1fr); }
  .nt-addrow .nt-btn { width: 100%; }
  .nt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nt-card-val { font-size: 22px; }
  .nt-row-pct { margin-left: 0; }
  .nt-table th:first-child, .nt-table td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
  .nt-table tbody th:first-child { background: var(--ice); }
  .nt-table thead th:first-child { background: var(--nt-ink); }
}
@media (forced-colors: active) {
  .nt-bar-fill { fill: Highlight; }
  .nt-bar-track { fill: Canvas; stroke: CanvasText; }
  .nt-radio[aria-checked="true"] .nt-radio-dot { background: Highlight; border-color: Highlight; }
  .nt-radio[aria-checked="true"] { outline: 2px solid CanvasText; }
}
/* R1 W-H1 / NP-1: print-only privacy variant (two elements, CSS only). */
.nt-privacy-print { display: none; }
@media print {
  .nt-privacy-print { display: block !important; }
  #nt-privacy { display: none !important; }
  .site-header, .accent-bar, .nt-gate, .nt-step1, .nt-add, .nt-btn, .nt-linkbtn, .nt-noprint, .nt-calctl .nt-btn, #nt-showrow, .nt-tableview > button, .menu-toggle { display: none !important; }
  .nt-table-wrap.is-collapsed { display: block !important; }
  .nt-scroll, #nt-list { overflow: visible; border: 0; }
  .nt-table { min-width: 0; font-size: 12px; }
  body { background: #fff; }
  .nt-privacy, .nt-support, .nt-card, .nt-add, .nt-gate { background: #fff !important; }
  .nt-card, .nt-row, .nt-support { break-inside: avoid; border: 1px solid #000; }
  .nt-list-table caption, .nt-table caption, .nt-amdr caption, .nt-dvtable caption,
  .nt-list-table tbody th, .nt-table tbody th, .nt-amdr tbody th, .nt-dvtable tbody th, .nt-privacy, .nt-misslist, .nt-details, #nt-gatemsg { background: #fff !important; }
  .nt-list-table thead th, .nt-table thead th, .nt-amdr thead th, .nt-dvtable thead th { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  .nt-privacy { border-left: 0; border-top: 1px solid #000; border-bottom: 1px solid #000; }
  .nt-card { border-top: 1px solid #000; }
  .nt-bar-track { fill: #fff; stroke: #000; }
  .nt-bar-fill { fill: #000; }
  .nt-details { border: 0; }
  .nt-details::details-content { content-visibility: visible; display: block; }
  .nt-misslist[hidden] { display: none !important; }
  a { color: #000; }
}
