        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #0f1419;
            color: #e0e0e0;
            padding: 16px;
            line-height: 1.4;
        }
        
        .site-nav {
            display: flex;
            gap: 24px;
            padding: 8px 0;
            align-items: center;
        }
        
        .site-nav a {
            color: #8892a0;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            padding: 4px 8px;
            border-radius: 4px;
            transition: color 0.2s, background 0.2s;
        }
        
        .site-nav a:hover {
            color: #e0e0e0;
            background: #1a1f26;
        }
        
        .site-nav a.active {
            color: #10b981;
            background: rgba(16, 185, 129, 0.1);
        }
        
        /* Nav wrapper with indices on right */
        .nav-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 8px;
            border-bottom: 1px solid #2d3748;
        }
        
        /* Indices bar (right side of nav) */
        .indices-bar {
            display: flex;
            gap: 20px;
            align-items: center;
            font-size: 12px;
        }
        
        .index-item {
            display: flex;
            gap: 6px;
            align-items: center;
            white-space: nowrap;
        }
        
        .index-name {
            color: #8892a0;
            font-weight: 500;
        }
        
        .index-price {
            color: #e0e0e0;
            font-weight: 600;
        }
        
        .index-change {
            font-weight: 500;
        }
        
        .index-change.positive {
            color: #10b981;
        }
        
        .index-change.negative {
            color: #ef4444;
        }
        
        .market-status {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            font-weight: 500;
        }
        
        .market-status.open {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        
        .market-status.closed {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }
        
        /* Provider health badges */
        .provider-badges {
            display: inline-flex;
            gap: 8px;
            margin-left: 12px;
        }
        
        .provider-badge {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            font-weight: 500;
            cursor: default;
        }
        
        .provider-badge.ok {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        
        .provider-badge.degraded {
            background: rgba(251, 191, 36, 0.2);
            color: #fbbf24;
        }
        
        .provider-badge.down {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }
        
        /* Ticker tape */
        .ticker-tape-container {
            background: #1a1f26;
            border-bottom: 1px solid #2d3748;
            overflow: hidden;
            padding: 6px 0;
            margin-bottom: 16px;
        }
        
        .ticker-tape {
            display: flex;
            gap: 40px;
            animation: ticker-scroll 30s linear infinite;
            white-space: nowrap;
        }
        
        .ticker-tape:hover {
            animation-play-state: paused;
        }
        
        @keyframes ticker-scroll {
            0% {
                transform: translateX(0);
            }
            100% {
                transform: translateX(-50%);
            }
        }
        
        .tape-item {
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 12px;
        }
        
        .tape-ticker {
            color: #e0e0e0;
            font-weight: 600;
        }
        
        .tape-price {
            color: #8892a0;
        }
        
        .tape-change {
            font-weight: 500;
        }
        
        .tape-change.positive {
            color: #10b981;
        }
        
        .tape-change.negative {
            color: #ef4444;
        }
        
        .container {
            max-width: 1600px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 4px 0;
        }
        
        .header-title {
            font-size: 18px;
            font-weight: 600;
            color: #ffffff;
        }
        
        .run-context-bar {
            display: flex;
            gap: 16px;
            align-items: center;
            font-size: 11px;
            color: #8892a0;
            padding: 6px 0;
            border-bottom: 1px solid #2d3748;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }
        
        .run-context-bar .context-item {
            display: flex;
            gap: 4px;
            align-items: center;
        }
        
        .run-context-bar .context-label {
            color: #6b7280;
            text-transform: uppercase;
            font-size: 9px;
        }
        
        .run-context-bar .context-value {
            color: #e0e0e0;
            font-weight: 500;
        }
        
        .scan-type-badge {
            font-size: 9px;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 3px;
            text-transform: uppercase;
            margin-right: 6px;
        }
        
        .scan-type-badge.full {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        
        .scan-type-badge.partial {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }
        
        .override-flags {
            font-size: 9px;
            color: #f59e0b;
            margin-left: 8px;
            font-style: italic;
        }
        
        .leaders-source-badge {
            font-size: 9px;
            font-weight: 500;
            padding: 2px 6px;
            border-radius: 3px;
            margin-left: 8px;
            vertical-align: middle;
        }
        
        .leaders-source-badge.full {
            background: rgba(16, 185, 129, 0.15);
            color: #10b981;
        }
        
        .leaders-source-badge.preserved {
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
        }
        
        .leaders-source-badge.partial-override {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }
        
        .stale-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
            margin-left: 6px;
        }
        
        .skipped-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
            margin-left: 6px;
        }
        
        .data-toggle {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .data-toggle label {
            font-size: 11px;
            color: #8892a0;
            text-transform: uppercase;
        }
        
        .data-toggle select {
            background: #1a1f26;
            border: 1px solid #2d3748;
            color: #e0e0e0;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
        }
        
        .load-status {
            font-size: 10px;
            color: #8892a0;
            padding: 2px 6px;
            border-radius: 3px;
        }
        
        .load-status.success {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        
        .load-status.error {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        /* Auto-refresh status indicator */
        .auto-refresh-status {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
            color: #6b7280;
            margin-left: 12px;
        }
        .data-updated-time {
            color: #9ca3af;
        }
        .run-id-display {
            color: #6b7280;
            font-family: monospace;
            font-size: 10px;
        }
        .refresh-now-btn {
            font-size: 10px;
            padding: 2px 8px;
            background: rgba(59, 130, 246, 0.15);
            color: #60a5fa;
            border: 1px solid #3b82f6;
        }
        .refresh-now-btn:hover {
            background: rgba(59, 130, 246, 0.3);
        }

        /* New data available banner */
        .new-data-banner {
            position: fixed;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(251, 191, 36, 0.15);
            border: 1px solid #fbbf24;
            border-radius: 6px;
            padding: 8px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 12px;
            color: #fbbf24;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        .new-data-banner .btn-small {
            font-size: 11px;
            padding: 4px 10px;
        }
        .new-data-banner .btn-dismiss {
            background: transparent;
            border: none;
            color: #9ca3af;
            padding: 2px 6px;
            cursor: pointer;
        }
        .new-data-banner .btn-dismiss:hover {
            color: #e0e0e0;
        }

        .blocks {
            display: grid;
            grid-template-columns: 1fr 2fr 1.5fr;
            gap: 12px;
            flex: 1;
            min-height: 0;
        }
        
        .block {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 12px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .block-title {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            color: #8892a0;
            margin-bottom: 8px;
            letter-spacing: 0.5px;
        }
        
        /* BLOCK A: MARKET REGIME */
        .block-a {
            gap: 12px;
        }
        
        .regime-sparkline {
            width: 100%;
            margin-bottom: 4px;
        }
        
        .regime-sparkline svg {
            width: 100%;
            height: 50px;
        }
        
        .sparkline-toggle {
            display: flex;
            gap: 4px;
            justify-content: flex-end;
            margin-bottom: 8px;
        }
        
        .sparkline-toggle button {
            background: #1a1f26;
            border: 1px solid #2d3748;
            color: #6b7280;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 9px;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .sparkline-toggle button:hover {
            border-color: #4b5563;
            color: #8892a0;
        }
        
        .sparkline-toggle button.active {
            background: #2d3748;
            border-color: #10b981;
            color: #10b981;
        }
        
        .sparkline-path {
            fill: none;
            stroke-width: 1.5;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        
        .sparkline-zero {
            stroke: #4b5563;
            stroke-width: 1;
            stroke-dasharray: 2,2;
        }
        
        .sparkline-dot {
            r: 3;
        }
        
        .sparkline-label {
            font-size: 8px;
            fill: #6b7280;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        
        .sparkline-hover {
            cursor: crosshair;
        }
        
        .sparkline-hover:hover {
            fill: rgba(255, 255, 255, 0.3);
            r: 8;
        }
        
        /* Custom tooltip for sparkline */
        .sparkline-tooltip {
            position: absolute;
            background: #1a1f26;
            border: 1px solid #4b5563;
            border-radius: 4px;
            padding: 6px 10px;
            font-size: 12px;
            color: #e0e0e0;
            pointer-events: none;
            z-index: 1000;
            white-space: nowrap;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
            display: none;
        }
        
        .sparkline-tooltip.visible {
            display: block;
        }
        
        .sparkline-tooltip .tooltip-date {
            color: #8892a0;
            font-size: 11px;
        }
        
        .sparkline-tooltip .tooltip-value {
            font-weight: 600;
            font-size: 13px;
        }
        
        .sparkline-tooltip .tooltip-value.positive {
            color: #10b981;
        }
        
        .sparkline-tooltip .tooltip-value.negative {
            color: #ef4444;
        }
        
        .regime-row {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
        }
        
        .regime-signal {
            font-size: 24px;
            font-weight: 700;
            min-width: 60px;
        }
        
        .signal-on {
            color: #10b981;
        }
        
        .signal-off {
            color: #ef4444;
        }
        
        .regime-label {
            font-size: 11px;
            color: #8892a0;
            text-transform: uppercase;
            min-width: 50px;
        }
        
        .regime-value {
            font-size: 13px;
            font-weight: 600;
            color: #e0e0e0;
        }
        
        .regime-flag {
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 3px;
            font-weight: 600;
            margin-left: auto;
        }
        
        .flag-strong {
            background: #10b981;
            color: #000;
        }
        
        .flag-weak {
            background: #ef4444;
            color: #fff;
        }
        
        .breadth-row {
            display: flex;
            gap: 16px;
            align-items: center;
        }
        
        .breadth-stat {
            font-size: 12px;
        }
        
        .breadth-stat-label {
            color: #8892a0;
            font-size: 10px;
            text-transform: uppercase;
        }
        
        .breadth-stat-value {
            font-size: 14px;
            font-weight: 600;
            color: #e0e0e0;
        }
        
        .debug-section {
            border-top: 1px solid #2d3748;
            padding-top: 8px;
            margin-top: 8px;
        }
        
        .debug-row {
            display: flex;
            justify-content: space-between;
            font-size: 9px;
            color: #4b5563;
            padding: 2px 0;
        }
        
        .debug-label {
            font-weight: 500;
            color: #3f4655;
        }
        
        .debug-yes {
            color: #059669;
        }
        
        .debug-no {
            color: #dc2626;
        }
        
        /* BLOCK B: LEADERS AND CANDIDATES */
        .block-b {
            flex-direction: column;
        }
        
        .block-disclaimer {
            font-size: 9px;
            color: #6b7280;
            font-style: italic;
            padding: 4px 0 0 0;
            border-top: 1px solid #2d3748;
            margin-top: 4px;
        }
        
        .table-wrapper {
            flex: 1;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }
        
        thead {
            position: sticky;
            top: 0;
            background: #0f1419;
            z-index: 10;
            border-bottom: 1px solid #2d3748;
        }
        
        th {
            text-align: left;
            padding: 6px 4px;
            font-weight: 600;
            color: #8892a0;
            font-size: 10px;
            text-transform: uppercase;
            border-right: 1px solid #2d3748;
        }
        
        th:last-child {
            border-right: none;
        }
        
        td {
            padding: 6px 4px;
            border-right: 1px solid #1a1f26;
            border-bottom: 1px solid #1a1f26;
        }
        
        td:last-child {
            border-right: none;
        }
        
        tbody tr {
            background: #1a1f26;
        }
        
        tbody tr:hover {
            background: #232a33;
        }
        
        .rank {
            color: #6b7280;
            font-weight: 500;
            width: 24px;
            text-align: center;
        }
        
        .ticker {
            font-weight: 600;
            color: #e0e0e0;
            width: 48px;
        }
        
        .company {
            color: #8892a0;
            font-size: 11px;
            width: 120px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 120px;
        }
        
        .score {
            color: #e0e0e0;
            font-weight: 600;
            text-align: right;
            width: 40px;
        }
        
        .sector {
            color: #6b7280;
            font-size: 10px;
            width: 70px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .rs-value {
            text-align: right;
            font-weight: 500;
            font-size: 11px;
            width: 55px;
        }
        
        .rs-positive {
            color: #10b981;
        }
        
        .rs-negative {
            color: #ef4444;
        }
        
        .earnings-days {
            text-align: center;
            width: 40px;
        }
        
        .earnings-flag {
            padding: 1px 4px;
            border-radius: 2px;
            font-size: 10px;
            font-weight: 600;
        }
        
        .earnings-soon {
            background: #ef4444;
            color: #fff;
        }
        
        .earnings-ok {
            color: #6b7280;
            background: transparent;
        }
        
        /* =============================================
           BLOCK C: CURRENT HOLDINGS SUMMARY (Dashboard only)
           5.4 UX Refinement - Visual separation of ACTIVE/PASSIVE/STABLE
           Note: The Portfolio tab uses holdingsDetail, not this block
           DO NOT CHANGE: schema, backend, calculations, data fields
           ============================================= */
        .block-c {
            flex-direction: column;
            overflow: hidden;
        }
        
        .block-c * {
            overflow: hidden;
        }
        
        /* =============================================
           SIGNALS SECTION STYLES
           ============================================= */
        .signals-section {
            background: #1a1f2e;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 12px;
            margin-bottom: 16px;
        }
        
        .signals-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid #2d3748;
        }
        
        .signals-title {
            font-size: 14px;
            font-weight: 600;
            color: #e2e8f0;
        }
        
        .signals-meta {
            font-size: 11px;
            color: #8892a0;
        }
        
        .signals-warning {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.3);
            border-radius: 4px;
            padding: 8px 12px;
            color: #f59e0b;
            font-size: 12px;
        }
        
        .signals-group {
            margin-bottom: 12px;
        }
        
        .signals-group:last-child {
            margin-bottom: 0;
        }
        
        .signals-group-title {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 6px;
        }
        
        .signals-group-title.buys {
            color: #10b981;
        }
        
        .signals-group-title.sells {
            color: #ef4444;
        }
        
        .signals-group-title.holds {
            color: #6b7280;
        }
        
        .signal-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 3px;
            margin-bottom: 4px;
            font-size: 12px;
        }
        
        .signal-item:last-child {
            margin-bottom: 0;
        }
        
        .signal-ticker {
            font-weight: 600;
            color: #e2e8f0;
            min-width: 50px;
        }
        
        .signal-score {
            color: #8892a0;
            font-size: 11px;
        }
        
        .signal-note {
            color: #6b7280;
            font-size: 10px;
            max-width: 200px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        
        .signal-price-missing {
            color: #f59e0b;
            font-size: 10px;
        }
        
        /* Signal table styles */
        .signals-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
        }
        
        .signals-table th {
            text-align: left;
            padding: 6px 8px;
            color: #8892a0;
            font-weight: 500;
            border-bottom: 1px solid #2d3748;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .signals-table td {
            padding: 6px 8px;
            border-bottom: 1px solid rgba(45, 55, 72, 0.5);
        }
        
        .signals-table tr:last-child td {
            border-bottom: none;
        }
        
        .signal-action-buy {
            color: #10b981;
            font-weight: 600;
        }
        
        .signal-action-sell {
            color: #ef4444;
            font-weight: 600;
        }
        
        .signal-action-hold {
            color: #6b7280;
            font-weight: 600;
        }
        
        .signal-ticker-cell {
            font-weight: 600;
            color: #e2e8f0;
        }

        /* Discovery table styles */
        .discovery-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
        }

        .discovery-table th {
            text-align: left;
            padding: 6px 8px;
            color: #8892a0;
            font-weight: 500;
            border-bottom: 1px solid #2d3748;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .discovery-table td {
            padding: 6px 8px;
            border-bottom: 1px solid rgba(45, 55, 72, 0.5);
        }

        .discovery-table tr:last-child td {
            border-bottom: none;
        }

        .discovery-row {
            cursor: pointer;
            transition: background 0.15s;
        }

        .discovery-row:hover {
            background: rgba(16, 185, 129, 0.1);
        }

        .discovery-ticker {
            font-weight: 600;
            color: #10b981;
        }

        .discovery-rank {
            color: #e2e8f0;
            font-weight: 500;
        }

        .discovery-jump {
            color: #10b981;
            font-weight: 600;
        }

        .discovery-days {
            color: #f59e0b;
            font-weight: 500;
        }

        .discovery-score {
            color: #e2e8f0;
        }

        .discovery-r6m {
            color: #8892a0;
        }

        .discovery-sector {
            color: #8892a0;
            font-size: 10px;
        }

        .discovery-note {
            color: #6b7280;
            font-size: 10px;
            max-width: 200px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* ETF signals with sizing columns */
        .etf-signals-with-sizing th {
            white-space: nowrap;
        }

        .signal-shares {
            text-align: right;
            font-family: 'SF Mono', 'Monaco', monospace;
            font-size: 10px;
            color: #d1d5db;
        }

        .signal-dollars {
            text-align: right;
            font-family: 'SF Mono', 'Monaco', monospace;
            font-size: 10px;
            color: #10b981;
        }
        
        .signal-rank-cell {
            color: #a0aec0;
        }
        
        .signal-score-cell {
            color: #e2e8f0;
        }
        
        .signal-price-cell {
            color: #a0aec0;
        }
        
        .signal-price-unavailable {
            color: #f59e0b;
            font-style: italic;
        }
        
        .signal-reason-cell {
            color: #8892a0;
            max-width: 180px;
        }
        
        .signal-window-cell {
            font-size: 10px;
        }
        
        .signal-window-open {
            color: #10b981;
        }
        
        .signal-window-blocked {
            color: #f59e0b;
        }

        /* Strategy sections with 16px gap between them */
        .portfolio-section {
            margin-bottom: 16px;
            border-radius: 4px;
            padding: 8px;
        }
        
        .portfolio-section:last-of-type {
            margin-bottom: 8px;
        }
        
        /* ACTIVE section: green tint background, green left border */
        .portfolio-section.section-active {
            background: rgba(16, 185, 129, 0.03);
            border-left: 3px solid #10b981;
        }
        
        /* PASSIVE section: neutral styling */
        .portfolio-section.section-passive {
            background: rgba(107, 114, 128, 0.03);
            border-left: 3px solid #4b5563;
        }
        
        /* STABLE section: blue styling */
        .portfolio-section.section-stable {
            background: rgba(59, 130, 246, 0.03);
            border-left: 3px solid #3b82f6;
        }

        /* RETIREMENT_401K section: amber/gold styling */
        .portfolio-section.section-retirement-401k {
            background: rgba(245, 158, 11, 0.03);
            border-left: 3px solid #f59e0b;
        }

        .portfolio-section-header {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 4px 0 8px 0;
            margin-bottom: 8px;
            border-bottom: 1px solid #2d3748;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .portfolio-section.section-active .portfolio-section-header {
            color: #10b981;
        }
        
        .portfolio-section.section-passive .portfolio-section-header {
            color: #8892a0;
        }
        
        .portfolio-section.section-stable .portfolio-section-header {
            color: #3b82f6;
        }

        .portfolio-section.section-retirement-401k .portfolio-section-header {
            color: #f59e0b;
        }

        /* Virtual bucket indicator */
        .virtual-bucket-badge {
            font-size: 8px;
            background: rgba(99, 102, 241, 0.2);
            color: #818cf8;
            padding: 1px 4px;
            border-radius: 3px;
            margin-left: 6px;
            vertical-align: middle;
        }

        /* Unallocated cash banner */
        .unallocated-cash-banner {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.3);
            border-radius: 6px;
            padding: 12px 16px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        .unallocated-cash-banner .banner-icon {
            font-size: 18px;
        }
        .unallocated-cash-banner .banner-content {
            flex: 1;
        }
        .unallocated-cash-banner .banner-title {
            font-weight: 600;
            color: #f59e0b;
            font-size: 13px;
        }
        .unallocated-cash-banner .banner-amount {
            font-size: 16px;
            font-weight: 700;
            color: #fbbf24;
            margin-left: 8px;
        }
        .unallocated-cash-banner .banner-subtitle {
            font-size: 11px;
            color: #8892a0;
            margin-top: 2px;
        }
        .unallocated-cash-banner .banner-actions {
            display: flex;
            gap: 8px;
        }
        .unallocated-cash-banner .btn-assign {
            padding: 6px 12px;
            font-size: 11px;
            font-weight: 600;
            border-radius: 4px;
            cursor: pointer;
            border: none;
            transition: background 0.2s;
        }
        .unallocated-cash-banner .btn-assign.roth {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        .unallocated-cash-banner .btn-assign.roth:hover {
            background: rgba(16, 185, 129, 0.3);
        }
        .unallocated-cash-banner .btn-assign.traditional {
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
        }
        .unallocated-cash-banner .btn-assign.traditional:hover {
            background: rgba(107, 114, 128, 0.3);
        }

        /* Section totals in header */
        .section-totals {
            font-size: 10px;
            font-weight: 500;
            color: #6b7280;
            display: flex;
            gap: 12px;
        }
        
        .section-totals .total-value {
            color: #e0e0e0;
        }
        
        .section-totals .total-cash {
            color: #8892a0;
        }
        
        /* Grid layout: Name, Value, Pos, Cash (with %), Day%, Day$, Alert, Type */
        .portfolio-grid {
            display: grid;
            grid-template-columns: minmax(70px, 1fr) 70px 32px 85px 48px 55px 36px 50px;
            gap: 4px 8px;
            align-items: center;
            font-size: 11px;
        }
        
        .portfolio-grid-header {
            font-size: 9px;
            color: #6b7280;
            text-transform: uppercase;
            padding-bottom: 4px;
            border-bottom: 1px solid rgba(45, 55, 72, 0.5);
            cursor: pointer;
            user-select: none;
            font-weight: 600;
        }
        
        .portfolio-grid-header:hover {
            color: #e0e0e0;
        }
        
        .portfolio-grid-header.active-sort {
            color: #10b981;
        }
        
        .portfolio-grid-row {
            display: contents;
        }
        
        /* Row styling with left border indicator */
        .portfolio-grid-row > * {
            padding: 5px 2px;
        }
        
        .portfolio-grid-row > *:first-child {
            padding-left: 4px;
        }
        
        .pg-name {
            font-weight: 600;
            color: #e0e0e0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .pg-edit-btn {
            background: transparent;
            border: none;
            color: #6b7280;
            cursor: pointer;
            padding: 2px 4px;
            font-size: 14px;
            line-height: 1;
            border-radius: 3px;
            opacity: 0.6;
            transition: opacity 0.15s, background 0.15s;
        }

        .pg-edit-btn:hover {
            opacity: 1;
            background: rgba(255, 255, 255, 0.1);
            color: #10b981;
        }

        .pg-value, .pg-positions, .pg-cash, .pg-day-pct, .pg-day-dollar {
            text-align: right;
            color: #e0e0e0;
            font-variant-numeric: tabular-nums;
        }
        
        /* Cash with percentage in muted color */
        .pg-cash-pct {
            color: #6b7280;
            font-size: 10px;
        }
        
        .pg-day-pct.positive, .pg-day-dollar.positive {
            color: #10b981;
        }
        
        .pg-day-pct.negative, .pg-day-dollar.negative {
            color: #ef4444;
        }
        
        .pg-alert {
            text-align: center;
        }
        
        .pg-alert-flag {
            font-size: 9px;
            font-weight: 600;
            color: #f59e0b;
            background: rgba(245, 158, 11, 0.15);
            padding: 1px 4px;
            border-radius: 2px;
        }
        
        .pg-strategy {
            text-align: right;
        }
        
        .pg-badge {
            display: inline-block;
            padding: 2px 5px;
            border-radius: 3px;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .pg-badge-active {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        
        .pg-badge-passive {
            background: #2d3748;
            color: #8892a0;
        }
        
        .pg-badge-stable {
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
        }
        
        .pg-strategy-select {
            background: transparent;
            border: none;
            color: inherit;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            padding: 2px 5px;
            border-radius: 3px;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }
        
        .pg-strategy-select.active {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        
        .pg-strategy-select.passive {
            background: #2d3748;
            color: #8892a0;
        }
        
        .pg-strategy-select.stable {
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
        }

        .pg-strategy-select.retirement_401k {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }

        .pg-strategy-select:hover {
            opacity: 0.8;
        }
        
        .pg-strategy-select:focus {
            outline: none;
            box-shadow: 0 0 0 1px #10b981;
        }
        
        /* Grand total footer */
        .portfolio-footer {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #2d3748;
            font-size: 11px;
            color: #6b7280;
            overflow: hidden;
        }
        
        .portfolio-footer-total {
            display: flex;
            justify-content: space-between;
            color: #e0e0e0;
            font-weight: 600;
        }
        
        .portfolio-footer-total .footer-label {
            color: #8892a0;
        }
        
        .action-flag {
            padding: 3px 6px;
            border-radius: 3px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
        }
        
        .flag-trim {
            background: #f59e0b;
            color: #000;
        }
        
        .flag-exit {
            background: #ef4444;
            color: #fff;
        }
        
        .flag-add {
            background: #10b981;
            color: #000;
        }
        
        .flag-hold {
            background: #374151;
            color: #9ca3af;
        }
        
        .reason-code {
            font-size: 9px;
            color: #8892a0;
            font-family: 'Courier New', monospace;
        }
        
        .multiplier {
            font-size: 10px;
            color: #6b7280;
            font-family: 'Courier New', monospace;
        }
        
        .timestamp {
            font-size: 10px;
            color: #6b7280;
            padding-top: 8px;
            border-top: 1px solid #2d3748;
            margin-top: 8px;
        }
        
        .local-dev-note {
            font-size: 10px;
            color: #4b5563;
            text-align: center;
            padding: 8px;
            border-top: 1px solid #2d3748;
            margin-top: 16px;
        }
        
        .local-dev-note code {
            background: #1a1f26;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
        }
        
        /* TICKER SEARCH */
        .ticker-search {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-left: 16px;
        }
        
        .ticker-search input {
            background: #1a1f26;
            border: 1px solid #2d3748;
            color: #e0e0e0;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            width: 140px;
        }
        
        .ticker-search input::placeholder {
            color: #6b7280;
        }
        
        .ticker-search button {
            background: #2d3748;
            border: 1px solid #4b5563;
            color: #e0e0e0;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 11px;
            cursor: pointer;
        }
        
        .ticker-search button:hover {
            background: #374151;
        }
        
        /* TICKER CARD */
        .ticker-card-container {
            margin-bottom: 12px;
            display: none;
        }
        
        .ticker-card-container.visible {
            display: block;
        }
        
        .ticker-card {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 16px;
            max-width: 600px;
        }
        
        .ticker-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid #2d3748;
        }
        
        .ticker-card-title {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .ticker-card-ticker {
            font-size: 20px;
            font-weight: 700;
            color: #ffffff;
        }
        
        .ticker-card-company {
            font-size: 12px;
            color: #8892a0;
        }
        
        .ticker-card-meta {
            text-align: right;
            font-size: 11px;
            color: #6b7280;
        }
        
        .ticker-card-score {
            font-size: 24px;
            font-weight: 700;
            color: #10b981;
        }
        
        .ticker-card-section {
            margin-bottom: 12px;
        }
        
        .ticker-card-section-title {
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            color: #6b7280;
            margin-bottom: 6px;
            letter-spacing: 0.5px;
        }
        
        .ticker-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 8px;
        }
        
        .ticker-card-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        
        .ticker-card-label {
            font-size: 9px;
            color: #6b7280;
            text-transform: uppercase;
        }
        
        .ticker-card-value {
            font-size: 13px;
            font-weight: 600;
            color: #e0e0e0;
        }
        
        .ticker-card-value.positive {
            color: #10b981;
        }
        
        .ticker-card-value.negative {
            color: #ef4444;
        }
        
        .ticker-card-value.warning {
            color: #f59e0b;
        }
        
        .ticker-card-footer {
            margin-top: 12px;
            padding-top: 8px;
            border-top: 1px solid #2d3748;
            font-size: 10px;
            color: #6b7280;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .ticker-card-fullview {
            color: #10b981;
            text-decoration: none;
            font-weight: 500;
        }
        
        .ticker-card-fullview:hover {
            text-decoration: underline;
        }
        
        .ticker-card-close {
            background: none;
            border: none;
            color: #6b7280;
            cursor: pointer;
            font-size: 16px;
            padding: 0;
            line-height: 1;
        }
        
        .ticker-card-close:hover {
            color: #e0e0e0;
        }
        
        .ticker-not-found {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 16px;
            max-width: 400px;
            color: #8892a0;
            font-size: 13px;
        }
        
        /* =============================================
           MOBILE RESPONSIVE STYLES
           ============================================= */
        
        @media (max-width: 768px) {
            body {
                padding: 8px;
            }
            
            /* Nav row: stack vertically */
            .nav-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            
            .site-nav {
                gap: 12px;
                flex-wrap: wrap;
            }
            
            .site-nav a {
                font-size: 13px;
            }
            
            /* Indices bar: horizontal scroll */
            .indices-bar {
                width: 100%;
                overflow-x: auto;
                padding-bottom: 4px;
                -webkit-overflow-scrolling: touch;
            }
            
            .index-item {
                font-size: 11px;
            }
            
            /* Header: stack elements */
            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            
            .header-title {
                font-size: 16px;
            }
            
            .data-toggle {
                width: 100%;
                flex-wrap: wrap;
            }
            
            .ticker-search {
                margin-left: 0;
                width: 100%;
            }
            
            .ticker-search input {
                flex: 1;
                width: auto;
            }
            
            /* CRITICAL: Stack blocks vertically */
            .blocks {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            .block {
                padding: 10px;
            }
            
            .block-title {
                font-size: 11px;
            }
            
            /* Block B table: horizontal scroll wrapper */
            .table-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            
            table {
                min-width: 500px;
                font-size: 11px;
            }
            
            th, td {
                padding: 5px 3px;
            }
            
            /* Portfolio grid: simplify for mobile */
            .portfolio-grid {
                grid-template-columns: 1fr 65px 55px;
                font-size: 11px;
            }
            
            /* Hide less critical columns on mobile: Pos, Day%, Day$, Alert */
            .portfolio-grid-header:nth-child(3),
            .portfolio-grid-header:nth-child(5),
            .portfolio-grid-header:nth-child(6),
            .portfolio-grid-header:nth-child(7),
            .portfolio-grid-row > *:nth-child(3),
            .portfolio-grid-row > *:nth-child(5),
            .portfolio-grid-row > *:nth-child(6),
            .portfolio-grid-row > *:nth-child(7) {
                display: none;
            }
            
            /* Section styling for mobile */
            .portfolio-section {
                padding: 6px;
                margin-bottom: 12px;
            }
            
            .section-totals {
                flex-direction: column;
                gap: 2px;
            }
            
            /* Ticker card: full width */
            .ticker-card {
                max-width: 100%;
            }
            
            .ticker-card-ticker {
                font-size: 18px;
            }
            
            .ticker-card-score {
                font-size: 20px;
            }
            
            .ticker-card-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            /* Hide dev note on mobile */
            .local-dev-note {
                display: none;
            }
        }
        
        /* Extra small screens */
        @media (max-width: 480px) {
            .index-item {
                font-size: 10px;
                gap: 4px;
            }
            
            .indices-bar {
                gap: 12px;
            }
            
            .header-title {
                font-size: 14px;
            }
            
            .block-title {
                font-size: 10px;
            }
            
            /* Even simpler portfolio on very small screens */
            .portfolio-grid {
                grid-template-columns: 1fr 60px;
            }
            
            /* Also hide Type column on very small screens */
            .portfolio-grid-header:nth-child(8),
            .portfolio-grid-row > *:nth-child(8) {
                display: none;
            }
            
            .portfolio-section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }
        }

        /* Phase 1-8 UX Additions */
        
        /* Confidence tier badges */
        .confidence-badge {
            font-size: 8px;
            font-weight: 600;
            padding: 1px 4px;
            border-radius: 2px;
            text-transform: uppercase;
            margin-left: 4px;
        }
        .confidence-high { background: rgba(16, 185, 129, 0.2); color: #10b981; }
        .confidence-medium { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
        .confidence-low { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
        
        /* Setup state badges */
        .setup-badge {
            font-size: 8px;
            font-weight: 500;
            padding: 1px 4px;
            border-radius: 2px;
        }
        .setup-emerging { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
        .setup-stable { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }
        .setup-mature { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
        
        /* Regime fit indicator */
        .regime-fit {
            font-size: 8px;
            font-weight: 600;
        }
        .regime-favored { color: #10b981; }
        .regime-neutral { color: #9ca3af; }
        .regime-contrarian { color: #f59e0b; }
        
        /* Rank change indicators */
        .rank-change {
            font-size: 9px;
            margin-left: 2px;
        }
        .rank-up { color: #10b981; }
        .rank-down { color: #ef4444; }
        .rank-new { color: #3b82f6; font-weight: 600; }
        
        /* Alerts section */
        .alerts-section {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 12px;
            margin-bottom: 12px;
        }
        .alerts-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #2d3748;
        }
        .alerts-title {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            color: #f59e0b;
        }
        .alert-count {
            font-size: 10px;
            color: #8892a0;
        }
        .alert-item {
            background: rgba(245, 158, 11, 0.05);
            border: 1px solid rgba(245, 158, 11, 0.2);
            border-radius: 4px;
            padding: 8px 10px;
            margin-bottom: 6px;
            font-size: 11px;
        }
        .alert-item:last-child { margin-bottom: 0; }
        .alert-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }
        .alert-ticker {
            font-weight: 700;
            color: #e0e0e0;
        }
        .alert-action {
            font-weight: 600;
            padding: 1px 5px;
            border-radius: 2px;
            font-size: 10px;
        }
        .alert-action-exit { background: #ef4444; color: #fff; }
        .alert-action-trim { background: #f59e0b; color: #000; }
        .alert-action-add { background: #10b981; color: #000; }
        .alert-reason {
            color: #e0e0e0;
            margin-bottom: 2px;
        }
        .alert-details {
            color: #8892a0;
            font-size: 10px;
        }
        .alert-meta {
            display: flex;
            gap: 12px;
            margin-top: 4px;
            font-size: 9px;
            color: #6b7280;
        }
        .alert-portfolio {
            color: #8892a0;
        }
        .alert-regime {
            font-weight: 500;
        }
        .alert-regime.contrarian { color: #f59e0b; }
        .alert-regime.aligned { color: #10b981; }
        .alert-see-more {
            margin-top: 10px;
            text-align: right;
            font-size: 11px;
        }
        .alert-see-more a {
            color: #10b981;
            text-decoration: none;
        }
        .alert-see-more a:hover {
            text-decoration: underline;
        }

        /* Catalyst Alerts section */
        .catalysts-section {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 12px;
            margin-top: 12px;
        }
        .catalysts-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #2d3748;
        }
        .catalysts-title {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            color: #8b5cf6;
        }
        .catalyst-count {
            font-size: 10px;
            color: #8892a0;
        }
        .catalyst-filter-bar {
            display: flex;
            gap: 12px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .catalyst-filter {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .catalyst-filter label {
            font-size: 10px;
            color: #8892a0;
        }
        .catalyst-filter select {
            background: #1a1f26;
            color: #e0e0e0;
            border: 1px solid #2d3748;
            border-radius: 4px;
            padding: 3px 6px;
            font-size: 10px;
        }
        .catalyst-item {
            background: rgba(139, 92, 246, 0.05);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: 4px;
            padding: 8px 10px;
            margin-bottom: 6px;
            font-size: 11px;
        }
        .catalyst-item:last-child { margin-bottom: 0; }
        .catalyst-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }
        .catalyst-ticker {
            font-weight: 700;
            color: #e0e0e0;
        }
        .catalyst-type {
            font-size: 10px;
            color: #8892a0;
            margin-left: 8px;
        }
        .catalyst-action {
            font-weight: 600;
            padding: 1px 5px;
            border-radius: 2px;
            font-size: 10px;
        }
        .catalyst-action-risk { background: #ef4444; color: #fff; }
        .catalyst-action-watch { background: #8b5cf6; color: #fff; }
        .catalyst-action-info { background: #3b82f6; color: #fff; }
        .catalyst-action-other { background: #6b7280; color: #fff; }
        .catalyst-priority {
            font-size: 9px;
            font-weight: 600;
            padding: 1px 4px;
            border-radius: 2px;
            margin-left: 6px;
        }
        .catalyst-priority-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
        .catalyst-priority-medium { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
        .catalyst-priority-low { background: rgba(107, 114, 128, 0.2); color: #6b7280; }
        .catalyst-details {
            color: #8892a0;
            font-size: 10px;
            margin-top: 2px;
        }
        .catalyst-source {
            font-size: 9px;
            color: #6b7280;
            margin-top: 4px;
        }
        .catalyst-source-derived { color: #10b981; }
        .catalyst-source-analyst { color: #3b82f6; }
        .catalyst-see-more {
            margin-top: 10px;
            text-align: right;
            font-size: 11px;
        }
        .catalyst-see-more a {
            color: #8b5cf6;
            text-decoration: none;
        }
        .catalyst-see-more a:hover {
            text-decoration: underline;
        }
        .catalyst-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
        }
        .catalyst-table th {
            text-align: left;
            padding: 6px 8px;
            border-bottom: 1px solid #2d3748;
            color: #8892a0;
            font-weight: 500;
            font-size: 10px;
        }
        .catalyst-table td {
            padding: 6px 8px;
            border-bottom: 1px solid rgba(45, 55, 72, 0.5);
        }
        .catalyst-table tr:hover {
            background: rgba(139, 92, 246, 0.05);
        }

        /* Why Not section */
        .why-not-section {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            padding: 12px;
            margin-top: 12px;
        }
        .why-not-header {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            color: #8892a0;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #2d3748;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .why-not-summary {
            font-size: 10px;
            color: #6b7280;
            font-weight: normal;
        }
        .near-miss-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 8px;
            background: rgba(107, 114, 128, 0.05);
            border-radius: 3px;
            margin-bottom: 4px;
            font-size: 11px;
        }
        .near-miss-item:last-child { margin-bottom: 0; }
        .near-miss-ticker {
            font-weight: 600;
            color: #e0e0e0;
            min-width: 50px;
        }
        .near-miss-company {
            color: #8892a0;
            flex: 1;
            margin: 0 8px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .near-miss-score {
            color: #e0e0e0;
            font-weight: 500;
            min-width: 35px;
            text-align: right;
        }
        .near-miss-veto {
            color: #f59e0b;
            font-size: 10px;
            min-width: 140px;
            text-align: right;
        }

        /* ETF Sections - distinct styling */
        .etf-signals-section {
            border-left: 3px solid #3b82f6;
        }
        .etf-signals-section .signals-title {
            color: #3b82f6;
        }
        .etf-near-misses-section {
            border-left: 3px solid #3b82f6;
        }
        .etf-near-misses-section .why-not-header span:first-child {
            color: #3b82f6;
        }

        /* ============================================================
           TAB NAVIGATION (PR A - Dashboard Tabs)
           ============================================================ */
        .tab-bar {
            display: flex;
            gap: 4px;
            padding: 8px 0;
            border-bottom: 1px solid #2d3748;
            margin-bottom: 12px;
            background: #0f1419;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .tab-link {
            padding: 8px 16px;
            color: #8892a0;
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
            border-radius: 4px 4px 0 0;
            transition: color 0.2s, background 0.2s;
            border: 1px solid transparent;
            border-bottom: none;
        }

        .tab-link:hover {
            color: #e0e0e0;
            background: rgba(255, 255, 255, 0.05);
        }

        .tab-link.active {
            color: #10b981;
            background: #1a1f26;
            border-color: #2d3748;
            border-bottom: 2px solid #10b981;
            margin-bottom: -1px;
        }

        /* Settings menu (gear icon) */
        .settings-menu-container {
            position: relative;
            display: inline-block;
            margin-left: auto;
        }
        .settings-menu-btn {
            background: transparent;
            border: 1px solid #2d3748;
            border-radius: 4px;
            color: #8892a0;
            font-size: 16px;
            padding: 6px 10px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .settings-menu-btn:hover {
            color: #e0e0e0;
            background: rgba(255, 255, 255, 0.05);
        }
        .settings-menu-dropdown {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 4px;
            min-width: 140px;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        .settings-menu-dropdown.show {
            display: block;
        }
        .settings-menu-dropdown a {
            display: block;
            padding: 10px 14px;
            color: #e0e0e0;
            text-decoration: none;
            font-size: 13px;
        }
        .settings-menu-dropdown a:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        /* Diagnostics overlay */
        .diagnostics-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            overflow-y: auto;
        }
        .diagnostics-overlay.show {
            display: block;
        }
        .diagnostics-overlay-content {
            background: #0f1419;
            margin: 40px auto;
            max-width: 900px;
            border-radius: 8px;
            border: 1px solid #2d3748;
            padding: 20px;
        }
        .diagnostics-overlay-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid #2d3748;
        }
        .diagnostics-overlay-header h2 {
            margin: 0;
            color: #e0e0e0;
            font-size: 18px;
        }
        .diagnostics-close-btn {
            background: transparent;
            border: none;
            color: #8892a0;
            font-size: 24px;
            cursor: pointer;
            padding: 4px 8px;
        }
        .diagnostics-close-btn:hover {
            color: #e0e0e0;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Tab-specific layouts */
        .tab-content .blocks {
            display: grid;
            grid-template-columns: 1fr 2fr 1.5fr;
            gap: 12px;
            flex: 1;
            min-height: 0;
        }

        /* Stocks/ETFs tab: full width sections */
        #tab-stocks .signals-section,
        #tab-stocks .why-not-section,
        #tab-etfs .signals-section,
        #tab-etfs .why-not-section {
            display: block !important;
        }

        /* Holdings tab: full width portfolio */
        #tab-holdings .block-c {
            max-width: 100%;
        }

        /* Exit risk badges (added 2026-01-04) */
        .exit-risk-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            cursor: help;
        }
        .exit-risk-badge.risk-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
        .exit-risk-badge.risk-medium { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
        .exit-risk-badge.risk-low { background: rgba(16, 185, 129, 0.2); color: #10b981; }

        /* Holdings priority section (appended below portfolio summary) */
        .holdings-priority-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid #2d3748; }
        .holdings-priority-header { font-size: 12px; font-weight: 600; color: #8892a0; margin-bottom: 8px; text-transform: uppercase; }
        .holdings-priority-table { width: 100%; font-size: 12px; border-collapse: collapse; }
        .holdings-priority-table th { text-align: left; padding: 6px 8px; font-size: 10px; font-weight: 600; color: #8892a0; border-bottom: 1px solid #2d3748; }
        .holdings-priority-table td { padding: 6px 8px; border-bottom: 1px solid #252b35; }
        .holdings-priority-table tr:hover td { background: rgba(45, 55, 72, 0.3); }

        /* =====================================================================
         * PM DECISION COCKPIT STYLES
         * Added: 2026-01-03
         * Unified signals, watchlist, decisions, outcomes, context drawer
         * ===================================================================== */

        /* Unified Signals Tab */
        .unified-signals-table { width: 100%; font-size: 12px; border-collapse: collapse; }
        .unified-signals-table th { text-align: left; padding: 8px; font-size: 10px; font-weight: 600; color: #8892a0; border-bottom: 1px solid #2d3748; text-transform: uppercase; }
        .unified-signals-table td { padding: 8px; border-bottom: 1px solid #252b35; }
        .unified-signals-table tr:hover td { background: rgba(45, 55, 72, 0.3); }
        .unified-signals-table .ticker-cell { font-weight: 600; color: #e0e0e0; }
        .unified-signals-table .asset-type { font-size: 9px; padding: 2px 4px; border-radius: 2px; text-transform: uppercase; }
        .unified-signals-table .asset-stock { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .unified-signals-table .asset-etf { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
        .action-badge { padding: 3px 8px; border-radius: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
        .action-reduce, .action-exit { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
        .action-buy { background: rgba(16, 185, 129, 0.2); color: #10b981; }
        .action-hold { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
        .action-rotate { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .funding-badge { padding: 2px 6px; border-radius: 3px; font-size: 9px; font-weight: 500; text-transform: uppercase; }
        .funding-proceeds { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
        .funding-cash { background: rgba(16, 185, 129, 0.2); color: #10b981; }
        .conviction-bar { display: inline-block; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%); min-width: 20px; }
        .no-action-message { padding: 24px; text-align: center; color: #8892a0; font-size: 14px; background: rgba(45, 55, 72, 0.3); border-radius: 4px; margin: 12px 0; }

        /* Watchlist Tab */
        .watchlist-table { width: 100%; font-size: 12px; border-collapse: collapse; }
        .watchlist-table th { text-align: left; padding: 8px; font-size: 10px; font-weight: 600; color: #8892a0; border-bottom: 1px solid #2d3748; text-transform: uppercase; }
        .watchlist-table td { padding: 8px; border-bottom: 1px solid #252b35; }
        .watchlist-table tr:hover td { background: rgba(45, 55, 72, 0.3); }
        .missing-reason { font-size: 11px; color: #f59e0b; font-style: italic; }

        /* Decisions Panel */
        .decisions-table { width: 100%; font-size: 12px; border-collapse: collapse; }
        .decisions-table th { text-align: left; padding: 8px; font-size: 10px; font-weight: 600; color: #8892a0; border-bottom: 1px solid #2d3748; text-transform: uppercase; }
        .decisions-table td { padding: 8px; border-bottom: 1px solid #252b35; vertical-align: top; }
        .decisions-table tr:hover td { background: rgba(45, 55, 72, 0.3); }
        .decision-timestamp { font-size: 10px; color: #6b7280; }
        .decision-filter { margin-bottom: 12px; }
        .decision-filter input { background: #1e242c; border: 1px solid #2d3748; color: #e0e0e0; padding: 6px 10px; border-radius: 4px; font-size: 12px; width: 200px; }
        .decision-filter input::placeholder { color: #6b7280; }

        /* Emily 401(k) Recommendations */
        .emily-401k-section { margin-top: 16px; }
        .emily-401k-card { background: #1e242c; border: 1px solid #2d3748; border-radius: 6px; padding: 12px 16px; }
        .emily-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #2d3748; }
        .emily-title { font-size: 14px; font-weight: 600; color: #e0e0e0; }
        .emily-asof { font-size: 10px; color: #6b7280; }
        .emily-primary { background: #252b35; border-radius: 4px; padding: 10px 12px; margin-bottom: 12px; }
        .emily-primary-label { font-size: 10px; font-weight: 600; color: #8892a0; text-transform: uppercase; margin-bottom: 6px; }
        .emily-primary-fund { display: flex; align-items: center; gap: 10px; }
        .emily-fund-symbol { font-size: 14px; font-weight: 700; color: #10b981; }
        .emily-fund-name { font-size: 12px; color: #e0e0e0; }
        .emily-fund-class { font-size: 10px; color: #8892a0; background: #1e242c; padding: 2px 6px; border-radius: 3px; }
        .emily-by-class { }
        .emily-by-class-label { font-size: 10px; font-weight: 600; color: #8892a0; text-transform: uppercase; margin-bottom: 8px; }
        .emily-asset-class-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #252b35; }
        .emily-asset-class-row:last-child { border-bottom: none; }
        .emily-asset-class-name { font-size: 11px; color: #8892a0; text-transform: capitalize; }
        .emily-asset-class-top { display: flex; align-items: center; gap: 8px; }
        .emily-asset-class-top .emily-fund-symbol { font-size: 12px; font-weight: 600; color: #3b82f6; }
        .emily-fund-er { font-size: 10px; color: #6b7280; }
        .emily-fund-more { font-size: 10px; color: #8892a0; background: #252b35; padding: 2px 5px; border-radius: 3px; }

        /* Outcomes Overlay */
        .outcomes-section { margin-top: 24px; padding-top: 16px; border-top: 1px solid #2d3748; }
        .outcomes-header { font-size: 13px; font-weight: 600; color: #e0e0e0; margin-bottom: 12px; }
        .outcomes-toggle { display: flex; gap: 8px; margin-bottom: 12px; }
        .outcomes-toggle button { background: #1e242c; border: 1px solid #2d3748; color: #8892a0; padding: 6px 12px; border-radius: 4px; font-size: 11px; cursor: pointer; }
        .outcomes-toggle button.active { background: #2d3748; color: #e0e0e0; }
        .outcomes-table { width: 100%; font-size: 12px; border-collapse: collapse; }
        .outcomes-table th { text-align: left; padding: 6px 8px; font-size: 10px; font-weight: 600; color: #8892a0; border-bottom: 1px solid #2d3748; }
        .outcomes-table td { padding: 6px 8px; border-bottom: 1px solid #252b35; }
        .return-positive { color: #10b981; }
        .return-negative { color: #ef4444; }

        /* Context Drawer */
        .context-drawer { margin-top: 16px; border: 1px solid #2d3748; border-radius: 4px; overflow: hidden; }
        .context-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #1e242c; cursor: pointer; user-select: none; }
        .context-drawer-header:hover { background: #252b35; }
        .context-drawer-title { font-size: 11px; font-weight: 600; color: #8892a0; text-transform: uppercase; }
        .context-drawer-toggle { font-size: 10px; color: #6b7280; }
        .context-drawer.collapsed .context-drawer-content { display: none; }
        .context-drawer-content { padding: 12px; background: #151a20; font-size: 11px; color: #8892a0; }
        .context-drawer-content .context-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #252b35; }
        .context-drawer-content .context-row:last-child { border-bottom: none; }
        .context-drawer-content .context-label { color: #6b7280; }
        .context-drawer-content .context-value { color: #e0e0e0; }

        /* Account Editor */
        .account-editor-block { margin-bottom: 16px; }
        .account-editor-block .block-title { display: flex; justify-content: space-between; align-items: center; }
        .editing-indicator { background: rgba(251, 191, 36, 0.15); border: 1px solid #fbbf24; border-radius: 4px; padding: 8px 12px; margin-bottom: 12px; font-size: 12px; color: #fbbf24; }
        .editing-indicator strong { color: #e0e0e0; }
        .field-error { display: block; font-size: 11px; color: #ef4444; margin-top: 4px; min-height: 14px; }
        .field-hint { display: block; font-size: 11px; color: #6b7280; margin-top: 4px; }
        .form-row input.has-error, .form-row select.has-error { border-color: #ef4444; }
        .holding-row.has-error .ticker-input { border-color: #ef4444; }

        /* Manual Accounts (legacy class kept for compatibility) */
        .manual-accounts-block { margin-top: 16px; }
        .manual-accounts-block .block-title { display: flex; justify-content: space-between; align-items: center; }
        .btn-small { padding: 4px 10px; font-size: 11px; background: #2d3748; color: #e0e0e0; border: 1px solid #4a5568; border-radius: 4px; cursor: pointer; }
        .btn-small:hover { background: #4a5568; }
        .btn-primary { padding: 8px 16px; font-size: 12px; background: #10b981; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
        .btn-primary:hover { background: #059669; }
        .btn-secondary { padding: 8px 16px; font-size: 12px; background: #4a5568; color: #e0e0e0; border: none; border-radius: 4px; cursor: pointer; }
        .btn-secondary:hover { background: #6b7280; }
        .manual-account-form { background: #1a1f26; border: 1px solid #2d3748; border-radius: 6px; padding: 16px; margin: 12px 0; }
        .form-row { margin-bottom: 12px; }
        .form-row label { display: block; font-size: 11px; color: #8892a0; margin-bottom: 4px; text-transform: uppercase; }
        .form-row input, .form-row select, .form-row textarea { width: 100%; padding: 8px; font-size: 13px; background: #252b35; border: 1px solid #4a5568; border-radius: 4px; color: #e0e0e0; }
        .form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: #10b981; }
        .form-row textarea { font-family: monospace; resize: vertical; }
        .form-actions { display: flex; gap: 8px; margin-top: 16px; }
        .manual-account-card { background: #1a1f26; border: 1px solid #2d3748; border-radius: 6px; padding: 12px; margin: 8px 0; display: flex; justify-content: space-between; align-items: center; }
        .manual-account-card .account-info { flex: 1; }
        .manual-account-card .account-name { font-weight: 600; color: #e0e0e0; font-size: 14px; }
        .manual-account-card .account-meta { font-size: 11px; color: #8892a0; margin-top: 4px; }
        .manual-account-card .account-value { font-size: 16px; font-weight: 600; color: #10b981; }
        .manual-account-card .account-actions { display: flex; gap: 8px; }
        .manual-account-card .btn-icon { padding: 4px 8px; font-size: 11px; background: transparent; border: 1px solid #4a5568; color: #8892a0; border-radius: 4px; cursor: pointer; }
        .manual-account-card .btn-icon:hover { background: #2d3748; color: #e0e0e0; }
        .manual-account-card .btn-icon.delete:hover { background: #ef4444; border-color: #ef4444; color: white; }
        .manual-accounts-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid #2d3748; display: flex; align-items: center; gap: 12px; }
        .sync-status { font-size: 11px; padding: 4px 8px; border-radius: 4px; }
        .sync-status.success { background: rgba(16, 185, 129, 0.2); color: #10b981; }
        .sync-status.error { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
        .sync-status.pending { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
        .export-hint { font-size: 11px; color: #6b7280; }
        .strategy-badge { display: inline-block; padding: 2px 6px; font-size: 10px; border-radius: 3px; font-weight: 600; margin-left: 8px; }
        .strategy-badge.passive { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
        .strategy-badge.active { background: rgba(16, 185, 129, 0.2); color: #10b981; }

        /* Holdings Input List (ACTIVE accounts) */
        .holdings-input-list { margin-top: 8px; }
        .holding-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
        .holding-row input { padding: 6px 8px; font-size: 12px; background: #252b35; border: 1px solid #4a5568; border-radius: 4px; color: #e0e0e0; }
        .holding-row input:focus { outline: none; border-color: #10b981; }
        .holding-row .ticker-input { width: 80px; text-transform: uppercase; }
        .holding-row .shares-input { width: 80px; }
        .holding-row .value-display { width: 100px; padding: 6px 8px; font-size: 12px; color: #10b981; background: #1a1f26; border-radius: 4px; text-align: right; }
        .holding-row .btn-remove { padding: 4px 8px; font-size: 11px; background: transparent; border: 1px solid #4a5568; color: #8892a0; border-radius: 4px; cursor: pointer; }
        .holding-row .btn-remove:hover { background: #ef4444; border-color: #ef4444; color: white; }
        .holdings-total { margin-top: 12px; padding: 8px; background: #1a1f26; border-radius: 4px; text-align: right; font-size: 13px; color: #8892a0; }
        .holdings-total strong { color: #10b981; }

        /* Balance row for RETIREMENT_401K (ticker + dollar amount) */
        .balance-row .amount-input { width: 100px; }
        .balance-row .virtual-shares-display {
            width: 90px;
            padding: 6px 8px;
            font-size: 11px;
            color: #f59e0b;
            background: #1a1f26;
            border-radius: 4px;
            text-align: right;
            white-space: nowrap;
        }
        .balance-row .virtual-shares-display:empty::after { content: '—'; }

        /* Signals Tab Controls */
        .signals-controls { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px; background: #1a1f26; border-radius: 6px; margin-bottom: 16px; align-items: center; }
        .signals-control-group { display: flex; align-items: center; gap: 8px; }
        .signals-control-label { font-size: 11px; color: #8892a0; font-weight: 600; text-transform: uppercase; }
        .signals-control-select { padding: 6px 10px; font-size: 13px; background: #252b35; border: 1px solid #4a5568; border-radius: 4px; color: #e0e0e0; min-width: 140px; }
        .signals-control-select:focus { outline: none; border-color: #10b981; }
        .account-kind-badge { font-size: 10px; padding: 2px 6px; border-radius: 3px; margin-left: 4px; }
        .account-kind-badge.active { background: #10b981; color: white; }
        .account-kind-badge.passive { background: #6366f1; color: white; }
        .cash-control { display: flex; align-items: center; gap: 8px; }
        .cash-control-input { width: 100px; padding: 6px 10px; font-size: 13px; background: #252b35; border: 1px solid #4a5568; border-radius: 4px; color: #e0e0e0; }
        .cash-control-input:focus { outline: none; border-color: #10b981; }
        .cash-control-buttons { display: flex; gap: 4px; }
        .cash-control-buttons button { padding: 4px 8px; font-size: 10px; border-radius: 4px; cursor: pointer; border: 1px solid #4a5568; }
        .cash-control-buttons .btn-save { background: #10b981; color: white; border-color: #10b981; }
        .cash-control-buttons .btn-save:hover { background: #059669; }
        .cash-control-buttons .btn-auto { background: #2d3748; color: #e0e0e0; }
        .cash-control-buttons .btn-auto:hover { background: #4a5568; }
        .cash-display { font-size: 13px; color: #e0e0e0; }
        .cash-display .cash-value { color: #10b981; font-weight: 600; }
        .cash-display .cash-source { font-size: 10px; color: #6b7280; margin-left: 4px; }
        .cash-control-error { font-size: 11px; color: #ef4444; margin-left: 8px; }
        .cash-command { display: none; margin-top: 8px; padding: 8px; background: #1a1e24; border: 1px solid #4a5568; border-radius: 4px; font-family: monospace; font-size: 11px; color: #a0aec0; }
        .cash-command.visible { display: block; }
        .cash-command code { background: #252b35; padding: 2px 6px; border-radius: 3px; color: #10b981; word-break: break-all; }
        .cash-command-copy { margin-left: 8px; cursor: pointer; color: #3b82f6; font-size: 10px; }
        .cash-command-copy:hover { text-decoration: underline; }
        .btn-load { background: #3b82f6; color: white; border-color: #3b82f6; }
        .btn-load:hover { background: #2563eb; }
        .cash-source-override { color: #10b981; }
        .cash-source-manual { color: #fbbf24; }
        .cash-source-auto { color: #6b7280; }
        .cash-source-none { color: #ef4444; }
        .show-mode-toggle { display: flex; gap: 4px; }
        .show-mode-toggle button { padding: 4px 10px; font-size: 11px; border-radius: 4px; cursor: pointer; border: 1px solid #4a5568; background: #2d3748; color: #8892a0; }
        .show-mode-toggle button.active { background: #10b981; color: white; border-color: #10b981; }

        /* =====================================================================
         * ACCOUNT ACTIONS (Decision View) STYLES
         * Added: 2026-01-16
         * Per-account action recommendations from v2 rankings
         * ===================================================================== */

        /* Header showing asof_date and profile */
        .account-actions-header {
            padding: 12px 16px;
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 6px;
            margin-bottom: 16px;
            font-size: 13px;
            color: #e0e0e0;
        }
        .account-actions-header .header-asof {
            color: #10b981;
            font-weight: 600;
        }
        .account-actions-header .header-profile {
            color: #8892a0;
            margin-left: 16px;
        }

        /* Missing artifact banner */
        .account-actions-missing {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.3);
            border-radius: 6px;
            padding: 24px;
            text-align: center;
            color: #f59e0b;
        }
        .account-actions-missing .missing-icon {
            font-size: 32px;
            margin-bottom: 12px;
        }
        .account-actions-missing .missing-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
        }
        .account-actions-missing .missing-hint {
            font-size: 12px;
            color: #8892a0;
        }
        .account-actions-missing code {
            background: #1a1f26;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: monospace;
            color: #10b981;
        }

        /* Cards container - 3 column grid */
        .account-actions-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
        }

        /* Individual account card */
        .account-action-card {
            background: #1a1f26;
            border: 1px solid #2d3748;
            border-radius: 8px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        /* Card header with account name and action badge */
        .account-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 12px;
            border-bottom: 1px solid #2d3748;
        }
        .account-card-name {
            font-size: 16px;
            font-weight: 700;
            color: #e0e0e0;
        }
        .account-card-action {
            font-size: 14px;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 4px;
            text-transform: uppercase;
        }
        .account-card-action.action-buy {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        .account-card-action.action-hold {
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
        }
        .account-card-action.action-sell {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }
        .account-card-action.action-rotate {
            background: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }

        /* Orders list */
        .account-card-orders {
            flex: 1;
        }
        .account-card-orders-title {
            font-size: 10px;
            font-weight: 600;
            color: #6b7280;
            text-transform: uppercase;
            margin-bottom: 8px;
        }
        .account-card-order-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 8px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 4px;
            margin-bottom: 4px;
        }
        .account-card-order-row:last-child {
            margin-bottom: 0;
        }
        .order-symbol {
            font-weight: 600;
            color: #e0e0e0;
        }
        .order-target-pct {
            font-size: 12px;
            color: #10b981;
            font-weight: 500;
        }
        .account-card-no-orders {
            color: #6b7280;
            font-size: 12px;
            font-style: italic;
            padding: 8px;
            text-align: center;
        }

        /* Reason section */
        .account-card-reason {
            font-size: 12px;
            color: #8892a0;
            padding-top: 8px;
            border-top: 1px solid #2d3748;
        }

        /* Warnings section */
        .account-card-warnings {
            margin-top: 8px;
        }
        .account-card-warning {
            font-size: 11px;
            color: #f59e0b;
            background: rgba(245, 158, 11, 0.1);
            padding: 4px 8px;
            border-radius: 3px;
            margin-bottom: 4px;
        }
        .account-card-warning:last-child {
            margin-bottom: 0;
        }

        /* Decision Log Drawer */
        .decision-log-drawer {
            margin-top: 24px;
            border: 1px solid #2d3748;
            border-radius: 6px;
            overflow: hidden;
        }
        .decision-log-drawer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: #1a1f26;
            cursor: pointer;
            user-select: none;
        }
        .decision-log-drawer-header:hover {
            background: #232a33;
        }
        .decision-log-drawer-title {
            font-size: 12px;
            font-weight: 600;
            color: #8892a0;
            text-transform: uppercase;
        }
        .decision-log-drawer-toggle {
            font-size: 11px;
            color: #6b7280;
        }
        .decision-log-drawer.collapsed .decision-log-drawer-content {
            display: none;
        }
        .decision-log-drawer-content {
            padding: 16px;
            background: #151a20;
        }

        /* Mobile responsive for account cards */
        @media (max-width: 768px) {
            .account-actions-cards {
                grid-template-columns: 1fr;
            }
            .account-card-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
        }

        /* =====================================================================
         * V2 DECISION ARTIFACT STYLES
         * Added: 2026-01-20
         * Additional styles for v2 account_actions schema with market regime,
         * context profiles, and probe state tracking.
         * ===================================================================== */

        /* V2 header row with regime and version info */
        .v2-header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .header-regime {
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
        }
        .header-version {
            font-size: 11px;
            color: #6b7280;
            font-weight: 500;
        }

        /* Market regime state colors */
        .regime-neutral {
            background: rgba(107, 114, 128, 0.2);
            color: #9ca3af;
        }
        .regime-risk_on, .regime-risk-on {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }
        .regime-risk_off, .regime-risk-off {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        /* V2 header profile section */
        .v2-header-profile {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #2d3748;
        }
        .v2-header-profile strong {
            color: #e0e0e0;
        }
        .profile-rationale {
            font-size: 11px;
            color: #6b7280;
            margin-top: 4px;
            font-style: italic;
        }

        /* Per-account profile badge */
        .account-card-profile-used {
            font-size: 10px;
            color: #8892a0;
            margin-top: 4px;
        }
        .account-card-profile-used code {
            background: rgba(59, 130, 246, 0.15);
            color: #60a5fa;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: monospace;
            font-size: 10px;
        }

        /* Order reason display with info icon */
        .order-reason {
            font-size: 10px;
            color: #6b7280;
            margin-top: 2px;
            display: flex;
            align-items: flex-start;
            gap: 4px;
        }
        .order-reason-icon {
            color: #4b5563;
            flex-shrink: 0;
        }
        .order-reason-text {
            line-height: 1.4;
        }

        /* Probe state section */
        .probe-state-section {
            margin-top: 24px;
            border: 1px solid #2d3748;
            border-radius: 6px;
            overflow: hidden;
        }
        .probe-state-header {
            padding: 12px 16px;
            background: #1a1f26;
            font-size: 12px;
            font-weight: 600;
            color: #8892a0;
            text-transform: uppercase;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .probe-state-header .probe-count {
            font-size: 11px;
            font-weight: 500;
            color: #6b7280;
        }
        .probe-state-content {
            padding: 16px;
            background: #151a20;
        }

        /* Probe account rows */
        .probe-account-row {
            margin-bottom: 16px;
        }
        .probe-account-row:last-child {
            margin-bottom: 0;
        }
        .probe-account-name {
            font-size: 13px;
            font-weight: 600;
            color: #e0e0e0;
            margin-bottom: 8px;
        }
        .probe-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        /* Probe chip styling */
        .probe-chip {
            display: inline-flex;
            flex-direction: column;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 11px;
        }
        .probe-chip-symbol {
            font-weight: 600;
            color: #a78bfa;
        }
        .probe-chip-meta {
            color: #6b7280;
            font-size: 10px;
            margin-top: 2px;
        }
        .probe-chip.state-probing {
            border-color: rgba(139, 92, 246, 0.4);
        }
        .probe-chip.state-promoted {
            background: rgba(16, 185, 129, 0.1);
            border-color: rgba(16, 185, 129, 0.4);
        }
        .probe-chip.state-promoted .probe-chip-symbol {
            color: #10b981;
        }
        .probe-chip.state-killed {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.3);
            opacity: 0.7;
        }
        .probe-chip.state-killed .probe-chip-symbol {
            color: #ef4444;
            text-decoration: line-through;
        }

        /* Empty probe state */
        .probe-state-empty {
            color: #6b7280;
            font-size: 12px;
            font-style: italic;
            text-align: center;
            padding: 12px;
        }

