/* Questions page (/questions/). Shared tokens only, nothing new in the palette.
   Pea has a think in the hero, the questions sit in one centred reading column,
   grouped, and each one can be linked to (/questions/#plans opens that answer). */

/* ---------- Hero: Pea thinking, a little thought bubble ---------- */
.qs-stage { position: relative; width: fit-content; margin: 0 auto; }
/* the ponder lives on a wrapper, so the site's hop-in (on .phero__pea) and the ponder never fight over transform */
.qs-ponder { display: block; width: fit-content; margin: 0 auto; transform-origin: 50% 94%; animation: qs-ponder 5.4s ease-in-out 1.4s infinite; }
.qs-hero .qs-pea { width: clamp(132px, 17vw, 196px); margin-bottom: 4px; }
.qs-bubble { position: absolute; left: 86%; top: 0; width: 70px; height: 74px; pointer-events: none; }
.qs-bubble b, .qs-bubble i { position: absolute; display: block; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); box-shadow: 0 10px 24px -14px rgba(34, 56, 26, .55); }
.qs-bubble b { right: 0; top: 0; display: grid; place-items: center; width: 56px; height: 56px; font: 800 32px/1 var(--display); color: var(--pea); transform: scale(0); animation: qs-pop .5s cubic-bezier(.3, 1.5, .5, 1) 1s forwards, qs-bob 3.2s ease-in-out 1.6s infinite; }
.qs-bubble i:nth-of-type(1) { left: 0; bottom: 0; width: 10px; height: 10px; transform: scale(0); animation: qs-pop .35s cubic-bezier(.3, 1.5, .5, 1) .55s forwards; }
.qs-bubble i:nth-of-type(2) { left: 9px; bottom: 13px; width: 16px; height: 16px; transform: scale(0); animation: qs-pop .35s cubic-bezier(.3, 1.5, .5, 1) .75s forwards; }
@keyframes qs-pop { to { transform: scale(1); } }
@keyframes qs-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes qs-ponder { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 60% { transform: rotate(1.5deg); } }

/* topic chips under the headline */
.qs-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.qs-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px 11px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: 600 15.5px/1 var(--body); text-decoration: none; transition: border-color .2s, color .2s, transform .2s cubic-bezier(.3, 1.5, .5, 1); }
.qs-jump a:hover { border-color: var(--pea-glow); color: var(--pea); transform: translateY(-2px); }
.qs-jump svg { width: 18px; height: 18px; flex: none; color: var(--pea); }

/* ---------- The questions ---------- */
.qs { padding-block: clamp(24px, 4vw, 44px) clamp(20px, 3vw, 32px); }
.qs-group { scroll-margin-top: calc(var(--nav-h) + 18px); }
.qs-group + .qs-group { margin-top: clamp(56px, 8vw, 84px); }
.qs-head { display: flex; align-items: center; gap: 14px; }
.qs-head h2 { font: 800 clamp(28px, 3.6vw, 38px)/1 var(--display); letter-spacing: -.035em; }
.qs-group .faq { margin-top: 20px; }
.qs .faq details { scroll-margin-top: calc(var(--nav-h) + 18px); transition: border-color .2s, box-shadow .2s; }
.qs .faq details:hover { border-color: var(--pea-glow); }
.qs .faq details:target { border-color: var(--pea-hi); box-shadow: 0 0 0 4px rgba(111, 161, 74, .18); }
.qs .faq summary { border-radius: 10px; }
.qs .faq--pea .ans { flex-direction: column; align-items: flex-start; gap: 8px; }
.qs .faq--pea .ans p b { color: var(--pea); font-weight: 800; }
.qs .faq--pea .ans a { color: var(--pea); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Close ---------- */
.qs-close { padding-top: clamp(40px, 7vw, 80px); }
.qs-close__pea { width: clamp(120px, 14vw, 156px); margin: 0 auto 10px; filter: drop-shadow(0 16px 18px rgba(34, 56, 26, .2)); }
.qs-close .h2 { margin-top: 14px; }
/* named their Pea? It wears the name tag here instead (site.js sets html.has-pea-name) */
.qs-close .only-named { display: none; }
html.has-pea-name .qs-close .only-named { display: block; }
html.has-pea-name .qs-close .only-unnamed { display: none; }
.qs-close__tag { width: calc(var(--h, 180px) * 656 / 820); margin: 0 auto 10px; filter: drop-shadow(0 16px 18px rgba(34, 56, 26, .2)); }
.qs-more { margin-top: 22px; font-size: 15.5px; color: var(--muted); }
.qs-more a { font-weight: 700; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .qs-bubble { left: 82%; width: 58px; height: 62px; }
  .qs-bubble b { width: 46px; height: 46px; font-size: 26px; }
  .qs-head h2 { font-size: 28px; }
  .qs .faq details { padding: 0 18px; }
  .qs .faq summary { font-size: 18px; }
}

/* Reduced motion (JJ's laptop reports it and he still wants the life): gentler, never frozen. */
@media (prefers-reduced-motion: reduce) {
  .qs-ponder { animation-duration: 8s; animation-name: qs-ponder-soft; }
  .qs-bubble b { animation: qs-fade .6s ease 1s forwards; transform: none; opacity: 0; }
  .qs-bubble i:nth-of-type(1), .qs-bubble i:nth-of-type(2) { animation: qs-fade .4s ease .6s forwards; transform: none; opacity: 0; }
  .qs-bubble i:nth-of-type(2) { animation-delay: .8s; }
  .qs-jump a, .qs-jump a:hover { transition: border-color .2s, color .2s; transform: none; }
}
@keyframes qs-fade { to { opacity: 1; } }
@keyframes qs-ponder-soft { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.5deg); } }
