/* Abu Al-Azayem Arabic typography safety layer.
 * Loaded after theme/Elementor/component styles so Cairo headings never collide vertically.
 */
:root{
  /* Global type scale: no readable UI text may go below 12px. */
  --az-text-xs:12px;
  --az-text-sm:13px;
  --az-text-base:14px;
  --az-text-md:16px;
  --az-text-lg:18px;

  --az-title-sm:20px;
  --az-title-md:24px;
  --az-title-lg:30px;
  --az-title-xl:clamp(36px,4.6vw,52px);
  --az-title-hero:clamp(40px,5.4vw,64px);

  --az-line-tight:1.4;
  --az-line-ui:1.6;
  --az-line-copy:1.8;
  --az-heading-lh:1.42;
  --az-heading-lh-compact:1.36;
  --az-body-lh:1.9;

  --az-space-text-xs:4px;
  --az-space-text-sm:8px;
  --az-space-text-md:14px;
  --az-space-heading:18px;
}

:is(.azp-landing,.azpub,.aza-auth,.azd-app) :is(h1,h2,h3,h4,h5,h6){
  font-family:"Cairo",sans-serif!important;
  line-height:var(--az-heading-lh)!important;
  letter-spacing:0!important;
  text-wrap:balance;
  overflow-wrap:normal;
  word-break:normal;
}

:is(.azp-landing,.azpub) :is(h1,h2){
  line-height:1.44!important;
}

:is(.aza-auth,.azd-app) :is(h1,h2){
  line-height:1.42!important;
}

:is(.azp-landing,.azpub,.aza-auth,.azd-app) :is(p,li,small){
  font-family:"Cairo",sans-serif;
}

.azp-hero__copy h1,
.azpub-copy h1,
.aza-visual__copy h1{
  padding-block:3px 5px;
}

.azp-hero__copy h1{margin-bottom:24px!important}
.azpub-copy h1{margin-bottom:24px!important}
.aza-visual__copy h1{margin-bottom:18px!important}

.azp-heading h2{margin-bottom:16px!important}
.azp-final h2{line-height:1.42!important;margin-bottom:14px!important}
.azp-final p{line-height:var(--az-body-lh)!important}

.azpub-problems h3,
.azpub-roles h3,
.azp-feature h3,
.azp-step h3,
.azp-price h3,
.azp-demo__fallback h3{
  line-height:1.5!important;
}

.azd-top h1,
.azd-onboarding h2,
.azd-card__head h3,
.azd-page-head h2,
.azd-modal__dialog h3,
.azd-child-identity h2,
.azd-student-welcome h2{
  line-height:1.45!important;
}

.azp-hero__copy,
.azpub-copy,
.azp-heading,
.azp-final__inner>div,
.aza-visual__copy,
.azd-top>div,
.azd-page-head>div{
  min-width:0;
  height:auto;
}

@media(max-width:760px){
  :is(.azp-landing,.azpub) :is(h1,h2){
    line-height:1.48!important;
  }
  .azp-hero__copy h1,
  .azpub-copy h1{
    padding-block:4px 6px;
    margin-bottom:20px!important;
  }
}

@media(max-width:480px){
  :is(.azp-landing,.azpub,.aza-auth) :is(h1,h2){
    line-height:1.5!important;
  }
}


/* Dashboard/game minimum readable scale.
 * Keep component hierarchy while enforcing a 12px floor.
 */
.azd-app :is(
  .azd-settings-footer small,
  .azd-profile-photo__hint,
  .azd-profile-fields label>small,
  .azd-profile-password__head p,
  .azd-profile-password__grid label>small,
  .azd-profile-readonly span,
  .azd-profile-readonly small,
  .azd-time-field>span,
  .azd-calendar-simple__identity small,
  .azd-select__empty,
  .azd-select__hint,
  .azd-calendar-feed small,
  .azd-calendar-provider small,
  .azd-calendar-status,
  .azd-side__account small,
  .azd-btn--compact,
  .azd-availability-row label:not(.azd-availability-day)>span
){
  font-size:var(--az-text-xs)!important;
  line-height:var(--az-line-ui);
}

.azd-app :is(
  .azd-settings-bottom-grid>.azd-calendar-simple>.azd-card__head p,
  .azd-settings-bottom-grid>.azd-account-card>.azd-card__head p,
  .azd-profile-photo__copy p,
  .azd-profile-fields label>span,
  .azd-profile-fields input,
  .azd-profile-password__grid label>span,
  .azd-password-field input,
  .azd-profile-message,
  .azd-select__search input,
  .azd-settings-section .azd-card__head p,
  .azd-settings-view .azd-form label>small,
  .azd-unsaved-state
){
  font-size:var(--az-text-sm)!important;
}

.azd-logout-btn::after{
  font-size:var(--az-text-xs)!important;
  line-height:var(--az-line-ui)!important;
}

.azg-engine-badge{
  font-size:var(--az-text-xs)!important;
  line-height:1.4!important;
}

.azg-hidden-intro__targets b{
  font-size:var(--az-text-sm)!important;
}

/* Native Elementor / Gutenberg headings use the same Arabic vertical rhythm. */
.elementor-heading-title,
.wp-block-heading,
.entry-content :is(h1,h2,h3,h4,h5,h6){
  font-family:"Cairo",sans-serif!important;
  line-height:1.45!important;
  letter-spacing:0!important;
  text-wrap:balance;
  overflow-wrap:normal;
  word-break:normal;
}

.elementor-widget-text-editor :is(p,li),
.entry-content :is(p,li){
  line-height:1.9;
}


/* Global platform typography rhythm. */
:where(
  .azp-landing,
  .azpub,
  .azp-public-header,
  .azp-public-footer,
  .az-site-header,
  .az-site-footer,
  .aza-auth,
  .azd-app,
  .azpay-shell,
  .azi-page,
  .azl-page,
  .aza-app,
  .azm-app,
  .azc-page,
  .azc-room,
  .azc-prejoin,
  .azc-exit-gate,
  .azg-library
) :where(h1,h2,h3,h4,h5,h6){
  font-family:"Cairo",sans-serif;
  line-height:var(--az-heading-lh);
  letter-spacing:0;
  text-wrap:balance;
}

:where(
  .azp-landing,
  .azpub,
  .aza-auth,
  .azd-app,
  .azpay-shell,
  .azi-page,
  .azl-page,
  .aza-app,
  .azm-app,
  .azc-page,
  .azc-room,
  .azc-prejoin,
  .azc-exit-gate,
  .azg-library
) :where(p,li,small){
  line-height:var(--az-line-copy);
}

:where(
  .azp-public-header,
  .azp-public-footer,
  .az-site-header,
  .az-site-footer,
  .aza-auth,
  .azd-app,
  .azpay-shell,
  .azi-page,
  .azl-page,
  .aza-app,
  .azm-app,
  .azc-page,
  .azc-room,
  .azc-prejoin,
  .azc-exit-gate,
  .azg-library
) :where(a,button,label,input,textarea,select){
  line-height:var(--az-line-ui);
}

/* Native content hierarchy follows the same scale. */
.entry-content h1{font-size:var(--az-title-xl)}
.entry-content h2{font-size:var(--az-title-lg)}
.entry-content h3{font-size:var(--az-title-md)}
.entry-content h4{font-size:var(--az-title-sm)}
.entry-content :where(p,li){font-size:var(--az-text-base);line-height:var(--az-body-lh)}
.entry-content small{font-size:var(--az-text-xs);line-height:var(--az-line-copy)}
