/* BHC Signaalikone 5.6.3 · Stable UI + chart ranges */
:root{--red:#c94e59;--red2:#e76570}
.primary{background:linear-gradient(135deg,#d85a65,#92313a)!important}
.primary:hover{filter:brightness(.98)}
.menu-route-lab-last{margin-top:4px;border-top-color:#4a3d4f!important}
.market-icon-svg{background:#111015}

/* Strategy rules stay out of the way until requested. */
.strategy-lab-fold{margin-top:14px;border:1px solid #39323f;border-radius:24px;background:rgba(17,14,21,.72);overflow:hidden}
.strategy-lab-fold>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:18px 20px;min-height:82px}
.strategy-lab-fold>summary::-webkit-details-marker{display:none}.strategy-lab-fold>summary>div{min-width:0}.strategy-lab-fold>summary strong{display:block;margin-top:5px;font-size:19px;letter-spacing:-.025em}.strategy-lab-fold>summary small{display:block;margin-top:4px;color:#817987;font-size:9px}.strategy-lab-fold[open]>summary{border-bottom:1px solid #2c2631}.strategy-lab-fold[open] .fold-action::after{content:' Sulje'}.strategy-lab-fold[open] .fold-action{font-size:0}.strategy-lab-fold[open] .fold-action::after{font-size:9px}.strategy-lab-fold>.strategy-lab{margin:0!important;border:0!important;border-radius:0!important}

/* Chart resolution and visible time range are separate concepts. */
.chart-time-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.range-picker{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid #2d2732;border-radius:13px;background:#0a080d}.range-picker>span{padding:0 5px;color:#6f6774;font-size:7px;font-weight:850;letter-spacing:.1em}.range-picker button{border:0;border-radius:9px;padding:8px 9px;background:transparent;color:#918895;font-size:8px;font-weight:850}.range-picker button.active{background:#2a2330;color:#fff}.chart-toolbar{align-items:flex-start}.chart-live{padding-top:9px;min-height:30px}

/* Best signal card keeps a stable shape even when the highlighted asset changes. */
.best-card{grid-template-columns:minmax(0,1fr) minmax(230px,280px)!important;align-items:stretch!important;min-height:310px!important;height:auto!important;overflow:hidden!important}
.best-copy{display:grid;grid-template-rows:auto minmax(58px,auto) minmax(52px,auto) minmax(54px,auto) auto;align-content:start;min-width:0}
.best-copy h2{min-height:58px!important;max-height:none!important}.best-copy>p{min-height:52px!important;max-height:none!important}.plain-facts{min-height:54px!important;max-height:76px!important;overflow:hidden!important;align-content:flex-start}.best-actions{align-self:end}
.best-status-panel{align-self:stretch;display:grid;grid-template-rows:1fr 1fr;gap:10px;min-width:0}.best-status-panel>div{display:grid;align-content:center;padding:18px;border:1px solid #3a3340;border-radius:22px;background:#141018;min-width:0}.best-status-panel span{font-size:8px;color:#817889;letter-spacing:.14em}.best-status-panel strong{font-size:32px;letter-spacing:-.04em;margin-top:7px}.best-status-panel small{font-size:11px;line-height:1.5;color:#a59cab;margin-top:7px;overflow-wrap:anywhere}

/* Why cards are throttled in JS; these rows remove the remaining layout pulse. */
.why-card{display:grid;grid-template-rows:auto minmax(38px,auto) minmax(58px,auto) 1fr;align-content:start;min-height:330px;contain:layout paint}.why-card h2{min-height:38px}.why-card>p{min-height:58px}.why-card .reason-list{align-content:start}

@media(max-width:760px){
 .chart-toolbar{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}.chart-time-controls{display:grid!important;gap:7px!important}.time-picker,.range-picker{width:100%!important}.range-picker{display:grid!important;grid-template-columns:auto repeat(3,1fr)!important}.range-picker>span{align-self:center;text-align:center}.range-picker button{padding:9px 5px!important}.chart-live{padding:2px 4px 0!important}
 .strategy-lab-fold{border-radius:22px}.strategy-lab-fold>summary{padding:16px;min-height:78px}.strategy-lab-fold>summary strong{font-size:18px}.strategy-lab-fold>summary small{font-size:9px;line-height:1.35}
 .best-card{grid-template-columns:1fr!important;gap:14px!important;min-height:0!important;padding:20px!important;overflow:visible!important}.best-copy{grid-template-rows:auto auto auto auto auto!important}.best-copy h2{font-size:clamp(31px,8.7vw,42px)!important;line-height:1.02!important;min-height:0!important}.best-copy>p{min-height:0!important;font-size:14px!important;line-height:1.55!important}.plain-facts{min-height:0!important;max-height:none!important;display:grid!important;grid-template-columns:1fr!important}.plain-fact{white-space:normal!important;line-height:1.35!important}.best-status-panel{grid-template-columns:1fr 1fr!important;grid-template-rows:auto!important}.best-status-panel>div{min-height:118px!important;padding:16px!important}.best-status-panel strong{font-size:29px!important}.best-status-panel small{font-size:11px!important}
 .why-card{min-height:390px!important;grid-template-rows:auto minmax(40px,auto) minmax(72px,auto) 1fr!important}.why-card h2{min-height:40px!important}.why-card>p{min-height:72px!important}.why-card .reason-list{min-height:154px!important}
 .asset-chip .market-icon-svg{width:20px;height:20px}
}
@media(max-width:420px){.best-status-panel{grid-template-columns:1fr!important}.best-status-panel>div{min-height:100px!important}.why-card{min-height:410px!important}}

/* Final anti-jitter pass: cards keep their footprint while content refreshes. */
@media(min-width:761px){
  .why-card{height:360px!important;overflow:hidden!important}
  .why-card .reason-list{overflow:auto;min-height:0}
}
@media(max-width:760px){
  .why-card{height:420px!important;min-height:420px!important;overflow:hidden!important}
  .why-card .reason-list{overflow:auto!important;min-height:0!important;padding-right:3px}
  .best-copy .plain-facts{min-height:0!important;max-height:none!important;grid-template-rows:none!important;grid-auto-rows:auto!important;align-content:start!important;overflow:visible!important}
  .best-copy .plain-fact{min-height:46px!important;display:flex!important;align-items:center!important}
}
