:root {
  --ground: #F2F4F3;
  --surface: #FFFFFF;
  --ink: #12201B;
  --muted: #56655F;
  --rule: #D6DDDA;
  --accent: #0B5D57;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3F0EE;
  --fail: #B3261E;
  --fail-bg: #FBEAE8;
  --warn: #8A5200;
  --warn-bg: #FFF1D6;
  --pass: #1E7A4C;
  --pass-bg: #E3F4EA;
  --display: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0D1412; --surface: #15201D; --ink: #E6EEEB; --muted: #9AACA5; --rule: #2A3733;
    --accent: #5CC3B6; --accent-ink: #06201C; --accent-soft: #173330;
    --fail: #F28B82; --fail-bg: #3A1B19; --warn: #F2B85B; --warn-bg: #3A2C12; --pass: #6FD19C; --pass-bg: #16301F;
  }
}
:root[data-theme="dark"] {
  --ground: #0D1412; --surface: #15201D; --ink: #E6EEEB; --muted: #9AACA5; --rule: #2A3733;
  --accent: #5CC3B6; --accent-ink: #06201C; --accent-soft: #173330;
  --fail: #F28B82; --fail-bg: #3A1B19; --warn: #F2B85B; --warn-bg: #3A2C12; --pass: #6FD19C; --pass-bg: #16301F;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
}
[hidden] { display: none !important; }
.page {
  max-width: 760px;
  margin: 0 auto;
  padding-inline: 18px;
  padding-block: 28px 56px;
  display: grid;
  gap: 40px;
}
h1, h2 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.35; }
h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.latin { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }

.masthead {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px;
  border-bottom: 1px solid var(--rule); padding-bottom: 12px; font-size: .875rem; color: var(--muted);
}
.wordmark { font-family: var(--display); font-size: 1.25rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.masthead-end { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lang-switch {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--accent); cursor: pointer;
  background: var(--accent-soft); border: 0; border-radius: 999px; padding: 2px 12px;
}

.intro { display: grid; gap: 14px; }
.who { color: var(--muted); font-size: .95rem; }
.who strong { color: var(--ink); font-weight: 600; }
.banner { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 14px; font-size: .9rem; font-weight: 600; }

/* Form */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 22px; }
form.card { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, select {
  font: inherit; color: var(--ink); background: var(--ground);
  border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; padding: 12px 20px;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn.light { background: var(--accent-ink); color: var(--accent); }
.error { color: var(--fail); font-weight: 600; }
.promise { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: .88rem; color: var(--muted); }
.promise span + span::before { content: "·"; margin-inline: 12px; color: var(--muted); }

/* Score */
.score {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 22px;
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
}
.gauge { text-align: center; min-width: 120px; }
.gauge .big { font-weight: 700; font-size: 3.25rem; line-height: 1; direction: ltr; display: block; }
.gauge .big.bad { color: var(--fail); }
.gauge .big.mid { color: var(--warn); }
.gauge .big.good { color: var(--pass); }
.gauge .lbl { font-size: .85rem; color: var(--muted); margin-top: 6px; display: block; }
.facts { display: grid; gap: 10px; }

/* Question sheet (report + live progress) */
.sheet { display: grid; gap: 14px; }
.sheet-head { display: grid; gap: 6px; }
.sheet-head p { color: var(--muted); font-size: .95rem; }
.rows { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.qrow { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 14px 18px; border-top: 1px solid var(--rule); }
.qrow:first-child { border-top: 0; }
.q { font-weight: 600; }
.named { grid-column: 1 / -1; font-size: .88rem; color: var(--muted); }
.named span { color: var(--ink); }
.pill { align-self: start; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pill.fail { color: var(--fail); background: var(--fail-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.pass { color: var(--pass); background: var(--pass-bg); }
.pill.wait { color: var(--muted); background: var(--ground); }
.pill.wait::after { content: ""; display: inline-block; width: .7em; height: .7em; margin-inline-start: 6px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.9s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pill.wait::after { animation: none; } }

/* Findings */
.findings { display: grid; gap: 14px; }
.finding { display: grid; gap: 6px; padding-block: 14px; border-top: 1px solid var(--rule); }
.finding:first-of-type { border-top: 0; padding-top: 0; }
.finding-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.finding-title h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.finding p { color: var(--muted); }

/* Market */
.market { display: grid; gap: 14px; }
.market ol, .market ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.market li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--rule); padding-bottom: 6px; }
.market li .c { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* Plan */
.plan { display: grid; gap: 14px; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.plan li::before { content: ""; width: 10px; height: 10px; margin-top: .6em; border-radius: 3px; background: var(--accent); }
.plan li b { font-weight: 600; }

/* Offer */
.offer { background: var(--accent); color: var(--accent-ink); border-radius: 16px; padding: 24px; display: grid; gap: 16px; }
.offer h2 { color: var(--accent-ink); }
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.price { border: 1px solid color-mix(in srgb, var(--accent-ink) 35%, transparent); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; }
.price .amt { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.price .amt small { font-size: .9rem; font-weight: 500; }
.price .what { font-size: .9rem; opacity: .9; }
.offer .done { font-weight: 700; font-size: 1.05rem; }

.honest { display: grid; gap: 10px; font-size: .92rem; color: var(--muted); }
.honest h2 { color: var(--ink); }
.honest ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

footer { border-top: 1px solid var(--rule); padding-top: 14px; font-size: .8rem; color: var(--muted); }

@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .score { grid-template-columns: 1fr; }
  .gauge { text-align: start; }
  .qrow { padding: 12px 14px; }
  .offer { padding: 20px 16px; }
  .card { padding: 18px 14px; }
}

/* Bot trap: off-screen on the side that never scrolls, in both left-to-right and right-to-left pages. */
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sample-link { font-weight: 600; }

/* ---------- Formal full report: black and white; the logo is the only colour ---------- */
/* The report is always a light document, even on devices in dark mode; the logo keeps its brand colour. */
.doc-body { background: #EDEDED; color: #111; color-scheme: light; --accent: #0B5D57; --accent-ink: #FFFFFF; --accent-soft: #E3F0EE; }
.doc {
  --doc-ink: #111111; --doc-muted: #555555; --doc-rule: #CFCFCF; --doc-soft: #F4F4F4;
  max-width: 860px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 60px;
  display: grid; gap: 28px; color: var(--doc-ink);
}
.doc .muted, .doc .error { color: var(--doc-muted); }
.doc a { color: var(--doc-ink); }
.doc .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.doc .toolbar-end { display: flex; gap: 10px; align-items: center; }
.doc .lang-switch { background: #fff; color: var(--doc-ink); border: 1px solid var(--doc-rule); }
.doc .btn { background: var(--doc-ink); color: #fff; }
.doc .btn.small { font-size: .9rem; padding: 6px 14px; border-radius: 8px; }
.doc .banner { background: #fff; color: var(--doc-ink); border: 1px solid var(--doc-rule); font-weight: 500; }
.doc .rows { background: #fff; border-color: var(--doc-rule); }
.doc .qrow { border-color: var(--doc-rule); }
.doc .pill { background: var(--doc-soft); color: var(--doc-ink); }

.doc .cover, .doc .toc, .doc .doc-section {
  background: #fff; border: 1px solid var(--doc-rule); padding: clamp(20px, 5vw, 48px);
}
.doc .cover { display: grid; gap: 22px; min-height: 60vh; align-content: space-between; }
.doc .cover-brand { font-weight: 700; font-size: 1.4rem; color: var(--accent); letter-spacing: .01em; }
.doc .cover h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); line-height: 1.3; max-width: 22ch; }
.doc .cover-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; border-top: 2px solid var(--doc-ink); padding-top: 16px; }
.doc .cover-meta dt { color: var(--doc-muted); }
.doc .cover-meta dd { margin: 0; font-weight: 600; }
.doc .cover-note { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--doc-muted); }

.doc .toc ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }

.doc .doc-section { display: grid; gap: 14px; }
.doc .doc-section h2 { font-size: 1.4rem; border-bottom: 2px solid var(--doc-ink); padding-bottom: 8px; }
.doc .sec-num { color: var(--doc-muted); }
.doc h3 { margin: 10px 0 0; font-size: 1.05rem; }
.doc .lead { font-size: 1.05rem; }
.doc ul, .doc ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.doc .level { font-weight: 700; }
.doc .finding { border-color: var(--doc-rule); }
.doc .finding p { color: var(--doc-muted); }

.doc ol.issues { list-style: none; padding: 0; gap: 14px; }
.doc .issue { border: 1px solid var(--doc-ink); display: grid; }
.doc .issue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 8px 14px; border-bottom: 1px solid var(--doc-ink); background: var(--doc-soft); }
.doc .issue-num { font-size: 1.3rem; font-weight: 700; }
.doc .issue-prio { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.doc .issue.prio-high .issue-head { background: var(--doc-ink); color: #fff; }
.doc .issue-effort { margin-inline-start: auto; font-size: .85rem; }
.doc .issue-grid { display: grid; grid-template-columns: 1fr 1fr; }
.doc .issue-side { padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.doc .issue-side.solution { border-inline-start: 1px solid var(--doc-rule); }
.doc .issue-grid.single { grid-template-columns: 1fr; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--doc-soft); padding: 0 4px; unicode-bidi: isolate; direction: ltr; }
.doc .issue-lbl { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--doc-muted); }
.doc .issue-problem { font-weight: 600; }
.doc .issue-impact, .doc .issue-more { font-size: .88rem; color: var(--doc-muted); }
@media (max-width: 620px) {
  .doc .issue-grid { grid-template-columns: 1fr; }
  .doc .issue-side.solution { border-inline-start: 0; border-top: 1px solid var(--doc-rule); }
}
.doc .figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.doc .figure { border: 1px solid var(--doc-rule); padding: 14px 16px; display: grid; gap: 4px; }
.doc .fig-num { font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
.doc .fig-num.small { font-size: 1.15rem; }
.doc .fig-lbl { font-size: .85rem; color: var(--doc-muted); }

.doc .table-wrap { overflow-x: auto; }
.doc table.options { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.doc table.options th, .doc table.options td { border: 1px solid var(--doc-rule); padding: 8px 10px; text-align: start; vertical-align: top; }
.doc table.options th { background: var(--doc-soft); font-weight: 600; }
.doc .opt-name { font-weight: 600; }
.doc td.tier { white-space: nowrap; font-weight: 600; }
.doc .choice-group { display: grid; gap: 8px; }

.doc .ready-item { border: 1px solid var(--doc-rule); }
.doc .ready-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: var(--doc-soft); border-bottom: 1px solid var(--doc-rule); }
.doc .copy-btn { font: inherit; font-size: .85rem; background: #fff; border: 1px solid var(--doc-rule); border-radius: 6px; padding: 2px 10px; cursor: pointer; color: var(--doc-ink); }
.doc pre { margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word; font-family: var(--body); font-size: .9rem; }
.doc pre.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.doc .sources { font-size: .82rem; color: var(--doc-muted); }

.doc .weeks, .doc .budgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.doc .week, .doc .budget { border: 1px solid var(--doc-rule); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.doc .budget dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.doc .budget dt { color: var(--doc-muted); }
.doc .budget dd { margin: 0; font-weight: 600; }
.doc .doc-footer { text-align: center; font-size: .8rem; color: var(--doc-muted); border: 0; }

@media print {
  @page { size: A4; margin: 16mm 14mm; }
  .no-print { display: none !important; }
  .doc-body { background: #fff; }
  .doc { display: block; max-width: none; padding: 0; }
  .doc .cover, .doc .toc, .doc .doc-section { border: 0; padding: 0; }
  .doc .cover { min-height: 250mm; }
  .doc .toc, .doc .doc-section { break-before: page; }
  .doc table.options { min-width: 0; font-size: 9pt; }
  .doc tr, .doc .ready-item, .doc .week, .doc .budget, .doc .figure, .doc .issue { break-inside: avoid; }
  .doc .issue.prio-high .issue-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc .cover-brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc a { text-decoration: none; }
}

.offer .includes { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.offer .price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.offer .price-line .amt { font-size: 1.8rem; font-weight: 700; }
.offer-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sample-link.light { color: var(--accent-ink); font-weight: 600; }

.doc .locked { border: 1px dashed var(--doc-ink); padding: 10px 14px; font-weight: 600; }
label.req::after { content: " *"; font-weight: 700; }
.required-note { font-size: .82rem; color: var(--muted); }

/* Agreement to the terms (free check and payment) */
.agree { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; line-height: 1.6; }
.field.agree { flex-direction: row; }
.agree input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 3px 0 0; padding: 0; flex: none; accent-color: var(--accent); box-shadow: none; }
.field.agree label { font-weight: 400; font-size: .92rem; }
.agree a { color: inherit; text-decoration: underline; }
.offer .agree input[type="checkbox"] { accent-color: var(--accent-ink); }

/* Progress while the free check runs */
.progress { height: 10px; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--surface); margin-top: 18px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.progress-count { margin-top: 8px; color: var(--muted); }

/* Policy links in page footers */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.legal-links a { color: var(--muted); }

/* Terms, Privacy, Refund and Contact pages */
.legal h1 { margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal section { display: grid; gap: 10px; }
.legal h2 { font-size: 1.15rem; margin-top: 8px; }
.legal ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
