/* A reward an owner set for her (SG-148, js/reward.js): the prize, what earns it, and how close she is. One card, on Home (a link to Progress) and
   in Progress's Reward section, where the page sets --rw-ground to its own background so the card reads on a panel. Tonal fill, no shadow; the
   gift is a soft tile, and a reached one turns its tile marigold with a check, as a goal hit does on the week strip. */
.rw-c { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; align-items:center; gap:4px 12px; padding:12px 14px; border-radius:var(--r-card); background:var(--rw-ground, var(--panel)); color:var(--ink); }
.rw-ic { grid-row:1; display:inline-grid; place-items:center; width:36px; height:36px; border-radius:var(--r-ctl); background:var(--leaf-soft); color:var(--leaf-text); }
.rw-got .rw-ic { background:var(--marigold); color:var(--on-marigold); }
.rw-tx { display:flex; flex-direction:column; min-width:0; }
.rw-tx b { font-family:var(--font-head); font-weight:700; font-size:16px; line-height:1.25; letter-spacing:-.01em; overflow-wrap:anywhere; }
.rw-tx small { font-size:13px; line-height:1.3; color:var(--ink-2); overflow-wrap:anywhere; }
.rw-of { display:flex; flex-direction:column; align-items:flex-end; text-align:right; }
.rw-of b { font-family:var(--font-head); font-weight:700; font-size:15px; line-height:1.25; letter-spacing:-.01em; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rw-of small { font-size:13px; line-height:1.3; color:var(--ink-2); }
.rw-bar { grid-column:1 / -1; height:6px; border-radius:3px; background:color-mix(in srgb, var(--ink) 10%, transparent); overflow:hidden; margin-top:6px; }
.rw-bar i { display:block; height:100%; width:calc(var(--p, 0) * 100%); border-radius:3px; background:var(--leaf); }
@media (max-width:359px) { .rw-c { grid-template-columns:auto minmax(0, 1fr); } .rw-of { grid-column:1 / -1; align-items:flex-start; text-align:left; } }

/* Home: the card is a link to Progress, between the greeting and the tiles. */
a.rw-home { display:block; margin:0 0 12px; color:inherit; text-decoration:none; border-radius:var(--r-card); }
a.rw-home:focus-visible { outline:2px solid var(--leaf-text); outline-offset:3px; }
a.rw-home[hidden] { display:none; }

/* Progress: the rewards not yet given as cards, then a short list of the ones given. */
.rw-stack { display:grid; gap:8px; }
.rw-ph { margin:14px 0 6px; font:700 13px var(--font-head); letter-spacing:0; color:var(--ink-2); }
.rw-past { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
.rw-past li { display:flex; align-items:center; gap:8px; min-height:32px; font-size:14px; }
.rw-past b { font-family:var(--font-head); font-weight:700; letter-spacing:-.01em; overflow-wrap:anywhere; }
.rw-past small { margin-left:auto; flex:none; color:var(--ink-2); font-size:12.5px; }
.rw-pi { flex:none; display:inline-grid; place-items:center; width:20px; height:20px; border-radius:50%; background:var(--leaf-soft); color:var(--leaf-text); }

@keyframes rw-fill { from { transform:scaleX(0); } to { transform:none; } }
@media (prefers-reduced-motion: no-preference) { .rw-bar i { transform-origin:left; animation:rw-fill .8s var(--ease-out, ease-out) backwards .25s; } }
