.investment-card {
 --investment-border: #202b38;
 --investment-text: #dce2ea;
 --investment-muted: #92a0b1;
 --investment-quiet: #778697;
 --investment-up: #10dfaa;
 --investment-down: #ff5377;
 container-type: inline-size;
 min-width: 0;
 border: 1px solid var(--investment-border);
 border-radius: 24px;
 background: #0d1218;
 color: var(--investment-text);
}

.investment-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 flex-wrap: wrap;
 gap: 14px 22px;
 height: auto;
 min-height: 84px;
 padding: 15px 23px;
 border: 0;
 background: transparent;
}

.investment-header h2 { margin: 0 0 3px; font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.investment-header p { margin: 0; color: var(--investment-muted); font-size: 14px; }
.investment-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; max-width: 100%; }
.investment-controls svg { width: 18px; height: 18px; flex: none; color: var(--investment-quiet); }

.investment-search, .investment-filters {
 display: flex;
 align-items: center;
 min-height: 39px;
 border: 1px solid var(--investment-border);
 border-radius: 999px;
}

.investment-search { gap: 9px; width: 224px; padding: 0 13px; background: #161d28; }
.investment-search:focus-within { border-color: var(--investment-up); }
.investment-search input {
 min-width: 0;
 width: 100%;
 padding: 0;
 border: 0;
 outline: 0;
 background: transparent;
 color: var(--investment-text);
 font: inherit;
}
.investment-search input::placeholder { color: var(--investment-quiet); }
.investment-filters { gap: 2px; padding: 3px 4px 3px 10px; background: #121923; }
.investment-filters > svg { width: 16px; height: 16px; margin-right: 3px; }
.investment-filters button {
 padding: 7px 11px;
 border: 0;
 border-radius: 999px;
 background: transparent;
 color: var(--investment-muted);
 font-size: 12px;
 font-weight: 600;
 white-space: nowrap;
}
.investment-filters button:hover, .investment-filters [aria-pressed="true"] { background: #0b1016; color: var(--investment-text); }

.investment-table { width: 100%; table-layout: fixed; font-variant-numeric: tabular-nums; }
.investment-table :is(th, td) { padding: 0 clamp(7px, 1.2cqw, 15px); border-top: 1px solid var(--investment-border); border-bottom: 0; }
.investment-table :is(th, td):first-child { padding-left: clamp(14px, 1.9cqw, 24px); text-align: left; }
.investment-table :is(th, td):last-child { padding-right: clamp(14px, 1.9cqw, 24px); }
.investment-table th {
 height: 42px;
 background: transparent;
 color: var(--investment-quiet);
 font-size: 12px;
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: .08em;
}
.investment-table th:nth-child(1) { width: 21%; }
.investment-table th:nth-child(2) { width: 9%; }
.investment-table th:nth-child(3) { width: 7%; }
.investment-table th:nth-child(4) { width: 11%; }
.investment-table th:nth-child(5) { width: 11%; }
.investment-table th:nth-child(6) { width: 10%; }
.investment-table th:nth-child(7) { width: 9%; }
.investment-table th:nth-child(8) { width: 9%; }
.investment-table th:nth-child(9) { width: 13%; }
.investment-table td { height: 67px; font-size: 15px; font-weight: 600; }
.investment-table :is(th, td):nth-child(2) { text-align: left; }
.investment-table td:nth-child(4), .investment-table td:nth-child(9) { color: var(--investment-muted); font-weight: 500; }

.investment-stocks, .investment-other { --investment-class: #09d8a7; }
.investment-funds { --investment-class: #748dff; }
.investment-fixed { --investment-class: #edb95b; }
.investment-international { --investment-class: #67b9f5; }

.investment-identity {
 display: flex;
 align-items: center;
 gap: clamp(7px, 1.1cqw, 14px);
 min-width: 0;
 max-width: 100%;
 padding: 0;
 border: 0;
 background: transparent;
 color: inherit;
 text-align: left;
}
button.investment-identity:hover strong { color: var(--investment-class); }
.investment-identity > svg { width: 15px; height: 15px; flex: none; opacity: 0; color: var(--investment-muted); }
.investment-identity:hover > svg, .investment-identity:focus-visible > svg { opacity: 1; }
.investment-symbol { display: flex; flex: none; }
.investment-symbol .asset-logo {
 width: 38px;
 height: 38px;
 border-radius: 11px;
 background: color-mix(in srgb, var(--investment-class) 9%, #0d1218);
 color: var(--investment-class);
}
.investment-weight-label, .investment-details-toggle { display: none; }
.investment-name { min-width: 0; }
.investment-name :is(strong, small) { display: block; overflow: hidden; text-overflow: ellipsis; }
.investment-name small { margin-top: 3px; color: var(--investment-quiet); font-size: 12px; font-weight: 400; }
.investment-badge {
 display: inline-block;
 padding: 3px 9px;
 border: 1px solid color-mix(in srgb, var(--investment-class) 32%, transparent);
 border-radius: 999px;
 background: color-mix(in srgb, var(--investment-class) 8%, transparent);
 color: var(--investment-class);
 font-size: 12px;
}
.investment-quote { display: grid; justify-items: end; gap: 3px; }
.investment-quote .investment-change { font-size: 13px; }
.investment-change { display: inline-flex; align-items: center; gap: 5px; }
.investment-change svg { width: 14px; height: 14px; flex: none; }
.investment-change.positive { color: var(--investment-up); }
.investment-change.negative { color: var(--investment-down); }
.investment-change.neutral, .investment-change.unavailable { color: var(--investment-muted); }
.investment-weight { display: flex; align-items: center; justify-content: flex-end; gap: clamp(7px, 1.5cqw, 20px); }
.investment-weight > span:last-child { white-space: nowrap; }
.investment-track { width: 65px; min-width: 20px; height: 7px; overflow: hidden; border-radius: 999px; background: #1a232f; }
.investment-track i { display: block; height: 100%; border-radius: inherit; background: var(--investment-class); }
.investment-table .investment-empty td { padding: 22px; color: var(--investment-muted); font-weight: 400; }
.investment-position-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

@container (max-width: 1030px) {
 .investment-table th { font-size: 10px; letter-spacing: .04em; }
 .investment-table td { font-size: 13px; }
 .investment-badge { padding-inline: 5px; white-space: normal; }
}

@container (max-width: 805px) {
 .investment-header { padding: 13px 12px; gap: 10px; }
 .investment-header p { font-size: 12px; }
 .investment-controls { width: 100%; }
 .investment-table, .investment-table tbody { display: block; min-width: 0; white-space: normal; }
 .investment-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .investment-table tbody tr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--investment-border);
 }
 .investment-table tbody td {
  display: block;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  text-align: left;
  overflow-wrap: anywhere;
 }
 .investment-table td:not(:first-child)::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 4px;
  color: var(--investment-quiet);
  font-size: 10px;
  font-weight: 500;
 }
 .investment-table tbody tr:hover { background: transparent; }
 .investment-table tbody td:first-child { grid-area: 1 / 1 / 2 / -1; padding: 0 76px 0 0; }
 .investment-table tbody td:last-child { grid-column: 1 / -1; padding: 0; }
 .investment-table td:nth-child(2) { grid-area: 1 / 3 / 2 / 4; align-self: center; justify-self: end; text-align: right; }
 .investment-table td:nth-child(2)::before,
 .investment-table td:nth-child(9)::before { display: none; }
 .investment-table td:nth-child(n+6):nth-child(-n+8) { grid-row: 2; }
 .investment-table td:nth-child(9) { grid-row: 3; }
 .investment-table td.investment-detail { grid-row: 4; }
 .investment-table tr:not([data-expanded]) .investment-detail { display: none; }
 .investment-identity { width: 100%; }
 .investment-symbol .asset-logo { width: 32px; height: 32px; border-radius: 9px; }
 .investment-name :is(strong, small) { white-space: nowrap; }
 .investment-identity > svg { margin-left: auto; opacity: 1; }
 .investment-quote { justify-items: start; }
 .investment-weight-row { display: flex; align-items: center; gap: 7px; min-height: 32px; }
 .investment-weight-label { display: inline; color: var(--investment-quiet); font-size: 11px; }
 .investment-weight { justify-content: flex-start; }
 .investment-track { width: 45px; height: 5px; }
 .investment-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 32px;
  margin-left: auto;
  padding: 0 1px 0 10px;
  border: 0;
  background: transparent;
  color: var(--investment-muted);
  font-size: 12px;
 }
 .investment-details-toggle svg { width: 15px; height: 15px; }
 .investment-details-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
 .investment-table .investment-empty td { grid-area: auto / 1 / auto / -1; padding: 0; }
}

@container (max-width: 540px) {
 .investment-search { width: 100%; }
 .investment-filters { width: 100%; justify-content: space-between; gap: 0; padding: 2px 3px; }
 .investment-filters > svg { display: none; }
 .investment-filters button { padding: 4px clamp(2px, 1cqw, 6px); min-height: 32px; font-size: clamp(10px, 3.15cqw, 12px); }
}
