:root {
  --bg: #0a0f0d;
  --bg-2: #0d1411;
  --surface: #111a16;
  --surface-2: #16211c;
  --border: #1f2c26;
  --border-2: #2a3a32;
  --text: #e8efea;
  --muted: #94a59c;
  --accent: #19c37d;
  --accent-2: #5ee0a8;
  --accent-ink: #03140b;
  --red: #e5484d;
  --radius: 14px;
  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
[lang="ar"] { --sans: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, "Segoe UI", Tahoma, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { letter-spacing: 0; line-height: 1.4; }
h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 14px; }
h3 { font-size: 17px; margin-bottom: 8px; }
p + p { margin-top: 10px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 640px; }
.center .lead, .center.lead { margin-inline: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: transform .12s, background .15s, border-color .15s; cursor: pointer; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--border-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* header */
.hdr { position: sticky; top: 0; z-index: 20; background: rgba(10, 15, 13, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.hdr-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.nav > a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav > a:hover, .nav > a.on { color: var(--text); }
.nav > a.btn { color: var(--accent-ink); }
.langs { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.langs a { font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 6px; color: var(--muted); }
.langs a.on { background: var(--surface-2); color: var(--text); }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--border-2); color: var(--text); border-radius: 8px; width: 40px; height: 36px; font-size: 18px; cursor: pointer; }

/* hero */
.hero { padding: 72px 0 56px; background: radial-gradient(900px 420px at 15% -10%, rgba(25, 195, 125, .16), transparent 70%), radial-gradient(600px 300px at 95% 10%, rgba(229, 72, 77, .07), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.flag { width: 18px; height: 12px; border-radius: 2px; display: inline-block; vertical-align: -1px; margin-inline-end: 7px; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent-2); background: rgba(25, 195, 125, .1); border: 1px solid rgba(25, 195, 125, .28); padding: 5px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 700; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.term { background: #0b1210; border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(25, 195, 125, .05); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.term-bar i:first-child { background: var(--red); opacity: .8; }
.term-bar span { margin-inline-start: 10px; font: 12px var(--mono); color: var(--muted); }
.term pre { padding: 20px; font: 13.5px/1.7 var(--mono); overflow-x: auto; color: #cfe0d6; text-align: left; }
.term .k { color: #7cc4ff; }
.term .s { color: #f3c98b; }
.term .hl { color: var(--accent-2); background: rgba(25, 195, 125, .12); border-radius: 4px; padding: 1px 3px; transition: opacity .25s; }

/* pay bar */
.paybar { padding: 26px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.chip { font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); letter-spacing: .02em; }

/* sections */
.sec { padding: 72px 0; }
.sec.tight { padding: 36px 0 56px; }
.sec.alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.sec h2.center { margin-bottom: 36px; }
.page-head { padding: 64px 0 20px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: 12px; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.two-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.two-col.top { align-items: start; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); font-size: 15px; }
.feat { position: relative; transition: border-color .15s; }
.feat:hover { border-color: var(--border-2); }
.num-badge { font: 600 12px var(--mono); color: var(--accent); display: block; margin-bottom: 14px; }

.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 14px; }
.steps p { color: var(--muted); font-size: 15px; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 22px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tbl thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-2); }
[lang="ar"] .tbl thead th { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.tbl .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl.kv th { width: 140px; color: var(--muted); font-weight: 500; }
.mid { font: 500 13.5px var(--mono); }
.mname { font-size: 12.5px; color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--radius); margin-bottom: 22px; }

.cur-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.cur-toggle span { margin-inline-end: 6px; }
.cur-toggle button { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 5px 12px; border-radius: 8px; cursor: pointer; font: 600 13px var(--sans); }
.cur-toggle button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input, .filters select { background: var(--surface); border: 1px solid var(--border-2); color: var(--text); border-radius: 10px; padding: 10px 14px; font: 15px var(--sans); }
.filters input { flex: 1; min-width: 220px; }
.filters input:focus, .filters select:focus { outline: 2px solid rgba(25, 195, 125, .4); border-color: var(--accent); }
.filters .cur-toggle { margin-inline-start: auto; }

/* code samples */
.code-card { background: #0b1210; border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; min-width: 0; margin-bottom: 22px; }
.code-tabs { display: flex; gap: 2px; padding: 6px; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; direction: ltr; }
.code-tabs button { background: none; border: 0; color: var(--muted); padding: 7px 12px; border-radius: 7px; font: 500 13px var(--sans); cursor: pointer; white-space: nowrap; }
.code-tabs button.on { background: var(--surface-2); color: var(--text); }
.code-tabs .copy { margin-inline-start: auto; font-size: 15px; }
pre.code { padding: 18px 20px; font: 13px/1.7 var(--mono); color: #cfe0d6; overflow-x: auto; text-align: left; background: #0b1210; border-radius: 0; }
.docs pre.code { border: 1px solid var(--border-2); border-radius: var(--radius); margin-bottom: 18px; }
pre.code code, .term code { background: none; border: 0; padding: 0; font-size: inherit; }
code.block { display: block; padding: 10px 12px; margin-top: 6px; word-break: break-all; }

/* payment methods */
.method { display: flex; flex-direction: column; gap: 10px; }
.m-head { display: flex; align-items: center; gap: 10px; }
.m-head h3 { margin: 0; }
.m-icon { width: 34px; height: 24px; border-radius: 5px; flex-shrink: 0; }
.m-chargily .m-icon { background: linear-gradient(135deg, #f2c94c, #b8860b); }
.m-baridimob .m-icon { background: linear-gradient(135deg, #f7d046, #1f6f43); }
.m-ccp .m-icon { background: linear-gradient(135deg, #ffd23f, #e0a100); }
.m-stripe .m-icon { background: linear-gradient(135deg, #635bff, #1a1f71); }
.method p { flex: 1; }
.pill { align-self: flex-start; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-2); }
.pill-ok { color: var(--accent-2); border-color: rgba(25, 195, 125, .35); background: rgba(25, 195, 125, .08); }

/* pricing */
.ticks { list-style: none; display: grid; gap: 12px; }
.ticks li { padding-inline-start: 30px; position: relative; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--accent); font-weight: 700; }
.rate-card { text-align: center; padding: 34px; }
.rate { font-size: clamp(30px, 4vw, 42px); font-weight: 700; color: var(--accent); margin: 6px 0 10px; }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 17px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* cta band */
.cta-band { padding: 80px 0; background: radial-gradient(700px 300px at 50% 0, rgba(25, 195, 125, .18), transparent 70%), var(--bg-2); border-top: 1px solid var(--border); }
.cta-band p { color: var(--muted); margin: 0 auto 26px; max-width: 560px; }

/* docs & legal */
.docs h2 { margin-top: 44px; }
.docs h2:first-child { margin-top: 0; }
.docs > p { color: var(--muted); margin-bottom: 14px; }
.docs h3 { margin-top: 8px; }
.prose h2 { font-size: 21px; margin: 32px 0 10px; }
.prose p { color: #c6d3cb; }

.nf .big { font: 700 96px var(--mono); color: var(--accent); line-height: 1; margin-bottom: 10px; }
.nf .lead { margin: 0 auto 26px; }

/* footer */
.ftr { border-top: 1px solid var(--border); padding: 52px 0 30px; background: var(--bg); }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.ftr-grid p { margin-top: 12px; font-size: 14px; max-width: 300px; }
.ftr h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
[lang="ar"] .ftr h4 { text-transform: none; letter-spacing: 0; }
.ftr-grid a:not(.brand) { display: block; color: #c6d3cb; font-size: 14.5px; padding: 3px 0; }
.ftr-grid a:not(.brand):hover { color: var(--accent); }
.ftr-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }

/* responsive */
@media (max-width: 960px) {
  .hero-in, .two-col { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .nav > a { padding: 10px 4px; }
  .langs { align-self: flex-start; margin: 6px 0; }
  .hdr-in { position: relative; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 36px; }
  .sec { padding: 52px 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .tbl .ctx { display: none; }
  .mid { font-size: 12.5px; word-break: break-all; }
  .filters .cur-toggle { margin-inline-start: 0; }
  .term pre { font-size: 12px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
