@font-face {
    font-family: 'NotoKufiArabic';
    src: url('/fonts/NotoKufiArabic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #f5f7fb;
    --surface: rgba(255,255,255,.82);
    --surface-strong: #ffffff;
    --text: #162033;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-soft: rgba(37, 99, 235, .12);
    --border: rgba(15, 23, 42, .08);
    --shadow: 0 20px 50px rgba(15, 23, 42, .08);
    --radius-xl: 24px;
    --radius-lg: 18px;
}

html, body {
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    font-family: 'NotoKufiArabic', sans-serif;
    background: radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 28%), radial-gradient(circle at bottom left, rgba(14,165,233,.10), transparent 25%), var(--bg);
    color: var(--text);
    min-height: 100%;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    max-width: 1450px;
    margin: 0 auto;
    padding: 24px;
}

.glass-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
}

.field-help {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 6px;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: .95rem;
    transition: all .25s ease;
    outline: none;
}

    .input:focus,
    .select:focus,
    .textarea:focus {
        border-color: rgba(37, 99, 235, .45);
        box-shadow: 0 0 0 4px var(--primary-soft);
        transform: translateY(-1px);
    }

.textarea {
    min-height: 110px;
    resize: vertical;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .24);
}

    .btn-primary:hover {
        transform: translateY(-2px);
    }

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

    .btn-secondary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow);
    }

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .85rem;
    font-weight: 700;
}
.wizard-hero {
    padding: 26px;
    margin-bottom: 24px;
    animation: fadeUp .45s ease;
}

.hero-text h1 {
    margin: 14px 0 10px;
    font-size: 2rem;
    line-height: 1.5;
}

.hero-text p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.9;
}

.wizard-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.step-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255,255,255,.78);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all .25s ease;
}

    .step-item.active {
        background: var(--primary-soft);
        border-color: rgba(37,99,235,.25);
        transform: translateY(-2px);
    }

    .step-item.done {
        background: rgba(16,185,129,.10);
        border-color: rgba(16,185,129,.20);
    }

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: #fff;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.step-item.active .step-circle {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: transparent;
}

.step-item.done .step-circle {
    background: linear-gradient(135deg, #10b981, #22c55e);
    color: #fff;
    border-color: transparent;
}

.step-label {
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.6;
}

.wizard-body {
    padding: 24px;
}

.wizard-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

    .wizard-head h2 {
        margin: 6px 0 0;
        font-size: 1.45rem;
    }

.wizard-mini-title {
    color: var(--muted);
    font-size: .86rem;
}

.wizard-counter {
    padding: 12px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    min-width: 120px;
    text-align: center;
}

    .wizard-counter span {
        display: block;
        color: var(--muted);
        font-size: .82rem;
        margin-bottom: 4px;
    }

    .wizard-counter strong {
        font-size: 1rem;
    }

.wizard-step-content {
    min-height: 420px;
}

.fade-in {
    animation: fadeUp .35s ease;
}

.step-intro {
    margin-bottom: 22px;
}

    .step-intro h3 {
        margin: 0 0 8px;
        font-size: 1.15rem;
    }

    .step-intro p {
        margin: 0;
        color: var(--muted);
        line-height: 1.8;
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.tab-content {
    display: grid;
    gap: 18px;
}

.indicator-grid {
    display: grid;
    gap: 16px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.final-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.glass-inner-card {
    background: rgba(255,255,255,.88);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.summary-list {
    display: grid;
    gap: 12px;
}

    .summary-list div {
        display: flex;
        justify-content: space-between;
        align-items: start;
        gap: 16px;
        padding: 12px 14px;
        border-radius: 14px;
        background: #fff;
        border: 1px solid var(--border);
    }

    .summary-list span {
        color: var(--muted);
    }

.result-box {
    border-radius: 22px;
    padding: 22px;
    min-height: 180px;
    transition: all .3s ease;
}

    .result-box.state-building {
        background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(34,197,94,.08));
        border: 1px solid rgba(16,185,129,.18);
    }

    .result-box.regime-entrenchment {
        background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(249,115,22,.08));
        border: 1px solid rgba(239,68,68,.18);
    }

    .result-box.mixed {
        background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(168,85,247,.08));
        border: 1px solid rgba(59,130,246,.18);
    }

.result-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.result-desc {
    line-height: 1.9;
}

.totals-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
}

.final-note {
    margin-top: 20px;
}

.summary-box {
    min-height: 110px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    line-height: 1.9;
    white-space: pre-wrap;
}

@media (max-width: 1100px) {
    .wizard-progress,
    .final-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .wizard-head {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-actions {
        flex-direction: column-reverse;
    }

        .wizard-actions .btn {
            width: 100%;
        }

    .hero-text h1 {
        font-size: 1.5rem;
    }
}

.indicator-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    padding: 20px;
    transition: all .28s ease;
}

    .indicator-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

.indicator-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 16px;
}

.indicator-number {
    color: var(--muted);
    font-size: .88rem;
    margin-bottom: 6px;
}

.indicator-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.score-pill {
    min-width: 88px;
    text-align: center;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
}


.evidence-block {
    display: grid;
    gap: 16px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}