/*
 * Hijrafy website. Brand: docs/02-brand-identity.md and brand/tokens.json.
 * Maghrib is the one accent: the mark's disc, today, special days, the badge. Never a button.
 * The install button is the page's main action: the brightest thing on every screen.
 */
:root {
  --night: #0B1626;
  --dusk: #1C2B44;
  --maghrib: #E8834A;
  --ember: #A9481A;
  --moon: #EEF1F6;
  --paper: #FFFFFF;
  --mist: #8A96A8;
  --slate: #5A6678;
  --earth: #0A1424;

  --bg: var(--paper);
  --bg-alt: #F4F6F9;
  --card: var(--paper);
  --text: var(--night);
  --soft: #2C3848;
  --quiet: var(--slate);
  --line: rgba(11, 22, 38, 0.1);
  --accent-text: var(--ember);
  --focus: var(--ember);
  --shadow: 0 1px 2px rgba(11, 22, 38, 0.06), 0 12px 32px rgba(11, 22, 38, 0.08);
  --underline: rgba(110, 122, 140, 0.95);
  --btn-bg: var(--night);
  --btn-text: var(--moon);

  --font-ui: 'Hijrafy Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Hijrafy Manrope', 'Hijrafy Inter', system-ui, sans-serif;
  --font-ar: 'Hijrafy GESS', 'Hijrafy Kufi', 'Hijrafy Inter', sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--night);
    --bg-alt: #0F1C30;
    --card: #13223A;
    --text: var(--moon);
    --soft: #C9D1DE;
    --quiet: var(--mist);
    --line: rgba(238, 241, 246, 0.1);
    --accent-text: var(--maghrib);
    --focus: var(--maghrib);
    --shadow: 0 0 0 1px rgba(238, 241, 246, 0.06), 0 16px 40px rgba(0, 0, 0, 0.35);
    --underline: rgba(163, 174, 192, 0.9);
    --btn-bg: var(--moon);
    --btn-text: var(--night);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
.i18n-pending body { visibility: hidden; animation: reveal 0s 1.2s forwards; }
@keyframes reveal { to { visibility: visible; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font-ui); -webkit-font-smoothing: antialiased; }
html[lang=ar] body { font-family: var(--font-ar); line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
html[lang=ar] h1, html[lang=ar] h2, html[lang=ar] h3 { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: 0; z-index: 40; padding: 10px 14px; border-radius: 8px; background: var(--moon); color: var(--night); font-weight: 600; text-decoration: none; white-space: nowrap; transform: translateY(calc(-100% - 8px)); }
.skip:focus { transform: translateY(12px); }
.noscript { color: var(--quiet); font-size: 15px; }
.section-title { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; text-align: center; }
html[lang=ar] .section-title { line-height: 1.5; }
.section-lead { margin-top: 10px; text-align: center; color: var(--quiet); font-size: 17px; }
.fine { margin-top: 18px; text-align: center; color: var(--quiet); font-size: 13px; }

/* ---------- buttons: install is the main action ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 14px; font: 600 16px/1.2 var(--font-ui); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
html[lang=ar] .btn { font-family: var(--font-ar); }
.btn-primary { background: var(--moon); color: var(--night); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 24px rgba(0, 0, 0, 0.25); }
.btn-primary:hover { background: var(--paper); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 30px rgba(0, 0, 0, 0.3); }
.btn-dark { background: var(--btn-bg); color: var(--btn-text); }
.btn-dark:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; border-radius: 11px; }
.btn-xl { min-height: 64px; padding: 16px 30px; font-size: 19px; border-radius: 18px; font-weight: 700; }
.btn-mark { flex: none; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--night); color: var(--moon); border-bottom: 1px solid rgba(238, 241, 246, 0.08); }
.top-in { display: flex; align-items: center; gap: 22px; height: 68px; }
.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--moon); direction: ltr; }
.lockup .mark { margin-right: 2px; }
.lk-en { font: 800 19px/1 var(--font-display); letter-spacing: -0.3px; }
.lk-ar { font: 700 18.24px/1 var(--font-ar); }
.lk-div { width: 1px; height: 19px; background: rgba(238, 241, 246, 0.22); }
.nav { display: flex; gap: 24px; margin-inline-start: auto; }
.nav a { display: flex; align-items: center; min-height: 44px; color: var(--mist); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--moon); }
.lang { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--mist); text-decoration: none; font: 600 14px/1 var(--font-ar); }
.lang:lang(en) { font-family: var(--font-ui); }
.lang:hover { color: var(--moon); background: rgba(238, 241, 246, 0.06); }
@media (max-width: 860px) { .nav { display: none; } .lang { margin-inline-start: auto; } }
@media (max-width: 420px) { .top .lk-ar, .top .lk-div { display: none; } .top-in { gap: 10px; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--moon); background: var(--night) url(img/background-horizon.svg) center calc(100% + 170px) / max(1600px, 100%) auto no-repeat; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: center; padding-top: 88px; padding-bottom: 150px; }
.hero h1 { font-size: clamp(42px, 6vw, 74px); line-height: 1.02; letter-spacing: -0.04em; }
html[lang=ar] .hero h1 { font-size: clamp(42px, 5.8vw, 70px); line-height: 1.35; }
.lead { margin-top: 18px; font-size: 21px; color: #C3CBD8; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 36px; }
.try-link { color: #C3CBD8; text-decoration: underline; text-decoration-color: rgba(195, 203, 216, 0.4); text-underline-offset: 4px; }
.try-link:hover { color: var(--moon); }
.cta-note { margin-top: 14px; color: var(--mist); font-size: 14px; }

/* The today card: Gregorian date, and its Hijri date rising under it */
.today-card { padding: 26px 26px 22px; border-radius: 24px; background: linear-gradient(180deg, #1C2B44, #15243C); box-shadow: 0 0 0 1px rgba(238, 241, 246, 0.08), 0 30px 80px rgba(0, 0, 0, 0.45); }
.tc-label { color: #A3AEC0; font-size: 13px; font-weight: 600; }
.tc-greg { margin-top: 6px; font: 700 22px/1.3 var(--font-display); }
html[lang=ar] .tc-greg { font: 700 22px/1.6 var(--font-ar); }
.tc-greg-text { text-decoration: underline dotted rgba(163, 174, 192, 0.9); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tc-hijri { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--night); }
.tc-moon { flex: none; }
.tc-wd { color: var(--mist); font-size: 13px; }
.tc-date { font: 800 24px/1.2 var(--font-display); letter-spacing: -0.02em; }
html[lang=ar] .tc-date { font: 700 24px/1.55 var(--font-ar); letter-spacing: 0; }
.tc-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--maghrib); font-size: 14px; font-weight: 600; }
.tc-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--maghrib); }
.tc-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: #A3AEC0; font-size: 14px; }
.tc-pick input { min-height: 40px; padding: 6px 10px; border: 1px solid rgba(238, 241, 246, 0.16); border-radius: 10px; background: transparent; color: var(--moon); color-scheme: dark; }
.tc-pick input:focus { outline: 2px solid var(--maghrib); outline-offset: 2px; }
.tc-msg { margin-top: 8px; color: var(--mist); font-size: 13px; }
.tc-msg:empty { display: none; }
/* Without JavaScript there is no live date to show: only the note */
html:not(.js) .tc-label, html:not(.js) .tc-greg, html:not(.js) .tc-hijri, html:not(.js) .tc-pick { display: none; }
.js .tc-hijri { animation: rise .7s .25s both cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 960px) {
  .hero { background-position: center calc(100% + 60px); }
  .hero-in { grid-template-columns: 1fr; gap: 44px; padding-top: 56px; padding-bottom: 120px; }
  .today-card { max-width: 440px; }
}

/* ---------- try it ---------- */
.try { background: var(--bg-alt); padding: 88px 0 72px; }
.try-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.try-head { position: sticky; top: 108px; }
.try-head h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; }
html[lang=ar] .try-head h2 { line-height: 1.5; }
.try-head p { margin-top: 10px; color: var(--soft); font-size: 18px; }
.segmented { display: inline-flex; gap: 3px; margin-top: 24px; padding: 4px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.segmented button { min-height: 40px; padding: 6px 18px; border: 0; border-radius: 10px; background: transparent; color: var(--quiet); font-size: 15px; cursor: pointer; }
.segmented button[aria-pressed=true] { background: var(--text); color: var(--bg); font-weight: 600; }
.mail { padding: 34px 40px 28px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); font-size: 17px; line-height: 1.75; }
.mail h3 { font: 600 22px/1.3 var(--font-ui); letter-spacing: -0.01em; }
html[lang=ar] .mail h3 { font-family: var(--font-ar); font-size: 21px; }
.mail-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 8px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--quiet); font-size: 14px; }
.mail-meta b { color: var(--text); font-weight: 600; }
.mail p + p { margin-top: 10px; }
.mail table { margin-top: 16px; border-collapse: collapse; font-size: 16px; }
.mail th, .mail td { padding: 8px 28px 8px 0; border-bottom: 1px solid var(--line); text-align: start; }
html[dir=rtl] .mail th, html[dir=rtl] .mail td { padding: 8px 0 8px 28px; }
.mail th { font-weight: 600; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 40px; padding: 22px 26px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cta-band p { font: 700 20px/1.35 var(--font-display); letter-spacing: -0.01em; }
html[lang=ar] .cta-band p { font: 700 19px/1.6 var(--font-ar); }
@media (max-width: 900px) { .try-in { grid-template-columns: 1fr; gap: 28px; } .try-head { position: static; } }

/* A date found by the engine */
.hd { white-space: nowrap; text-decoration: underline dotted var(--underline); text-decoration-thickness: 1.5px; text-underline-offset: 3px; border-radius: 4px; cursor: pointer; }
.hd.hint { animation: hint 1.8s ease-in-out 3; }
@keyframes hint { 50% { background: rgba(232, 131, 74, 0.16); box-shadow: 0 0 0 4px rgba(232, 131, 74, 0.16); } }
.inline .hd { text-decoration: none; cursor: text; }
.inline .hd::after { content: '\00a0\00b7\00a0' attr(data-h); opacity: 0.62; white-space: nowrap; -webkit-user-select: none; user-select: none; }
.inline .hd[data-special]::after { opacity: 1; color: var(--accent-text); font-weight: 600; }

/* The tooltip, as drawn by the extension (a still copy sits in the first feature card) */
.tip { position: fixed; left: 0; top: 0; z-index: 30; min-width: 240px; max-width: min(320px, calc(100vw - 16px)); padding: 14px 16px; border-radius: 14px;
  background: var(--night); color: var(--moon); font: 13px/1.35 var(--font-ui); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 16px 40px rgba(11, 22, 38, 0.32);
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.tip.show { opacity: 1; transform: none; }
.tip.static { position: relative; opacity: 1; transform: none; }
.tip[dir=rtl] { font-family: var(--font-ar); }
.tip .caret { position: absolute; top: -6px; left: var(--cx, 24px); width: 12px; height: 12px; background: var(--night); transform: rotate(45deg); }
.tip.above .caret { top: auto; bottom: -6px; }
.tip .row { display: flex; align-items: center; gap: 12px; }
.tip .wd { font-size: 12px; color: var(--mist); }
.tip .date { font: 700 18px/1.25 var(--font-display); white-space: nowrap; }
.tip[dir=rtl] .date { font: 700 19px/1.5 var(--font-ar); }
.tip .labels { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dusk); display: flex; flex-direction: column; gap: 8px; }
.tip .label { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 600; }
.tip .name { display: flex; align-items: center; gap: 8px; }
.tip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--maghrib); flex: none; }
.tip .ar { font: 600 15px var(--font-ar); color: var(--maghrib); }
.tip .tnote { margin-top: 8px; font-size: 12px; color: var(--mist); }

/* ---------- why the Hijri date: dark, large, and ending on the horizon ---------- */
.why { position: relative; overflow: hidden; color: var(--moon); padding: 112px 0 0;
  background: var(--night) url(img/background-horizon.svg) center bottom / max(1600px, 100%) auto no-repeat; }
.why-in { max-width: 920px; }
.why-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.035em; text-align: center; }
html[lang=ar] .why-title { line-height: 1.45; }
.statements { margin: 64px 0 0; padding: 0; list-style: none; }
.statements li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px 0; border-top: 1px solid rgba(238, 241, 246, 0.1); }
.statements li:last-child { border-bottom: 1px solid rgba(238, 241, 246, 0.1); }
.st-moon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: rgba(238, 241, 246, 0.04); box-shadow: 0 0 0 1px rgba(238, 241, 246, 0.08); }
.st-moon svg { width: 60px; height: 60px; }
.statements h3 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
html[lang=ar] .statements h3 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.5; }
.statements p { margin-top: 8px; color: #B5BFCE; font-size: 17px; }
/* each statement rises in with its moon */
.statements li.st-wait > div { opacity: .35; transform: translateY(6px); transition: opacity .6s ease, transform .6s ease; }
.statements li.st-on > div { opacity: 1; transform: none; }
.quote { margin: 96px auto 0; max-width: 820px; text-align: center; }
.quote blockquote { margin: 0; }
.q-ar { font: 700 clamp(24px, 3.4vw, 38px)/1.7 var(--font-ar); text-wrap: balance; }
.q-en { margin-top: 12px; color: #C3CBD8; font: italic 500 clamp(17px, 2vw, 21px)/1.5 var(--font-ui); }
html[lang=ar] .q-en { display: none; }
.quote figcaption { margin-top: 20px; font-size: 16px; }
.quote figcaption::before { content: ''; display: inline-block; width: 28px; height: 2px; margin-inline-end: 12px; vertical-align: middle; background: var(--maghrib); }
.q-who { font-weight: 700; }
.why-close { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 120px 0 112px; text-align: center; }
.why-close p { font: 700 clamp(20px, 2.4vw, 26px)/1.4 var(--font-display); letter-spacing: -0.015em; color: var(--moon); }
html[lang=ar] .why-close p { font: 700 clamp(20px, 2.4vw, 26px)/1.7 var(--font-ar); }
@media (max-width: 600px) {
  .why { padding-top: 80px; background-position: center calc(100% + 40px); }
  .statements { margin-top: 40px; }
  .statements li { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
  .st-moon { width: 56px; height: 56px; }
  .st-moon svg { width: 44px; height: 44px; }
  .statements p { font-size: 15px; }
  .quote { margin-top: 64px; }
  .why-close { padding: 88px 0 80px; }
  .why-close .btn { width: 100%; }
}

/* ---------- features: four live pieces ---------- */
.features { padding: 24px 0 80px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.card h3 { margin: 20px 22px 0; font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; }
html[lang=ar] .card h3 { font-size: 19px; line-height: 1.6; }
.card p { margin: 6px 22px 24px; color: var(--quiet); font-size: 15px; line-height: 1.5; }
.card-art { position: relative; height: 200px; display: grid; place-items: center; overflow: hidden; background: var(--dusk); color: var(--moon); }
.art-tip { padding: 16px; }
.art-tip .tip { min-width: 0; width: 100%; max-width: 230px; font-size: 12px; }
.art-tip .tip .date { font-size: 16px; }
.big-icon { position: relative; }
.big-icon svg { width: 96px; height: 96px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35)); }
.big-icon .badge { position: absolute; right: -10px; bottom: -8px; min-width: 32px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--maghrib); color: var(--night); font: 800 15px/26px var(--font-ui); text-align: center; }
.art-silent { padding: 18px; align-content: center; gap: 10px; background: var(--night); }
.sil { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(238, 241, 246, 0.06); font-size: 13px; }
.sil b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sil span { color: var(--mist); text-align: end; }
.sil.ok span { color: var(--moon); }
.art-lang { grid-template-columns: minmax(0, 1fr); align-content: center; place-items: stretch; gap: 10px; padding: 18px; }
.lang-chip { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 14px; background: var(--night); }
.lang-chip .moon { flex: none; }
.lang-chip > div { display: flex; flex-direction: column; min-width: 0; }
.lc-wd { color: var(--mist); font-size: 11px; }
.lc-date { font: 700 14px/1.3 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-chip[lang=ar] .lc-date { font: 700 15px/1.5 var(--font-ar); }
.lang-chip[lang=ar] .lc-wd { font-family: var(--font-ar); font-size: 12px; }
.lang-digits { display: flex; gap: 3px; justify-self: center; padding: 3px; border-radius: 10px; background: rgba(238, 241, 246, 0.08); }
.lang-digits span { padding: 3px 12px; border-radius: 8px; color: #A3AEC0; font-size: 13px; font-variant-numeric: tabular-nums; }
.lang-digits .on { background: var(--moon); color: var(--night); font-weight: 700; }
@media (max-width: 1080px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* ---------- your year: a strip of moons ---------- */
.year { background: var(--night); color: var(--moon); padding: 88px 0 80px; }
.year .section-lead, .year .fine { color: var(--mist); }
.moons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 44px 0 0; padding: 0; list-style: none; }
.moons li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px 18px; border-radius: 18px; background: var(--dusk); text-align: center; }
.moons svg { width: 56px; height: 56px; }
.moons .m-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.moons .m-h { color: #C3CBD8; font-size: 14px; }
.moons .m-g { color: var(--mist); font-size: 13px; }
.moons .m-in { margin-top: auto; padding: 4px 10px; border-radius: 999px; background: rgba(238, 241, 246, 0.08); color: var(--moon); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .moons { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: thin; }
  .moons li { flex: 0 0 168px; scroll-snap-align: start; }
}

/* ---------- privacy ---------- */
.privacy { padding: 72px 0; background: var(--bg-alt); }
.privacy-in { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.privacy h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.2; }
html[lang=ar] .privacy h2 { line-height: 1.6; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pills li { padding: 10px 18px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font-weight: 600; font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { padding: 88px 0; }
.faq-in { max-width: 760px; }
.qa { margin-top: 36px; }
.qa details { border-top: 1px solid var(--line); }
.qa details:last-child { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; font-weight: 600; font-size: 18px; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+' / ''; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-alt); color: var(--quiet); font: 400 20px/1 var(--font-ui); }
.qa details[open] summary::after { content: '−' / ''; }
.qa details p { padding: 0 52px 22px 0; color: var(--soft); }
html[dir=rtl] .qa details p { padding: 0 0 22px 52px; }

/* ---------- closing band ---------- */
.launch { color: var(--moon); text-align: center; padding: 340px 0 104px;
  background: url(img/background-horizon-with-mark.svg) center -300px / 1600px 900px no-repeat, linear-gradient(#0E1A2C, var(--earth)) 0 600px / 100% 100% no-repeat, #0E1A2C; }
html[lang=ar] .launch h2[lang=en] { font-family: var(--font-display); letter-spacing: -0.02em; }
.launch-ar { font: 700 clamp(36px, 5vw, 58px)/1.4 var(--font-ar); }
.launch h2 { margin-top: 2px; font-size: clamp(20px, 2.4vw, 28px); color: #C3CBD8; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; }
.launch .btn { margin-top: 32px; }
@media (max-width: 600px) { .launch { padding-top: 220px; background-size: 960px 540px, 100% 100%, auto; background-position: center -170px, 0 370px, 0 0; } }

/* ---------- footer ---------- */
.foot { padding: 32px 0 40px; color: var(--mist); font-size: 14px; background: var(--earth); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-lockup .lk-en { font-size: 15px; }
.foot-lockup .lk-ar { font-size: 14.4px; }
.foot-lockup .lk-div { height: 15px; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { color: var(--mist); text-decoration: none; }
.foot-nav a:hover { color: var(--moon); }
.foot-nav a:lang(ar) { font-family: var(--font-ar); }
.foot-quiet { margin-inline-start: auto; }

/* ---------- install panel ---------- */
.install-panel { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 28px 28px 24px; border: 0; border-radius: 24px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.install-panel::backdrop { background: rgba(11, 22, 38, 0.62); }
.install-panel[open] { animation: pop .22s cubic-bezier(.2, .7, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ip-close-row { display: flex; justify-content: flex-end; margin: -10px -10px 0 0; }
html[dir=rtl] .ip-close-row { margin: -10px 0 0 -10px; }
.ip-close { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--bg-alt); color: var(--quiet); font-size: 24px; line-height: 1; cursor: pointer; }
.ip-mark { color: var(--text); margin-top: -18px; }
.install-panel h2 { margin-top: 14px; font-size: 26px; line-height: 1.2; }
html[lang=ar] .install-panel h2 { line-height: 1.6; }
.ip-lead { margin-top: 4px; color: var(--quiet); }
.ip-steps { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.ip-steps li { display: flex; gap: 14px; align-items: flex-start; }
.ip-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; }
.ip-steps p { padding-top: 3px; font-size: 16px; line-height: 1.5; }
.ip-steps .btn { margin-top: 10px; }
.copy { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt); cursor: pointer; direction: ltr; }
.copy code { font: 500 14px/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.copy-label { padding: 4px 10px; border-radius: 7px; background: var(--card); font-size: 13px; font-weight: 600; }
.ip-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 14px; }

/* ---------- phones: a bar at the bottom ---------- */
.phone-bar { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--night); color: var(--moon); box-shadow: 0 0 0 1px rgba(238, 241, 246, 0.1), 0 16px 40px rgba(0, 0, 0, 0.4); font-size: 14px; }
html[dir=rtl] .phone-bar { padding: 10px 16px 10px 10px; }
body.has-phone-bar { padding-bottom: 84px; }

@media (max-width: 520px) {
  :root { --gutter: 16px; }
  .hero .btn-xl { width: 100%; }
  .try-link { width: 100%; text-align: center; }
  .try { padding: 80px 0 64px; }
  .mail { padding: 22px 18px; font-size: 16px; }
  .mail th, .mail td { padding-inline-end: 14px; }
  .cta-band { padding: 18px; }
  .cta-band .btn { width: 100%; }
  .faq { padding: 64px 0; }
  .foot-quiet { margin-inline-start: 0; }
}

/* ---------- privacy page ---------- */
.doc { max-width: 760px; padding-top: 64px; padding-bottom: 96px; }
.doc article + article { margin-top: 88px; padding-top: 64px; border-top: 1px solid var(--line); }
.doc article[lang=ar] { font-family: var(--font-ar); line-height: 1.9; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.1; }
.doc article[lang=ar] h1, .doc article[lang=ar] h2 { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; line-height: 1.6; }
.doc-date { margin-top: 10px; color: var(--quiet); font-size: 14px; }
.doc-lead { margin-top: 20px; font-size: 21px; color: var(--soft); }
.doc h2 { margin-top: 44px; font-size: 24px; }
.doc dl { margin: 16px 0 0; }
.doc dt { margin-top: 18px; font-weight: 700; }
.doc dd { margin: 4px 0 0; color: var(--soft); }
.doc > article > p { margin-top: 12px; color: var(--soft); }

/* ---------- 404 ---------- */
.lost-page { min-height: 100vh; display: grid; place-items: center; background: var(--night); color: var(--moon); }
.lost { padding: 48px 24px; text-align: center; }
.lost-mark { margin: 0 auto 28px; color: var(--moon); }
.lost h1 { font-size: clamp(30px, 5vw, 46px); }
.lost-ar { margin-top: 8px; color: #C3CBD8; font: 700 22px/1.6 var(--font-ar); }
.lost-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* ---------- phones: tidy header, comfortable taps ---------- */
/* The hero button and the bottom bar already carry the action, so on phones the header keeps the logo and the language only */
body.has-phone-bar .top .install { display: none; }
.lockup { min-height: 44px; }
.try-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.phone-bar .btn { flex: none; white-space: nowrap; }
.phone-bar p { margin: 0; line-height: 1.35; }
/* Inline mode on phones: a date and its Hijri date may wrap like ordinary text, so the letter never grows wider than the screen */
@media (max-width: 640px) {
  .inline .hd, .inline .hd::after { white-space: normal; }
  .mail table { width: 100%; }
}
