/* محافظة ظهرت — استعلام مباشر + بطاقة نتيجة شبابية */

/* ── عرض صفحة النتيجة: 1200px متمركز ── */
.np-gov-flow--live > .np-wrap {
    max-width: var(--np-max-result, 1200px);
}
.np-gov-flow--live .np-search-block {
    max-width: 100%;
    width: 100%;
}
.np-gov-result-stage {
    width: 100%;
    max-width: var(--np-max-result, 1200px);
    margin-inline: auto;
}
.np-gov-result-stage:not([hidden]) {
    margin-top: 16px;
    animation: gpl-reveal .35s ease;
}
html.gov-has-result .np-gov-flow--live .np-search-card--premium {
    padding-bottom: 8px;
}
html.gov-has-result .np-live-search--stage {
    margin-top: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
html.gov-has-result .np-live-search--stage .np-live-search__inner {
    padding: 0;
}
html.gov-has-result .np-student-result-full--youth {
    width: 100%;
    max-width: var(--np-max-result, 1200px);
    margin-inline: auto;
}

.gpl-term-strip {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--gpl-accent, #1a6fb5) 22%, #e2e8f0);
    background: linear-gradient(135deg, color-mix(in srgb, var(--gpl-accent) 8%, #fff) 0%, #fff 55%, color-mix(in srgb, #10b981 6%, #fff) 100%);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--gpl-accent) 10%, transparent);
}
.gpl-term-strip__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.gpl-term-strip__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 800;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 5px 10px;
    border-radius: 999px;
}
.gpl-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .5);
    animation: gpl-pulse 1.8s ease infinite;
}
@keyframes gpl-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.gpl-term-strip__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
    border: 1px solid transparent;
}
.gpl-term-strip__chip--t1 {
    color: #1d4ed8;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
}
.gpl-term-strip__chip--t2 {
    color: #b45309;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: #fdba74;
}
.gpl-term-strip__emoji { font-size: 1rem; line-height: 1; }
.gpl-term-strip__round {
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.gpl-term-strip__gov,
.gpl-term-strip__split {
    margin: 8px 0 0;
    font-size: .8rem;
    color: #475569;
    line-height: 1.5;
}
.gpl-term-strip__split { color: #7c3aed; font-weight: 600; }

/* صفحة المحافظة — وضع ظهرت */
.np-gov-flow--live .np-hero--gov-live {
    padding-bottom: 28px;
}
.np-gov-flow--live .np-hero--gov-live .np-hero-rich-row--compact {
    gap: 16px;
}
.np-gov-flow--live .np-search-card--premium {
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--gov-accent, #1a6fb5) 18%, #e2e8f0);
    box-shadow: 0 12px 40px color-mix(in srgb, var(--gov-accent) 12%, rgba(15, 23, 42, .06));
}
.np-gov-flow--live .gov-search-panel--revealed {
    animation: gpl-reveal .45s ease;
}
@keyframes gpl-reveal {
    from { opacity: .6; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

html.gov-has-result .np-hero--gov-live {
    padding-top: 12px;
    padding-bottom: 16px;
}
html.gov-has-result .np-hero--gov-live .np-hero-lead,
html.gov-has-result .np-hero--gov-live .np-hero-features,
html.gov-has-result .np-hero--gov-live .np-hero-stat-row {
    display: none;
}
html.gov-has-result .np-hero--gov-live .np-hero-gov-title {
    font-size: clamp(1.05rem, 3.5vw, 1.35rem);
}

/* ══ بطاقة النتيجة — نسخة شبابية ══ */
.np-student-result-full--youth {
    --youth-accent: var(--gov-accent, #1a6fb5);
    contain: layout style;
}
.np-student-result-full--youth .np-result-success-banner {
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, .12);
}
.np-student-result-full--youth .np-result-success-emoji {
    font-size: 1.6rem;
}
.np-student-result-full--youth .np-result-toolbar {
    padding: 8px 0 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, #fff 92%, transparent);
    backdrop-filter: blur(8px);
    margin: 0 -4px;
    padding-inline: 4px;
}
.np-student-result-full--youth .np-result-cert {
    border: none;
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--youth-accent) 15%, #e2e8f0),
        0 20px 50px color-mix(in srgb, var(--youth-accent) 14%, rgba(15, 23, 42, .08));
    overflow: hidden;
}
.np-student-result-full--youth .np-result-cert::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--youth-accent), #10b981, #8b5cf6);
}
.np-student-result-full--youth .np-result-cert-topbar {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 12px 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--youth-accent) 6%, #f8fafc) 0%, #fff 100%);
    border-bottom: 1px solid #f1f5f9;
    font-size: .78rem;
    font-weight: 700;
}
.np-student-result-full--youth .np-cert-term-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-weight: 800;
}
.np-student-result-full--youth .np-cert-term-chip--t1 {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    border-color: #93c5fd;
}
.np-student-result-full--youth .np-result-cert-head {
    padding: 18px 16px 14px;
    background: transparent;
    border: none;
}
.np-student-result-full--youth .np-avatar--xl {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 1.65rem;
    background: linear-gradient(135deg, var(--youth-accent), #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--youth-accent) 35%, transparent);
}
.np-student-result-full--youth .np-result-cert-head h2 {
    font-size: clamp(1.1rem, 4.2vw, 1.45rem);
    line-height: 1.35;
    margin: 0;
}
.np-student-result-full--youth .np-result-chips {
    margin-top: 8px;
    gap: 6px;
}
.np-student-result-full--youth .np-chip {
    font-size: .78rem;
    padding: 5px 10px;
    border-radius: 10px;
}
.np-student-result-full--youth .np-result-stats--icons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 16px 12px;
}
.np-student-result-full--youth .np-result-stat-tile {
    border-radius: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.np-student-result-full--youth .np-result-stat-tile--wide {
    grid-column: 1 / -1;
}
.np-student-result-full--youth .np-result-stat-tile strong {
    font-size: .95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.np-student-result-full--youth .np-result-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 16px 12px;
}
.np-student-result-full--youth .np-result-insight {
    border-radius: 12px;
    padding: 10px;
    font-size: .78rem;
}
.np-student-result-full--youth .np-result-subjects {
    padding: 0 12px 12px;
}
.np-student-result-full--youth .np-result-subjects h3 {
    font-size: .92rem;
    margin-bottom: 10px;
}
.np-student-result-full--youth .np-result-subject-list {
    display: grid;
    gap: 8px;
}
.np-student-result-full--youth .np-result-subject--rich {
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.np-student-result-full--youth .np-subject-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--youth-accent) 12%, #fff);
    color: var(--youth-accent);
    flex-shrink: 0;
}
.np-student-result-full--youth .np-result-subject-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
}
.np-student-result-full--youth .np-result-subject-name {
    font-weight: 800;
    font-size: .86rem;
}
.np-student-result-full--youth .np-result-subject-score {
    font-weight: 800;
    color: var(--youth-accent);
    white-space: nowrap;
    font-size: .88rem;
}
.np-student-result-full--youth .np-result-subject-bar {
    height: 5px;
    border-radius: 999px;
    background: #e2e8f0;
    margin-top: 6px;
    overflow: hidden;
}
.np-student-result-full--youth .np-result-subject-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--youth-accent), #10b981);
}
.np-student-result-full--youth .np-result-layout {
    display: block;
    width: 100%;
}
.np-student-result-full--youth .np-result-cert-stack {
    width: 100%;
    min-width: 0;
}
.np-student-result-full--youth .np-result-aside {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
@media (min-width: 900px) {
    .np-student-result-full--youth .np-result-layout--coord {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 16px;
        align-items: start;
    }
    .np-student-result-full--youth .np-result-share-span {
        grid-column: 1 / -1;
    }
}
.np-student-result-full--youth .np-result-cert-foot {
    padding: 12px 16px;
    font-size: .75rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}
.np-student-result-full--youth .np-live-search-panel {
    margin-top: 8px;
}
.np-gov-result-ads {
    margin-top: 12px;
    max-width: var(--np-max-result, 1200px);
    margin-inline: auto;
    width: 100%;
}
html:not(.gov-has-result) .np-gov-result-ads {
    display: none;
}

/* موبايل — بطاقة النتيجة والإعلان */
@media (max-width: 768px) {
    .np-gov-flow--live .np-search-block,
    .np-gov-result-stage,
    html.gov-has-result .np-student-result-full--youth {
        max-width: 100%;
    }
    .np-student-result-full--youth .np-result-cert-head {
        flex-direction: column;
        align-items: stretch;
    }
    .np-student-result-full--youth .np-result-ring-wrap {
        align-self: center;
    }
    .np-student-result-full--youth .np-result-stats--icons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0 12px 12px;
    }
    .np-student-result-full--youth .np-result-stat-tile--wide {
        grid-column: 1 / -1;
    }
    .np-student-result-full--youth .np-result-subject-list {
        gap: 6px;
    }
    .np-student-result-full--youth .np-result-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}
@media (max-width: 640px) {
    .np-student-result-full--youth .np-result-actions {
        width: 100%;
        justify-content: stretch;
    }
    .np-student-result-full--youth .np-result-actions .np-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
        font-size: .78rem;
    }
    .np-student-result-full--youth .np-result-ring--lg {
        width: 88px;
        height: 88px;
    }
    .np-student-result-full--youth .np-result-insights {
        grid-template-columns: 1fr;
    }
    .gpl-term-strip__row { gap: 6px; }
}
