
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root{
  --bg:#f6f8fc; --surface:#fff; --surface-soft:#f1f4fb; --ink:#101828; --text:#344054;
  --muted:#667085; --line:#e4e7ec; --primary:#5b6cff; --primary2:#7c3aed; --cyan:#06b6d4;
  --green:#22c55e; --shadow-sm:0 8px 24px rgba(16,24,40,.06); --shadow-md:0 16px 42px rgba(16,24,40,.10);
  --shadow-lg:0 30px 80px rgba(16,24,40,.16); --radius:22px; --max:1200px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:hidden}
body{margin:0;font-family:"Manrope",Inter,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);line-height:1.68;-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:inherit;text-decoration:none} img{max-width:100%;display:block} button,input{font:inherit}
.container{width:min(var(--max),calc(100% - 48px));margin-inline:auto}.small{font-size:.88rem;color:var(--muted)}

/* Header */
.topbar{background:linear-gradient(90deg,#0b1220,#17213a,#0b1220);color:#dbe4ff;font-size:.78rem}
.topbar .container{min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:22px}
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.92);border-bottom:1px solid rgba(228,231,236,.9);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 5px 24px rgba(16,24,40,.04)}
.nav{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:28px}
.brand{display:inline-flex;align-items:center;flex:0 0 auto}.brand img{width:184px;height:auto}
.primary-nav{display:flex;align-items:center;gap:24px;margin-left:auto}
.primary-nav a{position:relative;font-size:.91rem;font-weight:700;color:#344054;padding:10px 0;white-space:nowrap}
.primary-nav a:not(.nav-cta)::after{content:"";position:absolute;left:0;right:100%;bottom:2px;height:2px;border-radius:4px;background:linear-gradient(90deg,var(--primary),var(--primary2));transition:right .2s ease}
.primary-nav a:hover{color:#3c49c9}.primary-nav a:hover::after{right:0}
.nav-cta{padding:10px 14px!important;color:#fff!important;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--primary2));box-shadow:0 10px 22px rgba(91,108,255,.2)}
.menu-toggle{display:none;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);cursor:pointer;box-shadow:0 5px 16px rgba(16,24,40,.05)}
.menu-toggle span,.menu-toggle::before,.menu-toggle::after{content:"";display:block;width:20px;height:2px;background:currentColor;border-radius:99px;transition:.2s}.menu-toggle span{margin:5px 0}
.menu-toggle[aria-expanded="true"] span{opacity:0}.menu-toggle[aria-expanded="true"]::before{transform:translateY(7px) rotate(45deg)}.menu-toggle[aria-expanded="true"]::after{transform:translateY(-7px) rotate(-45deg)}

/* Hero */
.hero{position:relative;overflow:hidden;padding:78px 0 58px;border-bottom:1px solid var(--line);background:linear-gradient(120deg,rgba(91,108,255,.08),transparent 38%),linear-gradient(180deg,#fff 0%,#f8f9fe 100%)}
.hero::before{content:"";position:absolute;width:430px;height:430px;right:-145px;top:-150px;border-radius:50%;background:radial-gradient(circle,rgba(124,58,237,.13),rgba(124,58,237,0) 70%)}
.hero::after{content:"";position:absolute;width:300px;height:300px;left:-150px;bottom:-160px;border-radius:50%;background:radial-gradient(circle,rgba(6,182,212,.10),rgba(6,182,212,0) 70%)}
.hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.13fr) minmax(340px,.87fr);gap:54px;align-items:center}.hero-grid>*{min-width:0}
.eyebrow{display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border-radius:999px;border:1px solid #dde4ff;background:linear-gradient(90deg,#eef2ff,#f7f3ff);color:#3b45b7;font-size:.78rem;font-weight:800;letter-spacing:.035em}
h1{margin:18px 0 16px;font-family:"Playfair Display",Georgia,serif;font-size:clamp(3.2rem,6vw,5.45rem);line-height:.99;letter-spacing:-.05em}h2{font-size:clamp(1.85rem,3vw,2.55rem);line-height:1.15;letter-spacing:-.025em}h3{line-height:1.3}
.lead{max-width:720px;margin:0;color:var(--text);font-size:1.12rem;line-height:1.8}.search{max-width:720px;margin-top:26px;padding:8px;display:flex;gap:8px;background:#fff;border:1px solid #d8dced;border-radius:17px;box-shadow:0 18px 46px rgba(91,108,255,.12)}
.search input{min-width:0;flex:1;border:0;outline:0;background:transparent;padding:12px 14px;color:var(--ink)}
.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;padding:12px 18px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;font-weight:800;cursor:pointer;box-shadow:0 8px 18px rgba(91,108,255,.18)}.btn:hover{filter:brightness(.97)}.btn.light,.btn.secondary{background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:none}
.trust-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:20px}.trust{padding:17px;background:rgba(255,255,255,.86);border:1px solid var(--line);border-radius:16px;box-shadow:0 6px 18px rgba(16,24,40,.035)}.trust strong{display:block;margin-bottom:5px}.trust span{display:block;color:var(--muted);font-size:.88rem;line-height:1.5}
.hero-panel{padding:30px;border-radius:28px;color:#fff;background:radial-gradient(circle at 90% 10%,rgba(124,58,237,.38),transparent 31%),linear-gradient(145deg,#101827,#1d2740);border:1px solid rgba(255,255,255,.08);box-shadow:var(--shadow-lg)}.hero-panel h2{margin:18px 0 10px}.hero-panel p{margin:0;color:#cbd5e1}.hero-panel-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.mini{padding:16px;border-radius:17px;background:rgba(255,255,255,.065);border:1px solid rgba(255,255,255,.09)}.mini strong{display:block;color:#9cc2ff;font-size:1.35rem}.mini span{font-size:.9rem;color:#e5e7eb}

/* Utility navigation */
.category-strip{background:#fff;border-bottom:1px solid var(--line)}.category-strip .container{display:flex;gap:10px;overflow:auto;padding:14px 0;scrollbar-width:none}.category-strip .container::-webkit-scrollbar{display:none}.pill{flex:0 0 auto;padding:9px 13px;border:1px solid var(--line);border-radius:999px;background:#f8fafc;color:#344054;font-size:.88rem;font-weight:750;transition:.2s}.pill:hover{transform:translateY(-1px);border-color:#cbd5ff;color:#4451d4}
.trending{background:linear-gradient(90deg,#0b1220,#17213a,#0b1220);color:#fff}.trending-inner{display:flex;align-items:center;gap:22px;overflow:auto;white-space:nowrap;padding:11px 0;font-size:.84rem;scrollbar-width:none}.trending-inner::-webkit-scrollbar{display:none}.trending strong{color:#8fb1ff;text-transform:uppercase;letter-spacing:.08em;font-size:.7rem}.trending a{color:#e5e7eb}.trending a::before{content:"•";color:#7ca4ff;margin-right:10px}

/* Main content */
main section{padding:44px 0}.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:34px;align-items:start}.section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:20px}.section-head h2{margin:8px 0 0}.section-head p{max-width:600px;margin:0;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card{position:relative;overflow:hidden;min-height:250px;padding:24px;border:1px solid #e5e9f2;border-radius:var(--radius);background:#fff;box-shadow:var(--shadow-sm);transition:transform .2s,box-shadow .2s,border-color .2s}.card::before{content:"";display:block;height:5px;margin:-24px -24px 20px;background:linear-gradient(90deg,var(--primary),var(--cyan),var(--primary2))}.card:hover{transform:translateY(-5px);box-shadow:var(--shadow-md);border-color:#d5dafa}.card h3{margin:.8rem 0 .55rem;font-size:1.16rem;letter-spacing:-.018em}.card p{margin-bottom:0;color:var(--text);font-size:.94rem;line-height:1.7}.card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.tag{display:inline-flex;padding:6px 9px;border-radius:999px;background:#eef3ff;color:#3448aa;font-size:.74rem;font-weight:800}.readtime{color:var(--muted);font-size:.79rem}.iconbox{width:52px;height:52px;margin-bottom:16px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#eef2ff,#f7f3ff);box-shadow:inset 0 0 0 1px #e1e6ff;font-size:1.3rem}.featured{color:#fff;background:linear-gradient(145deg,#121827,#202b46)}.featured p{color:#cbd5e1}.featured .tag{background:rgba(255,255,255,.1);color:#c7d8ff}
.sidebar{position:sticky;top:100px}.side-card{margin-bottom:18px;padding:19px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-sm)}.side-card h3{margin-top:0}.side-list a{display:block;padding:10px 0;border-bottom:1px solid var(--line);font-weight:700}.side-list a:last-child{border-bottom:0}
.ad-slot{display:none!important}

/* Pages + articles */
.page-wrap{padding:44px 0}.page-card,.article{max-width:900px;margin:0 auto;padding:40px 46px;border:1px solid #e5e9f2;border-radius:24px;background:#fff;box-shadow:var(--shadow-sm)}.page-card h1,.article h1{font-size:clamp(2.4rem,4.7vw,4.25rem)}.page-card h2,.article h2{margin-top:2rem;font-size:1.65rem}.page-card p,.article p,.article li{color:#344054}.kicker{display:inline-flex;padding:6px 9px;border-radius:999px;background:#eef3ff;color:#3448aa;font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.article-shell{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:30px;align-items:start}.article{max-width:none;margin:0}.article p,.article li{font-size:1.02rem;line-height:1.82}.meta,.breadcrumbs{color:var(--muted);font-size:.88rem}.breadcrumbs{margin-bottom:10px}.breadcrumbs a{color:#4451d4}.quick{margin:22px 0;padding:16px 18px;border-left:4px solid var(--primary);border-radius:12px;background:linear-gradient(90deg,#f3f5ff,#fafbff)}.toc{margin:22px 0;padding:18px;border:1px solid var(--line);border-radius:16px;background:#f8faff}.toc strong{display:block;margin-bottom:8px}.toc a{display:block;padding:5px 0;color:#3851b8}.warning{margin:24px 0;padding:16px 18px;border:1px solid #f1d7aa;border-radius:14px;background:#fffaf1;color:#6b4b16}.author-card{margin-top:26px;padding:18px;border:1px solid var(--line);border-radius:16px;background:#f8fafc}.author-card span{display:block;margin-top:6px}.related-guides a{color:#4451d4;font-weight:800}

/* Newsletter */
.newsletter{padding:12px 0 54px!important}.newsletter-box{display:grid;grid-template-columns:1fr .8fr;gap:28px;align-items:center;padding:34px;border-radius:26px;color:#fff;background:radial-gradient(circle at 85% 10%,rgba(124,58,237,.42),transparent 28%),linear-gradient(135deg,#0b1220,#17213a);box-shadow:var(--shadow-md)}.newsletter-box h2{margin:10px 0 6px}.newsletter-box p{margin:0;color:#cbd5e1}.newsletter-form{display:flex;padding:8px;border-radius:15px;background:#fff}.newsletter-form input{min-width:0;flex:1;border:0;outline:0;padding:11px;background:transparent}

/* Footer */
.site-footer{margin-top:42px;color:#cbd5e1;background:linear-gradient(135deg,#09111f,#111b31)}.site-footer::before{content:"";display:block;height:4px;background:linear-gradient(90deg,var(--primary),var(--cyan),var(--primary2))}.footer-main{padding:50px 0 34px}.footer-grid{display:grid;grid-template-columns:minmax(260px,2fr) repeat(3,minmax(120px,1fr));gap:34px}.footer-brand img{width:176px;filter:brightness(0) invert(1);opacity:.95}.footer-brand p{max-width:420px;color:#aeb9cc}.site-footer h4{margin:0 0 13px;color:#fff;font-size:.94rem}.site-footer a{display:block;width:max-content;max-width:100%;margin:8px 0;color:#cbd5e1;font-size:.9rem}.site-footer a:hover{color:#fff}.footer-bottom{border-top:1px solid rgba(255,255,255,.09)}.footer-bottom .container{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#94a3b8;font-size:.82rem}.footer-bottom-links{display:flex;gap:18px;flex-wrap:wrap}.footer-bottom-links a{margin:0;color:#94a3b8}

@media(max-width:980px){
  .container{width:min(var(--max),calc(100% - 36px))}.primary-nav{gap:16px}.primary-nav a{font-size:.86rem}.hero{padding:58px 0 46px}.hero-grid,.layout,.article-shell{grid-template-columns:1fr}.hero-grid{gap:30px}.hero-panel{max-width:760px}.sidebar{position:static}.footer-grid{grid-template-columns:1.6fr repeat(3,1fr);gap:24px}
}
@media(max-width:760px){
  .container{width:calc(100% - 32px)}.topbar{display:none}.site-header{position:sticky;top:0}.nav{min-height:70px;gap:14px}.brand img{width:158px;max-width:56vw}.menu-toggle{display:block;position:relative}.primary-nav{position:absolute;left:16px;right:16px;top:calc(100% + 8px);display:none;flex-direction:column;align-items:stretch;gap:0;padding:10px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-lg)}.primary-nav.open{display:flex}.primary-nav a{padding:12px 13px;border-radius:10px;font-size:.96rem}.primary-nav a::after{display:none!important}.primary-nav a:hover{background:#f5f7fb}.nav-cta{margin-top:6px;text-align:center}
  .hero{padding:34px 0 32px}.hero-grid{display:flex;flex-direction:column;gap:24px}.hero h1{font-size:clamp(3rem,14vw,4.1rem);line-height:.96;margin:16px 0 14px}.lead{font-size:1.03rem;line-height:1.68}.search{display:grid;grid-template-columns:1fr;width:100%;margin-top:20px}.search .btn{width:100%}.trust-row{grid-template-columns:1fr;gap:10px}.hero-panel{width:100%;padding:22px;border-radius:22px}.hero-panel h2{font-size:2rem;margin-top:16px}.hero-panel-grid{gap:10px}.mini{padding:14px}.category-strip .container,.trending-inner{width:100%;padding-left:16px;padding-right:16px}.section-head{display:block}.section-head p{margin-top:10px}.grid{grid-template-columns:1fr}.card{min-height:0;padding:21px}.card::before{margin:-21px -21px 18px}.page-wrap{padding:28px 0}.page-card,.article{padding:25px 21px;border-radius:19px}.page-card h1,.article h1{font-size:clamp(2.45rem,12vw,3.35rem)}.newsletter-box{grid-template-columns:1fr;padding:24px}.newsletter-form{display:grid;gap:7px}.footer-main{padding:38px 0 28px}.footer-grid{grid-template-columns:1fr 1fr;gap:30px 24px}.footer-brand{grid-column:1/-1}.footer-bottom .container{padding:18px 0;min-height:0;align-items:flex-start;flex-direction:column}.footer-bottom-links{gap:12px 16px}
}
@media(max-width:440px){
  .container{width:calc(100% - 28px)}.brand img{width:150px}.primary-nav{left:14px;right:14px}.hero h1{font-size:clamp(2.8rem,13.8vw,3.65rem)}.hero-panel-grid{grid-template-columns:1fr 1fr}.footer-grid{grid-template-columns:1fr}.footer-brand{grid-column:auto}
}


/* V11 — multilingual + precision responsive system */
html{font-size:clamp(15px,.18vw + 14.4px,18px);-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:92px}
body{overflow-x:hidden;word-break:normal;overflow-wrap:break-word}
img,svg,video,canvas{max-width:100%;height:auto}
input,button,select,textarea{font:inherit}
h1,h2,h3,p,a,span{word-break:normal;overflow-wrap:break-word}
.container{padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
.hero h1{font-size:clamp(3rem,6.1vw,6.15rem);line-height:.94;max-width:10ch;text-wrap:balance}
.lead{font-size:clamp(1rem,1vw + .62rem,1.28rem);max-width:62ch}
.page-card h1,.article h1{font-size:clamp(2.35rem,5vw,4.6rem);text-wrap:balance}
.card h3{font-size:clamp(1.08rem,.35vw + 1rem,1.3rem)}
.language-menu{position:relative;margin-left:auto}
.language-button{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:800;cursor:pointer;white-space:nowrap}
.language-popover{position:absolute;z-index:80;top:calc(100% + 8px);right:0;display:none;min-width:190px;max-height:min(420px,70vh);overflow:auto;padding:8px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-lg)}
.language-menu.open .language-popover{display:block}
.language-popover a{display:block;padding:10px 12px;border-radius:10px;color:var(--ink);font-weight:700;white-space:nowrap}
.language-popover a:hover{background:#f5f7fb}
.lang-home-link{padding:9px 12px;border-radius:10px;font-weight:800;color:#4451d4}
.lang-hero{padding:72px 0 54px}.lang-hero-inner{max-width:900px}.lang-hero h1{max-width:12ch}.lang-actions{margin-top:24px}
.lang-topics{padding:44px 0 68px}.lang-topic-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.lang-topic{padding:22px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow-sm)}.lang-topic h3{margin:0 0 10px;font-size:1.12rem}.lang-topic p{margin:0;color:var(--muted);line-height:1.7}.language-note{margin-top:26px;padding:18px 20px;border:1px solid #dfe4ff;border-radius:16px;background:#f6f7ff;color:#344054;line-height:1.7}
html[dir="rtl"] body{font-family:Arial,"Tahoma","Noto Sans Arabic",sans-serif}html[dir="rtl"] .language-menu{margin-left:0;margin-right:auto}html[dir="rtl"] .language-popover{right:auto;left:0}html[dir="rtl"] .hero h1,html[dir="rtl"] .lead,html[dir="rtl"] .lang-hero-inner{text-align:right}html[dir="rtl"] .footer-grid,html[dir="rtl"] .footer-bottom .container{text-align:right}
@media (min-width:1400px){.container{max-width:1240px}.hero-grid{grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);gap:56px}.card{padding:28px}}
@media (max-width:1100px){.lang-topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.language-button{padding:8px 10px}.primary-nav{gap:12px}}
@media (max-width:760px){
  html{font-size:16px}.nav{min-height:68px}.language-menu{order:2;margin-left:auto}.menu-toggle{order:3}.brand{order:1}.language-button{min-height:40px;padding:8px 9px;font-size:.84rem}.language-popover{position:fixed;left:16px;right:16px;top:78px;min-width:0;max-height:65vh}.language-popover a{font-size:.96rem}.lang-home-link{display:none}.hero h1{font-size:clamp(2.65rem,12.5vw,4rem);max-width:11ch}.lead{font-size:1.02rem;line-height:1.68}.hero-panel{overflow:hidden}.hero-panel h2{font-size:clamp(1.75rem,8vw,2.25rem)}.hero-panel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mini strong{font-size:1.2rem}.lang-hero{padding:42px 0 34px}.lang-topic-grid{grid-template-columns:1fr}.footer-grid{gap:26px 20px}
}
@media (max-width:420px){.container{width:calc(100% - 24px)}.brand img{width:138px}.language-button{font-size:0}.language-button::first-letter{font-size:1rem}.language-button span{font-size:.85rem}.hero h1{font-size:clamp(2.45rem,12vw,3.4rem)}.hero-panel-grid{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr}.footer-brand{grid-column:auto}.page-card,.article{padding:22px 18px}}
@media (max-width:340px){.brand img{width:124px}.language-button{padding:7px 8px}.nav{gap:8px}.hero h1{font-size:2.35rem}}

/* V12 — polished responsive header/footer + fluid type */
:root{
  --content-pad:clamp(14px,3.2vw,28px);
  --header-h:clamp(64px,7vw,78px);
}

/* Safer fluid layout at every viewport */
.container{
  width:min(var(--max),calc(100% - (var(--content-pad) * 2)));
  padding-left:max(0px,env(safe-area-inset-left));
  padding-right:max(0px,env(safe-area-inset-right));
}
body{font-size:clamp(.98rem,.12vw + .95rem,1.05rem)}
p,li{line-height:clamp(1.62,1.1vw + 1.25,1.82)}
h1,h2,h3,h4{hyphens:auto}

/* Header precision */
.site-header{isolation:isolate}
.nav{min-height:var(--header-h);gap:clamp(10px,2vw,26px)}
.brand img{width:clamp(142px,15vw,184px)}
.language-button,.menu-toggle{flex:0 0 auto}
.language-button{min-height:44px;border-radius:14px;box-shadow:0 4px 16px rgba(16,24,40,.04)}
.menu-toggle{width:46px;height:46px;border-radius:14px}
.primary-nav{gap:clamp(12px,1.5vw,24px)}

/* Better section rhythm */
main section{padding:clamp(34px,4.2vw,54px) 0}
.hero{padding:clamp(42px,6vw,78px) 0 clamp(36px,4.5vw,58px)}
.hero h1{font-size:clamp(2.7rem,7.1vw,5.7rem);line-height:.96}
.lead{font-size:clamp(1rem,1.25vw,1.22rem)}
.newsletter{padding:8px 0 clamp(34px,5vw,54px)!important}

/* Footer: compact, clear, mobile-first */
.site-footer{margin-top:clamp(20px,3vw,38px)}
.footer-main{padding:clamp(30px,4vw,48px) 0 clamp(24px,3vw,34px)}
.footer-grid{grid-template-columns:minmax(260px,1.8fr) repeat(3,minmax(120px,1fr));gap:clamp(22px,3vw,38px)}
.footer-brand .brand{
  width:max-content;
  max-width:100%;
  padding:8px 10px;
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 26px rgba(0,0,0,.14);
}
.footer-brand img{width:clamp(150px,15vw,176px);filter:none;opacity:1}
.footer-brand p{margin:16px 0 0;max-width:44ch;font-size:.94rem;line-height:1.7}
.site-footer h4{margin:2px 0 12px;font-size:.94rem;letter-spacing:.01em}
.site-footer a{margin:7px 0;font-size:.89rem;line-height:1.45}
.footer-bottom .container{min-height:58px;padding:12px 0}

/* Tablet */
@media(max-width:980px){
  .footer-grid{grid-template-columns:1.35fr repeat(3,1fr);gap:24px}
  .primary-nav{gap:12px}
}

/* Mobile */
@media(max-width:760px){
  :root{--header-h:68px}
  .container{width:min(var(--max),calc(100% - 28px))}
  .nav{gap:10px}
  .brand img{width:clamp(132px,38vw,154px)}
  .language-button{min-height:42px;padding:8px 10px}
  .menu-toggle{width:44px;height:44px}
  .primary-nav{left:14px;right:14px;top:calc(100% + 7px)}
  .hero{padding:38px 0 34px}
  .hero h1{font-size:clamp(2.55rem,12.2vw,4rem);max-width:11ch}
  .lead{font-size:1rem;line-height:1.67}
  .search{margin-top:20px}
  .newsletter-box{padding:22px;border-radius:22px}
  .footer-main{padding:30px 0 22px}
  .footer-grid{
    grid-template-columns:1fr 1fr;
    gap:24px 18px;
  }
  .footer-brand{grid-column:1/-1}
  .footer-brand p{margin-top:13px;max-width:100%;font-size:.9rem}
  .site-footer h4{margin-bottom:9px}
  .site-footer a{margin:6px 0;font-size:.87rem}
  .footer-bottom .container{padding:14px 0;gap:10px;flex-direction:column;align-items:flex-start}
  .footer-bottom-links{gap:10px 15px}
}

/* Small phones: retain 2-column footer when there is room */
@media(max-width:430px){
  .container{width:calc(100% - 24px)}
  .brand img{width:132px}
  .language-button{max-width:122px}
  .footer-grid{grid-template-columns:1fr 1fr;gap:22px 16px}
  .footer-brand{grid-column:1/-1}
  .footer-grid>div:last-child{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;column-gap:16px}
  .footer-grid>div:last-child h4{grid-column:1/-1}
  .site-footer a{width:auto}
}

/* Very small devices */
@media(max-width:350px){
  .brand img{width:120px}
  .language-button{padding:7px 8px}
  .menu-toggle{width:42px;height:42px}
  .footer-grid{grid-template-columns:1fr}
  .footer-brand,.footer-grid>div:last-child{grid-column:auto;display:block}
}

/* RTL polish */
html[dir="rtl"] .footer-brand p{margin-right:0;margin-left:auto}
html[dir="rtl"] .footer-brand .brand{margin-left:auto}


/* V13 — launch clean-up */
.newsletter{display:none!important}
.footer-brand .brand{display:inline-flex!important;align-items:center;background:#fff!important;padding:8px 10px!important;border-radius:14px!important}
.footer-brand .brand img{display:block!important;width:clamp(150px,15vw,176px)!important;height:auto!important;filter:none!important;opacity:1!important}
@media (max-width:520px){.site-footer{margin-top:22px}.footer-main{padding-top:28px}.footer-brand .brand{padding:7px 9px!important}.footer-brand .brand img{width:150px!important}}

/* V16 — final cross-device polish */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden}
img,svg{max-width:100%;height:auto}
.hero h1,.page-card h1,.article h1,.card h3,.section-head h2{text-wrap:balance;overflow-wrap:anywhere}
.lead,.card p,.article p,.article li{text-wrap:pretty}

/* Header: keep language usable instead of collapsing to a lone arrow */
.language-button{max-width:none!important;font-size:.88rem!important;line-height:1;justify-content:center}
.language-button .lang-short{display:none}
@media(max-width:520px){
  .topbar{display:none}
  .nav{min-height:66px;gap:8px}
  .brand img{width:clamp(118px,34vw,142px)}
  .language-button{padding:8px 9px!important;font-size:.78rem!important;min-height:40px}
  .menu-toggle{width:42px;height:42px}
}
@media(max-width:390px){
  .language-button{font-size:0!important;width:42px;padding:0!important}
  .language-button::before{content:'🌐';font-size:1.05rem}
  .language-button span{font-size:.82rem!important;margin-left:1px}
  .brand img{width:122px}
}
@media(max-width:330px){.brand img{width:112px}.nav{gap:6px}.language-button,.menu-toggle{width:40px;height:40px}}

/* Category navigation: comfortable horizontal swipe on phones */
.category-strip{position:relative}
.category-strip .container{gap:9px;scroll-snap-type:x proximity;overscroll-behavior-inline:contain}
.category-strip .pill{scroll-snap-align:start;padding:10px 15px;min-height:40px;display:inline-flex;align-items:center}
@media(max-width:760px){.category-strip .container{padding-top:12px;padding-bottom:12px}.category-strip .pill{font-size:.9rem}}

/* Cards/articles */
.grid{align-items:stretch}
.card{height:100%;border-radius:22px}
.card h3{line-height:1.24;font-size:clamp(1.18rem,1.2vw + .9rem,1.48rem)}
.card p{line-height:1.7}
.article{overflow:hidden}
.article h1{line-height:1.03;margin-bottom:14px}
.article h2{font-size:clamp(1.45rem,2.4vw,1.85rem);line-height:1.22;text-wrap:balance}
.article h3{font-size:clamp(1.18rem,2vw,1.4rem);line-height:1.3}
.article table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.article pre,.article code{max-width:100%;overflow-wrap:anywhere}
@media(max-width:760px){
  .page-wrap{padding:24px 0}
  .page-card,.article{padding:24px 19px;border-radius:20px}
  .page-card h1,.article h1{font-size:clamp(2.25rem,10.8vw,3.25rem)}
  .article p,.article li{font-size:1rem;line-height:1.76}
  .quick,.toc,.warning,.author-card{padding:15px 16px;margin:19px 0}
  .card{padding:20px}
}

/* Category/page heroes */
@media(max-width:760px){
  .hero[style]{padding:36px 0 28px!important}
  .hero .eyebrow{font-size:.78rem}
  .hero .lead{max-width:38ch}
}

/* Footer: compact but readable across phone/tablet/desktop */
.footer-brand .brand{background:transparent!important;padding:0!important;box-shadow:none!important}
.footer-brand .brand img{width:clamp(150px,15vw,178px)!important}
@media(max-width:760px){
  .site-footer{margin-top:26px}
  .footer-main{padding:28px 0 20px}
  .footer-grid{grid-template-columns:1fr 1fr;gap:22px 18px}
  .footer-brand{grid-column:1/-1}
  .footer-brand p{font-size:.92rem;line-height:1.65}
  .site-footer h4{font-size:.95rem}
  .site-footer a{font-size:.9rem;margin:6px 0}
}
@media(max-width:360px){.footer-grid{grid-template-columns:1fr}.footer-brand,.footer-grid>div:last-child{grid-column:auto!important;display:block!important}}

/* Hide reserved manual ad boxes until real ad-unit slots are configured */
.ad-slot{display:none!important}
