/* «Your week, decided» — quiz landing at /weekly-meal-plan/ (BL-018).

   One phone-width column (max 480px) centred on any screen: that is the
   design, not a mobile fallback. Screens (hero → quiz → generating → week,
   or tonight in dinner mode) live in the same document; /assets/week.js
   shows one at a time. Without JavaScript the week screen and the tail
   (what happens next, FAQ, footer) are what the visitor sees, and every
   store button already has an href. */

:root {
  --wk-accent: #7b45c9;
  --wk-accent-strong: #6a3fd6;
  --wk-accent-dark: #5e2fa3;
  --wk-ink: #1c1650;
  --wk-muted: #3a2f66;
  --wk-faint: #8e86ad;
  --wk-line: #e8e2f6;
  --wk-soft: #efeaf9;
  --wk-page: #f4f3f8;
  --wk-quiz-bg: #faf8ff;
  --wk-outside: #ecebf4;
  --wk-hero: radial-gradient(120% 80% at 90% 0%, #f6f1ff 0%, #ece4fb 55%, #e6dcfa 100%);
  --wk-purple: radial-gradient(90% 60% at 20% -10%, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 60%), linear-gradient(170deg, #5b2fc9 0%, #7b45c9 60%, #8b5fe0 100%);
}

@keyframes wk-fill { from { width: 4% } to { width: 96% } }
@keyframes wk-fade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes wk-pulse { 0%, 100% { opacity: .35 } 50% { opacity: 1 } }

html { -webkit-text-size-adjust: 100%; }
body.wk {
  margin: 0;
  background: var(--wk-outside);
  color: var(--wk-ink);
  font-family: -apple-system, system-ui, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wk *, .wk *::before, .wk *::after { box-sizing: border-box; }
.wk a { color: var(--wk-accent); text-decoration: none; }
.wk a:hover { color: var(--wk-accent-dark); }
.wk img { display: block; max-width: 100%; height: auto; }  /* the width/height attributes are hints for layout stability, not the used size */
.wk h1, .wk h2, .wk h3, .wk p { margin: 0; }
.wk button { font-family: inherit; }
.wk [hidden] { display: none !important; }

.wk-app { max-width: 480px; margin: 0 auto; background: #fff; min-height: 100dvh; position: relative; overflow: hidden; }
.wk-screen { display: flex; flex-direction: column; }
.wk-logo { height: 28px; width: auto; }

/* ---------- hero (quiz / dinner modes) ---------- */
.wk-hero { min-height: 100dvh; background: var(--wk-hero); position: relative; overflow: hidden; }
.wk-sticks span { position: absolute; width: 6px; border-radius: 3px; background: var(--wk-accent-strong); }
.wk-sticks span:nth-child(1) { right: 44px; top: 64px; height: 52px; transform: rotate(30deg); }
.wk-sticks span:nth-child(2) { right: 96px; top: 44px; height: 44px; transform: rotate(10deg); }
.wk-sticks span:nth-child(3) { right: 18px; top: 120px; height: 40px; transform: rotate(60deg); }
.wk-hero-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; position: relative; }
.wk-hero-body { padding: 28px 24px 0; position: relative; flex: 1; display: flex; flex-direction: column; }
.wk-h1 { font: 800 clamp(38px, 11vw, 46px)/1.02 system-ui, sans-serif; letter-spacing: -1.4px; text-wrap: balance; }
.wk-h1 span { color: var(--wk-accent-strong); }
.wk-lead { font: 400 17px/1.45 system-ui, sans-serif; color: var(--wk-muted); margin-top: 18px; max-width: 340px; text-wrap: pretty; }
.wk-hero-cta { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.wk-note { font: 400 13px system-ui, sans-serif; color: #6f6693; padding-left: 4px; }
.wk-tiles { margin-top: auto; padding-top: 36px; display: flex; gap: 10px; align-items: stretch; }
.wk-tile { flex: 1; background: #fff; border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; box-shadow: 0 12px 32px rgba(60,30,120,.10); }
.wk-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.wk-tile b { font: 700 13px system-ui, sans-serif; color: var(--wk-muted); }
.wk-tile--more { flex: 0 0 64px; background: #7b5be6; color: #fff; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 20px/1.1 system-ui, sans-serif; text-align: center; }
.wk-tile--more span { font: 600 12px system-ui, sans-serif; }

/* ---------- buttons ---------- */
/* `a.wk-btn` is spelled out: `.wk a` is more specific than `.wk-btn` alone and
   would paint the label accent-purple on the purple pill — invisible. */
.wk a.wk-btn, .wk-btn {
  height: 56px; padding: 0 28px; border-radius: 28px; border: 0;
  background: var(--wk-accent); color: #fff; font: 600 18px system-ui, sans-serif;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(106,63,214,.28);
}
.wk a.wk-btn:hover, .wk-btn:hover { background: #6a3ab8; color: #fff; }
.wk a.wk-btn:active, .wk-btn:active { background: var(--wk-accent-dark); }
.wk-btn--block { width: 100%; font-size: 17px; padding: 0 20px; }
.wk a.wk-btn--ghost, .wk-btn--ghost { background: #fff; color: var(--wk-accent); border: 1.5px solid var(--wk-accent); box-shadow: none; height: 48px; font-size: 15px; }
.wk a.wk-btn--ghost:hover, .wk-btn--ghost:hover { background: var(--wk-soft); color: var(--wk-accent); }

/* ---------- quiz ---------- */
.wk-quiz { min-height: 100dvh; background: var(--wk-quiz-bg); }
.wk-quiz-top { padding: 16px 20px 0; display: flex; align-items: center; gap: 14px; }
.wk-back { width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--wk-soft); color: var(--wk-accent-strong); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.wk-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--wk-line); overflow: hidden; }
.wk-progress i { display: block; height: 100%; border-radius: 3px; background: var(--wk-accent); transition: width .35s ease; }
.wk-qnum { font: 600 13px system-ui, sans-serif; color: var(--wk-faint); flex: none; }
.wk-quiz-body { padding: 36px 24px 0; flex: 1; display: flex; flex-direction: column; }
.wk-q { font: 800 clamp(28px, 7.6vw, 32px)/1.1 system-ui, sans-serif; letter-spacing: -.8px; margin-bottom: 22px; text-wrap: balance; animation: wk-fade .3s ease; }
.wk-opts { display: flex; flex-direction: column; gap: 10px; }
.wk-opt {
  min-height: 56px; padding: 14px 18px; border-radius: 16px; text-align: left;
  font: 600 16px/1.3 system-ui, sans-serif; color: var(--wk-ink); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 2px solid var(--wk-line); background: #fff; transition: border-color .15s, background .15s;
}
.wk-opt:hover { border-color: #b9a6ee; }
.wk-opt[aria-pressed="true"] { border-color: var(--wk-accent); background: #f4effe; }
.wk-opt i { width: 22px; height: 22px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-style: normal; background: #ece8f5; }
.wk-opt[aria-pressed="true"] i { background: var(--wk-accent); }
.wk-react { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--wk-soft); color: var(--wk-muted); font: 500 15px/1.4 system-ui, sans-serif; animation: wk-fade .3s ease; display: flex; gap: 10px; align-items: flex-start; }
.wk-react b { color: var(--wk-accent-strong); flex: none; font-weight: 400; }
.wk-continue { margin-top: auto; padding: 24px 0 28px; }
.wk-continue .wk-btn[disabled] { background: #c9bfe6; box-shadow: none; cursor: default; }

/* ---------- generating ---------- */
.wk-gen { min-height: 100dvh; align-items: flex-start; justify-content: center; padding: 0 24px; background: linear-gradient(170deg, #5b2fc9 0%, #7b45c9 55%, #8b5fe0 100%); color: #fff; }
.wk-gen-title { font: 800 clamp(30px, 8vw, 36px)/1.08 system-ui, sans-serif; letter-spacing: -.9px; margin-bottom: 22px; }
.wk-gen-bar { width: 100%; max-width: 320px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); overflow: hidden; }
.wk-gen-bar i { display: block; height: 100%; border-radius: 3px; background: #fff; animation: wk-fill 2.4s cubic-bezier(.4,0,.2,1) forwards; }
.wk-gen-list { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; font: 500 16px system-ui, sans-serif; }
.wk-gen-list div { display: flex; align-items: center; gap: 10px; }
.wk-gen-list span { width: 8px; height: 8px; border-radius: 4px; background: #fff; animation: wk-pulse 1.2s ease infinite; }
.wk-gen-list div:nth-child(2) span { animation-delay: .4s; }
.wk-gen-list div:nth-child(3) span { animation-delay: .8s; }
.wk-gen-foot { margin-top: 48px; font: 400 13px system-ui, sans-serif; color: rgba(255,255,255,.75); }

/* ---------- purple header (week / tonight) ---------- */
.wk-head { background: var(--wk-purple); color: #fff; border-radius: 0 0 28px 28px; box-shadow: 0 12px 30px rgba(75,26,154,.25); padding: 18px 0; }
.wk-head-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.wk-badge { font: 600 12px system-ui, sans-serif; background: rgba(0,0,0,.28); border-radius: 12px; padding: 5px 10px; }
.wk-head h2, .wk-head-title { font: 800 clamp(30px, 8vw, 36px)/1.05 system-ui, sans-serif; letter-spacing: -.9px; padding: 18px 20px 0; }
.wk-head-sub { font: 400 14px/1.4 system-ui, sans-serif; color: rgba(255,255,255,.85); padding: 8px 20px 0; }
.wk-tune-head { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.wk-tune-row { display: flex; justify-content: space-between; align-items: center; }
.wk-tune-row b { font: 800 22px system-ui, sans-serif; letter-spacing: -.5px; }
.wk-tune-note { animation: wk-fade .3s ease; }
.wk-excl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wk-excl > span { font: 500 12px system-ui, sans-serif; color: rgba(255,255,255,.8); }
.wk-chip { height: 32px; padding: 0 12px; border-radius: 16px; font: 600 13px system-ui, sans-serif; cursor: pointer; border: 1.5px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; }
.wk-chip[aria-pressed="true"] { background: #fff; color: var(--wk-accent-strong); }
.wk-days { display: flex; gap: 8px; padding: 18px 20px 0; overflow-x: auto; scrollbar-width: none; }
.wk-days::-webkit-scrollbar { display: none; }
.wk-day { flex: none; width: 54px; height: 78px; border-radius: 27px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: rgba(0,0,0,.22); color: #fff; }
.wk-day i { width: 34px; height: 34px; border-radius: 17px; background-size: cover; background-position: center; filter: blur(3px) brightness(.7); display: flex; align-items: center; justify-content: center; font-size: 13px; font-style: normal; }
.wk-day b { font: 700 11px system-ui, sans-serif; letter-spacing: .3px; }
.wk-day.is-open { background: #fff; color: var(--wk-accent-strong); }
.wk-day.is-open i { filter: none; }

/* tune intro above the header */
.wk-intro { background: var(--wk-hero); padding: 16px 20px 0; position: relative; overflow: hidden; }
.wk-intro .wk-h1 { font-size: clamp(36px, 10.4vw, 44px); letter-spacing: -1.3px; margin-top: 26px; position: relative; }
.wk-intro p { font: 400 16px/1.45 system-ui, sans-serif; color: var(--wk-muted); margin: 14px 0 22px; max-width: 340px; text-wrap: pretty; position: relative; }
.wk-intro .wk-sticks span:nth-child(1) { right: 44px; top: 56px; height: 44px; }
.wk-intro .wk-sticks span:nth-child(2) { right: 88px; top: 40px; height: 36px; }

/* ---------- week body ---------- */
.wk-week { background: var(--wk-page); }
.wk-plan { padding: 18px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.wk-card { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 2px 10px rgba(60,30,120,.06); display: flex; flex-direction: column; gap: 14px; }
.wk-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wk-card-head b { font: 800 18px system-ui, sans-serif; letter-spacing: -.3px; }
.wk-card-head span { display: flex; gap: 8px; align-items: center; }
.wk-hp { font: 700 12px system-ui, sans-serif; color: var(--wk-accent-strong); background: var(--wk-soft); border-radius: 10px; padding: 4px 8px; }
.wk-kcal { font: 500 12px system-ui, sans-serif; color: var(--wk-faint); }
.wk-slot { display: flex; flex-direction: column; gap: 8px; }
.wk-slot-head { display: flex; justify-content: space-between; align-items: center; min-height: 30px; }
.wk-slot-head span { font: 500 11px system-ui, sans-serif; letter-spacing: .6px; color: var(--wk-faint); text-transform: uppercase; }
.wk-swap { height: 30px; padding: 0 10px; border-radius: 15px; border: 1.5px solid var(--wk-accent); background: #fff; color: var(--wk-accent); font: 600 12px system-ui, sans-serif; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.wk-swap:hover { background: var(--wk-soft); }
/* the chips of the self-running demo: the state change is the animation */
.wk-chip { transition: background .2s ease, color .2s ease; }
.wk-items { display: flex; gap: 8px; }
.wk-item { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wk-item img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: var(--wk-soft); }
.wk-item b { font: 600 13px/1.25 system-ui, sans-serif; color: var(--wk-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wk-item span { font: 500 11px system-ui, sans-serif; color: var(--wk-faint); }

.wk-locked { position: relative; border-radius: 16px; overflow: hidden; }
.wk-locked-list { display: flex; flex-direction: column; gap: 10px; filter: blur(5px); opacity: .75; pointer-events: none; user-select: none; }
.wk-locked-row { background: #fff; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.wk-locked-row b { font: 800 16px system-ui, sans-serif; width: 44px; }
.wk-locked-row i { width: 44px; height: 44px; border-radius: 10px; background-size: cover; background-position: center; }
.wk-locked-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; }
.wk-lock-icon { width: 44px; height: 44px; border-radius: 22px; background: #fff; box-shadow: 0 6px 18px rgba(60,30,120,.18); display: flex; align-items: center; justify-content: center; }
.wk-locked-over b { font: 700 16px system-ui, sans-serif; color: var(--wk-ink); }
.wk-locked-over span { font: 400 13px/1.4 system-ui, sans-serif; color: var(--wk-muted); }

.wk-legend { font: 500 13px system-ui, sans-serif; color: #6f6693; text-align: center; padding-top: 4px; }
.wk-store { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.wk-badges { display: flex; gap: 10px; }
.wk-badges a { flex: 1; display: flex; justify-content: center; }
.wk-badges img { height: 44px; width: auto; }
.wk-fine { font: 400 12px system-ui, sans-serif; color: var(--wk-faint); text-align: center; }

/* ---------- tonight (dinner mode) ---------- */
.wk-tonight-card { margin: 16px 20px 0; background: #fff; color: var(--wk-ink); border-radius: 16px; overflow: hidden; box-shadow: 0 14px 34px rgba(40,10,90,.3); animation: wk-fade .35s ease; }
.wk-tonight-photo { height: 210px; background-size: cover; background-position: center; position: relative; }
.wk-tonight-photo span { position: absolute; left: 12px; bottom: 12px; font: 600 12px system-ui, sans-serif; background: rgba(255,255,255,.92); color: var(--wk-accent-strong); border-radius: 10px; padding: 5px 10px; }
.wk-tonight-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.wk-tonight-body b { font: 700 20px/1.2 system-ui, sans-serif; letter-spacing: -.3px; }
.wk-tonight-body p { font: 400 14px/1.45 system-ui, sans-serif; color: var(--wk-muted); }
.wk-tonight-swap { height: 44px; border-radius: 22px; border: 1.5px solid var(--wk-accent); background: #fff; color: var(--wk-accent); font: 600 15px system-ui, sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.wk-after { padding: 28px 20px 0; }
.wk-after h2 { font: 800 26px/1.1 system-ui, sans-serif; letter-spacing: -.6px; text-wrap: balance; }
.wk-after h2 span { color: var(--wk-accent-strong); }
.wk-after p { font: 400 15px/1.5 system-ui, sans-serif; color: var(--wk-muted); margin-top: 12px; }
.wk-after .wk-days { padding: 18px 0 0; }
.wk-after .wk-day { background: var(--wk-soft); color: var(--wk-faint); border: 1px solid var(--wk-line); }
.wk-after .wk-day.is-open { background: #fff; color: var(--wk-accent-strong); }

/* ---------- tail ---------- */
.wk-tail { background: var(--wk-page); }
.wk-next { padding: 40px 20px 0; }
.wk-next h2, .wk-faq-h { font: 800 24px/1.12 system-ui, sans-serif; letter-spacing: -.5px; margin-bottom: 18px; }
.wk-next-list { display: flex; flex-direction: column; gap: 14px; }
.wk-next-item { display: flex; gap: 14px; align-items: flex-start; }
.wk-next-item i { width: 40px; height: 40px; border-radius: 12px; background: var(--wk-soft); flex: none; display: flex; align-items: center; justify-content: center; }
.wk-next-item p { font: 500 16px/1.4 system-ui, sans-serif; color: var(--wk-ink); padding-top: 8px; }
.wk-faq { padding: 40px 20px 0; display: flex; flex-direction: column; gap: 2px; }
.wk-faq details { border-bottom: 1px solid var(--wk-line); padding: 12px 0; }
.wk-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 600 16px system-ui, sans-serif; cursor: pointer; color: var(--wk-ink); }
.wk-faq summary::-webkit-details-marker { display: none; }
.wk-faq summary::after { content: "+"; color: var(--wk-accent); font-size: 20px; line-height: 1; }
.wk-faq details[open] summary::after { content: "–"; }
.wk-faq div { font: 400 15px/1.5 system-ui, sans-serif; color: var(--wk-muted); padding-top: 10px; }
.wk-foot { padding: 36px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.wk-foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wk-foot-row img { height: 24px; width: auto; filter: grayscale(1); opacity: .7; }
.wk-foot-row nav { display: flex; gap: 14px; font: 400 12px system-ui, sans-serif; }
.wk-foot-row a, .wk-foot p a { color: var(--wk-faint); }
.wk-foot p { font: 400 12px/1.5 system-ui, sans-serif; color: var(--wk-faint); }
.wk-foot .wk-badges img { height: 42px; }

/* ---------- sticky CTA ---------- */
.wk-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.wk-sticky-in {
  width: 100%; max-width: 480px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--wk-line); display: flex; align-items: center; gap: 12px;
  pointer-events: auto; animation: wk-fade .25s ease;
}
.wk-sticky-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wk-sticky-t b { font: 700 14px system-ui, sans-serif; color: var(--wk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-sticky-t span { font: 400 12px system-ui, sans-serif; color: var(--wk-faint); }
.wk-sticky .wk-btn { flex: none; height: 44px; padding: 0 20px; border-radius: 22px; font-size: 15px; box-shadow: 0 6px 16px rgba(106,63,214,.28); }

@media (prefers-reduced-motion: reduce) {
  .wk *, .wk *::before, .wk *::after { animation: none !important; transition: none !important; }
}
