/* SAID / third pass — cross-market navigation and responsive visual cohesion */
body[data-market]{--said-edge:#dae5e2;--said-ink:#123039}
body[data-market] .rail{background:#102a31}
body[data-market] .rail:after{background:none}
body[data-market] .brand-logo{filter:none}
body[data-market] .rail nav a{border-radius:6px;transition:background .14s ease,color .14s ease}
body[data-market] .rail nav a.active{background:#24454a;box-shadow:none}
body[data-market] .rail nav a.active:before{left:-6px;width:2px;background:#6dd4ba}
body[data-market] .top{height:68px;border-bottom-color:var(--said-edge)}
body[data-market] .market-switch{gap:3px;padding:4px;border-radius:8px;border-color:var(--said-edge);box-shadow:none}
body[data-market] .market-switch a{padding:8px 11px;font-size:11px;letter-spacing:.025em;border-radius:5px;font-weight:600}
body[data-market] .market-switch a.active{background:#163b41;color:#fff}
body[data-market] .source-check{font-variant-numeric:tabular-nums}
body[data-market] .demo{border-bottom-color:var(--said-edge)}
body[data-market] footer{border-top:1px solid var(--said-edge)}
body[data-market] footer .said-footer-links a{display:inline-flex;min-height:38px;align-items:center}
body[data-market] button:focus-visible,
body[data-market] a:focus-visible,
body[data-market] select:focus-visible{outline:3px solid #ba8b58;outline-offset:2px}
@media(max-width:850px){
 body[data-market] .rail{position:sticky;top:0;padding:11px max(16px,env(safe-area-inset-right)) 11px max(16px,env(safe-area-inset-left));min-height:62px;gap:12px}
 body[data-market] .rail .brand{margin:0}
 body[data-market] .rail .brand-logo{width:108px}
 body[data-market] .mobile-market-control{gap:2px}
 body[data-market] .mobile-market-control span{font-size:9px;letter-spacing:.09em}
 body[data-market] .mobile-market-control select{min-height:44px;max-width:160px;border-radius:7px;background:#193b43}
 body[data-market] #nav{padding-top:7px;padding-bottom:max(7px,env(safe-area-inset-bottom));border-top-color:var(--said-edge);box-shadow:0 -4px 20px rgba(14,31,38,.07)}
 body[data-market] #nav a{min-height:54px;gap:4px;border-radius:7px;white-space:normal;overflow-wrap:anywhere}
 body[data-market] #nav a.active{background:#edf5f2;color:#126b66}
 body[data-market] #nav a.active .nav-icon{background:#dceee8}
 body[data-market] #nav a.active:before,body[data-market] #nav a.active:after{display:none}
 body[data-market] .mobile-nav-label{font-size:clamp(9px,2.2vw,11px);line-height:1.15}
 body[data-market] .demo{padding-top:7px;padding-bottom:7px}
 body[data-market] .source-check{font-size:10px}
 body[data-market] .workspace{padding-bottom:calc(92px + env(safe-area-inset-bottom))}
 body[data-market="dubai"] .workspace{padding-bottom:calc(155px + env(safe-area-inset-bottom))}
 body[data-market] footer .said-footer-links{gap:10px 18px;margin-left:0;width:100%}
 body[data-market] footer .said-footer-links a{min-height:44px}
}
@media(max-width:380px){
 body[data-market] .rail .brand-logo{width:93px}
 body[data-market] .mobile-market-control select{max-width:145px}
 body[data-market] #nav a{padding-left:0;padding-right:0}
 body[data-market] .mobile-nav-label{font-size:9px}
}
@media(prefers-reduced-motion:reduce){body[data-market] .rail nav a{transition:none}}

/* QA correction: ten Dubai sections must not wrap into a second fixed-nav row. */
@media(max-width:850px){
 body[data-market] #nav{
   display:flex!important;grid-template-columns:none;
   justify-content:flex-start;gap:3px;overflow-x:auto;overflow-y:hidden;
   overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
   scrollbar-width:none;scroll-snap-type:x proximity;
 }
 body[data-market] #nav::-webkit-scrollbar{display:none}
 body[data-market] #nav a{
   flex:0 0 74px;min-width:74px;max-width:90px;
   min-height:54px;scroll-snap-align:start;
 }
 body[data-market] #nav a.active{background:#edf5f2}
 body[data-market] #nav a.active .mobile-nav-label{font-weight:750}
 body[data-market] .workspace{padding-bottom:calc(95px + env(safe-area-inset-bottom))}
 body[data-market="dubai"] .workspace{padding-bottom:calc(95px + env(safe-area-inset-bottom))}
 body[data-market] .comparison-panel .table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
