
/* Stage 391 — Layout and Sidebar Flow Fix
   Restores professional two-panel broker workspace behavior after Stage 390 compression. */
:root{
  --s391-sidebar-w: 320px;
  --s391-rail-bg: #07101d;
  --s391-main-bg: #07101d;
  --s391-line: rgba(124, 157, 215, .18);
  --s391-line-strong: rgba(126, 174, 255, .28);
  --s391-panel: rgba(12, 25, 44, .92);
  --s391-panel-2: rgba(15, 31, 55, .92);
  --s391-text: #eef5ff;
  --s391-muted: #a9bbd9;
  --s391-gold: #f4c76b;
  --s391-blue: #66adff;
  --s391-green: #31d39d;
}
html,
body.stage391-layout-fix{
  width:100%;
  height:100%;
  overflow:hidden !important;
}
body.stage391-layout-fix{
  min-width:0 !important;
  background:
    radial-gradient(circle at 0 0, rgba(35, 88, 180, .10), transparent 30%),
    linear-gradient(180deg, #050b14 0%, #07111e 48%, #050b13 100%) !important;
}
body.stage391-layout-fix .shell{
  width:100vw !important;
  height:100vh !important;
  min-height:100vh !important;
  display:grid !important;
  grid-template-columns: var(--s391-sidebar-w) minmax(0, 1fr) !important;
  gap:0 !important;
  padding:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  background:transparent !important;
}
body.stage391-layout-fix .sidebar{
  width:auto !important;
  height:100vh !important;
  min-height:0 !important;
  max-height:none !important;
  position:relative !important;
  top:auto !important;
  align-self:stretch !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:20px 18px 24px !important;
  border:0 !important;
  border-right:1px solid var(--s391-line) !important;
  border-radius:0 !important;
  background:
    radial-gradient(circle at 30% -5%, rgba(88, 166, 255, .12), transparent 32%),
    linear-gradient(180deg, rgba(9, 20, 36, .98), rgba(6, 14, 26, .99) 58%, rgba(5, 12, 23, 1)) !important;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.035) !important;
  scrollbar-width:thin;
  scrollbar-color:rgba(91, 157, 255, .72) rgba(8, 18, 33, .48);
}
body.stage391-layout-fix .sidebar::-webkit-scrollbar{width:9px}
body.stage391-layout-fix .sidebar::-webkit-scrollbar-track{background:rgba(8,18,33,.45)}
body.stage391-layout-fix .sidebar::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(91,157,255,.88), rgba(36,90,190,.72));
  border-radius:999px;
  border:2px solid rgba(8,18,33,.70);
}
body.stage391-layout-fix .main{
  height:100vh !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:14px 18px 24px !important;
  margin:0 !important;
  background:
    radial-gradient(circle at 94% 2%, rgba(31, 107, 227, .10), transparent 28%),
    linear-gradient(180deg, rgba(5, 11, 20, .98), rgba(7, 15, 28, .98)) !important;
  scrollbar-width:thin;
  scrollbar-color:rgba(91, 157, 255, .72) rgba(8, 18, 33, .48);
}
body.stage391-layout-fix .main::-webkit-scrollbar{width:10px}
body.stage391-layout-fix .main::-webkit-scrollbar-track{background:rgba(8,18,33,.45)}
body.stage391-layout-fix .main::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(91,157,255,.88), rgba(36,90,190,.72));
  border-radius:999px;
  border:2px solid rgba(8,18,33,.70);
}
body.stage391-layout-fix .stage390-sidebar-intel{
  margin:0 0 14px !important;
  padding:12px !important;
  border-radius:18px !important;
}
body.stage391-layout-fix .stage390-intel-sub{font-size:11px !important;line-height:1.35 !important}
body.stage391-layout-fix .stage390-intel-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:7px !important}
body.stage391-layout-fix .stage390-intel-cell{padding:8px 7px !important}
body.stage391-layout-fix .brand{
  padding:4px 4px 14px !important;
  margin:0 0 14px !important;
  gap:14px !important;
  min-width:0 !important;
}
body.stage391-layout-fix .brand .logo{width:76px !important;flex:0 0 76px !important}
body.stage391-layout-fix .brand h1{
  font-size:18px !important;
  line-height:1.05 !important;
  max-width:190px !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}
body.stage391-layout-fix .brand p{
  font-size:12px !important;
  line-height:1.45 !important;
  max-width:190px !important;
}
body.stage391-layout-fix .design-banner,
body.stage391-layout-fix .sidebar-surface,
body.stage391-layout-fix .panel.sidebar-surface{
  border-radius:18px !important;
  margin-bottom:14px !important;
  padding:16px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 169, 255, .10), transparent 28%),
    linear-gradient(180deg, rgba(13, 27, 48, .95), rgba(7, 16, 30, .96)) !important;
}
body.stage391-layout-fix .design-banner h3,
body.stage391-layout-fix .sidebar-panel-title{
  font-size:17px !important;
  line-height:1.12 !important;
  letter-spacing:-.025em !important;
}
body.stage391-layout-fix .sidebar-banner-copy,
body.stage391-layout-fix .sidebar-panel-copy,
body.stage391-layout-fix .sub{
  font-size:12.5px !important;
  line-height:1.58 !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}
body.stage391-layout-fix .sidebar-micro-grid,
body.stage391-layout-fix .sidebar-mini-grid,
body.stage391-layout-fix .row2{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body.stage391-layout-fix .sidebar-micro-card,
body.stage391-layout-fix .sidebar-mini-card{
  min-width:0 !important;
  padding:12px 10px !important;
}
body.stage391-layout-fix .sidebar-micro-card strong,
body.stage391-layout-fix .sidebar-mini-card div:not(.label):not(.sub){
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  line-height:1.2 !important;
}
body.stage391-layout-fix .pill-row{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:9px !important;
}
body.stage391-layout-fix .pill{
  max-width:100% !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  padding-inline:12px !important;
}
body.stage391-layout-fix .action-grid--sidebar{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body.stage391-layout-fix .action-grid--sidebar button,
body.stage391-layout-fix .sidebar button,
body.stage391-layout-fix .sidebar button.secondary,
body.stage391-layout-fix #resyncBtn{
  min-width:0 !important;
  width:100% !important;
  min-height:46px !important;
  padding:0 12px 0 31px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  text-align:left !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  font-size:12px !important;
  line-height:1.12 !important;
  letter-spacing:-.01em !important;
}
body.stage391-layout-fix .action-grid--sidebar button * ,
body.stage391-layout-fix .sidebar button *{
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  word-break:normal !important;
}
body.stage391-layout-fix #resyncBtn{grid-column:1 / -1 !important}
body.stage391-layout-fix .tv-hero-shell{
  margin-top:0 !important;
  border-radius:22px !important;
}
body.stage391-layout-fix .tv-hero-stage{
  min-height:clamp(285px, 25vw, 375px) !important;
}
body.stage391-layout-fix .tv-hero-copy-panel{
  padding:18px 20px 20px !important;
}
body.stage391-layout-fix #heroTitle{
  font-size:clamp(28px, 2.2vw, 38px) !important;
  line-height:1.05 !important;
  letter-spacing:-.045em !important;
}
body.stage391-layout-fix #heroSummary{
  max-width:880px !important;
  font-size:14.5px !important;
  line-height:1.62 !important;
  color:#d5e0f2 !important;
}
body.stage391-layout-fix .hero-cta-cluster{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(220px,1fr)) !important;
  gap:12px !important;
  width:100% !important;
  max-width:900px !important;
  margin-top:16px !important;
}
body.stage391-layout-fix #heroHeader .hero-media-cta,
body.stage391-layout-fix .hero-media-cta{
  min-width:0 !important;
  min-height:70px !important;
  grid-template-columns:42px minmax(0,1fr) auto !important;
  padding:12px 14px !important;
  gap:12px !important;
  overflow:hidden !important;
}
body.stage391-layout-fix .hero-media-cta__copy,
body.stage391-layout-fix .hero-media-cta__copy strong,
body.stage391-layout-fix .hero-media-cta__copy small,
body.stage391-layout-fix .hero-media-cta__tail{
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}
body.stage391-layout-fix .hero-media-cta__copy strong{font-size:13px !important;line-height:1.05 !important;letter-spacing:-.01em !important}
body.stage391-layout-fix .hero-media-cta__copy small{font-size:10.5px !important;line-height:1.2 !important}
body.stage391-layout-fix .hero-media-cta__tail{font-size:11px !important;max-width:86px !important}
body.stage391-layout-fix .panel,
body.stage391-layout-fix .topbar,
body.stage391-layout-fix .experience-strip .panel{
  max-width:100% !important;
}
body.stage391-layout-fix *{
  box-sizing:border-box;
}
body.stage391-layout-fix button,
body.stage391-layout-fix a,
body.stage391-layout-fix strong,
body.stage391-layout-fix small,
body.stage391-layout-fix span,
body.stage391-layout-fix div,
body.stage391-layout-fix p{
  word-break:normal;
}
@media (max-width: 1360px){
  body.stage391-layout-fix{--s391-sidebar-w:300px;}
  body.stage391-layout-fix .sidebar{padding:18px 14px 22px !important;}
  body.stage391-layout-fix .hero-cta-cluster{grid-template-columns:repeat(3,minmax(190px,1fr)) !important;}
  body.stage391-layout-fix .hero-media-cta__tail{display:none !important;}
}
@media (max-width: 1180px){
  html,body.stage391-layout-fix{height:auto;overflow:auto !important;}
  body.stage391-layout-fix .shell{
    display:block !important;
    width:100% !important;
    height:auto !important;
    min-height:100vh !important;
    overflow:visible !important;
  }
  body.stage391-layout-fix .sidebar{
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    border-right:0 !important;
    border-bottom:1px solid var(--s391-line) !important;
    padding:16px !important;
  }
  body.stage391-layout-fix .main{
    height:auto !important;
    min-height:auto !important;
    overflow:visible !important;
    padding:14px !important;
  }
  body.stage391-layout-fix .hero-cta-cluster{grid-template-columns:repeat(2,minmax(220px,1fr)) !important;max-width:100% !important;}
  body.stage391-layout-fix .tv-hero-stage{min-height:300px !important;}
}
@media (max-width: 760px){
  body.stage391-layout-fix .sidebar{padding:12px !important;}
  body.stage391-layout-fix .brand .logo{width:62px !important;flex-basis:62px !important;}
  body.stage391-layout-fix .brand h1{font-size:16px !important;}
  body.stage391-layout-fix .sidebar-micro-grid,
  body.stage391-layout-fix .sidebar-mini-grid,
  body.stage391-layout-fix .row2,
  body.stage391-layout-fix .action-grid--sidebar,
  body.stage391-layout-fix .hero-cta-cluster{grid-template-columns:1fr !important;}
  body.stage391-layout-fix .hero-media-cta__tail{display:inline-flex !important;}
  body.stage391-layout-fix .tv-hero-stage{min-height:230px !important;}
  body.stage391-layout-fix #heroTitle{font-size:26px !important;}
}
