/* ==========================================================================
   Flashy — Landing page
   --------------------------------------------------------------------------
   1. Design tokens (mirrors Assets.xcassets/Colors in the iOS app)
   2. Base & layout
   3. Header / navigation
   4. Buttons
   5. Hero + floating cards
   6. Phone frame + app screens (Home, Study, Progress)
   7. Sections: problem, demo, features, progress, how, languages, faq, cta
   8. Footer
   9. Motion, RTL, responsive
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
/* Light — values copied from the app's colorsets (light appearance) */
:root,
[data-force-theme="light"] {
  --bg: #ffffff;                 /* backgroundPrimary */
  --bg-2: #f3f4f7;               /* backgroundSecondary */
  --page: #fbfcfd;
  --card: #e6ebef;               /* cardPrimary */
  --popup: #ffffff;              /* overlayPopup */
  --border: #d8e1e9;             /* borderSecondary */
  --border-strong: #c5d0d9;      /* borderDefault */
  --brand: #3ea864;              /* buttonPrimary / cardBrand */
  --brand-text: #3ea864;         /* textBrand */
  --brand-ink: #2c8a4e;          /* AA-contrast variant for small text on white */
  --brand-soft: #eafaf0;         /* cardAccentBrand */
  --brand-line: #bdeacb;         /* borderBrandLight */
  --brand-track: #ddf5e4;        /* indicatorInactive */
  --text: #191c1f;               /* textPrimary */
  --text-2: #55626d;             /* textSecondary */
  --text-3: #97a6b2;             /* textTertiary */
  --error: #dc2626;              /* buttonError */
  --easy: #0a84ff;               /* system blue (Easy button) */
  --purple: #8b5cf6;  --purple-soft: #ebe2fe;
  --rose: #ec4899;    --rose-soft: #fde2f4;
  --teal: #14b8a6;    --teal-soft: #e7fefd;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 1px 2px rgba(16, 24, 32, 0.06), 0 4px 12px rgba(16, 24, 32, 0.05);
  --shadow-lg: 0 2px 6px rgba(16, 24, 32, 0.05), 0 24px 60px -12px rgba(16, 40, 28, 0.22);
  --shadow-phone: 0 50px 100px -30px rgba(16, 40, 28, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.25);
  --grid-dot: rgba(25, 28, 31, 0.07);
  --glow-a: rgba(62, 168, 100, 0.18);
  --glow-b: rgba(20, 184, 166, 0.10);
  color-scheme: light;
}

/* Dark — values from the app's colorsets (dark appearance) */
:root[data-theme="dark"],
[data-force-theme="dark"] {
  --bg: #0d0f11;
  --bg-2: #191c1f;
  --page: #0a0c0e;
  --card: #212a31;
  --popup: #212a31;
  --border: #2a333b;
  --border-strong: #3d4a54;
  --brand-text: #63c47f;
  --brand-ink: #63c47f;
  --brand-soft: #16231b;
  --brand-line: #235e39;
  --brand-track: #235e39;
  --text: #ffffff;
  --text-2: #97a6b2;
  --text-3: #6b7b88;
  --purple-soft: rgba(139, 92, 246, 0.16);
  --rose-soft: rgba(236, 72, 153, 0.16);
  --teal-soft: rgba(20, 184, 166, 0.16);
  --glass: rgba(33, 42, 49, 0.66);
  --glass-line: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 70px -14px rgba(0, 0, 0, 0.7);
  --shadow-phone: 0 60px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --grid-dot: rgba(255, 255, 255, 0.06);
  --glow-a: rgba(62, 168, 100, 0.22);
  --glow-b: rgba(20, 184, 166, 0.10);
  color-scheme: dark;
}

/* System dark when the visitor hasn't chosen a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f11; --bg-2: #191c1f; --page: #0a0c0e; --card: #212a31; --popup: #212a31;
    --border: #2a333b; --border-strong: #3d4a54;
    --brand-text: #63c47f; --brand-ink: #63c47f; --brand-soft: #16231b; --brand-line: #235e39; --brand-track: #235e39;
    --text: #ffffff; --text-2: #97a6b2; --text-3: #6b7b88;
    --purple-soft: rgba(139, 92, 246, 0.16); --rose-soft: rgba(236, 72, 153, 0.16); --teal-soft: rgba(20, 184, 166, 0.16);
    --glass: rgba(33, 42, 49, 0.66); --glass-line: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 70px -14px rgba(0, 0, 0, 0.7);
    --shadow-phone: 0 60px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --grid-dot: rgba(255, 255, 255, 0.06);
    --glow-a: rgba(62, 168, 100, 0.22);
    color-scheme: dark;
  }
}

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-app: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --container: 1200px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
}
:root[lang="ar"] {
  --font: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "SF Arabic", "Inter", system-ui, sans-serif;
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.i { width: 1em; height: 1em; flex: none; fill: currentColor; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* Ambient background: soft green glows + dot grid */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient__glow { position: absolute; border-radius: 50%; filter: blur(80px); }
.ambient__glow--a { width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; top: -25vw; inset-inline-end: -18vw; background: var(--glow-a); }
.ambient__glow--b { width: 45vw; height: 45vw; max-width: 700px; max-height: 700px; top: 30vh; inset-inline-start: -22vw; background: var(--glow-b); }
.ambient__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}

/* Section scaffolding */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section--tint { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }

.section__head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section__head--start { margin-inline: 0; text-align: start; }
.section__head h2 {
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
:root[lang="ar"] .section__head h2 { letter-spacing: 0; line-height: 1.3; }
.section__lead { margin-top: 18px; font-size: clamp(16px, 1.5vw, 19px); color: var(--text-2); text-wrap: pretty; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
:root[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }

.card-surface {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- 3. Header ---------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--page) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--border);
}
.nav { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav__brand img { width: 92px; height: auto; }
.nav__links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav__links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--bg-2); }
.nav__links a.is-active { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn .i { font-size: 17px; color: var(--text-2); }
.icon-btn--round { width: 38px; padding: 0; justify-content: center; position: relative; overflow: hidden; }
.icon-btn--round .i { position: absolute; transition: transform 0.5s var(--ease), opacity 0.3s; }
#lang-toggle span { font-family: "IBM Plex Sans Arabic", var(--font); }
:root[lang="ar"] #lang-toggle span { font-family: "Inter", var(--font); }

/* sun shows in dark mode (to switch to light), moon in light mode */
.i--sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.i--moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .i--sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .i--moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i--sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .i--moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
}

.nav__burger { display: none; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 1.8px; border-radius: 2px; background: var(--text); transition: transform 0.3s var(--ease); }
.nav__burger span:first-child { top: 15px; }
.nav__burger span:last-child { top: 21px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- 4. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 24px; border-radius: 16px;
  font-weight: 600; font-size: 16px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--sm { height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(62, 168, 100, 0.7); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(62, 168, 100, 0.8); }
.btn--ghost { border-color: var(--border); background: var(--bg); color: var(--text); }
.btn--ghost:hover { border-color: var(--brand-line); }
.btn--ghost .i { font-size: 18px; transition: transform 0.3s var(--ease); }
.btn--ghost:hover .i { transform: translateX(3px); }
:root[dir="rtl"] .i--flip { transform: scaleX(-1); }
:root[dir="rtl"] .btn--ghost:hover .i--flip { transform: scaleX(-1) translateX(3px); }

.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 24px 0 20px; border-radius: 16px;
  background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.store-btn:hover { transform: translateY(-2px); }
.store-btn:active { transform: scale(0.97); }
.store-btn .i { font-size: 30px; }
.store-btn__txt { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.store-btn__txt small { font-size: 11.5px; opacity: 0.8; font-weight: 500; }
.store-btn__txt b { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-family: -apple-system, "Inter", sans-serif; }
.store-btn--light { background: #fff; color: #0d0f11; }

.link-btn { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--brand-ink); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- 5. Hero ------------------------------------------------------ */
.hero { position: relative; padding: calc(var(--header-h) + clamp(32px, 6vw, 72px)) 0 0; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); animation: pulse 2.4s infinite; }

.hero__title {
  margin-top: 22px;
  font-size: clamp(48px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
}
:root[lang="ar"] .hero__title { letter-spacing: 0; line-height: 1.2; font-weight: 700; }
.hl {
  position: relative;
  color: var(--brand-text);
  background: linear-gradient(100deg, var(--brand) 0%, #63c47f 50%, #14b8a6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__lead { margin-top: 24px; max-width: 520px; font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: 14px; color: var(--text-2); }
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta .i { font-size: 16px; color: var(--brand-text); }

/* Stage */
.hero__stage { position: relative; height: clamp(560px, 62vw, 720px); display: grid; place-items: center; }
.hero__halo {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-a) 0%, transparent 65%);
}
.hero__halo::after {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 1px dashed var(--border-strong); opacity: 0.6;
  animation: spin 80s linear infinite;
}

/* Floating card base */
.float {
  position: absolute; z-index: 3;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--shadow-lg);
  border-radius: 20px;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
/* Bobbing uses the `translate` property, parallax uses `transform` — they compose */
.float { animation: bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); }

.fc-notif { top: 9%; inset-inline-start: -6%; width: 300px; padding: 12px; display: flex; gap: 12px; align-items: flex-start; }
.fc-notif__icon { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border); }
.fc-notif__body { flex: 1; min-width: 0; }
.fc-notif__top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0.03em; }
.fc-notif b { display: block; font-size: 14px; margin-top: 2px; }
.fc-notif p { font-size: 13px; color: var(--text-2); line-height: 1.4; }

.fc-streak { top: 40%; inset-inline-end: -4%; padding: 12px 18px 12px 12px; display: flex; gap: 12px; align-items: center; }
.fc-streak__flame { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); font-size: 22px; }
.fc-streak b { display: block; font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.fc-streak div span { font-size: 12.5px; color: var(--text-2); }

.fc-rating { bottom: 13%; inset-inline-start: -2%; padding: 12px 16px 12px 12px; display: flex; gap: 12px; align-items: center; }
.fc-rating__chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; }
.fc-rating__chip .i { font-size: 14px; }
.fc-rating small { display: block; font-size: 11.5px; color: var(--text-3); }
.fc-rating b { font-size: 15px; }

.fc-goal { bottom: 30%; inset-inline-end: 0%; padding: 12px 16px 12px 12px; display: flex; gap: 12px; align-items: center; }
.fc-goal .ring { width: 46px; height: 46px; }
.fc-goal b { display: block; font-size: 18px; line-height: 1.1; }
.fc-goal div span { font-size: 12.5px; color: var(--text-2); }

.fc-card {
  top: 2%; inset-inline-end: 4%; width: 150px; height: 104px; padding: 14px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--brand-line);
  rotate: 8deg;
}
:root[dir="rtl"] .fc-card { rotate: -8deg; }
.fc-card span { font-size: 11px; font-weight: 600; color: var(--brand-ink); }
.fc-card b { font-size: 19px; letter-spacing: -0.01em; }

/* Rings */
.ring__track { fill: none; stroke: var(--brand-track); stroke-width: 5; }
.ring__fill {
  fill: none; stroke: var(--brand-text); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0));
  transform: rotate(-90deg); transform-origin: center;
  transition: stroke-dashoffset 1.4s var(--ease);
}

/* Marquee */
.marquee {
  margin-top: clamp(40px, 6vw, 72px);
  border-block: 1px solid var(--border);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 22px 0; animation: marquee 40s linear infinite; }
.marquee__track span { font-size: 17px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.marquee__track i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: 0.6; }
:root[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }

/* ---------- 6. Phone + app screens -------------------------------------- */
/* The app is laid out at real iPhone points (393 × 852) and scaled with --s */
.phone {
  --s: 0.76;
  position: relative; z-index: 2;
  padding: calc(11px * var(--s) + 3px);
  border-radius: calc(66px * var(--s));
  background: linear-gradient(145deg, #2b3137, #0f1215 40%, #23292e);
  box-shadow: var(--shadow-phone), inset 0 0 0 1.5px rgba(255, 255, 255, 0.10), inset 0 0 0 4px #000;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.6s var(--ease);
}
.phone::before, .phone::after { /* side buttons */
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #22282d;
}
.phone::before { inset-inline-start: -2px; top: 22%; height: 9%; }
.phone::after { inset-inline-end: -2px; top: 28%; height: 13%; }

.phone__screen {
  position: relative; overflow: hidden;
  width: calc(393px * var(--s)); height: calc(852px * var(--s));
  border-radius: calc(55px * var(--s));
  background: var(--bg);
  isolation: isolate;
}

.app {
  position: absolute; top: 0; left: 0;
  width: 393px; height: 852px;
  transform: scale(var(--s)); transform-origin: top left;
  font-family: var(--font-app);
  font-size: 14px; line-height: 1.35;
  color: var(--text); background: var(--bg);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
[lang="ar"] .app, :root[lang="ar"] .app { font-family: -apple-system, BlinkMacSystemFont, "SF Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif; }
[data-force-lang="en"] .app { font-family: var(--font-app); }
.app small { font-size: 11px; }
.app b { font-weight: 600; }
.app .muted { color: var(--text-2); }

.app__status {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 54px;
  display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px;
  font-size: 16px; font-weight: 600; direction: ltr;
}
.app__island { position: absolute; left: 50%; top: 11px; translate: -50% 0; width: 124px; height: 36px; border-radius: 20px; background: #000; }
.app__sys { display: flex; gap: 5px; align-items: center; }
.app__sys i { display: block; height: 11px; border-radius: 3px; background: var(--text); }
.app__sys i:nth-child(1) { width: 17px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.app__sys i:nth-child(2) { width: 15px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; clip-path: polygon(50% 100%, 0 0, 100% 0); }
.app__sys i:nth-child(3) { width: 25px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--text); background: linear-gradient(90deg, var(--text) 75%, transparent 75%); background-clip: content-box; padding: 2.5px; }

.app__scroll { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; }
.app__viewport { position: relative; flex: 1; overflow: hidden; }

.app__large { padding: 64px 20px 12px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }

.bar { height: 6px; border-radius: 999px; background: var(--brand-track); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--brand-text); }

.app-btn {
  display: flex; align-items: center; justify-content: center;
  height: 44px; border-radius: 10px; border: 0;
  background: var(--brand-text); color: #fff; font-weight: 500; font-size: 14px; cursor: pointer;
}
.app-btn--sm { height: 36px; font-size: 13px; }
.app-btn--xs { display: inline-flex; height: 30px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; }

/* Home */
.h-head {
  display: flex; align-items: center; gap: 16px;
  padding: 62px 16px 16px; background: var(--bg-2);
}
.h-head > div { flex: 1; }
.h-head__greet { font-size: 14px; color: var(--text); }
.h-head__row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.h-head__row b { font-size: 16px; font-weight: 700; }
.streak-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); border: 1px solid var(--brand-text);
  color: var(--brand-text); font-size: 12px; font-weight: 700;
}
.streak-pill .i { font-size: 12px; }
.h-head__bell { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-text); color: #fff; font-size: 18px; }

.h-body { padding: 18px 20px 140px; display: flex; flex-direction: column; gap: 22px; }
.h-search {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  border-radius: 12px; background: var(--bg-2); color: var(--text-3); font-size: 14px;
}
.h-search .i { font-size: 16px; }
.h-sec { display: flex; flex-direction: column; gap: 14px; }
.h-sec__head { display: flex; justify-content: space-between; align-items: baseline; }
.h-sec__head b, .h-sec__title { font-size: 14px; font-weight: 500; }
.h-sec__head span { font-size: 12px; color: var(--brand-text); font-weight: 500; }

.h-decks { display: flex; gap: 12px; }
.deck { width: 160px; flex: none; padding: 12px; border-radius: 12px; background: var(--bg-2); display: flex; flex-direction: column; gap: 4px; }
.deck__cover { height: 72px; border-radius: 9px; margin-bottom: 10px; display: grid; place-items: center; font-size: 26px; }
.deck__cover--teal { background: var(--teal-soft); color: var(--teal); }
.deck__cover--purple { background: var(--purple-soft); color: var(--purple); }
.deck b { font-size: 14px; }
.deck__cat { font-size: 11px; color: var(--text-2); margin-bottom: 8px; }
.deck__meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); margin-top: 6px; }

.h-card { padding: 16px; border-radius: 12px; background: var(--bg-2); display: flex; flex-direction: column; gap: 16px; }
.h-card--outline { box-shadow: inset 0 0 0 1px var(--brand-line); }
.h-card hr { border: 0; height: 1px; background: var(--border); margin: 0; }
.h-stats { display: flex; gap: 20px; }
.h-stat { flex: 1; padding: 14px; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; position: relative; }
.h-stat b { font-size: 21px; font-weight: 700; color: var(--brand-text); }
.h-stat span { font-size: 11px; color: var(--text-2); }
.h-stat .i { position: absolute; top: 12px; inset-inline-end: 12px; color: var(--brand-text); font-size: 15px; }
.h-prog { display: flex; flex-direction: column; gap: 8px; }
.h-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.h-row b { font-weight: 500; font-size: 14px; }
.h-row small { color: var(--text-2); }
.h-row--muted { color: var(--text-2); }
.pct { padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--brand-text); font-size: 12px; font-weight: 500; }

.h-cat {
  display: flex; align-items: center; gap: 10px; height: 64px; padding: 12px; border-radius: 12px;
  background: linear-gradient(90deg, var(--bg), var(--brand-track));
  box-shadow: inset 0 0 0 1px var(--brand-line);
  margin-top: -10px;
}
:root[dir="rtl"] .h-cat, [dir="rtl"] .h-cat { background: linear-gradient(270deg, var(--bg), var(--brand-track)); }
[dir="ltr"] .h-cat { background: linear-gradient(90deg, var(--bg), var(--brand-track)); }
.h-cat__emoji { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); font-size: 20px; }
.h-cat > div { flex: 1; display: flex; flex-direction: column; }
.h-cat b { font-size: 14px; font-weight: 500; }
.h-cat small { color: var(--text-2); }
.h-cat__chev { color: var(--brand-text); font-size: 16px; }
[dir="rtl"] .h-cat__chev, [dir="rtl"] .h-cat__chev { transform: scaleX(-1); }

.h-streak { flex-direction: row; align-items: flex-start; gap: 16px; }
.h-streak__ico { width: 48px; height: 48px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--brand-text); font-size: 22px; }
.h-streak > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.h-streak b { font-size: 14px; font-weight: 500; }
.h-streak small { font-size: 12px; }
.h-streak__btn { padding: 7px 16px; border-radius: 10px; background: var(--bg); color: var(--text-2); font-size: 12px; font-weight: 500; }

/* Liquid Glass tab bar */
.tabbar { position: absolute; z-index: 6; left: 16px; right: 16px; bottom: 26px; display: flex; gap: 10px; align-items: center; }
.tabbar__glass {
  flex: 1; height: 64px; padding: 4px; border-radius: 999px;
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 0 0 0.5px var(--border), 0 10px 30px -10px rgba(0, 0, 0, 0.25);
}
.tab { flex: 1; height: 100%; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text); }
.tab .i { font-size: 22px; }
.tab small { font-size: 10px; font-weight: 500; }
.tab--on { color: var(--brand-text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.tabbar__add {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 26px; color: #fff; background: var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px -8px rgba(62, 168, 100, 0.8);
}

/* Progress screen */
.p-body { padding: 4px 20px 140px; display: flex; flex-direction: column; gap: 14px; }
.p-overall { align-items: center; padding: 22px; gap: 8px; text-align: center; }
.p-overall b { font-size: 14px; font-weight: 700; }
.p-ring { position: relative; width: 140px; height: 140px; margin-bottom: 14px; }
.p-ring svg { width: 100%; height: 100%; }
.p-ring svg .ring__track, .p-ring svg .ring__fill { stroke-width: 12; }
.p-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.p-ring > div b { font-size: 24px; font-weight: 700; }
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-mini { gap: 8px; }
.p-mini b { font-size: 21px; font-weight: 700; }
.p-week { gap: 12px; }
.p-week b { font-size: 14px; font-weight: 500; }
.p-week__bars { height: 112px; display: flex; align-items: flex-end; gap: 14px; padding: 0 4px; }
.p-week__bars span { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: var(--brand-track); transform-origin: bottom; }
.p-week__bars span.on { background: var(--brand-text); }
.p-week__days { display: flex; gap: 14px; padding: 0 4px; }
.p-week__days span { flex: 1; text-align: center; font-size: 11px; color: var(--text-2); }

/* Study screen */
.study__header { position: relative; margin-top: 56px; height: 44px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.study__header > b { position: absolute; left: 50%; translate: -50% 0; font-size: 14px; font-weight: 500; }
.study__icon { font-size: 18px; display: grid; place-items: center; width: 44px; height: 44px; margin-inline-start: -12px; }
[dir="rtl"] .study__icon .i, :root[dir="rtl"] .study__icon .i { transform: scaleX(-1); }
.study__count { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.study__count .i { font-size: 22px; color: var(--text); }
.study__bar { margin: 8px 20px 0; height: 4px; border-radius: 4px; background: var(--brand-track); overflow: hidden; }
.study__bar span { display: block; height: 100%; width: 0; background: var(--brand-text); border-radius: inherit; transition: width 0.5s var(--ease); }

.study__cardwrap { padding: 28px 20px 0; perspective: 1400px; }
.study__card {
  position: relative; height: 420px; cursor: grab;
  transform-style: preserve-3d;
  transition: transform 0.45s ease-in-out;
  touch-action: pan-y;
  outline: none;
}
.study__card.is-dragging { transition: none; cursor: grabbing; }
.study__card.is-flying { transition: transform 0.22s ease-in; }
.study__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center;
  border-radius: 20px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--brand-line), 0 18px 40px -22px rgba(0, 0, 0, 0.35);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.study__face--back { transform: rotateY(180deg); background: var(--bg-2); }
.study__lbl { font-size: 12px; font-weight: 500; color: var(--brand-text); }
.study__q { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.study__a { font-size: 21px; font-weight: 600; line-height: 1.35; max-width: 280px; }
.study__hint { position: absolute; bottom: 24px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.study__hint .i { font-size: 16px; }
.study__card:focus-visible .study__face { box-shadow: inset 0 0 0 2px var(--brand-text); }

.stamp {
  position: absolute; top: 24px; z-index: 3;
  padding: 6px 12px; border-radius: 10px; border: 3px solid currentColor;
  font-size: 21px; font-weight: 800; opacity: 0; pointer-events: none;
  backface-visibility: hidden;
}
.stamp--easy { left: 24px; color: var(--brand); rotate: -12deg; }
.stamp--hard { right: 24px; color: var(--error); rotate: 12deg; }

.study__rating { position: absolute; left: 20px; right: 20px; bottom: 54px; text-align: center; }
.study__rating p { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.study__btns { display: flex; gap: 10px; }
.rate {
  flex: 1; height: 44px; border: 0; border-radius: 12px; cursor: pointer;
  color: #fff; font-size: 12px; font-weight: 600;
  transition: transform 0.15s var(--ease), filter 0.2s;
}
.rate:hover { filter: brightness(1.08); }
.rate:active, .rate.is-pressed { transform: scale(0.93); }
.rate--again { background: var(--text-3); }
.rate--hard { background: var(--error); }
.rate--good { background: var(--brand-text); }
.rate--easy { background: var(--easy); }

.study__done {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 40px; text-align: center; background: var(--bg);
  animation: fadeUp 0.5s var(--ease) both;
}
.study__done[hidden] { display: none; }
.study__done h4 { font-size: 21px; font-weight: 700; }
.study__done p { font-size: 14px; color: var(--text-2); max-width: 260px; }
.study__done .app-btn { width: 100%; max-width: 300px; margin-top: 18px; }
.done__ring { position: relative; width: 160px; height: 160px; margin-bottom: 10px; }
.done__ring svg { width: 100%; height: 100%; }
.done__ring .ring__track, .done__ring .ring__fill { stroke-width: 10; }
.done__ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.done__ring b { font-size: 34px; font-weight: 700; }
.done__ring span { font-size: 12px; color: var(--text-2); }

.confetti { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: confetti 1.8s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }

/* ---------- 7. Sections -------------------------------------------------- */
/* Problem */
.problem { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: stretch; }
.curve { padding: 26px 26px 18px; display: flex; flex-direction: column; gap: 10px; }
.curve__legend { display: flex; gap: 20px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.lg i { width: 18px; height: 3px; border-radius: 3px; }
.lg--without i { background: repeating-linear-gradient(90deg, var(--error) 0 5px, transparent 5px 8px); }
.lg--with i { background: var(--brand); }
.curve__svg { width: 100%; height: auto; overflow: visible; }
.curve__note { font-size: 12.5px; color: var(--text-3); }
.curve__svg .axis { stroke: var(--border); stroke-width: 1; }
.curve__svg .gridline { stroke: var(--border); stroke-dasharray: 2 5; }
.curve__svg .tick { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.curve__svg .axis-title { fill: var(--text-2); font-size: 11.5px; font-weight: 600; font-family: var(--font); }
.curve__svg .line-without { fill: none; stroke: var(--error); stroke-width: 2.5; stroke-dasharray: 6 5; opacity: 0.85; }
.curve__svg .line-with { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.curve__svg .area-with { fill: url(#curveFill); }
.curve__svg .review-dot { fill: var(--bg); stroke: var(--brand); stroke-width: 2.5; }
.curve__svg .review-label { fill: var(--brand-ink); font-size: 10.5px; font-weight: 600; font-family: var(--font); }
.curve__svg .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.curve.is-visible .curve__svg .draw { animation: draw 2.2s var(--ease) forwards; }
.curve.is-visible .curve__svg .line-without.draw { animation-name: drawDashed; }
.curve__svg .fade { opacity: 0; transition: opacity 0.6s 1.4s; }
.curve.is-visible .curve__svg .fade { opacity: 1; }

.problem__list { display: flex; flex-direction: column; gap: 16px; }
.mini { display: flex; gap: 16px; padding: 22px; flex: 1; transition: transform 0.3s var(--ease), border-color 0.3s; }
.mini:hover { transform: translateY(-3px); border-color: var(--brand-line); }
.mini h3 { font-size: 17px; font-weight: 650; margin-bottom: 4px; }
.mini p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.mini__ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 19px; }
.mini__ico--rose { background: var(--rose-soft); color: var(--rose); }
.mini__ico--purple { background: var(--purple-soft); color: var(--purple); }
.mini__ico--teal { background: var(--teal-soft); color: var(--teal); }

/* Demo */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.demo__stage { position: relative; display: grid; place-items: center; }
.phone--demo { --s: 0.8; }
.sched { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.sched__top { display: flex; justify-content: space-between; align-items: center; }
.sched__label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
:root[lang="ar"] .sched__label { letter-spacing: 0; font-size: 13px; }
.sched__result { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; min-height: 1.4em; line-height: 1.25; color: var(--text); transition: color 0.3s; }
.sched__result.is-prompt { font-size: 16px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.sched__result em { font-style: normal; color: var(--brand-text); }
.rules { display: grid; gap: 6px; }
.rules li {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px;
  font-size: 14px; color: var(--text-2); transition: background-color 0.3s, color 0.3s;
}
.rules li.is-on { background: var(--bg-2); color: var(--text); }
.tag { flex: none; min-width: 74px; text-align: center; padding: 4px 10px; border-radius: 8px; color: #fff; font-size: 12.5px; font-weight: 600; }
.tag--again { background: var(--text-3); }
.tag--hard { background: var(--error); }
.tag--good { background: var(--brand-text); }
.tag--easy { background: var(--easy); }
.sched__history { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.history { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.history li {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px;
  background: var(--bg-2); font-size: 12.5px; font-weight: 500; animation: pop 0.4s var(--ease) both;
}
.history li i { width: 8px; height: 8px; border-radius: 50%; }
.history li span { color: var(--text-2); }
.sched__cap { font-size: 12.5px; color: var(--text-3); }

.toast {
  position: absolute; bottom: 22%; left: 50%; z-index: 10;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s, translate 0.4s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* Features bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  padding: 26px; border-radius: var(--r-lg);
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.tile:hover { transform: translateY(-4px); border-color: var(--brand-line); box-shadow: var(--shadow-lg); }
.tile::after { /* subtle spotlight that follows the cursor */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--glow-a), transparent 45%);
}
.tile:hover::after { opacity: 1; }
.tile h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; margin-top: 10px; }
.tile p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.tile__ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line); }
.tile--xl { grid-column: span 2; grid-row: span 2; justify-content: space-between; gap: 28px; }
.tile--xl h3 { font-size: clamp(22px, 2.2vw, 28px); }
.tile--xl p { font-size: 16px; max-width: 440px; }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; flex-direction: row; gap: 24px; align-items: center; }
.tile--wide .tile__text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tile__visual { margin-top: auto; }

.intervals { margin: 0; padding: 20px; border-radius: var(--r-md); background: var(--bg-2); }
.intervals figcaption { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.intervals__bars { height: 170px; display: flex; align-items: flex-end; gap: 12px; }
.intervals__bars div {
  flex: 1; height: max(var(--h), 18%); border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #63c47f, var(--brand));
  display: flex; justify-content: center; padding-top: 8px;
  transform: scaleY(0); transform-origin: bottom; transition: transform 1s var(--ease);
}
.intervals__bars div:nth-child(1) { height: 18%; opacity: 0.55; }
.intervals__bars div:nth-child(2) { height: 26%; opacity: 0.65; }
.intervals__bars div:nth-child(3) { height: 40%; opacity: 0.75; }
.intervals__bars div:nth-child(4) { height: 64%; opacity: 0.88; }
.intervals__bars b { color: #fff; font-size: 14px; font-weight: 700; }
.is-visible .intervals__bars div { transform: scaleY(1); }
.is-visible .intervals__bars div:nth-child(2) { transition-delay: 0.1s; }
.is-visible .intervals__bars div:nth-child(3) { transition-delay: 0.2s; }
.is-visible .intervals__bars div:nth-child(4) { transition-delay: 0.3s; }
.is-visible .intervals__bars div:nth-child(5) { transition-delay: 0.4s; }

.tr-mini { margin-top: auto; padding: 14px; border-radius: 14px; background: var(--bg-2); display: flex; flex-direction: column; gap: 12px; font-family: var(--font-app); }
.tr-mini__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-mini__stats div { padding: 10px; border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; }
.tr-mini__stats b { font-size: 20px; color: var(--brand-text); }
.tr-mini__stats span { font-size: 11px; color: var(--text-2); line-height: 1.3; }
.tr-mini__stats b span { font-size: inherit; color: inherit; }

.swipe-mini { position: relative; height: 70px; margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.swipe-mini__card { position: absolute; left: 50%; width: 64px; height: 70px; margin-left: -32px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--brand-line); animation: swing 3.4s ease-in-out infinite; }
.stamp-mini { padding: 3px 9px; border: 2px solid currentColor; border-radius: 8px; font-weight: 800; font-size: 13px; }
.stamp-mini--easy { color: var(--brand); rotate: -10deg; }
.stamp-mini--hard { color: var(--error); rotate: 10deg; }
[dir="rtl"] .swipe-mini { flex-direction: row-reverse; }
.tile--tall .swipe-mini { flex: 1; min-height: 180px; margin-top: 16px; border-radius: 16px; background: var(--bg-2); padding: 0 16px; }
.tile--tall .swipe-mini__card { width: 96px; height: 128px; margin-left: -48px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--brand-line), 0 14px 30px -14px rgba(0,0,0,.3); }
.tile--tall .stamp-mini { font-size: 15px; }

.notifs { position: relative; width: 300px; max-width: 48%; height: 110px; flex: none; }
.notif {
  position: absolute; inset: 14px 0 auto; display: flex; gap: 10px; padding: 12px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.notif img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px var(--border); }
.notif b { font-size: 13px; display: block; }
.notif p { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.notif--back { inset: 0 12px auto; z-index: -1; transform: scale(0.94); opacity: 0.6; filter: blur(0.4px); }

.aa { flex: none; display: flex; flex-direction: column; gap: 10px; width: 230px; max-width: 46%; }
.aa span {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--border);
  font-weight: 600; font-size: 15px;
}
.aa span em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand-ink); padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); }
.aa span[dir="rtl"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.modes { flex: none; display: flex; gap: 12px; width: 230px; max-width: 46%; }
.modes > div {
  flex: 1; padding: 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--border);
}
.modes > div i { display: block; height: 8px; border-radius: 4px; background: var(--card); }
.modes > div i:nth-child(2) { width: 70%; }
.modes > div i.b { height: 22px; border-radius: 7px; background: var(--brand); }
.modes > div:first-child { transform: rotate(-4deg); }
.modes > div:last-child { transform: rotate(4deg) translateY(6px); }

/* Progress section */
.prog { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.prog__stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.phone--prog { --s: 0.74; }
.fc-acc { bottom: 22%; inset-inline-start: 3%; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.fc-acc small { font-size: 12px; color: var(--text-2); }
.fc-acc b { font-size: 34px; line-height: 1; letter-spacing: -0.03em; }
.fc-acc__dots { display: flex; gap: 5px; }
.fc-acc__dots i { width: 26px; height: 6px; border-radius: 4px; background: var(--brand-track); }
.fc-acc__dots i.ok { background: var(--brand-text); }
.fc-share { top: 9%; inset-inline-end: -4%; padding: 12px; display: flex; gap: 12px; align-items: center; }
.fc-share__ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); font-size: 18px; }
.fc-share b { display: block; font-size: 14px; }
.fc-share small { font-size: 12px; color: var(--text-2); }

.points { display: flex; flex-direction: column; gap: 6px; }
.points li { display: flex; gap: 18px; padding: 18px 0; border-top: 1px solid var(--border); }
.points li:last-child { border-bottom: 1px solid var(--border); }
.points__n { font-size: 13px; font-weight: 700; color: var(--brand-ink); padding-top: 3px; font-variant-numeric: tabular-nums; }
.points h3 { font-size: 18px; font-weight: 650; margin-bottom: 4px; }
.points p { color: var(--text-2); font-size: 15px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 45px; inset-inline: 12.5%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--brand-line) 0 6px, transparent 6px 12px);
}
.step { position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-align: center; }
.step__n {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 18px;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--brand-line);
}
.step h3 { font-size: 18px; font-weight: 650; margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--text-2); }

/* Languages */
.duo { display: flex; justify-content: center; gap: clamp(24px, 6vw, 80px); align-items: flex-start; }
.duo__item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.duo__item--b { margin-top: 70px; }
.duo__item figcaption { font-size: 14px; font-weight: 600; color: var(--text-2); padding: 6px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.phone--duo { --s: 0.7; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.qa { border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); transition: border-color 0.3s; }
.qa[open] { border-color: var(--brand-line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 20px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  font-weight: 600; font-size: 16.5px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  background: linear-gradient(var(--text-2), var(--text-2)) center/12px 2px no-repeat, linear-gradient(var(--text-2), var(--text-2)) center/2px 12px no-repeat;
  transition: transform 0.3s var(--ease);
}
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 22px 20px; color: var(--text-2); font-size: 15px; animation: fadeUp 0.35s var(--ease); }

/* CTA */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 8vw, 96px) 24px; border-radius: var(--r-xl); text-align: center;
  background: #0d0f11; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  box-shadow: var(--shadow-lg);
}
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px); background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 70%);
}
.cta__glow { position: absolute; z-index: -1; width: 70%; height: 140%; top: 30%; left: 15%; border-radius: 50%; background: radial-gradient(closest-side, rgba(62, 168, 100, 0.45), transparent); filter: blur(30px); }
.cta__icon {
  width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 10px;
  background: #fff; box-shadow: 0 20px 50px -10px rgba(62, 168, 100, 0.6), inset 0 -2px 0 rgba(0, 0, 0, 0.06);
  animation: bob 6s ease-in-out infinite;
}
.cta__icon img { width: 40px; height: auto; }
.cta h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -0.035em; max-width: 720px; text-wrap: balance; }
:root[lang="ar"] .cta h2 { letter-spacing: 0; line-height: 1.3; }
.cta p { color: #c5d0d9; font-size: 18px; margin-bottom: 10px; }

/* ---------- 8. Footer ---------------------------------------------------- */
.footer { padding: 40px 0 48px; border-top: 1px solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__brand img { width: 84px; }
.footer__brand p { color: var(--text-2); font-size: 14px; }
.footer__social { display: flex; gap: 8px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-2); font-size: 17px; transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.footer__social a:hover { color: var(--brand-text); border-color: var(--brand-line); transform: translateY(-2px); }
.footer__legal { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-3); }

/* ---------- 9. Motion ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--rd, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--brand-soft); } 50% { box-shadow: 0 0 0 7px var(--brand-soft); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drawDashed { from { stroke-dasharray: 0 var(--len); } to { stroke-dasharray: var(--len) 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes swing { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-46px) rotate(-10deg); } 75% { transform: translateX(46px) rotate(10deg); } }
@keyframes confetti { to { transform: translateY(900px) rotate(720deg); opacity: 0.2; } }
@keyframes autoscroll { 0%, 12% { transform: translateY(0); } 45%, 60% { transform: translateY(var(--scroll, -300px)); } 92%, 100% { transform: translateY(0); } }

[data-scrolling] .h-body { animation: autoscroll 18s var(--ease) infinite; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--tall { grid-row: auto; }
  .fc-notif { inset-inline-start: -2%; width: 270px; }
}

@media (max-width: 960px) {
  .nav__links {
    position: absolute; top: calc(var(--header-h) - 4px); inset-inline: 16px;
    flex-direction: column; gap: 2px; padding: 8px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none;
    transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 12px 14px; font-size: 16px; }
  .nav__actions { margin-inline-start: auto; }
  .nav__burger { display: block; }

  .hero__grid, .demo, .prog, .faq, .problem { grid-template-columns: 1fr; }
  .hero__copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero__lead { margin-inline: auto; }
  .hero__ctas, .hero__meta { justify-content: center; }
  .hero__stage { height: 640px; margin-top: 12px; }
  .demo__copy { order: 2; }
  .prog__copy { order: -1; }
  .prog__stage { min-height: 600px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .nav__cta { display: none; }
  #lang-toggle { padding: 0 12px; }
  .hero__stage { height: 560px; }
  .phone--hero { --s: 0.64; }
  .phone--demo { --s: 0.74; }
  .phone--prog { --s: 0.62; }
  .phone--duo { --s: 0.42; }
  .duo { gap: 14px; }
  .duo__item--b { margin-top: 40px; }
  .fc-notif { top: 22%; inset-inline-start: 0; width: 230px; padding: 10px; }
  .fc-notif p { display: none; }
  .fc-card { display: none; }
  .fc-streak { top: 44%; inset-inline-end: 0; }
  .fc-goal { display: none; }
  .fc-rating { bottom: 6%; inset-inline-start: 0; }
  .fc-share { inset-inline-end: 0; top: 4%; }
  .fc-share .app-btn { display: none; }
  .fc-acc { bottom: 10%; }
  .bento { grid-template-columns: 1fr; }
  .tile--xl, .tile--wide { grid-column: auto; grid-row: auto; }
  .tile--wide { flex-direction: column; align-items: stretch; }
  .notifs { width: 100%; max-width: none; }
  .steps { grid-template-columns: 1fr; }
  .store-btn { height: 54px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__brand { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rules li { font-size: 13px; }
  .tag { min-width: 64px; }
}


/* ==========================================================================
   Contact form
   ========================================================================== */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__alt { display: flex; flex-direction: column; gap: 12px; }
.contact__alt li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); }
.contact__alt small { display: block; font-size: 12.5px; color: var(--text-3); }
.contact__alt a { font-weight: 600; color: var(--text); }
.contact__alt a:hover { color: var(--brand-ink); }
.contact__ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line); }

.form { position: relative; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow-lg); }
.form__body { display: flex; flex-direction: column; gap: 20px; }
.form__body[hidden], .form__done[hidden] { display: none; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 0; }
fieldset.field legend { margin-bottom: 8px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; }
.field__count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.field input, .field textarea {
  width: 100%; height: 50px; padding: 0 16px;
  border-radius: 14px; border: 1px solid var(--border-strong);
  background: var(--bg-2); color: var(--text);
  font: inherit; font-size: 15.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: var(--bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 14%, transparent); }
.field__err { font-size: 13px; color: var(--error); min-height: 0; }
.field__err:empty { display: none; }
:root[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
:root[dir="rtl"] .field input[dir="ltr"]::placeholder { text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg); font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all 0.2s var(--ease);
}
.chip:hover span { border-color: var(--brand-line); color: var(--text); }
.chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; inset-inline-start: -9999px; }

.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.form__consent { font-size: 13px; color: var(--text-2); max-width: 300px; }
.form__consent a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.form__send { min-width: 190px; position: relative; }
.form__send:disabled { opacity: 0.85; cursor: progress; }
.form__send .i { font-size: 18px; transition: transform 0.3s var(--ease); }
.form__send:hover .i { transform: translateX(3px); }
:root[dir="rtl"] .form__send:hover .i--flip { transform: scaleX(-1) translateX(3px); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.form__send.is-loading .spinner { display: block; }
.form__send.is-loading .i { display: none; }
.form__error { padding: 12px 14px; border-radius: 12px; font-size: 14px; color: var(--error); background: color-mix(in srgb, var(--error) 10%, transparent); border: 1px solid color-mix(in srgb, var(--error) 30%, transparent); }

.form__done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 10px; animation: fadeUp 0.5s var(--ease) both; outline: none; }
.form__done-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--brand); box-shadow: 0 0 0 10px var(--brand-soft); margin-bottom: 12px; animation: pop 0.5s var(--ease) both; }
.form__done h3 { font-size: 22px; }
.form__done p { color: var(--text-2); max-width: 340px; margin-bottom: 8px; }

.footer__links { display: flex; gap: 18px; }
.footer__links a { color: var(--text-2); font-weight: 500; }
.footer__links a:hover { color: var(--brand-ink); }

@media (max-width: 960px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form__row { grid-template-columns: 1fr; }
  .form__send { width: 100%; }
  .form__consent { max-width: none; }
}

/* ==========================================================================
   Legal page (privacy.html)
   ========================================================================== */
:root[lang="ar"] [data-only="en"], :root:not([lang="ar"]) [data-only="ar"] { display: none !important; }

.legal-hero { padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(32px, 5vw, 56px); }
.legal-hero .back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 28px; }
.legal-hero .back:hover { color: var(--brand-ink); }
.legal-hero .back .i { transform: scaleX(-1); }
:root[dir="rtl"] .legal-hero .back .i { transform: none; }
.legal-hero h1 { font-size: clamp(38px, 5.5vw, 64px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 800; }
:root[lang="ar"] .legal-hero h1 { letter-spacing: 0; line-height: 1.25; }
.legal-hero .meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.legal-hero .meta span { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); }

.legal { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; padding-bottom: clamp(80px, 10vw, 120px); }
.legal__toc { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.legal__toc b { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 8px; }
:root[lang="ar"] .legal__toc b { letter-spacing: 0; }
.legal__toc a { padding: 6px 12px; border-radius: 10px; color: var(--text-2); border-inline-start: 2px solid var(--border); }
.legal__toc a:hover { color: var(--text); background: var(--bg-2); }

.prose { max-width: 760px; font-size: 16.5px; line-height: 1.75; color: var(--text-2); }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 52px; font-size: 24px; line-height: 1.3; letter-spacing: -0.02em; color: var(--text); scroll-margin-top: calc(var(--header-h) + 20px); }
:root[lang="ar"] .prose h2 { letter-spacing: 0; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; font-size: 18px; color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose ul { padding-inline-start: 0; display: flex; flex-direction: column; gap: 10px; }
.prose ul li { position: relative; padding-inline-start: 22px; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.prose .lead { font-size: 19px; color: var(--text); }
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r-md); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--text); }
.callout .i { flex: none; font-size: 22px; color: var(--brand-text); margin-top: 3px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); background: var(--bg-2); }
:root[lang="ar"] .prose th { letter-spacing: 0; font-size: 13px; }
.prose td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

@media (max-width: 960px) {
  .legal { grid-template-columns: 1fr; }
  .legal__toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .legal__toc b { width: 100%; }
  .legal__toc a { border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; }
}

/* Navigation: keep links on one line at mid widths */
.nav__links a { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1140px) {
  .nav { gap: 14px; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 8px 9px; font-size: 13.5px; }
  .nav__cta { display: none; }
}
