:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #ea580c;
  --brand-ink: #ffffff;
  --brand-soft: #fff1e6;
  --good: #16a34a;
  --ok: #65a30d;
  --warn: #d97706;
  --bad: #dc2626;
  --gem: #7c3aed;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: url(img/logo.svg) center/cover; color: transparent; display: inline-block; font-size: 0; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #c2410c; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; }
.eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.1; margin: 0 auto 18px; max-width: 820px; letter-spacing: -0.02em; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.logos { display: flex; gap: 10px 26px; justify-content: center; flex-wrap: wrap; margin-top: 40px; color: var(--muted); font-size: 13px; font-weight: 600; }
.logos span { opacity: .8; }

/* Sections */
section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; letter-spacing: -0.01em; }
.section-title p { color: var(--muted); margin: 0 auto; max-width: 620px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature h3 { margin: 12px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 20px; }
.steps { counter-reset: s; }
.step { position: relative; padding-left: 56px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 24px; top: 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.popular { border: 2px solid var(--brand); }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 18px; }
.price { font-size: 40px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -0.02em; }
.price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 800; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; background: var(--surface); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Forms */
.auth-box { max-width: 420px; margin: 56px auto; }
.tabs { display: flex; background: #eef0f4; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid #d1d5db; border-radius: 9px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.msg { padding: 10px 12px; border-radius: 9px; font-size: 14px; margin-top: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg.ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* App */
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.app-head h1 { margin: 0; font-size: 24px; }
.usage { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-brand { background: var(--brand-soft); color: var(--brand); }
.pill-warn { background: #fef3c7; color: #92400e; }
.meter { width: 140px; height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); }
.search-card .row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; background: #f8fafc; border: 1px solid var(--line); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.checks input { width: auto; }
.adv { margin-top: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; }
.adv summary { font-size: 14px; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.actions { display: flex; justify-content: flex-end; margin-top: 18px; gap: 10px; align-items: center; }
.layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; margin-bottom: 48px; }
.history h3 { margin: 0 0 10px; font-size: 15px; }
.history a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.history a:hover { background: #f1f5f9; text-decoration: none; }
.history a small { display: block; color: var(--muted); font-size: 11px; }
.empty { color: var(--muted); font-size: 13px; }

/* Progress */
.progress { text-align: center; padding: 40px 20px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress ol { list-style: none; padding: 0; margin: 18px auto 0; max-width: 360px; text-align: left; font-size: 14px; }
.progress li { padding: 5px 0; color: var(--muted); }
.progress li.done { color: var(--good); }
.progress li.now { color: var(--ink); font-weight: 600; }

/* Results */
.res-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.res-head h2 { margin: 0; font-size: 20px; }
.res-meta { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.filters-line { background: var(--brand-soft); color: #7c2d12; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin-bottom: 12px; }
.prod { display: grid; grid-template-columns: 76px 84px 1fr; gap: 16px; margin-bottom: 14px; }
.score { width: 60px; height: 60px; border-radius: 50%; border: 4px solid; display: grid; place-items: center; font-weight: 800; font-size: 20px; margin: 0 auto; }
.score-label { text-align: center; font-size: 11px; font-weight: 700; margin-top: 4px; }
.score-bd { text-align: center; font-size: 10px; color: #94a3b8; margin-top: 2px; line-height: 1.35; }
.thumb { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.prod h3 { margin: 4px 0; font-size: 15px; line-height: 1.35; }
.badges span { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; margin: 0 0 4px; margin-inline-end: 4px; }
.facts { color: var(--muted); font-size: 12px; }
.insights { font-size: 12px; margin-top: 4px; color: #334155; }
.why { font-size: 12px; margin-top: 6px; color: #334155; font-style: italic; }
.money { display: grid; grid-template-columns: repeat(6, auto); gap: 4px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; justify-content: start; }
.money div small { display: block; color: var(--muted); font-size: 11px; }
.money b { font-size: 15px; }
.links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.links a { padding: 7px 12px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; }
.links a:hover { text-decoration: none; opacity: .9; }
.spark { display: inline-block; margin: 8px 0 0; margin-inline-end: 18px; vertical-align: bottom; }
.spark .bars { direction: ltr; }
.spark small { display: block; font-size: 10px; color: #94a3b8; }
.spark span.bars { display: inline-flex; align-items: flex-end; height: 24px; gap: 1px; }
.spark span.bars i { display: block; width: 5px; border-radius: 1px; }
.note { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3, .plans { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: 1fr 1fr; }
  .money { grid-template-columns: repeat(3, auto); }
}
@media (max-width: 600px) {
  .nav-links .hide-sm { display: none; }
  .search-card .row { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: 1fr; }
  .prod { grid-template-columns: 64px 1fr; }
  .prod .thumb-cell { display: none; }
  .score { width: 52px; height: 52px; font-size: 17px; }
  section { padding: 48px 0; }
}
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }

/* ---------- Arabic / RTL ---------- */
[data-lang] { }
html[lang="ar"] [data-lang="en"], html:not([lang="ar"]) [data-lang="ar"] { display: none !important; }
html[lang="ar"] body, html[lang="ar"] input, html[lang="ar"] select, html[lang="ar"] textarea, html[lang="ar"] button { font-family: 'Almarai', 'Inter', Tahoma, Arial, sans-serif; }
html[lang="ar"] body { line-height: 1.7; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; }
.lang-btn { font-weight: 700 !important; border: 1px solid currentColor; border-radius: 8px; padding: 4px 10px; font-size: 13px; }
html[dir="rtl"] .plan li { padding: 6px 26px 6px 0; }
html[dir="rtl"] .plan li::before { left: auto; right: 0; }
html[dir="rtl"] .step { padding-left: 24px; padding-right: 56px; }
html[dir="rtl"] .step::before { left: auto; right: 24px; }
html[dir="rtl"] .mock-row .pf { text-align: left; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="password"] { direction: ltr; text-align: right; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
@media (max-width: 600px) {
  .nav .wrap { gap: 8px; }
  .logo { font-size: 15px; white-space: nowrap; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .nav-links { gap: 10px; font-size: 13px; }
  .nav-links a { white-space: nowrap; }
  .nav-links .btn { padding: 8px 12px; font-size: 13px; }
  .lang-btn { padding: 3px 7px; font-size: 12px; }
}
@media (max-width: 380px) { .nav-links a[href="login.html"] { display: none; } }
