#dashboard .stock-home-card{
  display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;
  margin-top:12px;padding:14px;border:1px solid #ffffff5c;border-radius:12px;
  background:#eaf2eb;color:#173e30;text-align:left;
}
.stock-home-card span,.stock-home-card small{grid-column:1}
.stock-home-card strong{grid-column:2;grid-row:1/3;font-size:clamp(16px,4vw,21px)}
.stock-home-card small{color:#436657;font-weight:500}
#stocks [hidden]{display:none!important}
#stocks .stock-hero{background:#174735;color:white;border:0}
.stock-heading,.stock-market-footer{display:flex;justify-content:space-between;align-items:center;gap:10px}
.stock-heading h2{margin:2px 0 0}
.stock-heading small{color:#cee5db}
#stocks .stock-hero .primary{background:#e2f4c9;color:#163e2e}
.stock-heading button,.stock-market-footer button{min-height:44px;padding:8px 10px}
.stock-heading button,.stock-market-footer button{flex-shrink:0}
.stock-value{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;padding:16px 0 12px}
.stock-value strong{font-size:clamp(24px,6vw,38px)}
.stock-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.stock-metrics div{background:#ffffff14;border-radius:10px;padding:9px 10px;min-width:0}
.stock-metrics div:last-child{grid-column:1/-1}
.stock-metrics span,.stock-metrics strong{display:block;overflow-wrap:anywhere}
.stock-metrics span,.stock-market-footer p,.stock-summary-note{font-size:14px;color:#e4f1ea}
.stock-metrics strong{font-size:clamp(15px,4vw,19px);margin-top:3px}
.stock-gain{color:#a02249}
.stock-loss{color:#087252}
.stock-hero .stock-gain{color:#ffd2df}
.stock-hero .stock-loss{color:#a5efc7}
.stock-summary-note{margin:9px 0}
.stock-market-footer{border-top:1px solid #ffffff38;padding-top:9px}
.stock-market-footer p{margin:0}
.stock-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:12px}
.stock-tabs button{min-height:44px;background:#fff;border:1px solid #d3e3d9;padding:6px}
.stock-tabs button[aria-pressed=true]{background:#214f40;color:white;border-color:#214f40}
.stock-holdings{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(245px,100%),1fr));gap:9px}
.stock-holding{padding:12px;border:1px solid #d3e3d9;border-radius:12px;background:#f4f8f4}
.stock-holding header,.stock-holding div{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:3px 0}
.stock-holding header{border-bottom:1px solid #d3e3d9;padding-bottom:7px;margin-bottom:5px}
.stock-holding header span{flex-shrink:0}
.stock-holding small,.stock-trade small{display:block;margin-top:4px;color:#51695c}
.stock-holding span,.stock-trade small{font-size:14px}
.stock-trade{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px 0;border-bottom:1px solid #d3e3d9}
.stock-trade:last-child{border-bottom:0}
.stock-trade div:first-child{overflow-wrap:anywhere}
.stock-calendar-controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:end;gap:8px}
.stock-calendar-controls button{padding:4px;min-height:44px;font-size:23px}
.stock-calendar-controls label{margin:0}
.stock-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin:8px 0 14px}
.stock-calendar>span{font-size:13px;text-align:center;padding-bottom:4px}
.stock-calendar button{padding:4px 1px;min-height:48px;min-width:0;background:#f2f6f2;border-radius:7px;font-size:14px}
.stock-calendar button[aria-pressed=true]{outline:2px solid #28604b;outline-offset:-2px}
.stock-calendar button small{display:block;font-size:12px;line-height:1.15;overflow-wrap:anywhere}
.stock-change-total{font-weight:750}
.stock-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
#stocks form label{margin:0;font-size:14px}
#stocks form :is(input,select){min-height:44px;padding:7px 8px;font-size:16px}
#stock-dialog{padding:clamp(10px,3vw,24px);max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px)}
#stock-dialog .stock-heading{margin-bottom:8px}
#stock-dialog form{gap:9px}
#stock-dialog input{margin-top:2px}
.stock-entry-total{font-weight:750}
.stock-entry-total:empty,#stock-reference-tip:empty,#stockestimate:empty,#stock-month-status:empty,#stock-plan-status:empty{display:none}
#stock-estimate-details{padding:7px 9px;background:#eef5ee;border-radius:9px}
#stock-estimate-details summary{cursor:pointer}
#stocks form .stock-check{display:flex;align-items:center;gap:7px;margin-top:5px}
#stocks form .stock-check input{min-height:22px}
#stock-plan-form>button,#stock-save{width:100%;min-height:44px}
.stock-plan-row button{padding:6px;min-height:44px}
@media(min-width:620px){
  .stock-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
  .stock-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
