:root {
  --ink: #1C2541;
  --sand: #B98B5E;
  --sand-deep: #8A6440;
  --sand-tint: #F4ECE2;

  --bg: #FFFFFF;
  --surface: #F4ECE2;
  --surface-2: #FBF8F3;
  --text: #1C2541;
  --muted: #4E5775;
  --line: #E2D6C7;
  --accent: #8A6440;
  --btn-bg: #1C2541;
  --btn-text: #FFFFFF;
  --btn-2-bg: transparent;
  --focus: #B98B5E;
  --danger: #A23B3B;
  --danger-tint: #F6E2E2;
  --ok: #2C7A57;
  --ok-tint: #E2F0E8;
  --foot-bg: #1C2541;
  --foot-text: #E9E0D3;
  --foot-muted: #B7AE9F;
  --input-bg: #FFFFFF;

  --f-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-en: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11141F; --surface: #191E2E; --surface-2: #161A28;
    --text: #ECE5DA; --muted: #A9B0C4; --line: #2C3247; --accent: #D9B08A;
    --btn-bg: #D9B08A; --btn-text: #11141F; --focus: #D9B08A;
    --danger: #E79A9A; --danger-tint: #3A2228; --ok: #86CBA8; --ok-tint: #1E3329;
    --foot-bg: #0A0D16; --foot-text: #E2D9CC; --foot-muted: #9C9586; --input-bg: #121624;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11141F; --surface: #191E2E; --surface-2: #161A28;
  --text: #ECE5DA; --muted: #A9B0C4; --line: #2C3247; --accent: #D9B08A;
  --btn-bg: #D9B08A; --btn-text: #11141F; --focus: #D9B08A;
  --danger: #E79A9A; --danger-tint: #3A2228; --ok: #86CBA8; --ok-tint: #1E3329;
  --foot-bg: #0A0D16; --foot-text: #E2D9CC; --foot-muted: #9C9586; --input-bg: #121624;
  color-scheme: dark;
}

/* Language switching: only the active language is shown */
html[lang="ar"] [data-l="en"], html[lang="en"] [data-l="ar"] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-ar); font-size: 17px; line-height: 1.75; }
html[lang="en"] body { font-family: var(--f-en); font-size: 16.5px; line-height: 1.6; }
[lang="en"] { font-family: var(--f-en); }
[lang="ar"] { font-family: var(--f-ar); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 22px; }
.muted { color: var(--muted); }
.num { font-family: var(--f-en); font-variant-numeric: tabular-nums; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--btn-bg); color: var(--btn-text); padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { top: 12px; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; }
.mark { width: 26px; height: 26px; flex: none; background: var(--ink); border-radius: 5px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.mark::after { content: ""; position: absolute; inset: auto 0 0 0; height: 11px; background: var(--sand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M3 12V8h3V5h3V2h6v3h3v3h3v4z'/%3E%3C/svg%3E") repeat-x bottom / 13px 11px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M3 12V8h3V5h3V2h6v3h3v3h3v4z'/%3E%3C/svg%3E") repeat-x bottom / 13px 11px; }
.nav { display: flex; gap: 20px; margin-inline-start: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--text); }
.lang-toggle { font: inherit; font-size: 14px; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.lang-toggle:hover { border-color: var(--muted); }
@media (max-width: 760px) { .nav { display: none; } .lang-toggle { margin-inline-start: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 16px; background: var(--btn-bg); color: var(--btn-text); border: 0; border-radius: 8px; padding: 13px 22px; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn:hover { filter: brightness(1.12); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Hero */
.hero { background: var(--surface); padding: 64px 0 72px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); margin-bottom: 18px; }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 34em; margin-bottom: 28px; }
html[lang="en"] .hero .lede { font-size: 18px; }
.terms-row { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.terms-row li { padding: 14px 0 0; padding-inline-end: 28px; margin-inline-end: 28px; border-inline-end: 1px solid var(--line); }
.terms-row li:last-child { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; }
.terms-row b { display: block; font-size: 22px; font-weight: 600; }
.terms-row span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 880px) { .hero-in { grid-template-columns: 1fr; gap: 44px; } .hero { padding: 44px 0 56px; } }
@media (max-width: 480px) { .terms-row li { padding-inline-end: 14px; margin-inline-end: 14px; } .terms-row b { font-size: 19px; } }

/* Report cover preview (stays paper-colored in both themes: it is a picture of the PDF) */
.doc { margin: 0; position: relative; max-width: 360px; justify-self: center; width: 100%; }
.doc-stack { position: relative; }
.doc-back { position: absolute; inset: 14px -14px -14px 14px; background: #FFFFFF; border: 1px solid #E2D6C7; border-radius: 4px; }
html[dir="rtl"] .doc-back { inset: 14px 14px -14px -14px; }
.doc-sheet { position: relative; background: #F4ECE2; border: 1px solid #D8CBB9; border-radius: 4px; overflow: hidden; color: #1C2541; }
.doc-sky { background: #1C2541; color: #F4ECE2; padding: 22px 22px 26px; }
.doc-kind { color: #B98B5E; font-size: 12.5px; font-weight: 500; margin-bottom: 8px; }
.doc-title { color: #FFFFFF; font-weight: 600; font-size: 20px; line-height: 1.4; }
.doc-parapet { height: 12px; background-color: #1C2541; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M3 12V8h3V5h3V2h6v3h3v3h3v4z' fill='%23F4ECE2'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: bottom; background-size: 24px 12px; }
.doc-wall { padding: 18px 18px 20px; }
.doc-verdict { background: #FFFFFF; border-top: 5px solid #2C7A57; padding: 12px 14px 12px; }
.doc-v-row { display: flex; justify-content: space-between; align-items: center; }
.doc-tag { background: #E2F0E8; color: #2C7A57; font-weight: 600; font-size: 14px; padding: 2px 10px; }
.doc-score { font-family: var(--f-en); font-weight: 600; font-size: 22px; color: #1C2541; direction: ltr; }
.doc-score small { font-size: 11px; font-weight: 400; color: #4E5775; }
.doc-meter { height: 5px; background: #F4ECE2; margin-top: 10px; }
.doc-meter span { display: block; height: 100%; width: 71%; background: #2C7A57; }
.doc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); background: #FFFFFF; margin-top: 12px; border-top: 2px solid #1C2541; }
.doc-kpis div { padding: 9px 10px 8px; border-inline-start: 1px solid #E2D6C7; }
.doc-kpis div:first-child { border-inline-start: 0; }
.doc-kpis b { display: block; font-family: var(--f-en); font-size: 15px; font-weight: 600; direction: ltr; text-align: start; color: #1C2541; }
html[dir="rtl"] .doc-kpis b { text-align: right; }
.doc-kpis span { display: block; font-size: 10.5px; color: #4E5775; line-height: 1.4; }
@media (max-width: 480px) { .doc { max-width: 300px; } .doc-back { inset: 9px -9px -9px 9px; } html[dir="rtl"] .doc-back { inset: 9px 9px -9px -9px; } }
.doc figcaption { margin-top: 26px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* Content blocks */
.block { padding: 76px 0; }
.block.alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.block-head { max-width: 640px; margin-bottom: 36px; }
.block-head h2 { font-size: clamp(25px, 3.2vw, 34px); }
.block-head p { color: var(--muted); font-size: 17.5px; margin: 0; }
@media (max-width: 600px) { .block { padding: 54px 0; } }

/* How it works: a true sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 0 0 0; padding-inline-end: 28px; margin-inline-end: 28px; border-inline-end: 1px solid var(--line); }
.steps li:last-child { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; }
.steps li::before { content: counter(s); display: block; font-family: var(--f-en); font-weight: 600; font-size: 15px; color: var(--accent); margin-bottom: 10px; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .steps li { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* What's inside: mirrors the report's own table of contents */
.toc { list-style: none; margin: 0; padding: 0; max-width: 760px; border-top: 2px solid var(--text); }
.toc li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.toc .n { font-family: var(--f-en); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.toc b { display: block; font-weight: 600; font-size: 17.5px; }
.toc span.d { display: block; color: var(--muted); font-size: 15.5px; }

/* Is / isn't */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.two h3 { font-size: 19px; padding-bottom: 10px; border-bottom: 2px solid var(--text); }
.two ul { margin: 0; padding-inline-start: 20px; }
.two li { margin-bottom: 10px; }
.two .not li::marker { content: "×  "; color: var(--danger); }
.two .yes li::marker { content: "✓  "; color: var(--ok); }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; gap: 32px; } }

/* Order form */
.order-grid { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
@media (max-width: 880px) { .order-grid { grid-template-columns: 1fr; gap: 32px; } }
.stepper { display: flex; gap: 22px; list-style: none; margin: 0 0 26px; padding: 0; font-size: 15px; }
.stepper li { color: var(--muted); padding-bottom: 6px; border-bottom: 2px solid transparent; }
.stepper li[aria-current="step"] { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-size: 14.5px; color: var(--muted); margin: -2px 0 8px; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 0; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 14px; }
.count { color: var(--muted); font-family: var(--f-en); font-variant-numeric: tabular-nums; }
.count.over { color: var(--danger); }
.err { color: var(--danger); font-size: 14.5px; margin-top: 6px; }
.err:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.check input { width: 20px; height: 20px; margin-top: 5px; flex: none; accent-color: var(--ink); }
.form-alert { background: var(--danger-tint); color: var(--danger); border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 15px; }
.form-alert:empty { display: none; }
.notice { background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 14px 16px; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.summary { border-top: 2px solid var(--text); padding-top: 14px; }
.summary dl { margin: 0; }
.summary dt { color: var(--muted); font-size: 14px; }
.summary dd { margin: 0 0 14px; font-weight: 600; overflow-wrap: anywhere; }
.price { font-family: var(--f-en); font-size: 30px; font-weight: 600; }
.pay-box { max-width: 420px; }
.mysr-form { margin-top: 6px; }
.secure { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* FAQ */
.faq { max-width: 760px; border-top: 2px solid var(--text); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 17.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-en); color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 18px; color: var(--muted); max-width: 640px; }

/* Footer with the Najdi parapet edge */
.foot { position: relative; background: var(--foot-bg); color: var(--foot-text); padding: 46px 0 34px; margin-top: 14px; font-size: 15px; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 14px; background: var(--foot-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M3 12V8h3V5h3V2h6v3h3v3h3v4z'/%3E%3C/svg%3E") repeat-x bottom / 28px 14px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M3 12V8h3V5h3V2h6v3h3v3h3v4z'/%3E%3C/svg%3E") repeat-x bottom / 28px 14px; }
.foot a { color: var(--foot-text); }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.foot h2 { font-size: 15px; color: var(--foot-muted); font-weight: 500; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 6px; }
.foot .fine { color: var(--foot-muted); font-size: 13.5px; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(233, 224, 211, .16); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; gap: 24px; } }

/* Thank-you and legal pages */
.page { padding: 56px 0 80px; }
.page .wrap { max-width: 760px; }
.status-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-en); font-size: 26px; font-weight: 600; margin-bottom: 18px; }
.status-ok { background: var(--ok-tint); color: var(--ok); }
.status-bad { background: var(--danger-tint); color: var(--danger); }
.status-wait { background: var(--surface); color: var(--accent); }
.legal h1 { font-size: clamp(27px, 3.6vw, 36px); }
.legal .updated { color: var(--muted); font-size: 14.5px; margin-bottom: 30px; }
.legal h2 { font-size: 19px; margin-top: 34px; }
.legal li { margin-bottom: 8px; }
.legal .note { background: var(--surface); border-radius: 8px; padding: 14px 16px; font-size: 15px; color: var(--muted); margin-top: 34px; }
