/* Round three small delights (11/21). One file for all of them: tear-off calendar, cow peek, FOUND IT stamp, reading-progress stripe,
   odometer total, gold stars, marker underline. Loaded with delight.js on the pages that use them. No inline styles (CSP): script only sets
   custom properties and classes. Every motion sits behind prefers-reduced-motion: no-preference; with reduced motion the end state shows, nothing moves. */

/* 1. Tear-off calendar under the home hero */
.dl-cal-sec{padding:0 0 clamp(28px,4vw,44px)}
.dl-cal{display:flex;align-items:center;gap:18px;width:min(100%,520px);margin:0 auto;padding:16px 22px 16px 18px;background:#fff;border:2px solid #12203a;border-radius:22px;box-shadow:4px 4px 0 #12203a;text-align:left}
.dl-pg{flex:none;width:78px;position:relative;border:2px solid #12203a;border-radius:12px;overflow:hidden;text-align:center;background:#fff;box-shadow:3px 3px 0 #12203a;backface-visibility:hidden}
.dl-pg i{display:block;background:#c8202f;color:#fff;font:700 .78rem/1 'Instrument Sans',system-ui,sans-serif;letter-spacing:.14em;padding:7px 0 6px;font-style:normal}
.dl-pg b{display:block;font:800 2.2rem/1.05 'Bricolage Grotesque','Bricolage Fallback','Arial Narrow',system-ui,sans-serif;padding:4px 0 7px;color:#12203a}
.dl-tx{min-width:0}
.dl-tx b{display:block;font:800 1.25rem/1.1 'Bricolage Grotesque','Bricolage Fallback','Arial Narrow',system-ui,sans-serif;text-transform:uppercase;color:#12203a;letter-spacing:-.005em}
.dl-tx span{display:block;margin-top:4px;font-size:.92rem;line-height:1.35;color:#33415c}
.dl-tx .dl-days{display:inline-block;margin-top:9px;background:#ffcb3d;border:2px solid #12203a;border-radius:999px;padding:3px 12px;font:700 .85rem/1.3 'Instrument Sans',system-ui,sans-serif;color:#12203a}
.dl-tx .dl-days:empty{display:none}
@media (max-width:380px){.dl-cal{gap:14px;padding:14px 16px 14px 14px}.dl-pg{width:68px}.dl-pg b{font-size:1.9rem}.dl-tx b{font-size:1.1rem}}
@keyframes dl-flip{0%{transform:perspective(500px) rotateX(78deg);transform-origin:top}100%{transform:perspective(500px) rotateX(0);transform-origin:top}}
@media (prefers-reduced-motion:no-preference){
  .dl-cal.dl-armed .dl-pg{opacity:0}
  .dl-cal.dl-flip .dl-pg{opacity:1;animation:dl-flip .75s cubic-bezier(.3,1.4,.5,1) both}
}

/* 2. The cow peeks over the top edge of the sign-up card */
.tx-claim.dl-has-peek{position:relative;margin-top:clamp(58px,6vw,66px)}
@media (min-width:1100px){.tx-claim.dl-has-peek{margin-top:62px}}
.tx-claim.dl-has-peek > form,.tx-claim.dl-has-peek > .tx-done{position:relative;z-index:1}
.dl-peek{position:absolute;left:0;right:0;bottom:100%;height:60px;overflow:hidden;pointer-events:none;z-index:0}
.dl-peek img{position:absolute;left:50%;bottom:0;width:84px;height:auto;margin-left:-42px;transform:translateY(100%)}
.dl-peek.dl-on img{transform:translateY(8px)}
@media (prefers-reduced-motion:no-preference){.dl-peek img{transition:transform .45s cubic-bezier(.3,1.5,.5,1)}}

/* 3. FOUND IT stamp beside the picked address */
.dl-stamp{position:absolute;right:225px;top:-15px;z-index:2;pointer-events:none;opacity:0;font:400 1.05rem/1 'Permanent Marker','Bricolage Grotesque',system-ui,sans-serif;font-weight:800;letter-spacing:.05em;white-space:nowrap;color:#1e8e5a;border:3px solid #1e8e5a;border-radius:8px;padding:6px 10px 5px;background:rgba(255,255,255,.88);transform:rotate(-9deg)}
.tpp-ac-found > .dl-stamp{opacity:.92}
@media (max-width:700px){.dl-stamp{right:14px;left:auto;top:-17px;font-size:.92rem;padding:5px 8px 4px}}
@keyframes dl-stamp{0%{opacity:0;transform:rotate(-9deg) scale(2.2)}60%{opacity:.95;transform:rotate(-9deg) scale(.94)}100%{opacity:.92;transform:rotate(-9deg) scale(1)}}
@keyframes dl-thud{50%{transform:translateY(2px)}}
@media (prefers-reduced-motion:no-preference){
  .tpp-ac-found > .dl-stamp{animation:dl-stamp .5s cubic-bezier(.2,1.6,.4,1) both}
  .tpp-ac-found.tx-pill{animation:dl-thud .25s .28s}
}

/* 4. The flag stripe fills as you read a guide (long guide pages only) */
html.dl-read .tpp-h::after{background:linear-gradient(90deg,transparent var(--dl-p,0%),#e8edf5 var(--dl-p,0%)),linear-gradient(90deg,#0f2a6b 0 33.34%,#fff 33.34% 66.67%,#c8202f 66.67%)}
.dl-prog{position:fixed;left:0;right:0;top:0;height:8px;z-index:50;pointer-events:none;border-bottom:2px solid #12203a;opacity:0;transition:opacity .2s;background:linear-gradient(90deg,transparent var(--dl-p,0%),#e8edf5 var(--dl-p,0%)),linear-gradient(90deg,#0f2a6b 0 33.34%,#fff 33.34% 66.67%,#c8202f 66.67%)}
.dl-prog.dl-on{opacity:1}

/* 5. Odometer: the calculator's yearly total rolls digit by digit */
.dl-odo{display:inline-flex;align-items:flex-start;vertical-align:top;height:1em;overflow:hidden}
.dl-d{display:block;position:relative;height:1em;width:.6em;overflow:hidden;text-align:center}
.dl-d > span{display:flex;flex-direction:column}
.dl-d i{display:block;height:1em;line-height:1;font-style:normal}
.dl-d i::before{content:attr(data-n)}
.dl-s{display:block;height:1em;line-height:1}
.dl-s::before{content:attr(data-n)}
@media (prefers-reduced-motion:no-preference){.dl-d > span{transition:transform 1s cubic-bezier(.2,.8,.2,1)}}
.dl-odo-t{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.tc-total-n{position:relative}

/* 6. Three gold stars off the success state */
.dl-star{position:fixed;width:24px;height:24px;margin:-12px 0 0 -12px;pointer-events:none;opacity:0;z-index:80}
@keyframes dl-star{0%{opacity:0;transform:translate(0,0) scale(.3) rotate(0)}20%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) scale(1) rotate(var(--r))}}
@media (prefers-reduced-motion:no-preference){.dl-star.dl-go{animation:dl-star .95s cubic-bezier(.2,.8,.3,1) forwards}}

/* 7. Marker underline under one phrase of a big heading */
.dl-mk{background:linear-gradient(transparent 66%,#ffcb3d 66% 92%,transparent 92%) no-repeat left bottom/100% 100%;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .08em;margin:0 -.08em}
@media (prefers-reduced-motion:no-preference){
  .dl-mk.dl-armed{background-size:0 100%;transition:background-size .8s .15s cubic-bezier(.6,.1,.3,1)}
  .dl-mk.dl-armed.dl-on{background-size:100% 100%}
}
