@font-face{font-family:"Cairo";src:url("/static/fonts/Cairo-v1.ttf") format("truetype");font-weight:200 1000;font-display:swap}

/* ---------- themes: dark (default) / light.  Only colors differ. ---------- */
:root,[data-theme="dark"]{
  color-scheme:dark;
  --bg:#070b16;--bg-img:radial-gradient(600px 380px at 85% -5%,rgba(139,92,246,.20),transparent 70%),radial-gradient(560px 360px at 5% 5%,rgba(37,224,138,.11),transparent 70%);
  --card:#101830;--card2:#0a1020;--soft:#0a1020;--line:#222e4d;
  --tx:#eaf0ff;--mut:#8fa0c6;
  --ac:#25e08a;--ac-dark:#25e08a;--ac-soft:rgba(37,224,138,.12);--on-ac:#04210f;--ac-line:rgba(37,224,138,.35);
  --price:#fbbf24;
  --shadow:0 8px 24px rgba(0,0,0,.30);
  --ico-vf-bg:rgba(255,59,78,.16);--ico-vf:#ff6b78;--ico-ip-bg:rgba(139,92,246,.20);--ico-ip:#b79cff;
  --pill-bg:rgba(251,191,36,.12);--pill-tx:#fbbf24;--pill-line:rgba(251,191,36,.35);
  --demo-bg:rgba(251,191,36,.06);--demo-line:rgba(251,191,36,.40);--demo-tx:#fbbf24;
  --me-bg:linear-gradient(135deg,#2f5bff,#4a3df0);--me-tx:#fff;
  --bot-bg:#18223f;--ok-bg:rgba(37,224,138,.14);--ok-line:rgba(37,224,138,.40);--ok-tx:#b9f6d6;
  --err-bg:#4c1d24;--err-line:#7f1d2b;--err-tx:#ffc9cf;--note:#fbbf24;--dot:#25e08a;--ph:#5d6f9c;
  --focus:rgba(37,224,138,.18);
}
[data-theme="light"]{
  color-scheme:light;
  --bg:#f6f7f9;--bg-img:none;
  --card:#fff;--card2:#fff;--soft:#f3f4f6;--line:#e5e7eb;
  --tx:#1f2937;--mut:#6b7280;
  --ac:#0f766e;--ac-dark:#0b5d57;--ac-soft:#e6f4f2;--on-ac:#fff;--ac-line:#bfe3de;
  --price:#1f2937;
  --shadow:0 1px 2px rgba(16,24,40,.04);
  --ico-vf-bg:#fdeeee;--ico-vf:#c62828;--ico-ip-bg:#efeafd;--ico-ip:#5b3fc4;
  --pill-bg:#fff7e6;--pill-tx:#8a5a00;--pill-line:#f3dca8;
  --demo-bg:#fffdf5;--demo-line:#e6d9a8;--demo-tx:#7a5a00;
  --me-bg:#0f766e;--me-tx:#fff;
  --bot-bg:#fff;--ok-bg:#e6f4f2;--ok-line:#bfe3de;--ok-tx:#0b4a45;
  --err-bg:#fdeeee;--err-line:#f5c6c6;--err-tx:#8a1f1f;--note:#8a5a00;--dot:#22c55e;--ph:#9ca3af;
  --focus:rgba(15,118,110,.12);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%;background:var(--bg);max-width:100%;overflow-x:hidden}
body{margin:0;max-width:100%;overflow-x:hidden;background:var(--bg);background-image:var(--bg-img);background-attachment:fixed;color:var(--tx);font-family:"Cairo","Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;line-height:1.6;font-size:15px}
.wrap{max-width:1040px;margin:0 auto;padding:28px 16px 28px}

.head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.head h1{margin:0;font-size:22px;font-weight:700;line-height:1.3}
.tools{flex:none;display:flex;align-items:center;gap:8px}
.pill{font-size:11.5px;font-weight:600;padding:2px 10px;border-radius:999px;background:var(--pill-bg);color:var(--pill-tx);border:1px solid var(--pill-line);white-space:nowrap}
.theme-btn{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--tx);cursor:pointer;padding:0}
.theme-btn:hover{border-color:var(--ac)}
.theme-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-btn .i-moon{display:none}
[data-theme="light"] .theme-btn .i-sun{display:none}
[data-theme="light"] .theme-btn .i-moon{display:block}

/* steps: one slim line, no boxes */
.steps{display:flex;justify-content:space-between;gap:4px;list-style:none;margin:0 0 12px;padding:0 2px}
.steps li{display:flex;align-items:center;gap:6px;color:var(--mut);font-size:12.5px;white-space:nowrap}
.steps i{font-style:normal;flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;background:var(--soft);color:var(--mut);border:1px solid var(--line)}
.steps li.on{color:var(--tx);font-weight:600}
.steps li.on i{background:var(--ac);border-color:var(--ac);color:var(--on-ac)}
.steps li.done{color:var(--ac-dark)}
.steps li.done i{background:var(--ac-soft);border-color:var(--ac-line);color:var(--ac)}

.grid{display:grid;grid-template-columns:1fr;gap:12px}
.a-pay{grid-area:pay;min-width:0}.a-chat{grid-area:chat;min-width:0}.a-demo{grid-area:demo}
.grid{grid-template-areas:"chat" "pay" "demo"}
.grid>*{min-width:0;max-width:100%}
.chat-card,.pays,.pay,.chat,form,.chips{min-width:0;max-width:100%}
.chat-card{width:100%}
h2{font-size:15px;font-weight:700;margin:0 0 8px}

/* payment: two compact cards side by side */
.pays{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pay{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 12px;box-shadow:var(--shadow);min-width:0}
.pay-head{display:flex;align-items:center;gap:7px;margin-bottom:6px}
.pay-head h3{margin:0;font-size:13.5px;font-weight:700;white-space:nowrap}
.ico{width:24px;height:24px;border-radius:7px;display:grid;place-items:center;font-size:12px;font-weight:800;flex:none}
.ico.vf{background:var(--ico-vf-bg);color:var(--ico-vf)}
.ico.ip{background:var(--ico-ip-bg);color:var(--ico-ip);font-size:10px}
.copy{margin-inline-start:auto;flex:none;border:1px solid var(--line);background:var(--card2);color:var(--tx);border-radius:8px;padding:2px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.copy:hover{border-color:var(--ac);color:var(--ac-dark)}
.copy.ok{background:var(--ac);border-color:var(--ac);color:var(--on-ac)}
.num{font-size:17px;font-weight:700;letter-spacing:.5px;text-align:left;font-variant-numeric:tabular-nums;white-space:nowrap}
.price{margin:2px 0 0;color:var(--mut);font-size:12px}
.price b{color:var(--price);font-size:15px;font-weight:700}
.tip{margin:8px 2px 0;font-size:12px;color:var(--mut)}
.link{display:block;text-align:center;margin-top:8px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ac-dark);text-decoration:none;font-weight:600;font-size:13px}

/* demo numbers: small collapsible */
.demo{background:var(--demo-bg);border:1px dashed var(--demo-line);border-radius:12px;padding:8px 12px}
.demo summary{cursor:pointer;font-size:13px;font-weight:700;color:var(--demo-tx);list-style:none}
.demo summary::-webkit-details-marker{display:none}
.demo summary::after{content:" ▾";font-weight:400}
.demo[open] summary::after{content:" ▴"}
.demo p{margin:8px 0;font-size:12px;color:var(--mut)}
.demo ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:6px}
.demo li{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--mut)}
.chipnum{border:1px solid var(--line);background:var(--card2);color:var(--tx);border-radius:8px;padding:2px 10px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.chipnum:hover{border-color:var(--ac)}

/* chat */
.chat-card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:12px;box-shadow:var(--shadow);display:flex;flex-direction:column}
.chat-top{display:flex;align-items:center;gap:8px;padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid var(--line);font-size:14px}
.chat-top small{color:var(--mut);font-size:12px;margin-inline-start:auto}
.dot{width:8px;height:8px;border-radius:50%;background:var(--dot);display:inline-block}
.chat{height:clamp(300px,calc(100dvh - 400px),520px);overflow-y:auto;background:var(--soft);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:8px;scroll-behavior:smooth}
.chat::-webkit-scrollbar{width:6px}.chat::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}
.b{max-width:86%;padding:7px 12px;border-radius:14px;font-size:14.5px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.b.me{align-self:flex-start;background:var(--me-bg);color:var(--me-tx);border-bottom-right-radius:4px}
.b.bot{align-self:flex-end;background:var(--bot-bg);border:1px solid var(--line);border-bottom-left-radius:4px}
.b.ok{background:var(--ok-bg);border-color:var(--ok-line);color:var(--ok-tx)}
.b.err{background:var(--err-bg);border-color:var(--err-line);color:var(--err-tx)}
.b.sys{align-self:center;background:transparent;border:0;color:var(--mut);font-size:12px;padding:0}
.chips{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;width:100%;margin:8px 0;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chips button{flex:none;background:var(--card2);border:1px solid var(--line);color:var(--tx);border-radius:999px;padding:3px 13px;font:inherit;font-size:13px;cursor:pointer}
.chips button:hover{border-color:var(--ac);color:var(--ac-dark)}
form{display:flex;gap:8px}
input{flex:1;min-width:0;background:var(--card2);border:1px solid var(--line);color:var(--tx);border-radius:12px;padding:9px 12px;font:inherit;font-size:16px;outline:none;direction:rtl}
input:focus{border-color:var(--ac);box-shadow:0 0 0 3px var(--focus)}
input::placeholder{color:var(--ph)}
#send{background:var(--ac);color:var(--on-ac);border:0;border-radius:12px;padding:0 20px;font:inherit;font-weight:700;font-size:15px;cursor:pointer}
#send:hover{filter:brightness(1.08)}
#send:disabled{opacity:.55}
.note{color:var(--note);font-size:12.5px;margin:6px 2px 0}
.typing{display:inline-flex;gap:4px}.typing i{width:6px;height:6px;border-radius:50%;background:var(--mut);animation:bl 1s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes bl{0%,80%,100%{opacity:.3}40%{opacity:1}}
footer{text-align:center;color:var(--mut);font-size:12px;padding-top:16px}

/* ---------- desktop: payments + demo on one side, chat on the other ---------- */
@media (min-width:900px){
  .wrap{padding-top:32px}
  .head h1{font-size:26px}
  .steps{margin-bottom:18px;justify-content:flex-start;gap:28px}
  .steps li{font-size:13.5px}
  .grid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-areas:"chat pay" "chat demo";grid-template-rows:auto 1fr;gap:12px 28px;align-items:start}
  .num{font-size:19px}
  .chat{height:clamp(300px,calc(100dvh - 370px),520px)}
}

/* ---------- mobile: everything above the chat is a thin strip, chat fills the screen ---------- */
@media (max-width:899px){
  .wrap{width:100%;height:100vh;height:100dvh;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  .head{margin-bottom:8px}.head h1{font-size:18px}
  .steps{margin-bottom:8px}
  .steps li{font-size:11.5px;gap:4px}.steps i{width:18px;height:18px;font-size:10px}
  .grid{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}
  h2,.tip,.link,footer{display:none}
  .a-pay{flex:none}
  .a-chat{flex:1 1 auto;min-height:300px;display:flex}
  .chat-card{flex:1;min-height:0;padding:10px}
  .chat{flex:1;height:auto;min-height:0}
  .a-demo{flex:none}
  .pay{padding:8px 10px}.pay-head{margin-bottom:4px}
  .num{font-size:15.5px;letter-spacing:0}
  .price{font-size:11.5px}.price b{font-size:14px}
}
@media (max-width:370px){
  .pay-head h3{font-size:12.5px}.num{font-size:14.5px}.ico{display:none}
}
@media (max-width:340px){
  .steps li{min-width:0}.steps li:not(.on) span{display:none}
}

/* ---------- cards in chat ---------- */
.b.card{padding:0;max-width:92%;width:92%;overflow:hidden;white-space:normal}
.card-h{padding:9px 12px;font-weight:800;font-size:14.5px;background:var(--ok-bg);color:var(--ok-tx);border-bottom:1px solid var(--ok-line)}
.card-body{padding:8px 12px;display:grid;gap:4px}
.card-row{display:flex;justify-content:space-between;gap:10px;font-size:13.5px}
.card-row span{color:var(--mut)}.card-row b{font-weight:800}
.card-cta{margin:2px 12px 10px;padding:8px 10px;border-radius:10px;background:var(--ac-soft);border:1px solid var(--ac-line);font-weight:700;font-size:13.5px;color:var(--ac-dark)}
.card-status{margin:2px 12px 10px;font-size:13px;font-weight:700;color:var(--mut)}
.card-status.ok{color:var(--ok-tx)}.card-status.err{color:var(--err-tx)}
.card-actions{display:flex;gap:8px;padding:0 12px 12px}
.btn{border:1px solid var(--line);background:var(--card2);color:var(--tx);border-radius:10px;padding:6px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.btn.primary{background:var(--ac);border-color:var(--ac);color:var(--on-ac)}
.btn:hover{filter:brightness(1.08)}
.chat>*{flex-shrink:0}

/* ---------- collapsible payment cards (summary = method + price) ---------- */
.pay{padding:0;align-self:start}
.pay>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:9px 12px;cursor:pointer}
.pay>summary::-webkit-details-marker{display:none}
.pay-title{display:flex;flex-direction:column;min-width:0;flex:1}
.pay-title h3{margin:0;font-size:13.5px;font-weight:700;line-height:1.35}
.pay-title .price{margin:0;font-size:11.5px;line-height:1.35}
.pay-title .price b{font-size:13.5px}
.chev{flex:none;width:8px;height:8px;border-inline-end:2px solid var(--mut);border-bottom:2px solid var(--mut);transform:rotate(45deg);transition:transform .15s;margin-inline-start:2px}
.pay[open] .chev{transform:rotate(-135deg)}
.pay-body{display:flex;align-items:center;gap:8px;padding:0 12px 10px;border-top:0}
.pay-body .num{flex:1;min-width:0;font-size:15.5px}
.pay-body .copy{margin:0}
.pays{align-items:start}
@media (min-width:900px){
  .pay>summary{pointer-events:none;padding:12px 14px 6px}
  .chev{display:none}
  .pay-title h3{font-size:15px}.pay-title .price{font-size:12.5px}.pay-title .price b{font-size:16px}
  .pay-body{padding:0 14px 14px}
  .pay-body .num{font-size:19px}
  .demo>summary{pointer-events:auto}
}
@media (max-width:899px){
  .b{font-size:13px;line-height:1.55;padding:6px 11px}
  .b.sys{font-size:11px}
  .card-h{font-size:13px;padding:7px 10px}.card-row{font-size:12px}.card-cta{font-size:12px}.card-status{font-size:12px}
  .btn{font-size:12px}
  .chips button{font-size:12px}
  .ico{width:22px;height:22px}
}
@media (max-width:370px){
  .pay>summary{padding:8px 9px;gap:6px}.pay-title h3{font-size:12.5px}
  .pay-body{padding:0 9px 9px}.pay-body .num{font-size:14px}
}

/* one compact "which step am I in" line at the top of the chat */
.stageline{display:flex;align-items:center;gap:8px;margin:0 0 8px;padding:5px 10px;border-radius:10px;background:var(--soft);border:1px solid var(--line);color:var(--mut);font-size:12.5px;font-weight:600;line-height:1.4}
.stageline::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--mut)}
.stageline.s1,.stageline.s2{color:var(--ac-dark);border-color:var(--ac-line);background:var(--ac-soft)}
.stageline.s1::before,.stageline.s2::before{background:var(--ac)}
.stageline.s2{font-weight:800}
@media (max-width:899px){.stageline{font-size:12px;padding:4px 9px;margin-bottom:6px}}
