/* =========================================================
   Designer Lead Feed — matches Leads.html design
   ========================================================= */

/* ---- Tokens ---- */
:root {
  --color-paper:        #f6f4ed;
  --color-paper-soft:   #fbfaf6;
  --color-card:         #fdfcf8;
  --color-ink:          #171a17;
  --color-ink-hover:    #2b2e28;
  --color-muted:        #77766f;
  --color-stone:        #85847c;
  --color-line:         #dfdbd1;
  --color-line-faint:   #efece3;
  --color-forest:       #1b2222;
  --color-sage:         #e9f2eb;
  --color-sage-ink:     #47766e;
  --color-warning-bg:   #f3ecda;
  --color-warning-line: #e7dcc0;
  --color-warning:      #8a6d2f;
  --color-header-glass: rgba(246,244,237,0.92);
  --font-sans:  Inter, ui-sans-serif, system-ui, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --radius-field: 0.625rem;
  --pill-radius:  999px;
  --shadow-toast: 0 14px 40px rgba(27,34,34,0.32);
  --dur-fast: 0.15s;
  --dur-base: 0.32s;
  --ease-out: cubic-bezier(0.22,1,0.36,1);
  --container-gap: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
input  { font-family: inherit; }

/* ---- Layout ---- */
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--container-gap); }

/* ---- Header ---- */
.ib-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-header-glass);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(23,26,23,0.08);
}
.ib-head-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 64px;
}
.ib-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  min-width: 0;
  text-decoration: none;
}
.ib-mark {
  height: 38px; width: auto; display: block; flex-shrink: 0;
}
.ib-word {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-brand);
  white-space: nowrap;
}
.ib-forpill {
  font-size: 0.625rem; font-weight: 750; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-sage-ink);
  background: var(--color-sage); padding: 0.25rem 0.5rem;
  border-radius: var(--pill-radius); white-space: nowrap;
}
/* Wallet balance chip */
.ib-wallet {
  display: inline-flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
  height: 40px; padding: 0 0.875rem;
  border-radius: var(--radius-field);
  border: 1px solid var(--color-line); background: var(--color-sage);
  color: var(--color-sage-ink); cursor: pointer; font: inherit;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.ib-wallet:hover { border-color: var(--color-sage-ink); box-shadow: 0 1px 4px rgba(71,118,110,0.2); }
.ib-wallet:focus-visible { outline: 2px solid var(--color-sage-ink); outline-offset: 2px; }
.ib-wallet__icon { flex: none; }
.ib-wallet__meta { display: inline-flex; flex-direction: column; line-height: 1.1; }
.ib-wallet__label {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--color-sage-ink); opacity: 0.75;
}
.ib-wallet__amount { font-size: 0.9375rem; font-weight: 800; color: var(--color-ink); }
@media (max-width: 560px) {
  .ib-wallet__meta { display: none; }
  .ib-wallet { padding: 0; width: 40px; justify-content: center; }
}

.ib-icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-field); flex-shrink: 0;
  border: 1px solid var(--color-line); background: var(--color-card);
  display: grid; place-items: center; cursor: pointer; color: var(--color-muted);
  font-size: 1.1rem; transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.ib-icon-btn:hover { border-color: var(--color-ink); color: var(--color-ink); }
.badge-dot {
  position: absolute; transform: translate(9px,-9px);
  width: 7px; height: 7px; border-radius: 50%;
  background: #9c4a3c; border: 1.5px solid var(--color-paper);
}
.ib-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-sage-ink); color: var(--color-paper);
  display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; cursor: pointer;
  border: 0; font-family: inherit;
  transition: box-shadow var(--dur-fast) ease;
}
.ib-avatar:hover { box-shadow: 0 0 0 3px var(--color-sage); }
.ib-avatar:focus-visible { outline: 2px solid var(--color-sage-ink); outline-offset: 2px; }

/* Profile dropdown */
.ib-profile { position: relative; flex-shrink: 0; }
.ib-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 248px; padding: 6px;
  background: var(--color-card); border: 1px solid var(--color-line);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(23, 26, 23, 0.16);
}
.ib-menu[hidden] { display: none; }
.ib-menu__head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--color-line-faint); margin-bottom: 6px; }
.ib-menu__avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--color-sage-ink); color: var(--color-paper); display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; }
.ib-menu__meta { display: flex; flex-direction: column; min-width: 0; }
.ib-menu__name { font-weight: 700; font-size: 0.875rem; color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-menu__email { font-size: 0.75rem; color: var(--color-stone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px; border: 0; background: transparent;
  font: 600 0.875rem var(--font-sans); color: var(--color-ink);
  text-align: left; text-decoration: none; cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.ib-menu__item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--color-stone); }
.ib-menu__item:hover { background: var(--color-paper); }
.ib-menu__item--danger { color: #9c4a3c; }
.ib-menu__item--danger svg { color: #9c4a3c; }
.ib-menu__item--danger:hover { background: #f7ebe8; }
.ib-menu__div { height: 1px; background: var(--color-line-faint); margin: 6px 4px; }
.ib-menu__logout { margin: 0; }

/* ---- Approval notice ---- */
.approval-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin: 1.25rem 0 0;
  padding: 1rem 1.125rem;
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-line);
  border-radius: 0.75rem;
  color: var(--color-warning);
}
.approval-notice__icon { flex-shrink: 0; margin-top: 0.1rem; }
.approval-notice__title { display: block; font-weight: 700; font-size: 0.9375rem; color: #5a4010; margin-bottom: 0.2rem; }
.approval-notice__body { margin: 0; font-size: 0.84375rem; color: #7a5f24; }

/* ---- Page head ---- */
.page-head { padding: 1.75rem 0 0.25rem; }
.eyebrow {
  font-size: 0.6875rem; font-weight: 750; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-sage-ink);
}
.page-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 1.875rem; margin: 0.25rem 0 0; line-height: 1.2;
  color: var(--color-ink);
}
.page-sub {
  color: var(--color-muted); font-size: 0.875rem;
  margin: 0.375rem 0 0; max-width: 40rem;
}

/* ---- Stat cards ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 0.875rem;
  padding: 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.stat-card--accent { border-color: var(--color-ink); }
.stat-card__label {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-stone);
}
.stat-card__value {
  font-family: var(--font-serif); font-size: 2.375rem; line-height: 1; color: var(--color-ink);
}
.stat-card__hint { font-size: 0.78125rem; color: var(--color-muted); }

/* ---- Controls ---- */
/* ---- Filter bar (segmented, white card) ---- */
.lead-filter { margin-top: 1.5rem; }

/* Category radio (Residential / Commercial) — grouped segmented control */
.lead-filter__kind {
  display: inline-flex; align-self: flex-start; gap: 0.25rem;
  padding: 0.25rem;
  background: var(--color-track);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  position: relative; flex: none;
}
.lead-filter__radio {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: 0.4375rem 1rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 700; color: var(--color-muted);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.lead-filter__radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.lead-filter__radio.is-selected { background: var(--color-ink); color: var(--color-paper); }
.lead-filter__radio:not(.is-selected):hover { color: var(--color-ink); }
.lead-filter__radio input:focus-visible + span {
  outline: 2px solid var(--color-sage-ink); outline-offset: 4px; border-radius: 4px;
}
/* Card container — stacks the radio row above the fields row */
.lead-filter__bar {
  display: flex; flex-direction: column; gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23,26,23,0.04);
}
/* Fields row (city / type / area / budget / actions) */
.lead-filter__row {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--color-line); padding-top: 0.625rem;
}
.lead-filter__field {
  display: flex; flex-direction: column; justify-content: center;
  gap: 2px; padding: 0.375rem 1rem; min-width: 0; flex: 1 1 160px;
  position: relative;
}
/* Hidden swap field (e.g. Property Type when Commercial) is removed entirely,
   not just disabled — otherwise display:flex overrides the [hidden] attribute. */
.lead-filter__field[hidden] { display: none; }
/* Vertical divider between fields */
.lead-filter__field + .lead-filter__field::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 60%; background: var(--color-line);
}
.lead-filter__label {
  font-size: 0.75rem; font-weight: 600; color: var(--color-stone);
  margin: 0; letter-spacing: 0.01em;
}
.lead-filter__control {
  border: 0; outline: 0; background-color: transparent;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--color-ink);
  width: 100%; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23767a72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5rem center;
  padding: 0.375rem 1.75rem 0.375rem 0.625rem;
  border-radius: 8px;
  margin-left: -0.625rem;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
/* Focus + active selection: fill instead of a border/outline */
.lead-filter__control:focus-visible { outline: 0; background-color: var(--color-sage); }
.lead-filter__control.is-active {
  background-color: var(--color-ink); color: var(--color-paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23f6f4ed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.lead-filter__control.is-active:focus-visible { background-color: var(--color-ink); }

.lead-filter__actions {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.25rem 0.375rem 0.25rem 1rem; margin-left: auto;
}
.lead-filter__actions::before {
  content: ""; align-self: center; width: 1px; height: 60%;
  background: var(--color-line); margin-right: 0.75rem;
}
.lead-filter__reset {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 650; color: var(--color-ink);
  text-decoration: none; white-space: nowrap;
  background: transparent; border: 0; cursor: pointer;
}
.lead-filter__reset:hover { color: var(--color-sage-ink); }
.lead-filter__submit {
  font-size: 0.9375rem; font-weight: 750; color: var(--color-paper);
  background: var(--color-ink); border: 0; cursor: pointer;
  padding: 0.6875rem 1.5rem; border-radius: 12px; font-family: inherit;
  transition: background var(--dur-fast) ease;
}
.lead-filter__submit:hover { background: var(--color-ink-hover, #2b2e28); }

@media (max-width: 720px) {
  .lead-filter__row { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .lead-filter__kind { align-self: stretch; justify-content: center; }
  .lead-filter__field { flex: 1 1 auto; padding: 0.625rem 0.75rem; }
  .lead-filter__field + .lead-filter__field::before {
    left: 0.75rem; right: 0.75rem; top: 0; width: auto; height: 1px; transform: none;
  }
  .lead-filter__actions { margin-left: 0; padding: 0.5rem 0.75rem; justify-content: space-between; }
  .lead-filter__actions::before { display: none; }
  .lead-filter__submit { flex: 1; }
}

/* ---- Feed meta ---- */
.feed-meta {
  margin-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.live {
  display: flex; align-items: center; gap: 0.4375rem;
  font-size: 0.8125rem; font-weight: 700; color: var(--color-sage-ink);
}
.live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-sage-ink); display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:0.35; } }
.sort { font-size: 0.8125rem; color: var(--color-stone); }

/* ---- Feed grid ---- */
.feed {
  margin-top: 1rem;
  padding-bottom: 6rem;
  display: grid;
  gap: 0.875rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 720px) {
  .feed { grid-template-columns: 1fr; }
}
.empty { text-align: center; padding: 3rem 1rem; color: var(--color-stone); }
.empty strong { display: block; color: var(--color-muted); font-size: 1rem; margin-bottom: 0.25rem; }

/* Illustrated, animated empty state for the lead tabs */
.tab-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 2.75rem 1rem 3.25rem; color: var(--color-stone);
}
.tab-empty[hidden] { display: none; }
.tab-empty__art { width: 200px; max-width: 60vw; margin: 0 0 1.1rem; }
.tab-empty__art svg { width: 100%; height: auto; overflow: visible; }
.tab-empty__title { font: 400 1.15rem/1.2 var(--font-serif); color: var(--color-ink); margin-bottom: 0.35rem; }
.tab-empty__text { margin: 0; font: 500 0.9rem var(--font-sans); color: var(--color-stone); max-width: 24rem; }

/* Entrance: fade/slide the whole block in each time it appears */
.tab-empty:not([hidden]) { animation: te-in 0.5s var(--ease-out) both; }
.tab-empty:not([hidden]) .tab-empty__title { animation: te-rise 0.5s var(--ease-out) 0.06s both; }
.tab-empty:not([hidden]) .tab-empty__text  { animation: te-rise 0.5s var(--ease-out) 0.12s both; }

@keyframes te-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes te-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* magnifier drifts over the plan, hunting for a match */
  .tab-empty:not([hidden]) .te-lens { animation: te-hunt 4.5s ease-in-out infinite; transform-origin: center; }
  .tab-empty:not([hidden]) .te-sheet { animation: te-float 5s ease-in-out infinite; transform-origin: center; }
  /* plan lines draw themselves in */
  .tab-empty:not([hidden]) .te-wall {
    stroke-dasharray: 240; stroke-dashoffset: 240;
    animation: te-draw 1.1s var(--ease-out) 0.2s forwards;
  }
  .tab-empty:not([hidden]) .te-wall--2 { animation-delay: 0.5s; }
  /* room markers pulse */
  .tab-empty:not([hidden]) .te-dot { animation: te-pulse 2.4s ease-in-out infinite; transform-origin: center; }
  .tab-empty:not([hidden]) .te-dot--2 { animation-delay: 1.2s; }
}

@keyframes te-hunt {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-46px, -34px) rotate(-6deg); }
  55% { transform: translate(-18px, -6px) rotate(3deg); }
  80% { transform: translate(6px, 4px) rotate(-2deg); }
}
@keyframes te-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes te-draw { to { stroke-dashoffset: 0; } }
@keyframes te-pulse { 0%, 100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(1.5); opacity: 1; } }

/* ---- Lead card — matches landing page exactly ---- */
.lead-card {
  background: var(--color-paper-soft, #fbfaf6);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.lead-card:hover {
  border-color: #c9c5bb;
  box-shadow: 0 4px 16px rgba(23,26,23,0.07);
}

.lead-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.lead-card__title-wrap { min-width: 0; }
.lead-card__title { font-weight: 700; font-size: 16px; color: var(--color-ink); }
.lead-card__meta { font-size: 12.5px; color: var(--color-stone); margin-top: 2px; }

/* Match badges */
.match-badge {
  font-size: 11px; font-weight: 750;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
}
.match-badge--strong { color: #47766e; background: #e9f2eb; }
.match-badge--good   { color: #85847c; background: #fdfcf8; border: 1px solid #dfdbd1; }
.match-badge--new    { color: #6f7068; background: #fdfcf8; border: 1px solid #dfdbd1; }

/* Sage chips */
.lead-card__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sage-chip {
  padding: 5px 10px; color: #47766e; background: #e9f2eb;
  border-radius: 999px; font-size: 11px; font-weight: 750;
}

/* Scope */
.lead-card__scope { font-size: 13.5px; color: #77766f; margin: 0; line-height: 1.5; }

/* Footer */
.lead-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lead-card__price { font-size: 12.5px; color: #77766f; white-space: nowrap; }
.lead-card__price strong { color: var(--color-ink); font-size: 15px; }

/* Reveal button */
.reveal-btn {
  font-size: 13.5px; font-weight: 750; color: #f6f4ed;
  background: #171a17; padding: 10px 15px;
  border-radius: 999px; white-space: nowrap;
  border: none; cursor: pointer; font-family: inherit;
  transition: background var(--dur-fast) ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.reveal-btn:hover { background: #2b2e28; }

/* Locked state */
.reveal-btn--locked {
  background: #e4e0d6; color: #9b9a92; cursor: not-allowed;
}
.reveal-btn--locked:hover { background: #e4e0d6; }

/* Separate, clickable info icon beside the locked call button (pill group) */
.project-card__call-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border: none; background: transparent;
  color: #8a6d2f; cursor: pointer;
  border-radius: 999px;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.project-card__call-info svg { width: 16px; height: 16px; display: block; }
.project-card__call-info:hover { background: rgba(138,109,47,0.14); color: #6f571f; }
.project-card__call-info:focus-visible { outline: 2px solid #8a6d2f; outline-offset: 2px; }

/* ---- Reveal modal ---- */
.reveal-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; }
.reveal-modal[hidden] { display: none; }
.reveal-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(23,26,23,0.55); backdrop-filter: blur(4px);
}
.reveal-modal__panel {
  position: relative; z-index: 1;
  background: var(--color-card); border-radius: 1.125rem;
  padding: 2rem; width: 100%; max-width: 400px; margin: 1rem;
  box-shadow: 0 20px 60px rgba(23,26,23,0.25);
}
.reveal-modal__close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.375rem; line-height: 1;
  color: var(--color-stone); cursor: pointer; padding: 0.25rem 0.5rem;
}
.reveal-modal__close:hover { color: var(--color-ink); }
.reveal-modal__head { text-align: center; margin-bottom: 1.5rem; }
.reveal-modal__tick {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-sage-ink); color: #fff;
  font-size: 1.25rem; margin-bottom: 0.75rem;
}
.reveal-modal__title { font-size: 1.25rem; font-weight: 700; color: var(--color-ink); margin: 0 0 0.25rem; }
.reveal-modal__sub   { font-size: 0.84375rem; color: var(--color-stone); margin: 0; }
.reveal-modal__details {
  display: grid; grid-template-columns: auto 1fr; gap: 0.625rem 1rem; margin: 0 0 1.5rem;
  padding: 1rem; background: var(--color-paper); border-radius: var(--radius-field);
}
.reveal-modal__details dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-stone); }
.reveal-modal__details dd { margin: 0; font-size: 0.9375rem; color: var(--color-ink); font-weight: 600; }
.reveal-modal__done {
  width: 100%; padding: 0.75rem; background: var(--color-ink); color: #f6f4ed;
  border: none; border-radius: var(--pill-radius); font-size: 0.9375rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background var(--dur-fast);
}
.reveal-modal__done:hover { background: var(--color-ink-hover, #2b2e28); }

/* ---- Reveal toast ---- */
.reveal-toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  background: var(--color-forest); color: rgba(246,244,237,0.92);
  padding: 0.75rem 1.125rem; border-radius: var(--pill-radius);
  font-size: 0.875rem; font-weight: 600; box-shadow: var(--shadow-toast);
  display: flex; align-items: center; gap: 0.625rem; z-index: 80;
  opacity: 0; transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
  max-width: calc(100vw - 2rem);
}
.reveal-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.reveal-toast__ok { color: var(--color-sage-ink); font-weight: 750; }

/* ---- Wallet top-up modal ---- */
.wallet-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.wallet-modal[hidden] { display: none; }
.wallet-modal__backdrop { position: absolute; inset: 0; background: rgba(23,26,23,0.55); backdrop-filter: blur(4px); }
.wallet-modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--color-card); border: 1px solid var(--color-line);
  border-radius: 20px; padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(23,26,23,0.28); text-align: center;
}
.wallet-modal__close {
  position: absolute; top: 0.75rem; right: 0.875rem;
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--color-stone);
}
.wallet-modal__close:hover { color: var(--color-ink); }

/* Illustration */
.wallet-modal__art {
  position: relative; width: 76px; height: 76px; margin: 0 auto 1rem;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--color-sage); color: var(--color-sage-ink);
}
.wallet-modal__spark {
  position: absolute; font-weight: 800; color: var(--color-sage-ink);
  background: var(--color-card); border: 1px solid var(--color-line);
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.875rem; line-height: 1;
}
.wallet-modal__spark--1 { top: -4px; right: 2px; }
.wallet-modal__spark--2 { bottom: 2px; left: -4px; width: 16px; height: 16px; font-size: 0.6875rem; }

.wallet-modal__title { margin: 0 0 0.875rem; font-size: 1.25rem; font-weight: 800; color: var(--color-ink); }

.wallet-modal__balance {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  padding: 0.75rem; margin-bottom: 1rem;
  background: var(--color-paper); border-radius: 12px;
}
.wallet-modal__balance-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-stone); }
.wallet-modal__balance-amount { font-size: 1.625rem; font-weight: 800; color: var(--color-ink); }

.wallet-modal__lead { margin: 0 0 1.125rem; font-size: 0.875rem; line-height: 1.55; color: var(--color-stone-dark); }

/* Contact card */
.wallet-modal__contact {
  display: flex; align-items: center; gap: 0.875rem; text-align: left;
  padding: 0.875rem 1rem; margin-bottom: 1rem;
  background: var(--color-sage); border-radius: 14px;
}
.wallet-modal__contact-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-card); color: var(--color-sage-ink);
}
.wallet-modal__contact-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wallet-modal__contact-label { font-size: 0.75rem; font-weight: 600; color: var(--color-sage-ink); }
.wallet-modal__contact-number { font-size: 1.0625rem; font-weight: 800; color: var(--color-ink); text-decoration: none; }
.wallet-modal__contact-number:hover { text-decoration: underline; }
.wallet-modal__contact-hours { font-size: 0.6875rem; color: var(--color-stone); }

.wallet-modal__actions { display: flex; gap: 0.625rem; margin-bottom: 0.875rem; }
.wallet-modal__btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem;
  padding: 0.75rem; border-radius: 12px; font-size: 0.9375rem; font-weight: 750;
  text-decoration: none; transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.wallet-modal__btn--call { background: var(--color-ink); color: var(--color-paper); }
.wallet-modal__btn--call:hover { background: var(--color-ink-hover, #2b2e28); }
.wallet-modal__btn--wa { background: var(--color-card); color: var(--color-ink); border: 1px solid var(--color-line); }
.wallet-modal__btn--wa:hover { border-color: var(--color-ink); }

.wallet-modal__note { margin: 0; font-size: 0.75rem; color: var(--color-stone); }

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .ib-word { font-size: 1rem; }
  .page-head { padding-top: 1.25rem; }
}
@media (max-width: 400px) {
  .ib-forpill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live i { animation: none; }
}

/* ---- Account pages (Edit Profile / Transactions) ---- */
.acc-back {
  display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 1.5rem;
  font-size: 0.8125rem; font-weight: 700; color: var(--color-stone); text-decoration: none;
  transition: color var(--dur-fast) ease;
}
.acc-back:hover { color: var(--color-ink); }

.acc-card {
  max-width: 560px; margin-top: 1.25rem; padding: 1.5rem;
  background: var(--color-card); border: 1px solid var(--color-line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 26, 23, 0.04);
}
.acc-form { display: flex; flex-direction: column; gap: 1.125rem; }
.acc-field { display: flex; flex-direction: column; gap: 0.375rem; }
.acc-label { font-size: 0.8125rem; font-weight: 700; color: var(--color-ink); }
.acc-input {
  height: 46px; padding: 0 0.875rem; font: 500 0.9375rem var(--font-sans); color: var(--color-ink);
  background: var(--color-paper-soft); border: 1px solid var(--color-line); border-radius: 10px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.acc-input:focus { outline: 0; border-color: var(--color-sage-ink); box-shadow: 0 0 0 3px var(--color-sage); }
.acc-input:disabled { color: var(--color-stone); cursor: not-allowed; }
.acc-input.is-invalid { border-color: #9c4a3c; }
.acc-error { margin: 0; font-size: 0.75rem; color: #9c4a3c; font-weight: 600; }
.acc-hint { margin: 0; font-size: 0.75rem; color: var(--color-stone); }

.acc-actions { display: flex; justify-content: flex-end; gap: 0.625rem; margin-top: 0.25rem; }
.acc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.6875rem 1.375rem; border-radius: 999px; font: 750 0.875rem var(--font-sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.acc-btn--ink { background: var(--color-ink); color: var(--color-paper); }
.acc-btn--ink:hover { background: var(--color-ink-hover); }
.acc-btn--ghost { background: transparent; border-color: var(--color-line); color: var(--color-ink); }
.acc-btn--ghost:hover { border-color: var(--color-ink); }

.acc-flash {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem;
  padding: 0.625rem 1rem; border-radius: 10px;
  background: var(--color-sage); color: var(--color-sage-ink); font-weight: 650; font-size: 0.875rem;
}

.acc-balance {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 560px; margin-top: 1.25rem; padding: 1rem 1.25rem;
  background: var(--color-sage); border-radius: 14px;
}
.acc-balance__label { font-size: 0.8125rem; font-weight: 700; color: var(--color-sage-ink); }
.acc-balance__amount { font: 800 1.375rem var(--font-sans); color: var(--color-ink); }

.txn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.txn { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 0; border-bottom: 1px solid var(--color-line-faint); }
.txn:last-child { border-bottom: 0; }
.txn__icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper); color: var(--color-sage-ink); }
.txn__icon svg { width: 18px; height: 18px; }
.txn__icon--credit { background: var(--color-sage); color: var(--color-sage-ink); }
.txn__meta { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.txn__title { font-size: 0.875rem; font-weight: 700; color: var(--color-ink); }
.txn__sub { font-size: 0.75rem; color: var(--color-stone); }
.txn__amount { font: 800 0.9375rem var(--font-sans); color: #9c4a3c; white-space: nowrap; }
.txn__amount--credit { color: var(--color-sage-ink); }
.txn--clickable { cursor: pointer; margin: 0 -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; border-radius: 10px; transition: background var(--dur-fast) ease; }
.txn--clickable:hover { background: var(--color-paper); }
.txn--clickable:focus-visible { outline: 2px solid var(--color-sage-ink); outline-offset: -2px; }
.txn__chev { flex: none; display: inline-flex; color: var(--color-stone); }
.txn__chev svg { width: 18px; height: 18px; }

/* Purchase-detail modal */
.txn-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.txn-modal[hidden] { display: none; }
.txn-modal__backdrop { position: absolute; inset: 0; background: rgba(23, 26, 23, 0.55); backdrop-filter: blur(4px); }
.txn-modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: 468px;
  max-height: 90vh; overflow-y: auto;
  background: var(--color-card); border: 1px solid var(--color-line);
  border-radius: 18px; padding: 1.5rem; box-shadow: 0 24px 60px rgba(23, 26, 23, 0.28);
}
.txn-modal__close { position: absolute; top: 0.75rem; right: 0.9375rem; border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--color-stone); cursor: pointer; }
.txn-modal__close:hover { color: var(--color-ink); }
.txn-modal__title { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 800; color: var(--color-ink); }
.txn-modal__summary { margin: 1.125rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.txn-modal__summary > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.txn-modal__summary dt { margin: 0; font-size: 0.8125rem; color: var(--color-stone); }
.txn-modal__summary dd { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--color-ink); }

/* ============================================================
   Redesign: dashboard micro-interactions & entrances
============================================================ */

/* Page-load entrance: header content, stats, filter, cards */
@keyframes dash-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .page-head, .stats, .lead-filter, .feed-meta, .approval-notice {
    animation: dash-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .page-head { animation-delay: 0.05s; }
  .stats { animation-delay: 0.14s; }
  .lead-filter { animation-delay: 0.22s; }
  .feed-meta { animation-delay: 0.3s; }

  .feed > * {
    animation: dash-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .feed > *:nth-child(1) { animation-delay: 0.34s; }
  .feed > *:nth-child(2) { animation-delay: 0.42s; }
  .feed > *:nth-child(3) { animation-delay: 0.5s; }
  .feed > *:nth-child(4) { animation-delay: 0.58s; }
  .feed > *:nth-child(5) { animation-delay: 0.66s; }
  .feed > *:nth-child(n+6) { animation-delay: 0.72s; }
}

/* Stat cards: lift + tabular numerals for the counters */
.stat-card { transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(23, 26, 23, 0.07); border-color: var(--color-sage-ink); }
.stat-card__value { font-variant-numeric: tabular-nums; }

/* Button press physics */
.lc .btn, .lead-filter__submit, .ib-wallet, .reveal-btn {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s, color 0.15s, box-shadow 0.3s;
}
.lc .btn:active, .lead-filter__submit:active, .ib-wallet:active, .reveal-btn:active { transform: scale(0.96); }
.lc .btn--ink:hover { box-shadow: 0 10px 22px rgba(23, 26, 23, 0.18); }

/* Pay-button success morph moment */
@keyframes unlock-pop {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .lc-foot .lc-call { animation: unlock-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
}

/* Wallet chip idle shimmer */
@keyframes wallet-glint {
  0%, 88%, 100% { box-shadow: 0 0 0 0 rgba(71, 118, 110, 0); }
  94% { box-shadow: 0 0 0 5px rgba(71, 118, 110, 0.12); }
}
@media (prefers-reduced-motion: no-preference) {
  .ib-wallet { animation: wallet-glint 6s ease-in-out infinite; }
}

/* Filter select focus micro-motion */
.lead-filter__control { transition: background-color 0.2s, color 0.2s, transform 0.2s; }
.lead-filter__control:focus-visible { transform: translateY(-1px); }

/* Toast slides with spring */
.reveal-toast { transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s; }

/* ============================================================
   Redesign v2: greeting hero, stat tiles, section header
============================================================ */

/* Greeting hero */
.dash-hero {
  position: relative;
  margin-top: 1.25rem;
  overflow: visible;
}
.dash-hero__date {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-stone);
}
.dash-hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.dash-hero__title em {
  font-style: italic;
  color: var(--color-sage-ink);
}
.dash-hero__sub {
  max-width: 34rem;
  margin: 0.05rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-stone-dark);
}
.dash-hero__arc {
  position: absolute;
  top: -3rem;
  right: -2rem;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(71, 118, 110, 0.12), transparent 72%);
  pointer-events: none;
}
@media (max-width: 720px) {
  .dash-hero__arc { display: none; }
  .dash-hero { margin-top: 0.85rem; }
}

/* Stat tiles: 4-up, icon chip, refreshed look */
.stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) {
  .stats { gap: 0.4rem; }
  .stat-card { padding: 0.4rem 0.45rem; border-radius: 0.55rem; gap: 0; }
  .stat-card__icon { width: 18px; height: 18px; margin-bottom: 0.2rem; border-radius: 5px; }
  .stat-card__icon svg { width: 11px; height: 11px; }
  .stat-card__value { font-size: 1.05rem; line-height: 1; }
  .stat-card__value--money { font-size: 0.95rem; padding-top: 0; }
  .stat-card__label { font-size: 0.52rem; letter-spacing: 0.03em; margin-bottom: 0.05rem; }
  .stat-card__hint,
  .stats .stat-card--wallet .stat-card__hint--link { display: none; }
}
.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.125rem 1.25rem 1.05rem;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--color-sage-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card__icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  margin-bottom: 0.45rem;
  border-radius: 10px;
  background: var(--color-sage);
  color: var(--color-sage-ink);
}
.stat-card--accent { border-color: var(--color-line); background: linear-gradient(145deg, #eef4ef 0%, var(--color-card) 60%); }
.stat-card--accent .stat-card__icon { background: var(--color-sage-ink); color: var(--color-paper); }
.stat-card__value { font-size: 2.1rem; }
.stat-card__value--money { font-size: 1.7rem; padding-top: 0.2rem; }

/* Wallet tile is a real button */
.stat-card--wallet {
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  background: var(--color-forest);
  border-color: var(--color-forest);
}
.stat-card--wallet .stat-card__label { color: rgba(246, 244, 237, 0.65); }
.stat-card--wallet .stat-card__value { color: var(--color-paper); }
.stat-card--wallet .stat-card__icon { background: rgba(246, 244, 237, 0.12); color: var(--color-paper); }
.stat-card--wallet .stat-card__hint--link { color: #9fc4bb; font-weight: 700; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); display: inline-block; }
.stat-card--wallet:hover .stat-card__hint--link { transform: translateX(3px); }
.stat-card--wallet::before { background: #9fc4bb; }
.stat-card--wallet:focus-visible { outline: 2px solid var(--color-sage-ink); outline-offset: 2px; }

/* Feed section header */
.feed-meta { align-items: baseline; gap: 0.875rem; margin-top: 1.25rem; margin-bottom: -0.35rem; }
.feed-meta__title {
  margin: 0 auto 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--color-ink);
}

/* Scroll-in entrance for below-fold cards */
@media (prefers-reduced-motion: no-preference) {
  .feed > .io-pending { opacity: 0; transform: translateY(26px); animation: none; }
  .feed > .io-in {
    opacity: 1; transform: none;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ============================================================
   Filter bar v3 — matches the lead-card design system
============================================================ */

/* Sticky glass: the filter follows you down the feed */
.lead-filter {
  position: sticky;
  top: 72px;               /* below the glass app header */
  z-index: 40;
}
.lead-filter__bar {
  border-radius: 16px;     /* 8px grid, matches .lc */
  padding: 12px 16px;
  background: rgba(253, 252, 248, 0.88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 2px rgba(38, 38, 31, 0.05), 0 16px 40px -24px rgba(38, 38, 31, 0.28);
  transition: box-shadow 0.3s ease;
}

/* --- Segmented control: sliding thumb (modern browsers) --- */
.lead-filter__kind {
  position: relative;
  padding: 4px;
  border-radius: 999px;
}
.lead-filter__radio {
  flex: 1 1 0;
  min-width: 108px;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
}
@supports selector(:has(*)) {
  .lead-filter__kind::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: var(--color-ink);
    box-shadow: 0 2px 8px rgba(23, 26, 23, 0.25);
    transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.5, 1);
  }
  .lead-filter__kind:has(input[value="commercial"]:checked)::before {
    transform: translateX(100%);
  }
  /* Thumb carries the fill; labels only change color */
  .lead-filter__radio.is-selected { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-filter__kind::before { transition: none; }
}

/* --- Fields: focus underline draws in, label warms on hover --- */
.lead-filter__field::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-sage-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lead-filter__field:focus-within::after { transform: scaleX(1); }
.lead-filter__field:hover .lead-filter__label { color: var(--color-sage-ink); }
.lead-filter__label { transition: color 0.2s ease; }

/* --- Actions: icon micro-motion + press physics --- */
.lead-filter__reset svg { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.lead-filter__reset:hover svg { transform: rotate(-180deg); }
.lead-filter__submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s, box-shadow 0.3s;
}
.lead-filter__submit:hover { box-shadow: 0 10px 22px rgba(23, 26, 23, 0.18); }
.lead-filter__submit:active { transform: scale(0.95); }
.lead-filter__submit svg { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.lead-filter__submit:hover svg { transform: scale(1.12) rotate(-8deg); }
.lead-filter__reset:focus-visible,
.lead-filter__submit:focus-visible {
  outline: 2px solid var(--color-sage-ink);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Selected-value fill: soften to sage family (was hard ink) */
.lead-filter__control.is-active {
  background-color: var(--color-sage-ink);
}

/* --- Mobile: 44px tap targets, full-width search, sticky off --- */
@media (max-width: 720px) {
  .lead-filter { position: static; }
  .lead-filter__bar { padding: 12px; }
  .lead-filter__radio { min-height: 44px; }
  .lead-filter__control { min-height: 40px; }
  .lead-filter__submit { min-height: 46px; }
}

/* ============================================================
   Welcome-credit celebration modal
============================================================ */
.reward {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.reward[hidden] { display: none; }
.reward__backdrop {
  position: absolute; inset: 0;
  background: rgba(23, 26, 23, 0.58);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; animation: reward-fade 0.4s ease forwards;
}
@keyframes reward-fade { to { opacity: 1; } }

.reward__card {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  padding: 3.25rem 1.75rem 1.75rem;
  text-align: center;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(23, 26, 23, 0.32);
  overflow: hidden;
  animation: reward-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes reward-pop {
  0% { opacity: 0; transform: translateY(24px) scale(0.9); }
  100% { opacity: 1; transform: none; }
}
.reward__card::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 220px;
  background: radial-gradient(60% 100% at 50% 0, rgba(71, 118, 110, 0.18), transparent 70%);
  pointer-events: none;
}
.reward__close {
  position: absolute; top: 0.75rem; right: 0.95rem; z-index: 3;
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--color-stone);
}
.reward__close:hover { color: var(--color-ink); }

/* Coin */
.reward__coin {
  position: relative; width: 84px; height: 84px; margin: 0 auto 1.25rem;
  transform-style: preserve-3d;
  animation: reward-coin 1.1s cubic-bezier(0.34, 1.4, 0.5, 1) 0.15s both;
}
@keyframes reward-coin {
  0% { transform: translateY(-30px) rotateY(0deg) scale(0.4); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translateY(0) rotateY(720deg) scale(1); opacity: 1; }
}
.reward__coin-face {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #f4d98a 0%, #e9b949 45%, #c8942b 100%);
  box-shadow: inset 0 -4px 10px rgba(140, 96, 12, 0.4), inset 0 3px 8px rgba(255, 255, 255, 0.55), 0 10px 22px rgba(200, 148, 43, 0.4);
  border: 3px solid #f0cf7e;
}
.reward__coin-symbol { font: 800 2.1rem var(--font-sans); color: #7a5410; }
.reward__coin-shine {
  position: absolute; top: 8%; left: 12%; width: 40%; height: 30%;
  background: rgba(255, 255, 255, 0.6); border-radius: 50%;
  filter: blur(4px);
  animation: reward-shine 2.4s ease-in-out 1.2s infinite;
}
@keyframes reward-shine { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.9; } }

.reward__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-sage-ink);
}
.reward__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif); font-weight: 400; font-size: 1.65rem; line-height: 1.15;
  color: var(--color-ink);
}
.reward__title em { font-style: normal; color: var(--color-sage-ink); font-weight: 700; }
.reward__body { margin: 0 auto 1.25rem; max-width: 22rem; font-size: 0.9rem; line-height: 1.55; color: var(--color-stone-dark); }
.reward__body strong { color: var(--color-ink); }

.reward__wallet {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.1rem; margin-bottom: 1.25rem;
  background: var(--color-sage); border-radius: 14px;
  animation: reward-fade 0.5s ease 0.7s both;
}
.reward__wallet-label { font-size: 0.8rem; font-weight: 700; color: var(--color-sage-ink); }
.reward__wallet-amount { font: 800 1.4rem var(--font-sans); color: var(--color-ink); }

.reward__cta {
  width: 100%; padding: 0.85rem 1rem;
  font: 750 0.95rem var(--font-sans); color: var(--color-paper);
  background: var(--color-ink); border: 0; border-radius: 12px; cursor: pointer;
  transition: background var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.reward__cta:hover { background: var(--color-ink-hover, #2b2e28); }
.reward__cta:active { transform: scale(0.97); }

/* Confetti */
.reward__confetti { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.reward__confetti i {
  position: absolute; top: -12px; width: 9px; height: 14px; opacity: 0;
  animation: reward-confetti linear forwards;
}
@keyframes reward-confetti {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .reward__card, .reward__coin, .reward__backdrop, .reward__wallet { animation-duration: 0.01ms; }
  .reward__coin-shine, .reward__confetti { display: none; }
  .reward__coin { transform: none; }
}

/* ---- Compact stat tiles ---- */
.stats { gap: 0.625rem; margin-top: 0.5rem; }
.stat-card {
  padding: 0.75rem 0.875rem 0.7rem;
  border-radius: 0.75rem;
  gap: 0.15rem;
}
.stat-card__icon {
  width: 26px; height: 26px;
  margin-bottom: 0.2rem;
  border-radius: 7px;
}
.stat-card__icon svg { width: 14px; height: 14px; }
.stat-card__label { font-size: 0.625rem; letter-spacing: 0.05em; }
.stat-card__value { font-size: 1.55rem; }
.stat-card__value--money { font-size: 1.3rem; padding-top: 0; }
.stat-card__hint { font-size: 0.6875rem; }
@media (max-width: 900px) {
  .stat-card { padding: 0.7rem 0.75rem; }
  .stat-card__value { font-size: 1.4rem; }
}

/* ============================================================
   Dashboard navigation — InteriorBuddy Dashboard.dc.html
   (header/nav restyle only; rest of dashboard unchanged)
============================================================ */
.ib-head {
  background: rgba(246, 244, 237, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 26, 23, 0.08);
}
.ib-head-row { height: auto; gap: 14px; padding-top: 12px; padding-bottom: 12px; }

/* Brand */
.ib-mark {
  height: 34px; width: auto;
}
.ib-word { font-size: 1.125rem; font-weight: 700; }
.ib-forpill {
  font-size: 0.656rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-sage-ink); background: var(--color-sage);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
@media (max-width: 560px) { .ib-forpill { display: none; } }

/* Wallet pill */
.ib-wallet {
  height: auto; gap: 9px; padding: 6px 14px 6px 10px;
  background: var(--color-sage); border: 1px solid rgba(71, 118, 110, 0.25);
  border-radius: 999px;
}
.ib-wallet:hover { background: #deece1; border-color: rgba(71, 118, 110, 0.25); box-shadow: none; }
.ib-wallet__label {
  font-size: 0.594rem; letter-spacing: 0.08em; opacity: 1; color: var(--color-sage-ink);
}
.ib-wallet__amount { font-size: 0.844rem; font-weight: 750; }

/* Notifications — round outline button with bell + dot */
.ib-icon-btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--color-line); background: var(--color-card);
  color: #6f7068;
}
.ib-icon-btn:hover { background: var(--color-paper); border-color: var(--color-line); color: #6f7068; }
.ib-icon-btn .badge-dot {
  position: absolute; top: 8px; right: 9px; transform: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-sage-ink); border: 1.5px solid var(--color-card);
}

/* Avatar — solid ink circle */
.ib-avatar {
  width: 38px; height: 38px; font-size: 0.8125rem;
  background: var(--color-ink); color: var(--color-paper);
}
.ib-avatar:hover { box-shadow: none; background: var(--color-ink-hover, #2b2e28); }

/* Profile dropdown — 250px, softer radius (matches design) */
.ib-menu { width: 250px; top: calc(100% + 8px); border-radius: 12px; }


/* ============================================================
   Feed tabs — Lead Feed Tabs.dc.html
============================================================ */
/* Row: scrollable tabs on the left, Filters action pinned right */
.lead-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--color-line);
  margin: 0 0 1rem;
}
.lead-tabs {
  display: flex;
  align-items: stretch;
  gap: clamp(4px, 2vw, 20px);
  margin-bottom: -1px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* Fade the trailing edge so it reads as "more, keep scrolling" */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.lead-tabs::-webkit-scrollbar { display: none; }
.lead-tabs .lead-tab { flex: 0 0 auto; }

/* Filters action (design's outline button) */
.lead-tabs-actions { flex: none; padding-bottom: 8px; }
.lead-tabs-filter {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 0.75rem;
  font: 700 0.8125rem var(--font-sans); color: var(--color-ink);
  background: var(--color-card); border: 1px solid var(--color-line);
  border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.lead-tabs-filter:hover { border-color: var(--color-ink); }
.lead-tabs-filter:focus-visible { outline: 2px solid var(--color-sage-ink); outline-offset: 2px; }
.lead-tabs-filter__count {
  display: inline-grid; place-items: center; min-width: 20px; padding: 2px 6px;
  font-size: 0.71875rem; font-weight: 750;
  background: var(--color-sage); color: var(--color-sage-ink); border-radius: 999px;
}
@media (max-width: 480px) {
  .lead-tabs-filter__label { display: none; }
  .lead-tabs-filter { padding: 0 0.5rem; }
}

/* Brief highlight when jumping to the filter bar */
.lead-filter.is-flash { animation: filter-flash 1.1s var(--ease-out); }
@keyframes filter-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(71, 118, 110, 0); }
  25% { box-shadow: 0 0 0 3px rgba(71, 118, 110, 0.28); }
}
@media (prefers-reduced-motion: reduce) { .lead-filter.is-flash { animation: none; } }
.lead-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 15px;
  font: 550 0.9375rem var(--font-sans);
  color: var(--color-stone);
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.lead-tab:hover { color: var(--color-ink); }
.lead-tab.is-active { color: var(--color-ink); font-weight: 750; border-bottom-color: var(--color-ink); }
.lead-tab:focus-visible { outline: 2px solid var(--color-sage-ink); outline-offset: -2px; border-radius: 8px; }
.lead-tab__count {
  font-size: 0.71875rem; font-weight: 750;
  padding: 2px 7px; border-radius: 999px;
  background: var(--color-line-faint); color: var(--color-stone);
  letter-spacing: 0.02em;
}
.lead-tab.is-active .lead-tab__count { background: var(--color-sage); color: var(--color-sage-ink); }
.feed-item[hidden] { display: none; }

/* Filters toggle: active/expanded state; panel is a plain block (not sticky) */
.lead-tabs-filter.is-on {
  background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink);
}
.lead-tabs-filter.is-on .lead-tabs-filter__count { background: var(--color-paper); color: var(--color-ink); }
#lead-filter-panel { position: static; top: auto; margin-bottom: 1rem; }
#lead-filter-panel[hidden] { display: none; }

/* ===== Header notifications dropdown ===== */
.ib-notif { position: relative; flex-shrink: 0; }
.ib-notif__badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--color-danger, #9c4a3c); color: #fff;
  font: 700 9.5px/1 var(--font-sans); border-radius: 999px;
  border: 2px solid var(--color-paper);
}
.ib-notif-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 320px; max-width: calc(100vw - 32px); padding: 6px;
  background: var(--color-card); border: 1px solid var(--color-line);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(23, 26, 23, 0.16);
}
.ib-notif-menu[hidden] { display: none; }
/* On phones the bell sits near the right edge, so a right-anchored 320px menu
   overflows the left. Pin it to the viewport with symmetric margins instead. */
@media (max-width: 560px) {
  .ib-notif-menu {
    position: fixed; top: 64px; left: 12px; right: 12px;
    width: auto; max-width: none;
  }
}
.ib-notif-menu__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 10px; border-bottom: 1px solid var(--color-line-faint); margin-bottom: 4px;
}
.ib-notif-menu__title { font: 700 0.9rem var(--font-sans); color: var(--color-ink); }
.ib-notif-menu__count { font: 700 0.68rem var(--font-sans); color: var(--color-sage-ink); background: var(--color-sage); padding: 3px 8px; border-radius: 999px; }
.ib-notif-list { list-style: none; margin: 0; padding: 0; max-height: min(60vh, 420px); overflow-y: auto; }
.ib-notif-item {
  display: flex; gap: 10px; padding: 10px; border-radius: 10px;
  text-decoration: none; color: inherit; transition: background 0.15s ease;
}
.ib-notif-item:hover { background: var(--color-paper); }
.ib-notif-item.is-unread { background: color-mix(in srgb, var(--color-sage) 55%, transparent); }
.ib-notif-item__dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; flex-shrink: 0; background: var(--color-stone); }
.ib-notif-item__dot--topup { background: var(--color-sage-ink); }
.ib-notif-item__dot--new_lead { background: var(--color-warning, #8a6d2f); }
.ib-notif-item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ib-notif-item__title { font: 650 0.82rem var(--font-sans); color: var(--color-ink); line-height: 1.3; }
.ib-notif-item__text { font: 400 0.76rem var(--font-sans); color: var(--color-muted); line-height: 1.35; }
.ib-notif-item__time { font: 600 0.66rem var(--font-sans); color: var(--color-stone); margin-top: 2px; }
.ib-notif-empty { margin: 0; padding: 22px 14px; text-align: center; font: 500 0.8rem var(--font-sans); color: var(--color-stone); }

/* Infinite-scroll sentinel + spinner */
.feed-more {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 1.5rem 1rem 0.5rem; color: var(--color-stone);
  font: 600 0.82rem var(--font-sans);
}
.feed-more[hidden] { display: none; }
.feed-more__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--color-line); border-top-color: var(--color-sage-ink);
  animation: feed-more-spin 0.7s linear infinite;
}
@keyframes feed-more-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .feed-more__spinner { animation-duration: 1.6s; } }

/* ============================================================
   First-time walkthrough (spotlight tour) — designer-tour.js
   ============================================================ */
.ibt[hidden] { display: none; }
.ibt-block { position: fixed; inset: 0; z-index: 500; }
.ibt-spot {
    position: fixed; z-index: 501; pointer-events: none;
    box-shadow: 0 0 0 200vmax rgba(23, 26, 23, 0.55);
    border: 2px solid var(--color-card);
    transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1), top 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.3s cubic-bezier(0.22, 1, 0.36, 1), height 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ibt-tip {
    position: fixed; z-index: 502; box-sizing: border-box;
    width: min(340px, calc(100vw - 24px));
    background: var(--color-card); border: 1px solid var(--color-line);
    border-radius: 0.875rem; box-shadow: 0 18px 50px rgba(38, 38, 31, 0.22);
    padding: 1.125rem 1.25rem;
    transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1), top 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ibt-tip__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.ibt-step { font: 750 0.64rem/1 inherit; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-sage-ink); }
.ibt-skip {
    border: none; background: transparent; cursor: pointer; padding: 0;
    font: 600 0.72rem/1 inherit; color: var(--color-stone);
    text-decoration: underline; text-underline-offset: 3px;
}
.ibt-skip:hover { color: var(--color-ink); }
.ibt-title { margin: 0 0 0.375rem; font-family: Georgia, serif; font-weight: 400; font-size: 1.25rem; line-height: 1.25; color: var(--color-ink); }
.ibt-body { margin: 0 0 1rem; font: 400 0.84rem/1.55 inherit; color: var(--color-muted); }
.ibt-foot { display: flex; align-items: center; gap: 0.75rem; }
.ibt-dots { display: flex; align-items: center; gap: 5px; margin-right: auto; }
.ibt-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--color-line); transition: all 0.25s ease; }
.ibt-dot.is-done { background: var(--color-sage-ink); }
.ibt-dot.is-on { width: 18px; background: var(--color-ink); }
.ibt-btn {
    border: 1px solid var(--color-ink); border-radius: 999px; cursor: pointer;
    font: 700 0.78rem/1 inherit; padding: 0.5rem 1rem;
    background: var(--color-ink); color: var(--color-paper); transition: opacity 0.15s ease;
}
.ibt-btn:hover { opacity: 0.88; }
.ibt-btn--ghost { background: transparent; color: var(--color-muted); border-color: var(--color-line); }
.ibt-btn--ghost:hover { color: var(--color-ink); border-color: var(--color-ink); opacity: 1; }

/* Profile-menu "Take the tour" item accent */
.ib-menu__item--tour { color: var(--color-sage-ink); font-weight: 600; }
.ib-menu__item--tour:hover { background: var(--color-sage); }

@media (prefers-reduced-motion: reduce) {
    .ibt-spot, .ibt-tip, .ibt-dot { transition-duration: 0.01ms; }
}

/* ============================================================
   Pay-to-reveal confirm — slide-to-pay modal (Web Payment Flow)
   Overlays the feed; the lead card markup is untouched.
   ============================================================ */
.reveal-confirm { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.reveal-confirm[hidden] { display: none; }
.reveal-confirm__backdrop { position: absolute; inset: 0; background: rgba(23, 26, 23, 0.32); backdrop-filter: blur(4px); animation: rc-scrim 0.15s ease-out both; }
.reveal-confirm__panel {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    background: var(--color-card);
    border-radius: 1.125rem;
    box-shadow: var(--shadow-toast);
    padding: clamp(1.1rem, 4vw, 1.5rem);
    animation: rc-pop 0.32s var(--ease-out) both;
}

/* State-driven view switching */
.reveal-confirm .rc-view { display: none; }
.reveal-confirm[data-state="confirm"] .rc-view--confirm,
.reveal-confirm[data-state="processing"] .rc-view--confirm { display: block; }
.reveal-confirm[data-state="success"] .rc-view--success { display: block; }
.reveal-confirm[data-state="error"] .rc-view--error { display: block; }
.reveal-confirm[data-state="short"] .rc-view--short { display: block; }

.rc-eyebrow { font-weight: 750; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-sage-ink); margin: 0 0 0.5rem; }
.rc-title { font-family: Georgia, serif; font-weight: 400; font-size: 1.4rem; margin: 0 0 1.1rem; color: var(--color-ink); }
.rc-title--center { text-align: center; margin: 1rem 0 0; }
.rc-sub { text-align: center; font-size: 0.9rem; color: var(--color-muted); margin: 0.35rem 0 0; }

.rc-summary { display: flex; flex-direction: column; border: 1px solid var(--color-line); border-radius: var(--radius-field); background: var(--color-paper-soft); padding: 0.35rem 1rem; margin: 0 0 1.25rem; }
.rc-summary__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; font-size: 0.82rem; border-bottom: 1px solid var(--color-line-faint); }
.rc-summary__row:last-child { border-bottom: 0; }
.rc-summary__row dt { color: var(--color-muted); margin: 0; }
.rc-summary__row dd { margin: 0; font-weight: 600; text-align: right; }
.rc-summary__strong { font-weight: 700; }
.rc-after--short { color: var(--color-danger); }

/* Slide-to-pay */
.rc-slide { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rc-track { position: relative; flex: 1 1 200px; min-width: 0; height: 60px; border-radius: 999px; background: var(--color-ink); border: 1px solid var(--color-ink); overflow: hidden; touch-action: none; }
.rc-track__fill { position: absolute; top: 0; left: 0; bottom: 0; width: 53px; background: linear-gradient(90deg, var(--color-sage-ink) 55%, rgba(71, 118, 110, 0) 100%); }
.rc-track__sheen { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 32%, rgba(253, 252, 248, 0.28) 50%, transparent 68%); background-size: 200% 100%; animation: rc-sheen 2.6s ease-in-out infinite; pointer-events: none; }
.rc-track__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 750; font-size: 0.8rem; letter-spacing: 0.02em; color: rgba(246, 244, 237, 0.92); pointer-events: none; }
.rc-knob { position: absolute; top: 5px; left: 5px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--color-paper); color: var(--color-ink); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; box-shadow: var(--shadow-soft); }
.rc-knob:active { cursor: grabbing; }
.rc-knob:focus-visible { outline: 3px solid var(--color-sage-ink); outline-offset: 2px; }
.rc-knob__arrow { font-size: 20px; line-height: 1; }
.rc-knob__spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(23, 26, 23, 0.22); border-top-color: var(--color-ink); animation: rc-spin 0.7s linear infinite; }
.reveal-confirm[data-state="confirm"] .rc-knob__arrow { animation: rc-nudge 1.8s ease-in-out infinite; }

/* Processing overrides */
.reveal-confirm[data-state="processing"] .rc-knob { cursor: default; }
.reveal-confirm[data-state="processing"] .rc-knob__arrow { display: none; }
.reveal-confirm[data-state="processing"] .rc-knob__spinner { display: inline-block; }
.reveal-confirm[data-state="processing"] .rc-track__fill { width: 100% !important; }
.reveal-confirm[data-state="processing"] .rc-cancel { visibility: hidden; }

.rc-cancel { height: 60px; padding: 0 1.5rem; min-width: 44px; border-radius: 999px; background: transparent; border: 1px solid var(--color-line); color: var(--color-ink); font-family: inherit; font-weight: 750; font-size: 0.8rem; cursor: pointer; flex: none; transition: border-color var(--dur-fast) ease; }
.rc-cancel:hover { border-color: var(--color-ink); }
.rc-hint { margin: 0.6rem 0 0; font-size: 0.72rem; color: var(--color-stone); text-align: center; }

/* Result marks */
.rc-receipt-head { text-align: center; }
.rc-mark { position: relative; width: 76px; height: 76px; margin: 0.25rem auto 0; }
.rc-mark--err { border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--color-danger-bg); border: 1px solid var(--color-line-warm); color: var(--color-danger); font-family: Georgia, serif; font-size: 2rem; line-height: 1; animation: rc-pop 0.4s var(--ease-out) both; }
.rc-mark__disc { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--color-sage); border: 1px solid var(--color-line-warm); color: var(--color-sage-ink); animation: rc-pop-over 0.5s var(--ease-out) both; }
.rc-mark__disc svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: rc-draw 0.45s var(--ease-out) 0.18s forwards; }
.rc-mark__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--color-sage-ink); opacity: 0; animation: rc-ring 0.9s var(--ease-out) 0.25s; }
.rc-mark__ring--2 { animation-duration: 1s; animation-delay: 0.55s; }
.rc-conf { position: absolute; left: 50%; top: 50%; margin-left: -3px; margin-top: -5px; border-radius: 2px; pointer-events: none; }

/* Transaction receipt card */
.rc-receipt { display: flex; flex-direction: column; border: 1px solid var(--color-line-warm); border-radius: var(--radius-card); background: var(--color-card); padding: 0.35rem 1.5rem; margin: 1.25rem 0 0; }
.rc-receipt__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; font-size: 0.84rem; border-bottom: 1px solid var(--color-line-faint); }
.rc-receipt__row:last-child { border-bottom: 0; }
.rc-receipt__row dt { margin: 0; color: var(--color-muted); }
.rc-receipt__row dd { margin: 0; font-weight: 600; text-align: right; }
.rc-receipt__row--total dt { font-weight: 700; color: var(--color-ink); }
.rc-receipt__row--total dd { font-weight: 750; font-size: 1.05rem; }

/* Unlocked-contact receipt */
.rc-contact { display: flex; flex-direction: column; gap: 0.15rem; background: var(--color-sage); border: 1px solid var(--color-line-warm); border-radius: var(--radius-card); padding: 1rem 1.25rem; margin: 1.25rem 0 0; }
.rc-contact__label { font-weight: 750; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-sage-ink); margin-bottom: 0.25rem; }
.rc-contact__name { font-weight: 700; font-size: 1.05rem; }
.rc-contact__num { font-size: 0.9rem; color: var(--color-sage-ink); font-weight: 600; }

.rc-actions { display: flex; align-items: center; gap: 0.6rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.rc-actions .rc-cancel { height: 42px; }

/* Call-now button — identical to the lead-card button. The base .btn styles in
   styles.css are scoped to .lc, so replicate them for the modal context; the
   glow/wiggle animation comes free via the global a.lc-call rule. */
.reveal-confirm .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; font: 750 13.5px var(--font-sans); padding: 11px 19px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.reveal-confirm .btn svg { width: 16px; height: 16px; stroke-width: 2; }
.reveal-confirm .btn--sage { background: var(--color-sage-ink); color: var(--color-paper); }
.reveal-confirm .btn--sage:hover { background: #3c655e; }

@keyframes rc-scrim { from { opacity: 0; } to { opacity: 1; } }
@keyframes rc-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rc-spin { to { transform: rotate(360deg); } }
@keyframes rc-sheen { 0% { background-position: 250% 0; } 60%, 100% { background-position: -150% 0; } }
@keyframes rc-nudge { 0%, 55%, 100% { transform: translateX(0); } 25% { transform: translateX(5px); } }
@keyframes rc-pop-over { 0% { transform: scale(0.3); opacity: 0; } 65% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rc-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes rc-draw { to { stroke-dashoffset: 0; } }
@keyframes rc-ring { 0% { opacity: 0.55; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes rc-conf { 0% { transform: translate(0, 0) rotate(0deg); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .reveal-confirm__backdrop, .reveal-confirm__panel, .rc-track__sheen, .rc-knob__arrow,
    .rc-mark--err, .rc-mark__disc, .rc-mark__disc svg path, .rc-mark__ring, .rc-conf { animation: none !important; }
}

/* ============================================================
   Lead outcome review — 5-day post-reveal prompt
============================================================ */
.review-modal { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.review-modal[hidden] { display: none; }
.review-modal__backdrop { position: absolute; inset: 0; background: rgba(23, 26, 23, 0.45); backdrop-filter: blur(4px); animation: rc-scrim 0.15s ease-out both; }
.review-modal__panel { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 2rem); overflow: auto; background: var(--color-card); border-radius: 1.125rem; box-shadow: var(--shadow-toast); padding: clamp(1.25rem, 4vw, 1.75rem); animation: rc-pop 0.32s var(--ease-out) both; }
.review-modal__eyebrow { margin: 0 0 0.4rem; font-weight: 750; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-sage-ink); }
.review-modal__title { margin: 0 0 1rem; font-family: Georgia, serif; font-weight: 400; font-size: 1.4rem; color: var(--color-ink); }
.review-modal__card { margin-bottom: 1.1rem; }
.review-modal__card .lc { cursor: default; }
.review-modal__options { display: flex; flex-direction: column; gap: 0.5rem; }
.review-opt { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; text-align: left; padding: 0.8rem 1rem; border: 1px solid var(--color-line); border-radius: var(--radius-field); background: var(--color-card); color: var(--color-ink); font: 650 0.88rem var(--font-sans); cursor: pointer; transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease; }
.review-opt:hover { border-color: var(--color-sage-ink); background: var(--color-sage); }
.review-opt.is-busy { opacity: 0.6; pointer-events: none; }
.review-opt__chev { color: var(--color-stone); font-size: 1.1rem; line-height: 1; }
.review-modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }
.review-modal__later, .review-modal__never { background: none; border: 0; cursor: pointer; font: 650 0.8rem var(--font-sans); padding: 4px 2px; }
.review-modal__later { color: var(--color-sage-ink); }
.review-modal__never { color: var(--color-stone); }
.review-modal__later:hover { text-decoration: underline; }
.review-modal__never:hover { color: var(--color-muted); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .review-modal__backdrop, .review-modal__panel { animation: none !important; }
}

/* ==========================================================================
   Insufficient-balance view (reveal-confirm[data-state="short"])
   Shown when the wallet does not cover a lead price. Tighter than the other
   views: one figure to read, one action to take.
   ========================================================================== */
.reveal-confirm[data-state="short"] .reveal-confirm__panel {
  width: min(384px, 100%);
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
}

/* Smaller than the celebratory success mark — this is a nudge, not an event. */
.rc-mark--sm { width: 52px; height: 52px; margin: 0 auto; }

.rc-short__title { margin: 0.9rem 0 0; font-size: 1.45rem; }
.rc-short__sub   { margin: 0.45rem auto 0; max-width: 32ch; }

/* Price vs. balance, side by side, so the shortfall is self-evident. */
.rc-short__figures {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1.35rem 0 0;
  text-align: left;
}

.rc-short__figure {
  flex: 1;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-field);
  background: var(--color-paper-soft);
  padding: 0.6rem 0.75rem;
}

.rc-short__figure--danger {
  border-color: var(--color-line-warm);
  background: var(--color-danger-bg);
}

.rc-short__figure-label {
  display: block;
  font: 750 0.6rem var(--font-sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-stone);
}

.rc-short__figure--danger .rc-short__figure-label { color: var(--color-danger); }

.rc-short__figure-value {
  display: block;
  margin-top: 0.2rem;
  font: 700 1rem var(--font-sans);
  color: var(--color-ink);
}

.rc-short__figure--danger .rc-short__figure-value { color: var(--color-danger); }

.rc-short__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.rc-short__topup {
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 750 13.5px var(--font-sans);
  background: var(--color-ink);
  color: var(--color-paper);
  cursor: pointer;
}

/* .rc-cancel is 60px tall for the slide-to-pay row; this view needs it shorter. */
.rc-short__cancel { height: 44px; width: 100%; }

/* ==========================================================================
   Onboarding video — the step between the welcome gift and the guided tour
   ========================================================================== */
.onboard-video {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.onboard-video[hidden] { display: none; }

.onboard-video__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 26, 23, 0.62);
}

.onboard-video__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px rgba(23, 26, 23, 0.28);
}

.onboard-video__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--color-stone);
  cursor: pointer;
}
.onboard-video__close:hover { color: var(--color-ink); }

.onboard-video__kicker {
  margin: 0;
  font: 750 0.62rem var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sage-ink);
}

.onboard-video__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.22;
  margin: 8px 0 6px;
  color: var(--color-ink);
}

.onboard-video__sub {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.onboard-video__length {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-sage);
  color: var(--color-sage-ink);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Reserve the 16:9 box before the iframe loads, so opening the modal does not
   shift the buttons under the pointer. */
.onboard-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0f110f;
}

.onboard-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.onboard-video__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.onboard-video__skip {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: transparent;
  font: 750 0.8rem var(--font-sans);
  color: var(--color-ink);
  cursor: pointer;
}
.onboard-video__skip:hover { border-color: var(--color-ink); }

.onboard-video__cta {
  flex: 1;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-paper);
  font: 750 0.82rem var(--font-sans);
  cursor: pointer;
}

@media (max-width: 560px) {
  .onboard-video__panel { padding: 22px 18px 18px; }
  .onboard-video__actions { flex-direction: column-reverse; }
  .onboard-video__skip,
  .onboard-video__cta { width: 100%; }
}
