:root{--green:#16854f;--green2:#2fae63;--dark:#17271f;--ink:#1f2622;--muted:#718078;--line:#dfe8e2;--soft:#f5f8f6;--red:#cf2f36;--gold:#bba85b}
*{box-sizing:border-box} body{margin:0;font-family:"Tajawal",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:#fff;color:var(--ink)} a{color:inherit;text-decoration:none}.wrap{max-width:1280px;margin:auto;padding:0 18px}
.utility{background:#f3f6f4;border-bottom:1px solid var(--line);font-size:13px}.utility .wrap{display:flex;justify-content:space-between;padding-top:8px;padding-bottom:8px}.utility-links,.social{display:flex;gap:16px;align-items:center}
.masthead .wrap{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;padding-top:18px;padding-bottom:18px}.logo{display:flex;align-items:center;gap:12px;justify-self:end}.logo .mark{width:54px;height:54px;border-radius:12px;background:linear-gradient(145deg,var(--green2),var(--green));position:relative}.logo .mark:after{content:"";position:absolute;inset:14px 11px;background:white;clip-path:polygon(8% 53%,19% 43%,28% 45%,35% 29%,55% 20%,67% 13%,89% 7%,81% 29%,73% 35%,70% 47%,60% 57%,57% 72%,47% 81%,34% 78%,25% 84%,17% 76%,19% 64%)}.logo h1{margin:0;color:var(--green);font-size:30px}.logo small{letter-spacing:2px}.strap{text-align:center;font-size:13px;color:#52635a;line-height:1.7}.header-ad{height:72px;border:1px dashed #b8c7be;border-radius:10px;display:grid;place-items:center;color:#7b8b82;font-size:13px;max-width:300px}
.nav{background:var(--dark)}.nav .wrap{display:flex;flex-wrap:wrap}.nav a{color:#fff;padding:14px 17px;font-size:15px;border-left:1px solid #2a3b32;font-family:var(--font-head);font-weight:600;line-height:1.45}.nav a.active,.nav a:hover{background:var(--green)}
.breaking{border-bottom:1px solid var(--line)}.breaking .wrap{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding-top:8px;padding-bottom:8px}.breaking b{background:var(--red);color:white;padding:7px 12px;border-radius:4px}.ticker{overflow:hidden;white-space:nowrap;font-size:15px;line-height:1.6;direction:rtl}
.ticker-track{display:inline-flex;align-items:center;gap:14px;min-width:max-content;animation:ahqafTicker 34s linear infinite}
.ticker:hover .ticker-track{animation-play-state:paused}
.ticker-link{color:#222;text-decoration:none;font-weight:600}
.ticker-link:hover{text-decoration:underline;color:var(--green)}
.ticker-link.is-sports{font-weight:700}
.ticker-sep{color:#b53a3a;font-size:20px;line-height:1}
.live{font-size:13px;color:var(--red);white-space:nowrap}
@keyframes ahqafTicker{0%{transform:translateX(-5%)}100%{transform:translateX(55%)}}
@media(max-width:760px){.ticker{font-size:14px}.ticker-track{animation-duration:26s}.ticker-sep{font-size:18px}}
.main{padding:18px 0 40px}.classic-top{display:grid;grid-template-columns:minmax(0,2.35fr) 250px 265px;gap:16px;align-items:start;direction:ltr}.classic-top>*{direction:rtl}
.main-column{min-width:0}.below-lead-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:12px;direction:ltr;align-items:start}.below-lead-layout>*{direction:rtl}.below-lead-content{min-width:0}
.tower-ad{height:600px;border-radius:12px;background:linear-gradient(180deg,#134a35,#0e3226);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:9px;margin-top:12px}.tower-ad strong{font-size:30px}.tower-ad small{opacity:.85}
.panel,.legacy-section,.survey,.cta-box,.heritage-tease{border:1px solid var(--line);border-radius:12px;background:white;box-shadow:0 3px 10px rgba(15,45,28,.035)}.section-head{display:flex;justify-content:space-between;align-items:center;padding:12px 13px;border-bottom:1px solid var(--line)}.section-head h3,.section-head h2{margin:0}.section-head a{font-size:12px;color:var(--green)}
.writers-mini{padding:4px 12px}.writer-mini{display:flex;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid #edf1ee}.writer-mini:last-child{border-bottom:0}.avatar{width:42px;height:42px;border-radius:50%;background:linear-gradient(145deg,#c9ded1,#edf6f0);flex:none}.writer-mini strong{font-size:13px;display:block}.writer-mini p{font-size:11px;color:var(--muted);margin:4px 0 0}
.sidebar-actions{display:grid;gap:10px;margin-top:10px}.sidebar-action{display:block;text-align:center;padding:15px 10px;background:var(--green);color:white;border-radius:8px;font-weight:bold}.sidebar-action.heritage{background:#0f6c43}.survey{margin-top:10px;padding:12px}.survey label{display:block;padding:7px 0;font-size:13px}.btn{background:var(--green);color:#fff;border:0;border-radius:7px;padding:9px 16px;cursor:pointer}
.latest-item{display:flex;gap:10px;padding:10px 12px;border-bottom:1px solid #eef2ef}.latest-item .thumb{width:60px;height:52px;border-radius:7px;background:#cfe0d6;flex:none}.latest-item h4{font-size:13px;margin:0 0 6px}.small{font-size:11px;color:var(--muted)}.promo-card{height:160px;margin-top:12px;border-radius:10px;background:linear-gradient(145deg,#c9ddd0,#eef5f0);display:flex;align-items:flex-end;padding:15px;font-weight:bold}.ad-space{height:370px;margin-top:12px;border:2px dashed #d2d8d4;border-radius:10px;display:grid;place-items:center;text-align:center;color:#a06b6b;font-weight:bold;background:#fafafa}
.lead-shell{border-radius:13px;overflow:hidden;border:1px solid var(--line)}.lead-stage{height:365px;position:relative;background:#19231d}.lead-slide{position:absolute;inset:0;opacity:0;transition:opacity .6s ease;background:var(--slide-bg);background-size:cover;background-position:center center;background-repeat:no-repeat;display:block}.lead-slide.active{opacity:1;z-index:2}.lead-slide .visual{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.04) 0%,rgba(0,0,0,.06) 58%,rgba(0,0,0,.18) 100%)}.lead-copy{position:absolute;right:22px;left:22px;bottom:48px;color:white;z-index:3;text-align:center;background:rgba(7,20,14,.46);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);padding:7px 12px 6px;border-radius:9px;max-width:calc(100% - 44px);box-sizing:border-box}.lead-copy h2{font-size:16px;line-height:1.45;text-align:center;margin:0 0 4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:600}.meta{font-size:13px;opacity:.9;text-align:center}.lead-numbers{position:absolute;left:0;right:0;bottom:0;height:36px;display:flex;justify-content:center;align-items:center;gap:4px;z-index:5;background:rgba(10,18,13,.75)}.lead-numbers button{width:34px;height:28px;border:1px solid rgba(255,255,255,.35);background:#33423a;color:#fff;border-radius:3px;cursor:pointer;font-weight:bold}.lead-numbers button.active{background:#6cc522;border-color:#6cc522}
.legacy-section{margin-top:12px;overflow:hidden}.legacy-title{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(105deg,var(--green2) 0 58%,var(--dark) 58%);color:white;padding:10px 13px}.legacy-title h3,.legacy-title h2{margin:0;font-size:18px}.legacy-title a{border:1px solid rgba(255,255,255,.6);padding:5px 11px;border-radius:15px;font-size:12px}
.lead-news-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:10px}.sports-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:10px}.mini-story,.sport-story{border:1px solid var(--line);padding:7px;background:white}.mini-img,.sport-img{height:105px;background:linear-gradient(145deg,#dbe7df,#b7ccbf)}.mini-story h4,.sport-story h4{margin:9px 0 4px;font-size:13px}.mini-story p,.sport-story p{font-size:11px;line-height:1.6;color:#65736b;margin:0}.synced.active{outline:2px solid #7fc83e}
.section{margin-top:20px}.cards4{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-top:12px}.story-card{border:1px solid var(--line);border-radius:10px;overflow:hidden}.story-photo{height:140px;background:#d4e3da}.story-body{padding:11px}.story-body h4{margin:6px 0}.poetry-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:12px}.poem{border:1px solid var(--line);border-radius:10px;padding:12px;text-align:center}.poem .avatar{margin:auto}.poem h5{margin:8px 0}.poem p{font-size:12px;line-height:1.8}.regions{display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.region{background:#f0f6f2;border:1px solid #d6e4db;padding:15px;border-radius:9px;text-align:center}
.footer{background:#17231d;color:#dce5df;padding:30px 0;margin-top:20px}.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:25px}.footer h4{color:white}.footer p{font-size:13px;line-height:1.8}.copy{border-top:1px solid #334039;margin-top:20px;padding-top:15px;font-size:12px}
/* content pages */.page-hero{padding:30px 0;background:#f2f7f4;border-bottom:1px solid var(--line)}.page-hero h1{margin:0 0 8px}.grid5{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-top:18px}.heritage-card,.writer-card,.video-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:white}.heritage-card .photo,.video-card .photo{height:150px;background:linear-gradient(145deg,#d8e6dd,#b9cdbf)}.heritage-card .body,.writer-card .body,.video-card .body{padding:12px}.heritage-card h3{font-size:15px;margin:0 0 7px}.heritage-card p{font-size:12px;color:#66746c;line-height:1.7}.form-card{max-width:760px;margin:25px auto;border:1px solid var(--line);border-radius:12px;padding:20px;background:white}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:grid;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:13px;font-weight:bold}.field input,.field textarea{padding:11px;border:1px solid #ccd8d1;border-radius:8px;font:inherit}.field textarea{min-height:140px}.notice{padding:12px;border-radius:8px;background:#eef7f1;color:#245a3f;font-size:13px;line-height:1.7}.dashboard{display:grid;grid-template-columns:220px 1fr;gap:18px;margin-top:22px}.dash-side{border:1px solid var(--line);border-radius:10px;padding:13px;height:max-content}.dash-side a{display:block;padding:10px;border-bottom:1px solid #edf1ee}.editor{border:1px solid var(--line);border-radius:12px;padding:18px}.editor textarea{min-height:360px}.status-pill{display:inline-block;background:#fff0c8;color:#7c5b00;padding:6px 10px;border-radius:20px;font-size:12px}
.pagination{display:flex;justify-content:center;gap:6px;margin:24px 0}.pagination a{border:1px solid var(--line);padding:8px 12px;border-radius:6px}.pagination a.active{background:var(--green);color:#fff}
@media(max-width:1050px){.classic-top{grid-template-columns:minmax(0,1fr) 240px}.main-column{grid-column:1}.latest-column{grid-column:2;grid-row:1}.writers-column{grid-column:2;grid-row:2}.below-lead-layout{grid-template-columns:150px minmax(0,1fr)}.tower-ad{height:520px}.cards4{grid-template-columns:repeat(2,1fr)}.regions{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.masthead .wrap{grid-template-columns:1fr}.logo,.header-ad{justify-self:center}.strap{order:3}.classic-top{display:block}.latest-column,.writers-column{margin-top:14px}.below-lead-layout{display:block}.tower-ad{height:220px;margin-top:12px;position:static}.lead-stage{height:330px}.lead-copy h2{font-size:15px}.lead-news-grid,.sports-grid{grid-template-columns:1fr 1fr}.poetry-strip,.grid5{grid-template-columns:1fr 1fr}.cards4,.footer-grid{grid-template-columns:1fr 1fr}.regions{grid-template-columns:1fr 1fr}.dashboard{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.nav .wrap{overflow-x:auto;flex-wrap:nowrap}.nav a{white-space:nowrap}}
@media(max-width:480px){.lead-news-grid,.sports-grid,.poetry-strip,.grid5,.cards4,.footer-grid,.regions{grid-template-columns:1fr}.lead-copy{right:12px;left:12px}.lead-copy h2{font-size:14px}}
.custom-logo{max-height:82px;width:auto}.logo .custom-logo-link{display:block}.article-page{max-width:920px;margin:28px auto;background:#fff;padding:28px;border-radius:14px;border:1px solid #e3e8e5}.article-page h1{font-size:36px;line-height:1.5}.article-hero{width:100%;height:auto;border-radius:12px;margin:18px 0}.article-content{font-size:19px;line-height:2}.poetry-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}.poem-card{background:#fff;border:1px solid #e2e8e4;border-radius:12px;padding:16px;text-align:center}.poem-card img{border-radius:50%}.writer-form{display:grid;gap:16px}.writer-form label{display:grid;gap:7px;font-weight:700}.writer-form input,.writer-form textarea{padding:12px;border:1px solid #ccd7d1;border-radius:8px}.notice{padding:12px;border:1px solid #ddd;border-radius:8px;margin-bottom:15px}.notice.success{background:#eef9f1;border-color:#a7d9b2}.ht-ad-link img{max-width:100%;height:auto;display:block}.latest-item{text-decoration:none;color:inherit}.promo-card a{color:inherit;text-decoration:none}.story-card a,.poem a{color:inherit;text-decoration:none}@media(max-width:900px){.poetry-grid{grid-template-columns:repeat(2,1fr)}.article-page h1{font-size:28px}}@media(max-width:560px){.poetry-grid{grid-template-columns:1fr}}
/* V1.1 — intelligent use of formerly empty spaces */
.left-rail{display:grid;gap:12px;align-content:start;margin-top:12px}.left-rail .tower-ad{margin-top:0}.rail-panel,.smart-fill{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 3px 10px rgba(15,45,28,.035)}.rail-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:linear-gradient(105deg,var(--green2) 0 58%,var(--dark) 58%);color:#fff}.rail-head h3{font-size:15px;margin:0}.rail-head a{font-size:11px;border:1px solid rgba(255,255,255,.55);padding:4px 9px;border-radius:12px}.rank-item{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:start;padding:10px 9px;border-bottom:1px solid #edf1ee}.rank-item:last-child{border-bottom:0}.rank-item span{width:25px;height:25px;border-radius:50%;background:#eef6f1;color:var(--green);display:grid;place-items:center;font-weight:700;font-size:12px}.rank-item strong{font-size:12px;line-height:1.55}.video-today-card{display:block;padding:9px}.video-today-card img,.video-fallback{width:100%;height:105px;object-fit:cover;border-radius:8px;background:linear-gradient(145deg,#d8e6dd,#adc8b8)}.video-fallback{display:grid;place-items:center;font-size:34px;color:#fff}.video-today-card strong{display:block;font-size:12px;line-height:1.55;margin-top:8px}.smart-fill{margin-top:12px}.smart-item{display:flex;gap:9px;padding:10px;border-bottom:1px solid #edf1ee}.smart-item:last-child{border-bottom:0}.smart-thumb{width:72px;height:62px;object-fit:cover;border-radius:7px;background:linear-gradient(145deg,#dbe7df,#b7ccbf);flex:none}.smart-item strong{font-size:12px;line-height:1.5;display:block}.smart-item p{font-size:11px;line-height:1.55;color:var(--muted);margin:4px 0 0}.ad-space.filled{height:auto;min-height:220px;padding:8px;background:#fff;border-style:solid}.ad-space.filled .ht-ad-link{display:block;width:100%}.ad-space.filled img{width:100%;height:auto;max-height:420px;object-fit:contain;border-radius:7px}
@media(max-width:1050px){.left-rail .rail-panel{display:none}}
@media(max-width:760px){.left-rail{display:block}.left-rail .rail-panel{display:block;margin-top:12px}.left-rail .tower-ad{height:220px}.smart-fill{margin-top:14px}}

/* V1.2 */
.ht-writer-avatar{object-fit:cover;border-radius:50%;background:#d8e8de}.writer-form input[type=file]{background:#f7faf8}.lead-numbers button{cursor:pointer}.lead-numbers button.active{background:#78c72d!important;color:#fff!important;border-color:#78c72d!important}


/* V1.3 — modern Arabic typography */
:root{--font-ui:"Tajawal",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;--font-head:"Noto Kufi Arabic","Tajawal",sans-serif}
body,button,input,textarea,select{font-family:var(--font-ui)}
h1,h2,h3,.logo h1,.legacy-title h2,.legacy-title h3,.rail-head h3,.section-head h2,.section-head h3,.page-hero h1,.article-page h1{font-family:var(--font-head);letter-spacing:0;font-weight:700}
.btn,.sidebar-action,.lead-numbers button{font-family:var(--font-ui);font-weight:700}.nav a{font-family:var(--font-head);font-weight:600}
.lead-copy h2{font-family:var(--font-head);font-weight:600;line-height:1.45;font-size:16px}
.article-content{font-family:var(--font-ui);font-weight:400;line-height:2.05}
.writer-mini strong,.latest-item h4,.mini-story h4,.sport-story h4,.story-body h4,.heritage-card h3{font-weight:700}
.logo small{font-family:var(--font-ui);letter-spacing:1.4px}
@media(max-width:760px){.lead-copy{right:14px;left:14px;padding:7px 9px}.lead-copy h2{font-size:15px;line-height:1.45}}

.writers-empty{padding:20px 14px;text-align:center;color:#60736a;font-size:14px;line-height:1.8;background:#f7faf8;border-radius:10px}

/* V1.5 — full homepage modules */
.articles-home .story-body p,.compact-cards .story-body p{font-size:12px;line-height:1.7;color:var(--muted);margin:6px 0 0}.home-split{display:grid;grid-template-columns:1fr 1fr;gap:18px}.home-module{min-width:0}.compact-cards{grid-template-columns:repeat(2,1fr)}.video-grid-home{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:12px}.video-home-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}.video-media{position:relative}.video-media img,.video-placeholder{width:100%;height:155px;object-fit:cover;background:linear-gradient(145deg,#d8e6dd,#adc8b8)}.video-placeholder{display:grid;place-items:center;font-size:38px;color:#fff}.play-badge{position:absolute;inset:auto auto 10px 10px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,.68);color:#fff;display:grid;place-items:center}.video-home-card strong{display:block;padding:10px 12px;font-size:14px;line-height:1.5}.regions-six .region{display:grid;gap:7px}.regions-six .region strong{font-family:var(--font-head);font-size:17px;color:var(--green)}.regions-six .region span{font-size:11px;color:var(--muted);line-height:1.6}.module-empty{grid-column:1/-1;border:1px dashed #bfd0c5;background:#f7faf8;border-radius:10px;padding:28px;text-align:center;color:#65766d;font-size:13px}.home-ad-wide{min-height:110px;border:1px dashed #b8c7be;border-radius:12px;display:grid;place-items:center;overflow:hidden;background:#fbfdfb}.home-ad-wide .ht-ad-link{width:100%;display:block}.home-ad-wide img{width:100%;max-height:180px;object-fit:contain;display:block}.heritage-fallback{background:linear-gradient(145deg,#d9ccb0,#8c7254)}.history-fallback{background:linear-gradient(145deg,#d9ded6,#a7b0a4)}
@media(max-width:900px){.home-split{grid-template-columns:1fr}.compact-cards,.video-grid-home{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.compact-cards,.video-grid-home{grid-template-columns:1fr}}

/* Ahqaf Today identity */
.ahqaf-logo{min-width:300px;max-width:520px}.ahqaf-default-logo{display:block;width:100%;height:auto;max-height:104px;object-fit:contain}.masthead .wrap{grid-template-columns:1fr minmax(300px,520px) 1fr}.strap strong{color:var(--green)}
@media(max-width:900px){.masthead .wrap{grid-template-columns:1fr}.ahqaf-logo{min-width:0;max-width:420px;justify-self:center}.ahqaf-default-logo{max-height:90px}}
@media(max-width:560px){.ahqaf-logo{max-width:330px}.ahqaf-default-logo{max-height:76px}}


/* Ahqaf Today 1.6.3 — homepage section limits
   Desktop/tablet: queries return up to 4 items.
   Mobile: show only the newest 2 items and leave "المزيد" for the full archive. */
@media (max-width:760px){
  .home .lead-news-grid > *:nth-child(n+3),
  .home .sports-grid > *:nth-child(n+3),
  .home .articles-home .cards4 > *:nth-child(n+3),
  .home .editorial .cards4 > *:nth-child(n+3),
  .home .poetry-strip > *:nth-child(n+3),
  .home .home-split .compact-cards > *:nth-child(n+3),
  .home .video-grid-home > *:nth-child(n+3),
  .home .history-home .cards4 > *:nth-child(n+3){
    display:none !important;
  }
}


/* Ahqaf Today 1.8.0 — final upper-home arrangement */
.ahqaf-x-highlight{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;margin-top:14px}
.ahqaf-x-highlight .rail-head{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;background:#f5f8f6;border-bottom:1px solid var(--line)}
.ahqaf-x-highlight .rail-head h3{margin:0;font-family:var(--font-head);font-size:17px;color:var(--dark)}
.x-highlight-body{padding:12px 13px 14px;line-height:1.75}
.x-highlight-body p{margin:5px 0 10px;font-size:13px;color:#3a4941}
.x-account{font-size:12px;font-weight:700;color:var(--green)}
.x-link{display:block;background:var(--green);color:#fff;text-align:center;padding:8px 10px;border-radius:8px;font-size:12px;font-weight:700}
.x-link:hover{background:var(--dark)}
.writers-poll{margin-top:14px}




/* Ahqaf Today 1.8.2 — exact upper-layout correction */
.ahqaf-inline-ad{
  margin-top:14px;
}
.ahqaf-inline-ad-inner{
  min-height:205px;
  border:1px dashed #b7c6bd;
  border-radius:10px;
  background:linear-gradient(135deg,#eef6f1,#fbfcfb);
  color:#74857c;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:21px;
  font-weight:700;
}

/* X stays in the writers/right column */
.ahqaf-x-highlight{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  margin-top:14px
}
.ahqaf-x-highlight .rail-head{
  padding:10px 12px;
  background:#f5f8f6;
  border-bottom:1px solid var(--line)
}
.ahqaf-x-highlight .rail-head h3{
  margin:0;
  font-size:16px;
  color:var(--dark);
  font-family:var(--font-head)
}
.x-highlight-body{padding:11px 12px 13px;line-height:1.7}
.x-highlight-body p{margin:5px 0 9px;font-size:13px;color:#3a4941}
.x-account{font-size:12px;font-weight:700;color:var(--green)}
.x-link{
  display:block;
  background:var(--green);
  color:#fff;
  text-align:center;
  padding:8px 9px;
  border-radius:7px;
  font-size:12px;
  font-weight:700
}

@media(max-width:1050px){
  .sports-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .sports-grid{grid-template-columns:1fr}
  .ahqaf-inline-ad-inner{min-height:120px;font-size:17px}
}


/* Ahqaf Today 1.8.3 — corrected final top composition */
.classic-top{align-items:stretch}
.writers-column{
  display:flex;
  flex-direction:column;
  align-self:stretch;
  min-height:100%;
}
.writers-upper{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1 1 auto;
}
.writers-panel{flex:0 0 auto}
.writers-poll{margin-top:0}
.writers-column .survey{margin-top:0}

/* Keep the X cards at the same lower level as the center advertisement. */
.x-stack{
  margin-top:auto;
  min-height:205px;
  display:flex;
  flex-direction:column;
}
.x-stack .x-highlight-body{flex:1}
.x-card{
  padding:10px 0;
  border-bottom:1px solid #e7ede9;
}
.x-card:last-child{border-bottom:0}
.x-card p{margin:5px 0 7px;font-size:12px;line-height:1.65;color:#3e4c45}
.x-card a{font-size:12px;color:var(--green);font-weight:700}
.x-empty{
  min-height:135px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:16px;
  color:#718078;
  font-size:12px;
  line-height:1.7;
}

/* Center advertisement should align visually with the X module. */
.ahqaf-inline-ad-inner{
  min-height:205px;
}

/* Four sports cards across on desktop. */
.sports-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

/* Keep writer area visually continuous down to the X/ad row. */
.writers-upper > .panel,
.writers-upper > .sidebar-actions,
.writers-upper > .writers-poll{
  width:100%;
}

@media(max-width:1050px){
  .writers-column{display:block}
  .x-stack{margin-top:14px;min-height:0}
}


/* Ahqaf Today 1.8.4 — fill the blank upper area without touching writers column */
.ahqaf-upper-fill{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(260px,.75fr);
  gap:14px;
  margin:14px 0 24px;
  align-items:stretch;
}
.ahqaf-fill-ad,
.ahqaf-fill-x{
  min-width:0;
}
.ahqaf-fill-ad-inner{
  min-height:230px;
  height:100%;
  border:1px dashed #b7c6bd;
  border-radius:12px;
  background:linear-gradient(135deg,#eef6f1,#fbfcfb);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#74857c;
  font-size:22px;
  font-weight:700;
}
.ahqaf-fill-x{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.ahqaf-fill-x .rail-head{
  padding:10px 12px;
  background:#f5f8f6;
  border-bottom:1px solid var(--line);
}
.ahqaf-fill-x .rail-head h3{
  margin:0;
  font-size:16px;
  color:var(--dark);
  font-family:var(--font-head);
}
.ahqaf-fill-x .x-highlight-body{
  padding:10px 12px 12px;
}
.ahqaf-fill-x .x-card{
  padding:9px 0;
  border-bottom:1px solid #e7ede9;
}
.ahqaf-fill-x .x-card:last-child{border-bottom:0}
.ahqaf-fill-x .x-card p{margin:4px 0 7px;font-size:12px;line-height:1.65}
.ahqaf-fill-x .x-card a{font-size:12px;color:var(--green);font-weight:700}
.ahqaf-fill-x .x-empty{
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:16px;
  color:#718078;
  font-size:12px;
  line-height:1.7;
}

/* Writers column remains continuous and untouched by the fill row */
.writers-column{
  align-self:stretch;
}
.writers-upper{
  min-height:100%;
}

@media(max-width:900px){
  .ahqaf-upper-fill{grid-template-columns:1fr}
  .ahqaf-fill-ad-inner{min-height:160px}
}


/* Ahqaf Today 1.8.5 — fix top grid after 1.8.4 */
@media (min-width:1051px){
  .classic-top{
    display:grid;
    grid-template-columns:minmax(0,2.35fr) 250px 265px;
    gap:16px;
    align-items:start;
  }

  .main-column{
    grid-column:1;
    grid-row:1;
  }

  .latest-column{
    grid-column:2;
    grid-row:1;
  }

  .writers-column{
    grid-column:3;
    grid-row:1 / span 2;
    align-self:start;
  }

  .ahqaf-upper-fill{
    grid-column:1 / span 2;
    grid-row:2;
    margin-top:14px;
    margin-bottom:10px;
  }
}

/* Keep medium screens stable as two-column layout */
@media (min-width:761px) and (max-width:1050px){
  .ahqaf-upper-fill{
    grid-column:1 / span 2;
    grid-row:2;
  }
}


/* Ahqaf Today 1.8.6 — place X + ad in the blank area under sports/latest only */
@media (min-width:1051px){
  .ahqaf-upper-fill{
    /* span under main + latest, but visually skip the left rail area */
    grid-column:1 / span 2;
    grid-row:2;
    direction:ltr;
    margin:14px 0 14px 162px; /* 150px rail + 12px internal gap */
    width:calc(100% - 162px);
    grid-template-columns:minmax(0,1.65fr) minmax(250px,.78fr);
    gap:16px;
    align-items:stretch;
  }

  .ahqaf-upper-fill > *{
    direction:rtl;
  }

  .ahqaf-fill-ad{order:1;}
  .ahqaf-fill-x{order:2;}

  .ahqaf-fill-ad-inner{
    min-height:210px;
  }

  .ahqaf-fill-x .x-empty{
    min-height:210px;
  }
}

@media (min-width:761px) and (max-width:1050px){
  .ahqaf-upper-fill{
    margin-left:0;
    width:auto;
    direction:ltr;
  }
  .ahqaf-upper-fill > *{direction:rtl;}
}


/* Ahqaf Today 1.8.7 — final placement for upper blank area */
.ahqaf-upper-fill{display:none !important}

.ahqaf-sports-ad{
  margin-top:14px;
}
.ahqaf-sports-ad-inner{
  min-height:220px;
  border:1px dashed #b7c6bd;
  border-radius:12px;
  background:linear-gradient(135deg,#eef6f1,#fbfcfb);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#74857c;
  font-size:22px;
  font-weight:700;
}

.ahqaf-latest-x{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.ahqaf-latest-x .rail-head{
  padding:10px 12px;
  background:#f5f8f6;
  border-bottom:1px solid var(--line);
}
.ahqaf-latest-x .rail-head h3{
  margin:0;
  font-size:16px;
  color:var(--dark);
  font-family:var(--font-head);
}
.ahqaf-latest-x .x-highlight-body{
  padding:10px 12px 12px;
}
.ahqaf-latest-x .x-card{
  padding:9px 0;
  border-bottom:1px solid #e7ede9;
}
.ahqaf-latest-x .x-card:last-child{border-bottom:0}
.ahqaf-latest-x .x-card p{
  margin:4px 0 7px;
  font-size:12px;
  line-height:1.65;
}
.ahqaf-latest-x .x-card a{
  font-size:12px;
  color:var(--green);
  font-weight:700;
}
.ahqaf-latest-x .x-empty{
  min-height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:16px;
  color:#718078;
  font-size:12px;
  line-height:1.7;
}

@media(max-width:760px){
  .ahqaf-sports-ad-inner{min-height:130px;font-size:17px}
  .ahqaf-latest-x .x-empty{min-height:120px}
}


/* =========================================================
   AHQAF TODAY 2.0.0 — APPROVED GREEN VISUAL / FINAL TOP
   Explicit grid. No experimental offsets or overflow tricks.
   ========================================================= */

.ahqaf-green-top{
  display:grid;
  grid-template-columns:190px minmax(0,1fr) 250px 265px;
  grid-template-areas:
    "lead lead latest writers"
    "left center latest writers"
    "left ad ad writers";
  gap:14px 16px;
  align-items:start;
  direction:ltr;
}

.ahqaf-green-top > *{
  direction:rtl;
  min-width:0;
}

.ahqaf-final-lead{
  grid-area:lead;
  margin:0;
}

.ahqaf-final-left{
  grid-area:left;
  margin:0;
  display:grid;
  gap:12px;
  align-content:start;
}

.ahqaf-final-left .tower-ad{
  margin:0;
  height:390px;
}

.ahqaf-final-center{
  grid-area:center;
  min-width:0;
}

.ahqaf-final-center .legacy-section:first-child{
  margin-top:0;
}

.ahqaf-final-latest{
  grid-area:latest;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

.ahqaf-final-latest > .panel{
  margin:0;
}

.ahqaf-final-latest .ahqaf-latest-x{
  margin:0;
}

.ahqaf-final-writers{
  grid-area:writers;
  align-self:start;
}

.ahqaf-final-horizontal-ad{
  grid-area:ad;
  min-width:0;
  overflow:hidden;
  border-radius:10px;
}

.ahqaf-final-horizontal-ad .ht-ad-link{
  display:block;
  width:100%;
}

.ahqaf-final-horizontal-ad img{
  display:block;
  width:100%;
  height:120px;
  object-fit:cover;
  border-radius:10px;
}

.ahqaf-final-ad-placeholder{
  min-height:120px;
  border:1px dashed #b7c6bd;
  border-radius:10px;
  background:linear-gradient(135deg,#eef6f1,#fbfcfb);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#74857c;
  font-size:21px;
  font-weight:700;
}

/* Slider proportions from the approved green visual */
.ahqaf-final-lead .lead-stage{
  height:365px;
}

/* News and sports: four cards */
.ahqaf-final-center .lead-news-grid,
.ahqaf-final-center .sports-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

/* X directly below Latest News */
.ahqaf-final-latest .ahqaf-latest-x{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}

.ahqaf-final-latest .ahqaf-latest-x .rail-head{
  background:#f5f8f6;
  color:var(--dark);
  border-bottom:1px solid var(--line);
}

.ahqaf-final-latest .ahqaf-latest-x .rail-head h3{
  color:var(--dark);
  font-size:16px;
}

.ahqaf-final-latest .x-highlight-body{
  padding:12px;
}

.ahqaf-final-latest .x-empty{
  min-height:185px;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#718078;
  font-size:12px;
  line-height:1.7;
}

.ahqaf-final-latest .x-mark{
  font-size:38px;
  color:#111;
  line-height:1;
}

/* Hide all obsolete experimental layout containers. */
.classic-top,
.ahqaf-upper-fill,
.ahqaf-top-fill-row,
.ahqaf-sports-ad{
  display:none !important;
}

/* This final build does not use the old bottom-wide ad. */
.home-ad-wide{
  display:none !important;
}

/* Tablet */
@media(max-width:1050px){
  .ahqaf-green-top{
    grid-template-columns:150px minmax(0,1fr) 240px;
    grid-template-areas:
      "lead lead latest"
      "left center latest"
      "ad ad latest"
      "writers writers writers";
  }

  .ahqaf-final-writers{
    margin-top:0;
  }

  .ahqaf-final-left .tower-ad{
    height:350px;
  }

  .ahqaf-final-horizontal-ad img{
    height:105px;
  }
}

/* Mobile */
@media(max-width:760px){
  .ahqaf-green-top{
    display:block;
  }

  .ahqaf-green-top > *{
    margin-top:14px;
  }

  .ahqaf-final-lead{
    margin-top:0;
  }

  .ahqaf-final-left .tower-ad{
    height:220px;
  }

  .ahqaf-final-center .lead-news-grid,
  .ahqaf-final-center .sports-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .ahqaf-final-horizontal-ad img{
    height:auto;
    max-height:150px;
  }

  .ahqaf-final-ad-placeholder{
    min-height:100px;
  }
}

@media(max-width:480px){
  .ahqaf-final-center .lead-news-grid,
  .ahqaf-final-center .sports-grid{
    grid-template-columns:1fr !important;
  }
}


/* Ahqaf Today 2.0.1 — advertising slots and automatic image fitting */
.header-ad{width:300px;height:72px;max-width:300px;overflow:hidden;background:#fff}
.header-ad .ht-ad-link{display:block;width:100%;height:100%}
.header-ad .ht-ad-link img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff}

.ahqaf-final-left .tower-ad{width:100%;height:600px;overflow:hidden;background:#fff}
.ahqaf-final-left .tower-ad .ht-ad-link{display:block;width:100%;height:100%}
.ahqaf-final-left .tower-ad .ht-ad-link img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff}

.ahqaf-final-horizontal-ad{min-height:250px;height:250px;background:#fff;border:1px dashed #b8c7be;border-radius:10px;overflow:hidden}
.ahqaf-final-horizontal-ad .ht-ad-link{display:block;width:100%;height:100%}
.ahqaf-final-horizontal-ad .ht-ad-link img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff;border-radius:10px}

.home-ad-wide{display:grid!important;min-height:90px;height:90px;margin-top:18px;background:#fff;border:1px dashed #b8c7be}
.home-ad-wide .ht-ad-link{display:block;width:100%;height:100%}
.home-ad-wide .ht-ad-link img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff}

@media(max-width:760px){
 .header-ad{width:min(100%,300px)}
 .ahqaf-final-left .tower-ad{height:260px}
 .ahqaf-final-horizontal-ad{height:180px;min-height:180px}
 .home-ad-wide{height:90px;min-height:90px}
}


/* Ahqaf Today 2.0.2 — clear visible inline-content advertising slot */
.ahqaf-inline-content-ad{
  display:grid !important;
  min-height:90px;
  height:90px;
  margin:18px 0;
  border:1px dashed #b8c7be;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  place-items:center;
}
.ahqaf-inline-content-ad:empty::before{
  content:"الإعلان الأفقي داخل المحتوى — 728 × 90";
  color:#809087;
  font-size:13px;
}
.ahqaf-inline-content-ad .ht-ad-link{
  display:block;
  width:100%;
  height:100%;
}
.ahqaf-inline-content-ad .ht-ad-link img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  background:#fff;
  display:block;
}
@media(max-width:760px){
  .ahqaf-inline-content-ad{
    height:90px;
    min-height:90px;
  }
}


/* Ahqaf Today 2.0.3 — automatic advertisement image fitting
   Images are scaled UP or DOWN to fill the assigned advertising slot.
   A small edge crop may occur when the source aspect ratio differs from the slot. */
.header-ad,
.ahqaf-final-left .tower-ad,
.ahqaf-final-horizontal-ad,
.ahqaf-inline-content-ad{
  overflow:hidden;
}

.header-ad .ht-ad-link,
.ahqaf-final-left .tower-ad .ht-ad-link,
.ahqaf-final-horizontal-ad .ht-ad-link,
.ahqaf-inline-content-ad .ht-ad-link{
  display:block;
  width:100%;
  height:100%;
}

.header-ad .ht-ad-link img,
.ahqaf-final-left .tower-ad .ht-ad-link img,
.ahqaf-final-horizontal-ad .ht-ad-link img,
.ahqaf-inline-content-ad .ht-ad-link img{
  display:block;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* Exact desktop slot boxes */
.header-ad{width:300px;height:72px}
.ahqaf-final-left .tower-ad{height:600px}
.ahqaf-final-horizontal-ad{height:250px}
.ahqaf-inline-content-ad{height:90px;min-height:90px}

@media(max-width:760px){
  .header-ad{width:min(100%,300px);height:72px}
  .ahqaf-final-left .tower-ad{height:260px}
  .ahqaf-final-horizontal-ad{height:180px}
  .ahqaf-inline-content-ad{height:90px}
}


/* Ahqaf Today 2.0.4 — rotating + animated ads */
.ht-ad-rotator{position:relative;width:100%;height:100%;overflow:hidden}
.ht-ad-item{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .45s ease;pointer-events:none}
.ht-ad-item.is-active{opacity:1;visibility:visible;pointer-events:auto}
.ht-ad-item .ht-ad-link,.ht-ad-item .ht-ad-creative{display:block;width:100%;height:100%}
.ht-ad-creative{position:relative;overflow:hidden}
.ht-ad-frame{
  position:absolute;inset:0;
  width:100%!important;height:100%!important;
  max-width:none!important;max-height:none!important;
  object-fit:cover!important;object-position:center center!important;
  opacity:0;transition:opacity .45s ease
}
.ht-ad-frame.is-active{opacity:1}


/* Ahqaf Today 2.0.5 — middle-ad fixed slot, no empty space above/below */
.ahqaf-final-horizontal-ad{
  height:250px !important;
  min-height:250px !important;
  max-height:250px !important;
  padding:0 !important;
  border:0 !important;
  margin-top:-14px !important;   /* cancel the grid row gap above */
  margin-bottom:0 !important;
  background:transparent !important;
  overflow:hidden !important;
  border-radius:10px;
}

.ahqaf-final-horizontal-ad > .ht-ad-rotator,
.ahqaf-final-horizontal-ad .ht-ad-item,
.ahqaf-final-horizontal-ad .ht-ad-link,
.ahqaf-final-horizontal-ad .ht-ad-creative{
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  padding:0 !important;
}

.ahqaf-final-horizontal-ad .ht-ad-frame,
.ahqaf-final-horizontal-ad img{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

/* The section immediately after the upper layout starts directly after the ad. */
.ahqaf-green-top + .articles-home{
  margin-top:0 !important;
}

@media(max-width:760px){
  .ahqaf-final-horizontal-ad{
    height:180px !important;
    min-height:180px !important;
    max-height:180px !important;
    margin-top:0 !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.6 — AD SLOT DIMENSIONS + MIDDLE FLOW FIX
   ========================================================= */

/* الإعلان الوسطي لم يعد صفاً مستقلاً في الـ Grid، لذلك لا يمكن
   لأي عمود جانبي أن يخلق فراغاً فوقه أو تحته. */
.ahqaf-final-horizontal-ad{
  grid-area:auto !important;
  width:100% !important;
  max-width:728px !important;
  height:250px !important;
  min-height:250px !important;
  max-height:250px !important;
  margin:14px auto 0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  overflow:hidden !important;
  border-radius:10px !important;
  display:block !important;
}

.ahqaf-final-horizontal-ad .ht-ad-rotator,
.ahqaf-final-horizontal-ad .ht-ad-item,
.ahqaf-final-horizontal-ad .ht-ad-link,
.ahqaf-final-horizontal-ad .ht-ad-creative{
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  padding:0 !important;
}

.ahqaf-final-horizontal-ad .ht-ad-frame,
.ahqaf-final-horizontal-ad img{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

/* الهيدر: 400 × 100 */
.header-ad{
  width:400px !important;
  max-width:400px !important;
  height:100px !important;
  min-height:100px !important;
  max-height:100px !important;
  overflow:hidden !important;
}
.header-ad .ht-ad-rotator,
.header-ad .ht-ad-item,
.header-ad .ht-ad-link,
.header-ad .ht-ad-creative{
  width:100% !important;
  height:100% !important;
}
.header-ad .ht-ad-frame,
.header-ad img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center !important;
}

/* داخل المحتوى / أفقي: 728 × 180 */
.ahqaf-inline-content-ad,
.home-ad-wide.ahqaf-inline-content-ad{
  width:100% !important;
  max-width:728px !important;
  height:180px !important;
  min-height:180px !important;
  max-height:180px !important;
  margin:18px auto !important;
  padding:0 !important;
  overflow:hidden !important;
  border-radius:12px !important;
}
.ahqaf-inline-content-ad .ht-ad-rotator,
.ahqaf-inline-content-ad .ht-ad-item,
.ahqaf-inline-content-ad .ht-ad-link,
.ahqaf-inline-content-ad .ht-ad-creative{
  width:100% !important;
  height:100% !important;
}
.ahqaf-inline-content-ad .ht-ad-frame,
.ahqaf-inline-content-ad img{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* لم يعد هناك صف إعلان مستقل في الشبكة العليا. */
.ahqaf-green-top{
  grid-template-areas:
    "lead lead latest writers"
    "left center latest writers" !important;
}

/* على الشاشات المتوسطة */
@media(max-width:1050px){
  .ahqaf-green-top{
    grid-template-areas:
      "lead lead latest"
      "left center latest"
      "writers writers writers" !important;
  }
  .header-ad{
    width:340px !important;
    max-width:340px !important;
    height:90px !important;
    min-height:90px !important;
    max-height:90px !important;
  }
}

/* الجوال */
@media(max-width:760px){
  .header-ad{
    width:min(100%,400px) !important;
    max-width:100% !important;
    height:90px !important;
    min-height:90px !important;
    max-height:90px !important;
  }
  .ahqaf-final-horizontal-ad{
    width:100% !important;
    height:200px !important;
    min-height:200px !important;
    max-height:200px !important;
    margin-top:12px !important;
  }
  .ahqaf-inline-content-ad,
  .home-ad-wide.ahqaf-inline-content-ad{
    width:100% !important;
    height:150px !important;
    min-height:150px !important;
    max-height:150px !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.8 — SAFE RESTORE
   Restores the stable 2.0.6 structure and changes only ad sizes.
   ========================================================= */

/* Header ad */
.header-ad{
  width:400px !important;
  max-width:400px !important;
  height:100px !important;
  min-height:100px !important;
  max-height:100px !important;
}

/* Middle ad: broad width, without altering the page structure */
.ahqaf-final-horizontal-ad{
  width:calc(100% + 268px) !important;
  max-width:none !important;
  height:250px !important;
  min-height:250px !important;
  max-height:250px !important;
  margin-top:14px !important;
  margin-bottom:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  position:relative;
  z-index:2;
}

/* Inline/content ad: same overall width as the main section below */
.home-ad-wide.ahqaf-inline-content-ad,
.ahqaf-inline-content-ad{
  width:100% !important;
  max-width:none !important;
  height:180px !important;
  min-height:180px !important;
  max-height:180px !important;
  margin:18px 0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

/* Creative always fills its slot */
.header-ad .ht-ad-rotator,
.header-ad .ht-ad-item,
.header-ad .ht-ad-link,
.header-ad .ht-ad-creative,
.ahqaf-final-horizontal-ad .ht-ad-rotator,
.ahqaf-final-horizontal-ad .ht-ad-item,
.ahqaf-final-horizontal-ad .ht-ad-link,
.ahqaf-final-horizontal-ad .ht-ad-creative,
.ahqaf-inline-content-ad .ht-ad-rotator,
.ahqaf-inline-content-ad .ht-ad-item,
.ahqaf-inline-content-ad .ht-ad-link,
.ahqaf-inline-content-ad .ht-ad-creative{
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  padding:0 !important;
}

.header-ad img,
.ahqaf-final-horizontal-ad img,
.ahqaf-inline-content-ad img{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
}

/* IMPORTANT:
   keep the original grid/DOM flow from 2.0.6.
   This intentionally avoids the structural change that broke 2.0.7. */

@media(max-width:1050px){
  .ahqaf-final-horizontal-ad{
    width:100% !important;
  }
  .header-ad{
    width:340px !important;
    max-width:340px !important;
    height:90px !important;
    min-height:90px !important;
    max-height:90px !important;
  }
}

@media(max-width:760px){
  .header-ad{
    width:min(100%,400px) !important;
    max-width:100% !important;
    height:90px !important;
    min-height:90px !important;
    max-height:90px !important;
  }
  .ahqaf-final-horizontal-ad{
    width:100% !important;
    height:200px !important;
    min-height:200px !important;
    max-height:200px !important;
  }
  .ahqaf-inline-content-ad{
    width:100% !important;
    height:150px !important;
    min-height:150px !important;
    max-height:150px !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.9 — MOVE MIDDLE AD TO THE VIEWER'S RIGHT
   ========================================================= */

/*
 * Keep the left rail untouched:
 * vertical ad -> Most Read -> Video Today.
 *
 * The middle ad remains wide (center + Latest News column),
 * but is shifted physically to the RIGHT instead of expanding over the left rail.
 */
.ahqaf-final-horizontal-ad{
  width:calc(100% + 268px) !important;
  max-width:none !important;
  height:250px !important;
  min-height:250px !important;
  max-height:250px !important;

  position:relative !important;
  left:268px !important;      /* physical move to viewer's right */
  right:auto !important;

  margin-top:14px !important;
  margin-bottom:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;

  padding:0 !important;
  overflow:hidden !important;
  z-index:2 !important;
}

/* Make sure Video Today stays visible directly below Most Read. */
.ahqaf-final-left{
  position:relative !important;
  z-index:4 !important;
}
.ahqaf-final-left .video-today{
  position:relative !important;
  z-index:5 !important;
  display:block !important;
  clear:both !important;
  margin-top:14px !important;
}

/* Middle creative fills the fixed slot. */
.ahqaf-final-horizontal-ad .ht-ad-rotator,
.ahqaf-final-horizontal-ad .ht-ad-item,
.ahqaf-final-horizontal-ad .ht-ad-link,
.ahqaf-final-horizontal-ad .ht-ad-creative{
  width:100% !important;
  height:100% !important;
}
.ahqaf-final-horizontal-ad img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center center !important;
  display:block !important;
}

/* Do not touch the approved header or inline-content ad. */

@media(max-width:1050px){
  .ahqaf-final-horizontal-ad{
    width:100% !important;
    left:0 !important;
  }
}

@media(max-width:760px){
  .ahqaf-final-horizontal-ad{
    width:100% !important;
    left:0 !important;
    height:200px !important;
    min-height:200px !important;
    max-height:200px !important;
  }
}


/* Ahqaf Today 2.0.10 — minimal video fix on top of stable 2.0.9 */
.video-today-media{position:relative;display:block}
.video-today-play{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:42px;height:42px;border-radius:50%;
  display:grid;place-items:center;
  background:rgba(0,0,0,.65);color:#fff;
  border:2px solid rgba(255,255,255,.9);
  font-size:20px;line-height:1;padding-left:3px;
  pointer-events:none
}
.home-split.heritage-only{grid-template-columns:1fr!important}
.home-split.heritage-only>.home-module{grid-column:1/-1}


/* Ahqaf Today 2.0.11 — Video moved into the writers/right column,
   aligned beside the middle advertisement without changing the approved grid. */
.ahqaf-final-writers .ahqaf-video-beside-middle-ad{
  margin-top:14px;
  width:100%;
}
.ahqaf-final-writers .ahqaf-video-beside-middle-ad .video-today-card img,
.ahqaf-final-writers .ahqaf-video-beside-middle-ad .video-fallback{
  height:auto;
  min-height:0;
  aspect-ratio:16/9;
  object-fit:cover;
}


/* =========================================================
   AHQAF TODAY 2.0.13 — FINAL FIX
   Video sits in the RIGHTMOST grid column beside the middle ad.
   Ad and video are direct children of .ahqaf-green-top.
   Writers count can no longer move the video independently.
   ========================================================= */

.ahqaf-green-top{
  grid-template-columns:190px minmax(0,1fr) 250px 265px !important;
  grid-template-areas:
    "lead lead latest writers"
    "left center latest writers"
    "left ad ad video" !important;
  gap:14px 16px !important;
  align-items:start !important;
  direction:ltr !important;
}

.ahqaf-green-top > *{
  direction:rtl;
  min-width:0;
}

.ahqaf-green-top > .ahqaf-final-horizontal-ad{
  grid-area:ad !important;
  width:100% !important;
  max-width:none !important;
  height:250px !important;
  min-height:250px !important;
  max-height:250px !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  position:relative !important;
  z-index:1 !important;
}

.ahqaf-green-top > .ahqaf-video-fixed-mid{
  grid-area:video !important;
  width:100% !important;
  margin:0 !important;
  align-self:start !important;
}

.ahqaf-green-top > .ahqaf-video-fixed-mid .video-today-card img,
.ahqaf-green-top > .ahqaf-video-fixed-mid .video-fallback{
  width:100% !important;
  height:auto !important;
  aspect-ratio:16/9;
  object-fit:cover !important;
}

/* Keep the agreed desktop composition on smaller screens too. */
@media(max-width:1050px){
  .ahqaf-green-top{
    grid-template-columns:190px minmax(0,1fr) 250px 265px !important;
    grid-template-areas:
      "lead lead latest writers"
      "left center latest writers"
      "left ad ad video" !important;
  }
  .ahqaf-green-top > .ahqaf-final-horizontal-ad{
    width:100% !important;
    height:250px !important;
    min-height:250px !important;
    max-height:250px !important;
    margin:0 !important;
  }
}

@media(max-width:760px){
  .ahqaf-green-top{
    grid-template-columns:190px minmax(0,1fr) 250px 265px !important;
    grid-template-areas:
      "lead lead latest writers"
      "left center latest writers"
      "left ad ad video" !important;
  }
  .ahqaf-green-top > .ahqaf-final-horizontal-ad{
    width:100% !important;
    height:250px !important;
    min-height:250px !important;
    max-height:250px !important;
    margin:0 !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.14 — FIX AD OVERLAP
   Legacy 2.0.8/2.0.9 expanded the middle ad by +268px and
   shifted it 268px to the right. That covered the new video cell.
   Reset ONLY the middle ad inside the approved 2.0.13 grid.
   ========================================================= */
.ahqaf-green-top > .ahqaf-final-horizontal-ad{
  grid-area:ad !important;
  width:100% !important;
  max-width:100% !important;
  left:0 !important;
  right:auto !important;
  transform:none !important;
  margin:0 !important;
  box-sizing:border-box !important;
  z-index:1 !important;
}

.ahqaf-green-top > .ahqaf-video-fixed-mid{
  grid-area:video !important;
  position:relative !important;
  left:auto !important;
  right:auto !important;
  z-index:3 !important;
  visibility:visible !important;
  opacity:1 !important;
  overflow:visible !important;
}

/* Same approved desktop-style composition on smaller screens. */
@media(max-width:1050px){
  .ahqaf-green-top > .ahqaf-final-horizontal-ad{
    width:100% !important;
    max-width:100% !important;
    left:0 !important;
    right:auto !important;
  }
}
@media(max-width:760px){
  .ahqaf-green-top > .ahqaf-final-horizontal-ad{
    width:100% !important;
    max-width:100% !important;
    left:0 !important;
    right:auto !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.16 — ROOT HOME GRID FIX
   Keep the slider row fixed to its real 365px height so the
   tall Latest/Writers spanning columns cannot enlarge row 1.
   This removes the blank space below the slider at the source.
   ========================================================= */
@media(min-width:981px){
  .ahqaf-green-top{
    grid-template-rows:365px auto auto !important;
  }
  .ahqaf-final-lead,
  .ahqaf-final-left,
  .ahqaf-final-center,
  .ahqaf-final-latest,
  .ahqaf-final-writers{
    top:auto !important;
    left:auto !important;
    right:auto !important;
    transform:none !important;
  }
  .ahqaf-final-left,
  .ahqaf-final-center{
    margin-top:0 !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.17 — SPORTS COLUMN HEIGHT ALIGNMENT
   Stretch ONLY the center row so the Sports panel reaches
   the middle advertisement with the existing grid gap.
   No JS, no offsets, no changes to other columns.
   ========================================================= */
@media(min-width:981px){
  .ahqaf-green-top > .ahqaf-final-center{
    align-self:stretch !important;
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
  }

  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child{
    flex:1 1 auto !important;
    display:flex !important;
    flex-direction:column !important;
    margin-bottom:0 !important;
  }

  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child > .sports-grid{
    flex:1 1 auto !important;
    align-content:start !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.23 — FILL SPORTS CARDS INSIDE APPROVED 2.0.17 PANEL
   Keep the approved 2.0.17 outer sports panel alignment exactly as-is.
   Only stretch the four inner cards and allow a moderately longer excerpt.
   Desktop only; no JavaScript and no positional offsets.
   ========================================================= */
@media(min-width:981px){
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child > .sports-grid{
    flex:1 1 auto !important;
    align-items:stretch !important;
    grid-auto-rows:1fr !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child .sport-story{
    height:100% !important;
    min-height:100% !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    align-self:stretch !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child .sport-story p{
    flex:1 1 auto !important;
    overflow:hidden !important;
    max-height:none !important;
    -webkit-line-clamp:unset !important;
    display:block !important;
  }
}


/* =========================================================
   HADRAMOUT TODAY 2.0.27 — MIDPOINT X/SPORTS HEADER ALIGNMENT
   Desktop only. Deliberate visible downward shift of the X panel.
   No JavaScript; no changes to sports/news/ads.
   ========================================================= */
@media(min-width:981px){
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x{
    margin-top:99px !important;
  }
}


/* =========================================================
   HADRAMOUT TODAY 2.0.28 — LATEST NEWS CARD HEIGHT + X LOCK
   Desktop only. Make each Latest News item slightly taller so
   the publication-time line is fully visible and the panel fills
   the space down to Ahqaf Today - News. Compensate by reducing
   the X margin so the already-approved X/Sports header alignment
   remains unchanged.
   ========================================================= */
@media(min-width:981px){
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item{
    padding:13px 12px !important;
    overflow:visible !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item > div:last-child{
    min-width:0 !important;
    overflow:visible !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item .small{
    display:block !important;
    line-height:1.55 !important;
    min-height:18px !important;
    overflow:visible !important;
    white-space:normal !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x{
    margin-top:51px !important;
  }
}


/* =========================================================
   HADRAMOUT TODAY 2.0.35 — FINAL HOME ALIGNMENT / HEADERS
   ========================================================= */
@media(min-width:981px){
  /* Latest News: fixed visual discipline without changing the approved grid geometry. */
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item h4{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:3 !important;
    line-clamp:3 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:normal !important;
    line-height:1.45 !important;
    max-height:calc(1.45em * 3 + 3px) !important;
    padding-top:2px !important;
    margin-bottom:5px !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item .small{
    display:block !important;
    position:static !important;
    line-height:1.5 !important;
    min-height:18px !important;
    overflow:visible !important;
    white-space:nowrap !important;
  }

  /* Raise X exactly by removing the old 51px compensation. */
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x{
    margin-top:0 !important;
  }

  /* Green + soft gray angled headers for Latest News and Writers Articles. */
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head,
  .ahqaf-green-top > .ahqaf-final-writers .writers-panel > .section-head{
    background:linear-gradient(105deg,#2fac63 0 62%,#dfe4e1 62% 100%) !important;
    color:#fff !important;
    border-bottom:0 !important;
    min-height:58px !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head h3,
  .ahqaf-green-top > .ahqaf-final-writers .writers-panel > .section-head h3{
    color:#fff !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head a,
  .ahqaf-green-top > .ahqaf-final-writers .writers-panel > .section-head a{
    color:#176845 !important;
    font-weight:800 !important;
  }
}

/* Never show the old moving green frame around the synced news cards. */
.ahqaf-final-center .synced.active{
  outline:none !important;
  box-shadow:none !important;
}

/* X cards are rendered server-side in 2.0.35 (no post-load DOM injection). */
.ahqaf-latest-x .rail-head{background:#050505!important;color:#fff!important;border-radius:10px 10px 0 0!important;padding:12px 16px!important}
.ahqaf-latest-x .rail-head h3{color:#fff!important;margin:0!important;display:flex!important;align-items:center!important;gap:9px!important}
.ahqaf-latest-x .rail-head h3:before{content:"X";display:inline-flex;align-items:center;justify-content:center;font:800 23px/1 Arial,sans-serif;color:#fff}
.ahqaf-latest-x .ahqaf-x-author{display:flex;align-items:center;gap:10px;margin-bottom:8px;text-align:right}
.ahqaf-latest-x .ahqaf-x-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;flex:0 0 42px;background:#eee}
.ahqaf-latest-x .ahqaf-x-author-meta{min-width:0;line-height:1.35}
.ahqaf-latest-x .ahqaf-x-name{font-weight:800;color:#111827;font-size:14px}
.ahqaf-latest-x .ahqaf-x-handle{color:#6b7280;font-size:12px;direction:ltr;text-align:right}
.ahqaf-latest-x .x-account{display:none!important}
.ahqaf-latest-x .x-card>a{font-weight:700}

/* Prevent restore/back-navigation flashes while the browser restores painted state. */
html.ahqaf-no-initial-motion .lead-slide,
html.ahqaf-no-initial-motion .ht-ad-item,
html.ahqaf-no-initial-motion .ht-ad-frame{
  transition:none !important;
  animation:none !important;
}

.ahqaf-final-left .rank-item{grid-template-columns:28px minmax(0,1fr)!important}
.ahqaf-final-left .rank-item .ahqaf-real-read-count{grid-column:2;color:#87918c;font-size:10px;line-height:1.3;margin-top:-2px}


/* =========================================================
   HADRAMOUT TODAY 2.0.36 — FINAL HOME FINISHING
   - Latest News header: same green/gray treatment with black title.
   - Writers Articles header: same green/gray treatment, server-rendered.
   - Preserve approved X/Sports alignment from 2.0.35.
   ========================================================= */
@media(min-width:981px){
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head,
  .ahqaf-green-top > .ahqaf-final-writers .writers-panel > .section-head,
  .ahqaf-writers-home-new .wh-head{
    background:linear-gradient(105deg,#2fac63 0 62%,#dfe4e1 62% 100%) !important;
    color:#17271f !important;
    border-bottom:0 !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head h3,
  .ahqaf-green-top > .ahqaf-final-writers .writers-panel > .section-head h3,
  .ahqaf-writers-home-new .wh-title{
    color:#17271f !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head a,
  .ahqaf-green-top > .ahqaf-final-writers .writers-panel > .section-head a,
  .ahqaf-writers-home-new .wh-archive{
    color:#0b6f49 !important;
    font-weight:900 !important;
  }
}

/* Server-rendered writer article list: no DOM replacement, no flash. */
.ahqaf-writers-home-server .ahqaf-writer-article-mini .avatar{
  border-radius:8px !important;
  object-fit:cover !important;
}

/* Keep six Most Read rows visually compact and even. */
.ahqaf-final-left .rank-item{
  min-height:72px;
  box-sizing:border-box;
}


/* =========================================================
   AHQAF TODAY 2.0.37 — WHATSAPP FULL ARTICLE SHARE
   ========================================================= */
.ahqaf-whatsapp-share{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin:24px 0 10px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fbf9;
}
.ahqaf-whatsapp-share__button,
.ahqaf-whatsapp-share__copy{
  appearance:none;
  border:0;
  border-radius:10px;
  cursor:pointer;
  font-family:inherit;
  font-weight:700;
  transition:transform .15s ease, opacity .15s ease;
}
.ahqaf-whatsapp-share__button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 16px;
  background:#128c4a;
  color:#fff;
  font-size:14px;
}
.ahqaf-whatsapp-share__copy{
  padding:11px 15px;
  background:#fff;
  color:var(--dark);
  border:1px solid var(--line);
  font-size:13px;
}
.ahqaf-whatsapp-share__button:hover,
.ahqaf-whatsapp-share__copy:hover{opacity:.92}
.ahqaf-whatsapp-share__button:active,
.ahqaf-whatsapp-share__copy:active{transform:translateY(1px)}
.ahqaf-whatsapp-share__icon{
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:rgba(255,255,255,.16);
  font-size:14px;
}
.ahqaf-whatsapp-share__status{
  width:100%;
  min-height:18px;
  font-size:12px;
  color:var(--green);
}
@media(max-width:600px){
  .ahqaf-whatsapp-share__button,
  .ahqaf-whatsapp-share__copy{width:100%}
}


/* Ahqaf Today 2.0.41 — keep "المزيد" opposite the section title */
.home .legacy-title,
.home .history-home .legacy-title,
.home .regions-home .legacy-title,
.home .heritage-only .legacy-title{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-direction:row !important;
  width:100%;
  box-sizing:border-box;
}
.home .legacy-title > h2,
.home .legacy-title > h3{
  margin:0 !important;
}
.home .legacy-title > a{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  margin:0 !important;
  white-space:nowrap;
}


/* Ahqaf Today 2.0.42 — history header: keep "المزيد" in the opposite corner */
.home .history-home .legacy-title{
  position:relative !important;
  display:block !important;
  min-height:58px;
  padding-right:13px !important;
  padding-left:105px !important;
  box-sizing:border-box;
}
.home .history-home .legacy-title > h2{
  margin:0 !important;
  line-height:38px;
}
.home .history-home .legacy-title > a{
  position:absolute !important;
  left:13px !important;
  right:auto !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  margin:0 !important;
  white-space:nowrap;
  z-index:2;
}


/* =========================================================
   AHQAF TODAY 2.0.43 — FIXED HOME GEOMETRY + MARKET BOXES
   Desktop:
   - Latest News / Ahqaf News upper blocks are locked to one height.
   - Sports / X are locked to one shared height and baseline.
   - Text cannot stretch either box.
   - Three market boxes replace the old middle-ad area.
   ========================================================= */

@media(min-width:981px){

  /* The blocks above Sports and X must end at the same coordinate. */
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:first-child,
  .ahqaf-green-top > .ahqaf-final-latest > .panel{
    height:710px !important;
    min-height:710px !important;
    max-height:710px !important;
    overflow:hidden !important;
    margin-bottom:0 !important;
  }

  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:first-child{
    display:flex !important;
    flex-direction:column !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:first-child > .lead-news-grid{
    flex:1 1 auto !important;
    min-height:0 !important;
    grid-auto-rows:1fr !important;
    align-items:stretch !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:first-child .mini-story{
    height:100% !important;
    overflow:hidden !important;
  }

  /* Latest News: exactly 3 title lines + one time line, fixed row height. */
  .ahqaf-green-top > .ahqaf-final-latest > .panel{
    display:flex !important;
    flex-direction:column !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel > .section-head{
    flex:0 0 58px !important;
    height:58px !important;
    min-height:58px !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item{
    flex:1 1 0 !important;
    min-height:0 !important;
    height:auto !important;
    padding:7px 9px !important;
    overflow:hidden !important;
    align-items:center !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item .thumb{
    width:54px !important;
    height:48px !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item > div:last-child{
    min-width:0 !important;
    overflow:hidden !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item h4{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:3 !important;
    line-clamp:3 !important;
    overflow:hidden !important;
    margin:0 0 3px !important;
    padding:0 !important;
    line-height:1.32 !important;
    max-height:calc(1.32em * 3) !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .panel .latest-item .small{
    display:block !important;
    line-height:1.2 !important;
    min-height:13px !important;
    height:13px !important;
    overflow:hidden !important;
    white-space:nowrap !important;
  }

  /* Sports and X share the same exact start and finish. */
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child,
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x{
    height:610px !important;
    min-height:610px !important;
    max-height:610px !important;
    margin-top:14px !important;
    margin-bottom:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child{
    display:flex !important;
    flex-direction:column !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child > .legacy-title,
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x > .rail-head{
    flex:0 0 58px !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    box-sizing:border-box !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child > .sports-grid{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    overflow:hidden !important;
    grid-auto-rows:1fr !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child .sport-story{
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child .sport-story h4{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:4 !important;
    line-clamp:4 !important;
    overflow:hidden !important;
  }
  .ahqaf-green-top > .ahqaf-final-center > .legacy-section:last-child .sport-story p{
    overflow:hidden !important;
  }

  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x{
    display:flex !important;
    flex-direction:column !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x > .rail-head{
    padding:0 16px !important;
    display:flex !important;
    align-items:center !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest > .ahqaf-latest-x > .x-highlight-body{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:hidden !important;
    padding:12px !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest .x-card{
    overflow:hidden !important;
  }
  .ahqaf-green-top > .ahqaf-final-latest .x-card p{
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:5 !important;
    line-clamp:5 !important;
    overflow:hidden !important;
  }

  /* The row below Sports/X occupies the old middle-ad cell. */
  .ahqaf-green-top > .ahqaf-market-row{
    height:250px !important;
    min-height:250px !important;
    max-height:250px !important;
  }
}


/* Three market boxes */
.ahqaf-green-top > .ahqaf-market-row{
  grid-area:ad !important;
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
  width:100% !important;
  max-width:100% !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  overflow:visible !important;
}

.ahqaf-market-box{
  min-width:0;
  height:100%;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 3px 10px rgba(15,45,28,.035);
}

.ahqaf-market-head{
  min-height:52px;
  padding:9px 12px;
  background:linear-gradient(105deg,var(--green2) 0 58%,var(--dark) 58%);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.ahqaf-market-head strong{font-family:var(--font-head);font-size:15px}
.ahqaf-market-head small{font-size:10px;opacity:.86;white-space:nowrap}

.ahqaf-market-roll{
  flex:1 1 auto;
  min-height:0;
  padding:8px 10px;
  overflow:hidden;
}
.ahqaf-market-line{
  min-height:52px;
  border-bottom:1px solid #edf2ef;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:2px 8px;
  align-items:center;
  padding:5px 2px;
}
.ahqaf-market-line:last-child{border-bottom:0}
.ahqaf-market-line span{font-weight:800;font-size:13px}
.ahqaf-market-line b{font-size:13px;color:var(--green)}
.ahqaf-market-line small{
  grid-column:1/-1;
  color:var(--muted);
  font-size:9px;
}
.ahqaf-market-source{
  flex:0 0 auto;
  border-top:1px solid #edf2ef;
  color:#7d8983;
  font-size:9px;
  padding:5px 10px;
  text-align:center;
}
.ahqaf-market-unavailable{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#7b8781;
  font-size:12px;
  line-height:1.7;
  padding:12px;
}

/* Roll only when there are several rows; JS toggles two visible rows. */
.ahqaf-market-roll .ahqaf-market-line.is-roll-visible{display:grid}
.ahqaf-market-roll:has(.is-roll-visible) .ahqaf-market-line:not(.is-roll-visible){display:none}

/* Converter */
.ahqaf-converter{
  flex:1 1 auto;
  min-height:0;
  padding:10px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
}
.ahqaf-converter-row{
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  gap:7px;
  align-items:center;
}
.ahqaf-converter input,
.ahqaf-converter select,
.ahqaf-convert-result{
  min-width:0;
  width:100%;
  height:38px;
  border:1px solid #d7e1db;
  border-radius:8px;
  background:#fff;
  font:inherit;
  font-size:11px;
  padding:6px 8px;
}
.ahqaf-convert-result{
  display:flex;
  align-items:center;
  direction:ltr;
  font-weight:900;
  color:var(--green);
  background:#f7fbf8;
}
.ahqaf-converter-equals{
  text-align:center;
  color:var(--green);
  font-weight:900;
  line-height:1;
}

@media(max-width:980px){
  .ahqaf-green-top > .ahqaf-market-row{
    grid-template-columns:1fr !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  .ahqaf-market-box{min-height:210px}
}



/* =========================================================
   Ahqaf Today 2.0.44 — mobile root overflow fix
   Fixes homepage opening wider than the phone viewport.
   Desktop geometry remains untouched.
   ========================================================= */
@media (max-width:980px){

  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  /* This historical desktop-only advertisement extension was
     applied globally and made the homepage 268px wider than
     the phone viewport. Reset it on phones/tablets. */
  .ahqaf-final-horizontal-ad{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    left:auto !important;
    right:auto !important;

    margin-left:0 !important;
    margin-right:0 !important;

    transform:none !important;
    box-sizing:border-box !important;
  }

  /* Keep the homepage master areas bounded by the viewport. */
  .ahqaf-green-top,
  .ahqaf-green-top > *,
  .ahqaf-final-lead,
  .ahqaf-final-left,
  .ahqaf-final-center,
  .ahqaf-final-latest,
  .ahqaf-final-writers{
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* No media element may establish a wider scroll canvas. */
  .ahqaf-green-top img,
  .ahqaf-final-horizontal-ad img,
  .home-ad-wide img,
  .ahqaf-inline-content-ad img,
  video,
  iframe{
    max-width:100% !important;
  }
}


/* =========================================================
   AHQAF TODAY 2.0.45 — ROOT RESPONSIVE FIX
   Definitive mobile override. Cancels legacy rules that forced
   the 4-column desktop grid even inside max-width:760px.
   Desktop >= 981px remains unchanged.
   ========================================================= */
@media (max-width:980px){
  html,body{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
  .wrap,.main,.main>.wrap{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}

  .ahqaf-green-top{
    display:flex!important;flex-direction:column!important;
    grid-template-columns:none!important;grid-template-rows:none!important;grid-template-areas:none!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    gap:14px!important;overflow:visible!important;direction:rtl!important
  }
  .ahqaf-green-top>*{
    position:static!important;width:100%!important;max-width:100%!important;min-width:0!important;
    margin-left:0!important;margin-right:0!important;left:auto!important;right:auto!important;
    transform:none!important;box-sizing:border-box!important;direction:rtl!important
  }

  .ahqaf-green-top>.ahqaf-final-center,.ahqaf-green-top>.ahqaf-final-latest{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important
  }

  .ahqaf-final-lead,.ahqaf-final-lead .lead-shell,.ahqaf-final-lead .lead-stage{width:100%!important;max-width:100%!important;min-width:0!important}
  .ahqaf-final-lead .lead-stage{height:300px!important;min-height:300px!important;max-height:300px!important}

  .ahqaf-final-latest>.panel{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;margin:0 0 14px!important}
  .ahqaf-final-latest .latest-item{height:auto!important;min-height:78px!important;max-height:none!important;display:grid!important;grid-template-columns:78px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;padding:9px!important}
  .ahqaf-final-latest .latest-item .thumb{width:78px!important;height:58px!important;min-width:78px!important;max-width:78px!important;object-fit:cover!important}
  .ahqaf-final-latest .latest-item h4{height:auto!important;max-height:3.2em!important;overflow:hidden!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;font-size:14px!important;line-height:1.6!important}
  .ahqaf-latest-placeholder{display:none!important}

  .ahqaf-green-top>.ahqaf-final-latest>.ahqaf-latest-x,.ahqaf-latest-x{width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;overflow:visible!important}
  .ahqaf-latest-x .x-highlight-body{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}

  .ahqaf-final-center>.legacy-section{width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0 0 14px!important;overflow:visible!important}
  .ahqaf-final-center .lead-news-grid,.ahqaf-final-center .sports-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;height:auto!important;gap:10px!important;padding:10px!important;overflow:visible!important}
  .ahqaf-final-center .mini-story,.ahqaf-final-center .sport-story{min-width:0!important;height:auto!important;max-height:none!important}
  .ahqaf-final-center .mini-img,.ahqaf-final-center .sport-img{width:100%!important;height:145px!important;min-height:145px!important;max-height:145px!important;object-fit:cover!important}

  .ahqaf-final-writers{display:block!important;width:100%!important}
  .ahqaf-final-writers>*,.writers-panel,.writers-poll,.sidebar-actions{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .writers-mini{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .writer-mini{min-width:0!important}

  .ahqaf-final-left{display:block!important;width:100%!important}
  .ahqaf-final-left>*{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .ahqaf-final-left .tower-ad{height:220px!important;min-height:220px!important;max-height:220px!important;margin-bottom:14px!important;overflow:hidden!important}
  .ahqaf-final-left .tower-ad img{width:100%!important;height:100%!important;object-fit:cover!important}

  .ahqaf-green-top>.ahqaf-market-row,.ahqaf-market-row{display:grid!important;grid-template-columns:1fr!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;gap:12px!important;overflow:visible!important}
  .ahqaf-market-row .ahqaf-market-box{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;box-sizing:border-box!important}

  .ahqaf-green-top>.ahqaf-video-fixed-mid,.ahqaf-video-fixed-mid{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;overflow:hidden!important}
  .ahqaf-video-fixed-mid .video-today-media{width:100%!important;height:220px!important;min-height:220px!important;max-height:220px!important}

  .ahqaf-final-horizontal-ad,.ahqaf-green-top>.ahqaf-final-horizontal-ad,.ahqaf-green-top>.ahqaf-video-fixed-mid,.ahqaf-lower-wide,.ahqaf-services-home,.regions-home{
    width:100%!important;max-width:100%!important;min-width:0!important;left:auto!important;right:auto!important;
    margin-left:0!important;margin-right:0!important;transform:none!important;box-sizing:border-box!important
  }
  .ahqaf-final-horizontal-ad{height:180px!important;min-height:180px!important;max-height:180px!important}

  .home-split,.ahqaf-split-ads{grid-template-columns:1fr!important}
  .ahqaf-ency-home-sections{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .regions,.regions-six{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  img,video,iframe,svg,canvas{max-width:100%!important}
  .ticker{max-width:100%!important;overflow:hidden!important}
}

@media (max-width:600px){
  .main>.wrap{padding-left:8px!important;padding-right:8px!important}
  .ahqaf-final-lead .lead-stage{height:245px!important;min-height:245px!important;max-height:245px!important}
  .ahqaf-final-center .lead-news-grid,.ahqaf-final-center .sports-grid,.writers-mini,.ahqaf-ency-home-sections,.regions,.regions-six{grid-template-columns:1fr!important}
  .ahqaf-final-center .mini-img,.ahqaf-final-center .sport-img{height:185px!important;min-height:185px!important;max-height:185px!important}
  .ahqaf-final-latest .latest-item{grid-template-columns:72px minmax(0,1fr)!important}
  .ahqaf-final-latest .latest-item .thumb{width:72px!important;min-width:72px!important;max-width:72px!important;height:54px!important}
  .ahqaf-video-fixed-mid .video-today-media{height:190px!important;min-height:190px!important;max-height:190px!important}
  .ahqaf-ency-home-intro{flex-direction:column!important;align-items:flex-start!important}
}
