/* Arabic public-page reading scale. Keep application UI, navigation, prices
   and the independently sized product illustrations outside these selectors. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) {
  --tg-ar-hero-size: clamp(32px, 3.4vw, 48px);
  --tg-ar-section-size: clamp(26px, 2.4vw, 32px);
  --tg-ar-card-size: clamp(20px, 1.6vw, 22px);
  --tg-ar-body-size: 18px;
  --tg-ar-lead-size: clamp(18px, 1.5vw, 20px);
  --tg-ar-support-size: 16px;
}

/* Real page and section headings, rather than every heading in a demo. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-page-hero .display-1,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-plans-intro .display-1,
html[lang="ar"] .tg-home-page .tgvg .tgvg__message h1,
html[lang="ar"] .tg-feature-page .tgh3 h1 {
  font-size: var(--tg-ar-hero-size);
  line-height: 1.3;
  letter-spacing: normal;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .display-4,
html[lang="ar"] .tg-home-page .tgm .tgm__headline,
html[lang="ar"] .tg-home-page .tgwatch h2,
html[lang="ar"] .tg-home-page .tgsubjects .tgsubjects__title,
html[lang="ar"] .tg-home-page .tg-institutions__heading h2,
html[lang="ar"] .tg-feature-page .tgm .tgm__headline,
html[lang="ar"] .tg-contact-page .tg-contact-card h2,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-content > section > h2 {
  font-size: var(--tg-ar-section-size);
  line-height: 1.4;
  letter-spacing: normal;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) :is(.tg-feature-card, .tg-problem-card, .tg-readiness-card, .tg-step-card) > h3,
html[lang="ar"] .tg-contact-page .tg-control-panel__heading h3,
html[lang="ar"] .tg-contact-page .tg-section .card h3,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-public-plan-card .card-title,
html[lang="ar"] .tg-feature-page :is(.tg-benefit-card, .tg-feature-detail) > h3,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-content > section > h3 {
  font-size: var(--tg-ar-card-size);
  line-height: 1.45;
  letter-spacing: normal;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .lead,
html[lang="ar"] .tg-home-page .tgvg .tgvg__intro,
html[lang="ar"] .tg-home-page .tgm .tgm__lead,
html[lang="ar"] .tg-home-page .tgwatch__intro,
html[lang="ar"] .tg-home-page .tgsubjects .tgsubjects__intro,
html[lang="ar"] .tg-home-page .tg-founder__copy .lead,
html[lang="ar"] .tg-feature-page .tgm .tgm__lead,
html[lang="ar"] .tg-feature-page .tgh3 .tgh3__intro,
html[lang="ar"] .tg-trust-page .tg-trust-hero .tg-copy-wide {
  font-size: var(--tg-ar-lead-size);
  line-height: 1.75;
}

/* Paragraphs and lists in reading content; no body-wide inherited resize. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) :is(.tg-feature-card, .tg-problem-card, .tg-readiness-card, .tg-step-card) > p,
html[lang="ar"] .tg-contact-page .tg-section p:not(.lead):not(.tg-eyebrow),
html[lang="ar"] .tg-contact-page .tg-check-list,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .accordion-wrapper .card-body > p,
html[lang="ar"] .tg-feature-page .tg-benefit-card > p,
html[lang="ar"] .tg-feature-page .tg-feature-detail :is(p, li),
html[lang="ar"] .tg-feature-page .tg-product-copy > p:not(.lead):not(.tg-eyebrow),
html[lang="ar"] .tg-feature-page .tg-product-copy .tg-check-list,
html[lang="ar"] .tg-home-page .tg-founder__copy > p:not(.lead):not(.tg-eyebrow) {
  font-size: var(--tg-ar-body-size);
  line-height: 1.8;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-content,
html[lang="ar"] .tg-trust-page .tg-trust-content,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-content :is(p, ul, ol) {
  font-size: var(--tg-ar-body-size);
  line-height: 1.8;
}

/* Plan prose and comparison rows share the reading scale. Prices keep their
   existing type, direction, values and currency treatment. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-plan-card__description,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-public-plan-card .tg-plan-allowance,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-public-plan-card .tg-plan-features {
  font-size: var(--tg-ar-body-size);
  line-height: 1.8;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-plan-card__note {
  font-size: var(--tg-ar-support-size);
  line-height: 1.75;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-public-plan-card .badge {
  font-size: 14px;
  line-height: 1.5;
}

/* Eyebrows label sections; they should remain readable beside Arabic prose. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-page-hero .tg-eyebrow,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-section .tg-eyebrow,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-plans-intro__eyebrow,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-cta-band__copy .tg-eyebrow,
html[lang="ar"] .tg-home-page :is(.tgvg__eyebrow, .tgm__eyebrow, .tgwatch__eyebrow, .tgsubjects__eyebrow),
html[lang="ar"] .tg-home-page :is(.tg-founder__copy, .tg-institutions__heading) > .tg-eyebrow,
html[lang="ar"] .tg-feature-page :is(.tg-feature-section-heading, .tg-home-section-heading, .tg-product-copy) .tg-eyebrow,
html[lang="ar"] .tg-feature-page .tgm__section-header .tgm__eyebrow,
html[lang="ar"] .tg-feature-page .tgh3__eyebrow,
html[lang="ar"] .tg-contact-page .tg-control-panel__heading .tg-ui-label {
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: normal;
}

/* Policy sidebars and notices stay subordinate without becoming tiny. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-nav h2,
html[lang="ar"] .tg-trust-page .tg-legal-nav h2 {
  font-size: 20px;
  line-height: 1.45;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-nav ol,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-contact,
html[lang="ar"] .tg-trust-page .tg-trust-status,
html[lang="ar"] .marketing-page:not(.tg-auth-page) .tg-legal-hero__meta {
  font-size: var(--tg-ar-support-size);
  line-height: 1.75;
}

html[lang="ar"] .tg-trust-page .tg-trust-reviewed,
html[lang="ar"] .tg-trust-page .tg-legal-contact .h6 {
  font-size: 15px;
  line-height: 1.75;
}

/* Theme rules use physical alignment and icon offsets for FAQ questions.
   Mirror only the public accordion; its disclosure behavior is unchanged. */
html[lang="ar"] .marketing-page:not(.tg-auth-page) .accordion-wrapper .card-header button {
  /* The theme's original question size is !important. */
  font-size: var(--tg-ar-card-size) !important;
  line-height: 1.45;
  text-align: start;
  padding-inline: 1.4rem 3.6rem;
}

html[lang="ar"] .marketing-page:not(.tg-auth-page) .accordion-wrapper .card-header button::before {
  left: auto;
  right: auto;
  inset-inline-end: 1.3rem;
}

html[lang="ar"] #faqAccordion .card-header button > .fs-13 {
  /* Preserve the topic's supporting role above the full-size question. */
  font-size: 14px !important;
  line-height: 1.6;
}

/* The founder page uses the older public layout without .marketing-page:not(.tg-auth-page). */
html[lang="ar"] #team-title {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.3;
}

html[lang="ar"] .tg-founder-profile h2 {
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.4;
}

html[lang="ar"] #team-title + p,
html[lang="ar"] .tg-founder-profile p {
  font-size: 18px;
  line-height: 1.8;
}

/* The same footer appears on every public route, including account pages. */
html[lang="ar"] .tg-marketing-footer > .container {
  padding-block: clamp(40px, 5vw, 64px) !important;
}
html[lang="ar"] .tg-marketing-footer {
  font-size: 16px;
  line-height: 1.75;
}
html[lang="ar"] .tg-marketing-footer .widget-title {
  font-size: 18px;
  line-height: 1.5;
}
html[lang="ar"] .tg-marketing-footer .tg-footer-wordmark {
  font-size: 28px;
  line-height: 1.4;
}
html[lang="ar"] .tg-marketing-footer .tg-footer-membership {
  font-size: 14px;
  line-height: 1.6;
}
html[lang="ar"] .tg-marketing-footer .tg-footer-bottom {
  margin-top: 32px !important;
  padding-top: 24px !important;
  font-size: 15px;
  line-height: 1.7;
}

/* Guest error pages use the older shell, outside .marketing-page. */
html[lang="ar"] .tg-public-error .container { padding-block: 36px !important; }
html[lang="ar"] .tg-public-error .display-3 { font-size: 48px; line-height: 1.3; }
html[lang="ar"] .tg-public-error h2 { font-size: 26px; line-height: 1.45; }
html[lang="ar"] .tg-public-error :is(p, .lead) { font-size: 18px; line-height: 1.8; }
html[lang="ar"] .tg-public-error .text-muted { color: #405466 !important; }
html[lang="ar"] .tg-public-error .badge { font-size: 15px; line-height: 1.6; background: #a73314 !important; }
html[lang="ar"] .tg-public-error .card-body { padding: 24px !important; }
html[lang="ar"] .tg-public-error .card-body > .d-flex.align-items-center {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start !important;
}
html[lang="ar"] .tg-public-error .icon.btn { width: 48px; height: 48px; margin: 0 !important; padding: 0; }
html[lang="ar"] .tg-public-error .btn { min-height: 48px; max-inline-size: 100%; font-size: 17px; line-height: 1.6; white-space: normal; }
html[lang="ar"] .tg-public-error .btn-primary { color: #fff; background: #a73314; border-color: #a73314; }
html[lang="ar"] .tg-public-error .btn-outline-primary { color: #a73314; border-color: #a73314; }
html[lang="ar"] .tg-public-error .btn-outline-primary:hover { color: #fff; background: #a73314; }

html[lang="ar"] .tg-auth-plan-context > .small {
  font-size: 15px;
  line-height: 1.7;
  color: #405466 !important;
}
html[lang="ar"] .tg-auth-page .tg-auth-plan-context > h2,
html[lang="ar"] .tg-verification-page .tg-verification-content .tg-auth-plan-context > h2 {
  font-size: 20px;
  line-height: 1.5;
}
html[lang="ar"] :is(.tg-reset-page, .tg-verification-page) .btn-primary {
  color: #fff;
  background: #a73314;
  border-color: #a73314;
}
html[lang="ar"] :is(.tg-reset-page, .tg-verification-page) .btn-primary:is(:hover, :focus-visible) {
  color: #fff;
  background: #892b12;
  border-color: #892b12;
}

/* Email preferences intentionally keeps its small, standalone Bootstrap shell. */
html[lang="ar"] .tg-email-preferences-page { font-size: 18px; line-height: 1.8; }
html[lang="ar"] .tg-email-preferences-page h1 { font-size: 26px; line-height: 1.45; }
html[lang="ar"] .tg-email-preferences-page .btn {
  min-height: 48px;
  max-inline-size: 100%;
  font-size: 17px;
  line-height: 1.6;
  white-space: normal;
}
