/* صفحات تطبيق «تسبيح» — فاتح فقط، RTL، للجوال أولاً. */
:root {
  color-scheme: light;
  --accent: #D32F2F;
  --accent-dark: #B71C1C;
  --accent-soft: #FDECEC;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #1F2328;
  --muted: #5F6B7A;
  --line: #E4E8EE;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* الرأس */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 10px; font-size: 15px; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }

main { padding: 24px 0 40px; }
h1 { font-size: 28px; line-height: 1.4; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 28px 0 8px; color: var(--accent-dark); }
h3 { font-size: 17px; margin: 18px 0 4px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-inline-start: 22px; }
li { margin-bottom: 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* الصفحة الرئيسية */
.hero { text-align: center; padding: 8px 0 4px; }
.hero .app-icon { width: 104px; height: 104px; border-radius: 24px; margin: 0 auto 16px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.hero h1 { font-size: 34px; margin-bottom: 4px; }
.hero .lead { font-size: 18px; color: var(--muted); margin-bottom: 14px; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 15px; }

.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 6px; }
.store { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 170px; min-height: 56px; padding: 8px 18px; border-radius: 12px; background: #111; color: #fff; text-decoration: none; line-height: 1.3; }
.store small { font-size: 12px; opacity: .8; }
.store b { font-size: 17px; }
.store[aria-disabled="true"] { background: #DDE2E8; color: #4A5563; cursor: default; }
.store .soon { font-size: 12px; }

.features { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.feature h3 { margin: 0 0 4px; color: var(--text); }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature .ico { font-size: 22px; margin-inline-end: 6px; }

.shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin-top: 24px; }
.shots figure { margin: 0; flex: 0 0 62%; scroll-snap-align: center; }
.shots img { border-radius: 22px; border: 1px solid var(--line); background: #fff; }
.shots figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 6px; }

/* الأسئلة */
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; list-style-position: inside; }
details[open] summary { color: var(--accent-dark); margin-bottom: 6px; }

.contact { text-align: center; }
.contact .mail { display: inline-block; font-size: 18px; font-weight: 700; direction: ltr; unicode-bidi: isolate; text-decoration: none; background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 12px; margin-top: 4px; }

.en { direction: ltr; text-align: left; }
.en h2 { color: var(--accent-dark); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* صفحة المختبرين /tasbih/join */
.steps { list-style: none; padding: 0; margin: 20px 0 0; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-num { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.step-head h2 { margin: 0; font-size: 18px; color: var(--text); }
.step p { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 12px 16px; border-radius: 14px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 800; text-decoration: none; text-align: center; line-height: 1.4; }
.big-btn:active { background: var(--accent-dark); }
.big-btn[aria-disabled="true"] { background: #DDE2E8; color: #4A5563; cursor: default; }
.big-btn .soon { font-size: 13px; font-weight: 600; }
.big-btn.done { background: #E8F5E9; color: #1B5E20; border: 2px solid #A5D6A7; cursor: default; }
.note { background: #FFF8E1; border: 1px solid #FFE082; color: #5D4300; border-radius: var(--radius); padding: 14px 16px; font-weight: 700; margin-top: 6px; }

/* نموذج التسجيل في /tasbih/join */
.reg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 18px; }
.reg label { display: block; font-weight: 700; margin: 10px 0 6px; }
.reg label .opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.reg input[type=text], .reg input[type=email] { width: 100%; min-height: 50px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 17px; background: #fff; color: var(--text); }
.reg input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.reg input[type=email] { direction: ltr; text-align: left; }
.reg .hint { font-size: 14px; color: #8A5A00; background: #FFF8E1; border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.reg .err { font-size: 14px; color: var(--accent-dark); margin-top: 8px; }
.reg button { margin-top: 16px; border: 0; cursor: pointer; font-family: inherit; }
.reg .privacy-line { font-size: 14px; color: var(--muted); margin: 12px 0 0; text-align: center; }
/* honeypot: visually hidden without moving it off-screen (an offset would create sideways scroll in RTL) */
.hp { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
.account { background: var(--accent-soft); color: var(--accent-dark); border-radius: var(--radius); padding: 14px 16px; font-weight: 700; margin-top: 18px; }
.account .mail { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.trouble { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 4px; font-size: 15px; color: var(--muted); }
.trouble b { color: var(--text); }
[hidden] { display: none !important; }

footer { border-top: 1px solid var(--line); background: var(--card); padding: 18px 0 26px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
footer a { color: var(--muted); }

@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
  .shots { justify-content: center; overflow: visible; }
  .shots figure { flex: 0 0 30%; }
}
