/* ==========================================================================
   MAXFIT · membership card — FUEL (macro tracker)
   Uses the card's own tokens from styles.css (--bg, --red, --line, fonts).
   Panels: 14px radius, thin --line border, red as the only accent, except
   the three plans, which each wear their own metal (see "Plans" below).
   ========================================================================== */

:root {
  --fuel-radius: 14px;
}

.card__panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card__panel[hidden] {
  display: none;
}

/* The scroll-instead-of-clip fix (body height:auto, .card auto margins)
   now lives in the shared card/styles.css, not just here. */

/* ---------- FUEL home ---------- */

.fuel {
  gap: 12px;
}

.fuel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fuel__date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fuel__day-btn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--grey);
  cursor: pointer;
  padding: 0;
}

.fuel__day-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.fuel__day-label {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--white);
  min-width: 92px;
  text-align: center;
}

.fuel__icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--grey);
  cursor: pointer;
  padding: 0;
}

.fuel-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--fuel-radius);
  padding: 16px;
}

.fuel-totals {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fuel-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fuel-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.fuel-row__nums {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.fuel-row--lead .fuel-row__nums {
  font-size: 44px;
}

.fuel-row__target {
  color: var(--dim);
  font-weight: 700;
}

.fuel-row__unit {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--dim);
  margin-left: 3px;
  text-transform: none;
}

.fuel-row__note {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--grey);
}

.fuel-bar {
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.fuel-row--lead .fuel-bar {
  height: 6px;
}

.fuel-bar__fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.fuel-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.fuel-grid3 .fuel-row__nums {
  font-size: 22px;
}

.fuel-grid3 .fuel-row__target {
  font-size: 16px;
}

.fuel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fuel-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.fuel-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.fuel-chips::-webkit-scrollbar {
  display: none;
}

.fuel-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 180px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.fuel-chip:active {
  border-color: var(--red);
}

.fuel-chip__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 156px;
}

.fuel-chip__meta {
  font-weight: 500;
  font-size: 14px;
  color: var(--dim);
}

.fuel-meal {
  display: flex;
  flex-direction: column;
}

.fuel-meal + .fuel-meal {
  margin-top: 12px;
}

.fuel-meal__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.fuel-meal__sum {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.fuel-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.fuel-entry:last-child {
  border-bottom: none;
}

.fuel-entry__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  display: block;
}

.fuel-entry__meta {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  display: block;
  margin-top: 2px;
}

.fuel-entry__p {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}

.fuel-entry__p small {
  font-size: 14px;
  color: var(--dim);
  margin-left: 2px;
}

.fuel-empty {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  text-align: center;
  padding: 6px 0;
  margin: 0;
}

.fuel-notice {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fuel-notice__title {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--white);
}

.fuel-notice p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
  margin: 0;
  line-height: 1.45;
}

.fuel-link {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--grey);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.fuel-footnote {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  text-align: center;
  margin: 0;
}

/* ---------- Buttons & form controls (shared by sheets) ---------- */

.fuel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--on-red);
  background: var(--red);
  border: none;
  border-radius: var(--fuel-radius);
  padding: 15px 16px;
  cursor: pointer;
}

.fuel-btn:active {
  background: var(--red-dim);
}

.fuel-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.fuel-btn--ghost {
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line);
}

.fuel-btn--ghost:active {
  background: transparent;
  border-color: var(--red);
}

.fuel-btn--quiet {
  color: var(--grey);
  background: transparent;
  border: none;
  padding: 10px;
  font-size: 14px;
}

.fuel-btn--quiet:active {
  background: transparent;
  color: var(--white);
}

.fuel-input {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: var(--white);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
}

.fuel-input:focus {
  outline: none;
  border-color: var(--red);
}

select.fuel-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--grey) 50%),
    linear-gradient(135deg, var(--grey) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.fuel-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fuel-fields2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fuel-fields3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.fuel-seg {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.fuel-seg button {
  flex: 1;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 4px;
  cursor: pointer;
}

.fuel-seg button.is-on {
  color: var(--white);
  background: var(--bg-card);
  border-color: var(--red);
}

.fuel-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  margin: 0;
}

.fuel-range::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.fuel-range::-moz-range-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.fuel-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--white);
}

.fuel-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--white);
}

.fuel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  cursor: pointer;
}

.fuel-toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.fuel-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dim);
  transition: transform 0.15s ease;
}

.fuel-toggle input:checked {
  background: var(--red);
  border-color: var(--red);
}

.fuel-toggle input:checked::after {
  background: var(--white);
  transform: translateX(18px);
}

.fuel-file {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Bottom sheet ---------- */

.fuel-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.fuel-sheet[hidden],
.fuel-sheet [hidden] {
  display: none !important;
}

.fuel-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  animation: fuel-fade 0.2s ease;
}

.fuel-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: var(--fuel-radius) var(--fuel-radius) 0 0;
  padding: 8px 20px max(20px, env(safe-area-inset-bottom));
  animation: fuel-rise 0.22s ease;
}

.fuel-sheet__grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 14px;
}

.fuel-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fuel-sheet__title {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--white);
  margin: 0;
  line-height: 1.1;
}

.fuel-sheet__sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  margin: -10px 0 0;
}

.fuel-sheet__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@keyframes fuel-rise {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fuel-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scan-mode chooser */
.fuel-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.fuel-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--fuel-radius);
  padding: 18px 6px 14px;
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

.fuel-mode svg {
  color: var(--red);
}

.fuel-mode small {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--dim);
  text-align: center;
}

.fuel-mode:active {
  border-color: var(--red);
}

.fuel-mode:disabled {
  opacity: 0.35;
  cursor: default;
  border-color: var(--line);
}

/* Confirm sheet items */
.fuel-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--fuel-radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fuel-item__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fuel-item__name {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  background: transparent;
  border: none;
  border-bottom: 1px dashed transparent;
  padding: 2px 0;
  min-width: 0;
}

.fuel-item__name:focus {
  outline: none;
  border-bottom-color: var(--red);
}

/* The edit sheet's title is an editable name */
.fuel-item__name.fuel-sheet__title {
  flex: none;
  width: 100%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
}

.fuel-item__remove {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--dim);
  cursor: pointer;
  padding: 0;
}

.fuel-item__grams {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fuel-item__grams .fuel-range {
  flex: 1;
}

.fuel-item__gin {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 92px;
  flex-shrink: 0;
}

.fuel-item__gin--serves {
  width: 132px;
}

.fuel-item__gin .fuel-input {
  padding: 8px 8px;
  text-align: right;
}

.fuel-item__gin span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--dim);
}

.fuel-item__macros {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.fuel-item__macros b {
  color: var(--white);
}

.fuel-item__note {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  margin: 0;
}

.fuel-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--grey);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.fuel-tag--red {
  color: var(--red);
  border-color: rgba(224, 0, 0, 0.4);
}

.fuel-serves {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fuel-serves button {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 14px;
  color: var(--grey);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.fuel-serves button:active,
.fuel-serves button.is-on {
  color: var(--white);
  border-color: var(--red);
}

.fuel-sum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.fuel-sum__nums {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.fuel-disclaimer {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  margin: 0;
  line-height: 1.45;
}

/* Barcode camera */
.fuel-camera {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: var(--fuel-radius);
  overflow: hidden;
}

.fuel-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fuel-camera__frame {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 34%;
  bottom: 34%;
  border: 2px solid var(--red);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
}

.fuel-camera__msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
}

.fuel-inline {
  display: flex;
  gap: 8px;
}

.fuel-inline .fuel-btn {
  width: auto;
  flex-shrink: 0;
  padding: 11px 16px;
  border-radius: 10px;
}

/* Loading */
.fuel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 0 20px;
}

.fuel-spinner {
  width: 30px;
  height: 36px;
}

.fuel-flame {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* All three layers are the same flame outline, anchored to its base, grown
   to three different sizes — small, then medium, then full — so the flame
   visibly builds taller in stages instead of just flickering in place.
   Each stage holds complete for a beat, then clears and builds again. */

.flame__layer {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  fill: var(--red);
}

.flame__layer--1 { animation: flame-build-1 2.4s ease-in-out infinite; }
.flame__layer--2 { animation: flame-build-2 2.4s ease-in-out infinite; }
.flame__layer--3 { animation: flame-build-3 2.4s ease-in-out infinite; }

@keyframes flame-build-1 {
  0%, 4% { opacity: 0; transform: scale(0.22); }
  16% { opacity: 1; transform: scale(0.52); }
  20% { transform: scale(0.44); }
  80% { opacity: 1; transform: scale(0.44); }
  90%, 100% { opacity: 0; transform: scale(0.22); }
}

@keyframes flame-build-2 {
  0%, 18% { opacity: 0; transform: scale(0.36); }
  30% { opacity: 1; transform: scale(0.82); }
  34% { transform: scale(0.72); }
  80% { opacity: 1; transform: scale(0.72); }
  88%, 100% { opacity: 0; transform: scale(0.36); }
}

@keyframes flame-build-3 {
  0%, 32% { opacity: 0; transform: scale(0.52); }
  44% { opacity: 1; transform: scale(1.1); }
  48% { transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  86%, 100% { opacity: 0; transform: scale(0.52); }
}

@media (prefers-reduced-motion: reduce) {
  .flame__layer--1,
  .flame__layer--2,
  .flame__layer--3 {
    animation: fuel-loading-pulse 1.6s ease-in-out infinite;
    opacity: 1;
    transform: none;
  }
}

@keyframes fuel-loading-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.fuel-loading__text {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--grey);
}

/* Fake progress bar (window.startFakeProgress, app.js) — same "fast then
   creeps up and slows" trick as the card-loading dumbbell, on every one of
   Fuel's loading moments: initial load, AI scans, barcodes, suggestions. */
.fuel-loading__bar {
  width: 140px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.fuel-loading__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 999px;
  transition: width 0.15s linear;
}

@media (prefers-reduced-motion: reduce) {
  .fuel-loading__bar-fill {
    transition: none;
  }
}

.fuel-error {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--white);
  background: rgba(224, 0, 0, 0.08);
  border: 1px solid rgba(224, 0, 0, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.fuel-result {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.fuel-result div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 4px;
}

.fuel-result b {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
}

/* ---------- Toast ---------- */

.fuel-toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  background: var(--red);
  color: var(--on-red);
  border-radius: var(--fuel-radius);
  padding: 12px 16px;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: fuel-rise 0.2s ease;
}

.fuel-toast[hidden] {
  display: none;
}

.fuel-toast button {
  font: inherit;
  color: var(--on-red);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}

@media (max-width: 360px) {
  .fuel-row--lead .fuel-row__nums {
    font-size: 36px;
  }

  .fuel-modes {
    gap: 6px;
  }
}

/* ---------- Fuel AI: Ask button, upsell, plan ---------- */

a.fuel-btn {
  text-decoration: none;
}

.fuel-ask {
  margin-top: -8px;
}

.fuel-ask svg {
  color: var(--red);
}

.fuel-mode.is-locked {
  opacity: 0.55;
}

.fuel-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fuel-perks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
  line-height: 1.4;
}

.fuel-perks svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--red);
}

.fuel-perks b {
  color: var(--white);
}

.fuel-price {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  margin: 0;
  text-align: center;
}

.fuel-price b {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: var(--white);
  margin-right: 2px;
}

.fuel-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.fuel-plan__text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
}

/* ---------- What to eat next ---------- */

.fuel-ideas {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fuel-ideas__headline {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  margin: 4px 0 6px;
  line-height: 1.4;
}

.fuel-idea {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.fuel-idea__label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
}

.fuel-idea__log {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

.fuel-idea__log:active {
  background: var(--red);
}

.fuel-idea__log:disabled {
  opacity: 0.4;
}

/* ---------- Ask Fuel chat ---------- */

.fuel-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 46vh;
  max-height: 46dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fuel-msg {
  align-self: flex-start;
  max-width: 88%;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--white);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 13px;
}

.fuel-msg--me {
  align-self: flex-end;
  border-color: rgba(224, 0, 0, 0.45);
  border-radius: 14px 14px 4px 14px;
}

.fuel-msg--error {
  color: var(--grey);
  border-style: dashed;
}

.fuel-chips--wrap {
  flex-wrap: wrap;
  overflow: visible;
}

.fuel-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.fuel-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  animation: fuel-blink 1s infinite ease-in-out;
}

.fuel-typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.fuel-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes fuel-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* ---------- Progress ---------- */

.fuel__head-btns {
  display: flex;
  gap: 8px;
}

.fuel-chartcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Section names on the Progress sheet ("Your week", "Weight"): the card's
   12px label is too small for older eyes here. */
.fuel-chartcard > .card__label,
.fuel-punch .card__label {
  font-size: 15px;
}

.fuel-chartcard__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.fuel-chart svg {
  display: block;
  overflow: visible;
}

.fuel-chart text {
  font-family: var(--font-body);
  font-size: 16px;
  fill: var(--grey);
}

.fuel-chart .fuel-chart__strong {
  fill: var(--white);
  font-weight: 600;
}

.fuel-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.fuel-goal {
  stroke: var(--grey);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.fuel-pace {
  stroke: #777777;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.fuel-dot {
  fill: #6b6b6b;
}

.fuel-dot--now {
  fill: var(--red);
  stroke: var(--bg);
  stroke-width: 2;
}

.fuel-line {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.fuel-hit {
  fill: transparent;
  cursor: pointer;
}

/* Body scans (EVOLT, 2026-11-03) */
.fuel-scan-dot {
  fill: var(--red);
  stroke: var(--bg);
  stroke-width: 2;
}

.fuel-scan-dot.is-on {
  stroke: var(--white);
}

.fuel-scan-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fuel-scan-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--fuel-radius);
  padding: 12px;
}

.fuel-scan-stat__label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
}

.fuel-scan-stat__value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  color: var(--white);
}

.fuel-scan-stat__value small {
  font-size: 16px;
  margin-left: 2px;
  color: var(--grey);
}

.fuel-scan-stat__change {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
  min-height: 1.3em;
}

.fuel-scan-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fuel-scan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fuel-scan-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fuel-scan-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--white);
}

.fuel-readout {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--white);
  margin: -2px 0 0;
  min-height: 1.4em;
}

.fuel-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--grey);
  margin: 0;
}

.fuel-key {
  display: inline-block;
  width: 14px;
  margin-left: 6px;
}

.fuel-key:first-child {
  margin-left: 0;
}

.fuel-key--line {
  height: 3px;
  border-radius: 2px;
  background: var(--red);
}

.fuel-key--dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b6b6b;
}

.fuel-key--pace {
  height: 0;
  border-top: 2px dashed #777777;
}

/* ---- Progress: the week, Screen Time style (2026-10-02) ----
   One bar per day, Monday to Sunday. Green = a green day, grey = logged but
   not green, nothing = nothing logged. Everything here is sized for older
   eyes: no text under 15px. Green is the one place Fuel steps outside the
   red accent, because Max asked for green days to look green. */

.fuel-wk {
  --wk-h: 180px; /* bar height when it touches the top */
  --wk-day: 34px; /* the day name under each bar */
  --wk-green: #e00000;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fuel-seg--big button {
  font-size: 16px;
  padding: 13px 6px;
}

.fuel-wk__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fuel-wk__big {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 48px;
  line-height: 1;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.fuel-wk__unit {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fuel-wk__avg {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--grey);
}

.fuel-wk__plot {
  position: relative;
  display: flex;
  gap: 6px;
  padding-top: 26px; /* room for the target label when the target is near the top */
}

.fuel-wk__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fuel-wk__col:disabled {
  cursor: default;
}

.fuel-wk__track {
  position: relative;
  width: 100%;
  height: var(--wk-h);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.fuel-wk__bar {
  width: 72%;
  max-width: 34px;
  border-radius: 6px 6px 2px 2px;
  background: #5a5a5a;
}

.fuel-wk__bar.is-green {
  background: var(--wk-green);
}

.fuel-wk__col.is-picked .fuel-wk__track {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.fuel-wk__day {
  height: var(--wk-day);
  display: flex;
  align-items: flex-end;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--grey);
}

.fuel-wk__col.is-today .fuel-wk__day {
  color: var(--white);
}

.fuel-wk__col:disabled .fuel-wk__day {
  color: var(--dim);
}

.fuel-wk__target {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed rgba(255, 255, 255, 0.75);
  pointer-events: none;
  z-index: 1;
}

.fuel-wk__target span {
  position: absolute;
  right: 0;
  bottom: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  background: var(--bg-card);
  padding: 0 4px;
  border-radius: 4px;
}

.fuel-wk__readout {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.4;
  color: var(--white);
  margin: 0;
  min-height: 1.4em;
}

.fuel-wk__key {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--grey);
  margin: 0;
}

.fuel-wk__swatch {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--wk-green);
}

.fuel-punch__text {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--grey);
  line-height: 1.45;
  margin: 0;
}

.fuel-punch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* Add food: photo note, search, enter the numbers */
.fuel-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.fuel-note {
  resize: none;
  line-height: 1.4;
}

.fuel-search {
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fuel-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fuel-add-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Plans: Silver / Gold / Platinum / Diamond, and the AI meter. Each plan
   wears its own metal (Max, 2026-09-27): Silver a plain matte grey, Gold a
   warm metallic, Platinum a pearl sheen with a slow shimmer and a glowing
   edge, and Diamond (the top plan) an icy white prism: a spectral sheen,
   twinkling glints, and a rainbow edge that turns. Everything else stays
   red. Every animation stops for reduced motion. */
:root {
  --silver-metal: linear-gradient(180deg, #dcdfe2 0%, #a9aeb3 100%);
  --silver-ink: #16181a;
  --silver-edge: #a9aeb3;
  --gold-metal: linear-gradient(135deg, #b8872b 0%, #f6d77c 38%, #dcaa45 62%, #fbe7a6 82%, #c6952f 100%);
  --gold-ink: #1a1206;
  --gold-edge: #d4a53f;
  --gold-text: #ecc767;
  --platinum-metal: linear-gradient(115deg, #f4f6fb 0%, #c3d3f2 14%, #e3d3fb 28%, #c6ece9 42%, #f9dbe9 56%, #d0dcf5 70%, #eef0f8 84%, #f4f6fb 100%);
  --platinum-ink: #15171c;
  --platinum-text: #e3e9f4;
  --platinum-glow: rgba(206, 220, 255, 0.22);
  --diamond-metal: linear-gradient(110deg, #ffffff 0%, #eaf6ff 10%, #ffe3f4 18%, #fff7d6 26%, #e2fff1 34%, #e3ecff 42%, #ffffff 50%, #eaf6ff 60%, #f7e4ff 68%, #e0fbff 76%, #fffbe6 84%, #ffffff 100%);
  --diamond-spectrum: #ffffff, #9ed8ff, #c9a8ff, #ff9fd6, #ffe28a, #9fffd2, #ffffff;
  --diamond-ink: #0f1116;
  --diamond-text: #f4f9ff;
  --diamond-glow: rgba(190, 225, 255, 0.35);
}

/* The angle Diamond's rainbow edge turns through. Browsers without
   @property just show it still. */
@property --fuel-spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes fuel-spin {
  to {
    --fuel-spin: 360deg;
  }
}

/* A star glint on the Diamond badge: appears, turns, fades. */
@keyframes fuel-twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
}

/* Slides a 300%-wide repeating gradient by exactly one tile, so it loops. */
@keyframes fuel-sheen {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 150% 50%;
  }
}

/* The same, for the Platinum card's edge (its third background layer). */
@keyframes fuel-sheen-edge {
  from {
    background-position: 0 0, 0 0, 0% 50%;
  }
  to {
    background-position: 0 0, 0 0, 150% 50%;
  }
}

/* A band of light that crosses the Platinum button every few seconds. */
@keyframes fuel-shine {
  0% {
    transform: translateX(-130%);
  }
  55%,
  100% {
    transform: translateX(130%);
  }
}

.fuel-tier {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--grey);
  white-space: nowrap;
}

.fuel-tier--silver {
  color: var(--silver-ink);
  background: var(--silver-metal);
  border-color: transparent;
}

.fuel-tier--gold {
  color: var(--gold-ink);
  background: var(--gold-metal);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.fuel-tier--platinum {
  color: var(--platinum-ink);
  background: var(--platinum-metal);
  background-size: 300% 100%;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 14px var(--platinum-glow);
  animation: fuel-sheen 8s linear infinite;
}

.fuel-tier--diamond {
  position: relative;
  color: var(--diamond-ink);
  background: var(--diamond-metal) 0% 50% / 300% 100%;
  border-color: transparent;
  box-shadow: inset 0 1px 0 #ffffff, 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 16px var(--diamond-glow);
  animation: fuel-sheen 6s linear infinite;
}

.fuel-tier--diamond::before,
.fuel-tier--diamond::after {
  content: "✦";
  position: absolute;
  font-size: 14px;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(190, 225, 255, 0.95);
  pointer-events: none;
  opacity: 0;
  animation: fuel-twinkle 2.6s ease-in-out infinite;
}

.fuel-tier--diamond::before {
  top: -5px;
  right: -3px;
}

.fuel-tier--diamond::after {
  bottom: -4px;
  left: -2px;
  font-size: 14px;
  animation-delay: 1.3s;
}

.fuel-tier--sm {
  font-size: 14px;
  padding: 4px 7px;
  letter-spacing: 0.08em;
}

.fuel-plan .fuel-tier {
  align-self: flex-start;
}

.fuel-btn--gold,
.fuel-btn--gold:active {
  color: var(--gold-ink);
  background: var(--gold-metal);
}

.fuel-btn--platinum,
.fuel-btn--platinum:active {
  position: relative;
  overflow: hidden;
  isolation: isolate; /* the light band (::after, z-index -1) passes under the text */
  color: var(--platinum-ink);
  background: var(--platinum-metal) 0% 50% / 300% 100%;
  box-shadow: 0 0 26px -4px var(--platinum-glow);
  animation: fuel-sheen 8s linear infinite;
}

.fuel-btn--platinum::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.8) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: fuel-shine 4.5s ease-in-out 1s infinite;
  pointer-events: none;
  z-index: -1;
}

.fuel-btn--diamond,
.fuel-btn--diamond:active {
  position: relative;
  overflow: hidden;
  isolation: isolate; /* the light band (::after, z-index -1) passes under the text */
  color: var(--diamond-ink);
  background: var(--diamond-metal) 0% 50% / 300% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 30px -4px var(--diamond-glow);
  animation: fuel-sheen 6s linear infinite;
}

.fuel-btn--diamond::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 28%, rgba(255, 150, 215, 0.55) 40%, rgba(255, 255, 255, 0.95) 50%, rgba(130, 205, 255, 0.6) 60%, transparent 72%);
  transform: translateX(-130%);
  animation: fuel-shine 3.6s ease-in-out 0.6s infinite;
  pointer-events: none;
  z-index: -1;
}

.fuel-btn--gold:active,
.fuel-btn--platinum:active,
.fuel-btn--diamond:active {
  filter: brightness(0.88);
}

.fuel-plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fuel-plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--fuel-radius);
  padding: 14px;
}

.fuel-plan-card--silver.is-current {
  border-color: var(--silver-edge);
}

.fuel-plan-card--gold {
  border-color: rgba(212, 165, 63, 0.35);
  background: linear-gradient(180deg, rgba(212, 165, 63, 0.08), transparent 60%), var(--bg);
}

.fuel-plan-card--gold.is-current {
  border-color: var(--gold-edge);
}

.fuel-plan-card--gold .fuel-plan-card__badge {
  color: var(--gold-text);
}

/* Platinum: a pearl edge (the gradient shows through a transparent border),
   a soft cool light in the corner, and a glow. Always on, current or not. */
.fuel-plan-card--platinum {
  border: 1.5px solid transparent;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(214, 226, 255, 0.14), transparent 60%) padding-box,
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--platinum-metal) border-box;
  background-size: 100% 100%, 100% 100%, 300% 100%;
  box-shadow: 0 0 30px -8px var(--platinum-glow);
  animation: fuel-sheen-edge 8s linear infinite;
}

.fuel-plan-card--platinum .fuel-plan-card__price b {
  background: var(--platinum-metal) 0% 50% / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fuel-sheen 8s linear infinite;
}

.fuel-plan-card--gold .fuel-plan-card__price b {
  color: var(--gold-text);
}

.fuel-plan-card--platinum.is-current {
  box-shadow: 0 0 36px -4px var(--platinum-glow);
}

.fuel-plan-card--platinum .fuel-plan-card__badge {
  color: var(--platinum-text);
}

/* Diamond: facets of light in the corner, a rainbow edge that slowly
   turns, a brighter glow, and a price that shimmers. */
.fuel-plan-card--diamond {
  border: 1.5px solid transparent;
  background:
    conic-gradient(from 210deg at 88% 0%, rgba(255, 255, 255, 0.1), transparent 12%, rgba(170, 210, 255, 0.08) 22%, transparent 34%, rgba(255, 190, 235, 0.06) 46%, transparent 58%) padding-box,
    radial-gradient(120% 90% at 100% 0%, rgba(225, 240, 255, 0.14), transparent 60%) padding-box,
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from var(--fuel-spin), var(--diamond-spectrum)) border-box;
  box-shadow: 0 0 36px -6px var(--diamond-glow);
  animation: fuel-spin 6s linear infinite;
}

.fuel-plan-card--diamond.is-current {
  box-shadow: 0 0 44px -2px var(--diamond-glow);
}

.fuel-plan-card--diamond .fuel-plan-card__price b {
  background: linear-gradient(90deg, #ffffff, #bfe6ff, #ffd1ef, #fff3c4, #d4ffec, #ffffff) 0% 50% / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fuel-sheen 6s linear infinite;
}

.fuel-plan-card--diamond .fuel-plan-card__badge {
  color: var(--diamond-text);
}

/* Pay as you go (2026-11-02): one-off top-ups. No medal, so it wears the
   card's own red, the only accent. */
.fuel-tier--payg {
  color: var(--white);
  background: transparent;
  border-color: var(--red);
}

.fuel-plan-card--payg {
  border-color: rgba(224, 0, 0, 0.45);
  background: linear-gradient(180deg, rgba(224, 0, 0, 0.08), transparent 60%), var(--bg);
}

.fuel-plan-card--payg.is-current {
  border-color: var(--red);
}

.fuel-plan-card--payg .fuel-plan-card__badge {
  color: var(--white);
}

.fuel-packs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fuel-btn.fuel-pack {
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  padding: 10px 8px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.fuel-pack b {
  font-size: 20px;
  line-height: 1.1;
}

.fuel-pack span {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
}

/* Friends price (2026-11-24): top-ups at cost, only for people Max switches on. */
.fuel-friends {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(224, 0, 0, 0.55);
  border-radius: var(--radius-sm);
  background: rgba(224, 0, 0, 0.07);
}

.fuel-friends__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--white);
}

.fuel-friends__text {
  margin: 0;
  font-size: 15px;
  color: var(--grey);
}

.fuel-friends__or {
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--grey);
}

/* Coach page: the friends packs waiting for approval. */
.coach-friends {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  border-color: rgba(224, 0, 0, 0.55);
}

.coach-friends__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
}

.coach-friends__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.coach-friends__what {
  font-size: 15px;
  color: var(--white);
}

.coach-friends__pick {
  min-height: 48px;
  flex: 1 1 180px;
}

.coach-client .fuel-toggle {
  min-height: 48px;
}

.coach-friends__hint {
  margin-top: -6px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--grey);
}

/* "Save $17.89 · 3 months free", on Yearly. */
.fuel-plan-card p.fuel-plan-card__save {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--white);
  margin-top: -4px;
}

.fuel-plan-card--gold p.fuel-plan-card__save {
  color: var(--gold-text);
}

.fuel-plan-card--platinum p.fuel-plan-card__save {
  color: var(--platinum-text);
}

.fuel-plan-card--diamond p.fuel-plan-card__save {
  color: var(--diamond-text);
}

.fuel-plans > p.fuel-plan-card__note {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  margin: 0;
  line-height: 1.45;
}

/* Monthly / Yearly switch at the top of the plans sheet. */
.fuel-interval {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.fuel-interval button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--dim);
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 6px 4px;
  cursor: pointer;
}

.fuel-interval button small {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--red);
}

.fuel-interval button[aria-checked="true"] {
  color: var(--white);
  background: var(--bg-card);
}

.fuel-plan-card p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
  margin: 0;
  line-height: 1.45;
}

.fuel-plan-card p b {
  color: var(--white);
}

.fuel-plan-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fuel-plan-card__price {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
}

.fuel-plan-card__price b {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--white);
}

.fuel-plan-card__badge {
  align-self: flex-start;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--grey);
}

.fuel-plan-card p.fuel-plan-card__note {
  font-size: 14px;
  color: var(--dim);
}

.fuel-plans__manage {
  align-self: center;
}

@media (prefers-reduced-motion: reduce) {
  .fuel-tier--platinum,
  .fuel-btn--platinum,
  .fuel-plan-card--platinum,
  .fuel-plan-card--platinum .fuel-plan-card__price b,
  .fuel-tier--diamond,
  .fuel-btn--diamond,
  .fuel-plan-card--diamond,
  .fuel-plan-card--diamond .fuel-plan-card__price b {
    animation: none;
  }

  .fuel-btn--platinum::after,
  .fuel-btn--diamond::after,
  .fuel-tier--diamond::before,
  .fuel-tier--diamond::after {
    display: none;
  }
}

/* Five add-food tiles: the odd one out spans the row. */
.fuel-modes .fuel-mode:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.fuel-save-meal {
  display: flex;
  flex-direction: column;
}

.fuel-save-meal__done {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey);
  text-align: center;
  margin: 0;
}

/* ==========================================================================
   FUEL home: the "concentric rings" layout (2026-10-13). No card around the
   page: a full-bleed header panel (day switcher, plan button, rings, calorie
   bar), then Scan Food + Ask Fuel, the meals, and the tiles. Text keeps
   Max's floor (16px body, 14px labels) over the mockup's smaller sizes.
   ========================================================================== */

:root {
  --surface: #1a1c21;
  --surface-2: #23262c;
  --text: #f4f4f5;
  --text-2: #b9bcc4;
  --muted: #9a9da6;
  --brand: var(--red);
  --protein: #e00000;
  --protein-text: #e00000;
  --carbs: #ffffff;
  --fat: #999999;
  --diamond: #cccccc;
}

/* app/macros.js puts .is-fuel on <body> while the Macros tab shows. Fuel now sits in the
   same glass card as the other tabs (same width, background and corners); only the
   membership header is hidden, because Fuel has its own. */
body.is-fuel .card__top {
  display: none;
}

body.is-fuel .card {
  gap: 0;
  /* the Fuel blocks carry their own 20px side padding */
  padding: 12px 0 26px;
}

/* Unlock, error and Stripe-return screens still use the old panel. */
body.is-fuel #panelFuel > .fuel-notice,
body.is-fuel #panelFuel > .fuel-loading {
  margin: calc(24px + env(safe-area-inset-top)) 20px 0;
}

/* .card sets condensed capitals for the old card; the rings layout picks its own per element. */
.fx {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

.fx button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.fx button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.fx button:disabled {
  cursor: default;
}

/* ---- MacroHeader ---- */
.fx-head {
  /* inside the shared glass card, so it is a rounded panel with the card's own corner size */
  margin: 0 12px;
  padding: 20px 14px 22px;
  background: var(--surface);
  border-radius: var(--radius-glass-lg, 18px);
  border: 1px solid var(--line);
}

.fx-head__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-day {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: -10px;
}

.fx-day__btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.fx-day__btn svg {
  width: 20px;
  height: 20px;
}

.fx-day__btn:disabled {
  opacity: 0.3;
}

.fx-day__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
}

.fx-day__name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.fx-day__date {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.fx-tier {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--diamond);
  cursor: pointer;
}

.fx-tier svg {
  width: 22px;
  height: 22px;
}

.fx-tier--gold {
  color: #f2c85b;
  border-color: rgba(242, 200, 91, 0.35);
}

.fx-tier--silver {
  color: #d3d6dc;
  border-color: rgba(211, 214, 220, 0.35);
}

.fx-tier--skel {
  border-color: transparent;
}

.fx-rings-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 18px;
}

.fx-rings {
  position: relative;
  flex-shrink: 0;
  width: clamp(150px, 44vw, 168px);
  aspect-ratio: 1;
}

.fx-rings__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fx-ring {
  fill: none;
  stroke-width: 13;
}

.fx-ring--track {
  stroke-opacity: 0.16;
}

.fx-ring--bar {
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms ease-out;
}

.fx-ring--p {
  stroke: var(--protein);
}

.fx-ring--c {
  stroke: var(--carbs);
}

.fx-ring--f {
  stroke: var(--fat);
}

.fx-rings__centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.fx-rings__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--text);
}

.fx-rings__num--long {
  font-size: 26px;
}

.fx-rings__unit {
  margin-top: 3px;
  max-width: 76px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
}

.fx-legend {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.fx-legend__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.fx-legend__nums {
  display: block;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
}

.fx-legend__nums b {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
}

.fx-legend__item--p b {
  color: var(--protein-text);
}

.fx-legend__item--c b {
  color: var(--carbs);
}

.fx-legend__item--f b {
  color: var(--fat);
}

.fx-over {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.fx-kcal {
  margin-top: 20px;
}

.fx-kcal__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  color: var(--text-2);
}

.fx-kcal__row span:last-child {
  color: var(--muted);
}

.fx-kcal__bar {
  display: flex;
  gap: 2px;
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}

.fx-seg {
  flex-shrink: 0;
  height: 100%;
  transition: width 600ms ease-out;
}

.fx-seg--p {
  background: var(--protein);
}

.fx-seg--c {
  background: var(--carbs);
}

.fx-seg--f {
  background: var(--fat);
}

.fx-settargets {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

/* ---- ActionsRow ---- */
.fx-body {
  padding: 0 20px;
}

.fx-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.fx-scan {
  flex: 1;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.fx-scan span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fx-scan svg {
  width: 22px;
  height: 22px;
}

.fx-scan.is-out,
.fx-scan:disabled {
  opacity: 0.5;
}

.fx-scan:active {
  filter: brightness(0.9);
}

/* Ask Fuel (2026-10-15): a labelled button in Diamond's icy blue, so it
   reads as the second main action, not a small icon beside Log Food. */
.fx-ask {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 18px rgba(170, 200, 255, 0.18);
  color: var(--diamond);
  cursor: pointer;
}

.fx-ask span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.fx-ask svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.fx-ask:active {
  filter: brightness(1.15);
}

.fx-ask:disabled {
  opacity: 0.5;
}

@media (max-width: 370px) {
  .fx-ask {
    padding: 0 12px;
  }

  .fx-ask span {
    font-size: 16px;
    letter-spacing: 0.05em;
  }

  .fx-scan span {
    font-size: 18px;
    letter-spacing: 0.08em;
  }
}

.fx-caption {
  margin: 10px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

/* ---- MealList ---- */
.fx-meals {
  margin-top: 26px;
}

.fx-h2 {
  margin: 0 0 2px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.fx-meal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 14px 0;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
}

.fx-meal + .fx-meal {
  border-top: 1px solid var(--line);
}

button.fx-meal {
  cursor: pointer;
}

.fx-meal__main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.fx-meal__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.fx-meal__name--empty {
  color: var(--text-2);
}

.fx-meal__time {
  font-weight: 400;
  color: var(--muted);
}

.fx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-chip {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.fx-chip--p {
  color: var(--protein-text);
  background: rgba(224, 0, 0, 0.18);
}

.fx-chip--c {
  color: var(--carbs);
  background: rgba(255, 255, 255, 0.12);
}

.fx-chip--f {
  color: var(--fat);
  background: rgba(153, 153, 153, 0.2);
}

.fx-meal__kcal {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
}

.fx-meal__kcal small {
  margin-left: 3px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
}

.fx-add {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.fx-add svg {
  width: 20px;
  height: 20px;
}

/* ---- PlanAhead + More ---- */
.fx-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.fx-tiles + .fx-tiles {
  margin-top: 10px;
}

.fx-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px 14px;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.fx-tile__icon {
  display: flex;
  flex-shrink: 0;
}

.fx-tile__icon svg {
  width: 24px;
  height: 24px;
}

.fx-tile--plan .fx-tile__icon {
  color: var(--carbs);
}

.fx-tile--list .fx-tile__icon {
  color: var(--fat);
}

.fx-tile--progress .fx-tile__icon {
  color: var(--protein-text);
}

.fx-tile--settings .fx-tile__icon {
  color: var(--text-2);
}

.fx-tile__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fx-tile__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0;
  text-transform: none;
}

.fx-tile__sub {
  font-size: 14px;
  line-height: 1.25;
  color: var(--text-2);
}

/* ---- Loading skeleton ---- */
.fx-skel {
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  animation: fx-pulse 1.4s ease-in-out infinite;
}

.fx-skel--name {
  width: 38%;
  height: 18px;
}

.fx-skel--btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.fx-skel--text {
  width: 46%;
  height: 16px;
}

@keyframes fx-pulse {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-ring--bar,
  .fx-seg {
    transition: none;
  }

  .fx-skel {
    animation: none;
  }
}

/* ---- Scope of practice (2026-10-29): Your targets, the first-open note,
   and the guidance line under every Food Q&A answer. ---- */
.tg-info {
  margin: -6px 0 0;
  font-size: 16px;
  color: var(--grey);
}

.tg-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tg-field {
  display: grid;
  grid-template-columns: 1fr 150px;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.tg-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}

.tg-label small {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 400;
  color: var(--grey);
}

.tg-label small b {
  color: var(--white);
}

.tg-input {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.tg-input:focus-within {
  border-color: var(--white);
}

.tg-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 26px;
  text-align: right;
}

.tg-input span {
  margin-left: 6px;
  font-size: 16px;
  color: var(--grey);
}

.tg-range {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.tg-range__band {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.24);
}

.tg-range__dot {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--bg-card);
}

.tg-range__dot[hidden] {
  display: none;
}

.tg-sum {
  margin: 0;
  font-size: 15px;
  color: var(--grey);
}

.tg-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 15px;
  line-height: 1.45;
  color: var(--grey);
}

.tg-note b {
  color: var(--white);
}

.tg-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--white);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.dc-icon {
  width: 64px;
  height: 64px;
  margin: 6px auto 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(224, 0, 0, 0.14);
  color: var(--red);
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 32px;
}

.dc-title {
  text-align: center;
}

.dc-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--white);
}

.dc-small {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--dim);
}

.fuel-msg__guide {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--dim);
}
