/* SolisLex landing — founder brand: navy #072F53, bronze #B19373, slate #8A939C,
   IBM Plex Sans Arabic only, canvas 28 → card 20 → block 14 → controls pill,
   one navy block per page, flat surfaces, Western digits. */

:root {
  color-scheme: light;

  --navy: #072F53;
  --navy-800: #0D3A63;
  --navy-600: #1D5A88;
  --navy-500: #3574A3;
  --navy-100: #DCEAF3;
  --navy-50: #F4F8FA;

  --bronze: #B19373;
  --bronze-800: #74593D;
  --bronze-700: #8A6A4A;
  --bronze-300: #D9BFA0;
  --bronze-100: #F0E6D8;
  --bronze-50: #FAF6F1;

  --ink: #23262B;
  --ink-2: #3F454A;
  --muted: #5B6369;
  --line: #D6DADE;
  --line-soft: #E9ECEE;
  --paper: #F5F6F7;
  --white: #FFFFFF;

  --ok: #1E7A56;
  --ok-tint: #EAF6F0;
  --ok-line: #CBEADB;
  --warn-text: #8A5A14;
  --warn-tint: #FBF3E7;
  --warn-line: #F0DBB8;
  --danger: #B3261E;
  --danger-tint: #FBEDEC;

  --r-canvas: 28px;
  --r-card: 20px;
  --r-block: 14px;
  --pill: 999px;

  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: 24px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.85 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: var(--pill);
  text-decoration: none; font-size: 15px;
}
.skip:focus { top: 12px; }

/* ───────── buttons & links ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--pill);
  padding: 11px 22px;
  font: 500 15px/1.2 var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, filter .15s ease;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-800); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper); color: var(--navy); }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn[disabled] { filter: saturate(.4) brightness(1.25); cursor: progress; }

.textlink {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--navy-600);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.textlink:hover { color: var(--navy); }

/* ───────── header ───────── */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__in { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { width: 136px; }
.topnav { display: flex; gap: 26px; margin-inline-end: auto; }
.topnav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.topnav a:hover { color: var(--navy); text-decoration: underline; }
.topbar__actions { display: flex; gap: 10px; }

/* ───────── shared section type ───────── */

.section { padding-block: clamp(56px, 7vw, 96px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h2 {
  font-size: clamp(1.75rem, 1.15rem + 1.7vw, 2.4rem);
  line-height: 1.4;
  color: var(--navy);
}
h3 { font-size: 19px; line-height: 1.5; color: var(--ink); }
.section-lede { margin: 14px 0 0; max-width: 34em; color: var(--ink-2); font-size: 18px; }

.canvas {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-canvas);
  padding: clamp(28px, 5vw, 64px);
}

/* ───────── hero ───────── */

.hero { padding-block: 8px clamp(40px, 6vw, 72px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 1.15rem + 3.4vw, 3.6rem);
  line-height: 1.32;
  color: var(--navy);
  max-width: 11.5em;
}
.lede { margin: 22px 0 0; max-width: 33em; font-size: 19px; line-height: 1.9; color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 34px; }
.hero__cta .textlink { font-size: 16px; }
.hero__note {
  margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft);
  max-width: 33em; font-size: 15px; color: var(--muted);
}

/* the message → confirmation card demo */
.demo { margin: 0; }
.demo__panel {
  background: var(--paper);
  border-radius: var(--r-card);
  padding: 20px 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.demo__bar { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.demo__avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: var(--navy); display: grid; place-items: center;
}
.demo__avatar::before { content: ""; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.demo__who { line-height: 1.4; }
.demo__who strong { display: block; font-size: 15px; font-weight: 600; color: var(--navy); }
.demo__who span { font-size: 13px; color: var(--muted); }

.msg {
  align-self: flex-end;
  max-width: 88%;
  margin: 4px 0 0;
  padding: 11px 16px 8px;
  background: var(--navy-100);
  color: var(--navy);
  border-radius: var(--r-block);
  border-end-end-radius: 4px;
  font-size: 15.5px; line-height: 1.85;
}
.msg__time { display: block; text-align: end; font-size: 12px; color: var(--navy-600); margin-top: 2px; }

.card {
  align-self: flex-start;
  width: min(100%, 430px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-block);
  padding: 16px 18px 18px;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card__title { font-size: 15px; font-weight: 600; color: var(--navy); }
.card__fields { margin: 0; }
.card__fields > div {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px;
  padding: 9px 6px; margin-inline: -6px;
  border-top: 1px solid var(--line-soft);
  border-radius: 8px;
}
.card__fields dt { font-size: 13px; color: var(--muted); padding-top: 2px; }
.card__fields dd { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.card__fields .hijri { display: block; font-size: 13px; color: var(--muted); }
.num { font-family: var(--mono); font-weight: 500; font-size: .9em; letter-spacing: 0; }
.card__actions { display: flex; gap: 8px; margin-top: 14px; transition: opacity .3s ease; }
.card__hint { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.card__done { margin: 14px 0 0; font-size: 14.5px; color: var(--ok); }
.card__done .textlink { font-size: 13.5px; margin-inline-start: 8px; }

.chip {
  display: inline-flex; align-items: center; flex: none;
  border: 1px solid; border-radius: var(--pill);
  padding: 2px 11px; font-size: 12.5px; font-weight: 500; line-height: 1.7;
}
.chip--draft { background: var(--warn-tint); color: var(--warn-text); border-color: var(--warn-line); }
.chip--ok { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-line); }

.demo figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* one orchestrated moment: the card's fields arrive one by one */
.card.is-filling .card__fields > div { opacity: 0; }
.card.is-filling .card__fields > div.is-in { opacity: 1; animation: field-in 1.5s ease-out; }
.card.is-filling:not(.is-ready) .card__actions { opacity: 0; }
@keyframes field-in {
  0% { opacity: 0; background-color: var(--bronze-50); }
  15% { opacity: 1; background-color: var(--bronze-50); }
  100% { background-color: transparent; }
}

/* ───────── how it works ───────── */

.steps {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.steps li { padding-top: 18px; border-top: 2px solid var(--line); }
.steps li.is-yours { border-top-color: var(--bronze); }
.steps__n {
  display: block; margin-bottom: 12px;
  font-size: 46px; font-weight: 300; line-height: 1;
  color: var(--bronze-700); font-variant-numeric: tabular-nums;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; font-size: 16px; color: var(--ink-2); }

/* ───────── research (the page's one navy block) ───────── */

.navy {
  background: var(--navy);
  color: #E3EBF2;
  border-radius: var(--r-canvas);
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.navy h2 { color: #fff; }
.navy__copy > p { margin: 16px 0 0; font-size: 18px; color: #C9D7E3; max-width: 30em; }
.diamonds { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.diamonds li { position: relative; padding-inline-start: 26px; font-size: 16px; }
.diamonds li::before {
  content: ""; position: absolute; inset-inline-start: 3px; top: .72em;
  width: 8px; height: 8px; background: var(--bronze); transform: rotate(45deg);
}
.navy .diamonds li { color: #DCE6EF; }
.navy .diamonds li::before { background: var(--bronze-300); }

.answer { margin: 0; background: var(--white); color: var(--ink); border-radius: var(--r-card); padding: 22px 24px 24px; }
.answer__label { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.answer__q {
  margin: 0; padding: 12px 16px; border-radius: var(--r-block);
  background: var(--paper); font-size: 15.5px; font-weight: 500; color: var(--ink);
}
.answer__a { margin: 16px 0 14px; font-size: 16px; line-height: 1.9; }
.quote {
  margin: 0; padding: 14px 18px 12px;
  background: var(--bronze-50);
  border-inline-start: 3px solid var(--bronze);
  border-radius: var(--r-block);
  border-start-start-radius: 4px;
  border-end-start-radius: 4px;
}
.quote p { margin: 0 0 4px; font-size: 14.5px; line-height: 1.95; color: var(--ink-2); }
.quote .gap { color: var(--muted); }
.quote footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bronze-100);
  font-size: 13.5px;
}
.quote cite { font-style: normal; font-weight: 600; color: var(--bronze-800); }
.answer__check { margin: 14px 0 0; }

/* ───────── library index ───────── */

.library__grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.library__intro { position: sticky; top: calc(var(--header-h) + 24px); }
.toc { max-width: 560px; }
.toc__head, .toc li, .toc__total { display: flex; align-items: baseline; gap: 12px; }
.toc__head { font-size: 13.5px; color: var(--muted); padding-bottom: 6px; }
.toc__head span:first-child { flex: 1; }
.toc h3 {
  margin: 22px 0 4px; font-size: 15px; font-weight: 600; color: var(--bronze-800);
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { padding: 6px 0; font-size: 17px; }
.toc__dots { flex: 1; min-width: 24px; border-bottom: 2px dotted var(--line); transform: translateY(-6px); }
.toc__n { min-width: 3.2ch; text-align: start; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--navy); }
.toc__total {
  margin-top: 18px; padding-top: 12px; border-top: 2px solid var(--navy);
  font-weight: 600; color: var(--navy);
}
.toc__total .toc__dots { border-bottom-color: var(--navy-100); }
.library__note { margin: 16px 0 0; font-size: 15px; color: var(--muted); max-width: 30em; }

/* ───────── office ───────── */

.office__list {
  margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 44px;
}
.office__list > div { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.office__list dt { font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.office__list dd { margin: 0; font-size: 16px; color: var(--ink-2); }

/* ───────── confidentiality ───────── */

.trust {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
  padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line);
}
.trust .diamonds { margin-top: 6px; gap: 18px; }
.trust .diamonds li { font-size: 17px; color: var(--ink-2); max-width: 36em; }

/* ───────── registration ───────── */

.register__grid {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.register__intro > p { margin: 16px 0 0; font-size: 18px; color: var(--ink-2); max-width: 26em; }
.next { list-style: none; counter-reset: step; padding: 0; margin: 30px 0 0; max-width: 26em; }
.next li {
  counter-increment: step;
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line-soft);
  font-size: 16px; color: var(--ink-2);
}
.next li::before { content: counter(step); font-weight: 600; color: var(--bronze-700); font-variant-numeric: tabular-nums; }
.register__login { margin: 24px 0 0; font-size: 15.5px; color: var(--muted); }

.form { position: relative; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; align-content: start; }
.field label, .choices legend { font-size: 15px; font-weight: 500; color: var(--ink); }
.opt { font-weight: 400; font-size: 13.5px; color: var(--muted); }

.input {
  width: 100%; min-height: 50px;
  padding: 10px 20px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--white); color: var(--ink);
  font: 400 16px/1.5 var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #8A939C; }
.input:hover { border-color: #C3C9CE; }
.input:focus-visible { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px var(--navy-100); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px var(--danger-tint); }
.input--ltr { direction: ltr; text-align: right; }
.input--ltr::placeholder { text-align: right; }
textarea.input { border-radius: var(--r-block); min-height: 104px; resize: vertical; padding-block: 12px; line-height: 1.8; }
select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-inline-end: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23072F53' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 20px center;
}
.field__error { margin: 0; font-size: 14px; color: var(--danger); }
.field__error:empty { display: none; }

.choices { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 9px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pill > span {
  display: inline-block; padding: 8px 17px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--white); font-size: 15px; color: var(--ink-2); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pill > span:hover { border-color: #A6AEB5; }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input[type="checkbox"]:checked + span { background: var(--navy-100); border-color: var(--navy-500); color: var(--navy); }
.pill input:focus-visible + span { outline: 2px solid var(--navy-500); outline-offset: 2px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.consent {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start;
  margin: 4px 0 6px; font-size: 15px; line-height: 1.8; color: var(--ink-2); cursor: pointer;
}
.consent input { width: 18px; height: 18px; margin: 5px 0 0; accent-color: var(--navy); cursor: pointer; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.form__status { margin: 0; font-size: 15px; color: var(--danger); }
.form__status:empty { display: none; }

.done {
  border: 1px solid var(--ok-line); background: var(--ok-tint);
  border-radius: var(--r-card); padding: 28px 28px 30px;
}
.done:focus { outline: none; }
.done h3 { color: var(--ok); font-size: 22px; }
.done p { margin: 10px 0 0; color: var(--ink-2); font-size: 16.5px; }
.done .done__contact { margin-top: 4px; font-weight: 500; color: var(--ink); line-height: 1.7; }
.done__contact bdi { direction: ltr; overflow-wrap: anywhere; }
.done .ref { font-family: var(--mono); font-weight: 500; color: var(--ink); direction: ltr; unicode-bidi: isolate; }

/* ───────── FAQ ───────── */

.faq__grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 72px); align-items: start;
}
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 18px 0; font-size: 17.5px; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 24px; font-weight: 300; line-height: 1; color: var(--bronze-700); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--navy); }
.faq details p { margin: 0 0 20px; max-width: 36em; color: var(--ink-2); font-size: 16.5px; }

/* ───────── footer ───────── */

.foot { border-top: 1px solid var(--line); padding-block: 40px 48px; font-size: 15px; color: var(--muted); }
.foot__grid { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; }
.foot__brand { display: flex; align-items: center; gap: 18px; margin-inline-end: auto; }
.foot__brand img { width: 112px; }
.foot__brand p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--navy); text-decoration: underline; }
.foot__copy { margin: 0; width: 100%; font-size: 13.5px; }

/* ───────── prose pages (privacy, 404) ───────── */

.prose { max-width: 720px; }
.prose h1 { font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.6rem); line-height: 1.4; color: var(--navy); }
.prose .meta { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.prose h2 { font-size: 21px; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-inline-start: 22px; }
.brand--solo img { width: 136px; }
.prose h1.spaced { margin-top: 40px; }

/* ───────── responsive ───────── */

@media (max-width: 1040px) {
  .br-wide { display: none; }
  .library__intro { position: static; }
  .topnav { display: none; }
  .hero__grid, .navy, .library__grid, .register__grid, .faq__grid, .trust { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .office__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { max-width: 13em; }
  .card { width: min(100%, 460px); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
  body { font-size: 16px; }
  .brand img { width: 112px; }
  .topbar__in { gap: 12px; }
  .topbar__actions { margin-inline-start: auto; gap: 6px; }
  .topbar__actions .btn { padding: 8px 14px; font-size: 14px; }
  .canvas { border-radius: var(--r-card); padding: 26px 18px; }
  .navy { border-radius: var(--r-card); padding: 28px 18px; }
  .demo__panel { padding: 16px 14px 18px; }
  .answer { padding: 18px 16px 20px; }
  .lede { font-size: 17.5px; }
  .hero__cta .btn { width: 100%; }
  .steps, .office__list, .row { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 28px; }
  .msg { max-width: 94%; }
  .card__fields > div { grid-template-columns: 62px minmax(0, 1fr); }
  .form__foot .btn { width: 100%; }
  .foot__brand { width: 100%; }
}

@media (max-width: 340px) {
  .topbar__actions .btn--ghost { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
