/* 38 · the money stripe (modules/fund.js): a long band under the plate that says "this could be a game", counts only
   real money and has one door. House rose only (palette locked, settings 4): the name and the key number wear it,
   the meter fills with the deep rose's smooth gradient. Wide: words left, the count right, the meter and the button
   across. Narrow: everything stacks. */

/* dressed as an Offer (the user, 2026-10-13: the stripe "looks poor and incongruent"): the Offer type's own shape
   tokens (05-types.css: --offer-radius, --offer-pad, --offer-gap), its card ground and rose edge, the same lift
   under a hand, and a title in the Offer's size */
.rw-fund{position:relative;margin-top:14px;padding:var(--offer-pad,20px);border-radius:var(--offer-radius,16px);display:grid;
  grid-template-columns:1fr auto;grid-template-areas:"copy count" "meter meter" "back back";gap:12px 16px;align-items:center;
  border:1px solid color-mix(in srgb,var(--rw-item-edge) 45%,var(--rw-engine-edge));
  background:radial-gradient(90% 120% at 0% 0%,color-mix(in srgb,var(--rose) 12%,transparent),transparent 60%),var(--rw-item-bg);
  box-shadow:0 18px 40px -26px color-mix(in srgb,var(--rw-item-edge) 55%,transparent);transition:border-color .3s,box-shadow .3s}
.rw-fund:hover{border-color:var(--rw-item-edge);box-shadow:0 22px 48px -18px color-mix(in srgb,var(--rw-item-edge) 60%,transparent)}

.rw-fund__copy{grid-area:copy;display:flex;flex-direction:column;gap:4px;min-width:0}
.rw-fund__title{font-family:var(--f-display);font-size:26px;line-height:1.1;color:var(--rw-item-title)}
.rw-fund__lede{font-size:13.5px;line-height:1.35;color:var(--rw-caption-ink)}
/* proof before the ask (module.fund): three short true lines, each led by its bold key, a hairline between them;
   quiet, so the one door stays the only loud thing */
.rw-fund__proof{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:0;font-size:13px;line-height:1.35;color:var(--rw-caption-ink)}
.rw-fund__proof-item{padding:6px 0;border-top:1px solid color-mix(in srgb,var(--rw-caption-ink) 18%,transparent)}
.rw-fund__proof-k{color:var(--rw-item-title);font-weight:700}

/* the count: the key number in the data face and the rose; the rest in the body face, quiet */
.rw-fund__count{grid-area:count;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.rw-fund__sum{font-family:var(--f-data);font-weight:700;font-size:20px;line-height:1.1;color:var(--rose)}
.rw-fund[data-state="first"] .rw-fund__sum{font-size:15px}
.rw-fund__of,.rw-fund__backers{font-size:12.5px;color:var(--rw-caption-ink)}
.rw-fund__sum:empty,.rw-fund__of:empty,.rw-fund__backers:empty{display:none}

/* the meter: a sunken groove (double shading) and a fill that is the true share, nothing more */
.rw-fund__meter{grid-area:meter;position:relative;height:8px;border-radius:999px;overflow:hidden;
  background:color-mix(in srgb,var(--rose) 10%,transparent);
  box-shadow:inset 0 1px 3px color-mix(in srgb,var(--rose-dark) 30%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--rose-dark) 15%,transparent)}
.rw-fund__meter[hidden]{display:none}
.rw-fund__fill{position:absolute;inset:0 auto 0 0;width:calc(var(--share,0) * 100%);border-radius:inherit;
  background:linear-gradient(90deg,var(--rose-deep),var(--rose));transition:width .9s var(--e)}

/* the doors: Pledge, then the smaller coffee door (Round 8) and its one quiet line; they wrap when narrow */
.rw-fund__doors{grid-area:back;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.rw-fund__coffee{padding:7px 13px;font-size:13.5px}
.rw-fund__coffee-line{font-size:12.5px;color:var(--rw-caption-ink)}
/* the Pledge door's look, the soft red by day with its white strike, is the Button type's --pledge (06-button.css) */
/* Round 13 (the user): Pledge takes love, not blood: module.bleed reads this token and swells pixel hearts and
   flowers under the hand instead of the strike (a texture-pack look: hard pixels, a bubble's glint, then a pop) */
.rw-fund__back{--rw-bleed-mode:love}

@container (max-width:460px){
  .rw-fund{grid-template-columns:1fr;grid-template-areas:"copy" "count" "meter" "back"}
  .rw-fund__count{align-items:flex-start;text-align:left}
}
@media (max-width:460px){
  .rw-fund{grid-template-columns:1fr;grid-template-areas:"copy" "count" "meter" "back"}
  .rw-fund__count{align-items:flex-start;text-align:left}
  .rw-fund__back,.rw-fund__coffee{flex:1 1 auto;justify-content:center;text-align:center}
}
/* Round 13, cooler on a phone (the user: "isn't cool enough"; minion 3): the stripe becomes a small stage. A rose
   aura breathes behind it from the top, the title and the number centre and grow, the number glows in the rose, the
   meter thickens and a sheen runs along its fill (the money moving), and Pledge spans the width as the one door */
.rw-fund__fill::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%);
  background-size:220% 100%;animation:rw-fund-sheen 2.6s ease-in-out infinite}
@keyframes rw-fund-sheen{0%{background-position:120% 0}100%{background-position:-120% 0}}
@keyframes rw-fund-breathe{0%,100%{opacity:.55;transform:scale(1)}50%{opacity:.9;transform:scale(1.06)}}
@media (max-width:460px){
  .rw-fund{overflow:hidden;text-align:center;padding:24px 18px 20px;gap:14px}
  .rw-fund::before{content:"";position:absolute;left:-20%;right:-20%;top:-60%;height:120%;pointer-events:none;z-index:0;
    background:radial-gradient(closest-side,color-mix(in srgb,var(--rose) 26%,transparent),transparent);animation:rw-fund-breathe 4s ease-in-out infinite}
  .rw-fund>*{position:relative;z-index:1}
  .rw-fund__copy{align-items:center}
  .rw-fund__title{font-size:30px}
  .rw-fund__count{align-items:center;text-align:center}
  .rw-fund__sum{font-size:30px;text-shadow:0 0 18px color-mix(in srgb,var(--rose) 45%,transparent)}
  .rw-fund__meter{height:12px}
  .rw-fund__doors{flex-direction:column;align-items:stretch}
  .rw-fund__back{width:100%;padding-block:14px;font-size:17px}
  .rw-fund__coffee-line{text-align:center}
}
@media (prefers-reduced-motion:reduce){.rw-fund__fill{transition:none}.rw-fund__fill::after,.rw-fund::before{animation:none}}
