/* KubeReach tokens — the Leadline `--l-*` custom properties, rescoped.
   --------------------------------------------------------------------
   The Leadline design handoff (docs/miniapp/kubereach) declares these on
   :root, which would collide with the KubePass miniapp's own globals and
   leak ember/paper values into every member + merchant screen. Here they
   live under `.reach-root` instead: ReachApp wraps everything it renders
   in <div className="reach-root">, so the tokens apply only inside the
   reach module and the rest of the app is untouched. */

.reach-root {
  /* Neutrals and accent ramp lifted from the KubePass token set. */
  --l-bg:#F5F3EF; --l-surface:#FFFFFF; --l-surface-2:#EDEBE5; --l-line:#E2E2E2;
  --l-ink:#272320; --l-ink-2:#444746; --l-ink-3:#646466; /* was #777779: 4.0:1 on the paper bg, under AA (2026-11-18) */
  --l-accent:#B23E0C; /* was #C8470F: 4.0–4.3:1 as link text on paper / surface-2 (2026-11-18) */ --l-accent-500:#E69254; --l-accent-soft:#FFF0E0;
  --l-accent-grad:linear-gradient(135deg,#FF9A5A 0%,#E69254 55%,#C8470F 100%);
  /* Deep variant (2026-11-20): for TEXT-bearing surfaces (LBtn primary) — white on the light
     gradient is 2.1–2.4:1; this ramp keeps every stop ≥4.5:1, mirroring --gradient-accent-fill. */
  --l-accent-grad-fill:linear-gradient(135deg,#B25B1A 0%,#A8521A 55%,#9C4A12 100%);
  --l-amber:#FFB95E; --l-amber-soft:#FFF0E0; --l-amber-ink:#8A5A12; /* was #B0761F: 3.4:1 on amber-soft */
  --l-ok:#2F7D5E; --l-ok-soft:#E4F1EA;
  --l-ai:#5B4B8A; --l-ai-soft:#F1EEF7;
  --l-display:'Bricolage Grotesque','Segoe UI',system-ui,sans-serif;
  --l-body:'Public Sans','Segoe UI',system-ui,-apple-system,sans-serif;

  /* The reach stage fills the AppStage frame; the root also carries the
     paper background so the module reads as its own surface. */
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--l-bg);
  color: var(--l-ink);
  font-family: var(--l-body);
}

/* Base resets scoped to the module (mirrors Leadline.html's global rules,
   but only inside .reach-root so member/merchant inputs are untouched). */
.reach-root button,
.reach-root input,
.reach-root select,
.reach-root textarea { font-family: inherit; outline: none; -webkit-appearance: none; appearance: none; }
.reach-root button:focus-visible,
.reach-root input:focus-visible,
.reach-root select:focus-visible,
.reach-root textarea:focus-visible { outline: 2px solid var(--l-accent); outline-offset: 1px; }
.reach-root select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5l5-5' stroke='%239A8B7E' stroke-width='1.8' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

/* Animations used by the kit — named identically to the handoff so ported
   screens keep working (lsheet bottom-sheet entrance,
   lpulse QR pulse, lwave voice meter, ltoast). */
@keyframes lsheet{from{transform:translateY(100%)}to{transform:translateY(0)}}
/* LSheet exit + scrim fade (2026-11-18: the sheet vanished on close and its scrim popped in). */
@keyframes lsheetout{from{transform:translateY(0)}to{transform:translateY(100%)}}
@keyframes lfade{from{opacity:0}to{opacity:1}}
@keyframes lfadeout{from{opacity:1}to{opacity:0}}
/* Screen entrances (ReachApp useReachEnter): a crossfade between the main tabs, a short slide into
   any other screen — the main app's ScreenTransition timings. Two names each (-a/-b) so a
   back-to-back navigation restarts the animation. */
@keyframes lEnterFadeA{from{opacity:0}to{opacity:1}}
@keyframes lEnterFadeB{from{opacity:0}to{opacity:1}}
@keyframes lEnterSlideA{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}
@keyframes lEnterSlideB{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}
.l-enter-fade-a{animation:lEnterFadeA .34s cubic-bezier(.22,.61,.36,1);}
.l-enter-fade-b{animation:lEnterFadeB .34s cubic-bezier(.22,.61,.36,1);}
.l-enter-slide-a{animation:lEnterSlideA .38s cubic-bezier(.22,.61,.36,1);}
.l-enter-slide-b{animation:lEnterSlideB .38s cubic-bezier(.22,.61,.36,1);}
@media (prefers-reduced-motion: reduce){
  .l-enter-fade-a,.l-enter-fade-b,.l-enter-slide-a,.l-enter-slide-b{animation:none;}
  /* Inline-style animations (animation: 'lpulse …' in the lead detail's JSX) can't be stilled by
     a class rule — neutralise the keyframe instead (2026-11-20). */
  @keyframes lpulse{0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(200,71,15,0.4)}}
}
@keyframes ltoast{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
/* Press feedback (2026-11-18): Reach is outside the main app's .kp-fx scope, so its buttons and
   pressable cards ([data-kp-press], LCard) gave no sign of a tap. Same spring as .kp-fx. */
.reach-root .l-btn:not(:disabled),
.reach-root [data-kp-press] { transition: transform .14s cubic-bezier(.34,1.56,.64,1), filter .18s ease; }
.reach-root .l-btn:not(:disabled):active { transform: scale(.965); }
.reach-root [data-kp-press]:active { transform: scale(.985); filter: brightness(.98); }
@media (prefers-reduced-motion: reduce){
  .reach-root .l-btn:not(:disabled):active, .reach-root [data-kp-press]:active { transform: none; }
}
/* AI work in progress (draft sheet's "Drafting…"): the sparkle pulses — quick enough to read as
   working (the shared .kp-breathe is a 3.4s ambient cycle). Reduced motion: a steady icon. */
@keyframes lAiPulse{0%,100%{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1.08)}}
.l-ai-pulse{animation:lAiPulse 1.1s ease-in-out infinite;}
@media (prefers-reduced-motion: reduce){ .l-ai-pulse{animation:none;} }
/* LMeter fill grows in from the left on first render (later value changes ease via width). */
@keyframes lMeterIn{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.l-meter-in{transform-origin:left center;animation:lMeterIn .6s cubic-bezier(.22,.61,.36,1) .12s both;}
@media (prefers-reduced-motion: reduce){ .l-meter-in{animation:none;} }
/* LEmpty text rise, after the icon pop (.kp-empty-ico, tokens-v2.css). */
@keyframes lEmptyIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.l-empty-in{animation:lEmptyIn .36s cubic-bezier(.22,.61,.36,1) .16s both;}
@media (prefers-reduced-motion: reduce){ .l-empty-in{animation:none;} }
/* List rows rise in turn (2026-11-19, Leads list + funnel bucket): --i is the row's slot (0..8). */
@keyframes lRowIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.l-row-in{animation:lRowIn .38s cubic-bezier(.22,.61,.36,1) both;animation-delay:calc(60ms + var(--i,0) * 45ms);}
/* A disclosure chevron that turns a quarter when its section is open. */
.l-turn{transition:transform .22s cubic-bezier(.22,.61,.36,1);}
.l-turn[data-open]{transform:rotate(90deg);}
/* The interest just made headline glows once at the top (Lead edit, 2026-11-20). */
@keyframes lPromoted{0%{box-shadow:0 0 0 0 rgba(230,146,84,0.55)}100%{box-shadow:0 0 0 12px rgba(230,146,84,0)}}
.l-promoted{animation:lPromoted .7s cubic-bezier(.22,.61,.36,1) .25s;}
@media (prefers-reduced-motion: reduce){ .l-promoted{animation:none;} }
/* A done follow-up fades and slips away after its check pops (Today, 2026-11-19). */
@keyframes lTaskOut{0%,45%{opacity:1;transform:none}100%{opacity:0;transform:translateX(18px)}}
.l-task-out{animation:lTaskOut .65s cubic-bezier(.4,0,.2,1) both;pointer-events:none;}
/* Streak week bars grow up in turn. */
@keyframes lBarIn{from{transform:scaleY(0)}to{transform:none}}
.l-bar-in{transform-origin:bottom center;animation:lBarIn .4s cubic-bezier(.34,1.56,.64,1) both;animation-delay:calc(120ms + var(--i,0) * 40ms);}
@media (prefers-reduced-motion: reduce){ .l-row-in,.l-task-out,.l-bar-in{animation:none;} .l-turn{transition:none;} }
/* LToast enter / exit (2026-11-18: toasts vanished in one frame). */
@keyframes ltoastout{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}
.l-toast-in{animation:ltoast .25s cubic-bezier(.2,.8,.2,1);}
.l-toast-out{animation:ltoastout .2s cubic-bezier(.4,0,1,1) both;}
@media (prefers-reduced-motion: reduce){ .l-toast-in,.l-toast-out{animation:none;} }
@keyframes lpulse{0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(200,71,15,0.4)}50%{transform:scale(1.05);box-shadow:0 0 0 16px rgba(200,71,15,0)}}
@keyframes lwave{from{transform:scaleY(0.35)}to{transform:scaleY(1.5)}}
