/* The team tour's look (Rami, 15 November 2026: Fable's design, the approved mockup review/team-tour-mockup.html). Only the team tour
   (.tr.tr-team, public/tour.js) and its intro film (.trf, public/tourfilm.js) use it; the other tours keep their card. Cadence's tokens;
   Kasper is the Hub's own (public/fun.js buddySVG, app.css .buddy). Nothing moves under prefers-reduced-motion. */

/* Kasper's moves, for the tour only (trk-: never the Home buddy's own) */
.tr-team .buddy,.trf .buddy{cursor:default;width:100%;height:100%}
.trk-hop .body{transform-origin:50% 100%;animation:trkHop .7s cubic-bezier(.3,1.4,.5,1)}
.trk-wave .body{transform-origin:50% 100%;animation:trkWave 1.2s ease-in-out 2}
.trk-spin .body{animation:trkSpin .9s cubic-bezier(.5,0,.3,1.3)}
.trk-hmm .body{transform:rotate(-10deg)}
.buddy.idle{animation:trkFloat 5s ease-in-out infinite}
.tr-team .buddy .eye,.trf .buddy .eye{animation:trkBlink 4.4s infinite}
@keyframes trkFloat{50%{transform:translateY(-6px)}}
@keyframes trkBlink{0%,93%,100%{transform:scaleY(1)}96.5%{transform:scaleY(.1)}}
@keyframes trkHop{0%{transform:none}18%{transform:scale(1.08,.88)}45%{transform:translateY(-16px) scale(.95,1.06)}70%{transform:translateY(0) scale(1.06,.93)}100%{transform:none}}
@keyframes trkWave{0%,100%{transform:none}15%{transform:rotate(-11deg)}35%{transform:rotate(9deg)}55%{transform:rotate(-8deg)}75%{transform:rotate(5deg)}}
@keyframes trkSpin{to{transform:rotate(360deg)}}

/* the spotlight: a soft halo that breathes */
.tr.tr-team .tr-hole{border-radius:12px;transition:top .32s cubic-bezier(.2,0,0,1),left .32s cubic-bezier(.2,0,0,1),width .32s cubic-bezier(.2,0,0,1),height .32s cubic-bezier(.2,0,0,1)}
.tr.tr-team .tr-hole::after{content:"";position:absolute;inset:-3px;border-radius:15px;border:2px solid var(--primary,#a9c4f7);animation:trkHalo 2.2s ease-in-out infinite}
@keyframes trkHalo{0%,100%{box-shadow:0 0 0 0 rgba(169,196,247,.55)}50%{box-shadow:0 0 0 8px rgba(169,196,247,0)}}

/* the card: Kasper, where you are, his words arriving one sentence after another */
.tr.tr-team .tr-card{border-radius:16px;padding:18px 20px 16px;background:var(--surface,#fff);color:var(--c-ink,#17181a);box-shadow:var(--shadow-modal,0 24px 64px rgba(28,27,24,.22));width:384px;max-width:calc(100vw - 32px)}
.tr.tr-team.mid .tr-card{width:560px}
.trt-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.trt-k{width:52px;height:52px;flex:none}
.tr.tr-team.mid .trt-k{width:68px;height:68px}
.trt-prog{flex:1;min-width:0}.trt-pl{font-size:12px;font-weight:600;color:var(--ink-subtle,#666b74);font-variant-numeric:tabular-nums;margin-bottom:6px}
.trt-bar{height:6px;border-radius:3px;background:var(--surface-sunken,#e8e9eb);overflow:hidden}.trt-bar i{display:block;height:100%;border-radius:3px;background:var(--primary,#a9c4f7);transition:width .5s cubic-bezier(.2,0,0,1)}
.trt-body{animation:trkSwap .32s cubic-bezier(.2,0,0,1)}@keyframes trkSwap{from{opacity:0;transform:translateY(6px)}}
.tr.tr-team h3{font-size:21px;font-weight:700;letter-spacing:-.015em;line-height:1.2;margin:0 0 8px}
.tr.tr-team .tr-k{font-size:15px;line-height:1.5;margin:0}
.trt-s{animation:trkIn .35s cubic-bezier(.2,0,0,1) both;animation-delay:calc(var(--i) * 320ms + 150ms)}
@keyframes trkIn{from{opacity:0;transform:translateY(4px)}}
.tr.tr-team .tr-story{margin:12px 0 0;background:var(--surface-sunken,#e8e9eb);border-radius:12px;padding:10px 12px;font-size:14px;line-height:1.45;color:var(--ink-muted,#4b4f57);animation:trkIn .4s cubic-bezier(.2,0,0,1) 1.6s both}
.tr.tr-team .tr-story b.trt-lbl{display:block;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-subtle,#666b74);margin-bottom:3px}
.tr.tr-team .tr-do{margin-top:16px}.tr.tr-team .tr-do .btn-s{min-height:40px;padding:0 18px;font-weight:600}
.tr.tr-team .tr-do .btn-s.pri{min-width:108px}
.tr.tr-team [aria-disabled="true"]{opacity:.42;cursor:not-allowed}
.trk-nudge{animation:trkShake .4s}

/* the question: a small game */
.tr.tr-team .tr-qs{display:grid;gap:8px;margin:14px 0 0}
.tr.tr-team .tr-q{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 14px;font-size:15px;font-weight:500;line-height:1.35;background:var(--surface,#fff);border:1.5px solid var(--border,#cfd2d7);border-radius:12px;transition:transform .12s,background .2s,border-color .2s}
.tr.tr-team .tr-q:hover:not(:disabled){background:var(--surface-hover,#e9eaec);transform:translateY(-1px)}
.trt-ltr{width:30px;height:30px;border-radius:50%;background:var(--surface-sunken,#e8e9eb);display:grid;place-items:center;font-weight:700;font-size:13px;flex:none}
.trt-ltr svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.tr.tr-team .tr-q.no{background:var(--status-stuck-bg,#fbe2ea);border-color:var(--status-stuck-fg,#b01e4f);color:var(--status-stuck-fg,#b01e4f);animation:trkShake .45s}
.tr.tr-team .tr-q.no .trt-ltr{background:var(--status-stuck-fill,#f7b3c6);color:#17181a}
.tr.tr-team .tr-q.ok{background:var(--status-done-bg,#e1ebfb);border-color:var(--status-done-fg,#1d55b3);color:var(--status-done-fg,#1d55b3);animation:trkPop .5s cubic-bezier(.34,1.4,.64,1)}
.tr.tr-team .tr-q.ok .trt-ltr{background:var(--status-done-fill,#a9d3f5);color:#17181a}
.tr.tr-team .tr-qs.solved .tr-q:not(.ok){opacity:.5}
.tr.tr-team .tr-qmsg{margin:12px 0 0;min-height:22px;font-size:14.5px;line-height:1.5}
.tr.tr-team .tr-qmsg:not(:empty){border-radius:12px;padding:10px 12px;animation:trkIn .3s cubic-bezier(.2,0,0,1)}
.tr.tr-team .tr-qmsg.no{background:var(--surface-sunken,#e8e9eb);color:var(--ink-muted,#4b4f57)}.tr.tr-team .tr-qmsg.ok{background:var(--status-done-bg,#e1ebfb);color:var(--c-ink,#17181a)}
@keyframes trkShake{0%,100%{transform:none}20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(2px)}}
@keyframes trkPop{0%{transform:scale(.96)}60%{transform:scale(1.03)}100%{transform:none}}

/* the finish */
.tr.tr-team .tr-fin{text-align:center;padding:4px 0 2px}.trt-bigk{width:112px;height:112px;margin:0 auto 12px}
.tr.tr-team .tr-fin h3{font-size:34px;letter-spacing:-.03em;margin-bottom:6px}.tr.tr-team .tr-fin p{font-size:16px;color:var(--ink-muted,#4b4f57);margin:0}
.trt-conf{position:fixed;inset:0;pointer-events:none;z-index:2147483000;overflow:hidden}.trt-conf>div{position:absolute}

/* the intro film */
.tr.tr-team.film .tr-card{width:min(820px,calc(100vw - 32px));padding:0;overflow:hidden}
.trf .trf-stage{position:relative;height:380px;background:var(--c-bg,#efeff0);display:grid;grid-template-columns:auto 1fr;gap:14px;padding:14px;overflow:hidden;--mw:190px}
.trf .trf-menu{position:relative;width:var(--mw);padding:8px}
.trf .trf-ol{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.trf .trf-ol rect{x:1px;y:1px;width:calc(100% - 2px);height:calc(100% - 2px);fill:var(--side-bg,#efeff0);fill-opacity:0;stroke:var(--border-strong,#7c818a);stroke-width:1.5;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .1s,fill-opacity .1s}
.trf .s-menu .trf-ol rect{stroke-dashoffset:0;fill-opacity:1;transition:stroke-dashoffset 1s cubic-bezier(.2,0,0,1),fill-opacity .5s .6s}
.trf .trf-menu ul{position:relative;list-style:none;margin:0;padding:0}
.trf .trf-menu li{height:24px;margin-bottom:2px;opacity:0;transform:translateX(-12px);transition:opacity .1s,transform .1s}
.trf .s-menu .trf-menu li{opacity:1;transform:none;transition:opacity .35s,transform .45s cubic-bezier(.34,1.4,.64,1);transition-delay:calc(var(--i) * 55ms + 550ms)}
.trf .trf-menu span{display:flex;align-items:center;height:100%;padding:0 8px;border-radius:6px;font-size:12.5px;font-weight:500;color:var(--side-ink-muted,#4b4f56);white-space:nowrap;transition:background .3s,color .3s,transform .45s cubic-bezier(.34,1.4,.64,1),box-shadow .3s}
.trf .trf-menu li.lit span{background:var(--hc);color:#17181a;font-weight:600}
.trf .trf-menu li.hot span{transform:translateX(10px) scale(1.08);box-shadow:var(--shadow-menu,0 8px 24px rgba(28,27,24,.14))}
.trf .s-all .trf-menu li.lit span{animation:trkAll .6s cubic-bezier(.34,1.4,.64,1) both;animation-delay:calc(var(--h) * 90ms)}@keyframes trkAll{40%{transform:translateX(8px) scale(1.08)}}
.trf .trf-area{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-width:0}
.trf .trf-k{width:132px;height:132px;transition:transform .8s cubic-bezier(.34,1.4,.64,1)}
.trf .trf-stage[data-k="center"] .trf-k{transform:translateX(calc((var(--mw) + 14px) / -2)) scale(1.22)}
.trf .trf-stage.enter .trf-k{animation:trkKin .9s cubic-bezier(.34,1.4,.64,1) both}@keyframes trkKin{from{transform:translate(calc((var(--mw) + 14px) / -2),300px) scale(1.22)}}
.trf .trf-homes{display:flex;gap:8px;opacity:0;transition:opacity .3s}.trf .s-homes .trf-homes{opacity:1}
.trf .trf-homes i{width:12px;height:12px;border-radius:50%;border:1.5px solid var(--border-strong,#7c818a);transition:background .3s,border-color .3s,transform .4s cubic-bezier(.34,1.4,.64,1)}
.trf .trf-homes i.lit{background:var(--hc);border-color:transparent;transform:scale(1.25)}
.trf .trf-go{visibility:hidden;opacity:0;transform:scale(.8);transition:opacity .3s,transform .45s cubic-bezier(.34,1.4,.64,1);min-height:46px;padding:0 28px;font-size:16px}
.trf .s-go .trf-go{visibility:visible;opacity:1;transform:none}
.trf .trf-cap{min-height:70px;display:grid;place-items:center;padding:10px 18px;text-align:center;font-size:21px;font-weight:600;letter-spacing:-.01em;line-height:1.25}
.trf .trf-cap span{display:inline-flex;align-items:center;gap:10px;animation:trkIn .4s cubic-bezier(.2,0,0,1)}
.trf .trf-cap i{width:14px;height:14px;border-radius:50%;background:var(--hc);flex:none}
.trf .trf-ctl{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--border,#cfd2d7)}
.trf .trf-pp{width:38px;height:38px;border-radius:50%;border:0;background:var(--c-ink,#17181a);color:var(--surface,#fff);display:grid;place-items:center;flex:none;cursor:pointer}
.trf .trf-pp svg{width:14px;height:14px;fill:currentColor}
.trf .trf-track{flex:1;height:22px;display:flex;align-items:center;cursor:pointer;position:relative}
.trf .trf-track::before{content:"";position:absolute;left:0;right:0;height:6px;border-radius:3px;background:var(--surface-sunken,#e8e9eb)}
.trf .trf-track i{position:relative;height:6px;border-radius:3px;background:var(--primary,#a9c4f7);width:0}
.trf .trf-time{font-size:12px;font-variant-numeric:tabular-nums;color:var(--ink-subtle,#666b74);flex:none}
.trf:not(.rm) .trf-rm:not(#_){display:none}.trf.rm .trf-rm{display:inline-flex}.trf.rm .trf-pp:not(#_),.trf.rm .trf-track:not(#_),.trf.rm .trf-time:not(#_),.trf.rm .trf-rep:not(#_){display:none}.trf.rm .trf-ctl{justify-content:space-between}
.trf.paused *{animation-play-state:paused!important}

/* a phone: the card is a sheet at the bottom; the film smaller */
@media(max-width:860px){
  .tr.tr-team .tr-card,.tr.tr-team.mid .tr-card{left:0!important;right:0!important;top:auto!important;bottom:0!important;width:100%!important;max-width:none;border-radius:18px 18px 0 0;max-height:62vh;overflow:auto;padding:16px 16px calc(14px + env(safe-area-inset-bottom,0px))}
  .tr.tr-team.film .tr-card{max-height:calc(100vh - 24px);padding:0}
  .tr.tr-team .tr-do .btn-s{flex:1;min-height:44px}.tr.tr-team h3{font-size:19px}.tr.tr-team .tr-fin h3{font-size:28px}
  .trf .trf-stage{height:340px;padding:10px;gap:8px;--mw:150px}.trf .trf-menu span{font-size:11.5px;padding:0 6px}.trf .trf-k{width:104px;height:104px}.trf .trf-cap{font-size:18px;min-height:64px}.trf .trf-time{display:none}
}
@media(prefers-reduced-motion:reduce){.tr-team *,.tr-team *::before,.tr-team *::after,.trf *,.trf *::before,.trf *::after{animation:none!important;transition:none!important}}
