/* أبشر · registration wizard — scoped under .iw, themable via --iw-* custom properties. Mobile-first, RTL, logical properties. */
.iw {
  --iw-bg: #f4f0e8;
  --iw-surface: #fdfbf7;
  --iw-ink: #2b2d2f;
  --iw-muted: #666a62;
  --iw-line: #d8d1c4;
  --iw-accent: #b5e61d;
  --iw-accent-ink: #1c2606;
  --iw-danger: #b42318;
  --iw-radius: 18px;
  --iw-font: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --iw-font-display: "Rubik", var(--iw-font);
  /* derived (override if you need to) */
  --iw-field: #fff;
  --iw-tint: color-mix(in srgb, var(--iw-accent) 16%, var(--iw-surface));
  --iw-line-2: color-mix(in srgb, var(--iw-ink) 50%, var(--iw-line)); /* the resting boundary of every unchecked chip, check mark, ghost button and tile: ≥3:1 on the field and on the sheet (1.4.11) */
  --iw-line-field: color-mix(in srgb, var(--iw-ink) 50%, var(--iw-line)); /* resting text-field border: ≥3:1 on the field (1.4.11) */
  --iw-danger-bg: color-mix(in srgb, var(--iw-danger) 8%, var(--iw-surface));
  --iw-shadow: 0 1px 2px rgb(43 45 47 / .05), 0 12px 32px -18px rgb(43 45 47 / .28);
  --iw-dur: 240ms;
  --iw-ease: cubic-bezier(.2, .7, .2, 1);
  --iw-r-sm: 12px;
  color: var(--iw-ink);
  font-family: var(--iw-font);
  font-size: 16px;
  line-height: 1.55;
  direction: rtl;
  text-align: start;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  container-type: inline-size;
}
.iw *, .iw *::before, .iw *::after { box-sizing: inherit; }
.iw [hidden] { display: none !important; }
.iw svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.iw button, .iw input, .iw textarea { font: inherit; color: inherit; margin: 0; }
.iw button { cursor: pointer; }
.iw p, .iw h3, .iw h4, .iw dl, .iw dd, .iw ul, .iw ol, .iw fieldset, .iw legend { margin: 0; padding: 0; }
.iw ul, .iw ol { list-style: none; }
.iw fieldset { border: 0; min-inline-size: 0; }
.iw :focus-visible, .iw .iw-chip:has(> input:focus-visible), .iw .iw-cat:has(> input:focus-visible), .iw .iw-seg:has(> input:focus-visible), .iw .iw-check:has(> input:focus-visible), .iw .iw-svc-main:has(> input:focus-visible) { outline: 2px solid var(--iw-ink); outline-offset: 2px; }
.iw .iw-vh, .iw .iw-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.iw .iw-hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; pointer-events: none; }

/* ── layout ──────────────────────────────────────────────── */
.iw .iw-grid { display: grid; gap: 20px; }
.iw .iw-form { position: relative; background: var(--iw-surface); border: 1px solid var(--iw-line); border-radius: var(--iw-radius); padding: 22px 18px 18px; box-shadow: var(--iw-shadow); min-inline-size: 0; }
.iw .iw-body { position: relative; }
.iw .iw-body.is-anim { overflow: hidden; transition: height var(--iw-dur) var(--iw-ease); }
.iw .iw-step { display: grid; gap: 22px; }
.iw .iw-step.in-next { animation: iw-in-next var(--iw-dur) var(--iw-ease) both; }
.iw .iw-step.in-back { animation: iw-in-back var(--iw-dur) var(--iw-ease) both; }
@keyframes iw-in-next { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes iw-in-back { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ── progress rail ───────────────────────────────────────── */
.iw .iw-rail { display: grid; gap: 10px; min-inline-size: 0; }
.iw .iw-prog-txt { display: none; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--iw-muted); }
.iw .iw-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.iw .iw-bar i { display: block; height: 6px; border-radius: 999px; background: var(--iw-line); transition: background var(--iw-dur) var(--iw-ease), transform var(--iw-dur) var(--iw-ease); }
.iw .iw-bar i.done { background: var(--iw-ink); }
.iw .iw-bar i.cur { background: var(--iw-accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--iw-ink) 35%, var(--iw-accent)); }
.iw .iw-rail.done .iw-bar i { background: var(--iw-ink); box-shadow: none; } /* after a successful submit no segment is «current» */
.iw .iw-steps { display: none; }

/* ── headings ────────────────────────────────────────────── */
.iw .iw-head { display: grid; gap: 4px; }
.iw .iw-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--iw-muted); }
.iw .iw-title { font-family: var(--iw-font-display); font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.iw .iw-title:focus-visible { outline-offset: 6px; border-radius: 6px; }
.iw .iw-sub { color: var(--iw-muted); font-size: 15px; max-inline-size: 48ch; }

/* ── fields ──────────────────────────────────────────────── */
.iw .iw-f { display: grid; gap: 6px; min-inline-size: 0; }
.iw .iw-fs { display: grid; gap: 10px; }
.iw .iw-label { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.iw .iw-label.sm { font-size: 13.5px; }
.iw .iw-opt { font-weight: 400; color: var(--iw-muted); font-size: 13.5px; }
.iw .iw-input { display: block; width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px; line-height: 1.4; background: var(--iw-field); color: var(--iw-ink); border: 1.5px solid var(--iw-line-field); border-radius: var(--iw-r-sm); transition: border-color var(--iw-dur) var(--iw-ease), box-shadow var(--iw-dur) var(--iw-ease); appearance: none; -webkit-appearance: none; }
.iw .iw-input::placeholder { color: var(--iw-muted); opacity: 1; } /* 5.5:1 on the white field (WCAG 1.4.3) */
.iw .iw-input:focus-visible { border-color: var(--iw-ink); outline-offset: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--iw-accent) 45%, transparent); }
.iw .iw-input[dir="ltr"] { text-align: left; letter-spacing: .04em; }
.iw textarea.iw-input { resize: vertical; min-height: 96px; }
.iw .invalid > .iw-input, .iw .invalid .iw-input[aria-invalid="true"] { border-color: var(--iw-danger); }
.iw .iw-hint { font-size: 13.5px; color: var(--iw-muted); }
.iw .iw-cnt { font-size: 12.5px; color: var(--iw-muted); font-weight: 500; white-space: nowrap; }
.iw .iw-f .iw-between { align-items: flex-start; flex-wrap: nowrap; }
.iw .iw-f .iw-between > .iw-hint { flex: 1 1 auto; min-inline-size: 0; }
.iw .iw-err { font-size: 13.5px; font-weight: 500; color: var(--iw-danger); }
.iw .iw-err::before { content: "!"; display: inline-grid; place-items: center; inline-size: 16px; block-size: 16px; margin-inline-end: 6px; border-radius: 50%; background: var(--iw-danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: -2px; }
.iw .iw-row2 { display: grid; gap: 14px; }
.iw .iw-namefields { display: grid; gap: 14px; }
/* one measure for the first step: the toggle, the fields, the checkbox and the card's footer share a 640px column, so «التالي» sits under the last field */
.iw .iw-step[data-step="1"] .iw-f, .iw .iw-step[data-step="1"] .iw-row2, .iw .iw-step[data-step="1"] .iw-fs, .iw .iw-form:has(.iw-step[data-step="1"]) .iw-foot { max-inline-size: 640px; }

/* segmented (فرد / شركة): equal halves; in a narrow card the long label keeps its line and takes what فرد leaves */
.iw .iw-segs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: color-mix(in srgb, var(--iw-line) 45%, var(--iw-surface)); border-radius: 999px; }
.iw .iw-seg { position: relative; display: grid; place-items: center; min-height: 44px; padding: 8px 12px; border-radius: 999px; font-weight: 600; text-align: center; white-space: nowrap; cursor: pointer; color: var(--iw-muted); transition: background var(--iw-dur) var(--iw-ease), color var(--iw-dur) var(--iw-ease); }
@container (max-width: 420px) {
  .iw .iw-segs { grid-template-columns: max-content minmax(0, 1fr); }
  .iw .iw-seg { padding-inline: 14px; font-size: 15px; }
}
/* the category finder (step 2): a short search field over the open grid; its label stays visible but reads as a field label under the legend, not a second heading */
.iw .iw-catfind { max-inline-size: 420px; margin-top: 2px; margin-bottom: 4px; }
.iw .iw-catfind .iw-label.sm { font-weight: 500; font-size: 13.5px; color: var(--iw-muted); }
.iw .iw-catfind .iw-input::-webkit-search-cancel-button, .iw .iw-catfind .iw-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.iw .iw-seg > input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; margin: 0; }
.iw .iw-seg:has(> input:checked) { background: var(--iw-ink); color: var(--iw-bg); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* generic check marker (used in chips, checkboxes, inspect button) */
.iw .iw-ck { display: inline-grid; place-items: center; inline-size: 20px; block-size: 20px; flex: none; border: 1.5px solid var(--iw-line-2); border-radius: 50%; background: var(--iw-field); transition: background var(--iw-dur) var(--iw-ease), border-color var(--iw-dur) var(--iw-ease); }
.iw .iw-ck::after { content: ""; width: 10px; height: 6px; border-left: 2.2px solid var(--iw-bg); border-bottom: 2.2px solid var(--iw-bg); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform var(--iw-dur) var(--iw-ease); }
.iw :checked ~ .iw-ck, .iw [aria-pressed="true"] > .iw-ck { background: var(--iw-ink); border-color: var(--iw-ink); }
.iw :checked ~ .iw-ck::after, .iw [aria-pressed="true"] > .iw-ck::after { transform: translateY(-1px) rotate(-45deg) scale(1); }

/* checkbox line */
.iw .iw-check { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 2px; cursor: pointer; font-weight: 500; inline-size: fit-content; border-radius: 8px; }
.iw .iw-check > input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; margin: 0; }
.iw .iw-check .iw-ck { border-radius: 6px; }

/* chips (regions, vehicle, experience) */
.iw .iw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.iw .iw-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px 8px 16px; border: 1.5px solid var(--iw-line-2); border-radius: 999px; background: var(--iw-field); font-weight: 500; cursor: pointer; max-inline-size: 100%; transition: background var(--iw-dur) var(--iw-ease), border-color var(--iw-dur) var(--iw-ease), color var(--iw-dur) var(--iw-ease); }
.iw .iw-chip > input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; margin: 0; }
.iw .iw-chip > span:last-child { min-inline-size: 0; overflow-wrap: anywhere; }
.iw .iw-chip:hover { border-color: var(--iw-ink); }
.iw .iw-chip:has(> input:checked) { background: var(--iw-accent); border-color: var(--iw-accent); color: var(--iw-accent-ink); }
.iw .iw-chip:has(> input:checked) .iw-ck { background: var(--iw-accent-ink); border-color: var(--iw-accent-ink); }
.iw .iw-chip:has(> input:checked) .iw-ck::after { border-color: var(--iw-accent); }
.iw .iw-unit { font-size: 12.5px; font-weight: 500; color: var(--iw-muted); }
.iw .iw-chip:has(> input:checked) .iw-unit { color: inherit; opacity: .8; }
.iw .iw-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.iw .iw-count { font-size: 14px; color: var(--iw-muted); font-weight: 500; }
.iw .iw-btn[data-all][aria-pressed="true"] { background: var(--iw-ink); color: var(--iw-bg); border-color: var(--iw-ink); }
.iw [data-all] > .iw-ck { inline-size: 18px; block-size: 18px; }
.iw .iw-empty { font-size: 14.5px; color: var(--iw-muted); padding: 14px 16px; border: 1.5px dashed var(--iw-line-2); border-radius: var(--iw-r-sm); text-align: center; }

/* ── categories ──────────────────────────────────────────── */
.iw .iw-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.iw .iw-cat { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 10px; border: 1.5px solid var(--iw-line-field); border-radius: 14px; background: var(--iw-field); cursor: pointer; min-inline-size: 0; transition: border-color var(--iw-dur) var(--iw-ease), background var(--iw-dur) var(--iw-ease), box-shadow var(--iw-dur) var(--iw-ease); } /* the tile is the control: its border says «choosable» at ≥3:1 */
.iw .iw-cat > input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; margin: 0; }
.iw .iw-cat:hover { border-color: var(--iw-ink); }
.iw .iw-cat.on { border-color: var(--iw-ink); box-shadow: inset 0 0 0 1px var(--iw-ink); background: var(--iw-tint); }
.iw .iw-cat-t { display: grid; gap: 1px; min-inline-size: 0; flex: 1; }
.iw .iw-cat-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.iw .iw-cat-n { font-size: 12px; color: var(--iw-muted); }
.iw .iw-cat .iw-ck { position: absolute; inset-inline-end: 8px; inset-block-start: 8px; inline-size: 18px; block-size: 18px; opacity: 0; transform: scale(.6); transition: opacity var(--iw-dur) var(--iw-ease), transform var(--iw-dur) var(--iw-ease); }
.iw .iw-cat.on .iw-ck { opacity: 1; transform: none; }
.iw .iw-main { display: none; position: absolute; inset-inline-start: 8px; inset-block-start: -9px; padding: 1px 8px; border-radius: 999px; background: var(--iw-accent); color: var(--iw-accent-ink); font-size: 11.5px; font-weight: 700; line-height: 1.4; }
.iw .iw-cat.main .iw-main { display: block; }
.iw .iw-cat.pop .iw-ico img { animation: iw-jiggle 520ms var(--iw-ease); }
.iw .iw-cat.add { border-style: dashed; border-color: var(--iw-line-2); background: transparent; color: var(--iw-muted); text-align: start; }
.iw .iw-cat.add:hover { color: var(--iw-ink); border-color: var(--iw-ink); }
.iw .iw-cat.add .iw-ico { background: var(--iw-surface); border: 1.5px dashed var(--iw-line-2); }
.iw .iw-cat.add svg { width: 22px; height: 22px; }
@keyframes iw-jiggle { 0% { transform: scale(1) rotate(0); } 35% { transform: scale(1.16) rotate(-7deg); } 70% { transform: scale(.96) rotate(3deg); } 100% { transform: scale(1) rotate(0); } }

/* icons (clay) */
.iw .iw-ico { display: grid; place-items: center; flex: none; inline-size: 44px; block-size: 44px; border-radius: 12px; background: var(--iw-bg); overflow: hidden; }
.iw .iw-ico img { display: block; inline-size: 40px; block-size: 40px; object-fit: contain; }
.iw .iw-ico.none i { font: 800 18px/1 var(--iw-font-display); color: var(--iw-muted); font-style: normal; }
.iw .iw-ico.sm { inline-size: 32px; block-size: 32px; border-radius: 9px; }
.iw .iw-ico.sm img { inline-size: 28px; block-size: 28px; }
.iw .iw-ico.sm.none i { font-size: 14px; }
.iw .iw-ico.xl { inline-size: 120px; block-size: 120px; border-radius: 32px; background: var(--iw-tint); }
.iw .iw-ico.xl img { inline-size: 96px; block-size: 96px; }
.iw .iw-ico.xl.none i { font-size: 44px; }

/* ── service panels ──────────────────────────────────────── */
.iw .iw-panels { display: grid; gap: 14px; }
.iw .iw-panel { display: grid; gap: 12px; padding: 14px; border: 1.5px solid var(--iw-line); border-radius: 14px; background: var(--iw-field); min-inline-size: 0; }
.iw .iw-panel-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--iw-font-display); font-weight: 700; font-size: 17px; }
.iw .iw-panel-h > span:nth-child(2) { flex: 1 1 140px; min-inline-size: 0; overflow-wrap: anywhere; } /* the name keeps ≥140px and wraps at its spaces; the count pill drops to the next line in a narrow card */
.iw .iw-panel-n { font: 500 13px/1.4 var(--iw-font); color: var(--iw-muted); padding: 3px 10px; border-radius: 999px; background: var(--iw-bg); }
.iw .iw-grp { display: grid; gap: 6px; }
.iw .iw-grp-h { font-size: 13px; font-weight: 600; color: var(--iw-muted); padding-inline-start: 2px; }
.iw .iw-svcs { display: grid; gap: 6px; }
.iw .iw-svc { border: 1.5px solid var(--iw-line-field); border-radius: var(--iw-r-sm); background: var(--iw-surface); min-inline-size: 0; transition: border-color var(--iw-dur) var(--iw-ease), background var(--iw-dur) var(--iw-ease); }
.iw .iw-svc.on { border-color: var(--iw-ink); background: var(--iw-tint); }
.iw .iw-svc.invalid { border-color: var(--iw-danger); }
.iw .iw-svc-main { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 48px; padding: 8px 12px; cursor: pointer; border-radius: inherit; }
.iw .iw-svc-main > input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; margin: 0; }
.iw .iw-svc-main .iw-ck { border-radius: 6px; }
.iw .iw-svc-name { font-weight: 500; flex: 1 1 150px; min-inline-size: 0; overflow-wrap: anywhere; }
.iw .iw-svc-main .iw-unit { margin-inline-start: auto; padding: 2px 8px; border-radius: 999px; background: var(--iw-bg); white-space: nowrap; }
.iw .iw-svc-price { padding: 0 12px 12px; }
.iw .iw-price { display: grid; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--iw-line); }
/* one 48px line per selected service: the price field takes the room, «حسب الكشف» keeps its width and never wraps under it */
.iw .iw-price-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.iw .iw-price-in { position: relative; display: flex; align-items: center; flex: 1 1 0; min-inline-size: 0; }
.iw .iw-price-in .iw-input { padding-right: 44px; font-weight: 600; min-inline-size: 0; }
.iw .iw-price-in b { position: absolute; right: 12px; font-size: 13px; color: var(--iw-muted); pointer-events: none; }
.iw .iw-insp { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px 0 14px; border: 1.5px solid var(--iw-line-2); border-radius: 999px; background: var(--iw-field); font-weight: 500; font-size: 15px; white-space: nowrap; flex: none; transition: background var(--iw-dur) var(--iw-ease), border-color var(--iw-dur) var(--iw-ease); }
.iw .iw-insp[aria-pressed="true"] { background: var(--iw-accent); border-color: var(--iw-accent); color: var(--iw-accent-ink); flex: 1; }
.iw .iw-insp[aria-pressed="true"] > .iw-ck { background: var(--iw-accent-ink); border-color: var(--iw-accent-ink); }
.iw .iw-insp[aria-pressed="true"] > .iw-ck::after { border-color: var(--iw-accent); }
/* the price line in a phone-wide card: a compact «حسب الكشف» (its lime fill carries the state) and a field without the د.ع suffix
   (the label already says it) leave room for a seven-digit price */
@container (max-width: 420px) {
  .iw .iw-insp { padding: 0 11px; font-size: 13.5px; gap: 6px; }
  .iw .iw-insp > .iw-ck { display: none; }
  .iw .iw-price-in .iw-input { padding-right: 10px; padding-left: 8px; font-size: 15px; letter-spacing: 0; }
  .iw .iw-price-in b { display: none; }
}
/* the narrowest cards (320px phones): the field keeps the whole line for a seven-digit price and the pill drops under it; the category
   tiles go one per row, so a name is never cut mid-word in a 44px column */
@container (max-width: 340px) {
  .iw .iw-price-row { flex-wrap: wrap; }
  .iw .iw-price-in { flex-basis: 100%; }
  .iw .iw-cats { grid-template-columns: 1fr; }
}
.iw .iw-sum { font-size: 14px; font-weight: 500; color: var(--iw-muted); min-height: 1.5em; }
.iw .iw-sum:empty { display: none; }

/* alerts */
.iw .iw-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid color-mix(in srgb, var(--iw-danger) 35%, var(--iw-line)); border-radius: var(--iw-r-sm); background: var(--iw-danger-bg); color: var(--iw-danger); font-size: 14.5px; font-weight: 500; }
.iw .iw-alert svg { margin-top: 2px; }
.iw .iw-alert a { color: inherit; font-weight: 700; text-underline-offset: 3px; }

/* ── review ──────────────────────────────────────────────── */
.iw .iw-review { display: grid; gap: 12px; }
.iw .iw-rv { display: grid; gap: 10px; padding: 14px; border: 1.5px solid var(--iw-line); border-radius: 14px; background: var(--iw-field); min-inline-size: 0; }
.iw .iw-rv-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.iw .iw-rv-h h4 { font-family: var(--iw-font-display); font-weight: 700; font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.iw .iw-n { display: inline-grid; place-items: center; min-inline-size: 24px; block-size: 24px; padding: 0 7px; border-radius: 999px; background: var(--iw-ink); color: var(--iw-bg); font: 700 13px/1 var(--iw-font); }
.iw .iw-edit { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--iw-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--iw-accent); text-decoration-thickness: 2px; border-radius: 8px; }
.iw .iw-edit:hover { background: var(--iw-tint); }
/* two columns from ~265 px of list width (375 phones), one column narrower (320 / 400 % zoom) so a phone number never breaks mid-digit */
.iw .iw-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 10px 14px; }
.iw .iw-dl > div { min-inline-size: 0; }
.iw .iw-dl > div.wide { grid-column: 1 / -1; }
.iw .iw-dl dt { font-size: 12.5px; color: var(--iw-muted); font-weight: 500; }
.iw .iw-dl dd { font-weight: 600; overflow-wrap: anywhere; }
.iw .iw-dl dd[dir="ltr"] { text-align: end; letter-spacing: .04em; white-space: nowrap; overflow-wrap: normal; }
.iw .iw-rv-cat { display: grid; gap: 6px; }
.iw .iw-rv-cat + .iw-rv-cat { padding-top: 10px; border-top: 1px dashed var(--iw-line); }
.iw .iw-rv-cath { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.iw .iw-main-tag { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--iw-accent); color: var(--iw-accent-ink); }
.iw .iw-rv-svcs { display: grid; gap: 4px; padding-inline-start: 40px; }
.iw .iw-rv-svcs li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 14.5px; }
.iw .iw-rv-sn { min-inline-size: 0; overflow-wrap: anywhere; }
.iw .iw-rv-sn small { color: var(--iw-muted); font-size: 12.5px; }
.iw .iw-rv-p { white-space: nowrap; font-weight: 600; }
.iw .iw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.iw .iw-tags li { padding: 5px 12px; border-radius: 999px; background: var(--iw-bg); font-size: 14px; font-weight: 500; }
.iw .iw-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--iw-muted); padding: 2px 4px; }
.iw .iw-consent svg { color: var(--iw-accent-ink); background: var(--iw-accent); border-radius: 50%; padding: 3px; width: 20px; height: 20px; margin-top: 1px; }

/* ── footer & buttons ────────────────────────────────────── */
.iw .iw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--iw-line); }
.iw .iw-foot [data-back] { order: 1; }
.iw .iw-foot [data-next] { order: 2; margin-inline-start: auto; flex: 1 1 auto; justify-content: center; }
.iw .iw-foot.first [data-next] { flex-basis: 100%; }
.iw .iw-autosave { order: 3; flex-basis: 100%; text-align: center; font-size: 12.5px; color: var(--iw-muted); }
.iw .iw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background var(--iw-dur) var(--iw-ease), border-color var(--iw-dur) var(--iw-ease), transform var(--iw-dur) var(--iw-ease), box-shadow var(--iw-dur) var(--iw-ease); }
.iw .iw-btn.primary { background: var(--iw-accent); color: var(--iw-accent-ink); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--iw-accent) 80%, var(--iw-ink)); }
.iw .iw-btn.primary:hover { background: color-mix(in srgb, var(--iw-accent) 88%, var(--iw-ink)); }
.iw .iw-btn.primary:active { transform: translateY(1px); }
.iw .iw-btn.primary.submit { background: var(--iw-ink); color: var(--iw-bg); box-shadow: 0 8px 20px -10px var(--iw-ink); }
.iw .iw-btn.primary.submit:hover { background: color-mix(in srgb, var(--iw-ink) 90%, var(--iw-accent)); }
.iw .iw-btn.ghost { background: transparent; border-color: var(--iw-line-2); color: var(--iw-ink); }
.iw .iw-btn.ghost:hover { border-color: var(--iw-ink); background: var(--iw-field); }
.iw .iw-btn.sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.iw .iw-btn.busy { cursor: progress; opacity: .85; }
.iw .iw-btn.busy svg { display: none; }
.iw .iw-btn.busy::after { content: ""; inline-size: 16px; block-size: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: iw-spin .8s linear infinite; }
@keyframes iw-spin { to { transform: rotate(360deg); } }

/* ── draft banner ────────────────────────────────────────── */
.iw .iw-draft-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--iw-line); border-inline-start: 5px solid var(--iw-accent); border-radius: 14px; background: var(--iw-surface); }
.iw .iw-draft-ico { display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 12px; background: var(--iw-tint); color: var(--iw-ink); }
.iw .iw-draft-t { display: grid; gap: 2px; flex: 1 1 200px; min-inline-size: 0; }
.iw .iw-draft-t b { font-size: 15.5px; }
.iw .iw-draft-t span { font-size: 13.5px; color: var(--iw-muted); }
.iw .iw-draft-b { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── success ─────────────────────────────────────────────── */
.iw .iw-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 12px 0 8px; }
.iw .iw-done .iw-sub { max-inline-size: 36ch; }
.iw .iw-done-art { position: relative; margin-bottom: 8px; animation: iw-land 640ms var(--iw-ease) both; }
.iw .iw-done-check { position: absolute; inset-inline-end: -6px; inset-block-end: -6px; display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: var(--iw-accent); color: var(--iw-accent-ink); border: 3px solid var(--iw-surface); animation: iw-pop 420ms var(--iw-ease) 380ms both; }
.iw .iw-done-check svg { width: 20px; height: 20px; stroke-width: 3; }
.iw .iw-done-n { font-size: 17px; font-weight: 600; }
.iw .iw-done-n b { display: inline-block; padding: 2px 12px; margin-inline-start: 4px; border-radius: 999px; background: var(--iw-ink); color: var(--iw-accent); font-family: var(--iw-font-display); font-size: 22px; font-weight: 800; }
.iw .iw-done .iw-btn { margin-top: 8px; }
.iw .iw-note { font-size: 13px; color: var(--iw-muted); }
@keyframes iw-land { from { opacity: 0; transform: translateY(-18px) scale(.86) rotate(-6deg); } 60% { transform: translateY(4px) scale(1.03) rotate(1deg); } to { opacity: 1; transform: none; } }
@keyframes iw-pop { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }

/* ── wider viewports ─────────────────────────────────────── */
@media (min-width: 480px) {
  .iw .iw-row2 { grid-template-columns: 1fr 1fr; }
  .iw .iw-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iw .iw-form { padding: 28px 26px 22px; }
  .iw .iw-autosave { flex-basis: auto; order: 2; margin-inline-start: 4px; }
  .iw .iw-foot [data-next] { order: 3; flex: 0 0 auto; min-inline-size: 180px; }
  .iw .iw-foot.first [data-next] { flex-basis: auto; }
}
@media (min-width: 960px) {
  .iw .iw-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
  .iw .iw-rail { position: sticky; top: 24px; gap: 16px; }
  .iw .iw-prog-txt { display: block; }
  .iw .iw-steps { display: grid; gap: 4px; margin-top: 6px; }
  .iw .iw-steps li { position: relative; }
  .iw .iw-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 19px; top: 40px; bottom: -4px; width: 2px; background: var(--iw-line); }
  .iw .iw-steps li.done::after { background: var(--iw-ink); }
  .iw .iw-stepbtn { display: flex; align-items: center; gap: 12px; inline-size: 100%; min-height: 44px; padding: 4px 6px; border: 0; background: none; border-radius: 10px; color: var(--iw-muted); font-weight: 500; text-align: start; }
  .iw .iw-stepbtn:disabled { cursor: default; }
  .iw .iw-stepbtn:not(:disabled):hover { background: var(--iw-tint); color: var(--iw-ink); }
  .iw .iw-dot { position: relative; z-index: 1; display: grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; border-radius: 50%; border: 2px solid var(--iw-line-2); background: var(--iw-surface); font: 700 13px/1 var(--iw-font); color: var(--iw-muted); transition: background var(--iw-dur) var(--iw-ease), border-color var(--iw-dur) var(--iw-ease); }
  .iw .iw-dot svg { display: none; width: 14px; height: 14px; stroke-width: 3; }
  .iw li.cur .iw-stepbtn { color: var(--iw-ink); font-weight: 700; }
  .iw li.cur .iw-dot { background: var(--iw-accent); border-color: var(--iw-accent); color: var(--iw-accent-ink); }
  .iw li.done .iw-stepbtn { color: var(--iw-ink); }
  .iw li.done .iw-dot { background: var(--iw-ink); border-color: var(--iw-ink); color: var(--iw-bg); }
  .iw li.done .iw-dot b { display: none; }
  .iw li.done .iw-dot svg { display: block; }
  .iw .iw-form { padding: 36px 36px 28px; }
  .iw .iw-title { font-size: 30px; }
  .iw .iw-head .iw-eyebrow { display: none; } /* the rail already says «الخطوة N من 5» */
  .iw .iw-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .iw .iw-dl { grid-template-columns: repeat(4, 1fr); }
  .iw .iw-dl > div.wide { grid-column: 1 / -1; }
}
@media (min-width: 1200px) { .iw .iw-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ── reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .iw *, .iw *::before, .iw *::after { transition: none !important; animation: none !important; }
  .iw .iw-body.is-anim { overflow: visible; }
  .iw .iw-done-art, .iw .iw-done-check { opacity: 1; transform: none; }
}

/* optional picture: a round face for a person, a rounded square for a company logo */
.iw .iw-photo { margin-top: 14px; }
.iw .iw-opt { font-weight: 400; opacity: .7; }
.iw .iw-photo-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.iw .iw-photo-box { flex: none; inline-size: 72px; block-size: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(31, 33, 35, .06); box-shadow: 0 0 0 1px rgba(31, 33, 35, .12) inset; }
.iw .iw-photo-box.logo { border-radius: 16px; }
.iw .iw-photo-box img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.iw .iw-photo-box.logo img { object-fit: contain; background: #fff; }
.iw .iw-photo-box svg { inline-size: 32px; block-size: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .45; }
.iw .iw-photo-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.iw .iw-photo-act .iw-hint { flex-basis: 100%; }
.iw .iw-photo-pick { position: relative; cursor: pointer; }
.iw .iw-photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; inline-size: 100%; }
.iw .iw-photo-pick:has(input:focus-visible) { outline: 2px solid var(--iw-ink); outline-offset: 2px; }
