/* Tamiyouz Phase 28 — RTL/LTR and keyboard accessibility.
   Progressive enhancement, public site only; no WordPress content changes. */
html[dir="rtl"], html[dir="ltr"] {
  --tyz28-focus: #955b16;
  --tyz28-focus-halo: rgba(245,198,115,.36);
  scroll-padding-top: clamp(78px, 8vw, 108px);
}
html[data-tyz-theme="dark"][dir], html[data-tj-theme="dark"][dir] {
  --tyz28-focus: #f4c982;
  --tyz28-focus-halo: rgba(244,201,130,.22);
}
html[dir] body :is(a[href],button:not(:disabled),input:not([type="hidden"]),textarea,select,summary,[role="button"],[tabindex]):focus-visible {
  outline: 3px solid var(--tyz28-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px var(--tyz28-focus-halo);
}
html[dir] body :is(input,select,textarea):focus-visible {
  border-color: var(--tyz28-focus) !important;
}
html[dir] body [disabled], html[dir] body [aria-disabled="true"] {
  cursor: not-allowed;
}
html[dir] body .tyz28-skip {
  position: fixed;
  inset-inline-start: 14px;
  top: 10px;
  z-index: 2147483646;
  max-width: min(88vw, 320px);
  padding: 12px 20px;
  border: 2px solid #e9c58b;
  border-radius: 12px;
  background: #12243d;
  color: #ffffff;
  font: 800 14px/1.6 "Tajawal","Noto Sans Arabic",Arial,sans-serif;
  text-decoration: none;
  transform: translateY(calc(-100% - 25px));
  opacity: 0;
  pointer-events: none;
}
html[dir] body .tyz28-skip:focus-visible {
  transform: none;
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid #e9c58b !important;
  outline-offset: 2px !important;
}
html[dir] body main.tyz28-main-target:focus {
  outline: none;
}
html[dir="rtl"] body :is(input[type="email"],input[type="tel"],input[type="url"],input[inputmode="email"],input[inputmode="tel"]) {
  direction: ltr;
  text-align: left;
}
html[dir] body :is(input[type="email"],input[type="tel"],input[type="url"],input[inputmode="email"],input[inputmode="tel"])::placeholder {
  text-align: start;
}
html[dir="rtl"] #tyz-global-header .tyz-header__nav-list,
html[dir="rtl"] #tyz-global-header .tyz-header__mobile-list {
  direction: rtl;
}
html[dir="ltr"] #tyz-global-header .tyz-header__nav-list,
html[dir="ltr"] #tyz-global-header .tyz-header__mobile-list {
  direction: ltr;
}
html[dir] #tyz-global-header :is(.tyz-header__link,.tyz-header__mobile-link)[aria-current="location"],
html[dir] #tyz-global-header :is(.tyz-header__link,.tyz-header__mobile-link)[aria-current="page"] {
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
html[dir] :is(#tyz-premium-blog,#tyz-premium-article,#tyz-home-v21,body.tyz-site-v1) :is(h1,h2,h3) {
  overflow-wrap: break-word;
}
html[dir] #tyz-premium-article .tyz-pa-prose :is(a,blockquote,figcaption) {
  overflow-wrap: anywhere;
}
html[dir] #tyz-premium-blog .tyz-pb-hero__actions,
html[dir] #tyz-premium-article .tyz-pa-hero__buttons,
html[dir] #tyz-premium-article .tyz-pa-share__buttons {
  min-width: 0;
}
html[dir] body :is(.tyz-header__theme-toggle,.tyz-header__burger,.tyz-header__language,.tyz-pa-toc-toggle,.tyz24-action) {
  touch-action: manipulation;
}
@media (prefers-contrast: more) {
  html[dir] { --tyz28-focus: #804b00; --tyz28-focus-halo: rgba(128,75,0,.2); }
  html[data-tyz-theme="dark"][dir] { --tyz28-focus: #ffe4ae; --tyz28-focus-halo: rgba(255,228,174,.18); }
  html[dir] #tyz-premium-blog { --pb-gold: #815113; --pb-soft: #35465a; }
  html[data-tyz-theme="dark"][dir] #tyz-premium-blog { --pb-gold: #f5d497; --pb-soft: #d5dce5; }
  html[dir] #tyz-premium-article { --pa-gold: #805015; --pa-muted: #425065; }
  html[data-tyz-theme="dark"][dir] #tyz-premium-article { --pa-gold: #f5d497; --pa-muted: #e0e5ed; }
  html[dir] body :is(input,select,textarea) { border-width: 2px; }
}
@media (forced-colors: active) {
  html[dir] body :is(a,button,input,select,textarea):focus-visible {
    outline: 3px solid Highlight !important;
    box-shadow: none !important;
  }
  html[dir] body .tyz28-skip {
    color: CanvasText;
    background: Canvas;
    border-color: Highlight;
    forced-color-adjust: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[dir],html[dir] :is(body,main) { scroll-behavior: auto !important; }
  html[dir] body *,html[dir] body *::before,html[dir] body *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html[dir] body .tyz28-skip { transition: none !important; }
}
