:root {
    color-scheme: light;
    --bg: #f4f6f5;
    --panel: #ffffff;
    --ink: #182025;
    --muted: #62707a;
    --line: #dce3e7;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --accent-warm: #9a5a20;
    --soft: #e7f4f2;
    --warning: #fff7df;
    --warning-line: #eddba2;
    --shadow: 0 18px 50px rgba(20, 31, 37, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background:
        linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 38%),
        linear-gradient(240deg, rgba(188, 98, 43, 0.08), transparent 42%),
        var(--bg);
    color: var(--ink);
}

button {
    font: inherit;
}

.app-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
    display: grid;
    align-items: center;
}

.intro-panel {
    min-height: min(680px, calc(100vh - 64px));
    display: grid;
    align-content: center;
    gap: 28px;
    padding: clamp(28px, 6vw, 72px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.intro-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 0.92rem;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.35rem);
    line-height: 1.12;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.intro-copy p:last-child {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.9;
}

.primary-action,
.secondary-action {
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-action {
    justify-self: start;
    min-height: 58px;
    padding: 0 28px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1.08rem;
}

.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-1px);
}

.primary-action:active,
.secondary-action:active {
    transform: translateY(0);
}

.report-view {
    align-self: start;
    width: 100%;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.secondary-action {
    min-height: 42px;
    padding: 0 16px;
    color: var(--accent-strong);
    background: var(--soft);
    border: 1px solid #c8e5e1;
    font-weight: 700;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--warning-line);
    background: var(--warning);
    border-radius: 8px;
    color: #6e5a17;
    line-height: 1.7;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    min-width: 0;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 31, 37, 0.06);
}

.summary-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.summary-value {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.18rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.summary-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.cards {
    display: grid;
    gap: 12px;
}

.info-card {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 31, 37, 0.06);
    overflow: hidden;
}

.info-card summary {
    cursor: pointer;
    list-style: none;
}

.info-card summary::-webkit-details-marker {
    display: none;
}

.info-card h3 {
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 1.02rem;
    background: #fbfcfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.info-card h3::after {
    content: "+";
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--accent-strong);
    background: var(--soft);
    font-weight: 800;
}

.info-card[open] h3::after {
    content: "-";
}

.rows {
    display: grid;
}

.row {
    display: grid;
    grid-template-columns: minmax(116px, 34%) minmax(0, 1fr);
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid #edf1f3;
}

.row:last-child {
    border-bottom: 0;
}

.key {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.value {
    min-width: 0;
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    line-height: 1.55;
}

.value.ar {
    direction: rtl;
    text-align: right;
}

.faq-section,
.content-page {
    width: 100%;
    margin-top: 18px;
    padding: clamp(20px, 4vw, 34px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 31, 37, 0.06);
}

.faq-section h2,
.content-page h1,
.content-page h2 {
    margin: 0 0 14px;
}

.content-page h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.content-page h2 {
    margin-top: 26px;
    font-size: 1.35rem;
}

.content-page p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.9;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    overflow: hidden;
}

.faq-list summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 800;
}

.faq-list p {
    margin: 0;
    padding: 0 16px 16px;
    color: var(--muted);
    line-height: 1.8;
}

.page-shell {
    align-items: start;
}

.page-link {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    text-decoration: none;
}

.site-footer {
    align-self: end;
    margin-top: 18px;
    padding: 18px 10px 6px;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.7;
}

.site-footer p {
    margin: 0 0 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 700;
}

.footer-links svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-links a:hover {
    border-color: #b7d8d4;
    background: var(--soft);
}

@media (max-width: 640px) {
    body {
        background: var(--bg);
    }

    .app-shell {
        width: min(100% - 16px, 1120px);
        padding: 8px 0 18px;
        align-items: start;
    }

    .intro-panel {
        min-height: auto;
        padding: 28px 22px 22px;
        align-content: start;
        gap: 22px;
    }

    .primary-action {
        width: 100%;
        min-height: 60px;
    }

    .report-header {
        align-items: stretch;
        flex-direction: column;
        margin-top: 10px;
    }

    .actions,
    .secondary-action {
        width: 100%;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .summary-card {
        padding: 14px;
    }

    .faq-section,
    .content-page {
        margin-top: 10px;
        padding: 18px;
        box-shadow: none;
    }

    .summary-value {
        font-size: 1.08rem;
    }

    .info-card {
        box-shadow: none;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 14px;
    }

    .site-footer {
        margin-top: 10px;
        padding-bottom: 0;
    }

    .footer-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .footer-links a {
        justify-content: center;
    }

    h1 {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }

    h2 {
        font-size: 1.55rem;
    }
}
