/* هوية «برامج قسورة»: كحلي تقني + أزرق كهربائي + لمسة برتقالي قسورة. متغيرات بأسماء خاصة (--ap-*) عشان أوضاع الطبقة المشتركة ما تغسلهاش */
:root {
  --ap-navy: #0B1230; --ap-navy-2: #131C45; --ap-blue: #2F6FE0; --ap-blue-2: #5B9BFF; --ap-cyan: #39D0F0; --ap-orange: #F27A1A; --ap-orange-2: #FFB45C;
  --ap-bg: #F3F6FC; --ap-surface: #FFFFFF; --ap-ink: #0E1530; --ap-ink-2: #3A4566; --ap-muted: #6B7594; --ap-line: #E1E7F3; --ap-soft: #EAF0FD;
  --ap-win: #2F6FE0; --ap-and: #16A05A; --ap-shadow: 0 22px 44px -28px rgba(14, 21, 48, .45);
}
html[data-q-theme="dark"] {
  --ap-bg: #070B1E; --ap-surface: #10183A; --ap-ink: #EAF0FF; --ap-ink-2: #B9C4E4; --ap-muted: #8794BA; --ap-line: #1F2A55; --ap-soft: #16214D; --ap-shadow: 0 22px 44px -26px rgba(0, 0, 0, .9);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html[data-q-theme] body.ap, body.ap { margin: 0; font: 400 16.5px/1.8 'Zain', 'Segoe UI', Tahoma, sans-serif; color: var(--ap-ink); background: var(--ap-bg); }
.ap a { color: var(--ap-blue); text-decoration: none; }
img { max-width: 100%; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- الهيدر والهيرو ---------- */
.top { background: var(--ap-navy); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.ap .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.12rem; }
.brand .mk { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(59, 123, 255, .8); }
.brand .q { height: 30px; width: auto; opacity: .95; padding-inline-start: 10px; border-inline-start: 1px solid rgba(255, 255, 255, .18); }
.brand em { font-style: normal; color: var(--ap-cyan); }
.hero { position: relative; overflow: hidden; color: #DCE4FF; background: radial-gradient(900px 420px at 85% -10%, rgba(59, 123, 255, .45), transparent 60%), radial-gradient(700px 380px at 5% 110%, rgba(242, 122, 26, .22), transparent 60%), linear-gradient(180deg, var(--ap-navy), var(--ap-navy-2)); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 30%, transparent 95%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); pointer-events: none; }
.hero .wrap { position: relative; }
.hgrid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; padding: 46px 0 86px; }
.kick { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; color: var(--ap-cyan); background: rgba(57, 208, 240, .1); border: 1px solid rgba(57, 208, 240, .3); padding: 3px 12px; border-radius: 99px; }
.kick i { width: 7px; height: 7px; border-radius: 50%; background: var(--ap-cyan); box-shadow: 0 0 0 4px rgba(57, 208, 240, .2); }
.hero h1 { margin: 14px 0 10px; color: #fff; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.25; font-weight: 800; }
.hero h1 b { background: linear-gradient(90deg, var(--ap-blue-2), var(--ap-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 0; max-width: 560px; color: #AEB9DD; font-size: 1.05rem; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.stats span { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #E6ECFF; padding: 6px 14px; border-radius: 12px; font-weight: 700; font-size: .92rem; }
.stats svg { width: 17px; height: 17px; }
.art { position: relative; }
.art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }

/* ---------- الفلاتر والكروت ---------- */
.filters { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: -30px auto 28px; padding: 7px; width: fit-content; max-width: 100%; background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 18px; box-shadow: var(--ap-shadow); }
.filters button { font: 800 .96rem 'Zain', sans-serif; padding: 8px 18px; border-radius: 12px; border: 0; background: transparent; color: var(--ap-ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.filters button:hover { background: var(--ap-soft); }
.filters button[aria-pressed="true"] { background: linear-gradient(135deg, var(--ap-blue), #1C4FC4); color: #fff; box-shadow: 0 8px 18px -10px rgba(47, 111, 224, .9); }
.filters input { font: 400 1rem 'Zain', sans-serif; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--ap-line); background: var(--ap-bg); color: var(--ap-ink); min-width: 220px; }
.filters input:focus { outline: none; border-color: var(--ap-blue); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; margin-bottom: 30px; }
.ap .app { --c: var(--ap-blue); position: relative; display: flex; flex-direction: column; background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 22px; overflow: hidden; color: var(--ap-ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.app:hover { transform: translateY(-4px); box-shadow: var(--ap-shadow); border-color: color-mix(in srgb, var(--c) 45%, var(--ap-line)); }
.app .band { height: 84px; background: radial-gradient(120px 90px at 85% 0%, rgba(255, 255, 255, .35), transparent 70%), linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #0B1230)); position: relative; }
.app .band::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
.app .ico { position: absolute; top: 44px; inset-inline-start: 20px; width: 76px; height: 76px; border-radius: 20px; border: 4px solid var(--ap-surface); background: var(--ap-surface); object-fit: cover; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .5); z-index: 1; }
.app .bd { padding: 44px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.app .t { display: block; font-weight: 800; margin: 0; font-size: 1.28rem; line-height: 1.3; }
.app .t small { display: block; font-size: .86rem; color: var(--ap-muted); font-weight: 400; }
.app p { margin: 0; color: var(--ap-ink-2); font-size: .95rem; line-height: 1.7; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--ap-muted); }
.pf { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-weight: 700; font-size: .8rem; }
.pf.windows { background: color-mix(in srgb, var(--ap-win) 13%, transparent); color: var(--ap-win); }
.pf.android { background: color-mix(in srgb, var(--ap-and) 14%, transparent); color: var(--ap-and); }
html[data-q-theme="dark"] .pf.windows { color: #8DB6FF; } html[data-q-theme="dark"] .pf.android { color: #5EE09A; }
.pf svg { width: 14px; height: 14px; }
.ver { background: var(--ap-soft); color: var(--ap-ink-2); padding: 2px 9px; border-radius: 99px; font-weight: 700; }
.go { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 800; color: #fff; background: var(--c); padding: 10px 16px; border-radius: 14px; margin-top: 4px; }
.go span { font-size: .82rem; opacity: .85; font-weight: 400; }
.none-msg { text-align: center; color: var(--ap-muted); padding: 30px 0 50px; }
.ap .soon { border: 2px dashed var(--ap-line); background: transparent; align-items: center; justify-content: center; text-align: center; color: var(--ap-muted); min-height: 260px; gap: 8px; padding: 20px; }
.soon:hover { transform: none; box-shadow: none; }
.soon svg { width: 46px; height: 46px; color: var(--ap-blue); opacity: .7; }
.soon b { color: var(--ap-ink); font-size: 1.1rem; }
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 14px 0 46px; }
.why div { background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 18px; padding: 18px; }
.why svg { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--ap-soft); color: var(--ap-blue); }
.why b { display: block; margin: 8px 0 2px; font-size: 1.02rem; }
.why small { color: var(--ap-muted); font-size: .88rem; line-height: 1.6; display: block; }
h2.sec { font-size: 1.35rem; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
h2.sec::before { content: ''; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(var(--ap-blue), var(--ap-cyan)); }

/* ---------- صفحة البرنامج ---------- */
.app-hero .hgrid { grid-template-columns: 1fr; padding: 30px 0 84px; }
.app-hero { --c: var(--ap-blue); background: radial-gradient(800px 380px at 80% -20%, color-mix(in srgb, var(--c) 70%, transparent), transparent 62%), radial-gradient(600px 300px at 0% 120%, rgba(242, 122, 26, .2), transparent 60%), linear-gradient(180deg, var(--ap-navy), var(--ap-navy-2)); }
.crumb { font-size: .88rem; color: #9AA6CF; }
.ap .crumb a { color: var(--ap-cyan); }
.ah { display: flex; gap: 22px; align-items: center; margin-top: 12px; }
.ah .ico { width: 104px; height: 104px; border-radius: 26px; border: 4px solid rgba(255, 255, 255, .14); box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .7); background: #fff; flex: none; }
.ah h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.ah h1 small { display: block; font-size: 1.02rem; color: #AEB9DD; font-weight: 400; }
.ah p { margin: 6px 0 0; color: #C3CCEA; }
.ah .meta { margin-top: 10px; }
.ah .ver { background: rgba(255, 255, 255, .1); color: #E6ECFF; }
.cols { display: grid; grid-template-columns: 1fr 350px; gap: 22px; align-items: start; margin-top: -50px; margin-bottom: 44px; position: relative; z-index: 2; }
.blk { background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 20px; padding: 22px 24px; margin-bottom: 18px; }
.blk h3 { margin: 0 0 12px; font-size: 1.28rem; display: flex; align-items: center; gap: 10px; }
.blk h3::before { content: ''; width: 5px; height: 20px; border-radius: 3px; background: linear-gradient(var(--c, var(--ap-blue)), var(--ap-cyan)); }
.blk p { margin: 0 0 10px; color: var(--ap-ink-2); }
.fts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.fts li { position: relative; padding-inline-start: 30px; color: var(--ap-ink-2); line-height: 1.6; }
.fts li::before { content: ''; position: absolute; inset-inline-start: 0; top: 3px; width: 20px; height: 20px; border-radius: 7px; background: color-mix(in srgb, var(--c, var(--ap-blue)) 14%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6FE0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.side { position: sticky; top: 80px; }
.dlbox { background: linear-gradient(160deg, var(--ap-surface), color-mix(in srgb, var(--c, var(--ap-blue)) 6%, var(--ap-surface))); }
.ap .dl { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--ap-line); margin-bottom: 10px; color: var(--ap-ink); background: var(--ap-surface); transition: border-color .15s, transform .15s; }
.dl:hover { border-color: var(--ap-blue); transform: translateY(-1px); }
.ap .dl.rec { border: 0; background: linear-gradient(135deg, var(--ap-blue), #1C4FC4); color: #fff; box-shadow: 0 14px 26px -14px rgba(47, 111, 224, .95); }
.dl.rec small { color: #D5E2FF; }
.dl .di { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; }
.dl .di.windows { background: var(--ap-win); } .dl .di.android { background: var(--ap-and); }
.dl.rec .di { background: rgba(255, 255, 255, .18); }
.dl .di svg { width: 22px; height: 22px; }
.dl b { display: block; line-height: 1.3; }
.dl small { color: var(--ap-muted); font-size: .82rem; }
.dl .arr { margin-inline-start: auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ap-soft); color: var(--ap-blue); font-weight: 800; flex: none; }
.dl.rec .arr { background: #fff; color: var(--ap-blue); }
.rec-tag { display: inline-block; background: var(--ap-orange); color: #fff; font-size: .7rem; padding: 0 8px; border-radius: 99px; margin-inline-start: 6px; vertical-align: middle; }
.free { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: .84rem; color: var(--ap-muted); margin-top: 4px; }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--ap-line); font-size: .93rem; }
.facts li:last-child { border-bottom: 0; }
.facts span { color: var(--ap-muted); flex: none; }
.facts b { text-align: end; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 40px; margin-bottom: 12px; color: var(--ap-ink-2); min-height: 28px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--ap-navy); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.tabsx { display: flex; gap: 6px; margin-bottom: 14px; }
.tabsx button { font: 700 .92rem 'Zain', sans-serif; padding: 6px 14px; border-radius: 10px; border: 1.5px solid var(--ap-line); background: var(--ap-surface); cursor: pointer; color: var(--ap-ink-2); }
.tabsx button[aria-selected="true"] { border-color: var(--ap-blue); background: var(--ap-soft); color: var(--ap-blue); }
.log { position: relative; padding-inline-start: 22px; margin-bottom: 14px; }
.log::before { content: ''; position: absolute; inset-inline-start: 4px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--ap-blue); box-shadow: 0 0 0 4px var(--ap-soft); }
.log b { display: inline-block; margin-inline-end: 8px; }
.log small { color: var(--ap-muted); }
.log ul { margin: 4px 0 0; padding-inline-start: 18px; color: var(--ap-ink-2); }
.sha { font: 400 .74rem/1.5 Consolas, monospace; direction: ltr; text-align: left; word-break: break-all; background: var(--ap-soft); padding: 6px 8px; border-radius: 8px; color: var(--ap-ink-2); margin-top: 4px; cursor: copy; }
details.qa { border-bottom: 1px solid var(--ap-line); padding: 10px 0; }
details.qa:last-child { border-bottom: 0; }
details.qa summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: '+'; color: var(--ap-blue); font-weight: 800; font-size: 1.2rem; line-height: 1; }
details.qa[open] summary::after { content: '−'; }
details.qa p { margin: 6px 0 2px; }
.preview { border-radius: 16px; overflow: hidden; border: 1px solid var(--ap-line); margin-bottom: 6px; }
.tb { background: linear-gradient(180deg, #1F2733, #151B24); color: #fff; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 10px 16px; font: 400 .85rem 'Segoe UI', Tahoma, sans-serif; direction: ltr; }
.tb .sp { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; font-variant-numeric: tabular-nums; }
.tb .d { color: #5BE38F; } .tb .u { color: #6CB4FF; }
.tb .tray { display: flex; gap: 10px; opacity: .8; }
.tb .clk { text-align: right; line-height: 1.25; opacity: .95; }
.desk { background: linear-gradient(135deg, #1B3A7A, #3B2A6E); height: 130px; position: relative; }
.desk .win { direction: ltr; position: absolute; left: 24px; top: 20px; width: 240px; background: #10162B; border: 1px solid #26305A; border-radius: 12px; padding: 10px 12px; color: #EEE; font: 400 .75rem 'Segoe UI', sans-serif; box-shadow: 0 10px 30px -10px #000; }
.desk .win svg { width: 100%; height: 50px; display: block; }
.cap { font-size: .85rem; color: var(--ap-muted); margin: 6px 0 12px; }

/* ---------- الفوتر ---------- */
.foot { background: var(--ap-navy); color: #9AA6CF; font-size: .92rem; padding: 26px 0; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ap .foot a { color: #fff; font-weight: 700; }
.foot .fb { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; }
.foot .fb img { width: 28px; height: 28px; border-radius: 8px; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #000c; color: #fff; padding: 8px 16px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
.toast.on { opacity: 1; }

@media (max-width: 900px) {
  .hgrid { grid-template-columns: 1fr; padding-bottom: 76px; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .stats { justify-content: center; }
  .art { max-width: 460px; margin: 0 auto; }
  .cols { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
  .fts { grid-template-columns: 1fr; }
  .why { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ah { flex-direction: column; text-align: center; }
  .ah .meta { justify-content: center; }
  .app-hero .hgrid { text-align: center; }
  .brand .q { display: none; }
  .filters { width: 100%; }
  .filters input { min-width: 0; width: 100%; }
  .filters button { flex: 1; padding: 8px 6px; justify-content: center; font-size: .9rem; gap: 4px; }
  .art { display: none; }
  .why { grid-template-columns: 1fr; }
}
