:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --text: #15201b;
  --muted: #56645d;
  --line: #dbe3de;
  --brand: #0f7a5a;
  --brand-ink: #ffffff;
  --brand-soft: #e2f2ec;
  --accent: #c2410c;
  --good: #15803d;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(16,40,30,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --surface: #151d1a; --surface-2: #1b2622; --text: #e8efeb; --muted: #9db0a6;
    --line: #2a3832; --brand: #34c08f; --brand-ink: #062118; --brand-soft: #173329;
    --accent: #fb923c; --good: #4ade80; --bad: #f87171; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412; --surface: #151d1a; --surface-2: #1b2622; --text: #e8efeb; --muted: #9db0a6;
  --line: #2a3832; --brand: #34c08f; --brand-ink: #062118; --brand-soft: #173329;
  --accent: #fb923c; --good: #4ade80; --bad: #f87171; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
section { padding: 56px 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.logo span { color: var(--brand); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; gap: 10px; font-size: .88rem; }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--brand); }
[dir="rtl"] body, body[dir="rtl"] { font-family: "Noto Kufi Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; }
@media (max-width: 420px) { .lang { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 650; text-decoration: none; transition: transform .08s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 650;
  font-size: .82rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.lead { font-size: 1.12rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { font-size: .8rem; border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; border-radius: 999px; color: var(--muted); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { font-size: .8rem; color: var(--muted); }
.alt { background: var(--surface-2); }

/* sample question */
.q-stem { font-weight: 600; margin-bottom: 14px; }
.opt { display: flex; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer; }
.opt:hover { border-color: var(--brand); }
.opt .k { font-weight: 800; color: var(--muted); min-width: 1.2em; }
.opt.selected { border-color: var(--brand); background: var(--brand-soft); }
.opt.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--surface)); }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.explain { margin-top: 10px; padding: 12px 14px; border-inline-start: 3px solid var(--brand); background: var(--surface-2); border-radius: 8px; font-size: .95rem; }

/* pricing */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); }
.badge { position: absolute; top: -12px; inset-inline-start: 22px; background: var(--brand); color: var(--brand-ink);
  font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price { font-size: 2.2rem; font-weight: 800; margin: 6px 0; }
.price s { font-size: 1rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.price-card ul { padding-left: 18px; margin: 10px 0 18px; color: var(--muted); flex: 1; }
.pay-row { display: grid; gap: 8px; }
.notice { border: 1px dashed var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  padding: 12px 14px; border-radius: 10px; font-size: .92rem; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 650; }
details p { margin: 10px 0 0; color: var(--muted); }

footer { padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* exam */
.exam-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.timer.low { color: var(--bad); }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.progress > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.exam-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin-top: 22px; }
.palette button { aspect-ratio: 1; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 8px; font: inherit; font-size: .85rem; cursor: pointer; }
.palette button.answered { background: var(--brand-soft); border-color: var(--brand); }
.palette button.flagged { box-shadow: inset 0 -3px 0 var(--accent); }
.palette button.current { outline: 2px solid var(--brand); outline-offset: 1px; }
.domain-row { margin: 10px 0; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.score-big { font-size: 3.2rem; font-weight: 800; line-height: 1; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
input, select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); }
.hidden { display: none !important; }
.review-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.tag { font-size: .75rem; color: var(--muted); }
