:root {
    --brand: #128c4b;
    /* Amwal green (approx) */
    --ink: #0b1220;
    --muted: #5b677a;
    --bg: #f7f9fc;
    --card: #ffffff;
    --border: #e7edf5;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(11, 18, 32, .08);
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6
}

.container {
    max-width: 1120px;
    margin: auto;
    padding: 24px
}

header.hero {
    background: linear-gradient(135deg, rgba(18, 140, 75, .08), transparent 55%), var(--bg);
    border-bottom: 1px solid var(--border)
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center
}

.badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: #e8f5ee;
    color: #0f5532;
    border: 1px solid #ccead9;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .2px
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none
}

.brand-logo {
    height: 40px;
    display: block
}

.hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px
}

.hero-brandline {
    display: flex;
    align-items: center;
    gap: 12px
}

.hero-lang {
    margin-left: auto
}

.visually-hidden {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0;
    border: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
    white-space: nowrap
}

.title {
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
    margin: 12px 0 8px
}

.subtitle {
    color: var(--muted);
    font-size: clamp(14px, 2vw, 18px)
}

.hero-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 18px
}

.kpis {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px
}

.kpi {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #fbfdfc
}

.kpi svg {
    flex: 0 0 20px
}

.grid {
    display: grid;
    gap: 18px
}

section + section {
    margin-top: 32px
}

@media (min-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr)
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr)
    }
}

h2 {
    margin: 32px 0 12px;
    font-size: clamp(20px, 2.2vw, 26px)
}

h3 {
    margin: 14px 0;
    font-size: 18px
}

p {
    margin: 10px 0
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    direction: ltr
}

.FAQ details {
    direction: ltr
}

.list li {
    display: flex;
    gap: 12px
}

.list .dot {
    margin-top: 6px;
    flex: 0 0 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand)
}

.steps {
    counter-reset: step
}

.steps li {
    position: relative;
    padding-left: 42px
}

.steps li:before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    font-weight: 700
}

.notice {
    background: #fff9e8;
    border: 1px solid #f3dfad;
    color: #7a5a10;
    border-radius: 12px;
    padding: 12px
}

details {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    padding: 14px
}

details + details {
    margin-top: 10px
}

summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700
}

summary svg {
    transition: transform .2s
}

details[open] summary svg {
    transform: rotate(90deg)
}

.faq-body {
    margin-top: 8px;
    color: var(--muted)
}

.faq-body p {
    margin: 0 1.5rem;
}

.kpi svg {
    width: 30px;
    height: 30px;
}

.example {
    display: grid;
    gap: 14px
}

.example .pair {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: 12px
}

footer {
    margin: 40px 0 8px;
    color: var(--muted);
    font-size: 12px
}

.inline-icon {
    vertical-align: middle;
    margin-right: 6px
}

a {
    color: var(--brand);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

/* Language toggle */
.lang-en {
    display: block
}

.lang-ar {
    display: none
}

html[lang="ar"] .lang-en {
    display: none
}

html[lang="ar"] .lang-ar {
    display: block
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.topbar-inner {
    max-width: 1120px;
    margin: auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.lang-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-select {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
}

/* RTL helpers */
html[lang="ar"] body {
    direction: rtl
}

[dir="rtl"] .steps li {
    padding-right: 42px;
    padding-left: 0
}

[dir="rtl"] .steps li:before {
    right: 0;
    left: auto
}

[dir="rtl"] .list li {
    flex-direction: row-reverse
}

[dir="rtl"] .list .dot {
    margin-left: 0;
    margin-right: 0
}

[dir="rtl"] summary {
    flex-direction: row-reverse
}

/* Arabic FAQ right alignment */
html[lang="ar"] .lang-ar details,
html[lang="ar"] .lang-ar summary,
html[lang="ar"] .lang-ar .faq-body {
    text-align: right
}

html[lang="ar"] summary {
    justify-content: flex-start
}