:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5a6170;
  --line: #e2e5ea;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f2;
  --warn-bg: #fff7e0;
  --warn-ink: #6b4e00;
  --danger: #b42318;
  --radius: 14px;
  --max: 1080px;
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --text: #eceef2;
    --muted: #a3a9b5;
    --line: #2a2f38;
    --accent: #2dd4bf;
    --accent-ink: #062b27;
    --accent-soft: #11302d;
    --warn-bg: #3a2f0b;
    --warn-ink: #ffe9a8;
    --danger: #ff8a7a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}
[dir="rtl"] body, body[dir="rtl"] { font-family: "IBM Plex Sans Arabic", var(--font); }

a { color: var(--accent); }
img { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.config-warning {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 10px 20px;
  font-size: 14px;
  text-align: center;
  direction: ltr;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand svg { flex: none; }
.nav { display: flex; gap: 20px; margin-inline-start: auto; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--text); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--accent-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: 8px 14px; font-size: 14px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -0.02em; max-width: 18em; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 40em; margin: 0 0 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .fine { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* Sections */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); max-width: 44em; margin: 0 0 32px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* Honesty table */
.honest { overflow-x: auto; }
.honest table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 560px; }
.honest th, .honest td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; }
.honest th { font-size: 14px; color: var(--muted); font-weight: 600; }
.honest tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag-good { background: var(--accent-soft); color: var(--accent); }
.tag-limit { background: var(--warn-bg); color: var(--warn-ink); }

/* Pricing */
.pricing { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.price-card.featured { border: 2px solid var(--accent); }
.price { font-size: 38px; font-weight: 700; line-height: 1; }
.price small { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-card ul { margin: 0; padding-inline-start: 20px; color: var(--muted); }
.price-card .btn { margin-top: auto; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; align-items: center; justify-content: center; margin-bottom: 10px; }
.steps { padding: 0; margin: 0; }

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

/* Legal pages */
.legal { max-width: 760px; padding: 48px 20px 64px; margin: 0 auto; }
.legal h1 { font-size: 34px; margin: 0 0 6px; }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal .updated { color: var(--muted); font-size: 14px; }
.legal .lang-block + .lang-block { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  .site-header { position: static; }
  .hero { padding: 48px 0 40px; }
  section { padding: 44px 0; }
  .nav { gap: 14px; }
}
