#aatlp-modal,
#aatlp-modal *,
#aatlp-launcher,
#aatlp-launcher * { box-sizing: border-box; }

#aatlp-modal[hidden] { display: none !important; }

#aatlp-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    background: rgba(8, 19, 28, .72);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    color: #122b39;
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    letter-spacing: normal;
    text-transform: none;
}

#aatlp-modal .aatlp-panel {
    position: relative;
    flex: 0 1 640px;
    width: 100%;
    min-width: 0;
    margin: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 100px rgba(0, 0, 0, .32);
    animation: aatlp-enter .22s ease-out both;
}

#aatlp-modal .aatlp-stripe { display: flex; height: 5px; }
#aatlp-modal .aatlp-stripe span { flex: 1; background: #172027; }
#aatlp-modal .aatlp-stripe span:nth-child(2) { background: #c4343e; }
#aatlp-modal .aatlp-stripe span:nth-child(3) { background: #16805b; }

#aatlp-modal .aatlp-close {
    position: absolute;
    top: 17px;
    right: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e7e9;
    border-radius: 50%;
    background: #f7f9fa;
    color: #3c5260;
    box-shadow: none;
    cursor: pointer;
}

#aatlp-modal .aatlp-intro { padding: 39px 54px 26px; }
#aatlp-modal .aatlp-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 20px 25px;
    color: #304653;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 2px;
}
#aatlp-modal .aatlp-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 8px;
    background: #102e3d;
    color: #fff;
    font-size: 11px;
    letter-spacing: -1px;
}
#aatlp-modal .aatlp-welcome {
    margin: 0 0 10px;
    padding: 0;
    color: #60727d;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
}
#aatlp-modal #aatlp-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: #122b39;
    background: none;
    font-family: inherit;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.7px;
    text-transform: none;
}
#aatlp-modal #aatlp-description {
    margin: 11px 0 0;
    padding: 0;
    color: #506774;
    font-size: 23px;
    font-weight: 500;
    line-height: 1.8;
}
#aatlp-modal [lang="ps"], #aatlp-launcher [lang="ps"] {
    font-family: "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    letter-spacing: normal;
}
#aatlp-modal .aatlp-choices {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 0 30px 28px;
}
#aatlp-modal .aatlp-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    min-width: 0;
    min-height: 202px;
    margin: 0;
    padding: 23px 21px;
    border: 1px solid #dce4e8;
    border-radius: 15px;
    background: #f8fafb;
    color: #142e3e;
    box-shadow: none;
    text-align: start;
    text-decoration: none;
    text-transform: none;
    transition: border-color .15s, background-color .15s, transform .15s;
}
#aatlp-modal .aatlp-choice::before,
#aatlp-modal .aatlp-choice::after { content: none; }
#aatlp-modal .aatlp-pashto { background: #f1f8f4; border-color: #d3e5da; color: #15563d; }
#aatlp-modal .aatlp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 42px;
    padding: 0 9px;
    border: 1px solid #d9e2e7;
    border-radius: 10px;
    background: #fff;
    color: #304c5e;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
#aatlp-modal .aatlp-pashto .aatlp-badge { border-color: #c7e0d1; color: #15563d; font-size: 19px; }
#aatlp-modal .aatlp-choice-title { display: block; font-size: 18px; font-weight: 700; line-height: 1.5; }
#aatlp-modal .aatlp-pashto .aatlp-choice-title { font-size: 24px; line-height: 1.65; }
#aatlp-modal .aatlp-choice-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    color: #4b6270;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
}
#aatlp-modal .aatlp-pashto .aatlp-choice-action { color: #226247; font-size: 16px; }
#aatlp-modal .aatlp-footnote {
    margin: 0;
    padding: 16px 22px;
    border-top: 1px solid #edf0f2;
    background: #fcfdfd;
    color: #677983;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}
#aatlp-modal .aatlp-choice:hover { transform: translateY(-2px); border-color: #809baa; background: #f0f5f8; }
#aatlp-modal .aatlp-pashto:hover { border-color: #5a9b78; background: #e9f4ed; }
#aatlp-modal .aatlp-close:hover { background: #eaf0f3; }
#aatlp-modal a:focus-visible,
#aatlp-modal button:focus-visible,
#aatlp-launcher:focus-visible { outline: 3px solid #176cb3; outline-offset: 4px; }

#aatlp-launcher {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 99990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border: 1px solid #344e5b;
    border-radius: 999px;
    background: #102e3d;
    color: #fff;
    box-shadow: 0 5px 22px rgba(0, 0, 0, .18);
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    text-decoration: none;
    text-transform: none;
}
#aatlp-launcher:hover { background: #1c4559; color: #fff; }
#aatlp-launcher svg { flex-shrink: 0; }
#aatlp-launcher::before, #aatlp-launcher::after { content: none; }

@keyframes aatlp-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 540px) {
    #aatlp-modal { padding: 14px; }
    #aatlp-modal .aatlp-panel { border-radius: 20px; }
    #aatlp-modal .aatlp-close { top: 13px; right: 13px; }
    #aatlp-modal .aatlp-intro { padding: 29px 22px 20px; }
    #aatlp-modal .aatlp-brand { margin: 0 38px 25px; font-size: 10px; letter-spacing: 1.5px; }
    #aatlp-modal .aatlp-choices { grid-template-columns: minmax(0, 1fr); gap: 11px; padding: 0 19px 22px; }
    #aatlp-modal .aatlp-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 5px; min-height: 112px; padding: 17px; }
    #aatlp-modal .aatlp-badge { grid-column: 1; grid-row: 1 / 3; align-self: center; }
    #aatlp-modal .aatlp-choice-title, #aatlp-modal .aatlp-choice-action { grid-column: 2; }
    #aatlp-modal .aatlp-choice-title { font-size: 17px; }
    #aatlp-modal .aatlp-pashto .aatlp-choice-title { font-size: 22px; }
    #aatlp-modal .aatlp-pashto .aatlp-choice-action { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    #aatlp-modal .aatlp-panel { animation: none; }
    #aatlp-modal .aatlp-choice { transition: none; }
    #aatlp-modal .aatlp-choice:hover { transform: none; }
}
@media print { #aatlp-modal, #aatlp-launcher { display: none !important; } }
