.expandable-card {
  position: relative;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.expandable-card:focus-visible { outline:2px solid rgba(84,224,180,.6); outline-offset:3px; }
.expandable-card .expand-card-button { display:none!important; }
.card-actions { display:flex; gap:7px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.expand-hint { margin:12px 0 0; color:var(--muted); font-size:10px; line-height:1.35; letter-spacing:.015em; }
.expandable-card:not(.is-expanded) .expand-detail { display:none; }

.expandable-card.is-expanded {
  position:fixed; z-index:1001;
  inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  width:auto; max-width:760px; max-height:calc(100% - 24px); margin:auto; overflow-y:auto; cursor:default;
  border-color:rgba(84,224,180,.32); box-shadow:0 28px 100px rgba(0,0,0,.62); animation:card-lift .2s ease-out;
}
.expandable-card.is-expanded .expand-detail { display:block; }
.expandable-card.is-expanded .expand-hint { display:none; }

.card-backdrop { position:fixed; inset:0; z-index:1000; background:rgba(0,8,6,.72); backdrop-filter:blur(8px); animation:backdrop-in .18s ease-out; }
.card-close-bar { display:flex; justify-content:flex-end; align-items:center; width:100%; min-height:36px; margin:0 0 14px; padding:0; flex:0 0 auto; }
.card-close-button {
  position:static!important; z-index:auto!important; display:flex!important; align-items:center!important; justify-content:center!important; float:none!important;
  width:58px!important; height:32px!important; min-width:58px!important; min-height:32px!important; max-width:58px!important; max-height:32px!important;
  margin:0!important; padding:0!important; border:1px solid rgba(255,255,255,.08)!important; border-radius:9px!important;
  background:rgba(7,22,18,.94)!important; color:var(--muted)!important; font-size:11px!important; font-weight:750!important; line-height:1!important; letter-spacing:.02em!important; box-shadow:none!important; flex:0 0 auto!important;
}
.card-close-button:hover,.card-close-button:focus-visible { color:var(--text)!important; background:rgba(18,42,34,.96)!important; border-color:rgba(104,222,185,.18)!important; outline:none; }
#ownershipBadge { display:none!important; }
body.card-open { overflow:hidden; }
.expandable-card.is-expanded .home-stats,.expandable-card.is-expanded .ownership-legend,.expandable-card.is-expanded .interest-box,.expandable-card.is-expanded #dealForecast { animation:detail-in .2s ease-out; }

@keyframes card-lift { from{opacity:.7;transform:scale(.97) translateY(8px)} to{opacity:1;transform:scale(1) translateY(0)} }
@keyframes backdrop-in { from{opacity:0} to{opacity:1} }
@keyframes detail-in { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }
@media (hover:hover) and (pointer:fine){ .expandable-card:not(.is-expanded):hover{ transform:translateY(-2px); border-color:rgba(84,224,180,.22); box-shadow:0 28px 78px rgba(0,0,0,.25); } }
@media (max-width:650px){
  .card-actions{justify-content:flex-start}
  .expandable-card.is-expanded{inset:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));max-height:calc(100% - 16px);border-radius:22px}
  .card-close-bar{min-height:32px;margin-bottom:12px}
  .card-close-button{width:54px!important;min-width:54px!important;max-width:54px!important;height:30px!important;min-height:30px!important;max-height:30px!important;font-size:10px!important}
}
@media (prefers-reduced-motion:reduce){ .expandable-card,.card-backdrop,.expandable-card.is-expanded .home-stats,.expandable-card.is-expanded .ownership-legend,.expandable-card.is-expanded .interest-box,.expandable-card.is-expanded #dealForecast{animation:none;transition:none} }
