/* ============================================================
   Vitaroxi Macronutrient Calculator — macro-calc.css v3.0
   Theme: Navy Dark — #000f2b dominant, cream surfaces
   Palette: vitaroxi-color-palette.md (June 2026)
   ============================================================ */

#macro-root {
  all: initial;
  display: block;

  /* ── Vitaroxi brand tokens ── */
  --vx-navy:      #000f2b;   /* primary dark — hero, headers, nav   */
  --vx-navy-2:    #000920;   /* deeper navy — footer, dark accents  */
  --vx-navy-3:    #0a1f3d;   /* card header bg, elevated surfaces   */
  --vx-navy-4:    #112244;   /* hover on dark elements              */
  --vx-brand:     #71b230;   /* fitness green — CTAs, badges        */
  --vx-alt-brand: #4d7d20;   /* brand hover / active                */
  --vx-accent:    #e8750a;   /* nutrition orange — fat, downloads   */
  --vx-teal:      #1d9e75;   /* carbs / fiber                       */
  --vx-cream:     #f7f3ee;   /* main card background                */
  --vx-cream-2:   #eef0e8;   /* alternate surface, table rows       */
  --vx-extra:     #eaf4d5;   /* green-tinted highlight              */
  --vx-heading:   #000f2b;   /* headings on light bg                */
  --vx-text:      #2a3245;   /* body copy                           */
  --vx-muted:     #5a6a4e;   /* labels, captions on light           */
  --vx-muted-d:   #b8c9a0;   /* muted text on dark navy             */
  --vx-border-l:  #dde8cc;   /* border on light surfaces            */
  --vx-border-d:  #1e3a5f;   /* border on dark surfaces             */
  --vx-err:       #dc2626;
  --vx-amber:     #b45309;
  --vx-amber-p:   #fef3c7;
  --vx-ph-l:      rgba(90,106,78,0.30);   /* placeholder on light  */
  --vx-ph-d:      rgba(184,201,160,0.35); /* placeholder on dark   */

  /* ── Macro accent colours ── */
  --pro:  #71b230;
  --carb: #1d9e75;
  --fat:  #e8750a;

  font-family: 'DM Sans', 'Inter', sans-serif;
  color: var(--vx-text);
  box-sizing: border-box;
  padding: 1.5rem 1rem 3rem;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

#macro-root *,
#macro-root *::before,
#macro-root *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Wrapper ── */
#macro-root .mc-wrap {
  max-width: 660px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

/* ════════════════════════════════════════════
   HERO — full navy
   ════════════════════════════════════════════ */
#macro-root .mc-hero {
  background: var(--vx-navy);
  border-radius: 18px;
  padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--vx-border-d);
}
#macro-root .mc-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(113,178,48,0.08);
  pointer-events: none;
}
#macro-root .mc-hero::after {
  content: '';
  position: absolute;
  bottom: -70px; left: 30%;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(29,158,117,0.05);
  pointer-events: none;
}
#macro-root .mc-hero .brand-label {
  font-size: 0.60rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vx-brand);
  margin-bottom: 0.6rem;
  display: block;
  position: relative; z-index: 1;
}
#macro-root .mc-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  position: relative; z-index: 1;
  letter-spacing: -0.02em;
}
#macro-root .mc-hero .subtitle {
  font-size: 0.80rem;
  color: var(--vx-muted-d);
  margin-top: 0.5rem;
  position: relative; z-index: 1;
  line-height: 1.6;
}

/* ════════════════════════════════════════════
   MODE TOGGLE
   ════════════════════════════════════════════ */
#macro-root .mode-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
#macro-root .mode-btn {
  padding: 0.52rem 1.5rem;
  border-radius: 100px;
  border: 1.5px solid var(--vx-border-l);
  background: var(--vx-cream);
  font-size: 0.80rem;
  font-weight: 500;
  color: var(--vx-muted);
  cursor: pointer;
  transition: all 0.15s;
}
#macro-root .mode-btn.active {
  background: var(--vx-navy);
  border-color: var(--vx-navy);
  color: #fff;
  font-weight: 600;
}
#macro-root .mode-btn:hover:not(.active) {
  border-color: var(--vx-navy);
  color: var(--vx-navy);
}

/* ════════════════════════════════════════════
   CARDS — cream background, navy header
   ════════════════════════════════════════════ */
#macro-root .card {
  background: var(--vx-cream);
  border: 1.5px solid var(--vx-border-l);
  border-radius: 14px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,15,43,0.07);
}
#macro-root .card-header {
  background: var(--vx-navy-3);
  border-bottom: 1.5px solid var(--vx-border-d);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
#macro-root .card-header .badge-num {
  width: 1.6rem; height: 1.6rem;
  background: var(--vx-brand);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  flex-shrink: 0;
}
#macro-root .card-header .adv-badge {
  background: var(--vx-teal);
}
#macro-root .card-header h2 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
#macro-root .card-body { padding: 1.25rem; }

/* ── Field rows ── */
#macro-root .field-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
#macro-root .field-row:last-child { margin-bottom: 0; }
#macro-root .field-row.cols-2 { grid-template-columns: 1fr 1fr; }
#macro-root .field-row.cols-1 { grid-template-columns: 1fr; }

#macro-root .field label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--vx-navy);
  margin-bottom: 0.45rem;
  display: block;
}
#macro-root .lbl-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.60rem;
  color: var(--vx-muted);
}

/* ── Input wrap ── */
#macro-root .input-wrap {
  display: flex;
  border: 1.5px solid var(--vx-border-l);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#macro-root .input-wrap:focus-within {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0,15,43,0.10);
}
#macro-root .input-wrap input {
  flex: 1; border: none; background: transparent;
  padding: 0.68rem 0.75rem;
  font-size: 0.95rem;
  color: var(--vx-navy);
  outline: none; min-width: 0;
  -moz-appearance: textfield;
}
#macro-root .input-wrap input::-webkit-inner-spin-button,
#macro-root .input-wrap input::-webkit-outer-spin-button { -webkit-appearance: none; }
#macro-root .input-wrap input::placeholder { color: var(--vx-ph-l); }
#macro-root .unit-tag {
  background: var(--vx-cream);
  border-left: 1.5px solid var(--vx-border-l);
  padding: 0.68rem 0.75rem;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--vx-navy);
  white-space: nowrap;
  display: flex; align-items: center;
}

/* ── Sex toggle ── */
#macro-root .sex-group { display: flex; gap: 0.6rem; }
#macro-root .sex-opt {
  flex: 1;
  border: 1.5px solid var(--vx-border-l);
  border-radius: 9px;
  background: #fff;
  padding: 0.68rem 0.75rem;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--vx-muted);
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  transition: all 0.15s;
}
#macro-root .sex-opt .rdot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--vx-border-l);
  flex-shrink: 0;
  transition: all 0.15s;
}
#macro-root .sex-opt.sel {
  border-color: var(--vx-navy);
  background: var(--vx-navy);
  color: #fff;
}
#macro-root .sex-opt.sel .rdot {
  background: var(--vx-brand);
  border-color: var(--vx-brand);
}

/* ── Full select ── */
#macro-root .full-select {
  width: 100%;
  border: 1.5px solid var(--vx-border-l);
  border-radius: 9px;
  background: #fff;
  padding: 0.68rem 2.2rem 0.68rem 0.75rem;
  font-size: 0.87rem;
  color: var(--vx-navy);
  cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23000f2b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#macro-root .full-select:focus {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0,15,43,0.10);
}

/* ── Goal grid ── */
#macro-root .goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
}
#macro-root .goal-opt {
  border: 1.5px solid var(--vx-border-l);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem 0.5rem;
  cursor: pointer; text-align: center;
  transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
#macro-root .goal-opt:hover { border-color: var(--vx-navy); background: var(--vx-cream); }
#macro-root .goal-opt .gi { font-size: 1.1rem; }
#macro-root .goal-opt .gn { font-size: 0.68rem; font-weight: 600; color: var(--vx-navy); line-height: 1.2; }
#macro-root .goal-opt .gd { font-size: 0.60rem; color: var(--vx-muted); }
#macro-root .goal-opt.sel {
  border-color: var(--vx-navy);
  background: var(--vx-navy);
}
#macro-root .goal-opt.sel .gn { color: var(--vx-brand); }
#macro-root .goal-opt.sel .gd { color: var(--vx-muted-d); }

/* ── Advanced panel ── */
#macro-root .adv-panel { display: none; }
#macro-root .adv-panel.show { display: block; }

/* ── Sliders ── */
#macro-root .slider-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
#macro-root .slider-row:last-child { margin-bottom: 0; }
#macro-root .slider-label { font-size: 0.70rem; font-weight: 600; color: var(--vx-navy); width: 80px; flex-shrink: 0; }
#macro-root .slider-row input[type=range] {
  flex: 1; -webkit-appearance: none; height: 4px;
  background: var(--vx-border-l); border-radius: 100px; outline: none; min-width: 0;
}
#macro-root .slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--vx-navy); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,15,43,0.25);
}
#macro-root .slider-row input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--vx-navy); cursor: pointer; border: 2px solid #fff;
}
#macro-root .slider-val { font-size: 0.72rem; font-weight: 700; color: var(--vx-navy); width: 34px; text-align: right; }
#macro-root .adv-note { font-size: 0.65rem; color: var(--vx-muted); margin-bottom: 0.85rem; line-height: 1.6; }

/* ── Calculate button ── */
#macro-root .calc-btn {
  width: 100%;
  background: var(--vx-navy);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: background 0.15s, transform 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(0,15,43,0.22);
}
#macro-root .calc-btn:hover { background: var(--vx-navy-4); }
#macro-root .calc-btn:active { transform: scale(0.99); }

/* ════════════════════════════════════════════
   RESULTS
   ════════════════════════════════════════════ */
#macro-root .results-card { display: none; }
#macro-root .results-card.vis {
  display: block;
  background: var(--vx-cream);
  border: 1.5px solid var(--vx-border-l);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,15,43,0.10);
  animation: mcSlideIn 0.35s ease;
}
@keyframes mcSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Results header bar */
#macro-root .results-header {
  background: var(--vx-navy);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--vx-border-d);
}
#macro-root .results-header-left {
  display: flex; align-items: center; gap: 0.6rem;
}
#macro-root .results-check {
  width: 1.55rem; height: 1.55rem;
  background: var(--vx-brand);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.70rem;
  font-weight: 700;
  flex-shrink: 0;
}
#macro-root .results-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}
#macro-root .pdf-btn {
  display: flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  padding: 0.38rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
#macro-root .pdf-btn:hover {
  background: var(--vx-brand);
  border-color: var(--vx-brand);
}

/* Results body padding */
#macro-root .results-card.vis > *:not(.results-header) {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
#macro-root .results-card.vis .chips-row { padding-top: 1.25rem; }
#macro-root .results-card.vis .dl-row { padding-bottom: 1.25rem; }

/* ── Info chips ── */
#macro-root .chips-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
#macro-root .chip {
  border: 1.5px solid var(--vx-border-l);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem 0.5rem;
  text-align: center;
}
#macro-root .chip .chip-label {
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--vx-navy);
  margin-bottom: 0.25rem;
}
#macro-root .chip .chip-val { font-size: 0.82rem; font-weight: 700; color: var(--vx-navy); line-height: 1.2; }
#macro-root .chip .chip-val.small { font-size: 0.62rem; font-weight: 600; }

/* ── Method note box ── */
#macro-root .note-box {
  border-left: 3px solid var(--vx-navy);
  background: rgba(0,15,43,0.04);
  border-radius: 0 9px 9px 0;
  padding: 0.85rem 1rem;
  font-size: 0.77rem;
  color: var(--vx-text);
  line-height: 1.7;
  margin-bottom: 1rem;
}
#macro-root .note-box strong { color: var(--vx-navy); }

/* ── Calorie hero ── */
#macro-root .cal-hero {
  border: 2px solid var(--vx-navy);
  border-radius: 13px;
  background: var(--vx-navy);
  padding: 1.75rem 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
#macro-root .cal-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(113,178,48,0.10);
  pointer-events: none;
}
#macro-root .cal-hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -20px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(29,158,117,0.07);
  pointer-events: none;
}
#macro-root .cal-hero .cal-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vx-brand);
  margin-bottom: 0.4rem;
}
#macro-root .cal-hero .cal-num {
  font-size: clamp(2.5rem, 7vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  position: relative; z-index: 1;
  letter-spacing: -0.02em;
}
#macro-root .cal-hero .cal-unit { font-size: 1rem; color: var(--vx-muted-d); margin-left: 0.3rem; }
#macro-root .cal-hero .cal-note {
  font-size: 0.74rem;
  color: var(--vx-muted-d);
  margin-top: 0.55rem;
  position: relative; z-index: 1;
}

/* ── Macro boxes ── */
#macro-root .macro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
#macro-root .macro-box {
  border: 1.5px solid var(--vx-border-l);
  border-radius: 12px;
  background: #fff;
  padding: 1rem 0.85rem;
  position: relative;
  overflow: hidden;
}
#macro-root .macro-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
}
#macro-root .macro-box.pro::before  { background: var(--pro); }
#macro-root .macro-box.carb::before { background: var(--carb); }
#macro-root .macro-box.fat::before  { background: var(--fat); }

#macro-root .macro-box .mpct {
  position: absolute; top: 0.7rem; right: 0.7rem;
  font-size: 0.63rem; font-weight: 700;
  color: var(--vx-navy); opacity: 0.25;
}
#macro-root .macro-box .mico { font-size: 0.9rem; margin-bottom: 0.3rem; margin-top: 0.1rem; }
#macro-root .macro-box .mname {
  font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--vx-navy); opacity: 0.55;
  margin-bottom: 0.35rem;
}
#macro-root .macro-box .mg { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
#macro-root .macro-box .mg small { font-size: 0.65rem; font-weight: 500; color: var(--vx-muted); }
#macro-root .macro-box.pro .mg  { color: var(--pro); }
#macro-root .macro-box.carb .mg { color: var(--carb); }
#macro-root .macro-box.fat .mg  { color: var(--fat); }
#macro-root .macro-box .mkcal { font-size: 0.62rem; color: var(--vx-muted); margin-top: 0.15rem; }

/* ── Protein badge ── */
#macro-root .pbadge {
  display: inline-block; font-size: 0.57rem; font-weight: 600;
  padding: 2px 8px; border-radius: 100px; margin-top: 0.3rem;
}
#macro-root .pbadge.ok   { background: rgba(113,178,48,0.12); color: var(--vx-alt-brand); }
#macro-root .pbadge.low  { background: var(--vx-amber-p);     color: var(--vx-amber); }
#macro-root .pbadge.high { background: rgba(220,38,38,0.08);  color: var(--vx-err); }

/* ── Fiber box ── */
#macro-root .fiber-box {
  border: 1.5px solid var(--vx-teal);
  border-radius: 12px;
  background: rgba(29,158,117,0.06);
  padding: 1rem 0.85rem;
  text-align: center;
  position: relative;
}
#macro-root .fiber-box .fiber-pct {
  position: absolute; top: 0.6rem; right: 0.7rem;
  font-size: 0.62rem; font-weight: 700;
  color: var(--vx-teal); opacity: 0.5;
}
#macro-root .fiber-box .mico { font-size: 0.9rem; margin-bottom: 0.25rem; }
#macro-root .fiber-box .mname { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.10em; margin-bottom: 0.3rem; }
#macro-root .fiber-box .mg { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
#macro-root .fiber-box .mg small { font-size: 0.65rem; font-weight: 400; opacity: 0.7; }
#macro-root .fiber-box .mkcal { font-size: 0.62rem; margin-top: 0.15rem; }

/* ── Distribution bar ── */
#macro-root .bar-section { margin-bottom: 1rem; }
#macro-root .bar-labels {
  display: flex; justify-content: space-between;
  font-size: 0.62rem; color: var(--vx-muted); margin-bottom: 0.45rem;
}
#macro-root .bar-track {
  height: 9px;
  background: var(--vx-cream-2);
  border: 1px solid var(--vx-border-l);
  border-radius: 100px; overflow: hidden; display: flex;
}
#macro-root .bar-seg { height: 100%; transition: width 0.8s cubic-bezier(0.23,1,0.32,1); }
#macro-root .bar-seg.pro  { background: var(--pro); }
#macro-root .bar-seg.carb { background: var(--carb); }
#macro-root .bar-seg.fat  { background: var(--fat); }

/* ── Meal grid ── */
#macro-root .meal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem; margin-bottom: 1rem;
}
#macro-root .meal-card {
  background: #fff;
  border: 1.5px solid var(--vx-border-l);
  border-radius: 10px;
  padding: 0.85rem 0.65rem; text-align: center;
}
#macro-root .meal-card .mtitle {
  font-size: 0.60rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--vx-navy); margin-bottom: 0.5rem;
}
#macro-root .meal-card .mvals { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
#macro-root .meal-card .mv { font-size: 0.58rem; text-align: center; color: var(--vx-muted); }
#macro-root .meal-card .mv strong { font-size: 0.82rem; font-weight: 700; display: block; line-height: 1.2; }
#macro-root .meal-card .mv.pro strong  { color: var(--pro); }
#macro-root .meal-card .mv.carb strong { color: var(--carb); }
#macro-root .meal-card .mv.fat strong  { color: var(--fat); }

/* ── Breakdown table ── */
#macro-root .breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.80rem; margin-bottom: 1rem; }
#macro-root .breakdown-table th {
  text-align: left; padding: 0.5rem 0.75rem;
  font-size: 0.60rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--vx-navy); border-bottom: 2px solid var(--vx-navy);
}
#macro-root .breakdown-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--vx-border-l); color: var(--vx-text); }
#macro-root .breakdown-table tr:last-child td { border-bottom: none; }
#macro-root .breakdown-table td:first-child { color: var(--vx-muted); width: 55%; }
#macro-root .breakdown-table td:last-child { font-size: 0.78rem; font-weight: 700; text-align: right; color: var(--vx-navy); }
#macro-root .breakdown-table tr.sep td { padding: 0.25rem 0.75rem; font-size: 0.55rem; color: var(--vx-border-l); border-bottom: 1px solid var(--vx-border-l); }
#macro-root .breakdown-table tr:nth-child(even):not(.sep) td { background: var(--vx-cream-2); }

/* ── Disclaimer ── */
#macro-root .disclaimer {
  border: 1.5px solid rgba(232,117,10,0.25);
  background: rgba(232,117,10,0.05);
  border-radius: 9px;
  padding: 0.85rem 1rem;
  font-size: 0.72rem; color: var(--vx-muted); line-height: 1.65;
  margin-bottom: 1rem;
}

/* ── Download buttons row ── */
#macro-root .dl-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-top: 0.25rem;
}
#macro-root .dl-btn {
  flex: 1; min-width: 130px;
  border-radius: 9px;
  padding: 0.75rem 1rem;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: all 0.15s;
}
#macro-root .dl-btn-pdf {
  background: var(--vx-navy);
  border: 1.5px solid var(--vx-navy);
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,15,43,0.20);
}
#macro-root .dl-btn-pdf:hover { background: var(--vx-navy-4); }
#macro-root .dl-btn-html {
  background: transparent;
  border: 1.5px solid var(--vx-border-l);
  color: var(--vx-muted);
}
#macro-root .dl-btn-html:hover {
  border-color: var(--vx-accent);
  color: var(--vx-accent);
  background: rgba(232,117,10,0.05);
}

/* ── Misc ── */
#macro-root .divider { height: 1px; background: var(--vx-border-l); margin: 1rem 0; }
#macro-root .sub-header {
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--vx-navy); margin-bottom: 0.65rem;
}
#macro-root .mc-footer {
  text-align: center; font-size: 0.67rem;
  color: var(--vx-muted); line-height: 1.8; margin-top: 0.5rem;
}
#macro-root .errmsg {
  font-size: 0.70rem; font-weight: 600;
  color: var(--vx-err); margin-top: 0.3rem; display: none;
}
#macro-root .errmsg.vis { display: block; }

/* ── Height hbox ── */
#macro-root .h-hbox {
  border: 1.5px solid var(--vx-border-l); border-radius: 9px;
  overflow: hidden; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
#macro-root .h-hbox:focus-within {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0,15,43,0.10);
}
#macro-root .h-hbox .h-single { display: flex; }
#macro-root .h-hbox .h-dual   { display: none; border-top: 1.5px solid var(--vx-border-l); }
#macro-root .h-hbox .h-dual.show { display: flex; }
#macro-root .h-hbox input {
  flex: 1; border: none; background: transparent;
  padding: 0.68rem 0.75rem; font-size: 0.95rem;
  color: var(--vx-navy); outline: none; min-width: 0; width: 0;
  -moz-appearance: textfield;
}
#macro-root .h-hbox input::-webkit-inner-spin-button,
#macro-root .h-hbox input::-webkit-outer-spin-button { -webkit-appearance: none; }
#macro-root .h-hbox input::placeholder { color: var(--vx-ph-l); }
#macro-root .h-sep {
  background: var(--vx-cream); border-left: 1.5px solid var(--vx-border-l);
  border-right: 1.5px solid var(--vx-border-l);
  padding: 0.68rem 0.55rem; font-size: 0.70rem; font-weight: 700;
  color: var(--vx-navy); display: flex; align-items: center;
  white-space: nowrap; flex-shrink: 0;
}
#macro-root .h-unit-bar { display: flex; border-top: 1.5px solid var(--vx-border-l); }
#macro-root .h-unit-btn {
  flex: 1; border: none; border-right: 1.5px solid var(--vx-border-l);
  background: var(--vx-cream); padding: 0.44rem;
  font-size: 0.70rem; font-weight: 500; color: var(--vx-muted);
  cursor: pointer; transition: all 0.12s;
}
#macro-root .h-unit-btn:last-child { border-right: none; }
#macro-root .h-unit-btn.active {
  background: var(--vx-navy); color: #fff; font-weight: 700;
}

/* ── Weight hbox ── */
#macro-root .w-hbox {
  border: 1.5px solid var(--vx-border-l); border-radius: 9px;
  overflow: hidden; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
#macro-root .w-hbox:focus-within {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0,15,43,0.10);
}
#macro-root .w-hbox .w-single { display: flex; }
#macro-root .w-hbox .w-dual   { display: none; border-top: 1.5px solid var(--vx-border-l); }
#macro-root .w-hbox .w-dual.show { display: flex; }
#macro-root .w-hbox input {
  flex: 1; border: none; background: transparent;
  padding: 0.68rem 0.75rem; font-size: 0.95rem;
  color: var(--vx-navy); outline: none; min-width: 0; width: 0;
  -moz-appearance: textfield;
}
#macro-root .w-hbox input::-webkit-inner-spin-button,
#macro-root .w-hbox input::-webkit-outer-spin-button { -webkit-appearance: none; }
#macro-root .w-hbox input::placeholder { color: var(--vx-ph-l); }
#macro-root .w-sep {
  background: var(--vx-cream); border-left: 1.5px solid var(--vx-border-l);
  border-right: 1.5px solid var(--vx-border-l);
  padding: 0.68rem 0.55rem; font-size: 0.70rem; font-weight: 700;
  color: var(--vx-navy); display: flex; align-items: center;
  white-space: nowrap; flex-shrink: 0;
}
#macro-root .w-unit-bar { display: flex; border-top: 1.5px solid var(--vx-border-l); }
#macro-root .w-unit-btn {
  flex: 1; border: none; border-right: 1.5px solid var(--vx-border-l);
  background: var(--vx-cream); padding: 0.44rem;
  font-size: 0.70rem; font-weight: 500; color: var(--vx-muted);
  cursor: pointer; transition: all 0.12s;
}
#macro-root .w-unit-btn:last-child { border-right: none; }
#macro-root .w-unit-btn.active {
  background: var(--vx-navy); color: #fff; font-weight: 700;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 520px) {
  #macro-root .chips-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  #macro-root { padding: 1rem 0.75rem 3rem; }
  #macro-root .field-row.cols-2 { grid-template-columns: 1fr; }
  #macro-root .mode-toggle { flex-direction: column; align-items: center; }
  #macro-root .mode-btn { width: 100%; max-width: 260px; text-align: center; }
  #macro-root .macro-stats { grid-template-columns: 1fr; }
  #macro-root .goal-grid { grid-template-columns: repeat(3, 1fr); }
  #macro-root .chips-row { grid-template-columns: 1fr 1fr; }
  #macro-root .h-unit-btn, #macro-root .w-unit-btn { font-size: 0.63rem; padding: 0.38rem 0.15rem; }
  #macro-root .dl-row { flex-direction: column; }
  #macro-root .dl-btn { min-width: unset; }
}
@media (max-width: 360px) {
  #macro-root { padding: 0.75rem 0.5rem 2.5rem; }
  #macro-root .mc-hero { padding: 1.25rem 1rem; }
  #macro-root .card-body { padding: 1rem 0.85rem; }
  #macro-root .goal-grid { grid-template-columns: repeat(2, 1fr); }
  #macro-root .macro-stats { grid-template-columns: 1fr; }
}
