
    :root {
      --tos-bg-deep: #000000;
      --tos-bg-dark: #0a0a0a;
      --tos-bg-popup: #0f0f11;
      --tos-bg-panel: #111111;
      --tos-bg-chart: #131722;
      --tos-bg-surface: #1a1a1a;
      --tos-bg-dialog: #1E1E1E;
      --tos-bg-input: #222222;
      --tos-bg-field: #2a2e39;
      --tos-bg-field-hover: #363a45;
      --tos-bg-tooltip: #2a2a2a;
      --tos-bg-hover: rgba(255,255,255,0.06);
      --tos-bg-active: rgba(255,255,255,0.08);
      --tos-bg-subtle: rgba(255,255,255,0.03);
      --tos-bg-float: rgba(10,10,10,0.97);
      --tos-border-sep: rgba(255,255,255,0.08);
      --tos-border: rgba(255,255,255,0.12);
      --tos-border-panel: rgba(255,255,255,0.14);
      --tos-border-light: rgba(255,255,255,0.15);
      --tos-border-strong: rgba(255,255,255,0.20);
      --tos-text-primary: #d1d4dc;
      --tos-text-secondary: #C8C8D0;
      --tos-text-muted: #787B86;
      --tos-text-dim: #555555;
      --tos-text-bright: #E0E0E0;
      --tos-text-white: #ffffff;
      --tos-accent: #2196F3;
      --tos-accent-hover: #1976D2;
      --tos-accent-bg: rgba(33,150,243,0.10);
      --tos-accent-bg-strong: rgba(33,150,243,0.15);
      --tos-accent-border: rgba(33,150,243,0.50);
      --tos-accent-border-strong: rgba(33,150,243,0.65);
      --tos-up: #26A69A;
      --tos-down: #EF5350;
      --tos-radius-sm: 3px;
      --tos-radius-md: 4px;
      --tos-radius-lg: 6px;
      --tos-radius-xl: 8px;
      --tos-radius-pill: 16px;
      --tos-radius-round: 50%;
      --tos-shadow-sm: 0 4px 12px rgba(0,0,0,0.5);
      --tos-shadow-md: 0 6px 20px rgba(0,0,0,0.6);
      --tos-shadow-popup: 0 8px 24px rgba(0,0,0,0.55);
      --tos-shadow-dialog: 0 8px 32px rgba(0,0,0,0.7);
      --tos-window-bg: #1f2630;
      --tos-window-bg-alt: #171d25;
      --tos-window-content-bg: #111821;
      --tos-window-header-bg: #1f2630;
      --tos-window-section-bg: #2b3442;
      --tos-window-border: rgba(148,163,184,0.20);
      --tos-window-border-strong: rgba(148,163,184,0.32);
      --tos-window-text: #d1d5db;
      --tos-window-title: #e5e7eb;
      --tos-window-muted: #8f99aa;
      --tos-window-hover-bg: rgba(255,255,255,0.08);
      --tos-window-active-bg: rgba(255,255,255,0.14);
      --tos-window-shadow: 0 16px 44px rgba(0,0,0,0.55);
      --tos-window-radius: 8px;
      --tos-window-close-size: 30px;
      --tos-window-close-icon-size: 16px;
      --tos-window-header-height: 48px;
      --tos-window-sidebar-header-height: 42px;
      --tos-window-title-size: 16px;
      --tos-window-title-weight: 700;
      --tos-window-button-height: 34px;
      --tos-window-button-radius: 5px;
      --tos-font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      --tos-font-mono: 'Menlo', 'Consolas', monospace;
      --tos-font-size-base: 16px;
      --tos-toolbar-height: 42px;
      --tos-transition-speed: 0.1s;
      --transition-layout: 300ms cubic-bezier(0.2, 0, 0, 1);
      --transition-reveal: 200ms ease-out;
      --transition-micro: 150ms ease;
    }

    :root[data-theme="dark"] {
      color-scheme: dark;
    }

    :root[data-theme="light"] {
      color-scheme: light;
      --tos-bg-deep: #F8F9FA;
      --tos-bg-dark: #F3F4F6;
      --tos-bg-popup: #FFFFFF;
      --tos-bg-panel: #FFFFFF;
      --tos-bg-chart: #FFFFFF;
      --tos-bg-surface: #EEF2F7;
      --tos-bg-dialog: #FFFFFF;
      --tos-bg-input: #FFFFFF;
      --tos-bg-field: #F3F4F6;
      --tos-bg-field-hover: #E5E7EB;
      --tos-bg-tooltip: #FFFFFF;
      --tos-bg-hover: rgba(15, 23, 42, 0.05);
      --tos-bg-active: rgba(15, 23, 42, 0.08);
      --tos-bg-subtle: rgba(15, 23, 42, 0.025);
      --tos-bg-float: rgba(255,255,255,0.98);
      --tos-border-sep: rgba(15, 23, 42, 0.08);
      --tos-border: rgba(15, 23, 42, 0.12);
      --tos-border-panel: rgba(15, 23, 42, 0.12);
      --tos-border-light: rgba(15, 23, 42, 0.16);
      --tos-border-strong: rgba(15, 23, 42, 0.22);
      --tos-text-primary: #1F2937;
      --tos-text-secondary: #374151;
      --tos-text-muted: #6B7280;
      --tos-text-dim: #9CA3AF;
      --tos-text-bright: #111827;
      --tos-text-white: #FFFFFF;
      --tos-accent: #2563EB;
      --tos-accent-hover: #1D4ED8;
      --tos-accent-bg: rgba(37,99,235,0.10);
      --tos-accent-bg-strong: rgba(37,99,235,0.14);
      --tos-accent-border: rgba(37,99,235,0.36);
      --tos-accent-border-strong: rgba(37,99,235,0.48);
      --tos-shadow-sm: 0 4px 12px rgba(15,23,42,0.08);
      --tos-shadow-md: 0 6px 20px rgba(15,23,42,0.10);
      --tos-shadow-popup: 0 12px 30px rgba(15,23,42,0.12);
      --tos-shadow-dialog: 0 16px 42px rgba(15,23,42,0.16);
      --tos-window-bg: #ffffff;
      --tos-window-bg-alt: #f8fafc;
      --tos-window-content-bg: #ffffff;
      --tos-window-header-bg: #f8fafc;
      --tos-window-section-bg: #eef2f7;
      --tos-window-border: rgba(15,23,42,0.12);
      --tos-window-border-strong: rgba(15,23,42,0.22);
      --tos-window-text: #1f2937;
      --tos-window-title: #111827;
      --tos-window-muted: #6b7280;
      --tos-window-hover-bg: rgba(15,23,42,0.06);
      --tos-window-active-bg: rgba(15,23,42,0.10);
      --tos-window-shadow: 0 16px 42px rgba(15,23,42,0.16);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html, body { height: 100%; background: var(--tos-bg-deep); overflow: hidden; }
    body { font-family: var(--tos-font-mono); color: var(--tos-text-muted); }
    :root[data-embed-surface="search-only"],
    :root[data-embed-surface="search-only"] body {
      background: transparent !important;
    }
    :root[data-embed-surface="search-only"] body > * {
      display: none !important;
    }
    :root[data-embed-surface="search-only"] .ticker-search-backdrop.visible {
      display: flex !important;
      background: transparent !important;
      padding-top: 0 !important;
      align-items: stretch !important;
      justify-content: stretch !important;
    }
    :root[data-embed-surface="search-only"] .ticker-search {
      width: 100% !important;
      max-height: 100% !important;
      height: 100% !important;
      border-radius: 10px !important;
      box-shadow: var(--tos-shadow-dialog);
    }
    :root[data-newsletter-editor="true"],
    :root[data-newsletter-editor="true"] body {
      min-height: 100%;
      background: #f7f6f1 !important;
    }
    :root[data-newsletter-editor="true"] body {
      overflow: auto !important;
    }
    :root[data-newsletter-editor="true"] .toolbar {
      position: relative !important;
      z-index: 2000 !important;
      width: min(1440px, calc(100vw - 24px)) !important;
      margin: 0 auto !important;
      background: #ffffff !important;
      border: 1px solid #d1d5db !important;
      border-radius: 10px !important;
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
      box-sizing: border-box !important;
      flex-wrap: nowrap !important;
      overflow: visible !important;
      scrollbar-width: none !important;
    }
    :root[data-newsletter-editor="true"] .toolbar::-webkit-scrollbar {
      display: none !important;
    }
    :root[data-newsletter-editor="true"] .toolbar > * {
      flex-shrink: 0 !important;
    }
    :root[data-newsletter-editor="true"] .toolbar-spacer {
      flex: 1 0 12px !important;
      min-width: 12px !important;
      margin-left: 8px !important;
    }
    :root[data-newsletter-editor="true"] .zoom-btn,
    :root[data-newsletter-editor="true"] .draw-btn,
    :root[data-newsletter-editor="true"] .draw-clear-btn,
    :root[data-newsletter-editor="true"] .range-btn,
    :root[data-newsletter-editor="true"] .tf-toolbar-btn,
    :root[data-newsletter-editor="true"] .interval-toolbar-btn,
    :root[data-newsletter-editor="true"] .interval-dropdown-btn,
    :root[data-newsletter-editor="true"] .workspace-btn {
      align-items: center !important;
      box-sizing: border-box !important;
      display: inline-flex !important;
      height: 28px !important;
      justify-content: center !important;
      line-height: 1 !important;
      min-width: 28px !important;
      padding: 0 9px !important;
      white-space: nowrap !important;
      width: auto !important;
    }
    :root[data-newsletter-editor="true"] .interval-toolbar-root,
    :root[data-newsletter-editor="true"] .interval-toolbar {
      align-items: center !important;
      align-self: center !important;
      height: 28px !important;
      padding-bottom: 0 !important;
      padding-top: 0 !important;
    }
    :root[data-newsletter-editor="true"] .interval-dropdown-root,
    :root[data-newsletter-editor="true"] .tf-dropdown-root {
      align-items: center !important;
      align-self: center !important;
      height: 28px !important;
    }
    :root[data-newsletter-editor="true"] .interval-toolbar-btn,
    :root[data-newsletter-editor="true"] .tf-toolbar-btn {
      align-self: center !important;
      line-height: 28px !important;
      padding-bottom: 0 !important;
      padding-top: 0 !important;
    }
    :root[data-newsletter-editor="true"] .workspace-switch {
      align-items: center !important;
      height: 28px !important;
    }
    :root[data-newsletter-editor="true"] #main-content {
      width: min(var(--newsletter-editor-width, 1200px), calc(100vw - 64px));
      margin: 16px auto 0;
      background: #ffffff;
      border: 1px solid #d1d5db;
      border-radius: 12px;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
      overflow: hidden;
      zoom: var(--newsletter-editor-display-scale, 1);
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="price"] #main-content {
      aspect-ratio: 16 / 9;
      height: var(--newsletter-editor-height, 675px) !important;
      min-height: 0;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="price"] #chart-container {
      width: 100%;
      height: 100%;
      background: var(--tos-bg-chart);
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="overview"] #main-content {
      min-height: var(--newsletter-editor-height, 675px);
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="overview"] #overview-container {
      max-width: none;
      margin: 0;
      background: #ffffff;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #main-content {
      width: min(1440px, calc(100vw - 64px));
      height: auto;
      min-height: 0;
      background: transparent;
      border: none;
      border-radius: 0;
      box-shadow: none;
      overflow: visible;
      zoom: 1;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container {
      flex: 0 0 auto;
      width: 100%;
      max-width: none;
      height: auto;
      min-height: 0;
      margin: 0;
      padding: 0;
      background: transparent;
      overflow: visible;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-shell {
      align-items: flex-start;
      justify-content: center;
      gap: 16px;
      overflow: visible;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-sidebar {
      align-self: flex-start;
      max-height: calc(100vh - 136px);
      border: 1px solid #d1d5db;
      border-radius: 12px;
      box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-sidebar-resize-handle {
      display: none;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-main {
      flex: 0 0 auto;
      width: var(--newsletter-editor-display-width, 600px);
      min-width: 0;
      margin-left: 0;
      gap: 12px;
      overflow: visible;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-main-topbar,
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-range-spacer,
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-below {
      width: var(--newsletter-editor-display-width, 600px);
      max-width: var(--newsletter-editor-display-width, 600px);
      box-sizing: border-box;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-main-topbar {
      margin-top: 0;
      padding: 0;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-main-topbar .fund-controls-actions {
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      padding-right: 0;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-main .fund-range-spacer {
      padding-left: 0;
      padding-right: 0;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-wrap {
      flex: 0 0 auto;
      width: var(--newsletter-editor-width, 1200px);
      max-width: none;
      height: var(--newsletter-editor-height, 675px);
      min-height: var(--newsletter-editor-height, 675px);
      margin: 0;
      padding: 14px 12px 12px;
      box-sizing: border-box;
      flex-direction: column;
      gap: 0;
      background: #ffffff;
      border: 1px solid #d1d5db;
      border-radius: 12px;
      box-shadow: none;
      overflow: hidden;
      zoom: var(--newsletter-editor-display-scale, 1);
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-area {
      flex: 1 1 auto;
      min-height: 0;
      border: none;
      border-radius: 0;
      box-shadow: none;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-footer {
      display: flex;
      flex: 0 0 68px;
      min-height: 68px;
      padding-top: 4px;
      align-items: flex-start;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-footer.single-metric {
      flex: 0 0 auto;
      min-height: 42px;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-legend:not(.hidden) {
      display: flex;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-legend.single-metric {
      gap: 0;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-legend .fund-legend-item {
      align-items: center;
      gap: 10px;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 20px;
      line-height: 1.2;
      cursor: default;
      color: #4b5563;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-legend .fund-legend-text {
      font-size: inherit;
      line-height: inherit;
      white-space: normal;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-export-legend .fund-metric-dot {
      width: 14px;
      height: 14px;
      margin-top: 0;
      align-self: center;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-below {
      gap: 0;
      padding-bottom: 0;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-below-top {
      display: none;
    }
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-title {
      max-width: min(76%, 920px);
      font-size: 28px;
      line-height: 1.08;
      font-weight: 600;
      text-shadow: none;
      padding: 0 8px;
    }
    :root[data-initial-view="fundamentals"] .fund-workspace-hide,
    :root[data-initial-view="fundamentals"] .price-workspace-only,
    :root[data-initial-view="overview"] .fund-workspace-hide,
    :root[data-initial-view="overview"] .price-workspace-only {
      display: none !important;
    }
    :root[data-initial-view="fundamentals"] #chart-container,
    :root[data-initial-view="overview"] #chart-container {
      display: none !important;
    }
    :root[data-initial-view="fundamentals"] #fundamentals-container {
      display: flex !important;
    }
    :root[data-initial-view="overview"] #overview-container {
      display: flex !important;
    }
    :root[data-newsletter-export="true"],
    :root[data-newsletter-export="true"] body {
      width: var(--newsletter-export-width, 1600px);
      height: var(--newsletter-export-height, 900px);
      overflow: hidden !important;
      background: var(--tos-bg-deep);
    }
    :root[data-newsletter-export="true"] body > :not(#main-content) {
      display: none !important;
    }
    :root[data-newsletter-export="true"] #main-content {
      width: 100%;
      height: 100%;
      background: var(--tos-bg-deep);
    }
    :root[data-newsletter-export="true"] #chart-container {
      background: var(--tos-bg-chart);
    }
    :root[data-newsletter-export="true"] .zoom-controls,
    :root[data-newsletter-export="true"] .draw-favorites-toolbox,
    :root[data-newsletter-export="true"] #draw-object-toolbar,
    :root[data-newsletter-export="true"] #ticker-search-backdrop,
    :root[data-newsletter-export="true"] #drawing-text-editor {
      display: none !important;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container,
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container {
      max-width: none;
      margin: 0;
      padding: 14px 12px 12px;
      gap: 14px;
      background: #ffffff;
      border: 1px solid #d1d5db;
      border-radius: 12px;
      box-shadow: none;
      overflow: hidden;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container {
      padding: 16px 20px 18px;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-controls,
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-sidebar,
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-chips,
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-range-spacer,
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-range-block,
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-below,
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-tooltip,
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container .overview-header-actions,
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container .overview-metric-nav,
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-range-block,
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container .overview-cell-fullscreen-btn {
      display: none !important;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-chart-wrap {
      flex: 1 1 auto;
      width: 100%;
      max-width: none;
      height: 100%;
      min-height: 0;
      margin: 0;
      flex-direction: column;
      gap: 0;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-chart-area {
      flex: 1 1 auto;
      min-height: 0;
      border-radius: 0;
      border: none;
      box-shadow: none;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="fundamentals"] #fundamentals-container .fund-brand-logo,
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container .overview-brand-logo {
      display: none !important;
    }
    :root[data-newsletter-export="true"][data-newsletter-export-target="overview"] #overview-container .overview-grid {
      gap: 12px;
      grid-auto-rows: minmax(220px, 1fr);
    }
    :root[data-dashboard-surface="true"],
    :root[data-dashboard-surface="true"] body {
      width: 100%;
      height: 100%;
      min-width: 0;
      min-height: 0;
      margin: 0;
      overflow: hidden !important;
      background: var(--tos-bg-deep);
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"],
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] body {
      background: var(--prepaint-fund-chart-bg, var(--prepaint-fund-bg, #1f2937));
    }
    :root[data-dashboard-surface="true"] body > :not(#main-content) {
      display: none !important;
    }
    :root[data-dashboard-surface="true"] #main-content {
      width: 100%;
      height: 100%;
      background: transparent;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #main-content {
      background: var(--prepaint-fund-chart-bg, var(--prepaint-fund-bg, #1f2937));
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #chart-container,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #overview-container {
      display: none !important;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container {
      display: flex !important;
      max-width: none;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      gap: 0;
      background: var(--prepaint-fund-chart-bg, var(--prepaint-fund-bg, #1f2937));
      border: none;
      border-radius: 0;
      box-shadow: none;
      overflow: hidden;
      --fund-static-surface-bg: var(--prepaint-fund-chart-bg, var(--prepaint-fund-bg, #1f2937));
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-controls,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-sidebar,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-sidebar-resize-handle,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chips,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-range-spacer,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-range-block,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-below,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-tooltip,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-status,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chart-export-title,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chart-title-editor,
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-ai-note-overlay {
      display: none !important;
    }
    :root[data-dashboard-surface="true"] .draw-favorites-toolbox,
    :root[data-dashboard-surface="true"] #draw-object-toolbar,
    :root[data-dashboard-surface="true"] #drawing-text-editor,
    :root[data-dashboard-surface="true"] #ticker-search-backdrop,
    :root[data-dashboard-surface="true"] .draw-dropdown {
      display: none !important;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-shell {
      width: 100%;
      height: 100%;
      gap: 0;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-main {
      width: 100%;
      margin: 0;
      gap: 0;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chart-wrap {
      flex: 1 1 auto;
      height: 100%;
      min-height: 0;
      width: 100%;
      max-width: none;
      margin: 0;
      flex-direction: column;
      gap: 0;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chart-area {
      flex: 1 1 auto;
      min-height: 0;
      border: none;
      border-radius: 0;
      background: var(--fund-static-surface-bg);
      box-shadow: none;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chart-title:not(.hidden) {
      display: block;
      top: 16px;
      width: min(94%, 760px);
      max-width: none;
      padding: 0;
      font-size: 18px;
      line-height: 1.2;
      font-weight: 600;
      letter-spacing: 0;
      text-align: center;
      color: #cbd5e1;
      text-shadow: 0 1px 0 rgba(15, 23, 42, 0.24), 0 6px 20px rgba(2, 6, 23, 0.20);
      cursor: default;
      pointer-events: none;
      user-select: none;
      background: transparent;
      outline: none;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-chart-title.on-light:not(.hidden) {
      color: #334155;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 16px rgba(255, 255, 255, 0.18);
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #fundamentals-container .fund-brand-logo {
      display: none !important;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #main-content[data-dashboard-surface-root="true"] .fund-chart-export-footer {
      display: flex;
      flex: 0 0 auto;
      min-height: 30px;
      padding: 4px 12px 6px;
      align-items: center;
      justify-content: center;
      background: var(--fund-static-surface-bg);
      border-top: none;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #main-content[data-dashboard-surface-root="true"] .fund-chart-export-legend:not(.hidden) {
      display: flex;
      flex: 1 1 auto;
      flex-direction: row;
      flex-wrap: wrap;
      column-gap: 18px;
      row-gap: 4px;
      align-items: center;
      justify-content: center;
      align-content: center;
      background: transparent;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #main-content[data-dashboard-surface-root="true"] .fund-chart-export-legend .fund-legend-item {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      line-height: 1;
      color: #94a3b8;
      font-family: var(--tos-font-ui);
      max-width: none;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #main-content[data-dashboard-surface-root="true"] .fund-chart-export-legend .fund-legend-text {
      line-height: inherit;
      white-space: nowrap;
    }
    :root[data-dashboard-surface="true"][data-dashboard-surface-target="fundamentals"] #main-content[data-dashboard-surface-root="true"] .fund-chart-export-legend .fund-metric-dot {
      width: 8px;
      height: 8px;
      margin-top: 0;
      flex: 0 0 auto;
    }
    .toolbar {
      height: var(--tos-toolbar-height);
      background: var(--tos-bg-deep);
      border-bottom: 1px solid var(--tos-border-strong);
      display: flex;
      align-items: center;
      padding: 0 10px;
      gap: 3px;
      font-size: var(--tos-font-size-base);
      color: var(--tos-text-primary);
      font-family: var(--tos-font-ui);
      min-width: 0;
      white-space: nowrap;
      overflow-x: auto;
      overflow-y: hidden;
      overscroll-behavior-inline: contain;
      scrollbar-width: none;
    }
    .toolbar::-webkit-scrollbar {
      display: none;
    }
    .toolbar > * {
      flex-shrink: 0;
    }
    .toolbar:has([aria-expanded="true"]) {
      overflow: visible;
    }
    .ticker-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 15px;
      font-weight: 400;
      font-family: inherit;
      color: var(--tos-text-primary);
      background: var(--tos-bg-field);
      border: 1px solid var(--tos-border-sep);
      border-radius: var(--tos-radius-xl);
      min-width: 120px;
      padding: 7px 14px 7px 10px;
      margin-right: 6px;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
      line-height: 1;
      white-space: nowrap;
    }
    .ticker-label:hover {
      background: var(--tos-bg-field-hover);
      border-color: var(--tos-border-light);
      color: var(--tos-text-bright);
    }
    .ticker-search-icon {
      flex-shrink: 0;
      opacity: 0.45;
    }
    .ticker-label:hover .ticker-search-icon {
      opacity: 0.7;
    }
    .zoom-label {
      font-size: 16px;
      color: var(--tos-text-primary);
    }
    .theme-toggle-btn {
      position: relative;
      overflow: hidden;
    }
    .theme-toggle-btn .theme-toggle-icon {
      display: none;
      flex-shrink: 0;
    }
    :root[data-theme="dark"] .theme-toggle-btn .theme-toggle-icon-sun {
      display: block;
    }
    :root[data-theme="light"] .theme-toggle-btn .theme-toggle-icon-moon {
      display: block;
    }
    .auth-profile-root {
      position: relative;
      display: inline-flex;
      flex: 0 0 auto;
    }
    .auth-profile-btn {
      background: none;
      border: none;
      color: var(--tos-text-secondary);
      cursor: pointer;
      padding: 4px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: color 0.1s, background 0.1s;
    }
    .auth-profile-btn:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .auth-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      min-width: 180px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-panel);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      padding: 4px 0;
    }
    .auth-dropdown-email {
      padding: 8px 12px;
      font-size: 12px;
      color: var(--tos-text-secondary);
      max-width: 220px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: default;
    }
    .auth-dropdown-sep {
      height: 1px;
      background: var(--tos-border-sep);
      margin: 2px 0;
    }
    .auth-dropdown-item {
      width: 100%;
      border: none;
      background: none;
      color: var(--tos-text-secondary);
      padding: 9px 12px;
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      display: flex;
      align-items: center;
    }
    .auth-dropdown-item:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .auth-login-root {
      position: relative;
      display: inline-flex;
      flex: 0 0 auto;
    }
    .auth-login-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      min-width: 210px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-panel);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      padding: 4px 0;
    }
    .auth-login-dropdown-item {
      width: 100%;
      border: none;
      background: none;
      color: var(--tos-text-secondary);
      padding: 9px 12px;
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      display: flex;
      align-items: center;
    }
    .auth-login-dropdown-item:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .auth-login-dropdown-sep {
      height: 1px;
      background: var(--tos-border-sep);
      margin: 2px 0;
    }
    .fin-quote-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      color: var(--tos-text-secondary);
      padding: 2px 6px;
    }
    .fin-quote-link:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
      border-radius: var(--tos-radius-sm);
    }
    .range-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 3px 10px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 16px;
      cursor: pointer;
      transition: all 0.1s;
      margin: 0;
      flex: 0 0 auto;
    }
    .range-btn:hover { color: var(--tos-text-bright); border-color: var(--tos-border-strong); }
    .range-btn.active { color: var(--tos-text-bright); background: var(--tos-bg-active); border-color: var(--tos-border-strong); }
    .tf-dropdown-root {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
    }
    .interval-toolbar-root {
      display: inline-flex;
      align-items: stretch;
      align-self: stretch;
      height: 100%;
      gap: 6px;
      min-width: 0;
      flex: 0 1 auto;
    }
    .interval-toolbar {
      display: inline-flex;
      align-items: stretch;
      height: 100%;
      padding: 1px 0;
      box-sizing: border-box;
      gap: 1px;
      min-width: 0;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .interval-toolbar::-webkit-scrollbar {
      display: none;
    }
    .interval-toolbar-btn {
      display: inline-flex;
      align-items: center;
      background: none;
      border: none;
      color: var(--tos-text-primary);
      min-width: 0;
      align-self: stretch;
      margin: 0;
      padding: 0 8px;
      border-radius: calc(var(--tos-radius-sm) + 1px);
      font-family: inherit;
      font-size: 16px;
      line-height: 1;
      cursor: pointer;
      transition: color 0.12s, background 0.12s;
      white-space: nowrap;
      flex: 0 0 auto;
    }
    .interval-toolbar-btn:hover {
      color: var(--tos-text-bright);
      background: rgba(255,255,255,0.14);
    }
    .interval-toolbar-btn:focus-visible {
      outline: none;
      color: var(--tos-text-bright);
      background: rgba(255,255,255,0.14);
    }
    .interval-toolbar-btn.active {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .interval-toolbar-btn.active:hover,
    .interval-toolbar-btn.active:focus-visible {
      background: rgba(255,255,255,0.18);
    }
    .interval-dropdown-root {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
    }
    .interval-dropdown-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      width: 28px;
      height: 28px;
      padding: 0;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.1s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      flex: 0 0 auto;
    }
    .interval-dropdown-btn:hover {
      border-color: var(--tos-border-strong);
      color: var(--tos-text-bright);
    }
    .interval-dropdown-btn.open {
      background: var(--tos-bg-active);
      border-color: var(--tos-border-strong);
    }
    .interval-dropdown-plus {
      display: block;
      font-size: 18px;
      font-weight: 400;
      line-height: 1;
      transform: translateY(-0.5px);
    }
    .tf-toolbar-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 5px 12px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 16px;
      font-weight: 400;
      cursor: pointer;
      transition: all 0.1s;
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 5px;
      line-height: 1;
    }
    .tf-toolbar-btn:hover { border-color: var(--tos-border-strong); color: var(--tos-text-bright); }
    .tf-toolbar-btn.open { background: var(--tos-bg-active); border-color: var(--tos-border-strong); }
    .tf-chevron {
      font-size: 10px;
      color: var(--tos-text-primary);
      transform: translateY(1px);
    }
    .tf-panel {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      width: 220px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      color: var(--tos-text-primary);
      padding: 8px;
    }
    .tf-range-panel {
      width: 156px;
    }
    .tf-range-header {
      padding: 2px 4px 8px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--tos-text-secondary);
    }
    .tf-range-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .tf-range-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      padding: 8px 10px;
      border: none;
      border-radius: var(--tos-radius-sm);
      background: transparent;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      transition: color 0.12s, background 0.12s;
    }
    .tf-range-option:hover {
      background: var(--tos-bg-hover);
      color: var(--tos-text-bright);
    }
    .tf-range-option.active {
      background: var(--tos-bg-active);
      color: var(--tos-text-bright);
    }
    .tf-range-option-label {
      font-size: 14px;
      line-height: 1;
    }
    .tf-range-option-meta {
      font-size: 11px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--tos-text-dim);
      line-height: 1;
    }
    .interval-panel {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      width: 248px;
      max-height: min(68vh, 620px);
      overflow-y: auto;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      color: var(--tos-text-primary);
      padding: 8px;
      scrollbar-color: rgba(120, 123, 134, 0.72) transparent;
    }
    .interval-panel-body {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .interval-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding-top: 2px;
    }
    .interval-group + .interval-group {
      border-top: 1px solid var(--tos-border-sep);
      padding-top: 10px;
    }
    .interval-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      background: transparent;
      border: none;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 2px 2px 0;
      cursor: pointer;
    }
    .interval-group-header:hover {
      color: var(--tos-text-bright);
    }
    .interval-group-chevron {
      font-size: 11px;
      line-height: 1;
    }
    .interval-group-list {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .interval-option {
      display: flex;
      align-items: center;
      gap: 8px;
      border-radius: var(--tos-radius-md);
      background: transparent;
    }
    .interval-option.active {
      background: var(--tos-bg-active);
    }
    .interval-option-trigger {
      flex: 1 1 auto;
      min-width: 0;
      border: none;
      background: transparent;
      color: var(--tos-text-primary);
      font-family: inherit;
      font-size: 16px;
      padding: 8px 10px;
      text-align: left;
      cursor: pointer;
      border-radius: var(--tos-radius-md);
    }
    .interval-option-trigger:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-hover);
    }
    .interval-option.active .interval-option-trigger {
      color: var(--tos-text-bright);
    }
    .interval-option-star {
      flex: 0 0 auto;
      width: 30px;
      height: 30px;
      border: none;
      background: transparent;
      color: var(--tos-text-secondary);
      border-radius: var(--tos-radius-sm);
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
    }
    .interval-option-star:hover {
      color: #f5c842;
      background: var(--tos-bg-hover);
    }
    .interval-option-star.active {
      color: #f5c842;
    }
    .interval-panel-footer {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding-top: 10px;
      border-top: 1px solid var(--tos-border-sep);
    }
    .interval-custom-btn {
      width: 100%;
      min-height: 34px;
      border: 1px dashed var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      background: transparent;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: color 0.12s, background 0.12s, border-color 0.12s;
    }
    .interval-custom-btn:hover {
      background: var(--tos-bg-hover);
      border-color: var(--tos-border-strong);
      color: var(--tos-text-bright);
    }
    .interval-custom-form {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .interval-custom-inputs {
      display: grid;
      grid-template-columns: minmax(0, 88px) minmax(0, 1fr);
      gap: 8px;
    }
    .interval-custom-number,
    .interval-custom-unit {
      width: 100%;
      min-height: 34px;
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      background: var(--tos-bg-input);
      color: var(--tos-text-primary);
      font-family: inherit;
      font-size: 14px;
      padding: 0 10px;
      outline: none;
    }
    .interval-custom-number:focus,
    .interval-custom-unit:focus {
      border-color: var(--tos-border-strong);
    }
    .interval-custom-actions {
      display: flex;
      justify-content: flex-end;
      gap: 6px;
    }
    .interval-custom-action {
      min-height: 30px;
      padding: 0 12px;
      border-radius: var(--tos-radius-md);
      border: 1px solid var(--tos-border-light);
      background: transparent;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      transition: color 0.12s, background 0.12s, border-color 0.12s;
    }
    .interval-custom-action:hover {
      background: var(--tos-bg-hover);
      color: var(--tos-text-bright);
      border-color: var(--tos-border-strong);
    }
    .interval-custom-confirm {
      background: var(--tos-bg-active);
      color: var(--tos-text-bright);
    }
    .interval-custom-confirm:hover {
      background: rgba(255,255,255,0.14);
    }
    .interval-custom-error {
      font-size: 12px;
      line-height: 1.35;
      color: #f87171;
      padding-left: 2px;
    }
    .ct-panel {
      position: absolute;
      top: -4px;
      left: calc(100% + 4px);
      width: 170px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1610;
      padding: 4px 0;
    }
    .ct-option {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 10px 14px;
      background: none;
      border: none;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 16px;
      text-align: left;
      cursor: pointer;
    }
    .ct-option-icon {
      width: 18px;
      height: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      color: currentColor;
      opacity: 0.95;
    }
    .ct-option-icon svg {
      width: 18px;
      height: 14px;
      display: block;
      stroke: currentColor;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }
    .ct-option-label {
      display: inline-block;
      line-height: 1.1;
    }
    .ct-option:hover { background: var(--tos-bg-active); color: var(--tos-text-bright); }
    .ct-option.active { color: var(--tos-accent); }

    /* ── Multi-chart dropdown ── */
    .mc-dropdown-root {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
    }
    .mc-dropdown-trigger {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .mc-dropdown-trigger.open { background: var(--tos-bg-active); border-color: var(--tos-border-strong); }
    .mc-dropdown-panel {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      width: 192px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      padding: 8px;
    }
    .mc-section-label {
      font-size: 11px;
      color: var(--tos-text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 2px 4px 4px;
    }
    .mc-layout-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
    }
    .mc-layout-option {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-secondary);
      border-radius: var(--tos-radius-sm);
      padding: 5px 0;
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
      text-align: center;
    }
    .mc-layout-option:hover { border-color: var(--tos-border-strong); color: var(--tos-text-bright); }
    .mc-layout-option.active { color: var(--tos-accent); border-color: var(--tos-accent); background: rgba(38,166,154,0.1); }
    .mc-link-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      background: none;
      border: none;
      color: var(--tos-text-secondary);
      padding: 6px 4px;
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      border-radius: var(--tos-radius-sm);
    }
    .mc-link-row:hover { background: var(--tos-bg-active); color: var(--tos-text-bright); }
    .mc-link-toggle {
      position: relative;
      width: 36px;
      height: 20px;
      background: rgba(255,255,255,0.1);
      border-radius: 6px;
      flex-shrink: 0;
      transition: background 0.2s;
    }
    .mc-link-toggle::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 14px;
      height: 14px;
      background: rgba(255,255,255,0.5);
      border-radius: 50%;
      transition: transform 0.2s, background 0.2s;
    }
    .mc-link-toggle.on { background: var(--tos-accent); }
    .mc-link-toggle.on::after { transform: translateX(16px); background: #fff; }

    .ohlc-header {
      font-size: 14px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-weight: 400;
      color: var(--tos-text-primary);
      white-space: nowrap;
      margin-left: 8px;
      display: inline-flex;
      align-items: center;
      gap: 0;
      line-height: 1;
      min-width: 0;
      max-width: 42vw;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .daily-change {
      font-size: 16px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-weight: 400;
      white-space: nowrap;
      margin-left: 8px;
      line-height: 1;
    }
    .daily-change.up { color: var(--tos-up); }
    .daily-change.down { color: var(--tos-down); }
    .ohlc-header:empty,
    .daily-change:empty {
      display: none;
      margin-left: 0;
    }
    .ohlc-date {
      color: var(--tos-text-primary);
      padding-right: 8px;
    }
    .ohlc-val-up, .ohlc-val-down {
      padding: 0 8px;
      border-left: 1px solid var(--tos-border);
    }
    .ohlc-val-up { color: var(--tos-up); }
    .ohlc-val-down { color: var(--tos-down); }
    .toolbar-spacer { margin-left: auto; min-width: 6px; }
    .toolbar-sep {
      width: 1px;
      height: 20px;
      background: rgba(255,255,255,0.1);
      margin: 0 2px;
    }
    .zoom-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 3px 10px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 16px;
      cursor: pointer;
      transition: all 0.1s;
    }
    .zoom-btn:hover { color: var(--tos-text-bright); border-color: var(--tos-border-strong); }
    .zoom-btn:disabled { opacity: 0.3; cursor: default; }
    .workspace-switch {
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--tos-border-sep);
      border-radius: var(--tos-radius-sm);
      overflow: hidden;
      flex: 0 0 auto;
    }
    .workspace-btn {
      background: none;
      border: 0;
      border-right: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 3px 10px;
      font-family: inherit;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.1s;
    }
    .workspace-btn:last-child { border-right: 0; }
    .workspace-btn:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-hover);
    }
    .workspace-btn:disabled {
      opacity: 0.35;
      cursor: default;
    }
    .workspace-btn:disabled:hover {
      color: var(--tos-text-primary);
      background: none;
    }
    .workspace-btn.active {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
      font-weight: 600;
    }
    .toolbar-utils-root {
      position: relative;
      display: inline-flex;
      flex: 0 0 auto;
    }
    .toolbar-utils-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .toolbar-utils-panel {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      min-width: 210px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      padding: 4px 0;
    }
    .toolbar-utils-item {
      width: 100%;
      border: none;
      background: none;
      color: var(--tos-text-secondary);
      padding: 9px 12px;
      text-align: left;
      font-size: 13px;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .toolbar-utils-item:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .toolbar-utils-submenu-root {
      position: relative;
    }
    .toolbar-utils-submenu-trigger[aria-expanded="true"] {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .toolbar-utils-submenu-value {
      margin-left: auto;
      color: rgba(255,255,255,0.6);
      font-size: 12px;
      line-height: 1;
    }
    .toolbar-utils-submenu-caret {
      color: rgba(255,255,255,0.55);
      font-size: 10px;
      line-height: 1;
      margin-top: 2px;
    }
    #toolbar-utils-panel #eth-toggle-btn {
      justify-content: flex-start;
    }
    #toolbar-utils-panel #eth-toggle-btn.active {
      color: var(--tos-up);
      background: rgba(38,166,154,0.12);
    }
    #toolbar-utils-panel #eth-toggle-btn.eth-unavailable,
    #toolbar-utils-panel #eth-toggle-btn.eth-unavailable:hover {
      color: #8f94a0;
      background: var(--tos-bg-subtle);
    }
    .interaction-mode-picker {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
    }

    @media (max-width: 1680px) {
      .ohlc-header { max-width: 30vw; }
      .ticker-label { min-width: 108px; }
    }

    @media (max-width: 1480px) {
      .toolbar {
        padding: 0 6px;
        gap: 2px;
      }
      .ohlc-header { display: none; }
      .daily-change { display: none; }
      .zoom-btn,
      .draw-btn,
      .draw-clear-btn,
      .range-btn,
      .tf-toolbar-btn,
      .interval-toolbar-btn,
      .interval-dropdown-btn {
        font-size: 14px;
        min-width: 26px;
        width: auto;
        height: 26px;
      }
      .zoom-btn,
      .draw-btn,
      .draw-clear-btn,
      .range-btn {
        padding: 2px 7px;
      }
      .ticker-label {
        min-width: 96px;
        font-size: 13px;
        margin-right: 2px;
        padding: 6px 10px 6px 8px;
      }
    }
    .interaction-mode-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      justify-content: space-between;
      flex-wrap: nowrap;
      white-space: nowrap;
      min-width: max-content;
    }
    #interaction-mode-btn-label {
      display: inline-block;
      width: 10ch;
      text-align: left;
      white-space: nowrap;
      line-height: 1;
    }
    .interaction-mode-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      min-width: 142px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1600;
      padding: 4px 0;
    }
    .interaction-mode-option {
      width: 100%;
      border: none;
      background: none;
      color: var(--tos-text-secondary);
      padding: 9px 12px;
      text-align: left;
      font-size: 13px;
      font-family: inherit;
      cursor: pointer;
    }
    .interaction-mode-option:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .interaction-mode-option.active {
      color: var(--tos-accent);
    }
    /* Timezone selector submenu */
    .tz-panel {
      position: absolute;
      top: -4px;
      left: calc(100% + 4px);
      min-width: 220px;
      max-height: 360px;
      background: var(--tos-bg-popup);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      box-shadow: var(--tos-shadow-popup);
      z-index: 1610;
      padding: 4px 0;
      display: flex;
      flex-direction: column;
    }
    .tz-options {
      overflow-y: auto;
      max-height: 290px;
    }
    .tz-options::-webkit-scrollbar { width: 6px; }
    .tz-options::-webkit-scrollbar-track { background: transparent; }
    .tz-options::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--tos-radius-sm); }
    .tz-options::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
    .tz-section-label {
      padding: 6px 12px 3px;
      font-size: 10px;
      font-weight: 600;
      color: rgba(255,255,255,0.35);
      text-transform: none;
      letter-spacing: 0.05em;
    }
    .tz-option {
      width: 100%;
      border: none;
      background: none;
      color: var(--tos-text-secondary);
      padding: 8px 12px;
      text-align: left;
      font-size: 13px;
      font-family: inherit;
      cursor: pointer;
    }
    .tz-option:hover {
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .tz-option.active {
      color: var(--tos-accent);
    }
    .tz-empty {
      padding: 12px;
      color: rgba(255,255,255,0.3);
      font-size: 12px;
      text-align: center;
    }

    .grid-toggle-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 2px 8px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 16px;
      cursor: pointer;
      transition: all 0.1s;
    }
    .grid-toggle-btn:hover { color: var(--tos-text-bright); border-color: var(--tos-border-strong); }
    .grid-toggle-btn.active { color: var(--tos-text-bright); background: var(--tos-bg-active); border-color: var(--tos-border-strong); }
    .draw-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 3px 8px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 16px;
      font-weight: 400;
      cursor: pointer;
      transition: all 0.1s;
      min-width: 26px;
      text-align: center;
    }
    .draw-btn:hover { color: var(--tos-text-bright); border-color: var(--tos-border-strong); }
    .draw-btn.active { color: var(--tos-accent); border-color: var(--tos-accent); background: var(--tos-accent-bg); }
    .draw-clear-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-primary);
      padding: 3px 6px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 16px;
      cursor: pointer;
      transition: all 0.1s;
    }
    .draw-clear-btn:hover { color: #ff5252; border-color: rgba(255,82,82,0.3); }
    .draw-group {
      position: relative;
      display: inline-flex;
    }
    .draw-group-trigger {
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }
    .draw-caret {
      font-size: 8px;
      opacity: 0.7;
      color: var(--tos-text-primary);
    }
    .draw-dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      margin-top: 2px;
      background: var(--tos-bg-surface);
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-lg);
      padding: 4px 0;
      z-index: 500;
      box-shadow: var(--tos-shadow-md);
      min-width: 260px;
      white-space: nowrap;
      overflow-y: auto;
      max-height: calc(100vh - 80px);
    }
    .draw-dropdown.visible { display: block; }
    .draw-dropdown-header {
      padding: 10px 16px 6px;
      font-size: 11px;
      font-weight: 600;
      color: var(--tos-text-muted);
      letter-spacing: 0.8px;
      text-transform: none;
    }
    .draw-dropdown-sep {
      height: 1px;
      background: var(--tos-bg-active);
      margin: 4px 0;
    }
    .draw-dropdown-item {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 10px 16px;
      background: none;
      border: none;
      color: var(--tos-text-primary);
      font-family: inherit;
      font-size: 14px;
      text-align: left;
      cursor: pointer;
    }
    .draw-dropdown-item:hover { background: var(--tos-bg-hover); color: var(--tos-text-bright); }
    .draw-dropdown-item.active { color: var(--tos-accent); }
    .drawing-text-editor {
      position: absolute;
      z-index: 15;
      background: transparent;
      color: #fff;
      border: none;
      border-radius: 0;
      font: 14px sans-serif;
      padding: 4px;
      min-width: 1px;
      max-width: none;
      resize: both;
      outline: none;
      overflow: auto;
      line-height: 1.3;
      box-shadow: none;
      caret-color: currentColor;
      white-space: pre;
      overflow-wrap: normal;
      word-break: normal;
    }
    .drawing-text-editor:focus {
      border: none;
      box-shadow: none;
    }
    .draw-dropdown-item-label {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .draw-fav-star {
      width: 22px;
      height: 22px;
      border: none;
      border-radius: var(--tos-radius-sm);
      background: transparent;
      color: var(--tos-text-dim);
      font-family: inherit;
      font-size: 15px;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      padding: 0;
      margin-left: auto;
    }
    .draw-fav-star:hover { color: #f5c842; }
    .draw-fav-star.active {
      color: #f5c842;
    }
    .draw-tool-icon {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
      flex-shrink: 0;
      vertical-align: middle;
    }
    .draw-dropdown-item-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      width: 28px;
      height: 28px;
    }
    .draw-dropdown-item-icon .draw-tool-icon {
      width: 22px;
      height: 22px;
    }
    .toolbar-label {
      font-size: 16px;
      color: var(--tos-text-primary);
      margin-right: 4px;
      text-transform: none;
      letter-spacing: 0.5px;
    }
    .expansion-label {
      font-size: 16px;
      color: var(--tos-text-primary);
      margin-left: 2px;
    }
    .stepper {
      display: flex;
      align-items: center;
      border: 1px solid var(--tos-border-sep);
      border-radius: var(--tos-radius-sm);
      overflow: hidden;
    }
    .stepper-btn {
      background: var(--tos-bg-hover);
      border: none;
      color: var(--tos-text-secondary);
      width: 28px;
      height: 28px;
      font-family: inherit;
      font-size: 16px;
      font-weight: 400;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }
    .stepper-btn:hover { background: rgba(255,255,255,0.12); color: var(--tos-text-bright); }
    .stepper-btn:active { background: rgba(255,255,255,0.18); }
    .stepper-val {
      width: 36px;
      height: 28px;
      text-align: center;
      font-family: inherit;
      font-size: 14px;
      color: var(--tos-text-secondary);
      background: var(--tos-bg-subtle);
      border: none;
      border-left: 1px solid var(--tos-border-sep);
      border-right: 1px solid var(--tos-border-sep);
      outline: none;
      -moz-appearance: textfield;
    }
    .stepper-val::-webkit-outer-spin-button,
    .stepper-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .stepper-val:focus { background: var(--tos-bg-active); }

    .color-swatch-btn {
      width: 26px;
      height: 26px;
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      cursor: pointer;
      padding: 0;
      flex-shrink: 0;
    }
    .color-swatch-btn:hover { border-color: rgba(255,255,255,0.5); }
    .swatch-label {
      font-size: 13px;
      color: #999;
    }
    .settings-panel {
      position: fixed;
      background: var(--tos-bg-dialog);
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-xl);
      z-index: 1000;
      box-shadow: var(--tos-shadow-dialog);
      display: none;
      width: 780px;
      height: 600px;
    }
    .settings-panel.visible { display: flex; flex-direction: column; height: 600px; }
    .settings-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 28px 14px;
      border-bottom: 1px solid var(--tos-border-sep);
      cursor: grab;
      user-select: none;
    }
    .settings-header:active { cursor: grabbing; }
    .settings-title {
      font-size: 20px;
      font-weight: 600;
      color: var(--tos-text-bright);
    }
    .settings-close {
      background: none;
      border: none;
      color: var(--tos-text-muted);
      font-size: 24px;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
    }
    .settings-close:hover { color: var(--tos-text-bright); }
    .settings-layout {
      display: flex;
      flex: 1;
      min-height: 0;
    }
    .settings-nav {
      width: 170px;
      border-right: 1px solid var(--tos-border-sep);
      padding: 12px 0;
      flex-shrink: 0;
    }
    .settings-nav-item {
      display: block;
      width: 100%;
      padding: 10px 24px;
      background: none;
      border: none;
      border-left: 3px solid transparent;
      color: var(--tos-text-muted);
      font-family: inherit;
      font-size: 15px;
      text-align: left;
      cursor: pointer;
      transition: all 0.1s;
    }
    .settings-nav-item:hover { color: var(--tos-text-secondary); background: var(--tos-bg-subtle); }
    .settings-nav-item.active {
      color: var(--tos-text-bright);
      border-left-color: var(--tos-accent);
      background: rgba(255,255,255,0.05);
    }
    .settings-content {
      flex: 1;
      padding: 20px 28px 24px;
      overflow-y: auto;
    }
    .settings-content::-webkit-scrollbar { width: 6px; }
    .settings-content::-webkit-scrollbar-track { background: transparent; }
    .settings-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--tos-radius-sm); }
    .settings-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
    .settings-page { display: none; }
    .settings-page.active { display: block; }
    .settings-ct-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      max-width: 420px;
    }
    .settings-ct-option {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--tos-bg-subtle);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 15px;
      text-align: left;
      padding: 10px 12px;
      cursor: pointer;
      transition: all 0.1s;
    }
    .settings-ct-option .ct-option-icon {
      width: 18px;
      height: 14px;
      flex-shrink: 0;
    }
    .settings-ct-option:hover {
      border-color: var(--tos-border-strong);
      color: var(--tos-text-bright);
      background: var(--tos-bg-active);
    }
    .settings-ct-option.active {
      color: var(--tos-accent);
      border-color: rgba(41, 98, 255, 0.5);
      background: rgba(41, 98, 255, 0.12);
    }
    .settings-section-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--tos-text-muted);
      text-transform: none;
      letter-spacing: 1px;
      margin: 0 0 14px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .settings-section-label:not(:first-child) { margin-top: 24px; }
    .settings-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
    }
    .settings-row-label {
      font-size: 15px;
      color: var(--tos-text-secondary);
    }
    .settings-row-controls {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .settings-action-btn {
      min-height: 30px;
      padding: 0 12px;
      border: 1px solid rgba(138,155,122,0.42);
      border-radius: var(--tos-radius-md);
      background: linear-gradient(180deg, rgba(138,155,122,0.24), rgba(90,107,74,0.18));
      color: var(--tos-text-primary);
      font-family: inherit;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.02em;
      cursor: pointer;
      transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
    }
    .settings-action-btn:hover {
      border-color: rgba(138,155,122,0.62);
      background: linear-gradient(180deg, rgba(138,155,122,0.32), rgba(90,107,74,0.24));
    }
    .settings-action-btn:active {
      transform: translateY(1px);
    }
    .settings-select {
      min-width: 76px;
      height: 28px;
      padding: 0 8px;
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      background: var(--tos-bg-panel);
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      outline: none;
    }
    .settings-select:focus { border-color: rgba(255,255,255,0.35); }
    .settings-row-hint {
      font-size: 12px;
      color: var(--tos-text-dim);
      margin-top: 2px;
    }
    .settings-toggle {
      position: relative;
      width: 40px;
      height: 22px;
      background: rgba(255,255,255,0.1);
      border-radius: 11px;
      border: none;
      cursor: pointer;
      padding: 0;
      transition: background 0.2s;
    }
    .settings-toggle.active { background: var(--tos-accent); }
    .settings-toggle::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 16px;
      height: 16px;
      background: #fff;
      border-radius: 50%;
      transition: transform 0.2s;
    }
    .settings-toggle.active::after { transform: translateX(18px); }
    .settings-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      padding: 14px 28px;
      border-top: 1px solid var(--tos-border-sep);
    }
    .settings-cancel-btn {
      background: none;
      border: 1px solid var(--tos-border-light);
      color: var(--tos-text-secondary);
      padding: 8px 24px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.1s;
    }
    .settings-cancel-btn:hover { color: var(--tos-text-bright); border-color: rgba(255,255,255,0.3); }
    .settings-ok-btn {
      background: #fff;
      border: 1px solid #fff;
      color: #000;
      padding: 8px 28px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.1s;
    }
    .settings-ok-btn:hover { background: #E0E0E0; border-color: var(--tos-text-bright); }
    .tuning-panel {
      position: fixed;
      bottom: 10px;
      left: 10px;
      background: var(--tos-bg-float);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-lg);
      padding: 14px 18px;
      z-index: 2000;
      font-size: 12px;
      color: var(--tos-text-secondary);
      min-width: 320px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    }
    .tuning-panel h3 {
      margin: 0 0 10px;
      font-size: 13px;
      color: var(--tos-text-bright);
      font-weight: 600;
      border-bottom: 1px solid var(--tos-border);
      padding-bottom: 8px;
    }
    .tuning-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      gap: 12px;
    }
    .tuning-row label {
      flex-shrink: 0;
      min-width: 100px;
    }
    .tuning-row input[type="range"] {
      flex: 1;
      accent-color: var(--tos-accent);
    }
    .tuning-row .tuning-val {
      min-width: 60px;
      text-align: right;
      font-family: Menlo, Consolas, monospace;
      font-size: 11px;
      color: #69F0AE;
    }
    .tuning-row select {
      background: var(--tos-bg-input);
      border: 1px solid var(--tos-border-light);
      color: var(--tos-text-secondary);
      padding: 3px 6px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 12px;
    }
    .swatch-popup {
      position: fixed;
      background: var(--tos-bg-panel);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      padding: 8px;
      z-index: 2100;
      box-shadow: var(--tos-shadow-sm);
      display: none;
    }
    .swatch-popup.visible { display: block; }
    .swatch-grid {
      display: grid;
      grid-template-columns: repeat(8, 22px);
      gap: 3px;
    }
    .swatch-cell {
      width: 22px;
      height: 22px;
      border: 1px solid var(--tos-border-light);
      border-radius: 2px;
      cursor: pointer;
      padding: 0;
      background: none;
    }
    .swatch-cell:hover { border-color: var(--tos-text-bright); }
    .swatch-hex-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--tos-border-sep);
    }
    .swatch-hex-label {
      font-size: 14px;
      color: var(--tos-text-muted);
      flex-shrink: 0;
    }
    .swatch-hex-input {
      width: 100px;
      height: 28px;
      font-family: monospace;
      font-size: 14px;
      color: var(--tos-text-secondary);
      background: var(--tos-bg-subtle);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      padding: 2px 6px;
      outline: none;
      text-transform: uppercase;
    }
    .swatch-hex-input:focus {
      background: var(--tos-bg-active);
      border-color: var(--tos-accent);
    }
    .swatch-hex-input.invalid {
      border-color: #EF5350;
      color: #EF5350;
    }
    .swatch-picker-section {
      margin-top: 6px;
    }
    .swatch-picker-toggle {
      display: block;
      width: 100%;
      padding: 4px 0;
      background: none;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-sm);
      color: var(--tos-text-muted);
      font-family: inherit;
      font-size: 11px;
      cursor: pointer;
      text-align: center;
    }
    .swatch-picker-toggle:hover { color: var(--tos-text-secondary); border-color: var(--tos-border-strong); }
    .swatch-custom-popup {
      position: fixed;
      background: var(--tos-bg-panel);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      padding: 14px;
      z-index: 2200;
      box-shadow: var(--tos-shadow-sm);
      display: none;
      width: 640px;
      box-sizing: border-box;
    }
    .swatch-custom-popup.visible { display: block; }
    .swatch-custom-header {
      cursor: grab;
      margin: -14px -14px 10px;
      padding: 14px 14px;
      min-height: 8px;
      border-bottom: 1px solid var(--tos-border-sep);
      border-radius: var(--tos-radius-md) var(--tos-radius-md) 0 0;
      user-select: none;
      -webkit-user-select: none;
    }
    .swatch-custom-header:active { cursor: grabbing; }

    /* ── RGBA tab: two-column layout (ToS-style) ── */
    .swatch-rgba-layout {
      display: flex;
      gap: 12px;
      align-items: stretch;
    }
    .swatch-rgba-sv {
      display: block;
      width: 240px;
      height: 240px;
      border-radius: 2px;
      cursor: crosshair;
      flex-shrink: 0;
    }
    .swatch-rgba-hue-vert {
      display: block;
      width: 24px;
      height: 240px;
      border-radius: 2px;
      cursor: pointer;
      flex-shrink: 0;
    }
    .swatch-rgba-sliders {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 20px;
      min-width: 0;
    }
    .swatch-rgba-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .swatch-rgba-label {
      width: 46px;
      font-size: 14px;
      color: var(--tos-text-muted);
      flex-shrink: 0;
      text-align: left;
    }
    .swatch-rgba-slider {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 6px;
      border-radius: 3px;
      outline: none;
      cursor: pointer;
      background: var(--tos-bg-subtle);
    }
    .swatch-rgba-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--tos-accent);
      border: 2px solid #fff;
      box-shadow: 0 0 3px rgba(0,0,0,0.5);
      cursor: pointer;
    }
    .swatch-rgba-slider::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--tos-accent);
      border: 2px solid #fff;
      box-shadow: 0 0 3px rgba(0,0,0,0.5);
      cursor: pointer;
    }
    .swatch-rgba-num {
      width: 58px;
      height: 34px;
      text-align: center;
      font-family: monospace;
      font-size: 16px;
      color: var(--tos-text-secondary);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      padding: 2px 4px;
      background: var(--tos-bg-subtle);
      outline: none;
      -moz-appearance: textfield;
    }
    .swatch-rgba-num::-webkit-outer-spin-button,
    .swatch-rgba-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .swatch-rgba-num:focus { background: var(--tos-bg-active); border-color: var(--tos-accent); }
    .swatch-preview-pair {
      display: flex;
      flex-shrink: 0;
      border: 1px solid var(--tos-border-light);
      border-radius: 2px;
      overflow: hidden;
    }
    .swatch-preview-old, .swatch-preview-new {
      width: 22px;
      height: 28px;
    }
    .swatch-preview-old {
      border-right: 1px solid var(--tos-border-light);
    }
    .swatch-copy-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      background: none;
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      color: var(--tos-text-muted);
      cursor: pointer;
      flex-shrink: 0;
      padding: 0;
    }
    .swatch-copy-btn:hover { color: var(--tos-text-secondary); border-color: var(--tos-text-muted); }
    .swatch-copy-btn.copied { color: #4CAF50; border-color: #4CAF50; }

    .swatch-btn-row {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 10px 12px 12px;
      border-top: 1px solid var(--tos-border-sep);
      margin-top: 8px;
    }
    .swatch-btn {
      padding: 6px 20px;
      border-radius: 4px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid var(--tos-border-light);
    }
    .swatch-btn-cancel {
      background: var(--tos-bg-subtle);
      color: var(--tos-text-secondary);
    }
    .swatch-btn-cancel:hover {
      background: var(--tos-bg-active);
      color: var(--tos-text-bright);
    }
    .swatch-btn-ok {
      background: #1b6e2d;
      color: #fff;
      border-color: #1b6e2d;
    }
    .swatch-btn-ok:hover {
      background: #22883a;
    }

    .opacity-section {
      display: none;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid var(--tos-border-sep);
    }
    .opacity-section.visible { display: block; }
    .opacity-label {
      font-size: 11px;
      color: var(--tos-text-muted);
      margin-bottom: 6px;
    }
    .opacity-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .opacity-slider {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 14px;
      border-radius: 7px;
      outline: none;
      cursor: pointer;
      background:
        linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1)),
        repeating-conic-gradient(#333 0% 25%, #555 0% 50%) 0 0 / 8px 8px;
    }
    .opacity-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #fff;
      border: 2px solid #000;
      box-shadow: 0 0 3px rgba(0,0,0,0.5);
      cursor: pointer;
    }
    .opacity-slider::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #fff;
      border: 2px solid #000;
      box-shadow: 0 0 3px rgba(0,0,0,0.5);
      cursor: pointer;
    }
    .opacity-readout {
      width: 48px;
      height: 24px;
      text-align: center;
      font-family: inherit;
      font-size: 13px;
      color: var(--tos-text-secondary);
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      padding: 2px 4px;
      background: var(--tos-bg-subtle);
      outline: none;
      -moz-appearance: textfield;
    }
    .opacity-readout::-webkit-outer-spin-button,
    .opacity-readout::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .opacity-readout:focus { background: var(--tos-bg-active); }

    /* ── Ticker Search Modal (TradingView-style) ── */
    .ticker-search-backdrop {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.6);
      z-index: 2000;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding-top: 10vh;
    }
    .ticker-search-backdrop.visible { display: flex; }
    .ticker-search {
      background: var(--tos-bg-dialog);
      border: 1px solid var(--tos-border);
      border-radius: 10px;
      width: 820px;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      box-shadow: var(--tos-shadow-dialog);
      overflow: hidden;
    }
    .ticker-search-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 14px;
    }
    .ticker-search-title {
      font-size: 22px;
      font-weight: 600;
      color: var(--tos-text-primary);
    }
    .ticker-search-close {
      background: none;
      border: none;
      color: var(--tos-text-muted);
      font-size: 24px;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
    }
    .ticker-search-close:hover { color: var(--tos-text-primary); }

    .supabase-migration-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2200;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.62);
      padding: 16px;
    }
    .supabase-migration-modal {
      width: min(460px, 100%);
      border: 1px solid var(--tos-border);
      border-radius: 10px;
      background: var(--tos-bg-dialog);
      box-shadow: var(--tos-shadow-dialog);
      padding: 18px 18px 16px;
      color: var(--tos-text-primary);
      font-family: var(--tos-font-ui);
    }
    .supabase-migration-title {
      font-size: 20px;
      line-height: 1.2;
      margin: 0 0 10px;
      color: var(--tos-text-bright);
      font-weight: 600;
    }
    .supabase-migration-body {
      font-size: 13px;
      line-height: 1.45;
      color: var(--tos-text-secondary);
      margin: 0 0 14px;
    }
    .supabase-migration-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .supabase-migration-btn {
      width: 100%;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-md);
      background: var(--tos-bg-field);
      color: var(--tos-text-primary);
      font-size: 13px;
      font-family: inherit;
      text-align: left;
      padding: 10px 12px;
      cursor: pointer;
      transition: border-color 0.1s, background 0.1s, color 0.1s;
    }
    .supabase-migration-btn:hover {
      border-color: var(--tos-border-strong);
      color: var(--tos-text-bright);
      background: var(--tos-bg-field-hover);
    }
    .supabase-migration-btn.primary {
      border-color: var(--tos-accent-border);
      background: var(--tos-accent-bg);
      color: var(--tos-text-bright);
    }
    .supabase-migration-btn.primary:hover {
      border-color: var(--tos-accent-border-strong);
      background: var(--tos-accent-bg-strong);
    }
    .supabase-migration-btn.subtle {
      color: var(--tos-text-muted);
    }

    /* Input row with search icon */
    .ticker-search-input-wrap {
      display: flex;
      align-items: center;
      padding: 0 20px;
      border-top: 1px solid rgba(255,255,255,0.06);
      border-bottom: 1px solid rgba(255,255,255,0.06);
      background: var(--tos-bg-chart);
    }
    .ticker-search-input-icon {
      color: var(--tos-text-muted);
      flex-shrink: 0;
      margin-right: 10px;
    }
    .ticker-search input {
      flex: 1;
      padding: 16px 0;
      background: transparent;
      border: none;
      color: var(--tos-text-primary);
      font-size: 18px;
      outline: none;
      font-family: var(--tos-font-ui);
    }
    .ticker-search input::placeholder { color: var(--tos-text-dim); font-size: 18px; }

    /* Filter chips */
    .ticker-search-filters {
      display: flex;
      gap: 6px;
      padding: 10px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      flex-wrap: wrap;
    }
    .ticker-filter-chip {
      background: transparent;
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-pill);
      color: var(--tos-text-muted);
      font-size: 12px;
      padding: 4px 14px;
      cursor: pointer;
      transition: all 0.12s;
      font-family: inherit;
    }
    .ticker-filter-chip:hover {
      color: var(--tos-text-primary);
      border-color: rgba(255,255,255,0.3);
    }
    .ticker-filter-chip.active {
      background: rgba(41,98,255,0.15);
      border-color: #2962ff;
      color: #2962ff;
    }

    /* Results list */
    .ticker-results {
      flex: 1;
      overflow-y: auto;
    }
    .ticker-results::-webkit-scrollbar { width: 6px; }
    .ticker-results::-webkit-scrollbar-track { background: transparent; }
    .ticker-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--tos-radius-sm); }
    .ticker-result-row {
      display: flex;
      align-items: center;
      padding: 12px 24px;
      cursor: pointer;
      gap: 14px;
      transition: background 0.08s;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .ticker-result-row:hover, .ticker-result-row.active {
      background: var(--tos-bg-hover);
    }
    .ticker-result-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      font-weight: 700;
      color: var(--tos-text-bright);
      flex-shrink: 0;
    }
    .ticker-result-avatar.has-logo {
      border-radius: 0;
      background: transparent !important;
    }
    .ticker-result-avatar.has-logo img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }
    .ticker-result-info {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: baseline;
      gap: 12px;
    }
    .ticker-result-symbol {
      font-size: 17px;
      font-weight: 700;
      color: var(--tos-text-primary);
      flex-shrink: 0;
    }
    .ticker-result-name {
      font-size: 15px;
      color: var(--tos-text-muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .ticker-result-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .ticker-result-type {
      font-size: 11px;
      color: var(--tos-text-muted);
    }
    .ticker-result-exchange {
      font-size: 12px;
      font-weight: 600;
      color: var(--tos-text-primary);
    }
    .ticker-result-msg {
      padding: 14px 20px;
      font-size: 14px;
      color: var(--tos-text-muted);
    }

    #main-content {
      display: flex;
      height: calc(100vh - var(--tos-toolbar-height));
      background: var(--prepaint-workspace-bg, #04052d);
    }
    #chart-container {
      flex: 1;
      min-width: 0;
      height: 100%;
      position: relative;
    }
    :root[data-theme="dark"][data-market-weather] #chart-container {
      background: linear-gradient(180deg, #07162f 0%, #0b303d 100%);
    }
    .market-weather-root { contain: strict; }
    #chart-container.market-weather-active .mc-grid,
    #chart-container.market-weather-active .mc-slot {
      background: transparent;
    }
    .market-weather-picker {
      position: absolute;
      right: 82px;
      top: 10px;
      z-index: 110;
      color: #d9e8ef;
      font: 11px/1.25 var(--tos-font-ui);
      pointer-events: auto;
    }
    .market-weather-picker[hidden],
    .market-weather-menu[hidden] { display: none !important; }
    .market-weather-picker button {
      color: inherit;
      font: inherit;
    }
    .market-weather-trigger {
      min-width: 154px;
      height: 29px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 7px;
      padding: 0 9px;
      border: 1px solid rgba(148, 184, 202, 0.3);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(9, 21, 38, 0.88), rgba(3, 12, 26, 0.9));
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.035);
      backdrop-filter: blur(12px) saturate(125%);
      cursor: pointer;
      transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
    }
    .market-weather-trigger:hover,
    .market-weather-picker.open .market-weather-trigger {
      border-color: rgba(103, 232, 222, 0.45);
      background: linear-gradient(180deg, rgba(13, 32, 49, 0.94), rgba(4, 17, 31, 0.94));
    }
    .market-weather-trigger:active { transform: translateY(1px); }
    .market-weather-trigger-kicker {
      color: #5f8595;
      font-size: 8px;
      font-weight: 800;
      letter-spacing: 0.11em;
    }
    .market-weather-trigger-label {
      overflow: hidden;
      color: #e8f8fa;
      font-weight: 650;
      text-align: left;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .market-weather-chevron {
      color: #78a9b6;
      font-size: 13px;
      transition: transform 140ms ease;
    }
    .market-weather-picker.open .market-weather-chevron { transform: rotate(180deg); }
    .market-weather-menu {
      position: absolute;
      right: 0;
      top: 36px;
      width: 342px;
      padding: 12px;
      border: 1px solid rgba(130, 174, 194, 0.28);
      border-radius: 12px;
      background:
        radial-gradient(circle at 82% 4%, rgba(37, 134, 139, 0.15), transparent 34%),
        rgba(3, 11, 23, 0.95);
      box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.035);
      backdrop-filter: blur(20px) saturate(120%);
    }
    .market-weather-section + .market-weather-section { margin-top: 12px; }
    .market-weather-section-label {
      margin: 0 2px 7px;
      color: #6f91a1;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.11em;
      text-transform: uppercase;
    }
    .market-weather-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 5px;
    }
    .market-weather-option {
      min-width: 0;
      height: 35px;
      display: grid;
      grid-template-columns: 22px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      padding: 0 8px 0 6px;
      overflow: hidden;
      border: 1px solid transparent;
      border-radius: 7px;
      background: rgba(126, 160, 178, 0.055);
      color: #a9c0cb;
      cursor: pointer;
      text-align: left;
      text-overflow: ellipsis;
      white-space: nowrap;
      transition: color 130ms ease, border-color 130ms ease, background 130ms ease;
    }
    .market-weather-option:hover {
      border-color: rgba(114, 188, 194, 0.22);
      background: rgba(96, 165, 171, 0.1);
      color: #e3f0f3;
    }
    .market-weather-option.active {
      border-color: rgba(91, 222, 207, 0.34);
      background: linear-gradient(100deg, rgba(34, 142, 142, 0.22), rgba(53, 101, 147, 0.13));
      color: #e9ffff;
      box-shadow: inset 0 0 0 1px rgba(118, 236, 220, 0.035);
    }
    .market-weather-swatch {
      width: 22px;
      height: 22px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 6px;
      background: linear-gradient(135deg, #28757d, #06172b);
      box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.06);
    }
    .market-weather-option[data-scene="clear-tailwind"] .market-weather-swatch { background: linear-gradient(145deg, #5ab6c0, #12354c 60%, #061b31); }
    .market-weather-option[data-scene="dawn-break"] .market-weather-swatch { background: linear-gradient(145deg, #ffbb79, #9e5e73 48%, #18314a); }
    .market-weather-option[data-scene="crosswind-overcast"] .market-weather-swatch { background: linear-gradient(145deg, #8ba0ad, #3c5362 48%, #101d2d); }
    .market-weather-option[data-scene="rolling-fog"] .market-weather-swatch { background: linear-gradient(145deg, #87aeb4, #35545f 52%, #102735); }
    .market-weather-option[data-scene="electric-storm"] .market-weather-swatch { background: linear-gradient(145deg, #9d8cff, #263e6c 47%, #080d22); }
    .market-weather-option[data-scene="aurora-night"] .market-weather-swatch { background: linear-gradient(145deg, #6df2cc, #516ac4 50%, #120f34); }
    .market-weather-option[data-scene="neon-city"] .market-weather-swatch { background: linear-gradient(145deg, #ff4dd2, #273aa9 48%, #06112e); }
    .market-weather-option[data-scene="bioluminescent-ocean"] .market-weather-swatch { background: linear-gradient(145deg, #52f0e0, #096b96 52%, #03182e); }
    .market-weather-option[data-scene="orbital-exchange"] .market-weather-swatch { background: radial-gradient(circle at 70% 30%, #ffc36b 0 7%, transparent 9%), linear-gradient(145deg, #5472cf, #111c46 52%, #050817); }
    .market-weather-option[data-scene="foundry-core"] .market-weather-swatch { background: linear-gradient(145deg, #ffbd59, #b54e28 48%, #2c1719); }
    .market-weather-controls {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 8px;
      margin-top: 12px;
      padding-top: 10px;
      border-top: 1px solid rgba(132, 168, 185, 0.16);
    }
    .market-weather-auto {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 6px 8px;
      border: 1px solid transparent;
      border-radius: 7px;
      background: rgba(111, 143, 158, 0.055);
      color: #afc3cc;
      cursor: pointer;
      text-align: left;
    }
    .market-weather-auto:hover,
    .market-weather-auto.active {
      border-color: rgba(88, 211, 198, 0.24);
      background: rgba(39, 135, 136, 0.14);
      color: #e7fbfb;
    }
    .market-weather-auto span:first-child { display: grid; gap: 2px; }
    .market-weather-auto strong { font-size: 10px; font-weight: 700; }
    .market-weather-auto small { color: #638392; font-size: 8px; }
    .market-weather-toggle-state {
      min-width: 26px;
      padding: 3px 5px;
      border-radius: 999px;
      background: rgba(96, 125, 140, 0.16);
      color: #7996a3;
      font-size: 8px;
      font-weight: 800;
      text-align: center;
      text-transform: uppercase;
    }
    .market-weather-auto.active .market-weather-toggle-state {
      background: rgba(58, 195, 178, 0.2);
      color: #75e6d7;
    }
    .market-weather-intensity {
      display: inline-flex;
      padding: 2px;
      border: 1px solid rgba(126, 160, 177, 0.15);
      border-radius: 7px;
      background: rgba(0, 0, 0, 0.2);
    }
    .market-weather-intensity button {
      border: 0;
      border-radius: 5px;
      padding: 6px 7px;
      background: transparent;
      color: #6f8e9c;
      cursor: pointer;
      font-size: 8px;
      font-weight: 700;
    }
    .market-weather-intensity button:hover { color: #c5dbe3; }
    .market-weather-intensity button.active {
      background: rgba(56, 128, 135, 0.28);
      color: #dff8f7;
    }
    .market-weather-picker button:focus-visible {
      outline: 2px solid rgba(94, 234, 212, 0.72);
      outline-offset: 2px;
    }
    @media (max-width: 760px) {
      .market-weather-picker { right: 52px; }
      .market-weather-menu { width: min(342px, calc(100vw - 70px)); }
    }
    @media (prefers-reduced-motion: reduce) {
      .market-weather-picker *,
      .market-weather-picker *::before,
      .market-weather-picker *::after { transition-duration: 0.01ms !important; }
    }
    #chart-container.company-world-mounted .market-weather-picker {
      display: none !important;
    }
    .company-world-controls {
      position: absolute;
      top: 9px;
      right: 76px;
      z-index: 122;
      display: flex;
      align-items: stretch;
      max-width: calc(100% - 94px);
      overflow: hidden;
      border: 1px solid rgba(123, 182, 204, 0.28);
      border-radius: 10px;
      background: linear-gradient(180deg, rgba(7, 19, 35, 0.94), rgba(2, 10, 23, 0.94));
      box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.035);
      color: #dcecf1;
      font: 10px/1.25 var(--tos-font-ui);
      backdrop-filter: blur(16px) saturate(120%);
    }
    .company-world-controls[hidden] { display: none !important; }
    .company-world-identity {
      min-width: 0;
      display: grid;
      grid-template-columns: auto auto minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      max-width: 390px;
      padding: 6px 10px;
      border-right: 1px solid rgba(118, 169, 190, 0.16);
      background: radial-gradient(circle at 8% 20%, rgba(84, 198, 209, 0.11), transparent 54%);
    }
    .company-world-kicker {
      color: #6e98aa;
      font-size: 7px;
      font-weight: 850;
      letter-spacing: 0.13em;
      white-space: nowrap;
    }
    .company-world-identity strong {
      color: #eaffff;
      font-size: 11px;
      letter-spacing: 0.04em;
    }
    .company-world-identity-copy {
      overflow: hidden;
      color: #8da8b4;
      font-size: 8px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .company-world-modes {
      display: flex;
      align-items: center;
      gap: 2px;
      padding: 3px;
      white-space: nowrap;
    }
    .company-world-modes button,
    .company-world-levels button,
    .company-world-panel-actions button {
      border: 1px solid transparent;
      border-radius: 6px;
      background: transparent;
      color: #7897a5;
      cursor: pointer;
      font: 700 8px/1 var(--tos-font-ui);
      transition: color 130ms ease, border-color 130ms ease, background 130ms ease, transform 130ms ease;
    }
    .company-world-modes button {
      min-height: 25px;
      padding: 0 7px;
    }
    .company-world-modes button:hover,
    .company-world-levels button:hover,
    .company-world-panel-actions button:hover {
      color: #d9f2f3;
      background: rgba(86, 151, 161, 0.12);
    }
    .company-world-modes button.active,
    .company-world-levels button.active {
      border-color: rgba(93, 223, 207, 0.3);
      background: linear-gradient(110deg, rgba(35, 146, 145, 0.28), rgba(61, 91, 160, 0.18));
      color: #e7ffff;
      box-shadow: inset 0 0 0 1px rgba(115, 237, 222, 0.025);
    }
    .company-world-controls button:focus-visible,
    .company-world-hotspot:focus-visible,
    .company-world-panel button:focus-visible,
    .company-world-source-link:focus-visible,
    .company-world-sources summary:focus-visible {
      outline: 2px solid rgba(92, 234, 216, 0.8);
      outline-offset: 2px;
    }
    .company-world-hotspots {
      position: absolute;
      inset: 0;
      z-index: 52;
      overflow: hidden;
      pointer-events: none;
    }
    .company-world-hotspots[hidden] { display: none !important; }
    .company-world-hotspots.interactive {
      pointer-events: auto;
      cursor: default;
    }
    .company-world-hotspot {
      position: absolute;
      display: grid;
      place-items: center;
      padding: 0;
      border: 1px solid rgba(102, 222, 211, 0.16);
      border-radius: 15px;
      background: radial-gradient(circle at 50% 50%, rgba(65, 200, 195, 0.09), rgba(31, 87, 119, 0.025) 60%, transparent 74%);
      box-shadow: inset 0 0 24px rgba(64, 222, 210, 0.025);
      color: #e8ffff;
      cursor: pointer;
      opacity: 0;
      pointer-events: none;
      transform: scale(0.985);
      transition: opacity 180ms ease, border-color 150ms ease, background 150ms ease, transform 180ms ease, box-shadow 150ms ease;
    }
    .company-world-hotspots.interactive .company-world-hotspot {
      opacity: 1;
      pointer-events: auto;
      transform: scale(1);
    }
    .company-world-hotspot:hover,
    .company-world-hotspot:focus-visible,
    .company-world-hotspot.selected {
      border-color: rgba(105, 240, 221, 0.52);
      background: radial-gradient(circle at 50% 50%, rgba(59, 202, 194, 0.2), rgba(50, 100, 152, 0.08) 62%, transparent 78%);
      box-shadow: inset 0 0 34px rgba(67, 232, 215, 0.07), 0 0 20px rgba(41, 190, 180, 0.09);
    }
    .company-world-hotspot.priority-2 {
      border-color: rgba(133, 184, 221, 0.12);
    }
    .company-world-hotspot.priority-3 {
      border-style: dashed;
      opacity: 0.7;
    }
    .company-world-hotspot-marker {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 9px;
      height: 9px;
      border: 1px solid rgba(201, 255, 247, 0.88);
      border-radius: 50%;
      background: #51d7cb;
      box-shadow: 0 0 12px rgba(75, 234, 218, 0.62);
      transform: translate(-50%, -50%);
    }
    .company-world-hotspot-pulse {
      position: absolute;
      inset: -7px;
      border: 1px solid rgba(86, 232, 217, 0.5);
      border-radius: 50%;
      animation: company-world-pulse 2.6s ease-out infinite;
    }
    .company-world-hotspot-label {
      position: absolute;
      left: 50%;
      top: calc(50% + 12px);
      max-width: calc(100% - 10px);
      padding: 3px 6px;
      overflow: hidden;
      border: 1px solid rgba(114, 176, 194, 0.24);
      border-radius: 999px;
      background: rgba(2, 13, 28, 0.82);
      box-shadow: 0 4px 13px rgba(0, 0, 0, 0.26);
      color: #dff8fa;
      font: 750 8px/1 var(--tos-font-ui);
      letter-spacing: 0.02em;
      text-overflow: ellipsis;
      white-space: nowrap;
      transform: translateX(-50%);
    }
    @keyframes company-world-pulse {
      0% { opacity: 0.82; transform: scale(0.72); }
      72%, 100% { opacity: 0; transform: scale(1.55); }
    }
    .company-world-panel {
      position: absolute;
      top: 52px;
      right: 76px;
      z-index: 121;
      width: min(390px, calc(100% - 94px));
      max-height: calc(100% - 70px);
      padding: 15px;
      overflow: auto;
      border: 1px solid rgba(126, 184, 205, 0.28);
      border-radius: 13px;
      background:
        radial-gradient(circle at 95% 0%, rgba(60, 145, 165, 0.15), transparent 34%),
        linear-gradient(180deg, rgba(5, 18, 34, 0.97), rgba(2, 10, 23, 0.97));
      box-shadow: 0 22px 65px rgba(0, 0, 0, 0.55), inset 0 1px rgba(255, 255, 255, 0.035);
      color: #d7e8ed;
      font: 11px/1.48 var(--tos-font-ui);
      scrollbar-color: rgba(100, 151, 169, 0.35) transparent;
      backdrop-filter: blur(22px) saturate(116%);
    }
    .company-world-panel[hidden] { display: none !important; }
    .company-world-panel-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }
    .company-world-panel-heading { min-width: 0; }
    .company-world-eyebrow {
      margin-bottom: 4px;
      color: #62b9bb;
      font-size: 8px;
      font-weight: 850;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }
    .company-world-panel h2 {
      margin: 0;
      color: #f0ffff;
      font-size: 17px;
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: -0.015em;
    }
    .company-world-close {
      flex: 0 0 auto;
      width: 26px;
      height: 26px;
      border: 1px solid rgba(132, 175, 193, 0.2);
      border-radius: 7px;
      background: rgba(78, 108, 124, 0.09);
      color: #8fa9b4;
      cursor: pointer;
      font: 18px/1 var(--tos-font-ui);
    }
    .company-world-close:hover { color: #ffffff; background: rgba(105, 143, 159, 0.15); }
    .company-world-tour-banner {
      display: grid;
      gap: 4px;
      margin: 13px 0 10px;
      padding: 10px 11px;
      border: 1px solid rgba(92, 213, 202, 0.2);
      border-radius: 9px;
      background: linear-gradient(115deg, rgba(35, 142, 144, 0.18), rgba(55, 77, 143, 0.12));
    }
    .company-world-tour-banner strong { color: #defcf8; font-size: 11px; }
    .company-world-tour-banner p { margin: 0; color: #94b4bd; font-size: 9px; }
    .company-world-tour-count {
      color: #5dc9c5;
      font-size: 7px;
      font-weight: 850;
      letter-spacing: 0.11em;
      text-transform: uppercase;
    }
    .company-world-levels {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 3px;
      margin: 13px 0 11px;
      padding: 3px;
      border: 1px solid rgba(113, 153, 170, 0.14);
      border-radius: 8px;
      background: rgba(0, 0, 0, 0.18);
    }
    .company-world-levels button { padding: 7px 6px; }
    .company-world-explanation {
      margin: 0 0 12px;
      color: #c7dce1;
      font-size: 11px;
      line-height: 1.55;
    }
    .company-world-facts {
      display: grid;
      gap: 6px;
      margin-bottom: 11px;
    }
    .company-world-fact {
      display: grid;
      grid-template-columns: auto 1fr;
      align-items: start;
      gap: 7px;
      padding: 8px 9px;
      border: 1px solid rgba(117, 157, 175, 0.13);
      border-radius: 8px;
      background: rgba(104, 137, 151, 0.045);
    }
    .company-world-fact p { margin: 0; color: #aebfc6; font-size: 9px; line-height: 1.46; }
    .company-world-fact-class {
      margin-top: 1px;
      padding: 3px 5px;
      border-radius: 4px;
      background: rgba(71, 169, 166, 0.15);
      color: #67c9c5;
      font-size: 6px;
      font-weight: 850;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }
    .company-world-sources {
      margin: 8px 0 10px;
      border-top: 1px solid rgba(112, 153, 171, 0.13);
      border-bottom: 1px solid rgba(112, 153, 171, 0.13);
    }
    .company-world-sources summary {
      padding: 9px 1px;
      color: #84b8c2;
      cursor: pointer;
      font-size: 9px;
      font-weight: 750;
      list-style-position: inside;
    }
    .company-world-source-list { display: grid; gap: 5px; padding: 0 0 9px; }
    .company-world-source-link {
      display: grid;
      gap: 2px;
      padding: 8px 9px;
      border: 1px solid rgba(117, 166, 184, 0.14);
      border-radius: 7px;
      background: rgba(82, 125, 143, 0.06);
      color: inherit;
      text-decoration: none;
    }
    .company-world-source-link[href]:hover {
      border-color: rgba(88, 211, 201, 0.3);
      background: rgba(63, 152, 155, 0.1);
    }
    .company-world-source-title { color: #c8e0e5; font-size: 9px; font-weight: 700; }
    .company-world-source-meta,
    .company-world-source-locator { color: #6d8995; font-size: 7px; }
    .company-world-freshness {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      color: #67838f;
      font-size: 7px;
    }
    .company-world-disclosure {
      margin: 8px 0 0;
      color: #5f7883;
      font-size: 7px;
      line-height: 1.45;
    }
    .company-world-panel-actions {
      display: flex;
      justify-content: flex-end;
      gap: 5px;
      margin-top: 12px;
    }
    .company-world-panel-actions button {
      min-height: 27px;
      padding: 0 9px;
      border-color: rgba(111, 158, 176, 0.18);
      background: rgba(88, 126, 142, 0.07);
    }
    .company-world-panel-actions button.primary {
      border-color: rgba(90, 219, 205, 0.3);
      background: rgba(35, 147, 145, 0.22);
      color: #e4fffc;
    }
    .company-world-art-hidden .market-weather-root {
      display: none !important;
    }
    .company-world-live-region {
      position: fixed;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    @media (max-width: 1040px) {
      .company-world-identity-copy { display: none; }
      .company-world-identity { grid-template-columns: auto auto; }
    }
    @media (max-width: 760px) {
      .company-world-controls { right: 48px; max-width: calc(100% - 58px); }
      .company-world-identity { display: none; }
      .company-world-modes button { padding: 0 5px; font-size: 7px; }
      .company-world-panel { right: 48px; width: min(390px, calc(100% - 58px)); }
      .company-world-hotspot-label { font-size: 7px; }
    }
    @media (prefers-reduced-motion: reduce) {
      .company-world-hotspot-pulse { animation: none; opacity: 0.35; }
      .company-world-controls *,
      .company-world-panel *,
      .company-world-hotspot { transition-duration: 0.01ms !important; }
    }
    .tos-first-paint-snapshot {
      position: absolute;
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
      display: block;
      pointer-events: none;
      background: var(--tos-bg-chart);
    }
    .tos-snapshot-bg {
      fill: var(--tos-bg-chart);
    }
    .tos-snapshot-grid {
      stroke: var(--tos-border-sep);
      stroke-width: 1;
      vector-effect: non-scaling-stroke;
    }
    .tos-snapshot-axis {
      stroke: var(--tos-border);
      stroke-width: 1;
      vector-effect: non-scaling-stroke;
    }
    .tos-snapshot-line {
      fill: none;
      stroke: var(--tos-accent);
      stroke-width: 1.4;
      opacity: 0.55;
      vector-effect: non-scaling-stroke;
    }
    .tos-snapshot-wick {
      stroke-width: 1;
      vector-effect: non-scaling-stroke;
    }
    .tos-snapshot-candle.up,
    .tos-snapshot-wick.up,
    .tos-snapshot-volume.up {
      fill: var(--tos-up);
      stroke: var(--tos-up);
    }
    .tos-snapshot-candle.down,
    .tos-snapshot-wick.down,
    .tos-snapshot-volume.down {
      fill: var(--tos-down);
      stroke: var(--tos-down);
    }
    .tos-snapshot-volume {
      opacity: 0.22;
    }
    .tos-snapshot-label,
    .tos-snapshot-price {
      fill: var(--tos-text-muted);
      font-family: var(--tos-font-ui);
      font-size: 13px;
      font-weight: 500;
    }
    #chart-container.mc-enabled {
      position: relative;
    }
    #fundamentals-container,
    #overview-container {
      --fund-bg: #1f2937;
      --fund-bg-elevated: #273244;
      --fund-bg-elevated-strong: #334155;
      --fund-bg-card: rgba(31, 41, 55, 0.92);
      --fund-bg-card-strong: rgba(39, 50, 68, 0.96);
      --fund-bg-subtle: rgba(17, 24, 39, 0.72);
      --fund-bg-hover: rgba(138, 155, 122, 0.18);
      --fund-bg-active: rgba(138, 155, 122, 0.24);
      --fund-border: rgba(55, 65, 81, 0.96);
      --fund-border-soft: rgba(71, 85, 105, 0.48);
      --fund-border-strong: rgba(138, 155, 122, 0.58);
      --fund-text: #e5e7eb;
      --fund-text-soft: #cbd5e1;
      --fund-text-muted: #9ca3af;
      --fund-text-dim: #94a3b8;
      --fund-title: #f9fafb;
      --fund-accent: #8a9b7a;
      --fund-accent-strong: #5a6b4a;
      --fund-accent-border: rgba(138, 155, 122, 0.62);
      --fund-top-control-group-bg: rgba(55, 65, 81, 0.7);
      --fund-top-control-btn-bg: transparent;
      --fund-top-control-btn-bg-hover: rgba(75, 85, 99, 0.5);
      --fund-top-control-btn-bg-active: rgba(75, 85, 99, 0.9);
      --fund-top-control-border: transparent;
      --fund-top-control-text: rgba(156, 163, 175, 1);
      --fund-top-control-text-strong: #ffffff;
      --fund-top-control-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
      --fund-top-control-inset: none;
      --fund-top-control-search-bg: rgba(53, 62, 78, 0.96);
      --fund-top-control-search-bg-hover: rgba(60, 70, 87, 0.98);
      --fund-top-control-search-bg-focus: rgba(66, 77, 95, 0.99);
      --fund-top-control-search-text: #e5e7eb;
      --fund-top-control-search-placeholder: rgba(226, 232, 240, 0.78);
      --fund-top-control-search-icon: rgba(226, 232, 240, 0.82);
      --fund-top-control-search-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
      --fund-compare-pill-bg: linear-gradient(180deg, rgba(43, 52, 68, 0.98) 0%, rgba(33, 41, 56, 0.98) 100%);
      --fund-compare-pill-bg-hover: linear-gradient(180deg, rgba(50, 60, 78, 0.99) 0%, rgba(39, 48, 64, 0.99) 100%);
      --fund-compare-pill-border: rgba(102, 118, 145, 0.42);
      --fund-compare-pill-text: #eef2f7;
	      --fund-compare-pill-icon: rgba(148, 163, 184, 0.88);
      --fund-compare-pill-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(45, 57, 77, 0.22);
      --fund-company-chip-bg: linear-gradient(180deg, rgba(39, 47, 63, 0.98) 0%, rgba(31, 39, 54, 0.98) 100%);
      --fund-company-chip-bg-hidden: linear-gradient(180deg, rgba(34, 41, 56, 0.92) 0%, rgba(24, 31, 44, 0.92) 100%);
      --fund-company-chip-border: rgba(83, 97, 121, 0.42);
      --fund-company-chip-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 26px rgba(2, 6, 23, 0.18);
      --fund-company-chip-logo-bg: rgba(255, 255, 255, 0.08);
      --fund-company-chip-logo-border: rgba(148, 163, 184, 0.18);
      --fund-company-chip-fallback-bg: rgba(91, 134, 255, 0.2);
      --fund-company-chip-fallback-text: #dbeafe;
      --fund-company-chip-ticker: rgba(191, 198, 214, 0.78);
      --fund-sidebar-panel: rgba(23, 23, 23, 0.92);
      --fund-sidebar-surface: rgba(255, 255, 255, 0.03);
      --fund-sidebar-surface-hover: rgba(255, 255, 255, 0.05);
      --fund-sidebar-surface-active: rgba(255, 255, 255, 0.08);
      --fund-sidebar-border: rgba(255, 255, 255, 0.08);
      --fund-sidebar-border-soft: rgba(255, 255, 255, 0.08);
      --fund-sidebar-border-focus: rgba(255, 255, 255, 0.16);
      --fund-sidebar-divider: rgba(255, 255, 255, 0.08);
      --fund-sidebar-section-divider: rgba(255, 255, 255, 0.14);
      --fund-sidebar-text-primary: rgba(255, 255, 255, 0.95);
      --fund-sidebar-text-secondary: rgba(255, 255, 255, 0.95);
      --fund-sidebar-text-muted: rgba(255, 255, 255, 0.56);
      --fund-sidebar-count: rgba(255, 255, 255, 0.44);
      --fund-sidebar-chip-hover: rgba(255, 255, 255, 0.10);
      --fund-sidebar-chip-active: rgba(255, 255, 255, 0.025);
      --fund-sidebar-chip-hidden: rgba(255, 255, 255, 0.025);
      --fund-sidebar-action-hover: rgba(255, 255, 255, 0.08);
      --fund-sidebar-handle: rgba(148, 163, 184, 0.14);
      --fund-sidebar-handle-active: rgba(138, 155, 122, 0.38);
      --fund-success: #7ab08a;
      --fund-danger: #c27878;
      --fund-chart-left-inset: 24px;
      --fund-chart-right-inset: 70px;
      --fund-range-base-bg: rgba(86, 94, 108, 0.5);
      --fund-range-base-border: rgba(148, 163, 184, 0.16);
      --fund-range-active-bg: #2fa2ff;
      --fund-range-active-shadow: rgba(86, 190, 255, 0.05);
      --fund-range-active-glow: rgba(35, 187, 255, 0.12);
      --fund-range-thumb-top: #8e949d;
      --fund-range-thumb-bottom: #747b85;
      flex: 1;
      width: 100%;
      max-width: 1720px;
      min-width: 0;
      height: 100%;
      display: none;
      flex-direction: column;
      gap: 12px;
      box-sizing: border-box;
      margin: 0 auto;
      padding: 12px clamp(118px, 8vw, 220px) 16px;
      background: var(--prepaint-fund-bg, #1f2937);
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    #fundamentals-container.visible {
      display: flex !important;
    }
    #overview-container {
      --fund-bg: var(--prepaint-fund-bg, #040421);
      --fund-text-soft: #ffffff;
      --fund-text-muted: #ffffff;
      --fund-text-dim: #ffffff;
      --fund-title: #ffffff;
      background: var(--fund-bg);
    }
    #overview-container.visible {
      display: flex !important;
    }
    #fundamentals-container {
      --fund-bg: var(--prepaint-fund-bg, #212121);
      --fund-chart-bg: var(--prepaint-fund-chart-bg, var(--prepaint-fund-bg, #212121));
      --fund-bg-elevated: #1d1d1d;
      --fund-bg-elevated-strong: #232323;
      --fund-bg-card: rgba(28, 28, 28, 0.94);
      --fund-bg-card-strong: rgba(34, 34, 34, 0.97);
      --fund-bg-subtle: rgba(20, 20, 20, 0.8);
      --fund-top-control-group-bg: rgba(255, 255, 255, 0.04);
      --fund-top-control-btn-bg-hover: rgba(255, 255, 255, 0.06);
      --fund-top-control-btn-bg-active: rgba(255, 255, 255, 0.12);
      --fund-top-control-search-bg: rgba(28, 28, 28, 0.96);
      --fund-top-control-search-bg-hover: rgba(34, 34, 34, 0.98);
      --fund-top-control-search-bg-focus: rgba(40, 40, 40, 0.99);
      --fund-compare-pill-bg: linear-gradient(180deg, rgba(29, 29, 29, 0.98) 0%, rgba(23, 23, 23, 0.98) 100%);
      --fund-compare-pill-bg-hover: linear-gradient(180deg, rgba(36, 36, 36, 0.99) 0%, rgba(28, 28, 28, 0.99) 100%);
      --fund-sidebar-panel: #171717;
      max-width: none;
      padding: 0 24px 0 0;
      margin: 0;
      background: var(--fund-bg);
    }
    #fundamentals-container.fund-fullscreen {
      position: fixed;
      inset: 0;
      z-index: 2500;
      width: 100vw;
      max-width: none;
      height: 100vh;
      margin: 0;
      padding: 16px 40px 20px;
      border-radius: 0;
      gap: 14px;
    }
    body.fund-fullscreen-active {
      overflow: hidden;
    }
    .overview-header {
      display: flex;
      align-items: stretch;
      gap: 18px;
      flex-wrap: wrap;
      min-height: 76px;
    }
    .overview-header-main {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1 1 0;
      min-width: 0;
    }
    .overview-header-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .overview-header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .overview-metric-nav {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
      padding: 0 2px;
    }
    .overview-metric-nav-btn {
      width: 30px;
      height: 30px;
      min-width: 30px;
      min-height: 30px;
      padding: 0;
      border: none;
      background: transparent;
      box-shadow: none;
      color: var(--fund-text-soft);
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      cursor: pointer;
    }
    .overview-metric-nav-btn svg {
      display: block;
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
    }
    .overview-metric-nav-btn:hover {
      background: rgba(255, 255, 255, 0.06);
      color: var(--fund-title);
    }
    .overview-metric-nav-btn:disabled {
      opacity: 0.42;
      cursor: not-allowed;
      background: transparent;
    }
    .overview-metric-nav-label {
      min-width: 38px;
      color: var(--fund-text-soft);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      text-align: center;
      line-height: 1;
    }
    .overview-title-wrap {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1 1 auto;
      min-width: 0;
    }
    .overview-meta-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      min-height: 26px;
    }
    .overview-company-meta {
      color: var(--fund-text-muted);
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.01em;
      min-width: 0;
    }
    .overview-company-meta:empty {
      display: none;
    }
    .overview-title {
      margin: 0;
      color: var(--fund-title);
      font-size: 28px;
      font-weight: 700;
      letter-spacing: 0.01em;
    }
    .overview-title:empty {
      display: none;
    }
    .stock-summary-card {
      border-left: 3px solid var(--tos-accent, #58a6ff);
      background: color-mix(in srgb, var(--tos-accent, #58a6ff) 6%, transparent);
      border-radius: 4px;
      padding: 6px 10px;
      margin: 0;
    }
    .stock-summary-text {
      font-size: 13px;
      line-height: 1.45;
      color: var(--fund-text, var(--tos-text, #e6edf3));
    }
    .stock-summary-card[style*="display: none"],
    .stock-summary-card[style*="display:none"] {
      /* Hidden by JS when no summary */
    }
    .overview-period-seg {
      margin-left: auto;
      flex-shrink: 0;
      align-self: flex-end;
    }
    .overview-brand-logo {
      display: none;
      align-items: center;
      justify-content: center;
      min-width: 52px;
      min-height: 52px;
      max-width: 96px;
      max-height: 96px;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      opacity: 1;
      backdrop-filter: none;
      flex-shrink: 0;
    }
    .overview-brand-logo img {
      display: block;
      max-width: 100%;
      max-height: 100%;
      width: auto;
      height: auto;
    }
    .overview-grid {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-auto-rows: minmax(280px, 1fr);
      gap: 10px;
    }
    .overview-cell {
      --overview-card-bg: #040421;
      --overview-chart-bg: #040421;
      display: flex;
      flex-direction: column;
      min-width: 0;
      min-height: 0;
      padding-top: 4px;
      border: 1px solid var(--fund-border);
      border-radius: 10px;
      overflow: hidden;
      background: var(--overview-chart-bg);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }
    .overview-cell.is-placeholder {
      visibility: hidden;
      pointer-events: none;
      border-color: transparent;
      background: transparent;
      box-shadow: none;
    }
    .overview-cell-head {
      position: relative;
      padding: 9px 10px 0;
      flex: 0 0 auto;
      z-index: 3;
    }
    .overview-cell-title {
      padding: 0;
      padding-right: 24px;
      color: var(--fund-text-muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      line-height: 1.1;
      flex: 1 1 auto;
      min-width: 0;
    }
    .overview-cell .overview-cell-fullscreen-btn {
      position: absolute;
      top: 0;
      right: 7px;
      box-sizing: border-box;
      width: 20px;
      height: 20px;
      min-width: 20px;
      min-height: 20px;
      padding: 0;
      border: none;
      border-radius: 4px;
      box-shadow: none;
      background: var(--overview-chart-bg);
      z-index: 4;
    }
    .overview-cell .overview-cell-fullscreen-btn:hover,
    .overview-cell .overview-cell-fullscreen-btn.active,
    .overview-cell:fullscreen .overview-cell-fullscreen-btn,
    .overview-cell:fullscreen .overview-cell-fullscreen-btn:hover,
    .overview-cell:fullscreen .overview-cell-fullscreen-btn.active {
      border: none;
      background: var(--overview-chart-bg);
      box-shadow: none;
    }
    .overview-cell .overview-cell-fullscreen-btn svg {
      display: block;
      width: 18px;
      height: 18px;
      margin: 0;
      padding: 0;
      flex: 0 0 auto;
      overflow: visible;
    }
    .overview-cell:fullscreen {
      width: 100vw;
      height: 100vh;
      padding: 16px 18px 18px;
      box-sizing: border-box;
      border: none;
      border-radius: 0;
      background: var(--overview-chart-bg);
      background-image: none;
      box-shadow: none;
    }
    .overview-cell:fullscreen .overview-cell-head {
      padding: 0 0 10px;
    }
    .overview-cell:fullscreen .overview-cell-title {
      padding-right: 44px;
    }
    .overview-cell:fullscreen .overview-cell-fullscreen-btn {
      top: 0;
      right: 0;
      width: 36px;
      height: 36px;
      min-width: 36px;
      min-height: 36px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }
    .overview-cell:fullscreen .overview-cell-fullscreen-btn svg {
      width: 22px;
      height: 22px;
    }
    .overview-cell:fullscreen .overview-cell-chart {
      flex: 1 1 auto;
      min-height: 0;
      border-top-color: transparent;
      border-radius: 6px;
    }
    .overview-cell-chart {
      position: relative;
      flex: 1;
      min-width: 0;
      min-height: 0;
      z-index: 1;
      margin: 0;
      border-radius: 0;
      overflow: hidden;
      background: transparent;
      border: none;
    }
    .overview-chart-badge {
      position: absolute;
      top: 10px;
      left: 10px;
      z-index: 6;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 20px;
      max-width: calc(100% - 48px);
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.04em;
      line-height: 1;
      text-transform: uppercase;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      user-select: none;
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }
    .overview-ipo-badge {
      color: #E2E8F0;
      background: rgba(148, 163, 184, 0.18);
      border: 1px solid rgba(148, 163, 184, 0.34);
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    }
    :root[data-theme="light"] #overview-container .overview-ipo-badge {
      color: #334155;
      background: rgba(226, 232, 240, 0.78);
      border-color: rgba(148, 163, 184, 0.54);
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    }
    .overview-chart-ipo-line {
      position: absolute;
      top: 0;
      bottom: 30px;
      width: 1px;
      z-index: 5;
      pointer-events: none;
      background: rgba(148, 163, 184, 0.32);
      box-shadow: none;
    }
    .overview-chart-zero-baseline {
      position: absolute;
      left: 0;
      right: 70px;
      bottom: 30px;
      height: 1px;
      z-index: 5;
      pointer-events: none;
      background:
        repeating-linear-gradient(
          90deg,
          rgba(148, 163, 184, 0.48) 0 8px,
          transparent 8px 14px
        );
      box-shadow: none;
    }
    .fund-controls {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      flex-wrap: wrap;
      min-height: 44px;
    }
	    .fund-controls-actions {
	      display: inline-flex;
	      align-items: center;
	      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
      margin-left: auto;
      padding-right: var(--fund-chart-right-inset, 70px);
	      box-sizing: border-box;
	      flex: 0 1 auto;
	    }
	    .fund-compare-inline-row {
	      display: inline-flex;
	      align-items: center;
	      gap: 8px;
	      min-width: 0;
	      flex: 0 1 auto;
	    }
    .fund-top-fullscreen-btn {
      flex-shrink: 0;
    }
    .fund-seg {
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--fund-border-soft);
      border-radius: 10px;
      overflow: hidden;
      background: var(--fund-bg-card);
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    .fund-seg-btn {
      border: none;
      border-right: 1px solid var(--fund-border-soft);
      background: transparent;
      color: var(--fund-text-soft);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 8px 14px;
      cursor: pointer;
      min-width: 84px;
    }
    .fund-seg-btn:last-child {
      border-right: none;
    }
    .fund-seg-btn:hover {
      color: var(--fund-title);
      background: var(--fund-bg-hover);
    }
    .fund-seg-btn.active {
      color: var(--fund-title);
      background: var(--fund-bg-active);
    }
    .fund-label-denomination-seg .fund-label-denomination-btn {
      min-width: 30px;
      padding: 8px 8px;
    }
    .fund-price-toggle-group {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--fund-border-soft);
      border-radius: 9px;
      padding: 2px 8px 2px 10px;
      background: var(--fund-bg-card);
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    .fund-price-toggle-group.is-active {
      color: var(--fund-title);
      background: rgba(90, 107, 74, 0.28);
      border-color: var(--fund-accent-border);
    }
    .fund-price-toggle {
      border: none;
      background: transparent;
      box-shadow: none;
      min-width: auto;
      color: inherit;
      font: inherit;
      padding: 5px 0;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 7px;
    }
    .fund-price-toggle:hover {
      background: transparent;
    }
    .fund-price-toggle.active {
      background: transparent;
      box-shadow: none;
    }
    .fund-price-toggle-check {
      width: 13px;
      height: 13px;
      border-radius: 3px;
      border: 1px solid rgba(148, 163, 184, 0.55);
      background: rgba(15, 23, 42, 0.72);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .fund-price-toggle-label {
      white-space: nowrap;
    }
    .fund-price-toggle.active .fund-price-toggle-check {
      border-color: rgba(74, 222, 128, 0.72);
      background: linear-gradient(180deg, #86efac 0%, #22c55e 100%);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
    .fund-price-toggle.active .fund-price-toggle-check::before {
      content: '\2713';
      color: #f8fafc;
      font-size: 10px;
      line-height: 13px;
    }
    .fund-price-color-btn {
      width: 18px;
      height: 18px;
      border-radius: 5px;
    }
    .fund-price-color-btn .fund-metric-dot {
      width: 10px;
      height: 10px;
      border-radius: 3px;
    }
    .fund-top-action-btn {
      min-width: auto;
      padding: 10px 14px;
      white-space: nowrap;
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    #fundamentals-container .fund-controls {
      gap: 10px;
      min-height: 30px;
      align-items: flex-start;
    }
    #fundamentals-container .fund-controls .fund-seg {
      gap: 4px;
      padding: 4px;
      border: none;
      border-radius: 10px;
      overflow: visible;
      background: var(--fund-top-control-group-bg);
      box-shadow: none;
    }
    #fundamentals-container .fund-controls .fund-range-period-seg {
      flex-shrink: 0;
      gap: 2px;
      min-height: 30px;
      padding: 2px;
    }
    #fundamentals-container .fund-controls .fund-label-denomination-seg {
      flex-shrink: 0;
      gap: 2px;
      min-height: 30px;
      padding: 2px;
    }
    #fundamentals-container .fund-controls .fund-range-period-seg .fund-seg-btn {
      min-width: 72px;
      min-height: 26px;
      padding: 4px 10px;
      font-size: 12px;
    }
    #fundamentals-container .fund-controls .fund-seg-btn {
      min-width: 100px;
      min-height: 26px;
      padding: 4px 14px;
      border-right: none;
      border-radius: 8px;
      background: transparent;
      color: var(--fund-top-control-text);
      font-family: var(--tos-font-ui);
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.1;
      box-shadow: none;
      transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
    }
    #fundamentals-container .fund-controls .fund-label-denomination-seg .fund-label-denomination-btn {
      min-width: 28px;
      min-height: 26px;
      padding: 4px 8px;
    }
    #fundamentals-container .fund-controls .fund-seg-btn:hover {
      color: var(--fund-top-control-text-strong);
      background: var(--fund-top-control-btn-bg-hover);
    }
    #fundamentals-container .fund-controls .fund-seg-btn.active {
      color: var(--fund-top-control-text-strong);
      background: var(--fund-top-control-btn-bg-active);
      box-shadow: var(--fund-top-control-shadow);
    }
    #fundamentals-container .fund-controls .fund-dd-group {
      gap: 8px;
    }
    #fundamentals-container .fund-controls .fund-dd-btn,
    #fundamentals-container .fund-range-spacer .fund-dd-btn,
    #fundamentals-container .fund-controls .fund-top-action-btn,
    #fundamentals-container .fund-controls .fund-export-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      border: none;
      border-radius: 10px;
      background: var(--fund-top-control-group-bg);
      color: var(--fund-top-control-text);
      font-family: var(--tos-font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.1;
      min-height: 30px;
      box-shadow: none;
      transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
    }
    #fundamentals-container .fund-controls .fund-dd-btn {
      justify-content: space-between;
      min-width: 84px;
      padding: 5px 10px;
    }
    #fundamentals-container .fund-controls .fund-metrics-dropdown .fund-dd-btn,
    #fundamentals-container .fund-range-spacer .fund-metrics-dropdown .fund-dd-btn {
      min-width: 84px;
      justify-content: center;
      padding: 5px 10px;
    }
	    #fundamentals-container .fund-controls .fund-metrics-dropdown .fund-metrics-search-control,
	    #fundamentals-container .fund-range-spacer .fund-metrics-dropdown .fund-metrics-search-control {
	      width: auto;
	      max-width: min(calc(100vw - 36px), 720px);
	      min-width: 220px;
	      min-height: 36px;
	      justify-content: flex-start;
	      gap: 8px;
	      padding: 0 12px 0 11px;
	      border: 1px solid rgba(84, 97, 121, 0.18);
	      border-radius: 999px;
	      background: rgba(47, 55, 69, 0.86);
	      color: var(--fund-top-control-search-text);
	      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
	    }
	    #fundamentals-container .fund-controls .fund-compare-dropdown .fund-dd-btn,
	    #fundamentals-container .fund-range-spacer .fund-compare-dropdown .fund-dd-btn {
	      min-width: 0;
	      min-height: 32px;
	      justify-content: flex-start;
	      gap: 10px;
	      padding: 0 14px 0 10px;
	      border: 1px solid var(--fund-compare-pill-border);
	      border-radius: 999px;
	      background: var(--fund-compare-pill-bg);
	      color: var(--fund-compare-pill-text);
      box-shadow: var(--fund-compare-pill-shadow);
    }
    #fundamentals-container .fund-controls .fund-compare-dropdown .fund-dd-btn:hover,
    #fundamentals-container .fund-range-spacer .fund-compare-dropdown .fund-dd-btn:hover,
    #fundamentals-container .fund-controls .fund-compare-dropdown .fund-dd-btn.open,
    #fundamentals-container .fund-range-spacer .fund-compare-dropdown .fund-dd-btn.open {
      background: var(--fund-compare-pill-bg-hover);
      color: var(--fund-compare-pill-text);
      border-color: var(--fund-compare-pill-border);
      box-shadow: var(--fund-compare-pill-shadow);
    }
    #fundamentals-container .fund-controls .fund-compare-dropdown .fund-dd-btn.fund-compare-pill-btn.is-compact,
    #fundamentals-container .fund-range-spacer .fund-compare-dropdown .fund-dd-btn.fund-compare-pill-btn.is-compact {
      display: grid;
      width: 32px;
      min-width: 32px;
      padding: 0;
      gap: 0;
      justify-content: center;
      place-items: center;
    }
    #fundamentals-container .fund-controls .fund-top-action-btn {
      justify-content: center;
      min-width: 0;
      padding: 5px 9px;
    }
    #fundamentals-container .fund-controls .fund-export-root {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }
    #fundamentals-container .fund-controls .fund-export-btn {
      justify-content: center;
      min-width: 0;
      padding: 5px 10px;
    }
    #fundamentals-container .fund-controls .fund-top-fullscreen-btn {
      border-radius: 10px;
      min-width: 30px;
      min-height: 30px;
      padding: 5px 8px;
      color: var(--fund-top-control-text);
    }
	    #fundamentals-container .fund-controls .fund-price-toggle-group {
	      display: inline-flex;
	      align-items: center;
	      color: var(--fund-top-control-text);
	      gap: 6px;
	      min-height: 30px;
	      padding: 2px 7px;
	      border: none;
	      border-radius: 10px;
	      background: var(--fund-top-control-group-bg);
	      box-shadow: none;
      flex-shrink: 0;
    }
    #fundamentals-container .fund-controls .fund-price-toggle-group.is-active {
      color: var(--fund-top-control-text-strong);
      background: rgba(90, 107, 74, 0.28);
      border-color: var(--fund-accent-border);
    }
	    #fundamentals-container .fund-controls .fund-price-toggle {
	      min-width: 0;
	      min-height: 26px;
	      padding: 4px 0;
	      color: inherit;
	      font-family: var(--tos-font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.1;
      gap: 7px;
      justify-content: center;
    }
    #fundamentals-container .fund-controls .fund-price-toggle:hover,
    #fundamentals-container .fund-controls .fund-price-toggle.active {
      color: var(--fund-top-control-text-strong);
      background: transparent;
      box-shadow: none;
    }
    #fundamentals-container .fund-controls .fund-price-toggle .fund-price-toggle-check {
      display: none;
    }
    #fundamentals-container .fund-controls .fund-dd-btn:hover,
    #fundamentals-container .fund-range-spacer .fund-dd-btn:hover,
    #fundamentals-container .fund-controls .fund-top-action-btn:hover,
    #fundamentals-container .fund-controls .fund-export-btn:hover {
      color: var(--fund-top-control-text-strong);
      background: var(--fund-top-control-btn-bg-hover);
    }
    #fundamentals-container .fund-controls .fund-dd-btn.open,
    #fundamentals-container .fund-range-spacer .fund-dd-btn.open,
    #fundamentals-container .fund-controls .fund-export-btn[aria-expanded="true"] {
      color: var(--fund-top-control-text-strong);
      background: var(--fund-top-control-btn-bg-active);
      box-shadow: var(--fund-top-control-shadow);
    }
    #fundamentals-container .fund-controls .fund-range-period-seg,
    #fundamentals-container .fund-controls .fund-label-denomination-seg,
    #fundamentals-container .fund-controls .fund-price-toggle-group,
    #fundamentals-container .fund-controls .fund-top-action-btn,
    #fundamentals-container .fund-controls .fund-export-btn,
    #fundamentals-container .fund-controls .fund-top-fullscreen-btn {
      border: 1px solid var(--fund-border-soft);
      background: var(--fund-top-control-btn-bg);
      box-shadow: none;
    }
    #fundamentals-container .fund-controls .fund-range-period-seg:hover,
    #fundamentals-container .fund-controls .fund-label-denomination-seg:hover,
    #fundamentals-container .fund-controls .fund-price-toggle-group:hover,
    #fundamentals-container .fund-controls .fund-top-action-btn:hover,
    #fundamentals-container .fund-controls .fund-export-btn:hover,
    #fundamentals-container .fund-controls .fund-top-fullscreen-btn:hover {
      border-color: var(--fund-accent-border);
    }
    #fundamentals-container .fund-controls .fund-price-toggle-group.is-active {
      background: var(--fund-top-control-btn-bg);
    }
    #fundamentals-container .fund-controls .fund-export-btn[aria-expanded="true"] {
      border-color: var(--fund-accent-border);
    }
    #fundamentals-container .fund-controls .fund-export-menu {
      top: calc(100% + 8px);
      bottom: auto;
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle-group {
      color: var(--fund-top-control-text);
      gap: 6px;
      min-height: 30px;
      padding: 2px 10px;
      border-radius: 10px;
      flex-shrink: 0;
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle-group.is-active {
      color: var(--fund-top-control-text-strong);
      background: rgba(90, 107, 74, 0.28);
      border-color: var(--fund-accent-border);
    }
    #fundamentals-container .fund-controls-row .fund-opt-btn,
    #fundamentals-container .fund-controls-row .fund-opt-dropdown-btn,
    #fundamentals-container .fund-controls-row .fund-export-btn {
      border-radius: 10px;
      min-height: 30px;
      color: var(--fund-top-control-text);
      font-family: var(--tos-font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.1;
    }
    #fundamentals-container .fund-controls-row .fund-opt-btn {
      padding: 5px 10px;
    }
    #fundamentals-container .fund-controls-row .fund-opt-dropdown-btn,
    #fundamentals-container .fund-controls-row .fund-export-btn {
      padding: 5px 12px;
    }
    #fundamentals-container .fund-controls-row .fund-range-period-seg {
      flex-shrink: 0;
      gap: 2px;
      min-height: 32px;
      padding: 3px;
      border: 1px solid rgba(82, 94, 118, 0.62);
      border-radius: 16px;
      overflow: visible;
      background: linear-gradient(180deg, rgba(35, 43, 58, 0.988) 0%, rgba(28, 35, 48, 0.992) 100%);
      box-shadow: 0 12px 28px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }
    #fundamentals-container .fund-controls-row .fund-range-period-seg .fund-seg-btn {
      min-width: 72px;
      min-height: 26px;
      padding: 4px 13px;
      border: 1px solid transparent;
      border-right: none;
      border-radius: 12px;
      background: transparent;
      color: rgba(211, 218, 230, 0.74);
      font-family: var(--tos-font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.1;
      box-shadow: none;
      transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
    }
    #fundamentals-container .fund-controls-row .fund-range-period-seg .fund-seg-btn:hover {
      color: rgba(245, 247, 252, 0.94);
      background: rgba(43, 51, 67, 0.78);
      border-color: rgba(80, 93, 115, 0.74);
    }
    #fundamentals-container .fund-controls-row .fund-range-period-seg .fund-seg-btn.active {
      color: #f7f9fc;
      background: rgba(66, 74, 92, 0.92);
      border-color: rgba(91, 102, 124, 0.9);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }
	    #fundamentals-container .fund-controls-row .fund-price-toggle {
	      min-width: 0;
	      min-height: 26px;
	      padding: 4px 0;
	      color: inherit;
	      font-family: var(--tos-font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.1;
      gap: 7px;
      justify-content: center;
    }
    #fundamentals-container .fund-controls-row #fund-opt-interactive {
      display: none;
      justify-content: center;
    }
    #fundamentals-container .fund-controls-row #fund-opt-interactive::before {
      content: none;
      display: none;
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle:hover,
    #fundamentals-container .fund-controls-row .fund-price-toggle.active {
      color: var(--fund-top-control-text-strong);
      background: transparent;
      box-shadow: none;
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle .fund-price-toggle-check {
      display: none;
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle-check {
      width: 14px;
      height: 14px;
      border: 1px solid rgba(148, 163, 184, 0.55);
      border-radius: 4px;
      background: rgba(15, 23, 42, 0.72);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    #fundamentals-container .fund-controls-row .fund-price-color-btn {
      width: 18px;
      height: 18px;
      border-radius: 5px;
      background: rgba(255, 255, 255, 0.08);
      border: none;
    }
    #fundamentals-container .fund-controls-row .fund-price-color-btn .fund-metric-dot {
      width: 10px;
      height: 10px;
      border-radius: 3px;
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle.active .fund-price-toggle-check {
      border-color: rgba(90, 107, 74, 0.96);
      background: linear-gradient(180deg, #8a9b7a 0%, #5a6b4a 100%);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
    #fundamentals-container .fund-controls-row .fund-price-toggle.active .fund-price-toggle-check::before {
      color: #f8fafc;
      font-size: 10px;
      font-weight: 700;
      line-height: 1;
    }
    .fund-dd-group {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .fund-dropdown {
      position: relative;
      display: inline-flex;
      align-items: center;
    }
    .fund-dd-btn {
      background: var(--fund-bg-card);
      border: 1px solid var(--fund-border-soft);
      color: var(--fund-text-soft);
      border-radius: 10px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 8px 14px;
      cursor: pointer;
      min-width: 118px;
      text-align: left;
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    .fund-dd-btn:hover {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: var(--fund-bg-card-strong);
    }
    .fund-dd-btn.open {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: rgba(90, 107, 74, 0.3);
    }
	    .fund-metrics-search-control {
	      display: inline-flex;
	      align-items: center;
	      gap: 8px;
	      min-width: 220px;
	      cursor: text;
        flex-wrap: nowrap;
        overflow: visible;
	    }
    .fund-metrics-search-field {
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
      min-width: 74px;
      cursor: text;
    }
	    .fund-metrics-search-control:hover {
      color: var(--fund-top-control-search-text);
      background: rgba(54, 63, 79, 0.92);
      border-color: rgba(96, 110, 136, 0.24);
    }
    .fund-metrics-search-control.open {
      color: var(--fund-top-control-search-text);
      background: rgba(54, 63, 79, 0.92);
      border-color: rgba(104, 119, 145, 0.28);
    }
    .fund-metrics-search-control:focus-within {
      color: var(--fund-top-control-search-text);
      background: rgba(59, 69, 86, 0.94);
      border-color: rgba(115, 131, 159, 0.34);
    }
	    .fund-metrics-search-icon {
	      flex: 0 0 auto;
	      width: 16px;
	      height: 16px;
	      color: var(--fund-top-control-search-icon);
	    }
    .fund-metrics-search-input {
      min-width: 0;
      flex: 0 0 auto;
      width: 76px;
      border: none;
      outline: none;
      background: transparent;
      color: var(--fund-top-control-search-text);
      font: inherit;
      font-size: 14px;
      font-weight: 500;
      letter-spacing: inherit;
      padding: 0;
      caret-color: var(--fund-top-control-search-text);
    }
    .fund-metrics-search-input::placeholder {
      color: var(--fund-top-control-search-placeholder);
      opacity: 1;
    }
    .fund-metrics-search-input::-webkit-search-cancel-button {
      -webkit-appearance: none;
      appearance: none;
    }
	    .fund-metrics-search-shortcut {
	      display: inline-flex;
	      align-items: center;
	      gap: 8px;
	      margin-left: auto;
	      opacity: 0;
	      transform: translateX(4px);
	      transition: opacity 0.14s ease, transform 0.14s ease;
	      pointer-events: none;
	      color: rgba(226, 232, 240, 0.72);
	    }
    .fund-metrics-search-control:hover .fund-metrics-search-shortcut {
      opacity: 1;
      transform: translateX(0);
    }
    .fund-metrics-search-control:focus-within .fund-metrics-search-shortcut,
    .fund-metrics-search-input:not(:placeholder-shown) + .fund-metrics-search-shortcut {
      opacity: 0;
      transform: translateX(4px);
    }
	    .fund-metrics-search-shortcut-key {
	      display: inline-flex;
	      align-items: center;
	      justify-content: center;
	      min-width: 0;
	      height: auto;
	      padding: 0;
	      border-radius: 0;
	      background: none;
	      color: inherit;
	      font-size: 13px;
	      font-weight: 500;
	      line-height: 1;
	    }
    .fund-dd-panel {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      min-width: 190px;
      max-height: 280px;
      overflow-y: auto;
      background: rgba(17, 24, 39, 0.985);
      border: 1px solid var(--fund-border);
      border-radius: 12px;
      box-shadow: 0 22px 48px rgba(2, 6, 23, 0.52);
      z-index: 1700;
      padding: 4px;
      scrollbar-width: thin;
      scrollbar-color: rgba(100, 116, 139, 0.72) rgba(15, 23, 42, 0.62);
    }
    .fund-dd-panel::-webkit-scrollbar {
      width: 8px;
    }
    .fund-dd-panel::-webkit-scrollbar-track {
      background: rgba(15, 23, 42, 0.62);
      border-radius: 999px;
    }
    .fund-dd-panel::-webkit-scrollbar-thumb {
      background: rgba(100, 116, 139, 0.72);
      border-radius: 999px;
      border: 1px solid rgba(17, 24, 39, 0.985);
    }
    .fund-dd-panel::-webkit-scrollbar-thumb:hover {
      background: rgba(148, 163, 184, 0.78);
    }
    .fund-dd-panel.fund-dd-panel-upward {
      top: auto;
      bottom: calc(100% + 6px);
    }
    .fund-metrics-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(2, 6, 23, 0.46);
      backdrop-filter: blur(3px);
      z-index: 2590;
    }
    .fund-metrics-modal {
      position: fixed;
      left: 50%;
      top: 50%;
      width: min(560px, calc(100vw - 32px));
      height: min(78vh, 720px);
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 22px 18px 18px;
      border: 1px solid var(--fund-sidebar-border);
      border-radius: 24px;
      background: var(--fund-sidebar-panel, rgba(23, 23, 23, 0.96));
      box-shadow: 0 32px 80px rgba(2, 6, 23, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.03);
      overflow: hidden;
      z-index: 2600;
    }
    .fund-metrics-modal::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
      pointer-events: none;
    }
    .fund-metrics-modal-header {
      position: relative;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
    }
    .fund-metrics-modal-search-control {
      display: flex;
      flex: 1 1 auto;
      align-items: center;
      gap: 10px;
      width: auto;
      min-width: 0;
      min-height: 44px;
      margin: 0;
      padding: 0 12px;
      border: 1px solid var(--fund-sidebar-border);
      border-radius: 14px;
      background: var(--fund-sidebar-surface);
      box-shadow: none;
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metrics-modal-search-control:hover,
    .fund-metrics-modal-search-control:focus-within {
      background: var(--fund-sidebar-surface-hover);
      border-color: var(--fund-sidebar-border-focus);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metrics-modal .fund-metrics-search-field {
      display: inline-flex;
      align-items: center;
      flex: 1 1 auto;
      min-width: 0;
      cursor: text;
    }
    .fund-metrics-modal .fund-metrics-search-input {
      width: 100%;
      min-width: 0;
      color: var(--fund-sidebar-text-primary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 400;
    }
    .fund-metrics-modal .fund-metrics-search-input::placeholder {
      color: var(--fund-sidebar-text-muted);
    }
    .fund-metrics-modal .fund-metrics-panel {
      position: relative;
      top: auto;
      bottom: auto;
      left: auto;
      width: 100%;
      min-width: 0;
      min-height: 0;
      max-width: none;
      max-height: none;
      flex: 1 1 auto;
      padding: 4px;
      border: none;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      overflow-y: auto;
      scrollbar-color: rgba(100, 116, 139, 0.56) transparent;
    }
    .fund-metrics-modal .fund-metrics-panel::-webkit-scrollbar-track {
      background: transparent;
    }
    .fund-metrics-modal .fund-metrics-panel::-webkit-scrollbar-thumb {
      background: rgba(100, 116, 139, 0.56);
      border-color: transparent;
    }
    .fund-metrics-modal .fund-metrics-panel::before {
      display: none;
    }
    .fund-metrics-panel-close {
      position: relative;
      flex: 0 0 auto;
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 999px;
      background: transparent;
      color: var(--fund-sidebar-text-muted);
      font: inherit;
      font-size: 18px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background var(--transition-micro), color var(--transition-micro);
    }
    .fund-metrics-panel-close:hover {
      background: var(--fund-sidebar-action-hover);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metric-empty-state {
      color: var(--fund-sidebar-text-muted);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      line-height: 1.45;
      padding: 8px 12px 4px;
    }
    .fund-preset-dropdown .fund-dd-btn {
      min-width: 138px;
    }
	    .fund-compare-pill-btn {
	      white-space: nowrap;
	    }
	    .fund-compare-pill-btn.is-compact {
	      width: 32px;
	      min-width: 32px;
	      padding: 0;
	      gap: 0;
	      border-radius: 999px;
	    }
	    .fund-compare-pill-btn.is-compact .fund-compare-pill-label,
	    .fund-compare-pill-btn.is-compact .fund-compare-pill-chevron {
	      display: none;
	    }
	    .fund-compare-pill-btn.is-compact .fund-compare-pill-icon {
	      width: 16px;
	      height: 16px;
	      line-height: 0;
	    }
	    .fund-compare-pill-icon {
	      display: inline-flex;
	      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      color: var(--fund-compare-pill-icon);
	      filter: none;
    }
    .fund-compare-pill-icon svg {
      display: block;
      width: 100%;
      height: 100%;
    }
    .fund-compare-pill-label {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      color: inherit;
      white-space: nowrap;
    }
    .fund-compare-pill-chevron {
      display: inline-flex;
      align-items: center;
      margin-left: 2px;
      color: var(--fund-top-control-text);
      font-size: 10px;
      line-height: 1;
      transform: translateY(1px);
    }
    .fund-preset-panel {
      min-width: 320px;
      max-width: min(360px, calc(100vw - 36px));
      max-height: min(360px, 60vh);
      padding: 8px;
    }
    .fund-preset-heading {
      color: var(--fund-title);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 6px 8px 4px;
    }
    .fund-preset-copy {
      color: var(--fund-text-muted);
      font-size: 12px;
      line-height: 1.45;
      padding: 0 8px 8px;
    }
    .fund-preset-item {
      width: 100%;
      border: 1px solid transparent;
      background: transparent;
      color: var(--fund-text-soft);
      font-family: inherit;
      text-align: left;
      padding: 10px 12px;
      border-radius: 10px;
      cursor: pointer;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 2px 10px;
      transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    }
    .fund-preset-item:hover {
      background: var(--fund-bg-hover);
      border-color: rgba(138, 155, 122, 0.28);
      color: var(--fund-title);
    }
    .fund-preset-item.active {
      background: rgba(90, 107, 74, 0.28);
      border-color: var(--fund-accent-border);
      color: var(--fund-title);
    }
    .fund-preset-item + .fund-preset-item {
      margin-top: 4px;
    }
    .fund-preset-item-title {
      color: inherit;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.25;
    }
    .fund-preset-item-meta {
      color: var(--fund-text-dim);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      justify-self: end;
      align-self: start;
    }
    .fund-preset-item-copy {
      grid-column: 1 / -1;
      color: var(--fund-text-muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .fund-metric-section {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .fund-metric-section + .fund-metric-section {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--fund-sidebar-divider);
    }
    .fund-metric-section-title {
      color: var(--fund-sidebar-text-muted);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0;
      text-transform: none;
      padding: 6px 10px 8px;
    }
    .fund-metric-item {
      width: 100%;
      min-height: 40px;
      border: none;
      appearance: none;
      background: transparent;
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 400;
      line-height: 1.2;
      text-align: left;
      padding: 0 10px;
      border-radius: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      transition: background var(--transition-micro), color var(--transition-micro);
    }
    .fund-metric-item + .fund-metric-item {
      margin-top: 2px;
      box-shadow: none;
    }
    .fund-metric-item-main {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      flex: 1 1 auto;
      min-height: 0;
    }
    .fund-metric-item-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      letter-spacing: 0;
    }
    .fund-metric-item-indicator {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--fund-sidebar-text-muted);
      font-size: 15px;
      font-weight: 500;
      line-height: 1;
      flex-shrink: 0;
      transition: background var(--transition-micro), color var(--transition-micro);
    }
    .fund-metric-item:hover,
    .fund-metric-item.is-keyboard-active {
      background: var(--fund-sidebar-chip-hover);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metric-item.is-keyboard-active {
      box-shadow: inset 0 0 0 1px var(--fund-sidebar-border-focus);
    }
    .fund-metric-item:hover .fund-metric-item-indicator,
    .fund-metric-item.is-keyboard-active .fund-metric-item-indicator {
      background: var(--fund-sidebar-action-hover);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metric-item.added {
      color: var(--fund-sidebar-text-primary);
      background: var(--fund-sidebar-chip-active);
      box-shadow: none;
    }
    .fund-metric-item.added .fund-metric-item-indicator,
    .fund-metric-item-indicator.is-added {
      background: rgba(255, 255, 255, 0.12);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metric-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .fund-options {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .fund-options-dropdown {
      position: relative;
      display: inline-flex;
      align-items: center;
    }
    .fund-opt-dropdown-btn {
      min-width: 132px;
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 7px 12px;
      font-size: 12px;
      line-height: 1;
    }
    .fund-appearance-panel {
      min-width: 312px;
      max-width: min(360px, calc(100vw - 36px));
      max-height: min(460px, 70vh);
      padding: 10px;
    }
    .fund-appearance-controls {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .fund-appearance-section {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .fund-appearance-options-section {
      padding-top: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .fund-appearance-section-title {
      color: rgba(255, 255, 255, 0.62);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      line-height: 1;
      text-transform: uppercase;
    }
    .fund-appearance-preset-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .fund-appearance-preset-card {
      width: 100%;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.03);
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      cursor: pointer;
      transition: background var(--transition-micro), border-color var(--transition-micro), transform var(--transition-micro), box-shadow var(--transition-micro);
    }
    .fund-appearance-preset-card:hover,
    .fund-appearance-preset-card:focus-visible {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.16);
      transform: translateY(-1px);
      outline: none;
    }
    .fund-appearance-preset-card.is-active {
      border-color: rgba(255, 255, 255, 0.22);
      background: rgba(255, 255, 255, 0.08);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }
    .fund-appearance-preset-preview {
      position: relative;
      height: 54px;
      border-radius: 10px;
      overflow: hidden;
      display: flex;
      align-items: flex-end;
      gap: 6px;
      padding: 9px 8px;
      background: var(--fund-preset-bg, #212121);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }
    .fund-appearance-preset-preview::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        linear-gradient(to top, rgba(255, 255, 255, 0.06), transparent 58%),
        repeating-linear-gradient(
          to top,
          transparent 0,
          transparent 15px,
          rgba(255, 255, 255, 0.06) 15px,
          rgba(255, 255, 255, 0.06) 16px
        );
      pointer-events: none;
    }
    .fund-appearance-preset-bar {
      position: relative;
      z-index: 1;
      flex: 1 1 0;
      min-width: 0;
      border-radius: 6px 6px 2px 2px;
      opacity: 0.98;
    }
    .fund-appearance-preset-bar.is-short {
      height: 38%;
    }
    .fund-appearance-preset-bar.is-mid {
      height: 62%;
    }
    .fund-appearance-preset-bar.is-tall {
      height: 84%;
    }
    .fund-appearance-preset-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .fund-appearance-preset-name,
    .fund-appearance-preset-note {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .fund-appearance-preset-name {
      color: #f5f5f5;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      font-weight: 500;
      line-height: 1.2;
    }
    .fund-appearance-preset-note {
      color: rgba(255, 255, 255, 0.52);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      font-weight: 400;
      line-height: 1.2;
    }
    .fund-appearance-panel .fund-opt-btn {
      width: 100%;
      min-width: 0;
    }
    .fund-appearance-panel .fund-brand-mode-group {
      width: 100%;
      min-width: 0;
      justify-content: space-between;
    }
    .fund-appearance-panel .fund-brand-mode-seg {
      flex: 1 1 auto;
      min-width: 0;
    }
    .fund-appearance-panel .fund-brand-mode-seg .fund-seg-btn {
      flex: 1 1 0;
      min-width: 0;
    }
    .fund-appearance-panel .fund-charttype-seg {
      width: 100%;
    }
    .fund-appearance-panel .fund-charttype-seg .fund-seg-btn {
      flex: 1 1 0;
      min-width: 0;
    }
    .fund-opt-btn {
      border: 1px solid var(--fund-border-soft);
      background: var(--fund-bg-card);
      color: var(--fund-text-soft);
      border-radius: 9px;
      font-family: inherit;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 7px 10px;
      cursor: pointer;
      min-width: 96px;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 7px;
      line-height: 1;
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    .fund-opt-btn::before {
      content: '';
      width: 13px;
      height: 13px;
      border-radius: 3px;
      border: 1px solid rgba(148, 163, 184, 0.55);
      background: rgba(15, 23, 42, 0.72);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
      flex-shrink: 0;
    }
    .fund-opt-btn:hover {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: var(--fund-bg-card-strong);
    }
    .fund-opt-btn.active {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: rgba(90, 107, 74, 0.28);
    }
    .fund-opt-btn.active::before {
      content: '\2713';
      color: #f8fafc;
      font-size: 10px;
      text-align: center;
      line-height: 13px;
      border-color: rgba(90, 107, 74, 0.96);
      background: linear-gradient(180deg, #8a9b7a 0%, #5a6b4a 100%);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
    .fund-opt-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .fund-brand-mode-group {
      border: 1px solid var(--fund-border-soft);
      background: var(--fund-bg-card);
      color: var(--fund-text-soft);
      border-radius: 9px;
      padding: 3px 4px 3px 10px;
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    .fund-brand-mode-group.active .fund-brand-mode-label {
      color: var(--fund-title);
    }
    .fund-brand-mode-group.is-loading {
      opacity: 0.78;
    }
    .fund-brand-mode-label {
      color: var(--fund-text-dim);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      line-height: 1;
      text-transform: uppercase;
      white-space: nowrap;
    }
    .fund-brand-mode-seg {
      border: none;
      background: transparent;
      box-shadow: none;
      border-radius: 7px;
      overflow: hidden;
      flex-shrink: 0;
    }
    .fund-brand-mode-seg .fund-seg-btn {
      min-width: 62px;
      padding: 7px 12px;
      font-size: 12px;
    }
    .fund-chips {
      position: relative;
      z-index: 1;
      min-height: 32px;
      display: inline-flex;
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: center;
      gap: 3px;
      overflow: visible;
      padding: 0;
      width: auto;
      max-width: none;
      min-width: 0;
      flex: 0 1 auto;
    }
    .fund-metrics-selected-chips {
      display: inline-flex;
      align-items: center;
      flex: 0 1 auto;
      min-width: 0;
      padding: 0;
    }
	    .fund-company-chips {
	      position: relative;
	      display: inline-flex;
	      flex-direction: row;
	      align-items: center;
	      justify-content: flex-start;
	      gap: 6px;
	      overflow-x: auto;
	      overflow-y: visible;
	      padding: 0;
	      width: auto;
	      max-width: min(calc(100vw - 36px), 360px);
	      min-width: 0;
	      pointer-events: auto;
	      scrollbar-width: none;
	    }
	    .fund-company-chips::-webkit-scrollbar {
	      display: none;
	    }
    .fund-chip {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      box-sizing: border-box;
      border: none;
      border-radius: 10px;
      padding: 0 4px 0 10px;
      background: var(--fund-bg-card);
      color: var(--fund-text);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 600;
      width: 100%;
      min-height: 30px;
      max-width: none;
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.18);
    }
    .fund-chip:not(.fund-company-chip) {
      width: auto;
      max-width: 100%;
      min-width: 0;
      flex: 0 1 auto;
      gap: 0;
      border: 1px solid rgba(99, 114, 139, 0.34);
      border-radius: 12px;
      padding: 0 6px;
      background: rgba(73, 85, 104, 0.38);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
      min-height: 30px;
      transition: opacity 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
    }
    .fund-chip:not(.fund-company-chip):hover,
    .fund-chip:not(.fund-company-chip):focus-within {
      background: rgba(81, 94, 114, 0.5);
      border-color: rgba(112, 128, 154, 0.44);
    }
    .fund-chip:not(.fund-company-chip).is-active {
      background: rgba(84, 96, 116, 0.66);
      border-color: var(--fund-accent-border);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }
    .fund-chips .fund-chip + .fund-chip::before {
      content: none;
    }
    .fund-chip.is-dragging {
      opacity: 0.62;
    }
    .fund-chip.is-drop-before {
      box-shadow:
        inset 0 2px 0 rgba(96, 165, 250, 0.95),
        0 8px 22px rgba(3, 7, 18, 0.18);
    }
    .fund-chip.is-drop-after {
      box-shadow:
        inset 0 -2px 0 rgba(96, 165, 250, 0.95),
        0 8px 22px rgba(3, 7, 18, 0.18);
    }
    .fund-chip:not(.fund-company-chip).is-drop-before {
      box-shadow: inset 0 1px 0 rgba(96, 165, 250, 0.95);
    }
    .fund-chip:not(.fund-company-chip).is-drop-after {
      box-shadow: inset 0 -1px 0 rgba(96, 165, 250, 0.95);
    }
	    .fund-company-chip {
	      flex: 0 0 auto;
	      width: auto;
	      max-width: min(100%, 132px);
	      gap: 2px;
	      min-height: 32px;
	      padding: 0 3px 0 1px;
	      border-radius: 999px;
	      border: 1px solid var(--fund-company-chip-border);
	      background: var(--fund-company-chip-bg);
	      box-shadow: var(--fund-company-chip-shadow);
	    }
    .fund-chip.is-hidden {
      background: rgba(31, 41, 55, 0.76);
      border-color: rgba(100, 116, 139, 0.34);
    }
    .fund-chip:not(.fund-company-chip).is-hidden {
      background: rgba(54, 65, 82, 0.18);
      border-color: rgba(84, 98, 122, 0.24);
      box-shadow: none;
    }
    .fund-chip.is-hidden .fund-chip-label {
      color: var(--fund-text-dim);
    }
    .fund-company-chip.is-hidden {
      background: var(--fund-company-chip-bg-hidden);
      border-color: rgba(83, 97, 121, 0.28);
    }
    .fund-company-chip.is-hidden .fund-company-chip-logo {
      opacity: 0.68;
    }
    .fund-company-chip.is-hidden .fund-company-chip-ticker {
      color: rgba(148, 163, 184, 0.56);
    }
    .fund-chip .fund-metric-dot {
      width: 14px;
      height: 14px;
      border-radius: 5px;
    }
    .fund-chip-color-btn {
      border: none;
      background: transparent;
      padding: 0;
      margin: 0;
      margin-right: 6px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      border-radius: 6px;
      flex-shrink: 0;
    }
    .fund-chip-color-btn:hover .fund-metric-dot,
    .fund-chip-color-btn:focus-visible .fund-metric-dot {
      box-shadow: 0 0 0 2px rgba(138, 155, 122, 0.4);
    }
    .fund-chip-color-btn:focus-visible {
      outline: none;
    }
    .fund-legend-color-btn {
      border: none;
      background: transparent;
      padding: 0;
      margin: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      cursor: pointer;
      border-radius: 6px;
      flex-shrink: 0;
      transition: background 120ms ease;
    }
    .fund-legend-color-btn:hover .fund-metric-dot,
    .fund-legend-color-btn:focus-visible .fund-metric-dot {
      box-shadow: 0 0 0 2px rgba(138, 155, 122, 0.4);
    }
    .fund-legend-color-btn:focus-visible {
      outline: none;
      background: rgba(51, 65, 85, 0.28);
    }
    .fund-chip-label {
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      flex: 0 1 auto;
      min-width: 0;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
      font-weight: 300;
      font-size: 14px;
      line-height: 1.2;
      max-width: 100%;
      min-height: 26px;
      padding: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      color: inherit;
      box-shadow: none;
      transition: color 120ms ease;
    }
    .fund-chip-label[aria-pressed='true'] {
      color: var(--fund-title);
    }
    .fund-chip:not(.fund-company-chip).is-active .fund-chip-label {
      color: var(--fund-title);
    }
    .fund-chip-label.is-open {
      color: var(--fund-title);
    }
    .fund-chip.is-hidden .fund-chip-label {
      color: var(--fund-text-dim);
    }
	    .fund-company-chip-label {
	      font-family: inherit;
	      font-weight: 700;
	      font-size: 12px;
	      text-align: left;
	      display: inline-flex;
	      align-items: center;
	      flex: 0 1 auto;
	      gap: 4px;
	      min-width: 0;
	      width: auto;
	      border: none;
	      background: transparent;
	      color: inherit;
      padding: 0;
      cursor: pointer;
    }
    .fund-company-chip-label:focus-visible {
      outline: none;
    }
	    .fund-company-chip-logo {
	      width: 30px;
	      height: 30px;
	      border-radius: 999px;
	      display: inline-flex;
	      align-items: center;
      justify-content: center;
	      flex: 0 0 auto;
	      overflow: hidden;
	      background: var(--fund-company-chip-logo-bg);
	      border: none;
	      box-shadow: none;
	    }
	    .fund-company-chip-logo-img {
	      display: none;
	      width: 100%;
	      height: 100%;
	      object-fit: contain;
	    }
    .fund-company-chip-logo-fallback {
      display: none;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      background: var(--fund-company-chip-fallback-bg);
      color: var(--fund-company-chip-fallback-text);
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
	    .fund-company-chip-text {
	      display: inline-flex;
	      align-items: baseline;
	      gap: 3px;
	      min-width: 0;
	      flex: 0 1 auto;
	    }
    .fund-company-chip-name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .fund-company-chip-day-change {
      flex: 0 0 auto;
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
    }
    .fund-company-chip-day-change.is-positive {
      color: var(--fund-success);
    }
    .fund-company-chip-day-change.is-negative {
      color: var(--fund-danger);
    }
    .fund-company-chip-day-change.is-flat {
      color: var(--fund-company-chip-ticker);
    }
    .fund-company-chip-ticker {
      flex: 0 0 auto;
      color: var(--fund-company-chip-ticker);
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
    }
    .fund-chip-actions {
      display: inline-flex;
      align-items: center;
      gap: 1px;
      margin: -2px 0;
      margin-left: auto;
      flex-shrink: 0;
    }
    .fund-chip:not(.fund-company-chip) .fund-chip-actions {
      gap: 0;
      margin: 0;
      overflow: visible;
    }
    .fund-company-chip .fund-chip-actions {
      gap: 0;
      margin: 0 0 0 auto;
    }
	    .fund-company-chip .fund-chip-visibility,
	    .fund-company-chip .fund-chip-remove {
	      width: 22px;
	      height: 22px;
	      border-radius: 999px;
	      background: transparent;
	    }
    .fund-chip-visibility {
      position: relative;
      width: 30px;
      height: 30px;
      box-sizing: border-box;
      border: none;
      border-radius: 9px;
      background: rgba(30, 41, 59, 0.28);
      color: var(--fund-text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
    }
    .fund-chip-visibility:hover {
      background: rgba(51, 65, 85, 0.5);
      color: var(--fund-text);
    }
    .fund-chip-visibility.is-visible {
      background: rgba(30, 41, 59, 0.28);
      color: var(--fund-text);
    }
    .fund-chip-visibility.is-hidden {
      color: var(--fund-text-dim);
      background: rgba(15, 23, 42, 0.2);
    }
    .fund-chip-visibility:hover,
    .fund-chip-visibility.is-visible:hover,
    .fund-chip-visibility.is-hidden:hover {
      background: rgba(51, 65, 85, 0.5);
      color: var(--fund-text);
    }
    .fund-chip-visibility-icon {
      position: relative;
      display: block;
      width: 14px;
      height: 9px;
      border: 1.6px solid currentColor;
      border-radius: 999px / 700px;
      box-sizing: border-box;
    }
    .fund-chip-visibility-icon::after {
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: currentColor;
      transform: translate(-50%, -50%);
    }
    .fund-chip-visibility.is-hidden .fund-chip-visibility-icon::before {
      content: '';
      position: absolute;
      left: -2px;
      top: 50%;
      width: 18px;
      height: 1.6px;
      border-radius: 999px;
      background: currentColor;
      transform: translateY(-50%) rotate(-35deg);
      transform-origin: center;
    }
    .fund-chip-visibility.is-hidden .fund-chip-visibility-icon::after {
      opacity: 0.24;
    }
    .fund-chip-settings-btn {
      width: 0;
      min-width: 0;
      height: 18px;
      box-sizing: border-box;
      border: none;
      border-radius: 999px;
      background: transparent;
      color: rgba(203, 213, 225, 0.72);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      font-size: 14px;
      font-weight: 500;
      line-height: 1;
      cursor: pointer;
      flex-shrink: 0;
      overflow: hidden;
      margin-left: 0;
      opacity: 0;
      transform: translateX(-4px);
      pointer-events: none;
      transition: background 120ms ease, color 120ms ease, opacity 120ms ease, transform 120ms ease, width 120ms ease, margin-left 120ms ease;
    }
    .fund-chip:hover .fund-chip-settings-btn,
    .fund-chip:focus-within .fund-chip-settings-btn,
    .fund-chip-settings-btn.is-open {
      width: 18px;
      margin-left: 4px;
      opacity: 1;
      transform: translateX(0);
      pointer-events: auto;
    }
    .fund-chip-settings-btn:hover {
      background: rgba(148, 163, 184, 0.14);
      color: var(--fund-text);
    }
    .fund-chip-settings-btn.is-open {
      background: rgba(125, 211, 252, 0.12);
      color: #d8f2ff;
    }
    .fund-chip-settings-panel {
      position: fixed;
      width: min(220px, calc(100vw - 24px));
      max-width: min(220px, calc(100vw - 24px));
      padding: 8px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 20px;
      background: #343332;
      box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
      z-index: 2600;
      backdrop-filter: none;
    }
    .fund-chip-settings-submenu {
      width: min(184px, calc(100vw - 24px));
      max-width: min(184px, calc(100vw - 24px));
      z-index: 2601;
    }
    .fund-chip-settings-title {
      display: none;
    }
    .fund-chip-settings-rows {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .fund-chip-settings-actions {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .fund-chip-settings-action-btn {
      width: 100%;
      min-height: 44px;
      border: none;
      border-radius: 12px;
      background: transparent;
      color: #f5f5f5;
      padding: 0 14px;
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) auto auto;
      align-items: center;
      gap: 11px;
      text-align: left;
      font-size: 15px;
      font-weight: 500;
      line-height: 1.2;
      cursor: pointer;
      box-shadow: none;
      opacity: 1;
      transition: background var(--transition-micro), color var(--transition-micro);
    }
    .fund-chip-settings-action-btn:hover,
    .fund-chip-settings-action-btn:focus-visible,
    .fund-chip-settings-action-btn.is-open,
    .fund-chip-settings-action-btn.is-active {
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
      outline: none;
    }
    .fund-chip-settings-action-btn.is-danger {
      color: #f87171;
    }
    .fund-chip-settings-action-btn.is-danger:hover,
    .fund-chip-settings-action-btn.is-danger:focus-visible {
      background: rgba(248, 113, 113, 0.12);
      color: #f87171;
    }
    .fund-chip-settings-action-btn.is-disabled {
      color: rgba(255, 255, 255, 0.42);
      cursor: not-allowed;
    }
    .fund-chip-settings-action-btn.is-disabled:hover,
    .fund-chip-settings-action-btn.is-disabled:focus-visible {
      background: transparent;
      color: rgba(255, 255, 255, 0.42);
    }
    .fund-chip-settings-action-icon,
    .fund-chip-settings-action-chevron,
    .fund-chip-settings-action-check {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: rgba(255, 255, 255, 0.9);
      flex-shrink: 0;
    }
    .fund-chip-settings-action-icon {
      width: 18px;
      height: 18px;
    }
    .fund-chip-settings-action-chevron,
    .fund-chip-settings-action-check {
      width: 14px;
      height: 14px;
      color: rgba(255, 255, 255, 0.58);
    }
    .fund-chip-settings-action-btn.is-danger .fund-chip-settings-action-icon,
    .fund-chip-settings-action-btn.is-danger .fund-chip-settings-action-chevron,
    .fund-chip-settings-action-btn.is-danger .fund-chip-settings-action-check {
      color: inherit;
    }
    .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-icon,
    .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-chevron,
    .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-check {
      color: rgba(255, 255, 255, 0.42);
    }
    .fund-chip-settings-action-label,
    .fund-chip-settings-action-meta {
      min-width: 0;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .fund-chip-settings-action-label {
      color: inherit;
    }
    .fund-chip-settings-action-meta {
      color: rgba(255, 255, 255, 0.54);
      font-size: 13px;
      font-weight: 500;
    }
    .fund-chip-settings-action-btn.is-active .fund-chip-settings-action-meta {
      color: rgba(255, 255, 255, 0.74);
    }
    .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-meta {
      color: rgba(255, 255, 255, 0.42);
    }
    .fund-chip-settings-seg {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 4px;
      padding: 4px;
      min-height: 46px;
      border: 1px solid rgba(84, 97, 121, 0.18);
      border-radius: 18px;
      background: var(--fund-bg-card);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    }
    .fund-chip-settings-seg-btn {
      border: 1px solid transparent;
      border-radius: 14px;
      background: transparent;
      color: var(--fund-text-muted);
      min-height: 38px;
      padding: 0 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 600;
      line-height: 1;
      cursor: pointer;
      transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
    }
    .fund-chip-settings-seg-btn:hover {
      border-color: rgba(148, 163, 184, 0.22);
      background: rgba(148, 163, 184, 0.1);
      color: var(--fund-title);
    }
    .fund-chip-settings-seg-btn.active {
      border-color: var(--fund-accent-border);
      background: rgba(90, 107, 74, 0.2);
      color: var(--fund-title);
    }
    .fund-chip-settings-toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 46px;
      padding: 6px 6px 6px 16px;
      border: 1px solid rgba(84, 97, 121, 0.18);
      border-radius: 18px;
      background: var(--fund-bg-card);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    }
    .fund-chip-settings-toggle-row.is-disabled-row {
      opacity: 0.86;
    }
    .fund-chip-settings-toggle-row.is-blocked-row {
      border-style: dashed;
    }
    .fund-chip-settings-toggle-copy {
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 1px;
    }
    .fund-chip-settings-toggle-title {
      color: var(--fund-title);
      font-size: 13px;
      font-weight: 600;
      line-height: 1.2;
    }
    .fund-chip-settings-toggle-status {
      color: var(--fund-text-dim);
      font-size: 11px;
      line-height: 1.25;
    }
    .fund-chip-settings-toggle-status.is-blocked {
      color: #fdba74;
    }
    .fund-chip-settings-toggle-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      min-width: 64px;
      height: 34px;
      padding: 0 14px;
      border: 1px solid rgba(100, 116, 139, 0.42);
      border-radius: 999px;
      background: rgba(30, 41, 59, 0.26);
      color: var(--fund-text-muted);
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
    }
    .fund-chip-settings-toggle-btn:hover {
      border-color: var(--fund-accent-border);
      background: rgba(51, 65, 85, 0.38);
      color: var(--fund-title);
    }
    .fund-chip-settings-toggle-btn.active {
      border-color: var(--fund-accent-border);
      background: rgba(90, 107, 74, 0.24);
      color: var(--fund-title);
    }
    .fund-chip-settings-toggle-btn.is-disabled {
      opacity: 0.48;
      cursor: not-allowed;
    }
    .fund-chip-settings-toggle-btn.is-blocked {
      border-style: dashed;
    }
    .fund-chip-remove {
      border: none;
      background: transparent;
      color: var(--fund-text-dim);
      width: 30px;
      height: 30px;
      border-radius: 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 15px;
      line-height: 1;
      cursor: pointer;
      padding: 0;
      transition: background 120ms ease, color 120ms ease, opacity 120ms ease;
    }
    .fund-chip-remove:hover {
      background: rgba(51, 65, 85, 0.5);
      color: var(--fund-danger);
    }
    .fund-chip:not(.fund-company-chip) .fund-chip-visibility,
    .fund-chip:not(.fund-company-chip) .fund-chip-settings-btn,
    .fund-chip:not(.fund-company-chip) .fund-chip-visibility.is-visible,
    .fund-chip:not(.fund-company-chip) .fund-chip-visibility.is-hidden {
      background: transparent;
      box-shadow: none;
    }
    .fund-chip:not(.fund-company-chip) .fund-chip-visibility:hover,
    .fund-chip:not(.fund-company-chip) .fund-chip-visibility.is-visible:hover,
    .fund-chip:not(.fund-company-chip) .fund-chip-visibility.is-hidden:hover,
    .fund-chip:not(.fund-company-chip) .fund-chip-settings-btn:hover {
      background: rgba(148, 163, 184, 0.14);
    }
    .fund-chip:not(.fund-company-chip) .fund-chip-settings-btn.is-open {
      background: rgba(125, 211, 252, 0.12);
      color: #d8f2ff;
    }
    .fund-chart-wrap {
      flex: 0 0 auto;
      height: clamp(505px, calc(100vh - 305px), 705px);
      min-height: clamp(505px, calc(100vh - 305px), 705px);
      margin-top: 40px;
      width: calc(100% - 15px);
      max-width: calc(100% - 15px);
      display: flex;
    }
    .fund-chart-area {
      position: relative;
      flex: 1;
      min-width: 0;
      min-height: 0;
      border: none;
      border-radius: 10px;
      background: var(--fund-chart-bg, var(--fund-bg));
      box-shadow: none;
      overflow: hidden;
    }
    .fund-brand-logo {
      position: absolute;
      top: 16px;
      left: 16px;
      z-index: 110;
      display: none;
      align-items: center;
      gap: 8px;
      max-width: calc(100% - 32px);
      pointer-events: none;
    }
    .fund-brand-logo-item {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 44px;
      min-height: 44px;
      max-width: 76px;
      max-height: 76px;
      padding: 8px;
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 10px 26px rgba(2, 6, 23, 0.16);
      opacity: 0.88;
      backdrop-filter: blur(10px);
    }
    .fund-brand-logo img,
    .fund-brand-logo-item img {
      display: block;
      max-width: 100%;
      max-height: 100%;
      width: auto;
      height: auto;
      object-fit: contain;
    }
    #fund-engine-chart {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
    .fund-chart-export-title {
      display: none;
      width: 100%;
      max-width: min(76%, 920px);
      min-height: 56px;
      margin: 0 auto;
      padding: 0 8px;
      color: var(--fund-title);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 28px;
      line-height: 1.08;
      font-weight: 600;
      letter-spacing: 0.01em;
      text-align: center;
      text-wrap: balance;
      user-select: none;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-title:not(.hidden) {
      display: flex;
      flex: 0 0 56px;
      align-items: center;
      justify-content: center;
    }
    .fund-chart-export-title.hidden {
      display: none;
    }
    .fund-chart-export-title.on-light {
      color: #111827;
    }
    .fund-chart-export-footer {
      display: none;
      width: 100%;
      min-height: 88px;
      padding: 14px 0 0;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      user-select: none;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-footer {
      display: flex;
      flex: 0 0 68px;
      min-height: 68px;
      padding-top: 4px;
      align-items: flex-start;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-footer.single-metric {
      flex: 0 0 auto;
      min-height: 42px;
    }
    .fund-chart-title {
      position: absolute;
      top: 14px;
      left: 50%;
      transform: translateX(-50%);
      /* Keep the generated title above the chart engine input layer. */
      z-index: 120;
      max-width: min(78%, 920px);
      color: var(--fund-title);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 19px;
      line-height: 1.2;
      font-weight: 500;
      letter-spacing: 0.01em;
      text-align: center;
      text-shadow: 0 2px 10px rgba(2, 6, 23, 0.28);
      pointer-events: auto;
      user-select: none;
      cursor: move;
      padding: 2px 6px;
      border-radius: 6px;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-title {
      top: 8px;
      max-width: min(86%, 920px);
      font-size: 14px;
      line-height: 1.1;
      font-weight: 600;
      text-shadow: none;
      pointer-events: none;
      cursor: default;
      padding: 0 6px;
    }
    .fund-chart-export-legend {
      position: relative;
      z-index: 118;
      display: none;
      flex: 1 1 auto;
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-end;
      gap: 6px;
      max-width: 100%;
      padding: 0;
      min-height: 0;
      pointer-events: none;
    }
    .fund-chart-export-legend.hidden {
      display: none;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-legend:not(.hidden) {
      display: flex;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-legend.single-metric {
      gap: 0;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-legend .fund-legend-item {
      align-items: center;
      gap: 6px;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      line-height: 1.2;
      cursor: default;
      color: #4b5563;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-legend .fund-legend-text {
      font-size: inherit;
      line-height: inherit;
      white-space: normal;
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-export-legend .fund-metric-dot {
      width: 8px;
      height: 8px;
      margin-top: 0;
      align-self: center;
    }
    .fund-chart-export-legend.on-light .fund-legend-item {
      color: #4b5563;
    }
    .fund-chart-title.on-light {
      color: #111827;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 18px rgba(255, 255, 255, 0.22);
    }
    #main-content[data-newsletter-export-root="true"] .fund-chart-title.on-light,
    :root[data-newsletter-editor="true"][data-newsletter-editor-target="fundamentals"] #fundamentals-container .fund-chart-title.on-light {
      color: #111827;
      text-shadow: none;
    }
    .fund-chart-title.selected {
      outline: 1px dashed rgba(255,255,255,0.88);
      outline-offset: 1px;
      background: rgba(15, 23, 42, 0.16);
    }
    .fund-chart-title.on-light.selected {
      outline: 1px dashed rgba(17,24,39,0.42);
    }
    .fund-chart-title.editing {
      visibility: hidden;
    }
    .fund-chart-title.hidden {
      display: none;
    }
    .fund-chart-title-editor {
      z-index: 121;
      box-sizing: border-box;
      resize: none;
      overflow: hidden;
      font-family: 'Inter', var(--tos-font-ui);
      text-align: center;
      text-shadow: 0 2px 10px rgba(2, 6, 23, 0.28);
    }
    .fund-chart-title-editor.active {
      outline: 1px dashed rgba(255,255,255,0.88);
      outline-offset: 1px;
      border-radius: 6px;
    }
    .fund-ai-note-overlay {
      position: absolute;
      z-index: 119;
      pointer-events: auto;
      user-select: none;
      background: transparent;
      box-sizing: border-box;
      border-radius: 10px;
      box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
      white-space: normal;
      cursor: grab;
      touch-action: none;
    }
    .fund-ai-note-overlay.hidden {
      display: none;
    }
    .fund-ai-note-overlay.dragging {
      cursor: grabbing;
    }
    .fund-ai-note-overlay-meta {
      margin-bottom: 10px;
      color: var(--fund-ai-note-muted, currentColor);
      font-size: inherit;
      line-height: 1.2;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .fund-ai-note-overlay-row + .fund-ai-note-overlay-row {
      margin-top: 10px;
    }
    .fund-ai-note-overlay-row {
      padding-left: 10px;
      border-left: 2px solid var(--fund-ai-note-row-color, currentColor);
    }
    .fund-ai-note-overlay-row-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }
    .fund-ai-note-overlay-label {
      min-width: 0;
      font-size: inherit;
      line-height: 1.15;
      font-weight: 600;
    }
    .fund-ai-note-overlay-row.is-primary .fund-ai-note-overlay-label {
      font-weight: 700;
    }
    .fund-ai-note-overlay-change {
      flex: 0 0 auto;
      color: var(--fund-ai-note-row-color, currentColor);
      font-size: inherit;
      line-height: 1.2;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .fund-ai-note-overlay-values {
      margin-top: 4px;
      color: var(--fund-ai-note-muted, currentColor);
      font-size: inherit;
      font-variant-numeric: tabular-nums;
      line-height: 1.25;
    }
    .fund-ai-note-overlay-more {
      margin-top: 12px;
      color: var(--fund-ai-note-muted, currentColor);
      font-size: inherit;
      line-height: 1.2;
      font-variant-numeric: tabular-nums;
    }
    .fund-ai-note-overlay-line {
      display: block;
      white-space: pre-wrap;
    }
    .fund-status {
      position: absolute;
      top: 12px;
      left: 12px;
      right: auto;
      bottom: auto;
      display: none;
      align-items: center;
      justify-content: flex-start;
      text-align: left;
      padding: 6px 11px;
      color: var(--fund-text-soft);
      font-size: 12px;
      line-height: 1.3;
      pointer-events: none;
      background: rgba(17, 24, 39, 0.84);
      border: 1px solid var(--fund-border-soft);
      border-radius: 7px;
      box-shadow: 0 12px 28px rgba(2, 6, 23, 0.24);
      backdrop-filter: blur(4px);
      z-index: 6;
      max-width: min(560px, calc(100% - 24px));
    }
    .fund-status.visible {
      display: flex;
    }
    .fund-tooltip {
      position: absolute;
      z-index: 12;
      pointer-events: none;
      min-width: 148px;
      max-width: 214px;
      --fund-tooltip-arrow-left: 50%;
      --fund-tooltip-surface-top: rgba(255, 255, 255, 0.995);
      --fund-tooltip-surface-bottom: rgba(246, 248, 252, 0.992);
      --fund-tooltip-border-color: rgba(203, 213, 225, 0.95);
      border: 1px solid var(--fund-tooltip-border-color);
      border-radius: 11px;
      background: linear-gradient(180deg, var(--fund-tooltip-surface-top) 0%, var(--fund-tooltip-surface-bottom) 100%);
      box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.14);
      padding: 6px 8px 5px;
      color: #243041;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 10px;
      line-height: 1.15;
      letter-spacing: -0.01em;
    }
    .fund-tooltip::after {
      content: '';
      position: absolute;
      left: var(--fund-tooltip-arrow-left);
      bottom: -4px;
      width: 9px;
      height: 9px;
      background: var(--fund-tooltip-surface-bottom);
      border-right: 1px solid var(--fund-tooltip-border-color);
      border-bottom: 1px solid var(--fund-tooltip-border-color);
      box-shadow: 5px 5px 9px rgba(15, 23, 42, 0.07);
      transform: translateX(-50%) rotate(45deg);
    }
    .fund-tooltip.hidden {
      display: none;
    }
    .fund-tooltip-title {
      color: #243041;
      margin-bottom: 2px;
      font-weight: 700;
      font-size: 12px;
      line-height: 1.1;
    }
    .fund-tooltip-subtitle {
      color: var(--fund-text-muted);
      margin-bottom: 4px;
      font-size: 9px;
      line-height: 1.2;
      letter-spacing: 0.01em;
    }
    .fund-tooltip-rows {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .fund-tooltip-row {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 4px;
      margin-top: 0;
      min-width: 0;
    }
    .fund-tooltip-row + .fund-tooltip-row {
      margin-top: 0;
    }
    .fund-tooltip-row .fund-metric-dot {
      width: 6px;
      height: 6px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 0 0 1px rgba(15, 23, 42, 0.06);
    }
    .fund-tooltip-series-label {
      color: #2f3a4b;
      font-weight: 500;
      white-space: nowrap;
    }
    .fund-tooltip-val {
      color: #243041;
      font-variant-numeric: tabular-nums;
      font-weight: 700;
      white-space: nowrap;
    }
    .fund-tooltip-row.active .fund-tooltip-series-label,
    .fund-tooltip-row.active .fund-tooltip-val {
      color: #0f172a;
    }
    .fund-tooltip-row.hovered:not(.active) .fund-tooltip-series-label,
    .fund-tooltip-row.hovered:not(.active) .fund-tooltip-val {
      color: #1f3655;
    }
    .fund-below {
      display: flex;
      flex-direction: column;
      position: relative;
      gap: 14px;
      min-height: auto;
      padding-bottom: 96px;
    }
    .fund-range-spacer {
      flex: 0 0 auto;
      min-height: 0;
      position: relative;
      pointer-events: auto;
      user-select: none;
      overflow: visible;
    }
    .fund-range-block {
      --fund-range-thumb-width: 11px;
      --fund-range-thumb-height: 22px;
      --fund-range-thumb-radius: 3px;
      --fund-range-thumb-border: 0px;
      --fund-range-thumb-shadow: 0px;
      --fund-range-thumb-rendered: 11px;
      --fund-range-thumb-offset: 5px;
      margin-top: 12px;
      padding: 0 16px 6px;
      background: transparent;
      border: 0;
      box-shadow: none;
      user-select: none;
    }
    .fund-range-spacer > .fund-range-block {
      margin-top: 0;
      padding: 0 0 6px;
    }
    .fund-range-block-below {
      --fund-range-thumb-width: 14px;
      --fund-range-thumb-height: 22px;
      --fund-range-thumb-rendered: 14px;
      --fund-range-thumb-offset: 7px;
      flex: 0 1 calc(50% - 9px);
      width: min(100%, calc(50% - 9px));
      max-width: calc(50% - 9px);
      margin-top: 0;
      padding-top: 0;
      padding-bottom: 0;
    }
    .fund-range-block-below .fund-range-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin: 0 2px 8px;
    }
    #fund-range-block.fund-range-block-below .fund-range-head {
      display: none;
    }
    .fund-range-block-below .fund-range-title,
    .fund-range-block-below .fund-range-value {
      color: var(--fund-title);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.01em;
      text-transform: none;
    }
    .fund-range-block-below .fund-range-value {
      text-align: right;
    }
    .fund-range-block-below .fund-range-axis {
      display: block;
    }
    .fund-range-block.hidden {
      display: none;
    }
    .fund-range-head {
      display: none;
    }
    .fund-range-title {
      color: var(--fund-text-soft);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .fund-range-value {
      color: var(--fund-title);
      font-size: 13px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .fund-range-slider {
      position: relative;
      height: 34px;
      user-select: none;
      overflow: visible;
    }
    .fund-range-base {
      position: absolute;
      left: 0;
      right: 0;
      top: 11px;
      height: 6px;
      border-radius: 999px;
      background: var(--fund-range-base-bg);
      box-shadow: inset 0 0 0 1px var(--fund-range-base-border);
    }
    .fund-range-base::before,
    .fund-range-base::after {
      content: none;
      position: absolute;
      top: 50%;
      width: 1px;
      height: 12px;
      border-radius: 1px;
      background: rgb(85, 85, 85);
      transform: translateY(-50%);
    }
    .fund-range-base::before {
      left: 0;
    }
    .fund-range-base::after {
      right: 0;
    }
    .fund-range-align {
      position: absolute;
      left: var(--fund-range-thumb-offset);
      right: var(--fund-range-thumb-offset);
      top: 11px;
      height: 6px;
    }
    .fund-range-thumb-label {
      position: absolute;
      top: -38px;
      display: none;
      transform: translateX(-50%);
      min-width: 58px;
      padding: 4px 8px 5px;
      border-radius: 6px;
      border: 1px solid rgba(110, 125, 102, 0.55);
      background: rgba(20, 28, 41, 0.96);
      color: #e7edf7;
      font-size: 12px;
      line-height: 1.15;
      font-weight: 500;
      letter-spacing: 0.03em;
      text-align: center;
      white-space: nowrap;
      pointer-events: none;
      box-shadow: 0 8px 20px rgba(2, 6, 23, 0.22);
      z-index: 6;
    }
    .fund-range-active {
      position: absolute;
      top: 0;
      height: 6px;
      border-radius: 999px;
      background: var(--fund-range-active-bg);
      box-shadow: 0 0 0 1px var(--fund-range-active-shadow), 0 0 8px var(--fund-range-active-glow);
    }
    .fund-range-input {
      -webkit-appearance: none;
      appearance: none;
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 34px;
      margin: 0;
      background: none;
      pointer-events: none;
    }
    .fund-range-input::-webkit-slider-runnable-track {
      height: 34px;
      background: transparent;
      border: 0;
    }
    .fund-range-input::-moz-range-track {
      height: 34px;
      background: transparent;
      border: 0;
    }
    .fund-range-input::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: var(--fund-range-thumb-width);
      height: var(--fund-range-thumb-height);
      border-radius: var(--fund-range-thumb-radius);
      border: 0;
      background: linear-gradient(180deg, var(--fund-range-thumb-top) 0%, var(--fund-range-thumb-bottom) 100%);
      box-shadow: none;
      margin-top: 2px;
      cursor: ew-resize;
      pointer-events: auto;
    }
    .fund-range-input::-moz-range-thumb {
      width: var(--fund-range-thumb-width);
      height: var(--fund-range-thumb-height);
      border-radius: var(--fund-range-thumb-radius);
      border: 0;
      background: linear-gradient(180deg, var(--fund-range-thumb-top) 0%, var(--fund-range-thumb-bottom) 100%);
      box-shadow: none;
      cursor: ew-resize;
      pointer-events: auto;
    }
    .fund-range-input:disabled::-webkit-slider-thumb,
    .fund-range-input:disabled::-moz-range-thumb {
      opacity: 0.45;
      cursor: default;
    }
    .fund-range-axis {
      margin-top: -2px;
    }
    .fund-range-axis-align {
      position: relative;
      width: calc(100% - var(--fund-range-thumb-rendered));
      margin-left: var(--fund-range-thumb-offset);
    }
    .fund-range-ticks {
      position: relative;
      height: 4px;
    }
    .fund-range-tick {
      position: absolute;
      top: 0;
      width: 1px;
      height: 4px;
      background: rgba(107, 114, 128, 0.7);
      transform: translateX(-50%);
    }
    .fund-range-labels {
      position: relative;
      height: 13px;
      margin-top: 4px;
    }
    .fund-range-label {
      position: absolute;
      top: 0;
      transform: translateX(-50%);
      color: #9ca3af;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 12px;
      font-weight: 400;
      line-height: 1;
      white-space: nowrap;
    }
    #overview-container .fund-range-label {
      color: #ffffff;
    }
    .fund-below-top {
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 18px;
      flex-wrap: wrap;
      width: 100%;
      min-height: 32px;
      box-sizing: border-box;
      padding-left: var(--fund-chart-left-inset, 24px);
      padding-right: var(--fund-chart-right-inset, 70px);
    }
    .fund-legend {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      padding: 0;
      flex: 1 1 320px;
      min-width: 280px;
      max-width: none;
    }
    .fund-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
      color: #d1d5db;
      line-height: 1.35;
      cursor: default;
      transition: color 0.12s ease, opacity 0.12s ease;
      max-width: 100%;
      text-align: left;
    }
    .fund-legend-item:hover {
      color: #e5e7eb;
    }
    .fund-legend-item.is-active {
      color: #e5e7eb;
    }
    .fund-legend-item.is-hovered:not(.is-active) {
      color: #e5e7eb;
    }
    .fund-legend-text {
      color: inherit;
      font-size: 14px;
      font-weight: 300;
      font-variant-numeric: tabular-nums;
      white-space: normal;
    }
    .fund-legend-muted {
      color: var(--fund-text-muted);
      font-variant-numeric: tabular-nums;
    }
    .fund-controls-row {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      flex-wrap: wrap;
      flex: 0 0 auto;
      width: auto;
      max-width: 100%;
      margin-left: auto;
      box-sizing: border-box;
      padding: 0;
      pointer-events: none;
    }
    .fund-table-wrap {
      margin: 0 var(--fund-chart-right-inset, 70px) 0 var(--fund-chart-left-inset, 24px);
      border: 1px solid var(--fund-sidebar-border);
      border-radius: 14px;
      background: transparent;
      box-shadow: none;
      overflow: hidden;
    }
    .fund-table-wrap.hidden {
      display: none;
    }
    .fund-table-scroll {
      overflow-x: auto;
      overflow-y: hidden;
    }
    .fund-table {
      width: 100%;
      min-width: 680px;
      border-collapse: collapse;
      table-layout: fixed;
      font-variant-numeric: tabular-nums;
    }
    .fund-table thead {
      background: transparent;
    }
    .fund-table th,
    .fund-table td {
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding: 11px 10px;
    }
    .fund-table th {
      color: var(--fund-text-muted);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      text-align: right;
      white-space: nowrap;
    }
    .fund-table.is-quarterly .fund-table-year-header,
    .fund-table.is-quarterly .fund-table-quarter-header {
      text-align: center;
    }
    .fund-table.is-quarterly .fund-table-year-header {
      font-size: 10px;
      letter-spacing: 0.12em;
    }
    .fund-table.is-quarterly .fund-table-quarter-header {
      font-size: 10px;
      letter-spacing: 0.04em;
    }
    .fund-table th:first-child,
    .fund-table td:first-child {
      position: sticky;
      left: 0;
      z-index: 1;
      background: inherit;
    }
    .fund-table th:first-child {
      width: 188px;
      min-width: 188px;
      text-align: left;
      background: transparent;
    }
    .fund-table tbody tr {
      background: transparent;
    }
    .fund-table tbody tr:hover {
      background: rgba(255, 255, 255, 0.04);
    }
    .fund-table tbody tr.is-metric-active {
      background: rgba(255, 255, 255, 0.07);
    }
    .fund-table tbody tr.is-metric-hovered {
      background: rgba(255, 255, 255, 0.05);
    }
    .fund-table td {
      color: var(--fund-text);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      text-align: right;
      white-space: nowrap;
    }
    .fund-table th.is-hovered,
    .fund-table td.is-hovered {
      background: rgba(255, 255, 255, 0.06);
    }
    .fund-table td:first-child {
      text-align: left;
      background: transparent;
      font-weight: 500;
      color: var(--fund-title);
    }
    .fund-table tbody tr.is-metric-active td:first-child {
      background: transparent;
    }
    .fund-table tbody tr.is-metric-hovered td:first-child {
      background: transparent;
    }
    .fund-table-unit {
      color: var(--fund-text-dim);
      font-size: 10px;
      font-weight: 500;
      margin-left: 4px;
    }
    .fund-table-empty-row td {
      text-align: left;
      color: var(--fund-text-muted);
      font-style: italic;
    }
    .fund-table-toggle-row {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 var(--fund-chart-right-inset, 70px) 0 var(--fund-chart-left-inset, 24px);
      pointer-events: auto;
    }
    .fund-table-toggle-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 34px;
      padding: 8px 14px;
      border: 1px solid var(--fund-border-soft);
      border-radius: 10px;
      background: var(--fund-bg-card);
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
      color: var(--fund-text-soft);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.01em;
      cursor: pointer;
      transition:
        color var(--transition-micro),
        border-color var(--transition-micro),
        background var(--transition-micro),
        box-shadow var(--transition-micro);
    }
    .fund-table-toggle-btn:hover,
    .fund-table-toggle-btn:focus-visible {
      color: var(--fund-title);
      border-color: var(--fund-border-soft);
      background: var(--fund-bg-hover);
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
      outline: none;
    }
    .fund-table-toggle-btn.is-expanded {
      color: var(--fund-title);
      background: var(--fund-bg-active);
    }
    .fund-table-toggle-btn:disabled {
      opacity: 0.55;
      cursor: default;
      box-shadow: none;
    }
    .fund-table-toggle-btn:disabled:hover {
      color: var(--fund-text-soft);
      border-color: var(--fund-border-soft);
      background: var(--fund-bg-card);
      box-shadow: none;
    }
    .fund-table-toggle-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform var(--transition-micro);
      order: 2;
    }
    .fund-table-toggle-btn.is-expanded .fund-table-toggle-icon {
      transform: rotate(180deg);
    }
    .fund-table-toggle-label {
      white-space: nowrap;
      order: 1;
    }
    .fund-controls-row > * {
      pointer-events: auto;
    }
    #fundamentals-container.fund-fullscreen .fund-table-toggle-row,
    #fundamentals-container.fund-fullscreen .fund-table-wrap {
      display: none;
    }
    .fund-shell {
      display: flex;
      align-items: stretch;
      gap: 0;
      min-width: 0;
      min-height: 0;
      flex: 1 1 auto;
    }
    .fund-sidebar {
      --fund-sidebar-inline-inset: 2px;
      --fund-sidebar-stack-divider-bleed: 10px;
      position: relative;
      display: flex;
      flex: 0 0 clamp(192px, 30vw, 320px);
      flex-direction: column;
      width: clamp(192px, 30vw, 320px);
      min-width: clamp(192px, 30vw, 320px);
      padding: 10px 4px 16px;
      border: 1px solid var(--fund-sidebar-divider, var(--fund-sidebar-border));
      border-radius: 0 0 16px 16px;
      background: var(--fund-sidebar-panel, var(--fund-bg));
      box-shadow: none;
      overflow: hidden;
      transition:
        width var(--transition-layout),
        min-width var(--transition-layout),
        flex-basis var(--transition-layout),
        padding var(--transition-layout),
        border-radius var(--transition-layout),
        border-width var(--transition-layout);
    }
    .fund-sidebar.is-resizing {
      transition: none;
    }
    .fund-sidebar::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 1px;
      height: 100%;
      background: var(--fund-sidebar-handle);
      pointer-events: none;
    }
    .fund-sidebar-resize-handle {
      position: relative;
      flex: 0 0 4px;
      width: 4px;
      min-width: 4px;
      align-self: stretch;
      cursor: col-resize;
      background: transparent;
      border-radius: 999px;
      transition:
        background var(--transition-micro),
        opacity var(--transition-micro),
        flex-basis var(--transition-micro),
        width var(--transition-micro),
        min-width var(--transition-micro);
    }
    .fund-sidebar-resize-handle::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: transparent;
    }
    .fund-sidebar-resize-handle:hover,
    .fund-sidebar-resize-handle.is-active,
    .fund-sidebar-resize-handle:focus-visible {
      background: var(--fund-sidebar-handle-active);
      outline: none;
    }
    .fund-sidebar-resize-handle.is-hidden {
      opacity: 0;
      pointer-events: none;
      flex-basis: 0;
      width: 0;
      min-width: 0;
    }
    .fund-sidebar.is-collapsed {
      flex-basis: 56px;
      width: 56px;
      min-width: 56px;
      padding: 10px 10px 0;
      border-width: 0 1px 0 0;
      border-color: var(--fund-sidebar-border);
      border-radius: 0;
    }
    .fund-sidebar.is-collapsed::after {
      display: none;
    }
    .fund-sidebar-header {
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      justify-content: flex-end;
      min-height: 36px;
      margin-bottom: 14px;
      padding: 0 var(--fund-sidebar-inline-inset);
    }
    .fund-sidebar.is-collapsed .fund-sidebar-header {
      justify-content: center;
      margin-bottom: 0;
    }
    .fund-sidebar-sections {
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      gap: 14px;
      min-width: 0;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      transition: opacity var(--transition-micro), transform var(--transition-micro);
    }
    .fund-sidebar-sections::-webkit-scrollbar {
      width: 6px;
    }
    .fund-sidebar-sections::-webkit-scrollbar-track {
      background: transparent;
    }
    .fund-sidebar-sections::-webkit-scrollbar-thumb {
      background: var(--fund-sidebar-border, rgba(255,255,255,0.15));
      border-radius: 3px;
    }
    .fund-sidebar-sections::-webkit-scrollbar-thumb:hover {
      background: var(--fund-sidebar-text-secondary, rgba(255,255,255,0.25));
    }
    .fund-sidebar.is-collapsed .fund-sidebar-sections {
      opacity: 0;
      pointer-events: none;
      transform: translateX(-8px);
    }
    .fund-sidebar-section {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }
    .fund-sidebar-section + .fund-sidebar-section {
      padding-top: 12px;
      border-top: 1px solid var(--fund-sidebar-section-divider, var(--fund-sidebar-divider, var(--fund-sidebar-border-soft)));
    }
    .fund-sidebar-section-headerless + .fund-sidebar-section-headerless {
      padding-top: 10px;
      border-top: none;
    }
    .fund-sidebar-section[data-fund-sidebar-section="stocks"] + .fund-sidebar-section[data-fund-sidebar-section="metrics"] {
      padding-top: 12px;
      border-top: 1px solid var(--fund-sidebar-section-divider, var(--fund-sidebar-divider, var(--fund-sidebar-border-soft)));
    }
    .fund-sidebar-section-toggle {
      width: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 6px;
      padding: 0 calc(var(--fund-sidebar-inline-inset) + 7px) 4px;
      border: none;
      background: transparent;
      text-align: left;
      cursor: pointer;
    }
    .fund-sidebar-section-toggle:focus-visible {
      outline: none;
    }
    .fund-sidebar-section-chevron {
      width: 6px;
      height: 6px;
      flex: 0 0 auto;
      border-right: 1px solid currentColor;
      border-bottom: 1px solid currentColor;
      color: var(--fund-sidebar-text-muted);
      transform: rotate(45deg) translateY(-1px);
      transition: transform var(--transition-micro), color var(--transition-micro);
    }
    .fund-sidebar-section.is-collapsed .fund-sidebar-section-chevron {
      transform: rotate(-45deg) translateY(-1px);
    }
    .fund-sidebar-section-title {
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 400;
      letter-spacing: 0;
      line-height: 1;
      text-transform: none;
      transition: color var(--transition-micro);
    }
    .fund-sidebar-section-toggle:hover .fund-sidebar-section-title,
    .fund-sidebar-section-toggle:focus-visible .fund-sidebar-section-title,
    .fund-sidebar-section-toggle:hover .fund-sidebar-section-chevron,
    .fund-sidebar-section-toggle:focus-visible .fund-sidebar-section-chevron {
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-section-body {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
      overflow: visible;
      max-height: none;
      opacity: 1;
      transform: none;
      transition:
        max-height var(--transition-layout),
        opacity var(--transition-reveal),
        transform var(--transition-reveal);
    }
    .fund-sidebar-section.is-collapsed .fund-sidebar-section-body {
      overflow: hidden;
      opacity: 0;
      transform: translateY(-4px);
    }
    /* ── AI natural-language input ── */
    .fund-ai-input-root {
      padding: 8px var(--fund-sidebar-inline-inset) 4px;
    }
    .fund-ai-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }
    .fund-ai-input-icon {
      position: absolute;
      left: 10px;
      pointer-events: none;
      color: var(--fund-sidebar-text-secondary);
      transition: color var(--transition-micro);
    }
    .fund-ai-input {
      width: 100%;
      padding: 7px 30px 7px 30px;
      border: 1px solid var(--fund-sidebar-border, rgba(255,255,255,0.08));
      border-radius: 10px;
      background: var(--fund-sidebar-surface-hover, rgba(255,255,255,0.04));
      color: var(--fund-sidebar-text-primary, #e0e0e0);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      font-weight: 400;
      line-height: 1.4;
      outline: none;
      transition: border-color var(--transition-micro), background var(--transition-micro);
    }
    .fund-ai-input::placeholder {
      color: var(--fund-sidebar-text-secondary, rgba(255,255,255,0.35));
      font-weight: 300;
    }
    .fund-ai-input:focus {
      border-color: var(--tos-accent, #4a9eff);
      background: var(--fund-sidebar-surface-active, rgba(255,255,255,0.06));
    }
    .fund-ai-input:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .fund-ai-input-spinner {
      position: absolute;
      right: 10px;
      width: 14px;
      height: 14px;
      border: 2px solid transparent;
      border-top-color: var(--tos-accent, #4a9eff);
      border-radius: 50%;
      display: none;
    }
    .fund-ai-input-spinner.is-loading {
      display: block;
      animation: fundAiSpin 0.6s linear infinite;
    }
    @keyframes fundAiSpin {
      to { transform: rotate(360deg); }
    }
    .fund-ai-input-status {
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      font-weight: 400;
      line-height: 1.3;
      color: var(--fund-sidebar-text-secondary);
      padding: 2px 4px 0;
      min-height: 16px;
    }
    .fund-ai-input-status.is-error {
      color: var(--tos-negative, #ef5350);
    }

    .fund-sidebar-search-root,
    .fund-sidebar-search-root .fund-dd-btn {
      width: 100%;
    }
    .fund-sidebar-search-btn,
    .fund-sidebar-search-control {
      width: auto;
      min-width: 0;
      min-height: 36px;
      margin: 0 var(--fund-sidebar-inline-inset);
      padding: 6px 8px;
      border: none;
      border-radius: 12px;
      background: transparent;
      box-shadow: none;
      transition:
        background var(--transition-micro),
        border-color var(--transition-micro),
        color var(--transition-micro),
        box-shadow var(--transition-micro);
    }
    .fund-sidebar-search-btn {
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      white-space: nowrap;
    }
    .fund-sidebar-search-btn:hover,
    .fund-sidebar-search-btn:focus-visible,
    .fund-sidebar-search-btn.open,
    .fund-sidebar-search-control:hover,
    .fund-sidebar-search-control.open {
      background: var(--fund-sidebar-surface-hover);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-search-control:focus-within {
      background: var(--fund-sidebar-surface-active);
      box-shadow: none;
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-search-btn:focus-visible {
      outline: none;
      box-shadow: none;
    }
    @keyframes fundSidebarSearchCaretBlink {
      0%, 45% {
        opacity: 1;
      }
      46%, 100% {
        opacity: 0;
      }
    }
    .fund-sidebar-search-label {
      display: inline-flex;
      align-items: center;
      flex: 1 1 auto;
      min-width: 0;
      gap: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
      line-height: 1;
      text-align: left;
      transition: color var(--transition-micro);
    }
    .fund-sidebar-search-btn.is-guided-prompt .fund-sidebar-search-label::before {
      content: '';
      display: inline-block;
      flex: 0 0 auto;
      width: 0;
      height: 16px;
      margin-right: 0.1em;
      border-left: 1px solid currentColor;
      opacity: 1;
      animation: fundSidebarSearchCaretBlink 1.05s steps(1, end) infinite;
    }
    @media (prefers-reduced-motion: reduce) {
      .fund-sidebar-search-btn.is-guided-prompt .fund-sidebar-search-label::before {
        animation: none;
      }
    }
    .fund-sidebar-search-shortcut {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      margin-left: auto;
      max-width: 0;
      padding-left: 0;
      overflow: hidden;
      color: var(--fund-sidebar-count);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
      letter-spacing: 0.01em;
      line-height: 1;
      opacity: 0;
      white-space: nowrap;
      pointer-events: none;
      transition:
        color var(--transition-micro),
        opacity var(--transition-micro),
        max-width var(--transition-micro),
        padding-left var(--transition-micro);
    }
    .fund-sidebar-search-btn:hover .fund-sidebar-search-shortcut {
      max-width: 56px;
      padding-left: 12px;
      opacity: 1;
    }
    .fund-sidebar-search-shortcut-key {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
      height: auto;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      font-size: 14px;
      font-weight: 300;
      letter-spacing: 0;
      line-height: 1;
      color: inherit;
    }
    .fund-sidebar-search-shortcut-command {
      min-width: 0;
      font-size: 14px;
      line-height: 1;
    }
    .fund-sidebar .fund-metrics-search-field {
      flex: 1 1 auto;
      min-width: 0;
    }
    .fund-sidebar .fund-metrics-search-input {
      width: 100%;
      min-width: 0;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
    }
    .fund-sidebar .fund-metrics-search-input::placeholder {
      transition: color var(--transition-micro);
    }
    .fund-sidebar .fund-metrics-search-control:focus-within .fund-metrics-search-input::placeholder {
      color: var(--fund-sidebar-text-secondary);
    }
    .fund-metrics-search-clear {
      width: 18px;
      height: 18px;
      min-width: 18px;
      border: none;
      border-radius: 999px;
      background: transparent;
      color: var(--fund-sidebar-text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      font-size: 16px;
      line-height: 1;
      opacity: 0;
      pointer-events: none;
      cursor: pointer;
      transition:
        opacity var(--transition-micro),
        background var(--transition-micro),
        color var(--transition-micro);
    }
    .fund-sidebar .fund-metrics-search-control.has-value .fund-metrics-search-clear,
    .fund-sidebar .fund-metrics-search-control:focus-within .fund-metrics-search-clear,
    .fund-metrics-modal-search-control.has-value .fund-metrics-search-clear,
    .fund-metrics-modal-search-control:focus-within .fund-metrics-search-clear {
      opacity: 1;
      pointer-events: auto;
    }
    .fund-metrics-search-clear:hover,
    .fund-metrics-search-clear:focus-visible {
      background: var(--fund-sidebar-action-hover);
      color: var(--fund-sidebar-text-primary);
      outline: none;
    }
    .fund-sidebar .fund-metrics-search-shortcut {
      display: none;
    }
    /* ── Metrics Browser Cards ── */
    .fund-metrics-browser {
      padding: 0;
    }
    .fund-metrics-browser-search {
      position: relative;
      display: flex;
      align-items: center;
      margin: 0 var(--fund-sidebar-inline-inset) 8px;
    }
    .fund-metrics-browser-search-icon {
      position: absolute;
      left: 10px;
      pointer-events: none;
      color: var(--fund-sidebar-text-secondary);
      transition: color var(--transition-micro);
    }
    .fund-metrics-browser-search-input {
      width: 100%;
      padding: 7px 12px 7px 32px;
      border: 1px solid var(--fund-sidebar-border, rgba(255,255,255,0.08));
      border-radius: 10px;
      background: var(--fund-sidebar-surface-hover, rgba(255,255,255,0.04));
      color: var(--fund-sidebar-text-primary, #e0e0e0);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 13px;
      font-weight: 400;
      line-height: 1.4;
      outline: none;
      transition: border-color var(--transition-micro), background var(--transition-micro);
    }
    .fund-metrics-browser-search-input::placeholder {
      color: var(--fund-sidebar-text-secondary, rgba(255,255,255,0.35));
      font-weight: 300;
    }
    .fund-metrics-browser-search-input:focus {
      border-color: var(--tos-accent, #4a9eff);
      background: var(--fund-sidebar-surface-active, rgba(255,255,255,0.06));
    }
    .fund-metrics-browser-categories {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .fund-metrics-browser-category {
      display: flex;
      flex-direction: column;
    }
    .fund-metrics-browser-category.is-collapsed .fund-metrics-browser-grid {
      display: none;
    }
    .fund-metrics-browser-category-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      width: 100%;
      padding: 6px var(--fund-sidebar-inline-inset);
      border: none;
      background: transparent;
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      text-align: left;
      cursor: pointer;
      transition: color var(--transition-micro);
    }
    .fund-metrics-browser-category-toggle:hover {
      color: var(--fund-sidebar-text-primary);
    }
    .fund-metrics-browser-category-chevron {
      display: inline-block;
      width: 10px;
      height: 10px;
      transition: transform var(--transition-micro);
    }
    .fund-metrics-browser-category-chevron::before {
      content: '';
      display: block;
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 5px solid currentColor;
    }
    .fund-metrics-browser-category.is-collapsed .fund-metrics-browser-category-chevron {
      transform: rotate(-90deg);
    }
    .fund-metrics-browser-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
      padding: 4px var(--fund-sidebar-inline-inset) 10px;
    }
    .fund-metric-card {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 6px;
      padding: 8px 10px 10px;
      min-height: 120px;
      border: 1px solid var(--fund-sidebar-border, rgba(255,255,255,0.08));
      border-radius: 12px;
      background: var(--fund-sidebar-surface, rgba(255,255,255,0.02));
      cursor: pointer;
      transition:
        background var(--transition-micro),
        border-color var(--transition-micro),
        box-shadow var(--transition-micro),
        transform var(--transition-micro);
    }
    .fund-metric-card:hover {
      background: var(--fund-sidebar-surface-hover, rgba(255,255,255,0.06));
      border-color: var(--fund-sidebar-border-hover, rgba(255,255,255,0.12));
      transform: translateY(-1px);
    }
    .fund-metric-card:active {
      transform: translateY(0);
    }
    .fund-metric-card.is-added {
      background: var(--fund-sidebar-surface-active, rgba(255,255,255,0.08));
      border-color: var(--tos-accent, #4a9eff);
    }
    .fund-metric-card.is-hidden-search {
      display: none;
    }
    .fund-metric-card.is-dragging {
      opacity: 0.45;
      transform: scale(0.98);
      cursor: grabbing;
    }
    .fund-metric-card[draggable="true"]:hover {
      cursor: grab;
    }
    #fund-chart-area {
      position: relative;
    }
    #fund-chart-area.fund-drop-armed::after {
      content: '';
      position: absolute;
      inset: 8px;
      border: 1.5px dashed var(--tos-accent, #4a9eff);
      border-radius: 12px;
      background: transparent;
      pointer-events: none;
      opacity: 0.4;
      transition: opacity var(--transition-micro), background var(--transition-micro), border-color var(--transition-micro);
      z-index: 50;
    }
    #fund-chart-area.fund-drop-hover::after {
      opacity: 1;
      background: color-mix(in srgb, var(--tos-accent, #4a9eff) 10%, transparent);
      border-color: var(--tos-accent, #4a9eff);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--tos-accent, #4a9eff) 30%, transparent) inset;
    }
    #fund-chart-area.fund-drop-hover::before {
      content: 'Drop to add to chart';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      padding: 8px 14px;
      border-radius: 999px;
      background: var(--tos-accent, #4a9eff);
      color: #fff;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
      pointer-events: none;
      z-index: 51;
      box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }
    .fund-metric-card-chart {
      position: relative;
      flex: 1 1 auto;
      width: 100%;
      min-height: 56px;
      border-radius: 6px;
      background: transparent;
      overflow: hidden;
      order: 2;
    }
    .fund-metric-card-chart canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    .fund-metric-card-chart.is-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--fund-sidebar-surface-hover, rgba(255,255,255,0.03));
    }
    .fund-metric-card-chart.is-loading::after {
      content: '';
      width: 14px;
      height: 14px;
      border: 1.5px solid transparent;
      border-top-color: var(--fund-sidebar-text-secondary);
      border-radius: 50%;
      animation: fundMetricCardSpin 0.6s linear infinite;
    }
    @keyframes fundMetricCardSpin {
      to { transform: rotate(360deg); }
    }
    .fund-metric-card-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      order: 1;
    }
    .fund-metric-card-label {
      color: var(--fund-sidebar-text-primary, #e0e0e0);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.3;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .fund-metric-card-value {
      display: flex;
      align-items: baseline;
      gap: 4px;
      min-width: 0;
    }
    .fund-metric-card-amount {
      color: var(--fund-sidebar-text-secondary, rgba(255,255,255,0.5));
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 10px;
      font-weight: 500;
      line-height: 1.2;
      letter-spacing: -0.01em;
    }
    .fund-metric-card-change {
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 9px;
      font-weight: 500;
      line-height: 1.2;
    }
    .fund-metric-card-change.is-positive {
      color: var(--tos-positive, #4ade80);
    }
    .fund-metric-card-change.is-negative {
      color: var(--tos-negative, #ef5350);
    }
    .fund-metric-card-change.is-neutral {
      color: var(--fund-sidebar-text-secondary);
    }
    .fund-metric-card-no-data {
      color: var(--fund-sidebar-text-muted, rgba(255,255,255,0.25));
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 10px;
      font-weight: 400;
      font-style: italic;
    }
    /* Light theme overrides for metrics browser */
    :root[data-theme="light"] #fundamentals-container .fund-metrics-browser-search-input {
      border-color: var(--fund-sidebar-border, rgba(0,0,0,0.1));
      background: var(--fund-sidebar-surface-hover, rgba(0,0,0,0.03));
      color: var(--fund-sidebar-text-primary, #1f2937);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metrics-browser-search-input::placeholder {
      color: var(--fund-sidebar-text-secondary, rgba(0,0,0,0.45));
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-card {
      border-color: var(--fund-sidebar-border, rgba(0,0,0,0.1));
      background: var(--fund-sidebar-surface, rgba(0,0,0,0.02));
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-card:hover {
      background: var(--fund-sidebar-surface-hover, rgba(0,0,0,0.04));
      border-color: var(--fund-sidebar-border-hover, rgba(0,0,0,0.15));
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-card.is-added {
      background: var(--fund-sidebar-surface-active, rgba(0,0,0,0.06));
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-card-chart {
      background: var(--fund-sidebar-surface-hover, rgba(0,0,0,0.03));
    }
    .fund-sidebar-chip-stack {
      width: 100%;
      max-width: none;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 2px;
      overflow: visible;
    }
    .fund-sidebar .fund-company-chips,
    .fund-sidebar .fund-chips {
      flex-direction: column;
      align-items: stretch;
      gap: 2px;
      max-width: none;
      overflow: visible;
    }
    .fund-sidebar .fund-chip,
    .fund-sidebar .fund-company-chip {
      width: auto;
      max-width: none;
      min-width: 0;
      min-height: 36px;
      margin: 0 var(--fund-sidebar-inline-inset);
      border-radius: 12px;
      border: none;
      background: transparent;
      box-shadow: none;
      transition:
        background var(--transition-micro),
        border-color var(--transition-micro),
        box-shadow var(--transition-micro),
        opacity var(--transition-micro);
    }
    .fund-sidebar .fund-chip::after,
    .fund-sidebar .fund-company-chip::after {
      content: none;
    }
    .fund-sidebar .fund-company-chip {
      padding: 6px 8px;
    }
    .fund-sidebar .fund-company-chip-label {
      flex: 1 1 auto;
      min-width: 0;
      gap: 8px;
    }
    .fund-sidebar .fund-company-chip.is-active {
      background: var(--fund-sidebar-surface-active);
    }
    .fund-sidebar .fund-company-chip.is-hidden {
      background: transparent;
      opacity: 1;
    }
    .fund-sidebar .fund-company-chip:hover,
    .fund-sidebar .fund-company-chip:focus-within {
      background: var(--fund-sidebar-chip-hover);
    }
    .fund-sidebar .fund-company-chip-logo {
      display: inline-flex;
      width: 24px;
      height: 24px;
      min-width: 24px;
      min-height: 24px;
    }
    .fund-sidebar .fund-company-chip-text {
      gap: 6px;
      min-width: 0;
      flex: 1 1 auto;
    }
    .fund-sidebar .fund-company-chip-name {
      color: var(--fund-sidebar-text-primary);
      font-size: 14px;
      font-weight: 300;
    }
    .fund-sidebar .fund-company-chip-day-change {
      font-size: 12px;
      font-weight: 400;
    }
    .fund-sidebar .fund-company-chip-day-change.is-flat {
      color: var(--fund-sidebar-text-muted);
    }
    .fund-sidebar .fund-company-chip-ticker {
      display: none;
    }
    .fund-sidebar .fund-chip {
      padding: 6px 8px;
    }
    .fund-sidebar .fund-chip:not(.fund-company-chip).is-active {
      background: var(--fund-sidebar-surface-active);
      border-color: transparent;
    }
    .fund-sidebar .fund-company-chips > .fund-company-chip + .fund-company-chip::before,
    .fund-sidebar .fund-chips > .fund-chip + .fund-chip::before {
      content: none;
    }
    .fund-sidebar .fund-chip:not(.fund-company-chip):hover,
    .fund-sidebar .fund-chip:not(.fund-company-chip):focus-within {
      background: var(--fund-sidebar-chip-hover);
      border-color: transparent;
    }
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] {
      --fund-sidebar-chip-active: var(--fund-sidebar-surface-active);
    }
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chip::after,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-company-chip::after,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chips > .fund-chip:first-child::before,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-company-chips > .fund-company-chip + .fund-company-chip::before,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chips > .fund-chip + .fund-chip::before {
      content: none;
    }
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-company-chip.is-active,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chip:not(.fund-company-chip).is-active {
      background: var(--fund-sidebar-chip-active);
    }
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chip:not(.fund-company-chip).is-active {
      border-color: transparent;
    }
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-company-chip:hover,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-company-chip:focus-within,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chip:not(.fund-company-chip):hover,
    #fundamentals-container[data-fund-sidebar-variant="pre-last-six"] .fund-sidebar .fund-chip:not(.fund-company-chip):focus-within {
      background: var(--fund-sidebar-chip-hover);
      border-color: transparent;
    }
    .fund-sidebar .fund-chip-label {
      flex: 1 1 auto;
      min-width: 0;
      color: var(--fund-sidebar-text-primary);
      font-size: 14px;
      font-weight: 300;
      transition: color var(--transition-micro);
    }
    .fund-sidebar .fund-chip-color-btn {
      width: 14px;
      height: 24px;
      min-width: 14px;
      margin-right: 3px;
    }
    .fund-sidebar .fund-chip-color-btn .fund-metric-dot {
      width: 3px;
      height: 16px;
      border-radius: 999px;
      box-shadow: none;
    }
    .fund-sidebar .fund-chip-actions {
      gap: 6px;
      margin-left: auto;
      align-items: center;
      transition: none;
    }
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-actions {
      gap: 8px;
      margin-left: auto;
    }
    .fund-sidebar .fund-chip-visibility,
    .fund-sidebar .fund-chip-remove,
    .fund-sidebar .fund-chip-settings-btn {
      width: 28px;
      height: 28px;
      min-width: 28px;
      border-radius: 7px;
      background: transparent;
      color: var(--fund-sidebar-text-muted);
      opacity: 0.78;
    }
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-visibility,
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-settings-btn {
      overflow: visible;
      transform: none;
      pointer-events: auto;
      transition:
        background var(--transition-micro),
        color var(--transition-micro),
        opacity var(--transition-micro);
    }
    .fund-sidebar .fund-company-chip .fund-chip-visibility {
      width: 28px;
      min-width: 28px;
      opacity: 0.78;
      overflow: visible;
      pointer-events: auto;
    }
    .fund-sidebar .fund-chip-visibility-icon {
      width: 17px;
      height: 11px;
      border-width: 1.8px;
    }
    .fund-sidebar .fund-chip-visibility-icon::after {
      width: 5px;
      height: 5px;
    }
    .fund-sidebar .fund-chip-visibility.is-hidden .fund-chip-visibility-icon::before {
      left: -2px;
      width: 22px;
      height: 1.8px;
    }
    .fund-sidebar .fund-chip-settings-btn {
      width: 28px;
      min-width: 28px;
      margin-left: 0;
      opacity: 0.78;
      transform: none;
      pointer-events: auto;
      overflow: visible;
      font-size: 17px;
      font-weight: 400;
    }
    .fund-sidebar .fund-chip:hover .fund-chip-settings-btn,
    .fund-sidebar .fund-chip:focus-within .fund-chip-settings-btn,
    .fund-sidebar .fund-chip-settings-btn.is-open {
      width: 28px;
      min-width: 28px;
      margin-left: 0;
      opacity: 0.78;
      transform: none;
      pointer-events: auto;
    }
    .fund-sidebar .fund-chip-remove {
      font-size: 18px;
    }
    .fund-sidebar .fund-chip:not(.fund-company-chip).is-hidden {
      background: transparent;
      opacity: 1;
    }
    .fund-sidebar .fund-chip.is-hidden .fund-chip-label {
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-visibility:hover,
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-visibility.is-visible:hover,
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-visibility.is-hidden:hover,
    .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-settings-btn:hover {
      background: var(--fund-sidebar-action-hover);
      color: var(--fund-sidebar-text-primary);
      opacity: 1;
    }
    body.fund-sidebar-resizing {
      cursor: col-resize;
      user-select: none;
    }
    @media (hover: none), (pointer: coarse) {
      .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-visibility,
      .fund-sidebar .fund-chip:not(.fund-company-chip) .fund-chip-remove {
        width: 20px;
        min-width: 20px;
        opacity: 0.78;
        transform: none;
        pointer-events: auto;
      }
    }
    .fund-sidebar-period-seg {
      --fund-sidebar-period-seg-padding: 2px;
      --fund-sidebar-period-seg-gap: 2px;
      width: calc(100% - (var(--fund-sidebar-inline-inset) * 2));
      position: relative;
      isolation: isolate;
      display: flex;
      gap: var(--fund-sidebar-period-seg-gap);
      margin: 0 var(--fund-sidebar-inline-inset);
      min-height: 36px;
      padding: var(--fund-sidebar-period-seg-padding);
      border: 1px solid var(--fund-sidebar-border);
      border-radius: 12px;
      background: transparent;
      box-shadow: none;
    }
    .fund-sidebar-period-seg::before {
      content: '';
      position: absolute;
      top: var(--fund-sidebar-period-seg-padding);
      left: var(--fund-sidebar-period-seg-padding);
      z-index: 0;
      width: calc((100% - (var(--fund-sidebar-period-seg-padding) * 2) - var(--fund-sidebar-period-seg-gap)) / 2);
      height: calc(100% - (var(--fund-sidebar-period-seg-padding) * 2));
      border-radius: 9px;
      background: var(--fund-sidebar-chip-active);
      pointer-events: none;
      transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .fund-sidebar-period-seg[data-active-period="quarter"]::before {
      transform: translateX(calc(100% + var(--fund-sidebar-period-seg-gap)));
    }
    .fund-controls-actions .fund-sidebar-period-seg {
      width: auto;
      margin: 0;
      min-height: 30px;
      border-radius: 10px;
    }
    .fund-controls-actions .fund-sidebar-period-seg .fund-seg-btn {
      flex: 0 0 auto;
      min-height: 24px;
      padding: 2px 14px;
      font-size: 13px;
    }
    .fund-sidebar-period-seg .fund-seg-btn {
      flex: 1 1 0;
      min-width: 0;
      min-height: 30px;
      position: relative;
      z-index: 1;
      padding: 4px 8px;
      border-radius: 9px;
      border: none;
      background: transparent;
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
      transition:
        background var(--transition-micro),
        border-color var(--transition-micro),
        color var(--transition-micro);
    }
    .fund-sidebar-period-seg .fund-seg-btn:hover,
    .fund-sidebar-period-seg .fund-seg-btn:focus-visible {
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-period-seg .fund-seg-btn:focus-visible {
      box-shadow: inset 0 0 0 1px var(--fund-sidebar-border-focus);
      outline: none;
    }
    .fund-sidebar-period-seg .fund-seg-btn.active {
      background: transparent;
      color: var(--fund-sidebar-text-primary);
      box-shadow: none;
    }
    .fund-sidebar-toggle-group {
      width: calc(100% - (var(--fund-sidebar-inline-inset) * 2));
      min-height: auto;
      margin: 0 var(--fund-sidebar-inline-inset);
      padding: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }
    .fund-sidebar-toggle-group .fund-price-toggle {
      width: 100%;
      min-height: 36px;
      padding: 6px 8px;
      border-radius: 12px;
      background: transparent;
      color: var(--fund-sidebar-text-secondary);
      justify-content: flex-start;
      gap: 8px;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
    }
    .fund-sidebar-toggle-group .fund-price-toggle .fund-price-toggle-check {
      display: inline-flex;
      width: 15px;
      height: 15px;
      border-radius: 4px;
      border: 1px solid rgba(148, 163, 184, 0.44);
      background: var(--fund-sidebar-panel);
      box-shadow: none;
    }
    .fund-sidebar-toggle-group.is-active {
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }
    .fund-sidebar-toggle-group.is-active .fund-price-toggle {
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-toggle-group .fund-price-toggle:hover,
    .fund-sidebar-toggle-group .fund-price-toggle:focus-visible,
    .fund-sidebar-toggle-group.is-active .fund-price-toggle.active {
      background: var(--fund-sidebar-surface-active);
      outline: none;
    }
    .fund-sidebar-toggle-group.is-active .fund-price-toggle.active .fund-price-toggle-check {
      border-color: rgba(203, 213, 225, 0.48);
      background: transparent;
      box-shadow: none;
    }
    .fund-sidebar-toggle-group.is-active .fund-price-toggle.active .fund-price-toggle-check::before {
      color: #f8fafc;
    }
    .fund-sidebar-section-body .fund-sidebar-appearance-dropdown {
      position: relative;
      display: block;
      width: 100%;
      flex: 0 0 auto;
    }
    .fund-sidebar-appearance-dropdown .fund-dd-btn {
      width: calc(100% - (var(--fund-sidebar-inline-inset) * 2));
      min-width: 0;
      min-height: 40px;
      margin: 0 var(--fund-sidebar-inline-inset);
      padding: 6px 8px;
      border: none;
      border-radius: 12px;
      background: transparent;
      box-shadow: none;
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
      line-height: 1;
      justify-content: space-between;
      text-align: left;
      transition: background 120ms ease, color 120ms ease;
    }
    .fund-sidebar-appearance-dropdown .fund-dd-btn:hover,
    .fund-sidebar-appearance-dropdown .fund-dd-btn:focus-visible {
      background: var(--fund-sidebar-surface-hover);
      color: var(--fund-sidebar-text-primary);
      outline: none;
    }
    .fund-sidebar-appearance-dropdown .fund-dd-btn.open {
      background: var(--fund-sidebar-surface-active);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-appearance-dropdown .fund-dd-panel {
      position: fixed;
      left: 0;
      top: 0;
      right: auto;
      z-index: 2600;
    }
    .fund-sidebar-appearance-btn-label {
      min-width: 0;
    }
    .fund-sidebar-appearance-btn-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 18px;
      font-size: 14px;
      font-weight: 400;
      line-height: 1;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-controls {
      gap: 4px;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-panel {
      width: min(316px, calc(100vw - 24px));
      min-width: 0;
      max-width: min(316px, calc(100vw - 24px));
      padding: 8px;
    }
    .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn {
      font-family: Arial, sans-serif;
    }
    .fund-sidebar-appearance-dropdown .fund-chip-settings-action-meta {
      text-align: right;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-section-title {
      padding: 0 4px;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-preset-grid {
      gap: 6px;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-preset-card {
      padding: 7px;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-preset-preview {
      height: 46px;
      padding: 8px 7px;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-preset-name {
      font-size: 12px;
    }
    .fund-sidebar-appearance-dropdown .fund-appearance-preset-note {
      font-size: 10px;
    }
    .fund-sidebar-clear-btn {
      margin: 8px var(--fund-sidebar-inline-inset) 0;
      min-height: 36px;
      border: none;
      background: transparent;
      color: var(--fund-sidebar-text-secondary);
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 300;
      line-height: 1;
      text-align: left;
      padding: 6px 8px;
      border-radius: 12px;
      cursor: pointer;
      transition: background 120ms ease, color 120ms ease;
    }
    .fund-sidebar-clear-btn:hover {
      background: var(--fund-sidebar-surface-hover);
      color: var(--fund-sidebar-text-primary);
    }
    .fund-sidebar-toggle {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      height: 42px;
      padding: 0;
      border: none;
      border-radius: 12px;
      background: transparent;
      color: rgba(191, 198, 214, 0.78);
      cursor: w-resize;
      transition: background 120ms ease, color 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
    }
    .fund-sidebar-toggle:hover,
    .fund-sidebar-toggle:focus-visible {
      background: rgba(255, 255, 255, 0.12);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
      color: #eef2f7;
      opacity: 1;
    }
    .fund-sidebar-toggle-tooltip {
      position: fixed;
      left: 0;
      top: 0;
      padding: 8px 14px;
      border-radius: 10px;
      background: rgba(0, 0, 0, 0.98);
      color: #f8fafc;
      font-family: 'Inter', var(--tos-font-ui);
      font-size: 14px;
      font-weight: 400;
      line-height: 1;
      letter-spacing: 0;
      white-space: nowrap;
      pointer-events: none;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
      backdrop-filter: blur(8px);
      opacity: 1;
      transform: translateY(0);
      transition: opacity 70ms ease-out, transform 70ms ease-out;
      z-index: 2500;
    }
    .fund-sidebar-toggle-tooltip.hidden {
      opacity: 0;
      transform: translateY(-2px);
      visibility: hidden;
    }
    .fund-sidebar-toggle-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 26px;
      height: 26px;
    }
    .fund-sidebar-toggle-icon svg {
      display: block;
      width: 100%;
      height: 100%;
    }
    .fund-sidebar.is-collapsed .fund-sidebar-toggle {
      width: 42px;
      height: 42px;
      cursor: e-resize;
    }
    .fund-main {
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      min-width: 0;
      min-height: 0;
      margin-left: 4px;
      gap: 12px;
    }
    .fund-main-topbar {
      flex: 0 0 auto;
      min-height: 0;
      gap: 0;
      margin-top: 12px;
      padding-left: var(--fund-chart-left-inset, 24px);
      padding-right: var(--fund-chart-right-inset, 70px);
      box-sizing: border-box;
    }
    .fund-main-topbar .fund-controls-actions {
      width: 100%;
      justify-content: flex-end;
      margin-left: 0;
      padding-right: 0;
    }
    .fund-main-topbar .fund-export-root {
      margin-left: auto;
    }
    .fund-main-topbar .fund-top-fullscreen-btn {
      margin-left: 0;
    }
    .fund-main .fund-range-spacer,
    .fund-main .fund-chart-wrap {
      width: 100%;
      max-width: none;
    }
    .fund-main .fund-range-spacer {
      padding-left: var(--fund-chart-left-inset, 24px);
      padding-right: var(--fund-chart-right-inset, 70px);
      box-sizing: border-box;
    }
    .fund-main .fund-range-block-below {
      flex: 0 0 100%;
      width: 100%;
      max-width: none;
      transform: translateY(10px);
    }
    .fund-main .fund-chart-wrap {
      margin-top: 44px;
      margin-bottom: 14px;
    }
    .fund-main .fund-below {
      gap: 0;
      padding-bottom: 0;
    }
    .fund-main .fund-below-top {
      margin-top: 2px;
    }
    .fund-main .fund-table-wrap {
      margin-top: 40px;
    }
    .fund-main .fund-controls-row {
      align-self: flex-start;
      margin-top: -2px;
    }
    .fund-main .fund-options {
      justify-content: flex-end;
    }
    .fund-charttype-seg {
      flex-shrink: 0;
    }
    .fund-charttype-seg .fund-seg-btn {
      min-width: auto;
      padding: 8px 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .fund-seg-icon {
      flex-shrink: 0;
      opacity: 0.92;
    }
    .fund-actions {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .fund-action-btn,
    .fund-icon-btn {
      border: 1px solid var(--fund-border-soft);
      background: var(--fund-bg-card);
      color: var(--fund-text-soft);
      border-radius: 9px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 7px 12px;
      cursor: pointer;
      min-height: 33px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      line-height: 1;
      box-shadow: 0 8px 22px rgba(3, 7, 18, 0.26);
    }
    .fund-action-btn:hover,
    .fund-icon-btn:hover {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: var(--fund-bg-card-strong);
    }
    .fund-action-btn.active {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: rgba(90, 107, 74, 0.28);
    }
    .fund-action-btn:disabled,
    .fund-icon-btn:disabled {
      cursor: not-allowed;
      opacity: 0.58;
      box-shadow: none;
    }
    .fund-action-btn:disabled:hover,
    .fund-icon-btn:disabled:hover {
      color: var(--fund-text-soft);
      border-color: var(--fund-border-soft);
      background: var(--fund-bg-card);
    }
    .fund-icon-btn {
      padding: 7px 10px;
      min-width: 34px;
    }
    .fund-icon-btn.active {
      color: var(--fund-title);
      border-color: var(--fund-accent-border);
      background: rgba(90, 107, 74, 0.28);
    }
    .fund-export-root {
      position: relative;
      display: inline-flex;
      align-items: center;
    }
    .fund-export-btn[aria-expanded="true"] .fund-export-chevron {
      transform: rotate(180deg);
    }
    .fund-export-chevron {
      display: inline-block;
      transition: transform 0.12s ease;
      font-size: 11px;
      line-height: 1;
    }
    .fund-export-menu {
      position: absolute;
      right: 0;
      bottom: calc(100% + 8px);
      min-width: 156px;
      padding: 4px;
      border-radius: 10px;
      border: 1px solid var(--fund-border);
      background: rgba(17, 24, 39, 0.985);
      box-shadow: 0 22px 48px rgba(2, 6, 23, 0.52);
      z-index: 1710;
    }
    .fund-export-item {
      width: 100%;
      border: none;
      background: transparent;
      color: var(--fund-text);
      font-family: inherit;
      font-size: 13px;
      text-align: left;
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      display: block;
    }
    .fund-export-item:hover {
      background: var(--fund-bg-hover);
      color: var(--fund-title);
    }
    .fund-export-sep {
      height: 1px;
      margin: 4px 6px;
      background: rgba(71, 85, 105, 0.52);
    }
    #fundamentals-container.fund-fullscreen .fund-chart-wrap {
      height: clamp(405px, calc(100vh - 225px), 905px);
      min-height: clamp(405px, calc(100vh - 225px), 905px);
    }
    @media (max-width: 560px) {
      #fundamentals-container,
      #overview-container {
        padding: 12px 72px 14px;
      }
      #fundamentals-container {
        padding: 0 18px 0 0;
      }
      .fund-sidebar-resize-handle {
        display: none;
      }
      .fund-sidebar-header,
      .fund-sidebar.is-collapsed .fund-sidebar-header {
        justify-content: flex-end;
      }
      .fund-sidebar.is-collapsed .fund-sidebar-header {
        margin-bottom: 0;
      }
      .fund-sidebar-toggle,
      .fund-sidebar.is-collapsed .fund-sidebar-toggle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
      }
      .fund-main {
        margin-left: 0;
      }
      .fund-chart-wrap {
        height: clamp(445px, calc(100vh - 305px), 645px);
        min-height: clamp(445px, calc(100vh - 305px), 645px);
      }
      .fund-controls {
        gap: 8px;
      }
	      .fund-company-chips {
	        width: auto;
	        max-width: calc(100vw - 36px);
	        padding: 0;
	      }
      .fund-controls-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
      }
      .fund-dd-btn {
        min-width: 110px;
      }
      .fund-below-top {
        gap: 12px;
      }
      .fund-table-wrap {
        margin-left: 0;
        margin-right: 0;
      }
      .fund-table {
        min-width: 640px;
      }
      .fund-range-block-below,
      .fund-legend {
        flex-basis: 100%;
        width: 100%;
        max-width: none;
      }
      .fund-range-spacer {
        min-height: 0;
      }
      .fund-controls-row {
        justify-content: flex-start;
        width: 100%;
        max-width: none;
        margin-left: 0;
        padding-right: 0;
      }
      .fund-main .fund-controls-row {
        align-self: stretch;
      }
      .fund-charttype-seg {
        order: 2;
      }
      .fund-options {
        width: 100%;
      }
      .fund-options-dropdown {
        flex: 1 1 160px;
        min-width: 0;
      }
      .fund-opt-dropdown-btn {
        width: 100%;
        min-width: 0;
      }
      .fund-opt-btn {
        flex: 1 1 140px;
        min-width: 0;
      }
      .fund-price-toggle-group {
        flex: 1 1 140px;
        min-width: 0;
      }
      .fund-brand-mode-group {
        flex: 1 1 280px;
        min-width: 0;
      }
      .fund-actions {
        width: 100%;
      }
      .fund-charttype-seg .fund-seg-btn {
        flex: 1 1 auto;
      }
      .fund-action-btn {
        flex: 1 1 auto;
      }
      .fund-export-root {
        flex: 1 1 auto;
      }
      .fund-export-btn {
        width: 100%;
        justify-content: space-between;
      }
      .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    @media (max-width: 760px) {
      #fundamentals-container,
      #overview-container {
        padding: 10px 36px 14px;
      }
      #fundamentals-container {
        padding: 0 12px 0 0;
      }
      .fund-chart-wrap {
        height: clamp(345px, calc(100vh - 275px), 505px);
        min-height: clamp(345px, calc(100vh - 275px), 505px);
      }
      .fund-range-spacer {
        min-height: 0;
      }
      .fund-legend {
        min-width: 0;
      }
      .fund-table-wrap {
        margin-left: 0;
        margin-right: 0;
      }
      .fund-table th:first-child,
      .fund-table td:first-child {
        width: 168px;
        min-width: 168px;
      }
      .fund-options,
      .fund-actions {
        gap: 8px;
      }
      .fund-controls-actions {
        gap: 8px;
      }
      .fund-sidebar {
        padding: 12px 6px 14px;
      }
      .fund-sidebar.is-collapsed {
        padding: 10px 10px 0;
      }
      .fund-charttype-seg {
        width: 100%;
      }
      .fund-charttype-seg .fund-seg-btn {
        flex: 1 1 0;
      }
      .fund-opt-btn,
      .fund-action-btn,
      .fund-price-toggle-group {
        flex: 1 1 calc(50% - 8px);
      }
      .fund-options-dropdown {
        flex: 1 1 calc(50% - 8px);
      }
      .fund-opt-dropdown-btn {
        width: 100%;
        min-width: 0;
      }
      .fund-appearance-panel .fund-charttype-seg {
        width: 100%;
      }
      .fund-brand-mode-group {
        flex: 1 1 100%;
        justify-content: space-between;
      }
      .fund-brand-mode-seg {
        flex: 1 1 auto;
        min-width: 0;
      }
      .fund-brand-mode-seg .fund-seg-btn {
        flex: 1 1 0;
        min-width: 0;
      }
      .fund-icon-btn {
        flex: 0 0 auto;
      }
      .fund-range-block {
        padding: 0 10px 6px;
      }
      .overview-header {
        align-items: flex-start;
      }
      .overview-header-main {
        flex: 1 1 220px;
        align-items: stretch;
      }
      .overview-header-top {
        align-items: stretch;
      }
      .overview-header-actions {
        justify-content: flex-start;
      }
      .overview-title {
        font-size: 24px;
      }
      .overview-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: minmax(240px, 1fr);
      }
    }
    .mc-grid {
      position: absolute;
      inset: 0;
      display: grid;
      gap: 2px;
      background: var(--tos-bg-chart);
      z-index: 1;
    }
    .mc-slot {
      position: relative;
      overflow: hidden;
      min-width: 0;
      min-height: 0;
      border: 1px solid transparent;
    }
    .mc-slot-active {
      z-index: 2;
    }
    .mc-mini-header {
      position: absolute;
      top: 6px;
      left: 6px;
      z-index: 16;
      min-width: 44px;
      height: 22px;
      border-radius: var(--tos-radius-md);
      border: none;
      background: transparent;
      color: var(--tos-text-primary);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      padding: 0 8px;
      cursor: pointer;
      text-transform: uppercase;
      user-select: none;
    }
    .mc-mini-header:hover {
      background: var(--tos-bg-hover);
      color: var(--tos-text-bright);
    }
    .zoom-controls {
      position: absolute;
      bottom: 0;
      right: 0;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 0 6px;
      z-index: 110;
      background: var(--tos-bg-deep);
    }
    .zc-sep {
      width: 1px;
      height: 22px;
      background: rgba(255,255,255,0.15);
      flex-shrink: 0;
    }
    .zc-draw-root {
      position: relative;
    }
    .zc-draw-popup {
      position: absolute;
      bottom: 30px;
      right: 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0;
      width: 96px;
      max-height: 420px;
      overflow-x: hidden;
      overflow-y: auto;
      background: var(--tos-bg-panel);
      border: none;
      border-radius: var(--tos-radius-md);
      box-shadow: var(--tos-shadow-sm);
      padding: 0;
      z-index: 200;
    }
    .zc-draw-popup::-webkit-scrollbar { width: 6px; }
    .zc-draw-popup::-webkit-scrollbar-track { background: transparent; }
    .zc-draw-popup::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--tos-radius-sm); }
    .zc-draw-popup::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
    .zc-draw-section {
      font-size: 10px;
      font-weight: 600;
      color: var(--tos-text-dim);
      padding: 6px 10px 2px;
      letter-spacing: 0.05em;
    }
    .zc-draw-sep {
      height: 1px;
      background: var(--tos-border-sep);
      margin: 3px 8px;
    }
    .zc-draw-item {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 48px;
      margin: 0;
      padding: 0;
      border: 1px solid transparent;
      border-radius: 0;
      background: var(--tos-bg-surface);
      color: var(--tos-text-primary);
      cursor: pointer;
    }
    .zc-draw-item:hover {
      background: var(--tos-bg-hover);
      color: var(--tos-text-bright);
      border-color: var(--tos-border-light);
    }
    .zc-draw-item .draw-tool-icon {
      width: 24px;
      height: 24px;
      flex-shrink: 0;
    }
    .zc-draw-item.active {
      color: var(--tos-accent);
      background: rgba(59,130,246,0.12);
      border-color: rgba(59,130,246,0.4);
    }
    /* Fullscreen mode */
    .fullscreen-mode .toolbar { display: none; }
    .fullscreen-mode #object-tree-panel { display: none !important; }
    .fullscreen-mode #wl-panel { display: none !important; }
    .fullscreen-mode #main-content { margin-left: 0 !important; margin-right: 0 !important; height: 100vh !important; }
    .fullscreen-mode .mc-slot-active { outline: none; }
    .draw-favorites-toolbox {
      position: absolute;
      top: 64px;
      left: 18px;
      display: flex;
      flex-direction: row;
      align-items: stretch;
      background: var(--tos-bg-float);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-lg);
      box-shadow: 0 8px 24px rgba(0,0,0,0.45);
      z-index: 120;
      color: var(--tos-text-primary);
      user-select: none;
      overflow: visible;
    }
    .draw-favorites-handle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      flex-shrink: 0;
      cursor: grab;
      color: var(--tos-text-dim);
      background: var(--tos-bg-subtle);
      border-right: 1px solid var(--tos-border-sep);
      padding: 0 8px;
    }
    .draw-favorites-handle:hover {
      color: #888;
      background: var(--tos-bg-subtle);
    }
    .draw-favorites-handle:active {
      cursor: grabbing;
      color: #aaa;
    }
    .draw-favorites-body {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 6px;
      padding: 4px 8px;
      flex-wrap: nowrap;
    }
    .draw-favorites-empty {
      font-size: 12px;
      color: var(--tos-text-muted);
      padding: 4px 8px;
      white-space: nowrap;
    }
    .draw-favorites-tool {
      min-height: 34px;
      min-width: 40px;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-md);
      background: transparent;
      color: var(--tos-text-primary);
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
      padding: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .draw-favorites-tool .draw-tool-icon {
      width: 20px;
      height: 20px;
    }
    .draw-favorites-tool:hover {
      color: var(--tos-text-bright);
      border-color: rgba(255,255,255,0.28);
      background: var(--tos-bg-hover);
    }
    .draw-favorites-tool.active {
      color: var(--tos-accent);
      border-color: var(--tos-accent-border-strong);
      background: var(--tos-accent-bg-strong);
    }
    .draw-favorites-tool[data-tooltip] {
      position: relative;
    }
    .draw-favorites-tool[data-tooltip]::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 6px);
      left: 50%;
      transform: translateX(-50%);
      padding: 4px 8px;
      background: var(--tos-bg-tooltip);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      color: var(--tos-text-primary);
      font-size: 12px;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      z-index: 200;
    }
    .draw-favorites-tool[data-tooltip].tooltip-visible::after {
      opacity: 1;
    }
    .draw-object-btn[data-tooltip]::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 6px);
      left: 50%;
      transform: translateX(-50%);
      padding: 4px 8px;
      background: var(--tos-bg-tooltip);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      color: var(--tos-text-primary);
      font-size: 12px;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      z-index: 200;
    }
    .draw-object-btn[data-tooltip].tooltip-visible::after {
      opacity: 1;
    }
    .draw-object-toolbar {
      position: absolute;
      top: 66px;
      right: 16px;
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 4px;
      padding: 2px 6px 2px 0;
      background: var(--tos-bg-float);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-lg);
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
      z-index: 121;
      user-select: none;
    }
    .draw-object-handle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      align-self: stretch;
      cursor: grab;
      color: var(--tos-text-dim);
      border-right: 1px solid var(--tos-border-sep);
      padding: 0 8px;
      flex-shrink: 0;
    }
    .draw-object-handle:hover {
      color: #888;
      background: var(--tos-bg-subtle);
    }
    .draw-object-handle:active {
      cursor: grabbing;
      color: #aaa;
    }
    .draw-object-btn {
      min-height: 32px;
      min-width: 32px;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-md);
      background: transparent;
      color: var(--tos-text-primary);
      font-family: inherit;
      font-size: 12px;
      padding: 4px 8px;
      cursor: pointer;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      position: relative;
    }
    .draw-object-btn:hover {
      color: var(--tos-text-bright);
      border-color: rgba(255,255,255,0.28);
      background: var(--tos-bg-active);
    }
    :root[data-theme="light"] .draw-object-btn:hover {
      color: #111827;
      border-color: rgba(15,23,42,0.28);
      background: rgba(15,23,42,0.06);
    }
    .draw-object-btn[disabled] {
      opacity: 0.45;
      cursor: default;
      pointer-events: none;
    }
    .draw-object-btn.danger {
      color: #ff8a80;
      border-color: rgba(255,82,82,0.4);
    }
    .draw-object-btn.danger:hover {
      color: #ffb3ad;
      border-color: rgba(255,82,82,0.7);
      background: rgba(255,82,82,0.12);
    }
    .draw-object-color-btn {
      padding: 4px 6px;
    }
    .draw-object-bg-label {
      font-size: 11px;
      line-height: 1;
      color: var(--tos-text-dim);
      letter-spacing: 0.02em;
    }
    .draw-object-color-swatch {
      display: block;
      width: 22px;
      height: 22px;
      border-radius: var(--tos-radius-sm);
      border: 1px solid var(--tos-border-strong);
      background: var(--tos-accent);
    }
    .draw-object-picker {
      display: inline-flex;
    }
    .draw-object-fontsize-value {
      min-width: 24px;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .draw-object-dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      margin-top: 4px;
      background: var(--tos-bg-surface);
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-lg);
      padding: 4px 0;
      z-index: 500;
      box-shadow: var(--tos-shadow-sm);
      min-width: 80px;
    }
    .draw-object-dropdown.visible { display: block; }
    .draw-object-dropdown-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 14px;
      background: none;
      border: none;
      color: var(--tos-text-primary);
      cursor: pointer;
      font-family: inherit;
      font-size: 13px;
    }
    .draw-object-dropdown-item:hover {
      background: var(--tos-bg-hover);
      color: var(--tos-text-bright);
    }
    .draw-object-dropdown-item.active {
      background: rgba(33, 150, 243, 0.15);
      color: var(--tos-text-bright);
    }
    .draw-object-dropdown-item.active .draw-object-dropdown-label {
      color: #ccc;
    }
    .draw-object-dropdown-item svg {
      width: 36px;
      height: 10px;
      fill: none;
      flex-shrink: 0;
    }
    .draw-object-dropdown-label {
      color: #999;
      font-size: 13px;
    }
    .draw-object-dropdown-item:hover .draw-object-dropdown-label {
      color: #ccc;
    }
    :root[data-theme="light"] .draw-object-dropdown {
      background: #FFFFFF;
      border-color: rgba(15,23,42,0.14);
      box-shadow: 0 12px 30px rgba(15,23,42,0.14);
    }
    :root[data-theme="light"] .draw-object-dropdown-item {
      color: #1F2937;
    }
    :root[data-theme="light"] .draw-object-dropdown-item:hover {
      background: rgba(15,23,42,0.06);
      color: #111827;
    }
    :root[data-theme="light"] .draw-object-dropdown-item.active {
      background: rgba(37,99,235,0.12);
      color: #111827;
    }
    :root[data-theme="light"] .draw-object-dropdown-item svg {
      color: #1F2937;
    }
    :root[data-theme="light"] .draw-object-dropdown-item:hover svg,
    :root[data-theme="light"] .draw-object-dropdown-item.active svg {
      color: #111827;
    }
    :root[data-theme="light"] .draw-object-dropdown-label,
    :root[data-theme="light"] .draw-object-dropdown-item.active .draw-object-dropdown-label,
    :root[data-theme="light"] .draw-object-dropdown-item:hover .draw-object-dropdown-label {
      color: #374151;
    }
    .zoom-icon-btn {
      width: 22px;
      height: 22px;
      border-radius: 0;
      border: 1px solid rgba(255,255,255,0.4);
      background: transparent;
      color: var(--tos-text-bright);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      transition: border-color 0.1s, background 0.1s;
    }
    .zoom-icon-btn:hover {
      border-color: rgba(255,255,255,0.8);
      background: var(--tos-bg-active);
    }
    .zoom-icon-btn svg {
      width: 14px;
      height: 14px;
      fill: none;
      stroke: #999;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .zoom-icon-btn:hover svg {
      stroke: #fff;
    }
    .ctx-menu {
      position: fixed;
      background: var(--tos-bg-panel);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      padding: 4px 0;
      z-index: 1000;
      box-shadow: var(--tos-shadow-sm);
      min-width: 160px;
      display: none;
    }
    .ctx-menu.visible { display: block; }
    .ctx-menu-item {
      display: block;
      padding: 8px 20px;
      font-size: 17px;
      font-family: inherit;
      color: var(--tos-text-secondary);
      cursor: default;
      background: none;
      border: none;
      width: 100%;
      text-align: left;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .ctx-menu-item:hover { background: var(--tos-bg-active); color: var(--tos-text-bright); }

    /* Studies dropdown */
    .studies-panel-backdrop {
      position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      z-index: 1999;
      display: none;
    }
    .studies-panel-backdrop.visible { display: block; }
    .studies-panel,
    .width-picker {
      --studies-shell-bg: #1f1f1f;
      --studies-content-bg: #000000;
      --studies-left-bg: #050505;
      --studies-right-bg: #000000;
      --studies-header-bg: #1f1f1f;
      --studies-section-bg: #4a4a4a;
      --studies-divider: #3a3a3a;
      --studies-divider-strong: #5a5a5a;
      --studies-text-primary: #f2f2f2;
      --studies-text-secondary: #cfcfcf;
      --studies-text-muted: #9a9a9a;
      --studies-icon-muted: #bdbdbd;
      --studies-hover-bg: #111111;
      --studies-selected-bg: #1a1a1a;
      --studies-accent: #3b82f6;
      --studies-input-bg: #101010;
      --studies-input-border: #2e2e2e;
      --studies-btn-bg: #2b2b2b;
      --studies-btn-border: #5a5a5a;
      --studies-btn-text: #f0f0f0;
      --studies-scrollbar: #3a3a3a;
      --studies-scrollbar-hover: #5a5a5a;
    }
    .studies-panel {
      position: fixed;
      z-index: 2000;
      background: var(--studies-shell-bg);
      border: 1px solid var(--studies-divider);
      border-radius: var(--tos-radius-xl);
      width: 860px;
      height: 560px;
      min-width: 520px;
      min-height: 320px;
      display: flex;
      flex-direction: column;
      box-shadow: none;
      overflow: hidden;
      color: var(--studies-text-primary);
    }
    .studies-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 16px;
      font-size: 13px;
      font-weight: 600;
      color: var(--studies-text-primary);
      background: var(--studies-header-bg);
      cursor: grab;
      user-select: none;
      border-bottom: 1px solid var(--studies-divider);
      flex-shrink: 0;
    }
    .studies-panel-header:active { cursor: grabbing; }
    .studies-panel-close {
      background: none; border: none; color: var(--studies-icon-muted);
      font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
    }
    .studies-panel-close:hover { color: var(--studies-text-primary); }
    .studies-panel-body {
      flex: 1;
      display: flex;
      overflow: hidden;
      background: var(--studies-content-bg);
    }
    .studies-browse-col {
      width: 340px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: var(--studies-left-bg);
    }
    .studies-col-divider {
      width: 4px;
      cursor: col-resize;
      background: var(--studies-divider);
      flex-shrink: 0;
      position: relative;
    }
    .studies-col-divider:hover,
    .studies-col-divider.dragging { background: var(--studies-divider-strong); }
    .studies-active-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: var(--studies-right-bg);
    }
    .studies-active-col-header {
      display: flex;
      align-items: center;
      padding: 8px 14px 7px;
      min-height: 33px;
      box-sizing: border-box;
      font-size: 13px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-weight: 600;
      color: var(--studies-text-primary);
      background: var(--studies-section-bg);
      text-transform: none;
      letter-spacing: 0.5px;
      border-bottom: 1px solid var(--studies-divider);
      flex-shrink: 0;
    }
    .studies-active-col #studies-active-list {
      flex: 1;
      overflow-y: auto;
      padding: 0 0 8px;
      background: var(--studies-right-bg);
    }
    .studies-panel ::-webkit-scrollbar { width: 10px; }
    .studies-panel ::-webkit-scrollbar-track { background: var(--studies-content-bg); }
    .studies-panel ::-webkit-scrollbar-thumb { background: var(--studies-scrollbar); border-radius: var(--tos-radius-sm); }
    .studies-panel ::-webkit-scrollbar-thumb:hover { background: var(--studies-scrollbar-hover); }
    .studies-browse-topbar {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      background: var(--studies-left-bg);
      border-bottom: 1px solid var(--studies-divider);
      flex-shrink: 0;
      gap: 0;
    }
    .studies-cat-tabs {
      display: flex;
      flex-shrink: 0;
      min-height: 33px;
      box-sizing: border-box;
      background: var(--studies-section-bg);
      border-bottom: 1px solid var(--studies-divider);
    }
    .studies-cat-tab {
      padding: 8px 14px 7px;
      background: none;
      border: none;
      border-bottom: 2px solid transparent;
      color: #d0d0d0;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-size: 13px;
      cursor: pointer;
      white-space: nowrap;
    }
    .studies-cat-tab:hover { color: var(--studies-text-primary); background: #555555; }
    .studies-cat-tab.active { color: var(--studies-text-primary); border-bottom-color: var(--studies-accent); }
    .studies-add-search {
      display: flex;
      align-items: center;
      flex: none;
      width: 100%;
      padding: 6px 10px;
      gap: 6px;
      background: var(--studies-input-bg);
      border-top: 1px solid var(--studies-divider);
      border-bottom: 1px solid var(--studies-divider);
    }
    .studies-add-search svg {
      width: 16px; height: 16px;
      stroke: var(--studies-icon-muted); fill: none;
      flex-shrink: 0;
    }
    .studies-add-search input {
      flex: 1;
      background: none;
      border: none;
      color: var(--studies-text-primary);
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-size: 15px;
      outline: none;
      padding: 5px 0;
    }
    .studies-add-search input::placeholder { color: var(--studies-text-muted); }
    .studies-resize-handle {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 16px;
      height: 16px;
      cursor: nwse-resize;
      z-index: 1;
    }
    .studies-resize-handle::after {
      content: '';
      position: absolute;
      right: 3px;
      bottom: 3px;
      width: 8px;
      height: 8px;
      border-right: 2px solid var(--studies-text-muted);
      border-bottom: 2px solid var(--studies-text-muted);
      opacity: 0.5;
    }
    .studies-resize-handle:hover::after { opacity: 1; }
    .studies-add-row {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
    }
    .studies-type-select {
      background: var(--studies-input-bg);
      border: 1px solid var(--studies-input-border);
      color: var(--studies-text-primary);
      padding: 6px 8px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 14px;
      outline: none;
      cursor: pointer;
    }
    .studies-period-input {
      width: 56px;
      background: var(--studies-input-bg);
      border: 1px solid var(--studies-input-border);
      color: var(--studies-text-primary);
      padding: 6px 8px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 14px;
      text-align: center;
      outline: none;
      -moz-appearance: textfield;
    }
    .studies-period-input::-webkit-outer-spin-button,
    .studies-period-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .studies-period-input:focus { border-color: var(--studies-accent); }
    .studies-add-btn {
      background: var(--studies-btn-bg);
      border: 1px solid var(--studies-btn-border);
      color: var(--studies-btn-text);
      padding: 6px 14px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 14px;
      cursor: pointer;
    }
    .studies-add-btn:hover { background: #343434; color: var(--studies-text-primary); border-color: #6a6a6a; }
    .studies-presets {
      display: flex;
      gap: 6px;
      padding: 4px 14px 8px;
    }
    .studies-preset {
      background: var(--studies-btn-bg);
      border: 1px solid var(--studies-btn-border);
      color: var(--studies-btn-text);
      padding: 4px 10px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
    }
    .studies-preset:hover { color: var(--studies-text-primary); background: #343434; border-color: #6a6a6a; }
    .studies-active {
      padding: 4px 0 8px;
    }
    .studies-active-section {
      padding: 0;
    }
    .studies-active-section + .studies-active-section {
      margin-top: 6px;
      padding-top: 8px;
      border-top: 1px solid var(--studies-divider);
    }
    .studies-active-section-title {
      padding: 2px 14px 4px;
      font-size: 13px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-weight: 600;
      color: var(--studies-text-primary);
      background: var(--studies-section-bg);
      text-transform: none;
      letter-spacing: 0.5px;
    }
    .studies-active-section .studies-empty {
      padding-top: 2px;
    }
    .studies-active-row {
      display: flex;
      align-items: center;
      padding: 6px 14px;
      gap: 8px;
      position: relative;
    }
    .studies-active-row:hover { background: var(--studies-hover-bg); }
    .studies-active-row.dragging { opacity: 0.4; }
    .studies-active-row.drag-over { border-top: 2px solid var(--studies-accent); margin-top: -2px; }
    .studies-active-row.studies-pane-break {
      border-top: 1px solid var(--studies-divider);
      margin-top: 6px;
      padding-top: 12px;
    }
    .studies-drag-handle {
      cursor: grab;
      color: var(--studies-icon-muted);
      font-size: 14px;
      flex-shrink: 0;
      user-select: none;
      padding: 0 3px;
      line-height: 1;
    }
    .studies-drag-handle:hover { color: var(--studies-text-primary); }
    .studies-drag-handle:active { cursor: grabbing; }
    .studies-active-color {
      width: 18px;
      height: 18px;
      border-radius: var(--tos-radius-sm);
      border: 1px solid var(--studies-btn-border);
      flex-shrink: 0;
      cursor: pointer;
      padding: 0;
    }
    .studies-active-color:hover { border-color: #7a7a7a; }
    .studies-active-label {
      font-size: 15px;
      font-family: "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
      color: var(--studies-text-primary);
      flex: 1;
      display: flex;
      align-items: center;
      gap: 0;
      white-space: nowrap;
    }
    .studies-active-period {
      width: 42px;
      background: transparent;
      border: 1px solid transparent;
      color: var(--studies-text-secondary);
      padding: 2px 4px;
      border-radius: 2px;
      font-family: inherit;
      font-size: 13px;
      text-align: left;
      outline: none;
      -moz-appearance: textfield;
    }
    .studies-active-period::-webkit-outer-spin-button,
    .studies-active-period::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .studies-active-period:hover { border-color: var(--studies-btn-border); background: var(--studies-input-bg); }
    .studies-active-period:focus { border-color: var(--studies-accent); background: var(--studies-input-bg); }
    .studies-width-btn {
      background: var(--studies-btn-bg);
      border: 1px solid var(--studies-btn-border);
      border-radius: var(--tos-radius-sm);
      color: var(--studies-btn-text);
      font-family: inherit;
      flex-shrink: 0;
      font-size: 12px;
      padding: 4px 8px;
      cursor: pointer;
      line-height: 1.3;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .studies-width-btn:hover { color: var(--studies-text-primary); background: #343434; border-color: #6a6a6a; }
    .studies-width-preview {
      display: inline-block;
      width: 14px;
      border-radius: 1px;
      background: var(--studies-text-secondary);
      vertical-align: middle;
    }
    .width-picker {
      position: fixed;
      background: var(--studies-shell-bg);
      border: 1px solid var(--studies-divider);
      border-radius: var(--tos-radius-md);
      padding: 4px 0;
      z-index: 2100;
      box-shadow: none;
      min-width: 100px;
      display: none;
    }
    .width-picker.visible { display: block; }
    .width-picker-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 6px 12px;
      background: none;
      border: none;
      cursor: pointer;
      font-family: inherit;
      font-size: 12px;
      color: var(--studies-text-secondary);
    }
    .width-picker-item:hover { background: var(--studies-hover-bg); color: var(--studies-text-primary); }
    .width-picker-item.selected { color: var(--studies-accent); background: var(--studies-selected-bg); }
    .width-picker-line {
      display: inline-block;
      width: 24px;
      border-radius: 1px;
      background: currentColor;
    }
    .width-picker-label {
      font-size: 11px;
      color: inherit;
    }
    .studies-active-remove {
      background: none;
      border: none;
      color: var(--studies-icon-muted);
      font-size: 18px;
      cursor: pointer;
      padding: 0 5px;
      line-height: 1;
      flex-shrink: 0;
    }
    .studies-active-remove:hover { color: var(--studies-text-primary); }
    .studies-active-settings,
    .studies-active-toggle {
      background: none;
      border: none;
      color: var(--studies-icon-muted);
      font-size: 16px;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .studies-active-settings:hover,
    .studies-active-toggle:hover { color: var(--studies-text-primary); }
    .studies-active-settings svg,
    .studies-active-toggle svg { width: 16px; height: 16px; }
    .studies-active-toggle.hidden { color: var(--studies-text-muted); }
    .studies-active-toggle.hidden:hover { color: var(--studies-text-secondary); }
    .studies-empty {
      padding: 8px 14px;
      font-size: 12px;
      color: var(--studies-text-muted);
      font-style: italic;
    }
    .studies-btn-row {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding: 10px 14px;
      background: var(--studies-shell-bg);
      border-top: 1px solid var(--studies-divider);
    }
    .studies-btn-row button {
      background: var(--studies-btn-bg);
      border: 1px solid var(--studies-btn-border);
      color: var(--studies-btn-text);
      padding: 6px 20px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
    }
    .studies-btn-row button:hover { background: #343434; color: var(--studies-text-primary); border-color: #6a6a6a; }
    #studies-ok-btn { color: var(--studies-text-primary); }

    /* Indicator Browser row styles (reused inside studies-panel Add tab) */
    .studies-add-list {
      flex: 1;
      overflow-y: auto;
      padding: 6px 0;
      background: var(--studies-left-bg);
    }
    .ind-browser-cat {
      display: block;
      width: 100%;
      padding: 8px 14px;
      background: none;
      border: none;
      color: var(--studies-text-secondary);
      font-family: inherit;
      font-size: 13px;
      text-align: left;
      cursor: pointer;
    }
    .ind-browser-cat:hover { color: var(--studies-text-primary); background: var(--studies-hover-bg); }
    .ind-browser-cat.active { color: var(--studies-accent); background: var(--studies-selected-bg); }
    .ind-browser-list {
      flex: 1;
      overflow-y: auto;
      padding: 6px 0;
    }
    .ind-browser-item {
      display: flex;
      align-items: center;
      padding: 3px 10px;
      cursor: default;
      gap: 8px;
      user-select: none;
    }
    .ind-browser-item:hover { background: var(--studies-hover-bg); }
    .ind-browser-item.active { background: var(--studies-selected-bg); }
    .ind-browser-star {
      width: 16px; height: 16px;
      flex-shrink: 0;
      background: none; border: none;
      cursor: pointer; padding: 0;
      display: flex; align-items: center; justify-content: center;
    }
    .ind-browser-star svg {
      width: 12px; height: 12px;
      stroke: var(--studies-icon-muted); fill: none;
      stroke-width: 1.5;
      transition: fill 0.1s, stroke 0.1s;
    }
    .ind-browser-star.fav svg { fill: #FFD700; stroke: #FFD700; }
    .ind-browser-star:hover svg { stroke: var(--studies-text-primary); }
    .ind-browser-info { flex: 1; min-width: 0; }
    .ind-browser-name {
      font-size: 16px;
      font-family: "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
      color: var(--studies-text-primary);
      font-weight: 300;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .ind-browser-desc {
      font-size: 11px;
      color: var(--studies-text-muted);
      margin-top: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .ind-browser-empty {
      padding: 32px 20px;
      text-align: center;
      color: var(--studies-text-muted);
      font-size: 13px;
    }

    /* Legend Context Menu */
    .legend-ctx-menu {
      position: fixed;
      background: var(--tos-bg-surface);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-lg);
      z-index: 4000;
      box-shadow: 0 4px 16px rgba(0,0,0,0.7);
      min-width: 160px;
      padding: 4px 0;
      display: none;
      font-size: 13px;
      color: var(--tos-text-secondary);
    }
    .legend-ctx-menu.visible { display: block; }
    .legend-ctx-menu-item {
      display: block;
      width: 100%;
      padding: 8px 16px;
      background: none;
      border: none;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 13px;
      text-align: left;
      cursor: pointer;
      white-space: nowrap;
    }
    .legend-ctx-menu-item:hover { background: var(--tos-bg-active); color: var(--tos-text-bright); }
    .legend-ctx-menu-item.danger { color: var(--tos-down); }
    .legend-ctx-menu-item.danger:hover { background: rgba(239,83,80,0.15); color: var(--tos-down); }
    .legend-ctx-menu-sep {
      height: 1px;
      background: var(--tos-bg-active);
      margin: 4px 0;
    }

    /* Templates Dropdown */
    .tpl-dropdown {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--tos-bg-panel);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-lg);
      z-index: 2500;
      box-shadow: 0 4px 16px rgba(0,0,0,0.7);
      min-width: 260px;
      max-width: 320px;
      display: none;
      font-size: 13px;
    }
    .tpl-dropdown.visible { display: block; }
    .tpl-dropdown-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      border-bottom: 1px solid var(--tos-border-sep);
    }
    .tpl-dropdown-header span { font-size: 14px; color: var(--tos-text-secondary); font-weight: 500; }
    .tpl-save-btn {
      background: var(--tos-accent);
      border: none;
      color: var(--tos-text-bright);
      padding: 5px 12px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
    }
    .tpl-save-btn:hover { background: var(--tos-accent-hover); }
    .tpl-list {
      max-height: 300px;
      overflow-y: auto;
      padding: 4px 0;
    }
    .tpl-item {
      display: flex;
      align-items: center;
      padding: 8px 14px;
      cursor: pointer;
      gap: 8px;
    }
    .tpl-item:hover { background: var(--tos-bg-subtle); }
    .tpl-item-info { flex: 1; min-width: 0; }
    .tpl-item-name {
      font-size: 13px;
      color: var(--tos-text-bright);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tpl-item-meta {
      font-size: 11px;
      color: var(--tos-text-dim);
      margin-top: 2px;
    }
    .tpl-item-delete {
      background: none;
      border: none;
      color: var(--tos-text-dim);
      font-size: 16px;
      cursor: pointer;
      padding: 0 2px;
      line-height: 1;
      flex-shrink: 0;
    }
    .tpl-item-delete:hover { color: var(--tos-down); }
    .tpl-empty {
      padding: 20px 14px;
      text-align: center;
      color: var(--tos-text-dim);
      font-size: 13px;
    }
    .tpl-preset-label {
      font-size: 11px;
      color: var(--tos-text-dim);
      padding: 8px 14px 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .tpl-save-backdrop {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(0,0,0,0.58);
      z-index: 2600;
    }
    .tpl-save-backdrop.visible { display: flex !important; }
    .tpl-save-dialog {
      width: min(100%, 440px);
      background: linear-gradient(180deg, rgba(32,32,34,0.98) 0%, rgba(24,24,26,0.98) 100%);
      border: 1px solid var(--tos-border-light);
      border-radius: 14px;
      box-shadow: var(--tos-shadow-dialog);
      overflow: hidden;
    }
    .tpl-save-dialog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px 12px;
      border-bottom: 1px solid var(--tos-border-sep);
    }
    .tpl-save-dialog-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--tos-text-bright);
      letter-spacing: 0.01em;
    }
    .tpl-save-dialog-close {
      background: none;
      border: none;
      color: var(--tos-text-muted);
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      padding: 0 4px;
    }
    .tpl-save-dialog-close:hover { color: var(--tos-text-bright); }
    .tpl-save-dialog-body {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 18px;
    }
    .tpl-save-label {
      font-size: 13px;
      font-weight: 500;
      color: var(--tos-text-secondary);
    }
    .tpl-save-input {
      width: 100%;
      height: 38px;
      padding: 0 12px;
      background: var(--tos-bg-input);
      border: 1px solid var(--tos-border);
      border-radius: 8px;
      color: var(--tos-text-bright);
      font-family: inherit;
      font-size: 14px;
      outline: none;
    }
    .tpl-save-input::placeholder { color: var(--tos-text-dim); }
    .tpl-save-input:focus {
      border-color: var(--tos-accent-border-strong);
      box-shadow: 0 0 0 1px var(--tos-accent-border);
    }
    .tpl-save-error {
      min-height: 16px;
      font-size: 12px;
      color: var(--tos-down);
    }
    .tpl-save-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding: 0 18px 18px;
    }
    .tpl-save-action {
      min-width: 88px;
      height: 36px;
      padding: 0 14px;
      border-radius: 8px;
      border: 1px solid var(--tos-border);
      background: var(--tos-bg-input);
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
    }
    .tpl-save-action:hover {
      background: var(--tos-bg-hover);
      color: var(--tos-text-bright);
      border-color: var(--tos-border-light);
    }
    .tpl-save-action.primary {
      background: var(--tos-accent);
      border-color: var(--tos-accent);
      color: var(--tos-text-white);
    }
    .tpl-save-action.primary:hover { background: var(--tos-accent-hover); border-color: var(--tos-accent-hover); }

    /* Indicator Settings Panel */
    .ind-settings-panel {
      position: fixed;
      background: var(--tos-bg-float);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-xl);
      z-index: 3000;
      box-shadow: var(--tos-shadow-dialog);
      display: none;
      min-width: 380px;
      max-width: 420px;
    }
    .ind-settings-panel.visible { display: flex; flex-direction: column; }
    .ind-settings-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 20px 10px;
      border-bottom: 1px solid var(--tos-border-sep);
      cursor: grab;
      user-select: none;
    }
    .ind-settings-header:active { cursor: grabbing; }
    .ind-settings-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--tos-text-bright);
    }
    .ind-settings-close {
      background: none;
      border: none;
      color: var(--tos-text-muted);
      font-size: 22px;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
    }
    .ind-settings-close:hover { color: var(--tos-text-bright); }
    .ind-settings-tabs {
      display: flex;
      border-bottom: 1px solid var(--tos-border-sep);
      position: relative;
    }
    .ind-settings-tab {
      flex: 1;
      padding: 10px 0;
      background: none;
      border: none;
      color: var(--tos-text-muted);
      font-family: inherit;
      font-size: 14px;
      cursor: pointer;
      text-align: center;
      transition: color 0.1s;
    }
    .ind-settings-tab:hover { color: var(--tos-text-secondary); }
    .ind-settings-tab.active { color: var(--tos-accent); }
    .ind-settings-tab-bar {
      position: absolute;
      bottom: 0;
      height: 2px;
      background: var(--tos-accent);
      transition: left 0.2s, width 0.2s;
    }
    .ind-settings-body {
      padding: 12px 16px;
      min-height: 120px;
      max-height: 400px;
      overflow-y: auto;
    }
    .ind-settings-body::-webkit-scrollbar { width: 6px; }
    .ind-settings-body::-webkit-scrollbar-track { background: transparent; }
    .ind-settings-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--tos-radius-sm); }
    .ind-settings-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
    .ind-settings-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 0;
    }
    .ind-settings-row-label {
      font-size: 14px;
      color: var(--tos-text-secondary);
    }
    .ind-settings-input {
      width: 80px;
      background: var(--tos-bg-input);
      border: 1px solid var(--tos-border-light);
      color: var(--tos-text-secondary);
      padding: 5px 8px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 14px;
      text-align: center;
      outline: none;
      -moz-appearance: textfield;
    }
    .ind-settings-input::-webkit-outer-spin-button,
    .ind-settings-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .ind-settings-input:focus { border-color: rgba(255,255,255,0.35); }
    .ind-settings-select {
      background: var(--tos-bg-input);
      border: 1px solid var(--tos-border-light);
      color: var(--tos-text-secondary);
      padding: 5px 8px;
      border-radius: var(--tos-radius-sm);
      font-family: inherit;
      font-size: 14px;
      outline: none;
    }
    .ind-settings-style-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 0;
    }
    .ind-settings-style-core {
      padding-bottom: 0;
    }
    .ind-settings-style-block {
      padding: 4px 0 10px 0;
    }
    .ind-settings-style-title {
      font-size: 12px;
      color: #8B8B93;
      margin-bottom: 6px;
    }
    .ind-settings-segment {
      display: flex;
      align-items: stretch;
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-lg);
      overflow: hidden;
      background: var(--tos-bg-surface);
      min-height: 32px;
      width: 100%;
    }
    .ind-settings-segment-btn {
      flex: 1 1 0;
      min-width: 0;
      background: transparent;
      border: none;
      border-right: 1px solid var(--tos-border-light);
      color: rgba(255,255,255,0.94);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0 8px;
      min-height: 32px;
    }
    .ind-settings-segment-btn:last-child {
      border-right: none;
    }
    .ind-settings-segment-btn.active {
      background: #D6D6D8;
      color: #101214;
    }
    .ind-settings-segment-btn:hover {
      background: var(--tos-bg-active);
    }
    .ind-settings-segment-btn.active:hover {
      background: #D6D6D8;
    }
    .ind-settings-thickness-line {
      display: block;
      width: 44px;
      border-radius: 99px;
      background: currentColor;
    }
    .ind-settings-linestyle-preview {
      display: block;
      width: 44px;
      border-top: 3px solid currentColor;
    }
    .ind-settings-linestyle-preview.dashed {
      border-top-style: dashed;
    }
    .ind-settings-linestyle-preview.dotted {
      border-top-style: dotted;
    }
    .ind-settings-style-select {
      min-width: 84px;
      width: 100%;
      max-width: 180px;
      padding-right: 22px;
    }
    .ind-settings-color-swatch {
      width: 24px;
      height: 24px;
      border: 1px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      cursor: pointer;
      padding: 0;
      flex-shrink: 0;
      position: relative;
    }
    .ind-settings-color-swatch:hover { border-color: rgba(255,255,255,0.5); }
    .ind-settings-color-input {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      opacity: 0;
      cursor: pointer;
    }
    .ind-settings-width-preview {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-sm);
      cursor: pointer;
      min-width: 50px;
    }
    .ind-settings-width-preview:hover { border-color: rgba(255,255,255,0.3); }
    .ind-settings-width-line {
      display: inline-block;
      width: 20px;
      border-radius: 1px;
      background: #C8C8D0;
    }
    .ind-settings-linestyle-btn {
      padding: 4px 10px;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-sm);
      background: none;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
    }
    .ind-settings-linestyle-btn:hover { border-color: rgba(255,255,255,0.3); }
    .ind-settings-checkbox-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 0;
    }
    .ind-settings-checkbox {
      width: 16px;
      height: 16px;
      accent-color: var(--tos-accent);
      cursor: pointer;
    }
    .ind-settings-checkbox-label {
      font-size: 13px;
      color: #999;
    }
    .ind-settings-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      padding: 10px 16px;
      border-top: 1px solid var(--tos-border-sep);
      flex-wrap: wrap;
    }
    .ind-settings-cancel-btn {
      background: none;
      border: 1px solid var(--tos-border-light);
      color: var(--tos-text-secondary);
      padding: 6px 14px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
    }
    .ind-settings-cancel-btn:hover { color: var(--tos-text-bright); border-color: rgba(255,255,255,0.3); }
    .ind-settings-remove-btn {
      margin-right: auto;
      background: none;
      border: 1px solid rgba(239,83,80,0.4);
      color: var(--tos-down);
      padding: 6px 12px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
    }
    .ind-settings-remove-btn:hover { background: rgba(239,83,80,0.15); border-color: rgba(239,83,80,0.7); }
    .ind-settings-ok-btn {
      background: #fff;
      border: 1px solid #fff;
      color: #000;
      padding: 6px 18px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
    }
    .ind-settings-ok-btn:hover { background: #E0E0E0; border-color: var(--tos-text-bright); }
    .ind-settings-section-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--tos-text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin: 10px 0 6px;
      padding-bottom: 5px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .ind-settings-section-label:first-child { margin-top: 0; }
    .ind-settings-placeholder {
      padding: 20px 0;
      text-align: center;
      font-size: 14px;
      color: var(--tos-text-dim);
      font-style: italic;
    }
    .ind-vis-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 8px 0;
    }
    .ind-vis-item {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 5px 8px;
      border: 1px solid var(--tos-border);
      border-radius: var(--tos-radius-md);
      cursor: pointer;
      user-select: none;
      font-size: 12px;
      color: var(--tos-text-muted);
      transition: border-color 0.1s, color 0.1s;
    }
    .ind-vis-item:hover { border-color: var(--tos-border-strong); color: var(--tos-text-secondary); }
    .ind-vis-item.checked { border-color: var(--tos-accent); color: var(--tos-text-bright); }
    .ind-vis-check {
      width: 16px;
      height: 16px;
      border: 1.5px solid var(--tos-border-strong);
      border-radius: var(--tos-radius-sm);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.1s, border-color 0.1s;
    }
    .ind-vis-item.checked .ind-vis-check {
      background: var(--tos-accent);
      border-color: var(--tos-accent);
    }
    .ind-vis-check svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 2.5; }
    .ind-vis-note {
      margin-top: 12px;
      font-size: 12px;
      color: var(--tos-text-dim);
    }
    .drw-template-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-top: 6px;
    }
    .drw-template-select {
      flex: 1 1 120px;
      min-width: 0;
    }
    .drw-template-btn {
      background: transparent;
      border: 1px solid var(--tos-border-light);
      color: var(--tos-text-secondary);
      padding: 5px 10px;
      border-radius: var(--tos-radius-md);
      font-family: inherit;
      font-size: 12px;
      cursor: pointer;
      white-space: nowrap;
    }
    .drw-template-btn:hover {
      color: var(--tos-text-bright);
      border-color: rgba(255,255,255,0.3);
      background: var(--tos-bg-active);
    }
    .drw-template-btn.danger {
      color: #ff8a80;
      border-color: rgba(255,82,82,0.45);
    }
    .drw-template-btn.danger:hover {
      color: #ffb3ad;
      border-color: rgba(255,82,82,0.7);
      background: rgba(255,82,82,0.12);
    }
    .drw-meta-grid {
      display: grid;
      grid-template-columns: 112px minmax(0, 1fr);
      gap: 8px 10px;
      align-items: center;
      margin-top: 6px;
    }
    .drw-meta-label {
      font-size: 12px;
      color: #8B8B93;
      line-height: 1.2;
    }
    .drw-meta-input {
      width: 100%;
      text-align: left;
      padding-left: 8px;
      padding-right: 8px;
    }
    .drw-meta-select {
      width: 100%;
      min-width: 140px;
    }
    .drw-meta-sync {
      justify-self: flex-start;
      padding: 5px 12px;
    }
    .drw-meta-hint {
      grid-column: 1 / -1;
      margin-top: 2px;
      font-size: 12px;
      color: var(--tos-text-dim);
    }

    /* ── Object Tree Sidebar ── */
    .ot-sidebar {
      width: 260px;
      flex-shrink: 0;
      background: var(--tos-bg-panel);
      border-left: 1px solid var(--tos-border-sep);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: width 200ms ease, opacity 200ms ease;
      z-index: 100;
    }
    .ot-sidebar.collapsed {
      width: 0;
      opacity: 0;
      border-left: none;
      pointer-events: none;
    }
    .ot-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      border-bottom: 1px solid var(--tos-border-sep);
      flex-shrink: 0;
    }
    .ot-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--tos-text-bright);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .ot-header-actions { display: flex; gap: 4px; }
    .ot-icon-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-muted);
      width: 24px; height: 24px;
      border-radius: var(--tos-radius-sm);
      font-size: 12px; font-family: inherit;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      padding: 0;
    }
    .ot-icon-btn:hover { color: var(--tos-text-bright); border-color: var(--tos-border-strong); }
    .ot-tree {
      flex: 1;
      overflow-y: auto;
      padding: 4px 0;
    }
    .ot-tree::-webkit-scrollbar { width: 6px; }
    .ot-tree::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: var(--tos-radius-sm); }
    .ot-pane-group { margin-bottom: 2px; }
    .ot-pane-header {
      display: flex;
      align-items: center;
      padding: 6px 10px;
      cursor: pointer;
      user-select: none;
      font-size: 12px;
      font-weight: 600;
      color: #A0A0A0;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .ot-pane-header:hover { background: var(--tos-bg-subtle); }
    .ot-pane-caret {
      display: inline-block;
      width: 12px;
      font-size: 8px;
      color: var(--tos-text-muted);
      transition: transform 150ms ease;
      margin-right: 6px;
    }
    .ot-pane-group:not(.collapsed) .ot-pane-caret { transform: rotate(90deg); }
    .ot-pane-group.collapsed .ot-pane-items { display: none; }
    .ot-pane-count {
      margin-left: auto;
      font-size: 10px;
      font-weight: 400;
      color: var(--tos-text-dim);
    }
    .ot-item {
      display: flex;
      align-items: center;
      padding: 5px 10px 5px 28px;
      gap: 6px;
      cursor: default;
      font-size: 12px;
      color: var(--tos-text-secondary);
      border-left: 2px solid transparent;
      transition: background 100ms;
    }
    .ot-item:hover { background: var(--tos-bg-subtle); }
    .ot-item.selected { background: var(--tos-accent-bg); border-left-color: var(--tos-accent); }
    .ot-item.dragging { opacity: 0.4; }
    .ot-item.drag-over { border-top: 2px solid var(--tos-accent); }
    .ot-color-dot {
      width: 10px; height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
      border: 1px solid var(--tos-border-light);
    }
    .ot-item-label {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .ot-drawing-tags {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
      margin-left: 2px;
      margin-right: 2px;
    }
    .ot-drawing-tag {
      min-width: 14px;
      height: 14px;
      border-radius: 999px;
      background: var(--tos-accent-bg-strong);
      border: 1px solid rgba(33,150,243,0.35);
      color: #8fc8ff;
      font-size: 9px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      letter-spacing: 0.2px;
      padding: 0 4px;
      box-sizing: border-box;
    }
    .ot-item-label-input {
      flex: 1;
      min-width: 0;
      background: var(--tos-bg-surface);
      border: 1px solid var(--tos-border-strong);
      color: var(--tos-text-bright);
      font-family: inherit;
      font-size: 12px;
      padding: 1px 4px;
      border-radius: 2px;
      outline: none;
    }
    .ot-eye-btn {
      background: none; border: none;
      color: var(--tos-text-muted);
      cursor: pointer; padding: 0 3px;
      line-height: 1;
      opacity: 0.6;
      transition: opacity 100ms;
      display: flex; align-items: center; justify-content: center;
    }
    .ot-eye-btn:hover { opacity: 1; }
    .ot-eye-btn.hidden { color: #444; opacity: 0.3; }
    .ot-lock-btn {
      background: none;
      border: 1px solid var(--tos-border);
      color: var(--tos-text-muted);
      font-size: 10px;
      font-weight: 600;
      min-width: 18px;
      height: 18px;
      border-radius: var(--tos-radius-sm);
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
      opacity: 0.7;
      font-family: inherit;
    }
    .ot-lock-btn:hover { opacity: 1; border-color: var(--tos-border-strong); color: var(--tos-text-secondary); }
    .ot-lock-btn.locked { color: #FFC66D; border-color: rgba(255,198,109,0.5); opacity: 1; }
    .ot-remove-btn {
      background: none; border: none;
      color: var(--tos-text-dim); font-size: 14px;
      cursor: pointer; padding: 0 2px;
      line-height: 1;
      opacity: 0;
      transition: opacity 100ms;
    }
    .ot-item:hover .ot-remove-btn { opacity: 0.6; }
    .ot-remove-btn:hover { color: #ff5252 !important; opacity: 1 !important; }
    .ot-ctx-menu {
      position: fixed;
      background: var(--tos-bg-surface);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      padding: 4px 0;
      z-index: 1000;
      box-shadow: var(--tos-shadow-sm);
      min-width: 150px;
      display: none;
    }
    .ot-ctx-menu.visible { display: block; }
    .ot-ctx-menu-item {
      display: block; width: 100%;
      padding: 6px 14px;
      background: none; border: none;
      color: var(--tos-text-secondary); font-family: inherit;
      font-size: 12px; text-align: left;
      cursor: pointer;
    }
    .ot-ctx-menu-item:hover { background: var(--tos-bg-active); color: var(--tos-text-bright); }
    .ot-ctx-menu-item[disabled] {
      color: #5b5b63;
      cursor: default;
      pointer-events: none;
    }
    .ot-ctx-menu-item[disabled]:hover {
      background: none;
      color: #5b5b63;
    }
    .ot-ctx-menu-item.danger { color: #ff5252; }
    .ot-ctx-menu-item.danger:hover { background: rgba(255,82,82,0.15); }
    .ot-ctx-menu-sep {
      height: 1px;
      background: var(--tos-bg-active);
      margin: 4px 0;
    }

    /* ── Watchlist Resize Handle ── */
    #wl-resize-handle {
      width: 5px;
      flex-shrink: 0;
      cursor: ew-resize;
      background: var(--tos-bg-chart);
      transition: background 0.15s;
      z-index: 101;
      display: none;
    }
    #wl-resize-handle:hover,
    #wl-resize-handle.active {
      background: var(--tos-bg-chart);
    }

    /* ── Watchlist Sidebar ── */
    .wl-sidebar {
      width: 320px;
      flex-shrink: 0;
      background: var(--tos-bg-deep);
      border-left: 1px solid var(--tos-bg-chart);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      z-index: 100;
      transition: width 200ms ease, opacity 200ms ease;
      font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    }
    .wl-sidebar.resizing {
      transition: none;
    }
    .wl-sidebar.collapsed {
      width: 0 !important;
      opacity: 0;
      border-left: none;
      pointer-events: none;
      min-width: 0;
    }
    .wl-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      border-bottom: 1px solid var(--tos-border-sep);
      flex-shrink: 0;
    }
    .wl-title-btn {
      background: none;
      border: none;
      color: var(--tos-text-bright);
      font-family: inherit;
      font-size: 14px;
      font-weight: 200;
      cursor: pointer;
      padding: 2px 6px;
      border-radius: var(--tos-radius-sm);
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .wl-title-btn:hover { background: var(--tos-bg-hover); }
    .wl-title-arrow { font-size: 10px; color: var(--tos-text-muted); }
    .wl-header-actions { display: flex; gap: 4px; }
    .wl-icon-btn {
      background: none;
      border: 1px solid var(--tos-border-sep);
      color: var(--tos-text-muted);
      width: 28px;
      height: 28px;
      border-radius: var(--tos-radius-sm);
      font-size: 16px;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }
    .wl-icon-btn:hover { color: var(--tos-text-bright); border-color: var(--tos-border-strong); }

    .wl-search {
      padding: 0;
      flex-shrink: 0;
    }
    .wl-search input {
      width: 100%;
      padding: 8px 12px;
      background: var(--tos-bg-dark);
      border: none;
      border-bottom: 1px solid var(--tos-border-sep);
      color: var(--tos-text-bright);
      font-family: inherit;
      font-size: 12px;
      outline: none;
    }
    .wl-search input::placeholder { color: var(--tos-text-dim); }
    .wl-search-results {
      max-height: 200px;
      overflow-y: auto;
      background: var(--tos-bg-dark);
    }
    .wl-search-row {
      display: flex;
      align-items: center;
      padding: 6px 12px;
      cursor: pointer;
      gap: 10px;
    }
    .wl-search-row:hover { background: var(--tos-bg-hover); }
    .wl-search-sym {
      font-size: 12px;
      font-weight: 500;
      color: var(--tos-text-bright);
      min-width: 60px;
    }
    .wl-search-name {
      font-size: 11px;
      color: var(--tos-text-muted);
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* Column header row */
    .wl-col-header {
      display: flex;
      align-items: center;
      padding: 4px 16px 4px 13px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      flex-shrink: 0;
      gap: 0;
    }
    .wl-col-header span {
      font-size: 13px;
      font-weight: 100;
      text-transform: uppercase;
      color: var(--tos-text-dim);
      cursor: pointer;
      padding: 3px 0;
      letter-spacing: 0.3px;
      transition: color 0.15s;
    }
    .wl-col-header span:hover { color: var(--tos-text-muted); }
    .wl-col-header span.active { color: var(--tos-accent); }
    .wl-hdr-sym { flex: 3; min-width: 104px; padding-left: 0; }
    .wl-hdr-last { flex: 2; min-width: 56px; text-align: right; }
    .wl-hdr-chg { flex: 2; min-width: 56px; text-align: right; }
    .wl-hdr-chgpct { flex: 2; min-width: 64px; text-align: right; }

    .wl-list {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
    }
    .wl-list::-webkit-scrollbar { width: 6px; }
    .wl-list::-webkit-scrollbar-track { background: transparent; }
    .wl-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: var(--tos-radius-sm); }
    .wl-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

    /* Watchlist row — tabular layout with blue left border accent */
    .wl-row {
      display: flex;
      align-items: center;
      padding: 5px 16px 5px 10px;
      cursor: pointer;
      gap: 0;
      border-left: 3px solid transparent;
      border-bottom: 1px solid var(--tos-border-sep);
      transition: background 0.08s, border-left-color 0.08s;
      user-select: none;
    }
    .wl-row:hover { background: rgba(236,242,248,0.10); }
    .wl-row.active { border: 1px solid rgba(255,255,255,0.5); border-left-width: 3px; background: rgba(236,242,248,0.10); padding: 4px 15px 4px 8px; }
    .wl-row.dragging { opacity: 0.4; }
    .wl-row.drag-over { border-top: 2px solid var(--tos-accent); margin-top: -2px; }

    /* Logo circle */
    .wl-logo {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      overflow: hidden;
      background: var(--tos-bg-surface);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 8px;
    }
    .wl-logo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .wl-logo-fallback {
      font-size: 10px;
      font-weight: 300;
      color: #888;
      line-height: 1;
    }

    /* Ticker cell: logo + symbol text */
    .wl-ticker-cell {
      flex: 3;
      display: flex;
      align-items: center;
      min-width: 104px;
    }
    .wl-sym-text {
      font-size: 16px;
      font-weight: 100;
      color: var(--tos-text-bright);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Data cells — proportional width, right-aligned, tabular numbers */
    .wl-cell-last, .wl-cell-chg, .wl-cell-chgpct {
      font-size: 15px;
      font-weight: 100;
      font-variant-numeric: tabular-nums;
      text-align: right;
      min-width: 56px;
    }
    .wl-cell-last { flex: 2; color: var(--tos-text-bright); }
    .wl-cell-chg { flex: 2; }
    .wl-cell-chgpct { flex: 2; min-width: 64px; }
    .wl-cell-chg.up, .wl-cell-chgpct.up { color: var(--tos-up); }
    .wl-cell-chg.down, .wl-cell-chgpct.down { color: var(--tos-down); }

    /* Collapsible section header */
    .wl-section-header {
      display: flex;
      align-items: center;
      padding: 6px 10px 4px 13px;
      user-select: none;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      background: rgba(255,255,255,0.02);
      gap: 6px;
    }
    .wl-section-header:hover { background: var(--tos-bg-subtle); }
    .wl-section-chevron {
      font-size: 10px;
      color: var(--tos-text-dim);
      transition: transform 0.15s ease;
      display: inline-block;
      cursor: pointer;
    }
    .wl-section-header.collapsed .wl-section-chevron {
      transform: rotate(-90deg);
    }
    .wl-section-name {
      font-size: 12px;
      font-weight: 500;
      color: var(--tos-text-dim);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      cursor: text;
    }
    .wl-section-rename-input {
      font-size: 12px;
      font-weight: 500;
      color: var(--tos-text-primary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      background: var(--tos-bg-input);
      border: 1px solid var(--tos-accent);
      border-radius: var(--tos-radius-sm);
      padding: 1px 4px;
      outline: none;
      width: 120px;
    }
    .wl-section-group.collapsed {
      display: none;
    }

    .wl-empty {
      padding: 24px 16px;
      text-align: center;
      font-size: 12px;
      color: var(--tos-text-dim);
    }

    /* Watchlist context menu */
    .wl-ctx-menu {
      position: fixed;
      background: var(--tos-bg-dark);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-md);
      padding: 4px 0;
      z-index: 5000;
      box-shadow: var(--tos-shadow-sm);
      min-width: 160px;
      display: none;
    }
    .wl-ctx-menu.visible { display: block; }
    .wl-ctx-item {
      display: block;
      width: 100%;
      padding: 8px 16px;
      background: none;
      border: none;
      color: var(--tos-text-secondary);
      font-family: inherit;
      font-size: 12px;
      text-align: left;
      cursor: pointer;
    }
    .wl-ctx-item:hover { background: var(--tos-bg-active); color: var(--tos-text-bright); }

    /* Watchlist selector dropdown */
    .wl-selector-dropdown {
      position: fixed;
      background: var(--tos-bg-dark);
      border: 1px solid var(--tos-border-light);
      border-radius: var(--tos-radius-lg);
      z-index: 5000;
      box-shadow: var(--tos-shadow-md);
      min-width: 240px;
      max-height: 320px;
      overflow-y: auto;
      padding: 4px 0;
    }
    .wl-selector-item {
      display: flex;
      align-items: center;
      padding: 8px 14px;
      cursor: pointer;
      gap: 10px;
    }
    .wl-selector-item:hover { background: var(--tos-bg-hover); }
    .wl-selector-item.active { background: var(--tos-accent-bg); }
    .wl-selector-name {
      flex: 1;
      font-size: 13px;
      color: var(--tos-text-bright);
    }
    .wl-selector-count {
      font-size: 11px;
      color: var(--tos-text-dim);
    }
    .wl-selector-delete {
      background: none;
      border: none;
      color: var(--tos-text-dim);
      font-size: 16px;
      cursor: pointer;
      padding: 0 2px;
      line-height: 1;
    }
    .wl-selector-delete:hover { color: var(--tos-down); }
    .wl-selector-new {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      cursor: pointer;
      color: var(--tos-accent);
      font-size: 13px;
      border-top: 1px solid var(--tos-border-sep);
      margin-top: 2px;
    }
    .wl-selector-new:hover { background: var(--tos-accent-bg); }

    #wl-toggle-btn.active {
      color: var(--tos-accent);
      border-color: var(--tos-accent);
      background: var(--tos-accent-bg);
    }

    /* ── Fundamentals / overview light theme ── */
    :root[data-theme="light"] #fundamentals-container,
    :root[data-theme="light"] #overview-container {
      --fund-bg: #f5f5f0;
      --fund-bg-elevated: #ffffff;
      --fund-bg-elevated-strong: #fafaf7;
      --fund-bg-card: rgba(255, 255, 255, 0.96);
      --fund-bg-card-strong: rgba(248, 248, 243, 0.98);
      --fund-bg-subtle: rgba(253, 253, 251, 0.92);
      --fund-bg-hover: rgba(90, 107, 74, 0.08);
      --fund-bg-active: rgba(90, 107, 74, 0.12);
      --fund-border: rgba(229, 229, 224, 0.98);
      --fund-border-soft: rgba(212, 217, 202, 0.92);
      --fund-border-strong: rgba(90, 107, 74, 0.42);
      --fund-text: #374151;
      --fund-text-soft: #4a5a3a;
      --fund-text-muted: #6b7280;
      --fund-text-dim: #7a8271;
      --fund-title: #1f2937;
      --fund-accent: #5a6b4a;
      --fund-accent-strong: #4a5a3a;
      --fund-accent-border: rgba(90, 107, 74, 0.46);
      --fund-top-control-group-bg: rgba(250, 250, 245, 0.9);
      --fund-top-control-btn-bg: transparent;
      --fund-top-control-btn-bg-hover: rgba(243, 244, 246, 0.8);
      --fund-top-control-btn-bg-active: #ffffff;
      --fund-top-control-border: transparent;
      --fund-top-control-text: rgba(107, 114, 128, 1);
      --fund-top-control-text-strong: #1f2937;
      --fund-top-control-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
      --fund-top-control-inset: none;
      --fund-top-control-search-bg: rgba(228, 233, 241, 0.98);
      --fund-top-control-search-bg-hover: rgba(235, 239, 246, 0.99);
      --fund-top-control-search-bg-focus: rgba(242, 245, 249, 1);
      --fund-top-control-search-text: #1f2937;
      --fund-top-control-search-placeholder: rgba(75, 85, 99, 0.72);
      --fund-top-control-search-icon: rgba(75, 85, 99, 0.78);
      --fund-top-control-search-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
      --fund-compare-pill-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(240, 244, 251, 0.99) 100%);
      --fund-compare-pill-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(232, 238, 248, 1) 100%);
      --fund-compare-pill-border: rgba(148, 163, 184, 0.42);
      --fund-compare-pill-text: #1f2937;
	      --fund-compare-pill-icon: rgba(107, 114, 128, 0.9);
      --fund-compare-pill-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 6px 18px rgba(15, 23, 42, 0.06);
      --fund-company-chip-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(241, 245, 251, 0.99) 100%);
      --fund-company-chip-bg-hidden: linear-gradient(180deg, rgba(243, 246, 251, 0.96) 0%, rgba(232, 238, 247, 0.96) 100%);
      --fund-company-chip-border: rgba(148, 163, 184, 0.28);
      --fund-company-chip-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 8px 18px rgba(15, 23, 42, 0.06);
      --fund-company-chip-logo-bg: rgba(37, 99, 235, 0.08);
      --fund-company-chip-logo-border: rgba(37, 99, 235, 0.12);
      --fund-company-chip-fallback-bg: rgba(37, 99, 235, 0.14);
      --fund-company-chip-fallback-text: #1d4ed8;
      --fund-company-chip-ticker: rgba(71, 85, 105, 0.82);
      --fund-sidebar-panel: rgba(249, 250, 251, 0.96);
      --fund-sidebar-surface: rgba(15, 23, 42, 0.02);
      --fund-sidebar-surface-hover: rgba(15, 23, 42, 0.06);
      --fund-sidebar-surface-active: rgba(15, 23, 42, 0.08);
      --fund-sidebar-border: rgba(15, 23, 42, 0.08);
      --fund-sidebar-border-soft: rgba(15, 23, 42, 0.08);
      --fund-sidebar-border-focus: rgba(15, 23, 42, 0.14);
      --fund-sidebar-divider: rgba(15, 23, 42, 0.08);
      --fund-sidebar-section-divider: rgba(15, 23, 42, 0.12);
      --fund-sidebar-text-primary: #0f172a;
      --fund-sidebar-text-secondary: #475569;
      --fund-sidebar-text-muted: #64748b;
      --fund-sidebar-count: #64748b;
      --fund-sidebar-chip-hover: rgba(15, 23, 42, 0.09);
      --fund-sidebar-chip-active: rgba(15, 23, 42, 0.025);
      --fund-sidebar-chip-hidden: rgba(15, 23, 42, 0.03);
      --fund-sidebar-action-hover: rgba(15, 23, 42, 0.08);
      --fund-sidebar-handle: rgba(148, 163, 184, 0.22);
      --fund-sidebar-handle-active: rgba(90, 107, 74, 0.32);
      --fund-success: #2d4a3e;
      --fund-danger: #8d4a4a;
      --fund-range-base-bg: rgba(86, 94, 108, 0.5);
      --fund-range-base-border: rgba(148, 163, 184, 0.16);
      --fund-range-active-bg: #2fa2ff;
      --fund-range-active-shadow: rgba(86, 190, 255, 0.05);
      --fund-range-active-glow: rgba(35, 187, 255, 0.12);
      --fund-range-thumb-top: #8e949d;
      --fund-range-thumb-bottom: #747b85;
      background:
        radial-gradient(900px 260px at 9% -90px, rgba(90, 107, 74, 0.12), transparent 68%),
        radial-gradient(720px 220px at 88% -110px, rgba(180, 190, 166, 0.22), transparent 68%),
        linear-gradient(180deg, #f5f5f0 0%, #efefe8 100%);
    }
    :root[data-theme="light"] #fundamentals-container .fund-seg-btn,
    :root[data-theme="light"] #fundamentals-container .fund-brand-mode-group,
    :root[data-theme="light"] #fundamentals-container .fund-opt-btn,
    :root[data-theme="light"] #fundamentals-container .fund-action-btn,
    :root[data-theme="light"] #fundamentals-container .fund-icon-btn,
    :root[data-theme="light"] #fundamentals-container .fund-dd-btn {
      border: 1px solid rgba(229, 229, 224, 0.96);
      background: rgba(255, 255, 255, 0.96);
      box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-seg-btn {
      border: none;
      background: transparent;
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-seg-btn.active {
      background: var(--fund-top-control-btn-bg-active);
      box-shadow: var(--fund-top-control-shadow);
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-dd-btn,
    :root[data-theme="light"] #fundamentals-container .fund-range-spacer .fund-dd-btn,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-top-action-btn,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-export-btn {
      border: none;
      background: var(--fund-top-control-group-bg);
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-dd-btn.open,
    :root[data-theme="light"] #fundamentals-container .fund-range-spacer .fund-dd-btn.open,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-export-btn[aria-expanded="true"] {
      background: var(--fund-top-control-btn-bg-active);
      box-shadow: var(--fund-top-control-shadow);
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-range-period-seg,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-label-denomination-seg,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-price-toggle-group,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-top-action-btn,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-export-btn,
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-top-fullscreen-btn {
      border: 1px solid var(--fund-border-soft);
      background: transparent;
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls .fund-export-btn[aria-expanded="true"] {
      border-color: var(--fund-accent-border);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar {
      border-color: var(--fund-sidebar-divider, var(--fund-sidebar-border));
      background: var(--fund-sidebar-panel, var(--fund-bg));
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-btn,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-control {
      background: transparent;
      border-color: var(--fund-sidebar-border-soft);
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-period-seg,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-toggle-group {
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-toggle-group.is-active {
      background: var(--fund-sidebar-surface-active);
      border-color: var(--fund-sidebar-border-focus);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar .fund-chip,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar .fund-company-chip {
      background: transparent;
      border-color: var(--fund-sidebar-border-soft);
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-btn:hover,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-btn:focus-visible,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-control:hover,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-control.open,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-control:focus-within {
      background: var(--fund-sidebar-surface-hover);
      border-color: var(--fund-sidebar-border-focus);
      color: var(--fund-sidebar-text-primary);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-label,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar .fund-chip-label,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar .fund-company-chip-name {
      color: var(--fund-sidebar-text-secondary);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-search-shortcut {
      color: var(--fund-sidebar-count);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar .fund-company-chip-ticker {
      color: var(--fund-sidebar-text-primary);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-section-title,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-clear-btn {
      color: var(--fund-sidebar-text-muted);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-clear-btn:hover {
      color: var(--fund-sidebar-text-primary);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-toggle {
      border-color: transparent;
      background: transparent;
      color: #64748b;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-toggle:hover,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-toggle:focus-visible {
      background: rgba(100, 116, 139, 0.16);
      box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.12);
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-dd-panel {
      background: rgba(253, 253, 251, 0.985);
      border: 1px solid #e5e5e0;
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn {
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn:hover,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn:focus-visible,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-open,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-active {
      background: rgba(15, 23, 42, 0.06);
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-icon {
      color: rgba(15, 23, 42, 0.72);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-chevron,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-check,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-meta {
      color: rgba(71, 85, 105, 0.72);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-active .fund-chip-settings-action-meta {
      color: #334155;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled:hover,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled:focus-visible {
      color: rgba(100, 116, 139, 0.46);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-icon,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-chevron,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-check,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-chip-settings-action-btn.is-disabled .fund-chip-settings-action-meta {
      color: rgba(100, 116, 139, 0.46);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-appearance-panel .fund-opt-btn:hover,
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-appearance-panel .fund-opt-btn.active {
      background: rgba(37, 99, 235, 0.08);
      border-color: rgba(37, 99, 235, 0.16);
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-options-section {
      border-top-color: rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-section-title {
      color: rgba(71, 85, 105, 0.72);
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-card {
      border-color: rgba(15, 23, 42, 0.08);
      background: rgba(15, 23, 42, 0.03);
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-card:hover,
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-card:focus-visible {
      background: rgba(15, 23, 42, 0.05);
      border-color: rgba(15, 23, 42, 0.14);
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-card.is-active {
      background: rgba(15, 23, 42, 0.08);
      border-color: rgba(15, 23, 42, 0.18);
      box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-preview {
      border-color: rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-preview::before {
      background:
        linear-gradient(to top, rgba(255, 255, 255, 0.18), transparent 58%),
        repeating-linear-gradient(
          to top,
          transparent 0,
          transparent 15px,
          rgba(15, 23, 42, 0.05) 15px,
          rgba(15, 23, 42, 0.05) 16px
        );
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-name {
      color: #111827;
    }
    :root[data-theme="light"] #fundamentals-container .fund-appearance-preset-note {
      color: rgba(71, 85, 105, 0.78);
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-appearance-panel .fund-brand-mode-seg .fund-seg-btn {
      color: #475569;
    }
    :root[data-theme="light"] #fundamentals-container .fund-sidebar-appearance-dropdown .fund-appearance-panel .fund-brand-mode-seg .fund-seg-btn.active {
      background: rgba(37, 99, 235, 0.1);
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-chart-area {
      border: none;
      background: var(--fund-bg);
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-empty-chart-plot {
      --fund-empty-axis-border: rgba(100, 116, 139, 0.34);
      --fund-empty-grid-horizontal: rgba(148, 163, 184, 0.26);
      --fund-empty-grid-vertical: rgba(148, 163, 184, 0.22);
    }
    :root[data-theme="light"] #fundamentals-container .fund-brand-logo-item {
      background: rgba(255, 255, 255, 0.78);
      border-color: rgba(148, 163, 184, 0.18);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #overview-container .overview-brand-logo {
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }
    :root[data-theme="light"] #overview-container .overview-cell {
      --overview-card-bg: rgba(255, 255, 255, 0.96);
      --overview-chart-bg: #FFFFFF;
      background: var(--overview-card-bg);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 10px 24px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #overview-container .overview-cell-chart {
      border: none;
      background: transparent;
      box-shadow: none;
    }
    :root[data-theme="light"] #overview-container .overview-cell-fullscreen-btn {
      background: var(--overview-chart-bg);
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-status {
      color: #4b5563;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid #e5e5e0;
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-dd-panel,
    :root[data-theme="light"] #fundamentals-container .fund-chip,
    :root[data-theme="light"] .fund-chip-settings-panel {
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-range-block {
      box-shadow: none;
      background: transparent;
      border: 0;
    }
    :root[data-theme="light"] #fundamentals-container .fund-legend-item {
      box-shadow: none;
      color: #4b5563;
    }
    :root[data-theme="light"] #fundamentals-container .fund-legend-item:hover,
    :root[data-theme="light"] #fundamentals-container .fund-legend-item.is-active,
    :root[data-theme="light"] #fundamentals-container .fund-legend-item.is-hovered {
      color: #1f2937;
    }
    :root[data-theme="light"] #fundamentals-container .fund-table-toggle-btn {
      border-color: rgba(203, 213, 225, 0.96);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.985) 0%, rgba(247, 248, 250, 0.992) 100%);
      color: #64748b;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-table-toggle-btn:hover,
    :root[data-theme="light"] #fundamentals-container .fund-table-toggle-btn:focus-visible {
      color: #0f172a;
      border-color: rgba(37, 99, 235, 0.18);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(243, 246, 250, 0.996) 100%);
    }
    :root[data-theme="light"] #fundamentals-container .fund-table-toggle-btn:disabled:hover {
      color: #64748b;
      border-color: rgba(203, 213, 225, 0.96);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.985) 0%, rgba(247, 248, 250, 0.992) 100%);
    }
    :root[data-theme="light"] #fundamentals-container .fund-table-wrap {
      border-color: var(--fund-sidebar-border-soft);
      background: transparent;
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-table thead,
    :root[data-theme="light"] #fundamentals-container .fund-table th:first-child {
      background: transparent;
    }
    :root[data-theme="light"] #fundamentals-container .fund-table tbody tr:hover {
      background: rgba(15, 23, 42, 0.04);
    }
    :root[data-theme="light"] #fundamentals-container .fund-table tbody tr.is-metric-active {
      background: rgba(15, 23, 42, 0.06);
    }
    :root[data-theme="light"] #fundamentals-container .fund-table tbody tr.is-metric-hovered {
      background: rgba(15, 23, 42, 0.05);
    }
    :root[data-theme="light"] #fundamentals-container .fund-table td:first-child {
      background: transparent;
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-table th.is-hovered,
    :root[data-theme="light"] #fundamentals-container .fund-table td.is-hovered {
      background: rgba(15, 23, 42, 0.06);
    }
    :root[data-theme="light"] #fundamentals-container .fund-dd-panel {
      background: rgba(253, 253, 251, 0.985);
      border: 1px solid #e5e5e0;
      outline: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metrics-modal {
      border-color: rgba(203, 213, 225, 0.94);
      box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metrics-modal-search-control {
      background: rgba(255, 255, 255, 0.86);
      border-color: rgba(203, 213, 225, 0.94);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metrics-modal-search-control:hover,
    :root[data-theme="light"] #fundamentals-container .fund-metrics-modal-search-control:focus-within {
      background: rgba(255, 255, 255, 0.98);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metrics-panel-close {
      color: #64748b;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metrics-panel-close:hover {
      background: rgba(226, 232, 240, 0.82);
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-range-period-seg {
      border-color: rgba(229, 229, 224, 0.96);
      background: linear-gradient(180deg, rgba(253, 253, 251, 0.988) 0%, rgba(247, 248, 245, 0.992) 100%);
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-range-period-seg .fund-seg-btn {
      color: #6b7280;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-range-period-seg .fund-seg-btn:hover {
      background: rgba(241, 245, 249, 0.92);
      border-color: rgba(203, 213, 225, 0.95);
      color: #1f2937;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-range-period-seg .fund-seg-btn.active {
      background: rgba(226, 232, 240, 0.92);
      border-color: rgba(191, 219, 254, 0.96);
      color: #111827;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-section + .fund-metric-section {
      border-top-color: rgba(203, 213, 225, 0.72);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-section-title {
      color: #6b7280;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item {
      color: #4b5563;
    }
    :root[data-theme="light"] #fundamentals-container .fund-tooltip {
      --fund-tooltip-surface-top: rgba(255, 255, 255, 0.995);
      --fund-tooltip-surface-bottom: rgba(248, 250, 252, 0.992);
      --fund-tooltip-border-color: rgba(203, 213, 225, 0.94);
      box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-title,
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-val {
      color: #243041;
    }
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-series-label {
      color: #2f3a4b;
    }
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-row.active .fund-tooltip-series-label,
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-row.active .fund-tooltip-val {
      color: #0f172a;
    }
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-row.hovered:not(.active) .fund-tooltip-series-label,
    :root[data-theme="light"] #fundamentals-container .fund-tooltip-row.hovered:not(.active) .fund-tooltip-val {
      color: #1f3655;
    }
    :root[data-theme="light"] #fundamentals-container .fund-chart-title {
      text-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    }
    :root[data-theme="light"] #fundamentals-container .fund-range-thumb-label {
      border-color: rgba(118, 131, 102, 0.55);
      background: rgba(32, 40, 53, 0.96);
      color: #eef3d8;
    }
    :root[data-theme="light"] #fundamentals-container .fund-range-tick {
      background: rgba(156, 163, 175, 0.7);
    }
    :root[data-theme="light"] #fundamentals-container .fund-range-label {
      color: #6b7280;
    }
    :root[data-theme="light"] #overview-container .fund-range-label {
      color: #6b7280;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item:hover,
    :root[data-theme="light"] #fundamentals-container .fund-metric-item.is-keyboard-active {
      background: rgba(241, 245, 249, 0.92);
      color: #1f2937;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item.is-keyboard-active {
      box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.6);
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item.added {
      background: rgba(226, 232, 240, 0.92);
      color: #111827;
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item-indicator {
      background: rgba(15, 23, 42, 0.06);
      color: #6b7280;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item:hover .fund-metric-item-indicator,
    :root[data-theme="light"] #fundamentals-container .fund-metric-item.is-keyboard-active .fund-metric-item-indicator {
      background: rgba(15, 23, 42, 0.08);
      color: #1f2937;
    }
    :root[data-theme="light"] #fundamentals-container .fund-metric-item.added .fund-metric-item-indicator,
    :root[data-theme="light"] #fundamentals-container .fund-metric-item-indicator.is-added {
      background: rgba(15, 23, 42, 0.10);
      color: #111827;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-price-toggle-check {
      background: rgba(255, 255, 255, 0.98);
      border-color: rgba(148, 163, 184, 0.58);
      box-shadow: none;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-price-color-btn {
      background: rgba(255, 255, 255, 0.72);
      border-color: transparent;
    }
    :root[data-theme="light"] #fundamentals-container .fund-controls-row .fund-price-toggle.active .fund-price-toggle-check {
      border-color: rgba(90, 107, 74, 0.52);
      box-shadow: none;
    }

    /* Shared window chrome for chart dialogs and sidebars. Keep this late in the
       stylesheet so it normalizes older per-panel close buttons and shell colors. */
    .ticker-search,
    .settings-panel,
    .studies-panel,
    .ind-settings-panel,
    .tpl-save-dialog {
      background: var(--tos-window-bg);
      border-color: var(--tos-window-border);
      border-radius: var(--tos-window-radius);
      box-shadow: var(--tos-window-shadow);
      color: var(--tos-window-text);
      font-family: var(--tos-font-ui);
    }
    .ot-sidebar {
      background: var(--tos-window-bg);
      border-left-color: var(--tos-window-border);
      color: var(--tos-window-text);
      font-family: var(--tos-font-ui);
    }
    .studies-panel {
      --studies-shell-bg: var(--tos-window-bg);
      --studies-content-bg: var(--tos-window-content-bg);
      --studies-left-bg: var(--tos-window-content-bg);
      --studies-right-bg: var(--tos-window-content-bg);
      --studies-header-bg: var(--tos-window-header-bg);
      --studies-section-bg: var(--tos-window-section-bg);
      --studies-divider: var(--tos-window-border);
      --studies-divider-strong: var(--tos-window-border-strong);
      --studies-text-primary: var(--tos-window-text);
      --studies-text-secondary: var(--tos-window-text);
      --studies-text-muted: var(--tos-window-muted);
      --studies-icon-muted: var(--tos-window-muted);
      --studies-hover-bg: var(--tos-window-hover-bg);
      --studies-selected-bg: var(--tos-window-active-bg);
      --studies-btn-bg: var(--tos-window-bg-alt);
      --studies-btn-border: var(--tos-window-border-strong);
      --studies-btn-text: var(--tos-window-text);
      --studies-scrollbar: var(--tos-window-section-bg);
      --studies-scrollbar-hover: var(--tos-window-border-strong);
    }
    .ticker-search-header,
    .settings-header,
    .studies-panel-header,
    .ind-settings-header,
    .tpl-save-dialog-header {
      min-height: var(--tos-window-header-height);
      padding: 0 20px;
      background: var(--tos-window-header-bg);
      border-bottom: 1px solid var(--tos-window-border);
      box-sizing: border-box;
    }
    .ot-header {
      min-height: var(--tos-window-sidebar-header-height);
      padding: 0 10px 0 12px;
      background: var(--tos-window-header-bg);
      border-bottom-color: var(--tos-window-border);
      box-sizing: border-box;
    }
    .ticker-search-title,
    .settings-title,
    .studies-panel-header > span,
    .ind-settings-title,
    .tpl-save-dialog-title {
      color: var(--tos-window-title);
      font-size: var(--tos-window-title-size);
      font-weight: var(--tos-window-title-weight);
      line-height: 1.2;
    }
    .ot-title {
      color: var(--tos-window-title);
      font-size: 13px;
      font-weight: var(--tos-window-title-weight);
      line-height: 1.2;
    }
    .settings-nav {
      background: var(--tos-window-bg-alt);
      border-right-color: var(--tos-window-border);
    }
    .settings-content,
    .studies-panel-body,
    .ind-settings-body,
    .tpl-save-dialog-body {
      background: var(--tos-window-content-bg);
      color: var(--tos-window-text);
    }
    .ticker-search-close,
    .settings-close,
    .studies-panel-close,
    .ind-settings-close,
    .tpl-save-dialog-close,
    .fund-metrics-panel-close,
    #ot-close-btn {
      width: var(--tos-window-close-size);
      height: var(--tos-window-close-size);
      min-width: var(--tos-window-close-size);
      min-height: var(--tos-window-close-size);
      padding: 0;
      border: 0;
      border-radius: var(--tos-window-button-radius);
      background: transparent;
      color: var(--tos-window-muted);
      font-size: 0;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background 0.12s, color 0.12s, transform 0.08s;
    }
    .ticker-search-close svg,
    .settings-close svg,
    .studies-panel-close svg,
    .ind-settings-close svg,
    .tpl-save-dialog-close svg,
    .fund-metrics-panel-close svg,
    #ot-close-btn svg {
      width: var(--tos-window-close-icon-size);
      height: var(--tos-window-close-icon-size);
      display: block;
      flex: 0 0 auto;
    }
    .ticker-search-close:hover,
    .settings-close:hover,
    .studies-panel-close:hover,
    .ind-settings-close:hover,
    .tpl-save-dialog-close:hover,
    .fund-metrics-panel-close:hover,
    #ot-close-btn:hover {
      background: var(--tos-window-hover-bg);
      color: var(--tos-window-title);
      border-color: transparent;
    }
    .ticker-search-close:active,
    .settings-close:active,
    .studies-panel-close:active,
    .ind-settings-close:active,
    .tpl-save-dialog-close:active,
    .fund-metrics-panel-close:active,
    #ot-close-btn:active {
      background: var(--tos-window-active-bg);
      transform: scale(0.94);
    }
    .ticker-search-close:focus-visible,
    .settings-close:focus-visible,
    .studies-panel-close:focus-visible,
    .ind-settings-close:focus-visible,
    .tpl-save-dialog-close:focus-visible,
    .fund-metrics-panel-close:focus-visible,
    #ot-close-btn:focus-visible {
      outline: 2px solid var(--tos-accent);
      outline-offset: 2px;
    }
    .settings-footer,
    .studies-btn-row,
    .ind-settings-footer,
    .tpl-save-actions {
      min-height: 58px;
      padding: 12px 20px;
      background: var(--tos-window-bg);
      border-top-color: var(--tos-window-border);
      gap: 12px;
      box-sizing: border-box;
    }
    .settings-cancel-btn,
    .settings-ok-btn,
    .studies-btn-row button,
    .ind-settings-cancel-btn,
    .ind-settings-ok-btn,
    .tpl-save-action {
      min-width: 84px;
      height: var(--tos-window-button-height);
      padding: 0 14px;
      border-radius: var(--tos-window-button-radius);
      border: 1px solid var(--tos-window-border-strong);
      background: var(--tos-window-bg-alt);
      color: var(--tos-window-text);
      font: inherit;
      font-size: 13px;
      font-weight: 600;
      box-sizing: border-box;
      transition: background 0.12s, border-color 0.12s, color 0.12s;
    }
    .settings-cancel-btn:hover,
    .studies-btn-row button:hover,
    .ind-settings-cancel-btn:hover,
    .tpl-save-action.secondary:hover {
      background: var(--tos-window-hover-bg);
      border-color: var(--tos-window-border-strong);
      color: var(--tos-window-title);
    }
    .settings-ok-btn,
    #studies-ok-btn,
    .ind-settings-ok-btn,
    .tpl-save-action.primary {
      border-color: var(--tos-accent);
      background: var(--tos-accent);
      color: #FFFFFF;
    }
    .settings-ok-btn:hover,
    #studies-ok-btn:hover,
    .ind-settings-ok-btn:hover,
    .tpl-save-action.primary:hover {
      border-color: var(--tos-accent-hover);
      background: var(--tos-accent-hover);
      color: #FFFFFF;
    }
    #chart-container:focus {
      outline: none;
    }
    #chart-container:focus-visible {
      outline: 2px solid var(--tos-accent);
      outline-offset: -2px;
    }
    @media (max-width: 760px) {
      :root {
        --tos-toolbar-height: 46px;
      }
      .toolbar {
        padding-inline: 6px;
        scroll-padding-inline: 6px;
        -webkit-overflow-scrolling: touch;
      }
      .toolbar-spacer {
        flex: 0 0 4px;
        min-width: 4px;
        margin-left: 0;
      }
      .interval-toolbar-root {
        flex: 0 0 auto;
      }
      .ticker-label,
      .zoom-btn,
      .draw-btn,
      .draw-clear-btn,
      .range-btn,
      .tf-toolbar-btn,
      .interval-toolbar-btn,
      .interval-dropdown-btn,
      .workspace-btn,
      .theme-toggle-btn,
      .auth-profile-btn,
      .auth-login-btn {
        min-height: 40px;
      }
      .ticker-label {
        height: 40px;
      }
    }
    @media (max-width: 560px) {
      .ticker-label {
        min-width: 88px;
        max-width: 96px;
        margin-right: 2px;
        padding-inline: 8px;
      }
      .interval-toolbar-root {
        max-width: calc(min(132px, 34vw) + 34px);
      }
      .interval-toolbar {
        max-width: min(132px, 34vw);
      }
      .tf-panel,
      .interval-panel {
        position: fixed;
        top: calc(var(--tos-toolbar-height) + 6px);
        right: 8px;
        left: auto;
        max-width: calc(100vw - 16px);
      }
      .toolbar:has(#tf-toolbar-btn[aria-expanded="true"]),
      .toolbar:has(#interval-dropdown-btn[aria-expanded="true"]) {
        overflow-x: auto;
        overflow-y: hidden;
      }
      .settings-panel,
      .settings-panel.visible {
        width: calc(100vw - 16px);
        max-width: 780px;
        height: min(600px, calc(100dvh - 16px));
        max-height: calc(100dvh - 16px);
      }
      .settings-header {
        padding: 12px 14px 10px;
      }
      .settings-title {
        font-size: 18px;
      }
      .settings-layout {
        flex-direction: column;
      }
      .settings-nav {
        display: flex;
        width: 100%;
        padding: 0 6px;
        border-right: 0;
        border-bottom: 1px solid var(--tos-window-border);
        overflow-x: auto;
        scrollbar-width: none;
      }
      .settings-nav::-webkit-scrollbar {
        display: none;
      }
      .settings-nav-item {
        flex: 0 0 auto;
        width: auto;
        min-height: 40px;
        padding: 8px 12px;
        border-left: 0;
        border-bottom: 2px solid transparent;
        font-size: 13px;
        white-space: nowrap;
      }
      .settings-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--tos-accent);
      }
      .settings-content {
        padding: 14px;
      }
      .settings-footer {
        min-height: 54px;
        padding: 9px 14px;
      }
      .fund-main-topbar,
      .fund-main .fund-range-spacer {
        padding-left: 8px;
        padding-right: 8px;
      }
      .fund-main-topbar .fund-controls-actions {
        min-width: 0;
        justify-content: flex-start;
      }
      .fund-controls-actions .fund-sidebar-period-seg {
        width: min(100%, 156px);
        max-width: 100%;
      }
      #fundamentals-container .fund-controls .fund-range-period-seg .fund-seg-btn {
        flex: 1 1 0;
        min-width: 0;
      }
      .fund-main-topbar .fund-export-root {
        margin-left: 0;
      }
    }
  