/* Pulse page. Loaded only on /pulse, after site.css. */

.pulse-hero { padding-top: clamp(48px, 7vw, 96px); overflow: hidden; position: relative; }
.pulse-hero > .wrap { position: relative; z-index: 1; }

/* The trend line that shoots across the top: sales going up, every 7s. */
.pulse-streak { position: absolute; left: 0; right: 0; top: clamp(8px, 2vw, 28px); width: 100%; height: clamp(70px, 9vw, 140px); pointer-events: none; overflow: visible; }
.pulse-streak path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ps-trail { stroke: url(#ps-grad); stroke-width: 2.5; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: ps-draw 7s cubic-bezier(0.55, 0, 0.2, 1) infinite; }
.ps-head { stroke: #ffd2d6; stroke-width: 4; stroke-dasharray: 46 2000; stroke-dashoffset: 46; filter: drop-shadow(0 0 6px #ff4d5a) drop-shadow(0 0 16px #e1323f); animation: ps-fly 7s cubic-bezier(0.55, 0, 0.2, 1) infinite; }
@keyframes ps-draw {
  0% { stroke-dashoffset: 1000; opacity: 1; }
  22% { stroke-dashoffset: 0; opacity: 1; }
  60% { stroke-dashoffset: 0; opacity: 0.85; }
  78%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ps-fly {
  0% { stroke-dashoffset: 46; opacity: 1; }
  22% { stroke-dashoffset: -954; opacity: 1; }
  26%, 100% { stroke-dashoffset: -954; opacity: 0; }
}
.pulse-hero .eyebrow .i { animation: ps-kick 7s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
@keyframes ps-kick {
  0%, 2% { transform: none; }
  8% { transform: translate(3px, -4px) scale(1.25); }
  16%, 100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-trail { animation: none; stroke-dashoffset: 0; opacity: 0.5; }
  .ps-head, .pulse-hero .eyebrow .i { animation: none; }
  .ps-head { opacity: 0; }
}
.pulse-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.pulse-hero .h-display { color: #fff; margin-top: 18px; }
.pulse-hero .lede { margin: 20px 0 28px; }
.pulse-note { margin-top: 18px; font-size: 0.9rem; color: var(--navy-muted); max-width: 46ch; }
.btn-ghost.on-dark { background: transparent; color: #fff; border-color: var(--navy-3); box-shadow: none; }
.btn-ghost.on-dark:hover { background: var(--navy-2); }
.center-text { text-align: center; }
.center-text .lede { margin-inline: auto; margin-top: 16px; }

/* ---------- story player (shared by the brief and Your week) */
.story-shell { display: grid; justify-items: center; gap: 12px; }
.story {
  position: relative; width: min(100%, 400px); min-height: 520px;
  border-radius: 26px; padding: 22px 22px 26px;
  display: flex; flex-direction: column; gap: 14px;
  color: #fff; overflow: hidden; isolation: isolate;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.08);
}
.story:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.story.brief { background: radial-gradient(120% 80% at 100% 0%, oklch(0.42 0.16 25) 0%, transparent 55%), linear-gradient(160deg, oklch(0.26 0.05 255), oklch(0.17 0.035 255)); }
.story-bars { display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 0.28); overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: #fff; }
.story-top { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 650; color: rgb(255 255 255 / 0.8); }
.dotlive { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgb(225 50 63 / 0.3); }
.story p, .story b { color: inherit; }
.story-slide { flex: 1; display: flex; flex-direction: column; gap: 12px; animation: st-in 0.45s var(--ease) both; }
@keyframes st-in { from { opacity: 0; transform: translateY(10px); } }
.st-k { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.7); }
.st-h { font-size: 1.9rem; font-weight: 760; letter-spacing: -0.035em; line-height: 1.05; }
.st-h.big { font-size: 3.4rem; }
.st-h.xl { font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); }
.st-sub { color: rgb(255 255 255 / 0.78); display: flex; align-items: center; gap: 6px; }
.st-sub svg { width: 16px; height: 16px; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-grid div { padding: 9px 12px; border-radius: 14px; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.1); }
.st-grid b { display: block; font-size: 1.3rem; font-weight: 760; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.st-grid span { font-size: 0.8rem; color: rgb(255 255 255 / 0.72); }
.st-grid.two b { font-size: 2.2rem; }
.st-list { list-style: none; display: grid; gap: 10px; }
.st-list li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgb(255 255 255 / 0.08); }
.st-list li > div { flex: 1; display: grid; }
.st-list b { font-size: 0.95rem; }
.st-list span { font-size: 0.8rem; color: rgb(255 255 255 / 0.7); }
.st-list.compact li { padding: 10px 12px; }
.tag { flex: none; font-size: 0.7rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--tint-2); color: var(--ink-2); }
.tag.won { background: oklch(0.88 0.12 155); color: oklch(0.3 0.08 155); }
.tag.placed { background: oklch(0.88 0.08 240); color: oklch(0.3 0.1 240); }
.tag.paid { background: oklch(0.9 0.11 85); color: oklch(0.35 0.08 70); }
.tag.warn { background: oklch(0.93 0.06 60); color: oklch(0.42 0.12 50); }
.podium { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; }
.podium > div { display: grid; justify-items: center; gap: 4px; text-align: center; }
.podium .avatar { width: 46px; height: 46px; font-size: 14px; }
.podium b { font-size: 0.9rem; }
.podium span:not(.avatar) { font-size: 0.75rem; color: rgb(255 255 255 / 0.72); }
.podium i { font-style: normal; font-weight: 800; font-size: 1.4rem; width: 100%; display: grid; place-items: center; border-radius: 12px 12px 0 0; margin-top: 6px; }
.podium .p1 i { height: 110px; background: linear-gradient(oklch(0.85 0.14 85), oklch(0.7 0.14 75)); color: oklch(0.3 0.06 70); }
.podium .p2 i { height: 78px; background: linear-gradient(oklch(0.9 0.01 250), oklch(0.75 0.01 250)); color: var(--navy); }
.podium .p3 i { height: 58px; background: linear-gradient(oklch(0.75 0.09 55), oklch(0.6 0.1 50)); color: #fff; }
.story-cta { position: relative; z-index: 2; align-self: start; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 650; color: #fff; border: 1px solid rgb(255 255 255 / 0.35); background: transparent; text-decoration: none; cursor: pointer; }
.story-cta.solid { background: #fff; color: var(--navy); border-color: #fff; }
.story-cta svg { width: 16px; height: 16px; }
.story-hit { position: absolute; top: 40px; bottom: 0; width: 34%; z-index: 1; background: none; border: 0; cursor: pointer; }
.story-hit.prev { left: 0; }
.story-hit.next { right: 0; }
.story-hit:focus-visible { outline: 2px solid rgb(255 255 255 / 0.6); outline-offset: -6px; border-radius: 20px; }
/* "Tap me": a pulsing next button on the right edge until the first tap. */
.tap-hint {
  position: absolute; right: 10px; top: 50%; translate: 0 -50%;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(255 255 255 / 0.92); color: #0b1220;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
  transition: opacity 0.4s, scale 0.4s;
  pointer-events: none;
}
.tap-hint .i { width: 18px; height: 18px; }
.tap-hint::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgb(255 255 255 / 0.55);
  animation: tap-pulse 1.6s ease-out infinite;
}
@keyframes tap-pulse { to { box-shadow: 0 0 0 16px rgb(255 255 255 / 0); } }
.story-hit.next:hover .tap-hint { scale: 1.08; }
.story.is-used .tap-hint { opacity: 0; scale: 0.6; }
@media (prefers-reduced-motion: reduce) { .tap-hint::after { animation: none; } }
.story-hint { font-size: 0.82rem; color: var(--navy-muted); }

/* ---------- live Pulse mock-up */
.pulse-mock { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); padding: clamp(18px, 3vw, 32px); display: grid; gap: 22px; transition: box-shadow 0.3s; }
.pm-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; }
.pm-top h3 { font-size: 1.5rem; letter-spacing: -0.03em; margin-top: 6px; }
.pm-ctrls { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--tint-2); }
.seg button, .pm-btn { height: 36px; padding: 0 12px; border-radius: 9px; border: 0; background: none; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.pm-btn { border: 1px solid var(--line-2); background: var(--surface); display: inline-flex; align-items: center; gap: 6px; }
.pm-btn[data-compare][aria-pressed="true"] { background: var(--green-soft); border-color: transparent; color: var(--green-ink); }
.pm-btn.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.pm-btn svg { width: 15px; height: 15px; }
.pm-rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pm-ring { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); animation: st-in 0.4s var(--ease) both; }
.rg { position: relative; width: 64px; height: 64px; }
.rg svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.rg span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }
.rg-bg { fill: none; stroke: var(--tint-2); stroke-width: 7; }
.rg-fg { fill: none; stroke: var(--red); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.pm-ring .k { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pm-ring .k em { font-style: normal; font-size: 0.7rem; padding: 1px 6px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); }
.pm-ring .v { display: block; font-size: 1.35rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pm-ring .s, .pm-ring .cmp { display: block; font-size: 0.78rem; color: var(--muted); }
.pm-ring .cmp { color: var(--green-ink); margin-top: 2px; }
.pm-ring .cmp.down { color: var(--red-strong); }
.pm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pm-card { padding: 16px; border-radius: 16px; background: var(--tint); }
.pm-card h4 { font-size: 0.95rem; margin-bottom: 10px; }
.pm-feed { list-style: none; display: grid; gap: 10px; font-size: 0.9rem; }
.pm-feed li { display: flex; gap: 10px; align-items: baseline; }
.pm-foot { font-size: 0.85rem; color: var(--muted); }
.pulse-mock.presenting { position: fixed; inset: 0; z-index: 100; border-radius: 0; overflow: auto; align-content: center; padding: clamp(24px, 5vw, 64px); }
.pulse-mock.presenting .pm-ctrls > :not([data-present]) { display: none; }
.pulse-mock.presenting .pm-top h3 { font-size: 2.2rem; }

/* ---------- Your week */
.week-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.dir-points.light .ic { background: var(--red-soft); border-color: transparent; color: var(--red-strong); }
.dir-points.light p { color: var(--muted); }
.phone { justify-self: center; width: min(100%, 340px); padding: 12px; border-radius: 44px; background: var(--navy); box-shadow: var(--shadow-lg); }
.story.wrapped { width: 100%; aspect-ratio: 9 / 17; border-radius: 34px; box-shadow: none !important; justify-content: flex-start; transition: background 0.5s; }
.story.wrapped .story-slide { justify-content: center; }
.story.wrapped:has(.w1:not([hidden])) { background: linear-gradient(160deg, oklch(0.55 0.22 25), oklch(0.35 0.15 10)); }
.story.wrapped:has(.w2:not([hidden])) { background: linear-gradient(160deg, oklch(0.45 0.15 260), oklch(0.25 0.08 260)); }
.story.wrapped:has(.w3:not([hidden])) { background: linear-gradient(160deg, oklch(0.62 0.16 150), oklch(0.36 0.1 160)); }
.story.wrapped:has(.w4:not([hidden])) { background: linear-gradient(160deg, oklch(0.7 0.16 75), oklch(0.5 0.15 45)); }
.story.wrapped:has(.w5:not([hidden])) { background: linear-gradient(160deg, oklch(0.55 0.2 330), oklch(0.32 0.12 300)); }
.story.wrapped:has(.w6:not([hidden])) { background: linear-gradient(160deg, oklch(0.5 0.13 220), oklch(0.28 0.08 240)); }
.story.wrapped:has(.w7:not([hidden])) { background: linear-gradient(160deg, oklch(0.3 0.05 255), oklch(0.15 0.03 255)); }
.story.wrapped:has(.w8:not([hidden])) { background: linear-gradient(160deg, oklch(0.55 0.22 25), oklch(0.3 0.06 255)); }
.story.wrapped { background: linear-gradient(160deg, oklch(0.55 0.22 25), oklch(0.35 0.15 10)); }

/* ---------- leaderboard */
.lb-demo { position: relative; padding: 24px; border-radius: var(--r-xl); background: var(--navy-2); border: 1px solid var(--navy-3); display: grid; gap: 16px; overflow: hidden; }
.lb-head { display: flex; justify-content: space-between; align-items: baseline; }
.lb-head span { font-size: 0.85rem; color: var(--navy-muted); }
.lb-list { list-style: none; display: grid; gap: 8px; counter-reset: lb; }
.lb-list li { counter-increment: lb; display: grid; grid-template-columns: 26px 32px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / 0.05); }
.lb-list li::before { content: counter(lb); font-weight: 800; color: var(--navy-muted); text-align: center; }
.lb-list li:first-child { background: rgb(255 255 255 / 0.12); box-shadow: inset 0 0 0 1px oklch(0.8 0.14 85 / 0.6); }
.lb-list li:first-child::before { content: "1"; color: oklch(0.85 0.14 85); }
.lb-list .avatar { width: 32px; height: 32px; font-size: 11px; }
.lb-list .nm { color: #fff; font-weight: 600; }
.lb-list b { font-variant-numeric: tabular-nums; }
.lb-demo .btn { justify-self: start; }
.confetti { position: absolute; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; z-index: 5; }

@media (max-width: 960px) {
  .pulse-hero-grid, .week-grid { grid-template-columns: 1fr; }
  .pm-rings { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .pm-rings, .pm-cols { grid-template-columns: 1fr; }
  .story { aspect-ratio: auto; min-height: 480px; }
  .phone { width: min(100%, 290px); }
  .story.wrapped { min-height: 0; aspect-ratio: 9 / 16; }
  .pm-ring { grid-template-columns: 52px 1fr; padding: 12px; }
  .rg, .rg svg { width: 52px; height: 52px; }
  .st-h.big { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .story-slide, .pm-ring { animation: none; }
}
