/* =====================================================================
   Kosso Nutrition — Keuzehulp
   Mobile-first, app-feel UI matching kossonutrition.nl branding.
   - Background: white  (matches site --color-background: 255,255,255)
   - Text:       near-black  (--color-foreground: 34,34,34)
   - Heading:    pure black  (--color-heading: 0,0,0)
   - Accent:     sky-blue    (--color-button alt: 101,190,236 = #65BEEC)
   - Buttons:    pill-shaped, uppercase, condensed
   - Heading typeface: Barlow Condensed (free alt to Acumin Pro Condensed)
   - Body typeface:    Inter (paired sans, neutral)
   ===================================================================== */

:root {
  --bg:           #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f8f8f8;
  --surface-3:    #efefef;
  --border:       #dedede;
  --border-strong:#222222;
  --text:         #222222;
  --text-strong:  #000000;
  --text-dim:     #666666;
  --text-muted:   #999999;
  --accent:       #65BEEC;       /* sky blue – Kosso signature */
  --accent-2:     #2DA9DC;
  --accent-soft:  rgba(101,190,236,0.16);
  --accent-tint:  rgba(101,190,236,0.08);
  --success:      #4cb242;       /* Kosso cart green */
  --danger:       #DA3F3F;

  --topbar-h:     56px;
  --footer-h:     calc(76px + env(safe-area-inset-bottom));
  --radius:       12px;
  --radius-sm:    8px;
  --radius-pill:  100px;          /* Kosso btn-border-radius */

  --shadow-sm:    0 1px 2px rgba(0,0,0,0.04);
  --shadow-pop:   0 8px 24px rgba(0,0,0,0.08);

  --ease:         cubic-bezier(.2,.7,.2,1);

  --font-heading: "Barlow Condensed", "Acumin Pro Condensed", "Oswald", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Inter", "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* HTML hidden attribute must win over our display: flex / inline-flex rules. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

body { min-height: 100dvh; }

button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; }   /* iOS no-zoom */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0;
}

/* ---------- App shell ----------- */

.wizard {
  position: relative;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}
.wizard.has-footer { padding-bottom: var(--footer-h); }

/* ---------- Sticky top app bar ----------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  height: var(--topbar-h);
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.appbar__back,
.appbar__action {
  appearance: none;
  background: transparent;
  border: 0;
  height: var(--topbar-h);
  width: 56px;
  display: inline-grid;
  place-items: center;
  color: var(--text-strong);
  cursor: pointer;
  transition: opacity .15s var(--ease);
}
.appbar__back[disabled],
.appbar__action[disabled] { opacity: 0; pointer-events: none; }
.appbar__back svg,
.appbar__action svg { width: 22px; height: 22px; }

.appbar__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-decoration: none;
  user-select: none;
}
.appbar__brand img {
  height: 30px;
  width: auto;
  display: block;
}

/* Progress hairline directly under appbar */
.progress-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 29;
  height: 3px;
  background: var(--surface-3);
}
.progress-bar__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text-strong);
  transition: width .45s var(--ease);
}

/* ---------- Stage / steps ----------- */

.stage {
  flex: 1;
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 8px;
}

.step { display: none; }
.step.is-active {
  display: block;
  animation: stepIn .32s var(--ease) both;
}
.step.is-leaving {
  display: block;
  animation: stepOut .22s var(--ease) both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes stepOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-12px); }
}
@keyframes stepInBack {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.step.is-active.is-back { animation-name: stepInBack; }

.step__eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin: 0 0 10px;
}
.step__title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  letter-spacing: -0.005em;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}
.step__lead {
  margin: 0 0 24px;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.5;
}
/* On the result step we want less space below the lead — the recap
   ribbon sits directly underneath, no breathing room needed. */
.step[data-mode="end"] .step__lead { margin-bottom: 12px; }
.step[data-mode="end"] .step__title { margin-bottom: 4px; }

/* ---------- Cards (single-select tiles) ----------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cards--single { grid-template-columns: 1fr; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  min-height: 120px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease);
  text-align: left;
}
.card:active { transform: scale(0.985); }
.card input { position: absolute; opacity: 0; pointer-events: none; }

.card__icon {
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 6px;
}
.card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-strong);
  line-height: 1.05;
}
.card__text {
  color: var(--text-dim);
  font-size: 0.875rem;
  line-height: 1.4;
}

.card.is-selected {
  border-color: var(--text-strong);
  background: var(--accent-tint);
  box-shadow: 0 0 0 1.5px var(--text-strong) inset;
}
.card.is-selected::after {
  content: "";
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--text-strong);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12.5 10 17.5 19 7.5'/></svg>");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
  animation: pop .25s var(--ease);
}
@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* List style (vertical) */
.cards--vertical { display: flex; flex-direction: column; gap: 8px; }
.card--row {
  flex-direction: row;
  align-items: flex-start;
  gap: 4px 12px;
  min-height: auto;
  padding: 16px 18px;
  padding-right: 48px;
}
.card--row .card__title { min-width: 0; flex: 0 0 auto; }
.card--row .card__text { flex: 1 1 100%; margin-top: 2px; }

/* ---------- Pills (chips) ----------- */

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
  flex: 1 1 auto;
}
.pill:active { transform: scale(0.97); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill.is-selected {
  border-color: var(--text-strong);
  background: var(--text-strong);
  color: #fff;
}
.pill-group--equal .pill { flex: 1 1 0; }

/* ---------- Form inputs ----------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.form-grid--two { grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-group--full { grid-column: 1 / -1; }

.form-group > label,
.form-group > legend {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0;
}

.form-group__hint {
  margin: -4px 0 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input-wrap:focus-within {
  border-color: var(--text-strong);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.input-wrap input {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 14px;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 600;
  outline: none;
  letter-spacing: -0.01em;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type=number] { -moz-appearance: textfield; }
.input-wrap .suffix {
  padding-right: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  text-transform: lowercase;
}

.hint {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text-strong);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint span { color: var(--text-dim); }
.hint strong { font-weight: 700; }

/* ---------- Result step ----------- */

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.result-card--accent {
  background: var(--text-strong);
  color: #fff;
  border-color: var(--text-strong);
}
.result-card--accent .result-card__label,
.result-card--accent .result-card__unit,
.result-card--accent .result-card__hint { color: rgba(255,255,255,0.74); }
.result-card--accent .result-card__value { color: #fff; }
.result-card__label {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.result-card__value {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text-strong);
}
.result-card__unit { color: var(--text-dim); font-size: 0.85rem; }
.result-card__hint { color: var(--text-dim); font-size: 0.85rem; margin-top: 6px; }

.macros {
  margin-top: 20px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.macros h3 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
/* Mobile: stacked rows so the labels (incl. "Koolhydraten") have
   room. On >=720px we go back to a 3-column card grid. */
.macros__grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.macros__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.macros__label {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  flex: 0 0 auto;
}
.macros__value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  white-space: nowrap;
}
.macros__value strong { font-weight: inherit; }
.macros__note { font-size: 0.82rem; color: var(--text-dim); margin: 12px 0 0; }

@media (min-width: 720px) {
  .macros__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .macros__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .macros__value { font-size: 1.5rem; }
}

/* ---------- Summary ----------- */

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 24px;
}
.summary__item {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.summary__item span {
  font-family: var(--font-heading);
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.summary__item strong { font-size: 0.95rem; font-weight: 700; color: var(--text-strong); }

/* ---------- Recommendations (compact 2-col grid) ----------- */

.recommendations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  overflow: hidden;
  transition: border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.product:active { transform: scale(0.985); }
.product:hover { border-color: var(--text-strong); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }

.product__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product__media img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.product__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-heading);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.product__badge--alt {
  background: var(--text-strong);
  color: #fff;
}

.product__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.product__cat {
  font-family: var(--font-heading);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.product__title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin: 2px 0 4px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-strong);
  line-height: 1.05;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: auto;
  padding-top: 4px;
}
.product__info {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  border: 1px solid var(--border);
}
@media (min-width: 720px) {
  .recommendations { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .product__title { font-size: 1.05rem; }
}

/* ---------- Product detail modal (PDP) ----------- */

.modal__panel--info {
  max-width: 460px;
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
}

.modal__panel--product {
  max-width: 540px;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;             /* keep rounded corners over the image */
  display: flex;
  flex-direction: column;
}
/* The PDP scrolls internally so the absolute-positioned close button
   above it stays visible no matter how long the product copy is. */
.pdp {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
.pdp__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.pdp__media img { width: 60%; height: 80%; object-fit: contain; }
.pdp__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-heading);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.pdp__head { padding: 18px 22px 6px; }
.pdp__cat {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.pdp__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  text-transform: uppercase;
  margin: 2px 0 4px;
  letter-spacing: -0.005em;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.05;
}
.pdp__price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
}
.pdp__why {
  margin: 12px 22px 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.pdp__section {
  margin: 16px 22px 0;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.pdp__heading {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 700;
  margin: 0 0 10px;
}
.pdp__reasons {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pdp__reasons li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-strong);
  line-height: 1.4;
}
.pdp__reasons li::before {
  content: "✓";
  color: var(--accent-2);
  font-weight: 800;
  flex: 0 0 14px;
  text-align: center;
}
.pdp__personal {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.pdp__goal,
.pdp__usage {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}
.pdp__goal { white-space: pre-line; }
.modal__panel--product .btn {
  margin: 18px 22px 0;
  width: calc(100% - 44px);
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Sticky footer CTA ----------- */

.footer-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform .3s var(--ease);
}
.footer-cta.is-visible { transform: translateY(0); }
.footer-cta__inner { max-width: 720px; margin: 0 auto; }

/* ---------- Buttons ----------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 1px solid var(--text-strong);
  border-radius: var(--radius-pill);
  background: var(--text-strong);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .1s var(--ease), background .15s var(--ease), opacity .15s var(--ease), color .15s var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  border-color: var(--surface-3);
  cursor: not-allowed;
}
.btn--secondary {
  background: transparent;
  color: var(--text-strong);
  border: 1.5px solid var(--text-strong);
}
.btn--secondary:active { transform: scale(0.985); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-family: var(--font-body);
}

.step__nav-end {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ---------- Info-tip pill (BMR/TDEE/macro tooltips) ----------- */

.info-tip {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0;
  border: 1.4px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  vertical-align: -2px;
  opacity: 0.55;
  transition: opacity .15s var(--ease), background .15s var(--ease);
  /* Don't let the pill shrink at low font sizes */
  flex-shrink: 0;
}
.info-tip:hover { opacity: 1; }
.info-tip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  opacity: 1;
}
.info-tip:active { transform: scale(0.92); }
.info-tip--invert { color: rgba(255,255,255,0.78); }

/* Generous tap-target overlay so the small "i" still feels easy to
   tap on mobile without changing the visual size. */
.info-tip::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
}
.info-tip { position: relative; }

/* ---------- Modal ----------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
  transform: translateY(100%);
  transition: transform .3s var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: max(env(safe-area-inset-top, 0px), 12px);
  right: 16px;
  z-index: 65;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--text-strong);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  transition: transform .1s var(--ease), background .15s var(--ease);
}
.modal__close:hover { background: #222; }
.modal__close:active { transform: scale(0.92); }
/* Anchored to the .modal root (which is position:fixed; inset:0) — NOT
   to the panel — so the button stays glued to the viewport's top-right
   even when the panel scrolls or fills the full screen. position:fixed
   wouldn't work from inside the panel because the panel has a transform. */

.modal__title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: clamp(1.4rem, 5vw, 1.7rem);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text-strong);
  font-weight: 800;
}
.modal__lead {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.modal__form { display: flex; flex-direction: column; gap: 14px; }
.modal__status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-align: center;
}
.modal__status.is-error { color: var(--danger); }
.modal__status.is-success { color: var(--success); font-weight: 600; }

@media (min-width: 720px) {
  .modal { align-items: center; padding: 24px; }
  .modal__panel {
    border-radius: 18px;
    transform: scale(0.96) translateY(8px);
  }
  .modal.is-open .modal__panel { transform: scale(1) translateY(0); }
}

.site-footer {
  padding: 18px 20px 28px;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.5;
}
.site-footer p { margin: 0 0 6px; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer__disclaimer {
  font-size: clamp(0.66rem, 2.6vw, 0.78rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-footer a { color: var(--text-dim); text-decoration: underline; }
.site-footer__copy {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 12px !important;
}
img.site-footer__tag {
  display: inline-block !important;
  width: 110px !important;
  max-width: 110px !important;
  height: auto !important;
  margin-top: 10px;
  transform: rotate(-3deg);
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.12));
}
@media (min-width: 720px) {
  img.site-footer__tag { width: 130px !important; max-width: 130px !important; }
}

/* ---------- Tablet / desktop scale-up ----------- */

@media (min-width: 720px) {
  :root { --topbar-h: 64px; }
  .appbar__brand img { height: 36px; }
  .stage { padding: 40px 32px 16px; }
  .step__title { font-size: 3rem; }
  .step__lead { font-size: 1.05rem; max-width: 56ch; }
  .cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-grid--two { gap: 16px; }
  .summary { grid-template-columns: repeat(4, 1fr); }
  .result-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .result-grid > .result-card--accent { grid-column: 1 / -1; }
  .recommendations { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-cta { padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); }
}

@media (min-width: 960px) {
  .recommendations { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Reduced motion ----------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

/* ---------- Focus states ----------- */
button:focus-visible,
.card:focus-visible,
.pill:focus-visible,
.product:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.input-wrap:focus-within { outline: none; }

/* =====================================================================
   Trainingsplan-specific blocks
   Reuses Kosso tokens (--accent, --text-strong, --font-heading, etc.)
   ===================================================================== */

/* ---------- Plan recap ribbon ---------- */
.plan-recap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 4px 0 14px;
}
@media (min-width: 720px) {
  .plan-recap { grid-template-columns: repeat(4, 1fr); }
}
.plan-recap__item {
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.plan-recap__label {
  font-family: var(--font-heading);
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.plan-recap__value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

/* ---------- Plan intro ---------- */
.plan-intro {
  margin: 6px 0 22px;
  padding: 18px;
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}
.plan-intro p { margin: 0; }
.plan-intro p + p { margin-top: 8px; }

/* ---------- Weekly schedule ---------- */
.week {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.day {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s var(--ease);
}
.day:hover { border-color: var(--text-strong); }

.day--rest {
  background: var(--surface-2);
  border-style: dashed;
}

.day__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: var(--text-strong);
  color: #fff;
}
.day--rest .day__head {
  background: var(--surface-3);
  color: var(--text-dim);
  border-bottom: 0;
}

.day__num {
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  opacity: 0.7;
}
.day__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  flex: 1 1 auto;
  text-align: right;
}

.day__body { padding: 0; }

.day__meta {
  padding: 6px 14px 0;
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}

.day__rest-text {
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Exercise list ---------- */
.exercises {
  list-style: none;
  margin: 0;
  padding: 4px 0 6px;
  display: flex;
  flex-direction: column;
}
.exercise {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  border-top: 1px solid var(--surface-3);
}
.exercise:first-child { border-top: 0; }

.exercise__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.exercise__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
}
.exercise__scheme {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  letter-spacing: 0;
  white-space: nowrap;
  text-align: right;
  flex: 0 0 auto;
}
.exercise__targets {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.exercise__note {
  color: var(--text-dim);
  font-size: 0.83rem;
  line-height: 1.45;
  font-style: italic;
}
.exercise__explain {
  align-self: flex-start;
  margin-top: 2px;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 0;
  color: var(--accent-2);
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s var(--ease);
}
.exercise__explain:hover { color: var(--text-strong); }
.exercise__explain:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Loading state ---------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-dim);
}
.loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--text-strong);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading__label {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--text-dim);
}

.error-panel {
  margin: 14px 0;
  padding: 14px 16px;
  background: #fdeded;
  border: 1px solid #f3c4c4;
  color: #8b1a1a;
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.error-panel strong { display: block; margin-bottom: 4px; font-weight: 700; }

/* ---------- Cross-link hero (back to keuzehulp) ---------- */
.crosslink {
  margin: 26px 0 0;
  padding: 18px 18px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crosslink__eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  font-weight: 600;
}
.crosslink__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-strong);
  margin: 0;
  line-height: 1.1;
}
.crosslink__text {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.crosslink__btn {
  align-self: flex-start;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--text-strong);
  background: transparent;
  color: var(--text-strong);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.crosslink__btn:hover {
  background: var(--text-strong);
  color: #fff;
}

/* ---------- Appbar sub-wordmark ---------- */
.appbar__brand {
  gap: 8px;
}
.appbar__sub {
  display: inline-block;
  padding: 3px 7px;
  border: 1.5px solid var(--text-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-strong);
  line-height: 1;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .appbar__sub { font-size: 11px; padding: 4px 9px; }
}

/* ---------- Exercise modal ---------- */
.exercise-modal__heading {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 700;
  margin: 18px 0 10px;
}
.exercise-modal__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exercise-modal__steps li {
  position: relative;
  padding: 12px 14px 12px 44px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--text);
  counter-increment: step;
}
.exercise-modal__steps li::before {
  content: counter(step);
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--text-strong);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}
.exercise-modal__hint {
  margin: 16px 0 0;
  padding: 10px 12px;
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---------- Loading checklist ---------- */
.loading__steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.loading__steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.loading__icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1.5px solid var(--text-dim);
  background: transparent;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  position: relative;
}

/* In-progress: pulsing accent dot */
.loading__steps li.is-doing {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--text-strong);
}
.loading__steps li.is-doing .loading__icon {
  border-color: var(--accent);
}
.loading__steps li.is-doing .loading__icon::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.5; }
  50%      { transform: scale(1);   opacity: 1; }
}

/* Done: black filled circle with white checkmark */
.loading__steps li.is-done {
  color: var(--text-strong);
}
.loading__steps li.is-done .loading__icon {
  background: var(--text-strong);
  border-color: var(--text-strong);
}
.loading__steps li.is-done .loading__icon::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.loading__hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
.loading__warn {
  margin: 6px auto 0;
  max-width: 32ch;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--danger);
  text-align: center;
  font-weight: 600;
}

/* =====================================================================
   Voedingsplan — result-specific blocks
   ===================================================================== */

.section-heading {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text-strong);
  margin: 28px 0 12px;
  line-height: 1.1;
}

/* ----- Big kcal target card ----- */
.kcal-card {
  background: var(--text-strong);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 6px 0 8px;
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
}
.kcal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  opacity: 0.18;
  pointer-events: none;
}
.kcal-card > * { position: relative; }
.kcal-card__target {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kcal-card__eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}
.kcal-card__big {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1;
  color: #fff;
  margin-top: 4px;
}
.kcal-card__unit {
  font-size: 0.45em;
  font-weight: 700;
  margin-left: 2px;
  color: rgba(255,255,255,0.85);
}
.kcal-card__sub {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 2px;
}
.kcal-card__row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.kcal-card__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kcal-card__label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}
.kcal-card__val {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

/* ----- Macros grid ----- */
.macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.macro {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.macro::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 4px;
  width: 100%;
  background: var(--accent);
}
.macro--protein::before { background: #65BEEC; }
.macro--carbs::before   { background: #F2B843; }
.macro--fat::before     { background: #DA6F3F; }
.macro__label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-dim);
}
.macro__big {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--text-strong);
  line-height: 1.05;
  margin-top: 2px;
}
.macro__unit {
  font-size: 0.55em;
  font-weight: 700;
  color: var(--text-dim);
  margin-left: 1px;
}
.macro__sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* ----- Meals list (mirrors .day from workoutplan) ----- */
.meals {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meal {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meal__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.meal__num {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-dim);
}
.meal__title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-strong);
  line-height: 1.1;
  margin: 0;
  flex: 1;
}
.meal__time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}
.meal__stats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
}
.meal__kcal {
  color: var(--text-strong);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.meal__macro {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.meal__items {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meal__items li {
  position: relative;
  padding-left: 14px;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--text);
}
.meal__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.meal__note {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-dim);
}

/* ----- Tips list ----- */
.tips {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tips li {
  position: relative;
  padding: 12px 14px 12px 38px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}
.tips li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meal-modal__items {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meal-modal__items li {
  position: relative;
  padding-left: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.meal-modal__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.muted { color: var(--text-dim); }

/* ----- Inline info "?" button + modal text ----- */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: 1px;
  transition: opacity .15s var(--ease), transform .12s var(--ease);
}
.info-btn:hover { opacity: 1; transform: scale(1.08); }
.info-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.kcal-card .info-btn,
.macro .info-btn {
  color: inherit;
}

.info-modal__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}

/* ----- Prefill confirmation banner (cross-wizard memory) ----- */
.prefill-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--accent-tint);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}
.prefill-notice strong { color: var(--text-strong); font-weight: 700; }
.prefill-notice em { font-style: normal; font-weight: 700; color: var(--text-strong); }
.prefill-notice__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

/* ----- Variation picker (5 day-menu variations) ----- */
.section-lead {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.45;
}
.variation-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 -20px 14px;
  padding: 4px 20px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.variation-tabs::-webkit-scrollbar { display: none; }
.variation-tab {
  appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  color: var(--text);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.variation-tab__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.variation-tab__title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: inherit;
}
.variation-tab.is-active {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: #fff;
}
.variation-tab.is-active .variation-tab__num {
  background: var(--accent);
  color: var(--text-strong);
}
.variation-tab.is-active .variation-tab__title { color: #fff; }
.variation-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ----- Required fieldsets on step 4 ----- */
.form-group--required > legend::after {
  content: "•";
  color: var(--accent);
  font-size: 1.4em;
  line-height: 0;
  margin-left: 6px;
  vertical-align: middle;
}

/* ----- Variation totals strip (shows what THIS variation actually delivers vs the target) ----- */
.variation-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  margin-bottom: 4px;
  background: var(--accent-tint);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
}
.variation-totals.is-off {
  background: rgba(218,63,63,0.06);
  border-color: rgba(218,63,63,0.4);
}
.variation-totals__label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-dim);
}
.variation-totals__row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.variation-totals__big {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--text-strong);
  line-height: 1.1;
}
.variation-totals__unit {
  font-size: 0.55em;
  font-weight: 700;
  color: var(--text-dim);
  margin-left: 1px;
}
.variation-totals__delta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.variation-totals.is-off .variation-totals__delta { color: var(--danger); }
.variation-totals__macros {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* ----- Result tabs (variations / builder / shopping) ----- */
.result-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin: 24px 0 14px;
  overflow-x: auto;
}
.result-tab {
  appearance: none;
  background: transparent;
  border: 0;
  flex: 1 0 auto;
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.result-tab:hover { color: var(--text); }
.result-tab.is-active {
  background: var(--text-strong);
  color: #fff;
}
.result-panel { animation: stepIn .25s var(--ease) both; }
.result-panel[hidden] { display: none !important; }

/* Compact crosslink cards (two per row on desktop) */
.crosslink-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 24px;
}
@media (min-width: 640px) {
  .crosslink-grid { grid-template-columns: 1fr 1fr; }
}
.crosslink--compact {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.crosslink--compact:hover { border-color: var(--text-strong); box-shadow: var(--shadow-pop); }
.crosslink--compact .crosslink__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 4px 0 4px;
  color: var(--text-strong);
}
.crosslink--compact .crosslink__text {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin: 0;
}

/* ----- Discount card ----- */
.discount-card {
  margin: 22px 0 12px;
  padding: 18px 20px;
  background: var(--accent-tint);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
}
.discount-card__eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
}
.discount-card__title {
  margin: 4px 0 6px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
}
.discount-card__title #discountCode {
  background: var(--text-strong);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  letter-spacing: 0.06em;
}
.discount-card__text {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

/* ----- Kosso product deep-links inside meal items ----- */
.meal__product-link {
  color: var(--text-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.meal__product-link span {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.8em;
  color: var(--accent-2);
}

/* ----- Meal actions row (Details + Zo maak je dit) ----- */
.meal__actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.meal__actions .exercise__explain { margin-top: 0; }

/* ----- Lazy recipe panel ----- */
.meal__recipe {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  animation: stepIn .2s var(--ease) both;
}
.meal__recipe-time {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.meal__recipe-steps {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}
.meal__recipe-steps li { margin-bottom: 4px; }

/* ----- Mix & match builder ----- */
.builder-slot {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 14px 16px;
}
.builder-slot__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.builder-slot__num {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-dim);
}
.builder-slot__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--text-strong);
  flex: 1;
  margin: 0;
}
.builder-slot__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.builder-choice {
  appearance: none;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.builder-choice:hover { border-color: var(--text-strong); }
.builder-choice.is-active {
  background: var(--text-strong);
  color: #fff;
  border-color: var(--text-strong);
}
.builder-slot__preview {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.builder-slot__preview strong { color: var(--text-strong); font-weight: 700; }

.builder-totals {
  position: sticky;
  bottom: 0;
  margin: 16px -20px 0;
  padding: 14px 20px;
  background: var(--text-strong);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  border-top: 2px solid var(--accent);
  z-index: 5;
}
.builder-totals__label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}
.builder-totals__big {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
}
.builder-totals__macros {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  width: 100%;
}

/* ----- Shopping list ----- */
.shopping-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.shopping-pickers .pill { cursor: pointer; }
.shopping-list__category {
  margin-top: 14px;
}
.shopping-list__category-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.shopping-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shopping-list__items li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
}
.shopping-list__items input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--text-strong);
}
.shopping-list__items li.is-checked {
  color: var(--text-muted);
  text-decoration: line-through;
}
.shopping-list__qty {
  font-weight: 700;
  color: var(--text-strong);
  min-width: 64px;
}

/* ----- Soft unlock state (#10) ----- */
.is-locked {
  filter: blur(8px) saturate(0.7);
  pointer-events: none;
  user-select: none;
  position: relative;
}
.soft-unlock-prompt {
  margin: 18px 0 14px;
  padding: 22px 22px 24px;
  background: var(--surface);
  border: 1.5px solid var(--text-strong);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-pop);
  position: relative;
  z-index: 6;
}
.soft-unlock-prompt__lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-strong);
  color: #fff;
  margin-bottom: 10px;
}
.soft-unlock-prompt__title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
}
.soft-unlock-prompt__text {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}
