/* Tokens mirror the app's theme (Khalsen-App/src/theme/colors.ts). */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #e0e7ff;
  --on-primary: #ffffff;
  --on-primary-soft: #3730a3;
  --positive: #047857;
  --positive-soft: #d1fae5;
  --negative: #c62828;
  --negative-soft: #fee2e2;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --surface: #f9f9ff;
  --card: #ffffff;
  --surface-low: #f1f3ff;
  --surface-mid: #e9edff;
  --ink: #141b2b;
  --muted: #475569;
  --faint: #64748b;
  --border: #e2e8f0;
  --brand-ink: #0f172a;
  /* The app's brandBackdrop (the header logo's tile), brandSplash (the intro) and brandInk. */
  --brand-backdrop: #c7d2fe;
  --brand-splash: #c7d2fe;
  --backdrop-ink: #141b2b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

:root[data-theme='dark'] {
    --primary: #a5b4fc;
    --primary-hover: #c7d2fe;
    --primary-soft: #312e81;
    --on-primary: #1e1b4b;
    --on-primary-soft: #e0e7ff;
    --positive: #34d399;
    --positive-soft: #064e3b;
    --negative: #f87171;
    --negative-soft: #7f1d1d;
    --amber: #fbbf24;
    --amber-soft: #78350f;
    --surface: #0b0f19;
    --card: #161b27;
    --surface-low: #1b2130;
    --surface-mid: #212838;
    --ink: #e2e6f5;
    --muted: #cbd5e1;
    --faint: #94a3b8;
    --border: #2a3142;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --brand-backdrop: #2a3142;
    --brand-splash: #0b0f19;
    --backdrop-ink: #e2e6f5;
    color-scheme: dark;
}

/* Arabic is set in IBM Plex Sans Arabic, as in the app. */
html[lang='ar'] { --font: 'IBM Plex Sans Arabic', system-ui, sans-serif; }

/* Long-form pages carry both languages; show the one in use. */
html[lang='en'] [data-lang='ar'],
html[lang='ar'] [data-lang='en'] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
html[lang='ar'] :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Amounts stay left-to-right ("+1,240 EGP") inside Arabic text. */
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ================================================================ header */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; }
.brand .bm-slot, .brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  height: 40px;
  padding: 0 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.lang-toggle:lang(ar) { font-family: 'IBM Plex Sans Arabic', sans-serif; }
.lang-toggle:lang(en) { font-family: 'Inter', sans-serif; }
.lang-toggle:hover { background: var(--surface-low); }

/* ================================================================ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-low); }
.btn-lg { height: 52px; font-size: 16px; padding: 0 24px; }

.stores { display: flex; flex-wrap: wrap; gap: 16px 12px; }
/* The official badges' look in every theme and section: black, a grey rule, white type. */
.store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid #a6a6a6;
}
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: 11px; line-height: 1.2; opacity: 0.9; }
html[lang='en'] .store[data-store='android'] small { text-transform: uppercase; font-size: 10px; }
.store strong { display: block; font-size: 17px; line-height: 1.2; font-family: 'Inter', sans-serif; }
.store.is-soon { cursor: default; }
/* "Coming soon", pinned to the badge's top corner. */
.store-soon {
  position: absolute;
  top: -9px;
  inset-inline-end: -6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 14px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.store-soon[hidden] { display: none; }
.stores-sm .store { height: 42px; padding: 0 12px; gap: 8px; }
.stores-sm .store svg { width: 20px; height: 20px; }
.stores-sm .store strong { font-size: 14px; }
.stores-sm .store small { font-size: 10px; }

/* ================================================================ sections */
.section { padding: 96px 0; }
.section.alt { background: var(--card); border-block: 1px solid var(--border); }
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--on-primary-soft);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ================================================================ hero */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.035em; }
.hero h1 .accent { color: var(--positive); }
.hero .lead { margin: 20px 0 32px; font-size: 19px; color: var(--muted); max-width: 520px; }

/* ================================================================ phone mockups
   App screens built in HTML so they follow the language toggle. */
.phone {
  position: relative;
  justify-self: center;
  width: 320px;
  max-width: 100%;
  border-radius: 42px;
  padding: 10px;
  background: var(--brand-ink);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22), inset 0 0 0 2px #1e293b;
}
.phone::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  translate: -50% 0;
  width: 84px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand-ink);
  z-index: 2;
}
.screen {
  position: relative;
  border-radius: 33px;
  background: var(--surface);
  padding: 48px 14px 16px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
}
.phone-sm { width: 270px; }
.phone-sm .screen { height: 520px; text-align: start; }
.phone-sm .s-row { padding: 7px 10px; }

.s-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.s-title strong { font-size: 16px; }
.s-title > span { font-size: 11px; color: var(--faint); }
.s-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 12px 2px 6px; }
html[lang='ar'] .s-label { letter-spacing: 0; font-size: 11px; }
.s-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.s-rows { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.s-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.s-row + .s-row { border-top: 1px solid var(--border); }
.s-row .grow { flex: 1; min-width: 0; }
.s-row b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-row small { display: block; font-size: 11px; color: var(--faint); }
.s-row .val { font-weight: 600; white-space: nowrap; }
.s-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; border-radius: 8px; background: var(--primary); color: var(--on-primary);
  font-weight: 600; font-size: 14px;
}
.s-btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--border); }
.s-btn svg { width: 16px; height: 16px; }
.s-note { margin-top: 8px; font-size: 11px; color: var(--faint); text-align: center; }

.tile {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--surface-low); font-size: 16px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 700; font-size: 12px;
}
.avatar.a2 { background: #fce7f3; color: #9d174d; }
.avatar.a3 { background: #dcfce7; color: #166534; }
.avatar.a4 { background: #fef3c7; color: #92400e; }
:root[data-theme='dark'] .avatar.a2 { background: #500724; color: #fbcfe8; }
:root[data-theme='dark'] .avatar.a3 { background: #14532d; color: #bbf7d0; }
:root[data-theme='dark'] .avatar.a4 { background: #78350f; color: #fde68a; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; border: 2px solid var(--card); }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-inline-start: -6px; }

.chip { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.chip.pos { background: var(--positive-soft); color: var(--positive); }
.chip.neg { background: var(--negative-soft); color: var(--negative); }
.chip.soft { background: var(--surface-mid); color: var(--muted); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-mid); border-radius: 10px; margin-bottom: 10px; }
.seg span { flex: 1; text-align: center; padding: 6px 4px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg span.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

.field { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--primary); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.field .tile { width: 36px; height: 36px; font-size: 18px; }
.field b { font-size: 15px; }
.field .caret { width: 1.5px; height: 18px; background: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.big-amount { display: inline-block; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.big-amount small { font-size: 14px; color: var(--faint); font-weight: 600; margin-inline-start: 4px; }
.pos-text { color: var(--positive); }
.neg-text { color: var(--negative); }


/* The hero screen */
.hero .phone .screen { padding-bottom: 14px; }

/* ================================================================ how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step .phone { margin-bottom: 32px; }
.step-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  margin-bottom: 14px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}
.step-icon svg { width: 26px; height: 26px; }
.step .kicker { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { color: var(--muted); max-width: 320px; }

/* ================================================================ features showcase */
.showcase { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: center; }
.tabs { display: flex; flex-direction: column; gap: 8px; }
.tab {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px 16px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.tab:hover { background: var(--card); }
.tab[aria-selected='true'] { background: var(--card); border-color: var(--border); box-shadow: var(--shadow); }
.tab .ico {
  grid-row: span 2;
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-mid); color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.tab[aria-selected='true'] .ico { background: var(--primary); color: var(--on-primary); }
.tab .ico svg { width: 24px; height: 24px; }
.tab h3 { font-size: 17px; }
.tab p {
  color: var(--muted);
  font-size: 15px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.tab[aria-selected='true'] p { max-height: 120px; opacity: 1; }
/* Progress of the auto-advance, under the selected tab. */
.tab::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--primary);
}
.is-ticking .tab[aria-selected='true']::after { animation: tick var(--showcase-interval, 6s) linear forwards; }
@keyframes tick { to { width: 100%; } }

.showcase-visual { justify-self: center; }
.showcase .phone { width: 320px; }
.showcase .screen { height: 580px; }
.panel {
  position: absolute;
  inset: 0;
  padding: 48px 14px 16px;
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.35s ease, translate 0.35s ease;
  pointer-events: none;
}
.panel.is-active { opacity: 1; translate: 0 0; pointer-events: auto; }

/* Pager dots for the phone-width carousels. */
.dots { display: none; justify-content: center; gap: 2px; margin-top: 16px; }
.steps + .dots { margin-top: -16px; }
.dots button {
  width: 20px;
  height: 20px;
  padding: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  background-clip: content-box;
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.dots button[aria-current='true'] { width: 34px; background-color: var(--primary); }

/* Receipt being scanned */
.receipt {
  position: relative;
  background: #fff;
  color: #1f2937;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  direction: ltr;
}
.receipt .r-head { text-align: center; font-weight: 700; margin-bottom: 8px; }
.receipt .r-line { display: flex; justify-content: space-between; padding: 2px 0; }
.receipt .r-sep { border-top: 1px dashed #9ca3af; margin: 6px 0; }
.receipt .r-hit { background: color-mix(in srgb, #4f46e5 14%, transparent); border-radius: 3px; }
.scanline {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: #4f46e5;
  box-shadow: 0 0 18px 6px rgba(79, 70, 229, 0.35);
  animation: scan 2.4s ease-in-out infinite alternate;
}
@keyframes scan { to { top: calc(100% - 3px); } }
@media (prefers-reduced-motion: reduce) { .scanline, .field .caret { animation: none; } }
.found { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; color: var(--positive); }
.found svg { width: 18px; height: 18px; }

/* Language card in the last panel */
.lang-card { direction: ltr; }
.lang-card[dir='rtl'] { direction: rtl; font-family: 'IBM Plex Sans Arabic', sans-serif; }
.currencies { display: flex; flex-wrap: wrap; gap: 6px; }
.currencies span { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); }

.offline-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 10px;
  background: var(--amber-soft); color: var(--amber); font-weight: 600; font-size: 12px;
}
.offline-banner svg { width: 16px; height: 16px; flex: none; }

/* ================================================================ FAQ */
.faq { max-width: 780px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--faint); font-size: 24px; line-height: 1; transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* ================================================================ download CTA */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  background: var(--brand-ink);
  color: #fff;
  border-radius: 32px;
  padding: 64px 56px;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  inset-inline-end: -160px; top: -220px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45), transparent 65%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(30px, 4vw, 46px); max-width: 620px; }
.cta p { margin: 16px 0 32px; color: #cbd5e1; max-width: 540px; font-size: 18px; }
.cta-mark {
  display: grid; place-items: center;
  width: 180px; height: 180px; border-radius: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  rotate: 6deg;
}
.cta-mark .bm-slot, .cta-mark img { width: 112px; height: 112px; }

/* ================================================================ footer */
.footer { border-top: 1px solid var(--border); background: var(--card); padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); margin: 14px 0 20px; max-width: 320px; }
.footer h4 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
html[lang='ar'] .footer h4 { letter-spacing: 0; font-size: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); text-decoration: none; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--faint); font-size: 14px;
}
.footer-meta { display: inline-flex; align-items: center; gap: 14px; }

/* ================================================================ inner pages */
.page-hero { padding: 72px 0 40px; }
.page-hero h1 { font-size: clamp(36px, 5vw, 52px); }
.page-hero p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 640px; }
.page-hero .updated { font-size: 14px; color: var(--faint); margin-top: 10px; }

.prose { max-width: 760px; padding-bottom: 96px; color: var(--muted); font-size: 16px; }
.prose h2 { color: var(--ink); font-size: 22px; margin: 40px 0 12px; scroll-margin-top: 90px; }
.prose h3 { color: var(--ink); font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--primary); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0 8px; }
.value { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.value .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--on-primary-soft); margin-bottom: 14px; }
.value .ico svg { width: 22px; height: 22px; }
.value h3 { margin: 0 0 6px; }
.value p { margin: 0; font-size: 15px; }

/* Contact */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-field :is(input, select, textarea) {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
}
.form-field textarea { min-height: 160px; resize: vertical; }
.form-field :is(input, select, textarea):focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.form-card .btn { margin-top: 20px; }
.form-error { margin-top: 14px; color: var(--negative); font-weight: 500; }
.form-done { text-align: center; padding: 24px 0; }
.form-done .ico { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--positive-soft); color: var(--positive); }
.form-done .ico svg { width: 28px; height: 28px; }
.form-done h2 { font-size: 24px; margin-bottom: 8px; }
.form-done p { color: var(--muted); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ================================================================ share pages (join, expense) */
.share-page { padding: 40px 0 96px; }
.share-wrap { max-width: 480px; margin: 0 auto; }
.share-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 12px 12px 16px; margin-bottom: 16px;
}
html[dir='rtl'] .share-bar { padding: 12px 16px 12px 12px; }
.share-bar span { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.share-bar .bm-slot { width: 24px; height: 24px; }
.share-bar .btn { height: 38px; font-size: 14px; padding: 0 14px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card + .card { margin-top: 12px; }

.join-card { text-align: center; padding: 40px 28px; box-shadow: var(--shadow); }
.join-card > .bm-slot { display: flex; width: 64px; height: 64px; margin: 0 auto 20px; }
.join-card h1 { font-size: 26px; margin-bottom: 10px; }
.join-card p { color: var(--muted); }
.join-card .btn { width: 100%; margin: 28px 0 28px; }
.join-card .note { font-size: 14px; margin-bottom: 14px; }
.join-card .stores { justify-content: center; }
.join-card .home { display: inline-block; margin-top: 24px; font-size: 14px; color: var(--primary); }

/* Expense preview: mirrors the app's expense screen. */
.x-hero { text-align: center; padding: 32px 24px 28px; }
.x-tile { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; background: var(--surface-low); display: grid; place-items: center; font-size: 36px; }
.x-hero h1 { font-size: 24px; }
.x-amount { margin-top: 6px; color: var(--primary); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.x-amount small { font-size: 18px; margin-inline-start: 6px; font-weight: 600; }
.x-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.x-pills span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--surface-mid); color: var(--muted); }
.x-pills span.group { background: var(--primary-soft); color: var(--on-primary-soft); }
.x-pills span.sample { background: var(--amber-soft); color: var(--amber); }
.x-date { font-size: 13px; color: var(--faint); }

.x-block { padding: 18px 18px 6px; }
.x-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
html[lang='ar'] .x-label { letter-spacing: 0; font-size: 13px; }
.x-label svg { width: 18px; height: 18px; color: var(--primary); }
.x-label .foot { margin-inline-start: auto; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--faint); }
.x-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.x-row + .x-row, .x-person + .x-person { border-top: 1px solid var(--border); }
.x-row .grow { flex: 1; min-width: 0; }
.x-row b { font-weight: 600; }
.x-row .amt { font-weight: 600; white-space: nowrap; }
.x-row .pct { display: block; font-size: 12px; color: var(--faint); }
.x-sub { padding: 0 0 12px; margin-inline-start: 42px; display: grid; gap: 6px; }
.x-sub div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.x-sub svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.x-sub .x-times { color: var(--primary); font-weight: 600; }
.x-sub .x-shared { color: var(--faint); }
html[dir='rtl'] .x-sub svg { scale: -1 1; }
.x-sub .amt { margin-inline-start: auto; font-weight: 600; color: var(--ink); }

.x-person summary { list-style: none; cursor: pointer; }
.x-person summary::-webkit-details-marker { display: none; }
.x-person .chev { width: 18px; height: 18px; color: var(--faint); transition: rotate 0.15s; flex: none; }
.x-person[open] .chev { rotate: 180deg; }
.x-person:not(.has-items) .chev { visibility: hidden; }
.x-person:not(.has-items) summary { cursor: default; }
.x-bar { height: 4px; border-radius: 4px; background: var(--surface-mid); margin-top: 6px; overflow: hidden; }
.x-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }

.x-receipt { padding: 18px; }
.x-line { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; }
.x-line .q { color: var(--faint); min-width: 28px; }
.x-line .amt { margin-inline-start: auto; font-weight: 500; }
.x-line.extra { color: var(--muted); }
.x-line.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-weight: 700; font-size: 16px; }
.x-line.sub { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; color: var(--muted); }
.x-more { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--primary); }
.x-more .chev { width: 18px; height: 18px; transition: rotate 0.15s; }
.x-more[aria-expanded="true"] .chev { rotate: 180deg; }
.x-more .less, .x-more[aria-expanded="true"] .more { display: none; }
.x-more[aria-expanded="true"] .less { display: inline; }
.x-charge { color: var(--muted); }
.x-instapay { display: flex; gap: 8px; width: 100%; margin: 6px 0 10px; background: var(--card); color: var(--ink); border-color: var(--border); }
.x-instapay:hover { background: var(--surface-low); }
.x-instapay .x-ip { width: 20px; height: 20px; border-radius: 5px; }
.x-line .avatars { margin-inline-start: 4px; }

.x-cta { margin-top: 24px; padding: 28px 24px; text-align: center; background: var(--brand-ink); color: #fff; border-radius: var(--radius-lg); }
.x-cta h2 { font-size: 22px; }
.x-cta p { color: #cbd5e1; margin: 8px 0 20px; }
.x-cta .stores { justify-content: center; }

.x-state { text-align: center; padding: 48px 24px; }
.x-state h1 { font-size: 22px; margin-bottom: 8px; }
.x-state p { color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--surface-mid), var(--surface-low), var(--surface-mid)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ================================================================ the خالصين stamp
   Same as the app's KhalsenStamp: tilted, double-ruled (solid outside, dashed inside), in
   the money-in green, set in IBM Plex Sans Arabic Bold. It reads خالصين in both languages. */
.k-stamp {
  position: relative;
  display: inline-block;
  rotate: -7deg;
  border: 2px solid var(--positive);
  border-radius: 8px;
  padding: 2px;
  background: color-mix(in srgb, var(--positive) 6%, var(--card));
  color: var(--positive);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
  transition: rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.k-stamp > span {
  display: block;
  border: 1px dashed color-mix(in srgb, var(--positive) 70%, transparent);
  border-radius: 4px;
  padding: 1px 12px;
  font-size: 17px;
}
.k-stamp.sm { border-width: 1.5px; }
.k-stamp.sm > span { font-size: 13px; padding: 0 8px; }
.k-stamp.lg { border-width: 3px; padding: 3px; border-radius: 10px; }
.k-stamp.lg > span { border-width: 1.5px; font-size: 30px; padding: 2px 16px; }
.k-stamp:hover { rotate: -2deg; }
/* The ink ring that spreads when it lands. */
.k-stamp::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--positive);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
}

/* Landing, like the app: pressed in hard from 1.8×, squashes to 0.92, springs to rest. */
@keyframes stamp-land {
  0% { opacity: 0; scale: 1.8; animation-timing-function: cubic-bezier(0.55, 0.06, 0.68, 0.19); }
  18% { opacity: 1; }
  28% { scale: 0.92; animation-timing-function: ease-out; }
  46% { scale: 1.05; }
  62% { scale: 0.985; }
  78% { scale: 1.01; }
  100% { opacity: 1; scale: 1; }
}
@keyframes stamp-ink {
  0% { opacity: 0.55; scale: 0.95; }
  100% { opacity: 0; scale: 1.35; }
}
@keyframes thump {
  0%, 100% { translate: 0 0; }
  40% { translate: 0 2px; }
}
.js [data-stamp] { opacity: 0; }
.js [data-stamp].is-stamped { animation: stamp-land 0.65s both; }
.js [data-stamp].is-stamped::after { animation: stamp-ink 0.7s 0.17s ease-out both; }
/* The card a stamp lands on gives a little. */
:has(> [data-stamp].is-stamped).stamp-host { animation: thump 0.3s 0.17s ease-out; }
/* Stamps inside the features showcase land each time their panel opens. */
.panel .k-stamp { opacity: 0; }
.panel.is-active .k-stamp { animation: stamp-land 0.65s 1.1s both; }
.panel.is-active .k-stamp::after { animation: stamp-ink 0.7s 1.27s ease-out both; }

/* ================================================================ the logo
   The app's mark (site.js markSvg): an indigo wallet, a receipt rising out of it, stamped
   خالصين. It animates as in the app: the receipt pops up, then the stamp lands (stamp-land). */
.bm-slot { display: inline-flex; flex: none; }
.bm-slot > img, .bm { display: block; width: 100%; height: 100%; }
.bm { overflow: visible; }
.bm-stamp { transform-box: fill-box; transform-origin: center; }
.bm.is-waiting .bm-receipt { transform: translateY(36px); }
.bm.is-waiting .bm-stamp { opacity: 0; }
.bm.is-playing .bm-receipt { animation: bm-rise 0.62s 0.12s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.bm.is-playing .bm-stamp { animation: stamp-land 0.65s 0.65s both; }
/* From inside the wallet (below its front edge) up into place, with a little overshoot. */
@keyframes bm-rise { from { transform: translateY(36px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .bm .bm-receipt, .bm .bm-stamp { animation: none !important; transform: none !important; opacity: 1 !important; }
}

/* The launch screen (home page, first visit in a session): the mark stamps, then flies into
   the header's logo (site.js runIntro). */
html.intro-on { overflow: hidden; }
.intro { position: fixed; inset: 0; z-index: 1000; cursor: pointer; }
/* The app's launch screen: a brand colour, not the page, so the white receipt stands off it. */
.intro-bg { position: absolute; inset: 0; background: var(--brand-splash); }
.bm-tile.is-backdrop { fill: var(--brand-backdrop); }
/* On the intro the tile is the background's own colour, until it lands on the header's. */
.intro .bm-tile.is-backdrop { fill: var(--brand-splash); }
.intro-mark { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; }
.intro-word {
  position: absolute; inset-inline: 0; top: calc(50% + 84px);
  display: flex; flex-direction: column; align-items: center;
  animation: intro-word 0.36s 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.intro-word span { font-size: 34px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; color: var(--backdrop-ink); }
.intro-word .ar { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 22px; letter-spacing: 0; line-height: 1.5; color: var(--primary); }
@keyframes intro-word { from { opacity: 0; translate: 0 8px; } }
/* A computer's screen: the logo at the app's launch size, the wordmark to match. */
@media (min-width: 768px) {
  .intro-mark { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
  .intro-word { top: calc(50% + 140px); }
  .intro-word span { font-size: 56px; }
  .intro-word .ar { font-size: 36px; }
}

/* ================================================================ scroll reveals */
.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    scale 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js [data-reveal='zoom'] { translate: 0 16px; scale: 0.92; }
.js [data-reveal='start'] { translate: -32px 0; }
html[dir='rtl'].js [data-reveal='start'] { translate: 32px 0; }
/* `html[dir]` so it outranks the right-to-left start offset above. */
html[dir].js [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }

/* ================================================================ hover and idle motion */
.header { transition: box-shadow 0.3s ease; }
.header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07); }

.brand .bm-slot { transition: rotate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.brand:hover .bm-slot { rotate: -12deg; scale: 1.08; }

/* Nav links: an underline that grows from the start. */
.nav a { position: relative; padding: 4px 0; transition: color 0.2s; }
.nav a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  scale: 0 1;
  transform-origin: left;
  transition: scale 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html[dir='rtl'] .nav a::after { transform-origin: right; }
.nav a:hover::after { scale: 1 1; }

.lang-toggle { transition: background 0.2s, translate 0.2s, border-color 0.2s; }
.lang-toggle:hover { translate: 0 -1px; border-color: var(--primary); }

/* Buttons lift, and the primary one catches the light. */
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary:hover { box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  translate: -120% 0;
  transition: translate 0.7s ease;
}
.btn-primary:hover::after { translate: 120% 0; }
.btn svg { transition: translate 0.2s; }

.store { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.store svg { transition: rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.store:not(.is-soon):hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2); }
.store:not(.is-soon):hover svg { rotate: -10deg; scale: 1.12; }
/* Not out yet: a small "not yet" shake. */
@keyframes not-yet {
  0%, 100% { translate: 0 0; }
  20% { translate: -4px 0; }
  40% { translate: 4px 0; }
  60% { translate: -2px 0; }
  80% { translate: 2px 0; }
}
.store.is-soon:hover { animation: not-yet 0.45s ease; }

/* Phones lean toward the mouse, with a soft glare. */
.phone {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.phone.is-tilting { transition: transform 0.08s linear; }
.phone[data-tilt]::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 33px;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 3;
}
.phone.is-tilting::after { opacity: 1; }
.s-row { transition: background 0.2s; }
.phone:hover .s-row:hover { background: var(--surface-low); }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* Hero: the phone floats, with notes from the app around it. */
.hero-visual { position: relative; justify-self: center; }
.hero-visual .float { animation: float 7s ease-in-out infinite; }
.float-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  line-height: 1.3;
  animation: float 5s ease-in-out infinite;
  transition: scale 0.25s ease;
}
.float-chip:hover { scale: 1.06; }
.float-chip b { display: block; font-weight: 600; }
.float-chip small { color: var(--faint); font-size: 12px; }
.float-chip .tick {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--positive-soft); color: var(--positive);
}
.float-chip .tick svg { width: 16px; height: 16px; }
.chip-a { top: 47%; inset-inline-start: -140px; animation-delay: -1.5s; }
.chip-b { top: 30%; inset-inline-end: -110px; animation-delay: -3s; }
.hero-stamp { position: absolute; z-index: 5; bottom: 9%; inset-inline-start: -48px; }

/* How it works: phones lift, icons wiggle. */
.step .phone { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), rotate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s; }
.step:hover .phone { translate: 0 -12px; rotate: -1.5deg; box-shadow: 0 40px 70px rgba(15, 23, 42, 0.28), inset 0 0 0 2px #1e293b; }
.step:nth-child(2):hover .phone { rotate: 1.5deg; }
@keyframes wiggle {
  0%, 100% { rotate: 0deg; scale: 1; }
  25% { rotate: -12deg; scale: 1.1; }
  50% { rotate: 10deg; scale: 1.1; }
  75% { rotate: -5deg; scale: 1.05; }
}
.step:hover .step-icon { animation: wiggle 0.6s ease; }
.step-stamp { position: absolute; z-index: 2; top: 100px; inset-inline-end: 22px; }

/* Features showcase */
.tab .ico { transition: background 0.2s ease, color 0.2s ease, rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tab:hover .ico { rotate: -8deg; scale: 1.08; }
.tab h3 { transition: color 0.2s; }
.tab:hover h3 { color: var(--primary); }
.panel-stamp { position: absolute; top: 14px; inset-inline-end: 12px; }

/* FAQ */
.faq details { padding-inline: 16px; margin-inline: -16px; border-radius: 12px; transition: background 0.2s; }
.faq details:hover { background: var(--card); }
.section.alt .faq details:hover { background: var(--surface-low); }
.faq summary { transition: color 0.2s; }
.faq summary:hover { color: var(--primary); }
.faq details:not([open]) summary:hover::after { rotate: 90deg; }
.faq summary::after { transition: transform 0.2s, rotate 0.2s; }
@keyframes fade-down { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
.faq details[open] p { animation: fade-down 0.35s ease; }

/* Download */
.cta { --positive: #34d399; }
.cta-mark { transition: rotate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cta:hover .cta-mark { rotate: -3deg; scale: 1.05; }
.cta::before { transition: translate 1.2s ease; }
.cta:hover::before { translate: -40px 30px; }

/* Footer */
.footer ul a { display: inline-block; transition: color 0.2s, translate 0.2s; }
.footer ul a:hover { translate: 4px 0; }
html[dir='rtl'] .footer ul a:hover { translate: -4px 0; }

/* Cards that lift */
.value, .choice { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s; }
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value .ico { transition: rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.value:hover .ico { rotate: -10deg; }

/* Bill preview rows */
.x-person summary { margin-inline: -8px; padding-inline: 8px; border-radius: 10px; transition: background 0.2s; }
.x-person.has-items summary:hover { background: var(--surface-low); }
.x-bar i { transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.x-line { transition: background 0.2s; border-radius: 8px; }
.x-receipt .x-line:not(.total):hover { background: var(--surface-low); }
.share-bar { position: sticky; top: 76px; z-index: 5; box-shadow: var(--shadow); }

/* ================================================================ back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
html[dir='rtl'] .back-link { padding: 8px 12px 8px 16px; }
.back-link svg { width: 18px; height: 18px; transition: translate 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
html[dir='rtl'] .back-link svg { scale: -1 1; }
.back-link:hover { color: var(--ink); border-color: var(--primary); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 15%, transparent); }
.back-link:hover svg { translate: -4px 0; }
html[dir='rtl'] .back-link:hover svg { translate: 4px 0; }
.share-wrap [data-back] .back-link { margin: 0 0 16px; }
.page-hero { padding-top: 40px; }

/* ================================================================ legal pages */
.legal-hero { text-align: center; padding-bottom: 32px; }
.legal-hero h1 { letter-spacing: -0.02em; }
.page-hero .legal-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 auto 12px;
}
html[lang='ar'] .page-hero .legal-eyebrow { letter-spacing: 0; font-size: 14px; }
.page-hero.legal-hero .updated {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
}
.legal { max-width: 860px; margin: 0 auto; padding-bottom: 96px; }
.legal .prose {
  max-width: none;
  padding: 56px 64px 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 16px;
  line-height: 1.75;
}
.legal .prose h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.legal .prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal .prose h3 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }
.legal .prose li { margin-bottom: 10px; }
.legal .prose li::marker { color: var(--faint); }
.legal .prose a { text-underline-offset: 3px; }

/* ================================================================ contact */
.page-hero.center { text-align: center; }
.page-hero.center p { margin-inline: auto; }
.contact-wrap { max-width: 720px; margin: 0 auto; padding-bottom: 96px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  text-align: start;
  cursor: pointer;
}
.choice:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.choice[aria-selected='true'] { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.choice .ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-mid); color: var(--muted);
  transition: background 0.2s, color 0.2s, rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.choice:hover .ico { rotate: -8deg; }
.choice[aria-selected='true'] .ico { background: var(--primary); color: var(--on-primary); }
.choice .ico svg { width: 22px; height: 22px; }
.choice b { display: block; font-size: 16px; }
.choice small { display: block; color: var(--muted); font-size: 13px; }
@keyframes fade-up { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.contact-wrap [role='tabpanel']:not([hidden]) { animation: fade-up 0.35s ease; }
.hint { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--faint); }
.opt { font-size: 12px; font-weight: 500; color: var(--faint); }
.form-field :is(input, textarea).touched:invalid { border-color: var(--negative); }
.form-field :is(input, select, textarea) { transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.form-field :is(input, select, textarea):hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.form-done .btn { margin-top: 20px; }
.form-done .ico { animation: stamp-land 0.65s both; }
.contact-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 22px; font-size: 14px; color: var(--faint); text-align: center; }
.contact-foot a { color: var(--primary); }

/* ================================================================ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; translate: none; scale: none; transition: none; }
  .js [data-stamp], .panel .k-stamp { opacity: 1; animation: none !important; }
  .k-stamp::after { display: none; }
  .hero-visual .float, .float-chip { animation: none; }
  .store.is-soon:hover, .step:hover .step-icon, .form-done .ico { animation: none; }
  .phone, .step .phone { transition: none; }
}

/* ================================================================ responsive */
@media (max-width: 960px) {
  .legal .prose { padding: 40px 36px 32px; }
  .nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .hero { padding: 48px 0 72px; }
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .section { padding: 72px 0; }
  .steps {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-inline: -20px;
    padding: 4px 20px 40px;
    scroll-padding-inline: 20px;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 min(320px, 84%); scroll-snap-align: center; }
  .step .phone { box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18), inset 0 0 0 2px #1e293b; }
  .step:hover .phone, .step:nth-child(2):hover .phone { translate: none; rotate: none; }
  /* Off-screen cards never scroll into the viewport, so they skip the reveal and stay visible while peeking. */
  .js .steps > [data-reveal] { opacity: 1; translate: 0 0; }

  /* Features: one card above the phone, swapping in place. */
  .showcase { grid-template-columns: 1fr; gap: 24px; }
  .js .tabs { display: grid; }
  .js .showcase .tab { grid-area: 1 / 1; }
  .showcase .tab {
    background: var(--card);
    border-color: var(--border);
    box-shadow: var(--shadow);
    transition: opacity 0.35s ease, translate 0.35s ease, visibility 0s;
  }
  .js .showcase .tab:not([aria-selected='true']) {
    opacity: 0;
    translate: 0 8px;
    visibility: hidden;
    transition: opacity 0.35s ease, translate 0.35s ease, visibility 0s 0.35s;
  }
  .showcase .tab[role] p { max-height: none; opacity: 1; }
  .dots { display: flex; }
  .cta { grid-template-columns: 1fr; padding: 48px 28px; text-align: center; }
  .cta h2, .cta p { margin-inline: auto; }
  .cta .stores { justify-content: center; }
  /* One column: the logo leads, above the heading, a size smaller. */
  .cta-mark { order: -1; justify-self: center; width: 132px; height: 132px; border-radius: 30px; }
  .cta-mark .bm-slot, .cta-mark img { width: 84px; height: 84px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .values { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .legal .prose { padding: 28px 20px 20px; border-radius: var(--radius); font-size: 15px; }
  .legal .prose h2 { margin-top: 28px; padding-top: 24px; }
  .header .btn { display: none; }
  .showcase .phone, .phone { width: 300px; }
  .showcase .screen { height: 500px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .stores .store { flex: 1 1 100%; justify-content: center; }
  .stores-sm .store { flex: 1 1 auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 960px) {
  .chip-a { inset-inline-start: -16px; top: 52%; }
  .chip-b { inset-inline-end: -16px; }
  .hero-stamp { inset-inline-start: -8px; }
}
@media (max-width: 520px) {
  .choices { grid-template-columns: 1fr; }
  .float-chip { font-size: 12px; padding: 8px 10px; }
  .float-chip { display: none; }
  .k-stamp.lg > span { font-size: 24px; }
  .share-bar { top: 72px; }
}

.about-stamp { margin-top: 28px; }
/* ================================================================ light / dark toggle */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s, translate 0.2s;
}
.theme-toggle:hover { translate: 0 -1px; border-color: var(--primary); }
.theme-toggle svg {
  position: absolute;
  width: 19px;
  height: 19px;
  transition: rotate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.4s ease, opacity 0.3s ease;
}
.theme-toggle .moon { rotate: -90deg; scale: 0; opacity: 0; }
:root[data-theme='dark'] .theme-toggle .sun { rotate: 90deg; scale: 0; opacity: 0; }
:root[data-theme='dark'] .theme-toggle .moon { rotate: 0deg; scale: 1; opacity: 1; }
.theme-toggle:hover .sun { rotate: 45deg; }

/* The switch spreads as a circle from the button (View Transitions). */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); }
}

/* Dark-mode touches that tokens alone don't cover. */
:root[data-theme='dark'] .phone { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 2px #334155; }
:root[data-theme='dark'] .cta,
:root[data-theme='dark'] .x-cta { border: 1px solid var(--border); background: #0f1626; }
:root[data-theme='dark'] .header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); }
:root[data-theme='dark'] .float-chip { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); }
:root[data-theme='dark'] .ip-logo { background: #fff; border-radius: 4px; padding: 2px 4px; box-sizing: content-box; }
:root[data-theme='dark'] .btn-primary::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); }
:root[data-theme='dark'] .eyebrow { color: var(--on-primary-soft); }

/* ================================================================ hero: What's new link */
.new-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.new-link svg { width: 16px; height: 16px; transition: translate 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
html[dir='rtl'] .new-link svg { scale: -1 1; }
.new-link:hover { border-color: var(--primary); color: var(--ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 15%, transparent); }
.new-link:hover svg { translate: 4px 0; }
html[dir='rtl'] .new-link:hover svg { translate: -4px 0; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--positive); }
.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { to { scale: 3; opacity: 0; } }

/* ================================================================ stats */
.stats { padding: 0 0 88px; margin-top: -24px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  transition: background 0.25s;
}
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat:hover { background: var(--surface-low); }
.stat-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--on-primary-soft);
  margin-bottom: 14px;
  transition: rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat:hover .stat-ico { rotate: -10deg; scale: 1.1; }
.stat-ico svg { width: 20px; height: 20px; }
.stat b {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--primary), var(--positive));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat > span:last-child { margin-top: 8px; color: var(--muted); font-weight: 500; }

/* ================================================================ app screens: InstaPay, languages, currencies */
.ip-logo { display: inline-block; height: 14px; width: auto; vertical-align: middle; }
.seg .ip-logo { height: 12px; }

.pay-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.pay-opt.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--card)); }
.pay-opt .grow { display: flex; flex-direction: column; gap: 3px; }
.pay-opt .ip-logo { height: 16px; align-self: flex-start; }
.pay-opt b { font-weight: 600; }
.pay-opt small { font-size: 11px; color: var(--faint); }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--outline, var(--faint)); flex: none; position: relative; }
.pay-opt.on .radio { border-color: var(--primary); }
.pay-opt.on .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }

.lang-demo { margin-bottom: 4px; }
.lang-seg { position: relative; direction: ltr; }
.lang-seg span { position: relative; z-index: 1; }
.lang-seg span[lang='ar'] { font-family: 'IBM Plex Sans Arabic', sans-serif; }
.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 7px;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.lang-stage { display: grid; }
.lang-stage > .lang-card { grid-area: 1 / 1; margin: 0; }
/* The card flips between English and Arabic while the panel is open. */
:is(.panel.is-active, .fp-visual.is-in) .seg-thumb { animation: lang-thumb 6s ease-in-out infinite; }
:is(.panel.is-active, .fp-visual.is-in) .lc-en { animation: lang-a 6s ease-in-out infinite; }
:is(.panel.is-active, .fp-visual.is-in) .lc-ar { animation: lang-b 6s ease-in-out infinite; }
.lc-ar { opacity: 0; }
@keyframes lang-thumb { 0%, 42% { translate: 0 0; } 50%, 92% { translate: calc(100% + 4px) 0; } 100% { translate: 0 0; } }
@keyframes lang-a { 0%, 42% { opacity: 1; scale: 1; } 50%, 92% { opacity: 0; scale: 0.96; } 100% { opacity: 1; scale: 1; } }
@keyframes lang-b { 0%, 42% { opacity: 0; scale: 0.96; } 50%, 92% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 0.96; } }

.cur-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
}
.cur-search svg { width: 15px; height: 15px; flex: none; }
.cur-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.cur-row + .cur-row { border-top: 1px solid var(--border); }
.cur-row b { font-weight: 600; font-size: 13px; }
.cur-sym {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-low); font-weight: 700; font-size: 13px;
}
.cur-row.on .cur-sym { background: var(--positive-soft); color: var(--positive); }
.cur-code { font-size: 12px; font-weight: 600; color: var(--faint); }
.cur-check { width: 16px; height: 16px; color: var(--positive); flex: none; }

.more-link { display: flex; justify-content: center; margin-top: 56px; }
.more-link .btn svg { width: 18px; height: 18px; }
html[dir='rtl'] .more-link .btn svg, html[dir='rtl'] .btn-block svg, html[dir='rtl'] .q-more svg { scale: -1 1; }
.more-link .btn:hover svg { translate: 4px 0; }
html[dir='rtl'] .more-link .btn:hover svg { translate: -4px 0; }

/* ================================================================ contact (two columns) */
.contact-hero h1 .accent { color: var(--primary); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
  padding-bottom: 96px;
}
.contact-side { display: grid; gap: 20px; }
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
}
.info-card h2 { font-size: 22px; margin-bottom: 18px; }
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 12px;
  margin: 0 -12px;
  width: calc(100% + 24px);
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: start;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
a.info-row, button.info-row { cursor: pointer; }
a.info-row:hover, button.info-row:hover { background: var(--surface-low); }
.info-row b { display: block; font-size: 15px; }
.info-row small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.info-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--on-primary-soft);
  transition: rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.info-row:hover .info-ico { rotate: -8deg; }
.info-ico svg { width: 20px; height: 20px; }
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.q-list a {
  display: block;
  padding: 9px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, translate 0.2s;
}
.q-list a::before { content: '•'; color: var(--primary); margin-inline-end: 8px; }
.q-list a:hover { background: var(--surface-low); color: var(--ink); translate: 3px 0; }
html[dir='rtl'] .q-list a:hover { translate: -3px 0; }
.q-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--primary); font-weight: 600; text-decoration: none; }
.q-more svg { width: 16px; height: 16px; transition: translate 0.2s; }
.q-more:hover svg { translate: 3px 0; }
.q-note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--faint); font-size: 14px; }

.contact-form-card { border-radius: 24px; padding: 32px; }
.form-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
html[lang='ar'] .form-eyebrow { letter-spacing: 0; font-size: 13px; }
.form-heading { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; margin-bottom: 24px; }
.form-heading .accent { color: var(--positive); }
.contact-form-card .form-field label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
html[lang='ar'] .contact-form-card .form-field label { letter-spacing: 0; font-size: 13px; text-transform: none; }
.contact-form-card .form-field .opt { text-transform: none; letter-spacing: 0; }
.btn-block { width: 100%; }
.btn-block svg { transition: translate 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn-block:hover svg { translate: 4px 0; }
html[dir='rtl'] .btn-block:hover svg { translate: -4px 0; }
.contact-form-card [role='tabpanel']:not([hidden]) { animation: fade-up 0.35s ease; }

/* ================================================================ What's new */
.timeline { position: relative; max-width: 780px; margin: 8px auto 0; padding-inline-start: 40px; }
.timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--primary), color-mix(in srgb, var(--primary) 10%, transparent));
  border-radius: 2px;
}
.release { position: relative; margin-bottom: 28px; }
.release-dot {
  position: absolute;
  inset-inline-start: -40px;
  top: 26px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 20%, var(--surface));
}
.release-next .release-dot { background: var(--surface); border: 2px dashed var(--primary); box-shadow: none; }
.release-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.release-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.release-next .release-card { border-style: dashed; background: transparent; }
.release-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.release-version { padding: 4px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 700; font-size: 14px; }
.release-latest { padding: 4px 10px; border-radius: 999px; background: var(--positive-soft); color: var(--positive); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
html[lang='ar'] .release-latest { letter-spacing: 0; }
.release-date { color: var(--faint); font-size: 14px; }
.release-card h2 { font-size: 24px; margin-bottom: 6px; }
.release-summary { color: var(--muted); margin-bottom: 18px; }
.release-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
html[lang='ar'] .release-label { letter-spacing: 0; font-size: 13px; }
.release-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.release-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; margin: 0 -10px; border-radius: 12px; transition: background 0.2s; }
.release-list li:hover { background: var(--surface-low); }
.hl-ico {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--on-primary-soft);
  transition: rotate 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.release-list li:hover .hl-ico { rotate: -10deg; }
.hl-ico svg { width: 16px; height: 16px; }
.release-list li > span:last-child { padding-top: 4px; color: var(--ink); }
.release-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--primary);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.release-more::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate 0.2s, translate 0.2s; }
.release-more[aria-expanded='true']::after { rotate: -135deg; translate: 0 2px; }
.release-more:hover { background: var(--surface-low); border-color: var(--primary); }
.release-list li.is-extra:not([hidden]) { animation: hl-in 0.3s ease both; }
@keyframes hl-in { from { opacity: 0; translate: 0 -4px; } }
.next-card { padding: 20px 22px; }
.next-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.next-lead { color: var(--faint); font-size: 14px; }
.next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.next-list li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-low); }
.next-text { display: grid; gap: 2px; min-width: 0; line-height: 1.4; }
.next-text b { color: var(--ink); font-weight: 600; font-size: 15px; }
.next-text span { color: var(--muted); font-size: 14px; }

/* ================================================================ Features page */
.fp-nav {
  position: sticky;
  top: 64px;
  z-index: 15;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--border);
}
.fp-nav-inner { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.fp-nav-inner::-webkit-scrollbar { display: none; }
.fp-nav a {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.fp-nav a:hover { background: var(--surface-low); color: var(--ink); }
.fp-nav a.is-current { background: var(--primary); color: var(--on-primary); }

.fp-list { padding-top: 24px; }
.fp-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 72px 0;
  scroll-margin-top: 130px;
}
.fp-section + .fp-section { border-top: 1px solid var(--border); }
.fp-section.flip .fp-text { order: 2; }
.fp-ico {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  margin-bottom: 18px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
  transition: rotate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fp-section:hover .fp-ico { rotate: -10deg; }
.fp-ico svg { width: 26px; height: 26px; }
.fp-text h2 { font-size: clamp(28px, 3.4vw, 38px); }
.fp-lead { margin: 10px 0 22px; color: var(--muted); font-size: 18px; }
.fp-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fp-points li { display: flex; gap: 12px; align-items: flex-start; }
.fp-check {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--positive-soft); color: var(--positive);
  margin-top: 1px;
}
.fp-check svg { width: 14px; height: 14px; }
.fp-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 55%),
    radial-gradient(circle at 85% 90%, color-mix(in srgb, var(--positive) 18%, transparent), transparent 55%),
    var(--surface-low);
  overflow: hidden;
}
.fp-screen {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 18px 16px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  line-height: 1.45;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fp-screen.is-tilting { transition: transform 0.08s linear; }
:root[data-theme='dark'] .fp-screen { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.fp-screen .s-rows:last-child, .fp-screen .s-card:last-child { margin-bottom: 0; }
.fp-screen .currencies { margin-top: 4px; }
.fp-stamp { position: absolute; top: 12px; inset-inline-end: 12px; }
.lock-ico {
  width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 10px;
  display: grid; place-items: center;
  background: var(--positive-soft); color: var(--positive);
}
.lock-ico svg { width: 24px; height: 24px; }
.footer-meta .version-link { color: var(--faint); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-meta .version-link:hover { color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  .panel.is-active .seg-thumb, .panel.is-active .lc-en, .panel.is-active .lc-ar { animation: none; }
  .pulse::after { animation: none; }
  ::view-transition-new(root) { animation: none; }
}

@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { order: 2; }
  .fp-section { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .fp-section.flip .fp-text { order: 0; }
}
@media (max-width: 520px) {
  .stats { padding-bottom: 64px; }
  .stat { padding: 24px 10px; }
  .stat > span:last-child { font-size: 14px; }
  .info-card, .contact-form-card { padding: 22px; }
  .timeline { padding-inline-start: 28px; }
  .release-dot { inset-inline-start: -28px; width: 16px; height: 16px; }
  .timeline::before { inset-inline-start: 7px; }
  .release-card { padding: 20px; }
  .next-card { padding: 16px; }
  .fp-visual { padding: 28px 14px; border-radius: 24px; }
  .header-actions .theme-toggle { width: 36px; height: 36px; }
}
.cur-row .grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- picking items (/claim) */

.claim-body .share-page { padding-bottom: 140px; }
.claim-hero { padding-bottom: 20px; }
.claim-step { padding: 18px; }
.claim-step + .claim-step, .claim-hero + .claim-step { margin-top: 12px; }
.claim-who.is-known { display: flex; align-items: center; gap: 12px; }
.claim-who.is-known .grow { flex: 1; min-width: 0; font-size: 15px; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--primary); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.claim-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.claim-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px;
  border-radius: 999px; border: 1.5px solid var(--border); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.claim-chip:only-child, .claim-chip:last-child { padding-inline-start: 14px; }
.claim-chip .avatar.xs { border: 0; }
.claim-chip.is-on { border-color: var(--primary); background: var(--primary-soft); color: var(--on-primary-soft); }
.claim-field { display: grid; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.claim-chips + .claim-field { margin-top: 14px; }
.claim-step .x-label + .claim-field { margin-top: 0; }
.claim-field input {
  height: 48px; padding: 0 14px; border-radius: var(--radius); border: 1.5px solid var(--border);
  background: var(--surface-low); color: var(--ink); font: inherit; font-size: 16px; font-weight: 500;
}
.claim-field input:focus { outline: none; border-color: var(--primary); background: var(--card); }
.claim-note { margin-top: 12px; font-size: 13px; color: var(--faint); }
.claim-hint { margin: -2px 0 12px; font-size: 14px; color: var(--muted); }
.claim-items { display: grid; gap: 8px; }
.claim-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: start;
  border-radius: 14px; border: 1.5px solid var(--border); background: var(--card); color: var(--ink);
  font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.claim-item:active { transform: scale(0.99); }
.claim-item .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.claim-item b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.claim-item small { font-size: 12px; color: var(--faint); }
.claim-item .amt { font-weight: 600; white-space: nowrap; }
.claim-check {
  width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border); color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.claim-check svg { width: 15px; height: 15px; }
.claim-item.is-on { border-color: var(--primary); background: var(--primary-soft); }
.claim-item.is-on small { color: var(--on-primary-soft); }
.claim-item.is-on .claim-check { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.claim-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.claim-bar-row { max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.claim-bar .grow { flex: 1; min-width: 0; display: grid; }
.claim-bar small { font-size: 12px; color: var(--faint); font-weight: 600; }
.claim-bar strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.claim-bar strong.owes { color: var(--negative); }
.claim-bar strong span { font-size: 13px; font-weight: 600; }
.claim-bar .btn { flex: none; }
.claim-bar .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.claim-notice { max-width: 480px; margin: 0 auto 10px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 14px; font-weight: 600; }
.claim-done-mark { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--positive-soft); color: var(--positive); }
.claim-done-mark svg { width: 32px; height: 32px; }
.claim-done p { font-size: 16px; }
.claim-done-list { list-style: none; padding: 0; margin: 16px 0 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.claim-done-list li { padding: 4px 10px; border-radius: 6px; background: var(--surface-mid); color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 380px) {
  .claim-bar-row { gap: 10px; }
  .claim-bar .btn-lg { padding: 0 16px; font-size: 15px; }
}

.claim-name-step h2 { font-size: 20px; margin-bottom: 4px; }
.claim-name-step .claim-hint { margin: 0 0 16px; }
.claim-wide { flex: 1; width: 100%; }

/* ---------------------------------------------------------------- bill page: picking and after */

.x-pick, .x-saved { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 12px; }
.x-pick { border-color: var(--primary); background: var(--primary-soft); }
.x-pick .grow, .x-saved .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.x-pick b, .x-saved b { font-size: 16px; }
.x-pick span, .x-saved span { font-size: 13px; color: var(--muted); }
.x-pick .x-bar { margin-top: 4px; background: var(--card); }
.x-pick .btn, .x-saved .btn { flex: none; height: 42px; font-size: 14px; padding: 0 16px; }
.x-saved { border-color: var(--positive); }
.x-saved-mark { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--positive-soft); color: var(--positive); }
.x-saved-mark svg { width: 22px; height: 22px; }
.x-open { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
@media (max-width: 400px) {
  .x-pick, .x-saved { flex-wrap: wrap; }
  .x-pick .btn, .x-saved .btn { width: 100%; }
}
.x-pick .x-bar { height: 8px; }

/* People's photos, lines nobody picked, and whoever just picked. */
img.avatar.photo { object-fit: cover; padding: 0; background: var(--surface-mid); }
/* Not picked yet: an exclamation in the same amber as its tag. */
.x-open-mark { background: var(--amber-soft); color: var(--amber); font-weight: 800; font-size: 15px; }
.x-open-mark svg { width: 16px; height: 16px; }
.x-open-row b { color: var(--muted); }
.x-person.is-me > summary { background: var(--primary-soft); margin: 0 -10px; padding-inline: 10px; border-radius: 12px; }

/* Bill page: paid back, simplified, receipt photos. */
.x-stamp {
  margin-inline-start: 6px; padding: 2px 8px; border-radius: 6px; border: 1.5px solid var(--positive); color: var(--positive);
  font-size: 11px; font-weight: 700; transform: rotate(-4deg); white-space: nowrap;
}
.x-waiting { margin-inline-start: 6px; padding: 2px 8px; border-radius: 999px; background: var(--surface-mid); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.x-sub .is-paid .amt { color: var(--faint); text-decoration: line-through; }
.x-simplified { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); }
.x-simplified svg { width: 14px; height: 14px; }
.x-note { font-size: 13px; color: var(--muted); margin: -2px 0 8px; }
.x-photos { padding: 18px; }
.x-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.x-photo { position: relative; }
.x-photo button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.x-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--surface-low); display: block; }
.x-photo-dl {
  position: absolute; bottom: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(15, 23, 42, 0.65); color: #fff;
}
.x-photo-dl svg { width: 18px; height: 18px; }
.x-lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 16px; background: rgba(2, 6, 23, 0.88);
}
.x-lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 8px; }
.x-lightbox-bar { display: flex; gap: 10px; }
.x-lightbox-bar .btn svg { width: 18px; height: 18px; }

/* ================================================================ app screens you can tap
   Buttons inside the phone mockups look like the app, not like buttons. */
:where(.screen, .fp-screen) :where(button) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
:where(.screen, .fp-screen) :is(button.s-row, button.s-btn, button.pay-opt, button.cur-row) { width: 100%; }
:is(.screen, .fp-screen) button { transition: background 0.2s, border-color 0.2s, scale 0.12s, opacity 0.2s; }
:is(.screen, .fp-screen) button:active { scale: 0.97; }
:is(.screen, .fp-screen) :is(button.s-row, button.cur-row):active { scale: 1; background: var(--surface-mid); }
:is(.screen, .fp-screen) button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.seg > button {
  flex: 1; text-align: center; padding: 6px 4px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.seg > button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.seg > button .ip-logo { margin: 0 auto; }
.s-btn.is-done { background: var(--positive); color: #fff; }
:root[data-theme='dark'] .s-btn.is-done { color: #022c22; }
.big-amount { transition: color 0.3s; }
.big-amount.is-zero { color: var(--ink); }
.s-row.is-paid .chip { background: var(--positive-soft); color: var(--positive); font-family: 'IBM Plex Sans Arabic', sans-serif; }
.avatar.is-new, .s-row.is-new { animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop-in { from { scale: 0.6; opacity: 0; } }

/* The lead under the showcase title: tap on wide screens, swipe on phones. */
.lead-touch { display: none; }

/* Receipt scanning: the receipt is the button; "found" follows the scan. */
button.receipt { display: block; width: 100%; text-align: start; font-family: 'Courier New', monospace; color: #1f2937; background: #fff; }
.receipt .r-head, .receipt .r-sep, .receipt .scanline { display: block; }
.scan-status { display: grid; }
.scan-status > * { grid-area: 1 / 1; }
.scan-done { opacity: 0; }
:is(.panel.is-active, .fp-visual.is-in) .scan-reading { animation: scan-out 0.3s 2.4s both; }
:is(.panel.is-active, .fp-visual.is-in) .scan-done { animation: scan-in 0.4s 2.4s both; }
/* A tap swaps to identical keyframes under new names, which restarts the scan. */
:is(.panel.is-active.is-again, .fp-visual.is-in .is-again) .scan-reading { animation-name: scan-out-again; }
:is(.panel.is-active.is-again, .fp-visual.is-in .is-again) .scan-done { animation-name: scan-in-again; }
.is-again .scanline { animation-name: scan-again; }
@keyframes scan-out { to { opacity: 0; } }
@keyframes scan-out-again { to { opacity: 0; } }
@keyframes scan-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes scan-in-again { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes scan-again { to { top: calc(100% - 3px); } }

/* Picking: the page a friend opens from the link. */
.url-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: -6px auto 12px; padding: 5px 12px; width: fit-content; max-width: 100%;
  border-radius: 999px; background: var(--surface-mid); color: var(--muted); font-size: 11px; font-weight: 600;
}
.url-bar svg { width: 11px; height: 11px; flex: none; }
.pk-as { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.pk-as .avatar { width: 24px; height: 24px; font-size: 10px; }
.pk-as .grow { flex: 1; min-width: 0; }
.pk-as b { color: var(--ink); }
.pk-list { display: grid; gap: 6px; }
.screen .pk-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--card);
}
.pk-item .claim-check { width: 20px; height: 20px; border-width: 1.5px; }
.pk-item .claim-check svg { width: 12px; height: 12px; }
.pk-item .grow { flex: 1; min-width: 0; display: grid; }
.pk-item b { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-item small { font-size: 10.5px; color: var(--faint); }
.pk-item .val { font-weight: 600; font-size: 12px; }
.screen .pk-item.is-on { border-color: var(--primary); background: var(--primary-soft); }
.pk-item.is-on small { color: var(--on-primary-soft); }
.pk-item.is-on .claim-check { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.pk-bar {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 16px;
  background: var(--card); border-top: 1px solid var(--border);
}
.pk-bar .grow { flex: 1; min-width: 0; display: grid; }
.pk-bar small { font-size: 10px; font-weight: 600; color: var(--faint); }
.pk-bar strong { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.pk-bar strong.owes { color: var(--negative); }
.pk-bar strong span:last-child { font-size: 11px; font-weight: 600; }
.screen .pk-bar .s-btn { width: auto; flex: none; height: 38px; padding: 0 12px; font-size: 12.5px; }
.pk-done { text-align: center; padding: 18px 4px 0; }
.pk-done .claim-done-mark { width: 52px; height: 52px; margin-bottom: 12px; animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pk-done .claim-done-mark svg { width: 26px; height: 26px; }
.pk-done b { display: block; font-size: 17px; }
.pk-done p { margin: 6px 0 16px; color: var(--muted); }
.panel.is-saved .pk-pick, .panel.is-saved .pk-bar { display: none; }

/* Split any way: amounts flash when the way changes. */
.val.is-changed { animation: flash 0.5s ease; }
@keyframes flash { 30% { color: var(--primary); scale: 1.08; } }

/* Share with friends. */
.sh-card { padding: 12px; }
.sh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sh-head small { font-size: 11px; color: var(--faint); }
.sh-meter { height: 6px; margin: 8px 0 12px; border-radius: 999px; background: var(--surface-mid); overflow: hidden; }
.sh-meter i { display: block; height: 100%; border-radius: inherit; background: var(--positive); transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.s-row b .chip { display: inline; margin-inline-start: 4px; font-size: 9.5px; padding: 1px 5px; vertical-align: 1px; }
.sh-sheet {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 4;
  padding: 8px 16px 20px; text-align: center;
  background: var(--card); border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.18);
  animation: sheet-up 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sh-grab { width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 999px; background: var(--border); }
.sh-sheet > b { display: block; font-size: 14px; }
.sh-sheet > small { display: block; margin-top: 2px; font-size: 11px; color: var(--faint); }
.sh-targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
:is(.screen, .fp-screen) .sh-targets button { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.sh-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-mid); color: var(--ink); }
.sh-ico svg { width: 20px; height: 20px; }
.sh-ico.wa { background: #25d366; color: #fff; }
.sh-ico.wa svg { width: 24px; height: 24px; }
@keyframes sheet-up { from { translate: 0 100%; } }
.sh-toast {
  position: absolute; inset-inline: 0; bottom: 18px; z-index: 5; width: fit-content; margin: 0 auto;
  padding: 8px 14px; border-radius: 999px; background: var(--brand-ink); color: #fff; font-size: 12px; font-weight: 600;
  opacity: 0; translate: 0 8px; pointer-events: none; transition: opacity 0.25s, translate 0.25s;
}
.sh-toast.is-on { opacity: 1; translate: 0 0; }
:root[data-theme='dark'] .sh-toast { background: #e2e6f5; color: #0b0f19; }

/* InstaPay or cash: the options are buttons. */
:is(.screen, .fp-screen) button.pay-opt { border: 1.5px solid var(--border); background: var(--card); }
:is(.screen, .fp-screen) button.pay-opt.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--card)); }

/* Language: a tap stops the flipping and shows the one picked. */
.lang-seg > button { position: relative; z-index: 1; }
.lang-seg > button[lang='ar'] { font-family: 'IBM Plex Sans Arabic', sans-serif; }
.lang-demo.is-picked .seg-thumb, .lang-demo.is-picked .lang-card { animation: none !important; transition: translate 0.3s ease, opacity 0.3s ease, scale 0.3s ease; }
.lang-demo.is-picked .lc-en { opacity: 1; scale: 1; }
.lang-demo.is-picked .lc-ar { opacity: 0; scale: 0.96; }
.lang-demo[data-show='ar'] .seg-thumb { translate: calc(100% + 4px) 0; }
.lang-demo[data-show='ar'] .lc-en { opacity: 0; scale: 0.96; }
.lang-demo[data-show='ar'] .lc-ar { opacity: 1; scale: 1; }
.cur-row .cur-check { opacity: 0; scale: 0.5; transition: opacity 0.2s, scale 0.2s; }
.cur-row.on .cur-check { opacity: 1; scale: 1; }

@media (max-width: 960px) {
  .lead-pointer { display: none; }
  .lead-touch { display: inline; }
  /* Swiping: the browser keeps vertical scrolling, the page takes sideways drags. */
  .showcase { touch-action: pan-y; }
  .showcase .tab[aria-selected='true'], .showcase-visual .phone { translate: var(--drag, 0) 0; }
  .showcase-visual .phone { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .showcase.is-dragging .tab[aria-selected='true'], .showcase.is-dragging .showcase-visual .phone { transition: none; }
}
@media (max-width: 520px) {
  .screen .pk-item { padding: 6px 9px; }
  .url-bar { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.panel.is-active, .fp-visual.is-in) :is(.scan-reading, .scan-done) { animation: none; }
  .scan-reading { display: none; }
  .scan-done { opacity: 1; }
  .sh-sheet, .avatar.is-new, .s-row.is-new, .pk-done .claim-done-mark, .val.is-changed { animation: none; }
}

/* ================================================================ features page: sections build in
   Once a section scrolls in, its icon pops, the points arrive one by one, and its screen
   fills in row by row: amounts count up, bars fill, chips land. */
html { --slide-from: -16px; }
html[dir='rtl'] { --slide-from: 16px; }
@keyframes fp-point { from { opacity: 0; translate: var(--slide-from) 0; } }
@keyframes fp-rise { from { opacity: 0; translate: 0 14px; } }
@keyframes fp-pop { 0% { opacity: 0; scale: 0.4; } 70% { scale: 1.12; } 100% { opacity: 1; scale: 1; } }
@keyframes fp-fill { from { width: 0; } }
@keyframes fp-wait { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.fp-text.is-in .fp-ico { animation: fp-pop 0.55s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fp-text.is-in .fp-points li { animation: fp-point 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fp-text.is-in .fp-points li .fp-check { animation: fp-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fp-text.is-in .fp-points li:nth-child(1), .fp-text.is-in .fp-points li:nth-child(1) .fp-check { animation-delay: 0.3s; }
.fp-text.is-in .fp-points li:nth-child(2), .fp-text.is-in .fp-points li:nth-child(2) .fp-check { animation-delay: 0.4s; }
.fp-text.is-in .fp-points li:nth-child(3), .fp-text.is-in .fp-points li:nth-child(3) .fp-check { animation-delay: 0.5s; }
.fp-text.is-in .fp-points li:nth-child(4), .fp-text.is-in .fp-points li:nth-child(4) .fp-check { animation-delay: 0.6s; }

.fp-visual.is-in:not(.is-built) .fp-screen > :not(.sh-sheet, .sh-toast) { animation: fp-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fp-visual.is-in:not(.is-built) .fp-screen > :nth-child(1) { animation-delay: 0.35s; }
.fp-visual.is-in:not(.is-built) .fp-screen > :nth-child(2) { animation-delay: 0.45s; }
.fp-visual.is-in:not(.is-built) .fp-screen > :nth-child(3) { animation-delay: 0.55s; }
.fp-visual.is-in:not(.is-built) .fp-screen > :nth-child(4) { animation-delay: 0.65s; }
.fp-visual.is-in:not(.is-built) .fp-screen > :nth-child(5) { animation-delay: 0.75s; }
.fp-visual.is-in:not(.is-built) .fp-screen .s-rows .s-row { animation: fp-point 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fp-visual.is-in:not(.is-built) .fp-screen .s-rows .s-row:nth-child(1) { animation-delay: 0.6s; }
.fp-visual.is-in:not(.is-built) .fp-screen .s-rows .s-row:nth-child(2) { animation-delay: 0.7s; }
.fp-visual.is-in:not(.is-built) .fp-screen .s-rows .s-row:nth-child(3) { animation-delay: 0.8s; }
.fp-visual.is-in:not(.is-built) .fp-screen .s-rows .s-row:nth-child(4) { animation-delay: 0.9s; }
.fp-visual.is-in:not(.is-built) .fp-screen .chip,
.fp-visual.is-in:not(.is-built) .fp-screen .currencies span,
.fp-visual.is-in:not(.is-built) .fp-screen .seg .on { animation: fp-pop 0.4s 1s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fp-visual.is-in:not(.is-built) .fp-screen .currencies span:nth-child(2) { animation-delay: 1.06s; }
.fp-visual.is-in:not(.is-built) .fp-screen .currencies span:nth-child(3) { animation-delay: 1.12s; }
.fp-visual.is-in:not(.is-built) .fp-screen .currencies span:nth-child(4) { animation-delay: 1.18s; }
.fp-visual.is-in:not(.is-built) .fp-screen .currencies span:nth-child(5) { animation-delay: 1.24s; }
.fp-visual.is-in:not(.is-built) .fp-screen .sh-meter i { animation: fp-fill 1.1s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fp-visual.is-in:not(.is-built) .fp-screen .lock-ico { animation: fp-pop 0.5s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fp-visual.is-in:not(.is-built) .fp-screen .avatars .avatar { animation: fp-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fp-visual.is-in:not(.is-built) .fp-screen .avatars .avatar:nth-child(1) { animation-delay: 0.75s; }
.fp-visual.is-in:not(.is-built) .fp-screen .avatars .avatar:nth-child(2) { animation-delay: 0.83s; }
.fp-visual.is-in:not(.is-built) .fp-screen .avatars .avatar:nth-child(3) { animation-delay: 0.91s; }
.fp-visual.is-in:not(.is-built) .fp-screen .avatars .avatar:nth-child(4) { animation-delay: 0.99s; }
/* "Not picked yet" keeps breathing until someone picks it. */
.fp-visual.is-built .fp-screen .chip.amber { animation: fp-wait 2s ease-in-out infinite; }
.fp-visual.is-in:not(.is-built) .fp-screen .chip.amber { animation: fp-pop 0.4s 1s cubic-bezier(0.34, 1.56, 0.64, 1) both, fp-wait 2s 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .fp-text.is-in *, .fp-visual.is-in .fp-screen * { animation: none !important; }
}

/* Features page screens you can tap. */
.fp-screen.fp-share { overflow: hidden; }
.fp-screen .sh-sheet { border-radius: 20px 20px 0 0; }
.fp-screen .pv-card { margin-bottom: 0; }
.fp-screen[data-view='group'] .pv-link, .fp-screen[data-view='link'] .pv-group { display: none; }
.fp-screen .pv-card { animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.fp-try { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
html[dir='rtl'] .fp-try .btn svg, html[dir='rtl'] .more-link .btn-primary svg { scale: -1 1; }
.more-link { gap: 12px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .fp-try .btn, .more-link .btn { flex: 1 1 100%; }
}

/* Split by item: tap someone to see what they had. */
.sp-chev { width: 14px; height: 14px; flex: none; color: var(--faint); transition: rotate 0.25s ease, opacity 0.2s ease; }
[data-split-row][aria-expanded='true'] { background: var(--surface-low); }
[data-split-row][aria-expanded='true'] .sp-chev { rotate: 180deg; color: var(--primary); }
[data-split]:not([data-split='items']) .sp-chev { opacity: 0; }
[data-split]:not([data-split='items']) [data-split-row] { cursor: default; }
.sp-items { padding: 2px 12px 8px; padding-inline-start: 52px; background: var(--surface-low); animation: fade-down 0.25s ease; }
.sp-items + .s-row { border-top: 1px solid var(--border); }
.sp-line { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 11.5px; color: var(--muted); }
.sp-line small { margin-inline-start: 4px; color: var(--faint); font-size: 10px; }
/* Numbers read left to right, but a line of them under an Arabic name still sits on the right. */
html[dir='rtl'] .s-row .grow > small.num { text-align: right; }
.sp-line:last-child { margin-top: 3px; padding-top: 4px; border-top: 1px dashed var(--border); }
@media (prefers-reduced-motion: reduce) { .sp-items { animation: none; } }
/* Short phone screens make room for the open list: the total steps aside. */
@media (max-width: 520px) {
  .screen [data-split].is-open .s-rows + .s-card { display: none !important; }
}

/* ---------------------------------------------------------------- picking: after saving */
.claim-or { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.claim-done { text-align: center; padding: 24px 20px 20px; }
.claim-done h1 { font-size: 22px; margin: 0; }
.claim-total {
  margin: 16px 0 12px; padding: 22px 16px 18px; border-radius: 16px;
  background: var(--surface-low);
  display: grid; justify-items: center; gap: 8px;
  animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.claim-total small { font-size: 14px; font-weight: 600; color: var(--muted); }
.claim-total strong { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.claim-total strong span { margin-inline-start: 6px; font-size: 16px; font-weight: 600; color: var(--faint); }
.claim-payee { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
html[dir='rtl'] .claim-payee { padding: 4px 4px 4px 12px; }
.claim-payee .avatar { border: 0; }
.claim-how { text-align: start; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.claim-how summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; font-weight: 600; cursor: pointer; list-style: none; }
.claim-how summary::-webkit-details-marker { display: none; }
.claim-how summary svg { width: 18px; height: 18px; color: var(--faint); transition: rotate 0.25s ease; }
.claim-how[open] summary svg { rotate: 180deg; }
.claim-how ul { list-style: none; margin: 0; padding: 0 14px 6px; animation: fade-down 0.25s ease; }
.claim-how li { display: flex; gap: 12px; padding: 7px 0; font-size: 14px; }
.claim-how li + li { border-top: 1px solid var(--border); }
.claim-how li .grow { flex: 1; min-width: 0; }
.claim-how li small { color: var(--faint); font-size: 12px; }
.claim-how li.is-charge { color: var(--muted); }
.claim-how li.is-total { font-weight: 700; border-top: 1.5px solid var(--ink); }
.claim-how .claim-note { margin: 0; padding: 0 14px 12px; }
.claim-done-actions { display: grid; gap: 8px; margin-top: 16px; }
.claim-review ul { list-style: none; margin: 0; padding: 0; }
.claim-review li { display: flex; gap: 12px; padding: 9px 0; font-size: 15px; }
.claim-review li + li { border-top: 1px solid var(--border); }
.claim-review li .grow { flex: 1; min-width: 0; }
.claim-review li small { color: var(--faint); font-size: 12px; }
.claim-review-sum { margin-top: 10px !important; border-top: 1px solid var(--border); }
.claim-review li.is-charge { color: var(--muted); }
.claim-review li.is-total { font-weight: 700; font-size: 16px; border-top: 1.5px solid var(--ink); }
.claim-bar-pair .btn { flex: 1; }
.claim-bar-pair .btn-primary { flex: 1.5; }

/* Contact page: common questions open in place. */
.q-faq details { border-radius: 10px; transition: background 0.2s; }
.q-faq details[open] { background: var(--surface-low); }
.q-faq summary { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; color: var(--muted); font-weight: 500; }
.q-faq summary::-webkit-details-marker { display: none; }
.q-faq summary::before { content: '+'; flex: none; width: 14px; color: var(--primary); font-weight: 700; transition: rotate 0.2s; }
.q-faq details[open] summary { color: var(--ink); }
.q-faq details[open] summary::before { rotate: 45deg; }
.q-faq summary:hover { color: var(--ink); }
.q-faq details p { padding: 0 12px 12px; padding-inline-start: 34px; color: var(--muted); font-size: 14px; animation: fade-down 0.25s ease; }
/* The CTA logo answers a tap. */
.cta-mark { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cta-mark .bm-slot { transition: scale 0.2s ease; }
.cta-mark:active .bm-slot { scale: 0.96; }
/* Not picked yet on a receipt line: the same amber "!" as its row on the bill. */
.x-open-dot { width: 20px; height: 20px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: var(--amber-soft); color: var(--amber); font-size: 12px; font-weight: 800; line-height: 1; }
