/* ==========================================================================
   Fitness Black Belt — calories-calculator.css
   Assessment wizard · analysing overlay · results dashboard.
   Every token here comes from base.css; nothing in the shared design system
   is redefined.
   ========================================================================== */

/* ==========================================================================
   0. HIDDEN ATTRIBUTE
   The UA stylesheet gives [hidden] display:none, but any author rule that
   sets display — and several below set grid or flex — outranks it. Every
   element this page toggles with .hidden (the analysing overlay, the results
   block, the unit-specific fields, the Back button) needs this to hold.
   ========================================================================== */
[hidden] { display: none !important; }

/* ==========================================================================
   0b. BREADCRUMBS
   Matches the copy carried in every other inner-page stylesheet, so the
   crumb trail reads identically across the site.
   ========================================================================== */
.crumbs {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.75rem;
}
.crumbs a { color: var(--brand-300); transition: color var(--dur); }
.crumbs a:hover { color: var(--brand-200); }
.crumbs span[aria-current] { color: var(--text-soft); }

/* ==========================================================================
   1. ASSESSMENT SHELL
   ========================================================================== */
.assess { position: relative; overflow: hidden; isolation: isolate; }

/* The page opens straight on this section, so its heading is the document h1.
   Sized to match the h2 the other sections use rather than the full --fs-4xl. */
.assess .section-head h1 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.034em;
}
.assess__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 45%;
  translate: -50% -50%;
  width: min(1150px, 116vw);
  aspect-ratio: 2.1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(91,33,182,.26), transparent 66%);
  filter: blur(64px);
}

.wz {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(1.6rem, 3.2vw, 2.75rem);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(124,58,237,.16), transparent 58%),
    linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.01)),
    var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 50px 110px -55px rgba(0,0,0,.95);
}
.wz::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* --- Progress --- */
.wz__rail { margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.wz__rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
.wz__label { color: var(--brand-300); font-size: 10px; letter-spacing: .1em; }
.wz__count { color: var(--dim); font-size: 10px; font-variant-numeric: tabular-nums; }
.wz__count b { color: var(--text); font-weight: 600; }

.wz__bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.wz__fill {
  display: block;
  height: 100%;
  width: 14.28%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-200));
  box-shadow: 0 0 14px rgba(139,92,246,.7);
  transition: width 520ms var(--ease-out);
}

.wz__dots {
  display: flex;
  justify-content: space-between;
  gap: .25rem;
  margin: .8rem 0 0;
  padding: 0;
  list-style: none;
}
.wz__dots li {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.16);
  transition: color var(--dur) var(--ease-out);
}
.wz__dots li.is-done { color: var(--brand-400); }
.wz__dots li.is-now { color: var(--text); }

/* --- Steps --- */
.wz__step {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.wz__step.is-active { display: grid; gap: clamp(1.35rem, 2.6vw, 1.85rem); animation: wz-in 460ms var(--ease-out); }
@keyframes wz-in {
  from { opacity: 0; transform: translateY(14px); }
}

.wz__intro h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.16;
  margin-bottom: .5rem;
}
.wz__intro p { font-size: var(--fs-sm); color: var(--muted); max-width: 52ch; }

.grid-2 { display: grid; gap: clamp(1.1rem, 2.2vw, 1.6rem); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* --- Fields --- */
.fld { display: grid; gap: .55rem; }
.fld > label,
.fld__legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-soft);
}
.fld__live {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--brand-200);
}
.fld__opt-tag {
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--dim);
  font-weight: 400;
}
.fld__note { font-size: 11px; line-height: 1.5; color: var(--dim); }

.fld__input { position: relative; display: flex; align-items: center; }
.fld__split { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

.fld input[type='number'],
.fld input[type='text'],
.fld input[type='email'],
.fld textarea {
  width: 100%;
  padding: .85rem 1rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}
.fld textarea { resize: vertical; min-height: 64px; font-size: var(--fs-sm); line-height: 1.6; }
.fld input::placeholder,
.fld textarea::placeholder { color: var(--dim); }
.fld input:focus,
.fld textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,.65);
  background: rgba(139,92,246,.07);
  box-shadow: 0 0 0 3px rgba(124,58,237,.16);
}
/* Spinners add visual noise and are useless on touch */
.fld input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
.fld input[type='number']::-webkit-outer-spin-button,
.fld input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.fld__unit {
  position: absolute;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--dim);
  pointer-events: none;
}

.fld__err {
  font-size: 11px;
  line-height: 1.5;
  color: var(--warn);
  display: none;
}
.fld__err.is-on { display: block; }
.fld__err--block { margin-top: -.5rem; }

/* --- Segmented pill groups --- */
.seg {
  display: grid;
  gap: .4rem;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}
.seg--3 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .seg--3 { grid-template-columns: repeat(3, 1fr); } }
.seg--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .seg--4 { grid-template-columns: repeat(4, 1fr); } }
.seg--5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .seg--5 { grid-template-columns: repeat(5, 1fr); } }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span {
  display: grid;
  gap: .18rem;
  height: 100%;
  padding: .65rem .7rem;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--dur), background var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
}
.seg__opt span em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .05em;
  color: var(--dim);
}
.seg__opt span:hover { border-color: rgba(139,92,246,.35); transform: translateY(-2px); }
.seg__opt input:checked + span {
  color: #FFFFFF;
  background: linear-gradient(150deg, rgba(124,58,237,.45), rgba(91,33,182,.24));
  border-color: rgba(139,92,246,.6);
  box-shadow: 0 10px 26px -14px rgba(124,58,237,1);
}
.seg__opt input:checked + span em { color: var(--brand-200); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--brand-200); outline-offset: 2px; }

/* --- Range sliders --- */
.rng {
  --fill: 50%;
  width: 100%;
  height: 4px;
  margin: .5rem 0 0;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-500) var(--fill), rgba(255,255,255,.08) var(--fill));
  cursor: pointer;
}
.rng::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--brand-500);
  box-shadow: 0 4px 14px -2px rgba(91,33,182,.9);
  transition: transform var(--dur) var(--ease-spring);
}
.rng::-webkit-slider-thumb:hover { transform: scale(1.15); }
.rng::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--brand-500);
  box-shadow: 0 4px 14px -2px rgba(91,33,182,.9);
}
.rng:focus-visible { outline: 2px solid var(--brand-200); outline-offset: 6px; }

.rng__scale {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: .07em;
  color: var(--dim);
}

/* --- Selectable cards --- */
.opts { display: grid; gap: .75rem; }
.opts--list { gap: .6rem; }
@media (min-width: 620px) { .opts--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .opts--3 { grid-template-columns: repeat(3, 1fr); } }

.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }

.opt__body {
  position: relative;
  display: grid;
  gap: .5rem;
  height: 100%;
  padding: clamp(1.1rem, 2.2vw, 1.45rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.04), rgba(255,255,255,.006)),
    var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur), transform var(--dur) var(--ease-out);
}
.opt__body:hover { transform: translateY(-3px); border-color: rgba(139,92,246,.45); }

.opt__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: .3rem;
  border-radius: 13px;
  color: var(--brand-200);
  background: linear-gradient(150deg, rgba(139,92,246,.28), rgba(91,33,182,.1));
  border: 1px solid rgba(139,92,246,.28);
  transition: transform var(--dur) var(--ease-spring), color var(--dur);
}
.opt__icon svg { width: 20px; height: 20px; }
.opt__body strong {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.opt__body em {
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--muted);
}

.opt input:checked + .opt__body {
  border-color: rgba(139,92,246,.75);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(124,58,237,.3), transparent 60%),
    linear-gradient(168deg, rgba(255,255,255,.06), rgba(255,255,255,.01)),
    var(--surface-2);
  box-shadow: 0 18px 44px -22px rgba(124,58,237,1);
}
.opt input:checked + .opt__body .opt__icon { color: #FFFFFF; transform: rotate(-7deg) scale(1.06); }
.opt input:focus-visible + .opt__body { outline: 2px solid var(--brand-200); outline-offset: 3px; }

/* Selected tick */
.opt input:checked + .opt__body::after {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    var(--brand-400)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
  box-shadow: 0 0 14px rgba(139,92,246,.9);
}

/* Row variant for activity level */
.opt--row .opt__body {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
}
.opt--row .opt__body::after { display: none; }
.opt__meter { display: inline-flex; gap: 3px; }
.opt__meter i {
  width: 6px;
  height: 20px;
  border-radius: 2px;
  background: rgba(255,255,255,.09);
}
.opt__meter i.is-on { background: var(--brand-400); box-shadow: 0 0 8px rgba(139,92,246,.7); }
.opt__text { display: grid; gap: .15rem; }
.opt--row .opt__body strong { font-size: var(--fs-base); }
.opt--row .opt__body em { font-size: var(--fs-xs); }
.opt__tag {
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--dim);
  padding: .25rem .5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.opt input:checked + .opt__body .opt__tag { color: var(--brand-200); border-color: rgba(139,92,246,.4); }

.notice--tight { margin-top: .5rem; }

/* --- Wizard controls --- */
.wz__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-top: clamp(1.35rem, 2.6vw, 1.85rem);
  border-top: 1px solid var(--line);
}
.wz__nav #wzNext { margin-left: auto; }

/* base.css has no disabled state for .btn, and this page needs one:
   Continue is locked until the current step is answerable. */
.wz__nav .btn:disabled {
  opacity: .38;
  cursor: not-allowed;
  filter: saturate(.5);
  box-shadow: none;
  transform: none;
}
.wz__nav .btn:disabled:hover { transform: none; }

/* ==========================================================================
   2. ANALYSING OVERLAY
   ========================================================================== */
.analyze {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(76,29,149,.5), transparent 70%),
    rgba(8,7,13,.96);
  backdrop-filter: blur(10px);
  animation: fade-in 400ms var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } }

.analyze__inner {
  display: grid;
  justify-items: center;
  gap: 1.6rem;
  width: min(420px, 100%);
  text-align: center;
}

.analyze__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  color: var(--brand-200);
}
.analyze__ring svg { width: 40px; height: 40px; }
.analyze__ring span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(139,92,246,.3);
}
.analyze__ring span:nth-child(1) { animation: an-spin 3.2s linear infinite; border-top-color: var(--brand-300); }
.analyze__ring span:nth-child(2) { inset: 14px; border-style: dashed; animation: an-spin 5.5s linear infinite reverse; }
.analyze__ring span:nth-child(3) { inset: 28px; border-color: rgba(227,190,124,.28); animation: an-spin 8s linear infinite; }
@keyframes an-spin { to { rotate: 360deg; } }

.analyze__step {
  min-height: 1.5em;
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  color: var(--text-soft);
}
.analyze__step.is-in { animation: an-line 460ms var(--ease-out); }
@keyframes an-line { from { opacity: 0; transform: translateY(6px); } }

.analyze__bar {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.analyze__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-200));
  box-shadow: 0 0 14px rgba(139,92,246,.8);
  transition: width 560ms var(--ease-out);
}
.analyze__pct { font-size: 10px; letter-spacing: .12em; color: var(--dim); }

/* ==========================================================================
   3. RESULTS — energy hero
   ========================================================================== */
.res-hero { position: relative; overflow: hidden; isolation: isolate; }
.res-hero__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(1200px, 120vw);
  aspect-ratio: 2.2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(109,40,217,.32), transparent 66%);
  filter: blur(70px);
}

.energy {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
  padding: clamp(1.85rem, 4vw, 3.25rem);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(124,58,237,.24), transparent 62%),
    linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid rgba(139,92,246,.28);
  box-shadow: 0 50px 110px -55px rgba(0,0,0,.95);
}

.energy__main { text-align: center; }
.energy__label { display: block; color: var(--brand-300); font-size: 10px; letter-spacing: .12em; margin-bottom: .9rem; }
.energy__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.energy__value b {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 11vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.energy__value span { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); letter-spacing: .06em; }
.energy__sub {
  max-width: 60ch;
  margin: 1.1rem auto 0;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--muted);
}

.energy__split {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding-block: clamp(1.35rem, 3vw, 1.85rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) { .energy__split { grid-template-columns: repeat(3, 1fr); } }
.energy__stat { display: grid; gap: .4rem; text-align: center; }
.energy__stat .mono { font-size: 9px; letter-spacing: .09em; color: var(--dim); }
.energy__stat b {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.energy__bar { display: flex; height: 34px; border-radius: 10px; overflow: hidden; }
.energy__seg {
  display: grid;
  place-items: center;
  transition: width 1.2s var(--ease-out);
}
.energy__seg i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}
.energy__seg--bmr { background: linear-gradient(90deg, var(--brand-700), var(--brand-500)); }
.energy__seg--act { background: linear-gradient(90deg, rgba(139,92,246,.35), rgba(139,92,246,.18)); }

/* ==========================================================================
   4. CALORIE TARGET CARDS
   ========================================================================== */
.tcards { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 860px) { .tcards { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.tcard {
  position: relative;
  display: grid;
  gap: .55rem;
  padding: clamp(1.6rem, 2.8vw, 2.2rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  transition: transform var(--dur) var(--ease-out);
}
.tcard::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  clip-path: inherit;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--dur) var(--ease-out);
}
.tcard:hover { transform: translateY(-5px); }
.tcard > * { position: relative; z-index: 1; }

.tcard--active {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(124,58,237,.28), transparent 60%),
    linear-gradient(168deg, rgba(255,255,255,.055), rgba(255,255,255,.01)),
    var(--surface-2);
  box-shadow: 0 40px 90px -50px rgba(76,29,149,.95);
}
.tcard--active::before { box-shadow: inset 0 0 0 1px rgba(139,92,246,.5); }

.tcard__flag {
  position: absolute;
  z-index: 4;
  top: 0;
  left: clamp(1.6rem, 2.8vw, 2.2rem);
  padding: .28rem .65rem;
  font-size: 9px;
  letter-spacing: .1em;
  color: #FFFFFF;
  background: var(--grad-brand);
  border-radius: 0 0 6px 6px;
}
.tcard--active { padding-top: calc(clamp(1.6rem, 2.8vw, 2.2rem) + .75rem); }
.tcard__name { color: var(--dim); font-size: 10px; letter-spacing: .1em; }
.tcard__value { display: flex; align-items: baseline; gap: .45rem; }
.tcard__value b {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.tcard__value span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.tcard__delta { font-size: 9px; letter-spacing: .06em; color: var(--brand-300); }
.tcard p { margin-top: .6rem; font-size: var(--fs-sm); line-height: 1.68; color: var(--muted); }

/* ==========================================================================
   5. MACROS
   ========================================================================== */
.macros { position: relative; overflow: hidden; isolation: isolate; }
.macros__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 55%;
  translate: -50% -50%;
  width: min(1100px, 114vw);
  aspect-ratio: 2.4;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(91,33,182,.24), transparent 66%);
  filter: blur(62px);
}

.macro-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 560px) { .macro-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .macro-grid { grid-template-columns: repeat(4, 1fr); } }

.macro {
  display: grid;
  justify-items: center;
  gap: .5rem;
  padding: clamp(1.6rem, 2.6vw, 2.1rem);
  text-align: center;
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur), transform var(--dur) var(--ease-out);
}
.macro:hover { transform: translateY(-5px); border-color: rgba(139,92,246,.45); }
.macro .ringwrap { margin-bottom: .9rem; }
.macro h3 { font-size: var(--fs-base); font-weight: 650; }
.macro__num { font-size: var(--fs-sm); color: var(--muted); }
.macro__num b { color: var(--text); font-weight: 650; }
.macro__note { font-size: 9px; letter-spacing: .05em; color: var(--dim); line-height: 1.5; }

.ring--mute { --ring-color: rgba(139,92,246,.4); opacity: .75; }

.macros__note {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--dim);
  text-align: center;
}

/* ==========================================================================
   6. HYDRATION
   ========================================================================== */
.hyd {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.85rem, 4vw, 3rem);
  border-radius: var(--r-lg);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(56,189,248,.12), transparent 58%),
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid var(--line-strong);
}
@media (min-width: 880px) { .hyd { grid-template-columns: 1.1fr .9fr; } }

.hyd__copy h2 { font-size: var(--fs-2xl); }
.hyd__tip {
  margin-top: 1.6rem;
  padding: 1rem 1.15rem;
  font-size: var(--fs-sm);
  line-height: 1.68;
  color: var(--text-soft);
  background: rgba(139,92,246,.08);
  border-left: 2px solid var(--brand-400);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.hyd__tip b { color: var(--brand-200); }

.hyd__viz { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; }
.hyd__glass {
  position: relative;
  width: 84px;
  height: 128px;
  border: 2px solid rgba(139,92,246,.35);
  border-top: 0;
  border-radius: 6px 6px 26px 26px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.hyd__level {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--lvl, 50%);
  background: linear-gradient(180deg, rgba(139,92,246,.75), rgba(76,29,149,.85));
  box-shadow: 0 -6px 22px rgba(124,58,237,.7);
  transition: height 1.3s var(--ease-out);
}
.hyd__level::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: rgba(196,181,253,.85);
}
.hyd__nums { display: grid; gap: 1.1rem; }
.hyd__nums b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}
.hyd__nums b.is-under { color: var(--warn); }
.hyd__nums b.is-ok { color: var(--ok); }
.hyd__nums .mono { font-size: 9px; letter-spacing: .08em; color: var(--dim); }

/* ==========================================================================
   7. MEAL DISTRIBUTION
   ========================================================================== */
.mealbar {
  display: flex;
  height: 44px;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.85rem);
  border-radius: 10px;
  overflow: hidden;
}
.mealbar__seg { display: grid; place-items: center; min-width: 0; }
.mealbar__seg i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-inline: .35rem;
}
.mealbar__seg--0 { background: linear-gradient(90deg, var(--brand-700), var(--brand-600)); }
.mealbar__seg--1 { background: linear-gradient(90deg, var(--brand-600), var(--brand-500)); }
.mealbar__seg--2 { background: linear-gradient(90deg, var(--brand-500), var(--brand-400)); }
.mealbar__seg--3 { background: linear-gradient(90deg, var(--brand-400), rgba(196,181,253,.75)); }

.meal-grid { display: grid; gap: clamp(1rem, 2vw, 1.35rem); }
@media (min-width: 560px) { .meal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .meal-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

.meal {
  position: relative;
  display: grid;
  gap: .35rem;
  padding: clamp(1.5rem, 2.6vw, 1.9rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur), transform var(--dur) var(--ease-out);
}
.meal:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.45); }
.meal__idx {
  position: absolute;
  top: 1rem;
  right: 1.15rem;
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--dim);
}
.meal h3 { font-size: var(--fs-base); font-weight: 650; }
.meal__kcal { display: flex; align-items: baseline; gap: .35rem; margin-top: .3rem; }
.meal__kcal b {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.meal__kcal span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.meal__share { font-size: 9px; letter-spacing: .07em; color: var(--brand-300); }
.meal__macro { font-size: 9px; letter-spacing: .05em; color: var(--dim); margin-top: .35rem; }

/* ==========================================================================
   8. NUTRITION SUMMARY
   ========================================================================== */
.sum-grid { display: grid; gap: clamp(.8rem, 1.8vw, 1.15rem); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.sum {
  display: grid;
  gap: .5rem;
  padding: clamp(1.35rem, 2.4vw, 1.75rem);
  text-align: center;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(124,58,237,.14), transparent 62%),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur), transform var(--dur) var(--ease-out);
}
.sum:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.45); }
.sum__k { font-size: 9px; letter-spacing: .12em; color: var(--dim); }
.sum__v {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.sum__v em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--muted);
  margin-left: .2rem;
}

/* ==========================================================================
   9. COACH'S READ
   ========================================================================== */
.analysis { position: relative; overflow: hidden; isolation: isolate; }
.analysis__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(1150px, 116vw);
  aspect-ratio: 2.3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(91,33,182,.24), transparent 66%);
  filter: blur(62px);
}

.read { display: grid; gap: clamp(1.25rem, 2.5vw, 1.85rem); }

.read__tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .3rem .65rem;
  font-size: 9px;
  letter-spacing: .11em;
  color: var(--brand-200);
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 4px;
}
.read__tag--good { color: var(--ok); background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.25); }
.read__tag--gap { color: var(--warn); background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.25); }

.read__lead {
  padding: clamp(1.75rem, 3.2vw, 2.6rem);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(124,58,237,.26), transparent 60%),
    linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.01)),
    var(--surface-2);
  border: 1px solid rgba(139,92,246,.35);
  box-shadow: 0 40px 90px -50px rgba(76,29,149,.9);
}
.read__lead h3 { font-size: clamp(1.3rem, 2.4vw, 1.85rem); line-height: 1.18; margin-bottom: .8rem; }
.read__lead p { font-size: var(--fs-base); line-height: 1.75; color: var(--text-soft); max-width: 72ch; }
.read__fix {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm) !important;
  color: var(--muted) !important;
}
.read__fix b { color: var(--brand-200); }

.read__cols { display: grid; gap: clamp(1.25rem, 2.5vw, 1.85rem); }
@media (min-width: 900px) { .read__cols { grid-template-columns: 1fr 1fr; } }

.read__col {
  padding: clamp(1.6rem, 2.8vw, 2.2rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.04), rgba(255,255,255,.006)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
.read__item { padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.read__item:last-child { border-bottom: 0; padding-bottom: 0; }
.read__item h4 {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .45rem;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
}
.read__item h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  rotate: 45deg;
}
.read__item--good h4::before { background: var(--ok); box-shadow: 0 0 9px rgba(52,211,153,.7); }
.read__item--gap h4::before { background: var(--warn); box-shadow: 0 0 9px rgba(251,191,36,.7); }
.read__item p { padding-left: 1.4rem; font-size: var(--fs-sm); line-height: 1.68; color: var(--muted); }
.read__empty { font-size: var(--fs-sm); color: var(--muted); line-height: 1.68; }

/* ==========================================================================
   10. PRIORITY ACTIONS
   ========================================================================== */
.rec-list { display: grid; gap: clamp(.85rem, 1.8vw, 1.15rem); margin: 0; padding: 0; list-style: none; }

.rec {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: start;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.35rem, 2.4vw, 1.8rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.04), rgba(255,255,255,.006)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur), transform var(--dur) var(--ease-out);
}
.rec:hover { transform: translateX(4px); border-color: rgba(139,92,246,.45); }
.rec__num { font-size: 10px; letter-spacing: .1em; color: var(--dim); padding-top: .85rem; }
.rec__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--brand-200);
  background: linear-gradient(150deg, rgba(139,92,246,.28), rgba(91,33,182,.1));
  border: 1px solid rgba(139,92,246,.28);
}
.rec__icon svg { width: 20px; height: 20px; }
.rec h3 { font-size: var(--fs-base); font-weight: 650; margin-bottom: .35rem; }
.rec p { font-size: var(--fs-sm); line-height: 1.68; color: var(--muted); }

/* First two actions carry the most weight — mark them */
.rec:nth-child(1), .rec:nth-child(2) {
  background:
    radial-gradient(100% 90% at 0% 0%, rgba(124,58,237,.16), transparent 58%),
    linear-gradient(168deg, rgba(255,255,255,.05), rgba(255,255,255,.008)),
    var(--surface);
  border-color: rgba(139,92,246,.32);
}

/* ==========================================================================
   11. TIMELINE
   ========================================================================== */
.tline { display: grid; gap: clamp(1rem, 2vw, 1.35rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
@media (min-width: 640px)  { .tline { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tline { grid-template-columns: repeat(4, 1fr); } }

.tl {
  position: relative;
  display: grid;
  gap: .35rem;
  padding: clamp(1.5rem, 2.6vw, 2rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
.tl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: linear-gradient(90deg, var(--brand-400), transparent);
}
.tl__when { font-size: 9px; letter-spacing: .12em; color: var(--brand-300); }
.tl__figure {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.tl__unit { font-size: 9px; letter-spacing: .07em; color: var(--muted); }
.tl p { margin-top: .55rem; font-size: var(--fs-xs); line-height: 1.65; color: var(--muted); }

/* ==========================================================================
   12. FOODS
   ========================================================================== */
.foods { position: relative; overflow: hidden; isolation: isolate; }
.foods__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 55%;
  translate: -50% -50%;
  width: min(1100px, 114vw);
  aspect-ratio: 2.4;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(91,33,182,.22), transparent 66%);
  filter: blur(62px);
}

.food-grid { display: grid; gap: clamp(1rem, 2vw, 1.35rem); }
@media (min-width: 620px)  { .food-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .food-grid { grid-template-columns: repeat(4, 1fr); } }

.food {
  padding: clamp(1.5rem, 2.6vw, 2rem);
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur), transform var(--dur) var(--ease-out);
}
.food:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.45); }
.food h3 { font-size: var(--fs-base); font-weight: 650; margin-bottom: .35rem; }
.food__note { font-size: 9px; letter-spacing: .05em; color: var(--dim); line-height: 1.5; margin-bottom: 1.1rem; }
.food ul { display: grid; gap: .5rem; }
.food li {
  position: relative;
  padding-left: 1.15rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.food li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-400);
}
.foods__note {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--dim);
  text-align: center;
}

/* ==========================================================================
   13. PROGRAM MATCH
   ========================================================================== */
.match { position: relative; overflow: hidden; isolation: isolate; }
.match__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 45%;
  translate: -50% -50%;
  width: min(1150px, 116vw);
  aspect-ratio: 2.2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(109,40,217,.28), transparent 66%);
  filter: blur(64px);
}

.match__grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
@media (min-width: 880px) { .match__grid { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.mcard {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .85rem;
  padding: clamp(1.75rem, 3vw, 2.35rem);
  text-align: center;
  background:
    linear-gradient(168deg, rgba(255,255,255,.04), rgba(255,255,255,.006)),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur);
}
.mcard:hover { transform: translateY(-5px); }
.mcard--best {
  padding-top: calc(clamp(1.75rem, 3vw, 2.35rem) + .85rem);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(124,58,237,.3), transparent 60%),
    linear-gradient(168deg, rgba(255,255,255,.06), rgba(255,255,255,.01)),
    var(--surface-2);
  border-color: rgba(139,92,246,.55);
  box-shadow: 0 44px 96px -50px rgba(76,29,149,1);
}
@media (min-width: 880px) { .mcard--best { margin-top: -1.5rem; } }

.mcard__flag {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  padding: .3rem .8rem;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: .1em;
  color: #FFFFFF;
  background: var(--grad-brand);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 24px -10px rgba(124,58,237,1);
}
.mcard__name { font-size: 10px; letter-spacing: .09em; color: var(--text-soft); }
.mcard--best .mcard__name { color: var(--brand-200); }
.mcard__score { margin-block: .35rem; }
.mcard__meta { font-size: 9px; letter-spacing: .07em; color: var(--dim); }
.mcard .btn { margin-top: .5rem; }

.why {
  padding: clamp(1.75rem, 3.2vw, 2.6rem);
  border-radius: var(--r-lg);
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    var(--surface);
  border: 1px solid var(--line-strong);
}
.why__tag {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 10px;
  letter-spacing: .11em;
  color: var(--brand-300);
}
.why__lead { font-size: var(--fs-md); color: var(--text-soft); margin-bottom: 1.1rem; }
.why__list { display: grid; gap: .7rem; margin-bottom: 1.5rem; }
.why__list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-soft);
}
.why__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  rotate: 45deg;
  background: var(--brand-400);
  box-shadow: 0 0 9px rgba(139,92,246,.8);
}
.why__note {
  max-width: 74ch;
  margin-bottom: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--dim);
}

/* ==========================================================================
   14. MOTION GUARDS
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .wz__step.is-active { animation: none; }
  .analyze { animation: none; }
  .analyze__ring span { animation: none; }
  .analyze__step.is-in { animation: none; }
}
