body:has(.my-assets) {
  background: color-mix(in srgb, var(--inset) 72%, var(--panel));
}

.my-assets {
  --asset-action: #007b71;
  --asset-teal: var(--brand, #007b71);
  --asset-mint: color-mix(in srgb, var(--asset-teal) 11%, var(--panel));
  --asset-surface: color-mix(in srgb, var(--panel) 68%, var(--inset));
  --asset-shadow: 0 3px 14px #152e4508;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 0 54px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.assets-intro {
  max-width: 620px;
  margin: 0 auto 25px;
  text-align: center;
}

.my-assets .assets-intro h1 {
  font-family: var(--f-brand);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.15;
  margin: 0 0 9px;
}

.my-assets .assets-intro p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

.assets-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 9px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--asset-shadow);
}

.assets-tabs, .assets-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.assets-tabs {
  padding: 4px;
  background: var(--inset);
  border-radius: 11px;
}

.assets-toolbar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.assets-tabs a[aria-current] {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 1px 4px #132b4220;
  color: var(--ink);
}

.assets-toolbar a[aria-current] svg,
.assets-tools a svg {
  color: var(--asset-teal);
}

.assets-toolbar a:not([aria-current]):hover {
  background: var(--asset-surface);
  color: var(--ink);
}

.assets-toolbar a:focus-visible,
.my-assets :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--asset-teal);
  outline-offset: 2px;
}

.my-assets .btn.primary {
  background: var(--asset-action);
  border-color: var(--asset-action);
  color: #fff;
  min-height: 44px;
  font-size: 14px;
}

.assets-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(275px, 31%);
  gap: 16px;
  align-items: start;
}
.assets-columns[data-alerts-open=false] { grid-template-columns: minmax(0, 1fr); }

.assets-list,
.assets-add {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--asset-shadow);
}

.assets-list > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 19px 20px;
}

.my-assets .assets-list > header h2 {
  margin: 0 0 4px;
  font-size: 19px;
  letter-spacing: -.02em;
}

.my-assets .assets-list > header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.assets-list .assets-total strong {
  margin-left: 4px;
  font-size: 21px;
  color: var(--ink);
}

.assets-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.assets-list-actions > a { min-height: 44px; display: inline-flex; align-items: center; }

.assets-example {
  margin-inline-start: 6px;
  display: inline-block;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--inset);
  font-size: 11px;
  font-weight: 600;
}

.assets-add {
  display: flex;
  gap: 12px;
  align-items: end;
  padding: 16px 19px;
  margin-bottom: 14px;
}

.assets-add > div {
  flex: 1;
  min-width: 0;
}

.assets-add label,
.assets-filters label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
}

.my-assets input,
.my-assets select {
  color: var(--ink);
  background: var(--panel);
}

.assets-search {
  position: relative;
}

.assets-search svg {
  position: absolute;
  top: 13px;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.assets-add input,
.assets-filters input,
.assets-filters select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}

.assets-search input {
  padding-left: 37px;
}

.my-assets #assets-watch-message {
  margin: -8px 0 12px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.my-assets #assets-watch-message:empty {
  margin: 0;
  padding: 0;
}

.assets-filters {
  padding: 0 20px 10px;
}

.assets-filters > summary {
  min-height: 38px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--asset-teal);
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}

.assets-filters > summary::-webkit-details-marker {
  display: none;
}

.assets-filters[open] > summary {
  margin-bottom: 8px;
}

.assets-filters form {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  align-items: end;
}

.assets-filters form label {
  flex: 1 1 100px;
  min-width: 0;
}

.assets-filters form label:first-of-type {
  flex-basis: 150px;
}

.assets-table-wrap {
  min-width: 0;
  overflow: auto;
  border-radius: 0 0 18px 18px;
}

.assets-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.4;
}

.assets-table th,
.assets-table td {
  padding: 12px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.assets-table thead th {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--asset-surface);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.assets-table :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(4)) {
  text-align: right;
}

.assets-table th:first-child {
  padding-left: 20px;
}

.assets-table tr:last-child > * {
  border-bottom: 0;
}

.assets-table tr[data-selected] {
  background: var(--asset-mint);
}

.assets-table small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.assets-table .ai-score small {
  display: inline;
  font-size: 10px;
}

.assets-table b {
  font-weight: 720;
}

.assets-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.assets-identity span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.assets-identity > span:last-child {
  display: grid;
  gap: 2px;
}

.assets-identity > :is(.lt,.logo-init) {
  flex: 0 0 auto;
}

.assets-identity small {
  font-weight: 500;
}

.assets-table .negative {
  color: var(--down);
}

.assets-table .positive {
  color: var(--up);
}

/* Price status: the lists' style (share-discovery.css .share-table .zone-label, live 22 Nov): a dot and a dark word, no box */
.assets-table .zone-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: normal;
  text-wrap: balance;
}

.assets-table .zone-label i {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  box-shadow: none;
}

.assets-table .zone-label.sale i { background: var(--zone-sale); }
.assets-table .zone-label.value i { background: var(--zone-value); }
.assets-table .zone-label.trend-up i { background: #20a362; }
.assets-table .zone-label.trend-down i { background: #e34b5d; }
.assets-table .zone-label.discount i { background: linear-gradient(90deg, #20a362 50%, transparent 50%); box-shadow: inset 0 0 0 2px #20a362; }
.assets-table .zone-label.below i { background: #9c72dd; }
.assets-table .zone-label.ordinary { color: var(--muted); font-weight: 500; }
.assets-table .zone-label.ordinary i { height: 1.5px; border-radius: 1px; background: #a9b5c3; }
.assets-table .zone-label svg { width: 12px; height: 12px; color: var(--muted); }

.assets-table .zone-sub,
.assets-table .archive-date {
  position: relative;
  display: block;
  margin-top: 3px;
  padding-left: 19px;
  font-size: 12px;
  line-height: 15px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.assets-table .zone-sub svg {
  position: absolute;
  left: 0;
  top: 2px;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #d6455a;
  stroke-width: 2.6;
}

/* Market price: the price alone, bold, with its date small under it. The live-quote line (live-quotes.js) is one small
   grey line; "today's close is not in yet" is a small clock (hover for the words). */
.assets-table td[data-label="Market price"] {
  white-space: nowrap;
}

.assets-table td[data-label="Market price"] .lq-row {
  margin-top: 3px;
  color: var(--muted);
}

.assets-table td[data-label="Market price"] .lq-line {
  justify-content: flex-end;
  gap: 2px 6px;
  font-size: 12px;
}

.assets-table td[data-label="Market price"] .lq-label,
.assets-table td[data-label="Market price"] .lq-value,
.assets-table td[data-label="Market price"] .lq-change {
  font-size: 12px;
  font-weight: 600;
}

.assets-table td[data-label="Market price"] .lq-meta {
  margin: 0;
  font-size: 12px;
  opacity: 1;
}

/* No saved price (an index): the live close is the price, so it looks like the others and the dash goes */
.assets-table td[data-label="Market price"]:has(.lq-row:not([hidden]) .lq-value) > .assets-missing {
  display: none;
}

.assets-table td[data-label="Market price"] > .assets-missing ~ .lq-row {
  margin-top: 0;
  color: var(--ink);
}

.assets-table td[data-label="Market price"] > .assets-missing ~ .lq-row .lq-label:has(+ .lq-value) {
  display: none;
}

.assets-table td[data-label="Market price"] > .assets-missing ~ .lq-row .lq-value {
  font-size: 14px;
  font-weight: 720;
}

.assets-table td[data-label="Market price"] > .assets-missing ~ .lq-row .lq-meta {
  color: var(--muted);
}

.assets-table td[data-label="Market price"] .lq-state:not(:has(time)) {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  font-size: 0;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--muted);
  cursor: help;
}

.assets-table td[data-label="Market price"] .lq-line:has(.lq-state:not(:has(time))):hover::after {
  content: "Today’s close is not in yet";
  position: absolute;
  right: 0;
  z-index: 3;
  margin-top: 20px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--asset-shadow);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.assets-table td[data-label="Market price"] .lq-line { position: relative; }

/* Conditions met: "9/9" on one line, its nine dots filled left to right as a count bar */
.assets-table .pm-cm { justify-items: end; }
.assets-table .pm-cm-n { white-space: nowrap; }
.assets-table .pm-cm-n small { display: inline; }
.assets-table .pm-dots i.on { order: -1; }
.assets-table .pm-dots i.nodata { order: 1; }

.assets-alert-link,
.assets-remove-cell button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

/* "Set alerts" and "2 on" (no-pills, Jason 22 Nov): plain words with the bell, no capsule. Alerts on: a solid teal dot
   and the count in dark ink, like the price-status column. None yet: a quiet link. The one open below is underlined. */
.assets-alert-link {
  min-height: 32px;
  min-width: 92px;
  justify-content: flex-start;
  padding: 0;
  white-space: nowrap;
  font-size: 13px;
}

.assets-alert-link:hover span {
  color: var(--asset-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.assets-alert-link[data-active] {
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.assets-alert-link[data-active] svg {
  display: none;
}

.assets-alert-link[data-active]::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--asset-teal);
}

.assets-alert-link[aria-current] span {
  color: var(--asset-teal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.assets-alert-link svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.assets-remove-cell button {
  min-width: 44px;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.assets-remove-cell button:hover {
  background: var(--hover);
  border-color: var(--line-strong);
}

.assets-alerts {
  min-width: 0;
  scroll-margin-top: calc(var(--bar-h) + 12px);
}

.assets-empty {
  padding: 38px 20px 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}

/* no-pills: the empty-state icon stands bare and a little larger, no tinted box (the Linear/Stripe empty state) */
.assets-empty-icon {
  display: inline-grid;
  place-items: center;
  color: var(--asset-teal);
}

.assets-empty-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.6;
}

.my-assets .assets-empty h3 {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 18px;
}

.my-assets .assets-empty p {
  margin: 0 auto 14px;
  font-size: 14px;
}

.assets-missing,
.my-assets .assets-price-note {
  color: var(--muted);
}

.my-assets .assets-price-note {
  margin: 16px 0 0;
  font-size: 13px;
}

.my-assets dialog {
  width: min(420px, calc(100% - 30px));
  padding: 23px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--panel);
  color: var(--ink);
}

.my-assets dialog::backdrop {
  background: var(--scrim);
}

.my-assets dialog h2 {
  margin: 0 0 10px;
  font-size: 19px;
}

.my-assets dialog > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-assets dialog p:empty {
  display: none;
}

@media (min-width: 1180px) {
  .assets-table thead th, .assets-table .zone-label {
    white-space: nowrap;
  }
}

@media (max-width: 1040px) {
  .assets-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .my-assets {
    padding: 24px 0 36px;
  }

  .my-assets .assets-intro p {
    font-size: 14px;
  }

  .assets-toolbar {
    justify-content: center;
  }

  .assets-toolbar a {
    font-size: 13px;
    padding-inline: 7px;
    gap: 4px;
  }

  .assets-tabs svg {
    width: 14px;
    height: 14px;
  }

  .assets-list > header,
  .assets-add {
    padding: 14px;
  }

  .assets-add {
    align-items: stretch;
    flex-direction: column;
  }

  .assets-table,
  .assets-table tbody {
    display: block;
  }

  .assets-table thead {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
  }

  .assets-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
  }

  .assets-table tr > * {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0;
    border: 0;
  }

  .assets-table :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(4)) {
    text-align: left;
  }

  .assets-table th:first-child {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-bottom: 4px;
  }

  .assets-remove-cell {
    align-self: end;
    justify-self: end;
  }

  .assets-table td[data-label="Market price"] .lq-line {
    justify-content: flex-start;
  }

  .assets-alert-link {
    min-height: 40px;
  }

  .assets-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
  }
}

@media (max-width: 375px) {
  .assets-tabs a {
    padding-inline: 5px;
  }

  .assets-tabs svg {
    display: none;
  }

  .assets-search input::placeholder {
    font-size: 14px;
  }

  .assets-filters form label {
    flex-basis: 100%;
  }
}
