/* Darajati (درجتي) — site styles. Shared by every page generated by tools/build_pages.py
   RTL first: only logical properties (inline-start/end) so the same rules work for ar (rtl) and en (ltr).
   Palette is taken from the app's own screens (see SEO.md > Design). */

/* Tokens mirror the app's own palette: src/screens/onboarding/theme.ts (OB) + src/ui/app/kit.tsx (UI) */
:root {
  --ink-950: #080B16;
  --ink-900: #0E1221;   /* OB.ink: app's dark surfaces and primary buttons */
  --ink-800: #171C33;
  --blue-500: #2E4FE6;  /* OB.accent */
  --blue-700: #1F35B8;  /* OB.accentTintText */
  --blue-400: #8FA2FF;  /* OB.accentSoft */
  --lavender: #A9B8FF;  /* OB.lavender */
  --gold: #FFB020;      /* OB.warning: streaks, highlights */
  --gold-deep: #8A5A00; /* OB.warningText */

  --bg: #FFFFFF;        /* OB.background */
  --surface: #FFFFFF;
  --surface-2: #F3F4F7; /* OB.surface */
  --page: #F4F5F8;      /* UI.page */
  --ink: #0E1221;
  --ink-2: #2B3145;
  --muted: #5B6274;     /* OB.textMuted */
  --line: #E6E8EE;      /* OB.border */

  --tint-blue: #EEF1FF; /* OB.accentTint */
  --tint-gold: #FFF4DC; /* OB.warningTint */
  --tint-orange: #FFEBDD;
  --tint-teal: #E3F4F2;
  --tint-rose: #FDECEC; /* OB.errorTint */

  --ok: #12A150;        /* OB.success */
  --ok-soft: #E7F7EE;   /* OB.successTint */
  --bad: #E5484D;       /* OB.error */
  --bad-soft: #FDECEC;

  --accent: var(--blue-500);
  --radius: 22px;
  --shadow: 0 1px 2px rgba(14,18,33,.05), 0 18px 40px -20px rgba(14,18,33,.25);

  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0D19; --surface: #131829; --surface-2: #1A2036; --page: #0A0D19; --ink: #EEF0F7; --ink-2: #C5CADB;
    --muted: #9AA1B6; --line: #262D47;
    --tint-blue: #1A2350; --tint-gold: #33280C; --tint-orange: #36220F; --tint-teal: #0F2D2D; --tint-rose: #3A1A1E;
    --ok: #3DCB7E; --ok-soft: #10301F; --bad: #FF7076; --bad-soft: #3B1A1D;
    --accent: var(--blue-400);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -20px rgba(0,0,0,.75);
  }
}
:root[data-theme="dark"] {
  --bg: #0A0D19; --surface: #131829; --surface-2: #1A2036; --page: #0A0D19; --ink: #EEF0F7; --ink-2: #C5CADB;
  --muted: #9AA1B6; --line: #262D47;
  --tint-blue: #1A2350; --tint-gold: #33280C; --tint-orange: #36220F; --tint-teal: #0F2D2D; --tint-rose: #3A1A1E;
  --ok: #3DCB7E; --ok-soft: #10301F; --bad: #FF7076; --bad-soft: #3B1A1D;
  --accent: var(--blue-400);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -20px rgba(0,0,0,.75);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  /* Cairo's hamza/madda/shadda marks clip on tight lines: keep line-height >= 1.6 (same rule as the app) */
  font-family: var(--font); font-weight: 500; font-size: 17px; line-height: 1.8;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
b, strong { font-weight: 800; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.wrap-narrow { max-width: 780px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } body { font-size: 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--blue-500); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 800; z-index: 100; }
.skip:focus { top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.45; text-wrap: balance; }
:lang(en) h1, :lang(en) h2 { line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.5; }
p { text-wrap: pretty; }
.lede { font-size: clamp(1.06rem, 1.6vw, 1.25rem); color: var(--ink-2); }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-weight: 800; font-size: .9rem; color: var(--accent); margin-bottom: 12px; }
:lang(en) .eyebrow { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--blue-500); --bs: var(--blue-700); --bc: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-weight: 800; font-size: 1.05rem; line-height: 1.5;
  text-decoration: none; cursor: pointer; border: 0;
  background: var(--b); color: var(--bc);
  padding: 13px 28px; border-radius: 16px;
  box-shadow: 0 5px 0 var(--bs);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bs); }
.btn.green { --b: var(--ink-900); --bs: #000; --bc: #fff; }
:root[data-theme="dark"] .btn.green { --b: var(--blue-400); --bs: #5C72E0; --bc: var(--ink-900); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.green { --b: var(--blue-400); --bs: #5C72E0; --bc: var(--ink-900); } }
.btn.white { --b: #fff; --bs: #C9CEDA; --bc: var(--ink-900); }
.btn.outline { --b: transparent; --bs: transparent; --bc: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line); }
.btn.outline:active { box-shadow: inset 0 0 0 2px var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { padding: 8px 18px; font-size: .95rem; border-radius: 13px; box-shadow: 0 4px 0 var(--bs); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 11px; text-decoration: none; direction: ltr;
  background: #05070F; color: #fff; border-radius: 14px; padding: 9px 20px 9px 15px; min-width: 170px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14); transition: transform .15s;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .7rem; opacity: .75; line-height: 1.2; }
.store strong { display: block; font-size: 1.08rem; font-weight: 800; line-height: 1.2; font-family: -apple-system, 'Segoe UI', var(--font); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.4rem; color: var(--ink); }
.logo img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin-inline-start: auto; }
.nav-links > li > a, .nav-links summary { display: block; padding: 6px 12px; border-radius: 10px; text-decoration: none; font-weight: 800; font-size: .95rem; color: var(--ink-2); cursor: pointer; list-style: none; }
.nav-links summary::-webkit-details-marker { display: none; }
.nav-links > li > a:hover, .nav-links summary:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links > li > a.btn, .nav-links > li > a.btn:hover { display: inline-flex; color: var(--bc); background: var(--b); padding: 8px 18px; }
.nav-links .lang a { border: 1.5px solid var(--line); font-size: .88rem; }
.dd { position: relative; }
.dd summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-start: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.dd[open] summary::after { transform: translateY(1px) rotate(225deg); }
.dd-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 310px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); }
.dd-menu a { display: block; padding: 8px 12px; border-radius: 12px; text-decoration: none; }
.dd-menu a:hover { background: var(--surface-2); }
.dd-menu a[aria-current="page"] b { color: var(--accent); }
.dd-menu b { display: block; font-size: .95rem; }
.dd-menu span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.nav-cta { margin-inline-start: 8px; }
.menu-btn { display: none; margin-inline-start: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
@media (max-width: 1020px) {
  .menu-btn { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 72px; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; max-height: calc(100vh - 72px); overflow: auto; }
  .nav.open .nav-links { display: flex; }
  .dd-menu { position: static; width: auto; box-shadow: none; border: 0; padding: 0; padding-inline-start: 8px; background: transparent; }
  .nav-links .lang a { display: inline-block; margin-top: 6px; }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Home: hero ---------- */
.hero { position: relative; padding: 48px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .hl { color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 .hl svg { position: absolute; inset-inline: 0; bottom: -.08em; width: 100%; height: .28em; }
.hero .lede { max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 26px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; color: var(--muted); list-style: none; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--tint-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E4FE6' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/10px no-repeat; }

.stage { position: relative; height: 600px; }
.blob { position: absolute; inset: 40px 30px 0 0; border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; background: var(--blue-500); opacity: .12; }
.stage .phone { position: absolute; }
/* phones are placed with physical left/right on purpose: the composition is mirrored per direction below */
.stage .p1 { width: 262px; left: 50%; top: 20px; transform: translateX(-62%) rotate(-4deg); z-index: 2; }
.stage .p2 { width: 220px; left: 50%; top: 110px; transform: translateX(18%) rotate(7deg); z-index: 1; }
[dir="ltr"] .stage .p1 { transform: translateX(-38%) rotate(4deg); }
[dir="ltr"] .stage .p2 { transform: translateX(-118%) rotate(-7deg); }
.float-card { position: absolute; z-index: 4; background: var(--surface); border-radius: 16px; padding: 8px 14px; box-shadow: var(--shadow); font-size: .88rem; font-weight: 800; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); }
.float-card i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font-size: .9rem; }
.fc1 { inset-inline-start: -12px; top: 28px; } .fc1 i { background: var(--ok-soft); color: var(--ok); }
.fc2 { inset-inline-start: 6%; bottom: 60px; } .fc2 i { background: var(--tint-gold); color: var(--gold-deep); }
@media (max-width: 960px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; }
  .stage { height: 470px; max-width: 460px; margin: 0 auto; width: 100%; }
  .stage .p1 { width: 210px; } .stage .p2 { width: 176px; top: 90px; }
  .fc2 { display: none; }
}
@media (max-width: 420px) { .fc1 { inset-inline-start: 0; } }

/* ---------- Marquee (scrolls toward the reading direction) ---------- */
.marquee { background: var(--ink-900); color: #fff; padding: 16px 0; overflow: hidden; transform: rotate(1.2deg); margin: 24px -20px 0; }
[dir="ltr"] .marquee { transform: rotate(-1.2deg); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marq 60s linear infinite; }
[dir="rtl"] .marquee-track { animation-name: marq-rtl; }
.marquee span { flex: none; font-weight: 800; font-size: 1.05rem; padding: 4px 16px; border-radius: 999px; background: rgba(255,255,255,.08); white-space: nowrap; }
.marquee span:nth-child(3n) { background: var(--blue-500); color: #fff; }
@keyframes marq { to { transform: translateX(-50%); } }
@keyframes marq-rtl { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none !important; } }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section.tight { padding: 72px 0; }
@media (max-width: 760px) { .section { padding: 68px 0; } .section.tight { padding: 48px 0; } }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-bottom: 14px; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { border-radius: 28px; padding: 32px; position: relative; overflow: hidden; min-height: 260px; display: flex; flex-direction: column; }
.tile h3 { font-size: 1.5rem; margin-bottom: 8px; }
.tile p { color: var(--ink-2); max-width: 430px; }
.tile .big { font-weight: 800; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1.1; margin-bottom: 6px; direction: ltr; text-align: start; }
[dir="rtl"] .tile .big { text-align: right; }
.t-a { grid-column: span 4; background: var(--surface-2); }
.t-b { grid-column: span 2; background: var(--blue-500); color: #fff; }
.t-b p { color: rgba(255,255,255,.85); }
.t-c { grid-column: span 2; background: var(--tint-blue); }
.t-d { grid-column: span 2; background: var(--tint-gold); }
.t-e { grid-column: span 2; background: var(--ink-900); color: #fff; }
.t-e p { color: rgba(255,255,255,.82); }
.t-e h3, .t-e p { padding-inline-end: 0; }
.mini-q { margin-top: auto; padding-top: 22px; display: grid; gap: 8px; max-width: 430px; }
.mini-q div { background: var(--surface); border-radius: 12px; padding: 7px 12px; font-size: .9rem; font-weight: 800; display: flex; align-items: center; gap: 10px; border: 1.5px solid transparent; }
.mini-q div b { font-size: .74rem; margin-inline-start: auto; padding: 0 8px; border-radius: 6px; }
.mini-q .y { border-color: var(--ok); } .mini-q .y b { background: var(--ok-soft); color: var(--ok); }
.mini-q .n { border-color: var(--bad); } .mini-q .n b { background: var(--bad-soft); color: var(--bad); }
.cats { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.cats span { font-size: .8rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--surface); }
@media (max-width: 960px) { .bento { grid-template-columns: 1fr 1fr; } .t-a { grid-column: span 2; } .t-b, .t-c, .t-d, .t-e { grid-column: span 1; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .t-a, .t-b, .t-c, .t-d, .t-e { grid-column: span 1; } .tile { min-height: 0; padding: 26px; } }

/* ---------- Showcase tabs ---------- */
.show { background: var(--ink-900); color: #fff; border-radius: 40px; padding: 72px 64px 0; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.show .eyebrow { color: var(--lavender); }
.show h2 { margin-bottom: 26px; }
.tabs { display: grid; gap: 8px; padding-bottom: 72px; }
.tab { text-align: start; font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; padding: 14px 18px; border-radius: 18px; transition: background .2s; }
.tab b { display: block; font-size: 1.2rem; font-weight: 800; }
.tab span { display: block; font-size: .95rem; color: rgba(255,255,255,.72); max-height: 0; overflow: hidden; transition: max-height .3s; }
.tab[aria-selected="true"] { background: rgba(255,255,255,.08); }
.tab[aria-selected="true"] b { color: var(--lavender); }
.tab[aria-selected="true"] span { max-height: 140px; margin-top: 4px; }
.show-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; }
.show-stage .phone { width: 300px; margin-bottom: -120px; }
.show-stage .phone img { transition: opacity .25s; }
@media (max-width: 960px) {
  .show { grid-template-columns: 1fr; padding: 44px 20px 0; border-radius: 28px; gap: 8px; }
  .tabs { padding-bottom: 24px; }
  .show-stage .phone { width: 230px; margin-bottom: -150px; }
  .show-stage { min-height: 360px; }
}

/* ---------- Phone ---------- */
.phone { background: #05070F; border-radius: 44px; padding: 9px; aspect-ratio: 1206 / 2622; box-shadow: 0 0 0 1.5px rgba(0,0,0,.25), 0 40px 70px -30px rgba(14,18,33,.55); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 35px; }

/* ---------- Quiz (shared by home demo and practice page). Questions are Arabic, always RTL ---------- */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: var(--shadow); text-align: start; }
@media (max-width: 600px) { .quiz { padding: 20px 16px; border-radius: 22px; } }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quiz-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--blue-500); border-radius: 999px; transition: width .35s; }
.quiz-count { font-weight: 800; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.q-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.q-meta span { font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.q-meta .sec.lafzi, .q-meta .sec.nazari { background: var(--tint-gold); color: var(--gold-deep); }
.q-meta .sec.kammi, .q-meta .sec.sci { background: var(--tint-blue); color: var(--blue-700); }
:root[data-theme="dark"] .q-meta .sec.lafzi, :root[data-theme="dark"] .q-meta .sec.nazari { color: var(--gold); } :root[data-theme="dark"] .q-meta .sec.kammi, :root[data-theme="dark"] .q-meta .sec.sci { color: var(--blue-400); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .q-meta .sec.lafzi, :root:not([data-theme="light"]) .q-meta .sec.nazari { color: var(--gold); } :root:not([data-theme="light"]) .q-meta .sec.kammi, :root:not([data-theme="light"]) .q-meta .sec.sci { color: var(--blue-400); } }
.q-stem { font-weight: 800; font-size: 1.15rem; line-height: 1.9; margin-bottom: 16px; }
.q-stem u { text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.q-opts { display: grid; gap: 10px; }
.q-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; font: inherit; font-size: 1rem; font-weight: 500; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 10px 14px; cursor: pointer; transition: border-color .12s, background .12s; }
.q-opt:hover:not(:disabled) { background: var(--surface-2); }
.q-opt .k { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); font-size: .9rem; font-weight: 800; color: var(--muted); line-height: 1; }
.q-opt[aria-pressed="true"] { border-color: var(--blue-500); background: var(--tint-blue); }
.q-opt[aria-pressed="true"] .k { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.done .q-opt { cursor: default; }
.done .q-opt:disabled { opacity: 1; }
.done .q-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.done .q-opt.right .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.done .q-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.done .q-opt.wrong .k { background: var(--bad); border-color: var(--bad); color: #fff; }
.q-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.q-result { font-weight: 800; }
.q-result.good { color: var(--ok); } .q-result.bad { color: var(--bad); }
.q-explain { display: none; margin-top: 18px; padding: 14px 18px; border-radius: 16px; background: var(--surface-2); font-size: .98rem; color: var(--ink-2); }
.done .q-explain { display: block; }
.quiz-end { text-align: center; padding: 20px 0 6px; }
.quiz-end .score { font-weight: 800; font-size: 4rem; line-height: 1.2; color: var(--accent); margin: 8px 0; direction: ltr; }
.quiz-end .split { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quiz-end .split span { font-weight: 800; font-size: .9rem; padding: 2px 12px; border-radius: 999px; background: var(--surface-2); }

/* ---------- Guides grid ---------- */
.guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide { display: flex; flex-direction: column; gap: 6px; text-decoration: none; padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.guide:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.guide .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 6px; }
.guide h3 { font-size: 1.2rem; }
.guide p { font-size: .95rem; color: var(--muted); }
.guide .go { margin-top: auto; padding-top: 8px; font-weight: 800; font-size: .92rem; color: var(--accent); }
.arrow { display: inline-block; }
[dir="rtl"] .arrow { transform: scaleX(-1); }
@media (max-width: 960px) { .guides { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .guides { grid-template-columns: 1fr; } }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.fact b { display: block; font-weight: 800; font-size: 2.2rem; line-height: 1.3; color: var(--accent); margin-bottom: 4px; }
.fact span { font-size: .95rem; color: var(--ink-2); }
.source { margin-top: 16px; font-size: .86rem; color: var(--muted); }
.source a { color: inherit; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 380px) { .fact b { font-size: 1.8rem; } }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 12px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 24px; padding-inline-end: 60px; position: relative; font-weight: 800; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 20px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 24px 20px; color: var(--ink-2); }
.faq .a p + p { margin-top: 10px; }
.faq .a a { color: var(--accent); font-weight: 800; }

/* ---------- CTA ---------- */
.cta { background: var(--blue-500); color: #fff; border-radius: 40px; padding: 72px 64px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; inset-inline-end: -160px; top: -220px; background: rgba(255,255,255,.06); }
.cta h2 { margin-bottom: 12px; position: relative; }
.cta p { color: rgba(255,255,255,.84); margin-bottom: 28px; max-width: 540px; position: relative; font-size: 1.1rem; }
.cta .stores { position: relative; }
.cta img { width: 200px; height: auto; aspect-ratio: 1; align-self: center; justify-self: start; position: relative; border-radius: 44px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.45); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; padding: 44px 24px; border-radius: 28px; } .cta img { width: 96px; border-radius: 22px; order: -1; } }

/* ---------- Article (guide pages) ---------- */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 26px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-inline-end: 6px; display: inline-block; }
[dir="rtl"] .crumbs li + li::before { content: "‹"; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.page-hero { padding: 24px 0 36px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin-bottom: 16px; }
.page-hero .lede { max-width: 780px; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.answer { background: var(--tint-blue); border-radius: 22px; padding: 20px 26px; margin: 8px 0 40px; border: 1px solid color-mix(in srgb, var(--blue-500) 25%, transparent); }
.answer b.label { display: block; font-weight: 800; font-size: .9rem; color: var(--accent); margin-bottom: 4px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-bottom: 40px; }
.toc { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; font-size: .94rem; }
.toc b { font-weight: 800; display: block; margin-bottom: 8px; }
.toc ol { list-style: none; display: grid; gap: 4px; }
.toc a { text-decoration: none; color: var(--ink-2); } .toc a:hover { color: var(--accent); }
.toc .side-cta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.toc .side-cta p { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } .toc { position: static; order: -1; } }
.prose { font-size: 1.06rem; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 52px; }
.prose h3 { margin-top: 30px; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--accent); text-underline-offset: 5px; font-weight: 800; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .97rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.prose th, .prose td { text-align: start; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td, .prose tr:last-child th { border-bottom: 0; }
.prose th { background: var(--surface-2); font-weight: 800; font-size: .92rem; }
.prose td.num { white-space: nowrap; font-weight: 800; }
.table-wrap { overflow-x: auto; }
.callout { background: var(--tint-gold); border-radius: 18px; padding: 16px 22px; }
.steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; padding-inline-start: 64px; position: relative; margin: 0 !important; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 18px; top: 16px; width: 32px; height: 32px; border-radius: 10px; background: var(--blue-500); color: #fff; display: grid; place-items: center; font-weight: 800; }
.related { padding: 40px 0 0; }
.related h2 { font-size: 1.6rem; margin-bottom: 18px; }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: grid; gap: 14px; }
.calc .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.calc label { display: grid; gap: 4px; font-weight: 800; font-size: .9rem; }
.calc input { font: inherit; font-size: 1.05rem; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.calc output { font-weight: 800; font-size: 1.6rem; color: var(--accent); }

/* ---------- Footer ---------- */
.footer { margin-top: 96px; background: var(--ink-900); color: rgba(255,255,255,.78); padding: 64px 0 40px; font-size: .95rem; }
.footer .logo { color: #fff; }
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.f-grid h3 { font-size: .95rem; color: #fff; margin-bottom: 12px; }
:lang(en) .f-grid h3 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.f-grid ul { list-style: none; display: grid; gap: 6px; }
.f-grid a { text-decoration: none; } .f-grid a:hover { color: #fff; }
.f-about p { margin: 14px 0 20px; max-width: 330px; }
.f-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: .84rem; color: rgba(255,255,255,.6); display: grid; gap: 8px; }
.f-legal a { color: rgba(255,255,255,.85); }
@media (max-width: 860px) { .f-grid { grid-template-columns: 1fr 1fr; } .f-about { grid-column: span 2; } }

/* ---------- Motion ---------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
.no-js .rv { opacity: 1; transform: none; }

/* ---------- Legal & support pages ---------- */
.prose.legal { font-size: 1rem; }
.prose.legal h2 { font-size: 1.4rem; margin-top: 44px; }
.prose.legal h3 { font-size: 1.1rem; margin-top: 24px; }
.prose.legal table { font-size: .93rem; }
.prose.legal .callout { margin: 18px 0; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.support-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; padding: 28px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.support-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.support-card .ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface-2); margin-bottom: 6px; }
.support-card h2 { font-size: 1.3rem; }
.support-card p { color: var(--muted); font-size: .95rem; }
.support-card .go { margin-top: auto; padding-top: 10px; font-weight: 800; color: var(--accent); word-break: break-word; }
.support-card.primary { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.support-card.primary p { color: rgba(255,255,255,.8); }
.support-card.primary .ic { background: rgba(255,255,255,.12); }
.support-card.primary .go { color: var(--lavender); }
@media (max-width: 860px) { .support-grid { grid-template-columns: 1fr; } }
