/* Packing Butler hero, performed: a sentence becomes a forecast and a counted list, then every item is
   checked off into the case and the lid closes. No-character tier. Transform and opacity only; every
   frame sits inside the sheet's own box, so nothing on the page moves. The markup is the ending
   (packed), which is also the reduced-motion still; .is-armed sets the opening state before first paint. */
.pbsheet{position:relative}
.pbsheet__said q{display:inline}
.pbcaret{display:inline-block;position:relative;width:0;height:1em;vertical-align:-.12em;opacity:0}
.pbcaret::after{content:"";position:absolute;left:1px;top:0;width:2px;height:100%;background:#7C5D22}
.pbrest{visibility:hidden}
.pbfigure.is-typing .pbcaret{opacity:1;animation:pbBlink 1s steps(1) infinite}
@keyframes pbBlink{50%{opacity:0}}

/* the stack: one body per sample trip in the same grid cell, so the sheet is as tall as the tallest from the start */
.pbtrips{display:grid}
.pbtrips>*{grid-area:1/1;min-width:0}
.pbtrips>.is-off{visibility:hidden}
.pbmains .pbsheet__top{margin-top:14px}
.pbfigure.is-typing .pbsheet__said q::after{visibility:hidden}
/* the reasons and the case share one row on wide screens, so the replay stays on the first screen */
.pbfoot{margin-top:16px;padding-top:14px;border-top:1px solid #ECE6D8}
.pbfoot .pbsheet__why{margin-top:0;padding-top:0;border-top:0}
.pbfoot .pbcasebox{margin-top:16px;padding-top:14px;border-top:1px solid #ECE6D8}
@media (min-width:901px){
  .pbfoot{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:22px;align-items:center}
  .pbfoot .pbcasebox{margin-top:0;padding:0 0 0 20px;border-top:0;border-left:1px solid #ECE6D8;gap:14px}
  .pbfoot .pbcasebox svg{width:76px;height:62px}
  .pbcasecount{font-size:1.3rem}
}

/* list rows check off the way the app draws a packed row */
.pbsheet__grid li::before{transition:none}
.pbsheet__grid li.is-packed::before{background:#3C6241;border-color:#3C6241;box-shadow:inset 0 0 0 3px #FFFFFF;animation:pbPop .32s cubic-bezier(.3,1.6,.5,1)}
@keyframes pbPop{0%{transform:scale(.6)}100%{transform:scale(1)}}

/* the case strip */
.pbcasebox{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px;margin-top:16px;padding-top:14px;border-top:1px solid #ECE6D8}
.pbcasebox svg{width:96px;height:78px;display:block;overflow:visible}
.pbcasebox .pbcasefold{transform-box:fill-box;transform-origin:50% 100%}
.pbcasebox .pbcasewhole{transform-box:view-box;transform-origin:60px 88px}
.pbcasetext{min-width:0}
.pbcasetext small{display:block;font:600 12px/1.2 var(--k-text);letter-spacing:.09em;text-transform:uppercase;color:#5F5A50}
.pbcasecount{display:block;font-family:var(--k-display);font-weight:600;font-size:1.5rem;line-height:1.15;color:#1C1A16;font-variant-numeric:tabular-nums lining-nums}
.pbcasemsg{display:block;margin-top:2px;font-size:.875rem;line-height:1.35;color:#3C6241;font-weight:600}
.pbcasetrack{height:6px;margin-top:8px;border-radius:4px;background:#F1ECE1;overflow:hidden}
.pbcasetrack i{display:block;height:100%;border-radius:4px;background:#3C6241;transform-origin:left;transform:scaleX(var(--pbp,1))}
.pbtoken{position:absolute;left:0;top:0;width:12px;height:12px;border-radius:4px;background:#3C6241;pointer-events:none;z-index:3}

/* the opening state, set before first paint (never under reduced motion) */
.pbfigure.is-armed .pbsheet__top,.pbfigure.is-armed .pbwx,.pbfigure.is-armed .pbsheet__grid h4,
.pbfigure.is-armed .pbsheet__grid li,.pbfigure.is-armed .pbsheet__why{opacity:0;transform:translateY(6px)}
.pbfigure .pbsheet__top,.pbfigure .pbwx,.pbfigure .pbsheet__grid h4,.pbfigure .pbsheet__grid li,.pbfigure .pbsheet__why{transition:opacity .38s ease,transform .45s cubic-bezier(.2,.8,.2,1)}
.pbfigure .is-shown{opacity:1!important;transform:none!important}
/* the case: the markup is shut (the ending); armed, the lid stands open and the pile is empty */
.pbcaselid,.pbcasepile{transform-box:view-box;transform-origin:60px 40px;transform:scaleY(0);transition:transform .36s cubic-bezier(.55,0,.6,1)}
.pbfigure.is-armed .pbcaselid,.pbfigure.is-armed .pbcasepile{transform:scaleY(1)}
.pbfigure.is-armed .pbcasefold{transform:scaleY(0)}
.pbfigure.is-armed .pbcaseshut,.pbfigure.is-armed .pbcaseok{opacity:0}
.pbfigure.is-armed .pbcasemsg{color:#5F5A50;font-weight:500}
.pbcaseshut,.pbcaseok{transition:opacity .25s ease .2s}
.pbcasefold{transition:transform .3s cubic-bezier(.3,1.4,.5,1)}
.pbcasetrack i{transition:transform .25s ease}

/* try it: a replay and two sample trips, real buttons under the sheet */
.pbtrybar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}
.pbtrybar span{font-size:.875rem;color:var(--muted);margin-right:2px}
.pbwatch,.pbtrip{appearance:none;cursor:pointer;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;font:600 .9375rem/1 var(--k-text);
  color:var(--ink);background:color-mix(in srgb,var(--ink) 6%,transparent);border:1px solid color-mix(in srgb,var(--ink) 26%,transparent);transition:transform .2s ease}
.pbwatch:hover,.pbtrip:hover{transform:translateY(-1px)}
.pbwatch svg{width:14px;height:14px;flex:none}
.pbtrip[aria-pressed="true"]{background:var(--ink);color:var(--ground,#FBFAF7);border-color:var(--ink)}
.pbwatch:focus-visible,.pbtrip:focus-visible{outline:3px solid var(--accent);outline-offset:3px}

@media (max-width:700px){
  /* the sentence, then the case and its counter, then the list */
  .pbsheet{display:flex;flex-direction:column}
  .pbfoot{display:contents}
  .pbsaids{order:0}.pbfoot .pbcasebox{order:1}.pbmains{order:2}.pbwhys{order:3;margin-top:16px;padding-top:14px;border-top:1px solid #ECE6D8}
  .pbfoot .pbcasebox{margin-top:0;padding:12px 0;border-top:0;border-bottom:1px solid #ECE6D8}
  .pbcasebox{gap:12px}
  .pbcasebox svg{width:80px;height:65px}
  .pbcasecount{font-size:1.3rem}
  .pbtrybar{gap:6px}
  .pbtrybar span{width:100%}
  .pbwatch,.pbtrip{padding:0 13px;font-size:.875rem}
}
@media (prefers-reduced-motion:reduce){
  .pbfigure *,.pbfigure *::before{transition:none!important;animation:none!important}
}
/* Review round 2 (spacing): on phones the main button comes before the performed sheet, so it is on the first
   screen; the sheet still starts performing within it (the same move as the Cachet Drive rebuild) */
@media (max-width:700px){#top .pbhero__after{order:1}#top .pbfigure{order:2}#top .pbhero__after .pbnote{margin-bottom:0}}
