/* Shared styles for the program "why it matters" notes and the joke popup.
   Each design themes them by setting these variables in its own :root:
   --x-accent, --x-accent-ink, --x-ink, --x-muted, --x-surface, --x-head, --x-tip-bg, --x-tip-ink */

/* ---------- Program notes ---------- */
.sch-item.has-why{position:relative;cursor:help;outline:none}
.sch-item.has-why:hover,.sch-item.has-why:focus-visible,.sch-item.open{z-index:20}
.sch-item.has-why:focus-visible{box-shadow:0 0 0 3px var(--x-accent,#e3761b);border-radius:14px}
.sch-body{position:relative}
.why-ic{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;
  font:700 11px/1 system-ui,sans-serif;font-style:normal;letter-spacing:0;vertical-align:middle;
  margin-left:6px;transform:translateY(-2px);background:var(--x-accent,#e3761b);color:var(--x-accent-ink,#fff)}
.why{position:absolute;left:0;right:0;top:calc(100% + 8px);max-width:440px;z-index:30;
  padding:14px 16px;border-radius:14px;text-align:left;
  font-family:inherit;font-size:.92rem;line-height:1.55;font-style:normal;font-weight:400;letter-spacing:0;text-transform:none;
  background:var(--x-tip-bg,#3a1a16);color:var(--x-tip-ink,#fff);box-shadow:0 18px 40px rgba(0,0,0,.25);
  opacity:0;visibility:hidden;transform:translateY(6px);pointer-events:none;
  transition:opacity .2s ease,transform .2s ease,visibility .2s}
.why::before{content:"";position:absolute;top:-6px;left:22px;width:12px;height:12px;background:inherit;transform:rotate(45deg)}
.why-fig{display:block;margin:-14px -16px 12px;aspect-ratio:16/9;overflow:hidden;border-radius:14px 14px 0 0;background:rgba(255,255,255,.08)}
.why-fig img{display:block;width:100%;height:100%;object-fit:cover}
.why-credit{display:block;margin-top:8px;font-size:.66rem;line-height:1.35;opacity:.65}
.why b{display:block;font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;opacity:.75;margin-bottom:4px;font-weight:700}
.sch-item.has-why:hover .why,.sch-item.has-why:focus-visible .why,.sch-item.open .why{opacity:1;visibility:visible;transform:none}
.why-hint{text-align:center;font-size:.85rem;color:var(--x-muted,#7b5a4e);margin-top:16px}
.why-hint::before{content:"i";display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;margin-right:6px;
  font:700 10px/1 system-ui,sans-serif;background:var(--x-accent,#e3761b);color:var(--x-accent-ink,#fff);vertical-align:1px}

/* ---------- Joke popup ---------- */
.joke{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;
  background:rgba(20,10,10,.55);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:0;transition:opacity .25s}
.joke.show{opacity:1}
.joke-card{width:min(380px,100%);background:var(--x-surface,#fffaf2);color:var(--x-ink,#3a1a16);border-radius:26px;
  padding:30px 26px;text-align:center;box-shadow:0 30px 80px rgba(0,0,0,.4);transform:scale(.9);
  transition:transform .35s cubic-bezier(.2,.9,.3,1.3)}
.joke.show .joke-card{transform:none}
.joke-emoji{font-size:3.2rem;line-height:1}
.joke h3{font-family:var(--x-head,Georgia,serif);font-size:1.9rem;line-height:1.1;margin:10px 0 8px;color:var(--x-ink,#3a1a16)}
.joke p{color:var(--x-muted,#7b5a4e);font-size:1rem;line-height:1.5;margin:0}
.joke button{margin-top:20px;border:0;border-radius:999px;padding:13px 30px;font-family:inherit;font-weight:700;font-size:1rem;
  background:var(--x-accent,#e3761b);color:var(--x-accent-ink,#fff);cursor:pointer}
.joke-bar{height:5px;width:70%;margin:18px auto 0;border-radius:9px;background:rgba(0,0,0,.08);overflow:hidden}
.joke-bar span{display:block;height:100%;width:0;background:var(--x-accent,#e3761b);animation:joke-bar 1.8s linear forwards}
@keyframes joke-bar{to{width:100%}}
.joke-kid{display:none}
.joke.kidding .joke-ask{display:none}
.joke.kidding .joke-kid{display:block;animation:joke-pop .45s cubic-bezier(.2,.9,.3,1.4)}
@keyframes joke-pop{from{transform:scale(.6) rotate(-6deg);opacity:0}}
@media (prefers-reduced-motion:reduce){.joke-card,.joke.kidding .joke-kid{transition:none;animation:none}}

/* On narrow screens, let the note span the whole program row */
@media (max-width:600px){
  .sch-item.has-why .sch-body{position:static}
  .sch-item.has-why .why{left:0;right:0;max-width:none}
  .sch-item.has-why .why::before{display:none}
}

/* Guest counter: show when − / + can't go further */
[data-stepper] button[aria-disabled="true"]{opacity:.35;cursor:not-allowed}
