@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

/* Shared editorial subpage system and multilingual layout corrections. */

/* Keep the desktop navigation lane stable while Arabic labels shape correctly. */
[dir="rtl"] .site-primary-nav a,
[dir="rtl"] #mobileMenu a{direction:rtl;text-align:right}

/* Use logical edges so the editorial grids remain correct in RTL. */
.home-principle{padding-inline-end:2rem!important;border-inline-end:1px solid rgba(82,87,98,.15)!important;margin-inline-end:2rem!important;padding-right:0}
.home-principle:last-child{border-inline-end:0!important;margin-inline-end:0!important}
.home-process-item{padding-inline-end:1.25rem!important;padding-right:0}
.home-process-item:not(:last-child)::after{right:auto!important;inset-inline-end:.8rem}
.home-focus-item{padding-inline-end:1.4rem!important;padding-right:0}
.home-focus-item:nth-child(4n+1),.home-focus-item:nth-child(4n+2),.home-focus-item:nth-child(4n+3){border-right:0!important;border-inline-end:1px solid rgba(82,87,98,.12)!important;margin-right:0!important;margin-inline-end:1.4rem!important}
.home-stage-step{padding-inline-end:1rem!important;padding-right:0}
.home-stage-step:not(:last-child){border-right:0!important;border-inline-end:1px solid rgba(250,248,245,.14)!important;margin-right:0!important;margin-inline-end:1rem!important}
[dir="rtl"] .home-title,[dir="rtl"] .home-lead,[dir="rtl"] .home-copy,[dir="rtl"] .home-kicker,[dir="rtl"] .home-principle,[dir="rtl"] .home-process-item,[dir="rtl"] .home-focus-item,[dir="rtl"] .home-stage-step{text-align:right}

/* Subpage foundation */
.subpage-main{background:#FAF8F5}
.subpage-container{max-width:1240px;margin:0 auto;padding:clamp(5.5rem,9vw,8rem) clamp(1.25rem,4vw,4rem)}
.subpage-hero{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:clamp(3rem,8vw,8rem);align-items:start}
.subpage-kicker{font-family:'Space Grotesk',monospace;font-size:.61rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:rgba(82,87,98,.56)}
.subpage-title{margin-top:1rem;font-family:'Cambridge','Cormorant Garamond',Baskerville,Georgia,serif;font-size:clamp(3.5rem,6vw,6.4rem);font-weight:500;letter-spacing:-.05em;line-height:.86;color:#525762}
.subpage-lead{font-size:clamp(1.12rem,1.65vw,1.5rem);line-height:1.58;color:#525762;max-width:720px}
.subpage-copy{font-size:.94rem;line-height:1.8;color:rgba(82,87,98,.72);max-width:720px}
.subpage-section{border-top:1px solid rgba(82,87,98,.16)}
.subpage-section-head{display:grid;grid-template-columns:minmax(0,.68fr) minmax(0,1.32fr);gap:clamp(3rem,8vw,8rem);align-items:start;margin-bottom:3.5rem}
.subpage-section-title{font-family:'Cambridge','Cormorant Garamond',Baskerville,Georgia,serif;font-size:clamp(2.5rem,4.8vw,4.8rem);font-weight:500;letter-spacing:-.04em;line-height:.92;color:#525762}

.subpage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid rgba(82,87,98,.2);border-bottom:1px solid rgba(82,87,98,.2)}
.subpage-item{padding:2.15rem 2rem 2.35rem 0;min-height:175px;border-inline-end:1px solid rgba(82,87,98,.13);margin-inline-end:2rem}
.subpage-item:nth-child(3n){border-inline-end:0;margin-inline-end:0}
.subpage-item small{font-family:'Space Grotesk',monospace;font-size:.55rem;font-weight:600;letter-spacing:.13em;text-transform:uppercase;color:rgba(82,87,98,.48)}
.subpage-item h3{margin-top:.95rem;font-family:'Cambridge','Cormorant Garamond',Baskerville,Georgia,serif;font-size:1.95rem;font-weight:600;line-height:1;color:#525762}
.subpage-item p{margin-top:.85rem;font-size:.82rem;line-height:1.72;color:rgba(82,87,98,.68)}

.subpage-list{border-top:1px solid rgba(82,87,98,.2)}
.subpage-list-row{display:grid;grid-template-columns:70px minmax(180px,.65fr) minmax(0,1.35fr);gap:1.5rem;padding:1.35rem 0;border-bottom:1px solid rgba(82,87,98,.15);align-items:start}
.subpage-list-row>span{font-family:'Space Grotesk',monospace;font-size:.55rem;letter-spacing:.12em;color:#F3D862}
.subpage-list-row h3{font-size:.77rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#525762}
.subpage-list-row p{font-size:.82rem;line-height:1.65;color:rgba(82,87,98,.67)}

.subpage-note{background:#525762;color:#FAF8F5}
.subpage-note .subpage-kicker{color:#F3D862}
.subpage-note .subpage-section-title{color:#FAF8F5}
.subpage-note .subpage-copy,.subpage-note .subpage-lead{color:rgba(250,248,245,.76)}
.subpage-note-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:clamp(3rem,8vw,8rem);align-items:start}

.subpage-actions{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:2rem}
.subpage-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 1.35rem;border:1px solid #525762;color:#525762;font-size:.66rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;transition:background .2s ease,color .2s ease,border-color .2s ease}
.subpage-button:hover{background:#525762;color:#FAF8F5}
.subpage-button--fill{background:#525762;color:#FAF8F5}
.subpage-button--fill:hover{background:#F3D862;color:#525762;border-color:#F3D862}
.subpage-note .subpage-button{border-color:rgba(250,248,245,.55);color:#FAF8F5}
.subpage-note .subpage-button:hover{background:#FAF8F5;color:#525762}

.subpage-status{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:clamp(3rem,8vw,8rem);padding:2.5rem 0;border-top:1px solid rgba(82,87,98,.18);border-bottom:1px solid rgba(82,87,98,.18)}
.subpage-status strong{font-family:'Cambridge','Cormorant Garamond',Baskerville,Georgia,serif;font-size:clamp(2rem,3.5vw,3.4rem);font-weight:500;line-height:.95;color:#525762}

/* Data page */
.data-panel{margin-top:3.5rem;border-top:1px solid rgba(82,87,98,.2);border-bottom:1px solid rgba(82,87,98,.2);padding:2.2rem 0;display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:clamp(2rem,7vw,6rem);align-items:end}
.data-panel__label{font-family:'Space Grotesk',monospace;font-size:.58rem;letter-spacing:.14em;text-transform:uppercase;color:rgba(82,87,98,.52)}
.data-panel__reading{display:flex;align-items:flex-end;gap:1rem;margin-top:.8rem;flex-wrap:wrap}
.data-panel__reading strong{font-family:'Cambridge','Cormorant Garamond',Baskerville,Georgia,serif;font-size:clamp(3.3rem,6vw,5.8rem);font-weight:500;line-height:.82;letter-spacing:-.05em;color:#525762;font-variant-numeric:tabular-nums}
.data-panel__reading span{font-family:'Space Grotesk',monospace;font-size:.62rem;padding-bottom:.3rem;color:rgba(82,87,98,.64)}
.data-panel__meta{font-size:.82rem;line-height:1.65;color:rgba(82,87,98,.68)}
.data-panel__source{display:inline-block;margin-top:.8rem;font-family:'Space Grotesk',monospace;font-size:.58rem;letter-spacing:.08em;text-transform:uppercase;color:#525762;border-bottom:1px solid rgba(82,87,98,.25)}
.data-panel__source:hover{border-bottom-color:#F3D862}

/* Posts directory refinement */
.posts-page-head{max-width:760px}
.posts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem;margin-top:4rem}
.posts-empty{margin-top:4rem;padding:3rem 0;border-top:1px solid rgba(82,87,98,.2);border-bottom:1px solid rgba(82,87,98,.2)}

[dir="rtl"] .subpage-hero,[dir="rtl"] .subpage-section-head,[dir="rtl"] .subpage-note-grid,[dir="rtl"] .subpage-status,[dir="rtl"] .data-panel{text-align:right}
[dir="rtl"] .subpage-item{padding-left:2rem;padding-right:0}

/* Arabic needs a real Arabic type system; Latin tracking and compressed serif leading are not appropriate. */
html[lang="ar"] body{font-family:'Noto Sans Arabic','Tahoma','Arial',sans-serif}
html[lang="ar"] .title-font,
html[lang="ar"] .home-title,
html[lang="ar"] .site-head-copy h1,
html[lang="ar"] .site-identity-rail .rail-name,
html[lang="ar"] .subpage-title,
html[lang="ar"] .subpage-section-title,
html[lang="ar"] .subpage-item h3,
html[lang="ar"] .data-panel__reading strong,
html[lang="ar"] .subpage-status strong{font-family:'Noto Naskh Arabic','Amiri','Times New Roman',serif;letter-spacing:0}
html[lang="ar"] .home-title{line-height:1.12}
html[lang="ar"] .site-head-copy h1{line-height:1.08;letter-spacing:0}
html[lang="ar"] .subpage-title{line-height:1.08;letter-spacing:0;font-size:clamp(3.1rem,5.4vw,5.6rem)}
html[lang="ar"] .subpage-section-title{line-height:1.12;letter-spacing:0}
html[lang="ar"] .subpage-item h3{line-height:1.25}
html[lang="ar"] .site-identity-rail .rail-page,
html[lang="ar"] .home-kicker,
html[lang="ar"] .site-head-kicker,
html[lang="ar"] .subpage-kicker,
html[lang="ar"] .subpage-item small,
html[lang="ar"] .subpage-list-row h3,
html[lang="ar"] .subpage-list-row>span,
html[lang="ar"] .data-panel__label,
html[lang="ar"] .data-panel__source,
html[lang="ar"] .home-button,
html[lang="ar"] .subpage-button{font-family:'Noto Sans Arabic','Tahoma','Arial',sans-serif;letter-spacing:0;text-transform:none}
html[lang="ar"] .site-identity-rail .rail-page{font-size:.74rem;line-height:1.5}
html[lang="ar"] .site-primary-nav a{font-family:'Noto Sans Arabic','Tahoma','Arial',sans-serif;letter-spacing:0!important;text-transform:none;font-size:.73rem!important}
html[lang="ar"] #mobileMenu{font-family:'Noto Sans Arabic','Tahoma','Arial',sans-serif}
html[lang="ar"] .site-climate-signal,
html[lang="ar"] .data-panel__reading{direction:rtl;text-align:right}
html[lang="ar"] .site-climate-signal__top{font-family:'Noto Sans Arabic','Tahoma','Arial',sans-serif;letter-spacing:0;text-transform:none}
html[lang="ar"] .site-climate-signal__reading strong{font-family:'Noto Naskh Arabic','Amiri','Times New Roman',serif;letter-spacing:0}

@media(max-width:1023px){
  .home-principle{border-inline-end:0!important;margin-inline-end:0!important}
  .home-focus-item:nth-child(odd){border-right:0!important;border-inline-end:1px solid rgba(82,87,98,.12)!important;margin-right:0!important;margin-inline-end:1rem!important}
  .home-stage-step:not(:last-child){margin-inline-end:0!important}
  .subpage-hero,.subpage-section-head,.subpage-note-grid,.subpage-status,.data-panel{grid-template-columns:1fr;gap:2rem}
  .subpage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .subpage-item:nth-child(3n){border-inline-end:1px solid rgba(82,87,98,.13);margin-inline-end:2rem}
  .subpage-item:nth-child(2n){border-inline-end:0;margin-inline-end:0}
  .posts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:640px){
  .subpage-container{padding-top:4.5rem;padding-bottom:4.5rem}
  .subpage-title{font-size:3.55rem}
  html[lang="ar"] .subpage-title{font-size:3.2rem}
  .subpage-grid,.posts-grid{grid-template-columns:1fr}
  .subpage-item,.subpage-item:nth-child(2n),.subpage-item:nth-child(3n){border-inline-end:0;margin-inline-end:0;padding-inline-end:0;border-bottom:1px solid rgba(82,87,98,.14)}
  .subpage-list-row{grid-template-columns:48px 1fr;gap:.8rem 1rem}
  .subpage-list-row p{grid-column:2}
  .data-panel__reading strong{font-size:4rem}
}
