/* تحسينات الاستخدام وإمكانية الوصول (تُحمَّل آخر ملف CSS) */

/* تركيز لوحة المفاتيح واضح */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid #f2ca50!important;outline-offset:2px;border-radius:6px}

/* ملاحظة التنويه: سطر واحد على الموبايل */
.disc-note a{text-decoration:underline}
@media(max-width:700px){
  .disc-note{white-space:nowrap;overflow:hidden;font-size:12.5px!important;padding:6px 10px!important;line-height:1.5}
  .disc-note .disc-long{display:none}
  .disc-note a{display:inline-flex;align-items:center;min-height:44px;margin:-14px 0;padding:0 4px}
}

/* الصفحة الرئيسية: نهاية تدرّج العنوان أفتح فوق الصورة */
.gold{background:linear-gradient(180deg,#fff6d2,#f3cd68 55%,#e0b04a)!important;-webkit-background-clip:text!important;background-clip:text!important}

/* تصفّح بحرية: بحث + عنوان + بانر */
#rulerSearch{text-overflow:ellipsis}
@media(max-width:600px){
  .kbd-hint,#rulerSearch+div{display:none!important}
  #rulerSearch{padding-left:12px!important}
  .pylon-hero{padding-top:5rem!important}
  .lintel{height:56px!important}
  .scarab{width:62%!important}
  .pylon-hero p{margin-top:.6rem}
}
h1.cartouche{font-family:"Reem Kufi","Noto Serif",serif!important;font-weight:500!important;letter-spacing:.03em!important;word-spacing:.12em;line-height:1.55!important;text-shadow:0 2px 0 rgba(0,0,0,.35)!important}
@media(min-width:701px){
  .pylon-hero h1.cartouche{max-width:68%;margin-inline:auto}
  .pylon-hero>p{max-width:68%;margin-inline:auto}
}
h1.cartouche::after{display:none!important}

/* بطاقات الحكام: خلفية مكان الصورة وقت التحميل */
#rulersGrid .ruler-card>div:first-of-type,#rulersGrid img{background:#13244f}
#rulersGrid img{aspect-ratio:338/600}

/* ملف الحاكم: الزر الثانوي وتباين النص */
#btn-chat{background:rgba(212,175,55,.16)!important;color:#ffe08a!important;border:1px solid rgba(242,202,80,.55)!important}
#btn-chat:hover{background:rgba(212,175,55,.28)!important;color:#fff!important}

/* أهداف اللمس 44px */
@media(pointer:coarse),(max-width:820px){
  #clearChatBtn,#voiceRecordBtn{min-width:44px;min-height:44px}
  .prompt-chip,.era-btn,.open-modal-btn{min-height:44px}
  .sources-notice a,a[href="about.html#sources"]{min-height:44px}
  nav[aria-label] a,.bc a,#bc a{min-height:44px}
}

/* صفحة المحادثة: هيدر مرتب، إدخال 44px، شرائح الأسئلة */
#messageInput{min-height:44px}
@media(max-width:700px){
  html body .fs-chat>.chat-head{padding:6px 10px!important;gap:8px;flex-wrap:nowrap!important;align-items:center}
  html body .fs-chat .chat-id{flex:1 1 auto;min-width:0;gap:8px!important;flex-wrap:nowrap!important}
  html body .fs-chat .chat-avatar{width:36px!important;height:36px!important;flex:0 0 36px;min-width:36px!important}
  html body .fs-chat .chat-id>div:last-child{min-width:0;flex:1 1 auto}
  html body .fs-chat .chat-id>div:last-child>div{flex-wrap:wrap;gap:2px 8px}
  html body .fs-chat #chatHeaderRulerName{font-size:15px!important;line-height:1.35;white-space:normal}
  html body .fs-chat .chat-id .bg-primary\/10{display:none}
  html body .fs-chat .chat-head>div:last-child{flex:0 0 auto;gap:0}
  html body .fs-chat .chat-head>div:last-child .w-px{display:none}
  html body .fs-chat #clearChatBtn{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0!important;margin:0!important}
  html body .fs-chat #promptChipsContainer{scroll-snap-type:x proximity;padding-inline:2px;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%)}
  html body .fs-chat #promptChipsContainer .prompt-chip{scroll-snap-align:center;min-height:44px}
  html body .fs-chat #messageInput{min-height:44px;font-size:16px}
  html body .fs-chat #sendBtn,html body .fs-chat #voiceRecordBtn{min-height:44px}
}

/* أيقونة الحساب في الهيدر: دايرة ثابتة مش بيضاوية */
header a[href="about.html"][class*="rounded-full"]{flex:0 0 auto!important;width:36px!important;height:36px!important;min-width:36px!important;aspect-ratio:1}
@media(max-width:700px){header a[href="about.html"][class*="rounded-full"]{width:44px!important;height:44px!important;min-width:44px!important}}
@media(min-width:701px){.pylon-hero h1.cartouche{font-size:clamp(1.9rem,3.2vw,2.5rem)!important}}
@media(min-width:701px){
  .pylon-hero h1.cartouche{align-self:center;margin-inline:auto!important}
  .pylon-hero p{max-width:66%;margin-inline:auto!important;text-align:center}
}
