/* ---------------------------------------------------------------------------
   Redesign V1 — Fuel (R4)
   --------------------------------------------------------------------------- */

.screen--fuel-r4 { gap: 16px; padding-bottom: 8px; }

.screen--fuel-r4 > .screen__title {
  margin: 0;
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
}

.fuel-r4__card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-1);
}

.fuel-r4__card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}

.fuel-r4__energy { gap: 16px; }

.fuel-r4__ring {
  position: relative;
  width: 156px;
  height: 156px;
  display: grid;
  place-items: center;
  justify-self: center;
}

.fuel-r4__ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fuel-r4__ring-track,
.fuel-r4__ring-arc {
  fill: none;
  stroke-width: 12;
}

.fuel-r4__ring-track { stroke: var(--surface-2); }

.fuel-r4__ring-arc {
  stroke: var(--fuel);
  stroke-linecap: round;
}

.fuel-r4__ring-copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.fuel-r4__ring-copy strong {
  color: var(--text-1);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fuel-r4__ring-copy span {
  color: var(--text-2);
  font-size: 15px;
  line-height: 20px;
}

.fuel-r4__protein { display: grid; gap: 6px; }
.fuel-r4__protein > span,
.fuel-r4__water-total {
  color: var(--text-1);
  font-size: 15px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.fuel-r4__bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--surface-2);
}

.fuel-r4__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  min-width: 0;
  border-radius: inherit;
  background: var(--fuel);
}

.fuel-r4__macros {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
}

.fuel-r4__macros > div {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding-inline: 12px;
}

.fuel-r4__macros > div:first-child { padding-left: 0; }
.fuel-r4__macros > div:last-child { padding-right: 0; }
.fuel-r4__macros > div + div { border-left: 1px solid var(--hairline); }

.fuel-r4__macros span {
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}

.fuel-r4__macros strong {
  color: var(--text-1);
  font-size: 17px;
  line-height: 22px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.fuel-r4__primary {
  appearance: none;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--fuel);
  color: var(--on-accent);
  font: inherit;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}

.fuel-r4__recent { gap: 8px; }
.fuel-r4__rows { overflow: hidden; border-radius: 10px; background: var(--surface-2); }

.fuel-r4__recent-row {
  appearance: none;
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 0 0 8px;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 15px;
  line-height: 20px;
  text-align: left;
}

.fuel-r4__recent-row + .fuel-r4__recent-row { border-top: 1px solid var(--hairline); }
.fuel-r4__recent-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fuel-r4__plus {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--text-1);
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.fuel-r4__empty {
  margin: 0;
  padding: 12px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}

.fuel-r4__water { gap: 8px; }

.fuel-r4__water-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 4px;
}

.fuel-r4__secondary {
  appearance: none;
  min-height: 44px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-1);
  font: inherit;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}


/* R4 visual QA — match approved Fuel mockup density. */
.fuel-r4__energy {
  gap: 10px;
  padding: 12px;
}

.fuel-r4__recent {
  gap: 6px;
  padding: 12px;
}

.fuel-r4__recent-row {
  min-height: 44px;
}

.fuel-r4__water {
  padding: 12px;
}


/* Final R4 compact-height pass from captured mockup comparison. */
.fuel-r4__recent {
  padding: 10px;
}

.fuel-r4__recent-row {
  min-height: 40px;
}

.fuel-r4__water {
  gap: 6px;
  padding: 10px;
}

/* My foods: searchable library of everything logged (0.50.0) */
.fuel-r4__foods { gap: 10px; }
.fuel-food__search {
  width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
  background: var(--surface-2); color: var(--text-1); font: 400 17px/22px var(--font-ui);
  -webkit-appearance: none; appearance: none;
}
.fuel-food__search::placeholder { color: var(--text-3); }
.fuel-food__heading { margin: 4px 0 0; color: var(--text-2); font: 600 13px/18px var(--font-ui); }
.fuel-food__list { overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.fuel-food {
  min-height: 56px; display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center;
  gap: 8px; padding: 6px 6px 6px 14px;
}
.fuel-food + .fuel-food { border-top: 1px solid var(--hairline); }
.fuel-food__copy { min-width: 0; display: grid; gap: 2px; }
.fuel-food__name {
  color: var(--text-1); font: 500 15px/20px var(--font-ui);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.fuel-food__meta { color: var(--text-2); font: 400 13px/18px var(--font-ui); font-variant-numeric: tabular-nums; }
.fuel-food[data-added="true"] .fuel-food__meta { color: var(--fuel-ink); }
.fuel-food__add {
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--r-full);
  background: transparent; color: var(--fuel-ink); font: 500 24px/1 var(--font-ui);
}
.fuel-food[data-added="true"] .fuel-food__add { color: var(--fuel-ink); font-size: 18px; }
.fuel-food__more {
  min-height: 44px; border: 0; background: transparent; color: var(--fuel-ink);
  font: 500 15px/20px var(--font-ui); text-align: left; padding: 0 2px;
}

/* Meal entry inline on Fuel (0.51.0): the cards are Fuel's, so the form and
   history drop their own card chrome. */
.fuel-r4__meal-panel, .nutrition-panel { display: grid; gap: 16px; }
.nutrition-panel .nutrition-meal-form,
.nutrition-panel .nutrition-history { padding: 0; background: none; border-radius: 0; }
.nutrition-panel .nutrition-meal-form h3,
.nutrition-panel .nutrition-history h3 { font: 600 22px/28px var(--font-ui); }
.nutrition-panel .nutrition-meal-form__actions { grid-template-columns: 1fr 1fr; }
.nutrition-panel .nutrition-meal-form__add { grid-column: 1 / -1; }
.nutrition-panel .nutrition-meal-form__paste { font-size: 15px; font-weight: 600; min-height: 48px; }
.nutrition-meal-form__photo {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-full); background: var(--surface-2); color: var(--text-1);
  font: 600 15px/20px var(--font-ui); text-decoration: none;
}
.nutrition-meal-form__photo svg, .nutrition-meal-form__photo img { width: 20px; height: 20px; flex: none; color: var(--fuel-ink); }
.nutrition-panel .nutrition-day-status { padding: 12px; background: var(--surface-2); }
.nutrition-panel__earlier {
  min-height: 44px; border: 0; background: transparent; color: var(--fuel-ink);
  font: 500 15px/20px var(--font-ui); text-align: left; padding: 0 2px; appearance: none;
}

/* Portions: tap a food's name for ½, 1½, 2, 3 (0.52.0) */
button.fuel-food__copy {
  appearance: none; border: 0; background: transparent; padding: 0; text-align: left; font: inherit; color: inherit;
  min-height: 44px; align-content: center;
}
.fuel-food__portions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 2px 8px 6px 0; }
.fuel-food__portion {
  min-height: 40px; border: 0; border-radius: var(--r-full); background: var(--surface-1); color: var(--fuel-ink);
  font: 600 15px/20px var(--font-ui); font-variant-numeric: tabular-nums;
}
