/* Food cost template page: additions on top of /calculators/css/calculators.css and ../../css/templates.css
   (the weekly tracker mini tool reuses the .grader / .g-table component). */

.t-head { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; }
.t-head label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.t-head input { width: 104px; font: inherit; padding: 7px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.t-head input:focus { border-color: var(--orange); outline: none; }
.g-table td.c-week { white-space: nowrap; }
.g-table td.c-week small, .g-table td.out small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.g-table td.out.err { color: var(--error); font-size: 0.72rem; font-weight: 700; white-space: normal; line-height: 1.2; }
.grade.on { background: #c8f5d9; } .grade.over { background: #f9c9c1; }
.formula { background: var(--card); border: 2px solid #000; border-radius: 14px; box-shadow: 4px 4px 0 #000; padding: 14px 18px; margin: 14px 0; font-weight: 700; color: var(--navy); }
.formula span { display: block; font-weight: 600; color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
.need { background: var(--card); border: 1.5px dashed var(--navy); border-radius: 14px; padding: 12px 16px; margin-top: 16px; font-size: 0.92rem; color: #2c2c45; }
.need a { color: var(--navy); font-weight: 700; }
@media (max-width: 720px) {
  .g-table td.c-week { grid-column: 1 / -1; display: flex !important; gap: 10px; align-items: baseline; }
  .g-table td.c-week::before { display: none !important; }
  .g-table td.c-week small { display: inline; }
  .g-table td.c-grade { grid-column: 1 / -1; }
}

/* the tool needs more room than the 820px prose column */
#try { max-width: 1060px; }
#try > p, #try > h2 { max-width: 820px; }
.g-table th { white-space: nowrap; }
@media (max-width: 720px) { .g-table th { white-space: normal; } }
