/* ملمح | Malmah — app styles. One identity: black and white carry the system; coral is a signal only
   (progress, the current step, focus). Tokens are shared with landing.html, light and dark. */

:root,
[data-theme="focus"] {
  /* Direction A "Focus", restrained: black and white carry the system; coral is a signal only. */
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F1EFEA;
  --ink: #0B0B0C;
  --ink-2: #3A3A3E;
  --ink-3: #5E5E64;
  --line: #E2E0DA;
  --accent: #F04E2A;          /* focus dot, progress, current step — never text */
  --accent-ink: #B8391A;      /* accent as text: 5.1:1 */
  --accent-soft: #FDECE6;
  --primary: #0B0B0C;
  --on-primary: #FFFFFF;
  --ok: #1D6B50;
  --ok-soft: #E3F2EA;
  --warn: #8A5A00;
  --warn-soft: #FBF1D9;
  --err: #A8261B;
  --err-soft: #FBE3E0;
  --hl: #FDE3DA;
  --radius: 14px;
  --radius-sm: 10px;
  --border-w: 1px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Readex Pro", system-ui, sans-serif;
  --display-weight: 700;
  /* type scale: every screen uses these, no inline sizes */
  --fs-h1: 28px; --fs-h2: 19px; --fs-h3: 16px; --fs-lead: 17px; --fs-sm: 14px; --fs-xs: 12.5px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E0E10; --surface: #17171A; --surface-2: #222226; --ink: #F4F3F0; --ink-2: #C9C8C4; --ink-3: #A3A29E; --line: #2C2C31;
  --accent: #FF6A48; --accent-ink: #FF8A6E; --accent-soft: #2A1712; --primary: #F4F3F0; --on-primary: #0B0B0C;
  --ok: #6FD3A9; --ok-soft: #11261D; --warn: #E8B65A; --warn-soft: #2B2310; --err: #FF8A7E; --err-soft: #3A1715; --hl: #3A2117;
  --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0E0E10; --surface: #17171A; --surface-2: #222226; --ink: #F4F3F0; --ink-2: #C9C8C4; --ink-3: #A3A29E; --line: #2C2C31;
  --accent: #FF6A48; --accent-ink: #FF8A6E; --accent-soft: #2A1712; --primary: #F4F3F0; --on-primary: #0B0B0C;
  --ok: #6FD3A9; --ok-soft: #11261D; --warn: #E8B65A; --warn-soft: #2B2310; --err: #FF8A7E; --err-soft: #3A1715; --hl: #3A2117;
  --shadow: none; color-scheme: dark; }


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
[lang="en"] body, html[lang="en"] body { line-height: 1.5; }
:lang(ar) [lang="en"]:not(.cv-page) { line-height: 1.5; }   /* Latin islands in Arabic text */
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
bdi, .ltr { unicode-bidi: isolate; }
.ltr { direction: ltr; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; inset-inline-start: 8px; top: -60px;
  background: var(--primary); color: var(--on-primary);
  padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100;
}
.skip:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-w) solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar .spacer { flex: 1; }
.topbar .top-signin { font-size: .9rem; min-height: 44px; display: inline-flex; align-items: center; padding-inline: 8px; }
.iconbtn {
  display: inline-grid; place-items: center;
  min-width: 44px; height: 44px; padding: 0 10px;
  border: 0; background: transparent; border-radius: 999px; cursor: pointer;
  color: var(--ink-2); font-weight: 700; font-size: 14px;
}
@media (hover: hover) { .iconbtn:hover { background: var(--surface-2); } }
.back-ico { transform: scaleX(1); }
[dir="rtl"] .back-ico { transform: scaleX(-1); }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 16px 16px 120px; }
main.wide { max-width: 1080px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 26px; height: 26px; }
.brand .word-ar { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; }
.brand .word-en { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1; }
.brand .bar { color: var(--ink-3); font-weight: 300; font-size: 18px; white-space: pre; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.3; margin: 0 0 8px; }
h1 { font-size: var(--fs-h1); letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 12px; }
.lead { font-size: var(--fs-lead); color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--accent-ink);
  margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.focus-word {
  position: relative; white-space: nowrap;
  background: linear-gradient(transparent 62%, var(--hl) 62%);
  padding-inline: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 20px;
  border-radius: var(--radius); border: var(--border-w) solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
@media (hover: hover) { .btn-primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--bg)); } }
.btn-accent { background: var(--accent); color: #1a0d07; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
@media (hover: hover) { .btn-ghost:hover { background: var(--surface-2); } }
.btn-link { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--ink); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[disabled]:hover { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 160px; }

.applepay {
  width: 100%; min-height: 52px; border: 0; border-radius: var(--radius-sm);
  background: #000; color: #fff; font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
  font-size: 19px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  direction: ltr;
}
.applepay svg { width: 20px; height: 20px; }

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.grid-2 { display: grid; gap: 12px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* ---------- Chips & badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: var(--border-w) solid var(--line); background: var(--surface);
  font-size: 14.5px; cursor: pointer; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 500; line-height: 1;
  padding: 6px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.accent { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Forms ---------- */
label.field { display: block; }
.field > span.lbl { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.field .hint { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="month"], input[type="password"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-sm);
  font-size: 16px; line-height: 1.6;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-ltr { direction: ltr; text-align: left; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend.lbl { padding: 0; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.date-row { display: grid; grid-template-columns: 36px 1fr 1fr; gap: 8px; align-items: center; }
.date-row + .date-row { margin-top: 8px; }
.ongoing { align-items: center; gap: 8px; min-height: 44px; }
.ongoing input { width: 20px; height: 20px; flex: none; }
.fu-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--warn-soft); }
.fu-box .ask { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14.5px; }
.fu-box .ask strong { color: var(--warn); }

/* ---------- Progress ---------- */
.progress { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.progress .bar { flex: 1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ok); }

/* ---------- Transformation card (the core idea) ---------- */
.xform { padding: 0; overflow: hidden; }
.xform .xhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 16px 0; }
.xform .xrow { padding: 12px 16px; }
.xform .xrow + .xrow { border-top: 1px dashed var(--line); }
.xform .xlabel { font-size: 12.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.xform .said { font-size: 15px; color: var(--ink-2); font-style: normal; }
.xform .said::before { content: "“"; } .xform .said::after { content: "”"; }
[dir="rtl"] .xform .said::before { content: "«"; } [dir="rtl"] .xform .said::after { content: "»"; }
.xform .shows { display: flex; flex-wrap: wrap; gap: 6px; }
.xform .shows span { font-size: 13.5px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); }
.xform .proposed { font-weight: 500; font-size: 16px; background: var(--surface-2); border-inline-start: 3px solid var(--ink); margin: 0 -16px; padding: 12px 16px; }
.xform .proposed mark { background: none; color: inherit; border-bottom: 2px solid var(--accent); }
.xform .xactions { display: flex; gap: 8px; padding: 12px 16px 16px; flex-wrap: wrap; }
.xform .xactions .btn { min-height: 44px; flex: 1 1 110px; font-size: 15px; padding: 8px 12px; }
.xform.confirmed { border-color: var(--ok); }
.xform.rejected { opacity: .55; }
.xform .ask { background: var(--warn-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; font-size: 14.5px; }
.xform .ask strong { color: var(--warn); }
.arrow { color: var(--ink-3); font-weight: 700; }

.sample-xform { max-width: 460px; }

/* ---------- Status ---------- */
.filechip { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.filechip .ext { font-weight: 700; font-size: 12px; background: var(--primary); color: var(--on-primary); padding: 6px 8px; border-radius: 6px; direction: ltr; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.kv { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv .v { font-weight: 500; }

/* ---------- CV preview ---------- */
.cv {
  background: #fff; color: #161b26; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 32px rgba(14,27,51,.10);
  padding: 28px 24px; font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 13.5px; line-height: 1.65;
  border: 1px solid #e6e2d8;
}
.cv h2 { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 24px; margin: 0; font-weight: 700; }
.cv .role { color: #3b4458; font-weight: 500; margin: 2px 0 6px; }
.cv .contact { font-size: 12.5px; color: #525a6c; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cv h4 { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1.5px solid #161b26; font-weight: 700; }
.cv .item { margin-bottom: 10px; }
.cv .item-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.cv .item-sub { color: #525a6c; font-size: 12.5px; }
.cv ul { margin: 4px 0 0; padding-inline-start: 18px; }
.cv li { margin-bottom: 3px; }
.cv .editable { border-radius: 4px; outline: 1px dashed transparent; transition: outline-color .15s; }
.cv.editing .editable { outline-color: #c9bfae; cursor: text; }
.cv.editing .editable:focus { outline: 2px solid var(--accent); background: #fffaf2; }
.cv .tag { font-size: 11px; color: #6b7280; font-weight: 500; }

.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; min-height: 40px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---------- Offer & checkout ---------- */
.price { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; }
.price small { font-size: 16px; font-weight: 700; color: var(--ink-2); margin-inline-start: 4px; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }
.checklist li::before { content: ""; flex: none; width: 6px; height: 11px; margin: 6px 6px 0; border-right: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(45deg); }
.addon { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: var(--border-w) solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.addon + .addon { margin-top: 10px; }
.addon input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.addon .a-price { margin-inline-start: auto; font-weight: 700; white-space: nowrap; }
.addon:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary-row.total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.stickybar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 9;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: var(--border-w) solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,.06);
}
.stickybar .inner { max-width: 560px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.stickybar .inner .btn { flex: 1; }
.stickybar .tot { font-weight: 700; white-space: nowrap; }
.stickybar .tot small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cardform { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.cardform .full { grid-column: 1 / -1; }
.netlogos { display: flex; gap: 6px; align-items: center; direction: ltr; }
.netlogos span { font-size: 11px; font-weight: 800; padding: 4px 7px; border-radius: 4px; border: 1px solid var(--line); background: #fff; color: #111; letter-spacing: .02em; }
.secure { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); }

.status-hero { text-align: center; padding: 24px 8px 8px; }
.status-hero .big { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 700; }
.status-hero .big.ok { background: var(--ok-soft); color: var(--ok); }
.status-hero .big.err { background: var(--err-soft); color: var(--err); }
.status-hero .big.warn { background: var(--warn-soft); color: var(--warn); }

.notice { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.notice.info { background: var(--surface-2); }
.notice.warn { background: var(--warn-soft); }
.notice.err { background: var(--err-soft); }
.notice.ok { background: var(--ok-soft); }
.notice.proto { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 8px, var(--surface) 8px, var(--surface) 16px); border: 1px dashed var(--ink-3); }

/* ---------- Downloads & revisions ---------- */
.dl { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dl:last-child { border-bottom: 0; }
.dl .meta { flex: 1; min-width: 0; }
.dl .meta b { display: block; }
.rev-meter { display: flex; gap: 8px; margin: 10px 0; }
.rev-meter i { flex: 1; height: 10px; border-radius: 999px; background: var(--accent); }
.rev-meter i.used { background: var(--surface-2); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-inline-start: 22px; padding-bottom: 12px; font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.timeline li.done::before { background: var(--ok); }
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- Landing ---------- */
.hero { padding: 18px 0 8px; }
.hero .cta { margin-top: 18px; display: grid; gap: 10px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.trust span::before { content: "•"; color: var(--accent); margin-inline-end: 6px; }
.how { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.how li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; }
.how li::before { content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 14px; }
.promise-list { display: grid; gap: 10px; }
.promise-list div { display: flex; gap: 10px; }
.promise-list .x { color: var(--err); font-weight: 700; }
.footer { text-align: center; font-size: 13px; color: var(--ink-3); padding: 32px 16px 110px; }

@media (min-width: 900px) {
  .landing-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
  main.landing { max-width: 1080px; }
  .hero .cta { grid-template-columns: auto auto; justify-content: start; }
}

/* ---------- Prototype toolbar (not part of product UI) ---------- */
#toolbar { position: fixed; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 50; font-family: system-ui, sans-serif; }
.tb-toggle { border: 0; background: #2a2a2a; color: #fff; border-radius: 999px; padding: 10px 14px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.tb-panel { position: absolute; bottom: 48px; left: 0; width: min(320px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: #1f1f1f; color: #eee; border-radius: 14px; padding: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); font-size: 13px; line-height: 1.5; }
.tb-panel h5 { margin: 10px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #aaa; }
.tb-panel h5:first-child { margin-top: 0; }
.tb-panel .row { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-panel button { border: 1px solid #444; background: #2b2b2b; color: #eee; border-radius: 8px; padding: 6px 9px; font-size: 12.5px; cursor: pointer; }
.tb-panel button[aria-pressed="true"] { background: #fff; color: #111; border-color: #fff; }
.tb-panel a { color: #ffd2c4; text-decoration: none; display: inline-block; padding: 3px 0; }
.tb-panel .map { columns: 2; column-gap: 12px; }
.tb-panel .map a { display: block; }

.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.mb-0 { margin-bottom: 0; }
.xform .ask .row { flex-wrap: wrap; }
.xform .ask .row input { flex: 1 1 200px; }
.xform .ask .row .btn { flex: 1 1 auto; }
.xform.compact .xrow { padding-top: 8px; font-size: 15px; }

/* ───────── v2 components ───────── */
main.wide-preview { max-width: 860px; }
.loop { font-weight: 700; font-size: 14.5px; padding: 10px 12px; border-inline-start: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
[dir="rtl"] .loop { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stepper { width: 100%; max-width: 560px; margin: 0 auto; padding: 10px 16px 0; overflow-x: auto; scrollbar-width: none; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.stepper li { flex: 1 0 auto; font-size: 11.5px; color: var(--ink-3); text-align: center; padding-top: 8px; border-top: 3px solid var(--line); white-space: nowrap; min-width: 44px; }
.stepper li.done { border-top-color: var(--ink); color: var(--ink-2); }
.stepper li.now { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
.pk-mini { display: flex; gap: 12px; flex-wrap: wrap; }
.pk-mini div { display: flex; flex-direction: column; flex: 1 1 90px; }
.pkg { display: flex; gap: 12px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.pkg.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pkg input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.pkg-body { flex: 1; min-width: 0; }
.price-sm { font-family: var(--font-display); font-weight: 700; font-size: 20px; white-space: nowrap; }
.fair { margin-top: 8px; font-size: 14px; }
.fair summary { cursor: pointer; font-weight: 500; color: var(--ink-2); min-height: 44px; }
.fair ul { margin: 6px 0 0; padding-inline-start: 18px; }
.addon.on { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.accent-text { color: var(--ink); font-weight: 700; }
.err-text { color: var(--err) !important; }
.ok-text { color: var(--ok) !important; }
.rv-item { padding: 12px 0; border-top: 1px solid var(--line); }
.rv-item:first-of-type { border-top: 0; }
.rv-item.resolved p { color: var(--ink-3); }
.proposed-mini { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; }
.title-input { width: 100%; border: 0; border-bottom: 1.5px dashed var(--line); background: transparent; font-family: var(--font-display); font-weight: 700; font-size: 17px; padding: 6px 0; border-radius: 0; min-height: 40px; }
.title-input:focus { outline: none; border-bottom-color: var(--ink); box-shadow: none; }
.ev-item h3 { margin-bottom: 2px; }
.ext-tag { font-weight: 700; font-size: 11px; background: var(--primary); color: var(--on-primary); padding: 7px 8px; border-radius: 6px; direction: ltr; }
.big-spin { margin: 24px auto 18px; width: 40px; height: 40px; border-width: 4px; }
.sheet-wrap { position: relative; overflow: hidden; border-radius: 4px; background: #E9E9EC; padding: 0; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(0,0,0,.08); }
.sheet-scale { width: 210mm; }
[dir="rtl"] .sheet-wrap .sheet-scale { margin-inline-start: auto; }
.email { font-size: 15px; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); background: var(--primary); color: var(--on-primary); padding: 12px 16px; border-radius: 12px; z-index: 60; max-width: min(92vw, 480px); font-size: 14.5px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.chip { color: var(--ink); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.lang-short { display: none; }
@media (max-width: 480px) {
  .topbar { gap: 6px; padding: 8px 12px; }
  .saved-txt, .lang-long { display: none; }
  .lang-short { display: inline; }
  .brand .mark { width: 22px; height: 22px; }
  .brand .word-ar { font-size: 19px; }
  .brand .word-en { font-size: 14px; }
}
@media (max-width: 480px) {
  .stepper li span { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }   /* every stage is named on phones too */
  .stepper li { min-width: 0; flex: 1 1 0; padding-top: 6px; }
  .stepper li.now { flex: 1.4 1 0; }
}

/* combobox */
.combo { position: relative; }
.combo-list { position: absolute; inset-inline: 0; top: calc(100% - 22px); z-index: 20; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-sm); max-height: 320px; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.combo-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; cursor: pointer; min-height: 44px; justify-content: center; }
.combo-list li[aria-selected="true"] { background: var(--surface-2); }
@media (hover: hover) { .combo-list li:hover { background: var(--surface-2); } }
.combo-list li:last-child { border-top: 1px solid var(--line); }
/* confirmation grouped by experience */
.xgroup { border: var(--border-w) solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 12px; }
.xgroup.open { border-color: var(--ink-3); padding-bottom: 12px; }
.xgroup-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 8px 0; background: none; border: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.xgroup-h .xgroup-t { font-weight: 700; min-width: 0; }
.xgroup-h .badge { flex: none; }

.xgroup.done:not(.open) .xgroup-t { color: var(--ink-2); }
.example { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0 0 12px; }

/* audit fixes */
.brand { min-height: 44px; }
details > summary { min-height: 44px; display: flex; align-items: center; }
.btn-link { min-height: 44px; }
.chip-sm { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.na-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.na-note { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0; font-size: 14.5px; }
.why { margin-top: 4px; font-size: 14.5px; }
.why summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.why p { background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-sm); }
.h3 { font-size: 17px; margin-bottom: 4px; }
.cv-page .h2like { font-size: 11pt; font-weight: 700; margin: 0 0 5pt; padding-bottom: 2.5pt; border-bottom: .6pt solid var(--cv-hair); }
.danger, .btn-link.danger { color: var(--err); border-color: var(--err); }
.del-confirm { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14.5px; }
.skip:focus, .skip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-link.small { padding-inline: 10px; }
.cv-page h2.cv-name { font-size: 21pt; }

/* ───────── V1 scope: consent, contact, offer, LinkedIn About, referral/credit ───────── */
.consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.consent input { width: 24px; height: 24px; min-height: 24px; flex: none; margin-top: 3px; accent-color: var(--primary); }
.consent > span { display: grid; gap: 4px; }
.consent .consent-text { font-weight: 500; }
.consent.invalid { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.fixed-val { margin: 4px 0 0; padding: 12px 14px; border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.contact-ro .lbl { margin: 0; }
.offer .price-sm { font-size: 22px; }
.about-text { font-size: 15px; line-height: 1.65; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); white-space: normal; overflow-wrap: anywhere; text-align: left; }
.about-partial { position: relative; max-height: 7.5em; overflow: hidden; }
.about-partial::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2.6em; background: linear-gradient(to bottom, transparent, var(--surface-2)); }
.about-upd { background: var(--hl); border-radius: 4px; }
.credit-sum { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger caption { text-align: start; padding-bottom: 4px; }
.ledger th, .ledger td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger th { font-weight: 700; color: var(--ink-2); }
.contact-ro .btn-link { min-width: 44px; padding-inline: 8px; text-align: center; }
.summary-row > span:last-child { white-space: nowrap; flex: none; }
.summary-row > span:first-child { min-width: 0; }
.summary-row bdi { white-space: nowrap; }
.xform .xhead .btn-link { min-width: 44px; text-align: center; }
.summary-row bdi { overflow-wrap: anywhere; }

/* CV template picker (#/preview) */
.tpl-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.tpl-pick legend { padding: 0; margin-bottom: 8px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tpl-opt { display: flex; flex-direction: column; gap: 4px; text-align: start; min-height: 72px; padding: 10px 12px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); font: inherit; }
@media (hover: hover) { .tpl-opt:hover { border-color: var(--ink-3); } }
.tpl-opt[aria-pressed="true"] { border: 2px solid var(--primary); padding: 9px 11px; box-shadow: var(--shadow); }
.tpl-name { font-weight: 700; font-size: 15px; }
.tpl-name .badge { font-size: 11px; vertical-align: middle; }

/* Tools screen: one row per tool, level only (#/tools) */
.tool-list { display: flex; flex-direction: column; gap: 0; padding: 4px 16px; }
.tool-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; min-width: 0; }
.tool-row + .tool-row { border-top: var(--border-w) solid var(--line); }
.tool-row .seg { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }

/* Confirm cards (#/discover, #/item/N/lines): the line and its decision first; origin behind a toggle */
.btn-secondary { background: var(--surface); border-color: var(--ink); color: var(--ink); }
@media (hover: hover) { .btn-secondary:hover { background: var(--surface-2); } }
.xform.current { border-color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.06); }
.xform .xorigin { border-top: 1px dashed var(--line); }
.xform .xorigin > summary { cursor: pointer; padding: 12px 16px; min-height: 44px; box-sizing: border-box; font-size: 14px; font-weight: 700; color: var(--ink-2); list-style-position: inside; }
.xform .xorigin[open] > summary { padding-bottom: 4px; }
.xform .xactions .btn { flex: 1 1 0; min-width: 0; padding: 8px 6px; }

/* Preview: full-size CV scrolls sideways inside its frame */
.sheet-wrap.zoom { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.sheet-wrap.zoom .sheet-scale { width: 794px; }
.sheet-wrap.zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rv-done > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.tpl-pick .addon { margin-bottom: 8px; }
.pv-tools { flex: 1 1 100%; }
.pv-tools > .btn { flex: 1 1 140px; min-width: 0; }

/* ---------- Final review: one page, compact lines ---------- */
.rv-group-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; margin: 0; }
.rv-group-h .badge { flex: none; }
.xform.lite { padding: 14px; }
.xform.lite .proposed { font-size: 15.5px; }
.xform.lite .xactions { margin-top: 10px; }
.rv-note { margin-top: -4px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); }
.rv-rest .btn { min-height: 48px; }
/* the CV first: title and template behind one line */
.pv-custom > summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-height: 44px; justify-content: center; }
.pv-custom .pv-current { font-weight: 400; }

/* journey: optional profile details, more kinds, folded review groups, the phone CV, the code box, the pay line, account sections */
.pf-more > summary, .ev-more > summary, .code-box > summary { cursor: pointer; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pf-more[open] > summary { margin-bottom: 12px; }
.pf-more > .grid-2, .pf-more > .field { margin-top: 12px; }
.chip.add { border-style: dashed; }
details.rv-group > summary.rv-group-h { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
details.rv-group > summary.rv-group-h::-webkit-details-marker { display: none; }
details.rv-group > summary.rv-group-h h2 { font-size: 17px; margin: 0; flex: 1; min-width: 0; }
.sheet-wrap.reflow { background: none; box-shadow: none; overflow: visible; }
.sheet-wrap.reflow .sheet-scale { width: auto; transform: none !important; }
.sheet-wrap.reflow .cv-page { width: auto; min-height: 0; padding: 20px 16px; font-size: 15px; border: 1px solid var(--line); border-radius: 12px; }
.pay-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ac-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 16px; }
.ac-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.ac-group { font-size: 15px; color: var(--ink-2); margin: 28px 0 8px; }
.ac-nav a { min-width: 44px; padding-inline: 6px; justify-content: center; }
.support-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ───────── design system ───────── */
/* icons: one stroke set (app.js ic()), sized to the text around them */
.ic { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -0.18em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice > .ic { margin-top: .2em; }
.status-hero .big .ic { width: 34px; height: 34px; vertical-align: middle; }
/* every disclosure shows that it opens */
details > summary { position: relative; padding-inline-end: 28px; cursor: pointer; }
details > summary::after { content: ""; position: absolute; inset-inline-end: 8px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-75%) rotate(45deg); transition: transform .15s ease; }
details[open] > summary::after { transform: translateY(-25%) rotate(-135deg); }
/* the CV sheet is centred, with no grey strip beside it */
.sheet-wrap { max-width: 794px; margin-inline: auto; background: var(--surface); }
/* desktop: the top bar lines up with the content; the account reads in two columns */
@media (min-width: 900px) { .topbar { padding-inline: max(16px, calc((100% - 1080px) / 2)); } }
@media (min-width: 960px) {
  main.account { max-width: 1080px; }
  .ac-cols { columns: 2; column-gap: 16px; }
  .ac-cols > * { break-inside: avoid; }
  .ac-cols > .card { display: inline-block; width: 100%; margin: 0 0 12px; }
}
.ac-cols { margin-top: 12px; }
.badge.wrap { white-space: normal; line-height: 1.5; padding-block: 6px; }
