/* Food-check pages (/foods and /foods/<food>): verdict box, nutrition
   table, saturated-fat meters and the hub grid. Loaded only by those pages,
   after styles.css. Pages are generated by scripts/foodChecks.js. */

.fc-verdict {
  border: 2px solid var(--border-color);
  border-left-width: 6px;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: 0 0 var(--space-8);
  background: var(--pure-white);
}

.fc-verdict--good { border-left-color: var(--vitality-green); background: var(--mint-tint); }
.fc-verdict--ok { border-left-color: var(--lime-highlight); }
.fc-verdict--mixed { border-left-color: var(--data-attention); background: #FFFBEB; }
.fc-verdict--limit { border-left-color: #C53030; background: #FFF4F4; }

.fc-chip {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  background: var(--off-white);
  color: var(--deep-slate);
  border: 1px solid var(--border-color);
}

.fc-chip--good { background: var(--vitality-green); border-color: var(--vitality-green); color: #fff; }
.fc-chip--ok { background: #E8F5D0; border-color: var(--lime-highlight); color: #365314; }
.fc-chip--mixed { background: #FEF3C7; border-color: var(--data-attention); color: #92400E; }
.fc-chip--limit { background: #FED7D7; border-color: #C53030; color: #9B2C2C; }

.article-body .fc-verdict-line {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.article-body .fc-verdict p:last-child { margin-bottom: 0; }

.article-body .fc-meta {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin: calc(-1 * var(--space-4)) 0 var(--space-8);
}

/* Nutrition table: a normal table on wide screens, stacked cards on phones,
   so the page never scrolls sideways. */
.fc-nutrition {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.fc-nutrition-head {
  background: var(--off-white);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.fc-nutrition-head h3 { margin: 0; font-size: 1.125rem; }

.article-body .fc-nutrition table {
  min-width: 0;
  width: 100%;
  font-size: 0.9375rem;
}

.article-body .fc-nutrition th,
.article-body .fc-nutrition td {
  border: 0;
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-4);
  width: auto;
  vertical-align: middle;
}

.article-body .fc-nutrition th { background: var(--pure-white); font-size: 0.8125rem; }
.article-body .fc-nutrition td.fc-num,
.article-body .fc-nutrition th.fc-num { text-align: right; white-space: nowrap; }
.article-body .fc-nutrition tr.fc-main td { background: var(--mint-tint); }
.article-body .fc-nutrition tr.fc-main td:first-child strong { color: var(--forest-green); }
.fc-serving { display: block; font-size: 0.8125rem; color: var(--text-tertiary); }

.article-body .fc-nutrition-note {
  font-size: 0.875rem;
  line-height: 1.6;
  padding: var(--space-4) var(--space-6);
  margin: 0;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .article-body .fc-nutrition thead { display: none; }
  .article-body .fc-nutrition table,
  .article-body .fc-nutrition tbody,
  .article-body .fc-nutrition tr,
  .article-body .fc-nutrition td { display: block; width: 100%; }
  .article-body .fc-nutrition tr { border-bottom: 1px solid var(--border-color); padding: var(--space-3) var(--space-4); }
  .article-body .fc-nutrition tr.fc-main { background: var(--mint-tint); }
  .article-body .fc-nutrition td { border: 0; padding: 2px 0; background: transparent !important; }
  .article-body .fc-nutrition td.fc-num {
    display: flex;
    justify-content: space-between;
    text-align: left;
  }
  .article-body .fc-nutrition td.fc-num::before {
    content: attr(data-label);
    color: var(--text-tertiary);
  }
  .article-body .fc-nutrition-note { padding: var(--space-4); }
}

/* Saturated fat meters */
.fc-meters { margin: var(--space-6) 0; display: grid; gap: var(--space-4); }

.fc-meter-label {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.fc-meter-label span:last-child { white-space: nowrap; font-weight: 600; }

.fc-meter {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--off-white);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.fc-meter span {
  display: block;
  height: 100%;
  min-width: 3px;
  background: var(--vitality-green);
  border-radius: var(--radius-full);
}

.fc-meter span.fc-meter--warn { background: var(--data-attention); }
.fc-meter span.fc-meter--high { background: #C53030; }

.fc-meter-sub { font-size: 0.8125rem; color: var(--text-tertiary); margin-top: 4px; }

/* Hub */
.fc-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-8);
}

.fc-hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  background: var(--pure-white);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.fc-hub-card:hover { border-color: var(--vitality-green); box-shadow: var(--shadow-lg); }
.fc-hub-card h3 { margin: 0; font-size: 1.125rem; color: var(--text-primary); }
.fc-hub-card p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }
.fc-hub-card .fc-chip { align-self: flex-start; margin-bottom: 0; }
.fc-hub-sat { font-size: 0.8125rem; color: var(--text-tertiary); margin-top: auto; }

@media (max-width: 640px) {
  .fc-verdict { padding: var(--space-4); }
  .article-body .fc-verdict-line { font-size: 1.1875rem; }
}
