/* ==========================================================================
   StreakPass components — sp-* prefix, BEM-ish. Every interactive component
   implements: default / hover / focus-visible / active / disabled / loading
   (+ selected / error where applicable). Canonical look: the 8 comps.
   ========================================================================== */

/* ---------------------------------------------------- canonical flames
   9 canonical flame glyphs (Roy's flames.svg): sp-flame-{orange|blue|white}-{1|2|3}
   (1=simple → 3=detailed). Aliases: #sp-flame → orange-2, #sp-flame-blue → blue-2,
   #sp-flame-hot → white-2. Tiers: orange default, blue day 7+, white-hot day 14+. */
.sp-flame { flex: 0 0 auto; }
.sp-flame--16 { width: 16px; height: 16px; }
.sp-flame--20 { width: 20px; height: 20px; }
.sp-flame--24 { width: 24px; height: 24px; }
.sp-flame--32 { width: 32px; height: 32px; }
.sp-flame--48 { width: 48px; height: 48px; }
.sp-flame--96 { width: 96px; height: 96px; }
.sp-flame--glow { filter: drop-shadow(0 0 10px rgba(255, 122, 0, 0.55)); }
.sp-flame--glow-blue { filter: drop-shadow(0 0 10px rgba(47, 109, 246, 0.6)); }
.sp-flame--glow-hot { filter: drop-shadow(0 0 12px rgba(190, 214, 255, 0.65)); }

/* --------------------------------------------------------------- top nav */
.sp-top-nav {
  position: sticky;
  top: 0;
  z-index: var(--sp-z-nav);
  height: var(--sp-h-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-space-3);
  padding: 0 var(--sp-page-pad);
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sp-border-soft);
}
.sp-top-nav__side { display: flex; align-items: center; gap: var(--sp-space-2); }

/* logo lockup: "Streak" bold italic + flame + "Pass" light */
.sp-logo {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--sp-text);
  text-decoration: none;
}
.sp-logo:hover { text-decoration: none; }
.sp-logo__streak { font-weight: var(--sp-fw-extrabold); font-style: italic; }
.sp-logo__flame { color: var(--sp-orange); margin: 0 1px; display: inline-flex; align-items: center; }
.sp-logo__flame svg { width: 0.85em; height: 0.85em; }
.sp-logo__pass { font-weight: var(--sp-fw-regular); color: var(--sp-text-muted); }
.sp-logo--lg { font-size: 1.75rem; }

/* streak pill: flame + day count */
.sp-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  height: var(--sp-h-chip);
  padding: 0 var(--sp-space-4);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-accent-soft);
  border-radius: var(--sp-radius-pill);
  color: var(--sp-amber);
  font-weight: var(--sp-fw-bold);
  box-shadow: var(--sp-glow-soft);
}
.sp-streak-pill__flame { display: inline-flex; flex: 0 0 auto; }
.sp-streak-pill__flame svg { width: 1em; height: 1em; min-width: 14px; min-height: 14px; }

/* user chip: avatar circle + username */
.sp-user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  height: var(--sp-h-chip);
  padding: 2px var(--sp-space-4) 2px 2px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-pill);
  color: var(--sp-text);
  font-weight: var(--sp-fw-semibold);
  transition: border-color var(--sp-speed-fast) var(--sp-ease);
}
.sp-user-chip:hover { border-color: var(--sp-border-accent-soft); text-decoration: none; }
.sp-avatar {
  flex: 0 0 auto;          /* never let flexbox squeeze it into an oval */
  width: 32px; height: 32px;
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sp-surface-raised);
  color: var(--sp-text);
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-bold);
}
.sp-avatar--lg { width: 88px; height: 88px; font-size: 2rem; border: 2px solid var(--sp-border-accent-soft); box-shadow: var(--sp-glow-soft); }

/* ---------------------------------------------------------------- cards */
/* RADIUS DISCIPLINE: one stroked rounded container per region. Children of a
   card divide space with shared 90° walls or dividers — never their own
   stroked rounded boxes. */
.sp-card {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-lg);
  padding: var(--sp-space-5);
  box-shadow: var(--sp-shadow-card);
}
.sp-card--accent {
  border-color: var(--sp-border-accent-soft);
  box-shadow: var(--sp-shadow-card), var(--sp-glow-soft);
}
.sp-card--flat { box-shadow: none; }

/* ----------------------------------------------------------------- hero */
.sp-hero { text-align: center; padding: var(--sp-space-8) 0 var(--sp-space-5); }
.sp-hero__title { font-size: var(--sp-fs-display); }
.sp-hero__title .sp-accent-text { display: block; }
.sp-hero__tagline {
  margin-top: var(--sp-space-4);
  color: var(--sp-text-muted);
  font-weight: var(--sp-fw-semibold);
}
.sp-hero__body { margin-top: var(--sp-space-4); color: var(--sp-text-muted); }

/* -------------------------------------------------------------- buttons */
.sp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-space-2);
  height: var(--sp-h-button);
  padding: 0 var(--sp-space-6);
  border-radius: var(--sp-radius-md);
  font-size: var(--sp-fs-body);
  font-weight: var(--sp-fw-bold);
  text-decoration: none;
  white-space: nowrap;       /* labels like "Share stats" never wrap */
  transition: transform var(--sp-speed-fast) var(--sp-ease),
              box-shadow var(--sp-speed-med) var(--sp-ease),
              border-color var(--sp-speed-fast) var(--sp-ease),
              opacity var(--sp-speed-fast) var(--sp-ease);
}
.sp-button:hover { text-decoration: none; }
.sp-button:active { transform: scale(0.98); }
.sp-button:disabled, .sp-button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.sp-button--sm { height: var(--sp-h-button-sm); padding: 0 var(--sp-space-4); font-size: var(--sp-fs-sm); border-radius: var(--sp-radius-sm); }
.sp-button--block { width: 100%; }

/* primary: fire gradient, dark text, glow */
.sp-button--primary {
  background: var(--sp-gradient-fire);
  color: var(--sp-text-on-accent);
  box-shadow: var(--sp-glow-orange);
}
.sp-button--primary:hover { box-shadow: var(--sp-glow-orange-strong); }
.sp-button--primary:focus-visible { box-shadow: var(--sp-glow-orange), var(--sp-focus-ring); }

/* secondary: dark surface, subtle border */
.sp-button--secondary {
  background: var(--sp-surface-strong);
  color: var(--sp-text);
  border: 1px solid var(--sp-border);
}
.sp-button--secondary:hover { border-color: var(--sp-border-accent-soft); }

/* ghost: amber outline (View offer) */
.sp-button--ghost {
  background: transparent;
  color: var(--sp-amber);
  border: 1px solid var(--sp-border-accent-soft);
}
.sp-button--ghost:hover { border-color: var(--sp-border-accent); box-shadow: var(--sp-glow-soft); }

/* destructive */
.sp-button--danger {
  background: var(--sp-danger-dim);
  color: var(--sp-danger);
  border: 1px solid rgba(255, 77, 77, 0.4);
}
.sp-button--danger:hover { border-color: var(--sp-danger); }

/* text button (Skip / Back) */
.sp-button--text {
  background: none;
  color: var(--sp-text-muted);
  padding: 0 var(--sp-space-3);
}
.sp-button--text:hover { color: var(--sp-text); }

/* dimensional: raised orange — beveled top highlight, bottom lip, drops on press */
.sp-button--raised {
  background: linear-gradient(180deg, #ffb54d 0%, #ff7a00 55%, #e85f00 100%);
  color: var(--sp-text-on-accent);
  border: 1px solid rgba(255, 122, 0, 0.8);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 0 rgba(0, 0, 0, 0.28),
    0 2px 0 #a34400,
    0 8px 16px rgba(0, 0, 0, 0.5);
}
.sp-button--raised:hover { filter: brightness(1.06); }
.sp-button--raised:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 0 0 #a34400,
    0 3px 8px rgba(0, 0, 0, 0.45);
}

/* dimensional: raised charcoal — same physics, neutral surface */
.sp-button--raised-dark {
  background: linear-gradient(180deg, #3a3a40 0%, #232327 60%, #1a1a1e 100%);
  color: var(--sp-text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 2px 0 #000,
    0 8px 16px rgba(0, 0, 0, 0.5);
}
.sp-button--raised-dark:hover { border-color: var(--sp-border-accent-soft); }
.sp-button--raised-dark:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 0 #000,
    0 3px 8px rgba(0, 0, 0, 0.45);
}

/* fire I: flowing molten gradient sweep */
.sp-button--fire {
  background: linear-gradient(115deg, #f05000, #ff7a00, #ffae18, #ffd166, #ff7a00, #f05000);
  background-size: 320% 100%;
  color: var(--sp-text-on-accent);
  box-shadow: var(--sp-glow-orange);
  animation: sp-fire-flow 3.2s ease-in-out infinite;
}
.sp-button--fire:hover { box-shadow: var(--sp-glow-orange-strong); }
@keyframes sp-fire-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* fire II: inferno — flame tongues licking up from the base + heat flicker */
.sp-button--inferno {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 110% at 22% 115%, rgba(255, 209, 102, 0.95) 0%, rgba(255, 209, 102, 0) 55%),
    radial-gradient(130% 120% at 78% 118%, rgba(255, 140, 0, 0.95) 0%, rgba(255, 140, 0, 0) 62%),
    radial-gradient(100% 90% at 50% 120%, rgba(255, 230, 160, 0.85) 0%, rgba(255, 230, 160, 0) 48%),
    linear-gradient(180deg, #ff9d2b 0%, #f05000 100%);
  background-size: 180% 200%, 200% 220%, 160% 200%, 100% 100%;
  color: var(--sp-text-on-accent);
  box-shadow: var(--sp-glow-orange);
  animation: sp-inferno-lick 2.6s ease-in-out infinite, sp-inferno-flicker 1.3s ease-in-out infinite;
}
@keyframes sp-inferno-lick {
  0%, 100% { background-position: 10% 100%, 90% 100%, 50% 100%, 0 0; }
  33% { background-position: 30% 55%, 70% 75%, 45% 65%, 0 0; }
  66% { background-position: 5% 70%, 95% 45%, 60% 80%, 0 0; }
}
@keyframes sp-inferno-flicker {
  0%, 100% { filter: brightness(1); }
  27% { filter: brightness(1.09); }
  52% { filter: brightness(0.95); }
  74% { filter: brightness(1.06); }
}

/* loading state: spinner replaces label (JS toggles .is-loading + disabled) */
.sp-button.is-loading { position: relative; color: transparent; pointer-events: none; }
.sp-button.is-loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  color: var(--sp-text-on-accent);
  animation: sp-spin 0.7s linear infinite;
}
.sp-button--secondary.is-loading::after, .sp-button--ghost.is-loading::after { color: var(--sp-amber); }

@keyframes sp-spin { to { transform: rotate(360deg); } }

/* Wallet CTAs — OFFICIAL BRAND BADGES ONLY (public/assets/badges/).
   Never redraw, recolor, restyle, or add effects. The wrapper provides the
   brand-mandated clear space (Apple: >= 1/10 badge height on all sides). */
.sp-wallet-badge {
  display: inline-flex;
  padding: 6px;                       /* clear space at default 56px height */
  border-radius: var(--sp-radius-sm);
  transition: transform var(--sp-speed-fast) var(--sp-ease), filter var(--sp-speed-med) var(--sp-ease);
}
.sp-wallet-badge img { height: 56px; width: auto; display: block; }
.sp-wallet-badge--sm img { height: 44px; }   /* never render below ~40px height */
.sp-wallet-badge:hover { filter: brightness(1.08); }
.sp-wallet-badge:active { transform: scale(0.98); }
.sp-wallet-badge:focus-visible { box-shadow: var(--sp-focus-ring); }

/* wallet ICON form (official multicolor marks) — for step cards, status rows */
.sp-wallet-icon { display: inline-flex; }
.sp-wallet-icon img { height: 28px; width: auto; display: block; }
.sp-wallet-icon--lg img { height: 40px; }

/* ------------------------------------------------------ chips & badges */
.sp-point-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-1) var(--sp-space-3);
  border: 1px solid var(--sp-border-accent-soft);
  border-radius: var(--sp-radius-pill);
  color: var(--sp-amber);
  font-weight: var(--sp-fw-bold);
  font-size: var(--sp-fs-sm);
  white-space: nowrap;
}
.sp-point-badge small { font-weight: var(--sp-fw-medium); font-size: 0.75em; }

.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  padding: 2px var(--sp-space-3);
  border-radius: var(--sp-radius-pill);
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-semibold);
}
.sp-badge--success { background: var(--sp-success-dim); color: var(--sp-success); border: 1px solid rgba(72, 225, 95, 0.35); }
.sp-badge--danger { background: var(--sp-danger-dim); color: var(--sp-danger); border: 1px solid rgba(255, 77, 77, 0.35); }
.sp-badge--info { background: var(--sp-info-dim); color: var(--sp-info); border: 1px solid rgba(77, 163, 255, 0.35); }
.sp-badge--neutral { background: var(--sp-surface-raised); color: var(--sp-text-muted); border: 1px solid var(--sp-border); }

/* category chips row on landing (Survey / Game / Streaming / Banking) */
.sp-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  height: var(--sp-h-chip);
  padding: 0 var(--sp-space-4);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  color: var(--sp-text);
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-semibold);
}
.sp-cat-chip__icon { color: var(--sp-orange); }

/* icon tile: soft borderless square, tinted glyph (feature rows, history).
   The glyph carries the accent — no stroke, avoids nested-box pileup. */
.sp-icon-tile {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--sp-radius-sm);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.14), rgba(255, 122, 0, 0.05));
  color: var(--sp-orange);
}
.sp-icon-tile--sm { width: 40px; height: 40px; }

/* ----------------------------------------------------- feature list card */
.sp-feature-list { display: flex; flex-direction: column; }
.sp-feature-row {
  display: flex;
  align-items: center;
  gap: var(--sp-space-4);
  padding: var(--sp-space-4) 0;
}
.sp-feature-row + .sp-feature-row { border-top: 1px solid var(--sp-border-soft); }
.sp-feature-row__title { font-size: var(--sp-fs-h3); font-weight: var(--sp-fw-bold); }
.sp-feature-row__desc { color: var(--sp-text-muted); font-size: var(--sp-fs-sm); margin-top: 2px; }

/* -------------------------------------------------------- onboarding dots */
.sp-onboarding-dots { display: flex; justify-content: center; gap: var(--sp-space-2); }
.sp-onboarding-dots__dot {
  width: 28px; height: 6px;
  border-radius: var(--sp-radius-pill);
  background: var(--sp-surface-raised);
  transition: background var(--sp-speed-med) var(--sp-ease);
}
.sp-onboarding-dots__dot.is-active { background: var(--sp-amber); }

/* numbered step chips (1-2-3 signup lead-in, onboarding card footer) */
.sp-step-chip {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--sp-border);
  color: var(--sp-text-muted);
  font-weight: var(--sp-fw-bold);
}
.sp-step-chip.is-active {
  background: var(--sp-gradient-fire);
  border-color: transparent;
  color: var(--sp-text-on-accent);
  box-shadow: var(--sp-glow-orange);
}
.sp-step-chip.is-done { border-color: var(--sp-border-accent); color: var(--sp-amber); }

/* --------------------------------------------------------- OTP input row */
.sp-otp { display: flex; gap: var(--sp-space-2); justify-content: center; position: relative; }
/* ONE real input drives six display boxes: autofill/paste/typing all land in
   a single field, so digits always echo correctly. */
.sp-otp__input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; background: transparent; color: transparent;
  font-size: 16px; /* prevents iOS focus zoom */
  caret-color: transparent;
}
.sp-otp__digit {
  flex: 1 1 0; min-width: 0; max-width: 56px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: var(--sp-fs-h2);
  font-weight: var(--sp-fw-bold);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-md);
  color: var(--sp-text);
  transition: border-color var(--sp-speed-fast) var(--sp-ease), box-shadow var(--sp-speed-fast) var(--sp-ease);
}
.sp-otp__digit:focus-visible { border-color: var(--sp-border-accent); box-shadow: var(--sp-glow-orange); }
.sp-otp__digit.is-filled { border-color: var(--sp-border-accent-soft); }
.sp-otp.is-focused .sp-otp__digit.is-active { border-color: var(--sp-border-accent); box-shadow: var(--sp-glow-orange); }
.sp-otp.is-error .sp-otp__digit { border-color: var(--sp-danger); animation: sp-shake var(--sp-speed-slow) var(--sp-ease); }

@keyframes sp-shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ------------------------------------------------- progress thermometer */
.sp-thermometer { width: 100%; }
.sp-thermometer__meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-semibold);
  margin-bottom: var(--sp-space-3);
}
.sp-thermometer__meta-right { color: var(--sp-text-muted); font-weight: var(--sp-fw-regular); }
.sp-thermometer__track {
  position: relative;
  height: 10px;
  background: var(--sp-surface-raised);
  border-radius: var(--sp-radius-pill);
}
.sp-thermometer__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--sp-radius-pill);
  background: var(--sp-gradient-flame-track);
  box-shadow: var(--sp-glow-orange);
  transition: width var(--sp-speed-slow) var(--sp-ease-out);
}
.sp-thermometer__ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
.sp-thermometer__tick { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }

/* ------------------------------------------------------------ survey card */
.sp-survey-card { text-align: center; padding: var(--sp-space-8) var(--sp-space-5); }
.sp-survey-card__glyph {
  width: 64px; height: 64px;
  margin: 0 auto var(--sp-space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--sp-border-accent);
  border-radius: 50%;
  color: var(--sp-orange);
  font-size: 1.75rem;
  font-weight: var(--sp-fw-bold);
  box-shadow: var(--sp-glow-soft);
}
.sp-survey-card__prompt { font-size: var(--sp-fs-h2); font-weight: var(--sp-fw-extrabold); }
.sp-survey-card__helper { margin-top: var(--sp-space-3); color: var(--sp-text-muted); font-size: var(--sp-fs-sm); }

/* choice buttons (single/multi select) — radio look, selected = orange */
.sp-choice-group { display: flex; flex-direction: column; gap: var(--sp-space-3); margin-top: var(--sp-space-6); }
.sp-choice {
  display: flex;
  align-items: center;
  gap: var(--sp-space-4);
  width: 100%;
  min-height: var(--sp-h-button);
  padding: var(--sp-space-3) var(--sp-space-5);
  background: var(--sp-surface-strong);
  border: 1.5px solid var(--sp-border);
  border-radius: var(--sp-radius-md);
  color: var(--sp-text);
  font-size: var(--sp-fs-body);
  font-weight: var(--sp-fw-bold);
  text-align: left;
  transition: border-color var(--sp-speed-fast) var(--sp-ease), box-shadow var(--sp-speed-med) var(--sp-ease);
}
.sp-choice:hover { border-color: var(--sp-border-accent-soft); }
.sp-choice:focus-visible { box-shadow: var(--sp-focus-ring); }
.sp-choice:disabled { opacity: 0.45; cursor: not-allowed; }
.sp-choice__radio {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--sp-text-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--sp-speed-fast) var(--sp-ease);
}
.sp-choice[aria-checked="true"], .sp-choice.is-selected {
  border-color: var(--sp-border-accent);
  box-shadow: var(--sp-glow-orange);
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.10), rgba(255, 122, 0, 0.02)), var(--sp-surface-strong);
}
.sp-choice[aria-checked="true"] .sp-choice__radio, .sp-choice.is-selected .sp-choice__radio { border-color: var(--sp-orange); }
.sp-choice[aria-checked="true"] .sp-choice__radio::after, .sp-choice.is-selected .sp-choice__radio::after {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--sp-gradient-fire);
}
/* multi-select variant: square check */
.sp-choice--multi .sp-choice__radio { border-radius: 6px; }
.sp-choice--multi[aria-checked="true"] .sp-choice__radio::after { border-radius: 3px; }

/* ------------------------------------------------------------ offer card */
.sp-offer-card {
  position: relative;
  padding: 0; /* the flip faces carry the padding */
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-accent-soft);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-card), var(--sp-glow-soft);
  transition: border-color var(--sp-speed-fast) var(--sp-ease), box-shadow var(--sp-speed-med) var(--sp-ease);
  perspective: 1200px;
}
.sp-offer-card__inner {
  position: relative;
  transform-style: preserve-3d;
  /* grow-then-flip: height animates alongside the rotation */
  transition: transform 0.55s var(--sp-ease), height 0.35s var(--sp-ease);
}
.sp-offer-card.is-flipped .sp-offer-card__inner { transform: rotateY(180deg); }
.sp-offer-card__front,
.sp-offer-card__back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  padding: var(--sp-space-5);
}
.sp-offer-card__front {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-space-4);
  transform: rotateY(0deg); /* forces its own plane; Safari otherwise leaks children through the flip */
}
.sp-offer-card__back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-space-2);
  cursor: pointer; /* tap anywhere to flip back */
}
.sp-offer-card__back h4 { font-size: var(--sp-fs-body); font-weight: var(--sp-fw-bold); }
.sp-offer-card__fine { color: var(--sp-text-subtle); font-size: var(--sp-fs-caption); line-height: 1.5; }
/* tier table on the details face: hairline-divided rows, points only */
.sp-offer-card__tier {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-space-3);
  padding: var(--sp-space-2) 0;
  border-top: 1px solid var(--sp-border-soft);
  font-size: var(--sp-fs-caption);
}
.sp-offer-card__tier-name { color: var(--sp-text-muted); min-width: 0; overflow-wrap: anywhere; }
.sp-offer-card__tier-pts { color: var(--sp-amber); font-weight: var(--sp-fw-bold); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .sp-offer-card__inner { transition: none; }
}
.sp-offer-card:hover { border-color: var(--sp-border-accent); }
.sp-offer-card__icon {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: var(--sp-radius-md);
  object-fit: cover;
  background: var(--sp-surface-raised);
}
.sp-offer-card__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sp-offer-card__title { font-size: var(--sp-fs-h3); font-weight: var(--sp-fw-bold); }
.sp-offer-card__desc { color: var(--sp-text-muted); font-size: var(--sp-fs-sm); margin-top: 2px; }
/* points tab INTEGRATED into the card's top-right corner: shares the card's
   top/right walls, divided from the body by its own left/bottom hairlines.
   Not a floating pill, not a nested rounded box. */
.sp-offer-card__corner {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  padding: var(--sp-space-1) var(--sp-space-3);
  background: var(--sp-surface-raised);
  border: 0 solid var(--sp-border-accent-soft);
  border-left-width: 1px;
  border-bottom-width: 1px;
  border-radius: 0 var(--sp-radius-lg) 0 0; /* only the outer corner rounds, matching the card */
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-bold);
  color: var(--sp-amber);
  cursor: pointer;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.sp-offer-card.is-flipped .sp-offer-card__corner { visibility: hidden; }
/* first title line clears the corner tab; wraps use the full width below it */
.sp-offer-card__title { padding-right: 92px; }
.sp-offer-card__body .sp-button {
  margin-top: var(--sp-space-3);
  white-space: normal;
  text-align: center;
  height: auto;
  min-height: 36px;
}
.sp-offer-card.is-credited { border-color: rgba(72, 225, 95, 0.4); box-shadow: var(--sp-shadow-card), var(--sp-glow-success); }

/* offers count chip (top right of Today's Offers) */
.sp-count-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-2) var(--sp-space-4);
  border: 1px solid var(--sp-border-accent-soft);
  border-radius: var(--sp-radius-md);
  color: var(--sp-amber);
  font-weight: var(--sp-fw-bold);
  font-size: var(--sp-fs-sm);
}

/* ---------------------------------------------------------------- tabs */
.sp-tabs {
  display: flex;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-md) var(--sp-radius-md) 0 0;
  border-bottom: none;
  overflow-x: auto;
}
.sp-tabs__tab {
  flex: 1;
  position: relative;
  padding: var(--sp-space-4);
  color: var(--sp-text-muted);
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-semibold);
  white-space: nowrap;
  transition: color var(--sp-speed-fast) var(--sp-ease);
}
.sp-tabs__tab:hover { color: var(--sp-text); }
.sp-tabs__tab:focus-visible { box-shadow: inset var(--sp-focus-ring); border-radius: var(--sp-radius-sm); }
.sp-tabs__tab[aria-selected="true"] { color: var(--sp-text); }
.sp-tabs__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: var(--sp-space-4); right: var(--sp-space-4); bottom: 0;
  height: 3px;
  border-radius: var(--sp-radius-pill);
  background: var(--sp-gradient-flame-track);
  box-shadow: var(--sp-glow-orange);
}
.sp-tabs + .sp-history { border-radius: 0 0 var(--sp-radius-md) var(--sp-radius-md); }

/* -------------------------------------------- history list (compact table) */
.sp-history {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-md);
  overflow: hidden;
}
.sp-history__row {
  display: flex;
  align-items: center;
  gap: var(--sp-space-3);
  padding: var(--sp-space-4) var(--sp-space-5);
}
.sp-history__row + .sp-history__row { border-top: 1px solid var(--sp-border-soft); }
/* two-line rows: full-width title on top, meta strip underneath */
.sp-history__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-space-1); }
.sp-history__title { display: block; font-weight: var(--sp-fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-history__meta { display: flex; align-items: center; gap: var(--sp-space-3); }
.sp-history__date { color: var(--sp-text-muted); font-size: var(--sp-fs-caption); }
.sp-history__points { color: var(--sp-amber); font-weight: var(--sp-fw-bold); font-size: var(--sp-fs-sm); white-space: nowrap; }
.sp-history__points.is-debit { color: var(--sp-danger); }

/* --------------------------------------------------------- profile header */
.sp-profile-header { display: flex; gap: var(--sp-space-4); align-items: flex-start; }
.sp-profile-header__id { flex: 1; }
.sp-profile-header__name { font-size: clamp(1.25rem, 6.5vw, var(--sp-fs-h1)); font-weight: var(--sp-fw-extrabold); overflow-wrap: anywhere; min-width: 0; }
.sp-profile-header__meta { color: var(--sp-text-muted); font-size: var(--sp-fs-sm); }

/* big points balance */
.sp-balance { display: flex; align-items: baseline; gap: var(--sp-space-2); margin-top: var(--sp-space-3); }
.sp-balance__value { font-size: var(--sp-fs-stat); font-weight: var(--sp-fw-extrabold); letter-spacing: -0.03em; line-height: 1; }
.sp-balance__unit { color: var(--sp-amber); font-weight: var(--sp-fw-bold); font-size: var(--sp-fs-h3); }
.sp-balance__cash { color: var(--sp-text-muted); font-size: var(--sp-fs-sm); margin-top: var(--sp-space-2); }

/* stat row (87 Surveys / 9 Offers / 12 Day streak):
   NOT a box. A segmented band of the PARENT card: top hairline + shared
   internal walls dividing it in thirds. No border-radius, no fill, ever. */
.sp-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--sp-border-soft);
}
.sp-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-space-1);
  padding: var(--sp-space-4) var(--sp-space-2);
}
.sp-stat-cell + .sp-stat-cell { border-left: 1px solid var(--sp-border-soft); }
.sp-stat-cell__head {
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-semibold);
  color: var(--sp-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--sp-ls-wide);
}
.sp-stat-cell__value {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-1);
  font-size: var(--sp-fs-h3);
  font-weight: var(--sp-fw-extrabold);
  line-height: 1.1;
}
.sp-stat-cell__sub { color: var(--sp-text-subtle); font-size: var(--sp-fs-caption); }
.sp-stat-cell__icon { color: var(--sp-orange); display: inline-flex; }
.sp-stat-cell__label { color: var(--sp-text-muted); font-size: var(--sp-fs-caption); }

/* ------------------------------------------------------ streak calendar */
.sp-calendar { padding: var(--sp-space-5); }
.sp-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-space-4);
}
.sp-calendar__month { font-size: var(--sp-fs-h3); font-weight: var(--sp-fw-extrabold); }
.sp-calendar__nav {
  width: var(--sp-touch-target); height: var(--sp-touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--sp-border-accent-soft);
  color: var(--sp-amber);
  transition: border-color var(--sp-speed-fast) var(--sp-ease);
}
.sp-calendar__nav:hover:not(:disabled) { border-color: var(--sp-border-accent); }
.sp-calendar__nav:disabled { opacity: 0.35; cursor: not-allowed; }
/* Calendar grid: ONE rounded container; cells share 90° internal walls
   (border-collapse look). No per-cell rounding — outer radius only. */
.sp-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  background: var(--sp-surface-strong);
}
/* internal walls only: top wall from row 2 on, left wall from column 2 on */
.sp-calendar__grid > *:nth-child(n+8) { border-top: 1px solid var(--sp-border-soft); }
.sp-calendar__grid > *:not(:nth-child(7n+1)) { border-left: 1px solid var(--sp-border-soft); }

.sp-calendar__weekday {
  text-align: center;
  font-size: var(--sp-fs-micro);
  font-weight: var(--sp-fw-semibold);
  letter-spacing: var(--sp-ls-wide);
  color: var(--sp-text-subtle);
  padding: var(--sp-space-2) 0;
  background: rgba(255, 255, 255, 0.02);
}
.sp-calendar-day {
  aspect-ratio: 1 / 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-semibold);
  color: var(--sp-text-muted);
}
.sp-calendar-day--empty { background: rgba(0, 0, 0, 0.25); }
.sp-calendar-day__flame { display: inline-flex; line-height: 1; }
.sp-calendar-day__flame svg { width: 16px; height: 16px; }
.sp-calendar-day.has-flame { color: var(--sp-text); }
.sp-calendar-day.is-today {
  color: var(--sp-amber);
  background: rgba(255, 122, 0, 0.08);
  box-shadow: inset 0 0 0 1.5px var(--sp-border-accent);
}
.sp-calendar-day.is-future { opacity: 0.4; }
/* pending day slot (dashed circle placeholder) */
.sp-calendar-day--pending .sp-calendar-day__flame {
  width: 18px; height: 18px;
  border: 1.5px dashed var(--sp-text-subtle);
  border-radius: 50%;
}

/* weekly streak strip (landing): labels row above ONE shared-wall row */
.sp-week-strip { padding: var(--sp-space-5); }
.sp-week-strip__labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: var(--sp-space-2);
}
.sp-week-strip__label {
  text-align: center;
  font-size: var(--sp-fs-micro);
  font-weight: var(--sp-fw-semibold);
  letter-spacing: var(--sp-ls-wide);
  color: var(--sp-text-subtle);
}
.sp-week-strip__label.is-today { color: var(--sp-amber); }
.sp-week-strip__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  background: var(--sp-surface-strong);
}
.sp-week-strip__grid > *:not(:first-child) { border-left: 1px solid var(--sp-border-soft); }
.sp-week-strip__grid .sp-calendar-day { aspect-ratio: 1; }

/* multiplier scale: ONE rounded container divided into quadrants */
.sp-multiplier-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  background: var(--sp-surface);
}
.sp-multiplier {
  text-align: center;
  padding: var(--sp-space-4) var(--sp-space-2);
}
.sp-multiplier + .sp-multiplier { border-left: 1px solid var(--sp-border-soft); }
.sp-multiplier__value { font-size: var(--sp-fs-h3); font-weight: var(--sp-fw-extrabold); }
.sp-multiplier__label { color: var(--sp-text-subtle); font-size: var(--sp-fs-caption); margin-top: 2px; }
.sp-multiplier:nth-child(2) .sp-multiplier__value { color: var(--sp-orange); }
.sp-multiplier:nth-child(3) .sp-multiplier__value { color: var(--sp-amber); }
.sp-multiplier:nth-child(4) .sp-multiplier__value { color: var(--sp-gold); }

/* -------------------------------------------------- cashout progress */
.sp-cashout-progress__bar {
  position: relative;
  height: 14px;
  background: var(--sp-surface-raised);
  border-radius: var(--sp-radius-pill);
  overflow: hidden;
}
.sp-cashout-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--sp-gradient-flame-track);
  border-radius: var(--sp-radius-pill);
}
.sp-cashout-progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-space-2);
  font-size: var(--sp-fs-caption);
  color: var(--sp-text-muted);
}

/* --------------------------------------------- modal / bottom sheet */
.sp-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--sp-z-sheet-backdrop);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sp-speed-med) var(--sp-ease);
}
.sp-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--sp-z-sheet);
  max-width: var(--sp-page-max);
  margin: 0 auto;
  background: var(--sp-bg-soft);
  border: 1px solid var(--sp-border);
  border-bottom: none;
  border-radius: var(--sp-radius-xl) var(--sp-radius-xl) 0 0;
  box-shadow: var(--sp-shadow-sheet);
  padding: var(--sp-space-3) var(--sp-space-5) calc(var(--sp-space-6) + env(safe-area-inset-bottom));
  transform: translateY(105%);
  transition: transform var(--sp-speed-med) var(--sp-ease-out);
}
.sp-sheet__handle {
  width: 44px; height: 5px;
  margin: 0 auto var(--sp-space-4);
  border-radius: var(--sp-radius-pill);
  background: var(--sp-surface-raised);
}
.sp-sheet.is-open { transform: translateY(0); }
.sp-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
/* desktop: sheet becomes centered modal */
@media (min-width: 768px) {
  .sp-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(480px, calc(100vw - 48px));
    border-radius: var(--sp-radius-lg);
    border-bottom: 1px solid var(--sp-border);
    transform: translate(-50%, -46%) scale(0.97);
    opacity: 0;
    pointer-events: none;
  }
  .sp-sheet.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
  .sp-sheet__handle { display: none; }
}

/* ------------------------------------------- celebration modal (Lottie)
   DB-driven "You're on a roll" alert modals (alert_triggers + lottie tables).
   JS loads animation JSON via vendored lottie.min.js into .sp-celebrate__anim. */
.sp-celebrate {
  position: fixed;
  left: 50%; top: 50%;
  z-index: var(--sp-z-sheet);
  width: min(400px, calc(100vw - 40px));
  background: var(--sp-bg-soft);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-card), var(--sp-glow-soft);
  padding: var(--sp-space-8) var(--sp-space-6) var(--sp-space-6);
  text-align: center;
  transform: translate(-50%, -42%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--sp-speed-med) var(--sp-ease-spring), opacity var(--sp-speed-med) var(--sp-ease);
}
.sp-celebrate.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.sp-celebrate__anim { width: 160px; height: 160px; margin: 0 auto var(--sp-space-4); }
.sp-celebrate__anim--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sp-celebrate-pulse 1.6s var(--sp-ease) infinite;
}
@keyframes sp-celebrate-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.sp-celebrate__headline { font-size: var(--sp-fs-h2); font-weight: var(--sp-fw-extrabold); }
.sp-celebrate__body { color: var(--sp-text-muted); font-size: var(--sp-fs-sm); margin-top: var(--sp-space-2); }
.sp-celebrate__cta { margin-top: var(--sp-space-5); }

/* -------------------- week progress track (dots under landing strip) */
.sp-week-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: var(--sp-space-4);
  height: 16px;
}
.sp-week-progress::before {
  content: "";
  position: absolute;
  left: 7%; right: 7%;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: var(--sp-radius-pill);
  background: var(--sp-surface-raised);
}
.sp-week-progress__fill {
  position: absolute;
  left: 7%;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: var(--sp-radius-pill);
  background: var(--sp-gradient-flame-track);
  box-shadow: var(--sp-glow-orange);
}
.sp-week-progress__dot {
  position: relative;
  z-index: 1;
  justify-self: center;
  align-self: center;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--sp-gradient-fire);
}
.sp-week-progress__dot.is-pending {
  background: var(--sp-bg-soft);
  border: 2px solid var(--sp-text-subtle);
}

/* ----------------------------------------------- site footer (lock) */
.sp-site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-space-2);
  /* generous bottom clearance: iOS Safari steals taps in the toolbar zone */
  padding: var(--sp-space-5) 0 calc(var(--sp-space-7, 40px) + env(safe-area-inset-bottom));
  color: var(--sp-text-subtle);
  font-size: var(--sp-fs-caption);
}
/* real tap targets for the legal links */
.sp-site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-space-2);
}

/* small numbered page dots (onboarding card pagination) */
.sp-step-chip--sm { width: 36px; height: 36px; font-size: var(--sp-fs-sm); }

/* -------------------------------------------- status bar (phone mock) */
.sp-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-space-3) var(--sp-space-5);
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-semibold);
  color: var(--sp-text);
}
.sp-status-bar__icons { display: inline-flex; align-items: center; gap: var(--sp-space-2); }

/* ---------------------------------- signup step cards (1-2-3 lead-in) */
.sp-step-cards { display: flex; align-items: stretch; gap: 0; }
.sp-step-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-space-2);
  padding: var(--sp-space-4) var(--sp-space-2) var(--sp-space-4);
  position: relative;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-md);
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-medium);
  color: var(--sp-text);
}
.sp-step-card.is-active {
  border-color: var(--sp-border-accent);
  box-shadow: var(--sp-glow-soft);
}
.sp-step-card__num {
  position: absolute;
  top: var(--sp-space-2); left: var(--sp-space-2);
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--sp-border-accent);
  color: var(--sp-amber);
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-bold);
}
.sp-step-card__icon { color: var(--sp-orange); margin-top: var(--sp-space-3); }
/* dot-dash-dot connector between step cards */
.sp-step-connector {
  flex: 0 0 26px;
  align-self: center;
  display: flex;
  align-items: center;
  padding: 0 3px;
}
.sp-step-connector::before {
  content: "";
  flex: 1;
  border-top: 2px dashed rgba(255, 122, 0, 0.55);
}
.sp-step-connector::after { content: none; }

/* ------------------------------------- feature chips (signup footer) */
.sp-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-2);
  height: 40px;
  padding: 0 var(--sp-space-4);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-sm);
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-semibold);
  color: var(--sp-text);
}
.sp-feature-chip__icon { display: inline-flex; color: var(--sp-orange); }

/* -------------------------------------------------- flame emblem ring */
.sp-flame-emblem {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--sp-border-accent);
  box-shadow: var(--sp-glow-soft);
}

/* ------------------------------------------ promo banner (offers drop) */
.sp-promo-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-space-4);
  padding: var(--sp-space-4) var(--sp-space-5);
  background: var(--sp-surface);
  border-radius: var(--sp-radius-lg);
}
.sp-promo-banner__text { flex: 1; font-size: var(--sp-fs-sm); color: var(--sp-text-muted); }
.sp-promo-banner__text strong { color: var(--sp-text); font-size: var(--sp-fs-body); }
.sp-promo-banner__ghosts {
  display: inline-flex;
  gap: var(--sp-space-3);
  color: var(--sp-text-subtle);
  opacity: 0.6;
}
@media (max-width: 420px) { .sp-promo-banner__ghosts { display: none; } }

/* ------------------------------------ theme list (This week's themes) */
.sp-theme-list { padding: var(--sp-space-5); }
.sp-theme-list__header {
  display: flex;
  align-items: center;
  gap: var(--sp-space-3);
  font-size: var(--sp-fs-h3);
  font-weight: var(--sp-fw-bold);
  margin-bottom: var(--sp-space-3);
}
.sp-theme-list__header-icon { color: var(--sp-orange); display: inline-flex; }
.sp-theme-row {
  display: flex;
  align-items: center;
  gap: var(--sp-space-4);
  padding: var(--sp-space-3) 0;
}
.sp-theme-row + .sp-theme-row { border-top: 1px solid var(--sp-border-soft); }
.sp-theme-row__day {
  flex: 0 0 52px;
  text-align: center;
  padding: var(--sp-space-1) 0;
  border-radius: var(--sp-radius-xs);
  background: var(--sp-surface-raised);
  color: var(--sp-amber);
  font-size: var(--sp-fs-micro);
  font-weight: var(--sp-fw-bold);
  letter-spacing: var(--sp-ls-wide);
  text-transform: uppercase;
}
.sp-theme-row__icon { display: inline-flex; color: var(--sp-orange); }
.sp-theme-row__label { font-weight: var(--sp-fw-semibold); }
.sp-theme-row.is-today .sp-theme-row__day { background: var(--sp-gradient-fire); color: var(--sp-text-on-accent); }

/* --------------------- mini stat strip (onboarding footer, divided 3-up) */
.sp-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius-md);
  overflow: hidden;
}
.sp-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-space-1);
  padding: var(--sp-space-4) var(--sp-space-2);
}
.sp-mini-stat + .sp-mini-stat { border-left: 1px solid var(--sp-border-soft); }
.sp-mini-stat__icon { color: var(--sp-orange); display: inline-flex; margin-bottom: var(--sp-space-1); }
.sp-mini-stat__title { font-size: var(--sp-fs-sm); font-weight: var(--sp-fw-bold); }
.sp-mini-stat__sub { font-size: var(--sp-fs-caption); color: var(--sp-text-muted); }

/* --------------------------------------------------------- info notice */
.sp-notice {
  display: flex;
  gap: var(--sp-space-3);
  align-items: flex-start;
  padding: var(--sp-space-4);
  border-radius: var(--sp-radius-md);
  font-size: var(--sp-fs-sm);
  color: var(--sp-text-muted);
}
.sp-notice__icon { flex: 0 0 auto; color: var(--sp-orange); }
.sp-notice--success { background: var(--sp-success-dim); color: var(--sp-success); }
.sp-notice--success .sp-notice__icon { color: var(--sp-success); }
.sp-notice--error { background: var(--sp-danger-dim); color: var(--sp-danger); }
.sp-notice--error .sp-notice__icon { color: var(--sp-danger); }

.sp-card--compact { padding: var(--sp-space-4); }

/* ------------------------------------------------- points FX (odometer + combat text) */
.sp-float-host { position: relative; }
.sp-float-text {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, 0);
  font-weight: var(--sp-fw-bold);
  font-size: var(--sp-fs-lg);
  color: var(--sp-gold);
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.45);
  pointer-events: none;
  white-space: nowrap;
  animation: sp-float-up 1.6s var(--sp-ease) forwards;
}
@keyframes sp-float-up {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.9); }
  15%  { opacity: 1; transform: translate(-50%, -2px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-float-text { animation: none; opacity: 0; }
}

/* ------------------------------------------------- legal pages (/terms, /privacy) */
.sp-legal { max-width: 72ch; margin: 0 auto; }
.sp-legal__eyebrow {
  display: inline-block;
  padding: var(--sp-space-1) var(--sp-space-3);
  border-radius: var(--sp-radius-pill);
  background: var(--sp-surface-raised);
  color: var(--sp-amber);
  font-size: var(--sp-fs-caption);
  font-weight: var(--sp-fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sp-legal__effective { color: var(--sp-text-muted); font-size: var(--sp-fs-sm); }
.sp-legal__toc { display: grid; gap: var(--sp-space-1); }
.sp-legal__toc a {
  color: var(--sp-text-muted);
  text-decoration: none;
  font-size: var(--sp-fs-sm);
  padding: var(--sp-space-1) var(--sp-space-2);
  border-radius: var(--sp-radius-sm);
}
.sp-legal__toc a:hover, .sp-legal__toc a:focus-visible { color: var(--sp-text); background: var(--sp-surface-raised); }
.sp-legal__section + .sp-legal__section {
  margin-top: var(--sp-space-6);
  padding-top: var(--sp-space-5);
  border-top: 1px solid var(--sp-border-soft);
}
.sp-legal__section h2 { font-size: var(--sp-fs-h3); margin: 0 0 var(--sp-space-3); }
.sp-legal__section p, .sp-legal__section li {
  color: var(--sp-text-muted);
  font-size: var(--sp-fs-sm);
  line-height: 1.65;
}
.sp-legal__section p { margin: 0 0 var(--sp-space-3); }
.sp-legal__section ul { margin: 0 0 var(--sp-space-3) var(--sp-space-5); padding: 0; }
.sp-legal__section li + li { margin-top: var(--sp-space-1); }
.sp-legal__caps { text-transform: uppercase; letter-spacing: 0.01em; }

/* compact step cards (root signup surface) */
.sp-step-cards--compact .sp-step-card { padding: var(--sp-space-3) var(--sp-space-2); font-size: var(--sp-fs-caption); }
.sp-step-cards--compact .sp-step-card__num { width: 22px; height: 22px; }
.sp-step-cards--compact .sp-step-card__icon { margin-top: var(--sp-space-2); }

/* one tiny line replacing the whole survey zone once today's survey is done */
.sp-done-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-space-3);
  font-size: var(--sp-fs-sm);
  font-weight: var(--sp-fw-semibold);
  color: var(--sp-text-muted);
}
.sp-done-line__label { display: inline-flex; align-items: center; gap: var(--sp-space-2); }
.sp-done-line__earned {
  color: var(--sp-gold);
  font-weight: var(--sp-fw-bold);
  opacity: 0;
}
.sp-done-line__earned.is-in { animation: sp-earned-in 0.9s var(--sp-ease) forwards; }
@keyframes sp-earned-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-done-line__earned { opacity: 1; }
  .sp-done-line__earned.is-in { animation: none; }
}

/* flip-back affordance on the details face (whole face is tappable; this is the cue) */
.sp-offer-card__flipback {
  position: absolute;
  top: var(--sp-space-4);
  right: var(--sp-space-4);
  display: inline-flex;
  color: var(--sp-text-subtle);
}
