/* Jump Edge components. Every value comes from tokens.css (no raw colors). Logical properties: RTL and LTR flip on their own. */
.je{font-family:var(--font-sans);color:var(--ink)}
.je-press{transition:transform 220ms cubic-bezier(.22,1,.36,1)}
.je-press:active{transform:scale(.97);transition-duration:120ms}
@media (prefers-reduced-motion:reduce){.je-press,.je-ring-arc,.je-check path{transition:none!important;animation:none!important}.je-press:active{transform:none}}
/* Button */
.je-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:44px;padding-block:var(--space-2);padding-inline:var(--space-4);border-radius:var(--radius-md);border:1px solid transparent;font:600 15px/1.2 var(--font-sans);cursor:pointer;text-decoration:none;text-align:center;max-width:100%;box-sizing:border-box}
.je-btn svg{width:20px;height:20px;flex:none}
.je-btn--primary{background:var(--brand);color:var(--on-brand)}
.je-btn--primary:hover{filter:brightness(1.06)}
.je-btn--secondary{background:var(--card);color:var(--ink);border-color:var(--line)}
.je-btn--secondary:hover{background:var(--brand2)}
.je-btn--ghost{background:transparent;color:var(--brand)}
.je-btn--danger{background:var(--bad);color:var(--card)}
.je-btn:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.je-btn[disabled]{opacity:.45;cursor:not-allowed}
.je-btn--lg{min-height:56px;font-size:17px;padding-inline:var(--space-6);border-radius:var(--radius-lg)}
/* Field */
.je-field{display:grid;gap:var(--space-1)}
.je-field label{font:500 13px/18px var(--font-sans);color:var(--ink)}
.je-input{min-height:44px;padding-block:var(--space-2);padding-inline:var(--space-3);border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--card);color:var(--ink);font:400 16px/1.4 var(--font-sans)}
.je-input:focus{outline:2px solid var(--brand);outline-offset:0;border-color:var(--brand)}
.je-field .je-hint{font:400 13px/18px var(--font-sans);color:var(--mute)}
.je-field--error .je-input{border-color:var(--bad)}
.je-field--error .je-hint{color:var(--bad)}
/* Card + stat */
.je-card{box-sizing:border-box;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);padding:var(--space-4)}
.je-stat{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:var(--space-1)}
.je-stat-label{font:500 13px/18px var(--font-sans);color:var(--mute)}
.je-stat-value{font:600 32px/36px var(--font-sans);font-variant-numeric:tabular-nums;color:var(--ink)}
.je-stat-change{font:500 13px/18px var(--font-sans)}
.je-stat-change.up{color:var(--good)}.je-stat-change.down{color:var(--bad)}
.je-stat-action{margin-block-start:var(--space-3)}.je-stat-action .je-btn{width:100%}
/* Badge */
.je-badge{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:2px;padding-inline:var(--space-2);border-radius:var(--radius-pill);font:500 13px/18px var(--font-sans);white-space:nowrap}
.je-badge--brand{background:var(--brand2);color:var(--brand)}
.je-badge--good{background:var(--good2);color:var(--good)}
.je-badge--warn{background:var(--warn2);color:var(--warn)}
.je-badge--bad{background:var(--bad2);color:var(--bad)}
.je-badge--neutral{background:var(--line2);color:var(--mute)}
/* Nav: one component, four placements (profiles) */
.je-shell{display:grid;background:var(--bg);border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;min-height:180px}
.je-shell[data-nav=start]{grid-template-columns:auto 1fr}
.je-shell[data-nav=end]{grid-template-columns:1fr auto}
.je-shell[data-nav=end] .je-nav{order:2}
.je-shell[data-nav=top]{grid-template-rows:auto 1fr}
.je-shell[data-nav=bottom]{grid-template-rows:1fr auto}
.je-shell[data-nav=bottom] .je-nav{order:2}
.je-nav{display:flex;gap:var(--space-1);padding:var(--space-2);background:var(--side);color:var(--side-ink)}
.je-shell[data-nav=start] .je-nav,.je-shell[data-nav=end] .je-nav{flex-direction:column}
.je-shell[data-nav=top] .je-nav,.je-shell[data-nav=bottom] .je-nav{justify-content:space-around}
.je-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:44px;min-height:44px;justify-content:center;padding:var(--space-1) var(--space-2);border-radius:var(--radius-md);color:inherit;text-decoration:none;font:500 12px/16px var(--font-sans)}
.je-nav a[aria-current=page]{background:var(--side2);color:var(--card)}
.je-nav svg{width:22px;height:22px}
.je-main{padding:var(--space-4);display:grid;align-content:start;gap:var(--space-2)}
.je-shell--ease .je-nav a{font-size:14px;min-height:56px}.je-shell--ease .je-nav svg{width:28px;height:28px}
/* Trust ring (idea 121) */
.je-ring{display:inline-flex;align-items:center;gap:var(--space-2);font:500 13px/18px var(--font-sans);color:var(--mute)}
.je-ring svg{width:22px;height:22px}
.je-ring-track{fill:none;stroke:var(--line);stroke-width:3}
.je-ring-arc{fill:none;stroke-width:3;stroke-linecap:round;transform-origin:center}
.je-ring[data-state=saved] .je-ring-arc{stroke:var(--good)}
.je-ring[data-state=syncing] .je-ring-arc{stroke:var(--brand);stroke-dasharray:20 60;animation:je-spin 1s linear infinite}
.je-ring[data-state=offline] .je-ring-arc{stroke:var(--warn);stroke-dasharray:4 6}
@keyframes je-spin{to{transform:rotate(360deg)}}
/* Payment check */
.je-check path{fill:none;stroke:var(--good);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30;animation:je-draw 240ms 80ms ease-out forwards}
@keyframes je-draw{to{stroke-dashoffset:0}}
/* Icons */
.je-icon{width:24px;height:24px;flex:none}
.je-icon .b{fill:none;stroke:currentColor;stroke-width:1.75;stroke-linejoin:miter}
.je-icon .d{fill:none;stroke:currentColor;stroke-width:1.75}
.je-icon--rounded .b,.je-icon--rounded .d{stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.je-icon--filled .b{fill:currentColor;stroke:currentColor}
.je-icon--filled .d{stroke:var(--card)}
.je-icon--duo .b{fill:var(--brand2);stroke:currentColor}
/* ===== Motion knobs (one place to tune everything later) =====
   html[data-motion="off"] turns all motion off; "calm" slows and shrinks it; default is subtle. */
:root{--je-dur-fast:180ms;--je-dur:280ms;--je-dur-slow:520ms;--je-dur-icon:1400ms;--je-ease-io:cubic-bezier(.65,0,.35,1);--je-ease:cubic-bezier(.2,.8,.2,1);--je-ease-soft:cubic-bezier(.22,1,.36,1);--je-ease-wave:cubic-bezier(.45,0,.55,1);--je-ease-pop:cubic-bezier(.34,1.2,.64,1);--je-move:1}
html[data-motion=calm]{--je-dur:400ms;--je-dur-slow:760ms;--je-dur-icon:1600ms;--je-move:.5}
/* ===== Living icons =====
   Each icon plays one full, complete gesture (start -> peak -> rest), slow and even (ease-in-out, ~1.2s),
   always inside its 24px frame. Plays on entry, on hover/press (never restarts mid-motion), or every few seconds with data-anim="loop".
   Paths carry pathLength=100, so every "draw" runs the whole line from start to end. */
.je-icon .b,.je-icon .d{transform-box:fill-box;transform-origin:center}
.je-icon.je-in{animation:je-i-in var(--je-dur) var(--je-ease-io) both}
@keyframes je-i-in{from{opacity:0;transform:scale(.92)}}
/* plus: the cross turns a full half-turn while the circle breathes */
.je-on.je-icon--plus .d{animation:je-i-turn var(--je-dur-icon) var(--je-ease-io)}
.je-on.je-icon--plus .b{animation:je-i-breathe var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-turn{from{transform:rotate(0)}to{transform:rotate(90deg)}}
@keyframes je-i-breathe{50%{transform:scale(.92)}}
/* check: the circle draws itself all the way round, then the tick draws */
.je-on.je-icon--check .b{stroke-dasharray:100;animation:je-i-draw var(--je-dur-icon) var(--je-ease-io) both}
.je-on.je-icon--check .d{stroke-dasharray:100;animation:je-i-draw calc(var(--je-dur-icon)*.6) calc(var(--je-dur-icon)*.55) var(--je-ease-io) both}
@keyframes je-i-draw{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
/* bell: a full swing that settles, the clapper follows a beat later */
.je-on.je-icon--bell .b{transform-box:view-box;transform-origin:12px 4px;animation:je-i-swing calc(var(--je-dur-icon)*1.25) var(--je-ease-io)}
.je-on.je-icon--bell .d{transform-box:view-box;transform-origin:12px 4px;animation:je-i-swing calc(var(--je-dur-icon)*1.25) 90ms var(--je-ease-io)}
@keyframes je-i-swing{22%{transform:rotate(calc(7deg*var(--je-move)))}50%{transform:rotate(calc(-5deg*var(--je-move)))}76%{transform:rotate(calc(2deg*var(--je-move)))}}
/* device: three soft buzzes, the screen dot pulses */
.je-on.je-icon--device .b{animation:je-i-buzz var(--je-dur-icon) var(--je-ease-io)}
.je-on.je-icon--device .d{animation:je-i-buzz var(--je-dur-icon) var(--je-ease-io),je-i-dim var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-buzz{20%,60%{transform:translateX(calc(-.8px*var(--je-move)))}40%,80%{transform:translateX(calc(.8px*var(--je-move)))}}
@keyframes je-i-dim{50%{opacity:.25}}
/* home: rises, holds, settles back down */
.je-on.je-icon--home .b{animation:je-i-rise var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-rise{40%,55%{transform:translateY(calc(-2px*var(--je-move)))}}
/* calendar: the page lifts and turns */
.je-on.je-icon--calendar .d{animation:je-i-lift var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-lift{40%,55%{transform:translateY(calc(-1.2px*var(--je-move)))}}
.je-on.je-icon--calendar .b{transform-origin:top;animation:je-i-page var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-page{45%{transform:scaleY(.9)}}
/* income: the card slides all the way into the wallet */
.je-on.je-icon--income .d{animation:je-i-coin var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-coin{0%{opacity:0;transform:translateY(calc(3px*var(--je-move)))}35%{opacity:1}100%{transform:none}}
/* users: the second person walks in, the first nods */
.je-on.je-icon--users .d{animation:je-i-join var(--je-dur-icon) var(--je-ease-io)}
.je-on.je-icon--users .b{animation:je-i-nod var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-join{0%{opacity:0;transform:translateX(calc(-3px*var(--je-move)))}40%{opacity:1}100%{transform:none}}
@keyframes je-i-nod{50%{transform:translateY(calc(-1px*var(--je-move)))}}
/* chart: the bars grow up from the floor to full height */
.je-on.je-icon--chart .b{transform-origin:bottom;animation:je-i-grow var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-grow{from{transform:scaleY(.35)}}
/* settings: the two knobs slide to one side, across, and back */
.je-on.je-icon--settings .b{animation:je-i-slide var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-slide{35%{transform:translateX(calc(-2px*var(--je-move)))}70%{transform:translateX(calc(1.5px*var(--je-move)))}}
/* search: the lens looks around in a small circle */
.je-on.je-icon--search .b,.je-on.je-icon--search .d{animation:je-i-look var(--je-dur-icon) var(--je-ease-io)}
@keyframes je-i-look{30%{transform:translate(calc(-1px*var(--je-move)),calc(-.8px*var(--je-move)))}65%{transform:translate(calc(1px*var(--je-move)),calc(-.8px*var(--je-move)))}}
/* receipt: the paper comes out, then each line prints */
.je-on.je-icon--receipt .b{animation:je-i-paper var(--je-dur-icon) var(--je-ease-io)}
.je-on.je-icon--receipt .d{stroke-dasharray:100;animation:je-i-draw calc(var(--je-dur-icon)*.6) calc(var(--je-dur-icon)*.4) var(--je-ease-io) both}
@keyframes je-i-paper{0%{opacity:0;transform:translateY(calc(-2px*var(--je-move)))}40%{opacity:1}100%{transform:none}}
/* ===== Trust ring: the message changes by itself with a soft fade ===== */
.je-ring-text{transition:opacity var(--je-dur) var(--je-ease),transform var(--je-dur) var(--je-ease)}
.je-ring-text.je-out{opacity:0;transform:translateY(3px)}
.je-ring svg circle{transition:stroke var(--je-dur) var(--je-ease)}
/* ===== Payment done: soft entrance (circle pops in, check draws, words fade up) ===== */
.je-paid{display:inline-flex;align-items:center;gap:var(--space-3);font:600 16px/22px var(--font-sans);color:var(--ink)}
.je-paid-mark{width:40px;height:40px;border-radius:var(--radius-pill);background:var(--good2);display:grid;place-items:center;flex:none}
.je-paid-mark svg{width:24px;height:24px}
.je-paid-mark path{fill:none;stroke:var(--good);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:22;stroke-dashoffset:22}
.je-paid-sub{display:block;font:500 13px/18px var(--font-sans);color:var(--mute)}
.je-paid.je-on .je-paid-mark{animation:je-pop var(--je-dur-slow) var(--je-ease-pop) both}
.je-paid.je-on .je-paid-mark path{animation:je-draw-p var(--je-dur) 180ms var(--je-ease) forwards}
.je-paid.je-on .je-paid-text{animation:je-rise var(--je-dur-slow) 260ms var(--je-ease) both}
@keyframes je-pop{from{opacity:0;transform:scale(.5)}}
@keyframes je-draw-p{to{stroke-dashoffset:0}}
@keyframes je-rise{from{opacity:0;transform:translateY(6px)}}
/* ===== Language switch: one tap Arabic / English ===== */
.je-lang{display:inline-flex;padding:3px;gap:2px;border:1px solid var(--line);border-radius:var(--radius-pill);background:var(--card)}
.je-lang button{min-height:36px;min-width:72px;padding-inline:var(--space-3);border:0;border-radius:var(--radius-pill);background:transparent;color:var(--mute);font:600 14px/1 var(--font-sans);cursor:pointer;transition:background var(--je-dur) var(--je-ease),color var(--je-dur) var(--je-ease)}
.je-lang button[aria-pressed=true]{background:var(--brand);color:var(--on-brand)}
.je-swap{transition:opacity var(--je-dur-fast) var(--je-ease)}
.je-swap.je-out{opacity:0}
/* Motion off: device setting or our switch */
@media (prefers-reduced-motion:reduce){.je-icon,.je-icon *,.je-paid *,.je-ring-text,.je-swap{animation:none!important;transition:none!important}.je-paid-mark path{stroke-dashoffset:0}}
html[data-motion=off] .je-icon,html[data-motion=off] .je-icon *,html[data-motion=off] .je-paid *,html[data-motion=off] .je-ring-text,html[data-motion=off] .je-swap,html[data-motion=off] .je-press,html[data-motion=off] .je-ring-arc{animation:none!important;transition:none!important}
html[data-motion=off] .je-paid-mark path{stroke-dashoffset:0}
