.tdee-hero {
    background: linear-gradient(135deg, var(--orange), #c4400e);
    border-radius: 14px;
    padding: 20px 20px 16px;
    margin-bottom: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .tdee-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='2' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
  }
  .tdee-hero__label {
    font-size: .75rem;
    color: rgba(255,255,255,.7);
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
    position: relative;
  }
  .tdee-hero__value {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.4rem;
    color: var(--white);
    line-height: 1;
    position: relative;
  }
  .tdee-hero__unit {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,.7);
    margin-left: 4px;
  }
  .tdee-hero__sub {
    font-size: .72rem;
    color: rgba(255,255,255,.55);
    margin-top: 6px;
    position: relative;
  }
  .tdee-hero__bmr-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.15);
    position: relative;
  }
  .tdee-hero__bmr-item {
    text-align: center;
  }
  .tdee-hero__bmr-val {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .92rem;
    color: var(--white);
  }
  .tdee-hero__bmr-label {
    font-size: .65rem;
    color: rgba(255,255,255,.5);
    margin-top: 1px;
  }
 
  /* ── Goal cards ──────────────────────────────────────────── */
  .goal-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
  .goal-card {
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .2s;
  }
  .goal-card.loss     { background: #eff6ff; border-color: #bfdbfe; }
  .goal-card.maintain { background: #e6f4ec; border-color: #86efac; }
  .goal-card.gain     { background: #fff0e8; border-color: #fdba74; }
  .goal-card.active   { box-shadow: 0 0 0 2px var(--navy); }
  .goal-card:hover    { transform: translateY(-2px); box-shadow: var(--shadow); }
  .goal-card__icon    { font-size: 1.4rem; margin-bottom: 6px; }
  .goal-card__label {
    font-family: var(--font-head);
    font-size: .72rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
  }
  .goal-card__calories {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.05rem;
  }
  .goal-card.loss     .goal-card__calories { color: #1a73e8; }
  .goal-card.maintain .goal-card__calories { color: var(--green); }
  .goal-card.gain     .goal-card__calories { color: var(--orange); }
  .goal-card__sub {
    font-size: .65rem;
    color: var(--gray);
    margin-top: 2px;
  }
 
  /* ── Macro breakdown row ─────────────────────────────────── */
  .macro-section__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .88rem;
    color: var(--navy);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .macro-section__title i { color: var(--orange); }
 
  .macro-bars { margin-bottom: 16px; }
  .macro-bar  { margin-bottom: 10px; }
  .macro-bar__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    font-size: .82rem;
  }
  .macro-bar__name  { font-weight: 600; color: var(--navy); }
  .macro-bar__grams { font-family: var(--font-head); font-weight: 700; font-size: .85rem; }
  .macro-bar__pct   { font-size: .72rem; color: var(--gray); }
  .macro-track {
    height: 8px;
    background: var(--gray-l);
    border-radius: 100px;
    overflow: hidden;
  }
  .macro-fill {
    height: 100%;
    border-radius: 100px;
    transition: width .5s ease;
  }
  .macro-fill.protein { background: linear-gradient(90deg,#1a73e8,#4a90f5); }
  .macro-fill.carbs   { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
  .macro-fill.fat     { background: linear-gradient(90deg,var(--orange),#ff7a35); }
 
  /* ── Activity level cards ────────────────────────────────── */
  .activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 0;
  }
  .activity-card {
    border: 1.5px solid var(--gray-l);
    border-radius: 10px;
    padding: 9px 10px;
    cursor: pointer;
    transition: all .18s;
    background: var(--white);
  }
  .activity-card:hover { border-color: var(--green); background: #f0faf4; }
  .activity-card.active {
    border-color: var(--green);
    background: #e6f4ec;
  }
  .activity-card__icon {
    font-size: .9rem;
    margin-bottom: 3px;
  }
  .activity-card__label {
    font-family: var(--font-head);
    font-size: .73rem;
    font-weight: 700;
    color: var(--navy);
    display: block;
  }
  .activity-card__sub {
    font-size: .65rem;
    color: var(--gray);
    margin-top: 1px;
    line-height: 1.4;
    display: block;
  }
  .activity-card.active .activity-card__label { color: var(--green); }
 
  /* ── Calorie deficit/surplus indicator ───────────────────── */
  .calorie-goal-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--light);
    border: 1px solid var(--gray-l);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: .82rem;
    color: var(--text);
  }
  .calorie-goal-strip i { font-size: 1rem; flex-shrink: 0; }
  .calorie-goal-strip strong { font-family: var(--font-head); }
 
  /* ── Donut chart for macros ─────────────────────────────── */
  .calorie-chart-wrap { position: relative; height: 200px; }
 
  /* ── Weight timeline note ────────────────────────────────── */
  .weight-timeline {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .wt-cell {
    background: var(--light);
    border: 1px solid var(--gray-l);
    border-radius: 8px;
    padding: 8px 8px;
    text-align: center;
  }
  .wt-cell__label { font-size: .65rem; color: var(--gray); margin-bottom: 3px; }
  .wt-cell__val {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .82rem;
    color: var(--navy);
  }
  .wt-cell.loss-cell  .wt-cell__val { color: #1a73e8; }
  .wt-cell.gain-cell  .wt-cell__val { color: var(--orange); }
 
  /* ── Health disclaimer ───────────────────────────────────── */
  .health-disclaimer {
    background: var(--light);
    border-radius: 8px;
    padding: 9px 13px;
    font-size: .75rem;
    color: var(--gray);
    line-height: 1.6;
    margin-top: 10px;
  }
 
  /* ── Responsive ─────────────────────────────────────────── */
  @media (max-width: 768px) {
    .goal-cards    { grid-template-columns: 1fr 1fr 1fr; }
    .weight-timeline { grid-template-columns: 1fr 1fr 1fr; }
  }
  @media (max-width: 480px) {
    .goal-cards    { grid-template-columns: 1fr; gap: 6px; }
    .activity-grid { grid-template-columns: 1fr; }
    .weight-timeline { grid-template-columns: 1fr; }
    .tdee-hero__value { font-size: 1.9rem; }
  }