/* Preview MARFA: route shell UI canonical owner. Page-specific content below is preserved. */
/* MARFA UNIFIED SHELL V2: single visual owner for ALL SPA views. */
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading{
 --shell-gap:9px;box-sizing:border-box!important;position:relative!important;z-index:35!important;
 width:100%!important;max-width:100%!important;min-width:0!important;min-height:54px!important;height:auto!important;
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:flex-start!important;
 direction:rtl!important;gap:var(--shell-gap)!important;overflow:visible!important;
 margin:0 0 12px!important;padding:7px 12px!important;
 background:var(--marfa-g3-inner,rgba(30,47,69,.9))!important;
 border:1px solid var(--marfa-g3-border,rgba(144,170,203,.38))!important;
 border-radius:13px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.15)!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading > .marfa-crumb-trail{
 display:flex!important;direction:rtl!important;align-items:center!important;gap:5px!important;
 order:0!important;flex:0 0 auto!important;max-width:38%!important;min-width:0!important;overflow:hidden!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-crumb-link{
 display:inline-flex!important;align-items:center!important;min-height:34px!important;height:34px!important;
 background:transparent!important;border:0!important;border-radius:9px!important;box-shadow:none!important;
 padding:5px 7px!important;margin:0!important;white-space:nowrap!important;
 color:var(--marfa-field-text,#edf4ff)!important;font:650 13px/1.35 inherit!important;cursor:pointer!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-crumb-current{
 display:inline-flex!important;align-items:center!important;margin:0!important;padding:5px 8px!important;
 height:34px!important;min-height:34px!important;box-sizing:border-box!important;
 border:0!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important;
 font-family:inherit!important;font-size:15px!important;font-weight:800!important;line-height:1.25!important;
 color:var(--marfa-field-text,#edf4ff)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-crumb-sep{flex:0 0 auto!important;opacity:.65!important;color:var(--marfa-field-text,#edf4ff)!important}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading > .marfa-unified-tools{
 display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:flex-start!important;
 order:1!important;flex:0 1 auto!important;min-width:0!important;margin-inline-start:auto!important;
 gap:8px!important;direction:rtl!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading > .marfa-route-help{
 order:2!important;flex:0 0 auto!important;position:relative!important;margin:0!important;z-index:100!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading :is(.dk-wallet,.dk-help,.dk-star:not(.dk-pick),.acc-pick,.marfa-myspace-more,.marfa-route-help-toggle){
 display:inline-flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:center!important;
 gap:6px!important;min-height:36px!important;height:36px!important;margin:0!important;padding:5px 10px!important;
 border-radius:10px!important;border:1px solid var(--marfa-g3-border,rgba(144,170,203,.36))!important;
 background:var(--marfa-g3-surface,rgba(35,53,78,.9))!important;color:var(--marfa-field-text,#edf4ff)!important;
 box-shadow:inset 0 1px rgba(255,255,255,.12)!important;white-space:nowrap!important;
 font-family:inherit!important;font-size:12px!important;font-weight:650!important;line-height:1.2!important;
 cursor:pointer!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .dk-wwrap{
 display:inline-flex!important;position:relative!important;min-width:0!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-myspace-actions{
 display:inline-flex!important;align-items:center!important;gap:3px!important;position:relative!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-myspace-menu{
 position:absolute!important;top:calc(100% + 8px)!important;inset-inline-start:0!important;z-index:200!important;
 padding:6px!important;border:1px solid var(--marfa-g3-border,rgba(144,170,203,.36))!important;
 border-radius:10px!important;background:var(--marfa-g3-popup-surface,#17283d)!important;
 box-shadow:0 12px 30px rgba(0,0,0,.3)!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-myspace-menu[hidden]{display:none!important}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-toggle{
 color:#f5c477!important;border-color:rgba(227,174,92,.55)!important;background:rgba(227,174,92,.12)!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-alert{
 display:inline-block!important;flex:0 0 auto!important;width:8px!important;height:8px!important;border-radius:50%!important;
 background:#ef5264!important;box-shadow:0 0 8px rgba(239,82,100,.7)!important;
 animation:marfa-shell-alert 1.7s ease-in-out infinite!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-label{white-space:nowrap!important}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-panel{
 position:absolute!important;top:calc(100% + 9px)!important;inset-inline-start:0!important;
 width:min(410px,calc(100vw - 32px))!important;max-height:55vh!important;overflow:auto!important;
 padding:14px!important;border:1px solid rgba(224,180,104,.5)!important;border-radius:14px!important;
 background:var(--marfa-g3-popup-surface,#1b304b)!important;color:var(--marfa-field-text,#edf4ff)!important;
 box-shadow:0 16px 34px rgba(0,0,0,.35)!important;text-align:start!important;line-height:1.85!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-panel[hidden]{display:none!important}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-panel strong{display:block!important;color:#ecc786!important;margin-bottom:7px!important}
html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-panel p{margin:0!important;font-size:13px!important;white-space:normal!important}
body.v7-ui #app.app.marfa-converted .view:has(>header.marfa-page-heading .marfa-route-help) > .dk-about{display:none!important}
body.v7-ui #app.app.marfa-converted .view > .dk-bar.marfa-toolbar-migrated{display:none!important}
body.v7-ui #app.app.marfa-converted .view > .acc-pick-row:empty{display:none!important}
@keyframes marfa-shell-alert{0%,100%{opacity:1}50%{opacity:.25}}
@media(prefers-reduced-motion:reduce){body.v7-ui #app.app.marfa-converted .marfa-route-help-alert{animation:none!important}}
html[data-theme="light"] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading{background:#f8f9fb!important;border-color:#dce3ea!important;box-shadow:none!important}
html[data-theme="light"] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading :is(.dk-wallet,.dk-help,.dk-star:not(.dk-pick),.acc-pick,.marfa-myspace-more){background:#eceeef!important;color:#222!important;border-color:#e3e7eb!important;box-shadow:none!important}
html[data-theme="light"] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading .marfa-route-help-toggle{background:#ffdfdf!important;border-color:#ffdfdf!important;color:#dd2020!important}
html[data-theme="light"] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading :is(.marfa-crumb-link,.marfa-crumb-current,.marfa-crumb-sep){color:#222!important}
@media(max-width:1150px){html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading{flex-wrap:wrap!important}html[data-theme] body.v7-ui #app.app.marfa-converted .view > header.marfa-page-heading > .marfa-unified-tools{flex-wrap:wrap!important;margin-inline-start:0!important}}

/* Existing feature-only rules, not permitted to restyle the global route shell. */
#strategy-lab.sl2 .sl2-head{
 position:relative;z-index:50;display:flex!important;flex-direction:column!important;
 align-items:stretch!important;gap:12px!important;margin-bottom:16px!important;
}
#strategy-lab.sl2 .sl2-head>div:first-child{
 grid-area:auto!important;width:100%;flex:none!important;align-self:stretch!important;
 padding:7px 15px 13px;text-align:right;border-bottom:1px solid var(--marfa-g3-border);
}
#strategy-lab.sl2 .sl2-head .sl2-crumb{color:#b2c1d8}
#strategy-lab.sl2 .sl2-ctrl{
 grid-area:auto!important;width:100%;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
 align-items:stretch!important;justify-content:stretch!important;
}
#strategy-lab.sl2 .sl2-head .sl2-box{isolation:auto!important}
#strategy-lab.sl2 #slActivePicker{z-index:100;isolation:auto}
#strategy-lab.sl2 #slActivePicker:has(.marfa-glass-popover:not([hidden])){z-index:500}
#strategy-lab.sl2 .sl2-ctrl>.sl2-box:has(.marfa-glass-popover:not([hidden])){z-index:400}
#strategy-lab.sl2 .sl2-body{position:relative;z-index:1}
#strategy-lab.sl2 .marfa-glass-popover{
 z-index:999!important;min-width:210px;width:max-content;max-width:min(330px,85vw);
 inset:calc(100% + 7px) 0 auto auto!important;
 background:var(--marfa-g3-popup-surface)!important;
 border-color:var(--marfa-g3-border)!important;
 box-shadow:var(--marfa-g3-popup-shadow)!important;
}
#strategy-lab.sl2 .marfa-glass-option{white-space:normal;overflow-wrap:anywhere}
@container (max-width:1120px){
 #strategy-lab.sl2 .sl2-ctrl{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@container (max-width:620px){
 #strategy-lab.sl2 .sl2-ctrl{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:690px){html[data-theme] body.v7-ui #app.app.marfa-converted .view>.marfa-page-heading{padding:10px 12px;min-height:52px}}

/* One visible strategy title: main heading is the shared view title; original keeps its metadata. */
#strategy-lab.sl2:has(> .marfa-page-heading) .sl2-head>div:first-child h1{display:none!important}
#strategy-lab.sl2>.marfa-page-heading{margin-bottom:10px!important}
#strategy-lab.sl2 .sl2-head>div:first-child{padding-top:0!important}

/* STRATEGY RESPONSIVE PRIORITY FIX v2 */
@media (max-width:1180px){
 #strategy-lab.sl2 .sl2-head .sl2-ctrl{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (max-width:680px){
 #strategy-lab.sl2 .sl2-head .sl2-ctrl{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #strategy-lab.sl2 .sl2-head .sl2-ctrl>*{min-width:0!important;width:100%!important}
 #strategy-lab.sl2 .sl2-workspace-grid{grid-template-columns:1fr!important}
}
/* Strategy Lab: consistent light glass material, preview only. */
html[data-theme="light"] body.v7-ui #strategy-lab.sl2 .sl2-ctrl>:is(.sl2-box,.sl2-ghost,.sl2-primary){background:var(--marfa-g3-surface)!important;border:1px solid var(--marfa-g3-border)!important;box-shadow:var(--marfa-g3-depth)!important;color:#182944!important}
html[data-theme="light"] body.v7-ui #strategy-lab.sl2 .sl2-ctrl>.sl2-primary{background:linear-gradient(155deg,#ffe8b2,#dcb36e)!important;border-color:#cda35d!important}
html[data-theme="light"] body.v7-ui #strategy-lab.sl2 :is(.sl2-workspace,.sl2-workspace-step,.sl2-kpi,.sl2-card){background:var(--marfa-g3-surface)!important;border-color:var(--marfa-g3-border)!important;box-shadow:var(--marfa-g3-depth)!important}
html[data-theme="light"] body.v7-ui #strategy-lab.sl2 :is(.sl2-box b,.sl2-box small,.sl2-workspace-heading h3,.sl2-workspace-heading p,.sl2-workspace-step strong,.sl2-workspace-step small,.sl2-workspace-step em,.sl2-crumb){color:#254365!important}
html[data-theme="light"] body.v7-ui #strategy-lab.sl2 .sl2-box :is(select,.marfa-glass-select-trigger){background:linear-gradient(145deg,#fff,#e3edfb)!important;color:#182944!important;border-color:rgba(80,110,151,.38)!important}

/* My Space: title is typography, not a separate oversized card.
   The existing first-row controls and description remain untouched. */
html[data-theme] body.v7-ui #app.app.marfa-converted #myspace.view > .marfa-page-heading:not(:has(.marfa-crumb-trail)){
  min-height:0!important;
  margin:0 0 10px!important;
  padding:4px 2px 6px!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
html[data-theme] body.v7-ui #app.app.marfa-converted #myspace.view > .marfa-page-heading:not(:has(.marfa-crumb-trail)) h1{
  font-size:clamp(23px,2vw,30px)!important;
  line-height:1.35!important;
  border-inline-start:3px solid var(--marfa-g3-focus);
  padding-inline-start:10px;
}
/* Same title already exists above: preserve the card's text and buttons,
   hide only the duplicate heading, with no DOM or behavioral changes. */
html[data-theme] body.v7-ui #app.app.marfa-converted #myspace.view:has(> .marfa-page-heading) .ms-head h1{
  display:none!important;
}



/* Source-only legacy bar: never renders a second toolbar once shell is mounted. */
body.v7-ui #app.app.marfa-converted .view:has(> header.marfa-page-heading) > .dk-bar{display:none!important}
