/* Styles for the hero story (public/sl/hero-story.js), taken from the prototype's stylesheet and scoped to the
   one screen the story runs on: the slot carries .sl-story while the story is set up, and .in once it plays. */
.sl-story{--ease:cubic-bezier(.32,.72,0,1);--ease-out:cubic-bezier(.16,1,.3,1)}

/* entrance */
.sl-story .slm-win{position:relative;opacity:0;transform:translateY(24px) scale(.985);
  box-shadow:var(--sx,0px) var(--sy,30px) 60px -20px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)}
.sl-story.in .slm-win{opacity:1;transform:none;transition:opacity .5s var(--ease-out),transform .7s var(--ease-out),box-shadow .3s var(--ease)}
.sl-story [data-stagger]{opacity:0;transform:translateY(6px)}
.sl-story.in [data-stagger]{opacity:1;transform:none;transition:opacity .35s var(--ease-out),transform .45s var(--ease-out),background-color .14s var(--ease);transition-delay:calc(var(--i) * 28ms)}
.sl-story .slm-ev-side{opacity:0}
.sl-story.in .slm-ev-side{opacity:1;transition:opacity .5s var(--ease-out) .1s}

/* the light that follows the cursor */
.sl-story .slm-frame{position:relative}
.sl-story .slm-frame::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(60% 55% at var(--gx,50%) var(--gy,50%),rgba(255,255,255,.35),rgba(255,255,255,0) 70%)}
.sl-story .slm-win::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:9;border-radius:inherit;
  background:radial-gradient(50% 40% at var(--gx,50%) var(--gy,50%),rgba(255,255,255,.18),rgba(255,255,255,0) 70%)}

/* live state changes */
.sl-story .slm-st{transition:border-color .2s var(--ease),background-color .2s var(--ease)}
.sl-story .slm-st.pop{animation:sls-pop .42s var(--ease-out)}
@keyframes sls-pop{0%{transform:scale(.86)}55%{transform:scale(1.06)}100%{transform:scale(1)}}
.sl-story .slm-st .draw path{stroke-dasharray:24;stroke-dashoffset:24;animation:sls-draw .38s var(--ease-out) .08s forwards}
@keyframes sls-draw{to{stroke-dashoffset:0}}
.sl-story .slm-row.flash{animation:sls-flash 1.4s var(--ease-out)}
@keyframes sls-flash{0%{background:#fef9c3}100%{background:transparent}}
.sl-story .slm-cal .ds span{transition:background-color .3s var(--ease),transform .3s var(--ease-out)}
.sl-story .slm-cal .ds span.bump{transform:scale(1.6)}
.sl-story .slm-badge{transition:transform .2s var(--ease-out)}
.sl-story .slm-badge.bump{transform:scale(1.35)}
.sl-story .slm-spend .tick{transition:color .3s var(--ease)}
.sl-story .slm-spend .tick.up,.sl-story .slm-spend .tick.hit{color:#059669}

/* notification: big enough to read at hero size */
.sl-story .hero-toast{position:absolute;top:72px;right:20px;z-index:6;width:420px;display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;
  padding:12px 16px 12px 12px;box-shadow:0 24px 48px -12px rgba(17,24,39,.28),0 4px 12px -4px rgba(17,24,39,.1);
  opacity:0;transform:translateX(40px) scale(.96);pointer-events:none;transition:opacity .22s var(--ease),transform .42s var(--ease-out)}
.sl-story .hero-toast.show{opacity:1;transform:none}
.sl-story .hero-toast.leave{opacity:0;transform:translateY(-14px) scale(.97);transition:opacity .2s var(--ease),transform .25s var(--ease)}
.sl-story .hero-toast .av{position:relative;flex-shrink:0;width:42px;height:42px}
.sl-story .hero-toast .av img{width:42px;height:42px;border-radius:999px;object-fit:cover;display:block}
.sl-story .hero-toast .av i{position:absolute;right:-4px;bottom:-4px;width:20px;height:20px;border-radius:999px;background:#fff;display:grid;place-items:center;box-shadow:0 0 0 1px #e5e7eb}
.sl-story .hero-toast .av i svg{width:16px;height:16px}
.sl-story .hero-toast.ok{border-color:#a7f3d0}
.sl-story .hero-toast .tx{flex:1;min-width:0}
.sl-story .hero-toast b{display:block;font-size:15px;line-height:20px;font-weight:600;color:#111827}
.sl-story .hero-toast small{display:block;margin-top:1px;font-size:13px;line-height:18px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sl-story .hero-toast .amt{font-size:15px;font-weight:600;color:#111827}
.sl-story .hero-toast.ok .amt{color:#059669}

/* the cursor that presses New event */
.sl-story .hc-cursor{position:absolute;left:0;top:0;z-index:8;opacity:0;pointer-events:none;transform:translate(1100px,700px);
  transition:transform .42s var(--ease),opacity .2s var(--ease);filter:drop-shadow(0 2px 3px rgba(0,0,0,.25))}
.sl-story .hc-cursor.on{opacity:1}
.sl-story .hc-cursor svg{display:block;transition:transform .12s var(--ease)}
.sl-story .hc-cursor.press svg{animation:sls-press .22s var(--ease)}
@keyframes sls-press{50%{transform:scale(.82)}}
.sl-story .pressed{animation:sls-pressed .22s var(--ease)}
@keyframes sls-pressed{50%{transform:scale(.97);background:#f3f4f6}}

/* performance form over the calendar (mirrors the app's) */
.sl-story .hm-back{position:absolute;inset:0;z-index:7;background:rgba(17,24,39,.32);display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity .2s var(--ease)}
.sl-story .hm-back.open{opacity:1}
.sl-story .hm{width:432px;background:#fff;border-radius:14px;padding:12px 20px 18px;box-shadow:0 30px 60px -15px rgba(0,0,0,.35);transform:translateY(14px) scale(.97);transition:transform .38s var(--ease-out);text-align:left;line-height:1.4}
.sl-story .hm-back.open .hm{transform:none}
.sl-story .hm-head{display:flex;justify-content:space-between;align-items:flex-start;padding:6px 0 4px}
.sl-story .hm-head b{display:block;font-size:18px;line-height:24px;font-weight:600;color:#111827}
.sl-story .hm-head small{display:block;font-size:13px;color:#6b7280}
.sl-story .hm-x{padding:4px;border-radius:6px;color:#374151;display:grid;place-items:center}
.sl-story .hm-tabs{display:flex;gap:20px;border-bottom:1px solid #e5e7eb;margin:6px 0 4px;font-size:14px}
.sl-story .hm-tabs span{padding:8px 0;color:#6b7280;font-weight:500}
.sl-story .hm-tabs span.on{color:#111827;font-weight:600;border-bottom:2px solid #111827}
.sl-story .hm-r{display:flex;align-items:center;gap:12px;padding:9px 0;color:#374151}
.sl-story .hm-r.top{align-items:flex-start}
.sl-story .hm-r.line{border-bottom:1px solid #e5e7eb;padding-bottom:14px}
.sl-story .hm-r > span{min-width:0}
.sl-story .hm-r .grow{flex:1}
.sl-story .hm-title{display:flex;align-items:center;gap:1px;min-height:30px;padding:2px 6px;margin:-2px -6px;border-radius:6px;border:1px solid transparent;font-size:20px;line-height:26px;color:#111827;transition:border-color .15s var(--ease),box-shadow .15s var(--ease)}
.sl-story .hm-title .ph{color:#111827}
.sl-story .hm-title.focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.12)}
.sl-story .hm-date{display:block;font-size:13px;color:#6b7280}
.sl-story .hm-f{height:34px;display:inline-flex;align-items:center;gap:8px;padding:0 10px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;color:#9ca3af;background:#fff;transition:border-color .15s var(--ease),box-shadow .15s var(--ease)}
.sl-story .hm-f.filled{color:#111827}
.sl-story .hm-f.wide{flex:1}
.sl-story .hm-f.sel{justify-content:space-between}
.sl-story .hm-f.sel svg{width:18px;height:18px;color:#374151;margin-left:auto}
.sl-story .hm-f img{width:24px;height:24px;border-radius:999px;object-fit:cover}
.sl-story .hm-f.focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.12)}
.sl-story .hm-f.fillin,.sl-story .num.fillin{animation:sls-fillin .35s var(--ease-out)}
@keyframes sls-fillin{0%{background:#fef9c3}100%{background:#fff}}
.sl-story .hm-date.fillin{animation:none}
.sl-story .dash{color:#9ca3af}
.sl-story .hm-lab{display:block;font-size:14px;font-weight:600;color:#111827;margin-bottom:8px}
.sl-story .hm-rate{display:flex;gap:8px}
.sl-story .hm-rate .cur{width:110px;gap:4px}
.sl-story .hm-rate .dl{color:#6b7280}
.sl-story .hm-f.cur:not(.filled) .rv:empty::before{content:"0.00";color:#9ca3af}
.sl-story .hm-f.cur.focus .rv:empty::before{content:""}
.sl-story .caret{display:none;width:1.5px;height:18px;background:#111827;animation:sls-blink 1s steps(1) infinite}
.sl-story .focus .caret{display:inline-block}
@keyframes sls-blink{50%{opacity:0}}
.sl-story .hm-chk{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:14px;color:#111827}
.sl-story .hm-chk.line{border-bottom:1px solid #e5e7eb;padding-bottom:14px}
.sl-story .hm-chk .bx{width:18px;height:18px;border:1px solid #d1d5db;border-radius:4px;display:grid;place-items:center;transition:background-color .15s var(--ease),border-color .15s var(--ease)}
.sl-story .hm-chk .bx.on{background:#111827;border-color:#111827}
.sl-story .hm-tot,.sl-story .hm-sub{display:flex;justify-content:space-between;font-size:14px;padding-top:12px;color:#111827}
.sl-story .hm-tot{font-weight:600}
.sl-story .hm-sub{padding-top:6px;color:#6b7280}
.sl-story .hm-foot{display:flex;justify-content:flex-end;align-items:center;margin-top:16px}
.sl-story .hm-note{font-size:13px;color:#6b7280;margin-right:12px}
.sl-story .hm-split{display:inline-flex;border-radius:6px;overflow:hidden;background:#1f2937;color:#fff;font-weight:600;font-size:14px}
.sl-story .hm-send{height:34px;padding:0 14px;display:grid;place-items:center}
.sl-story .hm-more{width:34px;display:grid;place-items:center;border-left:1px solid #374151}
.sl-story .hm-more svg{width:16px;height:16px}
.sl-story .hm-send.pressed{animation:sls-pressdark .22s var(--ease)}
@keyframes sls-pressdark{50%{background:#111827;transform:scale(.97)}}

/* today marker: a slow, quiet pulse */
.sl-story .slm-today{position:relative}
.sl-story .slm-today::before{position:relative;z-index:1}
.sl-story.in .slm-today .pulse{position:absolute;left:-4px;top:50%;width:16px;height:16px;margin-top:-8px;border-radius:999px;background:#1f2937;opacity:0;animation:sls-pulse 2.4s var(--ease-out) 1.2s infinite}
@keyframes sls-pulse{0%{transform:scale(.5);opacity:.35}100%{transform:scale(2.2);opacity:0}}

/* the new event opening up in the list */
.sl-story .newgrp{display:grid;grid-template-rows:0fr;transition:grid-template-rows .45s var(--ease-out)}
.sl-story .newgrp > *{overflow:hidden;min-height:0}
.sl-story .newgrp.open{grid-template-rows:1fr}

/* hover states inside the screen */
.sl-story .slm-nav,.sl-story .slm-btn,.sl-story .slm-ic,.sl-story .slm-dots,.sl-story .slm-cal > div:not(.hd),.sl-story .slm-row{transition:background-color .14s var(--ease),color .14s var(--ease),transform .12s var(--ease)}
.sl-story .slm-nav:not(.on):hover{background:#f3f4f6;color:#1f2937}
.sl-story .slm-btn.out:hover,.sl-story .slm-btn.ghost:hover{background:#f3f4f6}
.sl-story .slm-btn.dark:hover{background:#111827}
.sl-story .slm-ic:hover{background:#f3f4f6;border-radius:8px}
.sl-story .slm-ev-list .slm-row{border-radius:6px}
.sl-story .slm-ev-list .slm-row:hover{background:#f9fafb}
.sl-story .slm-dots{border-radius:6px}
.sl-story .slm-dots:hover{background:#e5e7eb}
.sl-story .slm-cal > div:not(.hd):hover{background:#e5e7eb}
