/* 1. Variables */
:root{--tm-primary:#6366F1;--tm-primary-dark:#4F46E5;--tm-accent:#06B6D4;--tm-success:#10B981;--tm-warning:#F59E0B;--tm-danger:#EF4444;--tm-bg:#F8FAFC;--tm-surface:#fff;--tm-dark-bg:#0F172A;--tm-dark-surface:#111827;--tm-dark-surface-2:#1E293B;--tm-text:#0F172A;--tm-dark-text:#F8FAFC;--tm-muted:#64748B;--tm-border:#E2E8F0;--tm-radius:14px;--tm-container:1280px;--tm-shadow:0 10px 35px rgba(15,23,42,.07);--tm-font:"Cairo","Tajawal","IBM Plex Sans Arabic",system-ui,sans-serif;--tm-transition:180ms ease}
/* 2. Reset/Base */
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--tm-bg);color:var(--tm-text);font-family:var(--tm-font);font-size:var(--tm-base-font,16px);line-height:1.8}img{max-width:100%;height:auto;display:block}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button{cursor:pointer}.tm-container{width:min(calc(100% - 32px),var(--tm-container));margin-inline:auto}.site-main{min-height:55vh}.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.screen-reader-text:focus{clip:auto!important;width:auto;height:auto;margin:8px;padding:10px 14px;background:#fff;color:#000;z-index:99999}.skip-link{inset-inline-start:8px;top:8px}.image-placeholder{display:block;width:100%;height:100%;background:linear-gradient(135deg,#cbd5e1,#e2e8f0)}svg{width:1.25em;height:1.25em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* 3. Typography */
h1,h2,h3,h4,h5,h6{line-height:1.35;margin-block:0 .6em;font-weight:800;letter-spacing:-.02em}p{margin-block:0 1.25em}.entry-content{font-size:1.08rem;line-height:1.95}.entry-content h2{font-size:1.75rem;margin-block-start:2em}.entry-content h3{font-size:1.38rem;margin-block-start:1.6em}.entry-content a{color:var(--tm-primary);text-decoration:underline;text-underline-offset:3px}.entry-content blockquote{margin:1.8em 0;padding:1em 1.2em;border-inline-start:4px solid var(--tm-primary);background:var(--tm-surface);border-radius:var(--tm-radius)}.entry-content pre,.entry-content code{direction:ltr;text-align:left;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.entry-content pre{overflow:auto;background:#0b1220;color:#e2e8f0;padding:18px;border-radius:12px}.entry-content table{width:100%;border-collapse:collapse;display:block;overflow-x:auto}.entry-content th,.entry-content td{border:1px solid var(--tm-border);padding:10px 12px}.eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.08em;color:var(--tm-primary);text-transform:uppercase}
/* 4. Layout */
.content-with-sidebar{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:34px;padding-block:34px}.content-column{min-width:0}.single-wide,.page-shell{max-width:980px;padding-block:40px}.sidebar{min-width:0}.has-sticky-sidebar .sidebar{align-self:start;position:sticky;top:98px}.archive-header{margin-block-end:24px}.archive-header h1{font-size:clamp(1.8rem,4vw,2.6rem)}.archive-description{color:var(--tm-muted)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-block-end:22px}.section-heading h2{font-size:clamp(1.35rem,3vw,1.9rem);margin:0}.section-heading a{font-size:.9rem;color:var(--tm-primary);font-weight:700}.home-section{padding-block:34px}.home-dark-section{background:var(--tm-dark-bg);color:#fff}.home-dark-section .post-card{background:var(--tm-dark-surface);border-color:#263246}.techmag-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.techmag-list{display:grid;gap:18px}.related-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
/* 5. Header */
.site-header{position:relative;z-index:100;background:var(--tm-surface);border-block-end:1px solid var(--tm-border)}.site-header.is-sticky .main-nav,.header-minimal.is-sticky,.header-dark-tech.is-sticky{position:sticky;top:0;z-index:110;box-shadow:0 8px 24px rgba(15,23,42,.08)}.top-bar{background:#0f172a;color:#cbd5e1;font-size:.8rem}.top-bar-inner,.header-main,.minimal-inner,.dark-tech-inner,.mega-brand-row,.centered-brand{min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:22px}.header-main{min-height:94px}.site-brand,.site-title-mark{font-weight:900;font-size:1.65rem;letter-spacing:-.04em}.site-title-mark strong{color:var(--tm-primary)}.custom-logo{max-height:58px;width:auto}.main-nav{background:var(--tm-surface);border-block-start:1px solid var(--tm-border)}.nav-inner{display:flex;align-items:center;gap:20px;min-height:56px}.primary-menu,.top-menu,.footer-menu,.mobile-menu{list-style:none;padding:0;margin:0}.primary-menu{display:flex;align-items:center;gap:4px;flex:1}.primary-menu>li{position:relative}.primary-menu>li>a{display:flex;align-items:center;padding:15px 12px;font-weight:700;font-size:.94rem}.primary-menu>li>a:hover{color:var(--tm-primary)}.primary-menu .sub-menu{position:absolute;inset-inline-start:0;top:100%;min-width:230px;background:var(--tm-surface);list-style:none;margin:0;padding:8px;border:1px solid var(--tm-border);border-radius:12px;box-shadow:var(--tm-shadow);opacity:0;visibility:hidden;transform:translateY(8px);transition:var(--tm-transition)}.primary-menu li:hover>.sub-menu,.primary-menu li:focus-within>.sub-menu{opacity:1;visibility:visible;transform:none}.sub-menu a{display:block;padding:8px 10px;border-radius:8px}.sub-menu a:hover{background:var(--tm-bg);color:var(--tm-primary)}.nav-actions,.header-tools,.top-actions{display:flex;align-items:center;gap:8px}.search-toggle,.dark-toggle,.mobile-menu-toggle,.mobile-menu-close,.search-close{width:40px;height:40px;display:grid;place-items:center;border:0;background:transparent;border-radius:10px;color:inherit}.search-toggle:hover,.dark-toggle:hover,.mobile-menu-toggle:hover{background:rgba(99,102,241,.1);color:var(--tm-primary)}.mobile-menu-toggle{display:none}.header-centered .centered-brand{justify-content:center;position:relative;min-height:92px}.header-centered .header-tools{position:absolute;inset-inline-end:0}.centered-nav{justify-content:center}.header-minimal{padding-block:8px}.minimal-inner{min-height:64px}.desktop-nav{flex:1}.header-dark-tech{background:#0f172a;color:#f8fafc;border:0}.header-dark-tech .primary-menu a{color:#f8fafc}.header-mega .mega-brand-row{min-height:104px}.mega-menu>.sub-menu{width:min(760px,85vw);padding:16px}.mega-posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mega-post{display:grid;gap:8px}.mega-post img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:8px}.news-ticker{background:#fff;border-block-end:1px solid var(--tm-border)}.ticker-inner{display:flex;gap:14px;align-items:center;min-height:42px;overflow:hidden}.ticker-inner>strong{color:var(--tm-danger);white-space:nowrap}.ticker-track{display:flex;gap:28px;overflow:hidden;white-space:nowrap}.ticker-track a{font-size:.85rem}
/* 6. Navigation/mobile/search */
.mobile-drawer{position:fixed;inset-block:0;inset-inline-start:0;width:min(88vw,360px);background:var(--tm-surface);z-index:1002;transform:translateX(calc(-110% * var(--drawer-dir,1)));transition:transform 220ms ease;padding:20px;overflow:auto}.rtl .mobile-drawer,.techmag-rtl .mobile-drawer{--drawer-dir:-1}.mobile-drawer.is-open{transform:none}.drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:1001;opacity:0;visibility:hidden;transition:var(--tm-transition)}.drawer-backdrop.is-open{opacity:1;visibility:visible}.mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;margin-block-end:20px}.mobile-menu li{border-block-end:1px solid var(--tm-border)}.mobile-menu a{display:block;padding:12px 4px;font-weight:700}.mobile-menu .sub-menu{list-style:none;padding-inline-start:18px}.mobile-social{display:flex;flex-wrap:wrap;gap:10px;margin-block-start:22px;font-size:.85rem}.search-overlay{position:fixed;inset:0;background:rgba(15,23,42,.82);backdrop-filter:blur(10px);z-index:1200;display:grid;place-items:center;padding:24px;opacity:0;visibility:hidden;transition:var(--tm-transition)}.search-overlay.is-open{opacity:1;visibility:visible}.search-panel{width:min(760px,100%);background:var(--tm-surface);padding:24px;border-radius:20px}.search-close{position:absolute;top:20px;inset-inline-end:20px;color:#fff}.search-form{display:flex;gap:8px}.search-field{flex:1;min-width:0;border:1px solid var(--tm-border);background:var(--tm-bg);padding:12px 14px;border-radius:12px;color:var(--tm-text)}.search-submit{width:48px;border:0;border-radius:12px;background:var(--tm-primary);color:#fff}.live-search-results{margin-block-start:14px;display:grid;gap:8px}.live-search-results a{display:block;padding:8px 10px;border-radius:8px;background:var(--tm-bg)}
/* 7. Hero */
.hero-section{padding-block:24px 10px}.hero-grid{display:grid;gap:12px}.hero-layout-1 .hero-grid{grid-template-columns:2fr 1fr 1fr;grid-template-rows:repeat(2,230px)}.hero-layout-1 .hero-card-1{grid-row:1/3}.hero-layout-1 .hero-card-4,.hero-layout-1 .hero-card-5{grid-column:auto}.hero-layout-2 .hero-grid{grid-template-columns:2fr 1fr;grid-template-rows:repeat(2,245px)}.hero-layout-2 .hero-card-1{grid-row:1/3}.hero-layout-3 .hero-grid{grid-template-columns:repeat(3,1fr);grid-auto-rows:360px}.hero-layout-4 .hero-grid{grid-template-columns:1fr;grid-auto-rows:min(62vh,620px)}.hero-card{position:relative;overflow:hidden;border-radius:calc(var(--tm-radius) + 2px);background:#0f172a;min-height:180px}.hero-image,.hero-image img{position:absolute;inset:0;width:100%;height:100%}.hero-image img{object-fit:cover;transition:transform 350ms ease}.hero-card:hover .hero-image img{transform:scale(1.025)}.hero-card:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 28%,rgba(2,6,23,.88) 100%);pointer-events:none}.hero-overlay{position:absolute;z-index:2;inset-inline:18px;inset-block-end:16px;color:#fff}.hero-overlay h2{font-size:clamp(1rem,2.2vw,1.8rem);margin:.45rem 0}.hero-card-1 .hero-overlay h2{font-size:clamp(1.45rem,3.2vw,2.55rem)}.hero-meta{font-size:.78rem;color:#cbd5e1}
/* 8. Cards */
.post-card{background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:var(--tm-radius);overflow:hidden;box-shadow:0 3px 16px rgba(15,23,42,.035);transition:transform var(--tm-transition),box-shadow var(--tm-transition)}.post-card:hover{transform:translateY(-3px);box-shadow:var(--tm-shadow)}.card-image{display:block;aspect-ratio:16/10;overflow:hidden;background:#e2e8f0}.card-image img{width:100%;height:100%;object-fit:cover;transition:transform 280ms ease}.post-card:hover .card-image img{transform:scale(1.025)}.card-body{padding:16px}.category-badge{display:inline-flex;align-items:center;line-height:1;background:var(--category-color,var(--tm-primary));color:#fff;padding:6px 9px;border-radius:999px;font-size:.72rem;font-weight:800}.card-title{font-size:1.12rem;margin:.65rem 0}.card-title a:hover{color:var(--tm-primary)}.card-meta{display:flex;flex-wrap:wrap;gap:8px 12px;color:var(--tm-muted);font-size:.76rem}.card-body p{font-size:.88rem;color:var(--tm-muted);margin:.7rem 0 0}.post-list-item{display:grid;grid-template-columns:190px 1fr;gap:18px;background:var(--tm-surface);border:1px solid var(--tm-border);padding:12px;border-radius:var(--tm-radius)}.list-image{aspect-ratio:16/10;overflow:hidden;border-radius:10px;background:#e2e8f0}.list-image img{width:100%;height:100%;object-fit:cover}.post-list-item h2{font-size:1.15rem;margin:.45rem 0}.post-list-item p{color:var(--tm-muted);font-size:.88rem;margin:.4rem 0}
/* 9. Homepage */
.horizontal-posts{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.trend-item{display:flex;gap:14px;align-items:center;background:var(--tm-surface);border:1px solid var(--tm-border);padding:14px;border-radius:12px}.trend-rank{font-size:2rem;font-weight:900;color:rgba(99,102,241,.22);line-height:1}.trend-item strong{display:block;font-size:.9rem;line-height:1.5}.trend-item small{color:var(--tm-muted)}.category-blocks{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.category-block{border-block-start:4px solid var(--category-color);padding-block-start:14px}.category-posts{display:grid;gap:12px}.category-posts .post-list-item{grid-template-columns:105px 1fr}.category-posts .post-list-item p{display:none}.newsletter-box{display:grid;grid-template-columns:1.3fr 1fr;gap:30px;align-items:center;padding:32px;border-radius:20px;background:linear-gradient(135deg,rgba(99,102,241,.12),rgba(6,182,212,.12));border:1px solid rgba(99,102,241,.18)}.newsletter-box h2{font-size:2rem}.newsletter-form{display:flex;gap:8px}.newsletter-form input{flex:1;min-width:0;border:1px solid var(--tm-border);border-radius:12px;padding:12px;background:var(--tm-surface)}.newsletter-form button,.tm-button{border:0;background:var(--tm-primary);color:#fff;border-radius:12px;padding:11px 18px;font-weight:800}.tm-button{display:inline-flex}
/* 10. Sidebar */
.widget{background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:var(--tm-radius);padding:18px;margin-block-end:18px}.widget-title{font-size:1.08rem;border-block-end:1px solid var(--tm-border);padding-block-end:10px}.widget ul{padding-inline-start:20px}.widget-post-list{display:grid;gap:12px}.widget-post{display:grid;grid-template-columns:78px 1fr;gap:10px;align-items:center}.widget-post img{width:78px;height:56px;object-fit:cover;border-radius:8px}.widget-post span{font-size:.84rem;font-weight:700;line-height:1.45}.sticky-ad-wrap{position:sticky;top:100px}
/* 11. Single */
.single-article{background:var(--tm-surface);border-radius:var(--tm-radius);padding:clamp(18px,4vw,38px);box-shadow:0 4px 22px rgba(15,23,42,.04)}.single-header{margin-block-end:22px}.single-header h1{font-size:clamp(2rem,5vw,3.45rem);margin:.55rem 0}.post-meta{display:flex;align-items:center;flex-wrap:wrap;gap:9px 15px;color:var(--tm-muted);font-size:.84rem}.meta-author{display:flex;align-items:center;gap:7px}.meta-author img{border-radius:50%}.single-featured{margin:24px 0 30px}.single-featured img{width:100%;border-radius:var(--tm-radius);aspect-ratio:16/9;object-fit:cover}.single-layout-4{max-width:880px}.single-layout-4 .single-article{box-shadow:none}.single-layout-2{max-width:1180px}.breadcrumbs{display:flex;flex-wrap:wrap;gap:6px;color:var(--tm-muted);font-size:.8rem;margin-block-end:15px}.social-share{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-block:1px solid var(--tm-border);padding-block:18px;margin-block:28px}.social-share a,.social-share button{border:1px solid var(--tm-border);background:transparent;border-radius:999px;padding:7px 11px;font-size:.78rem;color:inherit}.social-share button{display:flex;align-items:center;gap:5px}.author-box{display:grid;grid-template-columns:auto 1fr;gap:16px;background:var(--tm-bg);padding:20px;border-radius:var(--tm-radius);margin-block:28px}.author-box img{border-radius:50%}.author-box h2{font-size:1.15rem}.author-box p{color:var(--tm-muted);margin:.3rem 0}.related-posts{margin-block-start:38px}
/* 12. TOC */
.techmag-toc{border:1px solid var(--tm-border);background:var(--tm-bg);border-radius:var(--tm-radius);padding:14px 16px;margin-block:24px}.techmag-toc-toggle{width:100%;display:flex;justify-content:space-between;background:transparent;border:0;font-weight:800;color:inherit}.techmag-toc-list{margin:12px 0 0;padding-inline-start:22px}.techmag-toc-list li{margin:5px 0}.techmag-toc-list .toc-h3{margin-inline-start:18px;font-size:.92rem}.techmag-toc.is-collapsed .techmag-toc-list{display:none}.techmag-toc a.is-active{color:var(--tm-primary);font-weight:800}
/* 13. Comments */
.comments-area{margin-block-start:34px}.comment-list{list-style:none;padding:0}.comment-body{background:var(--tm-bg);padding:16px;border-radius:12px;margin-block-end:12px}.comment-list .children{list-style:none;padding-inline-start:28px}.comment-author img{border-radius:50%;margin-inline-end:8px}.comment-form input:not([type=submit]),.comment-form textarea{width:100%;border:1px solid var(--tm-border);padding:10px 12px;border-radius:10px;background:var(--tm-surface);color:inherit}.comment-form .submit{background:var(--tm-primary);color:#fff;border:0;padding:10px 18px;border-radius:10px}
/* 14. Footer */
.site-footer{margin-block-start:44px;background:#0f172a;color:#cbd5e1;padding-block:48px 0}.site-footer .site-brand{color:#fff}.site-footer .widget{background:transparent;border:0;padding:0}.site-footer .widget-title{color:#fff;border-color:#334155}.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:28px}.footer-bottom{border-block-start:1px solid #263246;margin-block-start:30px}.footer-bottom-inner{min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:16px}.footer-menu{display:flex;flex-wrap:wrap;gap:14px}.footer-centered{text-align:center;max-width:780px;padding-block-end:42px}.footer-centered .site-brand{display:inline-flex}.footer-centered .footer-menu{justify-content:center}.footer-large .footer-brand-large{max-width:800px;margin-block-end:28px}.footer-dark{background:#020617}.footer-newsletter-box{background:linear-gradient(135deg,#312e81,#155e75);padding:28px;border-radius:20px;margin-block-end:30px}.footer-newsletter-box .newsletter-form{max-width:560px}.back-to-top{position:fixed;inset-inline-end:18px;bottom:18px;width:42px;height:42px;border:0;border-radius:50%;background:var(--tm-primary);color:#fff;box-shadow:var(--tm-shadow);opacity:0;visibility:hidden;transform:translateY(8px);transition:var(--tm-transition);z-index:90}.back-to-top.is-visible{opacity:1;visibility:visible;transform:none}
/* 15. Ads */
.techmag-ad{display:grid;place-items:center;position:relative;max-width:100%;overflow:hidden;text-align:center;margin-block:18px;min-height:var(--tm-ad-desktop,32px);contain:layout paint}.techmag-ad iframe,.techmag-ad img,.techmag-ad ins{max-width:100%}.techmag-ad-label{position:absolute;inset-block-start:4px;inset-inline-start:8px;font-size:11px;line-height:1;color:var(--tm-muted,#667085);opacity:.75;z-index:1}.techmag-ad-mobile{display:none}
/* 16. Forms */
input,textarea,select{border:1px solid var(--tm-border);border-radius:9px;padding:9px 11px;background:var(--tm-surface);color:var(--tm-text)}:focus-visible{outline:3px solid rgba(99,102,241,.28);outline-offset:2px}
/* 17. Elementor compatibility */
.elementor-full-width-shell{width:100%}.techmag-canvas{background:#fff}.elementor-techmag-grid{margin-block:20px}
/* 18. WooCommerce */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.woocommerce ul.products:before,.woocommerce ul.products:after{display:none}.woocommerce ul.products li.product{width:auto!important;margin:0!important;background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:var(--tm-radius);padding:14px}.woocommerce a.button,.woocommerce button.button{background:var(--tm-primary);color:#fff;border-radius:10px}.woocommerce span.onsale{background:var(--tm-danger)}
/* 19. Dark mode */
html[data-techmag-theme="dark"]{color-scheme:dark}html[data-techmag-theme="dark"] body{--tm-bg:#0F172A;--tm-surface:#111827;--tm-text:#F8FAFC;--tm-muted:#94A3B8;--tm-border:#263246;background:var(--tm-bg);color:var(--tm-text)}html[data-techmag-theme="dark"] .site-header,html[data-techmag-theme="dark"] .main-nav,html[data-techmag-theme="dark"] .news-ticker{background:#111827}html[data-techmag-theme="dark"] .search-panel,html[data-techmag-theme="dark"] .mobile-drawer{background:#111827}html[data-techmag-theme="dark"] .image-placeholder{background:linear-gradient(135deg,#1e293b,#334155)}
/* 20. Responsive */
@media(max-width:1100px){.content-with-sidebar{grid-template-columns:minmax(0,1fr) 280px}.techmag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-blocks{grid-template-columns:1fr}.horizontal-posts{grid-template-columns:repeat(2,1fr)}.hero-layout-1 .hero-grid{grid-template-columns:1.5fr 1fr;grid-template-rows:repeat(4,170px)}.hero-layout-1 .hero-card-1{grid-row:1/3}.hero-layout-1 .hero-card-4,.hero-layout-1 .hero-card-5{grid-column:span 1}.footer-grid{grid-template-columns:repeat(2,1fr)}.woocommerce ul.products{grid-template-columns:repeat(3,1fr)}}
@media(max-width:820px){.desktop-nav,.primary-menu,.header-main .widget,.header-main .techmag-ad{display:none}.mobile-menu-toggle{display:grid}.content-with-sidebar{grid-template-columns:1fr}.sidebar{position:static!important}.hero-layout-1 .hero-grid,.hero-layout-2 .hero-grid{grid-template-columns:1fr 1fr;grid-template-rows:360px repeat(2,180px)}.hero-layout-1 .hero-card-1,.hero-layout-2 .hero-card-1{grid-column:1/3;grid-row:auto}.hero-layout-3 .hero-grid{grid-template-columns:1fr;grid-auto-rows:250px}.newsletter-box{grid-template-columns:1fr}.footer-bottom-inner{flex-direction:column;padding-block:20px}.woocommerce ul.products{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.techmag-ad{min-height:var(--tm-ad-mobile,var(--tm-ad-desktop,32px))}.tm-container{width:min(calc(100% - 20px),var(--tm-container))}.top-bar .top-menu{display:none}.techmag-grid,.related-grid,.horizontal-posts{grid-template-columns:1fr}.hero-layout-1 .hero-grid,.hero-layout-2 .hero-grid{grid-template-columns:1fr;grid-template-rows:310px repeat(4,170px)}.hero-layout-1 .hero-card-1,.hero-layout-2 .hero-card-1{grid-column:auto}.post-list-item{grid-template-columns:115px 1fr}.post-list-item p{display:none}.category-posts .post-list-item{grid-template-columns:95px 1fr}.single-article{padding:18px}.single-header h1{font-size:2rem}.footer-grid{grid-template-columns:1fr}.newsletter-form{flex-direction:column}.woocommerce ul.products{grid-template-columns:1fr}.techmag-ad-mobile{display:grid}.header-centered .centered-brand{justify-content:flex-start}.header-centered .header-tools{inset-inline-end:0}.mega-posts-grid{grid-template-columns:1fr}}
/* 21. Accessibility */
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.error-404{text-align:center;padding-block:80px}.error-code{font-size:clamp(5rem,20vw,12rem);font-weight:950;line-height:1;color:rgba(99,102,241,.18)}.error-404 .search-form{max-width:600px;margin:22px auto}.pagination .nav-links{display:flex;gap:7px;justify-content:center;margin-block:30px}.page-numbers{min-width:40px;height:40px;display:grid;place-items:center;background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:10px}.page-numbers.current{background:var(--tm-primary);color:#fff}.no-results{background:var(--tm-surface);padding:28px;border-radius:var(--tm-radius);text-align:center}

.review-box{display:grid;grid-template-columns:120px 1fr;gap:22px;padding:22px;margin-block:28px;background:var(--tm-bg);border:1px solid var(--tm-border);border-radius:var(--tm-radius)}.review-score{display:grid;place-items:center;align-content:center;background:var(--tm-primary);color:#fff;border-radius:18px;min-height:120px}.review-score strong{font-size:2.4rem;line-height:1}.review-score span{font-size:.8rem}.review-columns{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.review-columns h3{font-size:1rem}@media(max-width:600px){.techmag-ad{min-height:var(--tm-ad-mobile,var(--tm-ad-desktop,32px))}.review-box{grid-template-columns:1fr}.review-score{min-height:90px}.review-columns{grid-template-columns:1fr}}

.archive-header.category-hero{position:relative;overflow:hidden;padding:38px;border-radius:var(--tm-radius);background-image:linear-gradient(90deg,rgba(15,23,42,.88),rgba(15,23,42,.45)),var(--category-hero);background-size:cover;background-position:center;color:#fff}.archive-header.category-hero .archive-description{color:#e2e8f0}

.header-login{width:40px;height:40px;display:grid;place-items:center;border-radius:10px}.header-login:hover{background:rgba(99,102,241,.1);color:var(--tm-primary)}.techmag-header-width-full .site-header .tm-container{width:min(calc(100% - 24px),1600px)}.has-transparent-header:not(.scrolled) .site-header{background:rgba(255,255,255,.88);backdrop-filter:blur(16px)}.techmag-card-2 .post-card{box-shadow:none;border-color:transparent}.techmag-card-3 .post-card{box-shadow:var(--tm-shadow);border-color:transparent}

.review-verdict{grid-column:1/-1;margin:10px 0 0;padding-block-start:12px;border-block-start:1px solid var(--tm-border)}.single-layout-1{max-width:980px}.single-layout-2{max-width:1180px}.single-layout-2 .single-article{padding-inline:clamp(20px,5vw,64px)}.single-layout-2 .single-featured{margin-inline:calc(clamp(20px,5vw,64px) * -1);border-radius:0}.single-layout-2 .single-featured img{border-radius:0}.single-layout-4 .entry-content{max-width:760px;margin-inline:auto}.single-layout-4 .single-header,.single-layout-4 .single-featured,.single-layout-4 .breadcrumbs{max-width:820px;margin-inline:auto}
.widget-social{display:flex;flex-wrap:wrap;gap:8px}.widget-social a{padding:6px 10px;border:1px solid var(--tm-border);border-radius:999px;font-size:.78rem}.colored-categories{display:grid;gap:8px}.colored-categories a{display:flex;align-items:center;justify-content:space-between;border-inline-start:4px solid var(--category-color);padding:8px 10px;background:var(--tm-bg);border-radius:8px}.colored-categories small{color:var(--tm-muted)}

.techmag-footer-cols-1 .footer-grid{grid-template-columns:1fr}.techmag-footer-cols-2 .footer-grid{grid-template-columns:repeat(2,1fr)}.techmag-footer-cols-3 .footer-grid{grid-template-columns:repeat(3,1fr)}.techmag-footer-cols-4 .footer-grid{grid-template-columns:repeat(4,1fr)}

/* 22. TechMag 1.1 Editorial Teal update
   Original Arabic editorial system inspired by the reference's hierarchy,
   without copying its branding, assets, or proprietary code. */
:root{
	--tm-primary:#0b7f83;
	--tm-primary-dark:#075e63;
	--tm-accent:#22c3c8;
	--tm-bg:#ffffff;
	--tm-surface:#ffffff;
	--tm-border:#e7eef0;
	--tm-muted:#6a7d84;
	--tm-radius:12px;
	--tm-shadow:0 12px 34px rgba(7,38,45,.08);
	--tm-editorial-dark:#07131f;
	--tm-editorial-dark-2:#101d24;
	--tm-editorial-soft:#f3f8f9;
	--tm-editorial-line:#c9eff0;
}
body{background:#fff}.home .site-main{background:#fff}

/* Editorial header */
.site-header.header-editorial{border:0;background:#fff;box-shadow:0 1px 0 rgba(7,38,45,.08)}
.header-editorial.is-sticky{position:sticky;top:0;z-index:110}
.header-editorial.is-sticky .main-nav{position:static;box-shadow:none}
.editorial-storybar{background:var(--tm-editorial-dark);color:#fff;border-block-end:3px solid var(--tm-accent)}
.editorial-storybar .news-ticker{background:transparent;color:#fff;border:0}
.editorial-storybar .ticker-inner{min-height:42px;gap:0;padding:0}
.editorial-storybar .ticker-label{align-self:stretch;display:flex;align-items:center;gap:8px;background:var(--tm-accent);color:#06151b;padding-inline:22px;font-size:.86rem;font-weight:900;white-space:nowrap}
.editorial-storybar .ticker-label span{font-size:.55rem}
.editorial-storybar .ticker-track{flex:1;display:flex;align-items:center;gap:0;overflow:hidden}
.editorial-storybar .ticker-track a{position:relative;display:flex;align-items:center;gap:8px;min-height:42px;padding-inline:22px;color:#f8ffff;font-size:.8rem;font-weight:700;border-inline-end:1px solid rgba(255,255,255,.08)}
.editorial-storybar .ticker-track a span{color:var(--tm-accent);font-size:.65rem}
.editorial-nav-shell{background:#fff}
.editorial-nav-row{min-height:92px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:28px}
.editorial-brand{min-width:150px}.editorial-brand .custom-logo{max-height:62px}.editorial-brand .site-title-mark{font-size:1.55rem;color:var(--tm-editorial-dark)}
.editorial-main-nav{border:0;background:transparent;min-width:0}
.editorial-main-nav .primary-menu{justify-content:flex-start;gap:0}
.editorial-primary-menu>li>a{min-height:58px;display:flex;align-items:center;padding-inline:18px;border-inline-end:1px solid #edf1f2;font-size:.92rem;color:#17252b;transition:background var(--tm-transition),color var(--tm-transition)}
.editorial-primary-menu>li:first-child>a{border-inline-start:1px solid #edf1f2}
.editorial-primary-menu>li.current-menu-item>a,.editorial-primary-menu>li.current-menu-ancestor>a,.editorial-primary-menu>li>a:hover{background:var(--tm-primary);color:#fff}
.editorial-actions{display:flex;align-items:center;gap:8px}
.editorial-search-button{width:auto!important;min-width:118px;height:52px!important;padding-inline:20px!important;display:flex!important;gap:10px!important;background:#f2f6f6!important;border-radius:999px!important;color:#66777d!important}
.editorial-search-button:hover{background:#e8f5f5!important;color:var(--tm-primary)!important}
.editorial-dark-toggle{background:#f2f6f6!important;border-radius:50%!important}
.editorial-utility-row{min-height:42px;display:flex;align-items:center;justify-content:space-between}

/* Dark mega dropdown */
.header-editorial .mega-menu>.sub-menu{width:min(900px,82vw);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:28px;background:#182128;border:1px solid #2a383f;border-radius:0 0 18px 18px;box-shadow:0 25px 60px rgba(0,0,0,.22)}
.header-editorial .mega-menu>.sub-menu>li:not(.mega-posts)>a{position:relative;padding:16px 18px;background:#202a30;color:#fff;border:1px solid #324047;border-radius:12px;font-size:1rem;font-weight:800}
.header-editorial .mega-menu>.sub-menu>li:not(.mega-posts)>a:after{content:"";position:absolute;inset-inline-end:12px;inset-block:13px;width:4px;border-radius:4px;background:var(--tm-primary)}
.header-editorial .mega-menu>.sub-menu>li:not(.mega-posts)>a:hover{background:#253138;color:var(--tm-accent)}
.header-editorial .mega-menu>.sub-menu .mega-posts{grid-column:1/-1;border-block-start:1px solid #314047;margin-block-start:8px;padding-block-start:16px}
.header-editorial .mega-menu .mega-post span{color:#e8f4f5}

/* Hero */
.hero-section{padding-block:26px 18px}
.hero-section .hero-grid{gap:10px}
.hero-layout-1 .hero-grid{grid-template-columns:2fr 1fr 1fr;grid-template-rows:repeat(2,196px)}
.hero-card{border-radius:12px;box-shadow:0 7px 24px rgba(6,30,35,.08)}
.hero-card:after{background:linear-gradient(180deg,rgba(1,12,16,.02) 22%,rgba(1,12,16,.86) 100%)}
.hero-overlay{inset-inline:18px;inset-block-end:14px}
.hero-card-1 .hero-overlay{inset-inline:28px;inset-block-end:26px}
.hero-card-1 .hero-overlay h2{font-size:clamp(1.55rem,2.6vw,2.45rem);max-width:720px;text-shadow:0 2px 12px rgba(0,0,0,.3)}
.hero-card:not(.hero-card-1) .hero-overlay h2{font-size:1rem;line-height:1.55}
.hero-meta{display:inline-flex;align-items:center;gap:5px;background:#ecffff;color:#0d6e72;border-radius:999px;padding:3px 8px;font-size:.67rem;font-weight:800}
.hero-overlay .category-badge{background:var(--tm-primary);font-size:.66rem}

/* Section headings */
.editorial-section-heading,.home-latest-editorial .section-heading{justify-content:flex-start;margin-block-end:18px}
.editorial-section-heading h2,.home-latest-editorial .section-heading h2,.important-categories-box h2,.home-taxonomy-box h2{position:relative;padding-inline-start:16px;color:#27373d;font-size:1.36rem}
.editorial-section-heading h2:before,.home-latest-editorial .section-heading h2:before,.important-categories-box h2:before,.home-taxonomy-box h2:before{content:"";position:absolute;inset-inline-start:0;inset-block:3px;width:4px;border-radius:4px;background:var(--tm-primary)}

/* Latest + browse by category */
.home-latest-editorial{padding-block:52px 68px}
.editorial-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:32px;align-items:start}
.latest-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.latest-card-grid .post-card{border-color:#edf2f3;border-radius:11px;box-shadow:0 7px 22px rgba(10,55,62,.055)}
.latest-card-grid .post-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(10,55,62,.09)}
.latest-card-grid .card-image{aspect-ratio:16/9}
.latest-card-grid .card-body{padding:15px 16px 17px}
.latest-card-grid .card-title{font-size:1rem;line-height:1.65;margin:.5rem 0}
.latest-card-grid .card-body p{display:none}
.latest-card-grid .category-badge{display:none}
.home-taxonomy-box{background:#fff;border:1px solid #edf2f3;border-radius:12px;padding:22px;box-shadow:0 6px 24px rgba(7,43,48,.045)}
.home-taxonomy-box h2{margin-block-end:18px}
.home-category-links{display:grid;gap:9px}
.home-category-links a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:8px 13px;border:1px solid #e8eef0;border-radius:8px;background:#fff;font-size:.86rem;font-weight:700;color:#33454a;transition:border var(--tm-transition),color var(--tm-transition),transform var(--tm-transition)}
.home-category-links a:hover{border-color:var(--tm-accent);color:var(--tm-primary);transform:translateX(calc(2px * var(--tm-dir,-1)))}
.techmag-ltr .home-category-links a:hover{--tm-dir:1}.home-category-links small{display:grid;place-items:center;min-width:24px;height:24px;padding-inline:5px;background:#e9f8f8;color:var(--tm-primary);border-radius:50%;font-size:.7rem}

/* Feature stories with important categories */
.editorial-feature-section{padding-block:58px;background:#fff}
.editorial-feature-grid{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:26px;align-items:start}
.feature-stories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.feature-story-card{overflow:hidden;background:#fff;border:1px solid #e8eef0;border-radius:12px;box-shadow:0 8px 24px rgba(8,44,49,.06)}
.feature-story-image{display:block;aspect-ratio:16/8.6;overflow:hidden}.feature-story-image img,.feature-story-image>.image-placeholder{width:100%;height:100%;object-fit:cover}
.feature-story-card:hover .feature-story-image img{transform:scale(1.02)}.feature-story-image img{transition:transform 300ms ease}
.feature-story-body{padding:15px 17px 18px}.feature-story-body h2{font-size:1.05rem;line-height:1.65;margin:.6rem 0}.feature-story-body .category-badge{font-size:.65rem}
.important-categories-box{padding:19px 18px;background:#f9fcfc;border:1px solid #dfeff0;border-radius:12px;box-shadow:0 8px 24px rgba(10,61,65,.05)}
.important-category-list{display:grid;gap:9px}.important-category-list a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;background:#fff;border-radius:8px;border-inline-start:4px solid var(--category-color,var(--tm-primary));font-size:.84rem;font-weight:800}.important-category-list small{display:grid;place-items:center;min-width:26px;height:26px;border-radius:50%;background:#effafa;color:var(--tm-primary);font-size:.7rem}

/* Ranked panel */
.editorial-ranked-section{padding-block:44px 56px;background:#f2f7f8}
.ranked-panel{background:#fff;border:1px solid #dfebed;border-radius:14px;padding:28px;box-shadow:0 12px 38px rgba(8,45,52,.06)}
.ranked-heading{display:flex;align-items:center;margin-block-end:22px;border-block-start:3px solid var(--tm-editorial-line);padding-block-start:0}
.ranked-heading h2{margin:-3px 0 0 auto;background:var(--tm-editorial-dark);color:#fff;border-radius:0 0 8px 8px;padding:8px 16px;font-size:1rem}
.ranked-post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px}
.ranked-post{display:grid;grid-template-columns:34px minmax(0,1fr) 80px;gap:10px;align-items:center;min-height:72px;padding:9px 10px;background:#fbfdfd;border:1px solid #edf2f3;border-radius:9px;transition:border var(--tm-transition),transform var(--tm-transition)}
.ranked-post:hover{border-color:#bfe7e8;transform:translateY(-1px)}
.rank-number{display:grid;place-items:center;align-self:stretch;background:#e5f6f6;color:#0b7f83;font-weight:900;border-radius:7px;font-size:.9rem}
.rank-content{min-width:0}.rank-content strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.8rem;line-height:1.55}.rank-content small{display:block;color:#75a5a8;font-size:.65rem;margin-block-start:4px}
.rank-thumb{display:block;width:80px;aspect-ratio:16/10;border-radius:7px;overflow:hidden;background:#e5ecee}.rank-thumb img,.rank-thumb>.image-placeholder{width:100%;height:100%;object-fit:cover}

/* Editorial footer */
.footer-editorial{margin-block-start:0;padding-block:52px 0;background:#07131f;color:#aebdc4;border-block-start:3px solid var(--tm-accent)}
.editorial-footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr 1.1fr;gap:46px}
.footer-editorial .site-brand,.footer-editorial .site-title-mark{color:#fff}.footer-editorial .site-title-mark strong{color:var(--tm-accent)}
.footer-about-column p,.footer-editorial section>p{font-size:.84rem;line-height:1.9;margin-block:14px;color:#9fb0b8}
.footer-cta{display:inline-flex;margin-block-start:8px;padding:10px 17px;background:linear-gradient(135deg,var(--tm-primary),var(--tm-accent));color:#fff;border-radius:7px;font-size:.82rem;font-weight:800;box-shadow:0 8px 24px rgba(34,195,200,.16)}
.footer-heading{position:relative;color:#fff;font-size:1rem;margin-block-end:16px;padding-block-end:9px}.footer-heading:after{content:"";position:absolute;inset-inline-start:0;bottom:0;width:36px;height:2px;background:var(--tm-accent)}
.footer-link-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}.footer-link-list a{font-size:.82rem;color:#b7c4ca}.footer-link-list a:hover{color:#fff}
.footer-socials{display:flex;flex-wrap:wrap;gap:8px}.footer-socials a{width:34px;height:34px;display:grid;place-items:center;border:1px solid #273945;border-radius:50%;color:#dce8eb;font-size:.72rem;font-weight:900}.footer-socials a:hover{background:var(--tm-primary);border-color:var(--tm-primary)}
.footer-widget-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin-block-start:36px;padding-block-start:28px;border-block-start:1px solid #1c2b35}
.footer-editorial .footer-bottom{margin-block-start:36px;border-color:#1c2b35}.footer-editorial .footer-bottom-inner{min-height:58px;font-size:.72rem;color:#7f929b}

/* Card refinements */
.post-card{border-color:#eaf0f1;box-shadow:0 5px 18px rgba(9,49,55,.045)}
.card-meta{color:#6ba4a7}.category-badge{background:var(--category-color,var(--tm-primary))}.card-title a:hover{color:var(--tm-primary)}

/* Light/dark handling for the new components */
html[data-techmag-theme="dark"] .editorial-nav-shell,html[data-techmag-theme="dark"] .site-header.header-editorial{background:#111827}
html[data-techmag-theme="dark"] .editorial-primary-menu>li>a{color:#e8eef2;border-color:#263246}
html[data-techmag-theme="dark"] .editorial-primary-menu>li.current-menu-item>a,html[data-techmag-theme="dark"] .editorial-primary-menu>li>a:hover{background:var(--tm-primary);color:#fff}
html[data-techmag-theme="dark"] .home-taxonomy-box,html[data-techmag-theme="dark"] .important-categories-box,html[data-techmag-theme="dark"] .feature-story-card,html[data-techmag-theme="dark"] .ranked-panel,html[data-techmag-theme="dark"] .ranked-post,html[data-techmag-theme="dark"] .home-category-links a{background:#111827;border-color:#263246}
html[data-techmag-theme="dark"] .editorial-feature-section,html[data-techmag-theme="dark"] .home-latest-editorial{background:#0f172a}
html[data-techmag-theme="dark"] .editorial-ranked-section{background:#0b1220}
html[data-techmag-theme="dark"] .editorial-section-heading h2,html[data-techmag-theme="dark"] .home-taxonomy-box h2,html[data-techmag-theme="dark"] .important-categories-box h2{color:#f1f5f9}
html[data-techmag-theme="dark"] .home-category-links a,html[data-techmag-theme="dark"] .important-category-list a{background:#16202d;color:#e5edf2;border-color:#263246}
html[data-techmag-theme="dark"] .ranked-post{color:#e6eef2}

/* Editorial responsive system */
@media(max-width:1100px){
	.editorial-nav-row{grid-template-columns:auto minmax(0,1fr) auto;gap:12px}.editorial-primary-menu>li>a{padding-inline:11px;font-size:.85rem}.editorial-search-button{min-width:48px}.editorial-search-button span{display:none}
	.editorial-content-grid,.editorial-feature-grid{grid-template-columns:minmax(0,1fr) 230px}.ranked-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
	.editorial-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
	.header-editorial.is-sticky{position:relative}.editorial-nav-row{min-height:70px;grid-template-columns:auto 1fr auto}.editorial-main-nav .primary-menu{display:none}.editorial-main-nav{order:3;display:flex;justify-content:flex-end}.editorial-main-nav .mobile-menu-toggle{display:grid}.editorial-actions{order:2;justify-self:end}.editorial-brand{order:1;min-width:0}.editorial-dark-toggle,.header-editorial .header-login{display:none}
	.editorial-storybar .ticker-track a:nth-child(n+3){display:none}.editorial-storybar .ticker-label{padding-inline:14px}
	.hero-layout-1 .hero-grid{grid-template-columns:1fr 1fr;grid-template-rows:330px repeat(2,165px)}.hero-layout-1 .hero-card-1{grid-column:1/3;grid-row:auto}
	.editorial-content-grid{grid-template-columns:1fr}.editorial-home-sidebar{order:-1}.home-taxonomy-box{padding:16px}.home-category-links{grid-template-columns:repeat(2,minmax(0,1fr))}
	.editorial-feature-grid{grid-template-columns:1fr}.important-categories-box{order:-1}.important-category-list{grid-template-columns:repeat(2,minmax(0,1fr))}
	.footer-widget-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){.techmag-ad{min-height:var(--tm-ad-mobile,var(--tm-ad-desktop,32px))}
	.editorial-storybar .ticker-label{font-size:.72rem}.editorial-storybar .ticker-track a{font-size:.72rem;padding-inline:12px}.editorial-storybar .ticker-track a:nth-child(n+2){display:none}
	.editorial-nav-row{min-height:64px;gap:8px}.editorial-brand .custom-logo{max-height:48px}.editorial-brand .site-title-mark{font-size:1.15rem}.editorial-search-button{min-width:42px;height:42px!important;padding-inline:10px!important}.editorial-main-nav .mobile-menu-toggle{width:42px;height:42px;background:#f2f6f6}
	.hero-section{padding-block:14px}.hero-layout-1 .hero-grid{grid-template-columns:1fr 1fr;grid-template-rows:280px 150px 150px}.hero-layout-1 .hero-card-1{grid-column:1/3}.hero-card-1 .hero-overlay{inset-inline:18px;inset-block-end:17px}.hero-card-1 .hero-overlay h2{font-size:1.45rem}.hero-card:not(.hero-card-1) .hero-overlay h2{font-size:.82rem}
	.home-latest-editorial{padding-block:34px}.latest-card-grid{grid-template-columns:1fr 1fr;gap:10px}.latest-card-grid .card-body{padding:10px}.latest-card-grid .card-title{font-size:.82rem;line-height:1.55}.latest-card-grid .card-meta{font-size:.64rem}.home-category-links{grid-template-columns:1fr 1fr;gap:7px}.home-category-links a{font-size:.75rem;padding-inline:9px}
	.editorial-feature-section{padding-block:36px}.feature-stories{grid-template-columns:1fr}.important-category-list{grid-template-columns:1fr 1fr}.feature-story-body h2{font-size:.93rem}
	.editorial-ranked-section{padding-block:28px}.ranked-panel{padding:14px}.ranked-post-grid{grid-template-columns:1fr}.ranked-post{grid-template-columns:30px minmax(0,1fr) 66px;min-height:64px}.rank-thumb{width:66px}.rank-content strong{font-size:.76rem}
	.editorial-footer-grid{grid-template-columns:1fr;gap:30px}.footer-widget-row{grid-template-columns:1fr}.footer-editorial .footer-bottom-inner{align-items:flex-start;text-align:start}
}


/* === TechMag 1.2: editable chrome + layout stability === */
html{scrollbar-gutter:stable;max-width:100%;}
body{min-width:0;max-width:100%;overflow-wrap:break-word;}
.tm-container,.site-main,.site-header,.site-footer,.home-section,.post-card,.hero-card,.category-shelf,.editorial-content-grid>*{min-width:0;max-width:100%;}
iframe,video,embed,object{max-width:100%;}
img{object-fit:cover;}
.custom-logo{height:auto;max-height:var(--tm-header-logo-height,58px);}
.site-header,.site-header .main-nav,.editorial-nav-shell{background:var(--tm-header-bg,#fff);color:var(--tm-header-text,#17252b);}
.editorial-storybar,.top-bar{background:var(--tm-header-top-bg,#07131f);color:var(--tm-header-top-text,#fff);}
.editorial-nav-row,.minimal-inner,.dark-tech-inner,.centered-brand{min-height:var(--tm-header-row-height,84px);}
.editorial-primary-menu>li>a,.desktop-nav .primary-menu>li>a{color:var(--tm-header-text,#17252b);}
.header-cta{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 15px;border-radius:999px;background:var(--tm-primary);color:#fff!important;font-size:.82rem;font-weight:800;white-space:nowrap;transition:transform var(--tm-transition),background var(--tm-transition);}
.header-cta:hover{background:var(--tm-primary-dark);transform:translateY(-1px);}
.site-footer{background:var(--tm-footer-bg,#07131f);color:var(--tm-footer-text,#dce8eb);}
.site-footer p,.site-footer .footer-link-list a{color:var(--tm-footer-muted,#9fb0b8);}
.site-footer .footer-heading:after{background:var(--tm-footer-accent,#22c3c8);}
.site-footer .footer-cta{background:var(--tm-primary);}
.footer-editorial{background:var(--tm-footer-bg,#07131f);border-block-start-color:var(--tm-footer-accent,#22c3c8);}

/* Stable media boxes reserve space before images finish loading. */
.card-image,.feature-story-image,.shelf-story-image,.rank-thumb,.list-image{contain:layout paint;background:#e7eef0;}
.card-image{aspect-ratio:16/10}.feature-story-image{aspect-ratio:16/9}.shelf-story-image{aspect-ratio:16/9}.rank-thumb{aspect-ratio:16/10}.hero-card{contain:layout paint;}

/* Category editorial shelves */
.category-shelves-section{padding-block:48px;background:#fff;}
.category-shelves{display:grid;gap:46px;}
.category-shelf{border-block-start:4px solid var(--shelf-color,var(--tm-primary));padding-block-start:0;}
.category-shelf-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-block-end:18px;padding-block-start:12px;}
.category-shelf-heading h2{font-size:clamp(1.25rem,2.6vw,1.7rem);margin:0;color:var(--tm-editorial-dark);}
.category-shelf-heading a{font-size:.82rem;color:var(--shelf-color,var(--tm-primary));font-weight:800;white-space:nowrap;}
.category-shelf-grid{display:grid;grid-template-columns:minmax(0,1.65fr) repeat(3,minmax(0,1fr));gap:18px;align-items:start;}
.shelf-story{min-width:0;border-block-end:1px solid #e7eef0;padding-block-end:12px;}
.shelf-story-image{display:block;overflow:hidden;border-radius:10px;background:#e7eef0;}
.shelf-story-image img,.shelf-story-image .image-placeholder{width:100%;height:100%;object-fit:cover;transition:transform 260ms ease;}
.shelf-story:hover .shelf-story-image img{transform:scale(1.02);}
.shelf-story h3{font-size:.94rem;line-height:1.62;margin:10px 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.shelf-story-1{grid-row:span 2;border:0;}.shelf-story-1 .shelf-story-image{aspect-ratio:16/9}.shelf-story-1 h3{font-size:1.24rem;}

@media(max-width:1100px){
  .header-cta{padding-inline:12px}.category-shelf-grid{grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr))}.category-shelf-grid .shelf-story:nth-child(n+4){display:none}
}
@media(max-width:820px){
  .header-cta{display:none}.custom-logo{max-height:var(--tm-header-logo-height-mobile,44px)}
  .category-shelf-grid{grid-template-columns:1.3fr 1fr}.category-shelf-grid .shelf-story:nth-child(n+4){display:block}.shelf-story-1{grid-row:span 3}
}
@media(max-width:600px){.techmag-ad{min-height:var(--tm-ad-mobile,var(--tm-ad-desktop,32px))}
  html{scrollbar-gutter:auto}.tm-container{width:min(calc(100% - 24px),var(--tm-container))}
  .category-shelves-section{padding-block:34px}.category-shelves{gap:34px}.category-shelf-heading{margin-block-end:12px}.category-shelf-grid{grid-template-columns:1fr 1fr;gap:12px}.shelf-story-1{grid-column:1/-1;grid-row:auto}.shelf-story-1 h3{font-size:1.08rem}.shelf-story h3{font-size:.82rem}.shelf-story .card-meta{font-size:.64rem}
  .editorial-nav-row,.minimal-inner,.dark-tech-inner,.centered-brand{min-height:64px}
}

/* Builder color overrides (kept at the end intentionally). */
.site-header.header-classic,.site-header.header-centered,.site-header.header-minimal,.site-header.header-dark-tech,.site-header.header-mega{background:var(--tm-header-bg,#fff);color:var(--tm-header-text,#17252b)}
.site-header.header-dark-tech .primary-menu a,.site-header.header-mega .primary-menu a,.site-header.header-centered .primary-menu a,.site-header.header-minimal .primary-menu a{color:var(--tm-header-text,#17252b)}
.site-header .top-bar,.site-header .editorial-storybar{background:var(--tm-header-top-bg,#07131f);color:var(--tm-header-top-text,#fff)}
.primary-menu .sub-menu{max-width:min(92vw,900px)}
.primary-menu>li,.primary-menu>li>a,.header-tools,.editorial-actions{min-width:0}
.site-title-mark{white-space:nowrap}
@media(max-width:600px){.techmag-ad{min-height:var(--tm-ad-mobile,var(--tm-ad-desktop,32px))}.site-title-mark{white-space:normal;line-height:1.1}.mobile-drawer{width:min(92vw,360px)}}

/* v1.2.4 — private ads, edge rails and refined header presets */
.techmag-private-ad-link{display:flex;width:100%;height:100%;align-items:center;justify-content:center}
.techmag-private-ad-image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:8px}
.techmag-edge-ads{display:none;pointer-events:none}
.techmag-edge-slot{position:fixed;top:var(--tm-edge-top,135px);width:var(--tm-edge-width,150px);z-index:60;pointer-events:auto}
.techmag-edge-start{right:12px}.techmag-edge-end{left:12px}
.techmag-edge-slot .techmag-ad{width:100%;margin:0;background:transparent;overflow:visible}
.techmag-edge-slot .techmag-private-ad-link,.techmag-edge-slot .techmag-private-ad-image{width:100%;height:auto;max-height:none}
.techmag-ad-paragraph{margin-block:34px;padding-block:8px;border-block:1px solid color-mix(in srgb,var(--tm-border) 80%,transparent)}
@media(max-width:1299px){.techmag-edge-ads{display:none!important}}

/* Header presets share stable geometry to avoid shifts. */
.site-header{background:var(--tm-header-bg,#fff);color:var(--tm-header-text,#17252b)}
.site-header .custom-logo{max-height:var(--tm-header-logo-height,58px)}
.site-header .site-title-mark{color:var(--tm-header-text,#17252b)}
.site-header .primary-menu>li>a{color:var(--tm-header-text,#17252b)}
.header-classic .editorial-nav-shell,.header-editorial .editorial-nav-shell{background:var(--tm-header-bg,#fff)}
.header-editorial .editorial-nav-row{min-height:var(--tm-header-row-height,84px)}
.header-editorial .editorial-brand .site-title-mark{color:var(--tm-header-text,#17252b)}
.header-editorial .editorial-primary-menu>li>a{color:var(--tm-header-text,#17252b)}
.header-editorial .editorial-primary-menu>li.current-menu-item>a,.header-editorial .editorial-primary-menu>li.current-menu-ancestor>a,.header-editorial .editorial-primary-menu>li>a:hover{background:var(--tm-primary);color:#fff}
.header-editorial .editorial-storybar{background:var(--tm-header-top-bg,#07131f);color:var(--tm-header-top-text,#fff)}
.header-centered{box-shadow:0 1px 0 var(--tm-border)}
.header-centered .centered-brand{min-height:var(--tm-header-row-height,84px);padding-block:10px}
.header-centered .main-nav{background:color-mix(in srgb,var(--tm-header-bg,#fff) 96%,#eef7f7);border-block:1px solid var(--tm-border)}
.header-centered .centered-nav{min-height:52px}.header-centered .primary-menu{justify-content:center}
.header-minimal{padding:0;border-block-end:1px solid var(--tm-border);box-shadow:0 8px 28px rgba(7,38,45,.035)}
.header-minimal .minimal-inner{min-height:var(--tm-header-row-height,72px)}
.header-minimal .primary-menu{justify-content:center}.header-minimal .primary-menu>li>a{padding-block:12px}
.header-dark-tech{background:#07131f!important;color:#fff!important;border-block-end:3px solid var(--tm-accent)}
.header-dark-tech .dark-tech-inner{min-height:var(--tm-header-row-height,76px)}
.header-dark-tech .site-title-mark,.header-dark-tech .primary-menu>li>a{color:#fff!important}
.header-dark-tech .search-toggle,.header-dark-tech .dark-toggle,.header-dark-tech .mobile-menu-toggle{color:#fff}
.header-dark-tech .primary-menu>li>a:hover{color:var(--tm-accent)!important}
.header-mega{background:var(--tm-header-bg,#fff);box-shadow:0 1px 0 var(--tm-border)}
.header-mega .mega-brand-row{min-height:max(96px,var(--tm-header-row-height,84px));padding-block:14px}
.header-mega .mega-brand-row>.techmag-ad{flex:1;max-width:760px;margin:0;min-height:72px}
.header-mega .mega-nav{background:#f7fbfb;border-block:1px solid var(--tm-border)}
.header-mega .mega-nav .nav-inner{min-height:54px}
@media(max-width:820px){.site-header .custom-logo{max-height:var(--tm-header-logo-height-mobile,44px)}.header-mega .mega-brand-row>.techmag-ad{display:none}}

/* === TechMag 1.2.5: universal stable mobile header === */
.techmag-mobile-bar{display:none}
@media(max-width:820px){
  html,body{inline-size:100%;max-inline-size:100%;overflow-x:clip}
  body.techmag-drawer-open{overflow:hidden;overscroll-behavior:none}

  /* Every desktop header layout collapses to one reliable mobile bar. */
  .header-editorial>.editorial-storybar,
  .header-editorial>.editorial-nav-shell,
  .header-centered>.centered-brand,
  .header-centered>.main-nav,
  .header-minimal>.minimal-inner,
  .header-dark-tech>.dark-tech-inner,
  .header-dark-tech>.news-ticker,
  .header-mega>.top-bar,
  .header-mega>.mega-brand-row,
  .header-mega>.main-nav{display:none!important}

  .site-header{position:relative!important;inset:auto!important;overflow:visible}
  .techmag-mobile-bar{
    display:grid;
    grid-template-columns:44px minmax(0,1fr) 44px;
    align-items:center;
    gap:10px;
    min-height:64px;
    width:min(calc(100% - 20px),var(--tm-container));
    padding-block:7px;
    margin-inline:auto;
    background:var(--tm-header-bg,#fff);
    color:var(--tm-header-text,#17252b);
  }
  .techmag-mobile-brand{min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
  .techmag-mobile-brand .site-brand,.techmag-mobile-brand .site-title-mark{max-width:100%;min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.12rem;line-height:1.15}
  .techmag-mobile-brand .custom-logo{display:block;width:auto;max-width:min(190px,58vw);max-height:var(--tm-header-logo-height-mobile,44px);object-fit:contain}
  .techmag-mobile-action{width:44px;height:44px;min-width:44px;display:grid!important;place-items:center;border:0;border-radius:10px;background:transparent;color:inherit;padding:0}
  .techmag-mobile-action:hover,.techmag-mobile-action:focus-visible{background:rgba(11,127,131,.09);color:var(--tm-primary)}
  .techmag-mobile-action-empty{pointer-events:none}

  .mobile-drawer{
    position:fixed;
    inset-block:0;
    inset-inline:auto;
    width:min(88dvw,360px);
    max-width:calc(100dvw - 16px);
    height:100dvh;
    max-height:100dvh;
    padding:18px;
    margin:0;
    background:var(--tm-surface,#fff);
    color:var(--tm-text,#0f172a);
    z-index:1002;
    overflow-y:auto;
    overflow-x:clip;
    overscroll-behavior:contain;
    box-shadow:0 0 34px rgba(15,23,42,.18);
    will-change:transform;
    transition:transform 220ms ease,visibility 220ms ease;
    visibility:hidden;
  }
  html[dir="rtl"] .mobile-drawer,.rtl .mobile-drawer{right:0;left:auto;transform:translate3d(105%,0,0)}
  html[dir="ltr"] .mobile-drawer{left:0;right:auto;transform:translate3d(-105%,0,0)}
  .mobile-drawer.is-open{transform:translate3d(0,0,0)!important;visibility:visible}
  .mobile-drawer-head{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:12px;margin:0 0 18px;padding:0 0 14px;border-bottom:1px solid var(--tm-border)}
  .mobile-drawer-brand{min-width:0;overflow:hidden}
  .mobile-drawer-brand .site-brand,.mobile-drawer-brand .site-title-mark{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.18rem;line-height:1.15}
  .mobile-drawer-brand .custom-logo{max-width:min(190px,58vw);max-height:44px;object-fit:contain}
  .mobile-menu-close{width:44px;height:44px;margin:0;padding:0;background:var(--tm-bg,#f8fafc)}
  .mobile-nav,.mobile-menu,.mobile-menu li,.mobile-menu a{max-width:100%;min-width:0}
  .mobile-menu{width:100%;overflow-wrap:anywhere}
  .mobile-menu a{padding:12px 6px;white-space:normal;line-height:1.55}
  .mobile-menu .sub-menu{max-width:100%;padding-inline-start:14px;margin:0;overflow:hidden}
  .drawer-backdrop{position:fixed;inset:0;width:100dvw;height:100dvh}

  /* Defensive rules for wide content inside the preview and real phones. */
  .site-main,.site-footer,.home-section,.tm-container,.entry-content,.single-article{max-inline-size:100%}
  .entry-content img,.entry-content iframe,.entry-content video,.entry-content table{max-inline-size:100%}
}
@media(max-width:420px){
  .techmag-mobile-bar{grid-template-columns:42px minmax(0,1fr) 42px;gap:6px;min-height:60px}
  .techmag-mobile-action{width:42px;height:42px;min-width:42px}
  .techmag-mobile-brand .custom-logo{max-width:min(165px,55vw);max-height:40px}
  .mobile-drawer{width:min(90dvw,340px);padding:16px}
}

/* v1.2.6 ad placement controls */
.techmag-ad{width:min(100%,var(--tm-ad-max-width,100%));margin-inline:auto}.techmag-ad-align-start{margin-inline-start:0;margin-inline-end:auto}.techmag-ad-align-end{margin-inline-start:auto;margin-inline-end:0}.techmag-ad-align-center{margin-inline:auto}.techmag-ad-align-full{width:100%;max-width:none}.techmag-mobile-ad-sticky{display:none}
@media(max-width:600px){.techmag-mobile-ad-sticky{display:grid!important;position:fixed;z-index:9996;inset-inline:8px;inset-block-end:8px;width:auto;max-width:none;margin:0;background:var(--tm-bg,#fff);box-shadow:0 -5px 24px rgba(0,0,0,.16);border-radius:10px;overflow:hidden}.admin-bar .techmag-mobile-ad-sticky{inset-block-end:8px}}


/* === TechMag 1.2.8: complete dark-mode contrast and cascade fix ===
   Loaded last on purpose so builder/header presets cannot make text disappear. */
html[data-techmag-theme="dark"]{
  --tm-header-bg:#111827;
  --tm-header-text:#F8FAFC;
  --tm-header-top-bg:#07131F;
  --tm-header-top-text:#FFFFFF;
  --tm-editorial-dark:#F8FAFC;
  --tm-editorial-dark-2:#E2E8F0;
  color-scheme:dark;
}
html[data-techmag-theme="dark"] body,
html[data-techmag-theme="dark"] .site-main,
html[data-techmag-theme="dark"] .home .site-main,
html[data-techmag-theme="dark"] .techmag-canvas{
  background:#0F172A!important;
  color:#F8FAFC!important;
}
html[data-techmag-theme="dark"] .site-header,
html[data-techmag-theme="dark"] .site-header .main-nav,
html[data-techmag-theme="dark"] .site-header .editorial-nav-shell,
html[data-techmag-theme="dark"] .site-header.header-editorial,
html[data-techmag-theme="dark"] .header-classic .editorial-nav-shell,
html[data-techmag-theme="dark"] .header-editorial .editorial-nav-shell,
html[data-techmag-theme="dark"] .header-mega,
html[data-techmag-theme="dark"] .header-mega .mega-nav,
html[data-techmag-theme="dark"] .news-ticker{
  background:#111827!important;
  color:#F8FAFC!important;
  border-color:#263246!important;
}
html[data-techmag-theme="dark"] .site-header .site-title-mark,
html[data-techmag-theme="dark"] .site-header .site-brand,
html[data-techmag-theme="dark"] .site-header .primary-menu>li>a,
html[data-techmag-theme="dark"] .site-header .editorial-primary-menu>li>a,
html[data-techmag-theme="dark"] .site-header .header-tools,
html[data-techmag-theme="dark"] .site-header .editorial-actions,
html[data-techmag-theme="dark"] .techmag-mobile-bar,
html[data-techmag-theme="dark"] .techmag-mobile-brand .site-title-mark{
  color:#F8FAFC!important;
}
html[data-techmag-theme="dark"] .site-header .primary-menu>li>a:hover,
html[data-techmag-theme="dark"] .site-header .primary-menu>li.current-menu-item>a,
html[data-techmag-theme="dark"] .site-header .primary-menu>li.current-menu-ancestor>a{
  color:var(--tm-accent)!important;
}
html[data-techmag-theme="dark"] .header-editorial .editorial-primary-menu>li.current-menu-item>a,
html[data-techmag-theme="dark"] .header-editorial .editorial-primary-menu>li.current-menu-ancestor>a,
html[data-techmag-theme="dark"] .header-editorial .editorial-primary-menu>li>a:hover{
  background:var(--tm-primary)!important;
  color:#fff!important;
}
html[data-techmag-theme="dark"] .primary-menu .sub-menu,
html[data-techmag-theme="dark"] .search-panel,
html[data-techmag-theme="dark"] .mobile-drawer,
html[data-techmag-theme="dark"] .single-article,
html[data-techmag-theme="dark"] .post-card,
html[data-techmag-theme="dark"] .trend-item,
html[data-techmag-theme="dark"] .widget,
html[data-techmag-theme="dark"] .no-results,
html[data-techmag-theme="dark"] .page-numbers,
html[data-techmag-theme="dark"] .woocommerce ul.products li.product{
  background:#111827!important;
  color:#F8FAFC!important;
  border-color:#263246!important;
}
html[data-techmag-theme="dark"] .primary-menu .sub-menu a,
html[data-techmag-theme="dark"] .mobile-menu a,
html[data-techmag-theme="dark"] .widget a,
html[data-techmag-theme="dark"] .post-card a,
html[data-techmag-theme="dark"] .single-article h1,
html[data-techmag-theme="dark"] .single-article h2,
html[data-techmag-theme="dark"] .single-article h3,
html[data-techmag-theme="dark"] .single-article h4,
html[data-techmag-theme="dark"] .entry-content,
html[data-techmag-theme="dark"] .entry-content p,
html[data-techmag-theme="dark"] .entry-content li{
  color:#F8FAFC;
}
html[data-techmag-theme="dark"] .entry-content a{color:#67E8F9}
html[data-techmag-theme="dark"] .post-meta,
html[data-techmag-theme="dark"] .breadcrumbs,
html[data-techmag-theme="dark"] .archive-description,
html[data-techmag-theme="dark"] .card-meta,
html[data-techmag-theme="dark"] .trend-item small,
html[data-techmag-theme="dark"] .author-box p{
  color:#94A3B8!important;
}
html[data-techmag-theme="dark"] .author-box,
html[data-techmag-theme="dark"] .techmag-toc,
html[data-techmag-theme="dark"] .comment-body,
html[data-techmag-theme="dark"] .review-box,
html[data-techmag-theme="dark"] .colored-categories a,
html[data-techmag-theme="dark"] .live-search-results a{
  background:#16202D!important;
  color:#F8FAFC!important;
  border-color:#263246!important;
}
html[data-techmag-theme="dark"] input,
html[data-techmag-theme="dark"] textarea,
html[data-techmag-theme="dark"] select,
html[data-techmag-theme="dark"] .search-field,
html[data-techmag-theme="dark"] .newsletter-form input,
html[data-techmag-theme="dark"] .comment-form input:not([type=submit]),
html[data-techmag-theme="dark"] .comment-form textarea{
  background:#0B1220!important;
  color:#F8FAFC!important;
  border-color:#334155!important;
}
html[data-techmag-theme="dark"] input::placeholder,
html[data-techmag-theme="dark"] textarea::placeholder{color:#94A3B8!important;opacity:1}
html[data-techmag-theme="dark"] .editorial-search-button,
html[data-techmag-theme="dark"] .editorial-dark-toggle,
html[data-techmag-theme="dark"] .techmag-mobile-action,
html[data-techmag-theme="dark"] .mobile-menu-close{
  background:#1E293B!important;
  color:#F8FAFC!important;
}
html[data-techmag-theme="dark"] .editorial-search-button:hover,
html[data-techmag-theme="dark"] .editorial-dark-toggle:hover,
html[data-techmag-theme="dark"] .techmag-mobile-action:hover{
  background:#263246!important;
  color:var(--tm-accent)!important;
}
html[data-techmag-theme="dark"] .category-shelves-section,
html[data-techmag-theme="dark"] .editorial-feature-section,
html[data-techmag-theme="dark"] .home-latest-editorial{
  background:#0F172A!important;
  color:#F8FAFC!important;
}
html[data-techmag-theme="dark"] .category-shelf{
  border-color:var(--shelf-color,var(--tm-primary));
}
html[data-techmag-theme="dark"] .category-shelf-heading h2,
html[data-techmag-theme="dark"] .shelf-story h3,
html[data-techmag-theme="dark"] .shelf-story h3 a,
html[data-techmag-theme="dark"] .editorial-section-heading h2,
html[data-techmag-theme="dark"] .section-heading h2,
html[data-techmag-theme="dark"] .home-taxonomy-box h2,
html[data-techmag-theme="dark"] .important-categories-box h2{
  color:#F1F5F9!important;
}
html[data-techmag-theme="dark"] .shelf-story{border-color:#263246!important}
html[data-techmag-theme="dark"] .home-taxonomy-box,
html[data-techmag-theme="dark"] .important-categories-box,
html[data-techmag-theme="dark"] .feature-story-card,
html[data-techmag-theme="dark"] .ranked-panel,
html[data-techmag-theme="dark"] .ranked-post,
html[data-techmag-theme="dark"] .home-category-links a,
html[data-techmag-theme="dark"] .important-category-list a{
  background:#111827!important;
  color:#E5EDF2!important;
  border-color:#263246!important;
}
html[data-techmag-theme="dark"] .rank-number,
html[data-techmag-theme="dark"] .important-category-list small{
  background:#163139!important;
  color:#67E8F9!important;
}
html[data-techmag-theme="dark"] .card-image,
html[data-techmag-theme="dark"] .feature-story-image,
html[data-techmag-theme="dark"] .shelf-story-image,
html[data-techmag-theme="dark"] .rank-thumb,
html[data-techmag-theme="dark"] .list-image{
  background:#1E293B!important;
}
html[data-techmag-theme="dark"] .techmag-ad-paragraph{border-color:#263246}
html[data-techmag-theme="dark"] .techmag-mobile-ad-sticky{background:#111827!important;color:#F8FAFC!important}
html[data-techmag-theme="dark"] .has-transparent-header:not(.scrolled) .site-header{
  background:rgba(17,24,39,.92)!important;
  color:#F8FAFC!important;
}


/* Theme designer credit */
.techmag-designer-credit{background:var(--tm-footer-bg,#07131f);border-block-start:1px solid rgba(159,176,184,.14);color:var(--tm-footer-muted,#9fb0b8);font-size:.72rem;line-height:1.7;text-align:center}
.techmag-designer-credit .tm-container{min-height:42px;display:flex;align-items:center;justify-content:center;gap:5px;padding-block:8px}
.techmag-designer-credit a{color:#f59e0b;font-weight:600;text-decoration:none;text-underline-offset:3px;transition:color .2s ease,opacity .2s ease}
.techmag-designer-credit a:hover,.techmag-designer-credit a:focus-visible{color:#fdba74;text-decoration:underline}
.techmag-designer-credit .techmag-designer-name{color:#f59e0b;font-weight:600}
@media(max-width:600px){.techmag-designer-credit{font-size:.68rem}.techmag-designer-credit .tm-container{min-height:38px;padding-inline:14px;flex-wrap:wrap}}

/* === TechMag 1.3.0: professional one-line desktop header ===
   Keep navigation on one line. Switch to the mobile drawer before it can wrap. */
@media (min-width:1181px){
  .site-header .minimal-inner,
  .site-header .dark-tech-inner,
  .site-header .editorial-nav-row,
  .site-header .nav-inner{
    min-height:78px;
  }

  .site-header .desktop-nav,
  .site-header .editorial-main-nav{
    min-width:0;
    flex:1 1 auto;
  }

  .site-header .primary-menu,
  .site-header .editorial-primary-menu{
    display:flex;
    flex-wrap:nowrap!important;
    align-items:center;
    justify-content:center;
    gap:clamp(4px,.7vw,12px);
    min-width:0;
    white-space:nowrap;
  }

  .site-header .primary-menu>li,
  .site-header .editorial-primary-menu>li{
    flex:0 0 auto;
    min-width:0;
  }

  .site-header .primary-menu>li>a,
  .site-header .editorial-primary-menu>li>a{
    position:relative;
    display:flex;
    align-items:center;
    min-height:46px;
    padding:10px clamp(8px,.7vw,13px)!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:var(--tm-header-text,#17252b)!important;
    font-size:clamp(.84rem,.82vw,.96rem);
    font-weight:700;
    line-height:1.2;
    white-space:nowrap!important;
    word-break:keep-all;
    overflow-wrap:normal;
    transition:color .18s ease;
  }

  .site-header .primary-menu>li>a::before,
  .site-header .editorial-primary-menu>li>a::before{
    content:"";
    position:absolute;
    inset-inline:10px;
    inset-block-end:2px;
    height:2px;
    border-radius:999px;
    background:var(--tm-accent,#ff7a1a);
    transform:scaleX(0);
    transform-origin:center;
    transition:transform .18s ease;
  }

  .site-header .primary-menu>li>a:hover,
  .site-header .primary-menu>li.current-menu-item>a,
  .site-header .primary-menu>li.current-menu-ancestor>a,
  .site-header .editorial-primary-menu>li>a:hover,
  .site-header .editorial-primary-menu>li.current-menu-item>a,
  .site-header .editorial-primary-menu>li.current-menu-ancestor>a{
    background:transparent!important;
    color:var(--tm-primary,#0b7f83)!important;
  }

  .site-header .primary-menu>li>a:hover::before,
  .site-header .primary-menu>li.current-menu-item>a::before,
  .site-header .primary-menu>li.current-menu-ancestor>a::before,
  .site-header .editorial-primary-menu>li>a:hover::before,
  .site-header .editorial-primary-menu>li.current-menu-item>a::before,
  .site-header .editorial-primary-menu>li.current-menu-ancestor>a::before{
    transform:scaleX(1);
  }

  .site-header .menu-item-has-children>a::after{
    content:"";
    width:6px;
    height:6px;
    margin-inline-start:7px;
    border-inline-end:1.7px solid currentColor;
    border-block-end:1.7px solid currentColor;
    transform:rotate(45deg) translateY(-2px);
    opacity:.55;
    flex:0 0 auto;
  }

  .site-header .site-title-mark{
    font-size:clamp(1.45rem,1.7vw,1.9rem);
    line-height:1;
    white-space:nowrap;
  }

  .header-minimal .minimal-inner{
    gap:clamp(14px,1.6vw,28px);
    padding-block:7px;
  }
  .header-minimal .desktop-nav{overflow:visible}
  .header-minimal .header-tools,
  .header-editorial .editorial-actions,
  .header-dark-tech .header-tools{
    flex:0 0 auto;
    white-space:nowrap;
  }

  .header-editorial .editorial-nav-row{
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:clamp(14px,1.7vw,30px);
  }
  .header-editorial .editorial-brand{min-width:0}
  .header-editorial .editorial-search-button{
    min-width:44px!important;
    width:44px!important;
    height:44px!important;
    padding:0!important;
    justify-content:center;
  }
  .header-editorial .editorial-search-button span{display:none!important}
  .header-editorial .editorial-dark-toggle{width:44px;height:44px}

  .site-header .primary-menu .sub-menu{
    white-space:normal;
  }
  .site-header .primary-menu .sub-menu a{
    white-space:normal;
    line-height:1.55;
  }
}

/* Compact laptop mode: preserve a single line instead of squeezing/wrapping. */
@media (min-width:1181px) and (max-width:1380px){
  .site-header .primary-menu,
  .site-header .editorial-primary-menu{gap:2px}
  .site-header .primary-menu>li>a,
  .site-header .editorial-primary-menu>li>a{
    font-size:.80rem;
    padding-inline:7px!important;
  }
  .site-header .site-title-mark{font-size:1.4rem}
  .header-minimal .minimal-inner,
  .header-editorial .editorial-nav-row,
  .header-dark-tech .dark-tech-inner{gap:12px}
  .site-header .search-toggle,
  .site-header .dark-toggle,
  .site-header .header-login{width:38px;height:38px}
}

/* Switch to the stable drawer before desktop labels can collide. */
@media (max-width:1180px){
  .site-header .desktop-nav,
  .site-header .editorial-main-nav .primary-menu,
  .site-header .main-nav .primary-menu{
    display:none!important;
  }
  .site-header .mobile-menu-toggle{display:grid!important}
  .header-minimal .minimal-inner,
  .header-dark-tech .dark-tech-inner{
    min-height:68px;
  }
  .header-editorial .editorial-nav-row{
    min-height:68px;
    grid-template-columns:auto minmax(0,1fr) auto;
  }
  .header-editorial .editorial-main-nav{
    display:flex;
    justify-content:flex-end;
  }
}

/* Dark mode keeps the same understated orange active marker. */
html[data-techmag-theme="dark"] .site-header .primary-menu>li>a:hover,
html[data-techmag-theme="dark"] .site-header .primary-menu>li.current-menu-item>a,
html[data-techmag-theme="dark"] .site-header .primary-menu>li.current-menu-ancestor>a,
html[data-techmag-theme="dark"] .header-editorial .editorial-primary-menu>li>a:hover,
html[data-techmag-theme="dark"] .header-editorial .editorial-primary-menu>li.current-menu-item>a,
html[data-techmag-theme="dark"] .header-editorial .editorial-primary-menu>li.current-menu-ancestor>a{
  background:transparent!important;
  color:#fff!important;
}
