#strategy-hub{position:fixed;inset:0;z-index:7000;background:#071018;color:#e8f1f2;overflow:auto;font-family:Arial,sans-serif}
#strategy-hub *{box-sizing:border-box}.hub-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 34px;border-bottom:1px solid #203640;background:#0a151d;position:sticky;top:0;z-index:2}
.hub-header small{color:#6f8b96;letter-spacing:1.4px}.hub-header h1{margin:3px 0 4px;font-size:28px}.hub-header p{margin:0;color:#91a6af}.hub-live{font-size:12px;color:#fbdd64;display:flex;gap:8px;align-items:center}.hub-live i{width:8px;height:8px;border-radius:50%;background:#cda505}
.hub-main{max-width:1320px;margin:0 auto;padding:30px}.hub-strategy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.hub-strategy-card{background:#0d1d26;border:1px solid #29414c;border-top-width:4px;border-radius:10px;padding:22px}.hub-strategy-card.sessions{border-top-color:#f9c806}.hub-strategy-card.edge{border-top-color:#6ea7ff}
.hub-card-head{display:flex;justify-content:space-between;gap:12px}.hub-card-head small{color:#78909a}.hub-card-head h2{margin:5px 0 0;font-size:23px}.hub-status{align-self:flex-start;border:1px solid #35515d;border-radius:999px;padding:5px 9px;color:#a8bbc2;font-size:11px;text-transform:uppercase}
.hub-stat-grid,.hub-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0}.hub-detail-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.hub-stat{background:#0a171f;border:1px solid #233944;border-radius:7px;padding:12px}.hub-stat span{display:block;color:#8299a3;font-size:12px;margin-bottom:7px}.hub-stat strong{font-size:19px}
.hub-positive{color:#f9cc19!important}.hub-negative{color:#e1ae85!important}.hub-positions{display:grid;gap:8px}.hub-position{display:flex;justify-content:space-between;gap:12px;background:#0a171f;border:1px solid #203640;border-radius:7px;padding:11px 12px}.hub-position span{display:block;color:#7d949e;font-size:11px;margin-top:4px}.hub-position>div:last-child{text-align:right}
.hub-open-strategy,.hub-action-card button,.hub-back{border:1px solid #35515d;background:#15303c;color:#e8f1f2;border-radius:7px;padding:10px 14px;cursor:pointer}.hub-open-strategy{width:100%;margin-top:18px;font-weight:700}.hub-open-strategy:hover,.hub-action-card button:hover,.hub-back:hover{background:#1c3b49}
.hub-system-note{margin-top:20px;border-left:4px solid #335c6c;background:#0b1a22;padding:13px 16px;display:flex;gap:12px;align-items:center}.hub-system-note span{color:#8ca4ad}.hub-empty{color:#81959e}
.hub-back{position:absolute;left:34px;top:23px}.hub-header:has(.hub-back)>div:first-of-type{margin-left:130px}.hub-main.strategy{padding-top:22px}.hub-strategy-menu{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;border-bottom:1px solid #203640;padding-bottom:14px}.hub-strategy-menu small{color:#6f8b96}.hub-strategy-menu h2{margin:4px 0 0}.hub-tabs{display:flex;gap:7px;flex-wrap:wrap}.hub-tabs button{background:#0d202a;color:#9db0b7;border:1px solid #29414c;border-radius:6px;padding:8px 11px;cursor:pointer}.hub-tabs button.active{background:#173743;color:#fff;border-color:#3d6979}
.hub-detail{padding:18px 0}.hub-detail h3{margin:23px 0 10px}.hub-table-wrap{overflow:auto;border:1px solid #29414c;border-radius:8px}.hub-table-wrap table{width:100%;border-collapse:collapse;font-size:13px}.hub-table-wrap th,.hub-table-wrap td{padding:10px;border-bottom:1px solid #223844;text-align:left}.hub-table-wrap th{color:#8ea3ab;background:#0b1921}.hub-action-card,.hub-chat{background:#0d1d26;border:1px solid #29414c;border-radius:9px;padding:24px}.hub-action-card p,.hub-chat p{color:#8fa4ac;line-height:1.5}.hub-chat{text-align:center;padding:50px 24px}.hub-chat-icon{font-size:34px;color:#6ea7ff}.hub-chat button{padding:9px 14px;border-radius:6px;border:1px solid #34515d;background:#12242d;color:#6f8790}
@media(max-width:900px){.hub-strategy-grid{grid-template-columns:1fr}.hub-detail-grid{grid-template-columns:1fr 1fr}.hub-stat-grid{grid-template-columns:1fr 1fr}.hub-strategy-menu{align-items:flex-start;flex-direction:column}.hub-header{padding:20px}.hub-main{padding:18px}.hub-back{left:20px;top:18px}.hub-header:has(.hub-back)>div:first-of-type{margin-left:118px}}
@media(max-width:560px){.hub-detail-grid,.hub-stat-grid{grid-template-columns:1fr}.hub-header{align-items:flex-start}.hub-live{display:none}.hub-tabs{display:grid;grid-template-columns:1fr 1fr;width:100%}.hub-tabs button{width:100%}.hub-header:has(.hub-back)>div:first-of-type{margin-left:0;margin-top:46px}.hub-back{top:14px}.hub-system-note{align-items:flex-start;flex-direction:column}}

.hub-regime-panel{margin-top:18px;border:1px solid #29414c;border-left-width:5px;border-radius:9px;padding:18px;background:#0d1d26;display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,2fr);gap:18px}
.hub-regime-panel.observe{border-left-color:#4f9edb}.hub-regime-panel.green{border-left-color:#cda505}.hub-regime-panel.amber{border-left-color:#838a95}.hub-regime-panel.red{border-left-color:#d79660}
.hub-regime-panel small{color:#78909a;letter-spacing:1px}.hub-regime-panel h3{font-size:26px;margin:5px 0}.hub-regime-panel p{color:#95aab2;line-height:1.5}.hub-regime-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.hub-regime-green{color:#f9cc19!important}.hub-regime-amber{color:#969ca5!important}.hub-regime-red{color:#e1ae85!important}.hub-regime-observe{color:#6eaff0!important}
@media(max-width:760px){.hub-regime-panel{grid-template-columns:1fr}.hub-regime-metrics{grid-template-columns:1fr 1fr}}

/* Strong Regime Health state colours */
.hub-regime-panel.green{background:rgba(205,165,5,.10);border-color:#cda505}
.hub-regime-panel.amber{background:rgba(131,138,149,.11);border-color:#838a95}
.hub-regime-panel.red{background:rgba(215,150,96,.11);border-color:#d79660}
.hub-regime-panel.observe{background:rgba(79,158,219,.10);border-color:#4f9edb}
.hub-regime-panel.green>div:first-child h3{color:#f9cc19}
.hub-regime-panel.amber>div:first-child h3{color:#969ca5}
.hub-regime-panel.red>div:first-child h3{color:#e1ae85}
.hub-regime-panel.observe>div:first-child h3{color:#6eaff0}
.hub-regime-green,.hub-regime-amber,.hub-regime-red,.hub-regime-observe{display:inline-block;padding:3px 9px;border-radius:999px;font-weight:700}
.hub-regime-green{background:rgba(205,165,5,.16)}
.hub-regime-amber{background:rgba(131,138,149,.16)}
.hub-regime-red{background:rgba(215,150,96,.16)}
.hub-regime-observe{background:rgba(79,158,219,.16)}

.hub-regime-metric{position:relative}.hub-regime-metric em{display:inline-block;margin-top:7px;font-style:normal;font-size:11px;letter-spacing:.5px}.hub-regime-metric small{display:block;color:#78909a;font-size:10px;margin-top:5px;line-height:1.35}

/* Edge Strategy trade summary: mobile cards avoid horizontal scrolling. */
.hub-trade-cards{display:none}
.hub-trade-cards-always{display:grid;gap:12px}
.hub-trade-card{background:#0d1d26;border:1px solid #29414c;border-radius:9px;padding:14px}
.hub-trade-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid #223844;padding-bottom:10px;margin-bottom:10px}
.hub-trade-card-head small{display:block;color:#78909a;font-size:11px;margin-bottom:3px}
.hub-trade-card-head h4{margin:0;font-size:18px}
.hub-direction{border-radius:999px;padding:5px 9px;font-size:11px;font-weight:700;letter-spacing:.4px}
.hub-direction.long{color:#f9cc19;background:rgba(205,165,5,.14)}
.hub-direction.short{color:#e1ae85;background:rgba(215,150,96,.14)}
.hub-trade-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:10px}
.hub-trade-result-grid>div,.hub-trade-detail-grid>div{background:#0a171f;border:1px solid #203640;border-radius:7px;padding:9px}
.hub-trade-result-grid span,.hub-trade-detail-grid span{display:block;color:#8299a3;font-size:10px;margin-bottom:4px}
.hub-trade-result-grid strong{font-size:16px}
.hub-trade-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hub-trade-detail-grid strong{display:block;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.hub-trade-detail-grid small{display:block;color:#9bb0b8;font-size:11px;margin-top:3px}
.hub-live-snapshot em{display:inline-block;margin-top:7px;padding:3px 9px;border-radius:999px;background:rgba(79,158,219,.16);color:#6eaff0;font-style:normal;font-size:11px;font-weight:700;letter-spacing:.5px}
.hub-live-snapshot small{display:block;color:#78909a;font-size:10px;margin-top:5px;line-height:1.35}

@media(max-width:760px){
  .hub-trades-desktop{display:none}
  .hub-trade-cards{display:grid;gap:12px}
  .hub-regime-metrics,.hub-performance-metrics,.hub-execution-metrics{grid-template-columns:1fr}
}
@media(max-width:560px){
  .hub-trade-result-grid{grid-template-columns:1fr 1fr}
  .hub-trade-result-grid>div:first-child{grid-column:1 / -1}
  .hub-trade-detail-grid{grid-template-columns:1fr}
  .hub-trade-card{padding:12px}
}

/* Mobile shell / iOS standalone viewport hardening */
html,body{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
#strategy-hub{width:100%;max-width:100vw;min-width:0;overflow-x:hidden;overscroll-behavior-x:none}
#strategy-hub-app,.hub-header,.hub-main,.hub-strategy-menu,.hub-detail,.hub-strategy-grid,.hub-strategy-card,.hub-tabs{min-width:0;max-width:100%}
.hub-header>div,.hub-strategy-menu>div,.hub-card-head>div,.hub-stat,.hub-position>div{min-width:0}
.hub-header h1,.hub-header p,.hub-strategy-menu h2,.hub-stat strong,.hub-position strong{overflow-wrap:anywhere}
@media(max-width:560px){
  #strategy-hub{width:100vw}
  .hub-header{width:100%;padding:14px 12px calc(12px + env(safe-area-inset-top));gap:10px}
  .hub-header h1{font-size:22px;line-height:1.15}
  .hub-header p{font-size:12px;line-height:1.35}
  .hub-main{width:100%;padding:12px max(10px,env(safe-area-inset-left)) calc(18px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right));margin:0}
  .hub-main.strategy{padding-top:12px}
  .hub-strategy-card{width:100%;padding:14px}
  .hub-strategy-menu{width:100%;gap:12px}
  .hub-tabs{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .hub-tabs button{min-width:0;white-space:normal;text-align:center;padding:9px 6px;font-size:12px}
  .hub-detail{width:100%;padding-top:12px}
  .hub-back{left:12px;top:calc(10px + env(safe-area-inset-top))}
  .hub-header:has(.hub-back)>div:first-of-type{width:100%;margin-left:0;margin-top:42px}
}

/* Mobile shell v3: once authenticated, the strategy hub owns the page layout. */
html.hub-active,html.hub-active body{
  width:100%!important;max-width:100%!important;height:100%!important;min-width:0!important;
  margin:0!important;overflow:hidden!important;-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;
}
html.hub-active #root{display:none!important;width:0!important;height:0!important;overflow:hidden!important}
html.hub-active #strategy-hub{
  position:fixed!important;inset:0!important;width:100vw!important;width:100dvw!important;
  height:100vh!important;height:100dvh!important;max-width:none!important;min-width:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;
  overscroll-behavior-x:none;contain:layout paint size;
}
html.hub-active #strategy-hub-app{width:100%!important;min-width:0!important;max-width:100%!important}
@media(max-width:760px){
  html.hub-active .hub-main,html.hub-active .hub-header,html.hub-active .hub-strategy-menu,
  html.hub-active .hub-detail,html.hub-active .hub-strategy-grid,html.hub-active .hub-strategy-card{
    width:100%!important;max-width:100%!important;min-width:0!important;
  }
}

/* iOS login: inputs below 16px trigger Safari/PWA auto-zoom. */
@media(max-width:760px){
  .login-card input{
    font-size:16px!important;
    line-height:1.25!important;
    min-height:44px;
  }
}

/* Mobile strategy header: back control occupies its own row, never overlays title. */
@media(max-width:560px){
  .hub-header:has(.hub-back){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding:calc(10px + env(safe-area-inset-top)) 12px 12px!important;
    gap:10px!important;
  }
  .hub-header:has(.hub-back) .hub-back{
    position:static!important;
    inset:auto!important;
    align-self:flex-start!important;
    margin:0!important;
    width:auto!important;
    min-height:40px;
    z-index:auto!important;
  }
  .hub-header:has(.hub-back)>div:first-of-type{
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  .hub-header:has(.hub-back)>div:first-of-type h1{
    margin-top:0!important;
  }
}


/* VPS Health & Maintenance */
.hub-maintenance-card{margin-top:20px;background:#0d1d26;border:1px solid #29414c;border-left:5px solid #4f9edb;border-radius:10px;padding:20px}
.hub-maintenance-card.green{border-left-color:#cda505}.hub-maintenance-card.amber{border-left-color:#838a95}.hub-maintenance-card.red{border-left-color:#d79660}
.hub-maintenance-note{color:#95aab2;margin:10px 0 2px}
.hub-maintenance-pill{align-self:flex-start;border-radius:999px;padding:5px 10px;font-size:11px;font-weight:800;letter-spacing:.5px}
.hub-maintenance-pill.green{background:rgba(205,165,5,.16);color:#f9cc19}.hub-maintenance-pill.amber{background:rgba(131,138,149,.16);color:#969ca5}.hub-maintenance-pill.red{background:rgba(215,150,96,.16);color:#e1ae85}.hub-maintenance-pill.observing{background:rgba(79,158,219,.16);color:#6eaff0}
.hub-open-maintenance{width:100%;margin-top:4px;border:1px solid #35515d;background:#15303c;color:#e8f1f2;border-radius:7px;padding:10px 14px;cursor:pointer;font-weight:700}
.hub-open-maintenance:hover{background:#1c3b49}
.hub-maint-green{color:#f9cc19!important}.hub-maint-amber{color:#969ca5!important}.hub-maint-red{color:#e1ae85!important}
.hub-maintenance-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border:1px solid #29414c;border-left:5px solid #4f9edb;border-radius:10px;padding:18px;background:#0d1d26}
.hub-maintenance-hero.green{border-left-color:#cda505;background:rgba(205,165,5,.08)}.hub-maintenance-hero.amber{border-left-color:#838a95;background:rgba(131,138,149,.08)}.hub-maintenance-hero.red{border-left-color:#d79660;background:rgba(215,150,96,.08)}
.hub-maintenance-hero small{color:#78909a;letter-spacing:1px}.hub-maintenance-hero h2{margin:5px 0;font-size:27px}.hub-maintenance-hero p{margin:0;color:#95aab2}
.hub-maint-reasons{margin:14px 0;border:1px solid #3e4349;background:rgba(131,138,149,.08);border-radius:8px;padding:14px 16px}.hub-maint-reasons strong{color:#969ca5}.hub-maint-reasons ul{margin:9px 0 0;padding-left:20px;color:#aab9be}.hub-maint-reasons li{margin:5px 0}
.hub-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hub-service-row{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#0a171f;border:1px solid #233944;border-radius:7px;padding:11px 12px}.hub-service-row span{color:#91a6af;font-size:12px}.hub-service-row strong{font-size:12px}
.hub-maint-caption{color:#78909a;font-size:12px;margin-top:-3px}
@media(max-width:760px){.hub-service-grid{grid-template-columns:1fr}.hub-maintenance-hero{flex-direction:column}.hub-maintenance-card{padding:14px}}

/* Edge main-card win rate: keep four metrics readable as a 2x2 grid. */
.hub-strategy-card.edge .hub-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

.hub-metric-caption{grid-column:1/-1;color:#8da4af;font-size:12px;margin-top:-3px}
html.hub-starting #root, html:not(.hub-login):not(.hub-active) #root{visibility:hidden!important}

/* VPS root and research volume capacity monitor */
.hub-storage-card{margin-top:20px;background:#0d1d26;border:1px solid #29414c;border-radius:10px;padding:20px}
.hub-storage-card h2{margin:5px 0 0;font-size:22px}
.hub-storage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.hub-storage-disk{min-width:0;background:#0a171f;border:1px solid #233944;border-left:4px solid #cda505;border-radius:8px;padding:13px}
.hub-storage-disk.amber,.hub-storage-disk.unavailable{border-left-color:#838a95}
.hub-storage-disk.red{border-left-color:#d79660}
.hub-storage-disk-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.hub-storage-disk-head small{display:block;color:#8299a3;font-size:11px;margin-bottom:5px}
.hub-storage-disk-head strong{font-size:15px;line-height:1.35}
.hub-storage-pill{flex:0 0 auto;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:800;letter-spacing:.3px;white-space:nowrap}
.hub-storage-pill.green{background:rgba(205,165,5,.16);color:#f9cc19}
.hub-storage-pill.amber{background:rgba(131,138,149,.16);color:#969ca5}
.hub-storage-pill.red{background:rgba(215,150,96,.16);color:#e1ae85}
.hub-storage-pill.observing{background:rgba(79,158,219,.16);color:#6eaff0}
.hub-storage-track{height:8px;margin-top:13px;background:#172a33;border-radius:999px;overflow:hidden}
.hub-storage-track span{display:block;height:100%;background:#cda505;border-radius:999px}
.hub-storage-track span.amber{background:#838a95}.hub-storage-track span.red{background:#d79660}
.hub-storage-meta,.hub-storage-footnote{margin:9px 0 0;color:#8299a3;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.hub-storage-footnote{margin-top:12px}
@media(max-width:760px){.hub-storage-grid{grid-template-columns:1fr}.hub-storage-card{padding:14px}.hub-storage-disk-head{flex-wrap:wrap}}

/* Strategy Overview: three independent lanes and page controls. */
.hub-strategy-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.hub-strategy-card.live-edge{border-top-color:#979da6}
.hub-strategy-card .hub-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.hub-header-tools{display:flex;align-items:center;justify-content:flex-end;gap:18px;flex:0 0 auto}
.hub-page-actions{display:flex;align-items:center;gap:8px}
.hub-page-actions button{min-height:38px;border:1px solid #35515d;background:#15303c;color:#e8f1f2;border-radius:7px;padding:8px 13px;cursor:pointer;font-weight:700}
.hub-page-actions button:hover{background:#1c3b49}
.hub-page-actions button:disabled{opacity:.65;cursor:wait}
.hub-page-actions #hub-logout{border-color:#885022;background:#3f2510}
.hub-page-actions #hub-logout:hover{background:#573316}
@media(max-width:1200px){.hub-strategy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.hub-strategy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.hub-strategy-grid{grid-template-columns:1fr}}
@media(max-width:560px){
  .hub-header:not(:has(.hub-back)){flex-wrap:wrap;align-items:flex-start}
  .hub-header:not(:has(.hub-back))>div:first-of-type{width:100%}
  .hub-header-tools{width:100%;justify-content:space-between;gap:10px}
  .hub-page-actions{width:100%;justify-content:flex-end}
  .hub-page-actions button{min-height:40px}
}

/* Entry decision analysis — independently expandable evaluations. */
.hub-analysis-record{border:1px solid rgba(204,163,83,.33);border-radius:12px;margin:9px 0;background:rgba(12,12,12,.49);overflow:hidden}
.hub-analysis-record>summary{cursor:pointer;display:grid;grid-template-columns:minmax(135px,1fr) minmax(100px,1.25fr) minmax(110px,1.15fr);align-items:center;gap:12px;padding:15px 17px;list-style:none}
.hub-analysis-record>summary::-webkit-details-marker{display:none}
.hub-analysis-record>summary:before{content:'+';color:#d8af61;margin-right:6px}
.hub-analysis-record[open]>summary:before{content:'−'}
.hub-analysis-record>summary{grid-template-columns:18px minmax(120px,1fr) minmax(100px,1.3fr) minmax(110px,1.1fr)}
.hub-analysis-time{color:#c9c1b2;font-size:.91em}
.hub-analysis-decision{color:#e0c891}
.hub-analysis-body{border-top:1px solid rgba(204,163,83,.23);padding:10px 17px 16px}
.hub-analysis-factors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.hub-analysis-factors>div{display:flex;justify-content:space-between;gap:12px;background:rgba(255,255,255,.045);border-radius:8px;padding:10px}
.hub-analysis-yes{color:#d8b15b;font-weight:700}.hub-analysis-no{color:#e5a18b;font-weight:700}.hub-analysis-unknown{color:#b3b3b3;font-size:.9em}
@media(max-width:650px){.hub-analysis-record>summary{grid-template-columns:16px 1fr;gap:6px}.hub-analysis-decision{grid-column:2}.hub-analysis-factors{grid-template-columns:1fr}}

.hub-analysis-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hub-analysis-sides>section{min-width:0;border:1px solid rgba(204,163,83,.25);border-radius:9px;padding:9px}
.hub-analysis-sides h4{margin:2px 0 10px;color:#e1bb6d;letter-spacing:.07em}
.hub-analysis-sides .hub-analysis-factors{grid-template-columns:1fr}
.hub-analysis-factors small{display:block;color:#b3b0a8;font-size:.75em;line-height:1.25;margin-top:4px}
@media(max-width:650px){.hub-analysis-sides{grid-template-columns:1fr}}
