:root {
  --p: #8944D5; --p2: #6D2FC0; --p-soft: #F1E9FC; --o: #F59E0D; --o-soft: #FEF3DC; --o-ink: #8A5300;
  --ink: #1A1428; --muted: #625A73; --line: #E9E3F2; --bg: #FAF8FD; --card: #FFFFFF;
  --green: #17A34A; --green-soft: #E6F6EC; --red: #DC2626; --red-soft: #FDECEC; --blue-soft: #EAF1FE; --blue: #2457C5;
  --r-lg: 24px; --r-md: 16px; --r-sm: 12px; --shadow: 0 24px 48px -30px rgba(45, 20, 90, .35);
  --font: "IBM Plex Sans Arabic", -apple-system, "Segoe UI", sans-serif;
  --display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F3EEFB; --muted: #B3A8C8; --line: #2C2342; --bg: #0E0919; --card: #18112A; --p-soft: #24183C;
    --o-soft: #2A2010; --o-ink: #F7C46B; --green-soft: #10291A; --red-soft: #2E1214; --blue-soft: #121C33; --blue: #8DB0F5; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F3EEFB; --muted: #B3A8C8; --line: #2C2342; --bg: #0E0919; --card: #18112A; --p-soft: #24183C;
  --o-soft: #2A2010; --o-ink: #F7C46B; --green-soft: #10291A; --red-soft: #2E1214; --blue-soft: #121C33; --blue: #8DB0F5; color-scheme: dark;
}
html[lang="fr"], html[lang="en"] { --font: "IBM Plex Sans Arabic", "Sora", -apple-system, "Segoe UI", sans-serif; --display: "Sora", sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--p); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 960px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.logo { font-family: "Sora", sans-serif; font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; direction: ltr; }
.logo b { color: var(--p); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav a[aria-current="page"] { background: var(--p-soft); color: var(--p); }
.tools { display: flex; gap: 6px; align-items: center; }
.lang { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 10px; font-size: 14px; }
.ghost { background: none; border: 0; color: var(--muted); padding: 8px; cursor: pointer; font-weight: 600; }
.ghost:hover { color: var(--ink); }

.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 5; display: none; background: var(--card); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 2px; border-radius: 12px; }
.tabbar a svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--p); background: var(--p-soft); }
@media (max-width: 720px) {
  .nav { display: none; }
  .tools { margin-inline-start: auto; }
  .tabbar.on { display: flex; }
  body.with-tabs main { padding-bottom: 96px; }
}

main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 480px; margin: 0 auto; }
h1 { font-family: var(--display); font-size: 26px; line-height: 1.35; margin: 0 0 6px; }
h2 { font-family: var(--display); font-size: 19px; line-height: 1.4; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.stack > * + * { margin-top: 16px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 10px; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(45, 20, 90, .4); }

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
input, select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; min-height: 48px; }
input:focus, select:focus { outline: 2px solid var(--p); outline-offset: 1px; }
input[dir="ltr"] { text-align: left; }
.phone { display: flex; direction: ltr; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); overflow: hidden; }
.phone span { display: flex; align-items: center; padding: 0 12px; color: var(--muted); border-inline-end: 1px solid var(--line); font-weight: 600; }
.phone input, .slug input { border: 0; border-radius: 0; outline: 0; min-width: 0; }
.phone:focus-within, .slug:focus-within { outline: 2px solid var(--p); outline-offset: 1px; }
.slug { display: flex; align-items: center; direction: ltr; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); overflow: hidden; }
.slug span { padding: 0 12px; color: var(--muted); white-space: nowrap; font-size: 14px; }
.otp { letter-spacing: .45em; text-align: center; font-size: 22px; direction: ltr; }
.check { font-size: 13px; margin-top: 6px; min-height: 20px; }
.check.ok { color: var(--green); }
.check.bad { color: var(--red); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-md); padding: 13px 18px; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 48px; }
.btn.primary { background: var(--p); color: #fff; }
.btn.primary:hover { background: var(--p2); }
.btn.amber { background: var(--o); color: #221300; }
.btn.light { background: var(--p-soft); color: var(--p); }
.btn.line { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; margin-top: 20px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn svg { width: 20px; height: 20px; flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.linkbtn { background: none; border: 0; color: var(--p); font-weight: 600; cursor: pointer; padding: 8px 0; }

.msg { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; }
.msg.err { background: var(--red-soft); color: var(--red); }
.msg.ok { background: var(--green-soft); color: var(--green); }
.msg.info { background: var(--p-soft); color: var(--ink); }

.hero { text-align: center; margin: 8px 0 22px; }
.hero h1 { font-size: 24px; }
.perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.perks li { background: var(--o-soft); color: var(--o-ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }

.stores { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.store { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.store-top { display: flex; align-items: flex-start; gap: 12px; }
.mark { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--p-soft); color: var(--p); display: grid; place-items: center; font-family: "Sora", sans-serif; font-weight: 700; font-size: 18px; }
.store h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.store .url { direction: ltr; text-align: start; font-size: 13px; color: var(--muted); text-decoration: none; word-break: break-all; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 16px; height: 16px; }
.store .actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.store .actions .btn { flex: 1; padding: 11px 12px; min-height: 44px; font-size: 15px; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge.trial { background: var(--o-soft); color: var(--o-ink); }
.badge.active { background: var(--green-soft); color: var(--green); }
.badge.awaiting_payment, .badge.grace { background: var(--red-soft); color: var(--red); }
.badge.paused, .badge.failed { background: var(--red-soft); color: var(--red); }
.badge.queued, .badge.building, .badge.waiting_capacity { background: var(--blue-soft); color: var(--blue); }

.empty { text-align: center; padding: 40px 20px; }
.empty .mark { margin: 0 auto 12px; width: 56px; height: 56px; font-size: 24px; }

.steps { list-style: none; margin: 18px 0 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 18px; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.steps li.done:not(:last-child)::after { background: var(--p); }
.dot { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--card); color: var(--muted); font-weight: 700; font-size: 14px; }
.steps li.done .dot { background: var(--p); border-color: var(--p); color: #fff; }
.steps li.now .dot { border-color: var(--p); color: var(--p); }
.steps li.now .dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--p); animation: pulse 1.2s ease-in-out infinite; }
.steps strong { display: block; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--p); animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
.center { display: grid; place-items: center; min-height: 40vh; }

.pay { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pay-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--bg); }
.pay-box h3 { margin: 0 0 8px; font-size: 16px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.row:first-of-type { border-top: 0; }
.row code { direction: ltr; font-family: "Sora", monospace; font-size: 14px; word-break: break-all; }
.copy { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; flex: none; }
.price { display: inline-block; background: var(--p-soft); color: var(--p); border-radius: 999px; padding: 4px 12px; font-weight: 700; margin-bottom: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.grid2 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.ts { margin-top: 16px; min-height: 65px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }
