/* Long-form application experience */
body:has(form[action*="/forms/"]){background:linear-gradient(180deg,#edf3f9 0,#f7f9fc 460px)}
.page-head:has(+ form[action*="/forms/"]){padding:26px 0 30px;background:linear-gradient(135deg,#17365d,#24527f);color:#fff;border-bottom:3px solid #b28733}
.page-head:has(+ form[action*="/forms/"]) .container{width:min(1160px,calc(100% - 32px));text-align:center}
.page-head:has(+ form[action*="/forms/"]) .eyebrow{display:inline-flex;padding:6px 12px;border:1px solid rgba(255,255,255,.25);border-radius:999px;background:rgba(255,255,255,.08);color:#f1ce86}
.page-head:has(+ form[action*="/forms/"]) .page-title{max-width:none;width:100%;display:block;margin:0;font-size:clamp(21px,2vw,25px);line-height:1.3;color:#fff;white-space:nowrap}
.page-head:has(+ form[action*="/forms/"]) .ltr{margin:8px 0 0;font-size:14px;line-height:1.5;color:#dce8f4;text-align:center}
.page-head:has(+ form[action*="/forms/"]) p:last-child{max-width:820px;margin:8px auto 0;font-size:14px;line-height:1.65;color:#e8eef5}
form[action*="/forms/"].section{padding-top:38px}
form[action*="/forms/"]>.container{width:min(1020px,calc(100% - 32px));counter-reset:form-section}
form[action*="/forms/"]>.container:before{content:"أكمل جميع الأقسام التالية ثم راجع البيانات قبل الإرسال\A Complete all sections below, then review your information before submitting";display:block;margin:0 0 22px;padding:14px 18px;border:1px solid #c6d6e7;border-right:4px solid #b28733;border-radius:10px;background:#fff;color:#3e5269;font-weight:600;white-space:pre-line;line-height:1.75}
form[action*="/forms/"] .form-section{counter-increment:form-section;position:relative;margin:0 0 28px;padding:34px 34px 26px;border:1px solid #d9e2ec;border-radius:18px;background:#fff;box-shadow:0 10px 30px rgba(23,54,93,.07);scroll-margin-top:120px}
form[action*="/forms/"] .form-section:focus-within{border-color:#9db7d1;box-shadow:0 14px 38px rgba(23,54,93,.11)}
form[action*="/forms/"] .form-section legend{display:flex;align-items:center;gap:11px;width:auto;max-width:calc(100% - 40px);margin:0;padding:0 0 18px;color:#17365d;font-family:'Noto Naskh Arabic',serif;font-size:25px;line-height:1.35}
form[action*="/forms/"] .form-section legend:before{content:counter(form-section);display:grid;flex:0 0 38px;place-items:center;width:38px;height:38px;border-radius:11px;background:#17365d;color:#fff;font-family:'Noto Sans Arabic',sans-serif;font-size:16px;font-weight:800;box-shadow:0 5px 12px rgba(23,54,93,.18)}
form[action*="/forms/"] .form-section legend .section-title{white-space:nowrap;font-weight:700}
form[action*="/forms/"] .form-section legend small{display:flex;align-items:center;gap:10px;margin-inline-start:2px;color:#66778a;font-family:'Noto Sans Arabic',sans-serif;font-size:13px;font-weight:500;direction:ltr;white-space:nowrap}
form[action*="/forms/"] .form-section legend small:before{content:"";display:block;width:24px;height:1px;background:#b8c6d5}
form[action*="/forms/"] .form-grid{gap:4px 24px}
form[action*="/forms/"] .form-group{margin-bottom:21px}
form[action*="/forms/"] .form-group label,form[action*="/forms/"] .form-group>span{display:block;margin-bottom:8px;color:#263b53;font-size:14px;font-weight:700}
form[action*="/forms/"] .control{min-height:52px;padding:12px 15px;border-color:#c6d2df;border-radius:10px;background:#fbfcfe;font-size:15px;transition:border-color .2s,box-shadow .2s,background-color .2s}
form[action*="/forms/"] .control:hover{border-color:#9eb1c5;background:#fff}
form[action*="/forms/"] .control:focus{border-color:#2563eb;background:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
form[action*="/forms/"] .control:user-invalid{border-color:#b42318;box-shadow:0 0 0 3px rgba(180,35,24,.09)}
form[action*="/forms/"] textarea.control{min-height:132px;line-height:1.75}
form[action*="/forms/"] input:disabled{border-style:dashed;background:#f0f3f7;color:#41556c;opacity:1}
form[action*="/forms/"] .choice-row{gap:10px}
form[action*="/forms/"] .choice{min-height:48px;align-items:center;padding:10px 14px;border-color:#d4dde7;background:#fafbfd;cursor:pointer;transition:border-color .2s,background-color .2s,box-shadow .2s}
form[action*="/forms/"] .choice:hover{border-color:#9db2c8;background:#f3f7fb}
form[action*="/forms/"] .choice:has(input:checked){border-color:#2563eb;background:#eef5ff;box-shadow:inset 0 0 0 1px #2563eb}
form[action*="/forms/"] .choice input{accent-color:#17365d;flex:0 0 auto}
form[action*="/forms/"] input[type=file].control{padding:7px;background:#f7f9fc;cursor:pointer}
form[action*="/forms/"] input[type=file]::file-selector-button{height:36px;margin-inline-end:12px;padding:0 14px;border:0;border-radius:7px;background:#e5edf6;color:#17365d;font-weight:700;cursor:pointer}
form[action*="/forms/"] .form-section>p.muted{margin:-6px 0 24px;padding:12px 15px;border-radius:9px;background:#f2f6fa;color:#52667c;font-size:13px}
form[action*="/forms/"] .form-section:nth-last-of-type(1)>.choice{width:100%;margin-bottom:10px!important;border-radius:10px;background:#fbfcfe}
form[action*="/forms/"]>.container>.card:last-child{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 30px;border:1px solid #bfd0e2;border-radius:16px;background:linear-gradient(135deg,#fff,#f1f6fb);box-shadow:0 12px 30px rgba(23,54,93,.08)}
form[action*="/forms/"]>.container>.card:last-child p{margin:0;max-width:680px}
form[action*="/forms/"]>.container>.card:last-child .button{flex:0 0 auto;min-width:210px;background:#17365d;box-shadow:0 7px 16px rgba(23,54,93,.2)}
@media(max-width:800px){.page-head:has(+ form[action*="/forms/"]){padding:22px 0 26px}.page-head:has(+ form[action*="/forms/"]) .page-title{font-size:23px;line-height:1.4;white-space:normal}form[action*="/forms/"].section{padding-top:24px}form[action*="/forms/"] .form-section{padding:26px 18px 18px;border-radius:14px}form[action*="/forms/"] .form-section legend{align-items:flex-start;flex-wrap:wrap;gap:5px 10px;font-size:21px}form[action*="/forms/"] .form-section legend:before{grid-row:span 2}form[action*="/forms/"] .form-section legend small{flex-basis:calc(100% - 48px);margin-inline-start:48px;margin-top:-6px;font-size:12px}form[action*="/forms/"] .form-section legend small:before{display:none}form[action*="/forms/"]>.container>.card:last-child{align-items:stretch;flex-direction:column;padding:22px}form[action*="/forms/"]>.container>.card:last-child .button{width:100%}}
@media(prefers-reduced-motion:reduce){form[action*="/forms/"] *{transition:none!important}}

/* Consistent bilingual hierarchy: Arabic first, English directly underneath. */
form[action*="/forms/"] .bi-copy{display:flex;min-width:0;flex-direction:column;align-items:flex-start;gap:2px;line-height:1.35;text-align:start}
form[action*="/forms/"] .bi-ar{display:block;color:#263b53;font-weight:700}
form[action*="/forms/"] .bi-en{display:block;margin:0!important;color:#66778a!important;font-family:"Noto Sans Arabic",sans-serif!important;font-size:12px!important;font-weight:500!important;line-height:1.4;direction:ltr;text-align:left}
form[action*="/forms/"] label.choice .bi-copy{flex:1}
form[action*="/forms/"] .form-group>small>.bi-copy{margin-top:4px}
