/*
 * UI V2: shared visual system and responsive behavior.
 * Business colors keep the domestic-market convention: gains red, losses green.
 */
.brand .brand-title {
  color: #f59e0b;
  font-size: 1.15rem;
  font-weight: 750;
  white-space: nowrap;
}
.performance-table { min-width: 58rem; }
.strategy-bottom-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.strategy-bottom-details > .panel {
  height: 32.5rem;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.strategy-bottom-details > .panel > .panel-head { flex-shrink: 0; }
.strategy-bottom-details > .panel > .panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
}
.strategy-bottom-details .panel-body:focus-visible { outline: 2px solid #6da8ff; outline-offset: -3px; }
.strategy-period-tabs { margin-left: auto; flex-wrap: wrap; }
.strategy-period-tabs > button { min-height: 2.5rem; background-color: transparent; }
.strategy-period-tabs > button.active { background-color: var(--teal-soft); }
.strategy-period-note { flex-basis: 100%; }
[data-identity-chart] > .panel-head { flex-wrap: wrap; }
@media (max-width: 48rem) {
  .strategy-bottom-details { grid-template-columns: minmax(0, 1fr); }
  .strategy-period-tabs { margin-left: 0; }
  .strategy-period-tabs > button { min-height: 2.75rem; }
}
.cash-holdings-detail-grid > div,
.cash-holdings-detail-grid > aside { min-width: 0; }
.backtest-identity-panel.identity-height-synced {
  box-sizing: border-box;
  height: var(--identity-chart-height);
  display: flex;
  flex-direction: column;
}
.backtest-identity-panel.identity-height-synced > .panel-head { flex-shrink: 0; }
.backtest-identity-panel.identity-height-synced > .panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
}
.backtest-identity-panel .identity-more { margin-top: 0.75rem; }
.backtest-identity-panel .identity-more > summary {
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--teal);
  align-content: center;
}
.backtest-identity-panel.identity-height-synced:not(.identity-overflow) .identity-more > summary { display: none; }
.identity-more[open] .identity-expand-label,
.identity-more:not([open]) .identity-collapse-label { display: none; }
.identity-more > .definition-grid { padding-top: 0.5rem; }
.holdings-rules-panel.holdings-height-synced {
  box-sizing: border-box;
  height: var(--latest-holdings-height);
  display: flex;
  flex-direction: column;
}
.holdings-rules-panel.holdings-height-synced > .panel-head { flex-shrink: 0; }
.holdings-rules-panel.holdings-height-synced > .panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
}
.holdings-rules-panel > .panel-body:focus-visible { outline: 2px solid #6da8ff; outline-offset: -3px; }
.performance-table th, .performance-table td { font-variant-numeric: tabular-nums; }
.performance-table td:nth-child(2) { white-space: nowrap; }
:root {
  --content-max: 94rem;
  --sidebar-width: 14rem;
  --control-height: 2.5rem;
  --touch-height: 2.75rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-sm: 0.45rem;
  --radius-md: 0.7rem;
  --radius-lg: 0.9rem;
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.18);
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-size: 0.875rem;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.65rem 0.85rem;
  transform: translateY(-180%);
  border-radius: var(--radius-sm);
  background: var(--teal);
  color: #04120f;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  padding: 1.25rem 1rem;
}

.sidebar-toggle {
  min-width: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
}

.mobile-toggle-icon,
.sidebar-scrim {
  display: none;
}

.main {
  max-width: var(--content-max);
  min-width: 0;
  margin-inline: auto;
  padding: 1.75rem clamp(1.25rem, 2.5vw, 2.5rem) 4rem;
}

.page-head {
  align-items: flex-start;
  margin-bottom: var(--space-6);
}

.page-head > div:first-child {
  min-width: 0;
}

.page-head .chip-row {
  justify-content: flex-end;
  max-width: 28rem;
  padding-top: 1.9rem;
}

h1 {
  max-width: 64rem;
  margin-bottom: 0.35rem;
  font-size: clamp(1.65rem, 2.4vw, 2.05rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.05rem;
}

.lede {
  font-size: 0.875rem;
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
}

.panel {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.panel-head,
.panel-body {
  padding: 1rem 1.1rem;
}

input,
select,
button,
.button {
  min-height: var(--control-height);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

button,
.button {
  gap: 0.4rem;
  padding-inline: 0.9rem;
  font-weight: 550;
  white-space: nowrap;
}

.button-subtle {
  background: rgba(8, 19, 27, 0.72);
}

.button-subtle.compact,
.button-danger.compact,
button.compact {
  min-height: 2.25rem;
  padding-inline: 0.75rem;
  font-size: 0.78rem;
}

.icon-button {
  display: inline-grid;
  width: var(--control-height);
  min-width: var(--control-height);
  height: var(--control-height);
  min-height: var(--control-height);
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(37, 208, 177, 0.6);
  background: var(--teal-soft);
  color: var(--teal);
}

.chip,
.status-pill {
  min-height: 1.75rem;
  font-size: 0.75rem;
}

.status-pill.status-neutral::before {
  background: var(--muted);
  box-shadow: none;
}

.notice {
  border-radius: var(--radius-md);
}

.category-tabs,
.pool-view-tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 0.25rem;
  padding: 0.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 19, 27, 0.72);
}

.pool-view-tabs .button,
.category-tabs .button {
  min-width: 7.2rem;
  border-color: transparent;
  background: transparent;
}

.pool-view-tabs .active,
.category-tabs .active {
  border-color: rgba(37, 208, 177, 0.42);
  background: var(--teal-soft);
  color: var(--teal);
}

.strategy-filter-bar,
.frozen-filter-bar {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(12rem, 0.38fr) minmax(9rem, 0.26fr) auto;
  align-items: end;
  gap: 0.75rem;
  padding: 0.85rem;
}

.frozen-filter-bar {
  grid-template-columns: minmax(16rem, 1fr) auto;
}

.strategy-filter-bar .field,
.frozen-filter-bar .field {
  min-width: 0;
}

.strategy-list-head {
  display: grid;
  grid-template-columns: minmax(20rem, 2.2fr) repeat(4, minmax(6.6rem, 0.62fr)) 2.5rem;
  gap: 1rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 24, 0.45);
  color: var(--faint);
  font-size: 0.7rem;
}

.strategy-list-head span:not(:first-child) {
  text-align: left;
}

.paper-list-head {
  grid-template-columns: minmax(20rem, 2.2fr) repeat(5, minmax(6.4rem, 0.6fr));
}

.strategy-row,
.watchlist-row,
.research-watchlist-row,
.observation-strategy-row {
  position: relative;
  grid-template-columns: minmax(20rem, 2.2fr) repeat(4, minmax(6.6rem, 0.62fr)) 2.5rem;
  align-items: start;
  min-height: 8.25rem;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.paper-row {
  grid-template-columns: minmax(20rem, 2.2fr) repeat(5, minmax(6.4rem, 0.6fr));
}

.strategy-identity,
.strategy-row > div:first-child,
.paper-row > div:first-child {
  min-width: 0;
}

.strategy-name {
  display: -webkit-box;
  margin-bottom: 0.3rem;
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.strategy-summary {
  display: -webkit-box;
  margin: 0 0 0.4rem;
  overflow: hidden;
  color: #9fb0bb;
  font-size: 0.78rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.strategy-meta {
  display: -webkit-box;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.strategy-row > .strategy-metric,
.paper-row > .strategy-metric {
  min-width: 0;
  padding-top: 0.45rem;
}

.cell-label {
  min-height: 2.2em;
  margin-bottom: 0.3rem;
  font-size: 0.69rem;
  line-height: 1.35;
}

.cell-value {
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.strategy-row-actions {
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 0.15rem;
}

.row-more-actions {
  z-index: 3;
}

.row-more-actions[open] {
  z-index: 60;
}

.row-more-actions > summary {
  list-style: none;
}

.row-action-menu {
  top: calc(100% + 0.4rem);
  min-width: 11rem;
  gap: 0.25rem;
  padding: 0.45rem;
  border-color: var(--line-strong);
  border-radius: var(--radius-md);
  background: #0b1720;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
}

.row-more-actions.menu-up .row-action-menu {
  top: auto;
  bottom: calc(100% + 0.4rem);
}

.row-action-menu > a,
.row-action-menu > form > button,
.row-action-menu > span {
  min-height: 2.5rem;
  justify-content: flex-start;
  padding-inline: 0.8rem;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.row-action-menu > a:hover,
.row-action-menu > form > button:hover {
  border-color: rgba(37, 208, 177, 0.24);
  background: var(--teal-soft);
}

.row-action-menu > form:last-of-type {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.row-action-menu > form:last-of-type > button {
  color: var(--red);
}

.logic-tag-row.compact {
  max-height: 1.55rem;
  overflow: hidden;
}

.logic-tag {
  font-size: 0.68rem;
}

.position-preview {
  display: -webkit-box;
  margin-top: 0.45rem;
  overflow: hidden;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.clickable-strategy-row::after {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--teal);
  content: "›";
  font-size: 1.35rem;
  opacity: 0.7;
}

.clickable-strategy-row:hover::after {
  opacity: 1;
  transform: translateX(2px);
}

.action-bar {
  align-items: flex-start;
  min-height: 4.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
}

.action-bar > div:first-child {
  min-width: 0;
}

.action-buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  color: var(--teal);
  font-size: 0.76rem;
  white-space: nowrap;
}

.breadcrumb-back::before {
  content: "←";
}

.detail-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.detail-page-head .chip-row {
  justify-content: flex-start;
  max-width: 100%;
  min-width: 0;
  padding-top: 0;
}

.detail-page-head .chip {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.metric-grid-primary {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.metric-card {
  min-height: 6.4rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
}

.metric-value {
  margin-top: 0.42rem;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.strategy-logic-grid {
  gap: 0.65rem;
  padding: 0.85rem 1rem 0.2rem;
}

.strategy-logic-grid > div {
  padding: 0.7rem 0.8rem;
}

.definition-grid {
  gap: 0.75rem 1rem;
}

.table-wrap,
.table-scroll {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--line-strong) var(--panel-soft);
}

table {
  font-size: 0.79rem;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #101e29;
  color: #afc0cc;
  font-weight: 550;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(37, 208, 177, 0.03);
}

th,
td {
  vertical-align: middle;
}

.wide-data-table {
  min-width: 72rem;
}

.notification-table {
  min-width: 74rem;
}

.frozen-row {
  grid-template-columns: minmax(20rem, 2fr) minmax(7rem, 0.6fr) minmax(7rem, 0.6fr) minmax(10rem, auto);
  align-items: start;
}

.frozen-row > form,
.frozen-row > div:last-child {
  justify-self: end;
}

.data-grid {
  gap: 0.75rem;
}

.data-card {
  min-height: 7rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37, 208, 177, 0.03), transparent 55%), var(--panel);
}

.data-catalog-panel {
  margin-top: 1rem;
}

.focus-add-button {
  display: inline-flex;
  width: auto;
  min-width: var(--control-height);
  height: var(--control-height);
  align-items: center;
  gap: 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.focus-add-button > span[aria-hidden="true"] {
  font-size: 1.2rem;
}

.focus-add-label {
  font-size: 0.78rem;
}

.pagination a {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding-inline: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.pagination a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

@media (max-width: 88rem) {
  .strategy-list-head {
    display: none;
  }

  .strategy-row,
  .watchlist-row,
  .research-watchlist-row,
  .observation-strategy-row,
  .paper-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 0;
    padding-top: 1.1rem;
  }

  .strategy-row > .strategy-identity,
  .strategy-row > div:first-child,
  .paper-row > div:first-child {
    grid-column: 1 / -1;
    padding-right: 3.5rem;
  }

  .strategy-row-actions {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    padding: 0;
  }

  .paper-row > .strategy-metric:nth-last-child(1) {
    grid-column: auto;
  }

  .strategy-row .secondary-metric {
    display: block;
  }

  .frozen-row {
    grid-template-columns: minmax(18rem, 2fr) repeat(2, minmax(6rem, 0.65fr)) minmax(9rem, auto);
  }
}

@media (max-width: 64rem) {
  .strategy-filter-bar {
    grid-template-columns: minmax(15rem, 1fr) minmax(12rem, 0.55fr);
  }

  .strategy-filter-bar button {
    justify-self: start;
  }

  .page-head {
    gap: 0.75rem;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frozen-row {
    grid-template-columns: 1fr 1fr;
  }

  .frozen-row > :first-child {
    grid-column: 1 / -1;
  }

  .frozen-row > form,
  .frozen-row > div:last-child {
    justify-self: start;
  }
}

@media (max-width: 48rem) {
  :root {
    --control-height: var(--touch-height);
  }

  body {
    font-size: 0.875rem;
  }

  html.sidebar-mobile-open,
  html.sidebar-mobile-open body {
    overflow: hidden;
  }

  .app-shell,
  html.sidebar-collapsed .app-shell {
    display: block;
  }

  .sidebar,
  html.sidebar-collapsed .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: auto;
    padding: 0.65rem 0.9rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 16, 24, 0.97);
  }

  .sidebar-top {
    align-items: center;
  }

  .brand,
  html.sidebar-collapsed .sidebar .brand {
    display: flex;
    padding: 0;
  }

  .brand-mark {
    width: 2.2rem;
    height: 2.2rem;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .brand span span {
    font-size: 0.66rem;
  }

  .desktop-toggle-icon {
    display: none;
  }

  .mobile-toggle-icon {
    display: inline;
    font-size: 1.15rem;
  }

  .nav-list,
  html.sidebar-collapsed .sidebar .nav-list {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0.75rem;
    left: 0.75rem;
    z-index: 102;
    display: none;
    max-height: calc(100vh - 5.5rem);
    gap: 0.25rem;
    padding: 0.55rem;
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: #09151e;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  }

  html.sidebar-mobile-open .nav-list {
    display: grid;
  }

  .nav-link {
    min-height: var(--touch-height);
    padding: 0.7rem 0.85rem;
  }

  .nav-index {
    display: inline;
  }

  .sidebar-foot,
  html.sidebar-collapsed .sidebar .sidebar-foot {
    display: none;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 98;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(1, 7, 11, 0.7);
  }

  html.sidebar-mobile-open .sidebar-scrim {
    display: block;
  }

  .main {
    width: 100%;
    padding: 1.25rem 0.9rem 3rem;
  }

  .page-head,
  .detail-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .page-head .chip-row,
  .detail-page-head .chip-row {
    justify-content: flex-start;
    max-width: none;
    padding-top: 0;
  }

  h1 {
    font-size: 1.62rem;
  }

  .category-tabs,
  .pool-view-tabs {
    display: grid;
    width: 100%;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    overflow-x: hidden;
  }

  .pool-view-tabs .button,
  .category-tabs .button {
    min-width: 0;
    min-height: var(--touch-height);
    padding-inline: 0.65rem;
    text-align: center;
    white-space: normal;
  }

  .strategy-filter-bar,
  .frozen-filter-bar {
    grid-template-columns: 1fr;
  }

  .strategy-filter-bar button,
  .frozen-filter-bar button {
    width: 100%;
  }

  .strategy-row,
  .watchlist-row,
  .research-watchlist-row,
  .observation-strategy-row,
  .paper-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
    padding: 1rem;
  }

  .strategy-row > .strategy-identity,
  .strategy-row > div:first-child,
  .paper-row > div:first-child {
    padding-right: 2.8rem;
  }

  .strategy-row-actions {
    top: 0.85rem;
    right: 0.8rem;
  }

  .strategy-row > .strategy-metric,
  .paper-row > .strategy-metric {
    padding-top: 0;
  }

  .cell-label {
    min-height: auto;
    font-size: 0.71rem;
  }

  .row-action-menu {
    position: fixed;
    right: 0.9rem;
    bottom: 0.9rem;
    top: auto;
    left: 0.9rem;
    min-width: 0;
    padding: 0.55rem;
  }

  .row-more-actions.menu-up .row-action-menu {
    top: auto;
    bottom: 0.9rem;
  }

  .row-action-menu > a,
  .row-action-menu > form > button,
  .row-action-menu > span {
    min-height: var(--touch-height);
  }

  .action-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .action-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .action-buttons > a,
  .action-buttons > form,
  .action-buttons > form > button {
    flex: 1 1 auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 5.8rem;
    padding: 0.8rem;
  }

  .metric-value {
    font-size: 1.3rem;
  }

  .strategy-logic-grid,
  .definition-grid,
  .evaluation-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .frozen-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding: 1rem;
  }

  .frozen-row > :first-child,
  .frozen-row > form,
  .frozen-row > div:last-child {
    grid-column: 1 / -1;
  }

  .frozen-row button {
    width: 100%;
  }

  table {
    font-size: 0.78rem;
  }

  th,
  td {
    padding: 0.65rem 0.7rem;
  }

  .pagination {
    justify-content: center;
  }

  .focus-add-button {
    width: var(--touch-height);
    min-width: var(--touch-height);
    padding: 0;
    border-radius: 50%;
  }

  .focus-add-label {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .clickable-strategy-row::after,
  .nav-list,
  .sidebar-scrim {
    transition: 150ms ease;
  }
}

/* Strategy-only readout lives above the plotting surface in normal flow. */
.strategy-chart { min-width: 0; width: 100%; }
.strategy-chart .chart-inspector {
  padding: 12px 16px; background: #0d1a25; border-bottom: 1px solid #213341;
}
.strategy-chart .chart-inspector-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  min-height: 36px; margin-bottom: 8px; font-size: .78rem; color: #8ea2b0;
}
.strategy-chart [data-chart-date] { color: #e4edf4; font-variant-numeric: tabular-nums; }
.strategy-chart .chart-date-label { color: #8ea2b0; margin-right: 6px; }
.strategy-chart .chart-latest { margin-left: auto; min-height: 36px; padding: 4px 10px; }
.strategy-chart .chart-series-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px;
  max-height: 240px; overflow-y: auto; scrollbar-gutter: stable;
}
.strategy-chart .chart-series {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px;
  width: 100%; min-width: 0; min-height: 60px; height: 60px; padding: 8px 10px;
  align-items: center; text-align: left; border: 1px solid #263b4a;
  border-radius: 6px; background: #101f2c; color: #cdd9e3;
  font-size: .76rem; font-weight: 400; line-height: 1.4;
}
.strategy-chart .chart-series:hover { background: #172c3c; border-color: #547388; }
.strategy-chart .chart-series[aria-pressed="false"] { border-style: dashed; color: #8296a5; background: #0c1721; }
.strategy-chart .chart-series[aria-pressed="false"] .chart-series-swatch { opacity: .35; }
.strategy-chart .chart-series:focus-visible, .strategy-chart input:focus-visible {
  outline: 2px solid #6da8ff; outline-offset: 2px;
}
.strategy-chart .chart-series:disabled { opacity: .8; cursor: default; }
.strategy-chart .chart-series-swatch { height: 3px; width: 14px; background: #8ea2b0; border-radius: 2px; }
.strategy-chart .chart-series-name {
  min-width: 0; overflow-wrap: anywhere; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.strategy-chart .chart-series-value { min-width: 10ch; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: #e4edf4; }
.strategy-chart .chart-date-slider {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 4px 16px 10px; margin: 0; font-size: .75rem; color: #8ea2b0;
}
.strategy-chart input[type="range"] { flex: 1; min-width: 100px; width: 0; min-height: 44px; padding: 0; accent-color: #6da8ff; }
.strategy-chart .chart-plot { min-width: 0; position: relative; }
.strategy-chart .chart-linked-cursor { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 2; }
.strategy-chart .chart-linked-cursor[hidden] { display: none; }
.strategy-chart .chart-interaction-error { margin: 8px 0 0; color: #f0ba62; font-size: .8rem; }
.strategy-chart .chart-interaction-error[hidden] { display: none; }
@media (max-width: 48rem) {
  .strategy-chart .chart-series-list { grid-template-columns: minmax(0, 1fr); max-height: 224px; }
  .strategy-chart .chart-inspector { padding: 10px 12px; }
  .strategy-chart .chart-interaction-hint { order: 3; flex-basis: 100%; }
  .strategy-chart .chart-latest { min-height: 44px; }
  .strategy-chart .chart-series { min-height: 48px; }
  .strategy-chart .chart-slider-hint { flex-basis: 100%; }
}
/* Research asset valuation; scoped to these details, keep wide tables local. */
/* Compact strategy legends; full names remain in titles and accessible labels. */
.strategy-chart[data-compact-legend] .chart-inspector { padding: 8px 14px; }
.strategy-chart[data-compact-legend] .chart-inspector-header { min-height: 30px; margin-bottom: 4px; }
.strategy-chart[data-compact-legend] .chart-series-list { display: flex; flex-wrap: wrap; gap: 4px 8px; max-height: 132px; }
.strategy-chart[data-compact-legend] .chart-series { display: inline-grid; grid-template-columns: 12px minmax(0,1fr) auto; width: auto; min-width: 168px; max-width: 280px; flex: 0 1 auto; height: 36px; min-height: 36px; padding: 4px 8px; gap: 6px; font-size: .72rem; }
.strategy-chart[data-compact-legend] .chart-series-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strategy-chart[data-compact-legend] .chart-series-value { min-width: 8ch; }
.chart-holdings-key { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 5px 14px 0; font-size: .72rem; color: #a8b8c6; }
.chart-holdings-key label { display: inline-flex; align-items: center; gap: 5px; margin: 0; min-height: 32px; cursor: pointer; }
.chart-holdings-key input[type="checkbox"] { width: 14px; min-width: 14px; min-height: 14px; margin: 0; accent-color: #6da8ff; }
.chart-holding-asset { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; }
.chart-holding-asset i { display: inline-block; width: 9px; height: 9px; flex-shrink: 0; border-radius: 2px; opacity: .8; }
.chart-holding-basis { color: #8296a5; }
.chart-holdings-readout { padding: 2px 14px 4px; font-size: .72rem; color: #a8b8c6; min-height: 24px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 48rem) {
  .strategy-chart[data-compact-legend] .chart-series-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 184px; }
  .strategy-chart[data-compact-legend] .chart-series { width: 100%; max-width: none; min-width: 0; height: 44px; min-height: 44px; padding: 4px 6px; font-size: .69rem; }
  .strategy-chart[data-compact-legend] .chart-series-value { min-width: 6ch; }
  .chart-holdings-key { gap: 3px 10px; }
  .chart-holdings-key label { min-height: 44px; }
}
.focus-valuation-summary { margin: 1rem; min-width: 0; }
.focus-valuation-summary .table-note { overflow-wrap: anywhere; }
.focus-valuation-method summary { cursor: pointer; color: #8ea2b0; padding: .6rem 0; }
.focus-chart .chart-series-list { max-height: none; }
.page-focus_assets .focus-chart-head, .page-focus_indices .focus-chart-head { flex-wrap: wrap; }
.focus-chart .chart-metric-options { display: flex; gap: 8px; margin-top: 10px; }
.focus-chart .chart-metric-choice { display: flex; justify-content: center; flex: 1; min-width: 0; height: 44px; min-height: 44px; padding: 6px; }
.focus-chart .chart-metric-choice[aria-checked="true"] { color: #e4edf4; border-color: #6da8ff; background: #172c3c; }
.focus-chart .chart-metric-choice[aria-checked="false"] { color: #8296a5; }
.focus-chart .chart-metric-readout { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; font-size: .8rem; color: #8ea2b0; font-variant-numeric: tabular-nums; }
.focus-chart .chart-metric-readout strong { color: #e4edf4; font-weight: 500; }

/* Focus detail shares the compact legend without rebasing its data. */
.featured-data-card .focus-chart-head { flex-wrap: wrap; }
.featured-data-card, .featured-data-chart { min-width: 0; }
.featured-data-card > .table-note { overflow-wrap: anywhere; margin-top: 0; }
.featured-data-card .panel-head .table-note { overflow-wrap: anywhere; }
.strategy-chart[data-inline-readout] .chart-series-list { display: flex; flex-wrap: wrap; align-items: center; max-height: none; overflow: visible; scrollbar-gutter: auto; }
.strategy-chart[data-inline-readout] .chart-inline-date { display: flex; align-items: center; flex: 0 0 auto; gap: 4px; min-height: 36px; margin-right: 8px; font-size: .75rem; white-space: nowrap; }
.strategy-chart[data-inline-readout] .chart-inline-date .chart-date-label { margin-right: 0; }
.strategy-chart[data-inline-readout] .chart-series { width: auto; max-width: 100%; flex: 0 1 auto; }
.focus-chart .strategy-chart[data-compact-legend] .chart-metric-options { gap: 6px; margin-top: 6px; }
.focus-chart .strategy-chart[data-compact-legend] .chart-metric-choice { display: flex; flex: 0 1 auto; min-width: 72px; width: auto; height: 36px; min-height: 36px; padding: 4px 8px; }
.focus-chart .strategy-chart[data-compact-legend] .chart-metric-readout { padding-top: 6px; font-size: .72rem; }
@media (max-width: 48rem) {
  .focus-chart .strategy-chart[data-compact-legend] .chart-metric-choice { min-height: 44px; height: 44px; flex: 1; }
}
