/* Cards, bills, streaks, fees. */

/* Cards */
.cards-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .cards-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.cards-stage {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 28px; justify-items: center;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) 28px; background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-card);
}
.vcard {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; max-width: 380px; aspect-ratio: 1.586;
  background: var(--ground-3); border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); transform: rotate(-2.5deg);
  transition: filter 320ms var(--ease-out), transform 420ms var(--ease-out);
}
.vcard .cloth { z-index: -1; }
.vcard.is-frozen { filter: grayscale(1) brightness(0.8); transform: rotate(0deg); }
.vcard-top, .vcard-bottom { display: flex; justify-content: space-between; align-items: center; }
.brand-lite { font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; }
.vcard-brand { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 1.125rem; }
.vcard-num { font-size: clamp(1rem, 0.8rem + 1vw, 1.3rem); letter-spacing: 0.08em; }
.vcard-state { padding: 4px 10px; border-radius: var(--r-pill); background: var(--ground); font-size: 0.8125rem; font-weight: 600; }
.card-controls { display: grid; gap: 14px; width: 100%; max-width: 380px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions .btn { flex: 1; }
.card-actions .btn[aria-pressed="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
.pin-ask { display: grid; gap: 8px; }
.pin-ask[hidden] { display: none; }
.pin-ask label { font-size: 0.875rem; color: var(--text-dim); }
.pin-row { display: flex; gap: 8px; }
.pin-row .input { flex: 1; letter-spacing: 0.4em; }

.steps { display: grid; gap: 22px; margin-bottom: 24px; }
.steps h3 { font-size: 1.25rem; margin-bottom: 2px; }

/* Bills */
.tablist { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.tablist::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); flex: none; scroll-snap-align: start;
  border: 1px solid var(--line-strong); font-weight: 600; font-size: 0.9375rem; color: var(--text-dim);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.tab:active { transform: scale(0.97); }
.tab[aria-selected="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
@media (hover: hover) and (pointer: fine) { .tab[aria-selected="false"]:hover { color: var(--text); border-color: var(--text); } }
.tabpanel {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 16px; min-height: 240px; padding: clamp(24px, 4vw, 40px);
  background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-card); display: grid; align-content: start; gap: 24px;
}
.tabpanel[hidden] { display: none; }
.tabpanel:not([hidden]) { animation: panel-in 240ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tabpanel .cloth { z-index: -1; }
.panel-blurb { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); letter-spacing: -0.015em; line-height: 1.25; max-width: 36ch; }
.tabpanel .chips { list-style: none; max-width: 760px; }

/* Streaks */
.streak { display: grid; gap: 24px; padding: clamp(24px, 4vw, 48px); background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-card); }
.streak-head, .calc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.streak-head label, .calc-head label { color: var(--text-dim); font-weight: 500; }
.streak-days, .calc-amt { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); letter-spacing: -0.02em; color: var(--accent-text); }
.slider {
  --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; touch-action: pan-y;
}
.slider::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(to right, var(--accent) var(--p), var(--line-strong) var(--p)); }
.slider::-moz-range-track { height: 8px; border-radius: 8px; background: var(--line-strong); }
.slider::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: var(--accent); border: 4px solid var(--ground-2); box-shadow: 0 0 0 1px var(--accent); transition: transform var(--t-press) var(--ease-out); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid var(--ground-2); box-shadow: 0 0 0 1px var(--accent); }
.slider:active::-webkit-slider-thumb { transform: scale(1.12); }
.slider:focus-visible { outline-offset: 0; }
.streak-badge { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.015em; min-height: 1.4em; }
.rewards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reward { padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--ground); display: grid; gap: 2px; transition: border-color 240ms var(--ease-out), background-color 240ms var(--ease-out), transform 240ms var(--ease-out); }
.reward-day { font-size: 0.9375rem; color: var(--text-dim); }
.reward-cash { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.1; }
.reward-or { font-size: 0.9375rem; }
.reward.is-reached { border-color: var(--accent); background: var(--ground-3); }
.reward.is-reached .reward-cash { color: var(--accent-text); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges .chip { color: var(--text-dim); }
.badges .chip.is-on { color: var(--ground); }
.badges .chip.is-on .dim { color: inherit; opacity: 0.75; }
.badges .chip .icon { width: 1.1em; height: 1.1em; }
@media (min-width: 760px) { .rewards { grid-template-columns: repeat(4, 1fr); } }
