/*
 * The account, Premium and Open Door pages, on top of site.css: the same tokens, the app's design.
 * Arabic: Amiri (as the app), right to left (dir="rtl" on <html>, set before the first paint). Regular and a real
 * Bold, cut to what the pages write (scripts/site/amiri-subset.sh); 600 and 700 use the Bold.
 */
@font-face {
  font-family: "Amiri";
  src: url("/assets/fonts/Amiri-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("/assets/fonts/Amiri-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root { --red: #dc2626; --amber: #d97706; --outline: #d1d5db; }
@media (prefers-color-scheme: dark) { :root { --red: #f87171; --amber: #f59e0b; --outline: #333333; } }

/* The look of production's home (site.css, .home): its glow from the very top, the header on it (not sticky), its
   grey (4.5:1 on the glow too). */
body.acct {
  --secondary: #616977;
  --page-glow: radial-gradient(130% 620px at 50% 0, rgb(98 75 213 / 0.32) 0%, rgb(98 75 213 / 0.238) 10%, rgb(98 75 213 / 0.171) 20%, rgb(98 75 213 / 0.118) 30%, rgb(98 75 213 / 0.077) 40%, rgb(98 75 213 / 0.046) 50%, rgb(98 75 213 / 0.025) 60%, rgb(98 75 213 / 0.011) 70%, rgb(98 75 213 / 0) 100%);
}
@media (prefers-color-scheme: dark) {
  body.acct {
    --secondary: #8a8a93;
    --page-glow: radial-gradient(85% 660px at 50% 0, rgb(46 14 198 / 0.45) 0%, rgb(58 38 148 / 0.3) 50%, rgb(58 38 148 / 0.135) 70%, rgb(58 38 148 / 0.035) 85%, rgb(58 38 148 / 0) 100%);
  }
}
body.acct::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: 0; height: 760px; background: var(--page-glow);
}
body.acct .site-header {
  position: relative; background: none; border-bottom: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.kicker { display: block; margin-bottom: 10px; color: var(--accent); font-size: 14px; font-weight: 600; }
html[dir="rtl"] .kicker { font-size: 16px; }

/* Arabic text waits for its words (site-i18n.js), so English never flashes first. */
html[lang="ar"]:not(.i18n) body { visibility: hidden; }
html[dir="rtl"] body { font-family: "Amiri", var(--font); font-size: 19px; line-height: 1.85; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; font-weight: 700; line-height: 1.5; }
html[dir="rtl"] .lede { line-height: 1.9; }
.latin, html[dir="rtl"] input, html[dir="rtl"] .latin { font-family: var(--font); }
[hidden] { display: none !important; }
.from-app .public-only { display: none !important; }
html:not(.from-app) .app-only { display: none !important; }

button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 600; }
button.link:hover { text-decoration: underline; }

/* The header (the language, the account button, the phone menu): account-nav.css. */

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent-subtle); color: var(--accent) !important; font-weight: 700; font-size: 14px; text-decoration: none;
}

/* ---------- Sections ---------- */
.page-hero { position: relative; padding: 28px 0 48px; }
.sec { border-top: 0.5px solid var(--separator); padding: 56px 0; }
.sec .wrap, .page-hero .wrap { max-width: calc(40rem + 2 * var(--gutter)); }
.sec-title { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.15; }
.sec-sub { color: var(--secondary); margin: 8px 0 0; }
.page-hero h1 { font-size: clamp(40px, 5.2vw, 66px); line-height: 1.02; letter-spacing: -0.035em; margin-top: 0; text-wrap: balance; }
.page-hero .lede { font-size: clamp(16px, 1.45vw, 19px); line-height: 1.5; text-wrap: pretty; }
html[dir="rtl"] .page-hero h1 { line-height: 1.4; }
.page-hero .sub { color: var(--accent); font-weight: 600; margin: 8px 0 0; font-size: 17px; }
.page-hero .lede { margin-top: 16px; }
.page-hero .intro { margin: 10px 0 0; font-size: 15px; color: var(--secondary); text-wrap: pretty; }
.page-hero .intro a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.pill-lg { min-height: 50px; padding: 0 36px; font-size: 17px; border: 0; cursor: pointer; font-family: inherit; }
.pill-lg:disabled { opacity: .55; cursor: default; }
.actions .pill-lg, .send-row .pill-lg { width: 100%; }
@media (min-width: 560px) { .actions .pill-lg, .send-row .pill-lg { width: auto; align-self: flex-start; } }
.quiet-link { font-size: 15px; color: var(--secondary); margin: 0; }
.quiet-link a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* The verse (Al-Qamar 54:17), the calligraphy the old home page used (kept in assets/img for this page). */
.hero-verse { margin: 4px 0 30px; padding: 26px 18px 20px; border-radius: 22px; background: var(--accent-subtle); text-align: center; }
.hero-verse .arabic {
  width: 100%; aspect-ratio: 1575 / 264; margin: 0 auto; background: var(--text);
  -webkit-mask: url("/assets/img/verse-54-17.webp") center / contain no-repeat; mask: url("/assets/img/verse-54-17.webp") center / contain no-repeat;
}
.hero-verse p { margin: 14px 0 0; font-size: 15px; color: var(--secondary); line-height: 1.45; }
.hero-verse p:empty { display: none; }
.hero-verse cite { display: block; font-style: normal; font-size: 13px; margin-top: 8px; color: var(--secondary); }

/* Steps */
.step-cards { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.step-cards li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 16px; border-radius: 18px; background: var(--fill); }
.mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--accent); font-size: 15px; font-weight: 600;
}
.step-cards h3 { font-size: 17px; letter-spacing: -0.01em; margin-top: 8px; }
.step-cards p { margin: 4px 0 0; color: var(--secondary); font-size: 15px; line-height: 1.45; }
html[dir="rtl"] .step-cards h3 { margin-top: 2px; font-size: 20px; }
html[dir="rtl"] .step-cards p { font-size: 17px; line-height: 1.7; }

/* Questions */
.faq-list { margin-top: 18px; }
.faq-list details { border-top: 0.5px solid var(--separator); }
.faq-list details:last-child { border-bottom: 0.5px solid var(--separator); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 16px; font-weight: 600; list-style: none; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 1.5px solid var(--secondary); border-bottom: 1.5px solid var(--secondary); transform: translateY(-3px) rotate(45deg); }
.faq-list details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-list details p { margin: -4px 0 16px; color: var(--secondary); font-size: 15px; }
html[dir="rtl"] .faq-list summary { font-size: 18px; }
html[dir="rtl"] .faq-list details p { font-size: 17px; }

/* ---------- The form ---------- */
.who { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; margin-top: 22px; padding: 14px 0; border-top: 0.5px solid var(--separator); border-bottom: 0.5px solid var(--separator); }
.who p { margin: 0; }
.who .avatar { width: 40px; height: 40px; }
.who .email { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.who .hint { font-size: 14px; color: var(--secondary); }
.q { margin-top: 24px; border: 0; padding: 0; min-width: 0; }
.q > label, .q > legend { display: block; font-size: 15px; font-weight: 600; padding: 0; margin: 0; }
html[dir="rtl"] .q > label, html[dir="rtl"] .q > legend { font-size: 18px; }
.opt { font-weight: 400; color: var(--secondary); }
.certs { display: grid; gap: 10px; margin-top: 10px; }
.cert { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 0.5px solid var(--separator); background: var(--bg); font-size: 16px; cursor: pointer; }
.cert input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--secondary); display: grid; place-items: center; color: transparent; }
.box svg { width: 14px; height: 14px; }
.cert:has(input:checked) { border-color: var(--accent); background: var(--accent-subtle); }
.cert input:checked + .box { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.cert input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.group-title { margin: 34px 0 0; font-size: 1.05rem; letter-spacing: -0.01em; }
.select, .ta {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px;
  background: var(--fill); border: 0.5px solid var(--separator); color: var(--text); font: 16px/1.4 var(--font);
}
html[dir="rtl"] .select, html[dir="rtl"] .ta { font-family: "Amiri", var(--font); font-size: 18px; }
.select { appearance: none; -webkit-appearance: none; padding-inline-end: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--secondary) 50%), linear-gradient(135deg, var(--secondary) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
html[dir="rtl"] .select { background-position: 14px 52%, 20px 52%; } /* the two halves keep their order, or the arrow points up */
.ta { min-height: 110px; resize: vertical; border-radius: 14px; }
.select:focus, .ta:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.seg { display: flex; gap: 6px; margin-top: 8px; padding: 4px; border-radius: 999px; background: var(--fill); }
.seg label { flex: 1; text-align: center; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 7px 6px; border-radius: 999px; font-size: 14px; color: var(--secondary); }
html[dir="rtl"] .seg span { font-size: 16px; padding: 4px 6px; }
.seg input:checked + span { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .seg input:checked + span { background: #2a2a2d; } }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.count { margin: 6px 0 0; font-size: 13px; color: var(--secondary); text-align: end; font-variant-numeric: tabular-nums; }
.form-error { margin: 14px 0 0; font-size: 15px; color: var(--red); }
.form-foot { margin: 14px 0 0; font-size: 14px; color: var(--secondary); }
.form-foot a { color: var(--accent); }
.send-row { display: flex; flex-direction: column; }
.send-row .pill-lg { margin-top: 26px; }

/* Status (sent, pending, approved, declined…) */
.status-card { margin-top: 22px; padding: 22px 20px; border-radius: 20px; background: var(--fill); }
.status-card.ok { background: var(--accent-subtle); }
.state-mark { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--accent); }
.state-mark svg { width: 24px; height: 24px; }
.status-card.ok .state-mark { background: var(--primary); color: var(--on-primary); }
.status-card h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-top: 14px; }
.status-card p { margin: 8px 0 0; color: var(--secondary); }
.status-card .pill-lg { margin-top: 18px; }
.signin-ask p { color: var(--secondary); }
.signin-ask .pill-lg { margin-top: 16px; }
.signin-ask .store-line { margin-top: 22px; }
.signin-ask .stores { margin-top: 12px; }
.spinner { width: 26px; height: 26px; margin: 30px auto; border-radius: 50%; border: 2.5px solid var(--separator); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Premium (plans) ---------- */
.plans { display: grid; gap: 14px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border-radius: 22px; padding: 22px 20px; border: 0.5px solid var(--separator); background: var(--bg); }
.plan.premium { border: 1.5px solid var(--accent); background: linear-gradient(var(--accent-subtle), var(--bg) 70%); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--fill); color: var(--secondary); white-space: nowrap; }
.badge.accent { background: var(--primary); color: var(--on-primary); }
.plan .desc { margin: 6px 0 0; color: var(--secondary); font-size: 15px; }
.plan ul { list-style: none; margin: 16px 0 0; padding: 0; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 7px 0; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
html[dir="rtl"] .plan li { font-size: 17px; }
.plan .plus { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--secondary); }
.plan .note { margin: 16px 0 0; padding-top: 14px; border-top: 0.5px solid var(--separator); font-size: 14px; color: var(--secondary); }
.plan .note a { color: var(--accent); font-weight: 600; text-decoration: none; }
.compare { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.compare th, .compare td { padding: 11px 0; border-bottom: 0.5px solid var(--separator); text-align: start; vertical-align: top; font-weight: 500; }
.compare thead th { font-size: 13px; color: var(--secondary); font-weight: 600; }
.compare .c { width: 72px; text-align: center; }
.compare .grp th { padding-top: 22px; font-size: 13px; color: var(--accent); font-weight: 700; border-bottom: 0; }
.compare svg { width: 18px; height: 18px; margin: 0 auto; color: var(--accent); }
.compare .dash { color: var(--secondary); opacity: .5; }
.compare .soft { color: var(--secondary); font-size: 13px; }
html[dir="rtl"] .compare { font-size: 17px; }
.later { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px; margin-top: 18px; border-radius: 18px; background: var(--fill); font-size: 15px; color: var(--secondary); }
.later strong { color: var(--text); display: block; }
.later svg { width: 20px; height: 20px; }
.get-app { text-align: center; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.get-app .stores, .signed-out .stores { justify-content: center; }
.badge-link { display: inline-block; border-radius: 9px; line-height: 0; }
.badge-link img { width: auto; height: 46px; }
.soon {
  display: inline-flex; flex-direction: column; justify-content: center; text-align: start;
  min-height: 46px; margin: 0; padding: 0 16px; border-radius: 9px;
  box-shadow: inset 0 0 0 1px var(--outline); line-height: 1.15;
}
.soon small { color: var(--secondary); font-size: 11px; }
.soon b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; font-family: var(--font); }
html[dir="rtl"] .soon small { font-size: 13px; }

/* ---------- Account ---------- */
.acct-head { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.acct-head .avatar { width: 56px; height: 56px; font-size: 22px; }
.acct-head h1 { font-size: 1.7rem; letter-spacing: -0.02em; margin: 0; }
.acct-head p { margin: 2px 0 0; color: var(--secondary); font-size: 15px; overflow-wrap: anywhere; }
.card { margin-top: 22px; border-radius: 20px; padding: 18px; background: var(--fill); }
.card .k { font-size: 13px; font-weight: 600; color: var(--secondary); }
.card .v { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.card .v .badge { vertical-align: middle; margin-inline-start: 8px; }
.card p { margin: 6px 0 0; color: var(--secondary); font-size: 15px; }
.card a { color: var(--accent); font-weight: 600; text-decoration: none; }
.card.premium { background: var(--accent-subtle); }
.status { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); margin-top: 9px; flex: none; }
.status .dot.ok { background: var(--accent); }
.status .dot.off { background: var(--secondary); }
.status p { margin-top: 2px; }
.rows2 { list-style: none; margin: 18px 0 0; padding: 0; }
.rows2 li { border-bottom: 0.5px solid var(--separator); }
.rows2 .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; font-size: 16px; width: 100%; background: none; border: 0; color: var(--text); font-family: inherit; text-decoration: none; cursor: pointer; text-align: start; }
html[dir="rtl"] .rows2 .row { font-size: 18px; }
.rows2 span.v2 { color: var(--secondary); font-size: 15px; text-align: end; }
.rows2 .danger { color: var(--red); }
.chev { width: 8px; height: 8px; border-right: 1.5px solid var(--secondary); border-bottom: 1.5px solid var(--secondary); transform: rotate(-45deg); flex: none; }
html[dir="rtl"] .chev { transform: rotate(135deg); }
.signed-out { text-align: center; padding-top: 24px; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; margin: 0 auto 18px; }
@media (prefers-color-scheme: dark) { .app-icon { box-shadow: 0 0 0 1px var(--separator); } }
.signed-out h1 { font-size: 2rem; letter-spacing: -0.03em; }
.signed-out .lede { margin: 12px auto 0; }
.btn-col { display: grid; gap: 10px; margin-top: 28px; max-width: 26rem; margin-inline: auto; }
.btn-out { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; width: 100%; border-radius: 999px; border: 0.5px solid var(--separator); background: var(--bg); color: var(--text); font: 600 16px var(--font); cursor: pointer; padding: 0 16px; }
html[dir="rtl"] .btn-out { font-family: "Amiri", var(--font); font-size: 18px; }
.btn-out:hover { background: var(--fill); }
.btn-out svg { width: 20px; height: 20px; flex: none; }
.store-line { margin-top: 26px; font-size: 14px; color: var(--secondary); }
.store-line a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Sign-in sheet ---------- */
.signin .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .36); z-index: 20; }
.signin .sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 92vh; overflow: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 10px 20px calc(26px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
}
@media (min-width: 640px) {
  .signin .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 420px; transform: translate(-50%, -50%); border-radius: 22px; padding-top: 22px; }
  .signin .handle { display: none; }
}
@media (prefers-color-scheme: dark) { .signin .sheet { background: #111113; } }
.signin .handle { width: 38px; height: 5px; border-radius: 3px; background: var(--separator); margin: 0 auto 16px; }
.sheet-close { position: absolute; top: 10px; inset-inline-end: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill); color: var(--secondary); font-size: 20px; line-height: 1; cursor: pointer; }
.signin h2 { font-size: 1.35rem; letter-spacing: -0.02em; text-align: center; }
.signin .sub2 { text-align: center; color: var(--secondary); font-size: 15px; margin: 6px 0 20px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--secondary); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 0.5px; background: var(--separator); }
.field { display: block; width: 100%; margin-top: 10px; padding: 13px 14px; border-radius: 12px; background: var(--fill); border: 0.5px solid var(--separator); font: 16px var(--font); color: var(--text); }
.field:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.signin .pill-lg { width: 100%; margin-top: 16px; }
.sheet-msg { margin: 12px 0 0; font-size: 14px; color: var(--red); text-align: center; }
.sheet-msg.ok { color: var(--secondary); }
.signin .forgot { text-align: center; margin: 14px 0 0; font-size: 15px; }
.signin .fine2 { text-align: center; margin: 18px 0 0; font-size: 13px; color: var(--secondary); }
.sheet-open body { overflow: hidden; }
