/* The card's weekly recap and monthly goal (week.js, 2026-10-13). Big text
   on purpose: body 16px and up, labels 14px and up, 44px+ tap targets.
   Green marks goal progress and "on track", the same green Fuel uses for
   green days; red stays the accent everywhere else. */

/* The two home tiles (2026-11-16): Last week | Monthly goal, side by side. */
.week-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.week-tiles:empty {
  display: none;
}

.week-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 118px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.week-tile:active {
  opacity: 0.85;
}

/* alone in its row (nothing logged last week, so no Last week tile) */
.week-tile--wide {
  grid-column: 1 / -1;
}

.week-tile--quiet {
  cursor: default;
}

.week-tile__label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--grey);
}

.week-tile__big {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.05;
  color: var(--white);
}

.week-tile__goal {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.week-tile__sub {
  font-size: 15px;
  line-height: 1.3;
  color: var(--grey);
}

/* the goal tile keeps its progress line at the bottom */
.week-tile--goal .week-tile__sub {
  margin-top: auto;
}

/* Shopping list (Gold and Diamond, only while something's left to buy): a slim full-width row */
.week-tile--shop {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
}

.week-tile--shop .week-tile__goal {
  display: block;
}

.week-tile__chev {
  width: 22px;
  height: 22px;
  color: var(--grey);
  flex-shrink: 0;
}

.week-bar {
  display: block;
  height: 8px;
  margin: 6px 0 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.week-bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #e00000;
}

.week-bar--big {
  height: 12px;
  margin-top: 14px;
}

/* Full-screen sheet */
body.week-sheet-open {
  overflow: hidden;
}

.week-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.week-sheet[hidden] {
  display: none;
}

.week-sheet__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: rgba(17, 17, 17, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.week-sheet__close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}

.week-sheet__body {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px calc(60px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.week-dates {
  margin: 0;
  font-size: 17px;
  color: var(--grey);
}

.week-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-glass-md);
  padding: 18px;
}

.week-card--button {
  display: block;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.week-hero {
  text-align: center;
  padding: 26px 18px;
}

.week-hero__emoji {
  font-size: 64px;
  line-height: 1;
}

.week-hero__num {
  margin-top: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  color: var(--white);
}

.week-hero__num small {
  margin-left: 4px;
  font-size: 26px;
}

.week-hero__label {
  margin-top: 4px;
  font-size: 18px;
  color: var(--grey);
}

.week-hero__fact {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
}

.week-chip {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(224, 0, 0, 0.14);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}

.week-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 20px;
  color: var(--white);
}

.week-text {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  color: var(--white);
}

.week-note {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--grey);
}

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

.week-row {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.week-row__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
}

.week-row__track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.week-row__track > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--red);
}

.week-row__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.week-pb {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.week-pb:first-of-type {
  border-top: 0;
}

.week-pb__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
}

.week-pb__val {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  white-space: nowrap;
}

.week-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.week-stats--two {
  grid-template-columns: repeat(2, 1fr);
}

.week-stat__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--white);
}

.week-stat__label {
  margin-top: 4px;
  font-size: 15px;
  color: var(--grey);
}

/* Goal: progress */
.week-sentence {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--white);
}

.week-goal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 17px;
  color: var(--grey);
}

.week-goal-row b {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--white);
}

.week-list {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--white);
}

/* Goal: setting it */
.week-steps {
  display: flex;
  gap: 6px;
}

.week-steps span {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.week-steps span.on {
  background: var(--red);
}

.week-q {
  margin: 6px 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.1;
  color: var(--white);
}

.week-help {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--grey);
}

.week-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: var(--radius-glass-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.week-opt.is-on {
  border-color: var(--red);
  background: rgba(224, 0, 0, 0.14);
}

.week-opt__emoji {
  font-size: 30px;
  flex-shrink: 0;
}

.week-opt__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.week-opt__main {
  font-size: 19px;
  font-weight: 600;
}

.week-opt__sub {
  font-size: 15px;
  color: var(--grey);
}

/* A goal type that can't be tracked yet: dimmed by colour and a dashed edge, never by fading the text, so the reason stays easy to read. */
.week-opt.is-locked {
  background: transparent;
  border-style: dashed;
  cursor: pointer;
}

.week-opt.is-locked .week-opt__main {
  color: var(--grey);
}

.week-opt.is-locked .week-opt__sub {
  font-size: 16px;
  line-height: 1.35;
  color: var(--grey);
}

.week-opt.is-locked .week-opt__emoji {
  opacity: 0.55;
}

.week-opt__lock {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  color: var(--grey);
}

.week-opt__lock .mi svg {
  width: 24px;
  height: 24px;
}

.week-lockmsg {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-glass-md);
  border: 1px solid var(--red);
  background: rgba(224, 0, 0, 0.1);
}

.week-lockmsg__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--white);
}

.week-opt__tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #ffffff;
}

.week-input {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font: inherit;
  font-size: 18px;
}

.week-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.week-chip-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.week-btn {
  display: block;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 17px;
  cursor: pointer;
}

.week-btn:disabled {
  background: var(--line);
  color: var(--grey);
  cursor: default;
}

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

.week-link {
  align-self: center;
  min-height: 44px;
  padding: 8px 12px;
  background: none;
  border: 0;
  color: var(--grey);
  font: inherit;
  font-size: 17px;
  text-decoration: underline;
  cursor: pointer;
}

.week-error {
  margin: 0;
  font-size: 16px;
  color: #cccccc;
}

/* The coach page's goal line for each client (coach.js). */
.coach-goal {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(224, 0, 0, 0.08);
  border: 1px solid rgba(224, 0, 0, 0.25);
}

.coach-goal__label {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: #ffffff;
}

.coach-goal__text {
  margin: 4px 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--white);
}

/* Line icons (card/icons.js): red, sized to the slot they replace */
.mi {
  display: inline-flex;
  align-items: center;
  color: var(--red);
  vertical-align: -0.2em;
}

.mi svg {
  width: 1.15em;
  height: 1.15em;
}

.week-opt__emoji,
.week-hero__emoji,
.mp-meal__emoji,
.mp-snack__emoji,
.mp-loading__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.week-opt__emoji .mi svg,
.mp-meal__emoji .mi svg,
.mp-snack__emoji .mi svg { width: 28px; height: 28px; }
.week-hero__emoji .mi svg,
.mp-loading__emoji .mi svg { width: 56px; height: 56px; }
.week-h .mi { margin-right: 6px; }
