/* Tabexa main page for visitors (index.html, #landing). Everything is scoped to .s-root so it
   never touches the app; the page shows only when <html> has the show-landing class (boot-theme.js). */
.s-root { display: none; }
html.show-landing, html.show-landing[data-theme] { scroll-behavior: smooth; color-scheme: light; }
html.show-landing, html.show-landing body { height: auto; }
html.show-landing body { overflow: auto; background: #F7F7FC; }
html.show-landing #app { display: none; }
html.show-landing .s-root { display: block; }

.s-root {
  --ink: #1C1745; --ink-2: #4B4772; --ink-3: #7D7B9B; --line: #E3E4EE; --line-2: #EEEFF6;
  --bg: #F7F7FC; --surface: #FFFFFF; --soft: #F1EFFE;
  --brand: #5A3CF0; --brand-2: #4527D6; --magenta: #E6237E; --cyan: #00A3E0; --yellow: #FFB800; --green: #12B76A; --red: #E0383E;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Rubik', system-ui, sans-serif;
  font: 400 16px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
.s-root *, .s-root *::before, .s-root *::after { box-sizing: border-box; }
.s-root a { color: var(--brand); }
.s-root img, .s-root svg { display: block; }
.s-root .ic { flex: none; }
.s-root h1, .s-root h2, .s-root h3, .s-root h4 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0; color: var(--ink); }
.s-root [id] { scroll-margin-top: 84px; }
html[data-lang="en"] .s-root [data-l="ar"], html[data-lang="ar"] .s-root [data-l="en"] { display: none !important; }
html[dir="rtl"] .s-root { font-family: 'Rubik', 'Segoe UI', Tahoma, sans-serif; }
html[dir="rtl"] .s-root h1, html[dir="rtl"] .s-root h2, html[dir="rtl"] .s-root h3, html[dir="rtl"] .s-root h4 { font-family: 'Rubik', 'Segoe UI', Tahoma, sans-serif; letter-spacing: 0; line-height: 1.3; }
.s-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* signed in or not: show "Sign in" or "Open Tabexa" */
html.has-session .s-root [data-google] { display: none !important; }
html:not(.has-session) .s-root [data-open-app] { display: none !important; }

/* header */
.s-head { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.s-head-in { display: flex; align-items: center; gap: 20px; height: 68px; }
.s-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink) !important; font: 800 22px/1 var(--display); letter-spacing: -.03em; }
.s-brand.light { color: #fff !important; }
.s-nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.s-nav a { padding: 8px 11px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.s-nav a:hover { background: var(--soft); color: var(--ink); }
.s-head-acts { display: flex; align-items: center; gap: 8px; }
.s-lang { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 10px; height: 38px; padding: 0 12px; font: 600 14px var(--font); cursor: pointer; }
.s-lang:hover { border-color: var(--ink-3); color: var(--ink); }

/* buttons */
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 12px; font: 600 15px var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .06s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.s-btn:active { transform: translateY(1px); }
.s-btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.s-btn.lg { height: 52px; padding: 0 24px; font-size: 16px; }
.s-btn.primary { background: var(--brand); color: #fff; }
.s-btn.primary:hover { background: var(--brand-2); }
.s-btn.outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.s-btn.outline:hover { border-color: var(--ink-3); }
.s-btn.google { background: #fff; color: #1f1f1f; border-color: #DADCE0; box-shadow: 0 1px 2px rgba(28,23,69,.06); }
.s-btn.google:hover { border-color: #B9BCC4; box-shadow: 0 3px 10px rgba(28,23,69,.1); }
.s-btn.light { background: #fff; color: var(--ink); }
.s-btn.block { width: 100%; }

/* hero */
.s-hero { padding: 64px 0 56px; background: radial-gradient(1200px 400px at 85% -10%, rgba(90,60,240,.12), transparent 60%), radial-gradient(800px 300px at 0% 0%, rgba(0,163,224,.08), transparent 60%); }
.s-hero-in { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.s-kicker { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand); background: var(--soft); padding: 5px 12px; border-radius: 99px; margin-bottom: 16px; }
.s-hero h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; }
.s-lead { font-size: 18px; color: var(--ink-2); margin: 18px 0 0; max-width: 640px; }
.s-signin { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.s-note { color: var(--ink-3); font-size: 14px; margin: 14px 0 0; }

/* screenshots */
.s-shot { margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(28,23,69,.14), 0 4px 12px rgba(28,23,69,.06); }
.s-shot img { width: 100%; height: auto; }
.s-shot-bar { display: flex; gap: 6px; padding: 9px 12px; background: #EEEDF6; border-bottom: 1px solid var(--line); }
.s-shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #D3D1E3; }
.s-shot-bar i:first-child { background: #FF6B6B; } .s-shot-bar i:nth-child(2) { background: #FFC24B; } .s-shot-bar i:nth-child(3) { background: #3DD68C; }
.s-shot.s-phone { width: 100%; max-width: 290px; margin-inline: auto; border-radius: 34px; border: 8px solid var(--ink); }

/* sections */
.s-sec { padding: 72px 0; }
.s-sec.alt { background: var(--surface); border-block: 1px solid var(--line); }
.s-h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; text-align: center; margin-bottom: 12px !important; }
.s-h2.start { text-align: start; }
.s-sub { text-align: center; color: var(--ink-2); max-width: 760px; margin: 0 auto 36px; }
.s-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.s-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.s-feature h3 { font-size: 18px; margin: 14px 0 6px; }
.s-feature p { margin: 0; color: var(--ink-2); font-size: 15px; }
.s-fic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--brand); }
.s-feature:nth-child(2) .s-fic, .s-contact-card:nth-child(2) .s-fic { background: #FDE7F1; color: var(--magenta); }
.s-feature:nth-child(3) .s-fic, .s-contact-card:nth-child(3) .s-fic { background: #DCFCE7; color: #15803D; }
.s-feature:nth-child(4) .s-fic, .s-contact-card:nth-child(4) .s-fic { background: #FFF4D6; color: #B45309; }
.s-feature:nth-child(5) .s-fic { background: #E0F4FC; color: #0284C7; }

/* how it works */
.s-how { display: grid; gap: 72px; margin-top: 48px; }
.s-how-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.s-how-row.flip .s-how-text { order: 2; }
.s-how-row.phone { grid-template-columns: 1.2fr .8fr; }
.s-how-row.phone.flip { grid-template-columns: .8fr 1.2fr; }
.s-step-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: #fff; font: 800 16px var(--display); margin-bottom: 14px; }
.s-how-text h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; }
.s-how-text p { color: var(--ink-2); margin: 12px 0 0; }
.s-how-text ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.s-how-text li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 15px; }
.s-how-text li .ic { color: var(--green); margin-top: 4px; }

/* plans */
.s-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: stretch; }
.s-plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 20px 20px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.s-plan.featured { border: 2px solid var(--brand); box-shadow: 0 16px 40px rgba(90,60,240,.14); padding: 23px 19px 19px; }
.s-flag { position: absolute; top: -12px; inset-inline-start: 18px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 99px; }
.s-plan h3 { font-size: 21px; }
.s-plan-for { margin: 0; color: var(--ink-3); font-size: 14px; }
.s-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.s-price b { font: 800 30px/1.1 var(--display); letter-spacing: -.02em; }
.s-price > span { color: var(--ink-3); font-size: 13.5px; }
.s-price-sub { color: var(--ink-3); font-size: 13.5px; min-height: 21px; }
.s-plan ul { list-style: none; padding: 0; margin: 14px 0 4px; display: grid; gap: 9px; flex: 1; align-content: start; }
.s-plan li { display: flex; gap: 8px; font-size: 14.5px; line-height: 1.4; }
.s-plan li .ic { margin-top: 2px; color: var(--green); }
.s-plan li.no { color: var(--ink-3); }
.s-plan li.no .ic { color: #B9B8CC; }
.s-extras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin: 28px 0 0; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.s-extras > div { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.s-extras .ic { color: var(--brand); margin-top: 3px; }
.s-extras b { color: var(--ink); font-weight: 600; }
.s-fine { color: var(--ink-3); font-size: 14px; text-align: center; margin: 18px 0 0; }
.s-steps { list-style: none; counter-reset: s; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.s-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; gap: 6px; align-content: start; color: var(--ink-2); font-size: 15px; }
.s-steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; font: 800 16px var(--display); margin-bottom: 6px; }
.s-steps li b { color: var(--ink); font-size: 17px; font-family: var(--display); }

/* questions */
.s-faq { max-width: 840px; }
.s-faq details { border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; background: var(--bg); margin-top: 10px; }
.s-faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.s-faq summary::-webkit-details-marker { display: none; }
.s-faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--ink-3); }
.s-faq details[open] summary::after { content: '−'; }
.s-faq p { margin: 0 0 16px; color: var(--ink-2); }

/* about & contact */
.s-about { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.s-about-main h3 { font-size: 21px; margin: 26px 0 8px; }
.s-about-main p { color: var(--ink-2); margin: 0; }
.s-about-main .s-lead { margin-top: 6px; }
.s-list { padding-inline-start: 20px; color: var(--ink-2); display: grid; gap: 8px; margin: 0; }
.s-list b { color: var(--ink); }
.s-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px rgba(28,23,69,.06); }
.s-card h3 { font-size: 19px; margin-bottom: 14px; }
.s-card dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; margin: 0; font-size: 15px; }
.s-card dt { color: var(--ink-3); }
.s-card dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
html[dir="rtl"] .s-card dd a[dir="ltr"] { display: inline-block; }
.s-contact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.s-contact-card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 22px; text-decoration: none; color: var(--ink) !important; display: grid; gap: 4px; align-content: start; transition: border-color .15s, transform .15s; }
a.s-contact-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.s-contact-card h3 { font-size: 18px; margin-top: 12px; }
.s-contact-card p { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
html[dir="rtl"] .s-contact-card p[dir="ltr"] { text-align: right; }

/* policies */
.s-pol-index { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 28px; }
.s-pol-index a { padding: 8px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.s-pol-index a:hover { border-color: var(--brand); color: var(--brand); }
.s-policies { display: grid; gap: 20px; max-width: 880px; margin: 0 auto; }
.s-policy { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px 34px; }
.s-policy header { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 6px; }
.s-policy header h3 { font-size: 24px; font-weight: 800; }
.s-policy header p { margin: 6px 0 0; color: var(--ink-3); }
.s-policy h4 { font-size: 17.5px; margin: 22px 0 8px; }
.s-policy p, .s-policy li { color: var(--ink-2); }
.s-policy p { margin: 0 0 10px; }
.s-policy ul { margin: 0 0 10px; padding-inline-start: 22px; display: grid; gap: 6px; }
.s-policy b { color: var(--ink); }

/* call to action & footer */
.s-cta { background: linear-gradient(120deg, var(--brand), #7B4DFF 55%, var(--magenta)); color: #fff; padding: 56px 0; }
.s-cta-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.s-cta h2 { font-size: clamp(24px, 3vw, 34px); color: #fff; }
.s-cta .s-signin { margin: 0; }
.s-foot { background: var(--ink); color: rgba(255,255,255,.72); padding: 52px 0 24px; font-size: 14.5px; }
.s-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.s-foot-grid > div { display: grid; gap: 8px; align-content: start; }
.s-foot b { color: #fff; font-size: 14px; margin-bottom: 4px; }
.s-foot a { color: rgba(255,255,255,.72); text-decoration: none; }
.s-foot a:hover { color: #fff; }
.s-foot a[hidden] { display: none; }
.s-foot-brand p { margin: 8px 0 0; max-width: 300px; }
.s-foot-contact a, .s-addr { display: inline-flex; align-items: center; gap: 8px; }
.s-copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: 13px; color: rgba(255,255,255,.55); }

@media (max-width: 1080px) {
  .s-nav a { padding: 8px 8px; font-size: 14px; }
}
@media (max-width: 1000px) {
  .s-plans { grid-template-columns: repeat(2, 1fr); }
  .s-features, .s-steps { grid-template-columns: repeat(2, 1fr); }
  .s-contact { grid-template-columns: repeat(2, 1fr); }
  .s-hero-in, .s-how-row, .s-how-row.phone, .s-how-row.phone.flip { grid-template-columns: 1fr; gap: 28px; }
  .s-how-row.flip .s-how-text { order: 0; }
  .s-about { grid-template-columns: 1fr; }
  .s-foot-grid { grid-template-columns: 1fr 1fr; }
  .s-head-in { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 8px; gap: 10px; }
  .s-brand { margin-inline-end: auto; }
  .s-nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -8px; scrollbar-width: none; }
  .s-nav::-webkit-scrollbar { display: none; }
  .s-root [id] { scroll-margin-top: 120px; }
}
@media (max-width: 760px) {
  .s-wrap { padding: 0 16px; }
  .s-hero { padding: 36px 0 32px; }
  .s-sec { padding: 48px 0; }
  .s-how { gap: 52px; margin-top: 32px; }
  .s-plans, .s-features, .s-steps, .s-contact, .s-extras { grid-template-columns: 1fr; }
  .s-signin .s-btn { flex: 1 1 100%; }
  .s-policy { padding: 22px 18px; border-radius: 18px; }
  .s-foot-grid { grid-template-columns: 1fr; }
  .s-head-acts .s-btn.sm { padding: 0 12px; }
}
