/* Phase 3: personalized market workspaces and always-available mobile utility header. */
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-hero,
.gm-redesign-shell[data-market-page=portfolio] .iw-page-hero,
.gm-redesign-shell[data-market-page=alerts] .iw-page-hero,
.gm-redesign-shell[data-market-page=compare] .iw-collection-header-copy{
  border:1px solid rgba(185,158,107,.2);border-radius:18px;
  background:radial-gradient(circle at 95% 0%,rgba(146,112,68,.16),transparent 55%),linear-gradient(145deg,#302417,#1c1611);
  padding:clamp(20px,2.5vw,32px);margin:18px 0 16px;
}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-hero h1,
.gm-redesign-shell[data-market-page=portfolio] .iw-page-hero h1,
.gm-redesign-shell[data-market-page=alerts] .iw-page-hero h1{
 font-size:clamp(28px,3.2vw,43px);letter-spacing:-1.1px;line-height:1.12;margin:10px 0;
}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-hero p,
.gm-redesign-shell[data-market-page=portfolio] .iw-page-hero p,
.gm-redesign-shell[data-market-page=alerts] .iw-page-hero p{
 max-width:66ch;color:#c9b692;font-size:13px;line-height:1.65;
}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-card-toolbar,
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-intro,
.gm-redesign-shell[data-market-page=compare] .iw-compare-workbench-head{gap:16px}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-card-toolbar{
 border:1px solid rgba(185,160,113,.18);border-radius:15px;padding:15px 17px;
 background:rgba(39,30,19,.75);margin:0 0 17px;
}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-card-grid{gap:15px}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-chart-card{
 border:1px solid rgba(181,154,105,.2);border-radius:16px;
 background:linear-gradient(150deg,#2e2316,#211910);
 min-width:0;overflow:hidden;
}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-chart-card canvas{max-width:100%}
.gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-search-panel{
 background:#2e2316;border:1px solid rgba(197,169,116,.28);border-radius:15px;padding:16px;margin:0 0 17px;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
 padding:12px;margin:0 0 16px;border-radius:17px;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary>div{
 min-width:0;border:1px solid rgba(185,160,113,.18);background:#231b11;
 border-radius:12px;padding:clamp(13px,2vw,22px);display:flex;flex-direction:column;justify-content:space-between;gap:10px;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary span{
 font-size:11px;color:#c5b08a;text-transform:uppercase;letter-spacing:.75px;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary strong{
 font-size:clamp(19px,2.4vw,29px);line-height:1.2;letter-spacing:-.6px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-feature-panel{
 padding:clamp(16px,2.3vw,27px);border-radius:17px;margin-bottom:15px;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-feature-panel h2{font-size:21px;margin:6px 0 13px}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-form{gap:11px}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-form input{
 min-height:45px;border:1px solid #6f593c;border-radius:10px;background:#1f170f;color:#fbf8f4;padding:10px 12px;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-table-scroll{
 max-width:100%;overflow-x:auto;scrollbar-width:thin;
}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-table{width:100%;min-width:780px}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-table td{font-variant-numeric:tabular-nums}
.gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-table th{
 color:#c7c0b2;font-size:11px;text-transform:uppercase;letter-spacing:.6px;
}
.gm-redesign-shell[data-market-page=alerts] .iw-dedicated-card,
.gm-redesign-shell[data-market-page=alerts] .iw-notifications-panel{
 border-radius:17px;overflow:hidden;margin:0 0 16px;
}
.gm-redesign-shell[data-market-page=alerts] .iw-alerts-head{padding:19px 20px}
.gm-redesign-shell[data-market-page=alerts] .iw-alerts-head h2{font-size:20px;letter-spacing:-.4px}
.gm-redesign-shell[data-market-page=alerts] .iw-alerts-body{padding:18px}
.gm-redesign-shell[data-market-page=alerts] .iw-alert-builder{
 border:1px solid rgba(182,155,106,.22);border-radius:15px;
 background:linear-gradient(145deg,#322618,#241b11);padding:18px;
}
.gm-redesign-shell[data-market-page=alerts] .iw-alert-fields{gap:11px}
.gm-redesign-shell[data-market-page=alerts] .iw-alert-fields :is(input,select),
.gm-redesign-shell[data-market-page=alerts] .iw-alert-item-picker select{
 min-height:44px;border-radius:10px;background:#1b1510;border:1px solid #675237;color:#f8f4ed;
}
.gm-redesign-shell[data-market-page=alerts] .iw-alert-row,
.gm-redesign-shell[data-market-page=alerts] .iw-notification-row{
 border:1px solid rgba(182,156,107,.2);border-radius:12px;background:#221a10;padding:14px;
}
.gm-redesign-shell[data-market-page=alerts] .iw-alert-list,
.gm-redesign-shell[data-market-page=alerts] .iw-notification-history{display:grid;gap:10px}
.gm-redesign-shell[data-market-page=alerts] .iw-notification-toolbar{padding:14px 18px}
.gm-redesign-shell[data-market-page=compare] .iw-compare-topbar .iw-collection-header-copy{
 margin:0 0 4px;padding:17px 21px;min-width:0;flex:1;
}
.gm-redesign-shell[data-market-page=compare] .iw-collection-header-copy h1{
 font-size:clamp(23px,3.4vw,36px);line-height:1.18;letter-spacing:-.7px;
}
.gm-redesign-shell[data-market-page=compare] .iw-compare-workbench{
 border-radius:18px;padding:clamp(15px,2.2vw,26px);margin-top:15px;overflow:hidden;
}
.gm-redesign-shell[data-market-page=compare] .iw-compare-workbench-head h2{font-size:22px}
.gm-redesign-shell[data-market-page=compare] .iw-compare-search-wrap{width:100%;max-width:650px}
.gm-redesign-shell[data-market-page=compare] #compareSearch{
 min-height:47px;border-radius:11px;background:#1c1611;border:1px solid #6f583b;
}
.gm-redesign-shell[data-market-page=compare] .iw-compare-toolbar{gap:13px;margin-top:17px}
.gm-redesign-shell[data-market-page=compare] .iw-compare-ranges{
 display:flex;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;
}
.gm-redesign-shell[data-market-page=compare] .iw-compare-ranges::-webkit-scrollbar{display:none}
.gm-redesign-shell[data-market-page=compare] .iw-compare-ranges .mw-range{flex:0 0 auto;min-height:38px}
.gm-redesign-shell[data-market-page=compare] .iw-compare-chart-wrap{height:clamp(300px,36vw,520px)}
.gm-redesign-shell[data-market-page=compare] .iw-compare-legend{gap:8px}
@media(max-width:760px){
 /* Keep the mobile header in normal document flow so it scrolls away. */
 body.gm-redesign-shell .iw-topbar.gm-header{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;
  width:auto!important;margin:0 -14px!important;
  z-index:44!important;height:auto!important;min-height:66px;
  display:flex!important;padding:10px 14px!important;
  background:rgba(21,17,13,.97)!important;
  border-bottom:1px solid rgba(184,159,111,.23)!important;
  box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;
 }
 body.gm-redesign-shell .iw-workspace{padding-top:0!important}
 body.gm-redesign-shell .gm-mobile-search{margin-left:auto}
 body.gm-redesign-shell .gm-authbar{flex:0 0 auto}
 body.gm-redesign-shell .gm-authbar .mw-btn{font-size:clamp(10px,2.7vw,12px);padding:8px 10px;max-width:150px;white-space:nowrap}
 .gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-hero,
 .gm-redesign-shell[data-market-page=portfolio] .iw-page-hero,
 .gm-redesign-shell[data-market-page=alerts] .iw-page-hero{padding:17px 16px;margin:12px 0}
 .gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-hero h1,
 .gm-redesign-shell[data-market-page=portfolio] .iw-page-hero h1,
 .gm-redesign-shell[data-market-page=alerts] .iw-page-hero h1{font-size:29px}
 .gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-hero p,
 .gm-redesign-shell[data-market-page=portfolio] .iw-page-hero p,
 .gm-redesign-shell[data-market-page=alerts] .iw-page-hero p{font-size:12px}
 .gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-card-toolbar{padding:12px}
 .gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-card-grid{gap:10px}
 .gm-redesign-shell[data-market-page=watchlist] .iw-watchlist-chart-card{border-radius:13px}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:9px;gap:8px}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary>div{padding:14px 11px;gap:7px}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary>div:nth-child(2){grid-column:auto}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary>div:last-child{grid-column:1/-1}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary strong{font-size:clamp(20px,5.6vw,27px)}
 .gm-redesign-shell[data-market-page=portfolio] .iw-feature-panel{padding:15px}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-form label:first-of-type{grid-column:1/-1}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-form label{min-width:0}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-form input{width:100%}
 .gm-redesign-shell[data-market-page=portfolio] .iw-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
 .gm-redesign-shell[data-market-page=alerts] .iw-alerts-head{padding:14px}
 .gm-redesign-shell[data-market-page=alerts] .iw-alerts-body{padding:10px}
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-builder{padding:12px}
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-fields .iw-alert-threshold,
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-fields>button{grid-column:1/-1}
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-fields label{min-width:0}
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-fields :is(input,select){width:100%}
 .gm-redesign-shell[data-market-page=alerts] .iw-alert-selected-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .gm-redesign-shell[data-market-page=alerts] .iw-notification-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:12px}
 .gm-redesign-shell[data-market-page=alerts] .iw-notification-toolbar>div{display:flex;flex-wrap:wrap;gap:6px}
 .gm-redesign-shell[data-market-page=alerts] .iw-notification-row{padding:12px}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-topbar{gap:8px}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-topbar .iw-collection-header-copy{display:none!important}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-workbench{padding:13px;margin-top:12px}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-workbench-head{gap:11px}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-workbench-head h2{font-size:20px}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-toolbar-groups{gap:9px}
 .gm-redesign-shell[data-market-page=compare] .iw-compare-chart-wrap{height:330px;min-height:260px}
}
@media(max-width:390px){
 body.gm-redesign-shell .iw-topbar.gm-header{gap:7px!important;padding-left:9px!important;padding-right:9px!important}
 body.gm-redesign-shell .gm-authbar .mw-btn{padding:8px;font-size:11px}
 .gm-redesign-shell[data-market-page=portfolio] .iw-portfolio-summary strong{font-size:19px}
}

/* Keep per-rule delivery controls together on narrow alert cards. */
.iw-alert-delivery-controls{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.iw-alert-delivery-controls .iw-alert-toggle{min-height:44px;white-space:nowrap}
.iw-alert-email-choice{display:flex;align-items:center;gap:10px;margin:14px 0 6px;min-height:44px;font-size:13px;line-height:1.5;cursor:pointer}
.iw-alert-email-choice input,.iw-alert-delivery-controls input{width:18px;height:18px;accent-color:#dea742;flex:none}
@media(max-width:720px){.iw-alert-delivery-controls{grid-column:1/-1}.iw-alert-delivery-controls .iw-alert-toggle{grid-column:auto;grid-row:auto}}
