/* Masraf Smart AI – scoped front-end design, RTL-first. */
.msa, .msa * { box-sizing: border-box; }
.msa {
  --msa-navy: #0b2f63; --msa-blue: #0757a8; --msa-green: #008b54; --msa-teal: #16ae80;
  --msa-gray: #56708e; --msa-line: #dce8f3; --msa-surface: #f0f7fc;
  font-family: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  direction: rtl; width: 100%; max-width: 1380px; margin: 18px auto 38px;
  background: #fff; color: #092b52; border: 1px solid #e4eff7; border-radius: 24px;
  overflow: hidden; box-shadow: 0 12px 45px rgba(7, 48, 100, .08); isolation: isolate;
  font-size: 15px; line-height: 1.65;
}
.msa button, .msa select, .msa input { font: inherit; }
.msa button { cursor: pointer; }
.msa :is(button, select, input):focus-visible, .msa a:focus-visible { outline: 3px solid #16ae80; outline-offset: 3px; }
.msa a { text-decoration: none; }
.msa .msa-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.msa-hero { position: relative; display: flex; align-items: center; min-height: 262px; padding: 29px 34px 26px; background: linear-gradient(116deg, #eef9ff 0%, #fff 59%, #e1f5ff 100%); overflow: hidden; }
.msa-hero::after { content: ""; position: absolute; left: -80px; bottom: -110px; width: 540px; height: 205px; transform: rotate(-13deg); border-top: 28px solid rgba(0,171,102,.26); border-radius: 50%; pointer-events: none; }
.msa-hero-copy { position: relative; z-index: 2; max-width: 65%; }
.msa-brand { display: inline-flex; gap: 7px; align-items: center; border: 1px solid #9de6bd; border-radius: 40px; padding: 3px 16px; font-weight: 800; color: var(--msa-navy); background: #fff; font-size: 13px; }
.msa-brand span { color: var(--msa-green); font-size: 20px; }
.msa h2 { margin: 12px 0 4px; color: #06295d; font-size: clamp(30px, 4.5vw, 60px); font-weight: 900; letter-spacing: -.8px; line-height: 1.24; }
.msa-ai-mark { display: inline-block; vertical-align: middle; font-size: .69em; color: #fff; background: linear-gradient(125deg,#26c78b,#008a53 53%,#0565c9); padding: .10em .28em; border-radius: .28em; letter-spacing: 0; }
.msa p { margin: 0; }
.msa-tagline { font-size: clamp(17px, 2.1vw, 26px); font-weight: 800; color: #203e62; }
.msa-summary { max-width: 680px; color: #507092; font-size: 16px; line-height: 1.9; margin-top: 7px !important; }
.msa-hero-art { position: absolute; left: 0; top: 0; width: 40%; height: 100%; background: url("hero-illustration.webp") left center / cover no-repeat; mask-image: linear-gradient(to right, black 60%, transparent 99%); -webkit-mask-image: linear-gradient(to right, black 60%, transparent 99%); }
.msa-body { position: relative; z-index: 3; margin-top: -1px; padding: 0 28px 24px; }
.msa-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 13px; background: rgba(255,255,255,.95); border: 1px solid #e2eaf4; border-radius: 18px; overflow: hidden; box-shadow: 0 7px 22px rgba(25,76,128,.10); }
.msa .msa-tab { min-width: 0; border: 0; border-inline-start: 1px solid #e5eaf2; background: transparent; color: #193957; padding: 15px 6px; font-size: 14px; font-weight: 800; white-space: nowrap; transition: background .18s, color .18s; }
.msa .msa-tab:last-child { border-inline-start: 0; }
.msa .msa-tab span { color: var(--msa-green); margin-inline-end: 5px; font-size: 20px; vertical-align: -2px; }
.msa .msa-tab:is(:hover, .is-active) { background: var(--msa-navy); color: #fff; }
.msa .msa-tab:is(:hover, .is-active) span { color: #fff; }
.msa-question-form { display: block; margin: 0; }
.msa .msa-bank-select { display: block; width: 100%; max-width: 380px; margin: 0 0 10px; background: #f5faff; border: 1px solid #cfe1f1; border-radius: 10px; padding: 7px 12px; color: #194064; font-size: 14px; min-height: 40px; }
.msa-input-row { display: flex; align-items: center; padding: 6px; gap: 8px; background: #fff; border: 2px solid #a6ebcd; box-shadow: 0 1px 18px rgba(6,171,115,.15); border-radius: 18px; }
.msa .msa-question { width: 100%; min-width: 0; flex: 1; padding: 12px 15px; border: 0; box-shadow: none; background: #fff; color: #0b2f63; font-size: 16px; outline: 0; }
.msa .msa-question:focus { outline: 0; box-shadow: none; }
.msa .msa-question::placeholder { color: #899bad; }
.msa .msa-submit { flex: 0 0 auto; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 13px 23px; background: linear-gradient(125deg, #009e63, #007d47); color: #fff; border: 0; border-radius: 13px; font-weight: 900; font-size: 15px; }
.msa .msa-submit:disabled { opacity: .65; cursor: wait; }
.msa .msa-submit span { font-size: 19px; display: inline-block; transform: scaleX(-1); }
.msa-prompts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 13px 0 23px; }
.msa .msa-prompts button { min-width: 0; background: #eef7fd; border: 1px solid #d6e9f7; border-radius: 15px; min-height: 52px; color: #10416f; font-size: 13px; font-weight: 700; padding: 10px 12px; }
.msa .msa-prompts button:hover { border-color: var(--msa-green); background: #eafaf2; }
.msa .msa-prompts span { color: var(--msa-green); font-size: 19px; margin-inline-start: 5px; }
.msa-result { border: 1px solid #a4dfc3; background: linear-gradient(180deg,#f5fffa,#fff); padding: 19px 21px; border-radius: 17px; margin: -2px 0 23px; }
.msa-result[hidden] { display: none; }
.msa-result-header { display: flex; align-items: center; gap: 9px; color: #075b3b; font-size: 16px; margin-bottom: 10px; }
.msa-result-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e2f7ec; }
.msa .msa-reset { background: transparent; border: 0; margin-inline-start: auto; color: #4f7390; font-size: 25px; line-height: 1; }
.msa-answer { white-space: pre-line; color: #183f5f; overflow-wrap: anywhere; line-height: 1.95; }
.msa-sources { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.msa-sources:empty { display: none; }
.msa-sources::before { content: "المصادر:"; display: inline-flex; align-items: center; color: #365474; font-weight: 800; font-size: 13px; }
.msa-sources a { display: inline-flex; align-items: center; background: #f4f8fe; color: #075aaa; padding: 6px 10px; border: 1px solid #d4e4f5; border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
.msa-sources a:hover { background: #eaf4ff; }
.msa-checked-at { margin-top: 12px !important; font-size: 12px; color: #658098; }
.msa-banks-block { margin-top: 5px; }
.msa-banks-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.msa-banks-header strong { font-size: 18px; color: #12385f; }
.msa-banks-header a { font-weight: 800; font-size: 13px; color: var(--msa-green); }
.msa-banks-list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.msa .msa-bank-card { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; min-width: 0; min-height: 93px; padding: 10px 6px; border-radius: 15px; border: 1px solid #e1e9f3; background: #fff; color: #133c64; text-align: center; font-size: 12px; font-weight: 800; transition: transform .15s, border-color .15s, background .15s; }
.msa .msa-bank-card:hover, .msa .msa-bank-card.is-active { border-color: #43ba93; background: #effbf7; transform: translateY(-1px); }
.msa-bank-monogram { display: grid; place-items: center; width: 37px; height: 37px; background: #e8f2fb; color: #0a5397; border-radius: 12px; font-weight: 900; font-size: 20px; }
.msa-bank-card:nth-child(even) .msa-bank-monogram { background: #e4f8ec; color: #06845c; }
.msa-bank-name { line-height: 1.55; }
.msa-trust-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 20px; border-radius: 13px; background: #edf5fb; overflow: hidden; }
.msa-trust-strip span { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 15px 8px; font-size: 12px; color: #274767; font-weight: 800; text-align: center; border-inline-start: 1px solid #c9ddec; }
.msa-trust-strip span:last-child { border-inline-start: 0; }
.msa-disclaimer { color: #74869a; font-size: 11px; text-align: center; padding: 13px 6px 0; line-height: 1.9; }
@media (max-width:1000px) {
  .msa-hero-copy { max-width: 69%; }
  .msa-hero-art { width: 38%; }
  .msa-banks-list { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .msa-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .msa .msa-tab:nth-child(3) { border-inline-start: 0; }
  .msa .msa-tab:nth-child(n+4) { border-top: 1px solid #e5eaf2; }
  .msa-prompts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .msa-trust-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .msa-trust-strip span:nth-child(-n+2) { border-bottom: 1px solid #c9ddec; }
}
@media (max-width:650px) {
  .msa { border-radius: 16px; margin: 10px auto 25px; }
  .msa-hero { padding: 18px 16px 92px; min-height: 260px; align-items: flex-start; }
  .msa-hero-copy { max-width: 100%; }
  .msa h2 { font-size: clamp(29px, 7vw, 38px); margin-top: 8px; }
  .msa-tagline { font-size: 16px; max-width: 80%; }
  .msa-summary { font-size: 12px; max-width: 77%; line-height: 1.7; }
  .msa-hero-art { width: 56%; height: 170px; top: auto; bottom: 0; opacity: .83; mask-image: linear-gradient(to right, black 75%, transparent); -webkit-mask-image: linear-gradient(to right, black 75%, transparent); }
  .msa-body { padding: 0 12px 14px; }
  .msa .msa-tab { font-size: 12px; padding: 10px 5px; }
  .msa .msa-tab span { font-size: 14px; }
  .msa .msa-bank-select { max-width: none; width: 100%; }
  .msa .msa-question { padding: 10px 6px; font-size: 13px; }
  .msa .msa-submit { padding: 10px; font-size: 12px; gap: 4px; }
  .msa-input-row { border-radius: 14px; }
  .msa-prompts { gap: 7px; }
  .msa .msa-prompts button { min-height: 52px; padding: 7px 5px; font-size: 11px; }
  .msa-prompts span { display: none; }
  .msa-banks-list { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .msa .msa-bank-card { min-height: 95px; padding: 8px 4px; font-size: 10px; }
  .msa-bank-monogram { width: 30px; height: 30px; font-size: 17px; }
  .msa-banks-header strong { font-size: 15px; }
  .msa-banks-header a { font-size: 12px; }
  .msa-trust-strip span { font-size: 10px; padding: 10px 5px; }
  .msa-result { padding: 13px 12px; }
}
@media (prefers-reduced-motion:reduce) { .msa *, .msa *::before, .msa *::after { transition: none !important; animation: none !important; } }
/* V2: bank explorer, comparisons and accessible feedback */
.msa-bank-filter { display:block; width:100%; max-width:440px; min-height:43px; border:1px solid #cbddec; border-radius:11px; background:#f7fbfe; color:#133c64; margin:0 0 13px; padding:8px 14px; font-size:14px; }
.msa .msa-bank-filter:focus-visible { outline:3px solid #00995c; }
.msa-show-all { display:block; margin:13px auto 0; border:1px solid #b5dfce; border-radius:11px; padding:9px 22px; background:#f0fcf5; color:#075f3a; font-weight:800; }
.msa-show-all[hidden] { display:none; }
.msa-comparison[hidden], .msa-feedback[hidden] { display:none; }
.msa-table-scroll { max-width:100%; overflow-x:auto; margin:13px 0; border-radius:12px; border:1px solid #dce8f3; }
.msa-compare-table { direction:rtl; border-collapse:collapse; width:100%; min-width:560px; font-size:13px; text-align:right; }
.msa-compare-table th { background:#0b376a; color:#fff; font-weight:800; }
.msa-compare-table td, .msa-compare-table th { padding:10px 11px; border-bottom:1px solid #e1ecf4; }
.msa-compare-table tbody tr:nth-child(even) { background:#f2faf7; }
.msa-compare-table a { color:#0758a4; font-weight:800; }
.msa-feedback { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:16px; padding-top:10px; border-top:1px solid #cce8dc; color:#285477; font-size:12px; }
.msa .msa-feedback button { padding:5px 12px; border:1px solid #bbe1d0; border-radius:8px; background:#fff; color:#075b3b; font-weight:800; }
.msa-feedback-msg { color:#087546; }
.msa-bank-card[aria-pressed="true"] { border:2px solid #008b54; }
@media (max-width:650px) {
  .msa-bank-filter { max-width:none; }
  .msa-compare-table { font-size:12px; }
  .msa .msa-tabs button { font-size:12px; }
  .msa-result { padding:13px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .msa *, .msa *::before, .msa *::after { transition-duration:0.01ms !important; animation-duration:0.01ms !important; }
}

/* v2.3: match the approved Arabic blue/green banner composition. */
@media (min-width:1001px) {
  .msa-hero { flex-direction: row-reverse; min-height: 305px; padding: 32px 32px 30px; }
  .msa-hero-copy { width: 57%; flex: 0 0 57%; max-width: 57%; margin-right: auto; }
  .msa-hero-art { left: auto; right: 0; width: 48%; background-position: right center; -webkit-mask-image: linear-gradient(to left, black 56%, transparent 100%); mask-image: linear-gradient(to left, black 56%, transparent 100%); }
  .msa h2 { font-size: clamp(39px, 4vw, 62px); }
  .msa-tabs { grid-template-columns: repeat(7,minmax(0,1fr)); }
  .msa .msa-tab { padding: 16px 4px; font-size: 13px; }
  .msa .msa-tab:nth-child(3) { border-inline-start: 1px solid #e5eaf2; }
  .msa-input-row { flex-direction: row-reverse; min-height: 76px; }
  .msa-input-row::after { content:'⌕'; color:#087d51; font-size:42px; font-weight:400; margin:0 15px; line-height:1; }
  .msa .msa-question { text-align:center; }
  .msa .msa-submit { min-height:64px; min-width:188px; font-size:20px; }
}
.msa { background:#fff; box-shadow:0 15px 46px rgba(1,60,111,.10); }
.msa-hero { background:linear-gradient(104deg,#f7fcff 0%,#eff8ff 46%,#c8ebff 100%); }
.msa-hero::after { border-top-color:rgba(0,184,108,.4); }
.msa-brand { background:rgba(255,255,255,.94); }
.msa-body { padding-top: 0; }
.msa-tabs { border-radius:17px; margin-bottom:15px; }
.msa .msa-tab { display:inline-flex; align-items:center; justify-content:center; gap:5px; text-decoration:none; }
.msa .msa-tab span { margin:0; }
.msa .msa-tab:is(:hover,.is-active) { background:#073b86; color:white; }
.msa .msa-bank-select { position:absolute !important; width:1px!important; height:1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; margin:0!important; padding:0!important; border:0!important; }
.msa-question-form { margin-top: 4px; }
.msa .msa-submit { background:linear-gradient(135deg,#00a362,#008447); }
.msa-prompts { margin-bottom: 16px; }
.msa .msa-prompts button { font-size: 13px; }
.msa .msa-bank-filter { display:none; }
.msa-banks-header { display:none; }
.msa-banks-list { grid-template-columns: repeat(9,minmax(0,1fr)); gap:9px; }
.msa .msa-bank-card { color:#0c2d57; min-height:99px; border-radius:14px; }
.msa-bank-logo { width:42px; height:42px; max-width:100%; object-fit:contain; }
.msa-bank-monogram { background:linear-gradient(135deg,#e5f2ff,#f0fbf4); color:#00683d; font-size:13px; width:42px; height:42px; text-transform:uppercase; }
.msa .msa-directory-card { background:#ecf4fc; text-decoration:none; }
.msa .msa-directory-card .msa-bank-monogram { font-size:26px; background:transparent; color:#0857ba; }
.msa-empty-banks { grid-column:1/-1; font-size:13px; padding:8px; }
.msa-trust-strip { margin-top:18px; background:#eff6fc; }
.msa-trust-strip span { font-size:12px; }
.msa-trust-strip span span { display:inline; color:#087b50; font-size:22px; padding:0 0 0 5px; border:none; }
.msa .msa-show-all { border:1px solid #cfe6d9; background:#f3fbf7; color:#006f48; border-radius:10px; padding:6px 15px; font-weight:750; margin:9px auto 0; display:block; }
.msa .msa-show-all[hidden] {display:none;}
@media (max-width:1000px) and (min-width:651px) {
 .msa-hero { flex-direction:row-reverse; }
 .msa-hero-copy { max-width:65%; }
 .msa-hero-art { left:auto; right:0; width:44%; -webkit-mask-image:linear-gradient(to left,black 45%,transparent); mask-image:linear-gradient(to left,black 45%,transparent); }
 .msa-tabs {grid-template-columns:repeat(4,minmax(0,1fr));}
 .msa-banks-list {grid-template-columns:repeat(5,minmax(0,1fr));}
}
@media(max-width:650px){
 .msa-hero {flex-direction:column; padding-bottom:155px;}
 .msa-hero-art {right:0; left:auto; width:61%; height:166px; -webkit-mask-image:linear-gradient(to left,black 65%,transparent); mask-image:linear-gradient(to left,black 65%,transparent);}
 .msa-tabs {grid-template-columns:repeat(3,minmax(0,1fr));}
 .msa .msa-tab {white-space:normal; padding:11px 4px; font-size:11px; border-top:0;}
 .msa .msa-tab:nth-child(n+4){border-top:1px solid #e5eaf2;}
 .msa .msa-tab:last-child { grid-column:span 3; }
 .msa .msa-question {text-align:right;}
 .msa-banks-list {grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
 .msa .msa-bank-card {min-height:88px;font-size:10px;}
 .msa .msa-prompts button {font-size:11px;}
}

/* 2.4: no marketing assurance strip or blanket disclaimer in visitor UI. */
.msa .msa-trust-strip,.msa .msa-disclaimer{display:none!important;}
.msa .msa-banks-block{margin-bottom:0;}
.msa .msa-checked-at:empty{display:none;}

/* v2.5: requested layout — Arabic copy on the RIGHT, illustration on the LEFT. */
.msa .msa-hero { direction: rtl; flex-direction: row; text-align: right; }
.msa .msa-hero-copy { width: 59%; max-width: 59%; flex: 0 0 59%; margin-left: auto; margin-right: 0; text-align: right; }
.msa .msa-hero-art { left: 0; right: auto; width: 41%; background-position: center center; }
@media(max-width:1000px) {
  .msa .msa-hero-copy { width: 64%; max-width: 64%; flex-basis: 64%; }
  .msa .msa-hero-art { width: 38%; }
}
@media(max-width:650px) {
  .msa .msa-hero { flex-direction: column; padding-bottom: 172px; }
  .msa .msa-hero-copy { width: 100%; max-width: 100%; flex: auto; }
  .msa .msa-hero-art { left: 0; right: auto; width: 61%; height: 170px; background-position: center center; }
  .msa .msa-tagline, .msa .msa-summary { max-width: 100%; }
}

/* v2.5 final: direction and artwork visibility on the opposite side of the text. */
.msa .msa-hero-copy { position:relative; z-index:2; margin-inline:0 auto; }
.msa .msa-hero-art { top:0; bottom:auto; left:0; right:auto; background-position:center; background-size:cover;
  mask-image:linear-gradient(to right,#000 72%,transparent 100%);
  -webkit-mask-image:linear-gradient(to right,#000 72%,transparent 100%); }
@media(max-width:650px){
  .msa .msa-hero { min-height:330px; padding-bottom:174px; }
  .msa .msa-hero-art { top:auto; bottom:0; left:0; right:auto; width:60%; height:172px; }
}
