/* بناة فلسطين · ابدأ حملة (الفريق ب) */
.demo-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border-radius: 999px; background: #fbf0d9; color: #8a5a00; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.demo-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-a { color: var(--red-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ———— الرأس: .px-hero مدمج بلغة الرئيسية ———— */
.st-hero { min-height: 0; }
.st-hero .px-hero__in { padding-top: calc(var(--nav-total, 76px) + clamp(32px, 5vh, 64px)); padding-bottom: calc(clamp(34px, 3.4vw, 48px) + clamp(32px, 4.4vh, 52px)); }
.st-hero .px-hero__h { font-size: clamp(36px, calc(14px + 3.4vw), 68px); max-width: 15em; }
.st-hero__em { color: var(--cream, #f6efe2); opacity: .92; }
.st-hero .px-hero__cta { margin-top: 22px; }
.st-trust { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 22px; }
.st-trust li { display: inline-flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 99px; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.st-trust li::before { content: ""; align-self: center; width: 8px; height: 8px; background: var(--red); flex: none; }
.st-trust b { font-size: 14.5px; white-space: nowrap; }
.st-trust span { font-size: 13.5px; color: rgba(255, 255, 255, .78); }
@media (max-width: 900px) { .st-trust span { display: none; } }
@media (max-width: 640px) {
  .st-hero .px-hero__in { padding-top: calc(var(--nav-total, 66px) + 48px); padding-bottom: calc(clamp(34px, 3.4vw, 48px) + 28px); }
  .st-hero .px-hero__h { font-size: clamp(32px, 9vw, 40px); }
  .st-trust { gap: 6px; }
  .st-trust li { min-height: 36px; padding: 6px 12px; }
}

/* ———— المعالج ———— */
.st-wiz { padding-bottom: var(--gap-sm); }
.st-wiz__grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .st-wiz__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; } }
.st-card { background: hsl(var(--card)); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: clamp(18px, 3vw, 36px); min-width: 0; }
.st-demo { font-size: 13px; color: var(--ink-2); line-height: 1.7; padding: 10px 14px; border-radius: var(--r-sm); background: hsl(var(--tint)); margin: 18px 0 0; }
#wiz[hidden] + .st-demo { display: none; }
.st-demo a { color: var(--red-ink); font-weight: 600; }

.st-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.st-steps button { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; text-align: start; color: var(--ink-2); font-size: 14px; font-weight: 600; border-radius: 10px; }
.st-steps button:disabled { cursor: default; opacity: .55; }
.st-steps i { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line-strong); background: hsl(var(--card)); transition: background-color var(--dur-2), border-color var(--dur-2), color var(--dur-2); }
.st-steps span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-steps [aria-current="step"] { color: var(--ink); }
.st-steps [aria-current="step"] i { border-color: var(--ink); background: var(--ink); color: #fff; }
.st-steps .ok i { border-color: var(--olive); background: var(--olive); color: #fff; font-size: 0; }
.st-steps .ok i::after { content: "✓"; font-size: 13px; }
.st-bar { height: 4px; border-radius: 4px; background: var(--line); margin: 10px 0 26px; overflow: hidden; }
.st-bar span { display: block; height: 100%; width: 20%; background: var(--red); border-radius: inherit; transition: width var(--dur-3) var(--ease); }

.st-step { border: 0; display: grid; gap: 18px; min-width: 0; animation: stIn .45s var(--ease); }
.st-step[hidden] { display: none; }
@keyframes stIn { from { opacity: 0; transform: translateX(-14px); } }
.st-step.is-back { animation-name: stInBack; }
@keyframes stInBack { from { opacity: 0; transform: translateX(14px); } }
.st-h { font-family: var(--display); font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; line-height: 1.4; padding: 0; margin-bottom: 4px; }
.st-h span { display: block; font-family: var(--text); font-size: 13px; font-weight: 600; color: var(--red-ink); margin-bottom: 2px; }
.st-row2 { display: grid; gap: 16px; align-items: start; }
.st-region { max-width: 420px; }
@media (min-width: 700px) { .st-row2 { grid-template-columns: 1fr 1fr; } }
.st-wiz .field { min-width: 0; align-content: start; }
.st-wiz .field > span small { font-weight: 400; color: var(--ink-2); }
.st-wiz .field input[aria-invalid="true"], .st-wiz .field select[aria-invalid="true"], .st-wiz .field textarea[aria-invalid="true"] { border-color: var(--red); background: #fff8f7; }
.st-err { font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--red-ink); }
.st-err[hidden] { display: none; }
.st-count b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.st-count.over b { color: var(--red-ink); }

.st-types { display: grid; gap: 12px; }
@media (min-width: 600px) { .st-types { grid-template-columns: 1fr 1fr; } }
.st-type { position: relative; display: grid; gap: 4px; padding: 18px 18px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line); cursor: pointer; transition: border-color var(--dur-1), box-shadow var(--dur-2), background-color var(--dur-1); }
.st-type:hover { border-color: var(--line-strong); }
.st-type input { position: absolute; top: 18px; left: 18px; width: 20px; height: 20px; accent-color: var(--red); }
.st-type svg { width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.st-type b { font-size: 18px; }
.st-type span { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.st-type:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: #fffdf9; }
.st-type:has(input:focus-visible) { outline: 2.5px solid var(--red); outline-offset: 3px; }

.st-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.st-cats label { position: relative; cursor: pointer; }
.st-cats input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.st-cats span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14.5px; font-weight: 600; background: hsl(var(--card)); transition: all var(--dur-1); }
.st-cats label:hover span { border-color: var(--line-strong); }
.st-cats input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-cats input:focus-visible + span { outline: 2.5px solid var(--red); outline-offset: 2px; }

.st-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 500; cursor: pointer; line-height: 1.7; }
.st-check input { width: 19px; height: 19px; margin-top: 4px; accent-color: var(--red); flex-shrink: 0; }
.st-check small { color: var(--ink-2); font-weight: 400; }
.st-check--box { padding: 14px 16px; border-radius: var(--r-sm); background: hsl(var(--tint)); }

.st-goal { display: flex; align-items: center; border: 1px solid hsl(38 12% 62%); border-radius: var(--r-sm); background: hsl(var(--card)); overflow: hidden; max-width: 420px; direction: ltr; }
.st-goal:focus-within { border-color: var(--red); outline: 2.5px solid var(--red); outline-offset: 2px; }
.st-goal span { padding: 0 14px; font-size: 22px; font-weight: 600; color: var(--ink-2); }
.st-goal input { flex: 1; min-width: 0; min-height: 58px; border: 0 !important; outline: none !important; font-size: 26px !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; padding: 0 !important; padding-inline: 12px 0 !important; background: transparent !important; }
.st-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.st-presets button { min-height: 44px; padding: 0 8px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.st-presets button:hover { border-color: var(--ink); }
.st-presets button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-seg { display: flex; flex-wrap: wrap; gap: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; width: fit-content; max-width: 100%; }
.st-seg label { position: relative; cursor: pointer; }
.st-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.st-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: background-color var(--dur-1); }
.st-seg input:checked + span { background: var(--ink); color: #fff; }
.st-seg input:focus-visible + span { outline: 2.5px solid var(--red); outline-offset: 2px; }
.st-impact { display: grid; gap: 8px; }
.st-impact__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.st-impact input { min-height: 46px !important; }
.st-impact input[type="number"] { direction: ltr; text-align: left; }

.st-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: hsl(var(--tint)); width: fit-content; }
.st-tabs button { min-height: 44px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.st-tabs button[aria-selected="true"] { background: hsl(var(--card)); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 22, 19, .12); }
.st-lib { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.st-lib label { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; cursor: pointer; background: hsl(var(--tint)); }
.st-lib img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease); }
.st-lib label:hover img { transform: scale(1.05); }
.st-lib input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.st-lib label::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--red); transition: box-shadow var(--dur-1); pointer-events: none; }
.st-lib label:has(input:checked)::after { box-shadow: inset 0 0 0 3px var(--red); }
.st-lib label:has(input:checked)::before { content: "✓"; position: absolute; z-index: 2; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.st-lib label:has(input:focus-visible) { outline: 2.5px solid var(--red); outline-offset: 2px; }
.st-drop { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 30px 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); cursor: pointer; background: #fffdf9; }
.st-drop:hover, .st-drop.over { border-color: var(--red); background: #fff8f7; }
.st-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-drop span { font-size: 13.5px; color: var(--ink-2); font-weight: 400; }
.st-upview { position: relative; margin-top: 10px; border-radius: var(--r-md); overflow: hidden; max-width: 420px; }
.st-upview[hidden] { display: none; }
.st-upview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.st-upview button { position: absolute; top: 8px; left: 8px; background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; text-decoration: none; }

.st-review { display: grid; border-top: 1px solid var(--line); }
.st-review > div { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; font-size: 15px; }
.st-review dt { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.st-review dd { min-width: 0; overflow-wrap: anywhere; }
.st-review dd p + p { margin-top: 6px; }
.st-review button { color: var(--red-ink); font-weight: 600; font-size: 14px; min-height: 44px; min-width: 44px; margin-block: -10px; }
.st-review img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

.st-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.st-nav .btn { min-width: 120px; }
.st-saved { font-size: 13px; color: var(--ink-2); text-align: center; }
#back[hidden] { visibility: hidden; display: inline-flex; }

/* نجاح */
.st-done { display: grid; justify-items: start; gap: 14px; animation: stIn .5s var(--ease); outline: none; }
.st-done[hidden] { display: none; }
.st-done__mark svg { width: 64px; height: 64px; fill: none; stroke: var(--olive); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.st-done__mark circle { stroke-dasharray: 140; stroke-dashoffset: 140; animation: drawc .7s var(--ease) forwards; }
.st-done__mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: drawc .45s var(--ease) .55s forwards; }
@keyframes drawc { to { stroke-dashoffset: 0; } }
.st-done .h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.4; }
.st-done .lead { max-width: 38rem; margin: 0; }
.st-wiz__grid:has(#done:not([hidden])) .st-tips { display: none; }
.st-done__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.st-done__demo { font-size: 14px; color: var(--ink-2); padding-top: 14px; border-top: 1px solid var(--line); width: 100%; }
.st-done__demo a { color: var(--red-ink); font-weight: 600; }

/* المعاينة الجانبية */
.st-side__in { position: sticky; top: 92px; display: grid; gap: 16px; }
.st-side__k { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.st-preview { pointer-events: none; }
.st-preview > * { max-width: 100%; }
.st-pc { background: hsl(var(--card)); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); }
.st-pc__img { aspect-ratio: 16 / 10; background: hsl(var(--tint)); position: relative; }
.st-pc__img img { width: 100%; height: 100%; object-fit: cover; }
.st-pc__b { padding: 14px 16px 16px; display: grid; gap: 6px; }
.st-pc__org { font-size: 13px; color: var(--ink-2); }
.st-pc h3, .st-pc h2.st-pc__h { font-size: 17px; line-height: 1.5; margin: 0; font-weight: 700; }
.st-pc .progress span { transform: scaleX(1); }
.st-pc__m { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.st-pc__m b { color: var(--ink); }
.st-ph { color: #b3a89c; }
.st-tips { padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); font-size: 14px; }
.st-tips b { display: block; margin-bottom: 8px; }
.st-tips li { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink-2); }
.st-tips li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; transition: all var(--dur-2); }
.st-tips li.ok { color: var(--ink); }
.st-tips li.ok::before { background: var(--olive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--olive); }

/* المنصة: الشريط العائم يغطي المعالج */
body[data-page="start"] #dock { display: none !important; }

/* كيف تعمل */
.st-how { padding-top: var(--gap-sm); }
.st-flow { display: grid; gap: 0; border-top: 1px solid var(--ink); margin-bottom: 48px; }
@media (min-width: 800px) { .st-flow { grid-template-columns: repeat(4, 1fr); } .st-flow li + li { border-inline-start: 1px solid var(--line); } }
.st-flow li { padding: 22px 0 22px; display: grid; gap: 6px; align-content: start; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .st-flow li { padding: 24px 22px; border-bottom: 0; } .st-flow li:first-child { padding-inline-start: 0; } }
.st-flow .num { font-size: 14px; font-weight: 700; color: var(--red-ink); }
.st-flow h3 { font-size: 19px; }
.st-flow p { font-size: 15px; color: var(--ink-2); line-height: 1.75; }

@media (max-width: 699px) {
  .st-steps span { display: none; }
  .st-steps [aria-current="step"] span { display: inline; }
  .st-steps { grid-template-columns: repeat(4, auto) 1fr; }
  .st-steps li:has([aria-current="step"]) { grid-column: span 1; }
  .st-review > div { grid-template-columns: minmax(0, 1fr) auto; }
  .st-review dt { grid-column: 1 / -1; }
  .st-review dd { grid-column: 1; }
  .st-impact__row { grid-template-columns: 96px minmax(0, 1fr); }
  .st-nav .btn { min-width: 0; flex: 1; }
  .st-saved { display: none; }
  .st-side { order: 1; }
  .st-side__in { position: static; }
  .st-side .st-tips { display: none; }
  .st-preview { max-width: 100%; }
  .st-wiz__grid:has(#done:not([hidden])) .st-side { display: none; }
  .st-trust { display: none; }
  .st-lib { gap: 6px; }
  .st-seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
  .st-seg span { justify-content: center; padding: 0 4px; font-size: 13.5px; min-height: 44px; width: 100%; }
  .st-cats span { min-height: 44px; }
}
@media (max-width: 999px) and (min-width: 700px) { .st-side__in { position: static; } .st-side { display: grid; } .st-side__in { grid-template-columns: 1fr 1fr; align-items: start; } .st-side__k { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .st-step, .st-done { animation: none; } .st-done__mark circle, .st-done__mark path { animation: none; stroke-dashoffset: 0; } .st-bar span { transition: none; } }

/* ———— البطاقات والختام بلغة الرئيسية ———— */
.st-wiz { padding-top: clamp(28px, 3.4vw, 48px); }
.st-card { border: 1px solid var(--px-line, rgba(23, 17, 15, .14)); border-radius: 18px; box-shadow: 0 1px 2px rgba(23, 17, 15, .05), 0 12px 32px -14px rgba(23, 17, 15, .28); }
.st-h { font-weight: 800; font-size: var(--fs-h3-lg); line-height: var(--lh-h3-lg); }
.st-type { border-radius: 14px; }
.st-type:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.st-how .h2 { font: 800 var(--fs-h2-xl)/var(--lh-h2-xl) var(--display); letter-spacing: -.01em; }
.st-how + .px-close { margin-top: 12px; }
@media (max-width: 640px) { body[data-page="start"] .px-close__h { font-size: 38px; } }

/* ===== LTR: steps slide in from the reading direction; corner controls sit at the end ===== */
@keyframes stInL { from { opacity: 0; transform: translateX(14px); } }
@keyframes stInBackL { from { opacity: 0; transform: translateX(-14px); } }
html[dir="ltr"] .st-type input, html[dir="ltr"] .st-lib label:has(input:checked)::before, html[dir="ltr"] .st-upview button { left: auto; right: 18px; }
html[dir="ltr"] .st-lib label:has(input:checked)::before { right: 6px; }
html[dir="ltr"] .st-upview button { right: 8px; }
html[dir="ltr"] .st-step, html[dir="ltr"] .st-done { animation-name: stInL; }
html[dir="ltr"] .st-step.is-back { animation-name: stInBackL; }

/* ——— صقل الإطلاق ——— */
.st-demo[hidden] { display: none; }
/* عنوان الخطوة يستقبل التركيز برمجيًا لقارئ الشاشة؛ لا إطار أحمر حوله */
.st-h[tabindex="-1"]:focus { outline: none; }
.st-check:has(input:focus-visible) { outline: 2.5px solid var(--red); outline-offset: 3px; border-radius: 8px; }
.st-check input, .st-check--box input { width: 20px; height: 20px; }
.st-presets button:focus-visible, .st-tabs button:focus-visible, .st-steps button:focus-visible, .st-review button:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
.st-err::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 6px; vertical-align: .2em; background: var(--red); }
.st-count { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
/* الختام الأحمر بارتفاع القسم لا بارتفاع الشاشة: الصفحة أداة، والختام دعوة جانبية */
.st-close { padding-block: clamp(44px, 5vw, 72px); }
.st-close .px-close__in { gap: clamp(14px, 1.8vw, 22px); }
.st-close .px-close__h { font-size: clamp(36px, calc(14px + 3.2vw), 68px); line-height: 1.3; }
.st-close .px-close__star { width: min(34vw, 420px); }
@media (max-width: 640px) { .st-close { padding-block: 44px 48px; } .st-close .px-close__cta .btn { width: 100%; } .st-close .px-close__star { width: 70vw; } }
