/* Market Nest phone-only layout. This file is linked only on <=760px screens.
   Desktop cockpit and desktop chart functionality must remain unchanged. */
.mnq-mobile-chart-nav{display:none}
@media(max-width:760px){
 body .shell.shell{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:9px 9px 24px!important}
 body .topbar.topbar{gap:7px!important;min-width:0;padding:9px 8px!important}
 body .topbar.topbar .brand{flex:1 1 auto;min-width:0!important}
 body .topbar.topbar .brand h1{font-size:clamp(17px,5vw,24px)!important;letter-spacing:1px!important}
 body .topbar.topbar nav{display:flex!important;order:3!important;width:100%!important;gap:3px!important;justify-content:flex-start!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;padding-bottom:4px}
 body .topbar.topbar nav a{flex:1 0 auto!important;min-width:56px!important;max-width:none!important;padding:7px 4px!important;white-space:nowrap}
 body .topbar.topbar .pill{flex:0 1 auto;max-width:100%;padding:6px!important;font-size:9px!important}
 /* Remove conflicting desktop padding and give the bull a complete, contained banner. */
 body .shell.shell>.hero.hero{display:flex!important;flex-direction:column!important;gap:8px!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0 12px 12px!important;overflow:hidden!important;align-items:stretch!important}
 body .shell.shell>.hero.hero:before{display:block!important;position:relative!important;content:''!important;inset:auto!important;width:100%!important;height:clamp(128px,38vw,180px)!important;flex:0 0 auto!important;background-image:linear-gradient(180deg,transparent 70%,#061c30 100%),url('/market-nest-bull.webp')!important;background-size:100% 100%,contain!important;background-position:center center!important;background-repeat:no-repeat!important;opacity:1!important}
 body .shell.shell>.hero.hero .hero-main{width:100%!important;flex:0 0 auto!important;padding:0 1px!important}
 body .shell.shell>.hero.hero .hero-main h2{font-size:clamp(19px,5.6vw,26px)!important;line-height:1.2!important}
 body .shell.shell>.hero.hero .hero-main p{font-size:12px!important;line-height:1.45!important}
 body .shell.shell .mnq-top-cards{flex:0 0 auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;height:auto!important;min-height:88px!important;gap:7px!important}
 body .shell.shell .mnq-top-cards .mnq-24trend,body .shell.shell>.hero.hero .status.mnq-trade-card{min-height:88px!important;height:auto!important;min-width:0!important;padding:9px 6px!important}
 body .cockpit.cockpit{display:flex!important;flex-direction:column!important;gap:10px!important}
 body .cockpit.cockpit .cockpit-left{order:0!important;min-width:0!important;width:100%!important}
 body .cockpit.cockpit .cockpit-right{order:1!important;min-width:0!important;width:100%!important}
 body .cockpit.cockpit .chart-panel{min-width:0!important;width:100%!important;padding:9px!important}
 body .cockpit.cockpit .chart-panel .panelhead{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important}
 body .cockpit.cockpit .chart-panel .panelhead>div:first-child{flex:1 1 100%!important;min-width:0}
 body .cockpit.cockpit .chart-panel h2{font-size:15px!important;line-height:1.35!important}
 body .cockpit.cockpit .chart-panel .switcher{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;width:100%!important;gap:6px!important}
 body .cockpit.cockpit .chart-panel .switcher button{box-sizing:border-box!important;min-width:0!important;width:100%!important;min-height:40px!important;padding:8px 3px!important;font-size:12px!important;text-align:center}
 body .cockpit.cockpit .chart-panel .mnq-uk-clock{margin:0!important;min-width:0!important}
 body .cockpit.cockpit .nest56-controls{width:100%!important;max-width:100%!important;margin:0 0 5px!important;gap:6px!important}
 body .cockpit.cockpit .nest56-zoom{width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important}
 body .cockpit.cockpit .nest56-controls button{min-height:37px!important;padding:7px 9px!important;box-sizing:border-box!important;font-size:11px!important}
 body .cockpit.cockpit .nest56-controls .nest56-label{display:none!important}
 body .mnq-mobile-chart-nav.mnq-mobile-chart-nav{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;margin:5px 0 3px}
 body .mnq-mobile-chart-nav button{min-width:0;min-height:32px;padding:5px 7px;background:#0c3348;color:#e1faff;border:1px solid #3b93ae;border-radius:7px;font:700 11px/1.2 Inter,'Segoe UI',Arial,sans-serif;white-space:normal;touch-action:manipulation}
 body .mnq-mobile-chart-nav button:last-child{color:#7ff5db;border-color:#28ab9b}
 body .mnq-mobile-chart-nav button:focus-visible{outline:2px solid #00f0ed;outline-offset:2px}
 body .cockpit.cockpit .chart{height:clamp(270px,50dvh,395px)!important;min-height:270px!important;width:100%!important;min-width:0!important;touch-action:pan-y!important}
 body .cockpit.cockpit .macd-chart{height:93px!important;min-height:93px!important;width:100%!important}
 body .cockpit.cockpit .chartnote{font-size:11px!important;line-height:1.45!important;margin-top:7px!important}
 body .cockpit.cockpit .mnq-toolkit-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
 body .cockpit.cockpit .mnq-toolkit .toolkit-action,body .cockpit.cockpit .mnq-toolkit .toolkit-popover>summary{box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:42px!important;font-size:11px!important;padding:8px 7px!important;justify-content:center!important}
 body .cockpit.cockpit .mnq-toolkit .toolkit-popover{min-width:0!important;width:100%!important}
 body .cockpit.cockpit .mnq-toolkit .toolkit-popover[open]{grid-column:1/-1;max-height:none!important;overflow:visible!important}
 body .cockpit.cockpit .mnq-toolkit .toolkit-popover[open]>summary{width:100%!important;max-width:100%!important;position:static!important}
 body .mnq-feed-bar.mnq-feed-bar span{min-width:0!important;overflow-wrap:anywhere}
}
@media(max-width:365px){
 body .mnq-mobile-chart-nav.mnq-mobile-chart-nav{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body .mnq-mobile-chart-nav button{font-size:11px}
}

/* Final mobile polish: the candle chart and MACD come before secondary navigation.
   Tool drawers are closed by default, with no duplicated full-size nav row. */
@media(max-width:760px){
  body .cockpit.cockpit .chart-panel .nest56-controls{
    display:flex!important;align-items:center!important;gap:5px!important;
    justify-content:space-between!important;margin:4px 0 6px!important
  }
  body .cockpit.cockpit .nest56-zoom{display:flex!important;align-items:center!important;gap:4px!important;width:auto!important;flex:0 1 auto!important}
  body .cockpit.cockpit .mnq-chart-tools-wrap{display:flex!important;align-items:center!important;gap:4px!important;flex:0 1 auto!important}
  body .cockpit.cockpit .chart-panel .nest56-controls button,
  body .cockpit.cockpit .chart-panel .mnq-chart-more>summary{
    min-height:32px!important;padding:5px 7px!important;font-size:10px!important
  }
  body .cockpit.cockpit .chart-panel .nest56-zoom>button:nth-of-type(-n+2){min-width:30px!important}
  body .cockpit.cockpit .chart-panel .nest56-zoom .mnq-zoom-latest{display:none!important}
  body .cockpit.cockpit .chart-panel .mnq-chart-tools-popover{right:0;max-width:calc(100vw - 28px)}
  body .cockpit.cockpit .chart-panel .chart-tools{margin:2px 2px 0!important;min-height:0!important}
  body .cockpit.cockpit .chart-panel .mnq-candle-readout{gap:3px 8px!important;margin:2px 0!important;padding:2px!important}
  body .cockpit.cockpit .chart-panel .chart{height:clamp(280px,52dvh,405px)!important;min-height:280px!important}
  body .cockpit.cockpit .chart-panel .macd-chart{height:88px!important;min-height:88px!important}
  body .mnq-mobile-chart-nav.mnq-mobile-chart-nav{gap:5px!important;margin:5px 0 1px!important}
  body .mnq-mobile-chart-nav button{min-height:32px!important;box-shadow:inset 0 1px 0 #3ba6b622!important}
  body .cockpit.cockpit .chart-panel .chartnote{font-size:10px!important;line-height:1.4!important}
  body .cockpit.cockpit .chart-panel .panelhead{margin-bottom:4px!important}
  body .cockpit.cockpit .chart-panel .mnq-chart-tools-popover{max-height:190px;overflow:auto}
}
@media(max-width:390px){
  body .cockpit.cockpit .chart-panel .nest56-controls{gap:4px!important}
  body .cockpit.cockpit .chart-panel .nest56-controls button,
  body .cockpit.cockpit .chart-panel .mnq-chart-more>summary{padding:4px 6px!important}
  body .cockpit.cockpit .chart-panel .nest56-controls .nest56-label{display:none!important}
}

/* Chart-first phone cockpit: no need to scroll past contract tools and three
   price cards to reach actual candlesticks. Desktop DOM and CSS are unchanged. */
@media(max-width:760px){
 body .cockpit.cockpit .cockpit-left{display:flex!important;flex-direction:column!important;align-items:stretch!important}
 body .cockpit.cockpit .cockpit-left>.chart-panel{order:0!important}
 body .cockpit.cockpit .cockpit-left>.metrics{order:1!important;margin-top:7px!important}
 body .cockpit.cockpit .cockpit-left>.mnq-toolkit{order:2!important;margin-top:8px!important}
}

/* Give the actual phone chart more of the first screen by removing duplicate
   explanatory chrome, retaining timeframes and delayed-data timestamp. */
@media(max-width:760px){
 body .cockpit.cockpit .chart-panel .panelhead{
   display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
   gap:4px 7px!important;align-items:center!important
 }
 body .cockpit.cockpit .chart-panel .panelhead>div:first-child{
   flex:none!important;min-width:0!important;grid-column:1!important
 }
 body .cockpit.cockpit .chart-panel .panelhead h2{
   font-size:13px!important;line-height:1.15!important
 }
 body .cockpit.cockpit .chart-panel .panelhead p{display:none!important}
 body .cockpit.cockpit .chart-panel .mnq-uk-clock{
   grid-column:2!important;grid-row:1!important;
   margin:0!important;min-width:70px!important
 }
 body .cockpit.cockpit .chart-panel .mnq-uk-clock strong{font-size:16px!important}
 body .cockpit.cockpit .chart-panel .switcher{
   grid-column:1/-1!important;grid-row:2!important
 }
 body .cockpit.cockpit .chart-panel .switcher button{
   min-height:37px!important;padding:6px 3px!important
 }
}


/* Nov 15 cockpit declutter: remove duplicate research terminal and verbose footnotes. */
body .workbench .nest-terminal.nest-v16>.nest-title,\nbody .workbench .nest-terminal.nest-v16>.nest-v16-main{display:none!important}\nbody .workbench .nest-terminal.nest-v16{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
body .cockpit .chart-panel .chartnote{display:none!important}
body .cockpit-right .nest58-disclaimer{display:none!important}

/* Five readable research cards, no clipping at laptop or phone widths. */
body .nest-v16-five{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important}
body .nest-v16-five>.nest-panel{min-width:0!important;overflow:hidden!important;box-sizing:border-box!important;padding:14px!important;border-radius:14px!important;background:linear-gradient(155deg,#10354a 0%,#081b2b 62%,#061523 100%)!important;box-shadow:inset 0 1px 0 #71dbff25,0 10px 28px #0005!important}
body .nest-v16-five .nest-minirow{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:9px!important;min-width:0!important}
body .nest-v16-five .nest-minirow>span{min-width:0!important;flex:1 1 auto!important;overflow-wrap:anywhere!important}
body .nest-v16-five .nest-minirow>b{min-width:0!important;flex:0 1 auto!important;text-align:right!important;overflow-wrap:anywhere!important;white-space:normal!important}
body .nest-v16-five .nest-panel-title{font-size:12px!important;letter-spacing:.045em!important;line-height:1.35!important;white-space:normal!important}
body .nest-v16-five .nest-strength-body{display:flex!important;flex-direction:column!important;align-items:center!important;gap:13px!important}
body .nest-v16-five .nest-strength-copy{width:100%!important;min-width:0!important;display:grid!important;gap:8px!important}
body .nest-v16-five .nest-strength-copy>b{text-align:center!important;font-size:14px!important;line-height:1.35!important}
body .nest-v16-five .nest-strength-copy>small{font-size:10px!important;line-height:1.4!important;text-align:center!important;color:#91c4d6!important}
body .nest-v16-five .nest-ring{position:relative!important;width:118px!important;height:118px!important;min-width:118px!important;min-height:118px!important;max-width:118px!important;max-height:118px!important;border-radius:50%!important;background:conic-gradient(from -90deg,#ff526b 0 26%,#ffbb4c 26% 39%,#00e7a7 39% 52%,#18394d 52% 100%)!important;box-shadow:0 0 0 3px #153c51,0 0 0 6px #00d8ff19,0 0 24px #00cfff35,inset 0 0 14px #000a!important}
body .nest-v16-five .nest-ring.trend-up{background:conic-gradient(from -90deg,#00e7a7 0 72%,#18394d 72% 100%)!important;box-shadow:0 0 0 3px #153c51,0 0 0 6px #00e7a71c,0 0 26px #00e7a755,inset 0 0 14px #000a!important}
body .nest-v16-five .nest-ring.trend-down{background:conic-gradient(from -90deg,#ff526b 0 72%,#18394d 72% 100%)!important;box-shadow:0 0 0 3px #153c51,0 0 0 6px #ff526b1c,0 0 26px #ff526b55,inset 0 0 14px #000a!important}
body .nest-v16-five .nest-ring:before{content:""!important;position:absolute!important;inset:15px!important;width:auto!important;height:auto!important;border-radius:50%!important;background:radial-gradient(circle at 45% 35%,#123a50,#061827 78%)!important;border:1px solid #56a6bf77!important;box-shadow:inset 0 0 16px #000b,0 0 12px #00d8ff25!important}
body .nest-v16-five .nest-ring strong{position:relative!important;z-index:1!important;font-size:20px!important;letter-spacing:.04em!important;text-shadow:0 0 12px currentColor!important}
@media(max-width:1400px){body .nest-v16-five{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:800px){body .nest-v16-five{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:580px){body .nest-v16-five{grid-template-columns:minmax(0,1fr)!important}body .nest-v16-five>.nest-panel{padding:13px!important}body .nest-v16-five .nest-strength-body{flex-direction:row!important;align-items:center!important}body .nest-v16-five .nest-ring{width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;max-width:104px!important;max-height:104px!important}body .nest-v16-five .nest-strength-copy>b{text-align:left!important}body .nest-v16-five .nest-strength-copy>small{text-align:left!important}}
